note for reviewers: - there are a couple of places where a macro (like expect) is used and is passed several types of pair (expected vs actual) (mostly the four configurations int vs long on both parameters are seen) - I tested several approaches (like split expect in two expect_in and expect_long, moving to a typed approach like compare macro), but didn't apply them (still requiring too many casts in my opinion), didn't even consider others (cast everywhere), and finally used an helper function for the macro and letting the compiler do the integral conversion (hence hidding all the discrepancies in types we may have)
Especially for comctl32: - I forgot to mention in patch change, but the COLORREF casts in patch for include/commctrl.h are removed in next patch
A+ ---
Eric Pouech (31): dlls/winecrt0: enable compilation with long types dlls/comctl32/tests: use correct integral type dlls/comctl32/tests: use inline function in expect*() macros to handle integral conversion include/commctrl.h: fix definition of CLR_* macros dlls/comctl32/tests: enable compilation with long types dlls/d3d10core/tests: enable compilation with long types dlls/dbghelp/tests: enable compilation with long types dlls/ddrawex/tests: enable compilation with long types dlls/ddraw/tests: enable compilation with long types dlls/devenum/tests: enable compilation with long types dlls/dhcpcsvc/tests: enable compilation with long types dlls/directmanipulation/tests: enable compilation with long types include/ddraw.h: fix some definitions dlls/dplayx/tests: use correct integral type dlls/dplayx/tests: use function in checkFlags macro to handle integral conversion dlls/dplayx/tests: enable compilation with long types dlls/dpnet/tests: use correct integral type dlls/dpnet/tests: enable compilation with long types dlls/dpvoice/tests: enable compilation with long types dlls/dsdmo/tests: enable compilation with long types dlls/dsound/tests: enable compilation with long types dlls/dssenh/tests: enable compilation with long types dlls/dwmapi/tests: enable compilation with long types dlls/dwrite/tests: use correct integral type dlls/dwrite/tests: enable compilation with long types dlls/dxdiagn/tests: enable compilation with long types dlls/dxgi/tests: enable compilation with long types dlls/explorerframe/tests: use correct integral type dlls/explorerframe/tests: enable compilation with long types dlls/faultrep/tests: enable compilation with long types dlls/fusion/tests: enable compilation with long types
dlls/comctl32/tests/Makefile.in | 1 - dlls/comctl32/tests/animate.c | 4 +- dlls/comctl32/tests/button.c | 196 +- dlls/comctl32/tests/combo.c | 114 +- dlls/comctl32/tests/datetime.c | 62 +- dlls/comctl32/tests/dpa.c | 72 +- dlls/comctl32/tests/edit.c | 203 +- dlls/comctl32/tests/header.c | 78 +- dlls/comctl32/tests/imagelist.c | 120 +- dlls/comctl32/tests/listbox.c | 226 +- dlls/comctl32/tests/listview.c | 150 +- dlls/comctl32/tests/misc.c | 58 +- dlls/comctl32/tests/monthcal.c | 49 +- dlls/comctl32/tests/mru.c | 28 +- dlls/comctl32/tests/msg.h | 16 +- dlls/comctl32/tests/pager.c | 32 +- dlls/comctl32/tests/progress.c | 12 +- dlls/comctl32/tests/propsheet.c | 84 +- dlls/comctl32/tests/rebar.c | 22 +- dlls/comctl32/tests/static.c | 4 +- dlls/comctl32/tests/status.c | 13 +- dlls/comctl32/tests/subclass.c | 2 +- dlls/comctl32/tests/syslink.c | 10 +- dlls/comctl32/tests/tab.c | 45 +- dlls/comctl32/tests/taskdialog.c | 16 +- dlls/comctl32/tests/toolbar.c | 184 +- dlls/comctl32/tests/tooltips.c | 82 +- dlls/comctl32/tests/trackbar.c | 15 +- dlls/comctl32/tests/treeview.c | 62 +- dlls/comctl32/tests/updown.c | 26 +- dlls/comctl32/tests/v6util.h | 4 +- dlls/d3d10core/tests/Makefile.in | 1 - dlls/d3d10core/tests/d3d10core.c | 1524 ++--- dlls/dbghelp/tests/Makefile.in | 1 - dlls/dbghelp/tests/dbghelp.c | 10 +- dlls/ddraw/tests/Makefile.in | 1 - dlls/ddraw/tests/d3d.c | 620 +- dlls/ddraw/tests/ddraw1.c | 4082 ++++++------- dlls/ddraw/tests/ddraw2.c | 4704 +++++++-------- dlls/ddraw/tests/ddraw4.c | 5648 +++++++++--------- dlls/ddraw/tests/ddraw7.c | 5360 ++++++++--------- dlls/ddraw/tests/ddrawmodes.c | 182 +- dlls/ddraw/tests/dsurface.c | 752 +-- dlls/ddraw/tests/refcount.c | 126 +- dlls/ddraw/tests/visual.c | 448 +- dlls/ddrawex/tests/Makefile.in | 1 - dlls/ddrawex/tests/ddrawex.c | 18 +- dlls/ddrawex/tests/surface.c | 100 +- dlls/devenum/tests/Makefile.in | 1 - dlls/devenum/tests/devenum.c | 266 +- dlls/dhcpcsvc/tests/Makefile.in | 1 - dlls/dhcpcsvc/tests/dhcpcsvc.c | 18 +- dlls/directmanipulation/tests/Makefile.in | 1 - dlls/directmanipulation/tests/manipulation.c | 4 +- dlls/dplayx/tests/Makefile.in | 1 - dlls/dplayx/tests/dplayx.c | 133 +- dlls/dpnet/tests/Makefile.in | 1 - dlls/dpnet/tests/address.c | 194 +- dlls/dpnet/tests/client.c | 362 +- dlls/dpnet/tests/server.c | 85 +- dlls/dpnet/tests/thread.c | 108 +- dlls/dpvoice/tests/Makefile.in | 1 - dlls/dpvoice/tests/voice.c | 100 +- dlls/dsdmo/tests/Makefile.in | 1 - dlls/dsdmo/tests/dsdmo.c | 170 +- dlls/dsound/tests/Makefile.in | 1 - dlls/dsound/tests/capture.c | 150 +- dlls/dsound/tests/ds3d.c | 250 +- dlls/dsound/tests/ds3d8.c | 238 +- dlls/dsound/tests/dsound.c | 386 +- dlls/dsound/tests/dsound8.c | 426 +- dlls/dsound/tests/duplex.c | 76 +- dlls/dsound/tests/propset.c | 124 +- dlls/dssenh/tests/Makefile.in | 1 - dlls/dssenh/tests/dssenh.c | 254 +- dlls/dwmapi/tests/Makefile.in | 1 - dlls/dwmapi/tests/dwmapi.c | 4 +- dlls/dwrite/tests/Makefile.in | 1 - dlls/dwrite/tests/analyzer.c | 196 +- dlls/dwrite/tests/font.c | 1848 +++--- dlls/dwrite/tests/layout.c | 1428 ++--- dlls/dxdiagn/tests/Makefile.in | 1 - dlls/dxdiagn/tests/container.c | 174 +- dlls/dxdiagn/tests/provider.c | 30 +- dlls/dxgi/tests/Makefile.in | 1 - dlls/dxgi/tests/dxgi.c | 1590 ++--- dlls/explorerframe/tests/Makefile.in | 1 - dlls/explorerframe/tests/nstc.c | 606 +- dlls/explorerframe/tests/taskbarlist.c | 66 +- dlls/faultrep/tests/Makefile.in | 1 - dlls/faultrep/tests/faultrep.c | 8 +- dlls/fusion/tests/Makefile.in | 1 - dlls/fusion/tests/asmcache.c | 344 +- dlls/fusion/tests/asmenum.c | 82 +- dlls/fusion/tests/asmname.c | 316 +- dlls/fusion/tests/fusion.c | 22 +- dlls/winecrt0/Makefile.in | 1 - dlls/winecrt0/debug.c | 6 +- include/commctrl.h | 4 +- include/ddraw.h | 22 +- 100 files changed, 17856 insertions(+), 17819 deletions(-)
Signed-off-by: Eric Pouech eric.pouech@gmail.com
--- dlls/winecrt0/Makefile.in | 1 - dlls/winecrt0/debug.c | 6 +++--- 2 files changed, 3 insertions(+), 4 deletions(-)
diff --git a/dlls/winecrt0/Makefile.in b/dlls/winecrt0/Makefile.in index 6915e69eb4b..17da4da29c6 100644 --- a/dlls/winecrt0/Makefile.in +++ b/dlls/winecrt0/Makefile.in @@ -1,4 +1,3 @@ -EXTRADEFS = -DWINE_NO_LONG_TYPES STATICLIB = libwinecrt0.a
C_SRCS = \ diff --git a/dlls/winecrt0/debug.c b/dlls/winecrt0/debug.c index 6e1866c7568..44094fcf5bb 100644 --- a/dlls/winecrt0/debug.c +++ b/dlls/winecrt0/debug.c @@ -192,10 +192,10 @@ static int __cdecl fallback__wine_dbg_header( enum __wine_debug_class cls, if (TRACE_ON(timestamp)) { ULONG ticks = GetTickCount(); - pos += sprintf( pos, "%3u.%03u:", ticks / 1000, ticks % 1000 ); + pos += sprintf( pos, "%3lu.%03lu:", ticks / 1000, ticks % 1000 ); } - if (TRACE_ON(pid)) pos += sprintf( pos, "%04x:", GetCurrentProcessId() ); - pos += sprintf( pos, "%04x:", GetCurrentThreadId() ); + if (TRACE_ON(pid)) pos += sprintf( pos, "%04lx:", GetCurrentProcessId() ); + pos += sprintf( pos, "%04lx:", GetCurrentThreadId() ); if (function && cls < ARRAY_SIZE( debug_classes )) snprintf( pos, sizeof(buffer) - (pos - buffer), "%s:%s:%s ", debug_classes[cls], channel->name, function );
Signed-off-by: Eric Pouech eric.pouech@gmail.com
--- dlls/comctl32/tests/pager.c | 2 +- dlls/comctl32/tests/rebar.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/dlls/comctl32/tests/pager.c b/dlls/comctl32/tests/pager.c index a4d6a658cda..2ce964f8a27 100644 --- a/dlls/comctl32/tests/pager.c +++ b/dlls/comctl32/tests/pager.c @@ -1210,7 +1210,7 @@ static void test_wm_notify(void) DONT_CONVERT_SEND | DONT_CONVERT_RECEIVE}, {&nmtbr, sizeof(nmtbr), NULL, 0, (WCHAR **)&nmtbr.tbButton.iString, NULL, TBN_RESTORE, TBN_RESTORE, DONT_CONVERT_SEND | DONT_CONVERT_RECEIVE}, - {&nmtbdi, sizeof(nmtbdi), &nmtbdi.dwMask, TBNF_TEXT, &nmtbdi.pszText, &nmtbdi.cchText, TBN_GETDISPINFOW, + {&nmtbdi, sizeof(nmtbdi), (UINT*)&nmtbdi.dwMask, TBNF_TEXT, &nmtbdi.pszText, &nmtbdi.cchText, TBN_GETDISPINFOW, TBN_GETDISPINFOW, DONT_CONVERT_SEND | DONT_CONVERT_RECEIVE}, {&nmtb, sizeof(nmtb), NULL, 0, &nmtb.pszText, &nmtb.cchText, TBN_GETBUTTONINFOW, TBN_GETBUTTONINFOA, SEND_EMPTY_IF_NULL | CONVERT_SEND | CONVERT_RECEIVE}, diff --git a/dlls/comctl32/tests/rebar.c b/dlls/comctl32/tests/rebar.c index 63449d4d457..e868198b4d8 100644 --- a/dlls/comctl32/tests/rebar.c +++ b/dlls/comctl32/tests/rebar.c @@ -195,7 +195,7 @@ static int string_width(const CHAR *s) {
typedef struct { RECT rc; - DWORD fStyle; + UINT fStyle; UINT cx; } rbband_result_t;
depending on the files, these macros can be called with: - UINT/UINT, DWORD/DWORD pairs, but also UINT/DWORD or DWORD/UINT pairs... - wrapping inside an inline function allows the compiler to take care of the integral conversions
Signed-off-by: Eric Pouech eric.pouech@gmail.com
--- dlls/comctl32/tests/dpa.c | 6 +++++- dlls/comctl32/tests/edit.c | 7 +++++-- dlls/comctl32/tests/header.c | 6 +++++- dlls/comctl32/tests/listview.c | 16 +++++++++++++--- dlls/comctl32/tests/monthcal.c | 13 +++++++++++-- dlls/comctl32/tests/tab.c | 7 ++++++- dlls/comctl32/tests/trackbar.c | 7 ++++++- dlls/comctl32/tests/treeview.c | 6 +++++- dlls/comctl32/tests/updown.c | 6 +++++- 9 files changed, 61 insertions(+), 13 deletions(-)
diff --git a/dlls/comctl32/tests/dpa.c b/dlls/comctl32/tests/dpa.c index 4a446a8e2c5..841076ef00f 100644 --- a/dlls/comctl32/tests/dpa.c +++ b/dlls/comctl32/tests/dpa.c @@ -32,7 +32,11 @@ #include "wine/test.h" #include "v6util.h"
-#define expect(expected, got) ok(got == expected, "Expected %d, got %d\n", expected, got) +#define expect(expected,got) expect_(__LINE__, expected, got) +static inline void expect_(unsigned line, DWORD expected, DWORD got) +{ + ok_(__FILE__, line)(expected == got, "Expected %d, got %d\n", expected, got); +}
typedef struct _STREAMDATA { diff --git a/dlls/comctl32/tests/edit.c b/dlls/comctl32/tests/edit.c index 7fcc44eb4a1..2c108ed419c 100644 --- a/dlls/comctl32/tests/edit.c +++ b/dlls/comctl32/tests/edit.c @@ -2032,8 +2032,11 @@ static void test_margins_font_change(void)
}
-#define edit_pos_ok(exp, got, txt) \ - ok(exp == got, "wrong " #txt " expected %d got %d\n", exp, got); +#define edit_pos_ok(expected, got, txt) edit_pos_ok_(__LINE__, expected, got, #txt) +static inline void edit_pos_ok_(unsigned line, DWORD expected, DWORD got, const char* txt) +{ + ok_(__FILE__, line)(expected == got, "wrong %s expected %d got %d\n", txt, expected, got); +}
#define check_pos(hwEdit, set_height, test_top, test_height, test_left) \ do { \ diff --git a/dlls/comctl32/tests/header.c b/dlls/comctl32/tests/header.c index 3428936cd75..143bc8f84f4 100644 --- a/dlls/comctl32/tests/header.c +++ b/dlls/comctl32/tests/header.c @@ -56,7 +56,11 @@ static HWND hWndHeader;
#define compare(val, exp, fmt) ok((val) == (exp), #val " value: " fmt ", expected: " fmt "\n", (val), (exp))
-#define expect(expected, got) ok(expected == got, "expected %d, got %d\n", expected,got) +#define expect(expected,got) expect_(__LINE__, expected, got) +static inline void expect_(unsigned line, DWORD expected, DWORD got) +{ + ok_(__FILE__, line)(expected == got, "Expected %d, got %d\n", expected, got); +}
#define NUM_MSG_SEQUENCES 2 #define PARENT_SEQ_INDEX 0 diff --git a/dlls/comctl32/tests/listview.c b/dlls/comctl32/tests/listview.c index 3810cd8f4bc..e922d14d850 100644 --- a/dlls/comctl32/tests/listview.c +++ b/dlls/comctl32/tests/listview.c @@ -46,9 +46,19 @@ enum seq_index { #define LISTVIEW_ID 0 #define HEADER_ID 1
-#define expect(expected, got) ok(got == expected, "Expected %d, got %d\n", expected, got) -#define expect2(expected1, expected2, got1, got2) ok(expected1 == got1 && expected2 == got2, \ - "expected (%d,%d), got (%d,%d)\n", expected1, expected2, got1, got2) +#define expect(expected,got) expect_(__LINE__, expected, got) +static inline void expect_(unsigned line, DWORD expected, DWORD got) +{ + ok_(__FILE__, line)(expected == got, "Expected %d, got %d\n", expected, got); +} + +#define expect2(expected1, expected2, got1, got2) expect2_(__LINE__, expected1, expected2, got1, got2) +static inline void expect2_(unsigned line, DWORD expected1, DWORD got1, DWORD expected2, DWORD got2) +{ + ok_(__FILE__, line)(expected1 == got1 && expected2 == got2, + "expected (%d,%d), got (%d,%d)\n", + expected1, expected2, got1, got2); +}
static HWND hwndparent, hwndparentW; /* prevents edit box creation, LVN_BEGINLABELEDIT return value */ diff --git a/dlls/comctl32/tests/monthcal.c b/dlls/comctl32/tests/monthcal.c index ae528a0ddb2..64242959d0c 100644 --- a/dlls/comctl32/tests/monthcal.c +++ b/dlls/comctl32/tests/monthcal.c @@ -32,8 +32,17 @@ #include <windows.h> #include "msg.h"
-#define expect(expected, got) ok(expected == got, "Expected %d, got %d\n", expected, got); -#define expect_hex(expected, got) ok(expected == got, "Expected %x, got %x\n", expected, got); +#define expect(expected,got) expect_(__LINE__, expected, got) +static inline void expect_(unsigned line, DWORD expected, DWORD got) +{ + ok_(__FILE__, line)(expected == got, "Expected %d, got %d\n", expected, got); +} + +#define expect_hex(expected,got) expect_(__LINE__, expected, got) +static inline void expect_hex_(unsigned line, DWORD expected, DWORD got) +{ + ok_(__FILE__, line)(expected == got, "Expected %x, got %x\n", expected, got); +} #define expect_d(expected, got) ok(abs((expected) - (got)) <= 2, "Expected %d, got %d\n", expected, got);
#define NUM_MSG_SEQUENCES 2 diff --git a/dlls/comctl32/tests/tab.c b/dlls/comctl32/tests/tab.c index 9685c8d37f5..c5d57af114d 100644 --- a/dlls/comctl32/tests/tab.c +++ b/dlls/comctl32/tests/tab.c @@ -34,7 +34,12 @@ #define PARENT_SEQ_INDEX 0 #define TAB_SEQ_INDEX 1
-#define expect(expected, got) ok ( expected == got, "Expected %d, got %d\n", expected, got) +#define expect(expected,got) expect_(__LINE__, expected, got) +static inline void expect_(unsigned line, DWORD expected, DWORD got) +{ + ok_(__FILE__, line)(expected == got, "Expected %d, got %d\n", expected, got); +} + #define expect_str(expected, got)\ ok ( strcmp(expected, got) == 0, "Expected '%s', got '%s'\n", expected, got)
diff --git a/dlls/comctl32/tests/trackbar.c b/dlls/comctl32/tests/trackbar.c index eb5464483d0..70b61d4db20 100644 --- a/dlls/comctl32/tests/trackbar.c +++ b/dlls/comctl32/tests/trackbar.c @@ -25,7 +25,12 @@ #include "msg.h" #include "v6util.h"
-#define expect(expected, got) ok(got == expected, "Expected %d, got %d\n", expected, got) +#define expect(expected,got) expect_(__LINE__, expected, got) +static inline void expect_(unsigned line, DWORD expected, DWORD got) +{ + ok_(__FILE__, line)(expected == got, "Expected %d, got %d\n", expected, got); +} + #define NUM_MSG_SEQUENCE 2 #define PARENT_SEQ_INDEX 0 #define TRACKBAR_SEQ_INDEX 1 diff --git a/dlls/comctl32/tests/treeview.c b/dlls/comctl32/tests/treeview.c index 1804e1886a7..45e2091f3b2 100644 --- a/dlls/comctl32/tests/treeview.c +++ b/dlls/comctl32/tests/treeview.c @@ -57,7 +57,11 @@ static BOOL g_v6; #define PARENT_SEQ_INDEX 1 #define PARENT_CD_SEQ_INDEX 2
-#define expect(expected, got) ok(got == expected, "Expected %d, got %d\n", expected, got) +#define expect(expected,got) expect_(__LINE__, expected, got) +static inline void expect_(unsigned line, DWORD expected, DWORD got) +{ + ok_(__FILE__, line)(expected == got, "Expected %d, got %d\n", expected, got); +}
static struct msg_sequence *sequences[NUM_MSG_SEQUENCES]; static struct msg_sequence *item_sequence[1]; diff --git a/dlls/comctl32/tests/updown.c b/dlls/comctl32/tests/updown.c index 97afcb042f6..6ffdcb9e1ab 100644 --- a/dlls/comctl32/tests/updown.c +++ b/dlls/comctl32/tests/updown.c @@ -50,7 +50,11 @@ #include "wine/test.h" #include "msg.h"
-#define expect(EXPECTED,GOT) ok((GOT)==(EXPECTED), "Expected %d, got %d\n", (EXPECTED), (GOT)) +#define expect(expected,got) expect_(__LINE__, expected, got) +static inline void expect_(unsigned line, DWORD expected, DWORD got) +{ + ok_(__FILE__, line)(expected == got, "Expected %d, got %d\n", expected, got); +}
#define NUM_MSG_SEQUENCES 3 #define PARENT_SEQ_INDEX 0
Hi,
While running your changed tests, I think I found new failures. Being a bot and all I'm not very good at pattern recognition, so I might be wrong, but could you please double-check?
Full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=109205
Your paranoid android.
=== w7u_2qxl (32 bit report) ===
comctl32: listview.c:2276: Test failed: expected (10,10), got (5,5)
=== w7u_adm (32 bit report) ===
comctl32: listview.c:2276: Test failed: expected (10,10), got (5,5)
=== w7u_el (32 bit report) ===
comctl32: listview.c:2276: Test failed: expected (10,10), got (5,5)
=== w8 (32 bit report) ===
comctl32: listview.c:2276: Test failed: expected (10,10), got (5,5)
=== w8adm (32 bit report) ===
comctl32: listview.c:2276: Test failed: expected (10,10), got (5,5)
=== w864 (32 bit report) ===
comctl32: listview.c:2276: Test failed: expected (10,10), got (5,5)
=== w1064v1507 (32 bit report) ===
comctl32: listview.c:2276: Test failed: expected (10,10), got (5,5)
=== w1064v1809 (32 bit report) ===
comctl32: listview.c:2276: Test failed: expected (10,10), got (5,5)
=== w1064 (32 bit report) ===
comctl32: listview.c:2276: Test failed: expected (10,10), got (5,5)
=== w1064_tsign (32 bit report) ===
comctl32: listview.c:2276: Test failed: expected (10,10), got (5,5)
=== w10pro64 (32 bit report) ===
comctl32: listview.c:2276: Test failed: expected (10,10), got (5,5)
=== w864 (64 bit report) ===
comctl32: listview.c:2276: Test failed: expected (10,10), got (5,5)
=== w1064v1507 (64 bit report) ===
comctl32: listview.c:2276: Test failed: expected (10,10), got (5,5)
=== w1064v1809 (64 bit report) ===
comctl32: listview.c:2276: Test failed: expected (10,10), got (5,5)
=== w1064 (64 bit report) ===
comctl32: listview.c:2276: Test failed: expected (10,10), got (5,5)
=== w1064_2qxl (64 bit report) ===
comctl32: listview.c:2276: Test failed: expected (10,10), got (5,5)
=== w1064_tsign (64 bit report) ===
comctl32: listview.c:2276: Test failed: expected (10,10), got (5,5)
=== w10pro64 (64 bit report) ===
comctl32: listview.c:2276: Test failed: expected (10,10), got (5,5)
=== w10pro64_ar (64 bit report) ===
comctl32: listview.c:2276: Test failed: expected (10,10), got (5,5)
=== w10pro64_he (64 bit report) ===
comctl32: listview.c:2276: Test failed: expected (10,10), got (5,5)
=== w10pro64_ja (64 bit report) ===
comctl32: listview.c:2276: Test failed: expected (10,10), got (5,5)
=== w10pro64_zh_CN (64 bit report) ===
comctl32: listview.c:2276: Test failed: expected (10,10), got (5,5)
=== debian11 (32 bit report) ===
comctl32: listview.c:2276: Test failed: expected (10,10), got (5,5)
=== debian11 (32 bit Arabic:Morocco report) ===
comctl32: listview.c:2276: Test failed: expected (10,10), got (5,5)
=== debian11 (32 bit German report) ===
comctl32: listview.c:2276: Test failed: expected (10,10), got (5,5)
=== debian11 (32 bit French report) ===
comctl32: listview.c:2276: Test failed: expected (10,10), got (5,5)
=== debian11 (32 bit Hebrew:Israel report) ===
comctl32: listview.c:2276: Test failed: expected (10,10), got (5,5)
=== debian11 (32 bit Hindi:India report) ===
comctl32: listview.c:2276: Test failed: expected (10,10), got (5,5)
=== debian11 (32 bit Japanese:Japan report) ===
comctl32: listview.c:2276: Test failed: expected (10,10), got (5,5)
=== debian11 (32 bit Chinese:China report) ===
comctl32: listview.c:2276: Test failed: expected (10,10), got (5,5)
=== debian11 (32 bit WoW report) ===
comctl32: listview.c:2276: Test failed: expected (10,10), got (5,5)
=== debian11 (64 bit WoW report) ===
comctl32: listview.c:2276: Test failed: expected (10,10), got (5,5)
Signed-off-by: Eric Pouech eric.pouech@gmail.com
--- dlls/comctl32/tests/rebar.c | 8 ++++---- dlls/comctl32/tests/status.c | 2 +- include/commctrl.h | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/dlls/comctl32/tests/rebar.c b/dlls/comctl32/tests/rebar.c index e868198b4d8..8f51a1f9175 100644 --- a/dlls/comctl32/tests/rebar.c +++ b/dlls/comctl32/tests/rebar.c @@ -1029,9 +1029,9 @@ static void test_colors(void)
/* test default colors */ clr = SendMessageA(hRebar, RB_GETTEXTCOLOR, 0, 0); - compare(clr, CLR_NONE, "%x"); + compare(clr, (COLORREF)CLR_NONE, "%x"); clr = SendMessageA(hRebar, RB_GETBKCOLOR, 0, 0); - compare(clr, CLR_NONE, "%x"); + compare(clr, (COLORREF)CLR_NONE, "%x");
scheme.dwSize = sizeof(scheme); scheme.clrBtnHighlight = 0; @@ -1039,8 +1039,8 @@ static void test_colors(void) ret = SendMessageA(hRebar, RB_GETCOLORSCHEME, 0, (LPARAM)&scheme); if (ret) { - compare(scheme.clrBtnHighlight, CLR_DEFAULT, "%x"); - compare(scheme.clrBtnShadow, CLR_DEFAULT, "%x"); + compare(scheme.clrBtnHighlight, (COLORREF)CLR_DEFAULT, "%x"); + compare(scheme.clrBtnShadow, (COLORREF)CLR_DEFAULT, "%x"); } else skip("RB_GETCOLORSCHEME not supported\n"); diff --git a/dlls/comctl32/tests/status.c b/dlls/comctl32/tests/status.c index 5de96c19f03..64313218e31 100644 --- a/dlls/comctl32/tests/status.c +++ b/dlls/comctl32/tests/status.c @@ -370,7 +370,7 @@ static void test_status_control(void) crColor = SendMessageA(hWndStatus, SB_SETBKCOLOR , 0, RGB(255,0,0)); ok(crColor == CLR_DEFAULT || broken(crColor == RGB(0,0,0)), /* win95 */ - "Expected 0x%.8x, got 0x%.8x\n", CLR_DEFAULT, crColor); + "Expected 0x%.8lx, got 0x%.8x\n", CLR_DEFAULT, crColor); crColor = SendMessageA(hWndStatus, SB_SETBKCOLOR , 0, CLR_DEFAULT); ok(crColor == RGB(255,0,0) || broken(crColor == RGB(0,0,0)), /* win95 */ diff --git a/include/commctrl.h b/include/commctrl.h index 944a9158371..1b51203b00b 100644 --- a/include/commctrl.h +++ b/include/commctrl.h @@ -476,8 +476,8 @@ typedef struct struct _IMAGELIST; typedef struct _IMAGELIST *HIMAGELIST;
-#define CLR_NONE 0xFFFFFFFF -#define CLR_DEFAULT 0xFF000000 +#define CLR_NONE 0xFFFFFFFFL +#define CLR_DEFAULT 0xFF000000L #define CLR_HILIGHT CLR_DEFAULT
#define ILC_MASK 0x00000001
On 2/24/22 13:26, Eric Pouech wrote:
Signed-off-by: Eric Pouech eric.pouech@gmail.com
dlls/comctl32/tests/rebar.c | 8 ++++---- dlls/comctl32/tests/status.c | 2 +- include/commctrl.h | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/dlls/comctl32/tests/rebar.c b/dlls/comctl32/tests/rebar.c index e868198b4d8..8f51a1f9175 100644 --- a/dlls/comctl32/tests/rebar.c +++ b/dlls/comctl32/tests/rebar.c @@ -1029,9 +1029,9 @@ static void test_colors(void)
/* test default colors */ clr = SendMessageA(hRebar, RB_GETTEXTCOLOR, 0, 0);
- compare(clr, CLR_NONE, "%x");
- compare(clr, (COLORREF)CLR_NONE, "%x"); clr = SendMessageA(hRebar, RB_GETBKCOLOR, 0, 0);
- compare(clr, CLR_NONE, "%x");
compare(clr, (COLORREF)CLR_NONE, "%x");
scheme.dwSize = sizeof(scheme); scheme.clrBtnHighlight = 0;
@@ -1039,8 +1039,8 @@ static void test_colors(void) ret = SendMessageA(hRebar, RB_GETCOLORSCHEME, 0, (LPARAM)&scheme); if (ret) {
compare(scheme.clrBtnHighlight, CLR_DEFAULT, "%x");
compare(scheme.clrBtnShadow, CLR_DEFAULT, "%x");
compare(scheme.clrBtnHighlight, (COLORREF)CLR_DEFAULT, "%x");
compare(scheme.clrBtnShadow, (COLORREF)CLR_DEFAULT, "%x"); }
Let's get rid of macros instead, and use explicit ok() with equality check.
Signed-off-by: Eric Pouech eric.pouech@gmail.com
--- dlls/comctl32/tests/Makefile.in | 1 dlls/comctl32/tests/animate.c | 4 - dlls/comctl32/tests/button.c | 196 ++++++++++++++++----------------- dlls/comctl32/tests/combo.c | 114 ++++++++++--------- dlls/comctl32/tests/datetime.c | 62 +++++----- dlls/comctl32/tests/dpa.c | 68 ++++++----- dlls/comctl32/tests/edit.c | 198 +++++++++++++++++---------------- dlls/comctl32/tests/header.c | 74 ++++++------ dlls/comctl32/tests/imagelist.c | 120 ++++++++++---------- dlls/comctl32/tests/listbox.c | 226 +++++++++++++++++++------------------- dlls/comctl32/tests/listview.c | 138 ++++++++++++----------- dlls/comctl32/tests/misc.c | 58 +++++----- dlls/comctl32/tests/monthcal.c | 40 +++---- dlls/comctl32/tests/mru.c | 28 ++--- dlls/comctl32/tests/msg.h | 16 +-- dlls/comctl32/tests/pager.c | 30 +++-- dlls/comctl32/tests/progress.c | 12 +- dlls/comctl32/tests/propsheet.c | 84 +++++++------- dlls/comctl32/tests/rebar.c | 20 ++- dlls/comctl32/tests/static.c | 4 - dlls/comctl32/tests/status.c | 13 ++ dlls/comctl32/tests/subclass.c | 2 dlls/comctl32/tests/syslink.c | 10 +- dlls/comctl32/tests/tab.c | 40 +++---- dlls/comctl32/tests/taskdialog.c | 16 +-- dlls/comctl32/tests/toolbar.c | 184 +++++++++++++++---------------- dlls/comctl32/tests/tooltips.c | 82 +++++++------- dlls/comctl32/tests/trackbar.c | 10 +- dlls/comctl32/tests/treeview.c | 58 +++++----- dlls/comctl32/tests/updown.c | 22 ++-- dlls/comctl32/tests/v6util.h | 4 - 31 files changed, 969 insertions(+), 965 deletions(-)
diff --git a/dlls/comctl32/tests/Makefile.in b/dlls/comctl32/tests/Makefile.in index 79d7485de73..4669efcf2b5 100644 --- a/dlls/comctl32/tests/Makefile.in +++ b/dlls/comctl32/tests/Makefile.in @@ -1,4 +1,3 @@ -EXTRADEFS = -DWINE_NO_LONG_TYPES TESTDLL = comctl32.dll IMPORTS = ole32 user32 gdi32 advapi32
diff --git a/dlls/comctl32/tests/animate.c b/dlls/comctl32/tests/animate.c index 400de55b5eb..ad7e16ace65 100644 --- a/dlls/comctl32/tests/animate.c +++ b/dlls/comctl32/tests/animate.c @@ -136,13 +136,13 @@ static void test_play(void) res = SendMessageA(hAnimateWnd, ACM_OPENA,(WPARAM)shell32, MAKEINTRESOURCE(INVALID_AVI_INDEX)); err = GetLastError(); ok(res == 0, "Invalid video should have failed\n"); - ok(err == ERROR_RESOURCE_NAME_NOT_FOUND, "Expected 1814, got %u\n", err); + ok(err == ERROR_RESOURCE_NAME_NOT_FOUND, "Expected 1814, got %lu\n", err);
SetLastError(0xdeadbeef); res = SendMessageA(hAnimateWnd, ACM_PLAY, (WPARAM) -1, MAKELONG(0, -1)); err = GetLastError(); ok(res == 0, "Play should have failed\n"); - ok(err == 0xdeadbeef, "Expected 0xdeadbeef, got %u\n", err); + ok(err == 0xdeadbeef, "Expected 0xdeadbeef, got %lu\n", err); destroy_animate();
create_animate(0, 0); diff --git a/dlls/comctl32/tests/button.c b/dlls/comctl32/tests/button.c index f30e9f665e5..0443a36718b 100644 --- a/dlls/comctl32/tests/button.c +++ b/dlls/comctl32/tests/button.c @@ -67,7 +67,7 @@ static WCHAR* get_versioned_classname(const WCHAR *name) memset(&data, 0, sizeof(data)); data.cbSize = sizeof(data); ret = FindActCtxSectionStringW(0, NULL, ACTIVATION_CONTEXT_SECTION_WINDOW_CLASS_REDIRECTION, name, &data); - ok(ret, "Failed to find class redirection section, error %u\n", GetLastError()); + ok(ret, "Failed to find class redirection section, error %lu\n", GetLastError()); wnddata = (struct wndclass_redirect_data*)data.lpData; return (WCHAR*)((BYTE*)wnddata + wnddata->name_offset); } @@ -237,10 +237,10 @@ static LRESULT WINAPI test_parent_wndproc(HWND hwnd, UINT message, WPARAM wParam }
ok_(__FILE__,test_cd.line)(!(cd->dwDrawStage & CDDS_ITEM), - "[%u] CDDS_ITEM is set\n", test_cd.button); + "[%lu] CDDS_ITEM is set\n", test_cd.button);
ok_(__FILE__,test_cd.line)(state == test_cd.state, - "[%u] expected uItemState %u, got %u\n", test_cd.button, + "[%lu] expected uItemState %u, got %u\n", test_cd.button, test_cd.state, state);
msg.message = message; @@ -265,7 +265,7 @@ static LRESULT WINAPI test_parent_wndproc(HWND hwnd, UINT message, WPARAM wParam case CDDS_POSTERASE: case CDDS_POSTPAINT: ok_(__FILE__,test_cd.line)(cd->dwItemSpec == 0xdeadbeef, - "[%u] NMCUSTOMDRAW was not shared, stage %u\n", test_cd.button, msg.stage); + "[%lu] NMCUSTOMDRAW was not shared, stage %lu\n", test_cd.button, msg.stage); break; } return ret; @@ -278,9 +278,9 @@ static LRESULT WINAPI test_parent_wndproc(HWND hwnd, UINT message, WPARAM wParam
GetClientRect(bcd->hdr.hwndFrom, &rc);
- ok(bcd->hdr.hwndFrom != NULL, "Received BCN_DROPDOWN with no hwnd attached, wParam %lu id %lu\n", + ok(bcd->hdr.hwndFrom != NULL, "Received BCN_DROPDOWN with no hwnd attached, wParam %Iu id %Iu\n", wParam, bcd->hdr.idFrom); - ok(bcd->hdr.idFrom == wParam, "[%u] Mismatch between wParam (%lu) and idFrom (%lu)\n", + ok(bcd->hdr.idFrom == wParam, "[%u] Mismatch between wParam (%Iu) and idFrom (%Iu)\n", button, wParam, bcd->hdr.idFrom); ok(EqualRect(&rc, &bcd->rcButton), "[%u] Wrong rcButton, expected %s got %s\n", button, wine_dbgstr_rect(&rc), wine_dbgstr_rect(&bcd->rcButton)); @@ -636,7 +636,7 @@ static HWND create_button(DWORD style, HWND parent) menuid = (HMENU)ID_BUTTON; } hwnd = CreateWindowExA(0, WC_BUTTONA, "test", style, 0, 0, 50, 14, parent, menuid, 0, NULL); - ok(hwnd != NULL, "failed to create a button, 0x%08x, %p\n", style, parent); + ok(hwnd != NULL, "failed to create a button, 0x%08lx, %p\n", style, parent); pSetWindowSubclass(hwnd, button_subclass_proc, 0, 0); return hwnd; } @@ -775,9 +775,9 @@ static void test_button_messages(void) style &= ~(WS_CHILD | BS_NOTIFY); /* XP turns a BS_USERBUTTON into BS_PUSHBUTTON */ if (button[i].style == BS_USERBUTTON) - ok(style == BS_PUSHBUTTON, "expected style BS_PUSHBUTTON got %x\n", style); + ok(style == BS_PUSHBUTTON, "expected style BS_PUSHBUTTON got %lx\n", style); else - ok(style == button[i].style, "expected style %x got %x\n", button[i].style, style); + ok(style == button[i].style, "expected style %lx got %lx\n", button[i].style, style);
dlg_code = SendMessageA(hwnd, WM_GETDLGCODE, 0, 0); if (button[i].style == BS_SPLITBUTTON || @@ -785,10 +785,10 @@ static void test_button_messages(void) button[i].style == BS_COMMANDLINK || button[i].style == BS_DEFCOMMANDLINK) { - ok(dlg_code == button[i].dlg_code || broken(dlg_code == DLGC_BUTTON) /* WinXP */, "%u: wrong dlg_code %08x\n", i, dlg_code); + ok(dlg_code == button[i].dlg_code || broken(dlg_code == DLGC_BUTTON) /* WinXP */, "%u: wrong dlg_code %08lx\n", i, dlg_code); } else - ok(dlg_code == button[i].dlg_code, "%u: wrong dlg_code %08x\n", i, dlg_code); + ok(dlg_code == button[i].dlg_code, "%u: wrong dlg_code %08lx\n", i, dlg_code);
ShowWindow(hwnd, SW_SHOW); UpdateWindow(hwnd); @@ -828,10 +828,10 @@ static void test_button_messages(void) style = GetWindowLongA(hwnd, GWL_STYLE); style &= ~(WS_VISIBLE | WS_CHILD | BS_NOTIFY); /* XP doesn't turn a BS_USERBUTTON into BS_PUSHBUTTON here! */ - ok(style == button[i].style, "expected style %04x got %04x\n", button[i].style, style); + ok(style == button[i].style, "expected style %04lx got %04lx\n", button[i].style, style);
state = SendMessageA(hwnd, BM_GETSTATE, 0, 0); - ok(state == 0, "expected state 0, got %04x\n", state); + ok(state == 0, "expected state 0, got %04lx\n", state);
cd_seq = (button[i].cd_setstate_type == cd_seq_empty) ? empty_cd_seq : pre_pre_cd_seq; flush_sequences(sequences, NUM_MSG_SEQUENCES); @@ -844,11 +844,11 @@ static void test_button_messages(void) check_cd_seq(cd_setstate_type, "BM_SETSTATE/TRUE");
state = SendMessageA(hwnd, BM_GETSTATE, 0, 0); - ok(state == BST_PUSHED, "expected state 0x0004, got %04x\n", state); + ok(state == BST_PUSHED, "expected state 0x0004, got %04lx\n", state);
style = GetWindowLongA(hwnd, GWL_STYLE); style &= ~(WS_CHILD | BS_NOTIFY | WS_VISIBLE); - ok(style == button[i].style, "expected style %04x got %04x\n", button[i].style, style); + ok(style == button[i].style, "expected style %04lx got %04lx\n", button[i].style, style);
flush_sequences(sequences, NUM_MSG_SEQUENCES); set_test_cd_state(0); @@ -860,14 +860,14 @@ static void test_button_messages(void) check_cd_seq(cd_setstate_type, "BM_SETSTATE/FALSE");
state = SendMessageA(hwnd, BM_GETSTATE, 0, 0); - ok(state == 0, "expected state 0, got %04x\n", state); + ok(state == 0, "expected state 0, got %04lx\n", state);
style = GetWindowLongA(hwnd, GWL_STYLE); style &= ~(WS_CHILD | BS_NOTIFY | WS_VISIBLE); - ok(style == button[i].style, "expected style %04x got %04x\n", button[i].style, style); + ok(style == button[i].style, "expected style %04lx got %04lx\n", button[i].style, style);
state = SendMessageA(hwnd, BM_GETCHECK, 0, 0); - ok(state == BST_UNCHECKED, "expected BST_UNCHECKED, got %04x\n", state); + ok(state == BST_UNCHECKED, "expected BST_UNCHECKED, got %04lx\n", state);
cd_seq = (button[i].cd_setcheck_type == cd_seq_empty) ? empty_cd_seq : pre_pre_cd_seq; flush_sequences(sequences, NUM_MSG_SEQUENCES); @@ -888,11 +888,11 @@ static void test_button_messages(void) check_cd_seq(cd_setcheck_type, "BM_SETCHECK");
state = SendMessageA(hwnd, BM_GETCHECK, 0, 0); - ok(state == BST_UNCHECKED, "expected BST_UNCHECKED, got %04x\n", state); + ok(state == BST_UNCHECKED, "expected BST_UNCHECKED, got %04lx\n", state);
style = GetWindowLongA(hwnd, GWL_STYLE); style &= ~(WS_CHILD | BS_NOTIFY | WS_VISIBLE); - ok(style == button[i].style, "expected style %04x got %04x\n", button[i].style, style); + ok(style == button[i].style, "expected style %04lx got %04lx\n", button[i].style, style);
flush_sequences(sequences, NUM_MSG_SEQUENCES); set_test_cd_state(0); @@ -914,18 +914,18 @@ static void test_button_messages(void) button[i].style == BS_COMMANDLINK || button[i].style == BS_DEFCOMMANDLINK) { - ok(state == BST_UNCHECKED, "expected check BST_UNCHECKED, got %04x\n", state); + ok(state == BST_UNCHECKED, "expected check BST_UNCHECKED, got %04lx\n", state); } else - ok(state == BST_CHECKED, "expected check BST_CHECKED, got %04x\n", state); + ok(state == BST_CHECKED, "expected check BST_CHECKED, got %04lx\n", state);
style = GetWindowLongA(hwnd, GWL_STYLE); style &= ~(WS_CHILD | BS_NOTIFY | WS_VISIBLE); if (button[i].style == BS_RADIOBUTTON || button[i].style == BS_AUTORADIOBUTTON) - ok(style == (button[i].style | WS_TABSTOP), "expected style %04x | WS_TABSTOP got %04x\n", button[i].style, style); + ok(style == (button[i].style | WS_TABSTOP), "expected style %04lx | WS_TABSTOP got %04lx\n", button[i].style, style); else - ok(style == button[i].style, "expected style %04x got %04x\n", button[i].style, style); + ok(style == button[i].style, "expected style %04lx got %04lx\n", button[i].style, style);
/* Test that original font is not selected back after painting */ hfont = (HFONT)SendMessageA(hwnd, WM_GETFONT, 0, 0); @@ -1128,8 +1128,8 @@ static void test_note(void) ok(!ret, "Expect BCM_GETNOTE return false\n"); ok(!lstrcmpW(buffer_w, deadbeef_w), "Expect note: %s, got: %s\n", wine_dbgstr_w(deadbeef_w), wine_dbgstr_w(buffer_w)); - ok(size == ARRAY_SIZE(buffer_w), "Got: %d\n", size); - ok(error == ERROR_INVALID_PARAMETER, "Expect last error: 0x%08x, got: 0x%08x\n", + ok(size == ARRAY_SIZE(buffer_w), "Got: %ld\n", size); + ok(error == ERROR_INVALID_PARAMETER, "Expect last error: 0x%08x, got: 0x%08lx\n", ERROR_INVALID_PARAMETER, error);
/* Get note length when note is not set */ @@ -1141,7 +1141,7 @@ static void test_note(void) ret = SendMessageA(hwnd, BCM_SETNOTE, 0, (LPARAM)test_w); ok(ret, "Expect BCM_SETNOTE return true\n"); error = GetLastError(); - ok(error == NO_ERROR, "Expect last error: 0x%08x, got: 0x%08x\n", NO_ERROR, error); + ok(error == NO_ERROR, "Expect last error: 0x%08x, got: 0x%08lx\n", NO_ERROR, error);
SetLastError(0xdeadbeef); lstrcpyW(buffer_w, deadbeef_w); @@ -1150,9 +1150,9 @@ static void test_note(void) ok(ret, "Expect BCM_GETNOTE return true\n"); ok(!lstrcmpW(buffer_w, test_w), "Expect note: %s, got: %s\n", wine_dbgstr_w(test_w), wine_dbgstr_w(buffer_w)); - ok(size == ARRAY_SIZE(buffer_w), "Got: %d\n", size); + ok(size == ARRAY_SIZE(buffer_w), "Got: %ld\n", size); error = GetLastError(); - ok(error == NO_ERROR, "Expect last error: 0x%08x, got: 0x%08x\n", NO_ERROR, error); + ok(error == NO_ERROR, "Expect last error: 0x%08x, got: 0x%08lx\n", NO_ERROR, error);
ret = SendMessageA(hwnd, BCM_GETNOTELENGTH, 0, 0); ok(ret == ARRAY_SIZE(test_w) - 1, "Got: %d\n", ret); @@ -1165,9 +1165,9 @@ static void test_note(void) ok(!ret, "Expect BCM_GETNOTE return false\n"); ok(!lstrcmpW(buffer_w, tes_w), "Expect note: %s, got: %s\n", wine_dbgstr_w(tes_w), wine_dbgstr_w(buffer_w)); - ok(size == ARRAY_SIZE(test_w), "Got: %d\n", size); + ok(size == ARRAY_SIZE(test_w), "Got: %ld\n", size); error = GetLastError(); - ok(error == ERROR_INSUFFICIENT_BUFFER, "Expect last error: 0x%08x, got: 0x%08x\n", + ok(error == ERROR_INSUFFICIENT_BUFFER, "Expect last error: 0x%08x, got: 0x%08lx\n", ERROR_INSUFFICIENT_BUFFER, error);
/* Set note with NULL buffer */ @@ -1175,7 +1175,7 @@ static void test_note(void) ret = SendMessageA(hwnd, BCM_SETNOTE, 0, 0); ok(ret, "Expect BCM_SETNOTE return false\n"); error = GetLastError(); - ok(error == NO_ERROR, "Expect last error: 0x%08x, got: 0x%08x\n", NO_ERROR, error); + ok(error == NO_ERROR, "Expect last error: 0x%08x, got: 0x%08lx\n", NO_ERROR, error);
/* Check that set note with NULL buffer make note empty */ SetLastError(0xdeadbeef); @@ -1184,9 +1184,9 @@ static void test_note(void) ret = SendMessageA(hwnd, BCM_GETNOTE, (WPARAM)&size, (LPARAM)buffer_w); ok(ret, "Expect BCM_GETNOTE return true\n"); ok(!*buffer_w, "Expect note length 0\n"); - ok(size == ARRAY_SIZE(buffer_w), "Got: %d\n", size); + ok(size == ARRAY_SIZE(buffer_w), "Got: %ld\n", size); error = GetLastError(); - ok(error == NO_ERROR, "Expect last error: 0x%08x, got: 0x%08x\n", NO_ERROR, error); + ok(error == NO_ERROR, "Expect last error: 0x%08x, got: 0x%08lx\n", NO_ERROR, error); ret = SendMessageA(hwnd, BCM_GETNOTELENGTH, 0, 0); ok(ret == 0, "Expect note length: %d, got: %d\n", 0, ret);
@@ -1195,9 +1195,9 @@ static void test_note(void) size = ARRAY_SIZE(buffer_w); ret = SendMessageA(hwnd, BCM_GETNOTE, (WPARAM)&size, 0); ok(!ret, "Expect BCM_SETNOTE return false\n"); - ok(size == ARRAY_SIZE(buffer_w), "Got: %d\n", size); + ok(size == ARRAY_SIZE(buffer_w), "Got: %ld\n", size); error = GetLastError(); - ok(error == ERROR_INVALID_PARAMETER, "Expect last error: 0x%08x, got: 0x%08x\n", + ok(error == ERROR_INVALID_PARAMETER, "Expect last error: 0x%08x, got: 0x%08lx\n", ERROR_INVALID_PARAMETER, error);
/* Get note with NULL size */ @@ -1208,7 +1208,7 @@ static void test_note(void) ok(!lstrcmpW(buffer_w, deadbeef_w), "Expect note: %s, got: %s\n", wine_dbgstr_w(deadbeef_w), wine_dbgstr_w(buffer_w)); error = GetLastError(); - ok(error == ERROR_INVALID_PARAMETER, "Expect last error: 0x%08x, got: 0x%08x\n", + ok(error == ERROR_INVALID_PARAMETER, "Expect last error: 0x%08x, got: 0x%08lx\n", ERROR_INVALID_PARAMETER, error);
/* Get note with zero size */ @@ -1219,9 +1219,9 @@ static void test_note(void) ok(!ret, "Expect BCM_GETNOTE return false\n"); ok(!lstrcmpW(buffer_w, deadbeef_w), "Expect note: %s, got: %s\n", wine_dbgstr_w(deadbeef_w), wine_dbgstr_w(buffer_w)); - ok(size == 1, "Got: %d\n", size); + ok(size == 1, "Got: %ld\n", size); error = GetLastError(); - ok(error == ERROR_INSUFFICIENT_BUFFER, "Expect last error: 0x%08x, got: 0x%08x\n", + ok(error == ERROR_INSUFFICIENT_BUFFER, "Expect last error: 0x%08x, got: 0x%08lx\n", ERROR_INSUFFICIENT_BUFFER, error);
DestroyWindow(hwnd); @@ -1235,7 +1235,7 @@ static void test_note(void) ret = SendMessageA(hwnd, BCM_GETNOTE, (WPARAM)&size, (LPARAM)buffer_w); ok(!ret, "Expect BCM_GETNOTE return false\n"); error = GetLastError(); - ok(error == ERROR_NOT_SUPPORTED, "Expect last error: 0x%08x, got: 0x%08x\n", + ok(error == ERROR_NOT_SUPPORTED, "Expect last error: 0x%08x, got: 0x%08lx\n", ERROR_NOT_SUPPORTED, error); DestroyWindow(hwnd); } @@ -1527,8 +1527,8 @@ static void test_bcm_splitinfo(HWND hwnd) ok(info.mask == (BCSIF_GLYPH | BCSIF_SIZE | BCSIF_STYLE), "[%u] wrong mask, got %u\n", button, info.mask); ok(info.himlGlyph == (HIMAGELIST)0x36, "[%u] expected 0x36 default glyph, got 0x%p\n", button, info.himlGlyph); ok(info.uSplitStyle == BCSS_STRETCH, "[%u] expected 0x%08x default style, got 0x%08x\n", button, BCSS_STRETCH, info.uSplitStyle); - ok(info.size.cx == glyph_size, "[%u] expected %d default size.cx, got %d\n", button, glyph_size, info.size.cx); - ok(info.size.cy == 0, "[%u] expected 0 default size.cy, got %d\n", button, info.size.cy); + ok(info.size.cx == glyph_size, "[%u] expected %d default size.cx, got %ld\n", button, glyph_size, info.size.cx); + ok(info.size.cy == 0, "[%u] expected 0 default size.cy, got %ld\n", button, info.size.cy);
info.mask = BCSIF_SIZE; info.size.cx = glyph_size + 7; @@ -1539,8 +1539,8 @@ static void test_bcm_splitinfo(HWND hwnd) ret = SendMessageA(hwnd, BCM_GETSPLITINFO, 0, (LPARAM)&info); ok(ret == TRUE, "[%u] expected TRUE, got %d\n", button, ret); ok(info.mask == BCSIF_SIZE, "[%u] wrong mask, got %u\n", button, info.mask); - ok(info.size.cx == glyph_size + 7, "[%u] expected %d, got %d\n", button, glyph_size + 7, info.size.cx); - ok(info.size.cy == 0, "[%u] expected 0, got %d\n", button, info.size.cy); + ok(info.size.cx == glyph_size + 7, "[%u] expected %d, got %ld\n", button, glyph_size + 7, info.size.cx); + ok(info.size.cy == 0, "[%u] expected 0, got %ld\n", button, info.size.cy);
/* Invalid size.cx resets it to default glyph size, while size.cy is stored */ info.size.cx = 0; @@ -1551,8 +1551,8 @@ static void test_bcm_splitinfo(HWND hwnd) ret = SendMessageA(hwnd, BCM_GETSPLITINFO, 0, (LPARAM)&info); ok(ret == TRUE, "[%u] expected TRUE, got %d\n", button, ret); ok(info.mask == BCSIF_SIZE, "[%u] wrong mask, got %u\n", button, info.mask); - ok(info.size.cx == glyph_size, "[%u] expected %d, got %d\n", button, glyph_size, info.size.cx); - ok(info.size.cy == -20, "[%u] expected -20, got %d\n", button, info.size.cy); + ok(info.size.cx == glyph_size, "[%u] expected %d, got %ld\n", button, glyph_size, info.size.cx); + ok(info.size.cy == -20, "[%u] expected -20, got %ld\n", button, info.size.cy);
info.size.cx = -glyph_size - 7; info.size.cy = -10; @@ -1562,8 +1562,8 @@ static void test_bcm_splitinfo(HWND hwnd) ret = SendMessageA(hwnd, BCM_GETSPLITINFO, 0, (LPARAM)&info); ok(ret == TRUE, "[%u] expected TRUE, got %d\n", button, ret); ok(info.mask == BCSIF_SIZE, "[%u] wrong mask, got %u\n", button, info.mask); - ok(info.size.cx == glyph_size, "[%u] expected %d, got %d\n", button, glyph_size, info.size.cx); - ok(info.size.cy == -10, "[%u] expected -10, got %d\n", button, info.size.cy); + ok(info.size.cx == glyph_size, "[%u] expected %d, got %ld\n", button, glyph_size, info.size.cx); + ok(info.size.cy == -10, "[%u] expected -10, got %ld\n", button, info.size.cy);
/* Set to a valid size other than glyph_size */ info.mask = BCSIF_SIZE; @@ -1575,8 +1575,8 @@ static void test_bcm_splitinfo(HWND hwnd) ret = SendMessageA(hwnd, BCM_GETSPLITINFO, 0, (LPARAM)&info); ok(ret == TRUE, "[%u] expected TRUE, got %d\n", button, ret); ok(info.mask == BCSIF_SIZE, "[%u] wrong mask, got %u\n", button, info.mask); - ok(info.size.cx == glyph_size + 7, "[%u] expected %d, got %d\n", button, glyph_size + 7, info.size.cx); - ok(info.size.cy == 11, "[%u] expected 11, got %d\n", button, info.size.cy); + ok(info.size.cx == glyph_size + 7, "[%u] expected %d, got %ld\n", button, glyph_size + 7, info.size.cx); + ok(info.size.cy == 11, "[%u] expected 11, got %ld\n", button, info.size.cy);
/* Change the glyph, size.cx should be automatically adjusted and size.cy set to 0 */ dummy.mask = BCSIF_GLYPH; @@ -1588,8 +1588,8 @@ static void test_bcm_splitinfo(HWND hwnd) ok(ret == TRUE, "[%u] expected TRUE, got %d\n", button, ret); ok(info.mask == (BCSIF_GLYPH | BCSIF_SIZE), "[%u] wrong mask, got %u\n", button, info.mask); ok(info.himlGlyph == (HIMAGELIST)0x35, "[%u] expected 0x35, got %p\n", button, info.himlGlyph); - ok(info.size.cx == glyph_size, "[%u] expected %d, got %d\n", button, glyph_size, info.size.cx); - ok(info.size.cy == 0, "[%u] expected 0, got %d\n", button, info.size.cy); + ok(info.size.cx == glyph_size, "[%u] expected %d, got %ld\n", button, glyph_size, info.size.cx); + ok(info.size.cy == 0, "[%u] expected 0, got %ld\n", button, info.size.cy);
/* Unless the size is specified manually */ dummy.mask = BCSIF_GLYPH | BCSIF_SIZE; @@ -1602,8 +1602,8 @@ static void test_bcm_splitinfo(HWND hwnd) ok(ret == TRUE, "[%u] expected TRUE, got %d\n", button, ret); ok(info.mask == (BCSIF_GLYPH | BCSIF_SIZE), "[%u] wrong mask, got %u\n", button, info.mask); ok(info.himlGlyph == (HIMAGELIST)0x34, "[%u] expected 0x34, got %p\n", button, info.himlGlyph); - ok(info.size.cx == glyph_size + 11, "[%u] expected %d, got %d\n", button, glyph_size, info.size.cx); - ok(info.size.cy == 7, "[%u] expected 7, got %d\n", button, info.size.cy); + ok(info.size.cx == glyph_size + 11, "[%u] expected %d, got %ld\n", button, glyph_size, info.size.cx); + ok(info.size.cy == 7, "[%u] expected 7, got %ld\n", button, info.size.cy);
/* Add the BCSS_IMAGE style manually with the wrong BCSIF_GLYPH mask, should treat it as invalid image */ info.mask = BCSIF_GLYPH | BCSIF_STYLE; @@ -1617,8 +1617,8 @@ static void test_bcm_splitinfo(HWND hwnd) ok(info.mask == (BCSIF_GLYPH | BCSIF_STYLE | BCSIF_SIZE), "[%u] wrong mask, got %u\n", button, info.mask); ok(info.himlGlyph == (HIMAGELIST)0x37, "[%u] expected 0x37, got %p\n", button, info.himlGlyph); ok(info.uSplitStyle == BCSS_IMAGE, "[%u] expected 0x%08x style, got 0x%08x\n", button, BCSS_IMAGE, info.uSplitStyle); - ok(info.size.cx == border_w, "[%u] expected %d, got %d\n", button, border_w, info.size.cx); - ok(info.size.cy == 0, "[%u] expected 0, got %d\n", button, info.size.cy); + ok(info.size.cx == border_w, "[%u] expected %d, got %ld\n", button, border_w, info.size.cx); + ok(info.size.cy == 0, "[%u] expected 0, got %ld\n", button, info.size.cy);
/* Change the size to prevent ambiguity */ dummy.mask = BCSIF_SIZE; @@ -1631,8 +1631,8 @@ static void test_bcm_splitinfo(HWND hwnd) ok(info.mask == (BCSIF_GLYPH | BCSIF_STYLE | BCSIF_SIZE), "[%u] wrong mask, got %u\n", button, info.mask); ok(info.himlGlyph == (HIMAGELIST)0x37, "[%u] expected 0x37, got %p\n", button, info.himlGlyph); ok(info.uSplitStyle == BCSS_IMAGE, "[%u] expected 0x%08x style, got 0x%08x\n", button, BCSS_IMAGE, info.uSplitStyle); - ok(info.size.cx == glyph_size + 5, "[%u] expected %d, got %d\n", button, glyph_size + 5, info.size.cx); - ok(info.size.cy == 4, "[%u] expected 4, got %d\n", button, info.size.cy); + ok(info.size.cx == glyph_size + 5, "[%u] expected %d, got %ld\n", button, glyph_size + 5, info.size.cx); + ok(info.size.cy == 4, "[%u] expected 4, got %ld\n", button, info.size.cy);
/* Now remove the BCSS_IMAGE style manually with the wrong BCSIF_IMAGE mask */ info.mask = BCSIF_IMAGE | BCSIF_STYLE; @@ -1646,8 +1646,8 @@ static void test_bcm_splitinfo(HWND hwnd) ok(info.mask == (BCSIF_IMAGE | BCSIF_STYLE | BCSIF_SIZE), "[%u] wrong mask, got %u\n", button, info.mask); ok(info.himlGlyph == (HIMAGELIST)0x35, "[%u] expected 0x35, got %p\n", button, info.himlGlyph); ok(info.uSplitStyle == BCSS_STRETCH, "[%u] expected 0x%08x style, got 0x%08x\n", button, BCSS_STRETCH, info.uSplitStyle); - ok(info.size.cx == glyph_size, "[%u] expected %d, got %d\n", button, glyph_size, info.size.cx); - ok(info.size.cy == 0, "[%u] expected 0, got %d\n", button, info.size.cy); + ok(info.size.cx == glyph_size, "[%u] expected %d, got %ld\n", button, glyph_size, info.size.cx); + ok(info.size.cy == 0, "[%u] expected 0, got %ld\n", button, info.size.cy);
/* Add a proper valid image, the BCSS_IMAGE style should be set automatically */ img = pImageList_Create(42, 33, ILC_COLOR, 1, 1); @@ -1662,8 +1662,8 @@ static void test_bcm_splitinfo(HWND hwnd) ok(info.mask == (BCSIF_IMAGE | BCSIF_STYLE | BCSIF_SIZE), "[%u] wrong mask, got %u\n", button, info.mask); ok(info.himlGlyph == img, "[%u] expected %p, got %p\n", button, img, info.himlGlyph); ok(info.uSplitStyle == (BCSS_IMAGE | BCSS_STRETCH), "[%u] expected 0x%08x style, got 0x%08x\n", button, BCSS_IMAGE | BCSS_STRETCH, info.uSplitStyle); - ok(info.size.cx == 42 + border_w, "[%u] expected %d, got %d\n", button, 42 + border_w, info.size.cx); - ok(info.size.cy == 0, "[%u] expected 0, got %d\n", button, info.size.cy); + ok(info.size.cx == 42 + border_w, "[%u] expected %d, got %ld\n", button, 42 + border_w, info.size.cx); + ok(info.size.cy == 0, "[%u] expected 0, got %ld\n", button, info.size.cy); pImageList_Destroy(img); dummy.mask = BCSIF_SIZE; dummy.size.cx = glyph_size + 5; @@ -1682,8 +1682,8 @@ static void test_bcm_splitinfo(HWND hwnd) ok(info.mask == (BCSIF_GLYPH | BCSIF_IMAGE | BCSIF_STYLE | BCSIF_SIZE), "[%u] wrong mask, got %u\n", button, info.mask); ok(info.himlGlyph == (HIMAGELIST)0x37, "[%u] expected 0x37, got %p\n", button, info.himlGlyph); ok(info.uSplitStyle == BCSS_STRETCH, "[%u] expected 0x%08x style, got 0x%08x\n", button, BCSS_STRETCH, info.uSplitStyle); - ok(info.size.cx == glyph_size, "[%u] expected %d, got %d\n", button, glyph_size, info.size.cx); - ok(info.size.cy == 0, "[%u] expected 0, got %d\n", button, info.size.cy); + ok(info.size.cx == glyph_size, "[%u] expected %d, got %ld\n", button, glyph_size, info.size.cx); + ok(info.size.cy == 0, "[%u] expected 0, got %ld\n", button, info.size.cy);
/* Try a NULL image */ info.mask = BCSIF_IMAGE; @@ -1696,8 +1696,8 @@ static void test_bcm_splitinfo(HWND hwnd) ok(info.mask == (BCSIF_IMAGE | BCSIF_STYLE | BCSIF_SIZE), "[%u] wrong mask, got %u\n", button, info.mask); ok(info.himlGlyph == NULL, "[%u] expected NULL, got %p\n", button, info.himlGlyph); ok(info.uSplitStyle == (BCSS_IMAGE | BCSS_STRETCH), "[%u] expected 0x%08x style, got 0x%08x\n", button, BCSS_IMAGE | BCSS_STRETCH, info.uSplitStyle); - ok(info.size.cx == border_w, "[%u] expected %d, got %d\n", button, border_w, info.size.cx); - ok(info.size.cy == 0, "[%u] expected 0, got %d\n", button, info.size.cy); + ok(info.size.cx == border_w, "[%u] expected %d, got %ld\n", button, border_w, info.size.cx); + ok(info.size.cy == 0, "[%u] expected 0, got %ld\n", button, info.size.cy); }
static void test_button_data(void) @@ -1897,7 +1897,7 @@ static void test_state(void) { hwnd = create_button(type, NULL); state = SendMessageA(hwnd, BM_GETSTATE, 0, 0); - ok(state == BST_UNCHECKED, "Expect state 0x%08x, got 0x%08x\n", BST_UNCHECKED, state); + ok(state == BST_UNCHECKED, "Expect state 0x%08x, got 0x%08lx\n", BST_UNCHECKED, state); DestroyWindow(hwnd); } } @@ -2012,9 +2012,9 @@ static void test_bcm_get_ideal_size(void) ok(ret, "Expect BCM_GETIDEALSIZE message to return true\n"); /* Ideal size contains text rect even show bitmap only */ ok(size.cx >= image_width + text_width + pushtype[k].extra_width && size.cy >= max(height, tm.tmHeight), - "Expect ideal cx %d >= %d and ideal cy %d >= %d\n", size.cx, + "Expect ideal cx %ld >= %ld and ideal cy %ld >= %ld\n", size.cx, image_width + text_width + pushtype[k].extra_width, size.cy, max(height, tm.tmHeight)); - ok(size.cy < large_height, "Expect ideal cy %d < %d\n", size.cy, large_height); + ok(size.cy < large_height, "Expect ideal cy %ld < %ld\n", size.cy, large_height); DestroyWindow(hwnd);
/* Image alignments when button has bitmap and text*/ @@ -2033,13 +2033,13 @@ static void test_bcm_get_ideal_size(void) if (!(style & (BS_CENTER | BS_VCENTER)) || ((style & BS_CENTER) && (style & BS_CENTER) != BS_CENTER) || !(style & BS_VCENTER) || (style & BS_VCENTER) == BS_VCENTER) ok(size.cx >= image_width + text_width + pushtype[k].extra_width && size.cy >= max(height, tm.tmHeight), - "Style: 0x%08x expect ideal cx %d >= %d and ideal cy %d >= %d\n", style, size.cx, + "Style: 0x%08lx expect ideal cx %ld >= %ld and ideal cy %ld >= %ld\n", style, size.cx, image_width + text_width + pushtype[k].extra_width, size.cy, max(height, tm.tmHeight)); else ok(size.cx >= max(text_width, height) + pushtype[k].extra_width && size.cy >= height + tm.tmHeight, - "Style: 0x%08x expect ideal cx %d >= %d and ideal cy %d >= %d\n", style, size.cx, + "Style: 0x%08lx expect ideal cx %ld >= %ld and ideal cy %ld >= %ld\n", style, size.cx, max(text_width, height) + pushtype[k].extra_width, size.cy, height + tm.tmHeight); - ok(size.cy < large_height, "Expect ideal cy %d < %d\n", size.cy, large_height); + ok(size.cy < large_height, "Expect ideal cy %ld < %ld\n", size.cy, large_height); DestroyWindow(hwnd); }
@@ -2059,17 +2059,17 @@ static void test_bcm_get_ideal_size(void) ok(ret, "Expect BCM_GETIDEALSIZE message to return true\n"); if (biml.uAlign == BUTTON_IMAGELIST_ALIGN_TOP || biml.uAlign == BUTTON_IMAGELIST_ALIGN_BOTTOM) ok(size.cx >= max(text_width, height) + pushtype[k].extra_width && size.cy >= height + tm.tmHeight, - "Align:%d expect ideal cx %d >= %d and ideal cy %d >= %d\n", biml.uAlign, size.cx, + "Align:%d expect ideal cx %ld >= %ld and ideal cy %ld >= %ld\n", biml.uAlign, size.cx, max(text_width, height) + pushtype[k].extra_width, size.cy, height + tm.tmHeight); else if (biml.uAlign == BUTTON_IMAGELIST_ALIGN_LEFT || biml.uAlign == BUTTON_IMAGELIST_ALIGN_RIGHT) ok(size.cx >= image_width + text_width + pushtype[k].extra_width && size.cy >= max(height, tm.tmHeight), - "Align:%d expect ideal cx %d >= %d and ideal cy %d >= %d\n", biml.uAlign, size.cx, + "Align:%d expect ideal cx %ld >= %ld and ideal cy %ld >= %ld\n", biml.uAlign, size.cx, image_width + text_width + pushtype[k].extra_width, size.cy, max(height, tm.tmHeight)); else ok(size.cx >= image_width + pushtype[k].extra_width && size.cy >= height, - "Align:%d expect ideal cx %d >= %d and ideal cy %d >= %d\n", + "Align:%d expect ideal cx %ld >= %ld and ideal cy %ld >= %ld\n", biml.uAlign, size.cx, image_width + pushtype[k].extra_width, size.cy, height); - ok(size.cy < large_height, "Expect ideal cy %d < %d\n", size.cy, large_height); + ok(size.cy < large_height, "Expect ideal cy %ld < %ld\n", size.cy, large_height); DestroyWindow(hwnd); }
@@ -2093,9 +2093,9 @@ static void test_bcm_get_ideal_size(void) ok(ret, "Expect BCM_GETIDEALSIZE message to return true\n"); /* Ideal size contains text rect even show icons only */ ok(size.cx >= image_width + text_width + pushtype[k].extra_width && size.cy >= max(height, tm.tmHeight), - "Expect ideal cx %d >= %d and ideal cy %d >= %d\n", size.cx, + "Expect ideal cx %ld >= %ld and ideal cy %ld >= %ld\n", size.cx, image_width + text_width + pushtype[k].extra_width, size.cy, max(height, tm.tmHeight)); - ok(size.cy < large_height, "Expect ideal cy %d < %d\n", size.cy, large_height); + ok(size.cy < large_height, "Expect ideal cy %ld < %ld\n", size.cy, large_height); DestroyWindow(hwnd);
/* Show icon and text */ @@ -2109,9 +2109,9 @@ static void test_bcm_get_ideal_size(void) ret = SendMessageA(hwnd, BCM_GETIDEALSIZE, 0, (LPARAM)&size); ok(ret, "Expect BCM_GETIDEALSIZE message to return true\n"); ok(size.cx >= image_width + text_width + pushtype[k].extra_width && size.cy >= max(height, tm.tmHeight), - "Expect ideal cx %d >= %d and ideal cy %d >= %d\n", size.cx, + "Expect ideal cx %ld >= %ld and ideal cy %ld >= %ld\n", size.cx, image_width + text_width + pushtype[k].extra_width, size.cy, max(height, tm.tmHeight)); - ok(size.cy < large_height, "Expect ideal cy %d < %d\n", size.cy, large_height); + ok(size.cy < large_height, "Expect ideal cy %ld < %ld\n", size.cy, large_height); DestroyWindow(hwnd); DestroyIcon(hicon); } @@ -2130,7 +2130,7 @@ static void test_bcm_get_ideal_size(void) ok(ret, "Expect BCM_GETIDEALSIZE message to return true\n"); ok((size.cx <= image_width + text_width && size.cx >= text_width && size.cy <= max(height, tm.tmHeight) && size.cy >= tm.tmHeight), - "Expect ideal cx %d within range (%d, %d ) and ideal cy %d within range (%d, %d )\n", size.cx, + "Expect ideal cx %ld within range (%ld, %ld ) and ideal cy %ld within range (%ld, %ld )\n", size.cx, text_width, image_width + text_width, size.cy, tm.tmHeight, max(height, tm.tmHeight)); DestroyWindow(hwnd);
@@ -2145,7 +2145,7 @@ static void test_bcm_get_ideal_size(void) ret = SendMessageA(hwnd, BCM_GETIDEALSIZE, 0, (LPARAM)&size); ok(ret, "Expect BCM_GETIDEALSIZE message to return true\n"); ok((size.cx >= image_width + text_width && size.cy >= max(height, tm.tmHeight)), - "Expect ideal cx %d >= %d and ideal cy %d >= %d\n", size.cx, image_width + text_width, size.cy, + "Expect ideal cx %ld >= %ld and ideal cy %ld >= %ld\n", size.cx, image_width + text_width, size.cy, max(height, tm.tmHeight)); DestroyWindow(hwnd);
@@ -2159,7 +2159,7 @@ static void test_bcm_get_ideal_size(void) ret = SendMessageA(hwnd, BCM_GETIDEALSIZE, 0, (LPARAM)&size); ok(ret, "Expect BCM_GETIDEALSIZE message to return true\n"); ok((size.cx >= image_width + text_width && size.cy >= max(height, tm.tmHeight)), - "Expect ideal cx %d >= %d and ideal cy %d >= %d\n", size.cx, image_width + text_width, size.cy, + "Expect ideal cx %ld >= %ld and ideal cy %ld >= %ld\n", size.cx, image_width + text_width, size.cy, max(height, tm.tmHeight)); DestroyWindow(hwnd);
@@ -2178,13 +2178,13 @@ static void test_bcm_get_ideal_size(void)
if (type == BS_COMMANDLINK || type == BS_DEFCOMMANDLINK) { - ok((size.cx == 0 && size.cy > 0), "Style 0x%08x expect ideal cx %d == %d and ideal cy %d > %d\n", + ok((size.cx == 0 && size.cy > 0), "Style 0x%08lx expect ideal cx %ld == %d and ideal cy %ld > %d\n", style, size.cx, 0, size.cy, 0); } else { ok(size.cx == client_width && size.cy == client_height, - "Style 0x%08x expect size.cx == %d and size.cy == %d, got size.cx: %d size.cy: %d\n", style, + "Style 0x%08lx expect size.cx == %ld and size.cy == %ld, got size.cx: %ld size.cy: %ld\n", style, client_width, client_height, size.cx, size.cy); } DestroyWindow(hwnd); @@ -2210,19 +2210,19 @@ static void test_bcm_get_ideal_size(void) || type == BS_OWNERDRAW) { ok(size.cx == client_width && size.cy == client_height, - "Style 0x%08x expect ideal size (%d,%d), got (%d,%d)\n", style, client_width, client_height, size.cx, + "Style 0x%08lx expect ideal size (%ld,%ld), got (%ld,%ld)\n", style, client_width, client_height, size.cx, size.cy); } else if (type == BS_COMMANDLINK || type == BS_DEFCOMMANDLINK) { ok((size.cx == 0 && size.cy > 0), - "Style 0x%08x expect ideal cx %d == %d and ideal cy %d > %d\n", style, size.cx, 0, + "Style 0x%08lx expect ideal cx %ld == %d and ideal cy %ld > %d\n", style, size.cx, 0, size.cy, 0); } else { height = line_count == 2 ? 2 * tm.tmHeight : tm.tmHeight; - ok(size.cx >= 0 && size.cy >= height, "Style 0x%08x expect ideal cx %d >= 0 and ideal cy %d >= %d\n", + ok(size.cx >= 0 && size.cy >= height, "Style 0x%08lx expect ideal cx %ld >= 0 and ideal cy %ld >= %ld\n", style, size.cx, size.cy, height); } DestroyWindow(hwnd); @@ -2239,14 +2239,14 @@ static void test_bcm_get_ideal_size(void) size.cy = 0; ret = SendMessageA(hwnd, BCM_GETIDEALSIZE, 0, (LPARAM)&size); ok(ret == TRUE, "Expected BCM_GETIDEALSIZE message to return true\n"); - ok(size.cx == 13 && size.cy > 0, "Expected ideal cx %d == %d and ideal cy %d > %d\n", size.cx, 13, size.cy, 0); + ok(size.cx == 13 && size.cy > 0, "Expected ideal cx %ld == %d and ideal cy %ld > %d\n", size.cx, 13, size.cy, 0); height = size.cy; size.cx = 32767; size.cy = 7; ret = SendMessageA(hwnd, BCM_GETIDEALSIZE, 0, (LPARAM)&size); ok(ret == TRUE, "Expected BCM_GETIDEALSIZE message to return true\n"); ok(size.cx < 32767, "Expected ideal cx to have been adjusted\n"); - ok(size.cx > image_width && size.cy == height, "Expected ideal cx %d > %d and ideal cy %d == %d\n", size.cx, image_width, size.cy, height); + ok(size.cx > image_width && size.cy == height, "Expected ideal cx %ld > %ld and ideal cy %ld == %ld\n", size.cx, image_width, size.cy, height);
/* Try longer note without word breaks, shouldn't extend height because no word splitting */ ret = SendMessageA(hwnd, BCM_SETNOTE, 0, (LPARAM)L"WWWWWWWWWWWWWWWW"); @@ -2255,14 +2255,14 @@ static void test_bcm_get_ideal_size(void) size.cy = 0; ret = SendMessageA(hwnd, BCM_GETIDEALSIZE, 0, (LPARAM)&size); ok(ret == TRUE, "Expected BCM_GETIDEALSIZE message to return true\n"); - ok(size.cx == k && size.cy == height, "Expected ideal cx %d == %d and ideal cy %d == %d\n", size.cx, k, size.cy, height); + ok(size.cx == k && size.cy == height, "Expected ideal cx %ld == %d and ideal cy %ld == %ld\n", size.cx, k, size.cy, height);
/* Now let it extend the width */ size.cx = 32767; size.cy = 0; ret = SendMessageA(hwnd, BCM_GETIDEALSIZE, 0, (LPARAM)&size); ok(ret == TRUE, "Expected BCM_GETIDEALSIZE message to return true\n"); - ok(size.cx > k && size.cy == height, "Expected ideal cx %d > %d and ideal cy %d == %d\n", size.cx, k, size.cy, height); + ok(size.cx > k && size.cy == height, "Expected ideal cx %ld > %d and ideal cy %ld == %ld\n", size.cx, k, size.cy, height);
/* Use a very long note with words and the same width, should extend the height due to word wrap */ ret = SendMessageA(hwnd, BCM_SETNOTE, 0, (LPARAM)L"This is a long note for the button with many words, which should " @@ -2271,13 +2271,13 @@ static void test_bcm_get_ideal_size(void) k = size.cx; ret = SendMessageA(hwnd, BCM_GETIDEALSIZE, 0, (LPARAM)&size); ok(ret == TRUE, "Expected BCM_GETIDEALSIZE message to return true\n"); - ok(size.cx <= k && size.cy > height, "Expected ideal cx %d <= %d and ideal cy %d > %d\n", size.cx, k, size.cy, height); + ok(size.cx <= k && size.cy > height, "Expected ideal cx %ld <= %d and ideal cy %ld > %ld\n", size.cx, k, size.cy, height);
/* Now try the wordy note with a width smaller than the image itself, which prevents wrapping */ size.cx = 13; ret = SendMessageA(hwnd, BCM_GETIDEALSIZE, 0, (LPARAM)&size); ok(ret == TRUE, "Expected BCM_GETIDEALSIZE message to return true\n"); - ok(size.cx == 13 && size.cy == height, "Expected ideal cx %d == %d and ideal cy %d == %d\n", size.cx, 13, size.cy, height); + ok(size.cx == 13 && size.cy == height, "Expected ideal cx %ld == %d and ideal cy %ld == %ld\n", size.cx, 13, size.cy, height); DestroyWindow(hwnd);
@@ -2302,12 +2302,12 @@ static void test_style(void)
type = GetWindowLongW(button, GWL_STYLE) & BS_TYPEMASK; expected_type = (i == BS_USERBUTTON ? BS_PUSHBUTTON : i); - ok(type == expected_type, "Expected type %#x, got %#x.\n", expected_type, type); + ok(type == expected_type, "Expected type %#lx, got %#lx.\n", expected_type, type);
for (j = BS_PUSHBUTTON; j <= BS_DEFCOMMANDLINK; ++j) { ret = SendMessageA(button, BM_SETSTYLE, j, FALSE); - ok(ret == 0, "Expected %#x, got %#lx.\n", 0, ret); + ok(ret == 0, "Expected %#x, got %#Ix.\n", 0, ret);
type = GetWindowLongW(button, GWL_STYLE) & BS_TYPEMASK; if (i >= BS_SPLITBUTTON && j <= BS_DEFPUSHBUTTON) @@ -2316,7 +2316,7 @@ static void test_style(void) expected_type = j;
ok(type == expected_type || broken(type == j), /* XP */ - "Original type %#x, expected new type %#x, got %#x.\n", i, expected_type, type); + "Original type %#lx, expected new type %#lx, got %#lx.\n", i, expected_type, type); } DestroyWindow(button); } @@ -2360,7 +2360,7 @@ static void test_visual(void) BitBlt(mem_dc2, 0, 0, width, height, button_dc, 0, 0, SRCCOPY);
todo_wine_if(type == BS_PUSHBOX || (is_theme_active && type == BS_GROUPBOX)) - ok(equal_dc(mem_dc1, mem_dc2, width, height), "Type %#x: Expected content unchanged.\n", type); + ok(equal_dc(mem_dc1, mem_dc2, width, height), "Type %#lx: Expected content unchanged.\n", type);
DeleteObject(mem_bitmap2); DeleteObject(mem_bitmap1); diff --git a/dlls/comctl32/tests/combo.c b/dlls/comctl32/tests/combo.c index dd197db5a90..0dd05befa06 100644 --- a/dlls/comctl32/tests/combo.c +++ b/dlls/comctl32/tests/combo.c @@ -63,7 +63,7 @@ static void get_combobox_info(HWND hwnd, COMBOBOXINFO *info)
info->cbSize = sizeof(*info); ret = GetComboBoxInfo(hwnd, info); - ok(ret, "Failed to get combobox info structure, error %d\n", GetLastError()); + ok(ret, "Failed to get combobox info structure, error %ld\n", GetLastError()); }
static HWND createComboEx(DWORD style) { @@ -168,19 +168,19 @@ static void test_comboex(void)
/* Add items onto the end of the combobox */ res = addItem(myHwnd, -1, first_item); - ok(res == 0, "Adding simple item failed (%d)\n", res); + ok(res == 0, "Adding simple item failed (%ld)\n", res); res = addItem(myHwnd, -1, second_item); - ok(res == 1, "Adding simple item failed (%d)\n", res); + ok(res == 1, "Adding simple item failed (%ld)\n", res); res = addItem(myHwnd, 2, third_item); - ok(res == 2, "Adding simple item failed (%d)\n", res); + ok(res == 2, "Adding simple item failed (%ld)\n", res); res = addItem(myHwnd, 1, middle_item); - ok(res == 1, "Inserting simple item failed (%d)\n", res); + ok(res == 1, "Inserting simple item failed (%ld)\n", res);
/* Add an item completely out of range */ res = addItem(myHwnd, 99, out_of_range_item); - ok(res == -1, "Adding using out of range index worked unexpectedly (%d)\n", res); + ok(res == -1, "Adding using out of range index worked unexpectedly (%ld)\n", res); res = addItem(myHwnd, 5, out_of_range_item); - ok(res == -1, "Adding using out of range index worked unexpectedly (%d)\n", res); + ok(res == -1, "Adding using out of range index worked unexpectedly (%ld)\n", res); /* Removed: Causes traps on Windows XP res = addItem(myHwnd, -2, "Out Of Range Item"); ok(res == -1, "Adding out of range worked unexpectedly (%ld)\n", res); @@ -188,62 +188,62 @@ static void test_comboex(void)
/* Get an item completely out of range */ res = getItem(myHwnd, 99, &cbexItem); - ok(res == 0, "Getting item using out of range index worked unexpectedly (%d, %s)\n", res, cbexItem.pszText); + ok(res == 0, "Getting item using out of range index worked unexpectedly (%ld, %s)\n", res, cbexItem.pszText); res = getItem(myHwnd, 4, &cbexItem); - ok(res == 0, "Getting item using out of range index worked unexpectedly (%d, %s)\n", res, cbexItem.pszText); + ok(res == 0, "Getting item using out of range index worked unexpectedly (%ld, %s)\n", res, cbexItem.pszText); res = getItem(myHwnd, -2, &cbexItem); - ok(res == 0, "Getting item using out of range index worked unexpectedly (%d, %s)\n", res, cbexItem.pszText); + ok(res == 0, "Getting item using out of range index worked unexpectedly (%ld, %s)\n", res, cbexItem.pszText);
/* Get an item in range */ res = getItem(myHwnd, 0, &cbexItem); - ok(res != 0, "Getting item using valid index failed unexpectedly (%d)\n", res); + ok(res != 0, "Getting item using valid index failed unexpectedly (%ld)\n", res); ok(strcmp(first_item, cbexItem.pszText) == 0, "Getting item returned wrong string (%s)\n", cbexItem.pszText);
res = getItem(myHwnd, 1, &cbexItem); - ok(res != 0, "Getting item using valid index failed unexpectedly (%d)\n", res); + ok(res != 0, "Getting item using valid index failed unexpectedly (%ld)\n", res); ok(strcmp(middle_item, cbexItem.pszText) == 0, "Getting item returned wrong string (%s)\n", cbexItem.pszText);
res = getItem(myHwnd, 2, &cbexItem); - ok(res != 0, "Getting item using valid index failed unexpectedly (%d)\n", res); + ok(res != 0, "Getting item using valid index failed unexpectedly (%ld)\n", res); ok(strcmp(second_item, cbexItem.pszText) == 0, "Getting item returned wrong string (%s)\n", cbexItem.pszText);
res = getItem(myHwnd, 3, &cbexItem); - ok(res != 0, "Getting item using valid index failed unexpectedly (%d)\n", res); + ok(res != 0, "Getting item using valid index failed unexpectedly (%ld)\n", res); ok(strcmp(third_item, cbexItem.pszText) == 0, "Getting item returned wrong string (%s)\n", cbexItem.pszText);
/* Set an item completely out of range */ res = setItem(myHwnd, 99, replacement_item); - ok(res == 0, "Setting item using out of range index worked unexpectedly (%d)\n", res); + ok(res == 0, "Setting item using out of range index worked unexpectedly (%ld)\n", res); res = setItem(myHwnd, 4, replacement_item); - ok(res == 0, "Setting item using out of range index worked unexpectedly (%d)\n", res); + ok(res == 0, "Setting item using out of range index worked unexpectedly (%ld)\n", res); res = setItem(myHwnd, -2, replacement_item); - ok(res == 0, "Setting item using out of range index worked unexpectedly (%d)\n", res); + ok(res == 0, "Setting item using out of range index worked unexpectedly (%ld)\n", res);
/* Set an item in range */ res = setItem(myHwnd, 0, replacement_item); - ok(res != 0, "Setting first item failed (%d)\n", res); + ok(res != 0, "Setting first item failed (%ld)\n", res); res = setItem(myHwnd, 3, replacement_item); - ok(res != 0, "Setting last item failed (%d)\n", res); + ok(res != 0, "Setting last item failed (%ld)\n", res);
/* Remove items completely out of range (4 items in control at this point) */ res = delItem(myHwnd, -1); - ok(res == CB_ERR, "Deleting using out of range index worked unexpectedly (%d)\n", res); + ok(res == CB_ERR, "Deleting using out of range index worked unexpectedly (%ld)\n", res); res = delItem(myHwnd, 4); - ok(res == CB_ERR, "Deleting using out of range index worked unexpectedly (%d)\n", res); + ok(res == CB_ERR, "Deleting using out of range index worked unexpectedly (%ld)\n", res);
/* Remove items in range (4 items in control at this point) */ res = delItem(myHwnd, 3); - ok(res == 3, "Deleting using out of range index failed (%d)\n", res); + ok(res == 3, "Deleting using out of range index failed (%ld)\n", res); res = delItem(myHwnd, 0); - ok(res == 2, "Deleting using out of range index failed (%d)\n", res); + ok(res == 2, "Deleting using out of range index failed (%ld)\n", res); res = delItem(myHwnd, 0); - ok(res == 1, "Deleting using out of range index failed (%d)\n", res); + ok(res == 1, "Deleting using out of range index failed (%ld)\n", res); res = delItem(myHwnd, 0); - ok(res == 0, "Deleting using out of range index failed (%d)\n", res); + ok(res == 0, "Deleting using out of range index failed (%ld)\n", res);
/* Remove from an empty box */ res = delItem(myHwnd, 0); - ok(res == CB_ERR, "Deleting using out of range index worked unexpectedly (%d)\n", res); + ok(res == CB_ERR, "Deleting using out of range index worked unexpectedly (%ld)\n", res);
/* Cleanup */ @@ -294,7 +294,7 @@ static void test_comboex_WM_LBUTTONDOWN(void) x = cbInfo.rcButton.left + (cbInfo.rcButton.right-cbInfo.rcButton.left)/2; y = cbInfo.rcButton.top + (cbInfo.rcButton.bottom-cbInfo.rcButton.top)/2; result = SendMessageA(hCombo, WM_LBUTTONDOWN, 0, MAKELPARAM(x, y)); - ok(result, "WM_LBUTTONDOWN was not processed. LastError=%d\n", + ok(result, "WM_LBUTTONDOWN was not processed. LastError=%ld\n", GetLastError()); ok(GetFocus() == hCombo || broken(GetFocus() != hCombo), /* win98 */ @@ -306,7 +306,7 @@ static void test_comboex_WM_LBUTTONDOWN(void) ok(idx == 0, "For TopIndex expected %d, got %d\n", 0, idx);
result = SendMessageA(hCombo, WM_LBUTTONUP, 0, MAKELPARAM(x, y)); - ok(result, "WM_LBUTTONUP was not processed. LastError=%d\n", + ok(result, "WM_LBUTTONUP was not processed. LastError=%ld\n", GetLastError()); ok(GetFocus() == hCombo || broken(GetFocus() != hCombo), /* win98 */ @@ -319,7 +319,7 @@ static void test_comboex_WM_LBUTTONDOWN(void) x = rect.left + (rect.right-rect.left)/2; y = item_height/2 + item_height*4; result = SendMessageA(hList, WM_MOUSEMOVE, 0, MAKELPARAM(x, y)); - ok(!result, "WM_MOUSEMOVE was not processed. LastError=%d\n", + ok(!result, "WM_MOUSEMOVE was not processed. LastError=%ld\n", GetLastError()); ok(GetFocus() == hCombo || broken(GetFocus() != hCombo), /* win98 */ @@ -327,7 +327,7 @@ static void test_comboex_WM_LBUTTONDOWN(void) GetFocus());
result = SendMessageA(hList, WM_LBUTTONDOWN, 0, MAKELPARAM(x, y)); - ok(!result, "WM_LBUTTONDOWN was not processed. LastError=%d\n", + ok(!result, "WM_LBUTTONDOWN was not processed. LastError=%ld\n", GetLastError()); ok(GetFocus() == hCombo || broken(GetFocus() != hCombo), /* win98 */ @@ -337,7 +337,7 @@ static void test_comboex_WM_LBUTTONDOWN(void) "The dropdown list should still be visible.\n");
result = SendMessageA(hList, WM_LBUTTONUP, 0, MAKELPARAM(x, y)); - ok(!result, "WM_LBUTTONUP was not processed. LastError=%d\n", + ok(!result, "WM_LBUTTONUP was not processed. LastError=%ld\n", GetLastError()); todo_wine ok(GetFocus() == hEdit || broken(GetFocus() == hCombo), /* win98 */ @@ -642,7 +642,7 @@ static void test_comboex_get_set_item(void) item.pszText = textA; item.iItem = -1; ret = SendMessageA(hComboEx, CBEM_SETITEMA, 0, (LPARAM)&item); - ok(ret == 1, "Unexpected return value %d.\n", ret); + ok(ret == 1, "Unexpected return value %ld.\n", ret);
ok_sequence(sequences, EDITBOX_SEQ_INDEX, test_setitem_edit_seq, "set item data for edit", FALSE);
@@ -651,17 +651,17 @@ static void test_comboex_get_set_item(void) item.iItem = -1; item.lParam = 0xdeadbeef; ret = SendMessageA(hComboEx, CBEM_GETITEMA, 0, (LPARAM)&item); - ok(ret == 1, "Unexpected return value %d.\n", ret); - ok(item.lParam == 0, "Expected zero, got %lx\n", item.lParam); + ok(ret == 1, "Unexpected return value %ld.\n", ret); + ok(item.lParam == 0, "Expected zero, got %Ix\n", item.lParam);
item.lParam = 0x1abe11ed; ret = SendMessageA(hComboEx, CBEM_SETITEMA, 0, (LPARAM)&item); - ok(ret == 1, "Unexpected return value %d.\n", ret); + ok(ret == 1, "Unexpected return value %ld.\n", ret);
item.lParam = 0; ret = SendMessageA(hComboEx, CBEM_GETITEMA, 0, (LPARAM)&item); - ok(ret == 1, "Unexpected return value %d.\n", ret); - ok(item.lParam == 0x1abe11ed, "Expected 0x1abe11ed, got %lx\n", item.lParam); + ok(ret == 1, "Unexpected return value %ld.\n", ret); + ok(item.lParam == 0x1abe11ed, "Expected 0x1abe11ed, got %Ix\n", item.lParam);
DestroyWindow(hComboEx); } @@ -931,29 +931,29 @@ static void test_combo_changesize(DWORD style) /* first make it slightly smaller */ MoveWindow( hCombo, 10, 10, clwidth - 2, clheight - 2, TRUE); GetClientRect( hCombo, &rc); - ok( rc.right - rc.left == clwidth - 2, "clientrect width is %d vs %d\n", + ok( rc.right - rc.left == clwidth - 2, "clientrect width is %ld vs %d\n", rc.right - rc.left, clwidth - 2); - ok( rc.bottom - rc.top == clheight, "clientrect height is %d vs %d\n", + ok( rc.bottom - rc.top == clheight, "clientrect height is %ld vs %d\n", rc.bottom - rc.top, clheight); SendMessageA(hCombo, CB_GETDROPPEDCONTROLRECT, 0, (LPARAM)&rc); - ok( rc.right - rc.left == clwidth - 2, "drop-down rect width is %d vs %d\n", + ok( rc.right - rc.left == clwidth - 2, "drop-down rect width is %ld vs %d\n", rc.right - rc.left, clwidth - 2); - ok( rc.bottom - rc.top == ddheight, "drop-down rect height is %d vs %d\n", + ok( rc.bottom - rc.top == ddheight, "drop-down rect height is %ld vs %d\n", rc.bottom - rc.top, ddheight); - ok( rc.right - rc.left == ddwidth -2, "drop-down rect width is %d vs %d\n", + ok( rc.right - rc.left == ddwidth -2, "drop-down rect width is %ld vs %d\n", rc.right - rc.left, ddwidth - 2); /* new cx, cy is slightly bigger than the initial values */ MoveWindow( hCombo, 10, 10, clwidth + 2, clheight + 2, TRUE); GetClientRect( hCombo, &rc); - ok( rc.right - rc.left == clwidth + 2, "clientrect width is %d vs %d\n", + ok( rc.right - rc.left == clwidth + 2, "clientrect width is %ld vs %d\n", rc.right - rc.left, clwidth + 2); - ok( rc.bottom - rc.top == clheight, "clientrect height is %d vs %d\n", + ok( rc.bottom - rc.top == clheight, "clientrect height is %ld vs %d\n", rc.bottom - rc.top, clheight); SendMessageA(hCombo, CB_GETDROPPEDCONTROLRECT, 0, (LPARAM)&rc); - ok( rc.right - rc.left == clwidth + 2, "drop-down rect width is %d vs %d\n", + ok( rc.right - rc.left == clwidth + 2, "drop-down rect width is %ld vs %d\n", rc.right - rc.left, clwidth + 2); todo_wine { - ok( rc.bottom - rc.top == clheight + 2, "drop-down rect height is %d vs %d\n", + ok( rc.bottom - rc.top == clheight + 2, "drop-down rect height is %ld vs %d\n", rc.bottom - rc.top, clheight + 2); }
@@ -1193,8 +1193,8 @@ static void test_combo_listbox_styles(DWORD cb_style)
style = GetWindowLongW( info.hwndList, GWL_STYLE ); exstyle = GetWindowLongW( info.hwndList, GWL_EXSTYLE ); - ok(style == expect_style, "%08x: got %08x\n", cb_style, style); - ok(exstyle == expect_exstyle, "%08x: got %08x\n", cb_style, exstyle); + ok(style == expect_style, "%08lx: got %08lx\n", cb_style, style); + ok(exstyle == expect_exstyle, "%08lx: got %08lx\n", cb_style, exstyle);
if (cb_style != CBS_SIMPLE) expect_exstyle |= WS_EX_TOPMOST; @@ -1202,14 +1202,14 @@ static void test_combo_listbox_styles(DWORD cb_style) SendMessageW(combo, CB_SHOWDROPDOWN, TRUE, 0 ); style = GetWindowLongW( info.hwndList, GWL_STYLE ); exstyle = GetWindowLongW( info.hwndList, GWL_EXSTYLE ); - ok(style == (expect_style | WS_VISIBLE), "%08x: got %08x\n", cb_style, style); - ok(exstyle == expect_exstyle, "%08x: got %08x\n", cb_style, exstyle); + ok(style == (expect_style | WS_VISIBLE), "%08lx: got %08lx\n", cb_style, style); + ok(exstyle == expect_exstyle, "%08lx: got %08lx\n", cb_style, exstyle);
SendMessageW(combo, CB_SHOWDROPDOWN, FALSE, 0 ); style = GetWindowLongW( info.hwndList, GWL_STYLE ); exstyle = GetWindowLongW( info.hwndList, GWL_EXSTYLE ); - ok(style == expect_style, "%08x: got %08x\n", cb_style, style); - ok(exstyle == expect_exstyle, "%08x: got %08x\n", cb_style, exstyle); + ok(style == expect_style, "%08lx: got %08lx\n", cb_style, style); + ok(exstyle == expect_exstyle, "%08lx: got %08lx\n", cb_style, exstyle);
DestroyWindow(combo); } @@ -1462,7 +1462,7 @@ static void test_comboex_CBEN_GETDISPINFO(void) item.iIndent = I_INDENTCALLBACK;
res = SendMessageA(combo, CBEM_INSERTITEMA, 0, (LPARAM)&item); - ok(!res, "Unexpected return value %u.\n", res); + ok(!res, "Unexpected return value %lu.\n", res);
for (i = 0; i < ARRAY_SIZE(test_masks); ++i) { @@ -1471,7 +1471,7 @@ static void test_comboex_CBEN_GETDISPINFO(void) memset(&item, 0, sizeof(item)); item.mask = test_masks[i]; res = SendMessageA(combo, CBEM_GETITEMA, 0, (LPARAM)&item); - ok(res == 1, "Unexpected return value %u.\n", res); + ok(res == 1, "Unexpected return value %lu.\n", res);
ok_sequence(sequences, PARENT_SEQ_INDEX, getdisp_parent_seq, "Get disp mask seq", TRUE); } @@ -1484,7 +1484,7 @@ static void test_comboex_CBEN_GETDISPINFO(void) item.mask = CBEIF_IMAGE; di_context.mask = 0; res = SendMessageA(combo, CBEM_GETITEMA, 0, (LPARAM)&item); - ok(res == 1, "Unexpected return value %u.\n", res); + ok(res == 1, "Unexpected return value %lu.\n", res); todo_wine ok(di_context.mask == CBEIF_IMAGE, "Unexpected mask %#x.\n", di_context.mask);
@@ -1495,7 +1495,7 @@ static void test_comboex_CBEN_GETDISPINFO(void) memset(&item, 0, sizeof(item)); item.mask = CBEIF_IMAGE; res = SendMessageA(combo, CBEM_GETITEMA, 0, (LPARAM)&item); - ok(res == 1, "Unexpected return value %u.\n", res); + ok(res == 1, "Unexpected return value %lu.\n", res); ok_sequence(sequences, PARENT_SEQ_INDEX, empty_seq, "Get disp after DI_SETITEM seq", FALSE);
/* Request two fields, one was set. */ @@ -1503,7 +1503,7 @@ static void test_comboex_CBEN_GETDISPINFO(void) item.mask = CBEIF_IMAGE | CBEIF_INDENT; di_context.mask = 0; res = SendMessageA(combo, CBEM_GETITEMA, 0, (LPARAM)&item); - ok(res == 1, "Unexpected return value %u.\n", res); + ok(res == 1, "Unexpected return value %lu.\n", res); todo_wine ok(di_context.mask == CBEIF_INDENT, "Unexpected mask %#x.\n", di_context.mask);
diff --git a/dlls/comctl32/tests/datetime.c b/dlls/comctl32/tests/datetime.c index 47d7a8fbe56..e5dbd6bec45 100644 --- a/dlls/comctl32/tests/datetime.c +++ b/dlls/comctl32/tests/datetime.c @@ -24,9 +24,9 @@ #include "msg.h" #include "v6util.h"
-#define expect(EXPECTED, GOT) ok((GOT)==(EXPECTED), "Expected %d, got %ld\n", (EXPECTED), (GOT)) +#define expect(EXPECTED, GOT) ok((GOT)==(EXPECTED), "Expected %d, got %Id\n", (EXPECTED), (GOT))
-#define expect_unsuccess(EXPECTED, GOT) ok((GOT)==(EXPECTED), "Expected %d(unsuccessful), got %ld(successful)\n", (EXPECTED), (GOT)) +#define expect_unsuccess(EXPECTED, GOT) ok((GOT)==(EXPECTED), "Expected %d(unsuccessful), got %Id(successful)\n", (EXPECTED), (GOT))
#define NUM_MSG_SEQUENCES 1 #define DATETIME_SEQ_INDEX 0 @@ -220,17 +220,17 @@ static void test_mccolor_types(HWND hWndDateTime, int mccolor_type, const char*
theColor=RGB(0,0,0); crColor = SendMessageA(hWndDateTime, DTM_SETMCCOLOR, mccolor_type, theColor); - ok(crColor != ~0u, "%s: Set RGB(0,0,0): Expected COLORREF of previous value, got %d\n", mccolor_name, crColor); + ok(crColor != ~0u, "%s: Set RGB(0,0,0): Expected COLORREF of previous value, got %ld\n", mccolor_name, crColor); prevColor=theColor; theColor=RGB(255,255,255); crColor = SendMessageA(hWndDateTime, DTM_SETMCCOLOR, mccolor_type, theColor); - ok(crColor==prevColor, "%s: Set RGB(255,255,255): Expected COLORREF of previous value, got %d\n", mccolor_name, crColor); + ok(crColor==prevColor, "%s: Set RGB(255,255,255): Expected COLORREF of previous value, got %ld\n", mccolor_name, crColor); prevColor=theColor; theColor=RGB(100,180,220); crColor = SendMessageA(hWndDateTime, DTM_SETMCCOLOR, mccolor_type, theColor); - ok(crColor==prevColor, "%s: Set RGB(100,180,220): Expected COLORREF of previous value, got %d\n", mccolor_name, crColor); + ok(crColor==prevColor, "%s: Set RGB(100,180,220): Expected COLORREF of previous value, got %ld\n", mccolor_name, crColor); crColor = SendMessageA(hWndDateTime, DTM_GETMCCOLOR, mccolor_type, 0); - ok(crColor==theColor, "%s: GETMCCOLOR: Expected %d, got %d\n", mccolor_name, theColor, crColor); + ok(crColor==theColor, "%s: GETMCCOLOR: Expected %ld, got %ld\n", mccolor_name, theColor, crColor); }
static void test_dtm_set_and_get_mccolor(void) @@ -282,7 +282,7 @@ static void test_dtm_get_monthcal(void)
todo_wine { r = SendMessageA(hWnd, DTM_GETMONTHCAL, 0, 0); - ok(r == 0, "Expected NULL(no child month calendar control), got %ld\n", r); + ok(r == 0, "Expected NULL(no child month calendar control), got %Id\n", r); }
ok_sequence(sequences, DATETIME_SEQ_INDEX, test_dtm_get_monthcal_seq, "test_dtm_get_monthcal", FALSE); @@ -348,7 +348,7 @@ static void test_dtm_set_and_get_range(void) r = SendMessageA(hWnd, DTM_SETRANGE, GDTR_MIN, (LPARAM)st); expect(1, r); r = SendMessageA(hWnd, DTM_GETRANGE, 0, (LPARAM)getSt); - ok(r == GDTR_MIN, "Expected %x, not %x(GDTR_MAX) or %x(GDTR_MIN | GDTR_MAX), got %lx\n", GDTR_MIN, GDTR_MAX, GDTR_MIN | GDTR_MAX, r); + ok(r == GDTR_MIN, "Expected %x, not %x(GDTR_MAX) or %x(GDTR_MIN | GDTR_MAX), got %Ix\n", GDTR_MIN, GDTR_MAX, GDTR_MIN | GDTR_MAX, r); expect_systime(&st[0], &getSt[0]);
r = SendMessageA(hWnd, DTM_SETRANGE, GDTR_MAX, (LPARAM)st); @@ -362,7 +362,7 @@ static void test_dtm_set_and_get_range(void) r = SendMessageA(hWnd, DTM_SETRANGE, GDTR_MAX, (LPARAM)st); expect(1, r); r = SendMessageA(hWnd, DTM_GETRANGE, 0, (LPARAM)getSt); - ok(r == GDTR_MAX, "Expected %x, not %x(GDTR_MIN) or %x(GDTR_MIN | GDTR_MAX), got %lx\n", GDTR_MAX, GDTR_MIN, GDTR_MIN | GDTR_MAX, r); + ok(r == GDTR_MAX, "Expected %x, not %x(GDTR_MIN) or %x(GDTR_MIN | GDTR_MAX), got %Ix\n", GDTR_MAX, GDTR_MIN, GDTR_MIN | GDTR_MAX, r); expect_systime(&st[1], &getSt[1]);
r = SendMessageA(hWnd, DTM_SETRANGE, GDTR_MIN, (LPARAM)st); @@ -376,7 +376,7 @@ static void test_dtm_set_and_get_range(void) r = SendMessageA(hWnd, DTM_SETRANGE, GDTR_MIN | GDTR_MAX, (LPARAM)st); expect(1, r); r = SendMessageA(hWnd, DTM_GETRANGE, 0, (LPARAM)getSt); - ok(r == (GDTR_MIN | GDTR_MAX), "Expected %x, not %x(GDTR_MIN) or %x(GDTR_MAX), got %lx\n", (GDTR_MIN | GDTR_MAX), GDTR_MIN, GDTR_MAX, r); + ok(r == (GDTR_MIN | GDTR_MAX), "Expected %x, not %x(GDTR_MIN) or %x(GDTR_MAX), got %Ix\n", (GDTR_MIN | GDTR_MAX), GDTR_MIN, GDTR_MAX, r); expect_systime(&st[0], &getSt[0]); expect_systime(&st[1], &getSt[1]);
@@ -388,7 +388,7 @@ static void test_dtm_set_and_get_range(void) r = SendMessageA(hWnd, DTM_SETRANGE, GDTR_MIN | GDTR_MAX, (LPARAM)st); expect(1, r); r = SendMessageA(hWnd, DTM_GETRANGE, 0, (LPARAM)getSt); - ok(r == (GDTR_MIN | GDTR_MAX), "Expected %x, not %x(GDTR_MIN) or %x(GDTR_MAX), got %lx\n", (GDTR_MIN | GDTR_MAX), GDTR_MIN, GDTR_MAX, r); + ok(r == (GDTR_MIN | GDTR_MAX), "Expected %x, not %x(GDTR_MIN) or %x(GDTR_MAX), got %Ix\n", (GDTR_MIN | GDTR_MAX), GDTR_MIN, GDTR_MAX, r); expect_systime(&st[0], &getSt[0]); expect_systime(&st[1], &getSt[1]);
@@ -400,7 +400,7 @@ static void test_dtm_set_and_get_range(void) r = SendMessageA(hWnd, DTM_SETRANGE, GDTR_MIN | GDTR_MAX, (LPARAM)st); expect(1, r); r = SendMessageA(hWnd, DTM_GETRANGE, 0, (LPARAM)getSt); - ok(r == (GDTR_MIN | GDTR_MAX), "Expected %x, not %x(GDTR_MIN) or %x(GDTR_MAX), got %lx\n", (GDTR_MIN | GDTR_MAX), GDTR_MIN, GDTR_MAX, r); + ok(r == (GDTR_MIN | GDTR_MAX), "Expected %x, not %x(GDTR_MIN) or %x(GDTR_MAX), got %Ix\n", (GDTR_MIN | GDTR_MAX), GDTR_MIN, GDTR_MAX, r); expect_systime(&st[0], &getSt[0]); expect_systime(&st[1], &getSt[1]);
@@ -408,9 +408,9 @@ static void test_dtm_set_and_get_range(void)
/* DTM_SETRANGE with 0 flags */ r = SendMessageA(hWnd, DTM_SETRANGE, 0, (LPARAM)st); - ok(r, "got %lu\n", r); + ok(r, "got %Iu\n", r); r = SendMessageA(hWnd, DTM_GETRANGE, 0, (LPARAM)getSt); - ok(r == 0, "got %lu\n", r); + ok(r == 0, "got %Iu\n", r); ok(getSt[0].wYear == 0 && getSt[1].wYear == 0, "got %u, %u\n", getSt[0].wYear, getSt[1].wYear);
DestroyWindow(hWnd); @@ -435,7 +435,7 @@ static void test_dtm_set_range_swap_min_max(void) r = SendMessageA(hWnd, DTM_SETSYSTEMTIME, GDT_VALID, (LPARAM)&st[0]); expect(1, r); r = SendMessageA(hWnd, DTM_GETSYSTEMTIME, 0, (LPARAM)&origSt); - ok(r == GDT_VALID, "Expected %d, not %d(GDT_NONE) or %d(GDT_ERROR), got %ld\n", GDT_VALID, GDT_NONE, GDT_ERROR, r); + ok(r == GDT_VALID, "Expected %d, not %d(GDT_NONE) or %d(GDT_ERROR), got %Id\n", GDT_VALID, GDT_NONE, GDT_ERROR, r); expect_systime(&st[0], &origSt);
/* set st[0] to value higher than st[1] */ @@ -447,7 +447,7 @@ static void test_dtm_set_range_swap_min_max(void) r = SendMessageA(hWnd, DTM_SETRANGE, GDTR_MIN | GDTR_MAX, (LPARAM)st); expect(1, r); r = SendMessageA(hWnd, DTM_GETRANGE, 0, (LPARAM)getSt); - ok(r == (GDTR_MIN | GDTR_MAX), "Expected %x, not %x(GDTR_MIN) or %x(GDTR_MAX), got %lx\n", (GDTR_MIN | GDTR_MAX), GDTR_MIN, GDTR_MAX, r); + ok(r == (GDTR_MIN | GDTR_MAX), "Expected %x, not %x(GDTR_MIN) or %x(GDTR_MAX), got %Ix\n", (GDTR_MIN | GDTR_MAX), GDTR_MIN, GDTR_MAX, r); todo_wine { ok(compare_systime(&st[0], &getSt[0]) == 1 || broken(compare_systime(&st[0], &getSt[1]) == 1), /* comctl32 version <= 5.80 */ @@ -463,7 +463,7 @@ static void test_dtm_set_range_swap_min_max(void) r = SendMessageA(hWnd, DTM_SETSYSTEMTIME, GDT_VALID, (LPARAM)&st[0]); expect(1, r); r = SendMessageA(hWnd, DTM_GETSYSTEMTIME, 0, (LPARAM)&getSt[0]); - ok(r == GDT_VALID, "Expected %d, not %d(GDT_NONE) or %d(GDT_ERROR), got %ld\n", GDT_VALID, GDT_NONE, GDT_ERROR, r); + ok(r == GDT_VALID, "Expected %d, not %d(GDT_NONE) or %d(GDT_ERROR), got %Id\n", GDT_VALID, GDT_NONE, GDT_ERROR, r); /* the time part seems to not change after swapping the min and max values and doing DTM_SETSYSTEMTIME */ expect_systime_date(&st[0], &getSt[0]); @@ -484,7 +484,7 @@ static void test_dtm_set_range_swap_min_max(void) whenever we do a DTM_SETRANGE, the DTM_GETRANGE will return the values swapped*/ r = SendMessageA(hWnd, DTM_GETRANGE, 0, (LPARAM)getSt); - ok(r == (GDTR_MIN | GDTR_MAX), "Expected %x, not %x(GDTR_MIN) or %x(GDTR_MAX), got %lx\n", (GDTR_MIN | GDTR_MAX), GDTR_MIN, GDTR_MAX, r); + ok(r == (GDTR_MIN | GDTR_MAX), "Expected %x, not %x(GDTR_MIN) or %x(GDTR_MAX), got %Ix\n", (GDTR_MIN | GDTR_MAX), GDTR_MIN, GDTR_MAX, r); todo_wine { ok(compare_systime(&st[0], &getSt[1]) == 1 || broken(compare_systime(&st[0], &getSt[0]) == 1), /* comctl32 version <= 5.80 */ @@ -504,7 +504,7 @@ static void test_dtm_set_range_swap_min_max(void) r = SendMessageA(hWnd, DTM_SETRANGE, GDTR_MIN | GDTR_MAX, (LPARAM)st); expect(1, r); r = SendMessageA(hWnd, DTM_GETRANGE, 0, (LPARAM)getSt); - ok(r == (GDTR_MIN | GDTR_MAX), "Expected %x, not %x(GDTR_MIN) or %x(GDTR_MAX), got %lx\n", (GDTR_MIN | GDTR_MAX), GDTR_MIN, GDTR_MAX, r); + ok(r == (GDTR_MIN | GDTR_MAX), "Expected %x, not %x(GDTR_MIN) or %x(GDTR_MAX), got %Ix\n", (GDTR_MIN | GDTR_MAX), GDTR_MIN, GDTR_MAX, r); expect_systime(&st[0], &getSt[1]); expect_systime(&st[1], &getSt[0]);
@@ -516,7 +516,7 @@ static void test_dtm_set_range_swap_min_max(void) r = SendMessageA(hWnd, DTM_SETRANGE, GDTR_MIN | GDTR_MAX, (LPARAM)st); expect(1, r); r = SendMessageA(hWnd, DTM_GETRANGE, 0, (LPARAM)getSt); - ok(r == (GDTR_MIN | GDTR_MAX), "Expected %x, not %x(GDTR_MIN) or %x(GDTR_MAX), got %lx\n", (GDTR_MIN | GDTR_MAX), GDTR_MIN, GDTR_MAX, r); + ok(r == (GDTR_MIN | GDTR_MAX), "Expected %x, not %x(GDTR_MIN) or %x(GDTR_MAX), got %Ix\n", (GDTR_MIN | GDTR_MAX), GDTR_MIN, GDTR_MAX, r); expect_systime(&st[0], &getSt[0]); expect_systime(&st[1], &getSt[1]);
@@ -544,7 +544,7 @@ static void test_dtm_set_and_get_system_time(void) r = SendMessageA(hWnd, DTM_SETSYSTEMTIME, GDT_NONE, (LPARAM)&st); expect(1, r); r = SendMessageA(hWnd, DTM_GETSYSTEMTIME, 0, (LPARAM)&getSt); - ok(r == GDT_NONE, "Expected %d, not %d(GDT_VALID) or %d(GDT_ERROR), got %ld\n", GDT_NONE, GDT_VALID, GDT_ERROR, r); + ok(r == GDT_NONE, "Expected %d, not %d(GDT_VALID) or %d(GDT_ERROR), got %Id\n", GDT_NONE, GDT_VALID, GDT_ERROR, r);
/* set st to lowest possible value */ fill_systime_struct(&st, 1601, 1, 0, 1, 0, 0, 0, 0); @@ -564,7 +564,7 @@ static void test_dtm_set_and_get_system_time(void) r = SendMessageA(hWnd, DTM_SETSYSTEMTIME, GDT_VALID, (LPARAM)&st); expect(1, r); r = SendMessageA(hWnd, DTM_GETSYSTEMTIME, 0, (LPARAM)&getSt); - ok(r == GDT_VALID, "Expected %d, not %d(GDT_NONE) or %d(GDT_ERROR), got %ld\n", GDT_VALID, GDT_NONE, GDT_ERROR, r); + ok(r == GDT_VALID, "Expected %d, not %d(GDT_NONE) or %d(GDT_ERROR), got %Id\n", GDT_VALID, GDT_NONE, GDT_ERROR, r); expect_systime(&st, &getSt);
/* set st to invalid value */ @@ -687,7 +687,7 @@ static void test_dtm_set_and_get_systemtime_with_limits(void) r = SendMessageA(hWnd, DTM_SETRANGE, GDTR_MIN | GDTR_MAX, (LPARAM)st); expect(1, r); r = SendMessageA(hWnd, DTM_GETRANGE, 0, (LPARAM)getSt); - ok(r == (GDTR_MIN | GDTR_MAX), "Expected %x, not %x(GDTR_MIN) or %x(GDTR_MAX), got %lx\n", (GDTR_MIN | GDTR_MAX), GDTR_MIN, GDTR_MAX, r); + ok(r == (GDTR_MIN | GDTR_MAX), "Expected %x, not %x(GDTR_MIN) or %x(GDTR_MAX), got %Ix\n", (GDTR_MIN | GDTR_MAX), GDTR_MIN, GDTR_MAX, r); expect_systime(&st[0], &getSt[0]); expect_systime(&st[1], &getSt[1]);
@@ -696,7 +696,7 @@ static void test_dtm_set_and_get_systemtime_with_limits(void) r = SendMessageA(hWnd, DTM_SETSYSTEMTIME, GDT_VALID, (LPARAM)&refSt); expect(1, r); r = SendMessageA(hWnd, DTM_GETSYSTEMTIME, 0, (LPARAM)&getSt[0]); - ok(r == GDT_VALID, "Expected %d, not %d(GDT_NONE) or %d(GDT_ERROR), got %ld\n", GDT_VALID, GDT_NONE, GDT_ERROR, r); + ok(r == GDT_VALID, "Expected %d, not %d(GDT_NONE) or %d(GDT_ERROR), got %Id\n", GDT_VALID, GDT_NONE, GDT_ERROR, r); expect_systime(&refSt, &getSt[0]);
/* Now set an out-of-bounds time */ @@ -705,7 +705,7 @@ static void test_dtm_set_and_get_systemtime_with_limits(void) r = SendMessageA(hWnd, DTM_SETSYSTEMTIME, GDT_VALID, (LPARAM)&st[0]); expect(1, r); r = SendMessageA(hWnd, DTM_GETSYSTEMTIME, 0, (LPARAM)&getSt[0]); - ok(r == GDT_VALID, "Expected %d, not %d(GDT_NONE) or %d(GDT_ERROR), got %ld\n", GDT_VALID, GDT_NONE, GDT_ERROR, r); + ok(r == GDT_VALID, "Expected %d, not %d(GDT_NONE) or %d(GDT_ERROR), got %Id\n", GDT_VALID, GDT_NONE, GDT_ERROR, r); expect_systime(&refSt, &getSt[0]);
fill_systime_struct(&st[0], 1977, 1, 0, 1, 0, 0, 0, 0); @@ -713,7 +713,7 @@ static void test_dtm_set_and_get_systemtime_with_limits(void) r = SendMessageA(hWnd, DTM_SETSYSTEMTIME, GDT_VALID, (LPARAM)&st[0]); expect(1, r); r = SendMessageA(hWnd, DTM_GETSYSTEMTIME, 0, (LPARAM)&getSt[0]); - ok(r == GDT_VALID, "Expected %d, not %d(GDT_NONE) or %d(GDT_ERROR), got %ld\n", GDT_VALID, GDT_NONE, GDT_ERROR, r); + ok(r == GDT_VALID, "Expected %d, not %d(GDT_NONE) or %d(GDT_ERROR), got %Id\n", GDT_VALID, GDT_NONE, GDT_ERROR, r); expect_systime(&refSt, &getSt[0]);
ok_sequence(sequences, DATETIME_SEQ_INDEX, test_dtm_set_and_get_systime_with_limits, "test_dtm_set_and_get_systime_with_limits", FALSE); @@ -755,7 +755,7 @@ static void test_dtm_get_ideal_size(void) r = SendMessageA(hwnd, DTM_GETIDEALSIZE, 0, (LPARAM)&size); ok(r, "Expect DTM_GETIDEALSIZE message to return true\n"); ok(size.cx > 0 && size.cy >= tm.tmHeight, - "Expect size.cx > 0 and size.cy >= %d, got cx:%d cy:%d\n", tm.tmHeight, size.cx, size.cy); + "Expect size.cx > 0 and size.cy >= %ld, got cx:%ld cy:%ld\n", tm.tmHeight, size.cx, size.cy);
DestroyWindow(hwnd); DeleteObject(hfont); @@ -775,7 +775,7 @@ static void test_wm_set_get_text(void) ok(CB_ERR == ret || broken(0 == ret) || /* comctl32 <= 4.72 */ broken(1 == ret), /* comctl32 <= 4.70 */ - "Expected CB_ERR, got %ld\n", ret); + "Expected CB_ERR, got %Id\n", ret);
buff[0] = 0; ret = SendMessageA(hWnd, WM_GETTEXT, sizeof(buff), (LPARAM)buff); @@ -785,20 +785,20 @@ static void test_wm_set_get_text(void) SetLastError(0xdeadbeef); ret = GetLocaleInfoA(LOCALE_USER_DEFAULT, LOCALE_ICALENDARTYPE, caltype, 3); if (ret == 0) - skip("Must know local calendar type (%x)\n", GetLastError()); + skip("Must know local calendar type (%lx)\n", GetLastError()); else if (atoi(caltype) != CAL_GREGORIAN) skip("DateTimePicker Control only supports Gregorian calendar (type: %s)\n", caltype); else { SetLastError(0xdeadbeef); ret = GetDateFormatA(LOCALE_USER_DEFAULT, 0, NULL, NULL, time, sizeof(time)); if (ret == 0) - skip("GetDateFormat failed, returned %ld, error %d\n", ret, GetLastError()); + skip("GetDateFormat failed, returned %Id, error %ld\n", ret, GetLastError()); else { ok(!strcmp(buff, time), "Expected %s, got %s\n", time, buff);
ret = SendMessageA(hWnd, WM_GETTEXTLENGTH, 0, 0); - ok(ret == strlen(time), "Got wrong length: %ld, expected %d.\n", ret, strlen(time)); + ok(ret == strlen(time), "Got wrong length: %Id, expected %Id.\n", ret, strlen(time)); } }
diff --git a/dlls/comctl32/tests/dpa.c b/dlls/comctl32/tests/dpa.c index 841076ef00f..3eaa1d5810f 100644 --- a/dlls/comctl32/tests/dpa.c +++ b/dlls/comctl32/tests/dpa.c @@ -35,7 +35,7 @@ #define expect(expected,got) expect_(__LINE__, expected, got) static inline void expect_(unsigned line, DWORD expected, DWORD got) { - ok_(__FILE__, line)(expected == got, "Expected %d, got %d\n", expected, got); + ok_(__FILE__, line)(expected == got, "Expected %ld, got %ld\n", expected, got); }
typedef struct _STREAMDATA @@ -96,13 +96,13 @@ static void init_functions(void) /* Callbacks */ static INT CALLBACK CB_CmpLT(PVOID p1, PVOID p2, LPARAM lp) { - ok(lp == 0x1abe11ed, "lp=%ld\n", lp); + ok(lp == 0x1abe11ed, "lp=%Id\n", lp); return p1 < p2 ? -1 : p1 > p2 ? 1 : 0; }
static INT CALLBACK CB_CmpGT(PVOID p1, PVOID p2, LPARAM lp) { - ok(lp == 0x1abe11ed, "lp=%ld\n", lp); + ok(lp == 0x1abe11ed, "lp=%Id\n", lp); return p1 > p2 ? -1 : p1 < p2 ? 1 : 0; }
@@ -115,14 +115,14 @@ static INT nMessages[4]; static PVOID CALLBACK CB_MergeInsertSrc(UINT op, PVOID p1, PVOID p2, LPARAM lp) { nMessages[op]++; - ok(lp == 0x1abe11ed, "lp=%ld\n", lp); + ok(lp == 0x1abe11ed, "lp=%Id\n", lp); return p1; }
static PVOID CALLBACK CB_MergeDeleteOddSrc(UINT op, PVOID p1, PVOID p2, LPARAM lp) { nMessages[op]++; - ok(lp == 0x1abe11ed, "lp=%ld\n", lp); + ok(lp == 0x1abe11ed, "lp=%Id\n", lp); return ((PCHAR)p2)+1; }
@@ -209,12 +209,12 @@ static void test_dpa(void)
GetSystemInfo(&si); hHeap = HeapCreate(0, 1, 2); - ok(hHeap != NULL, "error=%d\n", GetLastError()); + ok(hHeap != NULL, "error=%ld\n", GetLastError()); dpa3 = pDPA_CreateEx(0, hHeap); ok(dpa3 != NULL, "\n"); ret = pDPA_Grow(dpa3, si.dwPageSize + 1); ok(!ret && GetLastError() == ERROR_NOT_ENOUGH_MEMORY, - "ret=%d error=%d\n", ret, GetLastError()); + "ret=%d error=%ld\n", ret, GetLastError());
dpa = pDPA_Create(0); ok(dpa != NULL, "\n"); @@ -224,7 +224,7 @@ static void test_dpa(void) /* Fill the created gap */ ok(pDPA_SetPtr(dpa, 0, (PVOID)5), "\n"); rc=CheckDPA(dpa, 0x56, &dw); - ok(rc, "dw=0x%x\n", dw); + ok(rc, "dw=0x%lx\n", dw);
/* Prepend item */ ret = pDPA_InsertPtr(dpa, 1, (PVOID)1); @@ -240,7 +240,7 @@ static void test_dpa(void) ok(ret == 5, "ret=%d\n", ret);
rc=CheckDPA(dpa, 0x516324, &dw); - ok(rc, "dw=0x%x\n", dw); + ok(rc, "dw=0x%lx\n", dw);
for(i = 1; i <= 6; i++) { @@ -254,28 +254,28 @@ static void test_dpa(void) /* Sort DPA */ ok(pDPA_Sort(dpa, CB_CmpGT, 0x1abe11ed), "\n"); rc=CheckDPA(dpa, 0x654321, &dw); - ok(rc, "dw=0x%x\n", dw); + ok(rc, "dw=0x%lx\n", dw);
/* Clone into a new DPA */ dpa2 = pDPA_Clone(dpa, NULL); ok(dpa2 != NULL, "\n"); /* The old data should have been preserved */ rc=CheckDPA(dpa2, 0x654321, &dw2); - ok(rc, "dw=0x%x\n", dw2); + ok(rc, "dw=0x%lx\n", dw2); ok(pDPA_Sort(dpa, CB_CmpLT, 0x1abe11ed), "\n");
/* Test if the DPA itself was really copied */ rc=CheckDPA(dpa, 0x123456, &dw); - ok(rc, "dw=0x%x\n", dw ); + ok(rc, "dw=0x%lx\n", dw ); rc=CheckDPA(dpa2, 0x654321, &dw2); - ok(rc, "dw2=0x%x\n", dw2); + ok(rc, "dw2=0x%lx\n", dw2);
/* Clone into an old DPA */ SetLastError(ERROR_SUCCESS); p = pDPA_Clone(dpa, dpa3); ok(p == dpa3, "p=%p\n", p); rc=CheckDPA(dpa3, 0x123456, &dw3); - ok(rc, "dw3=0x%x\n", dw3); + ok(rc, "dw3=0x%lx\n", dw3);
for(i = 1; i <= 6; i++) { @@ -309,7 +309,7 @@ static void test_dpa(void) p = pDPA_DeletePtr(dpa, 2); ok(p == (PVOID)3, "p=%p\n", p); rc=CheckDPA(dpa, 0x12456, &dw); - ok(rc, "dw=0x%x\n", dw); + ok(rc, "dw=0x%lx\n", dw);
/* Check where to re-insert the deleted item */ i = pDPA_Search(dpa, (PVOID)3, 0, @@ -328,7 +328,7 @@ static void test_dpa(void) ret = pDPA_InsertPtr(dpa, 2, (PVOID)3); ok(ret == 2, "ret=%d i=%d\n", ret, 2); rc=CheckDPA(dpa, 0x123456, &dw); - ok(rc, "dw=0x%x\n", dw); + ok(rc, "dw=0x%lx\n", dw);
/* When doing a binary search while claiming reverse order all indexes * should be bogus */ @@ -346,7 +346,7 @@ static void test_dpa(void)
pDPA_DeleteAllPtrs(dpa2); rc=CheckDPA(dpa2, 0, &dw2); - ok(rc, "dw2=0x%x\n", dw2); + ok(rc, "dw2=0x%lx\n", dw2);
pDPA_Destroy(dpa); pDPA_Destroy(dpa2); @@ -372,7 +372,7 @@ static void test_DPA_Merge(void) ok(ret == 2, "ret=%d\n", ret);
rc = CheckDPA(dpa, 0x135, &dw); - ok(rc, "dw=0x%x\n", dw); + ok(rc, "dw=0x%lx\n", dw);
for (i = 0; i < 6; i++) { @@ -383,16 +383,16 @@ static void test_DPA_Merge(void) }
rc = CheckDPA(dpa2, 0x654321, &dw); - ok(rc, "dw=0x%x\n", dw); + ok(rc, "dw=0x%lx\n", dw); rc = CheckDPA(dpa3, 0x123456, &dw); - ok(rc, "dw=0x%x\n", dw); + ok(rc, "dw=0x%lx\n", dw);
/* Delete all odd entries from dpa2 */ memset(nMessages, 0, sizeof(nMessages)); pDPA_Merge(dpa2, dpa, DPAM_INTERSECT, CB_CmpLT, CB_MergeDeleteOddSrc, 0x1abe11ed); rc = CheckDPA(dpa2, 0x246, &dw); - ok(rc, "dw=0x%x\n", dw); + ok(rc, "dw=0x%lx\n", dw);
expect(3, nMessages[DPAMM_MERGE]); expect(3, nMessages[DPAMM_DELETE]); @@ -409,7 +409,7 @@ static void test_DPA_Merge(void) pDPA_Merge(dpa2, dpa, DPAM_INTERSECT, CB_CmpLT, CB_MergeInsertSrc, 0x1abe11ed); rc = CheckDPA(dpa2, 0x135, &dw); - ok(rc, "dw=0x%x\n", dw); + ok(rc, "dw=0x%lx\n", dw);
expect(3, nMessages[DPAMM_MERGE]); expect(6, nMessages[DPAMM_DELETE]); @@ -431,7 +431,7 @@ static void test_DPA_Merge(void) rc = CheckDPA(dpa2, 0x123456, &dw); ok(rc || broken(!rc && dw == 0x23456), /* 4.7x */ - "dw=0x%x\n", dw); + "dw=0x%lx\n", dw);
expect(0, nMessages[DPAMM_MERGE]); expect(0, nMessages[DPAMM_DELETE]); @@ -463,13 +463,13 @@ static void test_DPA_Merge(void) "Expected 3, got %d\n", nMessages[DPAMM_INSERT]);
rc = CheckDPA(dpa, 0x123456, &dw); - ok(rc, "dw=0x%x\n", dw); + ok(rc, "dw=0x%lx\n", dw); rc = CheckDPA(dpa2, 0x123456, &dw); ok(rc || broken(!rc), /* win98 */ - "dw=0x%x\n", dw); + "dw=0x%lx\n", dw); rc = CheckDPA(dpa3, 0x123456, &dw); - ok(rc, "dw=0x%x\n", dw); + ok(rc, "dw=0x%lx\n", dw);
pDPA_Destroy(dpa); pDPA_Destroy(dpa2); @@ -492,13 +492,13 @@ static void test_DPA_EnumCallback(void) }
rc = CheckDPA(dpa, 0x123456, &dw); - ok(rc, "dw=0x%x\n", dw); + ok(rc, "dw=0x%lx\n", dw);
nEnum = 0; /* test callback sets first 3 items to 7 */ pDPA_EnumCallback(dpa, CB_EnumFirstThree, dpa); rc = CheckDPA(dpa, 0x777456, &dw); - ok(rc, "dw=0x%x\n", dw); + ok(rc, "dw=0x%lx\n", dw); ok(nEnum == 3, "nEnum=%d\n", nEnum);
pDPA_Destroy(dpa); @@ -535,7 +535,7 @@ static void test_DPA_LoadStream(void) HDPA dpa;
hRes = CoInitialize(NULL); - ok(hRes == S_OK, "Failed to initialize COM, hr %#x.\n", hRes); + ok(hRes == S_OK, "Failed to initialize COM, hr %#lx.\n", hRes);
dwMode = STGM_DIRECT|STGM_CREATE|STGM_READWRITE|STGM_SHARE_EXCLUSIVE; hRes = StgCreateDocfile(NULL, dwMode|STGM_DELETEONRELEASE, 0, &pStg); @@ -622,10 +622,10 @@ static void test_DPA_LoadStream(void) expect(E_FAIL, hRes);
ret = IStream_Release(pStm); - ok(!ret, "ret=%d\n", ret); + ok(!ret, "ret=%ld\n", ret);
ret = IStorage_Release(pStg); - ok(!ret, "ret=%d\n", ret); + ok(!ret, "ret=%ld\n", ret);
CoUninitialize(); } @@ -643,7 +643,7 @@ static void test_DPA_SaveStream(void) LARGE_INTEGER liZero;
hRes = CoInitialize(NULL); - ok(hRes == S_OK, "Failed to initialize COM, hr %#x.\n", hRes); + ok(hRes == S_OK, "Failed to initialize COM, hr %#lx.\n", hRes);
dwMode = STGM_DIRECT|STGM_CREATE|STGM_READWRITE|STGM_SHARE_EXCLUSIVE; hRes = StgCreateDocfile(NULL, dwMode|STGM_DELETEONRELEASE, 0, &pStg); @@ -657,7 +657,7 @@ static void test_DPA_SaveStream(void) /* simple parameter check */ hRes = pDPA_SaveStream(dpa, NULL, pStm, NULL); ok(hRes == E_INVALIDARG || - broken(hRes == S_OK) /* XP and below */, "Wrong result, %d\n", hRes); + broken(hRes == S_OK) /* XP and below */, "Wrong result, %ld\n", hRes); if (0) { /* crashes on XP */ hRes = pDPA_SaveStream(NULL, CB_Save, pStm, NULL); @@ -688,7 +688,7 @@ if (0) { hRes = pDPA_LoadStream(&dpa, CB_Load, pStm, (void*)0xdeadbeef); expect(S_OK, hRes); rc = CheckDPA(dpa, 0x123456, &dw); - ok(rc, "dw=0x%x\n", dw); + ok(rc, "dw=0x%lx\n", dw); pDPA_Destroy(dpa);
ret = IStream_Release(pStm); diff --git a/dlls/comctl32/tests/edit.c b/dlls/comctl32/tests/edit.c index 2c108ed419c..4bfbecc713b 100644 --- a/dlls/comctl32/tests/edit.c +++ b/dlls/comctl32/tests/edit.c @@ -669,7 +669,7 @@ static void set_client_height(HWND Wnd, unsigned Height)
GetClientRect(Wnd, &ClientRect); ok(ClientRect.bottom - ClientRect.top == Height, - "The client height should be %d, but is %d\n", + "The client height should be %d, but is %ld\n", Height, ClientRect.bottom - ClientRect.top); }
@@ -685,52 +685,52 @@ static void test_edit_control_1(void) trace("EDIT: Single line\n"); hwEdit = create_editcontrol(ES_AUTOHSCROLL | ES_AUTOVSCROLL, 0); r = get_edit_style(hwEdit); - ok(r == (ES_AUTOVSCROLL | ES_AUTOHSCROLL), "Wrong style expected 0xc0 got: 0x%x\n", r); + ok(r == (ES_AUTOVSCROLL | ES_AUTOHSCROLL), "Wrong style expected 0xc0 got: 0x%lx\n", r); for (i = 0; i < 65535; i++) { msMessage.wParam = i; r = SendMessageA(hwEdit, WM_GETDLGCODE, 0, (LPARAM) &msMessage); ok(r == (DLGC_WANTCHARS | DLGC_HASSETSEL | DLGC_WANTARROWS), - "Expected DLGC_WANTCHARS | DLGC_HASSETSEL | DLGC_WANTARROWS got %x\n", r); + "Expected DLGC_WANTCHARS | DLGC_HASSETSEL | DLGC_WANTARROWS got %lx\n", r); } DestroyWindow(hwEdit);
trace("EDIT: Single line want returns\n"); hwEdit = create_editcontrol(ES_WANTRETURN | ES_AUTOHSCROLL | ES_AUTOVSCROLL, 0); r = get_edit_style(hwEdit); - ok(r == (ES_AUTOVSCROLL | ES_AUTOHSCROLL | ES_WANTRETURN), "Wrong style expected 0x10c0 got: 0x%x\n", r); + ok(r == (ES_AUTOVSCROLL | ES_AUTOHSCROLL | ES_WANTRETURN), "Wrong style expected 0x10c0 got: 0x%lx\n", r); for (i = 0; i < 65535; i++) { msMessage.wParam = i; r = SendMessageA(hwEdit, WM_GETDLGCODE, 0, (LPARAM) &msMessage); ok(r == (DLGC_WANTCHARS | DLGC_HASSETSEL | DLGC_WANTARROWS), - "Expected DLGC_WANTCHARS | DLGC_HASSETSEL | DLGC_WANTARROWS got %x\n", r); + "Expected DLGC_WANTCHARS | DLGC_HASSETSEL | DLGC_WANTARROWS got %lx\n", r); } DestroyWindow(hwEdit);
trace("EDIT: Multiline line\n"); hwEdit = create_editcontrol(ES_MULTILINE | WS_VSCROLL | ES_AUTOHSCROLL | ES_AUTOVSCROLL, 0); r = get_edit_style(hwEdit); - ok(r == (ES_AUTOHSCROLL | ES_AUTOVSCROLL | ES_MULTILINE), "Wrong style expected 0xc4 got: 0x%x\n", r); + ok(r == (ES_AUTOHSCROLL | ES_AUTOVSCROLL | ES_MULTILINE), "Wrong style expected 0xc4 got: 0x%lx\n", r); for (i = 0; i < 65535; i++) { msMessage.wParam = i; r = SendMessageA(hwEdit, WM_GETDLGCODE, 0, (LPARAM) &msMessage); ok(r == (DLGC_WANTCHARS | DLGC_HASSETSEL | DLGC_WANTALLKEYS | DLGC_WANTARROWS), - "Expected DLGC_WANTCHARS | DLGC_HASSETSEL | DLGC_WANTALLKEYS | DLGC_WANTARROWS got %x\n", r); + "Expected DLGC_WANTCHARS | DLGC_HASSETSEL | DLGC_WANTALLKEYS | DLGC_WANTARROWS got %lx\n", r); } DestroyWindow(hwEdit);
trace("EDIT: Multi line want returns\n"); hwEdit = create_editcontrol(ES_MULTILINE | WS_VSCROLL | ES_WANTRETURN | ES_AUTOHSCROLL | ES_AUTOVSCROLL, 0); r = get_edit_style(hwEdit); - ok(r == (ES_WANTRETURN | ES_AUTOHSCROLL | ES_AUTOVSCROLL | ES_MULTILINE), "Wrong style expected 0x10c4 got: 0x%x\n", r); + ok(r == (ES_WANTRETURN | ES_AUTOHSCROLL | ES_AUTOVSCROLL | ES_MULTILINE), "Wrong style expected 0x10c4 got: 0x%lx\n", r); for (i = 0; i < 65535; i++) { msMessage.wParam = i; r = SendMessageA(hwEdit, WM_GETDLGCODE, 0, (LPARAM) &msMessage); ok(r == (DLGC_WANTCHARS | DLGC_HASSETSEL | DLGC_WANTALLKEYS | DLGC_WANTARROWS), - "Expected DLGC_WANTCHARS | DLGC_HASSETSEL | DLGC_WANTALLKEYS | DLGC_WANTARROWS got %x\n", r); + "Expected DLGC_WANTCHARS | DLGC_HASSETSEL | DLGC_WANTALLKEYS | DLGC_WANTARROWS got %lx\n", r); } DestroyWindow(hwEdit); } @@ -765,11 +765,11 @@ static void test_edit_control_2(void) trace("EDIT: SETTEXT atomicity\n"); /* Send messages to "type" in the word 'foo'. */ r = SendMessageA(hwndET2, WM_CHAR, 'f', 1); - ok(1 == r, "Expected: %d, got: %d\n", 1, r); + ok(1 == r, "Expected: %d, got: %ld\n", 1, r); r = SendMessageA(hwndET2, WM_CHAR, 'o', 1); - ok(1 == r, "Expected: %d, got: %d\n", 1, r); + ok(1 == r, "Expected: %d, got: %ld\n", 1, r); r = SendMessageA(hwndET2, WM_CHAR, 'o', 1); - ok(1 == r, "Expected: %d, got: %d\n", 1, r); + ok(1 == r, "Expected: %d, got: %ld\n", 1, r); /* 'foo' should have been changed to 'bar' by the UPDATE handler. */ GetWindowTextA(hwndET2, szLocalString, MAXLEN); ok(strcmp(szLocalString, "bar")==0, @@ -777,34 +777,34 @@ static void test_edit_control_2(void)
/* try setting the caret before it's visible */ r = SetCaretPos(0, 0); - todo_wine ok(0 == r, "SetCaretPos succeeded unexpectedly, expected: 0, got: %d\n", r); + todo_wine ok(0 == r, "SetCaretPos succeeded unexpectedly, expected: 0, got: %ld\n", r); phwnd = SetFocus(hwndET2); ok(phwnd != NULL, "SetFocus failed unexpectedly, expected non-zero, got NULL\n"); r = SetCaretPos(0, 0); - ok(1 == r, "SetCaretPos failed unexpectedly, expected: 1, got: %d\n", r); + ok(1 == r, "SetCaretPos failed unexpectedly, expected: 1, got: %ld\n", r); r = GetCaretPos(&cpos); - ok(1 == r, "GetCaretPos failed unexpectedly, expected: 1, got: %d\n", r); - ok(cpos.x == 0 && cpos.y == 0, "Wrong caret position, expected: (0,0), got: (%d,%d)\n", cpos.x, cpos.y); + ok(1 == r, "GetCaretPos failed unexpectedly, expected: 1, got: %ld\n", r); + ok(cpos.x == 0 && cpos.y == 0, "Wrong caret position, expected: (0,0), got: (%ld,%ld)\n", cpos.x, cpos.y); r = SetCaretPos(-1, -1); - ok(1 == r, "SetCaretPos failed unexpectedly, expected: 1, got: %d\n", r); + ok(1 == r, "SetCaretPos failed unexpectedly, expected: 1, got: %ld\n", r); r = GetCaretPos(&cpos); - ok(1 == r, "GetCaretPos failed unexpectedly, expected: 1, got: %d\n", r); - ok(cpos.x == -1 && cpos.y == -1, "Wrong caret position, expected: (-1,-1), got: (%d,%d)\n", cpos.x, cpos.y); + ok(1 == r, "GetCaretPos failed unexpectedly, expected: 1, got: %ld\n", r); + ok(cpos.x == -1 && cpos.y == -1, "Wrong caret position, expected: (-1,-1), got: (%ld,%ld)\n", cpos.x, cpos.y); r = SetCaretPos(w << 1, h << 1); - ok(1 == r, "SetCaretPos failed unexpectedly, expected: 1, got: %d\n", r); + ok(1 == r, "SetCaretPos failed unexpectedly, expected: 1, got: %ld\n", r); r = GetCaretPos(&cpos); - ok(1 == r, "GetCaretPos failed unexpectedly, expected: 1, got: %d\n", r); - ok(cpos.x == (w << 1) && cpos.y == (h << 1), "Wrong caret position, expected: (%d,%d), got: (%d,%d)\n", w << 1, h << 1, cpos.x, cpos.y); + ok(1 == r, "GetCaretPos failed unexpectedly, expected: 1, got: %ld\n", r); + ok(cpos.x == (w << 1) && cpos.y == (h << 1), "Wrong caret position, expected: (%ld,%ld), got: (%ld,%ld)\n", w << 1, h << 1, cpos.x, cpos.y); r = SetCaretPos(w, h); - ok(1 == r, "SetCaretPos failed unexpectedly, expected: 1, got: %d\n", r); + ok(1 == r, "SetCaretPos failed unexpectedly, expected: 1, got: %ld\n", r); r = GetCaretPos(&cpos); - ok(1 == r, "GetCaretPos failed unexpectedly, expected: 1, got: %d\n", r); - ok(cpos.x == w && cpos.y == h, "Wrong caret position, expected: (%d,%d), got: (%d,%d)\n", w, h, cpos.x, cpos.y); + ok(1 == r, "GetCaretPos failed unexpectedly, expected: 1, got: %ld\n", r); + ok(cpos.x == w && cpos.y == h, "Wrong caret position, expected: (%ld,%ld), got: (%ld,%ld)\n", w, h, cpos.x, cpos.y); r = SetCaretPos(w - 1, h - 1); - ok(1 == r, "SetCaretPos failed unexpectedly, expected: 1, got: %d\n", r); + ok(1 == r, "SetCaretPos failed unexpectedly, expected: 1, got: %ld\n", r); r = GetCaretPos(&cpos); - ok(1 == r, "GetCaretPos failed unexpectedly, expected: 1, got: %d\n", r); - ok(cpos.x == (w - 1) && cpos.y == (h - 1), "Wrong caret position, expected: (%d,%d), got: (%d,%d)\n", w - 1, h - 1, cpos.x, cpos.y); + ok(1 == r, "GetCaretPos failed unexpectedly, expected: 1, got: %ld\n", r); + ok(cpos.x == (w - 1) && cpos.y == (h - 1), "Wrong caret position, expected: (%ld,%ld), got: (%ld,%ld)\n", w - 1, h - 1, cpos.x, cpos.y);
DestroyWindow(hwndET2); DestroyWindow(hwndMain); @@ -1361,7 +1361,7 @@ static void test_edit_control_5(void)
/* size of non-child edit control is (much) bigger than requested */ GetWindowRect( hWnd, &rc); - ok( rc.right - rc.left > 20, "size of the window (%d) is smaller than expected\n", + ok( rc.right - rc.left > 20, "size of the window (%ld) is smaller than expected\n", rc.right - rc.left); DestroyWindow(hWnd); /* so create a parent, and give it edit controls children to test with */ @@ -1413,25 +1413,25 @@ static void test_edit_control_6(void) ok(hWnd != NULL, "Failed to create edit control.\n");
ret = SendMessageA(hWnd, WM_SETTEXT, 0, (LPARAM)str); - ok(ret == TRUE, "Expected %d, got %d\n", TRUE, ret); + ok(ret == TRUE, "Expected %d, got %ld\n", TRUE, ret); ret = SendMessageA(hWnd, WM_GETTEXT, MAXLEN, (LPARAM)buf); - ok(ret == strlen(str), "Expected %s, got len %d\n", str, ret); + ok(ret == strlen(str), "Expected %s, got len %ld\n", str, ret); ok(!strcmp(buf, str), "Expected %s, got %s\n", str, buf);
buf[0] = 0; ret = SendMessageA(hWnd, WM_DESTROY, 0, 0); todo_wine - ok(ret == 1, "Unexpected return value %d\n", ret); + ok(ret == 1, "Unexpected return value %ld\n", ret); ret = SendMessageA(hWnd, WM_GETTEXT, MAXLEN, (LPARAM)buf); - ok(ret == strlen(str), "Expected %s, got len %d\n", str, ret); + ok(ret == strlen(str), "Expected %s, got len %ld\n", str, ret); ok(!strcmp(buf, str), "Expected %s, got %s\n", str, buf);
buf[0] = 0; ret = SendMessageA(hWnd, WM_NCDESTROY, 0, 0); - ok(ret == 0, "Expected 0, got %d\n", ret); + ok(ret == 0, "Expected 0, got %ld\n", ret); ret = SendMessageA(hWnd, WM_GETTEXT, MAXLEN, (LPARAM)buf); todo_wine { - ok(ret == strlen("Test"), "Unexpected text length %d\n", ret); + ok(ret == strlen("Test"), "Unexpected text length %ld\n", ret); ok(!strcmp(buf, "Test"), "Unexpected text %s\n", buf); } DestroyWindow(hWnd); @@ -1446,20 +1446,20 @@ static void test_edit_control_limittext(void) trace("EDIT: buffer limit for single-line\n"); hwEdit = create_editcontrol(ES_AUTOHSCROLL | ES_AUTOVSCROLL, 0); r = SendMessageA(hwEdit, EM_GETLIMITTEXT, 0, 0); - ok(r == 30000, "Incorrect default text limit, expected 30000 got %u\n", r); + ok(r == 30000, "Incorrect default text limit, expected 30000 got %lu\n", r); SendMessageA(hwEdit, EM_SETLIMITTEXT, 0, 0); r = SendMessageA(hwEdit, EM_GETLIMITTEXT, 0, 0); - ok( r == 2147483646, "got limit %u (expected 2147483646)\n", r); + ok( r == 2147483646, "got limit %lu (expected 2147483646)\n", r); DestroyWindow(hwEdit);
/* Test default limit for multi-line control */ trace("EDIT: buffer limit for multi-line\n"); hwEdit = create_editcontrol(ES_MULTILINE | WS_VSCROLL | ES_AUTOHSCROLL | ES_AUTOVSCROLL, 0); r = SendMessageA(hwEdit, EM_GETLIMITTEXT, 0, 0); - ok(r == 30000, "Incorrect default text limit, expected 30000 got %u\n", r); + ok(r == 30000, "Incorrect default text limit, expected 30000 got %lu\n", r); SendMessageA(hwEdit, EM_SETLIMITTEXT, 0, 0); r = SendMessageA(hwEdit, EM_GETLIMITTEXT, 0, 0); - ok( r == 4294967295U, "got limit %u (expected 4294967295)\n", r); + ok( r == 4294967295U, "got limit %lu (expected 4294967295)\n", r); DestroyWindow(hwEdit); }
@@ -1479,16 +1479,16 @@ static void test_edit_control_scroll(void) ok(hwEdit != NULL, "Failed to create Edit control.\n");
ret = SendMessageA(hwEdit, EM_SCROLL, SB_PAGEDOWN, 0); - ok(!ret, "Returned %x, expected 0.\n", ret); + ok(!ret, "Returned %lx, expected 0.\n", ret);
ret = SendMessageA(hwEdit, EM_SCROLL, SB_PAGEUP, 0); - ok(!ret, "Returned %x, expected 0.\n", ret); + ok(!ret, "Returned %lx, expected 0.\n", ret);
ret = SendMessageA(hwEdit, EM_SCROLL, SB_LINEUP, 0); - ok(!ret, "Returned %x, expected 0.\n", ret); + ok(!ret, "Returned %lx, expected 0.\n", ret);
ret = SendMessageA(hwEdit, EM_SCROLL, SB_LINEDOWN, 0); - ok(!ret, "Returned %x, expected 0.\n", ret); + ok(!ret, "Returned %lx, expected 0.\n", ret);
DestroyWindow (hwEdit);
@@ -1500,7 +1500,7 @@ static void test_edit_control_scroll(void) ok(hwEdit != NULL, "Failed to create Edit control.\n");
ret = SendMessageA(hwEdit, EM_SCROLL, SB_PAGEDOWN, 0); - ok(!ret, "Returned %x, expected 0.\n", ret); + ok(!ret, "Returned %lx, expected 0.\n", ret);
DestroyWindow (hwEdit); } @@ -1782,16 +1782,16 @@ static LRESULT CALLBACK test_class_proc(HWND hwnd, UINT message, WPARAM wParam,
memset(&rect, 0, sizeof(rect)); SendMessageA(hwnd, EM_GETRECT, 0, (LPARAM)&rect); - ok(!rect.right && !rect.bottom, "Invalid size after NCCREATE: %d x %d\n", rect.right, rect.bottom); + ok(!rect.right && !rect.bottom, "Invalid size after NCCREATE: %ld x %ld\n", rect.right, rect.bottom);
/* test that messages between WM_NCCREATE and WM_CREATE don't crash or cause unexpected behavior */ r = SendMessageA(hwnd, EM_SETSEL, 0, 0); - ok(r == 1, "Returned %ld, expected 1.\n", r); + ok(r == 1, "Returned %Id, expected 1.\n", r); r = SendMessageA(hwnd, WM_SIZE, 0, 0x00100010); - todo_wine ok(r == 1, "Returned %ld, expected 1.\n", r); + todo_wine ok(r == 1, "Returned %Id, expected 1.\n", r); r = SendMessageA(hwnd, EM_LINESCROLL, 1, 1); - ok(r == 1, "Returned %ld, expected 1.\n", r); + ok(r == 1, "Returned %Id, expected 1.\n", r);
return result;
@@ -1799,11 +1799,11 @@ static LRESULT CALLBACK test_class_proc(HWND hwnd, UINT message, WPARAM wParam, /* test that messages between WM_NCCREATE and WM_CREATE don't crash or cause unexpected behavior */ r = SendMessageA(hwnd, EM_SETSEL, 0, 0); - ok(r == 1, "Returned %ld, expected 1.\n", r); + ok(r == 1, "Returned %Id, expected 1.\n", r); r = SendMessageA(hwnd, WM_SIZE, 0, 0x00100010); - todo_wine ok(r == 1, "Returned %ld, expected 1.\n", r); + todo_wine ok(r == 1, "Returned %Id, expected 1.\n", r); r = SendMessageA(hwnd, EM_LINESCROLL, 1, 1); - ok(r == 1, "Returned %ld, expected 1.\n", r); + ok(r == 1, "Returned %Id, expected 1.\n", r);
break; } @@ -2035,7 +2035,7 @@ static void test_margins_font_change(void) #define edit_pos_ok(expected, got, txt) edit_pos_ok_(__LINE__, expected, got, #txt) static inline void edit_pos_ok_(unsigned line, DWORD expected, DWORD got, const char* txt) { - ok_(__FILE__, line)(expected == got, "wrong %s expected %d got %d\n", txt, expected, got); + ok_(__FILE__, line)(expected == got, "wrong %s expected %ld got %ld\n", txt, expected, got); }
#define check_pos(hwEdit, set_height, test_top, test_height, test_left) \ @@ -2188,39 +2188,39 @@ static void test_espassword(void)
hwEdit = create_editcontrol(ES_PASSWORD, 0); r = get_edit_style(hwEdit); - ok(r == ES_PASSWORD, "Wrong style expected ES_PASSWORD got: 0x%x\n", r); + ok(r == ES_PASSWORD, "Wrong style expected ES_PASSWORD got: 0x%lx\n", r); /* set text */ r = SendMessageA(hwEdit , WM_SETTEXT, 0, (LPARAM) password); - ok(r == TRUE, "Expected: %d, got: %d\n", TRUE, r); + ok(r == TRUE, "Expected: %d, got: %ld\n", TRUE, r);
/* select all, cut (ctrl-x) */ SendMessageA(hwEdit, EM_SETSEL, 0, -1); r = SendMessageA(hwEdit, WM_CHAR, 24, 0); - ok(1 == r, "Expected: %d, got: %d\n", 1, r); + ok(1 == r, "Expected: %d, got: %ld\n", 1, r);
/* get text */ r = SendMessageA(hwEdit, WM_GETTEXT, 1024, (LPARAM) buffer); - ok(r == strlen(password), "Expected: %s, got len %d\n", password, r); + ok(r == strlen(password), "Expected: %s, got len %ld\n", password, r); ok(strcmp(buffer, password) == 0, "expected %s, got %s\n", password, buffer);
r = OpenClipboard(hwEdit); - ok(r == TRUE, "expected %d, got %d\n", TRUE, r); + ok(r == TRUE, "expected %d, got %ld\n", TRUE, r); r = EmptyClipboard(); - ok(r == TRUE, "expected %d, got %d\n", TRUE, r); + ok(r == TRUE, "expected %d, got %ld\n", TRUE, r); r = CloseClipboard(); - ok(r == TRUE, "expected %d, got %d\n", TRUE, r); + ok(r == TRUE, "expected %d, got %ld\n", TRUE, r);
/* select all, copy (ctrl-c) and paste (ctrl-v) */ SendMessageA(hwEdit, EM_SETSEL, 0, -1); r = SendMessageA(hwEdit, WM_CHAR, 3, 0); - ok(1 == r, "Expected: %d, got: %d\n", 1, r); + ok(1 == r, "Expected: %d, got: %ld\n", 1, r); r = SendMessageA(hwEdit, WM_CHAR, 22, 0); - ok(1 == r, "Expected: %d, got: %d\n", 1, r); + ok(1 == r, "Expected: %d, got: %ld\n", 1, r);
/* get text */ buffer[0] = 0; r = SendMessageA(hwEdit, WM_GETTEXT, 1024, (LPARAM) buffer); - ok(r == 0, "Expected: 0, got: %d\n", r); + ok(r == 0, "Expected: 0, got: %ld\n", r); ok(strcmp(buffer, "") == 0, "expected empty string, got %s\n", buffer);
DestroyWindow(hwEdit); @@ -2236,48 +2236,48 @@ static void test_undo(void)
hwEdit = create_editcontrol(0, 0); r = get_edit_style(hwEdit); - ok(0 == r, "Wrong style expected 0x%x got: 0x%x\n", 0, r); + ok(0 == r, "Wrong style expected 0x%x got: 0x%lx\n", 0, r);
/* set text */ r = SendMessageA(hwEdit , WM_SETTEXT, 0, (LPARAM) text); - ok(TRUE == r, "Expected: %d, got: %d\n", TRUE, r); + ok(TRUE == r, "Expected: %d, got: %ld\n", TRUE, r);
/* select all, */ cpMin = cpMax = 0xdeadbeef; SendMessageA(hwEdit, EM_SETSEL, 0, -1); r = SendMessageA(hwEdit, EM_GETSEL, (WPARAM) &cpMin, (LPARAM) &cpMax); - ok((strlen(text) << 16) == r, "Unexpected length %d\n", r); - ok(0 == cpMin, "Expected: %d, got %d\n", 0, cpMin); - ok(9 == cpMax, "Expected: %d, got %d\n", 9, cpMax); + ok((strlen(text) << 16) == r, "Unexpected length %ld\n", r); + ok(0 == cpMin, "Expected: %d, got %ld\n", 0, cpMin); + ok(9 == cpMax, "Expected: %d, got %ld\n", 9, cpMax);
/* cut (ctrl-x) */ r = SendMessageA(hwEdit, WM_CHAR, 24, 0); - ok(1 == r, "Expected: %d, got: %d\n", 1, r); + ok(1 == r, "Expected: %d, got: %ld\n", 1, r);
/* get text */ buffer[0] = 0; r = SendMessageA(hwEdit, WM_GETTEXT, 1024, (LPARAM) buffer); - ok(0 == r, "Expected: %d, got len %d\n", 0, r); + ok(0 == r, "Expected: %d, got len %ld\n", 0, r); ok(0 == strcmp(buffer, ""), "expected %s, got %s\n", "", buffer);
/* undo (ctrl-z) */ r = SendMessageA(hwEdit, WM_CHAR, 26, 0); - ok(1 == r, "Expected: %d, got: %d\n", 1, r); + ok(1 == r, "Expected: %d, got: %ld\n", 1, r);
/* get text */ buffer[0] = 0; r = SendMessageA(hwEdit, WM_GETTEXT, 1024, (LPARAM) buffer); - ok(strlen(text) == r, "Unexpected length %d\n", r); + ok(strlen(text) == r, "Unexpected length %ld\n", r); ok(0 == strcmp(buffer, text), "expected %s, got %s\n", text, buffer);
/* undo again (ctrl-z) */ r = SendMessageA(hwEdit, WM_CHAR, 26, 0); - ok(1 == r, "Expected: %d, got: %d\n", 1, r); + ok(1 == r, "Expected: %d, got: %ld\n", 1, r);
/* get text */ buffer[0] = 0; r = SendMessageA(hwEdit, WM_GETTEXT, 1024, (LPARAM) buffer); - ok(r == 0, "Expected: %d, got len %d\n", 0, r); + ok(r == 0, "Expected: %d, got len %ld\n", 0, r); ok(0 == strcmp(buffer, ""), "expected %s, got %s\n", "", buffer);
DestroyWindow(hwEdit); @@ -2292,19 +2292,19 @@ static void test_enter(void) /* multiline */ hwEdit = create_editcontrol(ES_MULTILINE, 0); r = get_edit_style(hwEdit); - ok(ES_MULTILINE == r, "Wrong style expected ES_MULTILINE got: 0x%x\n", r); + ok(ES_MULTILINE == r, "Wrong style expected ES_MULTILINE got: 0x%lx\n", r);
/* set text */ r = SendMessageA(hwEdit , WM_SETTEXT, 0, (LPARAM) ""); - ok(TRUE == r, "Expected: %d, got: %d\n", TRUE, r); + ok(TRUE == r, "Expected: %d, got: %ld\n", TRUE, r);
r = SendMessageA(hwEdit, WM_CHAR, VK_RETURN, 0); - ok(1 == r, "Expected: %d, got: %d\n", 1, r); + ok(1 == r, "Expected: %d, got: %ld\n", 1, r);
/* get text */ buffer[0] = 0; r = SendMessageA(hwEdit, WM_GETTEXT, 16, (LPARAM) buffer); - ok(2 == r, "Expected: %d, got len %d\n", 2, r); + ok(2 == r, "Expected: %d, got len %ld\n", 2, r); ok(0 == strcmp(buffer, "\r\n"), "expected "\r\n", got "%s"\n", buffer);
DestroyWindow (hwEdit); @@ -2312,19 +2312,19 @@ static void test_enter(void) /* single line */ hwEdit = create_editcontrol(0, 0); r = get_edit_style(hwEdit); - ok(0 == r, "Wrong style expected 0x%x got: 0x%x\n", 0, r); + ok(0 == r, "Wrong style expected 0x%x got: 0x%lx\n", 0, r);
/* set text */ r = SendMessageA(hwEdit , WM_SETTEXT, 0, (LPARAM) ""); - ok(TRUE == r, "Expected: %d, got: %d\n", TRUE, r); + ok(TRUE == r, "Expected: %d, got: %ld\n", TRUE, r);
r = SendMessageA(hwEdit, WM_CHAR, VK_RETURN, 0); - ok(1 == r, "Expected: %d, got: %d\n", 1, r); + ok(1 == r, "Expected: %d, got: %ld\n", 1, r);
/* get text */ buffer[0] = 0; r = SendMessageA(hwEdit, WM_GETTEXT, 16, (LPARAM) buffer); - ok(0 == r, "Expected: %d, got len %d\n", 0, r); + ok(0 == r, "Expected: %d, got len %ld\n", 0, r); ok(0 == strcmp(buffer, ""), "expected "", got "%s"\n", buffer);
DestroyWindow(hwEdit); @@ -2332,19 +2332,19 @@ static void test_enter(void) /* single line with ES_WANTRETURN */ hwEdit = create_editcontrol(ES_WANTRETURN, 0); r = get_edit_style(hwEdit); - ok(ES_WANTRETURN == r, "Wrong style expected ES_WANTRETURN got: 0x%x\n", r); + ok(ES_WANTRETURN == r, "Wrong style expected ES_WANTRETURN got: 0x%lx\n", r);
/* set text */ r = SendMessageA(hwEdit , WM_SETTEXT, 0, (LPARAM) ""); - ok(TRUE == r, "Expected: %d, got: %d\n", TRUE, r); + ok(TRUE == r, "Expected: %d, got: %ld\n", TRUE, r);
r = SendMessageA(hwEdit, WM_CHAR, VK_RETURN, 0); - ok(1 == r, "Expected: %d, got: %d\n", 1, r); + ok(1 == r, "Expected: %d, got: %ld\n", 1, r);
/* get text */ buffer[0] = 0; r = SendMessageA(hwEdit, WM_GETTEXT, 16, (LPARAM) buffer); - ok(0 == r, "Expected: %d, got len %d\n", 0, r); + ok(0 == r, "Expected: %d, got len %ld\n", 0, r); ok(0 == strcmp(buffer, ""), "expected "", got "%s"\n", buffer);
DestroyWindow(hwEdit); @@ -2359,19 +2359,19 @@ static void test_tab(void) /* multiline */ hwEdit = create_editcontrol(ES_MULTILINE, 0); r = get_edit_style(hwEdit); - ok(ES_MULTILINE == r, "Wrong style expected ES_MULTILINE got: 0x%x\n", r); + ok(ES_MULTILINE == r, "Wrong style expected ES_MULTILINE got: 0x%lx\n", r);
/* set text */ r = SendMessageA(hwEdit , WM_SETTEXT, 0, (LPARAM) ""); - ok(TRUE == r, "Expected: %d, got: %d\n", TRUE, r); + ok(TRUE == r, "Expected: %d, got: %ld\n", TRUE, r);
r = SendMessageA(hwEdit, WM_CHAR, VK_TAB, 0); - ok(1 == r, "Expected: %d, got: %d\n", 1, r); + ok(1 == r, "Expected: %d, got: %ld\n", 1, r);
/* get text */ buffer[0] = 0; r = SendMessageA(hwEdit, WM_GETTEXT, 16, (LPARAM) buffer); - ok(1 == r, "Expected: %d, got len %d\n", 1, r); + ok(1 == r, "Expected: %d, got len %ld\n", 1, r); ok(0 == strcmp(buffer, "\t"), "expected "\t", got "%s"\n", buffer);
DestroyWindow(hwEdit); @@ -2379,19 +2379,19 @@ static void test_tab(void) /* single line */ hwEdit = create_editcontrol(0, 0); r = get_edit_style(hwEdit); - ok(0 == r, "Wrong style expected 0x%x got: 0x%x\n", 0, r); + ok(0 == r, "Wrong style expected 0x%x got: 0x%lx\n", 0, r);
/* set text */ r = SendMessageA(hwEdit , WM_SETTEXT, 0, (LPARAM) ""); - ok(TRUE == r, "Expected: %d, got: %d\n", TRUE, r); + ok(TRUE == r, "Expected: %d, got: %ld\n", TRUE, r);
r = SendMessageA(hwEdit, WM_CHAR, VK_TAB, 0); - ok(1 == r, "Expected: %d, got: %d\n", 1, r); + ok(1 == r, "Expected: %d, got: %ld\n", 1, r);
/* get text */ buffer[0] = 0; r = SendMessageA(hwEdit, WM_GETTEXT, 16, (LPARAM) buffer); - ok(0 == r, "Expected: %d, got len %d\n", 0, r); + ok(0 == r, "Expected: %d, got len %ld\n", 0, r); ok(0 == strcmp(buffer, ""), "expected "", got "%s"\n", buffer);
DestroyWindow(hwEdit); @@ -2802,11 +2802,11 @@ static void test_fontsize(void) ShowWindow (hwEdit, SW_SHOW);
r = SendMessageA(hwEdit, WM_CHAR, 'A', 1); - ok(1 == r, "Expected: %d, got: %d\n", 1, r); + ok(1 == r, "Expected: %d, got: %ld\n", 1, r); r = SendMessageA(hwEdit, WM_CHAR, 'B', 1); - ok(1 == r, "Expected: %d, got: %d\n", 1, r); + ok(1 == r, "Expected: %d, got: %ld\n", 1, r); r = SendMessageA(hwEdit, WM_CHAR, 'C', 1); - ok(1 == r, "Expected: %d, got: %d\n", 1, r); + ok(1 == r, "Expected: %d, got: %ld\n", 1, r);
GetWindowTextA(hwEdit, szLocalString, MAXLEN); ok(strcmp(szLocalString, "ABC")==0, @@ -2992,7 +2992,7 @@ static void test_dialogmode(void)
hwButton = CreateWindowA("BUTTON", "OK", WS_VISIBLE|WS_CHILD|BS_PUSHBUTTON, 100, 100, 50, 20, hwParent, (HMENU)ID_EDITTESTDBUTTON, hinst, NULL); - ok(hwButton!=NULL, "CreateWindow failed with error code %d\n", GetLastError()); + ok(hwButton!=NULL, "CreateWindow failed with error code %ld\n", GetLastError());
r = SendMessageA(hwEdit, WM_KEYDOWN, VK_RETURN, 0x1c0001); ok(1 == r, "expected 1, got %d\n", r); @@ -3290,13 +3290,13 @@ static void test_wordbreak_proc(void) ok(proc == NULL, "Unexpected wordbreak proc %p.\n", proc);
ret = SendMessageA(hwnd, EM_SETWORDBREAKPROC, 0, (LPARAM)test_wordbreak_procA); - ok(ret == 1, "Unexpected return value %ld.\n", ret); + ok(ret == 1, "Unexpected return value %Id.\n", ret);
proc = (void *)SendMessageA(hwnd, EM_GETWORDBREAKPROC, 0, 0); ok(proc == test_wordbreak_procA, "Unexpected wordbreak proc %p.\n", proc);
ret = SendMessageA(hwnd, EM_SETWORDBREAKPROC, 0, 0); - ok(ret == 1, "Unexpected return value %ld.\n", ret); + ok(ret == 1, "Unexpected return value %Id.\n", ret);
proc = (void *)SendMessageA(hwnd, EM_GETWORDBREAKPROC, 0, 0); ok(proc == NULL, "Unexpected wordbreak proc %p.\n", proc); diff --git a/dlls/comctl32/tests/header.c b/dlls/comctl32/tests/header.c index 143bc8f84f4..7261da2a5f3 100644 --- a/dlls/comctl32/tests/header.c +++ b/dlls/comctl32/tests/header.c @@ -59,7 +59,7 @@ static HWND hWndHeader; #define expect(expected,got) expect_(__LINE__, expected, got) static inline void expect_(unsigned line, DWORD expected, DWORD got) { - ok_(__FILE__, line)(expected == got, "Expected %d, got %d\n", expected, got); + ok_(__FILE__, line)(expected == got, "Expected %ld, got %ld\n", expected, got); }
#define NUM_MSG_SEQUENCES 2 @@ -397,13 +397,13 @@ static WCHAR pszUniTestW[] = {'T','S','T',0};
#define TEST_GET_ITEM(i,c)\ { res = getItem(hWndHeader, i, buffer);\ - ok(res != 0, "Getting item[%d] using valid index failed unexpectedly (%d)\n", i, res);\ + ok(res != 0, "Getting item[%d] using valid index failed unexpectedly (%ld)\n", i, res);\ ok(strcmp(str_items[c], buffer) == 0, "Getting item[%d] returned "%s" expecting "%s"\n", i, buffer, str_items[c]);\ }
#define TEST_GET_ITEMCOUNT(i)\ { res = getItemCount(hWndHeader);\ - ok(res == i, "Got Item Count as %d\n", res);\ + ok(res == i, "Got Item Count as %ld\n", res);\ }
static LRESULT WINAPI header_subclass_proc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) @@ -734,25 +734,25 @@ static void test_header_control (void) { TEST_GET_ITEMCOUNT(3-i); res = addItem(hWndHeader, 0, str_items[i]); - ok(res == 0, "Adding simple item failed (%d)\n", res); + ok(res == 0, "Adding simple item failed (%ld)\n", res); }
TEST_GET_ITEMCOUNT(4); res = addItem(hWndHeader, 99, str_items[i+1]); - ok(res != -1, "Adding Out of Range item should fail with -1 got (%d)\n", res); + ok(res != -1, "Adding Out of Range item should fail with -1 got (%ld)\n", res); TEST_GET_ITEMCOUNT(5); res = addItem(hWndHeader, 5, str_items[i+1]); - ok(res != -1, "Adding Out of Range item should fail with -1 got (%d)\n", res); + ok(res != -1, "Adding Out of Range item should fail with -1 got (%ld)\n", res); TEST_GET_ITEMCOUNT(6);
for (i = 0; i < 4; i++) { TEST_GET_ITEM(i,i); TEST_GET_ITEMCOUNT(6); }
res=getItem(hWndHeader, 99, buffer); - ok(res == 0, "Getting Out of Range item should fail with 0 (%d), got %s\n", res,buffer); + ok(res == 0, "Getting Out of Range item should fail with 0 (%ld), got %s\n", res,buffer); res=getItem(hWndHeader, 5, buffer); - ok(res == 1, "Getting Out of Range item should fail with 1 (%d), got %s\n", res,buffer); + ok(res == 1, "Getting Out of Range item should fail with 1 (%ld), got %s\n", res,buffer); res=getItem(hWndHeader, -2, buffer); - ok(res == 0, "Getting Out of Range item should fail with 0 (%d), got %s\n", res,buffer); + ok(res == 0, "Getting Out of Range item should fail with 0 (%ld), got %s\n", res,buffer);
if (winetest_interactive) { @@ -762,17 +762,17 @@ static void test_header_control (void)
TEST_GET_ITEMCOUNT(6); res=setItem(hWndHeader, 99, str_items[5], FALSE); - ok(res == 0, "Setting Out of Range item should fail with 0 (%d)\n", res); + ok(res == 0, "Setting Out of Range item should fail with 0 (%ld)\n", res); res=setItem(hWndHeader, 5, str_items[5], TRUE); - ok(res == 1, "Setting Out of Range item should fail with 1 (%d)\n", res); + ok(res == 1, "Setting Out of Range item should fail with 1 (%ld)\n", res); res=setItem(hWndHeader, -2, str_items[5], FALSE); - ok(res == 0, "Setting Out of Range item should fail with 0 (%d)\n", res); + ok(res == 0, "Setting Out of Range item should fail with 0 (%ld)\n", res); TEST_GET_ITEMCOUNT(6);
for (i = 0; i < 4; i++) { res = setItem(hWndHeader, i, str_items[4], TRUE); - ok(res != 0, "Setting %d item failed (%d)\n", i+1, res); + ok(res != 0, "Setting %d item failed (%ld)\n", i+1, res); TEST_GET_ITEM(i, 4); TEST_GET_ITEMCOUNT(6); } @@ -800,22 +800,22 @@ static void test_header_control (void) TEST_GET_ITEMCOUNT(6);
res = delItem(hWndHeader, 5); - ok(res == 1, "Deleting Out of Range item should fail with 1 (%d)\n", res); + ok(res == 1, "Deleting Out of Range item should fail with 1 (%ld)\n", res); res = delItem(hWndHeader, -2); - ok(res == 0, "Deleting Out of Range item should fail with 0 (%d)\n", res); + ok(res == 0, "Deleting Out of Range item should fail with 0 (%ld)\n", res); TEST_GET_ITEMCOUNT(5);
res = delItem(hWndHeader, 3); - ok(res != 0, "Deleting using out of range index failed (%d)\n", res); + ok(res != 0, "Deleting using out of range index failed (%ld)\n", res); TEST_GET_ITEMCOUNT(4); res = delItem(hWndHeader, 0); - ok(res != 0, "Deleting using out of range index failed (%d)\n", res); + ok(res != 0, "Deleting using out of range index failed (%ld)\n", res); TEST_GET_ITEMCOUNT(3); res = delItem(hWndHeader, 0); - ok(res != 0, "Deleting using out of range index failed (%d)\n", res); + ok(res != 0, "Deleting using out of range index failed (%ld)\n", res); TEST_GET_ITEMCOUNT(2); res = delItem(hWndHeader, 0); - ok(res != 0, "Deleting using out of range index failed (%d)\n", res); + ok(res != 0, "Deleting using out of range index failed (%ld)\n", res); TEST_GET_ITEMCOUNT(1);
DestroyWindow(hWndHeader); @@ -1370,13 +1370,13 @@ static void test_hds_nosizing(HWND hParent) }
#define TEST_NMCUSTOMDRAW(draw_stage, item_spec, lparam, _left, _top, _right, _bottom) \ - ok(nm->dwDrawStage == draw_stage, "Invalid dwDrawStage %d vs %d\n", draw_stage, nm->dwDrawStage); \ + ok(nm->dwDrawStage == draw_stage, "Invalid dwDrawStage %d vs %ld\n", draw_stage, nm->dwDrawStage); \ if (item_spec != -1) \ - ok(nm->dwItemSpec == item_spec, "Invalid dwItemSpec %d vs %ld\n", item_spec, nm->dwItemSpec); \ - ok(nm->lItemlParam == lparam, "Invalid lItemlParam %d vs %ld\n", lparam, nm->lItemlParam); \ + ok(nm->dwItemSpec == item_spec, "Invalid dwItemSpec %d vs %Id\n", item_spec, nm->dwItemSpec); \ + ok(nm->lItemlParam == lparam, "Invalid lItemlParam %d vs %Id\n", lparam, nm->lItemlParam); \ ok((nm->rc.top == _top && nm->rc.bottom == _bottom && nm->rc.left == _left && nm->rc.right == _right) || \ broken(draw_stage != CDDS_ITEMPREPAINT), /* comctl32 < 5.80 */ \ - "Invalid rect (%d,%d)-(%d,%d) vs %s\n", _left, _top, _right, _bottom, \ + "Invalid rect (%d,%d)-(%d,%ld) vs %s\n", _left, _top, _right, _bottom, \ wine_dbgstr_rect(&nm->rc));
static LRESULT customdraw_1(int n, NMCUSTOMDRAW *nm) @@ -1394,7 +1394,7 @@ static LRESULT customdraw_1(int n, NMCUSTOMDRAW *nm) return 0; }
- ok(FALSE, "Too many custom draw messages (n=%d, nm->dwDrawStage=%d)\n", n, nm->dwDrawStage); + ok(FALSE, "Too many custom draw messages (n=%d, nm->dwDrawStage=%ld)\n", n, nm->dwDrawStage); return -1; }
@@ -1421,7 +1421,7 @@ static LRESULT customdraw_2(int n, NMCUSTOMDRAW *nm) return 0; }
- ok(FALSE, "Too many custom draw messages (n=%d, nm->dwDrawStage=%d)\n", n, nm->dwDrawStage); + ok(FALSE, "Too many custom draw messages (n=%d, nm->dwDrawStage=%ld)\n", n, nm->dwDrawStage); return 0; }
@@ -1451,7 +1451,7 @@ static LRESULT customdraw_3(int n, NMCUSTOMDRAW *nm) return 0; }
- ok(FALSE, "Too many custom draw messages (n=%d, nm->dwDrawStage=%d)\n", n, nm->dwDrawStage); + ok(FALSE, "Too many custom draw messages (n=%d, nm->dwDrawStage=%ld)\n", n, nm->dwDrawStage); return 0; }
@@ -1479,7 +1479,7 @@ static LRESULT customdraw_4(int n, NMCUSTOMDRAW *nm) return 0; }
- ok(FALSE, "Too many custom draw messages (n=%d, nm->dwDrawStage=%d)\n", n, nm->dwDrawStage); + ok(FALSE, "Too many custom draw messages (n=%d, nm->dwDrawStage=%ld)\n", n, nm->dwDrawStage); return 0; }
@@ -1502,7 +1502,7 @@ static void test_customdraw(void) hWndHeader = create_header_control(); GetClientRect(hWndHeader, &rect); ok(rect.right - rect.left == 670 && rect.bottom - rect.top == g_customheight, - "Tests will fail as header size is %dx%d instead of 670x%d\n", + "Tests will fail as header size is %ldx%ld instead of 670x%ld\n", rect.right - rect.left, rect.bottom - rect.top, g_customheight);
for (i = 0; i < 3; i++) @@ -1654,10 +1654,10 @@ static LRESULT CALLBACK HeaderTestWndProc(HWND hWnd, UINT msg, WPARAM wParam, LP compare(di->hwndItem, g_DrawItem.hwndItem, "%p"); compare(di->itemID, g_DrawItem.itemID, "%d"); compare(di->itemState, g_DrawItem.itemState, "%d"); - compare(di->rcItem.left, g_DrawItem.rcItem.left, "%d"); - compare(di->rcItem.top, g_DrawItem.rcItem.top, "%d"); - compare(di->rcItem.right, g_DrawItem.rcItem.right, "%d"); - compare(di->rcItem.bottom, g_DrawItem.rcItem.bottom, "%d"); + compare(di->rcItem.left, g_DrawItem.rcItem.left, "%ld"); + compare(di->rcItem.top, g_DrawItem.rcItem.top, "%ld"); + compare(di->rcItem.right, g_DrawItem.rcItem.right, "%ld"); + compare(di->rcItem.bottom, g_DrawItem.rcItem.bottom, "%ld"); break;
case WM_DESTROY: @@ -1707,7 +1707,7 @@ static BOOL init(void) GetTextMetricsA(hdc, &tm); /* 2 dot extra space are needed for the border */ g_customheight = tm.tmHeight + 2; - trace("customdraw height: %d (dpi: %d)\n", g_customheight, GetDeviceCaps(hdc, LOGPIXELSY)); + trace("customdraw height: %ld (dpi: %d)\n", g_customheight, GetDeviceCaps(hdc, LOGPIXELSY)); SelectObject(hdc, hOldFont); ReleaseDC(0, hdc);
@@ -1736,22 +1736,22 @@ static void check_orderarray(HWND hwnd, DWORD start, DWORD set, DWORD expected, order[i-1] = start>>(4*(count-i)) & 0xf;
ret = SendMessageA(hwnd, HDM_SETORDERARRAY, count, (LPARAM)order); - ok_(__FILE__, line)(ret, "Expected HDM_SETORDERARRAY to succeed, got %d\n", ret); + ok_(__FILE__, line)(ret, "Expected HDM_SETORDERARRAY to succeed, got %ld\n", ret);
/* new order */ for(i = 1; i<=count; i++) order[i-1] = set>>(4*(count-i)) & 0xf; ret = SendMessageA(hwnd, HDM_SETORDERARRAY, count, (LPARAM)order); - ok_(__FILE__, line)(ret, "Expected HDM_SETORDERARRAY to succeed, got %d\n", ret); + ok_(__FILE__, line)(ret, "Expected HDM_SETORDERARRAY to succeed, got %ld\n", ret);
/* check actual order */ ret = SendMessageA(hwnd, HDM_GETORDERARRAY, count, (LPARAM)order); - ok_(__FILE__, line)(ret, "Expected HDM_GETORDERARRAY to succeed, got %d\n", ret); + ok_(__FILE__, line)(ret, "Expected HDM_GETORDERARRAY to succeed, got %ld\n", ret); for(i = 1; i<=count; i++) array |= order[i-1]<<(4*(count-i));
todo_wine_if(todo) - ok_(__FILE__, line)(array == expected, "Expected %x, got %x\n", expected, array); + ok_(__FILE__, line)(array == expected, "Expected %lx, got %lx\n", expected, array); }
static void test_hdm_orderarray(void) diff --git a/dlls/comctl32/tests/imagelist.c b/dlls/comctl32/tests/imagelist.c index 66a70982e6f..e7e3582ec35 100644 --- a/dlls/comctl32/tests/imagelist.c +++ b/dlls/comctl32/tests/imagelist.c @@ -373,7 +373,7 @@ static void test_hotspot(void) /* check new hotspot, it should be the same like the old one */ himlNew = pImageList_GetDragImage(NULL, &ppt); ok(ppt.x == dx1 && ppt.y == dy1, - "Expected drag hotspot [%d,%d] got [%d,%d]\n", + "Expected drag hotspot [%d,%d] got [%ld,%ld]\n", dx1, dy1, ppt.x, ppt.y); /* check size of new dragged image */ pImageList_GetIconSize(himlNew, &newx, &newy); @@ -755,7 +755,7 @@ static HRESULT STDMETHODCALLTYPE Test_Stream_Seek(IStream *iface, LARGE_INTEGER
if (is_v6_test()) { - ok(origin == STREAM_SEEK_CUR, "Unexpected origin %d.\n", origin); + ok(origin == STREAM_SEEK_CUR, "Unexpected origin %ld.\n", origin); ok(offset.QuadPart == 0, "Unexpected offset %s.\n", wine_dbgstr_longlong(offset.QuadPart)); ok(new_pos != NULL, "Unexpected out position pointer.\n"); return IStream_Seek(stream->stream, offset, origin, new_pos); @@ -844,7 +844,7 @@ static void init_memstream(struct memstream *stream)
stream->IStream_iface.lpVtbl = &Test_Stream_Vtbl; hr = CreateStreamOnHGlobal(NULL, TRUE, &stream->stream); - ok(hr == S_OK, "Failed to create a stream, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create a stream, hr %#lx.\n", hr); }
static void cleanup_memstream(struct memstream *stream) @@ -868,19 +868,19 @@ static ULONG check_bitmap_data(const ILHEAD *header, const char *bm_data, if (bmih->biBitCount <= 8) hdr_size += (1 << bpp) * sizeof(RGBQUAD);
ok(bmfh->bfType == (('M' << 8) | 'B'), "wrong bfType 0x%02x\n", bmfh->bfType); - ok(bmfh->bfSize == hdr_size, "wrong bfSize 0x%02x\n", bmfh->bfSize); + ok(bmfh->bfSize == hdr_size, "wrong bfSize 0x%02lx\n", bmfh->bfSize); ok(bmfh->bfReserved1 == 0, "wrong bfReserved1 0x%02x\n", bmfh->bfReserved1); ok(bmfh->bfReserved2 == 0, "wrong bfReserved2 0x%02x\n", bmfh->bfReserved2); - ok(bmfh->bfOffBits == hdr_size, "wrong bfOffBits 0x%02x\n", bmfh->bfOffBits); + ok(bmfh->bfOffBits == hdr_size, "wrong bfOffBits 0x%02lx\n", bmfh->bfOffBits);
- ok(bmih->biSize == sizeof(*bmih), "wrong biSize %d\n", bmih->biSize); + ok(bmih->biSize == sizeof(*bmih), "wrong biSize %ld\n", bmih->biSize); ok(bmih->biPlanes == 1, "wrong biPlanes %d\n", bmih->biPlanes); ok(bmih->biBitCount == bpp, "wrong biBitCount %d\n", bmih->biBitCount);
image_size = DIB_GetWidthBytes(bmih->biWidth, bmih->biBitCount) * bmih->biHeight; - ok(bmih->biSizeImage == image_size, "wrong biSizeImage %u\n", bmih->biSizeImage); - ok(bmih->biWidth == bmpsize->cx && bmih->biHeight == bmpsize->cy, "Unexpected bitmap size %d x %d, " - "expected %d x %d\n", bmih->biWidth, bmih->biHeight, bmpsize->cx, bmpsize->cy); + ok(bmih->biSizeImage == image_size, "wrong biSizeImage %lu\n", bmih->biSizeImage); + ok(bmih->biWidth == bmpsize->cx && bmih->biHeight == bmpsize->cy, "Unexpected bitmap size %ld x %ld, " + "expected %ld x %ld\n", bmih->biWidth, bmih->biHeight, bmpsize->cx, bmpsize->cy);
if (0) { @@ -927,7 +927,7 @@ static void check_ilhead_data(const ILHEAD *ilh, INT cx, INT cy, INT cur, INT ma
ok(ilh->cx == cx, "wrong cx %d (expected %d)\n", ilh->cx, cx); ok(ilh->cy == cy, "wrong cy %d (expected %d)\n", ilh->cy, cy); - ok(ilh->bkcolor == CLR_NONE, "wrong bkcolor %x\n", ilh->bkcolor); + ok(ilh->bkcolor == CLR_NONE, "wrong bkcolor %lx\n", ilh->bkcolor); ok(ilh->flags == flags || broken(!(ilh->flags & 0xfe) && (flags & 0xfe) == ILC_COLOR4), /* <= w2k */ "wrong flags %04x\n", ilh->flags); ok(ilh->ovls[0] == -1, "wrong ovls[0] %04x\n", ilh->ovls[0]); @@ -1014,10 +1014,10 @@ static void check_iml_data(HIMAGELIST himl, INT cx, INT cy, INT cur, INT max, IN ok(b, "%s: ImageList_Write failed\n", comment);
hr = GetHGlobalFromStream(stream.stream, &hglobal); - ok(hr == S_OK, "%s: Failed to get hglobal, %#x\n", comment, hr); + ok(hr == S_OK, "%s: Failed to get hglobal, %#lx\n", comment, hr);
hr = IStream_Stat(stream.stream, &stat, STATFLAG_NONAME); - ok(hr == S_OK, "Stat() failed, hr %#x.\n", hr); + ok(hr == S_OK, "Stat() failed, hr %#lx.\n", hr);
data = GlobalLock(hglobal);
@@ -1031,7 +1031,7 @@ static void check_iml_data(HIMAGELIST himl, INT cx, INT cy, INT cur, INT max, IN &bmpsize, flags & 0xfe, comment); if (!is_v6_header(header) && size < stat.cbSize.LowPart - sizeof(ILHEAD)) /* mask is present */ { - ok( flags & ILC_MASK, "%s: extra data %u/%u but mask not expected\n", comment, stat.cbSize.LowPart, size ); + ok( flags & ILC_MASK, "%s: extra data %lu/%u but mask not expected\n", comment, stat.cbSize.LowPart, size ); check_bitmap_data(header, data + sizeof(ILHEAD) + size, stat.cbSize.LowPart - sizeof(ILHEAD) - size, &bmpsize, 1, comment); } @@ -1341,7 +1341,7 @@ static void test_shell_imagelist(void)
/* Get system image list */ hr = pSHGetImageList(SHIL_SYSSMALL, &IID_IImageList, (void**)&iml); - ok(SUCCEEDED(hr), "SHGetImageList failed, hr=%x\n", hr); + ok(SUCCEEDED(hr), "SHGetImageList failed, hr=%lx\n", hr);
if (hr != S_OK) { FreeLibrary(hShell32); @@ -1358,7 +1358,7 @@ static void test_shell_imagelist(void) /* Check icon size matches */ IImageList_GetImageRect(iml, 0, &rect); ok(((rect.right == cx) && (rect.bottom == cy)), - "IImageList_GetImageRect returned r:%d,b:%d\n", + "IImageList_GetImageRect returned r:%ld,b:%ld\n", rect.right, rect.bottom);
IImageList_Release(iml); @@ -1530,7 +1530,7 @@ static void test_ImageList_DrawIndirect(void) ok(himl != 0, "ImageList_Create failed\n");
hr = pHIMAGELIST_QueryInterface(himl, &IID_IImageList, (void **) &imgl); - ok(hr == S_OK, "Failed to get interface, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get interface, hr %#lx.\n", hr);
/* Add a no-alpha image */ hbmImage = create_test_bitmap(hdcDst, 2, 1, 32, bits_image); @@ -1540,14 +1540,14 @@ static void test_ImageList_DrawIndirect(void) ok(iImage != -1, "ImageList_Add failed\n");
hr = IImageList_GetItemFlags(imgl, 1000, &flags); - ok(hr == E_INVALIDARG, "Unexpected hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Unexpected hr %#lx.\n", hr);
hr = IImageList_GetItemFlags(imgl, 1000, NULL); - ok(hr == E_INVALIDARG, "Unexpected hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Unexpected hr %#lx.\n", hr);
hr = IImageList_GetItemFlags(imgl, iImage, &flags); - ok(hr == S_OK, "Failed to get item flags, hr %#x.\n", hr); - ok(!flags, "Unexpected flags %#x.\n", flags); + ok(hr == S_OK, "Failed to get item flags, hr %#lx.\n", hr); + ok(!flags, "Unexpected flags %#lx.\n", flags);
/* Add an alpha image */ hbmAlphaImage = create_test_bitmap(hdcDst, 2, 1, 32, bits_alpha); @@ -1557,8 +1557,8 @@ static void test_ImageList_DrawIndirect(void) ok(iAlphaImage != -1, "ImageList_Add failed\n");
hr = IImageList_GetItemFlags(imgl, iAlphaImage, &flags); - ok(hr == S_OK, "Failed to get item flags, hr %#x.\n", hr); - ok(flags & ILIF_ALPHA, "Unexpected flags %#x.\n", flags); + ok(hr == S_OK, "Failed to get item flags, hr %#lx.\n", hr); + ok(flags & ILIF_ALPHA, "Unexpected flags %#lx.\n", flags);
/* Add a transparent alpha image */ hbmTransparentImage = create_test_bitmap(hdcDst, 2, 1, 32, bits_transparent); @@ -1568,8 +1568,8 @@ static void test_ImageList_DrawIndirect(void) ok(iTransparentImage != -1, "ImageList_Add failed\n");
hr = IImageList_GetItemFlags(imgl, iTransparentImage, &flags); - ok(hr == S_OK, "Failed to get item flags, hr %#x.\n", hr); - ok(flags & ILIF_ALPHA, "Unexpected flags %#x.\n", flags); + ok(hr == S_OK, "Failed to get item flags, hr %#lx.\n", hr); + ok(flags & ILIF_ALPHA, "Unexpected flags %#lx.\n", flags);
/* 32-bit Tests */ bitmapInfo.bmiHeader.biBitCount = 32; @@ -1682,31 +1682,31 @@ static void test_iimagelist(void) /* test reference counting on destruction */ imgl = (IImageList*)createImageList(32, 32); ret = IImageList_AddRef(imgl); - ok(ret == 2, "Expected 2, got %d\n", ret); + ok(ret == 2, "Expected 2, got %ld\n", ret); ret = pImageList_Destroy((HIMAGELIST)imgl); - ok(ret == TRUE, "Expected TRUE, got %d\n", ret); + ok(ret == TRUE, "Expected TRUE, got %ld\n", ret); ret = pImageList_Destroy((HIMAGELIST)imgl); - ok(ret == TRUE, "Expected TRUE, got %d\n", ret); + ok(ret == TRUE, "Expected TRUE, got %ld\n", ret); ret = pImageList_Destroy((HIMAGELIST)imgl); - ok(ret == FALSE, "Expected FALSE, got %d\n", ret); + ok(ret == FALSE, "Expected FALSE, got %ld\n", ret);
imgl = (IImageList*)createImageList(32, 32); ret = IImageList_AddRef(imgl); - ok(ret == 2, "Expected 2, got %d\n", ret); + ok(ret == 2, "Expected 2, got %ld\n", ret); ret = pImageList_Destroy((HIMAGELIST)imgl); - ok(ret == TRUE, "Expected TRUE, got %d\n", ret); + ok(ret == TRUE, "Expected TRUE, got %ld\n", ret); ret = IImageList_Release(imgl); - ok(ret == 0, "Expected 0, got %d\n", ret); + ok(ret == 0, "Expected 0, got %ld\n", ret); ret = pImageList_Destroy((HIMAGELIST)imgl); - ok(ret == FALSE, "Expected FALSE, got %d\n", ret); + ok(ret == FALSE, "Expected FALSE, got %ld\n", ret);
/* ref counting, HIMAGELIST_QueryInterface adds a reference */ imgl = (IImageList*)createImageList(32, 32); hr = pHIMAGELIST_QueryInterface((HIMAGELIST)imgl, &IID_IImageList, (void**)&imgl2); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(imgl2 == imgl, "got different pointer\n"); ret = IImageList_Release(imgl); - ok(ret == 1, "got %u\n", ret); + ok(ret == 1, "got %lu\n", ret); IImageList_Release(imgl);
if (!pImageList_CoCreateInstance) @@ -1716,7 +1716,7 @@ static void test_iimagelist(void) }
hr = pImageList_CoCreateInstance(&CLSID_ImageList, NULL, &IID_IImageList, (void **) &imgl); - ok(SUCCEEDED(hr), "ImageList_CoCreateInstance failed, hr=%x\n", hr); + ok(SUCCEEDED(hr), "ImageList_CoCreateInstance failed, hr=%lx\n", hr);
if (hr == S_OK) IImageList_Release(imgl); @@ -1727,7 +1727,7 @@ static void test_iimagelist(void) return;
hr = pHIMAGELIST_QueryInterface(himl, &IID_IImageList, (void **) &imgl); - ok(SUCCEEDED(hr), "HIMAGELIST_QueryInterface failed, hr=%x\n", hr); + ok(SUCCEEDED(hr), "HIMAGELIST_QueryInterface failed, hr=%lx\n", hr);
if (hr == S_OK) IImageList_Release(imgl); @@ -1741,7 +1741,7 @@ static void test_iimagelist(void) win_skip("IImageList2 is not supported.\n"); return; } - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); IImageList2_Release(imagelist); }
@@ -1773,7 +1773,7 @@ static void test_IImageList_Add_Remove(void)
/* remove when nothing exists */ hr = IImageList_Remove(imgl, 0); - ok(hr == E_INVALIDARG, "got 0x%08x\n", hr); + ok(hr == E_INVALIDARG, "got 0x%08lx\n", hr);
/* removing everything from an empty imagelist should succeed */ hr = IImageList_Remove(imgl, -1); @@ -1788,7 +1788,7 @@ static void test_IImageList_Add_Remove(void) ok( IImageList_ReplaceIcon(imgl, -1, hicon3, &ret) == S_OK && (ret == 2),"failed to add icon3\n");
/* remove an index out of range */ - ok( IImageList_Remove(imgl, 4711) == E_INVALIDARG, "got 0x%08x\n", hr); + ok( IImageList_Remove(imgl, 4711) == E_INVALIDARG, "got 0x%08lx\n", hr);
/* remove three */ ok( IImageList_Remove(imgl,0) == S_OK, "can't remove 0\n"); @@ -1796,7 +1796,7 @@ static void test_IImageList_Add_Remove(void) ok( IImageList_Remove(imgl,0) == S_OK, "can't remove 0\n");
/* remove one extra */ - ok( IImageList_Remove(imgl, 0) == E_INVALIDARG, "got 0x%08x\n", hr); + ok( IImageList_Remove(imgl, 0) == E_INVALIDARG, "got 0x%08lx\n", hr);
IImageList_Release(imgl); ok(DestroyIcon(hicon1),"icon 1 wasn't deleted\n"); @@ -1819,17 +1819,17 @@ static void test_IImageList_Get_SetImageCount(void)
/* check SetImageCount/GetImageCount */ hr = IImageList_SetImageCount(imgl, 3); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ret = 0; hr = IImageList_GetImageCount(imgl, &ret); ok(hr == S_OK && ret == 3, "invalid image count after increase\n"); hr = IImageList_SetImageCount(imgl, 1); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ret = 0; hr = IImageList_GetImageCount(imgl, &ret); ok(hr == S_OK && ret == 1, "invalid image count after decrease to 1\n"); hr = IImageList_SetImageCount(imgl, 0); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ret = -1; hr = IImageList_GetImageCount(imgl, &ret); ok(hr == S_OK && ret == 0, "invalid image count after decrease to 0\n"); @@ -1887,7 +1887,7 @@ if (0)
memset(&imldp, 0, sizeof (imldp)); hr = IImageList_Draw(imgl, &imldp); - ok( hr == E_INVALIDARG, "got 0x%08x\n", hr); + ok( hr == E_INVALIDARG, "got 0x%08lx\n", hr);
imldp.cbSize = IMAGELISTDRAWPARAMS_V3_SIZE; imldp.hdcDst = hdc; @@ -2334,14 +2334,14 @@ static void test_loadimage(void) IMAGE_BITMAP, LR_CREATEDIBSECTION ); ok( list != NULL, "got %p\n", list ); flags = pImageList_GetFlags( list ); - ok( flags == (ILC_COLOR4 | ILC_MASK), "got %08x\n", flags ); + ok( flags == (ILC_COLOR4 | ILC_MASK), "got %08lx\n", flags ); pImageList_Destroy( list );
list = pImageList_LoadImageW( hinst, MAKEINTRESOURCEW(IDB_BITMAP_128x15), 16, 1, CLR_NONE, IMAGE_BITMAP, LR_CREATEDIBSECTION ); ok( list != NULL, "got %p\n", list ); flags = pImageList_GetFlags( list ); - ok( flags == ILC_COLOR4, "got %08x\n", flags ); + ok( flags == ILC_COLOR4, "got %08lx\n", flags ); pImageList_Destroy( list ); }
@@ -2470,9 +2470,9 @@ if (0) }
hr = IImageList_Clone(imgl, &IID_IImageList, (void**)&imgl2); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ref = IImageList_Release(imgl2); - ok(ref == 0, "got %u\n", ref); + ok(ref == 0, "got %lu\n", ref);
IImageList_Release(imgl); } @@ -2494,7 +2494,7 @@ if (0) }
hr = IImageList_GetBkColor(imgl, &color); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
IImageList_Release(imgl); } @@ -2516,15 +2516,15 @@ if (0) }
hr = IImageList_SetBkColor(imgl, CLR_NONE, &color); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
hr = IImageList_SetBkColor(imgl, CLR_NONE, &color); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
color = 0xdeadbeef; hr = IImageList_GetBkColor(imgl, &color); - ok(hr == S_OK, "got 0x%08x\n", hr); - ok(color == CLR_NONE, "got %x\n", color); + ok(hr == S_OK, "got 0x%08lx\n", hr); + ok(color == CLR_NONE, "got %lx\n", color);
IImageList_Release(imgl); } @@ -2547,7 +2547,7 @@ if (0)
count = -1; hr = IImageList_GetImageCount(imgl, &count); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(count == 0, "got %d\n", count);
IImageList_Release(imgl); @@ -2564,13 +2564,13 @@ static void test_IImageList_GetIconSize(void) imgl = (IImageList*)himl;
hr = IImageList_GetIconSize(imgl, NULL, NULL); - ok(hr == E_INVALIDARG, "got 0x%08x\n", hr); + ok(hr == E_INVALIDARG, "got 0x%08lx\n", hr);
hr = IImageList_GetIconSize(imgl, &cx, NULL); - ok(hr == E_INVALIDARG, "got 0x%08x\n", hr); + ok(hr == E_INVALIDARG, "got 0x%08lx\n", hr);
hr = IImageList_GetIconSize(imgl, NULL, &cy); - ok(hr == E_INVALIDARG, "got 0x%08x\n", hr); + ok(hr == E_INVALIDARG, "got 0x%08lx\n", hr);
IImageList_Release(imgl); } @@ -2585,13 +2585,13 @@ static void test_ImageList_WriteEx(void) ok(himl != 0, "Failed to create an imagelist.\n");
hr = CreateStreamOnHGlobal(NULL, TRUE, &stream); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = pImageList_WriteEx(himl, ILP_NORMAL, stream); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = pImageList_WriteEx(himl, ILP_DOWNLEVEL, stream); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
IStream_Release(stream); pImageList_Destroy(himl); diff --git a/dlls/comctl32/tests/listbox.c b/dlls/comctl32/tests/listbox.c index d5c782159ce..cb311b1fc77 100644 --- a/dlls/comctl32/tests/listbox.c +++ b/dlls/comctl32/tests/listbox.c @@ -195,7 +195,7 @@ static void keypress(HWND handle, WPARAM keycode, BYTE scancode, BOOL extended) }
#define listbox_field_ok(t, s, f, got) \ - ok (t.s.f==got.f, "style %#x, step " #s ", field " #f \ + ok (t.s.f==got.f, "style %#lx, step " #s ", field " #f \ ": expected %d, got %d\n", style, t.s.f, got.f)
#define listbox_todo_field_ok(t, s, f, got) \ @@ -307,20 +307,20 @@ static void test_item_height(void) ok (SendMessageA(hLB, WM_SETFONT, (WPARAM)font, 0) == 0, "Can't set font\n");
itemHeight = SendMessageA(hLB, LB_GETITEMHEIGHT, 0, 0); - ok (itemHeight == tm.tmHeight, "Item height wrong, got %d, expecting %d\n", itemHeight, tm.tmHeight); + ok (itemHeight == tm.tmHeight, "Item height wrong, got %d, expecting %ld\n", itemHeight, tm.tmHeight);
DestroyWindow (hLB);
hLB = CreateWindowA(WC_LISTBOXA, "TestList", LBS_OWNERDRAWVARIABLE, 0, 0, 100, 100, NULL, NULL, NULL, 0);
itemHeight = SendMessageA(hLB, LB_GETITEMHEIGHT, 0, 0); - ok(itemHeight > 0 && itemHeight <= tm.tmHeight, "Unexpected item height %d, expected %d.\n", + ok(itemHeight > 0 && itemHeight <= tm.tmHeight, "Unexpected item height %d, expected %ld.\n", itemHeight, tm.tmHeight); itemHeight = SendMessageA(hLB, LB_GETITEMHEIGHT, 5, 0); - ok(itemHeight > 0 && itemHeight <= tm.tmHeight, "Unexpected item height %d, expected %d.\n", + ok(itemHeight > 0 && itemHeight <= tm.tmHeight, "Unexpected item height %d, expected %ld.\n", itemHeight, tm.tmHeight); itemHeight = SendMessageA(hLB, LB_GETITEMHEIGHT, -5, 0); - ok(itemHeight > 0 && itemHeight <= tm.tmHeight, "Unexpected item height %d, expected %d.\n", + ok(itemHeight > 0 && itemHeight <= tm.tmHeight, "Unexpected item height %d, expected %ld.\n", itemHeight, tm.tmHeight);
DestroyWindow (hLB); @@ -367,7 +367,7 @@ static LRESULT WINAPI main_window_proc(HWND hwnd, UINT msg, WPARAM wParam, LPARA m.lParam = mis->itemData ? hash_Ly((const char *)mis->itemData) : 0; add_message(sequences, PARENT_SEQ_INDEX, &m);
- ok(wParam == mis->CtlID, "got wParam=%08lx, expected %08x\n", wParam, mis->CtlID); + ok(wParam == mis->CtlID, "got wParam=%08Ix, expected %08x\n", wParam, mis->CtlID); ok(mis->CtlType == ODT_LISTBOX, "mi->CtlType = %u\n", mis->CtlType); ok(mis->CtlID == 1, "mi->CtlID = %u\n", mis->CtlID); ok(mis->itemHeight, "mi->itemHeight = 0\n"); @@ -380,7 +380,7 @@ static LRESULT WINAPI main_window_proc(HWND hwnd, UINT msg, WPARAM wParam, LPARA HWND ctrl = GetDlgItem(hwnd, cis->CtlID); BOOL is_unicode_data = TRUE;
- ok(wParam == cis->CtlID, "expected %#x, got %#lx\n", cis->CtlID, wParam); + ok(wParam == cis->CtlID, "expected %#x, got %#Ix\n", cis->CtlID, wParam); ok(cis->hwndItem == ctrl, "expected %p, got %p\n", ctrl, cis->hwndItem); ok((int)cis->itemID1 >= 0, "expected >= 0, got %d\n", cis->itemID1); ok((int)cis->itemID2 == -1, "expected -1, got %d\n", cis->itemID2); @@ -406,7 +406,7 @@ static LRESULT WINAPI main_window_proc(HWND hwnd, UINT msg, WPARAM wParam, LPARA RECT rc_item, rc_client, rc_clip; DRAWITEMSTRUCT *dis = (DRAWITEMSTRUCT *)lParam;
- ok(wParam == dis->CtlID, "got wParam=%08lx instead of %08x\n", wParam, dis->CtlID); + ok(wParam == dis->CtlID, "got wParam=%08Ix instead of %08x\n", wParam, dis->CtlID); ok(dis->CtlType == ODT_LISTBOX, "wrong CtlType %04x\n", dis->CtlType);
GetClientRect(dis->hwndItem, &rc_client); @@ -508,14 +508,14 @@ static void test_ownerdraw(void)
SendMessageA(hLB, LB_GETITEMRECT, 0, (LPARAM)&rc); ok(!IsRectEmpty(&rc), "empty item rect\n"); - ok(rc.top < 0, "rc.top is not negative (%d)\n", rc.top); + ok(rc.top < 0, "rc.top is not negative (%ld)\n", rc.top);
DestroyWindow(hLB);
/* Both FIXED and VARIABLE, FIXED should override VARIABLE. */ hLB = CreateWindowA(WC_LISTBOXA, "TestList", LBS_OWNERDRAWFIXED | LBS_OWNERDRAWVARIABLE | styles[i], 0, 0, 100, 100, NULL, NULL, NULL, 0); - ok(hLB != NULL, "last error 0x%08x\n", GetLastError()); + ok(hLB != NULL, "last error 0x%08lx\n", GetLastError());
ok(GetWindowLongA(hLB, GWL_STYLE) & LBS_OWNERDRAWVARIABLE, "Unexpected window style.\n");
@@ -915,70 +915,70 @@ static void test_changing_selection_styles(void) for (k = 0; k < ARRAY_SIZE(selexpect_multi); k++) { ret = SendMessageA(listbox, LB_INSERTSTRING, -1, (LPARAM)"x"); - ok(ret == k, "%u: Unexpected return value %d, expected %d.\n", j, ret, k); + ok(ret == k, "%u: Unexpected return value %ld, expected %d.\n", j, ret, k); } ret = SendMessageA(listbox, LB_GETCOUNT, 0, 0); - ok(ret == ARRAY_SIZE(selexpect_multi), "%u: Unexpected count %d.\n", j, ret); + ok(ret == ARRAY_SIZE(selexpect_multi), "%u: Unexpected count %ld.\n", j, ret);
/* Select items with different methods */ ret = SendMessageA(listbox, LB_SETCURSEL, 2, 0); - ok(ret == setcursel_expect, "%u: Unexpected return value %d.\n", j, ret); + ok(ret == setcursel_expect, "%u: Unexpected return value %ld.\n", j, ret); ret = SendMessageA(listbox, LB_SELITEMRANGE, TRUE, MAKELPARAM(0, 0)); - ok(ret == selitemrange_expect, "%u: Unexpected return value %d.\n", j, ret); + ok(ret == selitemrange_expect, "%u: Unexpected return value %ld.\n", j, ret); ret = SendMessageA(listbox, LB_SELITEMRANGE, TRUE, MAKELPARAM(2, 2)); - ok(ret == selitemrange_expect, "%u: Unexpected return value %d.\n", j, ret); + ok(ret == selitemrange_expect, "%u: Unexpected return value %ld.\n", j, ret);
/* Verify that the proper items are selected */ for (k = 0; k < ARRAY_SIZE(selexpect_multi); k++) { ret = SendMessageA(listbox, LB_GETSEL, k, 0); - ok(ret == selexpect[k], "%u: Unexpected selection state %d, expected %d.\n", + ok(ret == selexpect[k], "%u: Unexpected selection state %ld, expected %ld.\n", j, ret, selexpect[k]); }
/* Now change the selection style */ style = GetWindowLongA(listbox, GWL_STYLE); ok((style & (LBS_MULTIPLESEL | LBS_EXTENDEDSEL)) == selstyles[j], - "%u: unexpected window styles %#x.\n", j, style); + "%u: unexpected window styles %#lx.\n", j, style); if (selstyles[j] & (LBS_MULTIPLESEL | LBS_EXTENDEDSEL)) style &= ~selstyles[j]; else style |= LBS_MULTIPLESEL | LBS_EXTENDEDSEL; SetWindowLongA(listbox, GWL_STYLE, style); style = GetWindowLongA(listbox, GWL_STYLE); - ok(!(style & selstyles[j]), "%u: unexpected window styles %#x.\n", j, style); + ok(!(style & selstyles[j]), "%u: unexpected window styles %#lx.\n", j, style);
/* Verify that the same items are selected */ ret = SendMessageA(listbox, LB_GETSELCOUNT, 0, 0); - ok(ret == getselcount_expect, "%u: expected %d from LB_GETSELCOUNT, got %d\n", + ok(ret == getselcount_expect, "%u: expected %ld from LB_GETSELCOUNT, got %ld\n", j, getselcount_expect, ret);
for (k = 0; k < ARRAY_SIZE(selexpect_multi); k++) { ret = SendMessageA(listbox, LB_GETSEL, k, 0); - ok(ret == selexpect[k], "%u: Unexpected selection state %d, expected %d.\n", + ok(ret == selexpect[k], "%u: Unexpected selection state %ld, expected %ld.\n", j, ret, selexpect[k]); }
/* Lastly see if we can still change the selection as before with old style */ if (setcursel_expect != LB_ERR) setcursel_expect = 0; ret = SendMessageA(listbox, LB_SETCURSEL, 0, 0); - ok(ret == setcursel_expect, "%u: Unexpected return value %d.\n", j, ret); + ok(ret == setcursel_expect, "%u: Unexpected return value %ld.\n", j, ret); ret = SendMessageA(listbox, LB_SELITEMRANGE, TRUE, MAKELPARAM(1, 1)); - ok(ret == selitemrange_expect, "%u: Unexpected return value %d.\n", j, ret); + ok(ret == selitemrange_expect, "%u: Unexpected return value %ld.\n", j, ret); ret = SendMessageA(listbox, LB_SELITEMRANGE, FALSE, MAKELPARAM(2, 2)); - ok(ret == selitemrange_expect, "%u: Unexpected return value %d.\n", j, ret); + ok(ret == selitemrange_expect, "%u: Unexpected return value %ld.\n", j, ret);
/* And verify the selections */ selexpect = (selstyles[j] & (LBS_MULTIPLESEL | LBS_EXTENDEDSEL)) ? selexpect_multi2 : selexpect_single2; ret = SendMessageA(listbox, LB_GETSELCOUNT, 0, 0); - ok(ret == getselcount_expect, "%u: expected %d from LB_GETSELCOUNT, got %d\n", + ok(ret == getselcount_expect, "%u: expected %ld from LB_GETSELCOUNT, got %ld\n", j, getselcount_expect, ret);
for (k = 0; k < ARRAY_SIZE(selexpect_multi); k++) { ret = SendMessageA(listbox, LB_GETSEL, k, 0); - ok(ret == selexpect[k], "%u: Unexpected selection state %d, expected %d.\n", + ok(ret == selexpect[k], "%u: Unexpected selection state %ld, expected %ld.\n", j, ret, selexpect[k]); }
@@ -1001,13 +1001,13 @@ static void test_itemfrompoint(void) RECT rc;
r = SendMessageA(hList, LB_ITEMFROMPOINT, 0, MAKELPARAM( /* x */ 30, /* y */ 30 )); - ok( r == MAKELPARAM(0xffff, 1), "Unexpected ret value %#x.\n", r ); + ok( r == MAKELPARAM(0xffff, 1), "Unexpected ret value %#lx.\n", r );
r = SendMessageA(hList, LB_ITEMFROMPOINT, 0, MAKELPARAM( 700, 30 )); - ok( r == MAKELPARAM(0xffff, 1), "Unexpected ret value %#x.\n", r ); + ok( r == MAKELPARAM(0xffff, 1), "Unexpected ret value %#lx.\n", r );
r = SendMessageA(hList, LB_ITEMFROMPOINT, 0, MAKELPARAM( 30, 300 )); - ok( r == MAKELPARAM(0xffff, 1), "Unexpected ret value %#x.\n", r ); + ok( r == MAKELPARAM(0xffff, 1), "Unexpected ret value %#lx.\n", r );
id = SendMessageA( hList, LB_ADDSTRING, 0, (LPARAM) "hi"); ok( id == 0, "item id wrong\n"); @@ -1015,16 +1015,16 @@ static void test_itemfrompoint(void) ok( id == 1, "item id wrong\n");
r = SendMessageA(hList, LB_ITEMFROMPOINT, 0, MAKELPARAM( /* x */ 30, /* y */ 30 )); - ok( r == 0x1, "ret %x\n", r ); + ok( r == 0x1, "ret %lx\n", r );
r = SendMessageA(hList, LB_ITEMFROMPOINT, 0, MAKELPARAM( /* x */ 30, /* y */ 601 )); - ok( r == MAKELPARAM(1, 1), "Unexpected ret value %#x.\n", r ); + ok( r == MAKELPARAM(1, 1), "Unexpected ret value %#lx.\n", r );
/* Resize control so that below assertions about sizes are valid */ r = SendMessageA( hList, LB_GETITEMRECT, 0, (LPARAM)&rc); - ok( r == 1, "ret %x\n", r); + ok( r == 1, "ret %lx\n", r); r = MoveWindow(hList, 1, 1, 600, (rc.bottom - rc.top + 1) * 9 / 2, TRUE); - ok( r != 0, "ret %x\n", r); + ok( r != 0, "ret %lx\n", r);
id = SendMessageA( hList, LB_ADDSTRING, 0, (LPARAM) "hi2"); ok( id == 2, "item id wrong\n"); @@ -1044,27 +1044,27 @@ static void test_itemfrompoint(void)
SendMessageA( hList, LB_SETTOPINDEX, 1, 0); r = SendMessageA( hList, LB_GETTOPINDEX, 0, 0); - ok( r == 1, "top %d\n", r); + ok( r == 1, "top %ld\n", r);
r = SendMessageA( hList, LB_GETITEMRECT, 5, (LPARAM)&rc); - ok( r == 1, "ret %x\n", r); + ok( r == 1, "ret %lx\n", r); r = SendMessageA( hList, LB_GETITEMRECT, 6, (LPARAM)&rc); - ok( r == 0, "ret %x\n", r); + ok( r == 0, "ret %lx\n", r);
r = SendMessageA( hList, LB_ITEMFROMPOINT, 0, MAKELPARAM(/* x */ 10, /* y */ 10) ); - ok( r == 1, "ret %x\n", r); + ok( r == 1, "ret %lx\n", r);
r = SendMessageA( hList, LB_ITEMFROMPOINT, 0, MAKELPARAM(1000, 10) ); - ok( r == 0x10001, "ret %x\n", r ); + ok( r == 0x10001, "ret %lx\n", r );
r = SendMessageA( hList, LB_ITEMFROMPOINT, 0, MAKELPARAM(10, -10) ); - ok( r == 0x10001, "ret %x\n", r ); + ok( r == 0x10001, "ret %lx\n", r );
r = SendMessageA( hList, LB_ITEMFROMPOINT, 0, MAKELPARAM(10, 100) ); - ok( r == 0x10005, "item %x\n", r ); + ok( r == 0x10005, "item %lx\n", r );
r = SendMessageA( hList, LB_ITEMFROMPOINT, 0, MAKELPARAM(10, 200) ); - ok( r == 0x10005, "item %x\n", r ); + ok( r == 0x10005, "item %lx\n", r );
DestroyWindow( hList ); } @@ -1117,7 +1117,7 @@ static void test_listbox_LB_DIR(void) ok(ret, "Failed to create test directory.\n");
file = CreateFileA( "wtest1.tmp.c", GENERIC_READ|GENERIC_WRITE, 0, NULL, CREATE_NEW, FILE_ATTRIBUTE_NORMAL, NULL ); - ok(file != INVALID_HANDLE_VALUE, "Error creating the test file: %d\n", GetLastError()); + ok(file != INVALID_HANDLE_VALUE, "Error creating the test file: %ld\n", GetLastError()); CloseHandle( file );
/* NOTE: for this test to succeed, there must be no subdirectories @@ -1141,7 +1141,7 @@ static void test_listbox_LB_DIR(void) strcpy(pathBuffer, wildcard); res = SendMessageA(hList, LB_DIR, 0, (LPARAM)pathBuffer); } - ok (res >= 0, "SendMessage(LB_DIR, 0, *) failed - 0x%08x\n", GetLastError()); + ok (res >= 0, "SendMessage(LB_DIR, 0, *) failed - 0x%08lx\n", GetLastError());
/* There should be some content in the listbox */ itemCount = SendMessageA(hList, LB_GETCOUNT, 0, 0); @@ -1168,7 +1168,7 @@ static void test_listbox_LB_DIR(void) strcpy(pathBuffer, "w*.c"); SendMessageA(hList, LB_RESETCONTENT, 0, 0); res = SendMessageA(hList, LB_DIR, 0, (LPARAM)pathBuffer); - ok (res >= 0, "SendMessage(LB_DIR, 0, w*.c) failed - 0x%08x\n", GetLastError()); + ok (res >= 0, "SendMessage(LB_DIR, 0, w*.c) failed - 0x%08lx\n", GetLastError());
/* Path specification does NOT converted to uppercase */ ok (!strcmp(pathBuffer, "w*.c"), @@ -1197,7 +1197,7 @@ static void test_listbox_LB_DIR(void) strcpy(pathBuffer, wildcard); SendMessageA(hList, LB_RESETCONTENT, 0, 0); res = SendMessageA(hList, LB_DIR, DDL_DIRECTORY, (LPARAM)pathBuffer); - ok (res > 0, "SendMessage(LB_DIR, DDL_DIRECTORY, *) failed - 0x%08x\n", GetLastError()); + ok (res > 0, "SendMessage(LB_DIR, DDL_DIRECTORY, *) failed - 0x%08lx\n", GetLastError());
/* There should be some content in the listbox. * All files plus "[..]" @@ -1225,7 +1225,7 @@ static void test_listbox_LB_DIR(void) strcpy(pathBuffer, "w*.c"); SendMessageA(hList, LB_RESETCONTENT, 0, 0); res = SendMessageA(hList, LB_DIR, DDL_DIRECTORY, (LPARAM)pathBuffer); - ok (res >= 0, "SendMessage(LB_DIR, DDL_DIRECTORY, w*.c) failed - 0x%08x\n", GetLastError()); + ok (res >= 0, "SendMessage(LB_DIR, DDL_DIRECTORY, w*.c) failed - 0x%08lx\n", GetLastError());
/* There should be some content in the listbox. Since the parent directory does not * fit w*.c, there should be exactly the same number of items as without DDL_DIRECTORY @@ -1254,7 +1254,7 @@ static void test_listbox_LB_DIR(void) strcpy(pathBuffer, wildcard); SendMessageA(hList, LB_RESETCONTENT, 0, 0); res = SendMessageA(hList, LB_DIR, DDL_DRIVES|DDL_EXCLUSIVE, (LPARAM)pathBuffer); - ok (res >= 0, "SendMessage(LB_DIR, DDL_DRIVES|DDL_EXCLUSIVE, *) failed - 0x%08x\n", GetLastError()); + ok (res >= 0, "SendMessage(LB_DIR, DDL_DRIVES|DDL_EXCLUSIVE, *) failed - 0x%08lx\n", GetLastError());
/* There should be some content in the listbox. In particular, there should * be at least one element before, since the string "[-c-]" should @@ -1299,7 +1299,7 @@ static void test_listbox_LB_DIR(void) strcpy(pathBuffer, wildcard); SendMessageA(hList, LB_RESETCONTENT, 0, 0); res = SendMessageA(hList, LB_DIR, DDL_DRIVES, (LPARAM)pathBuffer); - ok (res > 0, "SendMessage(LB_DIR, DDL_DRIVES, *) failed - 0x%08x\n", GetLastError()); + ok (res > 0, "SendMessage(LB_DIR, DDL_DRIVES, *) failed - 0x%08lx\n", GetLastError());
/* There should be some content in the listbox. In particular, there should * be at least one element before, since the string "[-c-]" should @@ -1326,7 +1326,7 @@ static void test_listbox_LB_DIR(void) strcpy(pathBuffer, "w*.c"); SendMessageA(hList, LB_RESETCONTENT, 0, 0); res = SendMessageA(hList, LB_DIR, DDL_DRIVES, (LPARAM)pathBuffer); - ok (res > 0, "SendMessage(LB_DIR, DDL_DRIVES, w*.c) failed - 0x%08x\n", GetLastError()); + ok (res > 0, "SendMessage(LB_DIR, DDL_DRIVES, w*.c) failed - 0x%08lx\n", GetLastError());
/* There should be some content in the listbox. In particular, there should * be at least one element before, since the string "[-c-]" should @@ -1364,7 +1364,7 @@ static void test_listbox_LB_DIR(void) strcpy(pathBuffer, wildcard); SendMessageA(hList, LB_RESETCONTENT, 0, 0); res = SendMessageA(hList, LB_DIR, DDL_DIRECTORY|DDL_DRIVES, (LPARAM)pathBuffer); - ok (res > 0, "SendMessage(LB_DIR, DDL_DIRECTORY|DDL_DRIVES, *) failed - 0x%08x\n", GetLastError()); + ok (res > 0, "SendMessage(LB_DIR, DDL_DIRECTORY|DDL_DRIVES, *) failed - 0x%08lx\n", GetLastError());
/* There should be some content in the listbox. In particular, there should * be exactly the number of plain files, plus the number of mapped drives. @@ -1402,7 +1402,7 @@ static void test_listbox_LB_DIR(void) strcpy(pathBuffer, "w*.c"); SendMessageA(hList, LB_RESETCONTENT, 0, 0); res = SendMessageA(hList, LB_DIR, DDL_DIRECTORY|DDL_DRIVES, (LPARAM)pathBuffer); - ok (res > 0, "SendMessage(LB_DIR, DDL_DIRECTORY|DDL_DRIVES, w*.c) failed - 0x%08x\n", GetLastError()); + ok (res > 0, "SendMessage(LB_DIR, DDL_DIRECTORY|DDL_DRIVES, w*.c) failed - 0x%08lx\n", GetLastError());
/* There should be some content in the listbox. In particular, there should * be exactly the number of plain files, plus the number of mapped drives. @@ -1436,7 +1436,7 @@ static void test_listbox_LB_DIR(void) strcpy(pathBuffer, wildcard); SendMessageA(hList, LB_RESETCONTENT, 0, 0); res = SendMessageA(hList, LB_DIR, DDL_DIRECTORY|DDL_EXCLUSIVE, (LPARAM)pathBuffer); - ok (res != -1, "SendMessage(LB_DIR, DDL_DIRECTORY|DDL_EXCLUSIVE, *) failed err %u\n", + ok (res != -1, "SendMessage(LB_DIR, DDL_DIRECTORY|DDL_EXCLUSIVE, *) failed err %lu\n", GetLastError());
itemCount = SendMessageA(hList, LB_GETCOUNT, 0, 0); @@ -1479,7 +1479,7 @@ static void test_listbox_LB_DIR(void) strcpy(pathBuffer, wildcard); SendMessageA(hList, LB_RESETCONTENT, 0, 0); res = SendMessageA(hList, LB_DIR, DDL_DIRECTORY|DDL_DRIVES|DDL_EXCLUSIVE, (LPARAM)pathBuffer); - ok (res > 0, "SendMessage(LB_DIR, DDL_DIRECTORY|DDL_DRIVES|DDL_EXCLUSIVE, w*.c,) failed - 0x%08x\n", GetLastError()); + ok (res > 0, "SendMessage(LB_DIR, DDL_DIRECTORY|DDL_DRIVES|DDL_EXCLUSIVE, w*.c,) failed - 0x%08lx\n", GetLastError());
/* There should be no plain files on the listbox */ itemCount = SendMessageA(hList, LB_GETCOUNT, 0, 0); @@ -1514,7 +1514,7 @@ static void test_listbox_LB_DIR(void) strcpy(pathBuffer, "w*.c"); SendMessageA(hList, LB_RESETCONTENT, 0, 0); res = SendMessageA(hList, LB_DIR, DDL_DIRECTORY|DDL_DRIVES|DDL_EXCLUSIVE, (LPARAM)pathBuffer); - ok (res >= 0, "SendMessage(LB_DIR, DDL_DIRECTORY|DDL_DRIVES|DDL_EXCLUSIVE, w*.c,) failed - 0x%08x\n", GetLastError()); + ok (res >= 0, "SendMessage(LB_DIR, DDL_DIRECTORY|DDL_DRIVES|DDL_EXCLUSIVE, w*.c,) failed - 0x%08lx\n", GetLastError());
/* There should be no plain files on the listbox, and no [..], since it does not fit w*.c */ itemCount = SendMessageA(hList, LB_GETCOUNT, 0, 0); @@ -1615,7 +1615,7 @@ static void test_listbox_dlgdir(void) BOOL ret;
file = CreateFileA( "wtest1.tmp.c", GENERIC_READ|GENERIC_WRITE, 0, NULL, CREATE_NEW, FILE_ATTRIBUTE_NORMAL, NULL ); - ok(file != INVALID_HANDLE_VALUE, "Error creating the test file: %d\n", GetLastError()); + ok(file != INVALID_HANDLE_VALUE, "Error creating the test file: %ld\n", GetLastError()); CloseHandle( file );
/* NOTE: for this test to succeed, there must be no subdirectories @@ -1644,7 +1644,7 @@ static void test_listbox_dlgdir(void) */ strcpy(pathBuffer, "w*.c"); res = DlgDirListA(hWnd, pathBuffer, ID_TEST_LISTBOX, ID_TEST_LABEL, 0); - ok (res == 1, "DlgDirList(*.c, 0) returned %d - expected 1 - 0x%08x\n", res, GetLastError()); + ok (res == 1, "DlgDirList(*.c, 0) returned %d - expected 1 - 0x%08lx\n", res, GetLastError());
/* Path specification gets converted to uppercase */ ok (!strcmp(pathBuffer, "W*.C"), @@ -1681,7 +1681,7 @@ static void test_listbox_dlgdir(void) /* Test DDL_DIRECTORY */ strcpy(pathBuffer, "w*.c"); res = DlgDirListA(hWnd, pathBuffer, ID_TEST_LISTBOX, ID_TEST_LABEL, DDL_DIRECTORY); - ok (res == 1, "DlgDirList(*.c, DDL_DIRECTORY) failed - 0x%08x\n", GetLastError()); + ok (res == 1, "DlgDirList(*.c, DDL_DIRECTORY) failed - 0x%08lx\n", GetLastError());
/* There should be some content in the listbox. In particular, there should * be exactly more elements than before, since the directories should @@ -1725,7 +1725,7 @@ static void test_listbox_dlgdir(void) /* Test DDL_DRIVES. At least on WinXP-SP2, this implies DDL_EXCLUSIVE */ strcpy(pathBuffer, "w*.c"); res = DlgDirListA(hWnd, pathBuffer, ID_TEST_LISTBOX, ID_TEST_LABEL, DDL_DRIVES); - ok (res == 1, "DlgDirList(*.c, DDL_DRIVES) failed - 0x%08x\n", GetLastError()); + ok (res == 1, "DlgDirList(*.c, DDL_DRIVES) failed - 0x%08lx\n", GetLastError());
/* There should be some content in the listbox. In particular, there should * be at least one element before, since the string "[-c-]" should @@ -1765,7 +1765,7 @@ static void test_listbox_dlgdir(void) /* Test DDL_DIRECTORY|DDL_DRIVES. This does *not* imply DDL_EXCLUSIVE */ strcpy(pathBuffer, "w*.c"); res = DlgDirListA(hWnd, pathBuffer, ID_TEST_LISTBOX, ID_TEST_LABEL, DDL_DIRECTORY|DDL_DRIVES); - ok (res == 1, "DlgDirList(*.c, DDL_DIRECTORY|DDL_DRIVES) failed - 0x%08x\n", GetLastError()); + ok (res == 1, "DlgDirList(*.c, DDL_DIRECTORY|DDL_DRIVES) failed - 0x%08lx\n", GetLastError());
/* There should be some content in the listbox. In particular, there should * be exactly the number of plain files, plus the number of mapped drives, @@ -1808,7 +1808,7 @@ static void test_listbox_dlgdir(void) /* Test DDL_DIRECTORY|DDL_EXCLUSIVE. */ strcpy(pathBuffer, "w*.c"); res = DlgDirListA(hWnd, pathBuffer, ID_TEST_LISTBOX, ID_TEST_LABEL, DDL_DIRECTORY|DDL_EXCLUSIVE); - ok (res == 1, "DlgDirList(*.c, DDL_DIRECTORY|DDL_EXCLUSIVE) failed - 0x%08x\n", GetLastError()); + ok (res == 1, "DlgDirList(*.c, DDL_DIRECTORY|DDL_EXCLUSIVE) failed - 0x%08lx\n", GetLastError());
/* There should be exactly one element: "[..]" */ itemCount = SendMessageA(g_listBox, LB_GETCOUNT, 0, 0); @@ -1834,7 +1834,7 @@ static void test_listbox_dlgdir(void) /* Test DDL_DIRECTORY|DDL_DRIVES|DDL_EXCLUSIVE. */ strcpy(pathBuffer, "w*.c"); res = DlgDirListA(hWnd, pathBuffer, ID_TEST_LISTBOX, ID_TEST_LABEL, DDL_DIRECTORY|DDL_DRIVES|DDL_EXCLUSIVE); - ok (res == 1, "DlgDirList(*.c, DDL_DIRECTORY|DDL_DRIVES|DDL_EXCLUSIVE) failed - 0x%08x\n", GetLastError()); + ok (res == 1, "DlgDirList(*.c, DDL_DIRECTORY|DDL_DRIVES|DDL_EXCLUSIVE) failed - 0x%08lx\n", GetLastError());
/* There should be no plain files on the listbox */ itemCount = SendMessageA(g_listBox, LB_GETCOUNT, 0, 0); @@ -1866,14 +1866,14 @@ static void test_listbox_dlgdir(void) /* Fill with everything - drives, directory and all plain files. */ strcpy(pathBuffer, "*"); res = DlgDirListA(hWnd, pathBuffer, ID_TEST_LISTBOX, ID_TEST_LABEL, DDL_DIRECTORY|DDL_DRIVES); - ok (res != 0, "DlgDirList(*, DDL_DIRECTORY|DDL_DRIVES) failed - 0x%08x\n", GetLastError()); + ok (res != 0, "DlgDirList(*, DDL_DIRECTORY|DDL_DRIVES) failed - 0x%08lx\n", GetLastError());
SendMessageA(g_listBox, LB_SETCURSEL, -1, 0); /* Unselect any current selection */ memset(pathBuffer, 0, MAX_PATH); SetLastError(0xdeadbeef); res = DlgDirSelectExA(hWnd, pathBuffer, MAX_PATH, ID_TEST_LISTBOX); ok (GetLastError() == 0xdeadbeef, - "DlgDirSelectEx() with no selection modified last error code from 0xdeadbeef to 0x%08x\n", + "DlgDirSelectEx() with no selection modified last error code from 0xdeadbeef to 0x%08lx\n", GetLastError()); ok (res == 0, "DlgDirSelectEx() with no selection returned %d, expected 0\n", res); /* WinXP-SP2 leaves pathBuffer untouched, but Win98 fills it with garbage. */ @@ -1897,7 +1897,7 @@ static void test_listbox_dlgdir(void) SetLastError(0xdeadbeef); res = DlgDirSelectExA(hWnd, pathBuffer, MAX_PATH, ID_TEST_LISTBOX); ok (GetLastError() == 0xdeadbeef, - "DlgDirSelectEx() with selection at %d modified last error code from 0xdeadbeef to 0x%08x\n", + "DlgDirSelectEx() with selection at %d modified last error code from 0xdeadbeef to 0x%08lx\n", i, GetLastError()); ok(res == 1, "DlgDirSelectEx() thinks %s (%s) is not a drive/directory!\n", itemBuffer, pathBuffer);
@@ -1911,7 +1911,7 @@ static void test_listbox_dlgdir(void) SetLastError(0xdeadbeef); res = DlgDirSelectExA(hWnd, pathBuffer, MAX_PATH, ID_TEST_LISTBOX); ok (GetLastError() == 0xdeadbeef, - "DlgDirSelectEx() with selection at %d modified last error code from 0xdeadbeef to 0x%08x\n", + "DlgDirSelectEx() with selection at %d modified last error code from 0xdeadbeef to 0x%08lx\n", i, GetLastError()); ok(res == 1, "DlgDirSelectEx() thinks %s (%s) is not a drive/directory!\n", itemBuffer, pathBuffer);
@@ -1930,7 +1930,7 @@ static void test_listbox_dlgdir(void) SetLastError(0xdeadbeef); res = DlgDirSelectExA(hWnd, pathBuffer, MAX_PATH, ID_TEST_LISTBOX); ok (GetLastError() == 0xdeadbeef, - "DlgDirSelectEx() with selection at %d modified last error code from 0xdeadbeef to 0x%08x\n", + "DlgDirSelectEx() with selection at %d modified last error code from 0xdeadbeef to 0x%08lx\n", i, GetLastError()); ok(res == 0, "DlgDirSelectEx() thinks %s (%s) is a drive/directory!\n", itemBuffer, pathBuffer);
@@ -1966,7 +1966,7 @@ static void test_listbox_dlgdir(void) SetLastError(0xdeadbeef); res = DlgDirSelectExA(hWnd, pathBuffer, MAX_PATH, ID_TEST_LISTBOX); ok (GetLastError() == 0xdeadbeef, - "DlgDirSelectEx() with selection at %d modified last error code from 0xdeadbeef to 0x%08x\n", + "DlgDirSelectEx() with selection at %d modified last error code from 0xdeadbeef to 0x%08lx\n", i, GetLastError()); ok(res == 1, "DlgDirSelectEx() thinks %s (%s) is not a drive/directory!\n", itemBuffer, pathBuffer);
@@ -1980,7 +1980,7 @@ static void test_listbox_dlgdir(void) SetLastError(0xdeadbeef); res = DlgDirSelectExA(hWnd, pathBuffer, MAX_PATH, ID_TEST_LISTBOX); ok (GetLastError() == 0xdeadbeef, - "DlgDirSelectEx() with selection at %d modified last error code from 0xdeadbeef to 0x%08x\n", + "DlgDirSelectEx() with selection at %d modified last error code from 0xdeadbeef to 0x%08lx\n", i, GetLastError()); ok(res == 1, "DlgDirSelectEx() thinks %s (%s) is not a drive/directory!\n", itemBuffer, pathBuffer);
@@ -1999,7 +1999,7 @@ static void test_listbox_dlgdir(void) SetLastError(0xdeadbeef); res = DlgDirSelectExA(hWnd, pathBuffer, MAX_PATH, ID_TEST_LISTBOX); ok (GetLastError() == 0xdeadbeef, - "DlgDirSelectEx() with selection at %d modified last error code from 0xdeadbeef to 0x%08x\n", + "DlgDirSelectEx() with selection at %d modified last error code from 0xdeadbeef to 0x%08lx\n", i, GetLastError()); ok(res == 0, "DlgDirSelectEx() thinks %s (%s) is a drive/directory!\n", itemBuffer, pathBuffer);
@@ -2029,7 +2029,7 @@ static void test_listbox_dlgdir(void) res = DlgDirListA(hWnd, pathBuffer, ID_TEST_LISTBOX, 0, DDL_DIRECTORY | DDL_EXCLUSIVE); ok(!res, "DlgDirList should have failed with 0 but %d was returned\n", res); ok(GetLastError() == ERROR_NO_WILDCARD_CHARACTERS, - "GetLastError should return 0x589, got 0x%X\n",GetLastError()); + "GetLastError should return 0x589, got 0x%lX\n",GetLastError());
DestroyWindow(hWnd); } @@ -2054,9 +2054,9 @@ static void test_set_count( void ) ok( IsRectEmpty( &r ), "got non-empty rect\n");
ret = SendMessageA( listbox, LB_SETCOUNT, 100, 0 ); - ok( ret == 0, "got %d\n", ret ); + ok( ret == 0, "got %ld\n", ret ); ret = SendMessageA( listbox, LB_GETCOUNT, 0, 0 ); - ok( ret == 100, "got %d\n", ret ); + ok( ret == 100, "got %ld\n", ret );
GetUpdateRect( listbox, &r, TRUE ); ok( !IsRectEmpty( &r ), "got empty rect\n"); @@ -2066,15 +2066,15 @@ static void test_set_count( void ) ok( IsRectEmpty( &r ), "got non-empty rect\n");
ret = SendMessageA( listbox, LB_SETCOUNT, 99, 0 ); - ok( ret == 0, "got %d\n", ret ); + ok( ret == 0, "got %ld\n", ret );
GetUpdateRect( listbox, &r, TRUE ); ok( !IsRectEmpty( &r ), "got empty rect\n");
ret = SendMessageA( listbox, LB_SETCOUNT, -5, 0 ); - ok( ret == 0, "got %d\n", ret ); + ok( ret == 0, "got %ld\n", ret ); ret = SendMessageA( listbox, LB_GETCOUNT, 0, 0 ); - ok( ret == -5, "got %d\n", ret ); + ok( ret == -5, "got %ld\n", ret );
DestroyWindow( listbox );
@@ -2084,8 +2084,8 @@ static void test_set_count( void )
SetLastError( 0xdeadbeef ); ret = SendMessageA( listbox, LB_SETCOUNT, 100, 0 ); - ok( ret == LB_ERR, "expected %d, got %d\n", LB_ERR, ret ); - ok( GetLastError() == 0xdeadbeef, "Unexpected error %d.\n", GetLastError() ); + ok( ret == LB_ERR, "expected %d, got %ld\n", LB_ERR, ret ); + ok( GetLastError() == 0xdeadbeef, "Unexpected error %ld.\n", GetLastError() );
DestroyWindow( listbox ); } @@ -2108,7 +2108,7 @@ static void test_GetListBoxInfo(void)
flush_sequences(sequences, NUM_MSG_SEQUENCES); ret = GetListBoxInfo(listbox); - ok(ret > 0, "got %d\n", ret); + ok(ret > 0, "got %ld\n", ret); ok_sequence(sequences, LB_SEQ_INDEX, getlistboxinfo_seq, "GetListBoxInfo()", FALSE);
DestroyWindow(listbox); @@ -2133,45 +2133,45 @@ static void test_init_storage( void ) 0, 0, 100, 100, parent, (HMENU)ID_LISTBOX, NULL, 0);
items_size = SendMessageA(listbox, LB_INITSTORAGE, 100, 0); - ok(items_size >= 100, "expected at least 100, got %d\n", items_size); + ok(items_size >= 100, "expected at least 100, got %ld\n", items_size);
ret = SendMessageA(listbox, LB_INITSTORAGE, 0, 0); - ok(ret == items_size, "expected %d, got %d\n", items_size, ret); + ok(ret == items_size, "expected %ld, got %ld\n", items_size, ret);
/* it doesn't grow since the space was already reserved */ ret = SendMessageA(listbox, LB_INITSTORAGE, items_size, 0); - ok(ret == items_size, "expected %d, got %d\n", items_size, ret); + ok(ret == items_size, "expected %ld, got %ld\n", items_size, ret);
/* it doesn't shrink the reserved space */ ret = SendMessageA(listbox, LB_INITSTORAGE, 42, 0); - ok(ret == items_size, "expected %d, got %d\n", items_size, ret); + ok(ret == items_size, "expected %ld, got %ld\n", items_size, ret);
/* now populate almost all of it so it's not reserved anymore */ if (styles[i] & LBS_NODATA) { ret = SendMessageA(listbox, LB_SETCOUNT, items_size - 1, 0); - ok(ret == 0, "unexpected return value %d\n", ret); + ok(ret == 0, "unexpected return value %ld\n", ret); } else { for (j = 0; j < items_size - 1; j++) { ret = SendMessageA(listbox, LB_INSERTSTRING, -1, (LPARAM)""); - ok(ret == j, "expected %d, got %d\n", j, ret); + ok(ret == j, "expected %d, got %ld\n", j, ret); } }
/* we still have one more reserved slot, so it doesn't grow yet */ ret = SendMessageA(listbox, LB_INITSTORAGE, 1, 0); - ok(ret == items_size, "expected %d, got %d\n", items_size, ret); + ok(ret == items_size, "expected %ld, got %ld\n", items_size, ret);
/* fill the slot and check again, it should grow this time */ ret = SendMessageA(listbox, LB_INSERTSTRING, -1, (LPARAM)""); - ok(ret == items_size - 1, "expected %d, got %d\n", items_size - 1, ret); + ok(ret == items_size - 1, "expected %ld, got %ld\n", items_size - 1, ret); ret = SendMessageA(listbox, LB_INITSTORAGE, 0, 0); - ok(ret == items_size, "expected %d, got %d\n", items_size, ret); + ok(ret == items_size, "expected %ld, got %ld\n", items_size, ret); ret = SendMessageA(listbox, LB_INITSTORAGE, 1, 0); - ok(ret > items_size, "expected it to grow past %d, got %d\n", items_size, ret); + ok(ret > items_size, "expected it to grow past %ld, got %ld\n", items_size, ret);
DestroyWindow(listbox); } @@ -2213,7 +2213,7 @@ static void test_extents(void) listbox = create_listbox(WS_CHILD | WS_VISIBLE, parent);
res = SendMessageA(listbox, LB_GETHORIZONTALEXTENT, 0, 0); - ok(res == 0, "Got wrong initial horizontal extent: %u\n", res); + ok(res == 0, "Got wrong initial horizontal extent: %lu\n", res);
sinfo.cbSize = sizeof(sinfo); sinfo.fMask = SIF_RANGE; @@ -2228,7 +2228,7 @@ static void test_extents(void) SendMessageA(listbox, LB_SETHORIZONTALEXTENT, 64, 0);
res = SendMessageA(listbox, LB_GETHORIZONTALEXTENT, 0, 0); - ok(res == 64, "Got wrong horizontal extent: %u\n", res); + ok(res == 64, "Got wrong horizontal extent: %lu\n", res);
sinfo.cbSize = sizeof(sinfo); sinfo.fMask = SIF_RANGE; @@ -2243,7 +2243,7 @@ static void test_extents(void) SendMessageA(listbox, LB_SETHORIZONTALEXTENT, 184, 0);
res = SendMessageA(listbox, LB_GETHORIZONTALEXTENT, 0, 0); - ok(res == 184, "Got wrong horizontal extent: %u\n", res); + ok(res == 184, "Got wrong horizontal extent: %lu\n", res);
sinfo.cbSize = sizeof(sinfo); sinfo.fMask = SIF_RANGE; @@ -2259,7 +2259,7 @@ static void test_extents(void) listbox = create_listbox(WS_CHILD | WS_VISIBLE | WS_HSCROLL, parent);
res = SendMessageA(listbox, LB_GETHORIZONTALEXTENT, 0, 0); - ok(res == 0, "Got wrong initial horizontal extent: %u\n", res); + ok(res == 0, "Got wrong initial horizontal extent: %lu\n", res);
sinfo.cbSize = sizeof(sinfo); sinfo.fMask = SIF_RANGE; @@ -2274,7 +2274,7 @@ static void test_extents(void) SendMessageA(listbox, LB_SETHORIZONTALEXTENT, 64, 0);
res = SendMessageA(listbox, LB_GETHORIZONTALEXTENT, 0, 0); - ok(res == 64, "Got wrong horizontal extent: %u\n", res); + ok(res == 64, "Got wrong horizontal extent: %lu\n", res);
sinfo.cbSize = sizeof(sinfo); sinfo.fMask = SIF_RANGE; @@ -2289,7 +2289,7 @@ static void test_extents(void) SendMessageA(listbox, LB_SETHORIZONTALEXTENT, 184, 0);
res = SendMessageA(listbox, LB_GETHORIZONTALEXTENT, 0, 0); - ok(res == 184, "Got wrong horizontal extent: %u\n", res); + ok(res == 184, "Got wrong horizontal extent: %lu\n", res);
sinfo.cbSize = sizeof(sinfo); sinfo.fMask = SIF_RANGE; @@ -2303,7 +2303,7 @@ static void test_extents(void) SendMessageA(listbox, LB_SETHORIZONTALEXTENT, 0, 0);
res = SendMessageA(listbox, LB_GETHORIZONTALEXTENT, 0, 0); - ok(res == 0, "Got wrong horizontal extent: %u\n", res); + ok(res == 0, "Got wrong horizontal extent: %lu\n", res);
sinfo.cbSize = sizeof(sinfo); sinfo.fMask = SIF_RANGE; @@ -2320,7 +2320,7 @@ static void test_extents(void) listbox = create_listbox(WS_CHILD | WS_VISIBLE | WS_HSCROLL | LBS_DISABLENOSCROLL, parent);
res = SendMessageA(listbox, LB_GETHORIZONTALEXTENT, 0, 0); - ok(res == 0, "Got wrong initial horizontal extent: %u\n", res); + ok(res == 0, "Got wrong initial horizontal extent: %lu\n", res);
sinfo.cbSize = sizeof(sinfo); sinfo.fMask = SIF_RANGE; @@ -2335,7 +2335,7 @@ static void test_extents(void) SendMessageA(listbox, LB_SETHORIZONTALEXTENT, 64, 0);
res = SendMessageA(listbox, LB_GETHORIZONTALEXTENT, 0, 0); - ok(res == 64, "Got wrong horizontal extent: %u\n", res); + ok(res == 64, "Got wrong horizontal extent: %lu\n", res);
sinfo.cbSize = sizeof(sinfo); sinfo.fMask = SIF_RANGE; @@ -2350,7 +2350,7 @@ static void test_extents(void) SendMessageA(listbox, LB_SETHORIZONTALEXTENT, 184, 0);
res = SendMessageA(listbox, LB_GETHORIZONTALEXTENT, 0, 0); - ok(res == 184, "Got wrong horizontal extent: %u\n", res); + ok(res == 184, "Got wrong horizontal extent: %lu\n", res);
sinfo.cbSize = sizeof(sinfo); sinfo.fMask = SIF_RANGE; @@ -2364,7 +2364,7 @@ static void test_extents(void) SendMessageA(listbox, LB_SETHORIZONTALEXTENT, 0, 0);
res = SendMessageA(listbox, LB_GETHORIZONTALEXTENT, 0, 0); - ok(res == 0, "Got wrong horizontal extent: %u\n", res); + ok(res == 0, "Got wrong horizontal extent: %lu\n", res);
sinfo.cbSize = sizeof(sinfo); sinfo.fMask = SIF_RANGE; @@ -2484,14 +2484,14 @@ static void test_WM_MEASUREITEM(void) listbox = create_listbox(WS_CHILD | LBS_OWNERDRAWVARIABLE, parent);
data = SendMessageA(listbox, LB_GETITEMDATA, 0, 0); - ok(data == (LRESULT)strings[0], "data = %08lx, expected %p\n", data, strings[0]); + ok(data == (LRESULT)strings[0], "data = %08Ix, expected %p\n", data, strings[0]); DestroyWindow(parent);
parent = create_parent(); listbox = create_listbox(WS_CHILD | LBS_OWNERDRAWVARIABLE | LBS_HASSTRINGS, parent);
data = SendMessageA(listbox, LB_GETITEMDATA, 0, 0); - ok(!data, "data = %08lx\n", data); + ok(!data, "data = %08Ix\n", data);
/* LBS_HASSTRINGS */ parent = create_parent(); @@ -2502,11 +2502,11 @@ static void test_WM_MEASUREITEM(void) flush_sequences(sequences, NUM_MSG_SEQUENCES);
ret = SendMessageA(listbox, LB_ADDSTRING, 0, (LPARAM)"item 0"); - ok(ret == 0, "expected 0, got %ld\n", ret); + ok(ret == 0, "expected 0, got %Id\n", ret); ret = SendMessageA(listbox, LB_ADDSTRING, 0, (LPARAM)"item 1"); - ok(ret == 1, "expected 1, got %ld\n", ret); + ok(ret == 1, "expected 1, got %Id\n", ret); ret = SendMessageA(listbox, LB_ADDSTRING, 0, (LPARAM)"item 2"); - ok(ret == 2, "expected 2, got %ld\n", ret); + ok(ret == 2, "expected 2, got %Id\n", ret);
ok_sequence(sequences, PARENT_SEQ_INDEX, lb_addstring_ownerdraw_parent_seq, "LB_ADDSTRING (LBS_HASSTRINGS, ownerdraw)", FALSE); @@ -2520,11 +2520,11 @@ static void test_WM_MEASUREITEM(void) flush_sequences(sequences, NUM_MSG_SEQUENCES);
ret = SendMessageA(listbox, LB_ADDSTRING, 0, (LPARAM)"item 0"); - ok(ret == 0, "expected 0, got %ld\n", ret); + ok(ret == 0, "expected 0, got %Id\n", ret); ret = SendMessageA(listbox, LB_ADDSTRING, 0, (LPARAM)"item 1"); - ok(ret == 1, "expected 1, got %ld\n", ret); + ok(ret == 1, "expected 1, got %Id\n", ret); ret = SendMessageA(listbox, LB_ADDSTRING, 0, (LPARAM)"item 2"); - ok(ret == 2, "expected 2, got %ld\n", ret); + ok(ret == 2, "expected 2, got %Id\n", ret);
ok_sequence(sequences, PARENT_SEQ_INDEX, lb_addstring_sort_parent_seq, "LB_ADDSTRING (LBS_SORT)", FALSE); DestroyWindow(listbox); @@ -2537,11 +2537,11 @@ static void test_WM_MEASUREITEM(void) flush_sequences(sequences, NUM_MSG_SEQUENCES);
ret = SendMessageA(listbox, LB_ADDSTRING, 0, (LPARAM)"item 2"); - ok(ret == 0, "expected 0, got %ld\n", ret); + ok(ret == 0, "expected 0, got %Id\n", ret); ret = SendMessageA(listbox, LB_ADDSTRING, 0, (LPARAM)"item 0"); - ok(ret == 1, "expected 1, got %ld\n", ret); + ok(ret == 1, "expected 1, got %Id\n", ret); ret = SendMessageA(listbox, LB_ADDSTRING, 0, (LPARAM)"item 1"); - ok(ret == 2, "expected 2, got %ld\n", ret); + ok(ret == 2, "expected 2, got %Id\n", ret);
ok_sequence(sequences, PARENT_SEQ_INDEX, empty_seq, "LB_ADDSTRING (LBS_HASSTRINGS)", FALSE); DestroyWindow(listbox); @@ -2554,11 +2554,11 @@ static void test_WM_MEASUREITEM(void) flush_sequences(sequences, NUM_MSG_SEQUENCES);
ret = SendMessageA(listbox, LB_ADDSTRING, 0, (LPARAM)"item 2"); - ok(ret == 0, "expected 0, got %ld\n", ret); + ok(ret == 0, "expected 0, got %Id\n", ret); ret = SendMessageA(listbox, LB_ADDSTRING, 0, (LPARAM)"item 0"); - ok(ret == 0, "expected 0, got %ld\n", ret); + ok(ret == 0, "expected 0, got %Id\n", ret); ret = SendMessageA(listbox, LB_ADDSTRING, 0, (LPARAM)"item 1"); - ok(ret == 1, "expected 1, got %ld\n", ret); + ok(ret == 1, "expected 1, got %Id\n", ret);
ok_sequence(sequences, PARENT_SEQ_INDEX, empty_seq, "LB_ADDSTRING (LBS_HASSTRINGS, LBS_SORT)", FALSE); DestroyWindow(listbox); @@ -2667,7 +2667,7 @@ static void test_LBS_NODATA(void) ok(listbox != NULL, "Failed to create a listbox.\n");
style = GetWindowLongA(listbox, GWL_STYLE); - ok((style & invalid_styles[i]) == invalid_styles[i], "%u: unexpected window styles %#x.\n", i, style); + ok((style & invalid_styles[i]) == invalid_styles[i], "%u: unexpected window styles %#lx.\n", i, style); ret = SendMessageA(listbox, LB_SETCOUNT, 100, 0); ok(ret == LB_ERR, "%u: unexpected return value %d.\n", i, ret); DestroyWindow(listbox); diff --git a/dlls/comctl32/tests/listview.c b/dlls/comctl32/tests/listview.c index e922d14d850..0b5b37f69fd 100644 --- a/dlls/comctl32/tests/listview.c +++ b/dlls/comctl32/tests/listview.c @@ -49,14 +49,14 @@ enum seq_index { #define expect(expected,got) expect_(__LINE__, expected, got) static inline void expect_(unsigned line, DWORD expected, DWORD got) { - ok_(__FILE__, line)(expected == got, "Expected %d, got %d\n", expected, got); + ok_(__FILE__, line)(expected == got, "Expected %ld, got %ld\n", expected, got); }
#define expect2(expected1, expected2, got1, got2) expect2_(__LINE__, expected1, expected2, got1, got2) static inline void expect2_(unsigned line, DWORD expected1, DWORD got1, DWORD expected2, DWORD got2) { ok_(__FILE__, line)(expected1 == got1 && expected2 == got2, - "expected (%d,%d), got (%d,%d)\n", + "expected (%ld,%ld), got (%ld,%ld)\n", expected1, expected2, got1, got2); }
@@ -702,7 +702,7 @@ static HWND create_listview_control(DWORD style) WS_CHILD | WS_BORDER | WS_VISIBLE | style, 0, 0, rect.right, rect.bottom, hwndparent, NULL, GetModuleHandleA(NULL), NULL); - ok(hwnd != NULL, "gle=%d\n", GetLastError()); + ok(hwnd != NULL, "gle=%ld\n", GetLastError());
if (!hwnd) return NULL;
@@ -725,7 +725,7 @@ static HWND create_listview_controlW(DWORD style, HWND parent) WS_CHILD | WS_BORDER | WS_VISIBLE | style, 0, 0, rect.right, rect.bottom, parent, NULL, GetModuleHandleW(NULL), NULL); - ok(hwnd != NULL, "gle=%d\n", GetLastError()); + ok(hwnd != NULL, "gle=%ld\n", GetLastError());
if (!hwnd) return NULL;
@@ -1094,7 +1094,7 @@ static void test_checkboxes(void)
/* Set the style again and check that doesn't change an item's state */ r = SendMessageA(hwnd, LVM_SETEXTENDEDLISTVIEWSTYLE, LVS_EX_CHECKBOXES, LVS_EX_CHECKBOXES); - ok(r == LVS_EX_CHECKBOXES, "ret %x\n", r); + ok(r == LVS_EX_CHECKBOXES, "ret %lx\n", r);
item.iItem = 3; item.mask = LVIF_STATE; @@ -1105,7 +1105,7 @@ static void test_checkboxes(void)
/* Unsetting the checkbox extended style doesn't change an item's state */ r = SendMessageA(hwnd, LVM_SETEXTENDEDLISTVIEWSTYLE, LVS_EX_CHECKBOXES, 0); - ok(r == LVS_EX_CHECKBOXES, "ret %x\n", r); + ok(r == LVS_EX_CHECKBOXES, "ret %lx\n", r);
item.iItem = 3; item.mask = LVIF_STATE; @@ -1241,7 +1241,7 @@ static void test_items(void) expect(1, r); ok(item.state & LVIS_SELECTED, "Expected LVIS_SELECTED\n"); r = SendMessageA(hwnd, LVM_DELETEITEM, 0, 0); - ok(r, "got %d\n", r); + ok(r, "got %ld\n", r);
/* LVIS_SELECTED with zero stateMask */ /* set */ @@ -1264,7 +1264,7 @@ static void test_items(void) expect(1, r); ok(item.state & LVIS_FOCUSED, "Expected LVIS_FOCUSED\n"); r = SendMessageA(hwnd, LVM_DELETEITEM, 0, 0); - ok(r, "got %d\n", r); + ok(r, "got %ld\n", r);
/* LVIS_CUT with LVIS_FOCUSED stateMask */ /* set */ @@ -1287,7 +1287,7 @@ static void test_items(void) expect(1, r); ok(item.state & LVIS_CUT, "Expected LVIS_CUT\n"); r = SendMessageA(hwnd, LVM_DELETEITEM, 0, 0); - ok(r, "got %d\n", r); + ok(r, "got %ld\n", r);
/* Insert an item with just a param */ memset (&item, 0xcc, sizeof (item)); @@ -1305,7 +1305,7 @@ static void test_items(void) item.iSubItem = 0; r = SendMessageA(hwnd, LVM_GETITEMA, 0, (LPARAM) &item); expect(1, r); - ok(item.lParam == lparamTest, "got lParam %lx, expected %lx\n", item.lParam, lparamTest); + ok(item.lParam == lparamTest, "got lParam %Ix, expected %Ix\n", item.lParam, lparamTest);
/* Set up a subitem */ memset (&item, 0xcc, sizeof (item)); @@ -1350,7 +1350,7 @@ static void test_items(void) item.iSubItem = 1; item.pszText = text; r = SendMessageA(hwnd, LVM_SETITEMA, 0, (LPARAM) &item); - ok(r == 1 || broken(r == 0) /* NT4 */, "ret %d\n", r); + ok(r == 1 || broken(r == 0) /* NT4 */, "ret %ld\n", r);
if (r == 1) { @@ -1372,7 +1372,7 @@ static void test_items(void) item.iSubItem = 1; r = SendMessageA(hwnd, LVM_GETITEMA, 0, (LPARAM) &item); expect(1, r); - ok(item.lParam == lparamTest, "got lParam %lx, expected %lx\n", item.lParam, lparamTest); + ok(item.lParam == lparamTest, "got lParam %Ix, expected %Ix\n", item.lParam, lparamTest);
/* Set up param on first subitem: no effect */ memset (&item, 0xcc, sizeof (item)); @@ -1390,7 +1390,7 @@ static void test_items(void) item.iSubItem = 1; r = SendMessageA(hwnd, LVM_GETITEMA, 0, (LPARAM) &item); expect(1, r); - ok(item.lParam == lparamTest, "got lParam %lx, expected %lx\n", item.lParam, lparamTest); + ok(item.lParam == lparamTest, "got lParam %Ix, expected %Ix\n", item.lParam, lparamTest);
/**** Some tests of state highlighting ****/ memset (&item, 0xcc, sizeof (item)); @@ -1473,7 +1473,7 @@ static void test_columns(void) ok(header == NULL, "got %p\n", header);
rc = SendMessageA(hwnd, LVM_GETCOLUMNORDERARRAY, 2, (LPARAM)&order); - ok(rc == 0, "got %d\n", rc); + ok(rc == 0, "got %ld\n", rc);
header = (HWND)SendMessageA(hwnd, LVM_GETHEADER, 0, 0); ok(header == NULL, "got %p\n", header); @@ -1485,20 +1485,20 @@ static void test_columns(void) ok(hwnd != NULL, "failed to create listview window\n");
rc = SendMessageA(hwnd, LVM_DELETECOLUMN, -1, 0); - ok(!rc, "got %d\n", rc); + ok(!rc, "got %ld\n", rc);
rc = SendMessageA(hwnd, LVM_DELETECOLUMN, 0, 0); - ok(!rc, "got %d\n", rc); + ok(!rc, "got %ld\n", rc);
/* Add a column with no mask */ memset(&column, 0xcc, sizeof(column)); column.mask = 0; rc = SendMessageA(hwnd, LVM_INSERTCOLUMNA, 0, (LPARAM)&column); - ok(rc == 0, "Inserting column with no mask failed with %d\n", rc); + ok(rc == 0, "Inserting column with no mask failed with %ld\n", rc);
/* Check its width */ rc = SendMessageA(hwnd, LVM_GETCOLUMNWIDTH, 0, 0); - ok(rc == 10, "Inserting column with no mask failed to set width to 10 with %d\n", rc); + ok(rc == 10, "Inserting column with no mask failed to set width to 10 with %ld\n", rc);
DestroyWindow(hwnd);
@@ -1774,7 +1774,7 @@ static void test_create(BOOL is_version_6)
SetRect(&rect, LVIR_BOUNDS, 1, -10, -10); r = SendMessageA(hList, LVM_GETSUBITEMRECT, -1, (LPARAM)&rect); - ok(r == 1, "Unexpected ret value %d.\n", r); + ok(r == 1, "Unexpected ret value %ld.\n", r); /* right value contains garbage, probably because header columns are not set up */ ok(rect.bottom >= 0, "Unexpected rectangle.\n");
@@ -1911,32 +1911,32 @@ static LRESULT WINAPI cd_wndproc(HWND hwnd, UINT message, WPARAM wParam, LPARAM case CDDS_ITEMPREPAINT: clr = GetBkColor(nmlvcd->nmcd.hdc); todo_wine_if(nmlvcd->iSubItem) - ok(clr == c0ffee, "Unexpected background color %#x.\n", clr); + ok(clr == c0ffee, "Unexpected background color %#lx.\n", clr); nmlvcd->clrTextBk = CLR_DEFAULT; nmlvcd->clrText = RGB(0, 255, 0); return CDRF_NOTIFYSUBITEMDRAW|CDRF_NOTIFYPOSTPAINT; case CDDS_ITEMPREPAINT | CDDS_SUBITEM: clr = GetBkColor(nmlvcd->nmcd.hdc); - ok(nmlvcd->clrTextBk == CLR_DEFAULT, "Unexpected text background %#x.\n", nmlvcd->clrTextBk); - ok(nmlvcd->clrText == RGB(0, 255, 0), "Unexpected text color %#x.\n", nmlvcd->clrText); + ok(nmlvcd->clrTextBk == CLR_DEFAULT, "Unexpected text background %#lx.\n", nmlvcd->clrTextBk); + ok(nmlvcd->clrText == RGB(0, 255, 0), "Unexpected text color %#lx.\n", nmlvcd->clrText); if (showsel_always && is_selected && nmlvcd->iSubItem) - ok(clr == GetSysColor(COLOR_3DFACE), "Unexpected background color %#x.\n", clr); + ok(clr == GetSysColor(COLOR_3DFACE), "Unexpected background color %#lx.\n", clr); else todo_wine_if(nmlvcd->iSubItem) - ok(clr == c0ffee, "clr=%.8x\n", clr); + ok(clr == c0ffee, "clr=%.8lx\n", clr); return CDRF_NOTIFYPOSTPAINT; case CDDS_ITEMPOSTPAINT | CDDS_SUBITEM: clr = GetBkColor(nmlvcd->nmcd.hdc); if (showsel_always && is_selected) - ok(clr == GetSysColor(COLOR_3DFACE), "Unexpected background color %#x.\n", clr); + ok(clr == GetSysColor(COLOR_3DFACE), "Unexpected background color %#lx.\n", clr); else { todo_wine - ok(clr == c0ffee, "Unexpected background color %#x.\n", clr); + ok(clr == c0ffee, "Unexpected background color %#lx.\n", clr); }
- ok(nmlvcd->clrTextBk == CLR_DEFAULT, "Unexpected text background color %#x.\n", nmlvcd->clrTextBk); - ok(nmlvcd->clrText == RGB(0, 255, 0), "got 0x%x\n", nmlvcd->clrText); + ok(nmlvcd->clrTextBk == CLR_DEFAULT, "Unexpected text background color %#lx.\n", nmlvcd->clrTextBk); + ok(nmlvcd->clrText == RGB(0, 255, 0), "got 0x%lx\n", nmlvcd->clrText); return CDRF_DODEFAULT; } return CDRF_DODEFAULT; @@ -2034,7 +2034,7 @@ static void test_icon_spacing(void) r = SendMessageA(hwnd, LVM_SETICONSPACING, 0, MAKELPARAM(20, 30)); ok(r == MAKELONG(w, h) || broken(r == MAKELONG(w, w)), /* win98 */ - "Expected %d, got %d\n", MAKELONG(w, h), r); + "Expected %ld, got %d\n", MAKELONG(w, h), r);
r = SendMessageA(hwnd, LVM_SETICONSPACING, 0, MAKELPARAM(25, 35)); expect(MAKELONG(20,30), r); @@ -2421,7 +2421,7 @@ static void test_multiselect(void) ok(r, "got %d\n", r);
selected_count = SendMessageA(hwnd, LVM_GETSELECTEDCOUNT, 0, 0); - ok(selected_count == 1, "expected 1, got %d\n", selected_count); + ok(selected_count == 1, "expected 1, got %ld\n", selected_count);
/* Set SHIFT key pressed */ GetKeyboardState(kstate); @@ -2438,7 +2438,7 @@ static void test_multiselect(void) selected_count = SendMessageA(hwnd, LVM_GETSELECTEDCOUNT, 0, 0);
ok((task.result == -1 ? item_count : task.result) == selected_count, - "Failed multiple selection %s. There should be %d selected items (is %d)\n", + "Failed multiple selection %s. There should be %ld selected items (is %ld)\n", task.descr, item_count, selected_count);
/* Set SHIFT key released */ @@ -2804,7 +2804,7 @@ static void test_subitem_rect(void) expect(250, rect.right);
r = SendMessageA(hwnd, LVM_SCROLL, 10, 0); - ok(r, "got %d\n", r); + ok(r, "got %ld\n", r);
SetRect(&rect, LVIR_BOUNDS, 1, 0, 0); r = SendMessageA(hwnd, LVM_GETSUBITEMRECT, 0, (LPARAM)&rect); @@ -3747,7 +3747,7 @@ static void test_hittest(void) r = SendMessageA(hwnd, LVM_GETITEMSPACING, TRUE, 0); vert = HIWORD(r); ok(bounds.bottom - bounds.top == vert, - "Vertical spacing inconsistent (%d != %d)\n", bounds.bottom - bounds.top, vert); + "Vertical spacing inconsistent (%ld != %d)\n", bounds.bottom - bounds.top, vert); r = SendMessageA(hwnd, LVM_GETITEMPOSITION, 0, (LPARAM)&pos); expect(TRUE, r);
@@ -3907,7 +3907,7 @@ static void test_getviewrect(void) item.iItem = 0; item.iSubItem = 0; r = SendMessageA(hwnd, LVM_INSERTITEMA, 0, (LPARAM)&item); - ok(!r, "got %d\n", r); + ok(!r, "got %ld\n", r);
r = SendMessageA(hwnd, LVM_SETCOLUMNWIDTH, 0, MAKELPARAM(100, 0)); expect(TRUE, r); @@ -3931,8 +3931,8 @@ static void test_getviewrect(void) expect(0, rect.left); expect(0, rect.top); /* precise value differs for 2k, XP and Vista */ - ok(rect.bottom > 0, "Expected positive bottom value, got %d\n", rect.bottom); - ok(rect.right > 0, "Expected positive right value, got %d\n", rect.right); + ok(rect.bottom > 0, "Expected positive bottom value, got %ld\n", rect.bottom); + ok(rect.right > 0, "Expected positive right value, got %ld\n", rect.right);
DestroyWindow(hwnd); } @@ -3970,7 +3970,7 @@ static void test_getitemposition(void)
SetRectEmpty(&rect); r = SendMessageA(header, HDM_GETITEMRECT, 0, (LPARAM)&rect); - ok(r, "got %d\n", r); + ok(r, "got %ld\n", r); /* some padding? */ expect(2, pt.x); /* offset by header height */ @@ -4005,7 +4005,7 @@ static void test_getitemrect(void) expect(0, rect.top); /* estimate it as width / height ratio */ todo_wine - ok((rect.right / rect.bottom) >= 5, "got right %d, bottom %d\n", rect.right, rect.bottom); + ok((rect.right / rect.bottom) >= 5, "got right %ld, bottom %ld\n", rect.right, rect.bottom); DestroyWindow(hwnd);
hwnd = create_listview_control(LVS_REPORT); @@ -4451,7 +4451,7 @@ static void test_notifyformat(void) r = SendMessageA(hwnd, LVM_SETUNICODEFORMAT, 1, 0); expect(0, r); r = SendMessageA(hwnd, LVM_GETUNICODEFORMAT, 0, 0); - ok(r == 1, "Unexpected return value %d.\n", r); + ok(r == 1, "Unexpected return value %ld.\n", r); r = SendMessageA(hwnd, LVM_SETUNICODEFORMAT, 0, 0); expect(1, r); r = SendMessageA(hwnd, LVM_GETUNICODEFORMAT, 0, 0); @@ -4468,7 +4468,7 @@ static void test_notifyformat(void) r = SendMessageA(hwnd, LVM_GETUNICODEFORMAT, 0, 0); expect(0, r); r = SendMessageA(header, HDM_GETUNICODEFORMAT, 0, 0); - ok( r == 1, "Expected 1, got %d\n", r ); + ok( r == 1, "Expected 1, got %ld\n", r ); r = SendMessageA(hwnd, WM_NOTIFYFORMAT, 0, NF_QUERY); ok(r != 0, "Expected valid format\n");
@@ -4478,7 +4478,7 @@ static void test_notifyformat(void) r = SendMessageA(hwnd, LVM_GETUNICODEFORMAT, 0, 0); expect(1, r); r = SendMessageA(header, HDM_GETUNICODEFORMAT, 0, 0); - ok( r == 1, "Expected 1, got %d\n", r ); + ok( r == 1, "Expected 1, got %ld\n", r );
notifyFormat = NFR_ANSI; r = SendMessageA(hwnd, WM_NOTIFYFORMAT, 0, NF_REQUERY); @@ -4486,7 +4486,7 @@ static void test_notifyformat(void) r = SendMessageA(hwnd, LVM_GETUNICODEFORMAT, 0, 0); expect(0, r); r = SendMessageA(header, HDM_GETUNICODEFORMAT, 0, 0); - ok( r == 1, "Expected 1, got %d\n", r ); + ok( r == 1, "Expected 1, got %ld\n", r );
DestroyWindow(hwnd);
@@ -5055,7 +5055,7 @@ static void test_approximate_viewrect(void) expect(0, ret);
ret = SendMessageA(hwnd, LVM_SETICONSPACING, 0, MAKELPARAM(75, 75)); - ok(ret != 0, "Unexpected return value %#x.\n", ret); + ok(ret != 0, "Unexpected return value %#lx.\n", ret);
ret = SendMessageA(hwnd, LVM_APPROXIMATEVIEWRECT, 11, MAKELPARAM(100,100)); expect(MAKELONG(77,827), ret); @@ -5133,7 +5133,7 @@ static void test_approximate_viewrect(void) col.pszText = column_header; col.cx = column_width; ret = SendMessageA(hwnd, LVM_INSERTCOLUMNA, 0, (LPARAM)&col); - ok(ret == 0, "Unexpected return value %d.\n", ret); + ok(ret == 0, "Unexpected return value %ld.\n", ret);
/* Empty control with column */ ret = SendMessageA(hwnd, LVM_APPROXIMATEVIEWRECT, 0, 0); @@ -5170,7 +5170,7 @@ todo_wine { itema.iSubItem = 0; itema.pszText = test; ret = SendMessageA(hwnd, LVM_INSERTITEMA, 0, (LPARAM)&itema); - ok(ret == 0, "Unexpected return value %d.\n", ret); + ok(ret == 0, "Unexpected return value %ld.\n", ret);
ret = SendMessageA(hwnd, LVM_APPROXIMATEVIEWRECT, 0, 0); ok(LOWORD(ret) >= column_width, "Unexpected width %d.\n", LOWORD(ret)); @@ -5181,8 +5181,8 @@ todo_wine { item_width = LOWORD(ret);
ret = SendMessageA(hwnd, LVM_APPROXIMATEVIEWRECT, 1, 0); - ok(LOWORD(ret) == item_width, "Unexpected width %d, item %d\n", LOWORD(ret), item_count - 1); - ok(HIWORD(ret) > header_height, "Unexpected height %d. item %d.\n", HIWORD(ret), item_count - 1); + ok(LOWORD(ret) == item_width, "Unexpected width %d, item %ld\n", LOWORD(ret), item_count - 1); + ok(HIWORD(ret) > header_height, "Unexpected height %d. item %ld.\n", HIWORD(ret), item_count - 1);
item_height = HIWORD(ret) - header_height;
@@ -5542,7 +5542,7 @@ static void test_header_notification2(void) flush_sequences(sequences, NUM_MSG_SEQUENCES); nmhdr.hdr.code = HDN_ITEMCHANGINGW; ret = SendMessageW(list, WM_NOTIFY, 0, (LPARAM)&nmhdr); - ok(ret == 0, "got %d\n", ret); + ok(ret == 0, "got %ld\n", ret); parent_header_notify_seq[0].id = HDN_ITEMCHANGINGA; ok_sequence(sequences, PARENT_SEQ_INDEX, parent_header_notify_seq, "header notify, parent", TRUE); @@ -5551,7 +5551,7 @@ static void test_header_notification2(void) flush_sequences(sequences, NUM_MSG_SEQUENCES); nmhdr.hdr.code = HDN_ITEMCHANGEDW; ret = SendMessageW(list, WM_NOTIFY, 0, (LPARAM)&nmhdr); - ok(ret == 0, "got %d\n", ret); + ok(ret == 0, "got %ld\n", ret); parent_header_notify_seq[0].id = HDN_ITEMCHANGEDA; ok_sequence(sequences, PARENT_SEQ_INDEX, parent_header_notify_seq, "header notify, parent", TRUE); @@ -5562,35 +5562,35 @@ static void test_header_notification2(void) flush_sequences(sequences, NUM_MSG_SEQUENCES); nmhdr.hdr.code = HDN_ITEMCLICKW; ret = SendMessageW(list, WM_NOTIFY, 0, (LPARAM)&nmhdr); - ok(ret == 0, "got %d\n", ret); + ok(ret == 0, "got %ld\n", ret); ok_sequence(sequences, PARENT_SEQ_INDEX, parent_header_click_seq, "header notify, parent", FALSE); ok(nmhdr.hdr.code == HDN_ITEMCLICKA, "Expected ANSI notification code\n"); flush_sequences(sequences, NUM_MSG_SEQUENCES); nmhdr.hdr.code = HDN_ITEMDBLCLICKW; ret = SendMessageW(list, WM_NOTIFY, 0, (LPARAM)&nmhdr); - ok(ret == 0, "got %d\n", ret); + ok(ret == 0, "got %ld\n", ret); ok_sequence(sequences, PARENT_SEQ_INDEX, empty_seq, "header notify, parent", FALSE); ok(nmhdr.hdr.code == HDN_ITEMDBLCLICKW, "Expected Unicode notification code\n"); flush_sequences(sequences, NUM_MSG_SEQUENCES); nmhdr.hdr.code = HDN_DIVIDERDBLCLICKW; ret = SendMessageW(list, WM_NOTIFY, 0, (LPARAM)&nmhdr); - ok(ret == 0, "got %d\n", ret); + ok(ret == 0, "got %ld\n", ret); ok_sequence(sequences, PARENT_SEQ_INDEX, parent_header_divider_dclick_seq, "header notify, parent", TRUE); ok(nmhdr.hdr.code == HDN_DIVIDERDBLCLICKA, "Expected ANSI notification code\n"); flush_sequences(sequences, NUM_MSG_SEQUENCES); nmhdr.hdr.code = HDN_BEGINTRACKW; ret = SendMessageW(list, WM_NOTIFY, 0, (LPARAM)&nmhdr); - ok(ret == 0, "got %d\n", ret); + ok(ret == 0, "got %ld\n", ret); ok_sequence(sequences, PARENT_SEQ_INDEX, empty_seq, "header notify, parent", FALSE); ok(nmhdr.hdr.code == HDN_BEGINTRACKW, "Expected Unicode notification code\n"); flush_sequences(sequences, NUM_MSG_SEQUENCES); nmhdr.hdr.code = HDN_ENDTRACKW; ret = SendMessageW(list, WM_NOTIFY, 0, (LPARAM)&nmhdr); - ok(ret == 0, "got %d\n", ret); + ok(ret == 0, "got %ld\n", ret); parent_header_notify_seq[0].id = HDN_ENDTRACKA; ok_sequence(sequences, PARENT_SEQ_INDEX, parent_header_notify_seq, "header notify, parent", FALSE); @@ -5598,7 +5598,7 @@ static void test_header_notification2(void) flush_sequences(sequences, NUM_MSG_SEQUENCES); nmhdr.hdr.code = HDN_TRACKW; ret = SendMessageW(list, WM_NOTIFY, 0, (LPARAM)&nmhdr); - ok(ret == 0, "got %d\n", ret); + ok(ret == 0, "got %ld\n", ret); parent_header_notify_seq[0].id = HDN_TRACKA; ok_sequence(sequences, PARENT_SEQ_INDEX, parent_header_notify_seq, "header notify, parent", FALSE); @@ -5606,20 +5606,20 @@ static void test_header_notification2(void) flush_sequences(sequences, NUM_MSG_SEQUENCES); nmhdr.hdr.code = HDN_BEGINDRAG; ret = SendMessageW(list, WM_NOTIFY, 0, (LPARAM)&nmhdr); - ok(ret == 1, "got %d\n", ret); + ok(ret == 1, "got %ld\n", ret); ok_sequence(sequences, PARENT_SEQ_INDEX, empty_seq, "header notify, parent", FALSE); flush_sequences(sequences, NUM_MSG_SEQUENCES); nmhdr.hdr.code = HDN_ENDDRAG; ret = SendMessageW(list, WM_NOTIFY, 0, (LPARAM)&nmhdr); - ok(ret == 0, "got %d\n", ret); + ok(ret == 0, "got %ld\n", ret); parent_header_notify_seq[0].id = HDN_ENDDRAG; ok_sequence(sequences, PARENT_SEQ_INDEX, parent_header_notify_seq, "header notify, parent", FALSE); flush_sequences(sequences, NUM_MSG_SEQUENCES); nmhdr.hdr.code = HDN_FILTERCHANGE; ret = SendMessageW(list, WM_NOTIFY, 0, (LPARAM)&nmhdr); - ok(ret == 0, "got %d\n", ret); + ok(ret == 0, "got %ld\n", ret); parent_header_notify_seq[0].id = HDN_FILTERCHANGE; parent_header_notify_seq[0].flags |= optional; /* NT4 does not send this message */ ok_sequence(sequences, PARENT_SEQ_INDEX, parent_header_notify_seq, @@ -5628,25 +5628,25 @@ static void test_header_notification2(void) flush_sequences(sequences, NUM_MSG_SEQUENCES); nmhdr.hdr.code = HDN_BEGINFILTEREDIT; ret = SendMessageW(list, WM_NOTIFY, 0, (LPARAM)&nmhdr); - ok(ret == 0, "got %d\n", ret); + ok(ret == 0, "got %ld\n", ret); ok_sequence(sequences, PARENT_SEQ_INDEX, empty_seq, "header notify, parent", FALSE); flush_sequences(sequences, NUM_MSG_SEQUENCES); nmhdr.hdr.code = HDN_ENDFILTEREDIT; ret = SendMessageW(list, WM_NOTIFY, 0, (LPARAM)&nmhdr); - ok(ret == 0, "got %d\n", ret); + ok(ret == 0, "got %ld\n", ret); ok_sequence(sequences, PARENT_SEQ_INDEX, empty_seq, "header notify, parent", FALSE); flush_sequences(sequences, NUM_MSG_SEQUENCES); nmhdr.hdr.code = HDN_ITEMSTATEICONCLICK; ret = SendMessageW(list, WM_NOTIFY, 0, (LPARAM)&nmhdr); - ok(ret == 0, "got %d\n", ret); + ok(ret == 0, "got %ld\n", ret); ok_sequence(sequences, PARENT_SEQ_INDEX, empty_seq, "header notify, parent", FALSE); flush_sequences(sequences, NUM_MSG_SEQUENCES); nmhdr.hdr.code = HDN_ITEMKEYDOWN; ret = SendMessageW(list, WM_NOTIFY, 0, (LPARAM)&nmhdr); - ok(ret == 0, "got %d\n", ret); + ok(ret == 0, "got %ld\n", ret); ok_sequence(sequences, PARENT_SEQ_INDEX, empty_seq, "header notify, parent", FALSE);
@@ -5699,7 +5699,7 @@ static void test_dispinfo(void) item.pszText = (char*)buff; item.cchTextMax = ARRAY_SIZE(buff); ret = SendMessageA(hwnd, LVM_GETITEMTEXTA, 0, (LPARAM)&item); - ok(ret == sizeof(testA)-1, "got %d, expected 4\n", ret); + ok(ret == sizeof(testA)-1, "got %ld, expected 4\n", ret); g_disp_A_to_W = FALSE;
ok(memcmp(item.pszText, testA, sizeof(testA)) == 0, @@ -6221,7 +6221,7 @@ static void test_oneclickactivate(void) track.dwFlags = TME_QUERY; p_TrackMouseEvent(&track); ok(track.hwndTrack == hwnd, "hwndTrack != hwnd\n"); - ok(track.dwFlags == TME_LEAVE, "dwFlags = %x\n", track.dwFlags); + ok(track.dwFlags == TME_LEAVE, "dwFlags = %lx\n", track.dwFlags);
r = SendMessageA(hwnd, LVM_GETSELECTEDCOUNT, 0, 0); expect(0, r); @@ -6250,7 +6250,7 @@ static void test_callback_mask(void) ok(ret, "got %d\n", ret);
mask = SendMessageA(hwnd, LVM_GETCALLBACKMASK, 0, 0); - ok(mask == ~0u, "got 0x%08x\n", mask); + ok(mask == ~0u, "got 0x%08lx\n", mask);
/* Ask for state, invalid subitem. */ insert_item(hwnd, 0); @@ -6296,13 +6296,13 @@ static void test_callback_mask(void) hwnd = create_listview_control(LVS_REPORT | LVS_OWNERDATA);
mask = SendMessageA(hwnd, LVM_GETCALLBACKMASK, 0, 0); - ok(mask == 0, "Unexpected callback mask %#x.\n", mask); + ok(mask == 0, "Unexpected callback mask %#lx.\n", mask);
ret = SendMessageA(hwnd, LVM_SETCALLBACKMASK, LVIS_FOCUSED, 0); ok(ret, "Failed to set callback mask, %d\n", ret);
mask = SendMessageA(hwnd, LVM_GETCALLBACKMASK, 0, 0); - ok(mask == LVIS_FOCUSED, "Unexpected callback mask %#x.\n", mask); + ok(mask == LVIS_FOCUSED, "Unexpected callback mask %#lx.\n", mask);
ret = SendMessageA(hwnd, LVM_SETITEMCOUNT, 1, 0); ok(ret, "Failed to set item count.\n"); @@ -6465,7 +6465,7 @@ static void test_state_image(void) ok(r, "Failed to get item state.\n"); ok(item.state == (INDEXTOSTATEIMAGEMASK(1) | LVIS_SELECTED | LVIS_FOCUSED), "Unexpected item state %#x.\n", item.state); - ok(item.lParam == 123456, "Unexpected lParam %ld.\n", item.lParam); + ok(item.lParam == 123456, "Unexpected lParam %Id.\n", item.lParam);
item.mask = 0; item.stateMask = ~0u; @@ -6485,7 +6485,7 @@ static void test_state_image(void) r = SendMessageA(hwnd, LVM_GETITEMA, 0, (LPARAM)&item); ok(r, "Failed to get subitem state.\n"); ok(item.state == 0, "Unexpected state %#x.\n", item.state); - ok(item.lParam == 123456, "Unexpected lParam %ld.\n", item.lParam); + ok(item.lParam == 123456, "Unexpected lParam %Id.\n", item.lParam);
item.mask = LVIF_STATE; item.stateMask = LVIS_FOCUSED; diff --git a/dlls/comctl32/tests/misc.c b/dlls/comctl32/tests/misc.c index 2fe6ad68426..75e2aa1862b 100644 --- a/dlls/comctl32/tests/misc.c +++ b/dlls/comctl32/tests/misc.c @@ -219,7 +219,7 @@ static void test_Alloc(void) size = pGetSize(p); ok(size == 1 || broken(size == min), /* win9x */ - "Expected 1, got %d\n", size); + "Expected 1, got %ld\n", size);
/* reallocate the block */ p = pReAlloc(p, 2); @@ -229,7 +229,7 @@ static void test_Alloc(void) size = pGetSize(p); ok(size == 2 || broken(size == min), /* win9x */ - "Expected 2, got %d\n", size); + "Expected 2, got %ld\n", size);
/* free the block */ res = pFree(p); @@ -279,7 +279,7 @@ static void test_LoadIconWithScaleDown(void) GetTempFileNameW(tmp_path, L"ICO", 0, icon_path); handle = CreateFileW(icon_path, GENERIC_READ | GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL); - ok(handle != INVALID_HANDLE_VALUE, "CreateFileW failed with error %u\n", GetLastError()); + ok(handle != INVALID_HANDLE_VALUE, "CreateFileW failed with error %lu\n", GetLastError()); res = WriteFile(handle, testicon_data, sizeof(testicon_data), &written, NULL); ok(res && written == sizeof(testicon_data), "Failed to write icon file\n"); CloseHandle(handle); @@ -296,43 +296,43 @@ static void test_LoadIconWithScaleDown(void) /* invalid arguments */ icon = (HICON)0x1234; hr = pLoadIconMetric(NULL, (LPWSTR)IDI_APPLICATION, 0x100, &icon); - ok(hr == E_INVALIDARG, "Expected E_INVALIDARG, got %x\n", hr); + ok(hr == E_INVALIDARG, "Expected E_INVALIDARG, got %lx\n", hr); ok(icon == NULL, "Expected NULL, got %p\n", icon);
icon = (HICON)0x1234; hr = pLoadIconMetric(NULL, NULL, LIM_LARGE, &icon); - ok(hr == E_INVALIDARG, "Expected E_INVALIDARG, got %x\n", hr); + ok(hr == E_INVALIDARG, "Expected E_INVALIDARG, got %lx\n", hr); ok(icon == NULL, "Expected NULL, got %p\n", icon);
icon = (HICON)0x1234; hr = pLoadIconWithScaleDown(NULL, NULL, 32, 32, &icon); - ok(hr == E_INVALIDARG, "Expected E_INVALIDARG, got %x\n", hr); + ok(hr == E_INVALIDARG, "Expected E_INVALIDARG, got %lx\n", hr); ok(icon == NULL, "Expected NULL, got %p\n", icon);
/* non-existing filename */ hr = pLoadIconMetric(NULL, L"nonexisting.ico", LIM_LARGE, &icon); ok(hr == HRESULT_FROM_WIN32(ERROR_RESOURCE_TYPE_NOT_FOUND) || hr == HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND) /* Win7 */, - "Expected HRESULT_FROM_WIN32(ERROR_RESOURCE_TYPE_NOT_FOUND), got %x\n", hr); + "Expected HRESULT_FROM_WIN32(ERROR_RESOURCE_TYPE_NOT_FOUND), got %lx\n", hr);
hr = pLoadIconWithScaleDown(NULL, L"nonexisting.ico", 32, 32, &icon); todo_wine ok(hr == HRESULT_FROM_WIN32(ERROR_RESOURCE_TYPE_NOT_FOUND), - "Expected HRESULT_FROM_WIN32(ERROR_RESOURCE_TYPE_NOT_FOUND), got %x\n", hr); + "Expected HRESULT_FROM_WIN32(ERROR_RESOURCE_TYPE_NOT_FOUND), got %lx\n", hr);
/* non-existing resource name */ hr = pLoadIconMetric(hinst, L"Nonexisting", LIM_LARGE, &icon); ok(hr == HRESULT_FROM_WIN32(ERROR_RESOURCE_TYPE_NOT_FOUND), - "Expected HRESULT_FROM_WIN32(ERROR_RESOURCE_TYPE_NOT_FOUND), got %x\n", hr); + "Expected HRESULT_FROM_WIN32(ERROR_RESOURCE_TYPE_NOT_FOUND), got %lx\n", hr);
hr = pLoadIconWithScaleDown(hinst, L"Noneexisting", 32, 32, &icon); ok(hr == HRESULT_FROM_WIN32(ERROR_RESOURCE_TYPE_NOT_FOUND), - "Expected HRESULT_FROM_WIN32(ERROR_RESOURCE_TYPE_NOT_FOUND), got %x\n", hr); + "Expected HRESULT_FROM_WIN32(ERROR_RESOURCE_TYPE_NOT_FOUND), got %lx\n", hr);
/* load icon using predefined identifier */ hr = pLoadIconMetric(NULL, (LPWSTR)IDI_APPLICATION, LIM_SMALL, &icon); - ok(hr == S_OK, "Expected S_OK, got %x\n", hr); + ok(hr == S_OK, "Expected S_OK, got %lx\n", hr); res = GetIconInfo(icon, &info); - ok(res, "Failed to get icon info, error %u\n", GetLastError()); + ok(res, "Failed to get icon info, error %lu\n", GetLastError()); bytes = GetObjectA(info.hbmColor, sizeof(bmp), &bmp); ok(bytes > 0, "Failed to get bitmap info for icon\n"); ok(bmp.bmWidth == GetSystemMetrics(SM_CXSMICON), "Wrong icon width %d\n", bmp.bmWidth); @@ -340,9 +340,9 @@ static void test_LoadIconWithScaleDown(void) DestroyIcon(icon);
hr = pLoadIconMetric(NULL, (LPWSTR)IDI_APPLICATION, LIM_LARGE, &icon); - ok(hr == S_OK, "Expected S_OK, got %x\n", hr); + ok(hr == S_OK, "Expected S_OK, got %lx\n", hr); res = GetIconInfo(icon, &info); - ok(res, "Failed to get icon info, error %u\n", GetLastError()); + ok(res, "Failed to get icon info, error %lu\n", GetLastError()); bytes = GetObjectA(info.hbmColor, sizeof(bmp), &bmp); ok(bytes > 0, "Failed to get bitmap info for icon\n"); ok(bmp.bmWidth == GetSystemMetrics(SM_CXICON), "Wrong icon width %d\n", bmp.bmWidth); @@ -350,9 +350,9 @@ static void test_LoadIconWithScaleDown(void) DestroyIcon(icon);
hr = pLoadIconWithScaleDown(NULL, (LPWSTR)IDI_APPLICATION, 42, 42, &icon); - ok(hr == S_OK, "Expected S_OK, got %x\n", hr); + ok(hr == S_OK, "Expected S_OK, got %lx\n", hr); res = GetIconInfo(icon, &info); - ok(res, "Failed to get icon info, error %u\n", GetLastError()); + ok(res, "Failed to get icon info, error %lu\n", GetLastError()); bytes = GetObjectA(info.hbmColor, sizeof(bmp), &bmp); ok(bytes > 0, "Failed to get bitmap info for icon\n"); ok(bmp.bmWidth == 42, "Wrong icon width %d\n", bmp.bmWidth); @@ -361,9 +361,9 @@ static void test_LoadIconWithScaleDown(void)
/* load icon from file */ hr = pLoadIconMetric(NULL, icon_path, LIM_SMALL, &icon); - ok(hr == S_OK, "Expected S_OK, got %x\n", hr); + ok(hr == S_OK, "Expected S_OK, got %lx\n", hr); res = GetIconInfo(icon, &info); - ok(res, "Failed to get icon info, error %u\n", GetLastError()); + ok(res, "Failed to get icon info, error %lu\n", GetLastError()); bytes = GetObjectA(info.hbmColor, sizeof(bmp), &bmp); ok(bytes > 0, "Failed to get bitmap info for icon\n"); ok(bmp.bmWidth == GetSystemMetrics(SM_CXSMICON), "Wrong icon width %d\n", bmp.bmWidth); @@ -371,9 +371,9 @@ static void test_LoadIconWithScaleDown(void) DestroyIcon(icon);
hr = pLoadIconWithScaleDown(NULL, icon_path, 42, 42, &icon); - ok(hr == S_OK, "Expected S_OK, got %x\n", hr); + ok(hr == S_OK, "Expected S_OK, got %lx\n", hr); res = GetIconInfo(icon, &info); - ok(res, "Failed to get icon info, error %u\n", GetLastError()); + ok(res, "Failed to get icon info, error %lu\n", GetLastError()); bytes = GetObjectA(info.hbmColor, sizeof(bmp), &bmp); ok(bytes > 0, "Failed to get bitmap info for icon\n"); ok(bmp.bmWidth == 42, "Wrong icon width %d\n", bmp.bmWidth); @@ -522,7 +522,7 @@ static HWND create_control(const char *class, DWORD style, HWND parent, DWORD_PT if (parent) style |= WS_CHILD; hwnd = CreateWindowExA(0, class, "test", style, 0, 0, 50, 20, parent, 0, 0, NULL); - ok(!!hwnd, "Failed to create %s style %#x parent %p\n", class, style, parent); + ok(!!hwnd, "Failed to create %s style %#lx parent %p\n", class, style, parent); pSetWindowSubclass(hwnd, test_wm_themechanged_proc, 0, data); return hwnd; } @@ -637,13 +637,13 @@ static void test_WM_SYSCOLORCHANGE(void)
parent = CreateWindowExA(0, WC_STATICA, "parent", WS_OVERLAPPEDWINDOW | WS_VISIBLE, 100, 100, 200, 200, 0, 0, 0, NULL); - ok(!!parent, "CreateWindowExA failed, error %d\n", GetLastError()); + ok(!!parent, "CreateWindowExA failed, error %ld\n", GetLastError());
temp.tmplate.style = WS_CHILD | WS_VISIBLE; temp.tmplate.cx = 50; temp.tmplate.cy = 50; dialog = CreateDialogIndirectParamA(NULL, &temp.tmplate, parent, wm_syscolorchange_dlg_proc, 0); - ok(!!dialog, "CreateDialogIndirectParamA failed, error %d\n", GetLastError()); + ok(!!dialog, "CreateDialogIndirectParamA failed, error %ld\n", GetLastError()); flush_events(); flush_sequences(sequences, NUM_MSG_SEQUENCES);
@@ -917,15 +917,15 @@ static void test_themed_background(void)
parent = CreateWindowA(cls.lpszClassName, "parent", WS_POPUP | WS_VISIBLE, 100, 100, 100, 100, 0, 0, 0, 0); - ok(parent != NULL, "CreateWindowA failed, error %u.\n", GetLastError()); + ok(parent != NULL, "CreateWindowA failed, error %lu.\n", GetLastError());
for (i = 0; i < ARRAY_SIZE(tests); ++i) { - winetest_push_context("%s %#x", tests[i].class_name, tests[i].style); + winetest_push_context("%s %#lx", tests[i].class_name, tests[i].style);
child = CreateWindowA(tests[i].class_name, " ", WS_CHILD | WS_VISIBLE | tests[i].style, 0, 0, 50, 50, parent, 0, 0, 0); - ok(child != NULL, "CreateWindowA failed, error %u.\n", GetLastError()); + ok(child != NULL, "CreateWindowA failed, error %lu.\n", GetLastError()); flush_events(); flush_sequences(sequences, NUM_MSG_SEQUENCES);
@@ -953,17 +953,17 @@ static void test_themed_background(void) color = GetPixel(hdc, 40, 40); /* BS_PUSHBOX is unimplemented on Wine */ todo_wine_if(i == 11) - ok(color == 0x808080, "Expected color %#x, got %#x.\n", 0x808080, color); + ok(color == 0x808080, "Expected color %#x, got %#lx.\n", 0x808080, color); } else if (tests[i].seq == groupbox_seq) { /* DrawThemeParentBackground() is used to fill content background */ color = GetPixel(hdc, 40, 40); - ok(color == 0xff, "Expected color %#x, got %#x.\n", 0xff, color); + ok(color == 0xff, "Expected color %#x, got %#lx.\n", 0xff, color);
/* WM_CTLCOLORSTATIC is used to fill text background */ color = GetPixel(hdc, 10, 10); - ok(color == 0x808080, "Expected color %#x, got %#x.\n", 0x808080, color); + ok(color == 0x808080, "Expected color %#x, got %#lx.\n", 0x808080, color); }
ReleaseDC(child, hdc); diff --git a/dlls/comctl32/tests/monthcal.c b/dlls/comctl32/tests/monthcal.c index 64242959d0c..1a82a0b0fa8 100644 --- a/dlls/comctl32/tests/monthcal.c +++ b/dlls/comctl32/tests/monthcal.c @@ -35,15 +35,15 @@ #define expect(expected,got) expect_(__LINE__, expected, got) static inline void expect_(unsigned line, DWORD expected, DWORD got) { - ok_(__FILE__, line)(expected == got, "Expected %d, got %d\n", expected, got); + ok_(__FILE__, line)(expected == got, "Expected %ld, got %ld\n", expected, got); }
#define expect_hex(expected,got) expect_(__LINE__, expected, got) static inline void expect_hex_(unsigned line, DWORD expected, DWORD got) { - ok_(__FILE__, line)(expected == got, "Expected %x, got %x\n", expected, got); + ok_(__FILE__, line)(expected == got, "Expected %lx, got %lx\n", expected, got); } -#define expect_d(expected, got) ok(abs((expected) - (got)) <= 2, "Expected %d, got %d\n", expected, got); +#define expect_d(expected, got) ok(abs((expected) - (got)) <= 2, "Expected %ld, got %ld\n", expected, got);
#define NUM_MSG_SEQUENCES 2 #define PARENT_SEQ_INDEX 0 @@ -285,7 +285,7 @@ static void test_monthcal(void) limits = SendMessageA(hwnd, MCM_GETRANGE, 0, (LPARAM)st); ok(limits == 0 || broken(limits == GDTR_MIN), /* comctl32 <= 4.70 */ - "No limits should be set (%d)\n", limits); + "No limits should be set (%ld)\n", limits); if (limits == GDTR_MIN) { win_skip("comctl32 <= 4.70 is broken\n"); @@ -318,7 +318,7 @@ static void test_monthcal(void) expect(0, st[1].wMilliseconds);
limits = SendMessageA(hwnd, MCM_GETRANGE, 0, 0); - ok(limits == 0, "got %u\n", limits); + ok(limits == 0, "got %lu\n", limits);
GetSystemTime(&st[0]); st[1] = st[0]; @@ -468,7 +468,7 @@ static void test_monthcal(void)
/* 0 limit flags */ limits = SendMessageA(hwnd, MCM_GETRANGE, 0, (LPARAM)st1); - ok(limits == GDTR_MIN, "got 0x%08x\n", limits); + ok(limits == GDTR_MIN, "got 0x%08lx\n", limits);
GetSystemTime(st); st[1] = st[0]; @@ -477,7 +477,7 @@ static void test_monthcal(void) ok(r, "got %d\n", r);
limits = SendMessageA(hwnd, MCM_GETRANGE, 0, (LPARAM)st); - ok(limits == 0, "got 0x%08x\n", limits); + ok(limits == 0, "got 0x%08lx\n", limits); ok(st[0].wYear == 0 && st[1].wYear == 0, "got %u, %u\n", st[0].wYear, st[1].wYear);
/* flags are 0, set min limit */ @@ -489,7 +489,7 @@ static void test_monthcal(void) ok(r, "got %d\n", r);
limits = SendMessageA(hwnd, MCM_GETRANGE, 0, (LPARAM)st1); - ok(limits == GDTR_MIN, "got 0x%08x\n", limits); + ok(limits == GDTR_MIN, "got 0x%08lx\n", limits); ok(st1[1].wYear == 0, "got %u\n", st1[1].wYear);
/* now set max limit, check flags */ @@ -497,7 +497,7 @@ static void test_monthcal(void) ok(r, "got %d\n", r);
limits = SendMessageA(hwnd, MCM_GETRANGE, 0, (LPARAM)st1); - ok(limits == GDTR_MAX, "got 0x%08x\n", limits); + ok(limits == GDTR_MAX, "got 0x%08lx\n", limits); ok(st1[0].wYear == 0, "got %u\n", st1[0].wYear);
DestroyWindow(hwnd); @@ -652,7 +652,7 @@ static LRESULT WINAPI monthcal_subclass_proc(HWND hwnd, UINT message, WPARAM wPa message == WM_STYLECHANGED) && lParam) { STYLESTRUCT *style = (STYLESTRUCT*)lParam; - trace("\told style: 0x%08x, new style: 0x%08x\n", style->styleOld, style->styleNew); + trace("\told style: 0x%08lx, new style: 0x%08lx\n", style->styleOld, style->styleNew); }
defwndproc_counter++; @@ -927,7 +927,7 @@ static void test_firstDay(void) SetLastError(0xdeadbeef); ret = GetLocaleInfoA(lcid, LOCALE_ICALENDARTYPE, caltype, 3); if (ret == 0) { - skip("Must know local calendar type (%x)\n", GetLastError()); + skip("Must know local calendar type (%lx)\n", GetLastError()); return; } else if (atoi(caltype) != CAL_GREGORIAN) { skip("MonthCalendar Control only supports Gregorian calendar (type: %s)\n", caltype); @@ -1236,7 +1236,7 @@ if (0) break;
todo_wine_if(title_hits[title_index].todo) - ok(title_hits[title_index].ht == res, "Expected %x, got %x, pos %d\n", + ok(title_hits[title_index].ht == res, "Expected %x, got %x, pos %ld\n", title_hits[title_index].ht, res, x); } old_res = res; @@ -1841,7 +1841,7 @@ static void test_hittest_v6(void) expect(0, mchit.rc.left); expect(0, mchit.rc.top); expect_d(r.right, mchit.rc.right); - ok(mchit.rc.bottom > 0, "got %d\n", mchit.rc.bottom); + ok(mchit.rc.bottom > 0, "got %ld\n", mchit.rc.bottom);
/* between two calendars */ MoveWindow(hwnd, 0, 0, r.right * 5/2, r.bottom, FALSE); @@ -1907,7 +1907,7 @@ static void test_MCM_SIZERECTTOMIN(void) }
ret = SendMessageA(hwnd, MCM_SIZERECTTOMIN, 0, 0); - ok(ret == 0, "got %d\n", ret); + ok(ret == 0, "got %ld\n", ret);
SetRectEmpty(&r); ret = SendMessageA(hwnd, MCM_SIZERECTTOMIN, 0, (LPARAM)&r); @@ -1917,18 +1917,18 @@ static void test_MCM_SIZERECTTOMIN(void) DestroyWindow(hwnd); return; } - ok(ret == 1, "got %d\n", ret); - ok(r.left == 0 && r.right > 0, "got %d, %d\n", r.left, r.right); + ok(ret == 1, "got %ld\n", ret); + ok(r.left == 0 && r.right > 0, "got %ld, %ld\n", r.left, r.right);
r = r2; ret = SendMessageA(hwnd, MCM_SIZERECTTOMIN, 0, (LPARAM)&r); - ok(ret == 1, "got %d\n", ret); + ok(ret == 1, "got %ld\n", ret);
r2.right = (r2.right - r2.left) * 3; r2.bottom = (r2.bottom - r2.top) * 3; r2.left = r2.top = 0; ret = SendMessageA(hwnd, MCM_SIZERECTTOMIN, 0, (LPARAM)&r2); - ok(ret == 1, "got %d\n", ret); + ok(ret == 1, "got %ld\n", ret);
DestroyWindow(hwnd); } @@ -1984,7 +1984,7 @@ static void test_daystate(void) /* try to switch on */ SetWindowLongA(hwnd, GWL_STYLE, GetWindowLongA(hwnd, GWL_STYLE) | MCS_DAYSTATE); style = GetWindowLongA(hwnd, GWL_STYLE); - ok((style & MCS_DAYSTATE) == 0, "got 0x%08x\n", style); + ok((style & MCS_DAYSTATE) == 0, "got 0x%08lx\n", style);
DestroyWindow(hwnd);
@@ -2006,7 +2006,7 @@ static void test_daystate(void) /* try to switch off */ SetWindowLongA(hwnd, GWL_STYLE, GetWindowLongA(hwnd, GWL_STYLE) & ~MCS_DAYSTATE); style = GetWindowLongA(hwnd, GWL_STYLE); - ok((style & MCS_DAYSTATE) == MCS_DAYSTATE, "got 0x%08x\n", style); + ok((style & MCS_DAYSTATE) == MCS_DAYSTATE, "got 0x%08lx\n", style);
DestroyWindow(hwnd); } diff --git a/dlls/comctl32/tests/mru.c b/dlls/comctl32/tests/mru.c index 6a9a04d9663..472fb99bac3 100644 --- a/dlls/comctl32/tests/mru.c +++ b/dlls/comctl32/tests/mru.c @@ -200,7 +200,7 @@ static void check_reg_entries(const char *mrulist, const char**items) buff[0] = '\0'; ret = RegQueryValueExA(hKey, "MRUList", NULL, &type, (LPBYTE)buff, &size);
- ok(!ret && buff[0], "Checking MRU: got %d from RegQueryValueExW\n", ret); + ok(!ret && buff[0], "Checking MRU: got %ld from RegQueryValueExW\n", ret); if(ret || !buff[0]) return;
ok(strcmp(buff, mrulist) == 0, "Checking MRU: Expected list %s, got %s\n", @@ -217,7 +217,7 @@ static void check_reg_entries(const char *mrulist, const char**items) buff[0] = '\0'; ret = RegQueryValueExA(hKey, name, NULL, &type, (LPBYTE)buff, &size); ok(!ret && buff[0], - "Checking MRU item %d ('%c'): got %d from RegQueryValueExW\n", + "Checking MRU item %d ('%c'): got %ld from RegQueryValueExW\n", i, mrulist[i], ret); if(ret || !buff[0]) return; ok(!strcmp(buff, items[mrulist[i]-'a']), @@ -262,7 +262,7 @@ static void test_MRUListA(void) SetLastError(0); hMRU = pCreateMRUListA(&infoA); ok (!hMRU && !GetLastError(), - "CreateMRUListA(too small) expected NULL,0 got %p,%d\n", + "CreateMRUListA(too small) expected NULL,0 got %p,%ld\n", hMRU, GetLastError());
/* size too big */ @@ -276,7 +276,7 @@ static void test_MRUListA(void) SetLastError(0); hMRU = pCreateMRUListA(&infoA); ok (!hMRU && !GetLastError(), - "CreateMRUListA(too big) expected NULL,0 got %p,%d\n", + "CreateMRUListA(too big) expected NULL,0 got %p,%ld\n", hMRU, GetLastError());
/* NULL hKey */ @@ -290,7 +290,7 @@ static void test_MRUListA(void) SetLastError(0); hMRU = pCreateMRUListA(&infoA); ok (!hMRU && !GetLastError(), - "CreateMRUListA(NULL key) expected NULL,0 got %p,%d\n", + "CreateMRUListA(NULL key) expected NULL,0 got %p,%ld\n", hMRU, GetLastError());
/* NULL subkey name */ @@ -304,7 +304,7 @@ static void test_MRUListA(void) SetLastError(0); hMRU = pCreateMRUListA(&infoA); ok (!hMRU && !GetLastError(), - "CreateMRUListA(NULL name) expected NULL,0 got %p,%d\n", + "CreateMRUListA(NULL name) expected NULL,0 got %p,%ld\n", hMRU, GetLastError());
/* Create a string MRU */ @@ -321,7 +321,7 @@ static void test_MRUListA(void)
hMRU = pCreateMRUListA(&infoA); ok(hMRU && !GetLastError(), - "CreateMRUListA(string) expected non-NULL,0 got %p,%d\n", + "CreateMRUListA(string) expected non-NULL,0 got %p,%ld\n", hMRU, GetLastError());
if (hMRU) @@ -336,35 +336,35 @@ static void test_MRUListA(void) SetLastError(0); iRet = pAddMRUStringA(NULL, checks[0]); ok(iRet == -1 && !GetLastError(), - "AddMRUStringA(NULL list) expected -1,0 got %d,%d\n", + "AddMRUStringA(NULL list) expected -1,0 got %d,%ld\n", iRet, GetLastError());
/* Add (NULL string) */ SetLastError(0); iRet = pAddMRUStringA(hMRU, NULL); todo_wine ok(iRet == 0 && !GetLastError(), - "AddMRUStringA(NULL str) expected 0,0 got %d,%d\n", + "AddMRUStringA(NULL str) expected 0,0 got %d,%ld\n", iRet, GetLastError());
/* Add 3 strings. Check the registry is correct after each add */ SetLastError(0); iRet = pAddMRUStringA(hMRU, checks[0]); ok(iRet == 0 && !GetLastError(), - "AddMRUStringA(1) expected 0,0 got %d,%d\n", + "AddMRUStringA(1) expected 0,0 got %d,%ld\n", iRet, GetLastError()); check_reg_entries("a", checks);
SetLastError(0); iRet = pAddMRUStringA(hMRU, checks[1]); ok(iRet == 1 && !GetLastError(), - "AddMRUStringA(2) expected 1,0 got %d,%d\n", + "AddMRUStringA(2) expected 1,0 got %d,%ld\n", iRet, GetLastError()); check_reg_entries("ba", checks);
SetLastError(0); iRet = pAddMRUStringA(hMRU, checks[2]); ok(iRet == 2 && !GetLastError(), - "AddMRUStringA(2) expected 2,0 got %d,%d\n", + "AddMRUStringA(2) expected 2,0 got %d,%ld\n", iRet, GetLastError()); check_reg_entries("cba", checks);
@@ -374,7 +374,7 @@ static void test_MRUListA(void) SetLastError(0); iRet = pAddMRUStringA(hMRU, checks[1]); ok(iRet == 1 && !GetLastError(), - "AddMRUStringA(re-add 1) expected 1,0 got %d,%d\n", + "AddMRUStringA(re-add 1) expected 1,0 got %d,%ld\n", iRet, GetLastError()); check_reg_entries("bca", checks);
@@ -382,7 +382,7 @@ static void test_MRUListA(void) SetLastError(0); iRet = pAddMRUStringA(hMRU, checks[3]); ok(iRet == 0 && !GetLastError(), - "AddMRUStringA(add new) expected 0,0 got %d,%d\n", + "AddMRUStringA(add new) expected 0,0 got %d,%ld\n", iRet, GetLastError()); checks[0] = checks[3]; check_reg_entries("abc", checks); diff --git a/dlls/comctl32/tests/msg.h b/dlls/comctl32/tests/msg.h index 8ba2efddb0a..f6877d6a2b1 100644 --- a/dlls/comctl32/tests/msg.h +++ b/dlls/comctl32/tests/msg.h @@ -114,7 +114,7 @@ static void dump_sequence( struct msg_sequence **seq, int sequence_index, trace_(file, line)("Failed sequence %s:\n", context ); while (expected->message && actual->message) { - trace_(file, line)( " %u: expected: %04x - actual: %04x wp %08lx lp %08lx\n", + trace_(file, line)( " %u: expected: %04x - actual: %04x wp %08Ix lp %08Ix\n", count, expected->message, actual->message, actual->wParam, actual->lParam );
if (expected->message == actual->message) @@ -155,7 +155,7 @@ static void dump_sequence( struct msg_sequence **seq, int sequence_index,
while (actual->message) { - trace_(file, line)( " %u: expected: nothing - actual: %04x wp %08lx lp %08lx\n", + trace_(file, line)( " %u: expected: nothing - actual: %04x wp %08Ix lp %08Ix\n", count, actual->message, actual->wParam, actual->lParam ); actual++; count++; @@ -190,14 +190,14 @@ static void ok_sequence_(struct msg_sequence **seq, int sequence_index, failcount++; dump++; ok_(file, line) (FALSE, - "%s: in msg 0x%04x expecting wParam 0x%lx got 0x%lx\n", + "%s: in msg 0x%04x expecting wParam 0x%Ix got 0x%Ix\n", context, expected->message, expected->wParam, actual->wParam); } } else { ok_(file, line) (expected->wParam == actual->wParam, - "%s: in msg 0x%04x expecting wParam 0x%lx got 0x%lx\n", + "%s: in msg 0x%04x expecting wParam 0x%Ix got 0x%Ix\n", context, expected->message, expected->wParam, actual->wParam); if (expected->wParam != actual->wParam) dump++; } @@ -212,14 +212,14 @@ static void ok_sequence_(struct msg_sequence **seq, int sequence_index, failcount++; dump++; ok_(file, line) (FALSE, - "%s: in msg 0x%04x expecting lParam 0x%lx got 0x%lx\n", + "%s: in msg 0x%04x expecting lParam 0x%Ix got 0x%Ix\n", context, expected->message, expected->lParam, actual->lParam); } } else { ok_(file, line) (expected->lParam == actual->lParam, - "%s: in msg 0x%04x expecting lParam 0x%lx got 0x%lx\n", + "%s: in msg 0x%04x expecting lParam 0x%Ix got 0x%Ix\n", context, expected->message, expected->lParam, actual->lParam); if (expected->lParam != actual->lParam) dump++; } @@ -234,14 +234,14 @@ static void ok_sequence_(struct msg_sequence **seq, int sequence_index, failcount++; dump++; ok_(file, line) (FALSE, - "%s: in msg 0x%04x expecting cd stage 0x%08x got 0x%08x\n", + "%s: in msg 0x%04x expecting cd stage 0x%08lx got 0x%08lx\n", context, expected->message, expected->stage, actual->stage); } } else { ok_(file, line) (expected->stage == actual->stage, - "%s: in msg 0x%04x expecting cd stage 0x%08x got 0x%08x\n", + "%s: in msg 0x%04x expecting cd stage 0x%08lx got 0x%08lx\n", context, expected->message, expected->stage, actual->stage); if (expected->stage != actual->stage) dump++; } diff --git a/dlls/comctl32/tests/pager.c b/dlls/comctl32/tests/pager.c index 2ce964f8a27..e783dcc95e2 100644 --- a/dlls/comctl32/tests/pager.c +++ b/dlls/comctl32/tests/pager.c @@ -312,9 +312,9 @@ static LRESULT WINAPI parent_wnd_proc(HWND hwnd, UINT message, WPARAM wParam, LP DWORD style = GetWindowLongA(nmpgcs->hdr.hwndFrom, GWL_STYLE);
if (style & PGS_HORZ) - ok(nmpgcs->dwFlag == PGF_CALCWIDTH, "Unexpected flags %#x.\n", nmpgcs->dwFlag); + ok(nmpgcs->dwFlag == PGF_CALCWIDTH, "Unexpected flags %#lx.\n", nmpgcs->dwFlag); else - ok(nmpgcs->dwFlag == PGF_CALCHEIGHT, "Unexpected flags %#x.\n", nmpgcs->dwFlag); + ok(nmpgcs->dwFlag == PGF_CALCHEIGHT, "Unexpected flags %#lx.\n", nmpgcs->dwFlag); break; } default: @@ -449,14 +449,14 @@ static void test_pager(void) ok_sequence(sequences, PAGER_SEQ_INDEX, set_child_seq, "set child", FALSE); GetWindowRect( pager, &rect ); ok( rect.right - rect.left == 100 && rect.bottom - rect.top == 100, - "pager resized %dx%d\n", rect.right - rect.left, rect.bottom - rect.top ); + "pager resized %ldx%ld\n", rect.right - rect.left, rect.bottom - rect.top );
flush_sequences(sequences, NUM_MSG_SEQUENCES); SendMessageA(pager, PGM_SETCHILD, 0, (LPARAM)child2_wnd); ok_sequence(sequences, PAGER_SEQ_INDEX, switch_child_seq, "switch to invisible child", FALSE); GetWindowRect(pager, &rect); ok(rect.right - rect.left == 100 && rect.bottom - rect.top == 100, - "pager resized %dx%d\n", rect.right - rect.left, rect.bottom - rect.top); + "pager resized %ldx%ld\n", rect.right - rect.left, rect.bottom - rect.top); ok(!IsWindowVisible(child2_wnd), "Child window 2 is visible\n");
flush_sequences(sequences, NUM_MSG_SEQUENCES); @@ -464,14 +464,14 @@ static void test_pager(void) ok_sequence(sequences, PAGER_SEQ_INDEX, set_child_seq, "switch to visible child", FALSE); GetWindowRect(pager, &rect); ok(rect.right - rect.left == 100 && rect.bottom - rect.top == 100, - "pager resized %dx%d\n", rect.right - rect.left, rect.bottom - rect.top); + "pager resized %ldx%ld\n", rect.right - rect.left, rect.bottom - rect.top);
flush_sequences( sequences, NUM_MSG_SEQUENCES ); SendMessageA( pager, PGM_SETPOS, 0, 10 ); ok_sequence(sequences, PAGER_SEQ_INDEX, set_pos_seq, "set pos", TRUE); GetWindowRect( pager, &rect ); ok( rect.right - rect.left == 100 && rect.bottom - rect.top == 100, - "pager resized %dx%d\n", rect.right - rect.left, rect.bottom - rect.top ); + "pager resized %ldx%ld\n", rect.right - rect.left, rect.bottom - rect.top );
flush_sequences( sequences, NUM_MSG_SEQUENCES ); SendMessageA( pager, PGM_SETPOS, 0, 10 ); @@ -546,7 +546,7 @@ static void test_wm_notifyformat(void) INT i;
bret = register_notifyformat_class(); - ok(bret, "Register test class failed, error 0x%08x\n", GetLastError()); + ok(bret, "Register test class failed, error 0x%08lx\n", GetLastError());
for (i = 0; i < ARRAY_SIZE(formats); i++) { @@ -562,26 +562,26 @@ static void test_wm_notifyformat(void) /* Test parent */ notify_query_received = FALSE; ret = SendMessageW(pager, WM_NOTIFYFORMAT, (WPARAM)parent, NF_REQUERY); - ok(ret == notify_format, "Expect %d, got %ld\n", notify_format, ret); + ok(ret == notify_format, "Expect %d, got %Id\n", notify_format, ret); ok(notify_query_received, "Didn't receive notify\n");
/* Send NF_QUERY directly to parent */ notify_query_received = FALSE; ret = SendMessageW(parent, WM_NOTIFYFORMAT, (WPARAM)pager, NF_QUERY); - ok(ret == notify_format, "Expect %d, got %ld\n", notify_format, ret); + ok(ret == notify_format, "Expect %d, got %Id\n", notify_format, ret); ok(notify_query_received, "Didn't receive notify\n");
/* Pager send notifications to its parent regardless of wParam */ notify_query_received = FALSE; ret = SendMessageW(pager, WM_NOTIFYFORMAT, (WPARAM)parent_wnd, NF_REQUERY); - ok(ret == notify_format, "Expect %d, got %ld\n", notify_format, ret); + ok(ret == notify_format, "Expect %d, got %Id\n", notify_format, ret); ok(notify_query_received, "Didn't receive notify\n");
/* Pager always wants Unicode notifications from children */ ret = SendMessageW(child, WM_NOTIFYFORMAT, (WPARAM)pager, NF_REQUERY); - ok(ret == NFR_UNICODE, "Expect %d, got %ld\n", NFR_UNICODE, ret); + ok(ret == NFR_UNICODE, "Expect %d, got %Id\n", NFR_UNICODE, ret); ret = SendMessageW(pager, WM_NOTIFYFORMAT, (WPARAM)child, NF_QUERY); - ok(ret == NFR_UNICODE, "Expect %d, got %ld\n", NFR_UNICODE, ret); + ok(ret == NFR_UNICODE, "Expect %d, got %Id\n", NFR_UNICODE, ret);
DestroyWindow(parent); } @@ -688,9 +688,9 @@ static LRESULT WINAPI test_notify_proc(HWND hwnd, UINT message, WPARAM wParam, L if (!notify_test_info.unicode) break; ok(!notify_test_info.received, "Extra notification received\n");
- ok(wParam == notify_test_info.id_from, "Expect %ld, got %ld\n", notify_test_info.id_from, wParam); + ok(wParam == notify_test_info.id_from, "Expect %Id, got %Id\n", notify_test_info.id_from, wParam); ok(hdr->code == notify_test_info.ansi, "Expect 0x%08x, got 0x%08x\n", notify_test_info.ansi, hdr->code); - ok(hdr->idFrom == notify_test_info.id_from, "Expect %ld, got %ld\n", notify_test_info.id_from, wParam); + ok(hdr->idFrom == notify_test_info.id_from, "Expect %Id, got %Id\n", notify_test_info.id_from, wParam); ok(hdr->hwndFrom == notify_test_info.hwnd_from, "Expect %p, got %p\n", notify_test_info.hwnd_from, hdr->hwndFrom);
if (hdr->code != notify_test_info.ansi) @@ -1264,7 +1264,7 @@ static void test_wm_notify(void) INT i;
bret = register_test_notify_class(); - ok(bret, "Register test class failed, error 0x%08x\n", GetLastError()); + ok(bret, "Register test class failed, error 0x%08lx\n", GetLastError());
parent = CreateWindowA(class, "parent", WS_OVERLAPPED, 0, 0, 100, 100, 0, 0, GetModuleHandleA(0), 0); ok(parent != NULL, "CreateWindow failed\n"); diff --git a/dlls/comctl32/tests/progress.c b/dlls/comctl32/tests/progress.c index 91ea6eec2a9..b6716366498 100644 --- a/dlls/comctl32/tests/progress.c +++ b/dlls/comctl32/tests/progress.c @@ -222,22 +222,22 @@ static void test_setcolors(void) progress = create_progress(PBS_SMOOTH);
clr = SendMessageA(progress, PBM_SETBARCOLOR, 0, 0); - ok(clr == CLR_DEFAULT, "got %x\n", clr); + ok(clr == CLR_DEFAULT, "got %lx\n", clr);
clr = SendMessageA(progress, PBM_SETBARCOLOR, 0, RGB(0, 255, 0)); - ok(clr == 0, "got %x\n", clr); + ok(clr == 0, "got %lx\n", clr);
clr = SendMessageA(progress, PBM_SETBARCOLOR, 0, CLR_DEFAULT); - ok(clr == RGB(0, 255, 0), "got %x\n", clr); + ok(clr == RGB(0, 255, 0), "got %lx\n", clr);
clr = SendMessageA(progress, PBM_SETBKCOLOR, 0, 0); - ok(clr == CLR_DEFAULT, "got %x\n", clr); + ok(clr == CLR_DEFAULT, "got %lx\n", clr);
clr = SendMessageA(progress, PBM_SETBKCOLOR, 0, RGB(255, 0, 0)); - ok(clr == 0, "got %x\n", clr); + ok(clr == 0, "got %lx\n", clr);
clr = SendMessageA(progress, PBM_SETBKCOLOR, 0, CLR_DEFAULT); - ok(clr == RGB(255, 0, 0), "got %x\n", clr); + ok(clr == RGB(255, 0, 0), "got %lx\n", clr);
DestroyWindow(progress); } diff --git a/dlls/comctl32/tests/propsheet.c b/dlls/comctl32/tests/propsheet.c index 0284311c81b..8b2c282c72e 100644 --- a/dlls/comctl32/tests/propsheet.c +++ b/dlls/comctl32/tests/propsheet.c @@ -89,7 +89,7 @@ static int CALLBACK sheet_callback(HWND hwnd, UINT msg, LPARAM lparam) * Arabic Windows 10 allocates 2 * size - 32, * all others allocate exactly 2 * size */ ok(buffer_size >= 2 * size || broken(buffer_size == 2 * size - 32), - "Unexpected template buffer size %u, resource size %u\n", + "Unexpected template buffer size %lu, resource size %lu\n", buffer_size, size); break; } @@ -173,7 +173,7 @@ static void test_title(void) style = GetWindowLongA(hdlg, GWL_STYLE); ok(style == (WS_POPUP|WS_VISIBLE|WS_CLIPSIBLINGS|WS_CAPTION|WS_SYSMENU| DS_CONTEXTHELP|DS_MODALFRAME|DS_SETFONT|DS_3DLOOK), - "got unexpected style: %x\n", style); + "got unexpected style: %lx\n", style);
DestroyWindow(hdlg); } @@ -215,7 +215,7 @@ static void test_nopage(void) (HWND)SendMessageA(hdlg, PSM_GETCURRENTPAGEHWND, 0, 0); active_page = /* PropSheet_HwndToIndex(hdlg, hpage)); */ (int)SendMessageA(hdlg, PSM_HWNDTOINDEX, (WPARAM)hpage, 0); - ok(hpage == NULL, "expected no current page, got %p, index=%d\n", hpage, active_page); + ok(hpage == NULL, "expected no current page, got %p, index=%ld\n", hpage, active_page); flush_events(); RedrawWindow(hdlg,NULL,NULL,RDW_UPDATENOW|RDW_ERASENOW);
@@ -287,7 +287,7 @@ static void test_disableowner(void) psh.pfnCallback = disableowner_callback;
p = pPropertySheetA(&psh); - ok(p == 0, "Expected 0, got %ld\n", p); + ok(p == 0, "Expected 0, got %Id\n", p); ok(IsWindowEnabled(parenthwnd) != 0, "parent window should be enabled\n"); DestroyWindow(parenthwnd); } @@ -402,26 +402,26 @@ static void test_wiznavigation(void) hdlg = (HWND)pPropertySheetA(&psh); ok(hdlg != INVALID_HANDLE_VALUE, "got invalid handle %p\n", hdlg);
- ok(active_page == 0, "Active page should be 0. Is: %d\n", active_page); + ok(active_page == 0, "Active page should be 0. Is: %ld\n", active_page);
style = GetWindowLongA(hdlg, GWL_STYLE) & ~(DS_CONTEXTHELP|WS_SYSMENU); ok(style == (WS_POPUP|WS_VISIBLE|WS_CLIPSIBLINGS|WS_CAPTION| DS_MODALFRAME|DS_SETFONT|DS_3DLOOK), - "got unexpected style: %x\n", style); + "got unexpected style: %lx\n", style);
control = GetFocus(); controlID = GetWindowLongPtrA(control, GWLP_ID); - ok(controlID == nextID, "Focus should have been set to the Next button. Expected: %d, Found: %ld\n", nextID, controlID); + ok(controlID == nextID, "Focus should have been set to the Next button. Expected: %d, Found: %Id\n", nextID, controlID);
/* simulate pressing the Next button */ SendMessageA(hdlg, PSM_PRESSBUTTON, PSBTN_NEXT, 0); if (!active_page) hwndtoindex_supported = FALSE; if (hwndtoindex_supported) - ok(active_page == 1, "Active page should be 1 after pressing Next. Is: %d\n", active_page); + ok(active_page == 1, "Active page should be 1 after pressing Next. Is: %ld\n", active_page);
control = GetFocus(); controlID = GetWindowLongPtrA(control, GWLP_ID); - ok(controlID == IDC_PS_EDIT1, "Focus should be set to the first item on the second page. Expected: %d, Found: %ld\n", IDC_PS_EDIT1, controlID); + ok(controlID == IDC_PS_EDIT1, "Focus should be set to the first item on the second page. Expected: %d, Found: %Id\n", IDC_PS_EDIT1, controlID);
defidres = SendMessageA(hdlg, DM_GETDEFID, 0, 0); ok(defidres == MAKELRESULT(nextID, DC_HASDEFID), "Expected default button ID to be %d, is %d\n", nextID, LOWORD(defidres)); @@ -432,20 +432,20 @@ static void test_wiznavigation(void) /* press next again */ SendMessageA(hdlg, PSM_PRESSBUTTON, PSBTN_NEXT, 0); if (hwndtoindex_supported) - ok(active_page == 2, "Active page should be 2 after pressing Next. Is: %d\n", active_page); + ok(active_page == 2, "Active page should be 2 after pressing Next. Is: %ld\n", active_page);
control = GetFocus(); controlID = GetWindowLongPtrA(control, GWLP_ID); - ok(controlID == IDC_PS_RADIO1, "Focus should have been set to item on third page. Expected: %d, Found %ld\n", IDC_PS_RADIO1, controlID); + ok(controlID == IDC_PS_RADIO1, "Focus should have been set to item on third page. Expected: %d, Found %Id\n", IDC_PS_RADIO1, controlID);
/* back button */ SendMessageA(hdlg, PSM_PRESSBUTTON, PSBTN_BACK, 0); if (hwndtoindex_supported) - ok(active_page == 1, "Active page should be 1 after pressing Back. Is: %d\n", active_page); + ok(active_page == 1, "Active page should be 1 after pressing Back. Is: %ld\n", active_page);
control = GetFocus(); controlID = GetWindowLongPtrA(control, GWLP_ID); - ok(controlID == IDC_PS_EDIT1, "Focus should have been set to the first item on second page. Expected: %d, Found %ld\n", IDC_PS_EDIT1, controlID); + ok(controlID == IDC_PS_EDIT1, "Focus should have been set to the first item on second page. Expected: %d, Found %Id\n", IDC_PS_EDIT1, controlID);
defidres = SendMessageA(hdlg, DM_GETDEFID, 0, 0); ok(defidres == MAKELRESULT(backID, DC_HASDEFID), "Expected default button ID to be %d, is %d\n", backID, LOWORD(defidres)); @@ -453,20 +453,20 @@ static void test_wiznavigation(void) /* press next twice */ SendMessageA(hdlg, PSM_PRESSBUTTON, PSBTN_NEXT, 0); if (hwndtoindex_supported) - ok(active_page == 2, "Active page should be 2 after pressing Next. Is: %d\n", active_page); + ok(active_page == 2, "Active page should be 2 after pressing Next. Is: %ld\n", active_page); SendMessageA(hdlg, PSM_PRESSBUTTON, PSBTN_NEXT, 0); if (hwndtoindex_supported) - ok(active_page == 3, "Active page should be 3 after pressing Next. Is: %d\n", active_page); + ok(active_page == 3, "Active page should be 3 after pressing Next. Is: %ld\n", active_page); else active_page = 3;
control = GetFocus(); controlID = GetWindowLongPtrA(control, GWLP_ID); - ok(controlID == nextID, "Focus should have been set to the Next button. Expected: %d, Found: %ld\n", nextID, controlID); + ok(controlID == nextID, "Focus should have been set to the Next button. Expected: %d, Found: %Id\n", nextID, controlID);
/* try to navigate away, but shouldn't be able to */ SendMessageA(hdlg, PSM_PRESSBUTTON, PSBTN_BACK, 0); - ok(active_page == 3, "Active page should still be 3 after pressing Back. Is: %d\n", active_page); + ok(active_page == 3, "Active page should still be 3 after pressing Back. Is: %ld\n", active_page);
defidres = SendMessageA(hdlg, DM_GETDEFID, 0, 0); ok(defidres == MAKELRESULT(nextID, DC_HASDEFID), "Expected default button ID to be %d, is %d\n", nextID, LOWORD(defidres)); @@ -892,34 +892,34 @@ if (0) tab = (HWND)SendMessageA(hdlg, PSM_GETTABCONTROL, 0, 0);
r = SendMessageA(tab, TCM_GETITEMCOUNT, 0, 0); - ok(r == 2, "got %d\n", r); + ok(r == 2, "got %ld\n", r);
ret = SendMessageA(hdlg, PSM_ADDPAGE, 0, (LPARAM)hpsp[2]); ok(ret == TRUE, "got %d\n", ret);
r = SendMessageA(tab, TCM_GETITEMCOUNT, 0, 0); - ok(r == 3, "got %d\n", r); + ok(r == 3, "got %ld\n", r);
/* add property sheet page that can't be created */ ret = SendMessageA(hdlg, PSM_ADDPAGE, 0, (LPARAM)hpsp[3]); ok(ret == TRUE, "got %d\n", ret);
r = SendMessageA(tab, TCM_GETITEMCOUNT, 0, 0); - ok(r == 4, "got %d\n", r); + ok(r == 4, "got %ld\n", r);
/* select page that can't be created */ ret = SendMessageA(hdlg, PSM_SETCURSEL, 3, 1); ok(ret == TRUE, "got %d\n", ret);
r = SendMessageA(tab, TCM_GETITEMCOUNT, 0, 0); - ok(r == 3, "got %d\n", r); + ok(r == 3, "got %ld\n", r);
/* test PSP_PREMATURE flag with incorrect property sheet page */ ret = SendMessageA(hdlg, PSM_ADDPAGE, 0, (LPARAM)hpsp[4]); ok(ret == FALSE, "got %d\n", ret);
r = SendMessageA(tab, TCM_GETITEMCOUNT, 0, 0); - ok(r == 3, "got %d\n", r); + ok(r == 3, "got %ld\n", r);
pDestroyPropertySheetPage(hpsp[4]); DestroyWindow(hdlg); @@ -986,34 +986,34 @@ if (0) tab = (HWND)SendMessageA(hdlg, PSM_GETTABCONTROL, 0, 0);
r = SendMessageA(tab, TCM_GETITEMCOUNT, 0, 0); - ok(r == 2, "got %d\n", r); + ok(r == 2, "got %ld\n", r);
ret = SendMessageA(hdlg, PSM_INSERTPAGE, (WPARAM)hpsp[1], (LPARAM)hpsp[2]); ok(ret == TRUE, "got %d\n", ret);
r = SendMessageA(tab, TCM_GETITEMCOUNT, 0, 0); - ok(r == 3, "got %d\n", r); + ok(r == 3, "got %ld\n", r);
/* add property sheet page that can't be created */ ret = SendMessageA(hdlg, PSM_INSERTPAGE, 1, (LPARAM)hpsp[3]); ok(ret == TRUE, "got %d\n", ret);
r = SendMessageA(tab, TCM_GETITEMCOUNT, 0, 0); - ok(r == 4, "got %d\n", r); + ok(r == 4, "got %ld\n", r);
/* select page that can't be created */ ret = SendMessageA(hdlg, PSM_SETCURSEL, 1, 0); ok(ret == TRUE, "got %d\n", ret);
r = SendMessageA(tab, TCM_GETITEMCOUNT, 0, 0); - ok(r == 3, "got %d\n", r); + ok(r == 3, "got %ld\n", r);
/* test PSP_PREMATURE flag with incorrect property sheet page */ ret = SendMessageA(hdlg, PSM_INSERTPAGE, 0, (LPARAM)hpsp[4]); ok(ret == FALSE, "got %d\n", ret);
r = SendMessageA(tab, TCM_GETITEMCOUNT, 0, 0); - ok(r == 3, "got %d\n", r); + ok(r == 3, "got %ld\n", r);
pDestroyPropertySheetPage(hpsp[4]); DestroyWindow(hdlg); @@ -1037,7 +1037,7 @@ static UINT CALLBACK proppage_callback_a(HWND hwnd, UINT msg, PROPSHEETPAGEA *ps
ok(hwnd == NULL, "Expected NULL hwnd, got %p\n", hwnd);
- ok(psp->lParam && psp->lParam != (LPARAM)psp, "Expected newly allocated page description, got %lx, %p\n", + ok(psp->lParam && psp->lParam != (LPARAM)psp, "Expected newly allocated page description, got %Ix, %p\n", psp->lParam, psp); ok(psp_orig->pszTitle == psp->pszTitle, "Expected same page title pointer\n"); ok(!lstrcmpA(psp_orig->pszTitle, psp->pszTitle), "Expected same page title string\n"); @@ -1045,11 +1045,11 @@ static UINT CALLBACK proppage_callback_a(HWND hwnd, UINT msg, PROPSHEETPAGEA *ps switch (msg) { case PSPCB_ADDREF: - ok(psp->dwSize > PROPSHEETPAGEA_V1_SIZE, "Expected ADDREF for V2+ only, got size %u\n", psp->dwSize); + ok(psp->dwSize > PROPSHEETPAGEA_V1_SIZE, "Expected ADDREF for V2+ only, got size %lu\n", psp->dwSize); cpage->addref_called++; break; case PSPCB_RELEASE: - ok(psp->dwSize >= PROPSHEETPAGEA_V1_SIZE, "Unexpected RELEASE, got size %u\n", psp->dwSize); + ok(psp->dwSize >= PROPSHEETPAGEA_V1_SIZE, "Unexpected RELEASE, got size %lu\n", psp->dwSize); cpage->release_called++; break; default: @@ -1065,7 +1065,7 @@ static UINT CALLBACK proppage_callback_w(HWND hwnd, UINT msg, PROPSHEETPAGEW *ps PROPSHEETPAGEW *psp_orig = &cpage->u.pageW;
ok(hwnd == NULL, "Expected NULL hwnd, got %p\n", hwnd); - ok(psp->lParam && psp->lParam != (LPARAM)psp, "Expected newly allocated page description, got %lx, %p\n", + ok(psp->lParam && psp->lParam != (LPARAM)psp, "Expected newly allocated page description, got %Ix, %p\n", psp->lParam, psp); ok(psp_orig->pszTitle == psp->pszTitle, "Expected same page title pointer\n"); ok(!lstrcmpW(psp_orig->pszTitle, psp->pszTitle), "Expected same page title string\n"); @@ -1073,11 +1073,11 @@ static UINT CALLBACK proppage_callback_w(HWND hwnd, UINT msg, PROPSHEETPAGEW *ps switch (msg) { case PSPCB_ADDREF: - ok(psp->dwSize > PROPSHEETPAGEW_V1_SIZE, "Expected ADDREF for V2+ only, got size %u\n", psp->dwSize); + ok(psp->dwSize > PROPSHEETPAGEW_V1_SIZE, "Expected ADDREF for V2+ only, got size %lu\n", psp->dwSize); cpage->addref_called++; break; case PSPCB_RELEASE: - ok(psp->dwSize >= PROPSHEETPAGEW_V1_SIZE, "Unexpected RELEASE, got size %u\n", psp->dwSize); + ok(psp->dwSize >= PROPSHEETPAGEW_V1_SIZE, "Unexpected RELEASE, got size %lu\n", psp->dwSize); cpage->release_called++; break; default: @@ -1107,10 +1107,10 @@ static void test_CreatePropertySheetPage(void) hpsp = pCreatePropertySheetPageA(&page.u.pageA);
if (page.u.pageA.dwSize < PROPSHEETPAGEA_V1_SIZE) - ok(hpsp == NULL, "Expected failure, size %u\n", page.u.pageA.dwSize); + ok(hpsp == NULL, "Expected failure, size %lu\n", page.u.pageA.dwSize); else { - ok(hpsp != NULL, "Failed to create a page, size %u\n", page.u.pageA.dwSize); + ok(hpsp != NULL, "Failed to create a page, size %lu\n", page.u.pageA.dwSize); ok(page.addref_called == (page.u.pageA.dwSize > PROPSHEETPAGEA_V1_SIZE) ? 1 : 0, "Expected ADDREF callback message\n"); }
@@ -1136,10 +1136,10 @@ static void test_CreatePropertySheetPage(void) hpsp = pCreatePropertySheetPageW(&page.u.pageW);
if (page.u.pageW.dwSize < PROPSHEETPAGEW_V1_SIZE) - ok(hpsp == NULL, "Expected failure, size %u\n", page.u.pageW.dwSize); + ok(hpsp == NULL, "Expected failure, size %lu\n", page.u.pageW.dwSize); else { - ok(hpsp != NULL, "Failed to create a page, size %u\n", page.u.pageW.dwSize); + ok(hpsp != NULL, "Failed to create a page, size %lu\n", page.u.pageW.dwSize); ok(page.addref_called == (page.u.pageW.dwSize > PROPSHEETPAGEW_V1_SIZE) ? 1 : 0, "Expected ADDREF callback message\n"); }
@@ -1176,7 +1176,7 @@ static void test_bad_control_class(void) U3(psh).phpage = &hpsp;
ret = pPropertySheetA(&psh); - ok(ret == 0, "got %ld\n", ret); + ok(ret == 0, "got %Id\n", ret);
/* Need to recreate hpsp otherwise the test fails under Windows */ hpsp = pCreatePropertySheetPageA(&psp); @@ -1185,9 +1185,9 @@ static void test_bad_control_class(void)
psh.dwFlags = PSH_MODELESS; ret = pPropertySheetA(&psh); - ok(ret != 0, "got %ld\n", ret); + ok(ret != 0, "got %Id\n", ret);
- ok(IsWindow((HWND)ret), "bad window handle %#lx\n", ret); + ok(IsWindow((HWND)ret), "bad window handle %#Ix\n", ret); DestroyWindow((HWND)ret); }
@@ -1236,7 +1236,7 @@ static void test_page_dialog_texture(void)
/* Test that page dialog procedure is unchanged */ dlgproc = GetWindowLongPtrA(sheethwnd, DWLP_DLGPROC); - ok(dlgproc == (ULONG_PTR)test_WM_CTLCOLORSTATIC_proc, "Unexpected dlgproc %#lx.\n", dlgproc); + ok(dlgproc == (ULONG_PTR)test_WM_CTLCOLORSTATIC_proc, "Unexpected dlgproc %#Ix.\n", dlgproc);
/* Test that theme dialog texture is enabled for comctl32 v6, even when theming is off */ ret = pIsThemeDialogTextureEnabled(sheethwnd); @@ -1244,7 +1244,7 @@ static void test_page_dialog_texture(void) ok(ret == is_v6, "Wrong theme dialog texture status.\n");
hwnd = CreateWindowA(WC_EDITA, "child", WS_POPUP | WS_VISIBLE, 1, 2, 50, 50, 0, 0, 0, NULL); - ok(hwnd != NULL, "CreateWindowA failed, error %d.\n", GetLastError()); + ok(hwnd != NULL, "CreateWindowA failed, error %ld.\n", GetLastError()); hdc = GetDC(hwnd);
hbrush = (HBRUSH)SendMessageW(sheethwnd, WM_CTLCOLORSTATIC, (WPARAM)hdc, (LPARAM)hwnd); diff --git a/dlls/comctl32/tests/rebar.c b/dlls/comctl32/tests/rebar.c index 8f51a1f9175..c15b22aeca1 100644 --- a/dlls/comctl32/tests/rebar.c +++ b/dlls/comctl32/tests/rebar.c @@ -930,8 +930,8 @@ static void expect_band_content_(int line, HWND hRebar, UINT uBand, INT fStyle, rb.cch = MAX_PATH; ok(SendMessageA(hRebar, RB_GETBANDINFOA, uBand, (LPARAM)&rb), "RB_GETBANDINFOA failed from line %d\n", line); expect_eq(line, rb.fStyle, fStyle, int, "%x"); - expect_eq(line, rb.clrFore, clrFore, COLORREF, "%x"); - expect_eq(line, rb.clrBack, clrBack, COLORREF, "%x"); + expect_eq(line, rb.clrFore, clrFore, COLORREF, "%lx"); + expect_eq(line, rb.clrBack, clrBack, COLORREF, "%lx"); expect_eq(line, strcmp(rb.lpText, lpText), 0, int, "%d"); expect_eq(line, rb.iImage, iImage, int, "%x"); expect_eq(line, rb.hwndChild, hwndChild, HWND, "%p"); @@ -945,7 +945,7 @@ static void expect_band_content_(int line, HWND hRebar, UINT uBand, INT fStyle, expect_eq(line, rb.cyMaxChild, cyMaxChild, int, "%x"); expect_eq(line, rb.cyIntegral, cyIntegral, int, "%x"); expect_eq(line, rb.cxIdeal, cxIdeal, int, "%d"); - expect_eq(line, rb.lParam, lParam, LPARAM, "%ld"); + expect_eq(line, rb.lParam, lParam, LPARAM, "%Id"); ok(rb.cxHeader == cxHeader || rb.cxHeader == cxHeader + 1 || broken(rb.cxHeader == cxHeader_broken), "expected %d for %d from line %d\n", cxHeader, rb.cxHeader, line); } @@ -1029,9 +1029,9 @@ static void test_colors(void)
/* test default colors */ clr = SendMessageA(hRebar, RB_GETTEXTCOLOR, 0, 0); - compare(clr, (COLORREF)CLR_NONE, "%x"); + compare(clr, CLR_NONE, "%lx"); clr = SendMessageA(hRebar, RB_GETBKCOLOR, 0, 0); - compare(clr, (COLORREF)CLR_NONE, "%x"); + compare(clr, CLR_NONE, "%lx");
scheme.dwSize = sizeof(scheme); scheme.clrBtnHighlight = 0; @@ -1039,8 +1039,8 @@ static void test_colors(void) ret = SendMessageA(hRebar, RB_GETCOLORSCHEME, 0, (LPARAM)&scheme); if (ret) { - compare(scheme.clrBtnHighlight, (COLORREF)CLR_DEFAULT, "%x"); - compare(scheme.clrBtnShadow, (COLORREF)CLR_DEFAULT, "%x"); + compare(scheme.clrBtnHighlight, CLR_DEFAULT, "%lx"); + compare(scheme.clrBtnShadow, CLR_DEFAULT, "%lx"); } else skip("RB_GETCOLORSCHEME not supported\n"); @@ -1052,14 +1052,14 @@ static void test_colors(void) bi.clrFore = bi.clrBack = 0xc0ffe; ret = SendMessageA(hRebar, RB_GETBANDINFOA, 0, (LPARAM)&bi); ok(ret, "RB_GETBANDINFOA failed\n"); - compare(bi.clrFore, RGB(0, 0, 0), "%x"); - compare(bi.clrBack, GetSysColor(COLOR_3DFACE), "%x"); + compare(bi.clrFore, RGB(0, 0, 0), "%lx"); + compare(bi.clrBack, GetSysColor(COLOR_3DFACE), "%lx");
SendMessageA(hRebar, RB_SETTEXTCOLOR, 0, RGB(255, 0, 0)); bi.clrFore = bi.clrBack = 0xc0ffe; ret = SendMessageA(hRebar, RB_GETBANDINFOA, 0, (LPARAM)&bi); ok(ret, "RB_GETBANDINFOA failed\n"); - compare(bi.clrFore, RGB(0, 0, 0), "%x"); + compare(bi.clrFore, RGB(0, 0, 0), "%lx");
DestroyWindow(hRebar); } diff --git a/dlls/comctl32/tests/static.c b/dlls/comctl32/tests/static.c index 0038cadd7d2..b8f43142d6b 100644 --- a/dlls/comctl32/tests/static.c +++ b/dlls/comctl32/tests/static.c @@ -283,10 +283,10 @@ static void test_STM_SETIMAGE(void)
for (type = SS_LEFT; type < SS_ETCHEDFRAME; type++) { - winetest_push_context("%u", type); + winetest_push_context("%lu", type);
hwnd = create_static(type); - ok(hwnd != 0, "failed to create static type %#x\n", type); + ok(hwnd != 0, "failed to create static type %#lx\n", type);
/* set icon */ g_nReceivedColorStatic = 0; diff --git a/dlls/comctl32/tests/status.c b/dlls/comctl32/tests/status.c index 64313218e31..1851507481f 100644 --- a/dlls/comctl32/tests/status.c +++ b/dlls/comctl32/tests/status.c @@ -25,7 +25,12 @@
#define SUBCLASS_NAME "MyStatusBar"
-#define expect(expected,got) ok (expected == got,"Expected %d, got %d\n",expected,got) +#define expect(expected,got) expect_(__LINE__, expected, got) +static inline void expect_(unsigned line, DWORD expected, DWORD got) +{ + ok_(__FILE__, line)(expected == got, "Expected %ld, got %ld\n", expected, got); +} + #define expect_rect(_left,_top,_right,_bottom,got) do { \ RECT exp = {abs(got.left - _left), abs(got.top - _top), \ abs(got.right - _right), abs(got.bottom - _bottom)}; \ @@ -145,7 +150,7 @@ static int CALLBACK check_height_font_enumproc(ENUMLOGFONTEXA *enumlf, NEWTEXTME y = tm.tmHeight + (tm.tmInternalLeading ? tm.tmInternalLeading : 2) + 4;
ok( (rcCtrl.bottom == max(y, g_ysize)) || (rcCtrl.bottom == max(y, g_dpisize)), - "got %d (expected %d or %d) for %s #%d\n", + "got %ld (expected %d or %d) for %s #%d\n", rcCtrl.bottom, max(y, g_ysize), max(y, g_dpisize), facename, sizes[i]);
SelectObject(hdc, hOldFont); @@ -370,11 +375,11 @@ static void test_status_control(void) crColor = SendMessageA(hWndStatus, SB_SETBKCOLOR , 0, RGB(255,0,0)); ok(crColor == CLR_DEFAULT || broken(crColor == RGB(0,0,0)), /* win95 */ - "Expected 0x%.8lx, got 0x%.8x\n", CLR_DEFAULT, crColor); + "Expected 0x%.8lx, got 0x%.8lx\n", CLR_DEFAULT, crColor); crColor = SendMessageA(hWndStatus, SB_SETBKCOLOR , 0, CLR_DEFAULT); ok(crColor == RGB(255,0,0) || broken(crColor == RGB(0,0,0)), /* win95 */ - "Expected 0x%.8x, got 0x%.8x\n", RGB(255,0,0), crColor); + "Expected 0x%.8lx, got 0x%.8lx\n", RGB(255,0,0), crColor);
/* Add an icon to the status bar */ hIcon = LoadIconA(NULL, (LPCSTR)IDI_QUESTION); diff --git a/dlls/comctl32/tests/subclass.c b/dlls/comctl32/tests/subclass.c index b2b47319b16..439d61a83c8 100644 --- a/dlls/comctl32/tests/subclass.c +++ b/dlls/comctl32/tests/subclass.c @@ -155,7 +155,7 @@ static void ok_sequence(const struct message *expected, const char *context) "%s: the procnum %d was expected, but got procnum %d instead\n", context, expected->procnum, actual->procnum); ok(expected->wParam == actual->wParam, - "%s: in procnum %d expecting wParam 0x%lx got 0x%lx\n", + "%s: in procnum %d expecting wParam 0x%Ix got 0x%Ix\n", context, expected->procnum, expected->wParam, actual->wParam); expected++; actual++; diff --git a/dlls/comctl32/tests/syslink.c b/dlls/comctl32/tests/syslink.c index 7f3e19fc670..d5192c26b5c 100644 --- a/dlls/comctl32/tests/syslink.c +++ b/dlls/comctl32/tests/syslink.c @@ -184,7 +184,7 @@ static void test_create_syslink(void) /* Create an invisible SysLink control */ flush_sequences(sequences, NUM_MSG_SEQUENCE); hWndSysLink = create_syslink(WS_CHILD | WS_TABSTOP, hWndParent); - ok(hWndSysLink != NULL, "Expected non NULL value (le %u)\n", GetLastError()); + ok(hWndSysLink != NULL, "Expected non NULL value (le %lu)\n", GetLastError()); flush_events(); ok_sequence(sequences, SYSLINK_SEQ_INDEX, empty_wnd_seq, "create SysLink", FALSE); ok_sequence(sequences, PARENT_SEQ_INDEX, parent_create_syslink_wnd_seq, "create SysLink (parent)", TRUE); @@ -210,7 +210,7 @@ static void test_LM_GETIDEALHEIGHT(void) ok(hwnd != NULL, "Failed to create SysLink window.\n");
ret = SendMessageA(hwnd, LM_GETIDEALHEIGHT, 0, 0); - ok(ret > 0, "Unexpected ideal height, %d.\n", ret); + ok(ret > 0, "Unexpected ideal height, %ld.\n", ret);
DestroyWindow(hwnd); } @@ -226,13 +226,13 @@ static void test_LM_GETIDEALSIZE(void)
memset(&sz, 0, sizeof(sz)); ret = SendMessageA(hwnd, LM_GETIDEALSIZE, 0, (LPARAM)&sz); - ok(ret > 0, "Unexpected return value, %d.\n", ret); + ok(ret > 0, "Unexpected return value, %ld.\n", ret); if (sz.cy == 0) win_skip("LM_GETIDEALSIZE is not supported.\n"); else { - ok(sz.cx > 5, "Unexpected ideal width, %d.\n", sz.cx); - ok(sz.cy == ret, "Unexpected ideal height, %d.\n", sz.cy); + ok(sz.cx > 5, "Unexpected ideal width, %ld.\n", sz.cx); + ok(sz.cy == ret, "Unexpected ideal height, %ld.\n", sz.cy); }
DestroyWindow(hwnd); diff --git a/dlls/comctl32/tests/tab.c b/dlls/comctl32/tests/tab.c index c5d57af114d..67dea94b55c 100644 --- a/dlls/comctl32/tests/tab.c +++ b/dlls/comctl32/tests/tab.c @@ -37,7 +37,7 @@ #define expect(expected,got) expect_(__LINE__, expected, got) static inline void expect_(unsigned line, DWORD expected, DWORD got) { - ok_(__FILE__, line)(expected == got, "Expected %d, got %d\n", expected, got); + ok_(__FILE__, line)(expected == got, "Expected %ld, got %ld\n", expected, got); }
#define expect_str(expected, got)\ @@ -56,14 +56,14 @@ static void CheckSize(HWND hwnd, INT width, INT height, const char *msg, int lin
SendMessageA(hwnd, TCM_GETITEMRECT, 0, (LPARAM)&r); if (width >= 0 && height < 0) - ok_(__FILE__,line) (width == r.right - r.left, "%s: Expected width [%d] got [%d]\n", + ok_(__FILE__,line) (width == r.right - r.left, "%s: Expected width [%d] got [%ld]\n", msg, width, r.right - r.left); else if (height >= 0 && width < 0) - ok_(__FILE__,line) (height == r.bottom - r.top, "%s: Expected height [%d] got [%d]\n", + ok_(__FILE__,line) (height == r.bottom - r.top, "%s: Expected height [%d] got [%ld]\n", msg, height, r.bottom - r.top); else ok_(__FILE__,line) ((width == r.right - r.left) && (height == r.bottom - r.top ), - "%s: Expected [%d,%d] got [%d,%d]\n", msg, width, height, + "%s: Expected [%d,%d] got [%ld,%ld]\n", msg, width, height, r.right - r.left, r.bottom - r.top); }
@@ -461,7 +461,7 @@ static void test_tab(INT nMinTabWidth) dpi = GetDeviceCaps(hdc, LOGPIXELSX); hOldFont = SelectObject(hdc, (HFONT)SendMessageA(hwTab, WM_GETFONT, 0, 0)); GetTextExtentPoint32A(hdc, "Tab 1", strlen("Tab 1"), &size); - trace("Tab1 text size: size.cx=%d size.cy=%d\n", size.cx, size.cy); + trace("Tab1 text size: size.cx=%ld size.cy=%ld\n", size.cx, size.cy); SelectObject(hdc, hOldFont); ReleaseDC(hwTab, hdc);
@@ -532,7 +532,7 @@ static void test_tab(INT nMinTabWidth) exp = max(size.cx +TAB_PADDING_X*2, (nMinTabWidth < 0) ? DEFAULT_MIN_TAB_WIDTH : nMinTabWidth); SendMessageA( hwTab, TCM_GETITEMRECT, 0, (LPARAM)&rTab ); ok( rTab.right - rTab.left == exp || broken(rTab.right - rTab.left == DEFAULT_MIN_TAB_WIDTH), - "no icon, default width: Expected width [%d] got [%d]\n", exp, rTab.right - rTab.left ); + "no icon, default width: Expected width [%d] got [%ld]\n", exp, rTab.right - rTab.left );
for (i=0; i<8; i++) { @@ -560,7 +560,7 @@ static void test_tab(INT nMinTabWidth) exp = (nMinTabWidth < 0) ? DEFAULT_MIN_TAB_WIDTH : nMinTabWidth; SendMessageA( hwTab, TCM_GETITEMRECT, 0, (LPARAM)&rTab ); ok( rTab.right - rTab.left == exp || broken(rTab.right - rTab.left == DEFAULT_MIN_TAB_WIDTH), - "no icon, default width: Expected width [%d] got [%d]\n", exp, rTab.right - rTab.left ); + "no icon, default width: Expected width [%d] got [%ld]\n", exp, rTab.right - rTab.left );
for (i=0; i<8; i++) { @@ -830,14 +830,14 @@ static void test_getset_item(void) ok(GetParent(hTab) == NULL, "got %p, expected null parent\n", GetParent(hTab));
ret = SendMessageA(hTab, TCM_SETITEMEXTRA, sizeof(LPARAM)-1, 0); - ok(ret == TRUE, "got %d\n", ret); + ok(ret == TRUE, "got %ld\n", ret);
/* set some item data */ tcItem.lParam = ~0; tcItem.mask = TCIF_PARAM;
ret = SendMessageA(hTab, TCM_INSERTITEMA, 0, (LPARAM)&tcItem); - ok(ret == 0, "got %d\n", ret); + ok(ret == 0, "got %ld\n", ret);
/* all sizeof(LPARAM) returned anyway when using sizeof(LPARAM)-1 size */ memset(&lparam, 0xaa, sizeof(lparam)); @@ -847,7 +847,7 @@ static void test_getset_item(void) expect(TRUE, ret); /* everything higher specified size is preserved */ memset(&lparam, 0xff, sizeof(lparam)-1); - ok(tcItem.lParam == lparam, "Expected 0x%lx, got 0x%lx\n", lparam, tcItem.lParam); + ok(tcItem.lParam == lparam, "Expected 0x%Ix, got 0x%Ix\n", lparam, tcItem.lParam);
DestroyWindow(hTab);
@@ -862,7 +862,7 @@ static void test_getset_item(void) tcItem.mask = TCIF_PARAM; ret = SendMessageA(hTab, TCM_GETITEMA, 5, (LPARAM)&tcItem); expect(FALSE, ret); - ok(tcItem.lParam == 0, "Expected zero lParam, got %lu\n", tcItem.lParam); + ok(tcItem.lParam == 0, "Expected zero lParam, got %Iu\n", tcItem.lParam);
memset(&tcItem, 0xcc, sizeof(tcItem)); tcItem.mask = TCIF_IMAGE; @@ -899,13 +899,13 @@ static void test_getset_item(void) tcItem.mask = TCIF_PARAM; ret = SendMessageA(hTab, TCM_GETITEMA, -1, (LPARAM)&tcItem); expect(FALSE, ret); - ok(tcItem.lParam == 0, "Expected zero lParam, got %lu\n", tcItem.lParam); + ok(tcItem.lParam == 0, "Expected zero lParam, got %Iu\n", tcItem.lParam);
memset(&tcItem, 0xcc, sizeof(tcItem)); tcItem.mask = TCIF_PARAM; ret = SendMessageA(hTab, TCM_GETITEMA, -2, (LPARAM)&tcItem); expect(FALSE, ret); - ok(tcItem.lParam == 0, "Expected zero lParam, got %lu\n", tcItem.lParam); + ok(tcItem.lParam == 0, "Expected zero lParam, got %Iu\n", tcItem.lParam);
flush_sequences(sequences, NUM_MSG_SEQUENCES);
@@ -1227,10 +1227,10 @@ static void test_TCM_SETITEMEXTRA(void) }
ret = SendMessageA(hTab, TCM_SETITEMEXTRA, -1, 0); - ok(ret == FALSE, "got %d\n", ret); + ok(ret == FALSE, "got %ld\n", ret);
ret = SendMessageA(hTab, TCM_SETITEMEXTRA, 2, 0); - ok(ret == TRUE, "got %d\n", ret); + ok(ret == TRUE, "got %ld\n", ret); DestroyWindow(hTab);
/* it's not possible to change extra data size for control with tabs */ @@ -1238,7 +1238,7 @@ static void test_TCM_SETITEMEXTRA(void) ok(hTab != NULL, "Failed to create tab control\n");
ret = SendMessageA(hTab, TCM_SETITEMEXTRA, 2, 0); - ok(ret == FALSE, "got %d\n", ret); + ok(ret == FALSE, "got %ld\n", ret); DestroyWindow(hTab); }
@@ -1270,7 +1270,7 @@ static void test_TCS_OWNERDRAWFIXED(void)
itemdata = 0; memset(&itemdata, 0xde, 4); - ok(g_drawitem.itemData == itemdata, "got 0x%lx, expected 0x%lx\n", g_drawitem.itemData, itemdata); + ok(g_drawitem.itemData == itemdata, "got 0x%Ix, expected 0x%Ix\n", g_drawitem.itemData, itemdata);
DestroyWindow(hTab);
@@ -1301,7 +1301,7 @@ static void test_TCS_OWNERDRAWFIXED(void) RedrawWindow(hTab, NULL, 0, RDW_UPDATENOW);
memset(&itemdata, 0xde, sizeof(ULONG_PTR)); - ok(*(ULONG_PTR*)g_drawitem.itemData == itemdata, "got 0x%lx, expected 0x%lx\n", g_drawitem.itemData, itemdata); + ok(*(ULONG_PTR*)g_drawitem.itemData == itemdata, "got 0x%Ix, expected 0x%Ix\n", g_drawitem.itemData, itemdata);
DestroyWindow(hTab);
@@ -1334,7 +1334,7 @@ static void test_TCS_OWNERDRAWFIXED(void) memset(&itemdata, 0xde, 4); memset(&itemdata2, 0xde, sizeof(LPARAM)-1); ok(g_drawitem.itemData == itemdata || broken(g_drawitem.itemData == itemdata2) /* win98 */, - "got 0x%lx, expected 0x%lx\n", g_drawitem.itemData, itemdata); + "got 0x%Ix, expected 0x%Ix\n", g_drawitem.itemData, itemdata);
DestroyWindow(hTab); } @@ -1378,7 +1378,7 @@ static void test_create(void) hTab = CreateWindowA(WC_TABCONTROLA, "TestTab", ptr->style, 10, 10, 300, 100, parent_wnd, NULL, NULL, 0); style = GetWindowLongA(hTab, GWL_STYLE); - ok(style == ptr->act_style, "expected style 0x%08x, got style 0x%08x\n", ptr->act_style, style); + ok(style == ptr->act_style, "expected style 0x%08lx, got style 0x%08lx\n", ptr->act_style, style);
DestroyWindow(hTab); ptr++; diff --git a/dlls/comctl32/tests/taskdialog.c b/dlls/comctl32/tests/taskdialog.c index 9c0b8772a59..6a12b185639 100644 --- a/dlls/comctl32/tests/taskdialog.c +++ b/dlls/comctl32/tests/taskdialog.c @@ -417,7 +417,7 @@ static void run_test_(TASKDIALOGCONFIG *info, int expect_button, int expect_radi flush_sequences(sequences, NUM_MSG_SEQUENCES);
hr = pTaskDialogIndirect(info, &ret_button, &ret_radio, &ret_verification); - ok_(file, line)(hr == S_OK, "TaskDialogIndirect() failed, got %#x.\n", hr); + ok_(file, line)(hr == S_OK, "TaskDialogIndirect() failed, got %#lx.\n", hr);
ok_sequence_(sequences, TASKDIALOG_SEQ_INDEX, msg_start, context, FALSE, file, line); ok_(file, line)(ret_button == expect_button, @@ -437,7 +437,7 @@ static HRESULT CALLBACK taskdialog_callback_proc(HWND hwnd, UINT notification, const struct message_info *msg_send; struct message msg;
- ok(test_ref_data == ref_data, "Unexpected ref data %lu.\n", ref_data); + ok(test_ref_data == ref_data, "Unexpected ref data %Iu.\n", ref_data);
init_test_message(notification, (short)wParam, lParam, &msg); add_message(sequences, TASKDIALOG_SEQ_INDEX, &msg); @@ -458,19 +458,19 @@ static void test_invalid_parameters(void) HRESULT hr;
hr = pTaskDialogIndirect(NULL, NULL, NULL, NULL); - ok(hr == E_INVALIDARG, "Unexpected return value %#x.\n", hr); + ok(hr == E_INVALIDARG, "Unexpected return value %#lx.\n", hr);
info.cbSize = 0; hr = pTaskDialogIndirect(&info, NULL, NULL, NULL); - ok(hr == E_INVALIDARG, "Unexpected return value %#x.\n", hr); + ok(hr == E_INVALIDARG, "Unexpected return value %#lx.\n", hr);
info.cbSize = sizeof(TASKDIALOGCONFIG) - 1; hr = pTaskDialogIndirect(&info, NULL, NULL, NULL); - ok(hr == E_INVALIDARG, "Unexpected return value %#x.\n", hr); + ok(hr == E_INVALIDARG, "Unexpected return value %#lx.\n", hr);
info.cbSize = sizeof(TASKDIALOGCONFIG) + 1; hr = pTaskDialogIndirect(&info, NULL, NULL, NULL); - ok(hr == E_INVALIDARG, "Unexpected return value %#x.\n", hr); + ok(hr == E_INVALIDARG, "Unexpected return value %#lx.\n", hr); }
static void test_callback(void) @@ -729,9 +729,9 @@ static HRESULT CALLBACK taskdialog_callback_proc_progress_bar(HWND hwnd, UINT no
/* TDM_SET_PROGRESS_BAR_RANGE */ ret = SendMessageW(hwnd, TDM_SET_PROGRESS_BAR_RANGE, 0, MAKELPARAM(0, 200)); - ok(ret == MAKELONG(0, 100), "Expect range:%x got:%lx\n", MAKELONG(0, 100), ret); + ok(ret == MAKELONG(0, 100), "Expect range:%lx got:%lx\n", MAKELONG(0, 100), ret); ret = SendMessageW(hwnd, TDM_SET_PROGRESS_BAR_RANGE, 0, MAKELPARAM(0, 200)); - ok(ret == MAKELONG(0, 200), "Expect range:%x got:%lx\n", MAKELONG(0, 200), ret); + ok(ret == MAKELONG(0, 200), "Expect range:%lx got:%lx\n", MAKELONG(0, 200), ret);
/* TDM_SET_PROGRESS_BAR_POS */ if (flags & TDF_SHOW_MARQUEE_PROGRESS_BAR) diff --git a/dlls/comctl32/tests/toolbar.c b/dlls/comctl32/tests/toolbar.c index dcd95ffa4d8..80f9e067c00 100644 --- a/dlls/comctl32/tests/toolbar.c +++ b/dlls/comctl32/tests/toolbar.c @@ -216,7 +216,7 @@ static LRESULT parent_wnd_notify(LPARAM lParam) case TBN_GETDISPINFOW: nmdisp = (NMTBDISPINFOA *)lParam;
- compare(nmdisp->dwMask, g_dwExpectedDispInfoMask, "%x"); + compare(nmdisp->dwMask, g_dwExpectedDispInfoMask, "%lx"); ok(nmdisp->pszText == NULL, "pszText is not NULL\n"); break; case TBN_SAVE: @@ -260,7 +260,7 @@ static LRESULT parent_wnd_notify(LPARAM lParam) if (restore->iItem == -1) { ok( restore->cButtons == 25, "got %d\n", restore->cButtons ); - ok( *restore->pCurrent == 0xcafe, "got %08x\n", *restore->pCurrent ); + ok( *restore->pCurrent == 0xcafe, "got %08lx\n", *restore->pCurrent ); /* Skip the last one */ restore->cButtons = 11; restore->pCurrent++; @@ -269,7 +269,7 @@ static LRESULT parent_wnd_notify(LPARAM lParam) } else { - ok( *restore->pCurrent == 0xcafe0000 + restore->iItem, "got %08x\n", *restore->pCurrent ); + ok( *restore->pCurrent == 0xcafe0000 + restore->iItem, "got %08lx\n", *restore->pCurrent ); if (restore->iItem < 7 || restore->iItem == 10) { ok( restore->tbButton.iBitmap == -1, "got %08x\n", restore->tbButton.iBitmap ); @@ -291,8 +291,8 @@ static LRESULT parent_wnd_notify(LPARAM lParam) ok( restore->tbButton.fsStyle == BTNS_SEP, "%d: got %02x\n", restore->iItem, restore->tbButton.fsStyle ); }
- ok( restore->tbButton.dwData == 0, "got %08lx\n", restore->tbButton.dwData ); - ok( restore->tbButton.iString == 0, "got %08lx\n", restore->tbButton.iString ); + ok( restore->tbButton.dwData == 0, "got %08Ix\n", restore->tbButton.dwData ); + ok( restore->tbButton.iString == 0, "got %08Ix\n", restore->tbButton.iString );
restore->tbButton.iBitmap = 0; restore->tbButton.fsState = TBSTATE_ENABLED; @@ -467,12 +467,12 @@ static void basic_test(void) ok(SendMessageA(hToolbar, TB_ISBUTTONCHECKED, 1008, 0), "B3 pressed\n");
/* tests with invalid index */ - compare(SendMessageA(hToolbar, TB_ISBUTTONCHECKED, 0xdeadbeef, 0), -1L, "%ld"); - compare(SendMessageA(hToolbar, TB_ISBUTTONPRESSED, 0xdeadbeef, 0), -1L, "%ld"); - compare(SendMessageA(hToolbar, TB_ISBUTTONENABLED, 0xdeadbeef, 0), -1L, "%ld"); - compare(SendMessageA(hToolbar, TB_ISBUTTONINDETERMINATE, 0xdeadbeef, 0), -1L, "%ld"); - compare(SendMessageA(hToolbar, TB_ISBUTTONHIGHLIGHTED, 0xdeadbeef, 0), -1L, "%ld"); - compare(SendMessageA(hToolbar, TB_ISBUTTONHIDDEN, 0xdeadbeef, 0), -1L, "%ld"); + compare(SendMessageA(hToolbar, TB_ISBUTTONCHECKED, 0xdeadbeef, 0), (LRESULT)-1L, "%Id"); + compare(SendMessageA(hToolbar, TB_ISBUTTONPRESSED, 0xdeadbeef, 0), (LRESULT)-1L, "%Id"); + compare(SendMessageA(hToolbar, TB_ISBUTTONENABLED, 0xdeadbeef, 0), (LRESULT)-1L, "%Id"); + compare(SendMessageA(hToolbar, TB_ISBUTTONINDETERMINATE, 0xdeadbeef, 0), (LRESULT)-1L, "%Id"); + compare(SendMessageA(hToolbar, TB_ISBUTTONHIGHLIGHTED, 0xdeadbeef, 0), (LRESULT)-1L, "%Id"); + compare(SendMessageA(hToolbar, TB_ISBUTTONHIDDEN, 0xdeadbeef, 0), (LRESULT)-1L, "%Id");
DestroyWindow(hToolbar); } @@ -753,11 +753,11 @@ static void test_add_bitmap(void) /* however TB_SETBITMAPSIZE/add std bitmap won't change the image size (the button size does change) */ ok(SendMessageA(hToolbar, TB_SETBITMAPSIZE, 0, MAKELONG(8, 8)) == TRUE, "TB_SETBITMAPSIZE failed\n"); UpdateWindow(hToolbar); - compare((int)SendMessageA(hToolbar, TB_GETBUTTONSIZE, 0, 0), MAKELONG(15, 14), "%x"); + compare((LONG)SendMessageA(hToolbar, TB_GETBUTTONSIZE, 0, 0), MAKELONG(15, 14), "%lx"); CHECK_IMAGELIST(10, 20, 15); ok(SendMessageA(hToolbar, TB_ADDBITMAP, 0, (LPARAM)&stdsmall) == 1, "TB_SETBITMAPSIZE failed\n"); UpdateWindow(hToolbar); - compare((int)SendMessageA(hToolbar, TB_GETBUTTONSIZE, 0, 0), MAKELONG(23, 22), "%x"); + compare((LONG)SendMessageA(hToolbar, TB_GETBUTTONSIZE, 0, 0), MAKELONG(23, 22), "%lx"); CHECK_IMAGELIST(22, 20, 15);
/* check standard bitmaps */ @@ -768,12 +768,12 @@ static void test_add_bitmap(void)
ok(SendMessageA(hToolbar, TB_ADDBITMAP, 1, (LPARAM)&addbmp) == 0, "TB_ADDBITMAP - unexpected return\n"); CHECK_IMAGELIST(15, 16, 16); - compare((int)SendMessageA(hToolbar, TB_GETBUTTONSIZE, 0, 0), MAKELONG(23, 22), "%x"); + compare((LONG)SendMessageA(hToolbar, TB_GETBUTTONSIZE, 0, 0), MAKELONG(23, 22), "%lx"); addbmp.nID = IDB_STD_LARGE_COLOR; rebuild_toolbar(&hToolbar); ok(SendMessageA(hToolbar, TB_ADDBITMAP, 1, (LPARAM)&addbmp) == 0, "TB_ADDBITMAP - unexpected return\n"); CHECK_IMAGELIST(15, 24, 24); - compare((int)SendMessageA(hToolbar, TB_GETBUTTONSIZE, 0, 0), MAKELONG(31, 30), "%x"); + compare((LONG)SendMessageA(hToolbar, TB_GETBUTTONSIZE, 0, 0), MAKELONG(31, 30), "%lx");
addbmp.nID = IDB_VIEW_SMALL_COLOR; rebuild_toolbar(&hToolbar); @@ -901,71 +901,71 @@ static void test_hotitem(void) * comctl6 doesn't have this requirement even when theme == NULL */ SetWindowLongA(hToolbar, GWL_STYLE, TBSTYLE_FLAT | GetWindowLongA(hToolbar, GWL_STYLE)); ret = SendMessageA(hToolbar, TB_GETHOTITEM, 0, 0); - ok(ret == -1, "Hot item: %ld, expected -1\n", ret); + ok(ret == -1, "Hot item: %Id, expected -1\n", ret); ret = SendMessageA(hToolbar, TB_SETHOTITEM, 1, 0); - ok(ret == -1, "TB_SETHOTITEM returned %ld, expected -1\n", ret); + ok(ret == -1, "TB_SETHOTITEM returned %Id, expected -1\n", ret); ret = SendMessageA(hToolbar, TB_GETHOTITEM, 0, 0); - ok(ret == 1, "Hot item: %ld, expected 1\n", ret); + ok(ret == 1, "Hot item: %Id, expected 1\n", ret); ret = SendMessageA(hToolbar, TB_SETHOTITEM, 2, 0); - ok(ret == 1, "TB_SETHOTITEM returned %ld, expected 1\n", ret); + ok(ret == 1, "TB_SETHOTITEM returned %Id, expected 1\n", ret);
ret = SendMessageA(hToolbar, TB_SETHOTITEM, 0xbeef, 0); - ok(ret == 2, "TB_SETHOTITEM returned %ld, expected 2\n", ret); + ok(ret == 2, "TB_SETHOTITEM returned %Id, expected 2\n", ret); ret = SendMessageA(hToolbar, TB_GETHOTITEM, 0, 0); - ok(ret == 2, "Hot item: %lx, expected 2\n", ret); + ok(ret == 2, "Hot item: %Ix, expected 2\n", ret); ret = SendMessageA(hToolbar, TB_SETHOTITEM, -0xbeef, 0); - ok(ret == 2, "TB_SETHOTITEM returned %ld, expected 2\n", ret); + ok(ret == 2, "TB_SETHOTITEM returned %Id, expected 2\n", ret); ret = SendMessageA(hToolbar, TB_GETHOTITEM, 0, 0); - ok(ret == -1, "Hot item: %lx, expected -1\n", ret); + ok(ret == -1, "Hot item: %Ix, expected -1\n", ret);
expect_hot_notify(0, 7); ret = SendMessageA(hToolbar, TB_SETHOTITEM, 3, 0); - ok(ret == -1, "TB_SETHOTITEM returned %ld, expected -1\n", ret); + ok(ret == -1, "TB_SETHOTITEM returned %Id, expected -1\n", ret); check_hot_notify(); ret = SendMessageA(hToolbar, TB_GETHOTITEM, 0, 0); - ok(ret == 3, "Hot item: %lx, expected 3\n", ret); + ok(ret == 3, "Hot item: %Ix, expected 3\n", ret); g_fBlockHotItemChange = TRUE; ret = SendMessageA(hToolbar, TB_SETHOTITEM, 2, 0); - ok(ret == 3, "TB_SETHOTITEM returned %ld, expected 3\n", ret); + ok(ret == 3, "TB_SETHOTITEM returned %Id, expected 3\n", ret); ret = SendMessageA(hToolbar, TB_GETHOTITEM, 0, 0); - ok(ret == 3, "Hot item: %lx, expected 3\n", ret); + ok(ret == 3, "Hot item: %Ix, expected 3\n", ret); g_fBlockHotItemChange = FALSE;
g_fReceivedHotItemChange = FALSE; ret = SendMessageA(hToolbar, TB_SETHOTITEM, 0xbeaf, 0); - ok(ret == 3, "TB_SETHOTITEM returned %ld, expected 3\n", ret); + ok(ret == 3, "TB_SETHOTITEM returned %Id, expected 3\n", ret); ok(g_fReceivedHotItemChange == FALSE, "TBN_HOTITEMCHANGE received for invalid parameter\n");
g_fReceivedHotItemChange = FALSE; ret = SendMessageA(hToolbar, TB_SETHOTITEM, 3, 0); - ok(ret == 3, "TB_SETHOTITEM returned %ld, expected 3\n", ret); + ok(ret == 3, "TB_SETHOTITEM returned %Id, expected 3\n", ret); ok(g_fReceivedHotItemChange == FALSE, "TBN_HOTITEMCHANGE received after a duplication\n");
expect_hot_notify(7, 0); ret = SendMessageA(hToolbar, TB_SETHOTITEM, -0xbeaf, 0); - ok(ret == 3, "TB_SETHOTITEM returned %ld, expected 3\n", ret); + ok(ret == 3, "TB_SETHOTITEM returned %Id, expected 3\n", ret); check_hot_notify(); SendMessageA(hToolbar, TB_SETHOTITEM, 3, 0);
/* setting disabled buttons will generate a notify with the button id but no button will be hot */ expect_hot_notify(7, 9); ret = SendMessageA(hToolbar, TB_SETHOTITEM, 4, 0); - ok(ret == 3, "TB_SETHOTITEM returned %ld, expected 3\n", ret); + ok(ret == 3, "TB_SETHOTITEM returned %Id, expected 3\n", ret); check_hot_notify(); ret = SendMessageA(hToolbar, TB_GETHOTITEM, 0, 0); - ok(ret == -1, "Hot item: %lx, expected -1\n", ret); + ok(ret == -1, "Hot item: %Ix, expected -1\n", ret); /* enabling the button won't change that */ SendMessageA(hToolbar, TB_ENABLEBUTTON, 9, TRUE); ret = SendMessageA(hToolbar, TB_GETHOTITEM, 0, 0); - ok(ret == -1, "TB_GETHOTITEM returned %ld, expected -1\n", ret); + ok(ret == -1, "TB_GETHOTITEM returned %Id, expected -1\n", ret);
/* disabling a hot button works */ ret = SendMessageA(hToolbar, TB_SETHOTITEM, 3, 0); - ok(ret == -1, "TB_SETHOTITEM returned %ld, expected -1\n", ret); + ok(ret == -1, "TB_SETHOTITEM returned %Id, expected -1\n", ret); g_fReceivedHotItemChange = FALSE; SendMessageA(hToolbar, TB_ENABLEBUTTON, 7, FALSE); ret = SendMessageA(hToolbar, TB_GETHOTITEM, 0, 0); - ok(ret == 3, "TB_GETHOTITEM returned %ld, expected 3\n", ret); + ok(ret == 3, "TB_GETHOTITEM returned %Id, expected 3\n", ret); ok(g_fReceivedHotItemChange == FALSE, "Unexpected TBN_HOTITEMCHANGE\n");
SendMessageA(hToolbar, TB_SETHOTITEM, 1, 0); @@ -975,17 +975,17 @@ static void test_hotitem(void) g_fReceivedHotItemChange = FALSE; ok(SendMessageA(hToolbar, TB_SETBUTTONINFOA, 1, (LPARAM)&tbinfo) == TRUE, "TB_SETBUTTONINFOA failed\n"); ret = SendMessageA(hToolbar, TB_GETHOTITEM, 0, 0); - ok(ret == 1, "TB_GETHOTITEM returned %ld, expected 1\n", ret); + ok(ret == 1, "TB_GETHOTITEM returned %Id, expected 1\n", ret); ok(g_fReceivedHotItemChange == FALSE, "Unexpected TBN_HOTITEMCHANGE\n");
/* deleting a button unsets the hot item */ ret = SendMessageA(hToolbar, TB_SETHOTITEM, 0, 0); - ok(ret == 1, "TB_SETHOTITEM returned %ld, expected 1\n", ret); + ok(ret == 1, "TB_SETHOTITEM returned %Id, expected 1\n", ret); g_fReceivedHotItemChange = FALSE; ret = SendMessageA(hToolbar, TB_DELETEBUTTON, 1, 0); - ok(ret == TRUE, "TB_DELETEBUTTON returned %ld, expected TRUE\n", ret); + ok(ret == TRUE, "TB_DELETEBUTTON returned %Id, expected TRUE\n", ret); ret = SendMessageA(hToolbar, TB_GETHOTITEM, 0, 0); - ok(ret == -1, "TB_GETHOTITEM returned %ld, expected -1\n", ret); + ok(ret == -1, "TB_GETHOTITEM returned %Id, expected -1\n", ret); ok(g_fReceivedHotItemChange == FALSE, "Unexpected TBN_HOTITEMCHANGE\n");
DestroyWindow(hToolbar); @@ -1519,11 +1519,11 @@ static void test_sizes(void) /* -1 in TB_SETBITMAPSIZE is a special code meaning that the coordinate shouldn't be changed */ add_128x15_bitmap(hToolbar, 16); ok(SendMessageA(hToolbar, TB_SETBITMAPSIZE, 0, MAKELONG(14, -1)), "TB_SETBITMAPSIZE failed\n"); - compare((int)SendMessageA(hToolbar, TB_GETBUTTONSIZE, 0, 0), MAKELONG(21, 21), "%x"); + compare((LONG)SendMessageA(hToolbar, TB_GETBUTTONSIZE, 0, 0), MAKELONG(21, 21), "%lx"); ok(SendMessageA(hToolbar, TB_SETBITMAPSIZE, 0, MAKELONG(-1, 12)), "TB_SETBITMAPSIZE failed\n"); - compare((int)SendMessageA(hToolbar, TB_GETBUTTONSIZE, 0, 0), MAKELONG(21, 18), "%x"); + compare((LONG)SendMessageA(hToolbar, TB_GETBUTTONSIZE, 0, 0), MAKELONG(21, 18), "%lx"); ok(SendMessageA(hToolbar, TB_SETBITMAPSIZE, 0, MAKELONG(-1, -1)), "TB_SETBITMAPSIZE failed\n"); - compare((int)SendMessageA(hToolbar, TB_GETBUTTONSIZE, 0, 0), MAKELONG(21, 18), "%x"); + compare((LONG)SendMessageA(hToolbar, TB_GETBUTTONSIZE, 0, 0), MAKELONG(21, 18), "%lx"); /* check the imagelist */ InvalidateRect(hToolbar, NULL, TRUE); UpdateWindow(hToolbar); @@ -1689,13 +1689,13 @@ static void test_sizes(void) SendMessageA(hToolbar, TB_ADDBUTTONSA, 1, (LPARAM)buttons1); check_sizes(); GetClientRect(hToolbar, &rect); - ok(rect.top == 0, "rect.top = %d\n", rect.top); - ok(rect.bottom == 26, "rect.bottom = %d\n", rect.bottom); + ok(rect.top == 0, "rect.top = %ld\n", rect.top); + ok(rect.bottom == 26, "rect.bottom = %ld\n", rect.bottom);
rebuild_toolbar_ex(&hToolbar, WS_EX_DLGMODALFRAME); GetClientRect(hToolbar, &rect); - ok(rect.top == 0, "rect.top = %d\n", rect.top); - ok(rect.bottom == 26, "rect.bottom = %d\n", rect.bottom); + ok(rect.top == 0, "rect.top = %ld\n", rect.top); + ok(rect.bottom == 26, "rect.bottom = %ld\n", rect.bottom);
free_tbsize_results(); DestroyWindow(hToolbar); @@ -1714,7 +1714,7 @@ static void prepare_recalc_test(HWND *phToolbar) SetWindowLongA(*phToolbar, GWL_STYLE, GetWindowLongA(*phToolbar, GWL_STYLE) | TBSTYLE_FLAT); SendMessageA(*phToolbar, TB_GETITEMRECT, 1, (LPARAM)&rect); - ok(rect.top == 2, "Test will make no sense because initial top is %d instead of 2\n", + ok(rect.top == 2, "Test will make no sense because initial top is %ld instead of 2\n", rect.top); }
@@ -1722,7 +1722,7 @@ static BOOL did_recalc(HWND hToolbar) { RECT rect; SendMessageA(hToolbar, TB_GETITEMRECT, 1, (LPARAM)&rect); - ok(rect.top == 2 || rect.top == 0, "Unexpected top margin %d in recalc test\n", + ok(rect.top == 2 || rect.top == 0, "Unexpected top margin %ld in recalc test\n", rect.top); return (rect.top == 0); } @@ -1741,7 +1741,7 @@ static void restore_recalc_state(HWND hToolbar) SendMessageA(hToolbar, TB_GETSTYLE, 0, 0) | TBSTYLE_FLAT); /* safety check */ SendMessageA(hToolbar, TB_GETITEMRECT, 1, (LPARAM)&rect); - ok(rect.top == 2, "Test will make no sense because initial top is %d instead of 2\n", + ok(rect.top == 2, "Test will make no sense because initial top is %ld instead of 2\n", rect.top); }
@@ -1960,13 +1960,13 @@ static void test_dispinfo(void)
ret = (BOOL)SendMessageA(hToolbar, CCM_SETUNICODEFORMAT, TRUE, 0); compare(ret, FALSE, "%d"); - compare(SendMessageA(hToolbar, CCM_GETUNICODEFORMAT, 0, 0), 1L, "%ld"); + compare(SendMessageA(hToolbar, CCM_GETUNICODEFORMAT, 0, 0), (LRESULT)1L, "%Id"); InvalidateRect(hToolbar, NULL, FALSE); UpdateWindow(hToolbar);
ret = (BOOL)SendMessageA(hToolbar, CCM_SETUNICODEFORMAT, FALSE, 0); compare(ret, TRUE, "%d"); - compare(SendMessageA(hToolbar, CCM_GETUNICODEFORMAT, 0, 0), 0L, "%ld"); + compare(SendMessageA(hToolbar, CCM_GETUNICODEFORMAT, 0, 0), (LRESULT)0L, "%Id"); InvalidateRect(hToolbar, NULL, FALSE); UpdateWindow(hToolbar);
@@ -2023,7 +2023,7 @@ static void test_setrows(void)
rows = SendMessageA(hToolbar, TB_GETROWS, MAKELONG(0,0), MAKELONG(0,0)); ok(rows == tbrows_results[i].expectedRows, - "[%d] Unexpected number of rows %d (expected %d)\n", i, rows, + "[%ld] Unexpected number of rows %d (expected %d)\n", i, rows, tbrows_results[i].expectedRows); }
@@ -2133,25 +2133,25 @@ static void test_get_set_style(void) style = SendMessageA(hToolbar, TB_GETSTYLE, 0, 0); style2 = GetWindowLongA(hToolbar, GWL_STYLE); todo_wine - ok(style == style2, "got 0x%08x, expected 0x%08x\n", style, style2); + ok(style == style2, "got 0x%08lx, expected 0x%08lx\n", style, style2);
/* try to alter common window bits */ style2 |= WS_BORDER; ret = SendMessageA(hToolbar, TB_SETSTYLE, 0, style2); - ok(ret == 0, "got %d\n", ret); + ok(ret == 0, "got %ld\n", ret); style = SendMessageA(hToolbar, TB_GETSTYLE, 0, 0); style2 = GetWindowLongA(hToolbar, GWL_STYLE); ok((style != style2) && (style == (style2 | WS_BORDER)), - "got 0x%08x, expected 0x%08x\n", style, style2); - ok(style & WS_BORDER, "got 0x%08x\n", style); + "got 0x%08lx, expected 0x%08lx\n", style, style2); + ok(style & WS_BORDER, "got 0x%08lx\n", style);
/* now styles are the same, alter window style */ ret = SendMessageA(hToolbar, TB_SETSTYLE, 0, style2); - ok(ret == 0, "got %d\n", ret); + ok(ret == 0, "got %ld\n", ret); style2 |= WS_BORDER; SetWindowLongA(hToolbar, GWL_STYLE, style2); style = SendMessageA(hToolbar, TB_GETSTYLE, 0, 0); - ok(style == style2, "got 0x%08x, expected 0x%08x\n", style, style2); + ok(style == style2, "got 0x%08lx, expected 0x%08lx\n", style, style2);
DestroyWindow(hToolbar); } @@ -2179,13 +2179,13 @@ static LRESULT WINAPI toolbar_subclass_proc(HWND hwnd, UINT msg, WPARAM wParam,
/* control is already set up */ style = SendMessageA(hwnd, TB_GETSTYLE, 0, 0); - ok(style != 0, "got %x\n", style); + ok(style != 0, "got %lx\n", style);
style = GetWindowLongA(hwnd, GWL_STYLE); - ok((style & TBSTYLE_TOOLTIPS) == 0, "got 0x%08x\n", style); + ok((style & TBSTYLE_TOOLTIPS) == 0, "got 0x%08lx\n", style); SetWindowLongA(hwnd, GWL_STYLE, style|TBSTYLE_TOOLTIPS); style = GetWindowLongA(hwnd, GWL_STYLE); - ok((style & TBSTYLE_TOOLTIPS) == TBSTYLE_TOOLTIPS, "got 0x%08x\n", style); + ok((style & TBSTYLE_TOOLTIPS) == TBSTYLE_TOOLTIPS, "got 0x%08lx\n", style);
return ret; } @@ -2199,23 +2199,23 @@ static LRESULT WINAPI toolbar_subclass_proc(HWND hwnd, UINT msg, WPARAM wParam, CHECK_EXPECT2(g_hook_WM_CREATE);
style = GetWindowLongA(hwnd, GWL_STYLE); - ok((style & TBSTYLE_TOOLTIPS) == TBSTYLE_TOOLTIPS, "got 0x%08x\n", style); + ok((style & TBSTYLE_TOOLTIPS) == TBSTYLE_TOOLTIPS, "got 0x%08lx\n", style);
/* test if toolbar-specific messages are already working before WM_CREATE */ style = SendMessageA(hwnd, TB_GETSTYLE, 0, 0); - ok(style != 0, "got %x\n", style); - ok((style & TBSTYLE_TOOLTIPS) == TBSTYLE_TOOLTIPS, "got 0x%x\n", style); - ok((cs->style & TBSTYLE_TOOLTIPS) == 0, "0x%08x\n", cs->style); + ok(style != 0, "got %lx\n", style); + ok((style & TBSTYLE_TOOLTIPS) == TBSTYLE_TOOLTIPS, "got 0x%lx\n", style); + ok((cs->style & TBSTYLE_TOOLTIPS) == 0, "0x%08lx\n", cs->style);
ret = CallWindowProcA(oldproc, hwnd, msg, wParam, lParam);
style = GetWindowLongA(hwnd, GWL_STYLE); - ok((style & TBSTYLE_TOOLTIPS) == TBSTYLE_TOOLTIPS, "got 0x%08x\n", style); + ok((style & TBSTYLE_TOOLTIPS) == TBSTYLE_TOOLTIPS, "got 0x%08lx\n", style);
/* test if toolbar-specific messages are already working before WM_CREATE */ style = SendMessageA(hwnd, TB_GETSTYLE, 0, 0); - ok(style != 0, "got %x\n", style); - ok((style & TBSTYLE_TOOLTIPS) == TBSTYLE_TOOLTIPS, "got 0x%x\n", style); + ok(style != 0, "got %lx\n", style); + ok((style & TBSTYLE_TOOLTIPS) == TBSTYLE_TOOLTIPS, "got 0x%lx\n", style);
return ret; } @@ -2276,11 +2276,11 @@ static void test_create(BOOL v6) style = GetWindowLongA(hwnd, GWL_STYLE); if (v6) { - ok(!(style & TBSTYLE_TOOLTIPS), "got 0x%08x\n", style); + ok(!(style & TBSTYLE_TOOLTIPS), "got 0x%08lx\n", style); } else { - ok((style & TBSTYLE_TOOLTIPS) == TBSTYLE_TOOLTIPS, "got 0x%08x\n", style); + ok((style & TBSTYLE_TOOLTIPS) == TBSTYLE_TOOLTIPS, "got 0x%08lx\n", style);
tooltip = (HWND)SendMessageA(hwnd, TB_GETTOOLTIPS, 0, 0); ok(tooltip != NULL, "got %p\n", tooltip); @@ -2296,10 +2296,10 @@ static void test_create(BOOL v6) 0, 0, 0, 0, hMainWnd, (HMENU)5, GetModuleHandleA(NULL), NULL);
style = GetWindowLongA(hwnd, GWL_STYLE); - ok((style & TBSTYLE_TRANSPARENT) == TBSTYLE_TRANSPARENT, "got 0x%08x\n", style); + ok((style & TBSTYLE_TRANSPARENT) == TBSTYLE_TRANSPARENT, "got 0x%08lx\n", style);
style = SendMessageA(hwnd, TB_GETSTYLE, 0, 0); - ok((style & TBSTYLE_TRANSPARENT) == TBSTYLE_TRANSPARENT, "got 0x%08x\n", style); + ok((style & TBSTYLE_TRANSPARENT) == TBSTYLE_TRANSPARENT, "got 0x%08lx\n", style);
DestroyWindow(hwnd);
@@ -2314,10 +2314,10 @@ static void test_create(BOOL v6) GetModuleHandleA(NULL), NULL);
style = GetWindowLongA(hwnd, GWL_STYLE); - ok(!(style & TBSTYLE_TRANSPARENT), "got 0x%08x\n", style); + ok(!(style & TBSTYLE_TRANSPARENT), "got 0x%08lx\n", style);
style = SendMessageA(hwnd, TB_GETSTYLE, 0, 0); - ok(!(style & TBSTYLE_TRANSPARENT), "got 0x%08x\n", style); + ok(!(style & TBSTYLE_TRANSPARENT), "got 0x%08lx\n", style);
DestroyWindow(hwnd); } @@ -2384,20 +2384,20 @@ static void test_TB_GET_SET_EXTENDEDSTYLE(void) oldstyle2 = SendMessageA(hwnd, TB_GETEXTENDEDSTYLE, 0, 0);
oldstyle = SendMessageA(hwnd, TB_SETEXTENDEDSTYLE, ptr->mask, ptr->style); - ok(oldstyle == oldstyle2, "%d: got old style 0x%08x, expected 0x%08x\n", i, oldstyle, oldstyle2); + ok(oldstyle == oldstyle2, "%d: got old style 0x%08lx, expected 0x%08lx\n", i, oldstyle, oldstyle2); style = SendMessageA(hwnd, TB_GETEXTENDEDSTYLE, 0, 0); - ok(style == ptr->style_set, "%d: got style 0x%08x, expected 0x%08x\n", i, style, ptr->style_set); + ok(style == ptr->style_set, "%d: got style 0x%08lx, expected 0x%08lx\n", i, style, ptr->style_set); }
/* Windows sets CCS_VERT when TB_GETEXTENDEDSTYLE is set */ oldstyle2 = SendMessageA(hwnd, TB_GETEXTENDEDSTYLE, 0, 0); oldstyle = SendMessageA(hwnd, TB_SETEXTENDEDSTYLE, 0, TBSTYLE_EX_VERTICAL); - ok(oldstyle == oldstyle2, "got old style 0x%08x, expected 0x%08x\n", oldstyle, oldstyle2); + ok(oldstyle == oldstyle2, "got old style 0x%08lx, expected 0x%08lx\n", oldstyle, oldstyle2); style = SendMessageA(hwnd, TB_GETEXTENDEDSTYLE, 0, 0); - ok(style == TBSTYLE_EX_VERTICAL, "got style 0x%08x, expected 0x%08x\n", style, TBSTYLE_EX_VERTICAL); + ok(style == TBSTYLE_EX_VERTICAL, "got style 0x%08lx, expected 0x%08x\n", style, TBSTYLE_EX_VERTICAL); style = SendMessageA(hwnd, TB_GETSTYLE, 0, 0); todo_wine - ok(style == CCS_VERT, "got style 0x%08x, expected CCS_VERT\n", style); + ok(style == CCS_VERT, "got style 0x%08lx, expected CCS_VERT\n", style);
DestroyWindow(hwnd); } @@ -2504,11 +2504,11 @@ static void test_save(void) DestroyWindow( wnd );
res = RegOpenKeyW( HKEY_CURRENT_USER, L"Software\Wine\WineTest", &key ); - ok( !res, "got %08x\n", res ); + ok( !res, "got %08lx\n", res ); res = RegQueryValueExW( key, L"toolbartest", NULL, &type, data, &size ); - ok( !res, "got %08x\n", res ); - ok( type == REG_BINARY, "got %08x\n", type ); - ok( size == sizeof(expect), "got %08x\n", size ); + ok( !res, "got %08lx\n", res ); + ok( type == REG_BINARY, "got %08lx\n", type ); + ok( size == sizeof(expect), "got %08lx\n", size ); ok( !memcmp( data, expect, size ), "mismatch\n" );
RegCloseKey( key ); @@ -2521,23 +2521,23 @@ static void test_save(void) ok( res, "restoring failed\n" ); ok_sequence(sequences, PARENT_SEQ_INDEX, restore_parent_seq, "restore", FALSE); count = SendMessageW( wnd, TB_BUTTONCOUNT, 0, 0 ); - ok( count == ARRAY_SIZE(expect_btns), "got %d\n", count ); + ok( count == ARRAY_SIZE(expect_btns), "got %ld\n", count );
for (i = 0; i < count; i++) { res = SendMessageW( wnd, TB_GETBUTTON, i, (LPARAM)&tb ); - ok( res, "got %d\n", res ); + ok( res, "got %ld\n", res );
- ok( tb.iBitmap == expect_btns[i].iBitmap, "%d: got %d\n", i, tb.iBitmap ); - ok( tb.idCommand == expect_btns[i].idCommand, "%d: got %d\n", i, tb.idCommand ); - ok( tb.fsState == expect_btns[i].fsState, "%d: got %02x\n", i, tb.fsState ); - ok( tb.fsStyle == expect_btns[i].fsStyle, "%d: got %02x\n", i, tb.fsStyle ); - ok( tb.dwData == expect_btns[i].dwData, "%d: got %lx\n", i, tb.dwData ); + ok( tb.iBitmap == expect_btns[i].iBitmap, "%ld: got %d\n", i, tb.iBitmap ); + ok( tb.idCommand == expect_btns[i].idCommand, "%ld: got %d\n", i, tb.idCommand ); + ok( tb.fsState == expect_btns[i].fsState, "%ld: got %02x\n", i, tb.fsState ); + ok( tb.fsStyle == expect_btns[i].fsStyle, "%ld: got %02x\n", i, tb.fsStyle ); + ok( tb.dwData == expect_btns[i].dwData, "%ld: got %Ix\n", i, tb.dwData ); if (IS_INTRESOURCE(expect_btns[i].iString)) - ok( tb.iString == expect_btns[i].iString, "%d: got %lx\n", i, tb.iString ); + ok( tb.iString == expect_btns[i].iString, "%ld: got %Ix\n", i, tb.iString ); else ok( !strcmp( (char *)tb.iString, (char *)expect_btns[i].iString ), - "%d: got %s\n", i, (char *)tb.iString ); + "%ld: got %s\n", i, (char *)tb.iString );
/* In fact the ptr value set in TBN_GETBUTTONINFOA is simply copied */ if (tb.idCommand == 7) diff --git a/dlls/comctl32/tests/tooltips.c b/dlls/comctl32/tests/tooltips.c index 7570ea68b0a..3bde35250cc 100644 --- a/dlls/comctl32/tests/tooltips.c +++ b/dlls/comctl32/tests/tooltips.c @@ -27,7 +27,7 @@ #include "v6util.h" #include "msg.h"
-#define expect(expected, got) ok(got == expected, "Expected %d, got %d\n", expected, got) +#define expect(expected, got) ok(got == expected, "Expected %d, got %ld\n", expected, got)
enum seq_index { @@ -55,7 +55,7 @@ static void test_create_tooltip(BOOL is_v6) style = GetWindowLongA(hwnd, GWL_STYLE); exp_style = 0x7fffffff | WS_POPUP; exp_style &= ~(WS_CHILD | WS_MAXIMIZE | WS_BORDER | WS_DLGFRAME); - ok(style == exp_style, "wrong style %08x/%08x\n", style, exp_style); + ok(style == exp_style, "wrong style %08lx/%08lx\n", style, exp_style);
DestroyWindow(hwnd);
@@ -70,7 +70,7 @@ static void test_create_tooltip(BOOL is_v6) exp_style |= WS_BORDER; todo_wine_if(is_v6) ok(style == exp_style || broken(style == (exp_style | WS_BORDER)) /* XP */, - "Unexpected window style %#x.\n", style); + "Unexpected window style %#lx.\n", style);
DestroyWindow(hwnd);
@@ -196,7 +196,7 @@ static void test_customdraw(void) { 50, 50, 300, 300, NULL, NULL, NULL, 0); - ok(parent != NULL, "%d: Creation of main window failed\n", iterationNumber); + ok(parent != NULL, "%ld: Creation of main window failed\n", iterationNumber);
/* Make it show */ ShowWindow(parent, SW_SHOWNORMAL); @@ -208,7 +208,7 @@ static void test_customdraw(void) { CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, parent, NULL, GetModuleHandleA(NULL), 0); - ok(hwndTip != NULL, "%d: Creation of tooltip window failed\n", iterationNumber); + ok(hwndTip != NULL, "%ld: Creation of tooltip window failed\n", iterationNumber);
/* Set up parms for the wndproc to handle */ CD_Stages = 0; @@ -229,7 +229,7 @@ static void test_customdraw(void) { toolInfo.lParam = 0xdeadbeef; GetClientRect (parent, &toolInfo.rect); ret = SendMessageA(hwndTip, TTM_ADDTOOLA, 0, (LPARAM)&toolInfo); - ok(ret, "%d: Failed to add the tool.\n", iterationNumber); + ok(ret, "%ld: Failed to add the tool.\n", iterationNumber);
/* Make tooltip appear quickly */ SendMessageA(hwndTip, TTM_SETDELAYTIME, TTDT_INITIAL, MAKELPARAM(1,0)); @@ -243,23 +243,23 @@ static void test_customdraw(void) { { /* Check CustomDraw results */ ok(CD_Stages == expectedResults[iterationNumber].ExpectedCalls, - "%d: CustomDraw stages %x, expected %x\n", iterationNumber, CD_Stages, + "%ld: CustomDraw stages %x, expected %x\n", iterationNumber, CD_Stages, expectedResults[iterationNumber].ExpectedCalls); }
ret = SendMessageA(hwndTip, TTM_GETCURRENTTOOLA, 0, 0); - ok(ret, "%d: Failed to get current tool %#lx.\n", iterationNumber, ret); + ok(ret, "%ld: Failed to get current tool %#Ix.\n", iterationNumber, ret);
memset(&toolInfo, 0xcc, sizeof(toolInfo)); toolInfo.cbSize = sizeof(toolInfo); toolInfo.lpszText = NULL; toolInfo.lpReserved = (void *)0xdeadbeef; SendMessageA(hwndTip, TTM_GETCURRENTTOOLA, 0, (LPARAM)&toolInfo); - ok(toolInfo.hwnd == parent, "%d: Unexpected hwnd %p.\n", iterationNumber, toolInfo.hwnd); - ok(toolInfo.hinst == GetModuleHandleA(NULL), "%d: Unexpected hinst %p.\n", iterationNumber, toolInfo.hinst); - ok(toolInfo.uId == 0x1234abcd, "%d: Unexpected uId %lx.\n", iterationNumber, toolInfo.uId); - ok(toolInfo.lParam == 0, "%d: Unexpected lParam %lx.\n", iterationNumber, toolInfo.lParam); - ok(toolInfo.lpReserved == (void *)0xdeadbeef, "%d: Unexpected lpReserved %p.\n", iterationNumber, toolInfo.lpReserved); + ok(toolInfo.hwnd == parent, "%ld: Unexpected hwnd %p.\n", iterationNumber, toolInfo.hwnd); + ok(toolInfo.hinst == GetModuleHandleA(NULL), "%ld: Unexpected hinst %p.\n", iterationNumber, toolInfo.hinst); + ok(toolInfo.uId == 0x1234abcd, "%ld: Unexpected uId %Ix.\n", iterationNumber, toolInfo.uId); + ok(toolInfo.lParam == 0, "%ld: Unexpected lParam %Ix.\n", iterationNumber, toolInfo.lParam); + ok(toolInfo.lpReserved == (void *)0xdeadbeef, "%ld: Unexpected lpReserved %p.\n", iterationNumber, toolInfo.lpReserved);
/* Clean up */ DestroyWindow(hwndTip); @@ -378,19 +378,19 @@ static void test_gettext(void) toolinfoA.lParam = 0xdeadbeef; GetClientRect(hwnd, &toolinfoA.rect); r = SendMessageA(hwnd, TTM_ADDTOOLA, 0, (LPARAM)&toolinfoA); - ok(r, "got %ld\n", r); + ok(r, "got %Id\n", r);
toolinfoA.hwnd = NULL; toolinfoA.uId = 0x1234abcd; toolinfoA.lpszText = bufA; r = SendMessageA(hwnd, TTM_GETTEXTA, 0, (LPARAM)&toolinfoA); - ok(!r, "got %ld\n", r); + ok(!r, "got %Id\n", r); ok(!*toolinfoA.lpszText, "lpszText should be empty, got %s\n", toolinfoA.lpszText);
toolinfoA.lpszText = bufA; r = SendMessageA(hwnd, TTM_GETTOOLINFOA, 0, (LPARAM)&toolinfoA); todo_wine - ok(!r, "got %ld\n", r); + ok(!r, "got %Id\n", r); ok(toolinfoA.lpszText == NULL, "expected NULL, got %p\n", toolinfoA.lpszText);
/* NULL hinst, valid resource id for text */ @@ -409,17 +409,17 @@ static void test_gettext(void) toolinfoA.uId = 0x1233abcd; toolinfoA.lpszText = bufA; r = SendMessageA(hwnd, TTM_GETTEXTA, 0, (LPARAM)&toolinfoA); - ok(!r, "got %ld\n", r); + ok(!r, "got %Id\n", r); ok(!strcmp(toolinfoA.lpszText, "abc"), "got wrong text, %s\n", toolinfoA.lpszText);
toolinfoA.hinst = (HINSTANCE)0xdeadbee; r = SendMessageA(hwnd, TTM_GETTOOLINFOA, 0, (LPARAM)&toolinfoA); todo_wine - ok(!r, "got %ld\n", r); + ok(!r, "got %Id\n", r); ok(toolinfoA.hinst == NULL, "expected NULL, got %p\n", toolinfoA.hinst);
r = SendMessageA(hwnd, TTM_DELTOOLA, 0, (LPARAM)&toolinfoA); - ok(!r, "got %ld\n", r); + ok(!r, "got %Id\n", r);
/* add another tool with text */ toolinfoA.cbSize = sizeof(TTTOOLINFOA); @@ -435,24 +435,24 @@ static void test_gettext(void) ok(r, "Adding the tool to the tooltip failed\n");
length = SendMessageA(hwnd, WM_GETTEXTLENGTH, 0, 0); - ok(length == 0, "Expected 0, got %d\n", length); + ok(length == 0, "Expected 0, got %ld\n", length);
toolinfoA.hwnd = NULL; toolinfoA.uId = 0x1235abcd; toolinfoA.lpszText = bufA; r = SendMessageA(hwnd, TTM_GETTEXTA, 0, (LPARAM)&toolinfoA); - ok(!r, "got %ld\n", r); + ok(!r, "got %Id\n", r); ok(!strcmp(toolinfoA.lpszText, testtipA), "expected %s, got %p\n", testtipA, toolinfoA.lpszText);
memset(bufA, 0x1f, sizeof(bufA)); toolinfoA.lpszText = bufA; r = SendMessageA(hwnd, TTM_GETTOOLINFOA, 0, (LPARAM)&toolinfoA); todo_wine - ok(!r, "got %ld\n", r); + ok(!r, "got %Id\n", r); ok(!strcmp(toolinfoA.lpszText, testtipA), "expected %s, got %p\n", testtipA, toolinfoA.lpszText);
length = SendMessageA(hwnd, WM_GETTEXTLENGTH, 0, 0); - ok(length == 0, "Expected 0, got %d\n", length); + ok(length == 0, "Expected 0, got %ld\n", length);
/* add another with callback text */ toolinfoA.cbSize = sizeof(TTTOOLINFOA); @@ -470,13 +470,13 @@ static void test_gettext(void) toolinfoA.uId = 0x1236abcd; toolinfoA.lpszText = bufA; r = SendMessageA(hwnd, TTM_GETTEXTA, 0, (LPARAM)&toolinfoA); - ok(!r, "got %ld\n", r); + ok(!r, "got %Id\n", r); ok(!strcmp(toolinfoA.lpszText, testcallbackA), "lpszText should be an (%s) string\n", testcallbackA);
toolinfoA.lpszText = bufA; r = SendMessageA(hwnd, TTM_GETTOOLINFOA, 0, (LPARAM)&toolinfoA); todo_wine - ok(!r, "got %ld\n", r); + ok(!r, "got %Id\n", r); ok(toolinfoA.lpszText == LPSTR_TEXTCALLBACKA, "expected LPSTR_TEXTCALLBACKA, got %p\n", toolinfoA.lpszText);
DestroyWindow(hwnd); @@ -518,13 +518,13 @@ static void test_gettext(void) toolinfoA.lParam = 0xdeadbeef; GetClientRect(hwnd, &toolinfoA.rect); r = SendMessageA(hwnd, TTM_ADDTOOLA, 0, (LPARAM)&toolinfoA); - ok(r, "got %ld\n", r); + ok(r, "got %Id\n", r);
toolinfoA.hwnd = NULL; toolinfoA.uId = 0x1235abce; toolinfoA.lpszText = bufA; r = SendMessageA(hwnd, TTM_GETTEXTA, 0, (LPARAM)&toolinfoA); - ok(!r, "got %ld\n", r); + ok(!r, "got %Id\n", r); ok(!strcmp(toolinfoA.lpszText, testtipA), "expected %s, got %s\n", testtipA, toolinfoA.lpszText);
/* enable TTS_NOPREFIX, original text is retained */ @@ -535,7 +535,7 @@ static void test_gettext(void) toolinfoA.uId = 0x1235abce; toolinfoA.lpszText = bufA; r = SendMessageA(hwnd, TTM_GETTEXTA, 0, (LPARAM)&toolinfoA); - ok(!r, "got %ld\n", r); + ok(!r, "got %Id\n", r); ok(!strcmp(toolinfoA.lpszText, testtip2A), "expected %s, got %s\n", testtip2A, toolinfoA.lpszText);
DestroyWindow(hwnd); @@ -566,7 +566,7 @@ static void test_ttm_gettoolinfo(void) ti.lParam = 0xaaaaaaaa; r = SendMessageA(hwnd, TTM_GETTOOLINFOA, 0, (LPARAM)&ti); ok(r, "Getting tooltip info failed\n"); - ok(0x1abe11ed == ti.lParam, "Expected 0x1abe11ed, got %lx\n", ti.lParam); + ok(0x1abe11ed == ti.lParam, "Expected 0x1abe11ed, got %Ix\n", ti.lParam);
tiW.cbSize = TTTOOLINFOW_V2_SIZE; tiW.hwnd = NULL; @@ -575,7 +575,7 @@ static void test_ttm_gettoolinfo(void) tiW.lpszText = NULL; r = SendMessageA(hwnd, TTM_GETTOOLINFOW, 0, (LPARAM)&tiW); ok(r, "Getting tooltip info failed\n"); - ok(0x1abe11ed == tiW.lParam, "Expected 0x1abe11ed, got %lx\n", tiW.lParam); + ok(0x1abe11ed == tiW.lParam, "Expected 0x1abe11ed, got %Ix\n", tiW.lParam);
ti.cbSize = TTTOOLINFOA_V2_SIZE; ti.uId = 0x1234ABCD; @@ -586,7 +586,7 @@ static void test_ttm_gettoolinfo(void) ti.lParam = 0xdeadbeef; r = SendMessageA(hwnd, TTM_GETTOOLINFOA, 0, (LPARAM)&ti); ok(r, "Getting tooltip info failed\n"); - ok(0x55555555 == ti.lParam, "Expected 0x55555555, got %lx\n", ti.lParam); + ok(0x55555555 == ti.lParam, "Expected 0x55555555, got %Ix\n", ti.lParam);
DestroyWindow(hwnd);
@@ -890,16 +890,16 @@ static void test_track(void) SendMessageW(tt, TTM_TRACKPOSITION, 0, MAKELPARAM(10, 10));
GetWindowRect(tt, &pos); - ok(almost_eq(pos.left, 10), "pos.left = %d\n", pos.left); - ok(almost_eq(pos.top, 10), "pos.top = %d\n", pos.top); + ok(almost_eq(pos.left, 10), "pos.left = %ld\n", pos.left); + ok(almost_eq(pos.top, 10), "pos.top = %ld\n", pos.top);
info.uFlags = TTF_IDISHWND | TTF_ABSOLUTE; SendMessageW(tt, TTM_SETTOOLINFOW, 0, (LPARAM)&info); SendMessageW(tt, TTM_TRACKPOSITION, 0, MAKELPARAM(10, 10));
GetWindowRect(tt, &pos); - ok(!almost_eq(pos.left, 10), "pos.left = %d\n", pos.left); - ok(!almost_eq(pos.top, 10), "pos.top = %d\n", pos.top); + ok(!almost_eq(pos.left, 10), "pos.left = %ld\n", pos.left); + ok(!almost_eq(pos.top, 10), "pos.top = %ld\n", pos.top);
DestroyWindow(tt); DestroyWindow(parent); @@ -1066,27 +1066,27 @@ static void test_margin(void) ok(hwnd != NULL, "failed to create tooltip wnd\n");
ret = SendMessageA(hwnd, TTM_SETMARGIN, 0, 0); - ok(!ret, "got %d\n", ret); + ok(!ret, "got %ld\n", ret);
SetRect(&r, -1, -1, 1, 1); ret = SendMessageA(hwnd, TTM_SETMARGIN, 0, (LPARAM)&r); - ok(!ret, "got %d\n", ret); + ok(!ret, "got %ld\n", ret);
SetRectEmpty(&r1); ret = SendMessageA(hwnd, TTM_GETMARGIN, 0, (LPARAM)&r1); - ok(!ret, "got %d\n", ret); + ok(!ret, "got %ld\n", ret); ok(EqualRect(&r, &r1), "got %s, was %s\n", wine_dbgstr_rect(&r1), wine_dbgstr_rect(&r));
ret = SendMessageA(hwnd, TTM_SETMARGIN, 0, 0); - ok(!ret, "got %d\n", ret); + ok(!ret, "got %ld\n", ret);
SetRectEmpty(&r1); ret = SendMessageA(hwnd, TTM_GETMARGIN, 0, (LPARAM)&r1); - ok(!ret, "got %d\n", ret); + ok(!ret, "got %ld\n", ret); ok(EqualRect(&r, &r1), "got %s, was %s\n", wine_dbgstr_rect(&r1), wine_dbgstr_rect(&r));
ret = SendMessageA(hwnd, TTM_GETMARGIN, 0, 0); - ok(!ret, "got %d\n", ret); + ok(!ret, "got %ld\n", ret);
DestroyWindow(hwnd); } diff --git a/dlls/comctl32/tests/trackbar.c b/dlls/comctl32/tests/trackbar.c index 70b61d4db20..a367b7e699c 100644 --- a/dlls/comctl32/tests/trackbar.c +++ b/dlls/comctl32/tests/trackbar.c @@ -28,7 +28,7 @@ #define expect(expected,got) expect_(__LINE__, expected, got) static inline void expect_(unsigned line, DWORD expected, DWORD got) { - ok_(__FILE__, line)(expected == got, "Expected %d, got %d\n", expected, got); + ok_(__FILE__, line)(expected == got, "Expected %ld, got %ld\n", expected, got); }
#define NUM_MSG_SEQUENCE 2 @@ -722,21 +722,21 @@ static void test_position(void) r = SendMessageA(hWndTrackbar, TBM_GETPOS, 0, 0); ok(r == 25, "got %d\n", r); SendMessageA(hWndTrackbar, TBM_GETTHUMBRECT, 0, (LPARAM)&rect2); - ok(rect.left == rect2.left, "got %d\n", rect.left); + ok(rect.left == rect2.left, "got %ld\n", rect.left);
/* with repaint */ SendMessageA(hWndTrackbar, TBM_SETPOS, TRUE, 30); r = SendMessageA(hWndTrackbar, TBM_GETPOS, 0, 0); ok(r == 30, "got %d\n", r); SendMessageA(hWndTrackbar, TBM_GETTHUMBRECT, 0, (LPARAM)&rect2); - ok(rect.left != rect2.left, "got %d, expected %d\n", rect2.left, rect.left); + ok(rect.left != rect2.left, "got %ld, expected %ld\n", rect2.left, rect.left);
/* now move it with keys */ SendMessageA(hWndTrackbar, WM_KEYDOWN, VK_END, 0); r = SendMessageA(hWndTrackbar, TBM_GETPOS, 0, 0); ok(r == 100, "got %d\n", r); SendMessageA(hWndTrackbar, TBM_GETTHUMBRECT, 0, (LPARAM)&rect); - ok(rect.left != rect2.left, "got %d, expected %d\n", rect.left, rect2.left); + ok(rect.left != rect2.left, "got %ld, expected %ld\n", rect.left, rect2.left);
DestroyWindow(hWndTrackbar); } @@ -1114,7 +1114,7 @@ static void test_tic_placement(void) SendMessageA(hWndTrackbar, TBM_SETTICFREQ, 1, 0);
numtics = SendMessageA(hWndTrackbar, TBM_GETNUMTICS, 0, 0); - ok(numtics == 6, "Expected 6, got %d\n", numtics); + ok(numtics == 6, "Expected 6, got %ld\n", numtics);
flush_sequences(sequences, NUM_MSG_SEQUENCE); /* test TBM_GETPTICS */ diff --git a/dlls/comctl32/tests/treeview.c b/dlls/comctl32/tests/treeview.c index 45e2091f3b2..41a61f1465b 100644 --- a/dlls/comctl32/tests/treeview.c +++ b/dlls/comctl32/tests/treeview.c @@ -60,7 +60,7 @@ static BOOL g_v6; #define expect(expected,got) expect_(__LINE__, expected, got) static inline void expect_(unsigned line, DWORD expected, DWORD got) { - ok_(__FILE__, line)(expected == got, "Expected %d, got %d\n", expected, got); + ok_(__FILE__, line)(expected == got, "Expected %ld, got %ld\n", expected, got); }
static struct msg_sequence *sequences[NUM_MSG_SEQUENCES]; @@ -800,17 +800,17 @@ static void test_get_set_bkcolor(void)
/* If the value is -1, the control is using the system color for the background color. */ crColor = SendMessageA(hTree, TVM_GETBKCOLOR, 0, 0); - ok(crColor == ~0u, "Default background color reported as 0x%.8x\n", crColor); + ok(crColor == ~0u, "Default background color reported as 0x%.8lx\n", crColor);
/* Test for black background */ SendMessageA(hTree, TVM_SETBKCOLOR, 0, RGB(0,0,0)); crColor = SendMessageA(hTree, TVM_GETBKCOLOR, 0, 0); - ok(crColor == RGB(0,0,0), "Black background color reported as 0x%.8x\n", crColor); + ok(crColor == RGB(0,0,0), "Black background color reported as 0x%.8lx\n", crColor);
/* Test for white background */ SendMessageA(hTree, TVM_SETBKCOLOR, 0, RGB(255,255,255)); crColor = SendMessageA(hTree, TVM_GETBKCOLOR, 0, 0); - ok(crColor == RGB(255,255,255), "White background color reported as 0x%.8x\n", crColor); + ok(crColor == RGB(255,255,255), "White background color reported as 0x%.8lx\n", crColor);
/* Reset the default background */ SendMessageA(hTree, TVM_SETBKCOLOR, 0, -1); @@ -884,7 +884,7 @@ static void test_get_set_insertmark(void)
SendMessageA(hTree, TVM_SETINSERTMARKCOLOR, 0, crColor); crColor = SendMessageA(hTree, TVM_GETINSERTMARKCOLOR, 0, 0); - ok(crColor == RGB(0,0,0), "Insert mark color reported as 0x%.8x, expected 0x00000000\n", crColor); + ok(crColor == RGB(0,0,0), "Insert mark color reported as 0x%.8lx, expected 0x00000000\n", crColor);
ok_sequence(sequences, TREEVIEW_SEQ_INDEX, test_get_set_insertmarkcolor_seq, "test get set insertmark color", FALSE); @@ -1057,17 +1057,17 @@ static void test_get_set_textcolor(void) flush_sequences(sequences, NUM_MSG_SEQUENCES);
crColor = SendMessageA(hTree, TVM_GETTEXTCOLOR, 0, 0); - ok(crColor == ~0u, "Default text color reported as 0x%.8x\n", crColor); + ok(crColor == ~0u, "Default text color reported as 0x%.8lx\n", crColor);
/* Test for black text */ SendMessageA(hTree, TVM_SETTEXTCOLOR, 0, RGB(0,0,0)); crColor = SendMessageA(hTree, TVM_GETTEXTCOLOR, 0, 0); - ok(crColor == RGB(0,0,0), "Black text color reported as 0x%.8x\n", crColor); + ok(crColor == RGB(0,0,0), "Black text color reported as 0x%.8lx\n", crColor);
/* Test for white text */ SendMessageA(hTree, TVM_SETTEXTCOLOR, 0, RGB(255,255,255)); crColor = SendMessageA(hTree, TVM_GETTEXTCOLOR, 0, 0); - ok(crColor == RGB(255,255,255), "White text color reported as 0x%.8x\n", crColor); + ok(crColor == RGB(255,255,255), "White text color reported as 0x%.8lx\n", crColor);
/* Reset the default text color */ SendMessageA(hTree, TVM_SETTEXTCOLOR, 0, CLR_NONE); @@ -1359,7 +1359,7 @@ static LRESULT CALLBACK parent_wnd_proc(HWND hWnd, UINT message, WPARAM wParam, g_item_expanding.mask = TVIF_STATE; g_item_expanding.hItem = hRoot; ret = SendMessageA(pHdr->hwndFrom, TVM_GETITEMA, 0, (LPARAM)&g_item_expanding); - ok(ret == TRUE, "got %lu\n", ret); + ok(ret == TRUE, "got %Iu\n", ret); } break; } @@ -1375,7 +1375,7 @@ static LRESULT CALLBACK parent_wnd_proc(HWND hWnd, UINT message, WPARAM wParam, g_item_expanded.mask = TVIF_STATE; g_item_expanded.hItem = hRoot; ret = SendMessageA(pHdr->hwndFrom, TVM_GETITEMA, 0, (LPARAM)&g_item_expanded); - ok(ret == TRUE, "got %lu\n", ret); + ok(ret == TRUE, "got %Iu\n", ret); } if (g_get_rect_in_expand) { @@ -1424,9 +1424,9 @@ static LRESULT CALLBACK parent_wnd_proc(HWND hWnd, UINT message, WPARAM wParam, return CDRF_NOTIFYITEMDRAW|CDRF_NOTIFYITEMERASE|CDRF_NOTIFYPOSTPAINT; case CDDS_ITEMPREPAINT: ok(text == nmcd->clrText || (g_v6 && nmcd->clrText == 0xffffffff), - "got %08x vs %08x\n", text, nmcd->clrText); + "got %08lx vs %08lx\n", text, nmcd->clrText); ok(bkgnd == nmcd->clrTextBk || (g_v6 && nmcd->clrTextBk == 0xffffffff), - "got %08x vs %08x\n", bkgnd, nmcd->clrTextBk); + "got %08lx vs %08lx\n", bkgnd, nmcd->clrTextBk); nmcd->clrText = cafe; nmcd->clrTextBk = c0ffee; SetTextColor(nmcd->nmcd.hdc, c0ffee); @@ -1436,10 +1436,10 @@ static LRESULT CALLBACK parent_wnd_proc(HWND hWnd, UINT message, WPARAM wParam, return CDRF_NOTIFYPOSTPAINT|CDRF_NEWFONT; case CDDS_ITEMPOSTPAINT: /* at the point of post paint notification colors are already restored */ - ok(nmcd->clrText == cafe, "got 0%x\n", nmcd->clrText); - ok(nmcd->clrTextBk == c0ffee, "got 0%x\n", nmcd->clrTextBk); - ok(text != cafe, "got 0%x\n", text); - ok(bkgnd != c0ffee, "got 0%x\n", bkgnd); + ok(nmcd->clrText == cafe, "got 0%lx\n", nmcd->clrText); + ok(nmcd->clrTextBk == c0ffee, "got 0%lx\n", nmcd->clrTextBk); + ok(text != cafe, "got 0%lx\n", text); + ok(bkgnd != c0ffee, "got 0%lx\n", bkgnd); if (g_customdraw_font) ok(GetCurrentObject(nmcd->nmcd.hdc, OBJ_FONT) != g_customdraw_font, "got %p\n", GetCurrentObject(nmcd->nmcd.hdc, OBJ_FONT)); @@ -1587,8 +1587,8 @@ static void test_expand(void) *(HTREEITEM *)&rect = first; visible = SendMessageA(tv, TVM_GETITEMRECT, FALSE, (LPARAM)&rect); ok(visible, "first node should be visible\n"); - ok(!rect.left, "rect.left = %d\n", rect.left); - ok(!rect.top, "rect.top = %d\n", rect.top); + ok(!rect.left, "rect.left = %ld\n", rect.left); + ok(!rect.top, "rect.top = %ld\n", rect.top); ok(rect.right, "rect.right = 0\n"); ok(rect.bottom, "rect.bottom = 0\n");
@@ -1705,7 +1705,7 @@ static void test_itemedit(void) r = SetWindowTextA(edit, buffA); expect(TRUE, r); r = GetWindowTextA(edit, buffA, ARRAY_SIZE(buffA)); - ok( r == ARRAY_SIZE(buffA) - 1, "got %d\n", r ); + ok( r == ARRAY_SIZE(buffA) - 1, "got %ld\n", r ); /* ...but it's trimmed to MAX_PATH chars when editing ends */ r = SendMessageA(hTree, WM_COMMAND, MAKEWPARAM(0, EN_KILLFOCUS), (LPARAM)edit); expect(0, r); @@ -2141,7 +2141,7 @@ static void test_WM_PAINT(void) hTree = create_treeview_control(0);
clr = SendMessageA(hTree, TVM_SETBKCOLOR, 0, RGB(255, 0, 0)); - ok(clr == ~0u, "got %d, expected -1\n", clr); + ok(clr == ~0u, "got %ld, expected -1\n", clr);
hdc = GetDC(hMainWnd);
@@ -2149,10 +2149,10 @@ static void test_WM_PAINT(void) FillRect(hdc, &rc, GetStockObject(BLACK_BRUSH));
clr = GetPixel(hdc, 1, 1); - ok(clr == RGB(0, 0, 0), "got 0x%x\n", clr); + ok(clr == RGB(0, 0, 0), "got 0x%lx\n", clr);
ret = SendMessageA(hTree, WM_PAINT, (WPARAM)hdc, 0); - ok(ret == 0, "got %d\n", ret); + ok(ret == 0, "got %ld\n", ret);
clr = GetPixel(hdc, 1, 1); htheme = pGetWindowTheme(hTree); @@ -2160,7 +2160,7 @@ static void test_WM_PAINT(void) ok(clr == RGB(255, 0, 0) || broken(clr == RGB(0, 0, 0)) /* win98 */ /* When theming is on and treeview glyphs are transparent, parent window needs to be repainted */ || (is_glyph_transparent && clr == GetSysColor(COLOR_WINDOW)), - "got 0x%x\n", clr); + "got 0x%lx\n", clr);
ReleaseDC(hMainWnd, hdc);
@@ -2191,8 +2191,8 @@ static void test_delete_items(void)
if (item_sequence[0]->count == 2) { - ok(msg[0].lParam == (LPARAM)hChild, "expected %p, got 0x%lx\n", hChild, msg[0].lParam); - ok(msg[1].lParam == (LPARAM)hRoot, "expected %p, got 0x%lx\n", hRoot, msg[1].lParam); + ok(msg[0].lParam == (LPARAM)hChild, "expected %p, got 0x%Ix\n", hChild, msg[0].lParam); + ok(msg[1].lParam == (LPARAM)hRoot, "expected %p, got 0x%Ix\n", hRoot, msg[1].lParam); }
ret = SendMessageA(hTree, TVM_GETCOUNT, 0, 0); @@ -2334,7 +2334,7 @@ static void _check_item(HWND hwnd, HTREEITEM item, BOOL is_version_6, int line) width = data->width; todo_wine ok_(__FILE__, line)(width == (rect.right - rect.left) || broken(is_version_6 && width == 0) /* XP */, - "Width %d, rect width %d.\n", width, rect.right - rect.left); + "Width %d, rect width %ld.\n", width, rect.right - rect.left); } }
@@ -2647,7 +2647,7 @@ static void test_WM_GETDLGCODE(void) hTree = create_treeview_control(0);
code = SendMessageA(hTree, WM_GETDLGCODE, VK_TAB, 0); - ok(code == (DLGC_WANTCHARS | DLGC_WANTARROWS), "0x%08x\n", code); + ok(code == (DLGC_WANTCHARS | DLGC_WANTARROWS), "0x%08lx\n", code);
DestroyWindow(hTree); } @@ -2707,7 +2707,7 @@ static void test_TVS_FULLROWSELECT(void) hwnd = create_treeview_control(TVS_FULLROWSELECT);
style = GetWindowLongA(hwnd, GWL_STYLE); - ok((style & (TVS_FULLROWSELECT | TVS_HASLINES)) == (TVS_FULLROWSELECT | TVS_HASLINES), "got style 0x%08x\n", style); + ok((style & (TVS_FULLROWSELECT | TVS_HASLINES)) == (TVS_FULLROWSELECT | TVS_HASLINES), "got style 0x%08lx\n", style);
DestroyWindow(hwnd);
@@ -2717,7 +2717,7 @@ static void test_TVS_FULLROWSELECT(void) style = GetWindowLongA(hwnd, GWL_STYLE); SetWindowLongA(hwnd, GWL_STYLE, style | TVS_FULLROWSELECT); style = GetWindowLongA(hwnd, GWL_STYLE); - ok(style & TVS_FULLROWSELECT, "got style 0x%08x\n", style); + ok(style & TVS_FULLROWSELECT, "got style 0x%08lx\n", style);
DestroyWindow(hwnd); } diff --git a/dlls/comctl32/tests/updown.c b/dlls/comctl32/tests/updown.c index 6ffdcb9e1ab..3a475318a25 100644 --- a/dlls/comctl32/tests/updown.c +++ b/dlls/comctl32/tests/updown.c @@ -53,7 +53,7 @@ #define expect(expected,got) expect_(__LINE__, expected, got) static inline void expect_(unsigned line, DWORD expected, DWORD got) { - ok_(__FILE__, line)(expected == got, "Expected %d, got %d\n", expected, got); + ok_(__FILE__, line)(expected == got, "Expected %ld, got %ld\n", expected, got); }
#define NUM_MSG_SEQUENCES 3 @@ -806,7 +806,7 @@ static void test_updown_create(void) ok(updown != NULL, "Failed to create updown control\n"); r.right = 0; GetClientRect(updown, &r); - ok(r.right > 0, "Expected default width, got %d\n", r.right); + ok(r.right > 0, "Expected default width, got %ld\n", r.right); DestroyWindow(updown); /* create with really small width */ updown = CreateWindowA (UPDOWN_CLASSA, 0, WS_CHILD | WS_BORDER | WS_VISIBLE, 0, 0, 2, 0, @@ -814,7 +814,7 @@ static void test_updown_create(void) ok(updown != NULL, "Failed to create updown control\n"); r.right = 0; GetClientRect(updown, &r); - ok(r.right != 2 && r.right > 0, "Expected default width, got %d\n", r.right); + ok(r.right != 2 && r.right > 0, "Expected default width, got %ld\n", r.right); DestroyWindow(updown); /* create with width greater than default */ updown = CreateWindowA (UPDOWN_CLASSA, 0, WS_CHILD | WS_BORDER | WS_VISIBLE, 0, 0, 100, 0, @@ -822,7 +822,7 @@ static void test_updown_create(void) ok(updown != NULL, "Failed to create updown control\n"); r.right = 0; GetClientRect(updown, &r); - ok(r.right < 100 && r.right > 0, "Expected default width, got %d\n", r.right); + ok(r.right < 100 && r.right > 0, "Expected default width, got %ld\n", r.right); DestroyWindow(updown); /* create with zero height, UDS_HORZ */ updown = CreateWindowA (UPDOWN_CLASSA, 0, UDS_HORZ | WS_CHILD | WS_BORDER | WS_VISIBLE, 0, 0, 0, 0, @@ -830,7 +830,7 @@ static void test_updown_create(void) ok(updown != NULL, "Failed to create updown control\n"); r.bottom = 0; GetClientRect(updown, &r); - ok(r.bottom == 0, "Expected zero height, got %d\n", r.bottom); + ok(r.bottom == 0, "Expected zero height, got %ld\n", r.bottom); DestroyWindow(updown); /* create with really small height, UDS_HORZ */ updown = CreateWindowA (UPDOWN_CLASSA, 0, UDS_HORZ | WS_CHILD | WS_BORDER | WS_VISIBLE, 0, 0, 0, 2, @@ -838,7 +838,7 @@ static void test_updown_create(void) ok(updown != NULL, "Failed to create updown control\n"); r.bottom = 0; GetClientRect(updown, &r); - ok(r.bottom == 0, "Expected zero height, got %d\n", r.bottom); + ok(r.bottom == 0, "Expected zero height, got %ld\n", r.bottom); DestroyWindow(updown); /* create with height greater than default, UDS_HORZ */ updown = CreateWindowA (UPDOWN_CLASSA, 0, UDS_HORZ | WS_CHILD | WS_BORDER | WS_VISIBLE, 0, 0, 0, 100, @@ -846,7 +846,7 @@ static void test_updown_create(void) ok(updown != NULL, "Failed to create updown control\n"); r.bottom = 0; GetClientRect(updown, &r); - ok(r.bottom < 100 && r.bottom > 0, "Expected default height, got %d\n", r.bottom); + ok(r.bottom < 100 && r.bottom > 0, "Expected default height, got %ld\n", r.bottom); DestroyWindow(updown); }
@@ -987,9 +987,9 @@ static void test_UDS_SETBUDDY(void)
updown = create_updown_control(UDS_ALIGNRIGHT | UDS_SETBUDDYINT | UDS_ARROWKEYS, g_edit); ret = SetWindowPos(g_edit, 0, 100, 100, start_width, start_height, SWP_NOACTIVATE | SWP_NOZORDER); - ok(ret, "SetWindowPos failed, error %u.\n", GetLastError()); + ok(ret, "SetWindowPos failed, error %lu.\n", GetLastError()); ret = GetWindowRect(g_edit, &rect); - ok(ret, "GetWindowRect failed, error %u.\n", GetLastError()); + ok(ret, "GetWindowRect failed, error %lu.\n", GetLastError()); width = rect.right - rect.left; height = rect.bottom - rect.top; ok(width == start_width, "Expected width %d, got %d.\n", start_width, width); @@ -997,13 +997,13 @@ static void test_UDS_SETBUDDY(void)
SendMessageA(updown, UDM_SETBUDDY, (WPARAM)g_edit, 0); ret = GetWindowRect(g_edit, &rect); - ok(ret, "GetWindowRect failed, error %u.\n", GetLastError()); + ok(ret, "GetWindowRect failed, error %lu.\n", GetLastError()); updown_width = start_width - (rect.right - rect.left); ok(updown_width > 0, "Expected updown width > 0, got %d.\n", updown_width);
SendMessageA(updown, UDM_SETBUDDY, (WPARAM)g_edit, 0); ret = GetWindowRect(g_edit, &rect); - ok(ret, "GetWindowRect failed, error %u.\n", GetLastError()); + ok(ret, "GetWindowRect failed, error %lu.\n", GetLastError()); width = rect.right - rect.left; height = rect.bottom - rect.top; ok(width == start_width - 2 * updown_width, "Expected width %d, got %d.\n", diff --git a/dlls/comctl32/tests/v6util.h b/dlls/comctl32/tests/v6util.h index 626f6e61255..fc32616d777 100644 --- a/dlls/comctl32/tests/v6util.h +++ b/dlls/comctl32/tests/v6util.h @@ -107,7 +107,7 @@ static BOOL load_v6_module(ULONG_PTR *pcookie, HANDLE *hCtx) hmod = GetModuleHandleA("comctl32.dll");
ret = ActivateActCtx(*hCtx, pcookie); - ok(ret, "Failed to activate context, error %d.\n", GetLastError()); + ok(ret, "Failed to activate context, error %ld.\n", GetLastError());
if (!ret) { @@ -118,7 +118,7 @@ static BOOL load_v6_module(ULONG_PTR *pcookie, HANDLE *hCtx) data.cbSize = sizeof(data); ret = FindActCtxSectionStringA(0, NULL, ACTIVATION_CONTEXT_SECTION_DLL_REDIRECTION, "comctl32.dll", &data); - ok(ret, "failed to find comctl32.dll in active context, %u\n", GetLastError()); + ok(ret, "failed to find comctl32.dll in active context, %lu\n", GetLastError()); if (ret) { FreeLibrary(hmod);
Hi,
While running your changed tests, I think I found new failures. Being a bot and all I'm not very good at pattern recognition, so I might be wrong, but could you please double-check?
Full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=109207
Your paranoid android.
=== w10pro64_ar (64 bit report) ===
comctl32: datetime.c:798: Test failed: Expected 24/02/2022, got 2022/02/24
=== w7u_2qxl (32 bit report) ===
comctl32: listview.c:2276: Test failed: expected (10,10), got (5,5)
=== w7u_adm (32 bit report) ===
comctl32: listview.c:2276: Test failed: expected (10,10), got (5,5)
=== w7u_el (32 bit report) ===
comctl32: listview.c:2276: Test failed: expected (10,10), got (5,5)
=== w8 (32 bit report) ===
comctl32: listview.c:2276: Test failed: expected (10,10), got (5,5)
=== w8adm (32 bit report) ===
comctl32: listview.c:2276: Test failed: expected (10,10), got (5,5)
=== w864 (32 bit report) ===
comctl32: listview.c:2276: Test failed: expected (10,10), got (5,5)
=== w1064v1507 (32 bit report) ===
comctl32: listview.c:2276: Test failed: expected (10,10), got (5,5)
=== w1064v1809 (32 bit report) ===
comctl32: listview.c:2276: Test failed: expected (10,10), got (5,5)
=== w1064 (32 bit report) ===
comctl32: listview.c:2276: Test failed: expected (10,10), got (5,5)
=== w1064_tsign (32 bit report) ===
comctl32: listview.c:2276: Test failed: expected (10,10), got (5,5)
=== w10pro64 (32 bit report) ===
comctl32: listview.c:2276: Test failed: expected (10,10), got (5,5)
=== w864 (64 bit report) ===
comctl32: listview.c:2276: Test failed: expected (10,10), got (5,5)
=== w1064v1507 (64 bit report) ===
comctl32: listview.c:2276: Test failed: expected (10,10), got (5,5)
=== w1064v1809 (64 bit report) ===
comctl32: listview.c:2276: Test failed: expected (10,10), got (5,5)
=== w1064 (64 bit report) ===
comctl32: listview.c:2276: Test failed: expected (10,10), got (5,5)
=== w1064_2qxl (64 bit report) ===
comctl32: listview.c:2276: Test failed: expected (10,10), got (5,5)
=== w1064_tsign (64 bit report) ===
comctl32: listview.c:2276: Test failed: expected (10,10), got (5,5)
=== w10pro64 (64 bit report) ===
comctl32: listview.c:2276: Test failed: expected (10,10), got (5,5)
=== w10pro64_ar (64 bit report) ===
comctl32: listview.c:2276: Test failed: expected (10,10), got (5,5)
=== w10pro64_he (64 bit report) ===
comctl32: listview.c:2276: Test failed: expected (10,10), got (5,5)
=== w10pro64_ja (64 bit report) ===
comctl32: listview.c:2276: Test failed: expected (10,10), got (5,5)
=== w10pro64_zh_CN (64 bit report) ===
comctl32: listview.c:2276: Test failed: expected (10,10), got (5,5)
=== w1064v1809 (testbot log) ===
WineRunTask.pl:error: The previous 1 run(s) terminated abnormally
=== debian11 (32 bit report) ===
comctl32: listview.c:2276: Test failed: expected (10,10), got (5,5)
=== debian11 (32 bit Arabic:Morocco report) ===
comctl32: listview.c:2276: Test failed: expected (10,10), got (5,5)
=== debian11 (32 bit German report) ===
comctl32: listview.c:2276: Test failed: expected (10,10), got (5,5)
=== debian11 (32 bit French report) ===
comctl32: listview.c:2276: Test failed: expected (10,10), got (5,5)
=== debian11 (32 bit Hebrew:Israel report) ===
comctl32: listview.c:2276: Test failed: expected (10,10), got (5,5)
=== debian11 (32 bit Hindi:India report) ===
comctl32: listview.c:2276: Test failed: expected (10,10), got (5,5)
=== debian11 (32 bit Japanese:Japan report) ===
comctl32: listview.c:2276: Test failed: expected (10,10), got (5,5)
=== debian11 (32 bit Chinese:China report) ===
comctl32: listview.c:2276: Test failed: expected (10,10), got (5,5)
=== debian11 (32 bit WoW report) ===
comctl32: listview.c:2276: Test failed: expected (10,10), got (5,5)
=== debian11 (64 bit WoW report) ===
comctl32: listview.c:2276: Test failed: expected (10,10), got (5,5)
Signed-off-by: Eric Pouech eric.pouech@gmail.com
--- dlls/d3d10core/tests/Makefile.in | 1 dlls/d3d10core/tests/d3d10core.c | 1524 +++++++++++++++++++------------------- 2 files changed, 762 insertions(+), 763 deletions(-)
diff --git a/dlls/d3d10core/tests/Makefile.in b/dlls/d3d10core/tests/Makefile.in index c65e6e8cafa..313a042b246 100644 --- a/dlls/d3d10core/tests/Makefile.in +++ b/dlls/d3d10core/tests/Makefile.in @@ -1,4 +1,3 @@ -EXTRADEFS = -DWINE_NO_LONG_TYPES TESTDLL = d3d10core.dll IMPORTS = d3d10 dxgi user32
diff --git a/dlls/d3d10core/tests/d3d10core.c b/dlls/d3d10core/tests/d3d10core.c index 49622bd0e26..fc179cc4e6e 100644 --- a/dlls/d3d10core/tests/d3d10core.c +++ b/dlls/d3d10core/tests/d3d10core.c @@ -174,7 +174,7 @@ static HRESULT check_interface_(unsigned int line, void *iface, REFIID riid, BOO
hr = IUnknown_QueryInterface(unknown, riid, (void **)&out); ok_(__FILE__, line)(hr == expected_hr || broken(is_broken && hr == broken_hr), - "Got hr %#x, expected %#x.\n", hr, expected_hr); + "Got hr %#lx, expected %#lx.\n", hr, expected_hr); if (SUCCEEDED(hr)) IUnknown_Release(out); return hr; @@ -586,7 +586,7 @@ static ID3D10Buffer *create_buffer_(unsigned int line, ID3D10Device *device, resource_data.SysMemSlicePitch = 0;
hr = ID3D10Device_CreateBuffer(device, &buffer_desc, data ? &resource_data : NULL, &buffer); - ok_(__FILE__, line)(SUCCEEDED(hr), "Failed to create buffer, hr %#x.\n", hr); + ok_(__FILE__, line)(SUCCEEDED(hr), "Failed to create buffer, hr %#lx.\n", hr); return buffer; }
@@ -616,7 +616,7 @@ static void get_buffer_readback(ID3D10Buffer *buffer, struct resource_readback * buffer_desc.MiscFlags = 0; if (FAILED(hr = ID3D10Device_CreateBuffer(device, &buffer_desc, NULL, (ID3D10Buffer **)&rb->resource))) { - trace("Failed to create texture, hr %#x.\n", hr); + trace("Failed to create texture, hr %#lx.\n", hr); ID3D10Device_Release(device); return; } @@ -628,7 +628,7 @@ static void get_buffer_readback(ID3D10Buffer *buffer, struct resource_readback * ID3D10Device_CopyResource(device, rb->resource, (ID3D10Resource *)buffer); if (FAILED(hr = ID3D10Buffer_Map((ID3D10Buffer *)rb->resource, D3D10_MAP_READ, 0, &rb->map_desc.pData))) { - trace("Failed to map buffer, hr %#x.\n", hr); + trace("Failed to map buffer, hr %#lx.\n", hr); ID3D10Resource_Release(rb->resource); rb->resource = NULL; } @@ -657,7 +657,7 @@ static void get_texture1d_readback(ID3D10Texture1D *texture, unsigned int sub_re texture_desc.MiscFlags = 0; if (FAILED(hr = ID3D10Device_CreateTexture1D(device, &texture_desc, NULL, (ID3D10Texture1D **)&rb->resource))) { - trace("Failed to create texture, hr %#x.\n", hr); + trace("Failed to create texture, hr %#lx.\n", hr); ID3D10Device_Release(device); return; } @@ -671,7 +671,7 @@ static void get_texture1d_readback(ID3D10Texture1D *texture, unsigned int sub_re if (FAILED(hr = ID3D10Texture1D_Map((ID3D10Texture1D *)rb->resource, sub_resource_idx, D3D10_MAP_READ, 0, &rb->map_desc.pData))) { - trace("Failed to map sub-resource %u, hr %#x.\n", sub_resource_idx, hr); + trace("Failed to map sub-resource %u, hr %#lx.\n", sub_resource_idx, hr); ID3D10Resource_Release(rb->resource); rb->resource = NULL; } @@ -700,7 +700,7 @@ static void get_texture_readback(ID3D10Texture2D *texture, unsigned int sub_reso texture_desc.MiscFlags = 0; if (FAILED(hr = ID3D10Device_CreateTexture2D(device, &texture_desc, NULL, (ID3D10Texture2D **)&rb->resource))) { - trace("Failed to create texture, hr %#x.\n", hr); + trace("Failed to create texture, hr %#lx.\n", hr); ID3D10Device_Release(device); return; } @@ -714,7 +714,7 @@ static void get_texture_readback(ID3D10Texture2D *texture, unsigned int sub_reso if (FAILED(hr = ID3D10Texture2D_Map((ID3D10Texture2D *)rb->resource, sub_resource_idx, D3D10_MAP_READ, 0, &rb->map_desc))) { - trace("Failed to map sub-resource %u, hr %#x.\n", sub_resource_idx, hr); + trace("Failed to map sub-resource %u, hr %#lx.\n", sub_resource_idx, hr); ID3D10Resource_Release(rb->resource); rb->resource = NULL; } @@ -886,7 +886,7 @@ static void check_readback_data_u24_(unsigned int line, struct resource_readback
done: ok_(__FILE__, line)(all_match, - "Got 0x%06x, expected 0x%06x at (%u, %u), sub-resource %u.\n", + "Got 0x%06lx, expected 0x%06lx at (%u, %u), sub-resource %u.\n", value, expected_value, x, y, rb->sub_resource_idx); }
@@ -918,7 +918,7 @@ static void check_readback_data_color_(unsigned int line, struct resource_readba
done: ok_(__FILE__, line)(all_match, - "Got 0x%08x, expected 0x%08x at (%u, %u), sub-resource %u.\n", + "Got 0x%08lx, expected 0x%08lx at (%u, %u), sub-resource %u.\n", color, expected_color, x, y, rb->sub_resource_idx); }
@@ -1134,7 +1134,7 @@ static IDXGIAdapter *create_adapter(void)
if (FAILED(hr = CreateDXGIFactory(&IID_IDXGIFactory, (void **)&factory))) { - trace("Failed to create IDXGIFactory, hr %#x.\n", hr); + trace("Failed to create IDXGIFactory, hr %#lx.\n", hr); return NULL; }
@@ -1148,7 +1148,7 @@ static IDXGIAdapter *create_adapter(void) } else { - trace("Failed to get IDXGIFactory4, hr %#x.\n", hr); + trace("Failed to get IDXGIFactory4, hr %#lx.\n", hr); } } else @@ -1157,7 +1157,7 @@ static IDXGIAdapter *create_adapter(void) } IDXGIFactory_Release(factory); if (FAILED(hr)) - trace("Failed to get adapter, hr %#x.\n", hr); + trace("Failed to get adapter, hr %#lx.\n", hr); return adapter; }
@@ -1193,12 +1193,12 @@ static void get_device_adapter_desc(ID3D10Device *device, DXGI_ADAPTER_DESC *ada HRESULT hr;
hr = ID3D10Device_QueryInterface(device, &IID_IDXGIDevice, (void **)&dxgi_device); - ok(SUCCEEDED(hr), "Failed to query IDXGIDevice interface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to query IDXGIDevice interface, hr %#lx.\n", hr); hr = IDXGIDevice_GetAdapter(dxgi_device, &adapter); - ok(SUCCEEDED(hr), "Failed to get adapter, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get adapter, hr %#lx.\n", hr); IDXGIDevice_Release(dxgi_device); hr = IDXGIAdapter_GetDesc(adapter, adapter_desc); - ok(SUCCEEDED(hr), "Failed to get adapter desc, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get adapter desc, hr %#lx.\n", hr); IDXGIAdapter_Release(adapter); }
@@ -1280,12 +1280,12 @@ static IDXGISwapChain *create_swapchain(ID3D10Device *device, HWND window, HRESULT hr;
hr = ID3D10Device_QueryInterface(device, &IID_IDXGIDevice, (void **)&dxgi_device); - ok(SUCCEEDED(hr), "Failed to get DXGI device, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get DXGI device, hr %#lx.\n", hr); hr = IDXGIDevice_GetAdapter(dxgi_device, &adapter); - ok(SUCCEEDED(hr), "Failed to get adapter, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get adapter, hr %#lx.\n", hr); IDXGIDevice_Release(dxgi_device); hr = IDXGIAdapter_GetParent(adapter, &IID_IDXGIFactory, (void **)&factory); - ok(SUCCEEDED(hr), "Failed to get factory, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get factory, hr %#lx.\n", hr); IDXGIAdapter_Release(adapter);
dxgi_desc.BufferDesc.Width = 640; @@ -1319,7 +1319,7 @@ static IDXGISwapChain *create_swapchain(ID3D10Device *device, HWND window, }
hr = IDXGIFactory_CreateSwapChain(factory, (IUnknown *)device, &dxgi_desc, &swapchain); - ok(SUCCEEDED(hr), "Failed to create swapchain, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create swapchain, hr %#lx.\n", hr); IDXGIFactory_Release(factory);
return swapchain; @@ -1368,11 +1368,11 @@ static BOOL init_test_context_(unsigned int line, struct d3d10core_test_context 0, 0, rect.right - rect.left, rect.bottom - rect.top, NULL, NULL, NULL, NULL); context->swapchain = create_swapchain(context->device, context->window, swapchain_desc); hr = IDXGISwapChain_GetBuffer(context->swapchain, 0, &IID_ID3D10Texture2D, (void **)&context->backbuffer); - ok_(__FILE__, line)(SUCCEEDED(hr), "Failed to get backbuffer, hr %#x.\n", hr); + ok_(__FILE__, line)(SUCCEEDED(hr), "Failed to get backbuffer, hr %#lx.\n", hr);
hr = ID3D10Device_CreateRenderTargetView(context->device, (ID3D10Resource *)context->backbuffer, NULL, &context->backbuffer_rtv); - ok_(__FILE__, line)(SUCCEEDED(hr), "Failed to create rendertarget view, hr %#x.\n", hr); + ok_(__FILE__, line)(SUCCEEDED(hr), "Failed to create rendertarget view, hr %#lx.\n", hr);
ID3D10Device_OMSetRenderTargets(context->device, 1, &context->backbuffer_rtv, NULL);
@@ -1405,7 +1405,7 @@ static void release_test_context_(unsigned int line, struct d3d10core_test_conte DestroyWindow(context->window);
ref = ID3D10Device_Release(context->device); - ok_(__FILE__, line)(!ref, "Device has %u references left.\n", ref); + ok_(__FILE__, line)(!ref, "Device has %lu references left.\n", ref); }
#define draw_quad(context) draw_quad_vs_(__LINE__, context, NULL, 0) @@ -1455,7 +1455,7 @@ static void draw_quad_vs_(unsigned int line, struct d3d10core_test_context *cont { hr = ID3D10Device_CreateInputLayout(device, default_layout_desc, ARRAY_SIZE(default_layout_desc), vs_code, vs_code_size, &context->input_layout); - ok_(__FILE__, line)(SUCCEEDED(hr), "Failed to create input layout, hr %#x.\n", hr); + ok_(__FILE__, line)(SUCCEEDED(hr), "Failed to create input layout, hr %#lx.\n", hr); }
if (!context->vb) @@ -1467,7 +1467,7 @@ static void draw_quad_vs_(unsigned int line, struct d3d10core_test_context *cont ID3D10VertexShader_Release(context->vs);
hr = ID3D10Device_CreateVertexShader(device, vs_code, vs_code_size, &context->vs); - ok_(__FILE__, line)(hr == S_OK, "Failed to create vertex shader, hr %#x.\n", hr); + ok_(__FILE__, line)(hr == S_OK, "Failed to create vertex shader, hr %#lx.\n", hr);
context->vs_code = vs_code; } @@ -1546,7 +1546,7 @@ static void draw_color_quad_(unsigned int line, struct d3d10core_test_context *c if (!context->ps) { hr = ID3D10Device_CreatePixelShader(device, ps_color_code, sizeof(ps_color_code), &context->ps); - ok_(__FILE__, line)(SUCCEEDED(hr), "Failed to create pixel shader, hr %#x.\n", hr); + ok_(__FILE__, line)(SUCCEEDED(hr), "Failed to create pixel shader, hr %#lx.\n", hr); }
if (!context->ps_cb) @@ -1575,7 +1575,7 @@ static void test_feature_level(void)
hr = ID3D10Device_QueryInterface(d3d10_device, &IID_ID3D11Device, (void **)&d3d11_device); ok(SUCCEEDED(hr) || broken(hr == E_NOINTERFACE) /* Not available on all Windows versions. */, - "Failed to query ID3D11Device interface, hr %#x.\n", hr); + "Failed to query ID3D11Device interface, hr %#lx.\n", hr); if (FAILED(hr)) { win_skip("D3D11 is not available.\n"); @@ -1640,23 +1640,23 @@ static void test_device_interfaces(void) expected_refcount = get_refcount(device) + 1;
hr = ID3D10Device_QueryInterface(device, &IID_ID3D10Multithread, (void **)&multithread); - ok(hr == S_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
refcount = get_refcount(device); - ok(refcount == expected_refcount, "Got refcount %u, expected %u.\n", refcount, expected_refcount); + ok(refcount == expected_refcount, "Got refcount %lu, expected %lu.\n", refcount, expected_refcount);
expected_refcount = refcount; refcount = get_refcount(multithread); - ok(refcount == expected_refcount, "Got refcount %u, expected %u.\n", refcount, expected_refcount); + ok(refcount == expected_refcount, "Got refcount %lu, expected %lu.\n", refcount, expected_refcount);
ID3D11Device_GetImmediateContext(d3d11_device, &immediate_context); hr = ID3D11DeviceContext_QueryInterface(immediate_context, &IID_ID3D11Multithread, (void **)&d3d11_multithread); - ok(hr == S_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
expected_refcount = get_refcount(immediate_context); refcount = get_refcount(d3d11_multithread); - ok(refcount == expected_refcount, "Got refcount %u, expected %u.\n", refcount, expected_refcount); + ok(refcount == expected_refcount, "Got refcount %lu, expected %lu.\n", refcount, expected_refcount);
enabled = ID3D10Multithread_GetMultithreadProtected(multithread); ok(enabled, "Multithread protection is %#x.\n", enabled); @@ -1670,7 +1670,7 @@ static void test_device_interfaces(void)
done: refcount = ID3D10Device_Release(device); - ok(!refcount, "Device has %u references left.\n", refcount); + ok(!refcount, "Device has %lu references left.\n", refcount); }
static void test_create_texture1d(void) @@ -1699,19 +1699,19 @@ static void test_create_texture1d(void) desc.MiscFlags = 0;
hr = ID3D10Device_CreateTexture1D(device, &desc, &data, &texture); - ok(hr == E_INVALIDARG, "Got unexpected hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Got unexpected hr %#lx.\n", hr);
expected_refcount = get_refcount(device) + 1; hr = ID3D10Device_CreateTexture1D(device, &desc, NULL, &texture); - ok(SUCCEEDED(hr), "Failed to create a 1d texture, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create a 1d texture, hr %#lx.\n", hr); refcount = get_refcount(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; ID3D10Texture1D_GetDevice(texture, &tmp); ok(tmp == device, "Got unexpected device %p, expected %p.\n", tmp, device); refcount = get_refcount(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);
check_interface(texture, &IID_IDXGISurface, TRUE, FALSE); @@ -1720,15 +1720,15 @@ static void test_create_texture1d(void) desc.MipLevels = 0; expected_refcount = get_refcount(device) + 1; hr = ID3D10Device_CreateTexture1D(device, &desc, NULL, &texture); - ok(SUCCEEDED(hr), "Failed to create a 1d texture, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create a 1d texture, hr %#lx.\n", hr); refcount = get_refcount(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; ID3D10Texture1D_GetDevice(texture, &tmp); ok(tmp == device, "Got unexpected device %p, expected %p.\n", tmp, device); refcount = get_refcount(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);
ID3D10Texture1D_GetDesc(texture, &desc); @@ -1747,7 +1747,7 @@ static void test_create_texture1d(void) desc.MipLevels = 1; desc.ArraySize = 2; hr = ID3D10Device_CreateTexture1D(device, &desc, NULL, &texture); - ok(SUCCEEDED(hr), "Failed to create a 1d texture, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create a 1d texture, hr %#lx.\n", hr);
check_interface(texture, &IID_IDXGISurface, FALSE, FALSE); ID3D10Texture1D_Release(texture); @@ -1759,13 +1759,13 @@ static void test_create_texture1d(void) desc.BindFlags = D3D10_BIND_SHADER_RESOURCE; desc.MiscFlags = 0; hr = ID3D10Device_CreateTexture1D(device, &desc, NULL, &texture); - ok(hr == (i ? S_OK : E_INVALIDARG), "Test %u: Got unexpected hr %#x.\n", i, hr); + ok(hr == (i ? S_OK : E_INVALIDARG), "Test %u: Got unexpected hr %#lx.\n", i, hr); if (SUCCEEDED(hr)) ID3D10Texture1D_Release(texture); }
refcount = ID3D10Device_Release(device); - ok(!refcount, "Device has %u references left.\n", refcount); + ok(!refcount, "Device has %lu references left.\n", refcount); }
static void test_texture1d_interfaces(void) @@ -1813,7 +1813,7 @@ static void test_texture1d_interfaces(void) desc.MiscFlags = 0;
hr = ID3D10Device_CreateTexture1D(device, &desc, NULL, &texture); - ok(SUCCEEDED(hr), "Failed to create a 1d texture, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create a 1d texture, hr %#lx.\n", hr); check_interface(texture, &IID_IDXGISurface, FALSE, FALSE); hr = check_interface(texture, &IID_ID3D11Texture1D, TRUE, TRUE); /* Not available on all Windows versions. */ ID3D10Texture1D_Release(texture); @@ -1842,7 +1842,7 @@ static void test_texture1d_interfaces(void) hr = ID3D10Device_CreateTexture1D(device, &desc, NULL, &texture); /* Shared resources are not supported by REF and WARP devices. */ ok(SUCCEEDED(hr) || broken(hr == E_OUTOFMEMORY), - "Test %u: Failed to create a 1d texture, hr %#x.\n", i, hr); + "Test %u: Failed to create a 1d texture, hr %#lx.\n", i, hr); if (FAILED(hr)) { win_skip("Failed to create ID3D10Texture1D, skipping test %u.\n", i); @@ -1882,7 +1882,7 @@ static void test_texture1d_interfaces(void) }
refcount = ID3D10Device_Release(device); - ok(!refcount, "Device has %u references left.\n", refcount); + ok(!refcount, "Device has %lu references left.\n", refcount); }
static void test_create_texture2d(void) @@ -2009,19 +2009,19 @@ static void test_create_texture2d(void) desc.MiscFlags = 0;
hr = ID3D10Device_CreateTexture2D(device, &desc, &data, &texture); - ok(hr == E_INVALIDARG, "Got unexpected hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Got unexpected hr %#lx.\n", hr);
expected_refcount = get_refcount(device) + 1; hr = ID3D10Device_CreateTexture2D(device, &desc, NULL, &texture); - ok(SUCCEEDED(hr), "Failed to create a 2d texture, hr %#x\n", hr); + ok(SUCCEEDED(hr), "Failed to create a 2d texture, hr %#lx\n", hr); refcount = get_refcount(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; ID3D10Texture2D_GetDevice(texture, &tmp); ok(tmp == device, "Got unexpected device %p, expected %p.\n", tmp, device); refcount = get_refcount(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);
check_interface(texture, &IID_IDXGISurface, TRUE, FALSE); @@ -2030,15 +2030,15 @@ static void test_create_texture2d(void) desc.MipLevels = 0; expected_refcount = get_refcount(device) + 1; hr = ID3D10Device_CreateTexture2D(device, &desc, NULL, &texture); - ok(SUCCEEDED(hr), "Failed to create a 2d texture, hr %#x\n", hr); + ok(SUCCEEDED(hr), "Failed to create a 2d texture, hr %#lx\n", hr); refcount = get_refcount(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; ID3D10Texture2D_GetDevice(texture, &tmp); ok(tmp == device, "Got unexpected device %p, expected %p.\n", tmp, device); refcount = get_refcount(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);
ID3D10Texture2D_GetDesc(texture, &desc); @@ -2060,29 +2060,29 @@ static void test_create_texture2d(void) desc.MipLevels = 1; desc.ArraySize = 2; hr = ID3D10Device_CreateTexture2D(device, &desc, NULL, &texture); - ok(SUCCEEDED(hr), "Failed to create a 2d texture, hr %#x\n", hr); + ok(SUCCEEDED(hr), "Failed to create a 2d texture, hr %#lx\n", hr); check_interface(texture, &IID_IDXGISurface, FALSE, FALSE); ID3D10Texture2D_Release(texture);
hr = ID3D10Device_CheckMultisampleQualityLevels(device, DXGI_FORMAT_R8G8B8A8_UNORM, 2, &quality_level_count); - ok(hr == S_OK, "Failed to check multisample quality levels, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to check multisample quality levels, hr %#lx.\n", hr); desc.ArraySize = 1; desc.SampleDesc.Count = 2; hr = ID3D10Device_CreateTexture2D(device, &desc, NULL, &texture); if (quality_level_count) { - ok(SUCCEEDED(hr), "Got unexpected hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Got unexpected hr %#lx.\n", hr); ID3D10Texture2D_Release(texture); desc.SampleDesc.Quality = quality_level_count; hr = ID3D10Device_CreateTexture2D(device, &desc, NULL, &texture); } - ok(hr == E_INVALIDARG, "Got unexpected hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Got unexpected hr %#lx.\n", hr);
/* We assume 15 samples multisampling is never supported in practice. */ desc.SampleDesc.Count = 15; desc.SampleDesc.Quality = 0; hr = ID3D10Device_CreateTexture2D(device, &desc, NULL, &texture); - ok(hr == E_INVALIDARG, "Got unexpected hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Got unexpected hr %#lx.\n", hr);
desc.SampleDesc.Count = 1; for (i = 0; i < ARRAY_SIZE(tests); ++i) @@ -2095,14 +2095,14 @@ static void test_create_texture2d(void)
todo_wine_if(tests[i].todo) ok(hr == (tests[i].succeeds ? S_OK : E_INVALIDARG), - "Test %u: Got unexpected hr %#x (format %#x).\n", i, hr, desc.Format); + "Test %u: Got unexpected hr %#lx (format %#x).\n", i, hr, desc.Format);
if (SUCCEEDED(hr)) ID3D10Texture2D_Release(texture); }
refcount = ID3D10Device_Release(device); - ok(!refcount, "Device has %u references left.\n", refcount); + ok(!refcount, "Device has %lu references left.\n", refcount); }
static void test_texture2d_interfaces(void) @@ -2153,7 +2153,7 @@ static void test_texture2d_interfaces(void) desc.MiscFlags = 0;
hr = ID3D10Device_CreateTexture2D(device, &desc, NULL, &texture); - ok(SUCCEEDED(hr), "Failed to create a 2d texture, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create a 2d texture, hr %#lx.\n", hr); check_interface(texture, &IID_IDXGISurface, FALSE, FALSE); hr = check_interface(texture, &IID_ID3D11Texture2D, TRUE, TRUE); /* Not available on all Windows versions. */ ID3D10Texture2D_Release(texture); @@ -2185,7 +2185,7 @@ static void test_texture2d_interfaces(void) hr = ID3D10Device_CreateTexture2D(device, &desc, NULL, &texture); /* Shared resources are not supported by REF and WARP devices. */ ok(SUCCEEDED(hr) || broken(hr == E_OUTOFMEMORY), - "Test %u: Failed to create a 2d texture, hr %#x.\n", i, hr); + "Test %u: Failed to create a 2d texture, hr %#lx.\n", i, hr); if (FAILED(hr)) { win_skip("Failed to create ID3D10Texture2D, skipping test %u.\n", i); @@ -2231,7 +2231,7 @@ static void test_texture2d_interfaces(void) }
refcount = ID3D10Device_Release(device); - ok(!refcount, "Device has %u references left.\n", refcount); + ok(!refcount, "Device has %lu references left.\n", refcount); }
static void test_create_texture3d(void) @@ -2284,19 +2284,19 @@ static void test_create_texture3d(void) desc.MiscFlags = 0;
hr = ID3D10Device_CreateTexture3D(device, &desc, &data, &texture); - ok(hr == E_INVALIDARG, "Got unexpected hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Got unexpected hr %#lx.\n", hr);
expected_refcount = get_refcount(device) + 1; hr = ID3D10Device_CreateTexture3D(device, &desc, NULL, &texture); - ok(SUCCEEDED(hr), "Failed to create a 3d texture, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create a 3d texture, hr %#lx.\n", hr); refcount = get_refcount(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; ID3D10Texture3D_GetDevice(texture, &tmp); ok(tmp == device, "Got unexpected device %p, expected %p.\n", tmp, device); refcount = get_refcount(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);
check_interface(texture, &IID_IDXGISurface, FALSE, FALSE); @@ -2305,15 +2305,15 @@ static void test_create_texture3d(void) desc.MipLevels = 0; expected_refcount = get_refcount(device) + 1; hr = ID3D10Device_CreateTexture3D(device, &desc, NULL, &texture); - ok(SUCCEEDED(hr), "Failed to create a 3d texture, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create a 3d texture, hr %#lx.\n", hr); refcount = get_refcount(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; ID3D10Texture3D_GetDevice(texture, &tmp); ok(tmp == device, "Got unexpected device %p, expected %p.\n", tmp, device); refcount = get_refcount(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);
ID3D10Texture3D_GetDesc(texture, &desc); @@ -2338,14 +2338,14 @@ static void test_create_texture3d(void) hr = ID3D10Device_CreateTexture3D(device, &desc, NULL, &texture);
todo_wine_if(tests[i].todo) - ok(hr == (tests[i].succeeds ? S_OK : E_INVALIDARG), "Test %u: Got unexpected hr %#x.\n", i, hr); + ok(hr == (tests[i].succeeds ? S_OK : E_INVALIDARG), "Test %u: Got unexpected hr %#lx.\n", i, hr);
if (SUCCEEDED(hr)) ID3D10Texture3D_Release(texture); }
refcount = ID3D10Device_Release(device); - ok(!refcount, "Device has %u references left.\n", refcount); + ok(!refcount, "Device has %lu references left.\n", refcount); }
static void test_create_buffer(void) @@ -2427,7 +2427,7 @@ static void test_create_buffer(void)
hr = ID3D10Device_CreateBuffer(device, &desc, NULL, &buffer); /* Shared resources are not supported by REF and WARP devices. */ - ok(SUCCEEDED(hr) || broken(hr == E_OUTOFMEMORY), "Test %u: Failed to create a buffer, hr %#x.\n", i, hr); + ok(SUCCEEDED(hr) || broken(hr == E_OUTOFMEMORY), "Test %u: Failed to create a buffer, hr %#lx.\n", i, hr); if (FAILED(hr)) { win_skip("Failed to create a buffer, skipping test %u.\n", i); @@ -2468,7 +2468,7 @@ static void test_create_buffer(void) desc.MiscFlags = D3D11_RESOURCE_MISC_BUFFER_ALLOW_RAW_VIEWS;
hr = ID3D10Device_CreateBuffer(device, &desc, NULL, &buffer); - todo_wine ok(hr == E_INVALIDARG, "Got unexpected hr %#x.\n", hr); + todo_wine ok(hr == E_INVALIDARG, "Got unexpected hr %#lx.\n", hr); if (SUCCEEDED(hr)) ID3D10Buffer_Release(buffer);
@@ -2479,13 +2479,13 @@ static void test_create_buffer(void) desc.ByteWidth = i; expected_hr = !i || i % 16 ? E_INVALIDARG : S_OK; hr = ID3D10Device_CreateBuffer(device, &desc, NULL, &buffer); - ok(hr == expected_hr, "Got unexpected hr %#x for constant buffer size %u.\n", hr, i); + ok(hr == expected_hr, "Got unexpected hr %#lx for constant buffer size %u.\n", hr, i); if (SUCCEEDED(hr)) ID3D10Buffer_Release(buffer); }
refcount = ID3D10Device_Release(device); - ok(!refcount, "Device has %u references left.\n", refcount); + ok(!refcount, "Device has %lu references left.\n", refcount); }
static void test_create_depthstencil_view(void) @@ -2606,19 +2606,19 @@ static void test_create_depthstencil_view(void) texture_desc.MiscFlags = 0;
hr = ID3D10Device_CreateTexture2D(device, &texture_desc, NULL, &texture); - ok(SUCCEEDED(hr), "Failed to create a 2d texture, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create a 2d texture, hr %#lx.\n", hr);
expected_refcount = get_refcount(device) + 1; hr = ID3D10Device_CreateDepthStencilView(device, (ID3D10Resource *)texture, NULL, &dsview); - ok(SUCCEEDED(hr), "Failed to create a depthstencil view, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create a depthstencil view, hr %#lx.\n", hr); refcount = get_refcount(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; ID3D10DepthStencilView_GetDevice(dsview, &tmp); ok(tmp == device, "Got unexpected device %p, expected %p.\n", tmp, device); refcount = get_refcount(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);
memset(&dsv_desc, 0, sizeof(dsv_desc)); @@ -2640,7 +2640,7 @@ static void test_create_depthstencil_view(void) texture_desc.Format = tests[i].texture.format;
hr = ID3D10Device_CreateTexture2D(device, &texture_desc, NULL, &texture); - ok(SUCCEEDED(hr), "Test %u: Failed to create 2d texture, hr %#x.\n", i, hr); + ok(SUCCEEDED(hr), "Test %u: Failed to create 2d texture, hr %#lx.\n", i, hr);
if (tests[i].dsv_desc.dimension == D3D10_DSV_DIMENSION_UNKNOWN) { @@ -2654,9 +2654,9 @@ static void test_create_depthstencil_view(void)
expected_refcount = get_refcount(texture); hr = ID3D10Device_CreateDepthStencilView(device, (ID3D10Resource *)texture, current_desc, &dsview); - ok(SUCCEEDED(hr), "Test %u: Failed to create depth stencil view, hr %#x.\n", i, hr); + ok(SUCCEEDED(hr), "Test %u: Failed to create depth stencil view, hr %#lx.\n", i, hr); refcount = get_refcount(texture); - ok(refcount == expected_refcount, "Got refcount %u, expected %u.\n", refcount, expected_refcount); + ok(refcount == expected_refcount, "Got refcount %lu, expected %lu.\n", refcount, expected_refcount);
/* Not available on all Windows versions. */ check_interface(dsview, &IID_ID3D11DepthStencilView, TRUE, TRUE); @@ -2676,19 +2676,19 @@ static void test_create_depthstencil_view(void) texture_desc.Format = invalid_desc_tests[i].texture.format;
hr = ID3D10Device_CreateTexture2D(device, &texture_desc, NULL, &texture); - ok(SUCCEEDED(hr), "Test %u: Failed to create 2d texture, hr %#x.\n", i, hr); + ok(SUCCEEDED(hr), "Test %u: Failed to create 2d texture, hr %#lx.\n", i, hr);
dsview = (void *)0xdeadbeef; get_dsv_desc(&dsv_desc, &invalid_desc_tests[i].dsv_desc); hr = ID3D10Device_CreateDepthStencilView(device, (ID3D10Resource *)texture, &dsv_desc, &dsview); - ok(hr == E_INVALIDARG, "Test %u: Got unexpected hr %#x.\n", i, hr); + ok(hr == E_INVALIDARG, "Test %u: Got unexpected hr %#lx.\n", i, hr); ok(!dsview, "Unexpected pointer %p.\n", dsview);
ID3D10Texture2D_Release(texture); }
refcount = ID3D10Device_Release(device); - ok(!refcount, "Device has %u references left.\n", refcount); + ok(!refcount, "Device has %lu references left.\n", refcount); }
static void test_depthstencil_view_interfaces(void) @@ -2722,14 +2722,14 @@ static void test_depthstencil_view_interfaces(void) texture_desc.MiscFlags = 0;
hr = ID3D10Device_CreateTexture2D(device, &texture_desc, NULL, &texture); - ok(SUCCEEDED(hr), "Failed to create a 2d texture, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create a 2d texture, hr %#lx.\n", hr);
dsv_desc.Format = texture_desc.Format; dsv_desc.ViewDimension = D3D10_DSV_DIMENSION_TEXTURE2D; U(dsv_desc).Texture2D.MipSlice = 0;
hr = ID3D10Device_CreateDepthStencilView(device, (ID3D10Resource *)texture, &dsv_desc, &dsview); - ok(SUCCEEDED(hr), "Failed to create a depthstencil view, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create a depthstencil view, hr %#lx.\n", hr);
hr = ID3D10DepthStencilView_QueryInterface(dsview, &IID_ID3D11DepthStencilView, (void **)&d3d11_dsview); ID3D10DepthStencilView_Release(dsview); @@ -2756,7 +2756,7 @@ static void test_depthstencil_view_interfaces(void) ID3D10Texture2D_Release(texture);
refcount = ID3D10Device_Release(device); - ok(!refcount, "Device has %u references left.\n", refcount); + ok(!refcount, "Device has %lu references left.\n", refcount); }
static void test_create_rendertarget_view(void) @@ -2919,19 +2919,19 @@ static void test_create_rendertarget_view(void) buffer_desc.MiscFlags = 0;
hr = ID3D10Device_CreateBuffer(device, &buffer_desc, &data, &buffer); - ok(hr == E_INVALIDARG, "Got unexpected hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Got unexpected hr %#lx.\n", hr);
expected_refcount = get_refcount(device) + 1; hr = ID3D10Device_CreateBuffer(device, &buffer_desc, NULL, &buffer); - ok(SUCCEEDED(hr), "Failed to create a buffer, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create a buffer, hr %#lx.\n", hr); refcount = get_refcount(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; ID3D10Buffer_GetDevice(buffer, &tmp); ok(tmp == device, "Got unexpected device %p, expected %p.\n", tmp, device); refcount = get_refcount(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);
rtv_desc.Format = DXGI_FORMAT_R32G32B32A32_FLOAT; @@ -2943,21 +2943,21 @@ static void test_create_rendertarget_view(void) { rtview = (void *)0xdeadbeef; hr = ID3D10Device_CreateRenderTargetView(device, NULL, &rtv_desc, &rtview); - ok(hr == E_INVALIDARG, "Got unexpected hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Got unexpected hr %#lx.\n", hr); ok(!rtview, "Unexpected pointer %p.\n", rtview); }
expected_refcount = get_refcount(device) + 1; hr = ID3D10Device_CreateRenderTargetView(device, (ID3D10Resource *)buffer, &rtv_desc, &rtview); - ok(SUCCEEDED(hr), "Failed to create a rendertarget view, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create a rendertarget view, hr %#lx.\n", hr); refcount = get_refcount(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; ID3D10RenderTargetView_GetDevice(rtview, &tmp); ok(tmp == device, "Got unexpected device %p, expected %p.\n", tmp, device); refcount = get_refcount(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);
/* Not available on all Windows versions. */ @@ -2993,7 +2993,7 @@ static void test_create_rendertarget_view(void) texture2d_desc.Format = tests[i].texture.format;
hr = ID3D10Device_CreateTexture2D(device, &texture2d_desc, NULL, &texture2d); - ok(SUCCEEDED(hr), "Test %u: Failed to create 2d texture, hr %#x.\n", i, hr); + ok(SUCCEEDED(hr), "Test %u: Failed to create 2d texture, hr %#lx.\n", i, hr); texture = (ID3D10Resource *)texture2d; } else @@ -3003,7 +3003,7 @@ static void test_create_rendertarget_view(void) texture3d_desc.Format = tests[i].texture.format;
hr = ID3D10Device_CreateTexture3D(device, &texture3d_desc, NULL, &texture3d); - ok(SUCCEEDED(hr), "Test %u: Failed to create 3d texture, hr %#x.\n", i, hr); + ok(SUCCEEDED(hr), "Test %u: Failed to create 3d texture, hr %#lx.\n", i, hr); texture = (ID3D10Resource *)texture3d; }
@@ -3019,9 +3019,9 @@ static void test_create_rendertarget_view(void)
expected_refcount = get_refcount(texture); hr = ID3D10Device_CreateRenderTargetView(device, texture, current_desc, &rtview); - ok(SUCCEEDED(hr), "Test %u: Failed to create render target view, hr %#x.\n", i, hr); + ok(SUCCEEDED(hr), "Test %u: Failed to create render target view, hr %#lx.\n", i, hr); refcount = get_refcount(texture); - ok(refcount == expected_refcount, "Got refcount %u, expected %u.\n", refcount, expected_refcount); + ok(refcount == expected_refcount, "Got refcount %lu, expected %lu.\n", refcount, expected_refcount);
/* Not available on all Windows versions. */ check_interface(rtview, &IID_ID3D11RenderTargetView, TRUE, TRUE); @@ -3046,7 +3046,7 @@ static void test_create_rendertarget_view(void) texture2d_desc.Format = invalid_desc_tests[i].texture.format;
hr = ID3D10Device_CreateTexture2D(device, &texture2d_desc, NULL, &texture2d); - ok(SUCCEEDED(hr), "Test %u: Failed to create 2d texture, hr %#x.\n", i, hr); + ok(SUCCEEDED(hr), "Test %u: Failed to create 2d texture, hr %#lx.\n", i, hr); texture = (ID3D10Resource *)texture2d; } else @@ -3056,21 +3056,21 @@ static void test_create_rendertarget_view(void) texture3d_desc.Format = invalid_desc_tests[i].texture.format;
hr = ID3D10Device_CreateTexture3D(device, &texture3d_desc, NULL, &texture3d); - ok(SUCCEEDED(hr), "Test %u: Failed to create 3d texture, hr %#x.\n", i, hr); + ok(SUCCEEDED(hr), "Test %u: Failed to create 3d texture, hr %#lx.\n", i, hr); texture = (ID3D10Resource *)texture3d; }
get_rtv_desc(&rtv_desc, &invalid_desc_tests[i].rtv_desc); rtview = (void *)0xdeadbeef; hr = ID3D10Device_CreateRenderTargetView(device, texture, &rtv_desc, &rtview); - ok(hr == E_INVALIDARG, "Test %u: Got unexpected hr %#x.\n", i, hr); + ok(hr == E_INVALIDARG, "Test %u: Got unexpected hr %#lx.\n", i, hr); ok(!rtview, "Unexpected pointer %p.\n", rtview);
ID3D10Resource_Release(texture); }
refcount = ID3D10Device_Release(device); - ok(!refcount, "Device has %u references left.\n", refcount); + ok(!refcount, "Device has %lu references left.\n", refcount); }
static void test_render_target_views(void) @@ -3167,11 +3167,11 @@ static void test_render_target_views(void) texture_desc.ArraySize = test->texture.array_size;
hr = ID3D10Device_CreateTexture2D(device, &texture_desc, NULL, &texture); - ok(SUCCEEDED(hr), "Test %u: Failed to create texture, hr %#x.\n", i, hr); + ok(SUCCEEDED(hr), "Test %u: Failed to create texture, hr %#lx.\n", i, hr);
get_rtv_desc(&rtv_desc, &test->rtv); hr = ID3D10Device_CreateRenderTargetView(device, (ID3D10Resource *)texture, &rtv_desc, &rtv); - ok(SUCCEEDED(hr), "Test %u: Failed to create render target view, hr %#x.\n", i, hr); + ok(SUCCEEDED(hr), "Test %u: Failed to create render target view, hr %#lx.\n", i, hr);
for (j = 0; j < texture_desc.ArraySize; ++j) { @@ -3315,10 +3315,10 @@ static void test_layered_rendering(void) ID3D10Device_PSSetConstantBuffers(device, 0, 1, &cb);
hr = ID3D10Device_CreateGeometryShader(device, gs_code, sizeof(gs_code), &gs); - ok(SUCCEEDED(hr), "Failed to create geometry shader, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create geometry shader, hr %#lx.\n", hr); ID3D10Device_GSSetShader(device, gs); hr = ID3D10Device_CreatePixelShader(device, ps_code, sizeof(ps_code), &ps); - ok(SUCCEEDED(hr), "Failed to create pixel shader, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create pixel shader, hr %#lx.\n", hr); ID3D10Device_PSSetShader(device, ps);
texture_desc.Width = 32; @@ -3333,10 +3333,10 @@ static void test_layered_rendering(void) texture_desc.CPUAccessFlags = 0; texture_desc.MiscFlags = 0; hr = ID3D10Device_CreateTexture2D(device, &texture_desc, NULL, &texture); - ok(SUCCEEDED(hr), "Failed to create texture, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create texture, hr %#lx.\n", hr);
hr = ID3D10Device_CreateRenderTargetView(device, (ID3D10Resource *)texture, NULL, &rtv); - ok(SUCCEEDED(hr), "Failed to create render target view, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create render target view, hr %#lx.\n", hr); ID3D10Device_OMSetRenderTargets(device, 1, &rtv, NULL); constant.layer_offset = 0; constant.draw_id = 0; @@ -3354,7 +3354,7 @@ static void test_layered_rendering(void) U(rtv_desc).Texture2DArray.FirstArraySlice = 3; U(rtv_desc).Texture2DArray.ArraySize = 1; hr = ID3D10Device_CreateRenderTargetView(device, (ID3D10Resource *)texture, &rtv_desc, &rtv); - ok(SUCCEEDED(hr), "Failed to create render target view, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create render target view, hr %#lx.\n", hr); ID3D10Device_OMSetRenderTargets(device, 1, &rtv, NULL); constant.layer_offset = 1; constant.draw_id = 2; @@ -3367,7 +3367,7 @@ static void test_layered_rendering(void) U(rtv_desc).Texture2DArray.FirstArraySlice = 0; U(rtv_desc).Texture2DArray.ArraySize = ~0u; hr = ID3D10Device_CreateRenderTargetView(device, (ID3D10Resource *)texture, &rtv_desc, &rtv); - ok(SUCCEEDED(hr), "Failed to create render target view, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create render target view, hr %#lx.\n", hr); ID3D10Device_OMSetRenderTargets(device, 1, &rtv, NULL); constant.layer_offset = 0; constant.draw_id = 3; @@ -3386,7 +3386,7 @@ static void test_layered_rendering(void) { U(rtv_desc).Texture2DArray.FirstArraySlice = texture_desc.ArraySize - 1 - i; hr = ID3D10Device_CreateRenderTargetView(device, (ID3D10Resource *)texture, &rtv_desc, &rtv); - ok(SUCCEEDED(hr), "Failed to create render target view, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create render target view, hr %#lx.\n", hr); ID3D10Device_OMSetRenderTargets(device, 1, &rtv, NULL); constant.layer_offset = 0; constant.draw_id = 4 + i; @@ -3559,7 +3559,7 @@ static void test_create_shader_resource_view(void)
srview = (void *)0xdeadbeef; hr = ID3D10Device_CreateShaderResourceView(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); ok(!srview, "Unexpected pointer %p\n", srview);
srv_desc.Format = DXGI_FORMAT_R32G32B32A32_FLOAT; @@ -3569,15 +3569,15 @@ static void test_create_shader_resource_view(void)
expected_refcount = get_refcount(device) + 1; hr = ID3D10Device_CreateShaderResourceView(device, (ID3D10Resource *)buffer, &srv_desc, &srview); - ok(SUCCEEDED(hr), "Failed to create a shader resource view, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create a shader resource view, hr %#lx.\n", hr); refcount = get_refcount(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; ID3D10ShaderResourceView_GetDevice(srview, &tmp); ok(tmp == device, "Got unexpected device %p, expected %p.\n", tmp, device); refcount = get_refcount(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);
/* Not available on all Windows versions. */ @@ -3592,7 +3592,7 @@ static void test_create_shader_resource_view(void)
srview = (void *)0xdeadbeef; hr = ID3D10Device_CreateShaderResourceView(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); ok(!srview, "Unexpected pointer %p\n", srview);
ID3D10Buffer_Release(buffer); @@ -3627,7 +3627,7 @@ static void test_create_shader_resource_view(void) texture2d_desc.MiscFlags |= D3D10_RESOURCE_MISC_TEXTURECUBE;
hr = ID3D10Device_CreateTexture2D(device, &texture2d_desc, NULL, &texture2d); - ok(SUCCEEDED(hr), "Test %u: Failed to create 2d texture, hr %#x.\n", i, hr); + ok(SUCCEEDED(hr), "Test %u: Failed to create 2d texture, hr %#lx.\n", i, hr); texture = (ID3D10Resource *)texture2d; } else @@ -3637,7 +3637,7 @@ static void test_create_shader_resource_view(void) texture3d_desc.Format = tests[i].texture.format;
hr = ID3D10Device_CreateTexture3D(device, &texture3d_desc, NULL, &texture3d); - ok(SUCCEEDED(hr), "Test %u: Failed to create 3d texture, hr %#x.\n", i, hr); + ok(SUCCEEDED(hr), "Test %u: Failed to create 3d texture, hr %#lx.\n", i, hr); texture = (ID3D10Resource *)texture3d; }
@@ -3653,9 +3653,9 @@ static void test_create_shader_resource_view(void)
expected_refcount = get_refcount(texture); hr = ID3D10Device_CreateShaderResourceView(device, texture, current_desc, &srview); - ok(SUCCEEDED(hr), "Test %u: Failed to create a shader resource view, hr %#x.\n", i, hr); + ok(SUCCEEDED(hr), "Test %u: Failed to create a shader resource view, hr %#lx.\n", i, hr); refcount = get_refcount(texture); - ok(refcount == expected_refcount, "Got refcount %u, expected %u.\n", refcount, expected_refcount); + ok(refcount == expected_refcount, "Got refcount %lu, expected %lu.\n", refcount, expected_refcount);
/* Not available on all Windows versions. */ check_interface(srview, &IID_ID3D10ShaderResourceView1, TRUE, TRUE); @@ -3685,7 +3685,7 @@ static void test_create_shader_resource_view(void) texture2d_desc.MiscFlags |= D3D10_RESOURCE_MISC_TEXTURECUBE;
hr = ID3D10Device_CreateTexture2D(device, &texture2d_desc, NULL, &texture2d); - ok(SUCCEEDED(hr), "Test %u: Failed to create 2d texture, hr %#x.\n", i, hr); + ok(SUCCEEDED(hr), "Test %u: Failed to create 2d texture, hr %#lx.\n", i, hr); texture = (ID3D10Resource *)texture2d; } else @@ -3695,21 +3695,21 @@ static void test_create_shader_resource_view(void) texture3d_desc.Format = invalid_desc_tests[i].texture.format;
hr = ID3D10Device_CreateTexture3D(device, &texture3d_desc, NULL, &texture3d); - ok(SUCCEEDED(hr), "Test %u: Failed to create 3d texture, hr %#x.\n", i, hr); + ok(SUCCEEDED(hr), "Test %u: Failed to create 3d texture, hr %#lx.\n", i, hr); texture = (ID3D10Resource *)texture3d; }
srview = (void *)0xdeadbeef; get_srv_desc(&srv_desc, &invalid_desc_tests[i].srv_desc); hr = ID3D10Device_CreateShaderResourceView(device, texture, &srv_desc, &srview); - ok(hr == E_INVALIDARG, "Test %u: Got unexpected hr %#x.\n", i, hr); + ok(hr == E_INVALIDARG, "Test %u: Got unexpected hr %#lx.\n", i, hr); ok(!srview, "Unexpected pointer %p.\n", srview);
ID3D10Resource_Release(texture); }
refcount = ID3D10Device_Release(device); - ok(!refcount, "Device has %u references left.\n", refcount); + ok(!refcount, "Device has %lu references left.\n", refcount); }
static void test_create_shader(void) @@ -3872,77 +3872,77 @@ void main(point float4 vin[1] : POSITION, inout TriangleStream<gs_out> vout) /* vertex shader */ expected_refcount = get_refcount(device) + 1; hr = ID3D10Device_CreateVertexShader(device, vs_4_0, sizeof(vs_4_0), &vs); - ok(SUCCEEDED(hr), "Failed to create SM4 vertex shader, hr %#x\n", hr); + ok(SUCCEEDED(hr), "Failed to create SM4 vertex shader, hr %#lx\n", hr);
refcount = get_refcount(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; ID3D10VertexShader_GetDevice(vs, &tmp); ok(tmp == device, "Got unexpected device %p, expected %p.\n", tmp, device); refcount = get_refcount(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);
/* Not available on all Windows versions. */ check_interface(vs, &IID_ID3D11VertexShader, TRUE, TRUE);
refcount = ID3D10VertexShader_Release(vs); - ok(!refcount, "Vertex shader has %u references left.\n", refcount); + ok(!refcount, "Vertex shader has %lu references left.\n", refcount);
hr = ID3D10Device_CreateVertexShader(device, vs_2_0, sizeof(vs_2_0), &vs); - ok(hr == E_INVALIDARG, "Created a SM2 vertex shader, hr %#x\n", hr); + ok(hr == E_INVALIDARG, "Created a SM2 vertex shader, hr %#lx\n", hr);
hr = ID3D10Device_CreateVertexShader(device, vs_3_0, sizeof(vs_3_0), &vs); - ok(hr == E_INVALIDARG, "Created a SM3 vertex shader, hr %#x\n", hr); + ok(hr == E_INVALIDARG, "Created a SM3 vertex shader, hr %#lx\n", hr);
hr = ID3D10Device_CreateVertexShader(device, ps_4_0, sizeof(ps_4_0), &vs); - ok(hr == E_INVALIDARG, "Created a SM4 vertex shader from a pixel shader source, hr %#x\n", hr); + ok(hr == E_INVALIDARG, "Created a SM4 vertex shader from a pixel shader source, hr %#lx\n", hr);
/* pixel shader */ expected_refcount = get_refcount(device) + 1; hr = ID3D10Device_CreatePixelShader(device, ps_4_0, sizeof(ps_4_0), &ps); - ok(SUCCEEDED(hr), "Failed to create SM4 pixel shader, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create SM4 pixel shader, hr %#lx.\n", hr);
refcount = get_refcount(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; ID3D10PixelShader_GetDevice(ps, &tmp); ok(tmp == device, "Got unexpected device %p, expected %p.\n", tmp, device); refcount = get_refcount(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);
/* Not available on all Windows versions. */ check_interface(ps, &IID_ID3D11PixelShader, TRUE, TRUE);
refcount = ID3D10PixelShader_Release(ps); - ok(!refcount, "Pixel shader has %u references left.\n", refcount); + ok(!refcount, "Pixel shader has %lu references left.\n", refcount);
/* geometry shader */ expected_refcount = get_refcount(device) + 1; hr = ID3D10Device_CreateGeometryShader(device, gs_4_0, sizeof(gs_4_0), &gs); - ok(SUCCEEDED(hr), "Failed to create SM4 geometry shader, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create SM4 geometry shader, hr %#lx.\n", hr);
refcount = get_refcount(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; ID3D10GeometryShader_GetDevice(gs, &tmp); ok(tmp == device, "Got unexpected device %p, expected %p.\n", tmp, device); refcount = get_refcount(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);
/* Not available on all Windows versions. */ check_interface(gs, &IID_ID3D11GeometryShader, TRUE, TRUE);
refcount = ID3D10GeometryShader_Release(gs); - ok(!refcount, "Geometry shader has %u references left.\n", refcount); + ok(!refcount, "Geometry shader has %lu references left.\n", refcount);
refcount = ID3D10Device_Release(device); - ok(!refcount, "Device has %u references left.\n", refcount); + ok(!refcount, "Device has %lu references left.\n", refcount); }
static void test_create_sampler_state(void) @@ -3996,7 +3996,7 @@ static void test_create_sampler_state(void) }
hr = ID3D10Device_CreateSamplerState(device, NULL, &sampler_state1); - ok(hr == E_INVALIDARG, "Got unexpected hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Got unexpected hr %#lx.\n", hr);
desc.Filter = D3D10_FILTER_MIN_MAG_MIP_LINEAR; desc.AddressU = D3D10_TEXTURE_ADDRESS_WRAP; @@ -4014,18 +4014,18 @@ static void test_create_sampler_state(void)
expected_refcount = get_refcount(device) + 1; hr = ID3D10Device_CreateSamplerState(device, &desc, &sampler_state1); - ok(SUCCEEDED(hr), "Failed to create sampler state, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create sampler state, hr %#lx.\n", hr); hr = ID3D10Device_CreateSamplerState(device, &desc, &sampler_state2); - ok(SUCCEEDED(hr), "Failed to create sampler state, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create sampler state, hr %#lx.\n", hr); ok(sampler_state1 == sampler_state2, "Got different sampler state objects.\n"); refcount = get_refcount(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; ID3D10SamplerState_GetDevice(sampler_state1, &tmp); ok(tmp == device, "Got unexpected device %p, expected %p.\n", tmp, device); refcount = get_refcount(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);
ID3D10SamplerState_GetDesc(sampler_state1, &desc); @@ -4044,9 +4044,9 @@ static void test_create_sampler_state(void) ok(desc.MaxLOD == 16.0f, "Got unexpected max LOD %f.\n", desc.MaxLOD);
refcount = ID3D10SamplerState_Release(sampler_state2); - ok(refcount == 1, "Got unexpected refcount %u.\n", refcount); + ok(refcount == 1, "Got unexpected refcount %lu.\n", refcount); refcount = ID3D10SamplerState_Release(sampler_state1); - ok(!refcount, "Got unexpected refcount %u.\n", refcount); + ok(!refcount, "Got unexpected refcount %lu.\n", refcount);
hr = ID3D10Device_QueryInterface(device, &IID_ID3D11Device, (void **)&d3d11_device); ok(SUCCEEDED(hr) || broken(hr == E_NOINTERFACE) /* Not available on all Windows versions. */, @@ -4077,7 +4077,7 @@ static void test_create_sampler_state(void) desc.MaxLOD = 16.0f;
hr = ID3D10Device_CreateSamplerState(device, &desc, &sampler_state1); - ok(SUCCEEDED(hr), "Test %u: Failed to create sampler state, hr %#x.\n", i, hr); + ok(SUCCEEDED(hr), "Test %u: Failed to create sampler state, hr %#lx.\n", i, hr);
hr = ID3D10SamplerState_QueryInterface(sampler_state1, &IID_ID3D11SamplerState, (void **)&d3d11_sampler_state); @@ -4118,28 +4118,28 @@ static void test_create_sampler_state(void) "Test %u: Got unexpected max LOD %f.\n", i, d3d11_desc.MaxLOD);
refcount = ID3D11SamplerState_Release(d3d11_sampler_state); - ok(refcount == 1, "Test %u: Got unexpected refcount %u.\n", i, refcount); + ok(refcount == 1, "Test %u: Got unexpected refcount %lu.\n", i, refcount);
hr = ID3D11Device_CreateSamplerState(d3d11_device, &d3d11_desc, &d3d11_sampler_state); - ok(SUCCEEDED(hr), "Test %u: Failed to create sampler state, hr %#x.\n", i, hr); + ok(SUCCEEDED(hr), "Test %u: Failed to create sampler state, hr %#lx.\n", i, hr); hr = ID3D11SamplerState_QueryInterface(d3d11_sampler_state, &IID_ID3D10SamplerState, (void **)&sampler_state2); ok(SUCCEEDED(hr), "Test %u: Sampler state should implement ID3D10SamplerState.\n", i); ok(sampler_state1 == sampler_state2, "Test %u: Got different sampler state objects.\n", i);
refcount = ID3D11SamplerState_Release(d3d11_sampler_state); - ok(refcount == 2, "Test %u: Got unexpected refcount %u.\n", i, refcount); + ok(refcount == 2, "Test %u: Got unexpected refcount %lu.\n", i, refcount); refcount = ID3D10SamplerState_Release(sampler_state2); - ok(refcount == 1, "Test %u: Got unexpected refcount %u.\n", i, refcount); + ok(refcount == 1, "Test %u: Got unexpected refcount %lu.\n", i, refcount); refcount = ID3D10SamplerState_Release(sampler_state1); - ok(!refcount, "Test %u: Got unexpected refcount %u.\n", i, refcount); + ok(!refcount, "Test %u: Got unexpected refcount %lu.\n", i, refcount); }
ID3D11Device_Release(d3d11_device);
done: refcount = ID3D10Device_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) @@ -4161,7 +4161,7 @@ static void test_create_blend_state(void) }
hr = ID3D10Device_CreateBlendState(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(&blend_desc, 0, sizeof(blend_desc)); for (i = 0; i < D3D10_SIMULTANEOUS_RENDER_TARGET_COUNT; ++i) @@ -4169,18 +4169,18 @@ static void test_create_blend_state(void)
expected_refcount = get_refcount(device) + 1; hr = ID3D10Device_CreateBlendState(device, &blend_desc, &blend_state1); - ok(SUCCEEDED(hr), "Failed to create blend state, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create blend state, hr %#lx.\n", hr); hr = ID3D10Device_CreateBlendState(device, &blend_desc, &blend_state2); - ok(SUCCEEDED(hr), "Failed to create blend state, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create blend state, hr %#lx.\n", hr); ok(blend_state1 == blend_state2, "Got different blend state objects.\n"); refcount = get_refcount(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; ID3D10BlendState_GetDevice(blend_state1, &tmp); ok(tmp == device, "Got unexpected device %p, expected %p.\n", tmp, device); refcount = get_refcount(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);
ID3D10BlendState_GetDesc(blend_state1, &blend_desc); @@ -4257,23 +4257,23 @@ static void test_create_blend_state(void) }
refcount = ID3D11BlendState_Release(d3d11_blend_state); - ok(refcount == 2, "Got unexpected refcount %u.\n", refcount); + ok(refcount == 2, "Got unexpected refcount %lu.\n", refcount); refcount = ID3D10BlendState_Release(blend_state2); - ok(refcount == 1, "Got unexpected refcount %u.\n", refcount); + ok(refcount == 1, "Got unexpected refcount %lu.\n", refcount);
hr = ID3D11Device_CreateBlendState(d3d11_device, &d3d11_blend_desc, &d3d11_blend_state); - ok(SUCCEEDED(hr), "Failed to create blend state, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create blend state, hr %#lx.\n", hr);
hr = ID3D11BlendState_QueryInterface(d3d11_blend_state, &IID_ID3D10BlendState, (void **)&blend_state2); ok(SUCCEEDED(hr), "Blend state should implement ID3D10BlendState.\n"); ok(blend_state1 == blend_state2, "Got different blend state objects.\n");
refcount = ID3D11BlendState_Release(d3d11_blend_state); - ok(refcount == 2, "Got unexpected refcount %u.\n", refcount); + ok(refcount == 2, "Got unexpected refcount %lu.\n", refcount); refcount = ID3D10BlendState_Release(blend_state2); - ok(refcount == 1, "Got unexpected refcount %u.\n", refcount); + ok(refcount == 1, "Got unexpected refcount %lu.\n", refcount); refcount = ID3D10BlendState_Release(blend_state1); - ok(!refcount, "Got unexpected refcount %u.\n", refcount); + ok(!refcount, "Got unexpected refcount %lu.\n", refcount);
blend_desc.BlendEnable[0] = TRUE; blend_desc.RenderTargetWriteMask[1] = D3D10_COLOR_WRITE_ENABLE_RED; @@ -4281,7 +4281,7 @@ static void test_create_blend_state(void) blend_desc.RenderTargetWriteMask[3] = D3D10_COLOR_WRITE_ENABLE_BLUE;
hr = ID3D10Device_CreateBlendState(device, &blend_desc, &blend_state1); - ok(SUCCEEDED(hr), "Failed to create blend state, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create blend state, hr %#lx.\n", hr);
hr = ID3D10BlendState_QueryInterface(blend_state1, &IID_ID3D11BlendState, (void **)&d3d11_blend_state); ok(SUCCEEDED(hr), "Blend state should implement ID3D11BlendState.\n"); @@ -4320,28 +4320,28 @@ static void test_create_blend_state(void) }
refcount = ID3D11BlendState_Release(d3d11_blend_state); - ok(refcount == 1, "Got unexpected refcount %u.\n", refcount); + ok(refcount == 1, "Got unexpected refcount %lu.\n", refcount);
hr = ID3D11Device_CreateBlendState(d3d11_device, &d3d11_blend_desc, &d3d11_blend_state); - ok(SUCCEEDED(hr), "Failed to create blend state, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create blend state, hr %#lx.\n", hr);
hr = ID3D11BlendState_QueryInterface(d3d11_blend_state, &IID_ID3D10BlendState, (void **)&blend_state2); ok(SUCCEEDED(hr), "Blend state should implement ID3D10BlendState.\n"); ok(blend_state1 == blend_state2, "Got different blend state objects.\n");
refcount = ID3D11BlendState_Release(d3d11_blend_state); - ok(refcount == 2, "Got unexpected refcount %u.\n", refcount); + ok(refcount == 2, "Got unexpected refcount %lu.\n", refcount);
ID3D11Device_Release(d3d11_device);
done: refcount = ID3D10BlendState_Release(blend_state2); - ok(refcount == 1, "Got unexpected refcount %u.\n", refcount); + ok(refcount == 1, "Got unexpected refcount %lu.\n", refcount); refcount = ID3D10BlendState_Release(blend_state1); - ok(!refcount, "Got unexpected refcount %u.\n", refcount); + ok(!refcount, "Got unexpected refcount %lu.\n", refcount);
refcount = ID3D10Device_Release(device); - ok(!refcount, "Device has %u references left.\n", refcount); + ok(!refcount, "Device has %lu references left.\n", refcount); }
static void test_create_depthstencil_state(void) @@ -4359,7 +4359,7 @@ static void test_create_depthstencil_state(void) }
hr = ID3D10Device_CreateDepthStencilState(device, NULL, &ds_state1); - ok(hr == E_INVALIDARG, "Got unexpected hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Got unexpected hr %#lx.\n", hr);
ds_desc.DepthEnable = TRUE; ds_desc.DepthWriteMask = D3D10_DEPTH_WRITE_MASK_ALL; @@ -4378,24 +4378,24 @@ static void test_create_depthstencil_state(void)
expected_refcount = get_refcount(device) + 1; hr = ID3D10Device_CreateDepthStencilState(device, &ds_desc, &ds_state1); - ok(SUCCEEDED(hr), "Failed to create depthstencil state, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create depthstencil state, hr %#lx.\n", hr); hr = ID3D10Device_CreateDepthStencilState(device, &ds_desc, &ds_state2); - ok(SUCCEEDED(hr), "Failed to create depthstencil state, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create depthstencil state, hr %#lx.\n", hr); ok(ds_state1 == ds_state2, "Got different depthstencil state objects.\n"); refcount = get_refcount(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; ID3D10DepthStencilState_GetDevice(ds_state1, &tmp); ok(tmp == device, "Got unexpected device %p, expected %p.\n", tmp, device); refcount = get_refcount(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);
refcount = ID3D10DepthStencilState_Release(ds_state2); - ok(refcount == 1, "Got unexpected refcount %u.\n", refcount); + ok(refcount == 1, "Got unexpected refcount %lu.\n", refcount); refcount = ID3D10DepthStencilState_Release(ds_state1); - ok(!refcount, "Got unexpected refcount %u.\n", refcount); + ok(!refcount, "Got unexpected refcount %lu.\n", refcount);
ds_desc.DepthEnable = FALSE; ds_desc.DepthWriteMask = D3D10_DEPTH_WRITE_MASK_ZERO; @@ -4410,7 +4410,7 @@ static void test_create_depthstencil_state(void) ds_desc.BackFace = ds_desc.FrontFace;
hr = ID3D10Device_CreateDepthStencilState(device, &ds_desc, &ds_state1); - ok(SUCCEEDED(hr), "Failed to create depthstencil state, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create depthstencil state, hr %#lx.\n", hr);
memset(&ds_desc, 0, sizeof(ds_desc)); ID3D10DepthStencilState_GetDesc(ds_state1, &ds_desc); @@ -4445,7 +4445,7 @@ static void test_create_depthstencil_state(void) ID3D10DepthStencilState_Release(ds_state1);
refcount = ID3D10Device_Release(device); - ok(!refcount, "Device has %u references left.\n", refcount); + ok(!refcount, "Device has %lu references left.\n", refcount); }
static void test_create_rasterizer_state(void) @@ -4463,7 +4463,7 @@ static void test_create_rasterizer_state(void) }
hr = ID3D10Device_CreateRasterizerState(device, NULL, &rast_state1); - ok(hr == E_INVALIDARG, "Got unexpected hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Got unexpected hr %#lx.\n", hr);
rast_desc.FillMode = D3D10_FILL_SOLID; rast_desc.CullMode = D3D10_CULL_BACK; @@ -4478,27 +4478,27 @@ static void test_create_rasterizer_state(void)
expected_refcount = get_refcount(device) + 1; hr = ID3D10Device_CreateRasterizerState(device, &rast_desc, &rast_state1); - ok(SUCCEEDED(hr), "Failed to create rasterizer state, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create rasterizer state, hr %#lx.\n", hr); hr = ID3D10Device_CreateRasterizerState(device, &rast_desc, &rast_state2); - ok(SUCCEEDED(hr), "Failed to create rasterizer state, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create rasterizer state, hr %#lx.\n", hr); ok(rast_state1 == rast_state2, "Got different rasterizer state objects.\n"); refcount = get_refcount(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; ID3D10RasterizerState_GetDevice(rast_state1, &tmp); ok(tmp == device, "Got unexpected device %p, expected %p.\n", tmp, device); refcount = get_refcount(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);
refcount = ID3D10RasterizerState_Release(rast_state2); - ok(refcount == 1, "Got unexpected refcount %u.\n", refcount); + ok(refcount == 1, "Got unexpected refcount %lu.\n", refcount); refcount = ID3D10RasterizerState_Release(rast_state1); - ok(!refcount, "Got unexpected refcount %u.\n", refcount); + ok(!refcount, "Got unexpected refcount %lu.\n", refcount);
refcount = ID3D10Device_Release(device); - ok(!refcount, "Device has %u references left.\n", refcount); + ok(!refcount, "Device has %lu references left.\n", refcount); }
static void test_create_query(void) @@ -4536,9 +4536,9 @@ static void test_create_query(void) }
hr = ID3D10Device_CreateQuery(device, NULL, &query); - ok(hr == E_INVALIDARG, "Got unexpected hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Got unexpected hr %#lx.\n", hr); hr = ID3D10Device_CreatePredicate(device, NULL, &predicate); - ok(hr == E_INVALIDARG, "Got unexpected hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Got unexpected hr %#lx.\n", hr);
for (i = 0; i < ARRAY_SIZE(tests); ++i) { @@ -4547,12 +4547,12 @@ static void test_create_query(void)
hr = ID3D10Device_CreateQuery(device, &query_desc, NULL); todo_wine_if(tests[i].todo) - ok(hr == S_FALSE, "Got unexpected hr %#x for query type %u.\n", hr, query_desc.Query); + ok(hr == S_FALSE, "Got unexpected hr %#lx for query type %u.\n", hr, query_desc.Query);
query_desc.Query = tests[i].query; hr = ID3D10Device_CreateQuery(device, &query_desc, &query); todo_wine_if(tests[i].todo) - ok(hr == S_OK, "Got unexpected hr %#x for query type %u.\n", hr, query_desc.Query); + ok(hr == S_OK, "Got unexpected hr %#lx for query type %u.\n", hr, query_desc.Query); if (FAILED(hr)) continue;
@@ -4561,11 +4561,11 @@ static void test_create_query(void)
expected_hr = tests[i].is_predicate ? S_FALSE : E_INVALIDARG; hr = ID3D10Device_CreatePredicate(device, &query_desc, NULL); - ok(hr == expected_hr, "Got unexpected hr %#x for query type %u.\n", hr, query_desc.Query); + ok(hr == expected_hr, "Got unexpected hr %#lx for query type %u.\n", hr, query_desc.Query);
expected_hr = tests[i].is_predicate ? S_OK : E_INVALIDARG; hr = ID3D10Device_CreatePredicate(device, &query_desc, &predicate); - ok(hr == expected_hr, "Got unexpected hr %#x for query type %u.\n", hr, query_desc.Query); + ok(hr == expected_hr, "Got unexpected hr %#lx for query type %u.\n", hr, query_desc.Query); if (SUCCEEDED(hr)) ID3D10Predicate_Release(predicate); } @@ -4573,22 +4573,22 @@ static void test_create_query(void) query_desc.Query = D3D10_QUERY_OCCLUSION_PREDICATE; expected_refcount = get_refcount(device) + 1; hr = ID3D10Device_CreatePredicate(device, &query_desc, &predicate); - ok(SUCCEEDED(hr), "Failed to create predicate, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create predicate, hr %#lx.\n", hr); refcount = get_refcount(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; ID3D10Predicate_GetDevice(predicate, &tmp); ok(tmp == device, "Got unexpected device %p, expected %p.\n", tmp, device); refcount = get_refcount(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); /* Not available on all Windows versions. */ check_interface(predicate, &IID_ID3D11Predicate, TRUE, TRUE); ID3D10Predicate_Release(predicate);
refcount = ID3D10Device_Release(device); - ok(!refcount, "Device has %u references left.\n", refcount); + ok(!refcount, "Device has %lu references left.\n", refcount); }
#define get_query_data(a, b, c) get_query_data_(__LINE__, a, b, c) @@ -4604,10 +4604,10 @@ static void get_query_data_(unsigned int line, ID3D10Asynchronous *query, break; Sleep(10); } - ok_(__FILE__, line)(hr == S_OK, "Got unexpected hr %#x.\n", hr); + ok_(__FILE__, line)(hr == S_OK, "Got unexpected hr %#lx.\n", hr); memset(data, 0xff, data_size); hr = ID3D10Asynchronous_GetData(query, data, data_size, 0); - ok_(__FILE__, line)(hr == S_OK, "Got unexpected hr %#x.\n", hr); + ok_(__FILE__, line)(hr == S_OK, "Got unexpected hr %#lx.\n", hr); }
static void test_occlusion_query(void) @@ -4640,61 +4640,61 @@ static void test_occlusion_query(void) query_desc.Query = D3D10_QUERY_OCCLUSION; query_desc.MiscFlags = 0; hr = ID3D10Device_CreateQuery(device, &query_desc, (ID3D10Query **)&query); - ok(hr == S_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr); data_size = ID3D10Asynchronous_GetDataSize(query); ok(data_size == sizeof(data), "Got unexpected data size %u.\n", data_size);
hr = ID3D10Asynchronous_GetData(query, NULL, 0, 0); - ok(hr == DXGI_ERROR_INVALID_CALL, "Got unexpected hr %#x.\n", hr); + ok(hr == DXGI_ERROR_INVALID_CALL, "Got unexpected hr %#lx.\n", hr); hr = ID3D10Asynchronous_GetData(query, &data, sizeof(data), 0); - ok(hr == DXGI_ERROR_INVALID_CALL, "Got unexpected hr %#x.\n", hr); + ok(hr == DXGI_ERROR_INVALID_CALL, "Got unexpected hr %#lx.\n", hr);
ID3D10Asynchronous_End(query); ID3D10Asynchronous_Begin(query); ID3D10Asynchronous_Begin(query);
hr = ID3D10Asynchronous_GetData(query, NULL, 0, 0); - 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 = ID3D10Asynchronous_GetData(query, &data, sizeof(data), 0); - 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);
draw_color_quad(&test_context, &red);
ID3D10Asynchronous_End(query); get_query_data(query, &data, sizeof(data)); - ok(data.uint == 640 * 480, "Got unexpected query result 0x%08x%08x.\n", data.dword[1], data.dword[0]); + ok(data.uint == 640 * 480, "Got unexpected query result 0x%08lx%08lx.\n", data.dword[1], data.dword[0]);
memset(&data, 0xff, sizeof(data)); hr = ID3D10Asynchronous_GetData(query, &data, sizeof(DWORD), 0); - ok(hr == E_INVALIDARG, "Got unexpected hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Got unexpected hr %#lx.\n", hr); hr = ID3D10Asynchronous_GetData(query, &data, sizeof(WORD), 0); - ok(hr == E_INVALIDARG, "Got unexpected hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Got unexpected hr %#lx.\n", hr); hr = ID3D10Asynchronous_GetData(query, &data, sizeof(data) - 1, 0); - ok(hr == E_INVALIDARG, "Got unexpected hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Got unexpected hr %#lx.\n", hr); hr = ID3D10Asynchronous_GetData(query, &data, sizeof(data) + 1, 0); - ok(hr == E_INVALIDARG, "Got unexpected hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Got unexpected hr %#lx.\n", hr); ok(data.dword[0] == 0xffffffff && data.dword[1] == 0xffffffff, - "Data was modified 0x%08x%08x.\n", data.dword[1], data.dword[0]); + "Data was modified 0x%08lx%08lx.\n", data.dword[1], data.dword[0]);
memset(&data, 0xff, sizeof(data)); hr = ID3D10Asynchronous_GetData(query, &data, 0, 0); - ok(hr == S_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr); ok(data.dword[0] == 0xffffffff && data.dword[1] == 0xffffffff, - "Data was modified 0x%08x%08x.\n", data.dword[1], data.dword[0]); + "Data was modified 0x%08lx%08lx.\n", data.dword[1], data.dword[0]);
hr = ID3D10Asynchronous_GetData(query, NULL, sizeof(DWORD), 0); - ok(hr == E_INVALIDARG, "Got unexpected hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Got unexpected hr %#lx.\n", hr); hr = ID3D10Asynchronous_GetData(query, NULL, sizeof(data), 0); - ok(hr == E_INVALIDARG, "Got unexpected hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Got unexpected hr %#lx.\n", hr);
ID3D10Asynchronous_Begin(query); ID3D10Asynchronous_End(query); ID3D10Asynchronous_End(query);
get_query_data(query, &data, sizeof(data)); - ok(!data.uint, "Got unexpected query result 0x%08x%08x.\n", data.dword[1], data.dword[0]); + ok(!data.uint, "Got unexpected query result 0x%08lx%08lx.\n", data.dword[1], data.dword[0]); hr = ID3D10Asynchronous_GetData(query, NULL, 0, 0); - ok(hr == S_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
texture_desc.Width = D3D10_REQ_TEXTURE2D_U_OR_V_DIMENSION; texture_desc.Height = D3D10_REQ_TEXTURE2D_U_OR_V_DIMENSION; @@ -4708,9 +4708,9 @@ static void test_occlusion_query(void) texture_desc.CPUAccessFlags = 0; texture_desc.MiscFlags = 0; hr = ID3D10Device_CreateTexture2D(device, &texture_desc, NULL, &texture); - ok(SUCCEEDED(hr), "Failed to create texture, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create texture, hr %#lx.\n", hr); hr = ID3D10Device_CreateRenderTargetView(device, (ID3D10Resource *)texture, NULL, &rtv); - ok(SUCCEEDED(hr), "Failed to create render target view, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create render target view, hr %#lx.\n", hr);
ID3D10Device_OMSetRenderTargets(device, 1, &rtv, NULL); set_viewport(device, 0, 0, texture_desc.Width, texture_desc.Height, 0.0f, 1.0f); @@ -4724,7 +4724,7 @@ static void test_occlusion_query(void) ok((data.dword[0] == 0x90000000 && data.dword[1] == 0x1) || (data.dword[0] == 0xffffffff && !data.dword[1]) || broken(!data.uint), - "Got unexpected query result 0x%08x%08x.\n", data.dword[1], data.dword[0]); + "Got unexpected query result 0x%08lx%08lx.\n", data.dword[1], data.dword[0]);
ID3D10Asynchronous_Release(query); ID3D10RenderTargetView_Release(rtv); @@ -4755,23 +4755,23 @@ static void test_pipeline_statistics_query(void) query_desc.Query = D3D10_QUERY_PIPELINE_STATISTICS; query_desc.MiscFlags = 0; hr = ID3D10Device_CreateQuery(device, &query_desc, (ID3D10Query **)&query); - ok(hr == S_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr); data_size = ID3D10Asynchronous_GetDataSize(query); ok(data_size == sizeof(data), "Got unexpected data size %u.\n", data_size);
hr = ID3D10Asynchronous_GetData(query, NULL, 0, 0); - ok(hr == DXGI_ERROR_INVALID_CALL, "Got unexpected hr %#x.\n", hr); + ok(hr == DXGI_ERROR_INVALID_CALL, "Got unexpected hr %#lx.\n", hr); hr = ID3D10Asynchronous_GetData(query, &data, sizeof(data), 0); - ok(hr == DXGI_ERROR_INVALID_CALL, "Got unexpected hr %#x.\n", hr); + ok(hr == DXGI_ERROR_INVALID_CALL, "Got unexpected hr %#lx.\n", hr);
ID3D10Asynchronous_End(query); ID3D10Asynchronous_Begin(query); ID3D10Asynchronous_Begin(query);
hr = ID3D10Asynchronous_GetData(query, NULL, 0, 0); - 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 = ID3D10Asynchronous_GetData(query, &data, sizeof(data), 0); - 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);
draw_quad(&test_context);
@@ -4825,29 +4825,29 @@ static void test_timestamp_query(void) query_desc.Query = D3D10_QUERY_TIMESTAMP; query_desc.MiscFlags = 0; hr = ID3D10Device_CreateQuery(device, &query_desc, (ID3D10Query **)×tamp_query); - ok(hr == S_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr); data_size = ID3D10Asynchronous_GetDataSize(timestamp_query); ok(data_size == sizeof(UINT64), "Got unexpected data size %u.\n", data_size);
query_desc.Query = D3D10_QUERY_TIMESTAMP_DISJOINT; query_desc.MiscFlags = 0; hr = ID3D10Device_CreateQuery(device, &query_desc, (ID3D10Query **)×tamp_disjoint_query); - ok(hr == S_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr); data_size = ID3D10Asynchronous_GetDataSize(timestamp_disjoint_query); ok(data_size == sizeof(disjoint), "Got unexpected data size %u.\n", data_size);
hr = ID3D10Asynchronous_GetData(timestamp_disjoint_query, NULL, 0, 0); - ok(hr == DXGI_ERROR_INVALID_CALL, "Got unexpected hr %#x.\n", hr); + ok(hr == DXGI_ERROR_INVALID_CALL, "Got unexpected hr %#lx.\n", hr); hr = ID3D10Asynchronous_GetData(timestamp_disjoint_query, &disjoint, sizeof(disjoint), 0); - ok(hr == DXGI_ERROR_INVALID_CALL, "Got unexpected hr %#x.\n", hr); + ok(hr == DXGI_ERROR_INVALID_CALL, "Got unexpected hr %#lx.\n", hr);
/* Test a TIMESTAMP_DISJOINT query. */ ID3D10Asynchronous_Begin(timestamp_disjoint_query);
hr = ID3D10Asynchronous_GetData(timestamp_disjoint_query, NULL, 0, 0); - 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 = ID3D10Asynchronous_GetData(timestamp_disjoint_query, &disjoint, sizeof(disjoint), 0); - 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);
ID3D10Asynchronous_End(timestamp_disjoint_query); get_query_data(timestamp_disjoint_query, &disjoint, sizeof(disjoint)); @@ -4859,35 +4859,35 @@ static void test_timestamp_query(void) disjoint.Frequency = 0xdeadbeef; disjoint.Disjoint = 0xff; hr = ID3D10Asynchronous_GetData(timestamp_disjoint_query, &disjoint, sizeof(disjoint) - 1, 0); - ok(hr == E_INVALIDARG, "Got unexpected hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Got unexpected hr %#lx.\n", hr); hr = ID3D10Asynchronous_GetData(timestamp_disjoint_query, &disjoint, sizeof(disjoint) + 1, 0); - ok(hr == E_INVALIDARG, "Got unexpected hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Got unexpected hr %#lx.\n", hr); hr = ID3D10Asynchronous_GetData(timestamp_disjoint_query, &disjoint, sizeof(disjoint) / 2, 0); - ok(hr == E_INVALIDARG, "Got unexpected hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Got unexpected hr %#lx.\n", hr); hr = ID3D10Asynchronous_GetData(timestamp_disjoint_query, &disjoint, sizeof(disjoint) * 2, 0); - ok(hr == E_INVALIDARG, "Got unexpected hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Got unexpected hr %#lx.\n", hr); ok(disjoint.Frequency == 0xdeadbeef, "Frequency data was modified.\n"); ok(disjoint.Disjoint == 0xff, "Disjoint data was modified.\n");
hr = ID3D10Asynchronous_GetData(timestamp_disjoint_query, NULL, 0, 0); - ok(hr == S_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr); memset(&disjoint, 0xff, sizeof(disjoint)); hr = ID3D10Asynchronous_GetData(timestamp_disjoint_query, &disjoint, sizeof(disjoint), D3D10_ASYNC_GETDATA_DONOTFLUSH); - ok(hr == S_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr); ok(disjoint.Frequency == prev_disjoint.Frequency, "Frequency data mismatch.\n"); ok(disjoint.Disjoint == prev_disjoint.Disjoint, "Disjoint data mismatch.\n");
hr = ID3D10Asynchronous_GetData(timestamp_query, NULL, 0, 0); - ok(hr == DXGI_ERROR_INVALID_CALL, "Got unexpected hr %#x.\n", hr); + ok(hr == DXGI_ERROR_INVALID_CALL, "Got unexpected hr %#lx.\n", hr); hr = ID3D10Asynchronous_GetData(timestamp_query, ×tamp, sizeof(timestamp), 0); - ok(hr == DXGI_ERROR_INVALID_CALL, "Got unexpected hr %#x.\n", hr); + ok(hr == DXGI_ERROR_INVALID_CALL, "Got unexpected hr %#lx.\n", hr);
/* Test a TIMESTAMP query inside a TIMESTAMP_DISJOINT query. */ ID3D10Asynchronous_Begin(timestamp_disjoint_query);
hr = ID3D10Asynchronous_GetData(timestamp_query, ×tamp, sizeof(timestamp), 0); - ok(hr == DXGI_ERROR_INVALID_CALL, "Got unexpected hr %#x.\n", hr); + ok(hr == DXGI_ERROR_INVALID_CALL, "Got unexpected hr %#lx.\n", hr);
draw_color_quad(&test_context, &red);
@@ -4896,22 +4896,22 @@ static void test_timestamp_query(void)
timestamp = 0xdeadbeef; hr = ID3D10Asynchronous_GetData(timestamp_query, ×tamp, sizeof(timestamp) / 2, 0); - ok(hr == E_INVALIDARG, "Got unexpected hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Got unexpected hr %#lx.\n", hr); ok(timestamp == 0xdeadbeef, "Timestamp was modified.\n");
hr = ID3D10Asynchronous_GetData(timestamp_query, ×tamp, sizeof(timestamp), 0); - ok(hr == S_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr); ok(timestamp != 0xdeadbeef, "Timestamp was not modified.\n");
timestamp = 0xdeadbeef; hr = ID3D10Asynchronous_GetData(timestamp_query, ×tamp, sizeof(timestamp) - 1, 0); - ok(hr == E_INVALIDARG, "Got unexpected hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Got unexpected hr %#lx.\n", hr); hr = ID3D10Asynchronous_GetData(timestamp_query, ×tamp, sizeof(timestamp) + 1, 0); - ok(hr == E_INVALIDARG, "Got unexpected hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Got unexpected hr %#lx.\n", hr); hr = ID3D10Asynchronous_GetData(timestamp_query, ×tamp, sizeof(timestamp) / 2, 0); - ok(hr == E_INVALIDARG, "Got unexpected hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Got unexpected hr %#lx.\n", hr); hr = ID3D10Asynchronous_GetData(timestamp_query, ×tamp, sizeof(timestamp) * 2, 0); - ok(hr == E_INVALIDARG, "Got unexpected hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Got unexpected hr %#lx.\n", hr); ok(timestamp == 0xdeadbeef, "Timestamp was modified.\n");
ID3D10Asynchronous_End(timestamp_disjoint_query); @@ -4924,7 +4924,7 @@ static void test_timestamp_query(void) query_desc.Query = D3D10_QUERY_TIMESTAMP; query_desc.MiscFlags = 0; hr = ID3D10Device_CreateQuery(device, &query_desc, (ID3D10Query **)×tamp_query); - ok(hr == S_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
draw_color_quad(&test_context, &red);
@@ -4953,14 +4953,14 @@ static void test_so_statistics_query(void) query_desc.Query = D3D10_QUERY_SO_STATISTICS; query_desc.MiscFlags = 0; hr = ID3D10Device_CreateQuery(device, &query_desc, (ID3D10Query **)&query); - ok(hr == S_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr); data_size = ID3D10Asynchronous_GetDataSize(query); ok(data_size == sizeof(data), "Got unexpected data size %u.\n", data_size);
hr = ID3D10Asynchronous_GetData(query, NULL, 0, 0); - ok(hr == DXGI_ERROR_INVALID_CALL, "Got unexpected hr %#x.\n", hr); + ok(hr == DXGI_ERROR_INVALID_CALL, "Got unexpected hr %#lx.\n", hr); hr = ID3D10Asynchronous_GetData(query, &data, sizeof(data), 0); - ok(hr == DXGI_ERROR_INVALID_CALL, "Got unexpected hr %#x.\n", hr); + ok(hr == DXGI_ERROR_INVALID_CALL, "Got unexpected hr %#lx.\n", hr);
ID3D10Asynchronous_End(query); ID3D10Asynchronous_Begin(query); @@ -4968,10 +4968,10 @@ static void test_so_statistics_query(void)
hr = ID3D10Asynchronous_GetData(query, NULL, 0, 0); todo_wine - ok(hr == DXGI_ERROR_INVALID_CALL, "Got unexpected hr %#x.\n", hr); + ok(hr == DXGI_ERROR_INVALID_CALL, "Got unexpected hr %#lx.\n", hr); hr = ID3D10Asynchronous_GetData(query, &data, sizeof(data), 0); todo_wine - ok(hr == DXGI_ERROR_INVALID_CALL, "Got unexpected hr %#x.\n", hr); + ok(hr == DXGI_ERROR_INVALID_CALL, "Got unexpected hr %#lx.\n", hr);
draw_quad(&test_context);
@@ -5010,12 +5010,12 @@ static void test_device_removed_reason(void) }
hr = ID3D10Device_GetDeviceRemovedReason(device); - ok(hr == S_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr); hr = ID3D10Device_GetDeviceRemovedReason(device); - ok(hr == S_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
refcount = ID3D10Device_Release(device); - ok(!refcount, "Device has %u references left.\n", refcount); + ok(!refcount, "Device has %lu references left.\n", refcount); }
static void test_scissor(void) @@ -5047,7 +5047,7 @@ static void test_scissor(void) rs_desc.MultisampleEnable = FALSE; rs_desc.AntialiasedLineEnable = FALSE; hr = ID3D10Device_CreateRasterizerState(device, &rs_desc, &rs); - ok(SUCCEEDED(hr), "Failed to create rasterizer state, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create rasterizer state, hr %#lx.\n", hr);
SetRect(&scissor_rect, 160, 120, 480, 360); ID3D10Device_RSSetScissorRects(device, 1, &scissor_rect); @@ -5057,29 +5057,29 @@ static void test_scissor(void)
draw_color_quad(&test_context, &green); color = get_texture_color(test_context.backbuffer, 320, 60); - ok(compare_color(color, 0xff00ff00, 1), "Got unexpected color 0x%08x.\n", color); + ok(compare_color(color, 0xff00ff00, 1), "Got unexpected color 0x%08lx.\n", color); color = get_texture_color(test_context.backbuffer, 80, 240); - ok(compare_color(color, 0xff00ff00, 1), "Got unexpected color 0x%08x.\n", color); + ok(compare_color(color, 0xff00ff00, 1), "Got unexpected color 0x%08lx.\n", color); color = get_texture_color(test_context.backbuffer, 320, 240); - ok(compare_color(color, 0xff00ff00, 1), "Got unexpected color 0x%08x.\n", color); + ok(compare_color(color, 0xff00ff00, 1), "Got unexpected color 0x%08lx.\n", color); color = get_texture_color(test_context.backbuffer, 560, 240); - ok(compare_color(color, 0xff00ff00, 1), "Got unexpected color 0x%08x.\n", color); + ok(compare_color(color, 0xff00ff00, 1), "Got unexpected color 0x%08lx.\n", color); color = get_texture_color(test_context.backbuffer, 320, 420); - ok(compare_color(color, 0xff00ff00, 1), "Got unexpected color 0x%08x.\n", color); + ok(compare_color(color, 0xff00ff00, 1), "Got unexpected color 0x%08lx.\n", color);
ID3D10Device_ClearRenderTargetView(device, test_context.backbuffer_rtv, red); ID3D10Device_RSSetState(device, rs); draw_color_quad(&test_context, &green); color = get_texture_color(test_context.backbuffer, 320, 60); - ok(compare_color(color, 0xff0000ff, 1), "Got unexpected color 0x%08x.\n", color); + ok(compare_color(color, 0xff0000ff, 1), "Got unexpected color 0x%08lx.\n", color); color = get_texture_color(test_context.backbuffer, 80, 240); - ok(compare_color(color, 0xff0000ff, 1), "Got unexpected color 0x%08x.\n", color); + ok(compare_color(color, 0xff0000ff, 1), "Got unexpected color 0x%08lx.\n", color); color = get_texture_color(test_context.backbuffer, 320, 240); - ok(compare_color(color, 0xff00ff00, 1), "Got unexpected color 0x%08x.\n", color); + ok(compare_color(color, 0xff00ff00, 1), "Got unexpected color 0x%08lx.\n", color); color = get_texture_color(test_context.backbuffer, 560, 240); - ok(compare_color(color, 0xff0000ff, 1), "Got unexpected color 0x%08x.\n", color); + ok(compare_color(color, 0xff0000ff, 1), "Got unexpected color 0x%08lx.\n", color); color = get_texture_color(test_context.backbuffer, 320, 420); - ok(compare_color(color, 0xff0000ff, 1), "Got unexpected color 0x%08x.\n", color); + ok(compare_color(color, 0xff0000ff, 1), "Got unexpected color 0x%08lx.\n", color);
set_viewport(device, -1.0f, 0.0f, 641, 480, 0.0f, 1.0f); SetRect(&scissor_rect, -1, 0, 640, 480); @@ -5088,15 +5088,15 @@ static void test_scissor(void) check_texture_color(test_context.backbuffer, 0xff0000ff, 1); draw_color_quad(&test_context, &green); color = get_texture_color(test_context.backbuffer, 320, 60); - ok(compare_color(color, 0xff00ff00, 1), "Got unexpected color 0x%08x.\n", color); + ok(compare_color(color, 0xff00ff00, 1), "Got unexpected color 0x%08lx.\n", color); color = get_texture_color(test_context.backbuffer, 80, 240); - ok(compare_color(color, 0xff00ff00, 1), "Got unexpected color 0x%08x.\n", color); + ok(compare_color(color, 0xff00ff00, 1), "Got unexpected color 0x%08lx.\n", color); color = get_texture_color(test_context.backbuffer, 320, 240); - ok(compare_color(color, 0xff00ff00, 1), "Got unexpected color 0x%08x.\n", color); + ok(compare_color(color, 0xff00ff00, 1), "Got unexpected color 0x%08lx.\n", color); color = get_texture_color(test_context.backbuffer, 560, 240); - ok(compare_color(color, 0xff00ff00, 1), "Got unexpected color 0x%08x.\n", color); + ok(compare_color(color, 0xff00ff00, 1), "Got unexpected color 0x%08lx.\n", color); color = get_texture_color(test_context.backbuffer, 320, 420); - ok(compare_color(color, 0xff00ff00, 1), "Got unexpected color 0x%08x.\n", color); + ok(compare_color(color, 0xff00ff00, 1), "Got unexpected color 0x%08lx.\n", color);
ID3D10RasterizerState_Release(rs); release_test_context(&test_context); @@ -5390,7 +5390,7 @@ float4 main(float4 color : COLOR) : SV_TARGET { hr = ID3D10Device_CreateShaderResourceView(device, (ID3D10Resource *)buffer[i % D3D10_IA_VERTEX_INPUT_RESOURCE_SLOT_COUNT], &srv_desc, &srv[i]); - ok(SUCCEEDED(hr), "Failed to create shader resource view, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create shader resource view, hr %#lx.\n", hr); }
sampler_desc.Filter = D3D10_FILTER_MIN_MAG_MIP_LINEAR; @@ -5412,21 +5412,21 @@ float4 main(float4 color : COLOR) : SV_TARGET sampler_desc.MinLOD = (float)i;
hr = ID3D10Device_CreateSamplerState(device, &sampler_desc, &sampler[i]); - ok(SUCCEEDED(hr), "Failed to create sampler state, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create sampler state, hr %#lx.\n", hr); }
hr = ID3D10Device_CreateVertexShader(device, simple_vs, sizeof(simple_vs), &vs); - ok(SUCCEEDED(hr), "Failed to create vertex shader, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create vertex shader, hr %#lx.\n", hr);
hr = ID3D10Device_CreateGeometryShader(device, simple_gs, sizeof(simple_gs), &gs); - ok(SUCCEEDED(hr), "Failed to create geometry shader, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create geometry shader, hr %#lx.\n", hr);
hr = ID3D10Device_CreatePixelShader(device, simple_ps, sizeof(simple_ps), &ps); - ok(SUCCEEDED(hr), "Failed to create pixel shader, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create pixel shader, hr %#lx.\n", hr);
hr = ID3D10Device_CreateInputLayout(device, layout_desc, ARRAY_SIZE(layout_desc), simple_vs, sizeof(simple_vs), &input_layout); - ok(SUCCEEDED(hr), "Failed to create input layout, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create input layout, hr %#lx.\n", hr);
blend_desc.AlphaToCoverageEnable = FALSE; blend_desc.BlendEnable[0] = FALSE; @@ -5453,7 +5453,7 @@ float4 main(float4 color : COLOR) : SV_TARGET blend_desc.RenderTargetWriteMask[7] = D3D10_COLOR_WRITE_ENABLE_ALL;
hr = ID3D10Device_CreateBlendState(device, &blend_desc, &blend_state); - ok(SUCCEEDED(hr), "Failed to create blend state, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create blend state, hr %#lx.\n", hr);
ds_desc.DepthEnable = TRUE; ds_desc.DepthWriteMask = D3D10_DEPTH_WRITE_MASK_ALL; @@ -5471,7 +5471,7 @@ float4 main(float4 color : COLOR) : SV_TARGET ds_desc.BackFace.StencilFunc = D3D10_COMPARISON_ALWAYS;
hr = ID3D10Device_CreateDepthStencilState(device, &ds_desc, &ds_state); - ok(SUCCEEDED(hr), "Failed to create depthstencil state, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create depthstencil state, hr %#lx.\n", hr);
texture_desc.Width = 512; texture_desc.Height = 512; @@ -5488,23 +5488,23 @@ float4 main(float4 color : COLOR) : SV_TARGET for (i = 0; i < D3D10_SIMULTANEOUS_RENDER_TARGET_COUNT; ++i) { hr = ID3D10Device_CreateTexture2D(device, &texture_desc, NULL, &rt_texture[i]); - ok(SUCCEEDED(hr), "Failed to create texture, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create texture, hr %#lx.\n", hr); }
texture_desc.Format = DXGI_FORMAT_D24_UNORM_S8_UINT; texture_desc.BindFlags = D3D10_BIND_DEPTH_STENCIL;
hr = ID3D10Device_CreateTexture2D(device, &texture_desc, NULL, &ds_texture); - ok(SUCCEEDED(hr), "Failed to create texture, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create texture, hr %#lx.\n", hr);
for (i = 0; i < D3D10_SIMULTANEOUS_RENDER_TARGET_COUNT; ++i) { hr = ID3D10Device_CreateRenderTargetView(device, (ID3D10Resource *)rt_texture[i], NULL, &rtv[i]); - ok(SUCCEEDED(hr), "Failed to create rendertarget view, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create rendertarget view, hr %#lx.\n", hr); }
hr = ID3D10Device_CreateDepthStencilView(device, (ID3D10Resource *)ds_texture, NULL, &dsv); - ok(SUCCEEDED(hr), "Failed to create depthstencil view, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create depthstencil view, hr %#lx.\n", hr);
for (i = 0; i < D3D10_VIEWPORT_AND_SCISSORRECT_OBJECT_COUNT_PER_PIPELINE; ++i) { @@ -5530,13 +5530,13 @@ float4 main(float4 color : COLOR) : SV_TARGET rs_desc.AntialiasedLineEnable = FALSE;
hr = ID3D10Device_CreateRasterizerState(device, &rs_desc, &rs_state); - ok(SUCCEEDED(hr), "Failed to create rasterizer state, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create rasterizer state, hr %#lx.\n", hr);
predicate_desc.Query = D3D10_QUERY_OCCLUSION_PREDICATE; predicate_desc.MiscFlags = 0;
hr = ID3D10Device_CreatePredicate(device, &predicate_desc, &predicate); - ok(SUCCEEDED(hr), "Failed to create predicate, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create predicate, hr %#lx.\n", hr);
/* Verify the behavior of set state methods. */
@@ -5965,7 +5965,7 @@ float4 main(float4 color : COLOR) : SV_TARGET }
refcount = ID3D10Device_Release(device); - ok(!refcount, "Device has %u references left.\n", refcount); + ok(!refcount, "Device has %lu references left.\n", refcount); }
static void test_blend(void) @@ -6071,13 +6071,13 @@ static void test_blend(void)
hr = ID3D10Device_CreateInputLayout(device, layout_desc, ARRAY_SIZE(layout_desc), vs_code, sizeof(vs_code), &input_layout); - ok(SUCCEEDED(hr), "Failed to create input layout, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create input layout, hr %#lx.\n", hr);
vb = create_buffer(device, D3D10_BIND_VERTEX_BUFFER, sizeof(quads), quads); hr = ID3D10Device_CreateVertexShader(device, vs_code, sizeof(vs_code), &vs); - ok(SUCCEEDED(hr), "Failed to create vertex shader, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create vertex shader, hr %#lx.\n", hr); hr = ID3D10Device_CreatePixelShader(device, ps_code, sizeof(ps_code), &ps); - ok(SUCCEEDED(hr), "Failed to create pixel shader, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create pixel shader, hr %#lx.\n", hr);
memset(&blend_desc, 0, sizeof(blend_desc)); blend_desc.BlendEnable[0] = TRUE; @@ -6090,7 +6090,7 @@ static void test_blend(void) blend_desc.RenderTargetWriteMask[0] = D3D10_COLOR_WRITE_ENABLE_ALL;
hr = ID3D10Device_CreateBlendState(device, &blend_desc, &src_blend); - ok(SUCCEEDED(hr), "Failed to create blend state, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create blend state, hr %#lx.\n", hr);
blend_desc.SrcBlend = D3D10_BLEND_DEST_ALPHA; blend_desc.DestBlend = D3D10_BLEND_INV_DEST_ALPHA; @@ -6098,7 +6098,7 @@ static void test_blend(void) blend_desc.DestBlendAlpha = D3D10_BLEND_INV_DEST_ALPHA;
hr = ID3D10Device_CreateBlendState(device, &blend_desc, &dst_blend); - ok(SUCCEEDED(hr), "Failed to create blend state, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create blend state, hr %#lx.\n", hr);
blend_desc.SrcBlend = D3D10_BLEND_BLEND_FACTOR; blend_desc.DestBlend = D3D10_BLEND_INV_BLEND_FACTOR; @@ -6106,7 +6106,7 @@ static void test_blend(void) blend_desc.DestBlendAlpha = D3D10_BLEND_INV_DEST_ALPHA;
hr = ID3D10Device_CreateBlendState(device, &blend_desc, &dst_blend_factor); - ok(SUCCEEDED(hr), "Failed to create blend state, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create blend state, hr %#lx.\n", hr);
ID3D10Device_IASetInputLayout(device, input_layout); ID3D10Device_IASetPrimitiveTopology(device, D3D10_PRIMITIVE_TOPOLOGY_TRIANGLESTRIP); @@ -6124,9 +6124,9 @@ static void test_blend(void) ID3D10Device_Draw(device, 4, 4);
color = get_texture_color(test_context.backbuffer, 320, 360); - ok(compare_color(color, 0x700040bf, 1), "Got unexpected color 0x%08x.\n", color); + ok(compare_color(color, 0x700040bf, 1), "Got unexpected color 0x%08lx.\n", color); color = get_texture_color(test_context.backbuffer, 320, 120); - ok(compare_color(color, 0xa080007f, 1), "Got unexpected color 0x%08x.\n", color); + ok(compare_color(color, 0xa080007f, 1), "Got unexpected color 0x%08lx.\n", color);
ID3D10Device_ClearRenderTargetView(device, test_context.backbuffer_rtv, red);
@@ -6135,9 +6135,9 @@ static void test_blend(void) ID3D10Device_Draw(device, 4, 4);
color = get_texture_color(test_context.backbuffer, 320, 360); - ok(compare_color(color, 0x600066b3, 1), "Got unexpected color 0x%08x.\n", color); + ok(compare_color(color, 0x600066b3, 1), "Got unexpected color 0x%08lx.\n", color); color = get_texture_color(test_context.backbuffer, 320, 120); - ok(compare_color(color, 0xa0cc00b3, 1), "Got unexpected color 0x%08x.\n", color); + ok(compare_color(color, 0xa0cc00b3, 1), "Got unexpected color 0x%08lx.\n", color);
texture_desc.Width = 128; texture_desc.Height = 128; @@ -6159,7 +6159,7 @@ static void test_blend(void) }
hr = ID3D10Device_CreateRenderTargetView(device, (ID3D10Resource *)offscreen, NULL, &offscreen_rtv); - ok(SUCCEEDED(hr), "Failed to create rendertarget view, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create rendertarget view, hr %#lx.\n", hr);
ID3D10Device_OMSetRenderTargets(device, 1, &offscreen_rtv, NULL);
@@ -6173,9 +6173,9 @@ static void test_blend(void) ID3D10Device_Draw(device, 4, 4);
color = get_texture_color(offscreen, 64, 96) & 0x00ffffff; - ok(compare_color(color, 0x00bf4000, 1), "Got unexpected color 0x%08x.\n", color); + ok(compare_color(color, 0x00bf4000, 1), "Got unexpected color 0x%08lx.\n", color); color = get_texture_color(offscreen, 64, 32) & 0x00ffffff; - ok(compare_color(color, 0x000000ff, 1), "Got unexpected color 0x%08x.\n", color); + ok(compare_color(color, 0x000000ff, 1), "Got unexpected color 0x%08lx.\n", color);
ID3D10RenderTargetView_Release(offscreen_rtv); ID3D10Texture2D_Release(offscreen); @@ -6544,7 +6544,7 @@ static void test_texture1d(void) current_ps = test->ps;
hr = ID3D10Device_CreatePixelShader(device, current_ps->code, current_ps->size, &ps); - ok(SUCCEEDED(hr), "Test %u: Failed to create pixel shader, hr %#x.\n", i, hr); + ok(SUCCEEDED(hr), "Test %u: Failed to create pixel shader, hr %#lx.\n", i, hr);
ID3D10Device_PSSetShader(device, ps); } @@ -6566,10 +6566,10 @@ static void test_texture1d(void) texture_desc.Format = current_texture->format;
hr = ID3D10Device_CreateTexture1D(device, &texture_desc, current_texture->data, &texture); - ok(SUCCEEDED(hr), "Test %u: Failed to create 1d texture, hr %#x.\n", i, hr); + ok(SUCCEEDED(hr), "Test %u: Failed to create 1d texture, hr %#lx.\n", i, hr);
hr = ID3D10Device_CreateShaderResourceView(device, (ID3D10Resource *)texture, NULL, &srv); - ok(SUCCEEDED(hr), "Test %u: Failed to create shader resource view, hr %#x.\n", i, hr); + ok(SUCCEEDED(hr), "Test %u: Failed to create shader resource view, hr %#lx.\n", i, hr); } else { @@ -6594,7 +6594,7 @@ static void test_texture1d(void) sampler_desc.MaxLOD = test->max_lod;
hr = ID3D10Device_CreateSamplerState(device, &sampler_desc, &sampler); - ok(SUCCEEDED(hr), "Test %u: Failed to create sampler state, hr %#x.\n", i, hr); + ok(SUCCEEDED(hr), "Test %u: Failed to create sampler state, hr %#lx.\n", i, hr);
ID3D10Device_PSSetSamplers(device, 0, 1, &sampler); } @@ -6611,7 +6611,7 @@ static void test_texture1d(void) { color = get_readback_color(&rb, 80 + x * 160, 0); ok(compare_color(color, test->expected_colors[x], 2), - "Test %u: Got unexpected color 0x%08x at (%u).\n", i, color, x); + "Test %u: Got unexpected color 0x%08lx at (%u).\n", i, color, x); } release_resource_readback(&rb); } @@ -6636,7 +6636,7 @@ static void test_texture1d(void) sampler_desc.MaxLOD = D3D10_FLOAT32_MAX;
hr = ID3D10Device_CreateSamplerState(device, &sampler_desc, &sampler); - ok(SUCCEEDED(hr), "Failed to create sampler state, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create sampler state, hr %#lx.\n", hr);
ID3D10Device_PSSetSamplers(device, 0, 1, &sampler);
@@ -6657,7 +6657,7 @@ static void test_texture1d(void) current_ps = test->ps;
hr = ID3D10Device_CreatePixelShader(device, current_ps->code, current_ps->size, &ps); - ok(SUCCEEDED(hr), "Test %u: Failed to create pixel shader, hr %#x.\n", i, hr); + ok(SUCCEEDED(hr), "Test %u: Failed to create pixel shader, hr %#lx.\n", i, hr);
ID3D10Device_PSSetShader(device, ps); } @@ -6675,7 +6675,7 @@ static void test_texture1d(void) texture_desc.Format = current_texture->format;
hr = ID3D10Device_CreateTexture1D(device, &texture_desc, current_texture->data, &texture); - ok(SUCCEEDED(hr), "Test %u: Failed to create 1d texture, hr %#x.\n", i, hr); + ok(SUCCEEDED(hr), "Test %u: Failed to create 1d texture, hr %#lx.\n", i, hr); }
if (srv) @@ -6683,7 +6683,7 @@ static void test_texture1d(void)
get_srv_desc(&srv_desc, &test->srv_desc); hr = ID3D10Device_CreateShaderResourceView(device, (ID3D10Resource *)texture, &srv_desc, &srv); - ok(SUCCEEDED(hr), "Test %u: Failed to create shader resource view, hr %#x.\n", i, hr); + ok(SUCCEEDED(hr), "Test %u: Failed to create shader resource view, hr %#lx.\n", i, hr);
ID3D10Device_PSSetShaderResources(device, 0, 1, &srv);
@@ -6699,7 +6699,7 @@ static void test_texture1d(void) { color = get_readback_color(&rb, 80 + x * 160, 0); ok(compare_color(color, test->expected_colors[x], 1), - "Test %u: Got unexpected color 0x%08x at (%u).\n", i, color, x); + "Test %u: Got unexpected color 0x%08lx at (%u).\n", i, color, x); } release_resource_readback(&rb); } @@ -7461,7 +7461,7 @@ static void test_texture(void) current_ps = test->ps;
hr = ID3D10Device_CreatePixelShader(device, current_ps->code, current_ps->size, &ps); - ok(SUCCEEDED(hr), "Test %u: Failed to create pixel shader, hr %#x.\n", i, hr); + ok(SUCCEEDED(hr), "Test %u: Failed to create pixel shader, hr %#lx.\n", i, hr);
ID3D10Device_PSSetShader(device, ps); } @@ -7484,10 +7484,10 @@ static void test_texture(void) texture_desc.Format = current_texture->format;
hr = ID3D10Device_CreateTexture2D(device, &texture_desc, current_texture->data, &texture); - ok(SUCCEEDED(hr), "Test %u: Failed to create 2d texture, hr %#x.\n", i, hr); + ok(SUCCEEDED(hr), "Test %u: Failed to create 2d texture, hr %#lx.\n", i, hr);
hr = ID3D10Device_CreateShaderResourceView(device, (ID3D10Resource *)texture, NULL, &srv); - ok(SUCCEEDED(hr), "Test %u: Failed to create shader resource view, hr %#x.\n", i, hr); + ok(SUCCEEDED(hr), "Test %u: Failed to create shader resource view, hr %#lx.\n", i, hr); } else { @@ -7512,7 +7512,7 @@ static void test_texture(void) sampler_desc.MaxLOD = test->max_lod;
hr = ID3D10Device_CreateSamplerState(device, &sampler_desc, &sampler); - ok(SUCCEEDED(hr), "Test %u: Failed to create sampler state, hr %#x.\n", i, hr); + ok(SUCCEEDED(hr), "Test %u: Failed to create sampler state, hr %#lx.\n", i, hr);
ID3D10Device_PSSetSamplers(device, 0, 1, &sampler); } @@ -7531,7 +7531,7 @@ static void test_texture(void) { color = get_readback_color(&rb, 80 + x * 160, 60 + y * 120); ok(compare_color(color, test->expected_colors[y * 4 + x], 1), - "Test %u: Got unexpected color 0x%08x at (%u, %u).\n", i, color, x, y); + "Test %u: Got unexpected color 0x%08lx at (%u, %u).\n", i, color, x, y); } } release_resource_readback(&rb); @@ -7557,7 +7557,7 @@ static void test_texture(void) sampler_desc.MaxLOD = D3D10_FLOAT32_MAX;
hr = ID3D10Device_CreateSamplerState(device, &sampler_desc, &sampler); - ok(SUCCEEDED(hr), "Failed to create sampler state, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create sampler state, hr %#lx.\n", hr);
ID3D10Device_PSSetSamplers(device, 0, 1, &sampler);
@@ -7578,7 +7578,7 @@ static void test_texture(void) current_ps = test->ps;
hr = ID3D10Device_CreatePixelShader(device, current_ps->code, current_ps->size, &ps); - ok(SUCCEEDED(hr), "Test %u: Failed to create pixel shader, hr %#x.\n", i, hr); + ok(SUCCEEDED(hr), "Test %u: Failed to create pixel shader, hr %#lx.\n", i, hr);
ID3D10Device_PSSetShader(device, ps); } @@ -7597,7 +7597,7 @@ static void test_texture(void) texture_desc.Format = current_texture->format;
hr = ID3D10Device_CreateTexture2D(device, &texture_desc, current_texture->data, &texture); - ok(SUCCEEDED(hr), "Test %u: Failed to create 2d texture, hr %#x.\n", i, hr); + ok(SUCCEEDED(hr), "Test %u: Failed to create 2d texture, hr %#lx.\n", i, hr); }
if (srv) @@ -7605,7 +7605,7 @@ static void test_texture(void)
get_srv_desc(&srv_desc, &test->srv_desc); hr = ID3D10Device_CreateShaderResourceView(device, (ID3D10Resource *)texture, &srv_desc, &srv); - ok(SUCCEEDED(hr), "Test %u: Failed to create shader resource view, hr %#x.\n", i, hr); + ok(SUCCEEDED(hr), "Test %u: Failed to create shader resource view, hr %#lx.\n", i, hr);
ID3D10Device_PSSetShaderResources(device, 0, 1, &srv);
@@ -7623,7 +7623,7 @@ static void test_texture(void) { color = get_readback_color(&rb, 80 + x * 160, 60 + y * 120); ok(compare_color(color, test->expected_colors[y * 4 + x], 1), - "Test %u: Got unexpected color 0x%08x at (%u, %u).\n", i, color, x, y); + "Test %u: Got unexpected color 0x%08lx at (%u, %u).\n", i, color, x, y); } } release_resource_readback(&rb); @@ -7748,9 +7748,9 @@ static void test_cube_maps(void) ID3D10Texture2D_GetDesc(test_context.backbuffer, &texture_desc); texture_desc.Format = DXGI_FORMAT_R32G32B32A32_FLOAT; hr = ID3D10Device_CreateTexture2D(device, &texture_desc, NULL, &rtv_texture); - ok(SUCCEEDED(hr), "Failed to create texture, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create texture, hr %#lx.\n", hr); hr = ID3D10Device_CreateRenderTargetView(device, (ID3D10Resource *)rtv_texture, NULL, &rtv); - ok(SUCCEEDED(hr), "Failed to create rendertarget view, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create rendertarget view, hr %#lx.\n", hr);
memset(&constant, 0, sizeof(constant)); cb = create_buffer(device, D3D10_BIND_CONSTANT_BUFFER, sizeof(constant), &constant); @@ -7759,7 +7759,7 @@ static void test_cube_maps(void) ID3D10Device_PSSetConstantBuffers(device, 0, 1, &cb);
hr = ID3D10Device_CreatePixelShader(device, ps_cube_code, sizeof(ps_cube_code), &ps); - ok(SUCCEEDED(hr), "Failed to create pixel shader, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create pixel shader, hr %#lx.\n", hr); ID3D10Device_PSSetShader(device, ps);
for (i = 0; i < ARRAY_SIZE(tests); ++i) @@ -7796,10 +7796,10 @@ static void test_cube_maps(void) texture_desc.CPUAccessFlags = 0; texture_desc.MiscFlags = D3D10_RESOURCE_MISC_TEXTURECUBE; hr = ID3D10Device_CreateTexture2D(device, &texture_desc, NULL, (ID3D10Texture2D **)&texture); - ok(SUCCEEDED(hr), "Test %u: Failed to create 2d texture, hr %#x.\n", i, hr); + ok(SUCCEEDED(hr), "Test %u: Failed to create 2d texture, hr %#lx.\n", i, hr);
hr = ID3D10Device_CreateShaderResourceView(device, texture, NULL, &srv); - ok(SUCCEEDED(hr), "Test %u: Failed to create shader resource view, hr %#x.\n", i, hr); + ok(SUCCEEDED(hr), "Test %u: Failed to create shader resource view, hr %#lx.\n", i, hr); ID3D10Device_PSSetShaderResources(device, 0, 1, &srv);
sub_resource_count = texture_desc.MipLevels * texture_desc.ArraySize; @@ -8012,12 +8012,12 @@ static void test_depth_stencil_sampling(void) sampler_desc.MinLOD = 0.0f; sampler_desc.MaxLOD = 0.0f; hr = ID3D10Device_CreateSamplerState(device, &sampler_desc, &cmp_sampler); - ok(SUCCEEDED(hr), "Failed to create sampler state, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create sampler state, hr %#lx.\n", hr);
sampler_desc.Filter = D3D10_FILTER_MIN_MAG_MIP_POINT; sampler_desc.ComparisonFunc = D3D10_COMPARISON_NEVER; hr = ID3D10Device_CreateSamplerState(device, &sampler_desc, &sampler); - ok(SUCCEEDED(hr), "Failed to create sampler state, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create sampler state, hr %#lx.\n", hr);
texture_desc.Width = 640; texture_desc.Height = 480; @@ -8031,9 +8031,9 @@ static void test_depth_stencil_sampling(void) texture_desc.CPUAccessFlags = 0; texture_desc.MiscFlags = 0; hr = ID3D10Device_CreateTexture2D(device, &texture_desc, NULL, &rt_texture); - ok(SUCCEEDED(hr), "Failed to create texture, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create texture, hr %#lx.\n", hr); hr = ID3D10Device_CreateRenderTargetView(device, (ID3D10Resource *)rt_texture, NULL, &rtv); - ok(SUCCEEDED(hr), "Failed to create render target, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create render target, hr %#lx.\n", hr); ID3D10Device_OMSetRenderTargets(device, 1, &rtv, NULL);
memset(&ps_constant, 0, sizeof(ps_constant)); @@ -8041,28 +8041,28 @@ static void test_depth_stencil_sampling(void) ID3D10Device_PSSetConstantBuffers(device, 0, 1, &cb);
hr = ID3D10Device_CreatePixelShader(device, ps_compare_code, sizeof(ps_compare_code), &ps_cmp); - ok(SUCCEEDED(hr), "Failed to create pixel shader, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create pixel shader, hr %#lx.\n", hr); hr = ID3D10Device_CreatePixelShader(device, ps_sample_code, sizeof(ps_sample_code), &ps_depth); - ok(SUCCEEDED(hr), "Failed to create pixel shader, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create pixel shader, hr %#lx.\n", hr); hr = ID3D10Device_CreatePixelShader(device, ps_stencil_code, sizeof(ps_stencil_code), &ps_stencil); - ok(SUCCEEDED(hr), "Failed to create pixel shader, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create pixel shader, hr %#lx.\n", hr); hr = ID3D10Device_CreatePixelShader(device, ps_depth_stencil_code, sizeof(ps_depth_stencil_code), &ps_depth_stencil); - ok(SUCCEEDED(hr), "Failed to create pixel shader, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create pixel shader, hr %#lx.\n", hr);
for (i = 0; i < ARRAY_SIZE(tests); ++i) { texture_desc.Format = tests[i].typeless_format; texture_desc.BindFlags = D3D10_BIND_SHADER_RESOURCE | D3D10_BIND_DEPTH_STENCIL; hr = ID3D10Device_CreateTexture2D(device, &texture_desc, NULL, &texture); - ok(SUCCEEDED(hr), "Failed to create texture for format %#x, hr %#x.\n", + ok(SUCCEEDED(hr), "Failed to create texture for format %#x, hr %#lx.\n", texture_desc.Format, hr);
dsv_desc.Format = tests[i].dsv_format; dsv_desc.ViewDimension = D3D10_DSV_DIMENSION_TEXTURE2D; U(dsv_desc).Texture2D.MipSlice = 0; hr = ID3D10Device_CreateDepthStencilView(device, (ID3D10Resource *)texture, &dsv_desc, &dsv); - ok(SUCCEEDED(hr), "Failed to create depth stencil view for format %#x, hr %#x.\n", + ok(SUCCEEDED(hr), "Failed to create depth stencil view for format %#x, hr %#lx.\n", dsv_desc.Format, hr);
srv_desc.Format = tests[i].depth_view_format; @@ -8070,7 +8070,7 @@ static void test_depth_stencil_sampling(void) U(srv_desc).Texture2D.MostDetailedMip = 0; U(srv_desc).Texture2D.MipLevels = 1; hr = ID3D10Device_CreateShaderResourceView(device, (ID3D10Resource *)texture, &srv_desc, &depth_srv); - ok(SUCCEEDED(hr), "Failed to create depth shader resource view for format %#x, hr %#x.\n", + ok(SUCCEEDED(hr), "Failed to create depth shader resource view for format %#x, hr %#lx.\n", srv_desc.Format, hr);
ID3D10Device_PSSetShader(device, ps_cmp); @@ -8140,7 +8140,7 @@ static void test_depth_stencil_sampling(void) ID3D10Texture2D_Release(texture); continue; } - ok(SUCCEEDED(hr), "Failed to create stencil shader resource view for format %#x, hr %#x.\n", + ok(SUCCEEDED(hr), "Failed to create stencil shader resource view for format %#x, hr %#lx.\n", srv_desc.Format, hr);
ID3D10Device_PSSetShader(device, ps_stencil); @@ -8338,14 +8338,14 @@ static void test_sample_c_lz(void) sampler_desc.MinLOD = 0.0f; sampler_desc.MaxLOD = 10.0f; hr = ID3D10Device_CreateSamplerState(device, &sampler_desc, &sampler); - ok(hr == S_OK, "Failed to create sampler state, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create sampler state, hr %#lx.\n", hr);
ID3D10Texture2D_GetDesc(test_context.backbuffer, &texture_desc); texture_desc.Format = DXGI_FORMAT_R32_FLOAT; hr = ID3D10Device_CreateTexture2D(device, &texture_desc, NULL, &rt_texture); - ok(hr == S_OK, "Failed to create texture, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create texture, hr %#lx.\n", hr); hr = ID3D10Device_CreateRenderTargetView(device, (ID3D10Resource *)rt_texture, NULL, &rtv); - ok(hr == S_OK, "Failed to create rendertarget view, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create rendertarget view, hr %#lx.\n", hr); ID3D10Device_OMSetRenderTargets(device, 1, &rtv, NULL);
memset(&ps_constant, 0, sizeof(ps_constant)); @@ -8360,7 +8360,7 @@ static void test_sample_c_lz(void) texture_desc.BindFlags = D3D10_BIND_SHADER_RESOURCE | D3D10_BIND_DEPTH_STENCIL; texture_desc.MiscFlags = D3D10_RESOURCE_MISC_TEXTURECUBE; hr = ID3D10Device_CreateTexture2D(device, &texture_desc, NULL, &texture); - ok(hr == S_OK, "Failed to create texture, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create texture, hr %#lx.\n", hr);
for (i = 0; i < ARRAY_SIZE(depth_values); ++i) { @@ -8371,13 +8371,13 @@ static void test_sample_c_lz(void) U(dsv_desc).Texture2DArray.ArraySize = 1;
hr = ID3D10Device_CreateDepthStencilView(device, (ID3D10Resource *)texture, &dsv_desc, &dsv); - ok(hr == S_OK, "Failed to create depth stencil view, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create depth stencil view, hr %#lx.\n", hr); ID3D10Device_ClearDepthStencilView(device, dsv, D3D10_CLEAR_DEPTH, depth_values[i], 0); ID3D10DepthStencilView_Release(dsv);
U(dsv_desc).Texture2DArray.MipSlice = 1; hr = ID3D10Device_CreateDepthStencilView(device, (ID3D10Resource *)texture, &dsv_desc, &dsv); - ok(hr == S_OK, "Failed to create depth stencil view, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create depth stencil view, hr %#lx.\n", hr); ID3D10Device_ClearDepthStencilView(device, dsv, D3D10_CLEAR_DEPTH, 1.0f, 0); ID3D10DepthStencilView_Release(dsv); } @@ -8387,10 +8387,10 @@ static void test_sample_c_lz(void) U(srv_desc).TextureCube.MostDetailedMip = 0; U(srv_desc).TextureCube.MipLevels = ~0u; hr = ID3D10Device_CreateShaderResourceView(device, (ID3D10Resource *)texture, &srv_desc, &srv); - ok(hr == S_OK, "Failed to create shader resource view, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create shader resource view, hr %#lx.\n", hr);
hr = ID3D10Device_CreatePixelShader(device, ps_cube_code, sizeof(ps_cube_code), &ps); - ok(hr == S_OK, "Failed to create pixel shader, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create pixel shader, hr %#lx.\n", hr);
ID3D10Device_PSSetShader(device, ps); ID3D10Device_PSSetConstantBuffers(device, 0, 1, &cb); @@ -8508,7 +8508,7 @@ static void test_multiple_render_targets(void)
hr = ID3D10Device_CreateInputLayout(device, layout_desc, ARRAY_SIZE(layout_desc), vs_code, sizeof(vs_code), &input_layout); - ok(SUCCEEDED(hr), "Failed to create input layout, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create input layout, hr %#lx.\n", hr);
vb = create_buffer(device, D3D10_BIND_VERTEX_BUFFER, sizeof(quad), quad);
@@ -8527,16 +8527,16 @@ static void test_multiple_render_targets(void) for (i = 0; i < ARRAY_SIZE(rt); ++i) { hr = ID3D10Device_CreateTexture2D(device, &texture_desc, NULL, &rt[i]); - ok(SUCCEEDED(hr), "Failed to create texture %u, hr %#x.\n", i, hr); + ok(SUCCEEDED(hr), "Failed to create texture %u, hr %#lx.\n", i, hr);
hr = ID3D10Device_CreateRenderTargetView(device, (ID3D10Resource *)rt[i], NULL, &rtv[i]); - ok(SUCCEEDED(hr), "Failed to create rendertarget view %u, hr %#x.\n", i, hr); + ok(SUCCEEDED(hr), "Failed to create rendertarget view %u, hr %#lx.\n", i, hr); }
hr = ID3D10Device_CreateVertexShader(device, vs_code, sizeof(vs_code), &vs); - ok(SUCCEEDED(hr), "Failed to create vertex shader, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create vertex shader, hr %#lx.\n", hr); hr = ID3D10Device_CreatePixelShader(device, ps_code, sizeof(ps_code), &ps); - ok(SUCCEEDED(hr), "Failed to create pixel shader, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create pixel shader, hr %#lx.\n", hr);
ID3D10Device_OMSetRenderTargets(device, 4, rtv, NULL); ID3D10Device_IASetInputLayout(device, input_layout); @@ -8581,7 +8581,7 @@ static void test_multiple_render_targets(void) ID3D10Texture2D_Release(rt[i]); } refcount = ID3D10Device_Release(device); - ok(!refcount, "Device has %u references left.\n", refcount); + ok(!refcount, "Device has %lu references left.\n", refcount); }
static void test_private_data(void) @@ -8626,9 +8626,9 @@ static void test_private_data(void) texture_desc.MiscFlags = 0;
hr = ID3D10Device_CreateTexture2D(device, &texture_desc, NULL, &texture); - ok(SUCCEEDED(hr), "Failed to create texture, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create texture, hr %#lx.\n", hr); hr = ID3D10Texture2D_QueryInterface(texture, &IID_IDXGISurface, (void **)&surface); - ok(SUCCEEDED(hr), "Failed to get IDXGISurface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get IDXGISurface, hr %#lx.\n", hr);
/* SetPrivateData() with a pointer of NULL has the purpose of * FreePrivateData() in previous D3D versions. A successful clear returns @@ -8636,29 +8636,29 @@ static void test_private_data(void) * considered a clear but as setting an interface pointer that happens to * be NULL. */ hr = ID3D10Device_SetPrivateData(device, &test_guid, 0, NULL); - ok(hr == S_FALSE, "Got unexpected hr %#x.\n", hr); + ok(hr == S_FALSE, "Got unexpected hr %#lx.\n", hr); hr = ID3D10Device_SetPrivateDataInterface(device, &test_guid, NULL); - ok(hr == S_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr); hr = ID3D10Device_SetPrivateData(device, &test_guid, ~0u, NULL); - ok(hr == S_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr); hr = ID3D10Device_SetPrivateData(device, &test_guid, ~0u, NULL); - ok(hr == S_FALSE, "Got unexpected hr %#x.\n", hr); + ok(hr == S_FALSE, "Got unexpected hr %#lx.\n", hr);
hr = ID3D10Device_SetPrivateDataInterface(device, &test_guid, NULL); - ok(hr == S_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr); size = sizeof(ptr) * 2; ptr = (IUnknown *)0xdeadbeef; hr = ID3D10Device_GetPrivateData(device, &test_guid, &size, &ptr); - ok(hr == S_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr); ok(!ptr, "Got unexpected pointer %p.\n", ptr); ok(size == sizeof(IUnknown *), "Got unexpected size %u.\n", size);
hr = ID3D10Device_QueryInterface(device, &IID_IDXGIDevice, (void **)&dxgi_device); - ok(SUCCEEDED(hr), "Failed to get DXGI device, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get DXGI device, hr %#lx.\n", hr); size = sizeof(ptr) * 2; ptr = (IUnknown *)0xdeadbeef; hr = IDXGIDevice_GetPrivateData(dxgi_device, &test_guid, &size, &ptr); - ok(hr == S_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr); ok(!ptr, "Got unexpected pointer %p.\n", ptr); ok(size == sizeof(IUnknown *), "Got unexpected size %u.\n", size); IDXGIDevice_Release(dxgi_device); @@ -8666,47 +8666,47 @@ static void test_private_data(void) refcount = get_refcount(test_object); hr = ID3D10Device_SetPrivateDataInterface(device, &test_guid, (IUnknown *)test_object); - ok(hr == S_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr); expected_refcount = refcount + 1; refcount = get_refcount(test_object); - 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); hr = ID3D10Device_SetPrivateDataInterface(device, &test_guid, (IUnknown *)test_object); - ok(hr == S_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr); refcount = get_refcount(test_object); - 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);
hr = ID3D10Device_SetPrivateDataInterface(device, &test_guid, NULL); - ok(hr == S_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr); --expected_refcount; refcount = get_refcount(test_object); - 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);
hr = ID3D10Device_SetPrivateDataInterface(device, &test_guid, (IUnknown *)test_object); - ok(hr == S_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr); size = sizeof(data); hr = ID3D10Device_SetPrivateData(device, &test_guid, size, data); - ok(hr == S_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr); refcount = get_refcount(test_object); - 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); hr = ID3D10Device_SetPrivateData(device, &test_guid, 42, NULL); - ok(hr == S_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr); hr = ID3D10Device_SetPrivateData(device, &test_guid, 42, NULL); - ok(hr == S_FALSE, "Got unexpected hr %#x.\n", hr); + ok(hr == S_FALSE, "Got unexpected hr %#lx.\n", hr);
hr = ID3D10Device_SetPrivateDataInterface(device, &test_guid, (IUnknown *)test_object); - ok(hr == S_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr); ++expected_refcount; size = 2 * sizeof(ptr); ptr = NULL; hr = ID3D10Device_GetPrivateData(device, &test_guid, &size, &ptr); - ok(hr == S_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr); ok(size == sizeof(test_object), "Got unexpected size %u.\n", size); ++expected_refcount; refcount = get_refcount(test_object); - 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); IUnknown_Release(ptr); --expected_refcount;
@@ -8718,52 +8718,52 @@ static void test_private_data(void) ptr = NULL; size = sizeof(ptr); hr = ID3D11Device_GetPrivateData(d3d11_device, &test_guid, &size, &ptr); - ok(hr == S_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr); ok(ptr == (IUnknown *)test_object, "Got unexpected ptr %p, expected %p.\n", ptr, test_object); IUnknown_Release(ptr); ID3D11Device_Release(d3d11_device); refcount = get_refcount(test_object); - ok(refcount == expected_refcount, "Got unexpected refcount %u, expected %u.\n", + ok(refcount == expected_refcount, "Got unexpected refcount %lu, expected %lu.\n", refcount, expected_refcount); }
ptr = (IUnknown *)0xdeadbeef; size = 1; hr = ID3D10Device_GetPrivateData(device, &test_guid, &size, NULL); - ok(hr == S_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr); ok(size == sizeof(device), "Got unexpected size %u.\n", size); size = 2 * sizeof(ptr); hr = ID3D10Device_GetPrivateData(device, &test_guid, &size, NULL); - ok(hr == S_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr); ok(size == sizeof(device), "Got unexpected size %u.\n", size); refcount = get_refcount(test_object); - 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);
size = 1; hr = ID3D10Device_GetPrivateData(device, &test_guid, &size, &ptr); - ok(hr == DXGI_ERROR_MORE_DATA, "Got unexpected hr %#x.\n", hr); + ok(hr == DXGI_ERROR_MORE_DATA, "Got unexpected hr %#lx.\n", hr); ok(size == sizeof(device), "Got unexpected size %u.\n", size); ok(ptr == (IUnknown *)0xdeadbeef, "Got unexpected pointer %p.\n", ptr); if (!enable_debug_layer) { hr = ID3D10Device_GetPrivateData(device, &test_guid2, NULL, NULL); - ok(hr == E_INVALIDARG, "Got unexpected hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Got unexpected hr %#lx.\n", hr); size = 0xdeadbabe; hr = ID3D10Device_GetPrivateData(device, &test_guid2, &size, &ptr); - ok(hr == DXGI_ERROR_NOT_FOUND, "Got unexpected hr %#x.\n", hr); + ok(hr == DXGI_ERROR_NOT_FOUND, "Got unexpected hr %#lx.\n", hr); ok(size == 0, "Got unexpected size %u.\n", size); ok(ptr == (IUnknown *)0xdeadbeef, "Got unexpected pointer %p.\n", ptr); hr = ID3D10Device_GetPrivateData(device, &test_guid, NULL, &ptr); - ok(hr == E_INVALIDARG, "Got unexpected hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Got unexpected hr %#lx.\n", hr); ok(ptr == (IUnknown *)0xdeadbeef, "Got unexpected pointer %p.\n", ptr); }
hr = ID3D10Texture2D_SetPrivateDataInterface(texture, &test_guid, (IUnknown *)test_object); - ok(hr == S_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr); ptr = NULL; size = sizeof(ptr); hr = IDXGISurface_GetPrivateData(surface, &test_guid, &size, &ptr); - ok(hr == S_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr); ok(ptr == (IUnknown *)test_object, "Got unexpected ptr %p, expected %p.\n", ptr, test_object); IUnknown_Release(ptr);
@@ -8775,7 +8775,7 @@ static void test_private_data(void) ptr = NULL; size = sizeof(ptr); hr = ID3D11Texture2D_GetPrivateData(d3d11_texture, &test_guid, &size, &ptr); - ok(hr == S_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr); ok(ptr == (IUnknown *)test_object, "Got unexpected ptr %p, expected %p.\n", ptr, test_object); IUnknown_Release(ptr); ID3D11Texture2D_Release(d3d11_texture); @@ -8784,9 +8784,9 @@ static void test_private_data(void) IDXGISurface_Release(surface); ID3D10Texture2D_Release(texture); refcount = ID3D10Device_Release(device); - ok(!refcount, "Device has %u references left.\n", refcount); + ok(!refcount, "Device has %lu references left.\n", refcount); refcount = ID3D10Device_Release(test_object); - ok(!refcount, "Test object has %u references left.\n", refcount); + ok(!refcount, "Test object has %lu references left.\n", refcount); }
static void test_state_refcounting(void) @@ -8819,13 +8819,13 @@ static void test_state_refcounting(void) sampler_desc.AddressW = D3D10_TEXTURE_ADDRESS_WRAP; sampler_desc.MaxLOD = FLT_MAX; hr = ID3D10Device_CreateSamplerState(device, &sampler_desc, &sampler); - ok(SUCCEEDED(hr), "Failed to create sampler state, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create sampler state, hr %#lx.\n", hr);
refcount = get_refcount(sampler); - ok(refcount == 1, "Got refcount %u, expected 1.\n", refcount); + ok(refcount == 1, "Got refcount %lu, expected 1.\n", refcount); ID3D10Device_PSSetSamplers(device, 0, 1, &sampler); refcount = ID3D10SamplerState_Release(sampler); - ok(!refcount, "Got refcount %u, expected 0.\n", refcount); + ok(!refcount, "Got refcount %lu, expected 0.\n", refcount); sampler = NULL; ID3D10Device_PSGetSamplers(device, 0, 1, &sampler); todo_wine ok(!sampler, "Got unexpected pointer %p, expected NULL.\n", sampler); @@ -8838,16 +8838,16 @@ static void test_state_refcounting(void) rasterizer_desc.CullMode = D3D10_CULL_BACK; rasterizer_desc.DepthClipEnable = TRUE; hr = ID3D10Device_CreateRasterizerState(device, &rasterizer_desc, &rasterizer_state); - ok(SUCCEEDED(hr), "Failed to create rasterizer state, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create rasterizer state, hr %#lx.\n", hr);
ID3D10Device_RSSetState(device, rasterizer_state); refcount = ID3D10RasterizerState_Release(rasterizer_state); - ok(!refcount, "Got refcount %u, expected 0.\n", refcount); + ok(!refcount, "Got refcount %lu, expected 0.\n", refcount); ID3D10Device_RSGetState(device, &tmp_rasterizer_state); ok(tmp_rasterizer_state == rasterizer_state, "Got rasterizer state %p, expected %p.\n", tmp_rasterizer_state, rasterizer_state); refcount = ID3D10RasterizerState_Release(tmp_rasterizer_state); - ok(!refcount, "Got refcount %u, expected 0.\n", refcount); + ok(!refcount, "Got refcount %lu, expected 0.\n", refcount);
/* ID3D10ShaderResourceView */ memset(&texture_desc, 0, sizeof(texture_desc)); @@ -8860,14 +8860,14 @@ static void test_state_refcounting(void) texture_desc.Usage = D3D10_USAGE_DEFAULT; texture_desc.BindFlags = D3D10_BIND_SHADER_RESOURCE; hr = ID3D10Device_CreateTexture2D(device, &texture_desc, NULL, &texture); - ok(SUCCEEDED(hr), "Failed to create texture, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create texture, hr %#lx.\n", hr); hr = ID3D10Device_CreateShaderResourceView(device, (ID3D10Resource *)texture, NULL, &srv); - ok(SUCCEEDED(hr), "Failed to create shader resource view, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create shader resource view, hr %#lx.\n", hr); ID3D10Texture2D_Release(texture);
ID3D10Device_PSSetShaderResources(device, 0, 1, &srv); refcount = ID3D10ShaderResourceView_Release(srv); - ok(!refcount, "Got refcount %u, expected 0.\n", refcount); + ok(!refcount, "Got refcount %lu, expected 0.\n", refcount); srv = NULL; ID3D10Device_PSGetShaderResources(device, 0, 1, &srv); todo_wine ok(!srv, "Got unexpected pointer %p, expected NULL.\n", srv); @@ -8877,14 +8877,14 @@ static void test_state_refcounting(void) /* ID3D10RenderTargetView */ texture_desc.BindFlags = D3D10_BIND_RENDER_TARGET; hr = ID3D10Device_CreateTexture2D(device, &texture_desc, NULL, &texture); - ok(SUCCEEDED(hr), "Failed to create texture, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create texture, hr %#lx.\n", hr); hr = ID3D10Device_CreateRenderTargetView(device, (ID3D10Resource *)texture, NULL, &rtv); - ok(SUCCEEDED(hr), "Failed to create render target view, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create render target view, hr %#lx.\n", hr); ID3D10Texture2D_Release(texture);
ID3D10Device_OMSetRenderTargets(device, 1, &rtv, NULL); refcount = ID3D10RenderTargetView_Release(rtv); - ok(!refcount, "Got refcount %u, expected 0.\n", refcount); + ok(!refcount, "Got refcount %lu, expected 0.\n", refcount); rtv = NULL; ID3D10Device_OMGetRenderTargets(device, 1, &rtv, NULL); todo_wine ok(!rtv, "Got unexpected pointer %p, expected NULL.\n", rtv); @@ -8895,11 +8895,11 @@ static void test_state_refcounting(void) predicate_desc.Query = D3D10_QUERY_OCCLUSION_PREDICATE; predicate_desc.MiscFlags = 0; hr = ID3D10Device_CreatePredicate(device, &predicate_desc, &predicate); - ok(SUCCEEDED(hr), "Failed to create predicate, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create predicate, hr %#lx.\n", hr);
ID3D10Device_SetPredication(device, predicate, TRUE); refcount = ID3D10Predicate_Release(predicate); - ok(!refcount, "Got refcount %u, expected 0.\n", refcount); + ok(!refcount, "Got refcount %lu, expected 0.\n", refcount); predicate = NULL; ID3D10Device_GetPredication(device, &predicate, NULL); todo_wine ok(!predicate, "Got unexpected pointer %p, expected NULL.\n", predicate); @@ -8907,7 +8907,7 @@ static void test_state_refcounting(void) ID3D10Predicate_Release(predicate);
refcount = ID3D10Device_Release(device); - ok(!refcount, "Device has %u references left.\n", refcount); + ok(!refcount, "Device has %lu references left.\n", refcount); }
static void test_il_append_aligned(void) @@ -9051,16 +9051,16 @@ static void test_il_append_aligned(void)
hr = ID3D10Device_CreateInputLayout(device, layout_desc, ARRAY_SIZE(layout_desc), vs_code, sizeof(vs_code), &input_layout); - ok(SUCCEEDED(hr), "Failed to create input layout, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create input layout, hr %#lx.\n", hr);
vb[0] = create_buffer(device, D3D10_BIND_VERTEX_BUFFER, sizeof(stream0), stream0); vb[1] = create_buffer(device, D3D10_BIND_VERTEX_BUFFER, sizeof(stream1), stream1); vb[2] = create_buffer(device, D3D10_BIND_VERTEX_BUFFER, sizeof(stream2), stream2);
hr = ID3D10Device_CreateVertexShader(device, vs_code, sizeof(vs_code), &vs); - ok(SUCCEEDED(hr), "Failed to create vertex shader, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create vertex shader, hr %#lx.\n", hr); hr = ID3D10Device_CreatePixelShader(device, ps_code, sizeof(ps_code), &ps); - ok(SUCCEEDED(hr), "Failed to create pixel shader, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create pixel shader, hr %#lx.\n", hr);
ID3D10Device_IASetInputLayout(device, input_layout); ID3D10Device_IASetPrimitiveTopology(device, D3D10_PRIMITIVE_TOPOLOGY_TRIANGLESTRIP); @@ -9079,13 +9079,13 @@ static void test_il_append_aligned(void) ID3D10Device_DrawInstanced(device, 4, 4, 0, 0);
color = get_texture_color(test_context.backbuffer, 80, 240); - ok(compare_color(color, 0xff0000ff, 1), "Got unexpected color 0x%08x.\n", color); + ok(compare_color(color, 0xff0000ff, 1), "Got unexpected color 0x%08lx.\n", color); color = get_texture_color(test_context.backbuffer, 240, 240); - ok(compare_color(color, 0xff00ff00, 1), "Got unexpected color 0x%08x.\n", color); + ok(compare_color(color, 0xff00ff00, 1), "Got unexpected color 0x%08lx.\n", color); color = get_texture_color(test_context.backbuffer, 400, 240); - ok(compare_color(color, 0xffff0000, 1), "Got unexpected color 0x%08x.\n", color); + ok(compare_color(color, 0xffff0000, 1), "Got unexpected color 0x%08lx.\n", color); color = get_texture_color(test_context.backbuffer, 560, 240); - ok(compare_color(color, 0xffff00ff, 1), "Got unexpected color 0x%08x.\n", color); + ok(compare_color(color, 0xffff00ff, 1), "Got unexpected color 0x%08lx.\n", color);
ID3D10PixelShader_Release(ps); ID3D10VertexShader_Release(vs); @@ -9269,18 +9269,18 @@ static void test_instanced_draw(void) ID3D10Texture2D_GetDesc(test_context.backbuffer, &texture_desc); texture_desc.Format = DXGI_FORMAT_R32_UINT; hr = ID3D10Device_CreateTexture2D(device, &texture_desc, NULL, &render_target); - ok(SUCCEEDED(hr), "Failed to create texture, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create texture, hr %#lx.\n", hr); hr = ID3D10Device_CreateRenderTargetView(device, (ID3D10Resource *)render_target, NULL, &rtvs[1]); - ok(SUCCEEDED(hr), "Failed to create rendertarget view, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create rendertarget view, hr %#lx.\n", hr);
hr = ID3D10Device_CreateInputLayout(device, layout_desc, ARRAY_SIZE(layout_desc), vs_code, sizeof(vs_code), &input_layout); - ok(SUCCEEDED(hr), "Failed to create input layout, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create input layout, hr %#lx.\n", hr);
hr = ID3D10Device_CreateVertexShader(device, vs_code, sizeof(vs_code), &vs); - ok(SUCCEEDED(hr), "Failed to create vertex shader, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create vertex shader, hr %#lx.\n", hr); hr = ID3D10Device_CreatePixelShader(device, ps_code, sizeof(ps_code), &ps); - ok(SUCCEEDED(hr), "Failed to create pixel shader, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create pixel shader, hr %#lx.\n", hr);
vb[0] = create_buffer(device, D3D10_BIND_VERTEX_BUFFER, sizeof(stream0), stream0); vb[1] = create_buffer(device, D3D10_BIND_VERTEX_BUFFER, sizeof(stream1), stream1); @@ -9399,9 +9399,9 @@ static void test_fragment_coords(void) ps_cb = create_buffer(device, D3D10_BIND_CONSTANT_BUFFER, sizeof(cutoff), &cutoff);
hr = ID3D10Device_CreatePixelShader(device, ps_code, sizeof(ps_code), &ps); - ok(SUCCEEDED(hr), "Failed to create pixel shader, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create pixel shader, hr %#lx.\n", hr); hr = ID3D10Device_CreatePixelShader(device, ps_frac_code, sizeof(ps_frac_code), &ps_frac); - ok(SUCCEEDED(hr), "Failed to create pixel shader, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create pixel shader, hr %#lx.\n", hr);
ID3D10Device_PSSetConstantBuffers(device, 0, 1, &ps_cb); ID3D10Device_PSSetShader(device, ps); @@ -9411,13 +9411,13 @@ static void test_fragment_coords(void) draw_quad(&test_context);
color = get_texture_color(test_context.backbuffer, 319, 239); - ok(compare_color(color, 0xff000000, 1), "Got unexpected color 0x%08x.\n", color); + ok(compare_color(color, 0xff000000, 1), "Got unexpected color 0x%08lx.\n", color); color = get_texture_color(test_context.backbuffer, 320, 239); - ok(compare_color(color, 0xff00ff00, 1), "Got unexpected color 0x%08x.\n", color); + ok(compare_color(color, 0xff00ff00, 1), "Got unexpected color 0x%08lx.\n", color); color = get_texture_color(test_context.backbuffer, 319, 240); - ok(compare_color(color, 0xffff0000, 1), "Got unexpected color 0x%08x.\n", color); + ok(compare_color(color, 0xffff0000, 1), "Got unexpected color 0x%08lx.\n", color); color = get_texture_color(test_context.backbuffer, 320, 240); - ok(compare_color(color, 0xffffff00, 1), "Got unexpected color 0x%08x.\n", color); + ok(compare_color(color, 0xffffff00, 1), "Got unexpected color 0x%08lx.\n", color);
ID3D10Buffer_Release(ps_cb); cutoff.x = 16.0f; @@ -9428,13 +9428,13 @@ static void test_fragment_coords(void) draw_quad(&test_context);
color = get_texture_color(test_context.backbuffer, 14, 14); - ok(compare_color(color, 0xff000000, 1), "Got unexpected color 0x%08x.\n", color); + ok(compare_color(color, 0xff000000, 1), "Got unexpected color 0x%08lx.\n", color); color = get_texture_color(test_context.backbuffer, 18, 14); - ok(compare_color(color, 0xff00ff00, 1), "Got unexpected color 0x%08x.\n", color); + ok(compare_color(color, 0xff00ff00, 1), "Got unexpected color 0x%08lx.\n", color); color = get_texture_color(test_context.backbuffer, 14, 18); - ok(compare_color(color, 0xffff0000, 1), "Got unexpected color 0x%08x.\n", color); + ok(compare_color(color, 0xffff0000, 1), "Got unexpected color 0x%08lx.\n", color); color = get_texture_color(test_context.backbuffer, 18, 18); - ok(compare_color(color, 0xffffff00, 1), "Got unexpected color 0x%08x.\n", color); + ok(compare_color(color, 0xffffff00, 1), "Got unexpected color 0x%08lx.\n", color);
ID3D10Device_PSSetShader(device, ps_frac); ID3D10Device_ClearRenderTargetView(device, test_context.backbuffer_rtv, red); @@ -9442,7 +9442,7 @@ static void test_fragment_coords(void) draw_quad(&test_context);
color = get_texture_color(test_context.backbuffer, 14, 14); - ok(compare_color(color, 0xff008080, 1), "Got unexpected color 0x%08x.\n", color); + ok(compare_color(color, 0xff008080, 1), "Got unexpected color 0x%08lx.\n", color);
ID3D10Buffer_Release(ps_cb); ID3D10PixelShader_Release(ps_frac); @@ -9523,18 +9523,18 @@ static void test_initial_texture_data(void) resource_data.SysMemSlicePitch = 0;
hr = ID3D10Device_CreateTexture2D(device, &texture_desc, &resource_data, &staging_texture); - ok(hr == S_OK, "Failed to create 2d texture, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create 2d texture, hr %#lx.\n", hr);
texture_desc.Usage = D3D10_USAGE_DEFAULT; texture_desc.CPUAccessFlags = 0; texture_desc.BindFlags = D3D10_BIND_SHADER_RESOURCE; hr = ID3D10Device_CreateTexture2D(device, &texture_desc, NULL, &texture); - ok(hr == S_OK, "Failed to create 2d texture, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create 2d texture, hr %#lx.\n", hr);
ID3D10Device_CopyResource(device, (ID3D10Resource *)texture, (ID3D10Resource *)staging_texture);
hr = ID3D10Device_CreateShaderResourceView(device, (ID3D10Resource *)texture, NULL, &ps_srv); - ok(hr == S_OK, "Failed to create shader resource view, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create shader resource view, hr %#lx.\n", hr);
sampler_desc.Filter = D3D10_FILTER_MIN_MAG_MIP_POINT; sampler_desc.AddressU = D3D10_TEXTURE_ADDRESS_CLAMP; @@ -9550,10 +9550,10 @@ static void test_initial_texture_data(void) sampler_desc.MinLOD = 0.0f; sampler_desc.MaxLOD = 0.0f; hr = ID3D10Device_CreateSamplerState(device, &sampler_desc, &sampler_state); - ok(hr == S_OK, "Failed to create sampler state, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create sampler state, hr %#lx.\n", hr);
hr = ID3D10Device_CreatePixelShader(device, ps_code, sizeof(ps_code), &ps); - ok(hr == S_OK, "Failed to create pixel shader, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create pixel shader, hr %#lx.\n", hr);
ID3D10Device_PSSetShaderResources(device, 0, 1, &ps_srv); ID3D10Device_PSSetSamplers(device, 0, 1, &sampler_state); @@ -9568,7 +9568,7 @@ static void test_initial_texture_data(void) { color = get_readback_color(&rb, 80 + j * 160, 60 + i * 120); ok(compare_color(color, bitmap_data[j + i * 4], 1), - "Got color 0x%08x at (%u, %u), expected 0x%08x.\n", + "Got color 0x%08lx at (%u, %u), expected 0x%08lx.\n", color, j, i, bitmap_data[j + i * 4]); } } @@ -9664,10 +9664,10 @@ static void test_update_subresource(void) resource_data.SysMemSlicePitch = 0;
hr = ID3D10Device_CreateTexture2D(device, &texture_desc, &resource_data, &texture); - ok(SUCCEEDED(hr), "Failed to create a 2d texture, hr %#x\n", hr); + ok(SUCCEEDED(hr), "Failed to create a 2d texture, hr %#lx\n", hr);
hr = ID3D10Device_CreateShaderResourceView(device, (ID3D10Resource *)texture, NULL, &ps_srv); - ok(SUCCEEDED(hr), "Failed to create shader resource view, hr %#x\n", hr); + ok(SUCCEEDED(hr), "Failed to create shader resource view, hr %#lx\n", hr);
sampler_desc.Filter = D3D10_FILTER_MIN_MAG_MIP_POINT; sampler_desc.AddressU = D3D10_TEXTURE_ADDRESS_CLAMP; @@ -9684,10 +9684,10 @@ static void test_update_subresource(void) sampler_desc.MaxLOD = 0.0f;
hr = ID3D10Device_CreateSamplerState(device, &sampler_desc, &sampler_state); - ok(SUCCEEDED(hr), "Failed to create sampler state, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create sampler state, hr %#lx.\n", hr);
hr = ID3D10Device_CreatePixelShader(device, ps_code, sizeof(ps_code), &ps); - ok(SUCCEEDED(hr), "Failed to create pixel shader, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create pixel shader, hr %#lx.\n", hr);
ID3D10Device_PSSetShaderResources(device, 0, 1, &ps_srv); ID3D10Device_PSSetSamplers(device, 0, 1, &sampler_state); @@ -9725,7 +9725,7 @@ static void test_update_subresource(void) { color = get_readback_color(&rb, 80 + j * 160, 60 + i * 120); ok(compare_color(color, expected_colors[j + i * 4], 1), - "Got unexpected color 0x%08x at (%u, %u), expected 0x%08x.\n", + "Got unexpected color 0x%08lx at (%u, %u), expected 0x%08lx.\n", color, j, i, expected_colors[j + i * 4]); } } @@ -9741,7 +9741,7 @@ static void test_update_subresource(void) { color = get_readback_color(&rb, 80 + j * 160, 60 + i * 120); ok(compare_color(color, bitmap_data[j + i * 4], 1), - "Got unexpected color 0x%08x at (%u, %u), expected 0x%08x.\n", + "Got unexpected color 0x%08lx at (%u, %u), expected 0x%08lx.\n", color, j, i, bitmap_data[j + i * 4]); } } @@ -9863,7 +9863,7 @@ static void test_copy_subresource_region(void) resource_data.SysMemSlicePitch = 0;
hr = ID3D10Device_CreateTexture2D(device, &texture_desc, &resource_data, &dst_texture); - ok(SUCCEEDED(hr), "Failed to create 2d texture, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create 2d texture, hr %#lx.\n", hr);
texture_desc.Usage = D3D10_USAGE_IMMUTABLE;
@@ -9872,10 +9872,10 @@ static void test_copy_subresource_region(void) resource_data.SysMemSlicePitch = 0;
hr = ID3D10Device_CreateTexture2D(device, &texture_desc, &resource_data, &src_texture); - ok(SUCCEEDED(hr), "Failed to create 2d texture, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create 2d texture, hr %#lx.\n", hr);
hr = ID3D10Device_CreateShaderResourceView(device, (ID3D10Resource *)dst_texture, NULL, &ps_srv); - ok(SUCCEEDED(hr), "Failed to create shader resource view, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create shader resource view, hr %#lx.\n", hr);
sampler_desc.Filter = D3D10_FILTER_MIN_MAG_MIP_POINT; sampler_desc.AddressU = D3D10_TEXTURE_ADDRESS_CLAMP; @@ -9892,10 +9892,10 @@ static void test_copy_subresource_region(void) sampler_desc.MaxLOD = 0.0f;
hr = ID3D10Device_CreateSamplerState(device, &sampler_desc, &sampler_state); - ok(SUCCEEDED(hr), "Failed to create sampler state, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create sampler state, hr %#lx.\n", hr);
hr = ID3D10Device_CreatePixelShader(device, ps_code, sizeof(ps_code), &ps); - ok(SUCCEEDED(hr), "Failed to create pixel shader, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create pixel shader, hr %#lx.\n", hr);
ID3D10Device_PSSetShaderResources(device, 0, 1, &ps_srv); ID3D10Device_PSSetSamplers(device, 0, 1, &sampler_state); @@ -9938,7 +9938,7 @@ static void test_copy_subresource_region(void) { color = get_readback_color(&rb, 80 + j * 160, 60 + i * 120); ok(compare_color(color, expected_colors[j + i * 4], 1), - "Got unexpected color 0x%08x at (%u, %u), expected 0x%08x.\n", + "Got unexpected color 0x%08lx at (%u, %u), expected 0x%08lx.\n", color, j, i, expected_colors[j + i * 4]); } } @@ -9954,7 +9954,7 @@ static void test_copy_subresource_region(void) { color = get_readback_color(&rb, 80 + j * 160, 60 + i * 120); ok(compare_color(color, bitmap_data[j + i * 4], 1), - "Got unexpected color 0x%08x at (%u, %u), expected 0x%08x.\n", + "Got unexpected color 0x%08lx at (%u, %u), expected 0x%08lx.\n", color, j, i, bitmap_data[j + i * 4]); } } @@ -9962,7 +9962,7 @@ static void test_copy_subresource_region(void)
ID3D10PixelShader_Release(ps); hr = ID3D10Device_CreatePixelShader(device, ps_buffer_code, sizeof(ps_buffer_code), &ps); - ok(SUCCEEDED(hr), "Failed to create pixel shader, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create pixel shader, hr %#lx.\n", hr);
ID3D10ShaderResourceView_Release(ps_srv); ps_srv = NULL; @@ -10026,7 +10026,7 @@ static void test_copy_subresource_region(void) { color = get_readback_color(&rb, 80 + j * 160, 60 + i * 120); ok(compare_color(color, bitmap_data[j + i * 4], 1), - "Got unexpected color 0x%08x at (%u, %u), expected 0x%08x.\n", + "Got unexpected color 0x%08lx at (%u, %u), expected 0x%08lx.\n", color, j, i, bitmap_data[j + i * 4]); } } @@ -10082,7 +10082,7 @@ static void test_copy_subresource_region_1d(void) }
hr = ID3D10Device_CreateTexture1D(device, &texture1d_desc, resource_data, &texture1d); - ok(hr == S_OK, "Failed to create 1d texture, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create 1d texture, hr %#lx.\n", hr);
texture2d_desc.Width = 4; texture2d_desc.Height = 4; @@ -10097,7 +10097,7 @@ static void test_copy_subresource_region_1d(void) texture2d_desc.MiscFlags = 0;
hr = ID3D10Device_CreateTexture2D(device, &texture2d_desc, NULL, &texture2d); - ok(hr == S_OK, "Failed to create 2d texture, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create 2d texture, hr %#lx.\n", hr);
set_box(&box, 0, 0, 0, 4, 1, 1); for (i = 0; i < ARRAY_SIZE(resource_data); ++i) @@ -10113,7 +10113,7 @@ static void test_copy_subresource_region_1d(void) { color = get_readback_color(&rb, j, i); ok(compare_color(color, bitmap_data[j + i * 4], 1), - "Got color 0x%08x at (%u, %u), expected 0x%08x.\n", + "Got color 0x%08lx at (%u, %u), expected 0x%08lx.\n", color, j, i, bitmap_data[j + i * 4]); } } @@ -10124,7 +10124,7 @@ static void test_copy_subresource_region_1d(void) { color = get_readback_color(&rb, i, 0); ok(compare_color(color, bitmap_data[i], 1), - "Got color 0x%08x at %u, expected 0x%08x.\n", + "Got color 0x%08lx at %u, expected 0x%08lx.\n", color, i, bitmap_data[i]); } release_resource_readback(&rb); @@ -10147,27 +10147,27 @@ static void check_buffer_cpu_access_(unsigned int line, ID3D10Buffer *buffer,
expected_hr = cpu_read ? S_OK : E_INVALIDARG; hr = ID3D10Buffer_Map(buffer, D3D10_MAP_READ, 0, &data); - ok_(__FILE__, line)(hr == expected_hr, "Got hr %#x for READ.\n", hr); + ok_(__FILE__, line)(hr == expected_hr, "Got hr %#lx for READ.\n", hr); if (SUCCEEDED(hr)) ID3D10Buffer_Unmap(buffer);
expected_hr = !dynamic && cpu_write ? S_OK : E_INVALIDARG; hr = ID3D10Buffer_Map(buffer, D3D10_MAP_WRITE, 0, &data); todo_wine_if(dynamic && cpu_write) - ok_(__FILE__, line)(hr == expected_hr, "Got hr %#x for WRITE.\n", hr); + ok_(__FILE__, line)(hr == expected_hr, "Got hr %#lx for WRITE.\n", hr); if (SUCCEEDED(hr)) ID3D10Buffer_Unmap(buffer);
expected_hr = cpu_read && cpu_write ? S_OK : E_INVALIDARG; hr = ID3D10Buffer_Map(buffer, D3D10_MAP_READ_WRITE, 0, &data); - ok_(__FILE__, line)(hr == expected_hr, "Got hr %#x for READ_WRITE.\n", hr); + ok_(__FILE__, line)(hr == expected_hr, "Got hr %#lx for READ_WRITE.\n", hr); if (SUCCEEDED(hr)) ID3D10Buffer_Unmap(buffer);
expected_hr = dynamic ? S_OK : E_INVALIDARG; hr = ID3D10Buffer_Map(buffer, D3D10_MAP_WRITE_DISCARD, 0, &data); todo_wine_if(!dynamic && cpu_write) - ok_(__FILE__, line)(hr == expected_hr, "Got hr %#x for WRITE_DISCARD.\n", hr); + ok_(__FILE__, line)(hr == expected_hr, "Got hr %#lx for WRITE_DISCARD.\n", hr); if (SUCCEEDED(hr)) ID3D10Buffer_Unmap(buffer);
@@ -10181,7 +10181,7 @@ static void check_buffer_cpu_access_(unsigned int line, ID3D10Buffer *buffer, todo_wine_if(expected_hr != S_OK) ok_(__FILE__, line)(hr == expected_hr || broken(bind_flags & (D3D10_BIND_CONSTANT_BUFFER | D3D10_BIND_SHADER_RESOURCE)), - "Got hr %#x for WRITE_NO_OVERWRITE.\n", hr); + "Got hr %#lx for WRITE_NO_OVERWRITE.\n", hr); if (SUCCEEDED(hr)) ID3D10Buffer_Unmap(buffer);
@@ -10200,27 +10200,27 @@ static void check_texture_cpu_access_(unsigned int line, ID3D10Texture2D *textur
expected_hr = cpu_read ? S_OK : E_INVALIDARG; hr = ID3D10Texture2D_Map(texture, 0, D3D10_MAP_READ, 0, &map_desc); - ok_(__FILE__, line)(hr == expected_hr, "Got hr %#x for READ.\n", hr); + ok_(__FILE__, line)(hr == expected_hr, "Got hr %#lx for READ.\n", hr); if (SUCCEEDED(hr)) ID3D10Texture2D_Unmap(texture, 0);
expected_hr = !dynamic && cpu_write ? S_OK : E_INVALIDARG; hr = ID3D10Texture2D_Map(texture, 0, D3D10_MAP_WRITE, 0, &map_desc); todo_wine_if(dynamic && cpu_write) - ok_(__FILE__, line)(hr == expected_hr, "Got hr %#x for WRITE.\n", hr); + ok_(__FILE__, line)(hr == expected_hr, "Got hr %#lx for WRITE.\n", hr); if (SUCCEEDED(hr)) ID3D10Texture2D_Unmap(texture, 0);
expected_hr = cpu_read && cpu_write ? S_OK : E_INVALIDARG; hr = ID3D10Texture2D_Map(texture, 0, D3D10_MAP_READ_WRITE, 0, &map_desc); - ok_(__FILE__, line)(hr == expected_hr, "Got hr %#x for READ_WRITE.\n", hr); + ok_(__FILE__, line)(hr == expected_hr, "Got hr %#lx for READ_WRITE.\n", hr); if (SUCCEEDED(hr)) ID3D10Texture2D_Unmap(texture, 0);
expected_hr = dynamic ? S_OK : E_INVALIDARG; hr = ID3D10Texture2D_Map(texture, 0, D3D10_MAP_WRITE_DISCARD, 0, &map_desc); todo_wine_if(!dynamic && cpu_write) - ok_(__FILE__, line)(hr == expected_hr, "Got hr %#x for WRITE_DISCARD.\n", hr); + ok_(__FILE__, line)(hr == expected_hr, "Got hr %#lx for WRITE_DISCARD.\n", hr); if (SUCCEEDED(hr)) ID3D10Texture2D_Unmap(texture, 0);
@@ -10229,7 +10229,7 @@ static void check_texture_cpu_access_(unsigned int line, ID3D10Texture2D *textur
hr = ID3D10Texture2D_Map(texture, 0, D3D10_MAP_WRITE_NO_OVERWRITE, 0, &map_desc); todo_wine - ok_(__FILE__, line)(hr == E_INVALIDARG, "Got hr %#x for WRITE_NO_OVERWRITE.\n", hr); + ok_(__FILE__, line)(hr == E_INVALIDARG, "Got hr %#lx for WRITE_NO_OVERWRITE.\n", hr); if (SUCCEEDED(hr)) ID3D10Texture2D_Unmap(texture, 0); } @@ -10326,7 +10326,7 @@ static void test_resource_access(void) buffer_desc.CPUAccessFlags = 0; expected_hr = tests[i].is_valid && !required_cpu_access ? S_OK : E_INVALIDARG; hr = ID3D10Device_CreateBuffer(device, &buffer_desc, &data, &buffer); - ok(hr == expected_hr, "Got hr %#x, expected %#x, test %u.\n", hr, expected_hr, i); + ok(hr == expected_hr, "Got hr %#lx, expected %#lx, test %u.\n", hr, expected_hr, i); if (SUCCEEDED(hr)) { check_buffer_cpu_access(buffer, buffer_desc.Usage, @@ -10337,7 +10337,7 @@ static void test_resource_access(void) buffer_desc.CPUAccessFlags = D3D10_CPU_ACCESS_WRITE; expected_hr = tests[i].is_valid && cpu_write ? S_OK : E_INVALIDARG; hr = ID3D10Device_CreateBuffer(device, &buffer_desc, &data, &buffer); - ok(hr == expected_hr, "Got hr %#x, expected %#x, test %u.\n", hr, expected_hr, i); + ok(hr == expected_hr, "Got hr %#lx, expected %#lx, test %u.\n", hr, expected_hr, i); if (SUCCEEDED(hr)) { check_buffer_cpu_access(buffer, buffer_desc.Usage, @@ -10348,7 +10348,7 @@ static void test_resource_access(void) buffer_desc.CPUAccessFlags = D3D10_CPU_ACCESS_READ; expected_hr = tests[i].is_valid && cpu_read ? S_OK : E_INVALIDARG; hr = ID3D10Device_CreateBuffer(device, &buffer_desc, &data, &buffer); - ok(hr == expected_hr, "Got hr %#x, expected %#x, test %u.\n", hr, expected_hr, i); + ok(hr == expected_hr, "Got hr %#lx, expected %#lx, test %u.\n", hr, expected_hr, i); if (SUCCEEDED(hr)) { check_buffer_cpu_access(buffer, buffer_desc.Usage, @@ -10359,7 +10359,7 @@ static void test_resource_access(void) buffer_desc.CPUAccessFlags = D3D10_CPU_ACCESS_WRITE | D3D10_CPU_ACCESS_READ; expected_hr = tests[i].is_valid && cpu_write && cpu_read ? S_OK : E_INVALIDARG; hr = ID3D10Device_CreateBuffer(device, &buffer_desc, &data, &buffer); - ok(hr == expected_hr, "Got hr %#x, expected %#x, test %u.\n", hr, expected_hr, i); + ok(hr == expected_hr, "Got hr %#lx, expected %#lx, test %u.\n", hr, expected_hr, i); if (SUCCEEDED(hr)) { check_buffer_cpu_access(buffer, buffer_desc.Usage, @@ -10402,7 +10402,7 @@ static void test_resource_access(void) texture_desc.CPUAccessFlags = 0; expected_hr = tests[i].is_valid && !required_cpu_access ? S_OK : E_INVALIDARG; hr = ID3D10Device_CreateTexture2D(device, &texture_desc, &data, &texture); - ok(hr == expected_hr, "Got hr %#x, expected %#x, test %u.\n", hr, expected_hr, i); + ok(hr == expected_hr, "Got hr %#lx, expected %#lx, test %u.\n", hr, expected_hr, i); if (SUCCEEDED(hr)) { check_texture_cpu_access(texture, texture_desc.Usage, @@ -10414,7 +10414,7 @@ static void test_resource_access(void) expected_hr = tests[i].is_valid && cpu_write ? S_OK : E_INVALIDARG; hr = ID3D10Device_CreateTexture2D(device, &texture_desc, &data, &texture); ok(hr == expected_hr || (hr == S_OK && broken_validation), - "Got hr %#x, expected %#x, test %u.\n", hr, expected_hr, i); + "Got hr %#lx, expected %#lx, test %u.\n", hr, expected_hr, i); if (SUCCEEDED(hr)) { if (broken_validation) @@ -10428,7 +10428,7 @@ static void test_resource_access(void) expected_hr = tests[i].is_valid && cpu_read ? S_OK : E_INVALIDARG; hr = ID3D10Device_CreateTexture2D(device, &texture_desc, &data, &texture); ok(hr == expected_hr || (hr == S_OK && broken_validation), - "Got hr %#x, expected %#x, test %u.\n", hr, expected_hr, i); + "Got hr %#lx, expected %#lx, test %u.\n", hr, expected_hr, i); if (SUCCEEDED(hr)) { if (broken_validation) @@ -10442,7 +10442,7 @@ static void test_resource_access(void) expected_hr = tests[i].is_valid && cpu_write && cpu_read ? S_OK : E_INVALIDARG; hr = ID3D10Device_CreateTexture2D(device, &texture_desc, &data, &texture); ok(hr == expected_hr || (hr == S_OK && broken_validation), - "Got hr %#x, expected %#x, test %u.\n", hr, expected_hr, i); + "Got hr %#lx, expected %#lx, test %u.\n", hr, expected_hr, i); if (SUCCEEDED(hr)) { if (broken_validation) @@ -10456,7 +10456,7 @@ static void test_resource_access(void) heap_free((void *)data.pSysMem);
refcount = ID3D10Device_Release(device); - ok(!refcount, "Device has %u references left.\n", refcount); + ok(!refcount, "Device has %lu references left.\n", refcount); }
static void test_check_multisample_quality_levels(void) @@ -10473,7 +10473,7 @@ static void test_check_multisample_quality_levels(void) }
hr = ID3D10Device_CheckMultisampleQualityLevels(device, DXGI_FORMAT_R8G8B8A8_UNORM, 2, &quality_levels); - ok(hr == S_OK, "Failed to check multisample quality levels, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to check multisample quality levels, hr %#lx.\n", hr); if (!quality_levels) { skip("Multisampling not supported for DXGI_FORMAT_R8G8B8A8_UNORM.\n"); @@ -10482,61 +10482,61 @@ static void test_check_multisample_quality_levels(void)
quality_levels = 0xdeadbeef; hr = ID3D10Device_CheckMultisampleQualityLevels(device, DXGI_FORMAT_UNKNOWN, 2, &quality_levels); - todo_wine ok(SUCCEEDED(hr), "Got unexpected hr %#x.\n", hr); + todo_wine ok(SUCCEEDED(hr), "Got unexpected hr %#lx.\n", hr); ok(!quality_levels, "Got unexpected quality_levels %u.\n", quality_levels); quality_levels = 0xdeadbeef; hr = ID3D10Device_CheckMultisampleQualityLevels(device, 65536, 2, &quality_levels); - ok(hr == E_INVALIDARG, "Got unexpected hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Got unexpected hr %#lx.\n", hr); todo_wine ok(quality_levels == 0xdeadbeef, "Got unexpected quality_levels %u.\n", quality_levels);
if (!enable_debug_layer) { hr = ID3D10Device_CheckMultisampleQualityLevels(device, DXGI_FORMAT_R8G8B8A8_UNORM, 0, NULL); - ok(hr == E_INVALIDARG, "Got unexpected hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Got unexpected hr %#lx.\n", hr); hr = ID3D10Device_CheckMultisampleQualityLevels(device, DXGI_FORMAT_R8G8B8A8_UNORM, 1, NULL); - ok(hr == E_INVALIDARG, "Got unexpected hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Got unexpected hr %#lx.\n", hr); hr = ID3D10Device_CheckMultisampleQualityLevels(device, DXGI_FORMAT_R8G8B8A8_UNORM, 2, NULL); - ok(hr == E_INVALIDARG, "Got unexpected hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Got unexpected hr %#lx.\n", hr); }
quality_levels = 0xdeadbeef; hr = ID3D10Device_CheckMultisampleQualityLevels(device, DXGI_FORMAT_R8G8B8A8_UNORM, 0, &quality_levels); - ok(hr == E_FAIL, "Got unexpected hr %#x.\n", hr); + ok(hr == E_FAIL, "Got unexpected hr %#lx.\n", hr); ok(!quality_levels, "Got unexpected quality_levels %u.\n", quality_levels);
quality_levels = 0xdeadbeef; hr = ID3D10Device_CheckMultisampleQualityLevels(device, DXGI_FORMAT_R8G8B8A8_UNORM, 1, &quality_levels); - ok(SUCCEEDED(hr), "Got unexpected hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Got unexpected hr %#lx.\n", hr); ok(quality_levels == 1, "Got unexpected quality_levels %u.\n", quality_levels);
quality_levels = 0xdeadbeef; hr = ID3D10Device_CheckMultisampleQualityLevels(device, DXGI_FORMAT_R8G8B8A8_UNORM, 2, &quality_levels); - ok(SUCCEEDED(hr), "Got unexpected hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Got unexpected hr %#lx.\n", hr); ok(quality_levels, "Got unexpected quality_levels %u.\n", quality_levels);
/* We assume 15 samples multisampling is never supported in practice. */ quality_levels = 0xdeadbeef; hr = ID3D10Device_CheckMultisampleQualityLevels(device, DXGI_FORMAT_R8G8B8A8_UNORM, 15, &quality_levels); - ok(SUCCEEDED(hr), "Got unexpected hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Got unexpected hr %#lx.\n", hr); ok(!quality_levels, "Got unexpected quality_levels %u.\n", quality_levels); hr = ID3D10Device_CheckMultisampleQualityLevels(device, DXGI_FORMAT_R8G8B8A8_UNORM, 32, &quality_levels); - ok(SUCCEEDED(hr), "Got unexpected hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Got unexpected hr %#lx.\n", hr); quality_levels = 0xdeadbeef; hr = ID3D10Device_CheckMultisampleQualityLevels(device, DXGI_FORMAT_R8G8B8A8_UNORM, 33, &quality_levels); - ok(hr == E_FAIL, "Got unexpected hr %#x.\n", hr); + ok(hr == E_FAIL, "Got unexpected hr %#lx.\n", hr); ok(!quality_levels, "Got unexpected quality_levels %u.\n", quality_levels); quality_levels = 0xdeadbeef; hr = ID3D10Device_CheckMultisampleQualityLevels(device, DXGI_FORMAT_R8G8B8A8_UNORM, 64, &quality_levels); - ok(hr == E_FAIL, "Got unexpected hr %#x.\n", hr); + ok(hr == E_FAIL, "Got unexpected hr %#lx.\n", hr); ok(!quality_levels, "Got unexpected quality_levels %u.\n", quality_levels);
hr = ID3D10Device_CheckMultisampleQualityLevels(device, DXGI_FORMAT_BC3_UNORM, 2, &quality_levels); - ok(SUCCEEDED(hr), "Got unexpected hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Got unexpected hr %#lx.\n", hr); ok(!quality_levels, "Got unexpected quality_levels %u.\n", quality_levels);
done: refcount = ID3D10Device_Release(device); - ok(!refcount, "Device has %u references left.\n", refcount); + ok(!refcount, "Device has %lu references left.\n", refcount); }
static void test_cb_relative_addressing(void) @@ -10662,7 +10662,7 @@ float4 main(const ps_in v) : SV_TARGET index_cb = create_buffer(device, D3D10_BIND_CONSTANT_BUFFER, sizeof(index), NULL);
hr = ID3D10Device_CreatePixelShader(device, ps_code, sizeof(ps_code), &ps); - ok(SUCCEEDED(hr), "Failed to create pixel shader, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create pixel shader, hr %#lx.\n", hr);
ID3D10Device_VSSetConstantBuffers(device, 0, 1, &index_cb); ID3D10Device_VSSetConstantBuffers(device, 1, 1, &colors_cb); @@ -10678,7 +10678,7 @@ float4 main(const ps_in v) : SV_TARGET draw_quad_vs(&test_context, vs_code, sizeof(vs_code)); color = get_texture_color(test_context.backbuffer, 319, 239); ok(compare_color(color, test_data[i].expected, 1), - "Got unexpected color 0x%08x for index %d.\n", color, test_data[i].index); + "Got unexpected color 0x%08lx for index %d.\n", color, test_data[i].index); }
ID3D10Buffer_Release(index_cb); @@ -10773,7 +10773,7 @@ static void test_vs_input_relative_addressing(void)
hr = ID3D10Device_CreateInputLayout(device, layout_desc, ARRAY_SIZE(layout_desc), vs_code, sizeof(vs_code), &test_context.input_layout); - ok(SUCCEEDED(hr), "Failed to create input layout, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create input layout, hr %#lx.\n", hr);
cb = create_buffer(device, D3D10_BIND_CONSTANT_BUFFER, sizeof(index), NULL); ID3D10Device_VSSetConstantBuffers(device, 0, 1, &cb); @@ -10784,7 +10784,7 @@ static void test_vs_input_relative_addressing(void) ID3D10Device_IASetVertexBuffers(device, 1, 1, &vb, &stride, &offset);
hr = ID3D10Device_CreatePixelShader(device, ps_code, sizeof(ps_code), &ps); - ok(SUCCEEDED(hr), "Failed to create pixel shader, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create pixel shader, hr %#lx.\n", hr); ID3D10Device_PSSetShader(device, ps);
for (i = 0; i < ARRAY_SIZE(colors); ++i) @@ -10836,17 +10836,17 @@ static void test_swapchain_formats(void) swapchain_desc.Flags = 0;
hr = ID3D10Device_QueryInterface(device, &IID_IDXGIDevice, (void **)&dxgi_device); - ok(SUCCEEDED(hr), "Failed to query IDXGIDevice, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to query IDXGIDevice, hr %#lx.\n", hr); hr = IDXGIDevice_GetAdapter(dxgi_device, &adapter); - ok(SUCCEEDED(hr), "GetAdapter failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "GetAdapter failed, hr %#lx.\n", hr); IDXGIDevice_Release(dxgi_device); hr = IDXGIAdapter_GetParent(adapter, &IID_IDXGIFactory, (void **)&factory); - ok(SUCCEEDED(hr), "GetParent failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "GetParent failed, hr %#lx.\n", hr); IDXGIAdapter_Release(adapter);
swapchain_desc.BufferDesc.Format = DXGI_FORMAT_R8G8B8A8_TYPELESS; hr = IDXGIFactory_CreateSwapChain(factory, (IUnknown *)device, &swapchain_desc, &swapchain); - todo_wine ok(hr == E_INVALIDARG, "Got unexpected hr %#x for typeless format.\n", hr); + todo_wine ok(hr == E_INVALIDARG, "Got unexpected hr %#lx for typeless format.\n", hr); if (SUCCEEDED(hr)) IDXGISwapChain_Release(swapchain);
@@ -10857,15 +10857,15 @@ static void test_swapchain_formats(void)
swapchain_desc.BufferDesc.Format = display_format_support[i].format; hr = IDXGIFactory_CreateSwapChain(factory, (IUnknown *)device, &swapchain_desc, &swapchain); - ok(hr == S_OK, "Got unexpected hr %#x for format %#x.\n", hr, display_format_support[i].format); + ok(hr == S_OK, "Got unexpected hr %#lx for format %#x.\n", hr, display_format_support[i].format); refcount = IDXGISwapChain_Release(swapchain); - ok(!refcount, "Swapchain has %u references left.\n", refcount); + ok(!refcount, "Swapchain has %lu references left.\n", refcount); }
refcount = ID3D10Device_Release(device); - ok(!refcount, "Device has %u references left.\n", refcount); + ok(!refcount, "Device has %lu references left.\n", refcount); refcount = IDXGIFactory_Release(factory); - ok(!refcount, "Factory has %u references left.\n", refcount); + ok(!refcount, "Factory has %lu references left.\n", refcount); DestroyWindow(swapchain_desc.OutputWindow); }
@@ -10886,14 +10886,14 @@ static void test_swapchain_views(void) device = test_context.device;
refcount = get_refcount(test_context.backbuffer); - ok(refcount == 1, "Got refcount %u.\n", refcount); + ok(refcount == 1, "Got refcount %lu.\n", refcount);
rtv_desc.Format = DXGI_FORMAT_R8G8B8A8_UNORM_SRGB; rtv_desc.ViewDimension = D3D10_RTV_DIMENSION_TEXTURE2D; U(rtv_desc).Texture2D.MipSlice = 0; hr = ID3D10Device_CreateRenderTargetView(device, (ID3D10Resource *)test_context.backbuffer, &rtv_desc, &rtv); /* This seems to work only on Windows 7. */ - ok(hr == S_OK || broken(hr == E_INVALIDARG), "Failed to create render target view, hr %#x.\n", hr); + ok(hr == S_OK || broken(hr == E_INVALIDARG), "Failed to create render target view, hr %#lx.\n", hr); if (SUCCEEDED(hr)) ID3D10RenderTargetView_Release(rtv);
@@ -10902,7 +10902,7 @@ static void test_swapchain_views(void) U(srv_desc).Texture2D.MostDetailedMip = 0; U(srv_desc).Texture2D.MipLevels = 1; hr = ID3D10Device_CreateShaderResourceView(device, (ID3D10Resource *)test_context.backbuffer, &srv_desc, &srv); - ok(hr == E_INVALIDARG, "Got unexpected hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Got unexpected hr %#lx.\n", hr); if (SUCCEEDED(hr)) ID3D10ShaderResourceView_Release(srv);
@@ -11009,18 +11009,18 @@ static void test_swapchain_flip(void) swapchain = create_swapchain(device, window, &desc);
hr = IDXGISwapChain_GetBuffer(swapchain, 0, &IID_ID3D10Texture2D, (void **)&backbuffer_0); - ok(SUCCEEDED(hr), "Failed to get buffer, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get buffer, hr %#lx.\n", hr); hr = IDXGISwapChain_GetBuffer(swapchain, 1, &IID_ID3D10Texture2D, (void **)&backbuffer_1); - ok(SUCCEEDED(hr), "Failed to get buffer, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get buffer, hr %#lx.\n", hr); hr = IDXGISwapChain_GetBuffer(swapchain, 2, &IID_ID3D10Texture2D, (void **)&backbuffer_2); - ok(SUCCEEDED(hr), "Failed to get buffer, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get buffer, hr %#lx.\n", hr);
hr = ID3D10Device_CreateRenderTargetView(device, (ID3D10Resource *)backbuffer_0, NULL, &backbuffer_0_rtv); - ok(SUCCEEDED(hr), "Failed to create rendertarget view, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create rendertarget view, hr %#lx.\n", hr); hr = ID3D10Device_CreateShaderResourceView(device, (ID3D10Resource *)backbuffer_0, NULL, &backbuffer_0_srv); - ok(SUCCEEDED(hr), "Failed to create shader resource view, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create shader resource view, hr %#lx.\n", hr); hr = ID3D10Device_CreateShaderResourceView(device, (ID3D10Resource *)backbuffer_1, NULL, &backbuffer_1_srv); - ok(SUCCEEDED(hr), "Failed to create shader resource view, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create shader resource view, hr %#lx.\n", hr);
ID3D10Texture2D_GetDesc(backbuffer_0, &texture_desc); ok((texture_desc.BindFlags & (D3D10_BIND_RENDER_TARGET | D3D10_BIND_SHADER_RESOURCE)) @@ -11035,7 +11035,7 @@ static void test_swapchain_flip(void) ok(texture_desc.Usage == D3D10_USAGE_DEFAULT, "Got unexpected usage %u.\n", texture_desc.Usage);
hr = ID3D10Device_CreateRenderTargetView(device, (ID3D10Resource *)backbuffer_1, NULL, &offscreen_rtv); - todo_wine ok(hr == E_INVALIDARG, "Got unexpected hr %#x.\n", hr); + todo_wine ok(hr == E_INVALIDARG, "Got unexpected hr %#lx.\n", hr); if (SUCCEEDED(hr)) ID3D10RenderTargetView_Release(offscreen_rtv);
@@ -11054,19 +11054,19 @@ static void test_swapchain_flip(void) texture_desc.CPUAccessFlags = 0; texture_desc.MiscFlags = 0; hr = ID3D10Device_CreateTexture2D(device, &texture_desc, NULL, &offscreen); - ok(SUCCEEDED(hr), "Failed to create a 2d texture, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create a 2d texture, hr %#lx.\n", hr); hr = ID3D10Device_CreateRenderTargetView(device, (ID3D10Resource *)offscreen, NULL, &offscreen_rtv); - ok(SUCCEEDED(hr), "Failed to create rendertarget view, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create rendertarget view, hr %#lx.\n", hr); ID3D10Device_OMSetRenderTargets(device, 1, &offscreen_rtv, NULL); set_viewport(device, 0, 0, 640, 480, 0.0f, 1.0f);
vb = create_buffer(device, D3D10_BIND_VERTEX_BUFFER, sizeof(quad), quad);
hr = ID3D10Device_CreateVertexShader(device, vs_code, sizeof(vs_code), &vs); - ok(SUCCEEDED(hr), "Failed to create vertex shader, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create vertex shader, hr %#lx.\n", hr); hr = ID3D10Device_CreateInputLayout(device, layout_desc, ARRAY_SIZE(layout_desc), vs_code, sizeof(vs_code), &input_layout); - ok(SUCCEEDED(hr), "Failed to create input layout, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create input layout, hr %#lx.\n", hr); ID3D10Device_IASetInputLayout(device, input_layout); ID3D10Device_IASetPrimitiveTopology(device, D3D10_PRIMITIVE_TOPOLOGY_TRIANGLESTRIP); ID3D10Device_VSSetShader(device, vs); @@ -11075,14 +11075,14 @@ static void test_swapchain_flip(void) ID3D10Device_IASetVertexBuffers(device, 0, 1, &vb, &stride, &offset);
hr = ID3D10Device_CreatePixelShader(device, ps_code, sizeof(ps_code), &ps); - ok(SUCCEEDED(hr), "Failed to create pixel shader, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create pixel shader, hr %#lx.\n", hr); ID3D10Device_PSSetShader(device, ps);
ID3D10Device_ClearRenderTargetView(device, backbuffer_0_rtv, red);
ID3D10Device_Draw(device, 4, 0); color = get_texture_color(offscreen, 120, 240); - ok(compare_color(color, 0x7f0000ff, 1), "Got unexpected color 0x%08x.\n", color); + ok(compare_color(color, 0x7f0000ff, 1), "Got unexpected color 0x%08lx.\n", color);
/* DXGI moves buffers in the same direction as earlier versions. Buffer 2 becomes buffer 1, * buffer 1 becomes the new buffer 0, and buffer 0 becomes buffer n - 1. However, only buffer @@ -11099,13 +11099,13 @@ static void test_swapchain_flip(void)
ID3D10Device_Draw(device, 4, 0); color = get_texture_color(offscreen, 120, 240); /* green, buf 0 */ - ok(compare_color(color, 0x7f00ff00, 1), "Got unexpected color 0x%08x.\n", color); + ok(compare_color(color, 0x7f00ff00, 1), "Got unexpected color 0x%08lx.\n", color); /* Buffer 1 is still untouched. */
color = get_texture_color(backbuffer_0, 320, 240); /* green */ - ok(compare_color(color, 0x7f00ff00, 1), "Got unexpected color 0x%08x.\n", color); + ok(compare_color(color, 0x7f00ff00, 1), "Got unexpected color 0x%08lx.\n", color); color = get_texture_color(backbuffer_2, 320, 240); /* red */ - ok(compare_color(color, 0x7f0000ff, 1), "Got unexpected color 0x%08x.\n", color); + ok(compare_color(color, 0x7f0000ff, 1), "Got unexpected color 0x%08lx.\n", color);
IDXGISwapChain_Present(swapchain, 0, 0);
@@ -11113,16 +11113,16 @@ static void test_swapchain_flip(void)
ID3D10Device_Draw(device, 4, 0); color = get_texture_color(offscreen, 120, 240); /* blue, buf 0 */ - ok(compare_color(color, 0x7fff0000, 1), "Got unexpected color 0x%08x.\n", color); + ok(compare_color(color, 0x7fff0000, 1), "Got unexpected color 0x%08lx.\n", color); color = get_texture_color(offscreen, 360, 240); /* red, buf 1 */ - ok(compare_color(color, 0x7f0000ff, 1), "Got unexpected color 0x%08x.\n", color); + ok(compare_color(color, 0x7f0000ff, 1), "Got unexpected color 0x%08lx.\n", color);
color = get_texture_color(backbuffer_0, 320, 240); /* blue */ - ok(compare_color(color, 0x7fff0000, 1), "Got unexpected color 0x%08x.\n", color); + ok(compare_color(color, 0x7fff0000, 1), "Got unexpected color 0x%08lx.\n", color); color = get_texture_color(backbuffer_1, 320, 240); /* red */ - ok(compare_color(color, 0x7f0000ff, 1), "Got unexpected color 0x%08x.\n", color); + ok(compare_color(color, 0x7f0000ff, 1), "Got unexpected color 0x%08lx.\n", color); color = get_texture_color(backbuffer_2, 320, 240); /* green */ - ok(compare_color(color, 0x7f00ff00, 1), "Got unexpected color 0x%08x.\n", color); + ok(compare_color(color, 0x7f00ff00, 1), "Got unexpected color 0x%08lx.\n", color);
ID3D10VertexShader_Release(vs); ID3D10PixelShader_Release(ps); @@ -11139,7 +11139,7 @@ static void test_swapchain_flip(void) IDXGISwapChain_Release(swapchain);
refcount = ID3D10Device_Release(device); - ok(!refcount, "Device has %u references left.\n", refcount); + ok(!refcount, "Device has %lu references left.\n", refcount); DestroyWindow(window); }
@@ -11169,10 +11169,10 @@ static void test_clear_render_target_view_1d(void) texture_desc.CPUAccessFlags = 0; texture_desc.MiscFlags = 0; hr = ID3D10Device_CreateTexture1D(device, &texture_desc, NULL, &texture); - ok(SUCCEEDED(hr), "Failed to create texture, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create texture, hr %#lx.\n", hr);
hr = ID3D10Device_CreateRenderTargetView(device, (ID3D10Resource *)texture, NULL, &rtv); - ok(SUCCEEDED(hr), "Failed to create render target view, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create render target view, hr %#lx.\n", hr);
ID3D10Device_ClearRenderTargetView(device, rtv, color); check_texture1d_color(texture, 0xbf4c7f19, 1); @@ -11220,17 +11220,17 @@ static void test_clear_render_target_view_2d(void) texture_desc.CPUAccessFlags = 0; texture_desc.MiscFlags = 0; hr = ID3D10Device_CreateTexture2D(device, &texture_desc, NULL, &texture); - ok(SUCCEEDED(hr), "Failed to create texture, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create texture, hr %#lx.\n", hr);
texture_desc.Format = DXGI_FORMAT_R8G8B8A8_UNORM_SRGB; hr = ID3D10Device_CreateTexture2D(device, &texture_desc, NULL, &srgb_texture); - ok(SUCCEEDED(hr), "Failed to create texture, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create texture, hr %#lx.\n", hr);
hr = ID3D10Device_CreateRenderTargetView(device, (ID3D10Resource *)texture, NULL, &rtv[0]); - ok(SUCCEEDED(hr), "Failed to create render target view, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create render target view, hr %#lx.\n", hr);
hr = ID3D10Device_CreateRenderTargetView(device, (ID3D10Resource *)srgb_texture, NULL, &srgb_rtv); - ok(SUCCEEDED(hr), "Failed to create render target view, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create render target view, hr %#lx.\n", hr);
ID3D10Device_ClearRenderTargetView(device, test_context.backbuffer_rtv, clear_colour); check_texture_color(test_context.backbuffer, expected_color, 1); @@ -11254,19 +11254,19 @@ static void test_clear_render_target_view_2d(void)
texture_desc.Format = DXGI_FORMAT_R8G8B8A8_TYPELESS; hr = ID3D10Device_CreateTexture2D(device, &texture_desc, NULL, &texture); - ok(SUCCEEDED(hr), "Failed to create texture, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create texture, hr %#lx.\n", hr);
rtv_desc.Format = DXGI_FORMAT_R8G8B8A8_UNORM_SRGB; rtv_desc.ViewDimension = D3D10_RTV_DIMENSION_TEXTURE2D; U(rtv_desc).Texture2D.MipSlice = 0; hr = ID3D10Device_CreateRenderTargetView(device, (ID3D10Resource *)texture, &rtv_desc, &srgb_rtv); - ok(SUCCEEDED(hr), "Failed to create render target view, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create render target view, hr %#lx.\n", hr);
rtv_desc.Format = DXGI_FORMAT_R8G8B8A8_UNORM; rtv_desc.ViewDimension = D3D10_RTV_DIMENSION_TEXTURE2D; U(rtv_desc).Texture2D.MipSlice = 0; hr = ID3D10Device_CreateRenderTargetView(device, (ID3D10Resource *)texture, &rtv_desc, &rtv[0]); - ok(SUCCEEDED(hr), "Failed to create render target view, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create render target view, hr %#lx.\n", hr);
ID3D10Device_ClearRenderTargetView(device, rtv[0], clear_colour); check_texture_color(texture, expected_color, 1); @@ -11281,7 +11281,7 @@ static void test_clear_render_target_view_2d(void) colour = get_readback_color(&rb, 80 + i * 160, 60 + j * 120); ok(compare_color(colour, expected_srgb_color, 1) || broken(compare_color(colour, expected_color, 1) && broken_device), - "Got unexpected colour 0x%08x.\n", colour); + "Got unexpected colour 0x%08lx.\n", colour); } } release_resource_readback(&rb); @@ -11294,24 +11294,24 @@ static void test_clear_render_target_view_2d(void) texture_desc.Height = 16; texture_desc.ArraySize = 5; hr = ID3D10Device_CreateTexture2D(device, &texture_desc, NULL, &texture); - ok(hr == S_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
rtv_desc.ViewDimension = D3D10_RTV_DIMENSION_TEXTURE2DARRAY; U(rtv_desc).Texture2DArray.MipSlice = 0; U(rtv_desc).Texture2DArray.FirstArraySlice = 0; U(rtv_desc).Texture2DArray.ArraySize = 5; hr = ID3D10Device_CreateRenderTargetView(device, (ID3D10Resource *)texture, &rtv_desc, &rtv[0]); - ok(hr == S_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
U(rtv_desc).Texture2DArray.FirstArraySlice = 1; U(rtv_desc).Texture2DArray.ArraySize = 3; hr = ID3D10Device_CreateRenderTargetView(device, (ID3D10Resource *)texture, &rtv_desc, &rtv[1]); - ok(hr == S_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
U(rtv_desc).Texture2DArray.FirstArraySlice = 2; U(rtv_desc).Texture2DArray.ArraySize = 1; hr = ID3D10Device_CreateRenderTargetView(device, (ID3D10Resource *)texture, &rtv_desc, &rtv[2]); - ok(hr == S_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID3D10Device_ClearRenderTargetView(device, rtv[0], blue); ID3D10Device_ClearRenderTargetView(device, rtv[1], green); @@ -11319,27 +11319,27 @@ static void test_clear_render_target_view_2d(void)
get_texture_readback(texture, 0, &rb); colour = get_readback_color(&rb, 8, 8); - ok(compare_color(colour, 0x80ff0000, 1), "Got unexpected colour 0x%08x.\n", colour); + ok(compare_color(colour, 0x80ff0000, 1), "Got unexpected colour 0x%08lx.\n", colour); release_resource_readback(&rb);
get_texture_readback(texture, 1, &rb); colour = get_readback_color(&rb, 8, 8); - ok(compare_color(colour, 0x8000ff00, 1), "Got unexpected colour 0x%08x.\n", colour); + ok(compare_color(colour, 0x8000ff00, 1), "Got unexpected colour 0x%08lx.\n", colour); release_resource_readback(&rb);
get_texture_readback(texture, 2, &rb); colour = get_readback_color(&rb, 8, 8); - ok(compare_color(colour, 0xbf4c7f19, 1), "Got unexpected colour 0x%08x.\n", colour); + ok(compare_color(colour, 0xbf4c7f19, 1), "Got unexpected colour 0x%08lx.\n", colour); release_resource_readback(&rb);
get_texture_readback(texture, 3, &rb); colour = get_readback_color(&rb, 8, 8); - ok(compare_color(colour, 0x8000ff00, 1), "Got unexpected colour 0x%08x.\n", colour); + ok(compare_color(colour, 0x8000ff00, 1), "Got unexpected colour 0x%08lx.\n", colour); release_resource_readback(&rb);
get_texture_readback(texture, 4, &rb); colour = get_readback_color(&rb, 8, 8); - ok(compare_color(colour, 0x80ff0000, 1), "Got unexpected colour 0x%08x.\n", colour); + ok(compare_color(colour, 0x80ff0000, 1), "Got unexpected colour 0x%08lx.\n", colour); release_resource_readback(&rb);
ID3D10RenderTargetView_Release(rtv[2]); @@ -11377,10 +11377,10 @@ static void test_clear_depth_stencil_view(void) texture_desc.CPUAccessFlags = 0; texture_desc.MiscFlags = 0; hr = ID3D10Device_CreateTexture2D(device, &texture_desc, NULL, &depth_texture); - ok(SUCCEEDED(hr), "Failed to create depth texture, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create depth texture, hr %#lx.\n", hr);
hr = ID3D10Device_CreateDepthStencilView(device, (ID3D10Resource *)depth_texture, NULL, &dsv); - ok(SUCCEEDED(hr), "Failed to create depth stencil view, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create depth stencil view, hr %#lx.\n", hr);
ID3D10Device_ClearDepthStencilView(device, dsv, D3D10_CLEAR_DEPTH, 1.0f, 0); check_texture_float(depth_texture, 1.0f, 0); @@ -11393,10 +11393,10 @@ static void test_clear_depth_stencil_view(void)
texture_desc.Format = DXGI_FORMAT_D24_UNORM_S8_UINT; hr = ID3D10Device_CreateTexture2D(device, &texture_desc, NULL, &depth_texture); - ok(SUCCEEDED(hr), "Failed to create depth texture, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create depth texture, hr %#lx.\n", hr);
hr = ID3D10Device_CreateDepthStencilView(device, (ID3D10Resource *)depth_texture, NULL, &dsv); - ok(SUCCEEDED(hr), "Failed to create depth stencil view, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create depth stencil view, hr %#lx.\n", hr);
ID3D10Device_ClearDepthStencilView(device, dsv, D3D10_CLEAR_DEPTH | D3D10_CLEAR_STENCIL, 1.0f, 0); todo_wine check_texture_color(depth_texture, 0x00ffffff, 0); @@ -11426,7 +11426,7 @@ static void test_clear_depth_stencil_view(void) ID3D10DepthStencilView_Release(dsv);
refcount = ID3D10Device_Release(device); - ok(!refcount, "Device has %u references left.\n", refcount); + ok(!refcount, "Device has %lu references left.\n", refcount); }
static void test_initial_depth_stencil_state(void) @@ -11451,10 +11451,10 @@ static void test_initial_depth_stencil_state(void) texture_desc.Format = DXGI_FORMAT_D32_FLOAT; texture_desc.BindFlags = D3D10_BIND_DEPTH_STENCIL; hr = ID3D10Device_CreateTexture2D(device, &texture_desc, NULL, &texture); - ok(SUCCEEDED(hr), "Failed to create texture, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create texture, hr %#lx.\n", hr);
hr = ID3D10Device_CreateDepthStencilView(device, (ID3D10Resource *)texture, NULL, &dsv); - ok(SUCCEEDED(hr), "Failed to create depth stencil view, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create depth stencil view, hr %#lx.\n", hr);
ID3D10Device_OMSetRenderTargets(device, 1, &test_context.backbuffer_rtv, dsv);
@@ -11536,15 +11536,15 @@ static void test_draw_depth_only(void) texture_desc.Format = DXGI_FORMAT_D32_FLOAT; texture_desc.BindFlags = D3D10_BIND_DEPTH_STENCIL; hr = ID3D10Device_CreateTexture2D(device, &texture_desc, NULL, &texture); - ok(SUCCEEDED(hr), "Failed to create texture, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create texture, hr %#lx.\n", hr);
hr = ID3D10Device_CreateDepthStencilView(device, (ID3D10Resource *)texture, NULL, &dsv); - ok(SUCCEEDED(hr), "Failed to create depth stencil view, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create depth stencil view, hr %#lx.\n", hr);
hr = ID3D10Device_CreatePixelShader(device, ps_color_code, sizeof(ps_color_code), &ps_color); - ok(SUCCEEDED(hr), "Failed to create pixel shader, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create pixel shader, hr %#lx.\n", hr); hr = ID3D10Device_CreatePixelShader(device, ps_depth_code, sizeof(ps_depth_code), &ps_depth); - ok(SUCCEEDED(hr), "Failed to create pixel shader, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create pixel shader, hr %#lx.\n", hr);
ID3D10Device_PSSetConstantBuffers(device, 0, 1, &cb); ID3D10Device_PSSetShader(device, ps_color); @@ -11700,17 +11700,17 @@ static void test_shader_stage_input_output_matching(void) device = test_context.device;
hr = ID3D10Device_CreateVertexShader(device, vs_code, sizeof(vs_code), &vs); - ok(SUCCEEDED(hr), "Failed to create vertex shader, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create vertex shader, hr %#lx.\n", hr); hr = ID3D10Device_CreatePixelShader(device, ps_code, sizeof(ps_code), &ps); - ok(SUCCEEDED(hr), "Failed to create pixel shader, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create pixel shader, hr %#lx.\n", hr);
ID3D10Texture2D_GetDesc(test_context.backbuffer, &texture_desc); hr = ID3D10Device_CreateTexture2D(device, &texture_desc, NULL, &render_target); - ok(SUCCEEDED(hr), "Failed to create texture, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create texture, hr %#lx.\n", hr);
rtv[0] = test_context.backbuffer_rtv; hr = ID3D10Device_CreateRenderTargetView(device, (ID3D10Resource *)render_target, NULL, &rtv[1]); - ok(SUCCEEDED(hr), "Failed to create render target view, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create render target view, hr %#lx.\n", hr);
ID3D10Device_VSSetShader(device, vs); ID3D10Device_PSSetShader(device, ps); @@ -11908,19 +11908,19 @@ static void test_shader_interstage_interface(void) device = test_context.device;
hr = ID3D10Device_CreateVertexShader(device, vs_code, sizeof(vs_code), &vs); - ok(SUCCEEDED(hr), "Failed to create vertex shader, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create vertex shader, hr %#lx.\n", hr);
ID3D10Texture2D_GetDesc(test_context.backbuffer, &texture_desc); texture_desc.Format = DXGI_FORMAT_R32G32B32A32_FLOAT; hr = ID3D10Device_CreateTexture2D(device, &texture_desc, NULL, &render_target); - ok(SUCCEEDED(hr), "Failed to create texture, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create texture, hr %#lx.\n", hr);
hr = ID3D10Device_CreateRenderTargetView(device, (ID3D10Resource *)render_target, NULL, &rtv); - ok(SUCCEEDED(hr), "Failed to create render target view, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create render target view, hr %#lx.\n", hr);
hr = ID3D10Device_CreateInputLayout(device, layout_desc, ARRAY_SIZE(layout_desc), vs_code, sizeof(vs_code), &input_layout); - ok(SUCCEEDED(hr), "Failed to create input layout, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create input layout, hr %#lx.\n", hr);
vb = create_buffer(device, D3D10_BIND_VERTEX_BUFFER, sizeof(quad), quad);
@@ -11938,7 +11938,7 @@ static void test_shader_interstage_interface(void) for (i = 0; i < ARRAY_SIZE(tests); ++i) { hr = ID3D10Device_CreatePixelShader(device, tests[i].ps_code, tests[i].ps_size, &ps); - ok(hr == S_OK, "Failed to create pixel shader, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create pixel shader, hr %#lx.\n", hr); ID3D10Device_PSSetShader(device, ps); ID3D10Device_Draw(device, 4, 0); check_texture_vec4(render_target, &tests[i].expected_result, 0); @@ -12019,9 +12019,9 @@ static void test_sm4_if_instruction(void) device = test_context.device;
hr = ID3D10Device_CreatePixelShader(device, ps_if_nz_code, sizeof(ps_if_nz_code), &ps_if_nz); - ok(SUCCEEDED(hr), "Failed to create if_nz pixel shader, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create if_nz pixel shader, hr %#lx.\n", hr); hr = ID3D10Device_CreatePixelShader(device, ps_if_z_code, sizeof(ps_if_z_code), &ps_if_z); - ok(SUCCEEDED(hr), "Failed to create if_z pixel shader, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create if_z pixel shader, hr %#lx.\n", hr);
cb = create_buffer(device, D3D10_BIND_CONSTANT_BUFFER, sizeof(bits), NULL); ID3D10Device_PSSetConstantBuffers(device, 0, 1, &cb); @@ -12123,14 +12123,14 @@ static void test_sm4_breakc_instruction(void) device = test_context.device;
hr = ID3D10Device_CreatePixelShader(device, ps_breakc_nz_code, sizeof(ps_breakc_nz_code), &ps); - ok(SUCCEEDED(hr), "Failed to create breakc_nz pixel shader, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create breakc_nz pixel shader, hr %#lx.\n", hr); ID3D10Device_PSSetShader(device, ps); draw_quad(&test_context); check_texture_color(test_context.backbuffer, 0xff00ff00, 0); ID3D10PixelShader_Release(ps);
hr = ID3D10Device_CreatePixelShader(device, ps_breakc_z_code, sizeof(ps_breakc_z_code), &ps); - ok(SUCCEEDED(hr), "Failed to create breakc_z pixel shader, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create breakc_z pixel shader, hr %#lx.\n", hr); ID3D10Device_PSSetShader(device, ps); draw_quad(&test_context); check_texture_color(test_context.backbuffer, 0xff00ff00, 0); @@ -12237,14 +12237,14 @@ static void test_sm4_continuec_instruction(void) device = test_context.device;
hr = ID3D10Device_CreatePixelShader(device, ps_continuec_nz_code, sizeof(ps_continuec_nz_code), &ps); - ok(SUCCEEDED(hr), "Failed to create continuec_nz pixel shader, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create continuec_nz pixel shader, hr %#lx.\n", hr); ID3D10Device_PSSetShader(device, ps); draw_quad(&test_context); check_texture_color(test_context.backbuffer, 0xff00ff00, 0); ID3D10PixelShader_Release(ps);
hr = ID3D10Device_CreatePixelShader(device, ps_continuec_z_code, sizeof(ps_continuec_z_code), &ps); - ok(SUCCEEDED(hr), "Failed to create continuec_z pixel shader, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create continuec_z pixel shader, hr %#lx.\n", hr); ID3D10Device_PSSetShader(device, ps); draw_quad(&test_context); check_texture_color(test_context.backbuffer, 0xff00ff00, 0); @@ -12320,9 +12320,9 @@ static void test_sm4_discard_instruction(void) ID3D10Device_PSSetConstantBuffers(device, 0, 1, &cb);
hr = ID3D10Device_CreatePixelShader(device, ps_discard_nz_code, sizeof(ps_discard_nz_code), &ps_discard_nz); - ok(SUCCEEDED(hr), "Failed to create discard_nz pixel shader, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create discard_nz pixel shader, hr %#lx.\n", hr); hr = ID3D10Device_CreatePixelShader(device, ps_discard_z_code, sizeof(ps_discard_z_code), &ps_discard_z); - ok(SUCCEEDED(hr), "Failed to create discard_z pixel shader, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create discard_z pixel shader, hr %#lx.\n", hr);
for (i = 0; i < ARRAY_SIZE(values); ++i) { @@ -12404,16 +12404,16 @@ static void test_create_input_layout(void) layout_desc->Format = vertex_formats[i]; hr = ID3D10Device_CreateInputLayout(device, layout_desc, ARRAY_SIZE(layout_desc), vs_code, sizeof(vs_code), &input_layout); - ok(SUCCEEDED(hr), "Failed to create input layout for format %#x, hr %#x.\n", + ok(SUCCEEDED(hr), "Failed to create input layout for format %#x, hr %#lx.\n", vertex_formats[i], hr); refcount = get_refcount(device); - ok(refcount >= expected_refcount, "Got refcount %u, expected >= %u.\n", + ok(refcount >= expected_refcount, "Got refcount %lu, expected >= %lu.\n", refcount, expected_refcount); ID3D10InputLayout_Release(input_layout); }
refcount = ID3D10Device_Release(device); - ok(!refcount, "Device has %u references left.\n", refcount); + ok(!refcount, "Device has %lu references left.\n", refcount); }
static void test_input_layout_alignment(void) @@ -12499,13 +12499,13 @@ static void test_input_layout_alignment(void) for (i = 0; i < ARRAY_SIZE(test_data); ++i) { hr = ID3D10Device_CreateInputLayout(device, test_data[i].elements, 2, vs_code, sizeof(vs_code), &layout); - ok(hr == test_data[i].hr, "Test %u: Got unexpected hr %#x, expected %#x.\n", i, hr, test_data[i].hr); + ok(hr == test_data[i].hr, "Test %u: Got unexpected hr %#lx, expected %#lx.\n", i, hr, test_data[i].hr); if (SUCCEEDED(hr)) ID3D10InputLayout_Release(layout); }
refcount = ID3D10Device_Release(device); - ok(!refcount, "Device has %u references left.\n", refcount); + ok(!refcount, "Device has %lu references left.\n", refcount); }
static void test_input_assembler(void) @@ -12745,14 +12745,14 @@ static void test_input_assembler(void) device = test_context.device;
hr = ID3D10Device_CreatePixelShader(device, ps_code, sizeof(ps_code), &ps); - ok(SUCCEEDED(hr), "Failed to create pixel shader, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create pixel shader, hr %#lx.\n", hr);
hr = ID3D10Device_CreateVertexShader(device, vs_float_code, sizeof(vs_float_code), &vs_float); - ok(SUCCEEDED(hr), "Failed to create float vertex shader, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create float vertex shader, hr %#lx.\n", hr); hr = ID3D10Device_CreateVertexShader(device, vs_uint_code, sizeof(vs_uint_code), &vs_uint); - ok(SUCCEEDED(hr), "Failed to create uint vertex shader, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create uint vertex shader, hr %#lx.\n", hr); hr = ID3D10Device_CreateVertexShader(device, vs_sint_code, sizeof(vs_sint_code), &vs_sint); - ok(SUCCEEDED(hr), "Failed to create sint vertex shader, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create sint vertex shader, hr %#lx.\n", hr);
for (i = 0; i < LAYOUT_COUNT; ++i) { @@ -12761,7 +12761,7 @@ static void test_input_assembler(void) hr = ID3D10Device_CreateInputLayout(device, input_layout_desc, ARRAY_SIZE(input_layout_desc), vs_float_code, sizeof(vs_float_code), &input_layout[i]); todo_wine_if(input_layout_desc[1].Format == DXGI_FORMAT_R10G10B10A2_UINT) - ok(SUCCEEDED(hr), "Failed to create input layout for format %#x, hr %#x.\n", layout_formats[i], hr); + ok(SUCCEEDED(hr), "Failed to create input layout for format %#x, hr %#lx.\n", layout_formats[i], hr); }
vb_position = create_buffer(device, D3D10_BIND_VERTEX_BUFFER, sizeof(quad), quad); @@ -12780,10 +12780,10 @@ static void test_input_assembler(void) texture_desc.MiscFlags = 0;
hr = ID3D10Device_CreateTexture2D(device, &texture_desc, NULL, &render_target); - ok(SUCCEEDED(hr), "Failed to create 2d texture, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create 2d texture, hr %#lx.\n", hr);
hr = ID3D10Device_CreateRenderTargetView(device, (ID3D10Resource *)render_target, NULL, &rtv); - ok(SUCCEEDED(hr), "Failed to create rendertarget view, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create rendertarget view, hr %#lx.\n", hr);
ID3D10Device_IASetPrimitiveTopology(device, D3D10_PRIMITIVE_TOPOLOGY_TRIANGLESTRIP); offset = 0; @@ -12902,7 +12902,7 @@ static void test_null_sampler(void) device = test_context.device;
hr = ID3D10Device_CreatePixelShader(device, ps_code, sizeof(ps_code), &ps); - ok(SUCCEEDED(hr), "Failed to create pixel shader, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create pixel shader, hr %#lx.\n", hr);
texture_desc.Width = 64; texture_desc.Height = 64; @@ -12917,13 +12917,13 @@ static void test_null_sampler(void) texture_desc.MiscFlags = 0;
hr = ID3D10Device_CreateTexture2D(device, &texture_desc, NULL, &texture); - ok(SUCCEEDED(hr), "Failed to create texture, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create texture, hr %#lx.\n", hr);
hr = ID3D10Device_CreateRenderTargetView(device, (ID3D10Resource *)texture, NULL, &rtv); - ok(SUCCEEDED(hr), "Failed to create render target view, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create render target view, hr %#lx.\n", hr);
hr = ID3D10Device_CreateShaderResourceView(device, (ID3D10Resource *)texture, NULL, &srv); - ok(SUCCEEDED(hr), "Failed to create shader resource view, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create shader resource view, hr %#lx.\n", hr);
ID3D10Device_ClearRenderTargetView(device, rtv, blue);
@@ -13009,7 +13009,7 @@ static void test_immediate_constant_buffer(void) device = test_context.device;
hr = ID3D10Device_CreatePixelShader(device, ps_code, sizeof(ps_code), &ps); - ok(SUCCEEDED(hr), "Failed to create pixel shader, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create pixel shader, hr %#lx.\n", hr); ID3D10Device_PSSetShader(device, ps);
cb = create_buffer(device, D3D10_BIND_CONSTANT_BUFFER, sizeof(index), NULL); @@ -13018,10 +13018,10 @@ static void test_immediate_constant_buffer(void) ID3D10Texture2D_GetDesc(test_context.backbuffer, &texture_desc); texture_desc.Format = DXGI_FORMAT_R32G32B32A32_FLOAT; hr = ID3D10Device_CreateTexture2D(device, &texture_desc, NULL, &texture); - ok(SUCCEEDED(hr), "Failed to create texture, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create texture, hr %#lx.\n", hr);
hr = ID3D10Device_CreateRenderTargetView(device, (ID3D10Resource *)texture, NULL, &rtv); - ok(SUCCEEDED(hr), "Failed to create render target view, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create render target view, hr %#lx.\n", hr); ID3D10Device_OMSetRenderTargets(device, 1, &rtv, NULL);
for (i = 0; i < ARRAY_SIZE(expected_result); ++i) @@ -13073,16 +13073,16 @@ static void test_fp_specials(void) device = test_context.device;
hr = ID3D10Device_CreatePixelShader(device, ps_code, sizeof(ps_code), &ps); - ok(SUCCEEDED(hr), "Failed to create pixel shader, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create pixel shader, hr %#lx.\n", hr); ID3D10Device_PSSetShader(device, ps);
ID3D10Texture2D_GetDesc(test_context.backbuffer, &texture_desc); texture_desc.Format = DXGI_FORMAT_R32G32B32A32_FLOAT; hr = ID3D10Device_CreateTexture2D(device, &texture_desc, NULL, &texture); - ok(SUCCEEDED(hr), "Failed to create texture, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create texture, hr %#lx.\n", hr);
hr = ID3D10Device_CreateRenderTargetView(device, (ID3D10Resource *)texture, NULL, &rtv); - ok(SUCCEEDED(hr), "Failed to create render target view, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create render target view, hr %#lx.\n", hr);
ID3D10Device_OMSetRenderTargets(device, 1, &rtv, NULL);
@@ -13184,17 +13184,17 @@ static void test_uint_shader_instructions(void) ID3D10Texture2D_GetDesc(test_context.backbuffer, &texture_desc); texture_desc.Format = DXGI_FORMAT_R32G32B32A32_UINT; hr = ID3D10Device_CreateTexture2D(device, &texture_desc, NULL, &texture); - ok(SUCCEEDED(hr), "Failed to create texture, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create texture, hr %#lx.\n", hr);
hr = ID3D10Device_CreateRenderTargetView(device, (ID3D10Resource *)texture, NULL, &rtv); - ok(SUCCEEDED(hr), "Failed to create render target view, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create render target view, hr %#lx.\n", hr);
ID3D10Device_OMSetRenderTargets(device, 1, &rtv, NULL);
for (i = 0; i < ARRAY_SIZE(tests); ++i) { hr = ID3D10Device_CreatePixelShader(device, tests[i].ps->code, tests[i].ps->size, &ps); - ok(SUCCEEDED(hr), "Failed to create pixel shader, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create pixel shader, hr %#lx.\n", hr); ID3D10Device_PSSetShader(device, ps);
ID3D10Device_UpdateSubresource(device, (ID3D10Resource *)cb, 0, NULL, tests[i].bits, 0, 0); @@ -13330,14 +13330,14 @@ static void test_index_buffer_offset(void)
hr = ID3D10Device_CreateInputLayout(device, input_desc, ARRAY_SIZE(input_desc), vs_code, sizeof(vs_code), &input_layout); - ok(SUCCEEDED(hr), "Failed to create input layout, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create input layout, hr %#lx.\n", hr);
hr = ID3D10Device_CreateGeometryShaderWithStreamOutput(device, gs_code, sizeof(gs_code), so_declaration, ARRAY_SIZE(so_declaration), 32, &gs); - ok(SUCCEEDED(hr), "Failed to create geometry shader with stream output, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create geometry shader with stream output, hr %#lx.\n", hr);
hr = ID3D10Device_CreateVertexShader(device, vs_code, sizeof(vs_code), &vs); - ok(SUCCEEDED(hr), "Failed to create vertex shader, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create vertex shader, hr %#lx.\n", hr);
vb = create_buffer(device, D3D10_BIND_VERTEX_BUFFER, sizeof(vertices), vertices); ib = create_buffer(device, D3D10_BIND_INDEX_BUFFER, sizeof(indices), indices); @@ -13472,7 +13472,7 @@ static void test_face_culling(void) rasterizer_desc.CullMode = tests[i].cull_mode; rasterizer_desc.FrontCounterClockwise = tests[i].front_ccw; hr = ID3D10Device_CreateRasterizerState(device, &rasterizer_desc, &state); - ok(SUCCEEDED(hr), "Test %u: Failed to create rasterizer state, hr %#x.\n", i, hr); + ok(SUCCEEDED(hr), "Test %u: Failed to create rasterizer state, hr %#lx.\n", i, hr);
ID3D10Device_RSSetState(device, state);
@@ -13494,12 +13494,12 @@ static void test_face_culling(void) /* Test SV_IsFrontFace. */ ID3D10PixelShader_Release(test_context.ps); hr = ID3D10Device_CreatePixelShader(device, ps_code, sizeof(ps_code), &test_context.ps); - ok(SUCCEEDED(hr), "Failed to create pixel shader, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create pixel shader, hr %#lx.\n", hr);
rasterizer_desc.CullMode = D3D10_CULL_NONE; rasterizer_desc.FrontCounterClockwise = FALSE; hr = ID3D10Device_CreateRasterizerState(device, &rasterizer_desc, &state); - ok(SUCCEEDED(hr), "Failed to create rasterizer state, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create rasterizer state, hr %#lx.\n", hr); ID3D10Device_RSSetState(device, state);
test_context.vb = cw_vb; @@ -13519,7 +13519,7 @@ static void test_face_culling(void) rasterizer_desc.CullMode = D3D10_CULL_NONE; rasterizer_desc.FrontCounterClockwise = TRUE; hr = ID3D10Device_CreateRasterizerState(device, &rasterizer_desc, &state); - ok(SUCCEEDED(hr), "Failed to create rasterizer state, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create rasterizer state, hr %#lx.\n", hr); ID3D10Device_RSSetState(device, state);
test_context.vb = cw_vb; @@ -13571,7 +13571,7 @@ static void test_line_antialiasing_blending(void) blend_desc.RenderTargetWriteMask[0] = D3D10_COLOR_WRITE_ENABLE_ALL;
hr = ID3D10Device_CreateBlendState(device, &blend_desc, &blend_state); - ok(SUCCEEDED(hr), "Failed to create blend state, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create blend state, hr %#lx.\n", hr); ID3D10Device_OMSetBlendState(device, blend_state, NULL, D3D10_DEFAULT_SAMPLE_MASK);
ID3D10Device_ClearRenderTargetView(device, test_context.backbuffer_rtv, &red.x); @@ -13605,7 +13605,7 @@ static void test_line_antialiasing_blending(void) rasterizer_desc.AntialiasedLineEnable = TRUE;
hr = ID3D10Device_CreateRasterizerState(device, &rasterizer_desc, &rasterizer_state); - ok(SUCCEEDED(hr), "Failed to create rasterizer state, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create rasterizer state, hr %#lx.\n", hr); ID3D10Device_RSSetState(device, rasterizer_state);
ID3D10Device_ClearRenderTargetView(device, test_context.backbuffer_rtv, &red.x); @@ -13673,7 +13673,7 @@ static void test_format_support(void)
support = 0xdeadbeef; hr = ID3D10Device_CheckFormatSupport(device, ~0u, &support); - ok(hr == E_FAIL, "Got unexpected hr %#x.\n", hr); + ok(hr == E_FAIL, "Got unexpected hr %#lx.\n", hr); ok(!support, "Got unexpected format support %#x.\n", support);
memset(format_support, 0, sizeof(format_support)); @@ -13681,7 +13681,7 @@ static void test_format_support(void) { hr = ID3D10Device_CheckFormatSupport(device, format, &format_support[format]); ok(hr == S_OK || (hr == E_FAIL && !format_support[format]), - "Got unexpected result for format %#x: hr %#x, format_support %#x.\n", + "Got unexpected result for format %#x: hr %#lx, format_support %#x.\n", format, hr, format_support[format]); }
@@ -13711,7 +13711,7 @@ static void test_format_support(void) D3D10_FORMAT_SUPPORT_DISPLAY, "display");
refcount = ID3D10Device_Release(device); - ok(!refcount, "Device has %u references left.\n", refcount); + ok(!refcount, "Device has %lu references left.\n", refcount); }
static void test_ddy(void) @@ -13807,19 +13807,19 @@ float4 main(struct ps_data ps_input) : SV_Target
ID3D10Texture2D_GetDesc(test_context.backbuffer, &texture_desc); hr = ID3D10Device_CreateTexture2D(device, &texture_desc, NULL, &texture); - ok(SUCCEEDED(hr), "Failed to create texture, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create texture, hr %#lx.\n", hr);
hr = ID3D10Device_CreateRenderTargetView(device, (ID3D10Resource *)texture, NULL, &rtv); - ok(SUCCEEDED(hr), "Failed to create render target view, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create render target view, hr %#lx.\n", hr);
hr = ID3D10Device_CreateInputLayout(device, layout_desc, ARRAY_SIZE(layout_desc), vs_code, sizeof(vs_code), &input_layout); - ok(SUCCEEDED(hr), "Failed to create input layout, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create input layout, hr %#lx.\n", hr);
vb = create_buffer(device, D3D10_BIND_VERTEX_BUFFER, sizeof(quad), quad);
hr = ID3D10Device_CreateVertexShader(device, vs_code, sizeof(vs_code), &vs); - ok(SUCCEEDED(hr), "Failed to create vertex shader, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create vertex shader, hr %#lx.\n", hr);
ID3D10Device_IASetInputLayout(device, input_layout); ID3D10Device_IASetPrimitiveTopology(device, D3D10_PRIMITIVE_TOPOLOGY_TRIANGLESTRIP); @@ -13829,7 +13829,7 @@ float4 main(struct ps_data ps_input) : SV_Target ID3D10Device_VSSetShader(device, vs);
hr = ID3D10Device_CreatePixelShader(device, ps_code, sizeof(ps_code), &ps); - ok(SUCCEEDED(hr), "Failed to create pixel shader, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create pixel shader, hr %#lx.\n", hr);
ID3D10Device_PSSetShader(device, ps);
@@ -13839,15 +13839,15 @@ float4 main(struct ps_data ps_input) : SV_Target
get_texture_readback(texture, 0, &rb); color = get_readback_color(&rb, 320, 190); - ok(compare_color(color, 0x7fff007f, 1), "Got unexpected color 0x%08x.\n", color); + ok(compare_color(color, 0x7fff007f, 1), "Got unexpected color 0x%08lx.\n", color); color = get_readback_color(&rb, 255, 240); - ok(compare_color(color, 0x7fff007f, 1), "Got unexpected color 0x%08x.\n", color); + ok(compare_color(color, 0x7fff007f, 1), "Got unexpected color 0x%08lx.\n", color); color = get_readback_color(&rb, 320, 240); - ok(compare_color(color, 0x7fff007f, 1), "Got unexpected color 0x%08x.\n", color); + ok(compare_color(color, 0x7fff007f, 1), "Got unexpected color 0x%08lx.\n", color); color = get_readback_color(&rb, 385, 240); - ok(compare_color(color, 0x7fff007f, 1), "Got unexpected color 0x%08x.\n", color); + ok(compare_color(color, 0x7fff007f, 1), "Got unexpected color 0x%08lx.\n", color); color = get_readback_color(&rb, 320, 290); - ok(compare_color(color, 0x7fff007f, 1), "Got unexpected color 0x%08x.\n", color); + ok(compare_color(color, 0x7fff007f, 1), "Got unexpected color 0x%08lx.\n", color); release_resource_readback(&rb);
ID3D10Device_OMSetRenderTargets(device, 1, &test_context.backbuffer_rtv, NULL); @@ -13856,15 +13856,15 @@ float4 main(struct ps_data ps_input) : SV_Target
get_texture_readback(test_context.backbuffer, 0, &rb); color = get_readback_color(&rb, 320, 190); - ok(compare_color(color, 0x7fff007f, 1), "Got unexpected color 0x%08x.\n", color); + ok(compare_color(color, 0x7fff007f, 1), "Got unexpected color 0x%08lx.\n", color); color = get_readback_color(&rb, 255, 240); - ok(compare_color(color, 0x7fff007f, 1), "Got unexpected color 0x%08x.\n", color); + ok(compare_color(color, 0x7fff007f, 1), "Got unexpected color 0x%08lx.\n", color); color = get_readback_color(&rb, 320, 240); - ok(compare_color(color, 0x7fff007f, 1), "Got unexpected color 0x%08x.\n", color); + ok(compare_color(color, 0x7fff007f, 1), "Got unexpected color 0x%08lx.\n", color); color = get_readback_color(&rb, 385, 240); - ok(compare_color(color, 0x7fff007f, 1), "Got unexpected color 0x%08x.\n", color); + ok(compare_color(color, 0x7fff007f, 1), "Got unexpected color 0x%08lx.\n", color); color = get_readback_color(&rb, 320, 290); - ok(compare_color(color, 0x7fff007f, 1), "Got unexpected color 0x%08x.\n", color); + ok(compare_color(color, 0x7fff007f, 1), "Got unexpected color 0x%08lx.\n", color); release_resource_readback(&rb);
ID3D10PixelShader_Release(ps); @@ -13933,10 +13933,10 @@ static void test_shader_input_registers_limits(void) resource_data.SysMemSlicePitch = 0;
hr = ID3D10Device_CreateTexture2D(device, &texture_desc, &resource_data, &texture); - ok(SUCCEEDED(hr), "Failed to create a 2d texture, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create a 2d texture, hr %#lx.\n", hr);
hr = ID3D10Device_CreateShaderResourceView(device, (ID3D10Resource *)texture, NULL, &srv); - ok(SUCCEEDED(hr), "Failed to create shader resource view, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create shader resource view, hr %#lx.\n", hr);
sampler_desc.Filter = D3D10_FILTER_MIN_MAG_MIP_POINT; sampler_desc.AddressU = D3D10_TEXTURE_ADDRESS_CLAMP; @@ -13953,10 +13953,10 @@ static void test_shader_input_registers_limits(void) sampler_desc.MaxLOD = 0.0f;
hr = ID3D10Device_CreateSamplerState(device, &sampler_desc, &sampler); - ok(SUCCEEDED(hr), "Failed to create sampler state, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create sampler state, hr %#lx.\n", hr);
hr = ID3D10Device_CreatePixelShader(device, ps_last_register_code, sizeof(ps_last_register_code), &ps); - ok(SUCCEEDED(hr), "Failed to create pixel shader, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create pixel shader, hr %#lx.\n", hr); ID3D10Device_PSSetShader(device, ps);
ID3D10Device_PSSetShaderResources(device, @@ -14034,11 +14034,11 @@ static void test_unbind_shader_resource_view(void) resource_data.SysMemSlicePitch = 0;
hr = ID3D10Device_CreateTexture2D(device, &texture_desc, &resource_data, &texture); - ok(SUCCEEDED(hr), "Failed to create a 2d texture, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create a 2d texture, hr %#lx.\n", hr); hr = ID3D10Device_CreateShaderResourceView(device, (ID3D10Resource *)texture, NULL, &srv); - ok(SUCCEEDED(hr), "Failed to create shader resource view, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create shader resource view, hr %#lx.\n", hr); hr = ID3D10Device_CreatePixelShader(device, ps_code, sizeof(ps_code), &ps); - ok(SUCCEEDED(hr), "Failed to create pixel shader, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create pixel shader, hr %#lx.\n", hr); ID3D10Device_PSSetShader(device, ps);
ID3D10Device_PSSetShaderResources(device, 0, 1, &srv); @@ -14100,9 +14100,9 @@ static void test_stencil_separate(void) texture_desc.CPUAccessFlags = 0; texture_desc.MiscFlags = 0; hr = ID3D10Device_CreateTexture2D(device, &texture_desc, NULL, &texture); - ok(SUCCEEDED(hr), "Failed to create texture, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create texture, hr %#lx.\n", hr); hr = ID3D10Device_CreateDepthStencilView(device, (ID3D10Resource *)texture, NULL, &ds_view); - ok(SUCCEEDED(hr), "Failed to create depth stencil view, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create depth stencil view, hr %#lx.\n", hr);
ds_desc.DepthEnable = TRUE; ds_desc.DepthWriteMask = D3D10_DEPTH_WRITE_MASK_ALL; @@ -14119,7 +14119,7 @@ static void test_stencil_separate(void) ds_desc.BackFace.StencilPassOp = D3D10_STENCIL_OP_ZERO; ds_desc.BackFace.StencilFunc = D3D10_COMPARISON_ALWAYS; hr = ID3D10Device_CreateDepthStencilState(device, &ds_desc, &ds_state); - ok(SUCCEEDED(hr), "Failed to create depth stencil state, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create depth stencil state, hr %#lx.\n", hr);
rs_desc.FillMode = D3D10_FILL_SOLID; rs_desc.CullMode = D3D10_CULL_NONE; @@ -14132,7 +14132,7 @@ static void test_stencil_separate(void) rs_desc.MultisampleEnable = FALSE; rs_desc.AntialiasedLineEnable = FALSE; ID3D10Device_CreateRasterizerState(device, &rs_desc, &rs); - ok(SUCCEEDED(hr), "Failed to create rasterizer state, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create rasterizer state, hr %#lx.\n", hr);
ID3D10Device_ClearRenderTargetView(device, test_context.backbuffer_rtv, red); ID3D10Device_ClearDepthStencilView(device, ds_view, D3D10_CLEAR_DEPTH | D3D10_CLEAR_STENCIL, 1.0f, 0); @@ -14152,7 +14152,7 @@ static void test_stencil_separate(void) ID3D10RasterizerState_Release(rs); rs_desc.FrontCounterClockwise = TRUE; ID3D10Device_CreateRasterizerState(device, &rs_desc, &rs); - ok(SUCCEEDED(hr), "Failed to create rasterizer state, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create rasterizer state, hr %#lx.\n", hr); ID3D10Device_RSSetState(device, rs);
ID3D10Device_ClearRenderTargetView(device, test_context.backbuffer_rtv, red); @@ -14214,7 +14214,7 @@ static void test_sm4_ret_instruction(void) device = test_context.device;
hr = ID3D10Device_CreatePixelShader(device, ps_code, sizeof(ps_code), &ps); - ok(SUCCEEDED(hr), "Failed to create shader, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create shader, hr %#lx.\n", hr); ID3D10Device_PSSetShader(device, ps); memset(&constant, 0, sizeof(constant)); cb = create_buffer(device, D3D10_BIND_CONSTANT_BUFFER, sizeof(constant), &constant); @@ -14344,16 +14344,16 @@ static void test_primitive_restart(void) device = test_context.device;
hr = ID3D10Device_CreateVertexShader(device, vs_code, sizeof(vs_code), &vs); - ok(SUCCEEDED(hr), "Failed to create vertex shader, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create vertex shader, hr %#lx.\n", hr); hr = ID3D10Device_CreatePixelShader(device, ps_code, sizeof(ps_code), &ps); - ok(SUCCEEDED(hr), "Failed to create return pixel shader, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create return pixel shader, hr %#lx.\n", hr);
ib16 = create_buffer(device, D3D10_BIND_INDEX_BUFFER, sizeof(indices16), indices16); ib32 = create_buffer(device, D3D10_BIND_INDEX_BUFFER, sizeof(indices32), indices32);
hr = ID3D10Device_CreateInputLayout(device, layout_desc, ARRAY_SIZE(layout_desc), vs_code, sizeof(vs_code), &layout); - ok(SUCCEEDED(hr), "Failed to create input layout, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create input layout, hr %#lx.\n", hr);
vb = create_buffer(device, D3D10_BIND_VERTEX_BUFFER, sizeof(vertices), vertices);
@@ -14624,9 +14624,9 @@ static void test_resinfo_instruction(void) texture_desc.CPUAccessFlags = 0; texture_desc.MiscFlags = 0; hr = ID3D10Device_CreateTexture2D(device, &texture_desc, NULL, &rtv_texture); - ok(SUCCEEDED(hr), "Failed to create texture, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create texture, hr %#lx.\n", hr); hr = ID3D10Device_CreateRenderTargetView(device, (ID3D10Resource *)rtv_texture, NULL, &rtv); - ok(SUCCEEDED(hr), "Failed to create rendertarget view, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create rendertarget view, hr %#lx.\n", hr);
memset(&constant, 0, sizeof(constant)); cb = create_buffer(device, D3D10_BIND_CONSTANT_BUFFER, sizeof(constant), &constant); @@ -14648,7 +14648,7 @@ static void test_resinfo_instruction(void) current_ps = test->ps;
hr = ID3D10Device_CreatePixelShader(device, current_ps->code, current_ps->size, &ps); - ok(SUCCEEDED(hr), "Test %u: Failed to create pixel shader, hr %#x.\n", i, hr); + ok(SUCCEEDED(hr), "Test %u: Failed to create pixel shader, hr %#lx.\n", i, hr); ID3D10Device_PSSetShader(device, ps); }
@@ -14664,7 +14664,7 @@ static void test_resinfo_instruction(void) texture3d_desc.CPUAccessFlags = 0; texture3d_desc.MiscFlags = 0; hr = ID3D10Device_CreateTexture3D(device, &texture3d_desc, NULL, (ID3D10Texture3D **)&texture); - ok(SUCCEEDED(hr), "Test %u: Failed to create 3d texture, hr %#x.\n", i, hr); + ok(SUCCEEDED(hr), "Test %u: Failed to create 3d texture, hr %#lx.\n", i, hr); } else { @@ -14678,11 +14678,11 @@ static void test_resinfo_instruction(void) if (test->texture_desc.cube_count) texture_desc.MiscFlags |= D3D10_RESOURCE_MISC_TEXTURECUBE; hr = ID3D10Device_CreateTexture2D(device, &texture_desc, NULL, (ID3D10Texture2D **)&texture); - ok(SUCCEEDED(hr), "Test %u: Failed to create 2d texture, hr %#x.\n", i, hr); + ok(SUCCEEDED(hr), "Test %u: Failed to create 2d texture, hr %#lx.\n", i, hr); }
hr = ID3D10Device_CreateShaderResourceView(device, texture, NULL, &srv); - ok(SUCCEEDED(hr), "Test %u: Failed to create shader resource view, hr %#x.\n", i, hr); + ok(SUCCEEDED(hr), "Test %u: Failed to create shader resource view, hr %#lx.\n", i, hr); ID3D10Device_PSSetShaderResources(device, 0, 1, &srv);
for (type = 0; type < 2; ++type) @@ -14734,7 +14734,7 @@ static void test_render_target_device_mismatch(void) ID3D10Device_OMSetRenderTargets(device, 1, &rtv, NULL);
refcount = ID3D10Device_Release(device); - ok(!refcount, "Device has %u references left.\n", refcount); + ok(!refcount, "Device has %lu references left.\n", refcount); release_test_context(&test_context); }
@@ -14875,7 +14875,7 @@ static void test_buffer_srv(void) cb = create_buffer(device, D3D10_BIND_CONSTANT_BUFFER, sizeof(cb_size), NULL);
hr = ID3D10Device_CreatePixelShader(device, ps_float4_code, sizeof(ps_float4_code), &ps); - ok(SUCCEEDED(hr), "Failed to create pixel shader, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create pixel shader, hr %#lx.\n", hr);
ID3D10Device_PSSetShader(device, ps); ID3D10Device_PSSetConstantBuffers(device, 0, 1, &cb); @@ -14917,7 +14917,7 @@ static void test_buffer_srv(void) resource_data.pSysMem = current_buffer->data; } hr = ID3D10Device_CreateBuffer(device, &buffer_desc, &resource_data, &buffer); - ok(SUCCEEDED(hr), "Test %u: Failed to create buffer, hr %#x.\n", i, hr); + ok(SUCCEEDED(hr), "Test %u: Failed to create buffer, hr %#lx.\n", i, hr); heap_free(data); } else @@ -14935,7 +14935,7 @@ static void test_buffer_srv(void) U(srv_desc).Buffer.ElementOffset = test->srv_first_element; U(srv_desc).Buffer.ElementWidth = test->srv_element_count; hr = ID3D10Device_CreateShaderResourceView(device, (ID3D10Resource *)buffer, &srv_desc, &srv); - ok(SUCCEEDED(hr), "Test %u: Failed to create shader resource view, hr %#x.\n", i, hr); + ok(SUCCEEDED(hr), "Test %u: Failed to create shader resource view, hr %#lx.\n", i, hr); } else { @@ -14958,7 +14958,7 @@ static void test_buffer_srv(void) color = get_readback_color(&rb, 80 + x * 160, 60 + y * 120); expected_color = test->expected_colors[y * 4 + x]; ok(compare_color(color, expected_color, 1), - "Test %u: Got 0x%08x, expected 0x%08x at (%u, %u).\n", + "Test %u: Got 0x%08lx, expected 0x%08lx at (%u, %u).\n", i, color, expected_color, x, y); } } @@ -15117,16 +15117,16 @@ float4 main(struct ps_data ps_input) : SV_Target
hr = ID3D10Device_CreateInputLayout(device, layout_desc, ARRAY_SIZE(layout_desc), vs_code, sizeof(vs_code), &input_layout); - ok(SUCCEEDED(hr), "Failed to create input layout, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create input layout, hr %#lx.\n", hr);
vb = create_buffer(device, D3D10_BIND_VERTEX_BUFFER, sizeof(vertex), vertex);
hr = ID3D10Device_CreateVertexShader(device, vs_code, sizeof(vs_code), &vs); - ok(SUCCEEDED(hr), "Failed to create vertex shader, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create vertex shader, hr %#lx.\n", hr); hr = ID3D10Device_CreateGeometryShader(device, gs_code, sizeof(gs_code), &gs); - ok(SUCCEEDED(hr), "Failed to create geometry shader, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create geometry shader, hr %#lx.\n", hr); hr = ID3D10Device_CreatePixelShader(device, ps_code, sizeof(ps_code), &ps); - ok(SUCCEEDED(hr), "Failed to create pixel shader, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create pixel shader, hr %#lx.\n", hr);
rs_desc.FillMode = D3D10_FILL_SOLID; rs_desc.CullMode = D3D10_CULL_BACK; @@ -15139,7 +15139,7 @@ float4 main(struct ps_data ps_input) : SV_Target rs_desc.MultisampleEnable = FALSE; rs_desc.AntialiasedLineEnable = FALSE; hr = ID3D10Device_CreateRasterizerState(device, &rs_desc, &rs); - ok(SUCCEEDED(hr), "Failed to create rasterizer state, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create rasterizer state, hr %#lx.\n", hr);
ID3D10Device_IASetInputLayout(device, input_layout); ID3D10Device_IASetPrimitiveTopology(device, D3D10_PRIMITIVE_TOPOLOGY_POINTLIST); @@ -15155,15 +15155,15 @@ float4 main(struct ps_data ps_input) : SV_Target
get_texture_readback(test_context.backbuffer, 0, &rb); color = get_readback_color(&rb, 320, 190); - ok(compare_color(color, 0xff0000ff, 1), "Got unexpected color 0x%08x.\n", color); + ok(compare_color(color, 0xff0000ff, 1), "Got unexpected color 0x%08lx.\n", color); color = get_readback_color(&rb, 255, 240); - ok(compare_color(color, 0xff0000ff, 1), "Got unexpected color 0x%08x.\n", color); + ok(compare_color(color, 0xff0000ff, 1), "Got unexpected color 0x%08lx.\n", color); color = get_readback_color(&rb, 320, 240); - ok(compare_color(color, 0xffffff00, 1), "Got unexpected color 0x%08x.\n", color); + ok(compare_color(color, 0xffffff00, 1), "Got unexpected color 0x%08lx.\n", color); color = get_readback_color(&rb, 385, 240); - ok(compare_color(color, 0xff0000ff, 1), "Got unexpected color 0x%08x.\n", color); + ok(compare_color(color, 0xff0000ff, 1), "Got unexpected color 0x%08lx.\n", color); color = get_readback_color(&rb, 320, 290); - ok(compare_color(color, 0xff0000ff, 1), "Got unexpected color 0x%08x.\n", color); + ok(compare_color(color, 0xff0000ff, 1), "Got unexpected color 0x%08lx.\n", color); release_resource_readback(&rb);
ID3D10RasterizerState_Release(rs); @@ -15185,7 +15185,7 @@ static void check_so_desc_(unsigned int line, ID3D10Device *device,
hr = ID3D10Device_CreateGeometryShaderWithStreamOutput(device, code, code_size, entry, entry_count, stride, &gs); - ok_(__FILE__, line)(hr == (valid ? S_OK : E_INVALIDARG), "Got unexpected hr %#x.\n", hr); + ok_(__FILE__, line)(hr == (valid ? S_OK : E_INVALIDARG), "Got unexpected hr %#lx.\n", hr); if (!valid) ok_(__FILE__, line)(!gs, "Got unexpected geometry shader %p.\n", gs); if (SUCCEEDED(hr)) @@ -15625,7 +15625,7 @@ static void test_stream_output_resume(void)
hr = ID3D10Device_CreateGeometryShaderWithStreamOutput(device, gs_code, sizeof(gs_code), so_declaration, ARRAY_SIZE(so_declaration), 16, &gs); - ok(SUCCEEDED(hr), "Failed to create geometry shader with stream output, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create geometry shader with stream output, hr %#lx.\n", hr);
cb = create_buffer(device, D3D10_BIND_CONSTANT_BUFFER, sizeof(constants[0]), &constants[0]); so_buffer = create_buffer(device, D3D10_BIND_STREAM_OUTPUT, 1024, NULL); @@ -15819,10 +15819,10 @@ static void test_stream_output_vs(void)
hr = ID3D10Device_CreateInputLayout(device, layout_desc, ARRAY_SIZE(layout_desc), vs_code, sizeof(vs_code), &input_layout); - ok(SUCCEEDED(hr), "Failed to create input layout, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create input layout, hr %#lx.\n", hr);
hr = ID3D10Device_CreateVertexShader(device, vs_code, sizeof(vs_code), &vs); - ok(SUCCEEDED(hr), "Failed to create vertex shader, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create vertex shader, hr %#lx.\n", hr);
so_buffer = create_buffer(device, D3D10_BIND_STREAM_OUTPUT, 1024, NULL);
@@ -15841,7 +15841,7 @@ static void test_stream_output_vs(void)
hr = ID3D10Device_CreateGeometryShaderWithStreamOutput(device, vs_code, sizeof(vs_code), tests[i].so_declaration, tests[i].so_entry_count, tests[i].so_stride, &gs); - ok(hr == S_OK, "Failed to create geometry shader with stream output, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create geometry shader with stream output, hr %#lx.\n", hr); ID3D10Device_GSSetShader(device, gs);
offset = 0; @@ -15976,9 +15976,9 @@ static void test_depth_bias(void) texture_desc.Format = format; texture_desc.BindFlags = D3D10_BIND_DEPTH_STENCIL; hr = ID3D10Device_CreateTexture2D(device, &texture_desc, NULL, &texture); - ok(SUCCEEDED(hr), "Failed to create texture, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create texture, hr %#lx.\n", hr); hr = ID3D10Device_CreateDepthStencilView(device, (ID3D10Resource *)texture, NULL, &dsv); - ok(SUCCEEDED(hr), "Failed to create render depth stencil view, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create render depth stencil view, hr %#lx.\n", hr); ID3D10Device_OMSetRenderTargets(device, 1, &test_context.backbuffer_rtv, dsv); ID3D10Device_ClearDepthStencilView(device, dsv, D3D10_CLEAR_DEPTH | D3D10_CLEAR_STENCIL, 1.0f, 0); draw_quad_z(&test_context, 1.0f); @@ -16020,7 +16020,7 @@ static void test_depth_bias(void) { rasterizer_desc.DepthBiasClamp = bias_clamp_tests[k]; ID3D10Device_CreateRasterizerState(device, &rasterizer_desc, &rs); - ok(SUCCEEDED(hr), "Failed to create rasterizer state, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create rasterizer state, hr %#lx.\n", hr); ID3D10Device_RSSetState(device, rs); ID3D10Device_ClearDepthStencilView(device, dsv, D3D10_CLEAR_DEPTH, 1.0f, 0); draw_quad(&test_context); @@ -16103,7 +16103,7 @@ static void test_depth_bias(void) BOOL all_match = TRUE; rasterizer_desc.DepthBiasClamp = bias_clamp_tests[k]; ID3D10Device_CreateRasterizerState(device, &rasterizer_desc, &rs); - ok(SUCCEEDED(hr), "Failed to create rasterizer state, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create rasterizer state, hr %#lx.\n", hr); ID3D10Device_RSSetState(device, rs); ID3D10Device_ClearDepthStencilView(device, dsv, D3D10_CLEAR_DEPTH, 1.0f, 0); draw_quad(&test_context); @@ -16249,7 +16249,7 @@ static void test_format_compatibility(void) resource_data.SysMemSlicePitch = 0;
hr = ID3D10Device_CreateTexture2D(device, &texture_desc, &resource_data, &src_texture); - ok(SUCCEEDED(hr), "Failed to create source texture, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create source texture, hr %#lx.\n", hr);
texture_desc.Format = test_data[i].dst_format; texture_desc.Usage = D3D10_USAGE_DEFAULT; @@ -16264,7 +16264,7 @@ static void test_format_compatibility(void) ID3D10Texture2D_Release(src_texture); continue; } - ok(SUCCEEDED(hr), "Failed to create destination texture, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create destination texture, hr %#lx.\n", hr);
set_box(&box, 0, 0, 0, texture_desc.Width - 1, texture_desc.Height - 1, 1); ID3D10Device_CopySubresourceRegion(device, (ID3D10Resource *)dst_texture, 0, 1, 1, 0, @@ -16282,7 +16282,7 @@ static void test_format_compatibility(void) expected = test_data[i].success && x >= texel_dwords && y ? bitmap_data[j - (4 + texel_dwords)] : initial_data[j]; todo_wine_if(test_data[i].dst_ds && colour) - ok(colour == expected, "Test %u: Got unexpected colour 0x%08x at (%u, %u), expected 0x%08x.\n", + ok(colour == expected, "Test %u: Got unexpected colour 0x%08lx at (%u, %u), expected 0x%08lx.\n", i, colour, x, y, expected); } release_resource_readback(&rb); @@ -16297,7 +16297,7 @@ static void test_format_compatibility(void) colour = get_readback_color(&rb, x, y); expected = test_data[i].success ? bitmap_data[j] : initial_data[j]; todo_wine_if(test_data[i].dst_ds) - ok(colour == expected, "Test %u: Got unexpected colour 0x%08x at (%u, %u), expected 0x%08x.\n", + ok(colour == expected, "Test %u: Got unexpected colour 0x%08lx at (%u, %u), expected 0x%08lx.\n", i, colour, x, y, expected); } release_resource_readback(&rb); @@ -16307,7 +16307,7 @@ static void test_format_compatibility(void) }
refcount = ID3D10Device_Release(device); - ok(!refcount, "Device has %u references left.\n", refcount); + ok(!refcount, "Device has %lu references left.\n", refcount); }
static void test_compressed_format_compatibility(void) @@ -16442,7 +16442,7 @@ static void test_compressed_format_compatibility(void) resource_data.SysMemPitch = row_block_count * src_format->block_size;
hr = ID3D10Device_CreateTexture2D(device, &texture_desc, &resource_data, &src_texture); - ok(hr == S_OK, "Source format %#x: Got unexpected hr %#x.\n", src_format->id, hr); + ok(hr == S_OK, "Source format %#x: Got unexpected hr %#lx.\n", src_format->id, hr);
for (j = 0; j < ARRAY_SIZE(formats); ++j) { @@ -16462,7 +16462,7 @@ static void test_compressed_format_compatibility(void) resource_data.SysMemPitch = row_block_count * dst_format->block_size;
hr = ID3D10Device_CreateTexture2D(device, &texture_desc, &resource_data, &dst_texture); - ok(hr == S_OK, "%#x -> %#x: Got unexpected hr %#x.\n", src_format->id, dst_format->id, hr); + ok(hr == S_OK, "%#x -> %#x: Got unexpected hr %#lx.\n", src_format->id, dst_format->id, hr);
set_box(&box, 0, 0, 0, src_format->block_edge, src_format->block_edge, 1); ID3D10Device_CopySubresourceRegion(device, (ID3D10Resource *)dst_texture, 0, @@ -16478,7 +16478,7 @@ static void test_compressed_format_compatibility(void) colour = ((DWORD *)row)[k % ((row_block_count * dst_format->block_size) / sizeof(colour))];
expected = initial_data[k]; - ok(colour == expected, "%#x -> %#x: Got unexpected colour 0x%08x at %u, expected 0x%08x.\n", + ok(colour == expected, "%#x -> %#x: Got unexpected colour 0x%08lx at %u, expected 0x%08lx.\n", src_format->id, dst_format->id, colour, k, expected); if (colour != expected) break; @@ -16497,7 +16497,7 @@ static void test_compressed_format_compatibility(void) colour = ((DWORD *)row)[k % ((row_block_count * dst_format->block_size) / sizeof(colour))];
expected = initial_data[k]; - ok(colour == expected, "%#x -> %#x: Got unexpected colour 0x%08x at %u, expected 0x%08x.\n", + ok(colour == expected, "%#x -> %#x: Got unexpected colour 0x%08lx at %u, expected 0x%08lx.\n", src_format->id, dst_format->id, colour, k, expected); if (colour != expected) break; @@ -16511,7 +16511,7 @@ static void test_compressed_format_compatibility(void) }
refcount = ID3D10Device_Release(device); - ok(!refcount, "Device has %u references left.\n", refcount); + ok(!refcount, "Device has %lu references left.\n", refcount); }
static void check_clip_distance(struct d3d10core_test_context *test_context, ID3D10Buffer *vb) @@ -16779,7 +16779,7 @@ static void test_clip_distance(void)
hr = ID3D10Device_CreateInputLayout(device, layout_desc, ARRAY_SIZE(layout_desc), vs_code, sizeof(vs_code), &test_context.input_layout); - ok(SUCCEEDED(hr), "Failed to create input layout, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create input layout, hr %#lx.\n", hr);
vb = create_buffer(device, D3D10_BIND_VERTEX_BUFFER, sizeof(vertices), vertices); stride = sizeof(*vertices); @@ -16806,7 +16806,7 @@ static void test_clip_distance(void)
/* geometry shader */ hr = ID3D10Device_CreateGeometryShader(device, gs_code, sizeof(gs_code), &gs); - ok(SUCCEEDED(hr), "Failed to create geometry shader, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create geometry shader, hr %#lx.\n", hr); ID3D10Device_GSSetShader(device, gs);
check_clip_distance(&test_context, vb); @@ -16994,7 +16994,7 @@ static void test_combined_clip_and_cull_distances(void)
hr = ID3D10Device_CreateInputLayout(device, layout_desc, ARRAY_SIZE(layout_desc), vs_code, sizeof(vs_code), &test_context.input_layout); - ok(SUCCEEDED(hr), "Failed to create input layout, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create input layout, hr %#lx.\n", hr);
vb = create_buffer(device, D3D10_BIND_VERTEX_BUFFER, sizeof(vertices), vertices); stride = sizeof(*vertices); @@ -17211,10 +17211,10 @@ static void test_generate_mips(void) device = test_context.device;
hr = ID3D10Device_CreatePixelShader(device, ps_code, sizeof(ps_code), &ps); - ok(SUCCEEDED(hr), "Failed to create pixel shader, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create pixel shader, hr %#lx.\n", hr);
hr = ID3D10Device_CreatePixelShader(device, ps_code_3d, sizeof(ps_code_3d), &ps_3d); - ok(SUCCEEDED(hr), "Failed to create pixel shader, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create pixel shader, hr %#lx.\n", hr);
sampler_desc.Filter = D3D10_FILTER_MIN_MAG_MIP_POINT; sampler_desc.AddressU = D3D10_TEXTURE_ADDRESS_CLAMP; @@ -17231,7 +17231,7 @@ static void test_generate_mips(void) sampler_desc.MaxLOD = D3D10_FLOAT32_MAX;
hr = ID3D10Device_CreateSamplerState(device, &sampler_desc, &sampler_state); - ok(SUCCEEDED(hr), "Failed to create sampler state, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create sampler state, hr %#lx.\n", hr); ID3D10Device_PSSetSamplers(device, 0, 1, &sampler_state);
data = heap_alloc(sizeof(*data) * 32 * 32 * 32); @@ -17324,12 +17324,12 @@ static void test_generate_mips(void) if (tests[j].expected_creation && (resource_types[i].dim != D3D10_RESOURCE_DIMENSION_BUFFER || !(tests[j].misc_flags & D3D10_RESOURCE_MISC_GENERATE_MIPS))) { - ok(SUCCEEDED(hr), "Resource type %u, test %u: failed to create resource, hr %#x.\n", i, j, hr); + ok(SUCCEEDED(hr), "Resource type %u, test %u: failed to create resource, hr %#lx.\n", i, j, hr); } else { ok(hr == E_INVALIDARG, "Resource type %u, test %u: unexpectedly succeeded " - "to create resource, hr %#x.\n", i, j, hr); + "to create resource, hr %#lx.\n", i, j, hr); continue; }
@@ -17369,14 +17369,14 @@ static void test_generate_mips(void) if (resource_types[i].dim == D3D10_RESOURCE_DIMENSION_BUFFER) { ok(FAILED(hr), "Test %u: unexpectedly succeeded to create shader resource view, " - "hr %#x.\n", j, hr); + "hr %#lx.\n", j, hr); ID3D10Resource_Release(resource); continue; } else { ok(SUCCEEDED(hr), "Resource type %u, test %u: failed to create " - "shader resource view, hr %#x.\n", i, j, hr); + "shader resource view, hr %#lx.\n", i, j, hr); }
ID3D10Device_UpdateSubresource(device, resource, tests[j].base_level, @@ -17396,7 +17396,7 @@ static void test_generate_mips(void) srv_desc.Texture2D.MipLevels = ~0u; hr = ID3D10Device_CreateShaderResourceView(device, resource, &srv_desc, &srv_sampling); ok(SUCCEEDED(hr), "Resource type %u, test %u: failed to create shader resource view, " - "hr %#x.\n", i, j, hr); + "hr %#lx.\n", i, j, hr); ID3D10Device_PSSetShader(device, resource_types[i].dim == D3D10_RESOURCE_DIMENSION_TEXTURE3D ? ps_3d : ps); ID3D10Device_PSSetShaderResources(device, 0, 1, &srv_sampling); @@ -17408,8 +17408,8 @@ static void test_generate_mips(void) { color = get_readback_color(&rb, expected[k].pos.x, expected[k].pos.y); expected_color = tests[j].expected_mips ? expected[k].color : 0; - ok(color == expected_color, "Resource type %u, test %u: pixel (%u, %u) " - "has color %08x, expected %08x.\n", + ok(color == expected_color, "Resource type %u, test %u: pixel (%lu, %lu) " + "has color %08lx, expected %08lx.\n", i, j, expected[k].pos.x, expected[k].pos.y, color, expected_color); } release_resource_readback(&rb); @@ -17455,9 +17455,9 @@ static void test_generate_mips(void) texture2d_desc.MiscFlags = D3D10_RESOURCE_MISC_GENERATE_MIPS;
hr = ID3D10Device_CreateTexture2D(device, &texture2d_desc, NULL, (ID3D10Texture2D **)&resource); - ok(SUCCEEDED(hr), "Failed to create resource, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create resource, hr %#lx.\n", hr); hr = ID3D10Device_CreateShaderResourceView(device, resource, NULL, &srv); - ok(hr == E_INVALIDARG, "Unexpected hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Unexpected hr %#lx.\n", hr); srv_desc.Format = DXGI_FORMAT_R8G8B8A8_UNORM_SRGB; srv_desc.ViewDimension = D3D10_SRV_DIMENSION_TEXTURE2D; srv_desc.Texture2D.MostDetailedMip = 0; @@ -17475,7 +17475,7 @@ static void test_generate_mips(void) srv_desc.Texture2D.MostDetailedMip = 1; srv_desc.Texture2D.MipLevels = ~0u; hr = ID3D10Device_CreateShaderResourceView(device, resource, &srv_desc, &srv_sampling); - ok(SUCCEEDED(hr), "Failed to create shader resource view, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create shader resource view, hr %#lx.\n", hr); ID3D10Device_PSSetShader(device, ps); ID3D10Device_PSSetShaderResources(device, 0, 1, &srv_sampling);
@@ -17484,7 +17484,7 @@ static void test_generate_mips(void) get_texture_readback(test_context.backbuffer, 0, &rb); color = get_readback_color(&rb, 320, 240); ok(compare_color(color, 0x7fbcbcbc, 1) || broken(compare_color(color, 0x7f7f7f7f, 1)), /* AMD */ - "Unexpected color %08x.\n", color); + "Unexpected color %08lx.\n", color); release_resource_readback(&rb);
ID3D10ShaderResourceView_Release(srv_sampling); @@ -17507,7 +17507,7 @@ static void test_generate_mips(void) srv_desc.Texture2D.MostDetailedMip = 1; srv_desc.Texture2D.MipLevels = ~0u; hr = ID3D10Device_CreateShaderResourceView(device, resource, &srv_desc, &srv_sampling); - ok(SUCCEEDED(hr), "Failed to create shader resource view, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create shader resource view, hr %#lx.\n", hr); ID3D10Device_PSSetShader(device, ps); ID3D10Device_PSSetShaderResources(device, 0, 1, &srv_sampling);
@@ -17606,7 +17606,7 @@ static void test_alpha_to_coverage(void) device = test_context.device;
hr = ID3D10Device_CreatePixelShader(device, ps_code, sizeof(ps_code), &ps); - ok(SUCCEEDED(hr), "Failed to create pixel shader, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create pixel shader, hr %#lx.\n", hr); ID3D10Device_PSSetShader(device, ps);
memset(&blend_desc, 0, sizeof(blend_desc)); @@ -17614,7 +17614,7 @@ static void test_alpha_to_coverage(void) for (i = 0; i < ARRAY_SIZE(blend_desc.RenderTargetWriteMask); ++i) blend_desc.RenderTargetWriteMask[i] = D3D10_COLOR_WRITE_ENABLE_ALL; hr = ID3D10Device_CreateBlendState(device, &blend_desc, &blend_state); - ok(SUCCEEDED(hr), "Failed to create blend state, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create blend state, hr %#lx.\n", hr); ID3D10Device_OMSetBlendState(device, blend_state, NULL, D3D10_DEFAULT_SAMPLE_MASK);
render_targets[0] = test_context.backbuffer; @@ -17623,10 +17623,10 @@ static void test_alpha_to_coverage(void) { ID3D10Texture2D_GetDesc(test_context.backbuffer, &texture_desc); hr = ID3D10Device_CreateTexture2D(device, &texture_desc, NULL, &render_targets[i]); - ok(SUCCEEDED(hr), "Failed to create texture, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create texture, hr %#lx.\n", hr); hr = ID3D10Device_CreateRenderTargetView(device, (ID3D10Resource *)render_targets[i], NULL, &rtvs[i]); - ok(SUCCEEDED(hr), "Failed to create render target view, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create render target view, hr %#lx.\n", hr); } ID3D10Device_OMSetRenderTargets(device, ARRAY_SIZE(rtvs), rtvs, NULL);
@@ -17665,10 +17665,10 @@ static void test_alpha_to_coverage(void) ID3D10Texture2D_GetDesc(test_context.backbuffer, &texture_desc); texture_desc.Format = DXGI_FORMAT_R16G16_UNORM; hr = ID3D10Device_CreateTexture2D(device, &texture_desc, NULL, &render_targets[0]); - ok(SUCCEEDED(hr), "Failed to create texture, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create texture, hr %#lx.\n", hr); hr = ID3D10Device_CreateRenderTargetView(device, (ID3D10Resource *)render_targets[0], NULL, &rtvs[0]); - ok(SUCCEEDED(hr), "Failed to create rendertarget view, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create rendertarget view, hr %#lx.\n", hr); ID3D10Device_OMSetRenderTargets(device, ARRAY_SIZE(rtvs), rtvs, NULL);
ID3D10Device_ClearRenderTargetView(device, rtvs[0], white); @@ -17691,7 +17691,7 @@ static void test_alpha_to_coverage(void) ID3D10Texture2D_GetDesc(test_context.backbuffer, &texture_desc); hr = ID3D10Device_CheckMultisampleQualityLevels(device, texture_desc.Format, 4, &quality_level_count); - ok(hr == S_OK, "Failed to check multisample quality levels, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to check multisample quality levels, hr %#lx.\n", hr); if (!quality_level_count) { skip("4xMSAA not supported.\n"); @@ -17703,10 +17703,10 @@ static void test_alpha_to_coverage(void) for (i = 0; i < ARRAY_SIZE(render_targets); ++i) { hr = ID3D10Device_CreateTexture2D(device, &texture_desc, NULL, &render_targets[i]); - ok(SUCCEEDED(hr), "Failed to create texture, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create texture, hr %#lx.\n", hr); hr = ID3D10Device_CreateRenderTargetView(device, (ID3D10Resource *)render_targets[i], NULL, &rtvs[i]); - ok(SUCCEEDED(hr), "Failed to create rendertarget view, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create rendertarget view, hr %#lx.\n", hr); } ID3D10Device_OMSetRenderTargets(device, ARRAY_SIZE(rtvs), rtvs, NULL);
@@ -17715,7 +17715,7 @@ static void test_alpha_to_coverage(void) draw_quad(&test_context); texture_desc.SampleDesc.Count = 1; hr = ID3D10Device_CreateTexture2D(device, &texture_desc, NULL, &readback_texture); - ok(SUCCEEDED(hr), "Failed to create texture, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create texture, hr %#lx.\n", hr); for (i = 0; i < ARRAY_SIZE(render_targets); ++i) { DWORD expected_color; @@ -17814,7 +17814,7 @@ static void test_unbound_multisample_texture(void) device = test_context.device;
hr = ID3D10Device_CreatePixelShader(device, ps_code, sizeof(ps_code), &ps); - ok(hr == S_OK, "Failed to create pixel shader, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create pixel shader, hr %#lx.\n", hr); ID3D10Device_PSSetShader(device, ps);
memset(&cb_data, 0, sizeof(cb_data)); @@ -17947,11 +17947,11 @@ static void test_multiple_viewports(void) ID3D10Device_PSSetConstantBuffers(device, 0, 1, &cb);
hr = ID3D10Device_CreateGeometryShader(device, gs_code, sizeof(gs_code), &gs); - ok(SUCCEEDED(hr), "Failed to create geometry shader, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create geometry shader, hr %#lx.\n", hr); ID3D10Device_GSSetShader(device, gs);
hr = ID3D10Device_CreatePixelShader(device, ps_code, sizeof(ps_code), &ps); - ok(SUCCEEDED(hr), "Failed to create pixel shader, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create pixel shader, hr %#lx.\n", hr); ID3D10Device_PSSetShader(device, ps);
texture_desc.Width = 32; @@ -17966,10 +17966,10 @@ static void test_multiple_viewports(void) texture_desc.CPUAccessFlags = 0; texture_desc.MiscFlags = 0; hr = ID3D10Device_CreateTexture2D(device, &texture_desc, NULL, &texture); - ok(SUCCEEDED(hr), "Failed to create texture, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create texture, hr %#lx.\n", hr);
hr = ID3D10Device_CreateRenderTargetView(device, (ID3D10Resource *)texture, NULL, &rtv); - ok(SUCCEEDED(hr), "Failed to create render target view, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create render target view, hr %#lx.\n", hr); ID3D10Device_OMSetRenderTargets(device, 1, &rtv, NULL);
width = texture_desc.Width / 2; @@ -18028,7 +18028,7 @@ static void test_multiple_viewports(void) rasterizer_desc.DepthClipEnable = TRUE; rasterizer_desc.ScissorEnable = TRUE; hr = ID3D10Device_CreateRasterizerState(device, &rasterizer_desc, &rasterizer_state); - ok(SUCCEEDED(hr), "Failed to create rasterizer state, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create rasterizer state, hr %#lx.\n", hr);
ID3D10Device_RSSetState(device, rasterizer_state);
@@ -18242,7 +18242,7 @@ static void test_multisample_resolve(void) device = test_context.device;
hr = ID3D10Device_CheckMultisampleQualityLevels(device, DXGI_FORMAT_R8G8B8A8_TYPELESS, 4, &i); - ok(hr == S_OK, "Failed to check multisample quality levels, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to check multisample quality levels, hr %#lx.\n", hr); if (!i) { skip("4xMSAA not supported.\n"); @@ -18257,17 +18257,17 @@ static void test_multisample_resolve(void) ID3D10Texture2D_GetDesc(test_context.backbuffer, &texture_desc); texture_desc.Format = tests[i].dst_format; hr = ID3D10Device_CreateTexture2D(device, &texture_desc, NULL, &texture); - ok(hr == S_OK, "Failed to create texture, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create texture, hr %#lx.\n", hr);
texture_desc.Format = tests[i].src_format; texture_desc.SampleDesc.Count = 4; texture_desc.SampleDesc.Quality = 0; hr = ID3D10Device_CreateTexture2D(device, &texture_desc, NULL, &ms_texture); - ok(hr == S_OK, "Failed to create texture, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create texture, hr %#lx.\n", hr); rtv_desc.Format = tests[i].rtv_format; rtv_desc.ViewDimension = D3D10_RTV_DIMENSION_TEXTURE2DMS; hr = ID3D10Device_CreateRenderTargetView(device, (ID3D10Resource *)ms_texture, &rtv_desc, &rtv); - ok(hr == S_OK, "Failed to create render target view, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create render target view, hr %#lx.\n", hr);
ID3D10Device_OMSetRenderTargets(device, 1, &rtv, NULL); ID3D10Device_ClearRenderTargetView(device, rtv, white); @@ -18319,7 +18319,7 @@ static void test_sample_mask(void) device = test_context.device;
hr = ID3D10Device_CheckMultisampleQualityLevels(device, DXGI_FORMAT_R8G8B8A8_TYPELESS, 4, &quality_levels); - ok(hr == S_OK, "Failed to check multisample quality levels, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to check multisample quality levels, hr %#lx.\n", hr); if (!quality_levels) { skip("4xMSAA not supported.\n"); @@ -18328,16 +18328,16 @@ static void test_sample_mask(void) }
hr = ID3D10Device_CreatePixelShader(device, ps_code, sizeof(ps_code), &ps); - ok(hr == S_OK, "Failed to create pixel shader, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create pixel shader, hr %#lx.\n", hr); ID3D10Device_PSSetShader(device, ps);
ID3D10Texture2D_GetDesc(test_context.backbuffer, &texture_desc); texture_desc.SampleDesc.Count = 4; texture_desc.SampleDesc.Quality = 0; hr = ID3D10Device_CreateTexture2D(device, &texture_desc, NULL, &texture); - ok(hr == S_OK, "Failed to create texture, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create texture, hr %#lx.\n", hr); hr = ID3D10Device_CreateRenderTargetView(device, (ID3D10Resource *)texture, NULL, &rtv); - ok(hr == S_OK, "Failed to create render target view, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create render target view, hr %#lx.\n", hr);
ID3D10Device_OMSetRenderTargets(device, 1, &rtv, NULL); ID3D10Device_OMSetBlendState(device, NULL, NULL, 0xb); @@ -18375,9 +18375,9 @@ static void test_depth_clip(void) texture_desc.BindFlags = D3D10_BIND_DEPTH_STENCIL;
hr = ID3D10Device_CreateTexture2D(device, &texture_desc, NULL, &texture); - ok(SUCCEEDED(hr), "Failed to create texture, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create texture, hr %#lx.\n", hr); hr = ID3D10Device_CreateDepthStencilView(device, (ID3D10Resource *)texture, NULL, &dsv); - ok(SUCCEEDED(hr), "Failed to create depth stencil view, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create depth stencil view, hr %#lx.\n", hr); ID3D10Device_OMSetRenderTargets(device, 1, &test_context.backbuffer_rtv, dsv);
count = 1; @@ -18403,7 +18403,7 @@ static void test_depth_clip(void) rs_desc.MultisampleEnable = FALSE; rs_desc.AntialiasedLineEnable = FALSE; hr = ID3D10Device_CreateRasterizerState(device, &rs_desc, &rs); - ok(SUCCEEDED(hr), "Failed to create rasterizer state, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create rasterizer state, hr %#lx.\n", hr);
ID3D10Device_RSSetState(device, rs);
@@ -18451,13 +18451,13 @@ static void test_staging_buffers(void) resource_data.SysMemSlicePitch = 0;
hr = ID3D10Device_CreateBuffer(device, &buffer_desc, &resource_data, &src_buffer); - ok(hr == S_OK, "Failed to create buffer, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create buffer, hr %#lx.\n", hr);
buffer_desc.Usage = D3D10_USAGE_DEFAULT; buffer_desc.BindFlags = D3D10_BIND_CONSTANT_BUFFER; buffer_desc.CPUAccessFlags = 0; hr = ID3D10Device_CreateBuffer(device, &buffer_desc, NULL, &dst_buffer); - ok(hr == S_OK, "Failed to create buffer, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create buffer, hr %#lx.\n", hr);
ID3D10Device_CopyResource(device, (ID3D10Resource *)dst_buffer, (ID3D10Resource *)src_buffer); get_buffer_readback(dst_buffer, &rb); @@ -18519,15 +18519,15 @@ static void test_render_a8(void) device = test_context.device;
hr = ID3D10Device_CreatePixelShader(device, ps_code, sizeof(ps_code), &ps); - ok(hr == S_OK, "Failed to create pixel shader, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create pixel shader, hr %#lx.\n", hr); ID3D10Device_PSSetShader(device, ps);
ID3D10Texture2D_GetDesc(test_context.backbuffer, &texture_desc); texture_desc.Format = DXGI_FORMAT_A8_UNORM; hr = ID3D10Device_CreateTexture2D(device, &texture_desc, NULL, &texture); - ok(hr == S_OK, "Failed to create texture, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create texture, hr %#lx.\n", hr); hr = ID3D10Device_CreateRenderTargetView(device, (ID3D10Resource *)texture, NULL, &rtv); - ok(hr == S_OK, "Failed to create render target view, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create render target view, hr %#lx.\n", hr);
for (i = 0; i < 2; ++i) { @@ -18572,12 +18572,12 @@ static void test_desktop_window(void) }
hr = ID3D10Device_QueryInterface(device, &IID_IDXGIDevice, (void **)&dxgi_device); - ok(SUCCEEDED(hr), "Failed to get DXGI device, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get DXGI device, hr %#lx.\n", hr); hr = IDXGIDevice_GetAdapter(dxgi_device, &adapter); - ok(SUCCEEDED(hr), "Failed to get adapter, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get adapter, hr %#lx.\n", hr); IDXGIDevice_Release(dxgi_device); hr = IDXGIAdapter_GetParent(adapter, &IID_IDXGIFactory, (void **)&factory); - ok(SUCCEEDED(hr), "Failed to get factory, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get factory, hr %#lx.\n", hr); IDXGIAdapter_Release(adapter);
swapchain_desc.BufferDesc.Width = 640; @@ -18598,7 +18598,7 @@ static void test_desktop_window(void)
hr = IDXGIFactory_CreateSwapChain(factory, (IUnknown *)device, &swapchain_desc, &swapchain); ok(hr == S_OK || broken(hr == DXGI_ERROR_INVALID_CALL) /* Not available on all Windows versions. */, - "Failed to create swapchain, hr %#x.\n", hr); + "Failed to create swapchain, hr %#lx.\n", hr); IDXGIFactory_Release(factory); if (FAILED(hr)) { @@ -18607,22 +18607,22 @@ static void test_desktop_window(void) }
hr = IDXGISwapChain_GetBuffer(swapchain, 0, &IID_ID3D10Texture2D, (void **)&backbuffer); - ok(SUCCEEDED(hr), "Failed to get buffer, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get buffer, hr %#lx.\n", hr);
hr = ID3D10Device_CreateRenderTargetView(device, (ID3D10Resource *)backbuffer, NULL, &backbuffer_rtv); - ok(SUCCEEDED(hr), "Failed to create rendertarget view, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create rendertarget view, hr %#lx.\n", hr);
ID3D10Device_ClearRenderTargetView(device, backbuffer_rtv, red); check_texture_color(backbuffer, 0xff0000ff, 1);
hr = IDXGISwapChain_Present(swapchain, 0, 0); - ok(hr == S_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID3D10RenderTargetView_Release(backbuffer_rtv); ID3D10Texture2D_Release(backbuffer); IDXGISwapChain_Release(swapchain); refcount = ID3D10Device_Release(device); - ok(!refcount, "Device has %u references left.\n", refcount); + ok(!refcount, "Device has %lu references left.\n", refcount); }
static void test_color_mask(void) @@ -18687,7 +18687,7 @@ static void test_color_mask(void) device = test_context.device;
hr = ID3D10Device_CreatePixelShader(device, ps_code, sizeof(ps_code), &ps); - ok(SUCCEEDED(hr), "Failed to create pixel shader, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create pixel shader, hr %#lx.\n", hr); ID3D10Device_PSSetShader(device, ps);
memset(&blend_desc, 0, sizeof(blend_desc)); @@ -18701,17 +18701,17 @@ static void test_color_mask(void) blend_desc.RenderTargetWriteMask[7] = 0;
hr = ID3D10Device_CreateBlendState(device, &blend_desc, &blend_state); - ok(hr == S_OK, "Failed to create blend state, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create blend state, hr %#lx.\n", hr); ID3D10Device_OMSetBlendState(device, blend_state, NULL, D3D10_DEFAULT_SAMPLE_MASK);
for (i = 0; i < 8; ++i) { ID3D10Texture2D_GetDesc(test_context.backbuffer, &texture_desc); hr = ID3D10Device_CreateTexture2D(device, &texture_desc, NULL, &rts[i]); - ok(hr == S_OK, "Failed to create texture %u, hr %#x.\n", i, hr); + ok(hr == S_OK, "Failed to create texture %u, hr %#lx.\n", i, hr);
hr = ID3D10Device_CreateRenderTargetView(device, (ID3D10Resource *)rts[i], NULL, &rtvs[i]); - ok(hr == S_OK, "Failed to create rendertarget view %u, hr %#x.\n", i, hr); + ok(hr == S_OK, "Failed to create rendertarget view %u, hr %#lx.\n", i, hr); }
ID3D10Device_OMSetRenderTargets(device, 8, rtvs, NULL); @@ -18724,7 +18724,7 @@ static void test_color_mask(void) { get_texture_readback(rts[i], 0, &rb); color = get_readback_color(&rb, 320, 240); - ok(compare_color(color, expected_colors[i], 1), "%u: Got unexpected color 0x%08x.\n", i, color); + ok(compare_color(color, expected_colors[i], 1), "%u: Got unexpected color 0x%08lx.\n", i, color); release_resource_readback(&rb);
ID3D10Texture2D_Release(rts[i]); @@ -18795,7 +18795,7 @@ static void test_independent_blend(void) device = test_context.device;
hr = ID3D10Device_CreatePixelShader(device, ps_code, sizeof(ps_code), &ps); - ok(SUCCEEDED(hr), "Failed to create pixel shader, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create pixel shader, hr %#lx.\n", hr); ID3D10Device_PSSetShader(device, ps);
blend_desc.AlphaToCoverageEnable = FALSE; @@ -18812,17 +18812,17 @@ static void test_independent_blend(void) }
hr = ID3D10Device_CreateBlendState(device, &blend_desc, &blend_state); - ok(hr == S_OK, "Failed to create blend state, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create blend state, hr %#lx.\n", hr); ID3D10Device_OMSetBlendState(device, blend_state, NULL, D3D10_DEFAULT_SAMPLE_MASK);
for (i = 0; i < 8; ++i) { ID3D10Texture2D_GetDesc(test_context.backbuffer, &texture_desc); hr = ID3D10Device_CreateTexture2D(device, &texture_desc, NULL, &rts[i]); - ok(hr == S_OK, "Failed to create texture %u, hr %#x.\n", i, hr); + ok(hr == S_OK, "Failed to create texture %u, hr %#lx.\n", i, hr);
hr = ID3D10Device_CreateRenderTargetView(device, (ID3D10Resource *)rts[i], NULL, &rtvs[i]); - ok(hr == S_OK, "Failed to create rendertarget view %u, hr %#x.\n", i, hr); + ok(hr == S_OK, "Failed to create rendertarget view %u, hr %#lx.\n", i, hr); }
ID3D10Device_OMSetRenderTargets(device, 8, rtvs, NULL); @@ -18835,7 +18835,7 @@ static void test_independent_blend(void) { get_texture_readback(rts[i], 0, &rb); color = get_readback_color(&rb, 320, 240); - ok(compare_color(color, (i & 1) ? 0x80008080 : 0x8000ff00, 1), "%u: Got unexpected color 0x%08x.\n", i, color); + ok(compare_color(color, (i & 1) ? 0x80008080 : 0x8000ff00, 1), "%u: Got unexpected color 0x%08lx.\n", i, color); release_resource_readback(&rb);
ID3D10Texture2D_Release(rts[i]); @@ -18886,7 +18886,7 @@ static void test_dual_source_blend(void) device = test_context.device;
hr = ID3D10Device_CreatePixelShader(device, ps_code, sizeof(ps_code), &ps); - ok(SUCCEEDED(hr), "Failed to create pixel shader, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create pixel shader, hr %#lx.\n", hr); ID3D10Device_PSSetShader(device, ps);
memset(&blend_desc, 0, sizeof(blend_desc)); @@ -18900,14 +18900,14 @@ static void test_dual_source_blend(void) blend_desc.RenderTargetWriteMask[0] = D3D10_COLOR_WRITE_ENABLE_ALL;
hr = ID3D10Device_CreateBlendState(device, &blend_desc, &blend_state); - ok(hr == S_OK, "Failed to create blend state, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create blend state, hr %#lx.\n", hr); ID3D10Device_OMSetBlendState(device, blend_state, NULL, D3D10_DEFAULT_SAMPLE_MASK);
ID3D10Device_ClearRenderTargetView(device, test_context.backbuffer_rtv, clear_color); draw_quad(&test_context);
color = get_texture_color(test_context.backbuffer, 320, 240); - ok(compare_color(color, 0x80804000, 1), "Got unexpected color 0x%08x.\n", color); + ok(compare_color(color, 0x80804000, 1), "Got unexpected color 0x%08lx.\n", color);
ID3D10BlendState_Release(blend_state); ID3D10PixelShader_Release(ps); @@ -18984,11 +18984,11 @@ static void test_unbound_streams(void) device = test_context.device;
hr = ID3D10Device_CreatePixelShader(device, ps_code, sizeof(ps_code), &ps); - ok(SUCCEEDED(hr), "Failed to create pixel shader, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create pixel shader, hr %#lx.\n", hr);
hr = ID3D10Device_CreateInputLayout(device, layout_desc, ARRAY_SIZE(layout_desc), vs_code, sizeof(vs_code), &test_context.input_layout); - ok(SUCCEEDED(hr), "Failed to create input layout, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create input layout, hr %#lx.\n", hr);
ID3D10Device_PSSetShader(device, ps); ID3D10Device_ClearRenderTargetView(device, test_context.backbuffer_rtv, white); @@ -19053,7 +19053,7 @@ static void test_texture_compressed_3d(void) device = test_context.device;
hr = ID3D10Device_CreatePixelShader(device, ps_code, sizeof(ps_code), &ps); - ok(hr == S_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
/* Simply test all combinations of r0 and r1. */ texture_data = heap_alloc(256 * 256 * sizeof(UINT64)); @@ -19080,11 +19080,11 @@ static void test_texture_compressed_3d(void) texture_desc.CPUAccessFlags = 0; texture_desc.MiscFlags = 0; hr = ID3D10Device_CreateTexture3D(device, &texture_desc, &resource_data, &texture); - ok(hr == S_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr); heap_free(texture_data);
hr = ID3D10Device_CreateShaderResourceView(device, (ID3D10Resource *)texture, NULL, &srv); - ok(hr == S_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
sampler_desc.Filter = D3D10_FILTER_MIN_MAG_MIP_POINT; sampler_desc.AddressU = D3D10_TEXTURE_ADDRESS_CLAMP; @@ -19100,7 +19100,7 @@ static void test_texture_compressed_3d(void) sampler_desc.MinLOD = 0.0f; sampler_desc.MaxLOD = 0.0f; hr = ID3D10Device_CreateSamplerState(device, &sampler_desc, &sampler_state); - ok(hr == S_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID3D10Device_PSSetShader(device, ps); ID3D10Device_PSSetShaderResources(device, 0, 1, &srv); @@ -19142,7 +19142,7 @@ static void test_texture_compressed_3d(void) if (!equal) break; } - ok(equal, "Got unexpected colour 0x%08x at (%u, %u, %u), expected 0x%08x.\n", colour, x, y, z, expected); + ok(equal, "Got unexpected colour 0x%08lx at (%u, %u, %u), expected 0x%08lx.\n", colour, x, y, z, expected);
ID3D10PixelShader_Release(ps); ID3D10SamplerState_Release(sampler_state); @@ -19186,14 +19186,14 @@ static void test_dynamic_map_synchronization(void) buffer_desc.BindFlags = D3D10_BIND_VERTEX_BUFFER; buffer_desc.CPUAccessFlags = D3D10_CPU_ACCESS_WRITE; hr = ID3D10Device_CreateBuffer(device, &buffer_desc, NULL, &test_context.vb); - ok(hr == S_OK, "Failed to create vertex buffer, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create vertex buffer, hr %#lx.\n", hr);
ID3D10Device_ClearRenderTargetView(device, test_context.backbuffer_rtv, &red.x);
for (y = 0; y < 200; ++y) { hr = ID3D10Buffer_Map(test_context.vb, D3D10_MAP_WRITE_DISCARD, 0, &data); - ok(hr == S_OK, "Failed to map buffer, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to map buffer, hr %#lx.\n", hr);
fill_dynamic_vb_quad(data, 0, y);
@@ -19203,7 +19203,7 @@ static void test_dynamic_map_synchronization(void) for (x = 1; x < 200; ++x) { hr = ID3D10Buffer_Map(test_context.vb, D3D10_MAP_WRITE_NO_OVERWRITE, 0, &data); - ok(hr == S_OK, "Failed to map buffer, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to map buffer, hr %#lx.\n", hr);
fill_dynamic_vb_quad(data, x, y);
Signed-off-by: Eric Pouech eric.pouech@gmail.com
--- dlls/dbghelp/tests/Makefile.in | 1 - dlls/dbghelp/tests/dbghelp.c | 10 +++++----- 2 files changed, 5 insertions(+), 6 deletions(-)
diff --git a/dlls/dbghelp/tests/Makefile.in b/dlls/dbghelp/tests/Makefile.in index 408431fb516..31e5b01e8a8 100644 --- a/dlls/dbghelp/tests/Makefile.in +++ b/dlls/dbghelp/tests/Makefile.in @@ -1,4 +1,3 @@ -EXTRADEFS = -DWINE_NO_LONG_TYPES TESTDLL = dbghelp.dll IMPORTS = dbghelp
diff --git a/dlls/dbghelp/tests/dbghelp.c b/dlls/dbghelp/tests/dbghelp.c index b7e828281cd..73f8ee5f14f 100644 --- a/dlls/dbghelp/tests/dbghelp.c +++ b/dlls/dbghelp/tests/dbghelp.c @@ -26,7 +26,7 @@ static DWORD CALLBACK stack_walk_thread(void *arg) { DWORD count = SuspendThread(GetCurrentThread()); - ok(!count, "got %d\n", count); + ok(!count, "got %ld\n", count); return 0; }
@@ -86,7 +86,7 @@ static void test_stack_walk(void) /* first invocation just calculates the return address */ ret = StackWalk64(machine, GetCurrentProcess(), thread, &frame, &ctx, NULL, SymFunctionTableAccess64, SymGetModuleBase64, NULL); - ok(ret, "StackWalk64() failed: %u\n", GetLastError()); + ok(ret, "StackWalk64() failed: %lu\n", GetLastError()); ok(frame.AddrPC.Offset == frame0.AddrPC.Offset, "expected %s, got %s\n", wine_dbgstr_longlong(frame0.AddrPC.Offset), wine_dbgstr_longlong(frame.AddrPC.Offset)); @@ -102,7 +102,7 @@ static void test_stack_walk(void)
ret = StackWalk64(machine, GetCurrentProcess(), thread, &frame, &ctx, NULL, SymFunctionTableAccess64, SymGetModuleBase64, NULL); - ok(ret, "StackWalk64() failed: %u\n", GetLastError()); + ok(ret, "StackWalk64() failed: %lu\n", GetLastError());
addr = (void *)(DWORD_PTR)frame.AddrPC.Offset;
@@ -199,11 +199,11 @@ START_TEST(dbghelp) SetEnvironmentVariableA("_NT_ALT_SYMBOL_PATH", NULL);
ret = SymInitialize(GetCurrentProcess(), NULL, TRUE); - ok(ret, "got error %u\n", GetLastError()); + ok(ret, "got error %lu\n", GetLastError());
test_stack_walk(); test_search_path();
ret = SymCleanup(GetCurrentProcess()); - ok(ret, "got error %u\n", GetLastError()); + ok(ret, "got error %lu\n", GetLastError()); }
Signed-off-by: Eric Pouech eric.pouech@gmail.com
--- dlls/ddrawex/tests/Makefile.in | 1 dlls/ddrawex/tests/ddrawex.c | 18 ++++--- dlls/ddrawex/tests/surface.c | 100 ++++++++++++++++++++-------------------- 3 files changed, 59 insertions(+), 60 deletions(-)
diff --git a/dlls/ddrawex/tests/Makefile.in b/dlls/ddrawex/tests/Makefile.in index 7c05ef9464c..ecb57137763 100644 --- a/dlls/ddrawex/tests/Makefile.in +++ b/dlls/ddrawex/tests/Makefile.in @@ -1,4 +1,3 @@ -EXTRADEFS = -DWINE_NO_LONG_TYPES TESTDLL = ddrawex.dll IMPORTS = user32 gdi32
diff --git a/dlls/ddrawex/tests/ddrawex.c b/dlls/ddrawex/tests/ddrawex.c index 60d84fe991b..2231ce7e520 100644 --- a/dlls/ddrawex/tests/ddrawex.c +++ b/dlls/ddrawex/tests/ddrawex.c @@ -34,7 +34,7 @@ static IDirectDraw *createDDraw(void)
hr = IDirectDrawFactory_CreateDirectDraw(factory, NULL, NULL, DDSCL_NORMAL, 0, 0, &dd); - ok(hr == DD_OK, "Failed to create an IDirectDraw interface, hr = 0x%08x\n", hr); + ok(hr == DD_OK, "Failed to create an IDirectDraw interface, hr = 0x%08lx\n", hr); return SUCCEEDED(hr) ? dd : NULL; }
@@ -54,7 +54,7 @@ static void RefCountTest(void) ULONG ref;
ref = get_ref((IUnknown *) dd1); - ok(ref == 1, "A new ddraw object's refcount is %u, expected 1\n", ref); + ok(ref == 1, "A new ddraw object's refcount is %lu, expected 1\n", ref);
IDirectDraw_AddRef(dd1); ref = get_ref((IUnknown *) dd1); @@ -64,18 +64,18 @@ static void RefCountTest(void) IDirectDraw_Release(dd1); return; } - ok(ref == 2, "After AddRef the refcount is %u, expected 2\n", ref); + ok(ref == 2, "After AddRef the refcount is %lu, expected 2\n", ref); IDirectDraw_Release(dd1); ref = get_ref((IUnknown *) dd1); - ok(ref == 1, "After Release the refcount is %u, expected 1\n", ref); + ok(ref == 1, "After Release the refcount is %lu, expected 1\n", ref);
IDirectDraw_QueryInterface(dd1, &IID_IDirectDraw2, (void **) &dd2); ref = get_ref((IUnknown *) dd2); - ok(ref == 2, "IDirectDraw2 refcount is %u, expected 2\n", ref); + ok(ref == 2, "IDirectDraw2 refcount is %lu, expected 2\n", ref);
IDirectDraw_QueryInterface(dd1, &IID_IDirectDraw3, (void **) &dd3); ref = get_ref((IUnknown *) dd3); - ok(ref == 3, "IDirectDraw3 refcount is %u, expected 3\n", ref); + ok(ref == 3, "IDirectDraw3 refcount is %lu, expected 3\n", ref);
hr = IDirectDraw_QueryInterface(dd1, &IID_IDirectDraw4, (void **) &dd4); if (FAILED(hr)) @@ -87,14 +87,14 @@ static void RefCountTest(void) return; } ref = get_ref((IUnknown *) dd4); - ok(ref == 4, "IDirectDraw4 refcount is %u, expected 4\n", ref); + ok(ref == 4, "IDirectDraw4 refcount is %lu, expected 4\n", ref);
IDirectDraw_Release(dd1); IDirectDraw2_Release(dd2); IDirectDraw3_Release(dd3);
ref = get_ref((IUnknown *) dd4); - ok(ref == 1, "IDirectDraw4 refcount is %u, expected 1\n", ref); + ok(ref == 1, "IDirectDraw4 refcount is %lu, expected 1\n", ref);
IDirectDraw4_Release(dd4); } @@ -128,6 +128,6 @@ START_TEST(ddrawex) } if(classfactory) { ref = IClassFactory_Release(classfactory); - todo_wine ok(ref == 1, "IClassFactory refcount wrong, ref = %u\n", ref); + todo_wine ok(ref == 1, "IClassFactory refcount wrong, ref = %lu\n", ref); } } diff --git a/dlls/ddrawex/tests/surface.c b/dlls/ddrawex/tests/surface.c index 3081cfe2514..24951502816 100644 --- a/dlls/ddrawex/tests/surface.c +++ b/dlls/ddrawex/tests/surface.c @@ -36,7 +36,7 @@ static IDirectDraw *createDDraw(void)
hr = IDirectDrawFactory_CreateDirectDraw(factory, NULL, NULL, DDSCL_NORMAL, 0, 0, &dd); - ok(hr == DD_OK, "Failed to create an IDirectDraw interface, hr = 0x%08x\n", hr); + ok(hr == DD_OK, "Failed to create an IDirectDraw interface, hr = 0x%08lx\n", hr); return SUCCEEDED(hr) ? dd : NULL; }
@@ -52,19 +52,19 @@ static void dctest_surf(IDirectDrawSurface *surf, int ddsdver) { ddsd2.dwSize = sizeof(ddsd2);
hr = IDirectDrawSurface_GetDC(surf, &dc); - ok(hr == DD_OK, "IDirectDrawSurface_GetDC failed: 0x%08x\n", hr); + ok(hr == DD_OK, "IDirectDrawSurface_GetDC failed: 0x%08lx\n", hr);
hr = IDirectDrawSurface_GetDC(surf, &dc); - ok(hr == DDERR_DCALREADYCREATED, "IDirectDrawSurface_GetDC failed: 0x%08x\n", hr); + ok(hr == DDERR_DCALREADYCREATED, "IDirectDrawSurface_GetDC failed: 0x%08lx\n", hr); ok(dc2 == (HDC) 0x1234, "The failed GetDC call changed the dc: %p\n", dc2);
hr = IDirectDrawSurface_Lock(surf, NULL, ddsdver == 1 ? &ddsd : ((DDSURFACEDESC *) &ddsd2), 0, NULL); - ok(hr == DDERR_SURFACEBUSY, "IDirectDrawSurface_Lock returned 0x%08x, expected DDERR_SURFACEBUSY\n", hr); + ok(hr == DDERR_SURFACEBUSY, "IDirectDrawSurface_Lock returned 0x%08lx, expected DDERR_SURFACEBUSY\n", hr);
hr = IDirectDrawSurface_ReleaseDC(surf, dc); - ok(hr == DD_OK, "IDirectDrawSurface_ReleaseDC failed: 0x%08x\n", hr); + ok(hr == DD_OK, "IDirectDrawSurface_ReleaseDC failed: 0x%08lx\n", hr); hr = IDirectDrawSurface_ReleaseDC(surf, dc); - ok(hr == DDERR_NODC, "IDirectDrawSurface_ReleaseDC returned 0x%08x, expected DDERR_NODC\n", hr); + ok(hr == DDERR_NODC, "IDirectDrawSurface_ReleaseDC returned 0x%08lx, expected DDERR_NODC\n", hr); }
static void GetDCTest_main(DDSURFACEDESC *ddsd, DDSURFACEDESC2 *ddsd2, void (*testfunc)(IDirectDrawSurface *surf, int ddsdver)) @@ -84,19 +84,19 @@ static void GetDCTest_main(DDSURFACEDESC *ddsd, DDSURFACEDESC2 *ddsd2, void (*te win_skip("Unsupported mode\n"); return; } - ok(hr == DD_OK, "IDirectDraw_CreateSurface failed: 0x%08x\n", hr); + ok(hr == DD_OK, "IDirectDraw_CreateSurface failed: 0x%08lx\n", hr); testfunc(surf, 1); IDirectDrawSurface_Release(surf);
hr = IDirectDraw_QueryInterface(dd1, &IID_IDirectDraw2, (void **) &dd2); - ok(hr == DD_OK, "IDirectDraw_QueryInterface failed: 0x%08x\n", hr); + ok(hr == DD_OK, "IDirectDraw_QueryInterface failed: 0x%08lx\n", hr);
hr = IDirectDraw2_CreateSurface(dd2, ddsd, &surf, NULL); - ok(hr == DD_OK, "IDirectDraw2_CreateSurface failed: 0x%08x\n", hr); + ok(hr == DD_OK, "IDirectDraw2_CreateSurface failed: 0x%08lx\n", hr); testfunc(surf, 1);
hr = IDirectDrawSurface_QueryInterface(surf, &IID_IDirectDrawSurface2, (void **) &surf2); - ok(hr == DD_OK, "IDirectDrawSurface_QueryInterface failed: 0x%08x\n", hr); + ok(hr == DD_OK, "IDirectDrawSurface_QueryInterface failed: 0x%08lx\n", hr); testfunc((IDirectDrawSurface *) surf2, 1);
IDirectDrawSurface2_Release(surf2); @@ -104,14 +104,14 @@ static void GetDCTest_main(DDSURFACEDESC *ddsd, DDSURFACEDESC2 *ddsd2, void (*te IDirectDraw2_Release(dd2);
hr = IDirectDraw_QueryInterface(dd1, &IID_IDirectDraw3, (void **) &dd3); - ok(hr == DD_OK, "IDirectDraw_QueryInterface failed: 0x%08x\n", hr); + ok(hr == DD_OK, "IDirectDraw_QueryInterface failed: 0x%08lx\n", hr);
hr = IDirectDraw3_CreateSurface(dd3, ddsd, &surf, NULL); - ok(hr == DD_OK, "IDirectDraw3_CreateSurface failed: 0x%08x\n", hr); + ok(hr == DD_OK, "IDirectDraw3_CreateSurface failed: 0x%08lx\n", hr); testfunc(surf, 1);
hr = IDirectDrawSurface_QueryInterface(surf, &IID_IDirectDrawSurface3, (void **) &surf3); - ok(hr == DD_OK, "IDirectDrawSurface_QueryInterface failed: 0x%08x\n", hr); + ok(hr == DD_OK, "IDirectDrawSurface_QueryInterface failed: 0x%08lx\n", hr); testfunc((IDirectDrawSurface *) surf3, 1);
IDirectDrawSurface3_Release(surf3); @@ -119,11 +119,11 @@ static void GetDCTest_main(DDSURFACEDESC *ddsd, DDSURFACEDESC2 *ddsd2, void (*te IDirectDraw3_Release(dd3);
hr = IDirectDraw_QueryInterface(dd1, &IID_IDirectDraw4, (void **) &dd4); - ok(hr == DD_OK, "IDirectDraw_QueryInterface failed: 0x%08x\n", hr); + ok(hr == DD_OK, "IDirectDraw_QueryInterface failed: 0x%08lx\n", hr);
surf = NULL; hr = IDirectDraw4_CreateSurface(dd4, ddsd2, &surf4, NULL); - ok(hr == DD_OK, "IDirectDraw4_CreateSurface failed: 0x%08x\n", hr); + ok(hr == DD_OK, "IDirectDraw4_CreateSurface failed: 0x%08lx\n", hr); testfunc((IDirectDrawSurface *) surf4, 2);
IDirectDrawSurface4_Release(surf4); @@ -171,7 +171,7 @@ static void CapsTest(void) win_skip("Unsupported mode\n"); return; } - ok(hr == DD_OK, "Creating a SYSMEM | VIDMEM surface returned 0x%08x, expected DD_OK\n", hr); + ok(hr == DD_OK, "Creating a SYSMEM | VIDMEM surface returned 0x%08lx, expected DD_OK\n", hr); if(surf) IDirectDrawSurface_Release(surf);
IDirectDraw_Release(dd1); @@ -189,30 +189,30 @@ static void dctest_sysvidmem(IDirectDrawSurface *surf, int ddsdver) { ddsd2.dwSize = sizeof(ddsd2);
hr = IDirectDrawSurface_GetDC(surf, &dc); - ok(hr == DD_OK, "IDirectDrawSurface_GetDC failed: 0x%08x\n", hr); + ok(hr == DD_OK, "IDirectDrawSurface_GetDC failed: 0x%08lx\n", hr);
hr = IDirectDrawSurface_GetDC(surf, &dc2); - ok(hr == DD_OK, "IDirectDrawSurface_GetDC failed: 0x%08x\n", hr); + ok(hr == DD_OK, "IDirectDrawSurface_GetDC failed: 0x%08lx\n", hr); ok(dc == dc2, "Got two different DCs\n");
hr = IDirectDrawSurface_Lock(surf, NULL, ddsdver == 1 ? &ddsd : ((DDSURFACEDESC *) &ddsd2), 0, NULL); - ok(hr == DD_OK, "IDirectDrawSurface_Lock returned 0x%08x, expected DD_OK\n", hr); + ok(hr == DD_OK, "IDirectDrawSurface_Lock returned 0x%08lx, expected DD_OK\n", hr);
hr = IDirectDrawSurface_Lock(surf, NULL, ddsdver == 1 ? &ddsd : ((DDSURFACEDESC *) &ddsd2), 0, NULL); - ok(hr == DDERR_SURFACEBUSY, "IDirectDrawSurface_Lock returned 0x%08x, expected DDERR_SURFACEBUSY\n", hr); + ok(hr == DDERR_SURFACEBUSY, "IDirectDrawSurface_Lock returned 0x%08lx, expected DDERR_SURFACEBUSY\n", hr);
hr = IDirectDrawSurface_Unlock(surf, NULL); - ok(hr == DD_OK, "IDirectDrawSurface_Unlock returned 0x%08x, expected DD_OK\n", hr); + ok(hr == DD_OK, "IDirectDrawSurface_Unlock returned 0x%08lx, expected DD_OK\n", hr); hr = IDirectDrawSurface_Unlock(surf, NULL); - ok(hr == DDERR_NOTLOCKED, "IDirectDrawSurface_Unlock returned 0x%08x, expected DDERR_NOTLOCKED\n", hr); + ok(hr == DDERR_NOTLOCKED, "IDirectDrawSurface_Unlock returned 0x%08lx, expected DDERR_NOTLOCKED\n", hr);
hr = IDirectDrawSurface_ReleaseDC(surf, dc); - ok(hr == DD_OK, "IDirectDrawSurface_ReleaseDC failed: 0x%08x\n", hr); + ok(hr == DD_OK, "IDirectDrawSurface_ReleaseDC failed: 0x%08lx\n", hr); hr = IDirectDrawSurface_ReleaseDC(surf, dc); - ok(hr == DD_OK, "IDirectDrawSurface_ReleaseDC failed: 0x%08x\n", hr); + ok(hr == DD_OK, "IDirectDrawSurface_ReleaseDC failed: 0x%08lx\n", hr); /* That works any number of times... */ hr = IDirectDrawSurface_ReleaseDC(surf, dc); - ok(hr == DD_OK, "IDirectDrawSurface_ReleaseDC failed: 0x%08x\n", hr); + ok(hr == DD_OK, "IDirectDrawSurface_ReleaseDC failed: 0x%08lx\n", hr); }
static void SysVidMemTest(void) @@ -249,7 +249,7 @@ static void test_surface_from_dc3(void)
dd1 = createDDraw(); hr = IDirectDraw_QueryInterface(dd1, &IID_IDirectDraw3, (void **)&dd3); - ok(SUCCEEDED(hr), "IDirectDraw_QueryInterface failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "IDirectDraw_QueryInterface failed, hr %#lx.\n", hr); IDirectDraw_Release(dd1);
memset(&ddsd, 0, sizeof(ddsd)); @@ -265,33 +265,33 @@ static void test_surface_from_dc3(void) IDirectDraw3_Release(dd3); return; } - ok(SUCCEEDED(hr), "CreateSurface failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "CreateSurface failed, hr %#lx.\n", hr);
hr = IDirectDrawSurface3_QueryInterface(surf1, &IID_IDirectDrawSurface, (void **)&surf3); - ok(SUCCEEDED(hr), "QueryInterface failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "QueryInterface failed, hr %#lx.\n", hr); IDirectDrawSurface_Release(surf1);
hr = IDirectDrawSurface3_GetDC(surf3, &dc); - ok(SUCCEEDED(hr), "GetDC failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "GetDC failed, hr %#lx.\n", hr);
hr = IDirectDraw3_GetSurfaceFromDC(dd3, dc, NULL); - ok(hr == E_POINTER, "Expected E_POINTER, got %#x.\n", hr); + ok(hr == E_POINTER, "Expected E_POINTER, got %#lx.\n", hr);
hr = IDirectDraw3_GetSurfaceFromDC(dd3, dc, &tmp); - ok(SUCCEEDED(hr), "GetSurfaceFromDC failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "GetSurfaceFromDC failed, hr %#lx.\n", hr); ok((IDirectDrawSurface3 *)tmp == surf3, "Expected surface != %p.\n", surf3);
IUnknown_Release(tmp);
hr = IDirectDrawSurface3_ReleaseDC(surf3, dc); - ok(SUCCEEDED(hr), "ReleaseDC failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "ReleaseDC failed, hr %#lx.\n", hr);
dc = CreateCompatibleDC(NULL); ok(!!dc, "CreateCompatibleDC failed.\n");
tmp = (IDirectDrawSurface *)0xdeadbeef; hr = IDirectDraw3_GetSurfaceFromDC(dd3, dc, &tmp); - ok(hr == DDERR_NOTFOUND, "Expected DDERR_NOTFOUND, got %#x.\n", hr); + ok(hr == DDERR_NOTFOUND, "Expected DDERR_NOTFOUND, got %#lx.\n", hr); ok(!tmp, "Expected surface NULL, got %p.\n", tmp);
ok(DeleteDC(dc), "DeleteDC failed.\n"); @@ -321,7 +321,7 @@ static void test_surface_from_dc4(void) IDirectDraw_Release(dd1); return; } - ok(SUCCEEDED(hr), "IDirectDraw_QueryInterface failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "IDirectDraw_QueryInterface failed, hr %#lx.\n", hr); IDirectDraw_Release(dd1);
memset(&ddsd2, 0, sizeof(ddsd2)); @@ -337,65 +337,65 @@ static void test_surface_from_dc4(void) IDirectDraw3_Release(dd4); return; } - ok(SUCCEEDED(hr), "CreateSurface failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "CreateSurface failed, hr %#lx.\n", hr);
hr = IDirectDrawSurface4_QueryInterface(surf4, &IID_IDirectDrawSurface, (void **)&surf1); - ok(SUCCEEDED(hr), "QueryInterface failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "QueryInterface failed, hr %#lx.\n", hr);
priv = 0xdeadbeef; size = sizeof(priv); hr = IDirectDrawSurface4_SetPrivateData(surf4, &guid, &priv, size, 0); - ok(SUCCEEDED(hr), "SetPrivateData failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "SetPrivateData failed, hr %#lx.\n", hr);
priv = 0; hr = IDirectDrawSurface4_GetPrivateData(surf4, &guid, &priv, &size); - ok(SUCCEEDED(hr), "GetPrivateData failed, hr %#x.\n", hr); - ok(priv == 0xdeadbeef, "Expected private data 0xdeadbeef, got %#x.\n", priv); + ok(SUCCEEDED(hr), "GetPrivateData failed, hr %#lx.\n", hr); + ok(priv == 0xdeadbeef, "Expected private data 0xdeadbeef, got %#lx.\n", priv);
hr = IDirectDrawSurface4_GetDC(surf4, &dc); - ok(SUCCEEDED(hr), "GetDC failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "GetDC failed, hr %#lx.\n", hr);
hr = IDirectDraw4_GetSurfaceFromDC(dd4, dc, NULL); - ok(hr == E_INVALIDARG, "Expected E_INVALIDARG, got %#x.\n", hr); + ok(hr == E_INVALIDARG, "Expected E_INVALIDARG, got %#lx.\n", hr);
hr = IDirectDraw4_GetSurfaceFromDC(dd4, dc, (IDirectDrawSurface4 **)&tmp); - ok(SUCCEEDED(hr), "GetSurfaceFromDC failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "GetSurfaceFromDC failed, hr %#lx.\n", hr); ok((IDirectDrawSurface4 *)tmp != surf4, "Expected surface != %p.\n", surf4);
hr = IUnknown_QueryInterface(tmp, &IID_IDirectDrawSurface, (void **)&tmp2); - ok(SUCCEEDED(hr), "QueryInterface failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "QueryInterface failed, hr %#lx.\n", hr); ok(tmp2 == tmp, "Expected %p, got %p.\n", tmp, tmp2); ok((IDirectDrawSurface *)tmp2 != surf1, "Expected surface != %p.\n", surf1); IUnknown_Release(tmp2);
hr = IUnknown_QueryInterface(tmp, &IID_IDirectDrawSurface4, (void **)&tmp2); - ok(SUCCEEDED(hr), "QueryInterface failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "QueryInterface failed, hr %#lx.\n", hr); ok((IDirectDrawSurface4 *)tmp2 != surf4, "Expected surface != %p.\n", surf4);
priv = 0; hr = IDirectDrawSurface4_GetPrivateData((IDirectDrawSurface4 *)tmp2, &guid, &priv, &size); - ok(SUCCEEDED(hr), "GetPrivateData failed, hr %#x.\n", hr); - ok(priv == 0xdeadbeef, "Expected private data 0xdeadbeef, got %#x.\n", priv); + ok(SUCCEEDED(hr), "GetPrivateData failed, hr %#lx.\n", hr); + ok(priv == 0xdeadbeef, "Expected private data 0xdeadbeef, got %#lx.\n", priv); IUnknown_Release(tmp2);
IUnknown_Release(tmp);
hr = IDirectDrawSurface4_ReleaseDC(surf4, dc); - ok(SUCCEEDED(hr), "ReleaseDC failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "ReleaseDC failed, hr %#lx.\n", hr);
dc = CreateCompatibleDC(NULL); ok(!!dc, "CreateCompatibleDC failed.\n");
tmp = (IUnknown *)0xdeadbeef; hr = IDirectDraw4_GetSurfaceFromDC(dd4, dc, (IDirectDrawSurface4 **)&tmp); - ok(hr == DDERR_NOTFOUND, "Expected DDERR_NOTFOUND, got %#x.\n", hr); + ok(hr == DDERR_NOTFOUND, "Expected DDERR_NOTFOUND, got %#lx.\n", hr); ok(!tmp, "Expected surface NULL, got %p.\n", tmp);
ok(DeleteDC(dc), "DeleteDC failed.\n");
tmp = (IUnknown *)0xdeadbeef; hr = IDirectDraw4_GetSurfaceFromDC(dd4, NULL, (IDirectDrawSurface4 **)&tmp); - ok(hr == DDERR_NOTFOUND, "Expected DDERR_NOTFOUND, got %#x.\n", hr); + ok(hr == DDERR_NOTFOUND, "Expected DDERR_NOTFOUND, got %#lx.\n", hr); ok(!tmp, "Expected surface NULL, got %p.\n", tmp);
IDirectDrawSurface_Release(surf1); @@ -442,5 +442,5 @@ START_TEST(surface) ref = IDirectDrawFactory_Release(factory); ok(ref == 0, "IDirectDrawFactory not cleanly released\n"); ref = IClassFactory_Release(classfactory); - todo_wine ok(ref == 1, "IClassFactory refcount wrong, ref = %u\n", ref); + todo_wine ok(ref == 1, "IClassFactory refcount wrong, ref = %lu\n", ref); }
Signed-off-by: Eric Pouech eric.pouech@gmail.com
--- dlls/ddraw/tests/Makefile.in | 1 dlls/ddraw/tests/d3d.c | 620 ++--- dlls/ddraw/tests/ddraw1.c | 4082 +++++++++++++++--------------- dlls/ddraw/tests/ddraw2.c | 4704 +++++++++++++++++----------------- dlls/ddraw/tests/ddraw4.c | 5648 +++++++++++++++++++++-------------------- dlls/ddraw/tests/ddraw7.c | 5360 +++++++++++++++++++-------------------- dlls/ddraw/tests/ddrawmodes.c | 182 + dlls/ddraw/tests/dsurface.c | 752 +++-- dlls/ddraw/tests/refcount.c | 126 - dlls/ddraw/tests/visual.c | 448 ++- 10 files changed, 10961 insertions(+), 10962 deletions(-)
diff --git a/dlls/ddraw/tests/Makefile.in b/dlls/ddraw/tests/Makefile.in index 6316bf91892..a3d0ce5cf12 100644 --- a/dlls/ddraw/tests/Makefile.in +++ b/dlls/ddraw/tests/Makefile.in @@ -1,4 +1,3 @@ -EXTRADEFS = -DWINE_NO_LONG_TYPES TESTDLL = ddraw.dll IMPORTS = ddraw user32 gdi32 ole32
diff --git a/dlls/ddraw/tests/d3d.c b/dlls/ddraw/tests/d3d.c index d8f3618200b..e894e0fed23 100644 --- a/dlls/ddraw/tests/d3d.c +++ b/dlls/ddraw/tests/d3d.c @@ -99,14 +99,14 @@ static BOOL CreateDirect3D(void)
rc = pDirectDrawCreateEx(NULL, (void**)&lpDD, &IID_IDirectDraw7, NULL); - ok(rc==DD_OK || rc==DDERR_NODIRECTDRAWSUPPORT, "DirectDrawCreateEx returned: %x\n", rc); + ok(rc==DD_OK || rc==DDERR_NODIRECTDRAWSUPPORT, "DirectDrawCreateEx returned: %lx\n", rc); if (!lpDD) { - trace("DirectDrawCreateEx() failed with an error %x\n", rc); + trace("DirectDrawCreateEx() failed with an error %lx\n", rc); return FALSE; }
rc = IDirectDraw7_SetCooperativeLevel(lpDD, NULL, DDSCL_NORMAL); - ok(rc==DD_OK, "SetCooperativeLevel returned: %x\n", rc); + ok(rc==DD_OK, "SetCooperativeLevel returned: %lx\n", rc);
rc = IDirectDraw7_QueryInterface(lpDD, &IID_IDirect3D7, (void**) &lpD3D); if (rc == E_NOINTERFACE) @@ -114,7 +114,7 @@ static BOOL CreateDirect3D(void) IDirectDraw7_Release(lpDD); return FALSE; } - ok(rc==DD_OK, "QueryInterface returned: %x\n", rc); + ok(rc==DD_OK, "QueryInterface returned: %lx\n", rc);
memset(&ddsd, 0, sizeof(ddsd)); ddsd.dwSize = sizeof(ddsd); @@ -145,12 +145,12 @@ static BOOL CreateDirect3D(void) ddsd.dwWidth = 256; ddsd.dwHeight = 256; rc = IDirectDraw7_CreateSurface(lpDD, &ddsd, &lpDDSdepth, NULL); - ok(rc==DD_OK, "CreateSurface returned: %x\n", rc); + ok(rc==DD_OK, "CreateSurface returned: %lx\n", rc); if (FAILED(rc)) { lpDDSdepth = NULL; } else { rc = IDirectDrawSurface_AddAttachedSurface(lpDDS, lpDDSdepth); - ok(rc == DD_OK, "IDirectDrawSurface_AddAttachedSurface returned %x\n", rc); + ok(rc == DD_OK, "IDirectDrawSurface_AddAttachedSurface returned %lx\n", rc); if (FAILED(rc)) { IDirectDrawSurface7_Release(lpDDSdepth); @@ -163,17 +163,17 @@ static BOOL CreateDirect3D(void)
rc = IDirect3D7_CreateDevice(lpD3D, &IID_IDirect3DTnLHalDevice, lpDDS, &lpD3DDevice); - ok(rc==D3D_OK || rc==DDERR_NOPALETTEATTACHED || rc==E_OUTOFMEMORY, "CreateDevice returned: %x\n", rc); + ok(rc==D3D_OK || rc==DDERR_NOPALETTEATTACHED || rc==E_OUTOFMEMORY, "CreateDevice returned: %lx\n", rc); if (!lpD3DDevice) { - trace("IDirect3D7::CreateDevice() for a TnL Hal device failed with an error %x, trying HAL\n", rc); + trace("IDirect3D7::CreateDevice() for a TnL Hal device failed with an error %lx, trying HAL\n", rc); rc = IDirect3D7_CreateDevice(lpD3D, &IID_IDirect3DHALDevice, lpDDS, &lpD3DDevice); if (!lpD3DDevice) { - trace("IDirect3D7::CreateDevice() for a HAL device failed with an error %x, trying RGB\n", rc); + trace("IDirect3D7::CreateDevice() for a HAL device failed with an error %lx, trying RGB\n", rc); rc = IDirect3D7_CreateDevice(lpD3D, &IID_IDirect3DRGBDevice, lpDDS, &lpD3DDevice); if (!lpD3DDevice) { - trace("IDirect3D7::CreateDevice() for a RGB device failed with an error %x, giving up\n", rc); + trace("IDirect3D7::CreateDevice() for a RGB device failed with an error %lx, giving up\n", rc); if (lpDDSdepth) IDirectDrawSurface7_Release(lpDDSdepth); IDirectDrawSurface7_Release(lpDDS); @@ -242,29 +242,29 @@ static void LightTest(void) U2(light.dvDirection).y = 1.f;
rc = IDirect3DDevice7_SetLight(lpD3DDevice, 5, &light); - ok(rc==D3D_OK, "SetLight returned: %x\n", rc); + ok(rc==D3D_OK, "SetLight returned: %lx\n", rc); rc = IDirect3DDevice7_SetLight(lpD3DDevice, 10, &light); - ok(rc==D3D_OK, "SetLight returned: %x\n", rc); + ok(rc==D3D_OK, "SetLight returned: %lx\n", rc); rc = IDirect3DDevice7_SetLight(lpD3DDevice, 45, &light); - ok(rc==D3D_OK, "SetLight returned: %x\n", rc); + ok(rc==D3D_OK, "SetLight returned: %lx\n", rc);
/* Try to retrieve a light beyond the indices of the lights that have been set. */ rc = IDirect3DDevice7_GetLight(lpD3DDevice, 50, &light); - ok(rc==DDERR_INVALIDPARAMS, "GetLight returned: %x\n", rc); + ok(rc==DDERR_INVALIDPARAMS, "GetLight returned: %lx\n", rc); rc = IDirect3DDevice7_GetLight(lpD3DDevice, 2, &light); - ok(rc==DDERR_INVALIDPARAMS, "GetLight returned: %x\n", rc); + ok(rc==DDERR_INVALIDPARAMS, "GetLight returned: %lx\n", rc);
/* Try to retrieve one of the lights that have been set */ rc = IDirect3DDevice7_GetLight(lpD3DDevice, 10, &light); - ok(rc==D3D_OK, "GetLight returned: %x\n", rc); + ok(rc==D3D_OK, "GetLight returned: %lx\n", rc);
/* Enable a light that have been previously set. */ rc = IDirect3DDevice7_LightEnable(lpD3DDevice, 10, TRUE); - ok(rc==D3D_OK, "LightEnable returned: %x\n", rc); + ok(rc==D3D_OK, "LightEnable returned: %lx\n", rc);
/* Enable some lights that have not been previously set, and verify that @@ -277,45 +277,45 @@ static void LightTest(void) U3(defaultlight.dvDirection).z = 1.f;
rc = IDirect3DDevice7_LightEnable(lpD3DDevice, 20, TRUE); - ok(rc==D3D_OK, "LightEnable returned: %x\n", rc); + ok(rc==D3D_OK, "LightEnable returned: %lx\n", rc); memset(&light, 0, sizeof(D3DLIGHT7)); rc = IDirect3DDevice7_GetLight(lpD3DDevice, 20, &light); - ok(rc==D3D_OK, "GetLight returned: %x\n", rc); + ok(rc==D3D_OK, "GetLight returned: %lx\n", rc); ok(!memcmp(&light, &defaultlight, sizeof(D3DLIGHT7)), "light data doesn't match expected default values\n" );
rc = IDirect3DDevice7_LightEnable(lpD3DDevice, 50, TRUE); - ok(rc==D3D_OK, "LightEnable returned: %x\n", rc); + ok(rc==D3D_OK, "LightEnable returned: %lx\n", rc); memset(&light, 0, sizeof(D3DLIGHT7)); rc = IDirect3DDevice7_GetLight(lpD3DDevice, 50, &light); - ok(rc==D3D_OK, "GetLight returned: %x\n", rc); + ok(rc==D3D_OK, "GetLight returned: %lx\n", rc); ok(!memcmp(&light, &defaultlight, sizeof(D3DLIGHT7)), "light data doesn't match expected default values\n" );
/* Disable one of the light that have been previously enabled. */ rc = IDirect3DDevice7_LightEnable(lpD3DDevice, 20, FALSE); - ok(rc==D3D_OK, "LightEnable returned: %x\n", rc); + ok(rc==D3D_OK, "LightEnable returned: %lx\n", rc);
/* Try to retrieve the enable status of some lights */ /* Light 20 is supposed to be disabled */ rc = IDirect3DDevice7_GetLightEnable(lpD3DDevice, 20, &bEnabled ); - ok(rc==D3D_OK, "GetLightEnable returned: %x\n", rc); + ok(rc==D3D_OK, "GetLightEnable returned: %lx\n", rc); ok(!bEnabled, "GetLightEnable says the light is enabled\n");
/* Light 10 is supposed to be enabled */ bEnabled = FALSE; rc = IDirect3DDevice7_GetLightEnable(lpD3DDevice, 10, &bEnabled ); - ok(rc==D3D_OK, "GetLightEnable returned: %x\n", rc); + ok(rc==D3D_OK, "GetLightEnable returned: %lx\n", rc); ok(bEnabled, "GetLightEnable says the light is disabled\n");
/* Light 80 has not been set */ rc = IDirect3DDevice7_GetLightEnable(lpD3DDevice, 80, &bEnabled ); - ok(rc==DDERR_INVALIDPARAMS, "GetLightEnable returned: %x\n", rc); + ok(rc==DDERR_INVALIDPARAMS, "GetLightEnable returned: %lx\n", rc);
/* Light 23 has not been set */ rc = IDirect3DDevice7_GetLightEnable(lpD3DDevice, 23, &bEnabled ); - ok(rc==DDERR_INVALIDPARAMS, "GetLightEnable returned: %x\n", rc); + ok(rc==DDERR_INVALIDPARAMS, "GetLightEnable returned: %lx\n", rc);
/* Set some lights with invalid parameters */ memset(&light, 0, sizeof(D3DLIGHT7)); @@ -325,7 +325,7 @@ static void LightTest(void) U3(light.dcvDiffuse).b = 1.f; U3(light.dvDirection).z = 1.f; rc = IDirect3DDevice7_SetLight(lpD3DDevice, 100, &light); - ok(rc==DDERR_INVALIDPARAMS, "SetLight returned: %x\n", rc); + ok(rc==DDERR_INVALIDPARAMS, "SetLight returned: %lx\n", rc);
memset(&light, 0, sizeof(D3DLIGHT7)); light.dltType = 12345; @@ -334,10 +334,10 @@ static void LightTest(void) U3(light.dcvDiffuse).b = 1.f; U3(light.dvDirection).z = 1.f; rc = IDirect3DDevice7_SetLight(lpD3DDevice, 101, &light); - ok(rc==DDERR_INVALIDPARAMS, "SetLight returned: %x\n", rc); + ok(rc==DDERR_INVALIDPARAMS, "SetLight returned: %lx\n", rc);
rc = IDirect3DDevice7_SetLight(lpD3DDevice, 102, NULL); - ok(rc==DDERR_INVALIDPARAMS, "SetLight returned: %x\n", rc); + ok(rc==DDERR_INVALIDPARAMS, "SetLight returned: %lx\n", rc);
memset(&light, 0, sizeof(D3DLIGHT7)); light.dltType = D3DLIGHT_SPOT; @@ -348,58 +348,58 @@ static void LightTest(void)
light.dvAttenuation0 = -one / zero; /* -INFINITY */ rc = IDirect3DDevice7_SetLight(lpD3DDevice, 103, &light); - ok(rc==DDERR_INVALIDPARAMS, "SetLight returned: %x\n", rc); + ok(rc==DDERR_INVALIDPARAMS, "SetLight returned: %lx\n", rc);
light.dvAttenuation0 = -1.0; rc = IDirect3DDevice7_SetLight(lpD3DDevice, 103, &light); - ok(rc==DDERR_INVALIDPARAMS, "SetLight returned: %x\n", rc); + ok(rc==DDERR_INVALIDPARAMS, "SetLight returned: %lx\n", rc);
light.dvAttenuation0 = 0.0; rc = IDirect3DDevice7_SetLight(lpD3DDevice, 103, &light); - ok(rc==D3D_OK, "SetLight returned: %x\n", rc); + ok(rc==D3D_OK, "SetLight returned: %lx\n", rc);
light.dvAttenuation0 = 1.0; rc = IDirect3DDevice7_SetLight(lpD3DDevice, 103, &light); - ok(rc==D3D_OK, "SetLight returned: %x\n", rc); + ok(rc==D3D_OK, "SetLight returned: %lx\n", rc);
light.dvAttenuation0 = one / zero; /* +INFINITY */ rc = IDirect3DDevice7_SetLight(lpD3DDevice, 103, &light); - ok(rc==D3D_OK, "SetLight returned: %x\n", rc); + ok(rc==D3D_OK, "SetLight returned: %lx\n", rc);
light.dvAttenuation0 = zero / zero; /* NaN */ rc = IDirect3DDevice7_SetLight(lpD3DDevice, 103, &light); ok(rc==D3D_OK || - broken(rc==DDERR_INVALIDPARAMS), "SetLight returned: %x\n", rc); + broken(rc==DDERR_INVALIDPARAMS), "SetLight returned: %lx\n", rc);
/* Directional light ignores attenuation */ light.dltType = D3DLIGHT_DIRECTIONAL; light.dvAttenuation0 = -1.0; rc = IDirect3DDevice7_SetLight(lpD3DDevice, 103, &light); - ok(rc==D3D_OK, "SetLight returned: %x\n", rc); + ok(rc==D3D_OK, "SetLight returned: %lx\n", rc);
memset(&mat, 0, sizeof(mat)); rc = IDirect3DDevice7_SetMaterial(lpD3DDevice, &mat); - ok(rc == D3D_OK, "IDirect3DDevice7_SetMaterial returned: %x\n", rc); + ok(rc == D3D_OK, "IDirect3DDevice7_SetMaterial returned: %lx\n", rc);
U4(mat).power = 129.0; rc = IDirect3DDevice7_SetMaterial(lpD3DDevice, &mat); - ok(rc == D3D_OK, "IDirect3DDevice7_SetMaterial(power = 129.0) returned: %x\n", rc); + ok(rc == D3D_OK, "IDirect3DDevice7_SetMaterial(power = 129.0) returned: %lx\n", rc); memset(&mat, 0, sizeof(mat)); rc = IDirect3DDevice7_GetMaterial(lpD3DDevice, &mat); - ok(rc == D3D_OK, "IDirect3DDevice7_GetMaterial returned: %x\n", rc); + ok(rc == D3D_OK, "IDirect3DDevice7_GetMaterial returned: %lx\n", rc); ok(U4(mat).power == 129, "Returned power is %f\n", U4(mat).power);
U4(mat).power = -1.0; rc = IDirect3DDevice7_SetMaterial(lpD3DDevice, &mat); - ok(rc == D3D_OK, "IDirect3DDevice7_SetMaterial(power = -1.0) returned: %x\n", rc); + ok(rc == D3D_OK, "IDirect3DDevice7_SetMaterial(power = -1.0) returned: %lx\n", rc); memset(&mat, 0, sizeof(mat)); rc = IDirect3DDevice7_GetMaterial(lpD3DDevice, &mat); - ok(rc == D3D_OK, "IDirect3DDevice7_GetMaterial returned: %x\n", rc); + ok(rc == D3D_OK, "IDirect3DDevice7_GetMaterial returned: %lx\n", rc); ok(U4(mat).power == -1, "Returned power is %f\n", U4(mat).power);
memset(&caps, 0, sizeof(caps)); rc = IDirect3DDevice7_GetCaps(lpD3DDevice, &caps); - ok(rc == D3D_OK, "IDirect3DDevice7_GetCaps failed with %x\n", rc); + ok(rc == D3D_OK, "IDirect3DDevice7_GetCaps failed with %lx\n", rc);
if ( caps.dwMaxActiveLights == (DWORD) -1) { /* Some cards without T&L Support return -1 (Examples: Voodoo Banshee, RivaTNT / NV4) */ @@ -409,24 +409,24 @@ static void LightTest(void)
for(i = 1; i <= caps.dwMaxActiveLights; i++) { rc = IDirect3DDevice7_LightEnable(lpD3DDevice, i, TRUE); - ok(rc == D3D_OK, "Enabling light %u failed with %x\n", i, rc); + ok(rc == D3D_OK, "Enabling light %u failed with %lx\n", i, rc); rc = IDirect3DDevice7_GetLightEnable(lpD3DDevice, i, &enabled); - ok(rc == D3D_OK, "GetLightEnable on light %u failed with %x\n", i, rc); + ok(rc == D3D_OK, "GetLightEnable on light %u failed with %lx\n", i, rc); ok(enabled, "Light %d is %s\n", i, enabled ? "enabled" : "disabled"); }
/* TODO: Test the rendering results in this situation */ rc = IDirect3DDevice7_LightEnable(lpD3DDevice, i + 1, TRUE); - ok(rc == D3D_OK, "Enabling one light more than supported returned %x\n", rc); + ok(rc == D3D_OK, "Enabling one light more than supported returned %lx\n", rc); rc = IDirect3DDevice7_GetLightEnable(lpD3DDevice, i + 1, &enabled); - ok(rc == D3D_OK, "GetLightEnable on light %u failed with %x\n", i + 1, rc); + ok(rc == D3D_OK, "GetLightEnable on light %u failed with %lx\n", i + 1, rc); ok(enabled, "Light %d is %s\n", i + 1, enabled ? "enabled" : "disabled"); rc = IDirect3DDevice7_LightEnable(lpD3DDevice, i + 1, FALSE); - ok(rc == D3D_OK, "Disabling the additional returned %x\n", rc); + ok(rc == D3D_OK, "Disabling the additional returned %lx\n", rc);
for(i = 1; i <= caps.dwMaxActiveLights; i++) { rc = IDirect3DDevice7_LightEnable(lpD3DDevice, i, FALSE); - ok(rc == D3D_OK, "Disabling light %u failed with %x\n", i, rc); + ok(rc == D3D_OK, "Disabling light %u failed with %lx\n", i, rc); } }
@@ -436,15 +436,15 @@ static void SceneTest(void)
/* Test an EndScene without BeginScene. Should return an error */ hr = IDirect3DDevice7_EndScene(lpD3DDevice); - ok(hr == D3DERR_SCENE_NOT_IN_SCENE, "IDirect3DDevice7_EndScene returned %08x\n", hr); + ok(hr == D3DERR_SCENE_NOT_IN_SCENE, "IDirect3DDevice7_EndScene returned %08lx\n", hr);
/* Test a normal BeginScene / EndScene pair, this should work */ hr = IDirect3DDevice7_BeginScene(lpD3DDevice); - ok(hr == D3D_OK, "IDirect3DDevice7_BeginScene failed with %08x\n", hr); + ok(hr == D3D_OK, "IDirect3DDevice7_BeginScene failed with %08lx\n", hr); if (SUCCEEDED(hr)) { hr = IDirect3DDevice7_EndScene(lpD3DDevice); - ok(hr == D3D_OK, "IDirect3DDevice7_EndScene failed with %08x\n", hr); + ok(hr == D3D_OK, "IDirect3DDevice7_EndScene failed with %08lx\n", hr); }
if (lpDDSdepth) @@ -454,17 +454,17 @@ static void SceneTest(void) fx.dwSize = sizeof(fx);
hr = IDirectDrawSurface7_Blt(lpDDSdepth, NULL, NULL, NULL, DDBLT_DEPTHFILL, &fx); - ok(hr == D3D_OK, "Depthfill failed outside a BeginScene / EndScene pair, hr 0x%08x\n", hr); + ok(hr == D3D_OK, "Depthfill failed outside a BeginScene / EndScene pair, hr 0x%08lx\n", hr);
hr = IDirect3DDevice7_BeginScene(lpD3DDevice); - ok(hr == D3D_OK, "IDirect3DDevice7_BeginScene failed with %08x\n", hr); + ok(hr == D3D_OK, "IDirect3DDevice7_BeginScene failed with %08lx\n", hr); if (SUCCEEDED(hr)) { hr = IDirectDrawSurface7_Blt(lpDDSdepth, NULL, NULL, NULL, DDBLT_DEPTHFILL, &fx); ok(hr == D3D_OK || broken(hr == E_FAIL), - "Depthfill failed in a BeginScene / EndScene pair, hr 0x%08x\n", hr); + "Depthfill failed in a BeginScene / EndScene pair, hr 0x%08lx\n", hr); hr = IDirect3DDevice7_EndScene(lpD3DDevice); - ok(hr == D3D_OK, "IDirect3DDevice7_EndScene failed with %08x\n", hr); + ok(hr == D3D_OK, "IDirect3DDevice7_EndScene failed with %08lx\n", hr); } } else @@ -474,17 +474,17 @@ static void SceneTest(void)
/* Test another EndScene without having begun a new scene. Should return an error */ hr = IDirect3DDevice7_EndScene(lpD3DDevice); - ok(hr == D3DERR_SCENE_NOT_IN_SCENE, "IDirect3DDevice7_EndScene returned %08x\n", hr); + ok(hr == D3DERR_SCENE_NOT_IN_SCENE, "IDirect3DDevice7_EndScene returned %08lx\n", hr);
/* Two nested BeginScene and EndScene calls */ hr = IDirect3DDevice7_BeginScene(lpD3DDevice); - ok(hr == D3D_OK, "IDirect3DDevice7_BeginScene failed with %08x\n", hr); + ok(hr == D3D_OK, "IDirect3DDevice7_BeginScene failed with %08lx\n", hr); hr = IDirect3DDevice7_BeginScene(lpD3DDevice); - ok(hr == D3DERR_SCENE_IN_SCENE, "IDirect3DDevice7_BeginScene returned %08x\n", hr); + ok(hr == D3DERR_SCENE_IN_SCENE, "IDirect3DDevice7_BeginScene returned %08lx\n", hr); hr = IDirect3DDevice7_EndScene(lpD3DDevice); - ok(hr == D3D_OK, "IDirect3DDevice7_EndScene failed with %08x\n", hr); + ok(hr == D3D_OK, "IDirect3DDevice7_EndScene failed with %08lx\n", hr); hr = IDirect3DDevice7_EndScene(lpD3DDevice); - ok(hr == D3DERR_SCENE_NOT_IN_SCENE, "IDirect3DDevice7_EndScene returned %08x\n", hr); + ok(hr == D3DERR_SCENE_NOT_IN_SCENE, "IDirect3DDevice7_EndScene returned %08lx\n", hr);
/* TODO: Verify that blitting works in the same way as in d3d9 */ } @@ -513,20 +513,20 @@ static HRESULT WINAPI enumDevicesCallback(GUID *Guid, char *DeviceDescription, ok(hel->dpcTriCaps.dwTextureCaps & D3DPTEXTURECAPS_PERSPECTIVE, "RGB Device %d hel tri caps does not have D3DPTEXTURECAPS_PERSPECTIVE set\n", ver);
- ok(hal->dcmColorModel == 0, "RGB Device %u hal caps has colormodel %u\n", ver, hal->dcmColorModel); - ok(hel->dcmColorModel == D3DCOLOR_RGB, "RGB Device %u hel caps has colormodel %u\n", ver, hel->dcmColorModel); + ok(hal->dcmColorModel == 0, "RGB Device %u hal caps has colormodel %lu\n", ver, hal->dcmColorModel); + ok(hel->dcmColorModel == D3DCOLOR_RGB, "RGB Device %u hel caps has colormodel %lu\n", ver, hel->dcmColorModel);
- ok(hal->dwFlags == 0, "RGB Device %u hal caps has hardware flags %x\n", ver, hal->dwFlags); - ok(hel->dwFlags != 0, "RGB Device %u hel caps has hardware flags %x\n", ver, hel->dwFlags); + ok(hal->dwFlags == 0, "RGB Device %u hal caps has hardware flags %lx\n", ver, hal->dwFlags); + ok(hel->dwFlags != 0, "RGB Device %u hel caps has hardware flags %lx\n", ver, hel->dwFlags); } else if(IsEqualGUID(&IID_IDirect3DHALDevice, Guid)) { trace("HAL Device %d\n", ver); - ok(hal->dcmColorModel == D3DCOLOR_RGB, "HAL Device %u hal caps has colormodel %u\n", ver, hel->dcmColorModel); - ok(hel->dcmColorModel == 0, "HAL Device %u hel caps has colormodel %u\n", ver, hel->dcmColorModel); + ok(hal->dcmColorModel == D3DCOLOR_RGB, "HAL Device %u hal caps has colormodel %lu\n", ver, hel->dcmColorModel); + ok(hel->dcmColorModel == 0, "HAL Device %u hel caps has colormodel %lu\n", ver, hel->dcmColorModel);
- ok(hal->dwFlags != 0, "HAL Device %u hal caps has hardware flags %x\n", ver, hal->dwFlags); - ok(hel->dwFlags != 0, "HAL Device %u hel caps has hardware flags %x\n", ver, hel->dwFlags); + ok(hal->dwFlags != 0, "HAL Device %u hal caps has hardware flags %lx\n", ver, hal->dwFlags); + ok(hel->dwFlags != 0, "HAL Device %u hel caps has hardware flags %lx\n", ver, hel->dwFlags); } else if(IsEqualGUID(&IID_IDirect3DRefDevice, Guid)) { @@ -568,12 +568,12 @@ static HRESULT WINAPI enumDevicesCallback(GUID *Guid, char *DeviceDescription, ok(hel->dpcTriCaps.dwTextureCaps & D3DPTEXTURECAPS_PERSPECTIVE, "Ramp Device %d hel tri caps does not have D3DPTEXTURECAPS_PERSPECTIVE set\n", ver);
- ok(hal->dcmColorModel == 0, "Ramp Device %u hal caps has colormodel %u\n", ver, hal->dcmColorModel); - ok(hel->dcmColorModel == D3DCOLOR_MONO, "Ramp Device %u hel caps has colormodel %u\n", + ok(hal->dcmColorModel == 0, "Ramp Device %u hal caps has colormodel %lu\n", ver, hal->dcmColorModel); + ok(hel->dcmColorModel == D3DCOLOR_MONO, "Ramp Device %u hel caps has colormodel %lu\n", ver, hel->dcmColorModel);
- ok(hal->dwFlags == 0, "Ramp Device %u hal caps has hardware flags %x\n", ver, hal->dwFlags); - ok(hel->dwFlags != 0, "Ramp Device %u hel caps has hardware flags %x\n", ver, hel->dwFlags); + ok(hal->dwFlags == 0, "Ramp Device %u hal caps has hardware flags %lx\n", ver, hal->dwFlags); + ok(hel->dwFlags != 0, "Ramp Device %u hel caps has hardware flags %lx\n", ver, hel->dwFlags); } else if(IsEqualGUID(&IID_IDirect3DMMXDevice, Guid)) { @@ -595,11 +595,11 @@ static HRESULT WINAPI enumDevicesCallback(GUID *Guid, char *DeviceDescription, ok(hel->dpcTriCaps.dwTextureCaps & D3DPTEXTURECAPS_PERSPECTIVE, "MMX Device %d hel tri caps does not have D3DPTEXTURECAPS_PERSPECTIVE set\n", ver);
- ok(hal->dcmColorModel == 0, "MMX Device %u hal caps has colormodel %u\n", ver, hal->dcmColorModel); - ok(hel->dcmColorModel == D3DCOLOR_RGB, "MMX Device %u hel caps has colormodel %u\n", ver, hel->dcmColorModel); + ok(hal->dcmColorModel == 0, "MMX Device %u hal caps has colormodel %lu\n", ver, hal->dcmColorModel); + ok(hel->dcmColorModel == D3DCOLOR_RGB, "MMX Device %u hel caps has colormodel %lu\n", ver, hel->dcmColorModel);
- ok(hal->dwFlags == 0, "MMX Device %u hal caps has hardware flags %x\n", ver, hal->dwFlags); - ok(hel->dwFlags != 0, "MMX Device %u hel caps has hardware flags %x\n", ver, hel->dwFlags); + ok(hal->dwFlags == 0, "MMX Device %u hal caps has hardware flags %lx\n", ver, hal->dwFlags); + ok(hel->dwFlags != 0, "MMX Device %u hel caps has hardware flags %lx\n", ver, hel->dwFlags); } else { @@ -673,11 +673,11 @@ static void D3D7EnumTest(void) D3D7ECancelTest d3d7_cancel_test;
hr = IDirect3D7_EnumDevices(lpD3D, NULL, NULL); - ok(hr == DDERR_INVALIDPARAMS, "IDirect3D7_EnumDevices returned 0x%08x\n", hr); + ok(hr == DDERR_INVALIDPARAMS, "IDirect3D7_EnumDevices returned 0x%08lx\n", hr);
memset(&d3d7et, 0, sizeof(d3d7et)); hr = IDirect3D7_EnumDevices(lpD3D, enumDevicesCallbackTest7, &d3d7et); - ok(hr == D3D_OK, "IDirect3D7_EnumDevices returned 0x%08x\n", hr); + ok(hr == D3D_OK, "IDirect3D7_EnumDevices returned 0x%08lx\n", hr);
/* A couple of games (Delta Force LW and TFD) rely on this behaviour */ ok(d3d7et.tnlhal < d3d7et.total, "TnLHal device enumerated as only device.\n"); @@ -691,7 +691,7 @@ static void D3D7EnumTest(void) d3d7_cancel_test.desired_ret = DDENUMRET_CANCEL; d3d7_cancel_test.total = 0; hr = IDirect3D7_EnumDevices(lpD3D, enumDevicesCancelTest7, &d3d7_cancel_test); - ok(hr == D3D_OK, "IDirect3D7_EnumDevices returned 0x%08x\n", hr); + ok(hr == D3D_OK, "IDirect3D7_EnumDevices returned 0x%08lx\n", hr);
ok(d3d7_cancel_test.total == 1, "Enumerated a total of %u devices\n", d3d7_cancel_test.total); @@ -700,7 +700,7 @@ static void D3D7EnumTest(void) d3d7_cancel_test.desired_ret = E_INVALIDARG; d3d7_cancel_test.total = 0; hr = IDirect3D7_EnumDevices(lpD3D, enumDevicesCancelTest7, &d3d7_cancel_test); - ok(hr == D3D_OK, "IDirect3D7_EnumDevices returned 0x%08x\n", hr); + ok(hr == D3D_OK, "IDirect3D7_EnumDevices returned 0x%08lx\n", hr);
ok(d3d7_cancel_test.total == 1, "Enumerated a total of %u devices\n", d3d7_cancel_test.total); @@ -714,7 +714,7 @@ static void D3D7EnumLifetimeTest(void)
ctx.count = 0; hr = IDirect3D7_EnumDevices(lpD3D, enumDevicesLifetimeTest7, &ctx); - ok(hr == D3D_OK, "IDirect3D7_EnumDevices returned 0x%08x\n", hr); + ok(hr == D3D_OK, "IDirect3D7_EnumDevices returned 0x%08lx\n", hr);
/* The enumeration strings remain valid even after IDirect3D7_EnumDevices finishes. */ for (i = 0; i < ctx.count; i++) @@ -727,7 +727,7 @@ static void D3D7EnumLifetimeTest(void)
ctx2.count = 0; hr = IDirect3D7_EnumDevices(lpD3D, enumDevicesLifetimeTest7, &ctx2); - ok(hr == D3D_OK, "IDirect3D7_EnumDevices returned 0x%08x\n", hr); + ok(hr == D3D_OK, "IDirect3D7_EnumDevices returned 0x%08lx\n", hr);
/* The enumeration strings and their order are identical across enumerations. */ ok(ctx.count == ctx2.count, "Enumerated %u and %u devices\n", ctx.count, ctx2.count); @@ -755,7 +755,7 @@ static void D3D7EnumLifetimeTest(void)
ctx2.count = 0; hr = IDirect3D7_EnumDevices(lpD3D, enumDevicesLifetimeTest7, &ctx2); - ok(hr == D3D_OK, "IDirect3D7_EnumDevices returned 0x%08x\n", hr); + ok(hr == D3D_OK, "IDirect3D7_EnumDevices returned 0x%08lx\n", hr);
/* The original contents of the enumeration strings are not restored. */ ok(ctx.count == ctx2.count, "Enumerated %u and %u devices\n", ctx.count, ctx2.count); @@ -784,12 +784,12 @@ static void CapsTest(void) UINT ver;
hr = DirectDrawCreate(NULL, &dd1, NULL); - ok(hr == DD_OK, "Cannot create a DirectDraw 1 interface, hr = %08x\n", hr); + ok(hr == DD_OK, "Cannot create a DirectDraw 1 interface, hr = %08lx\n", hr); hr = IDirectDraw_QueryInterface(dd1, &IID_IDirect3D3, (void **) &d3d3); - ok(hr == D3D_OK, "IDirectDraw_QueryInterface returned %08x\n", hr); + ok(hr == D3D_OK, "IDirectDraw_QueryInterface returned %08lx\n", hr);
hr = IDirect3D3_EnumDevices(d3d3, NULL, NULL); - ok(hr == DDERR_INVALIDPARAMS, "IDirect3D3_EnumDevices returned 0x%08x\n", hr); + ok(hr == DDERR_INVALIDPARAMS, "IDirect3D3_EnumDevices returned 0x%08lx\n", hr);
ver = 3; IDirect3D3_EnumDevices(d3d3, enumDevicesCallback, &ver); @@ -798,12 +798,12 @@ static void CapsTest(void) IDirectDraw_Release(dd1);
hr = DirectDrawCreate(NULL, &dd1, NULL); - ok(hr == DD_OK, "Cannot create a DirectDraw 1 interface, hr = %08x\n", hr); + ok(hr == DD_OK, "Cannot create a DirectDraw 1 interface, hr = %08lx\n", hr); hr = IDirectDraw_QueryInterface(dd1, &IID_IDirect3D2, (void **) &d3d2); - ok(hr == D3D_OK, "IDirectDraw_QueryInterface returned %08x\n", hr); + ok(hr == D3D_OK, "IDirectDraw_QueryInterface returned %08lx\n", hr);
hr = IDirect3D2_EnumDevices(d3d2, NULL, NULL); - ok(hr == DDERR_INVALIDPARAMS, "IDirect3D2_EnumDevices returned 0x%08x\n", hr); + ok(hr == DDERR_INVALIDPARAMS, "IDirect3D2_EnumDevices returned 0x%08lx\n", hr);
ver = 2; IDirect3D2_EnumDevices(d3d2, enumDevicesCallback, &ver); @@ -828,17 +828,17 @@ static BOOL D3D1_createObjects(void)
/* An IDirect3DDevice cannot be queryInterfaced from an IDirect3DDevice7 on windows */ hr = DirectDrawCreate(NULL, &DirectDraw1, NULL); - ok(hr==DD_OK || hr==DDERR_NODIRECTDRAWSUPPORT, "DirectDrawCreate returned: %x\n", hr); + ok(hr==DD_OK || hr==DDERR_NODIRECTDRAWSUPPORT, "DirectDrawCreate returned: %lx\n", hr); if (!DirectDraw1) { return FALSE; }
hr = IDirectDraw_SetCooperativeLevel(DirectDraw1, NULL, DDSCL_NORMAL); - ok(hr==DD_OK, "SetCooperativeLevel returned: %x\n", hr); + ok(hr==DD_OK, "SetCooperativeLevel returned: %lx\n", hr);
hr = IDirectDraw_QueryInterface(DirectDraw1, &IID_IDirect3D, (void**) &Direct3D1); if (hr == E_NOINTERFACE) return FALSE; - ok(hr==DD_OK, "QueryInterface returned: %x\n", hr); + ok(hr==DD_OK, "QueryInterface returned: %lx\n", hr); if (!Direct3D1) { return FALSE; } @@ -856,7 +856,7 @@ static BOOL D3D1_createObjects(void) }
hr = IDirectDrawSurface_QueryInterface(Surface1, &IID_IDirect3DRGBDevice, (void **) &Direct3DDevice1); - ok(hr==D3D_OK || hr==DDERR_NOPALETTEATTACHED || hr==E_OUTOFMEMORY, "CreateDevice returned: %x\n", hr); + ok(hr==D3D_OK || hr==DDERR_NOPALETTEATTACHED || hr==E_OUTOFMEMORY, "CreateDevice returned: %lx\n", hr); if(!Direct3DDevice1) { return FALSE; } @@ -868,22 +868,22 @@ static BOOL D3D1_createObjects(void) desc.dwBufferSize = 128; desc.lpData = NULL; hr = IDirect3DDevice_CreateExecuteBuffer(Direct3DDevice1, &desc, &ExecuteBuffer, NULL); - ok(hr == D3D_OK, "IDirect3DDevice_CreateExecuteBuffer failed: %08x\n", hr); + ok(hr == D3D_OK, "IDirect3DDevice_CreateExecuteBuffer failed: %08lx\n", hr); if(!ExecuteBuffer) { return FALSE; }
hr = IDirect3D_CreateViewport(Direct3D1, &Viewport, NULL); - ok(hr == D3D_OK, "IDirect3D_CreateViewport failed: %08x\n", hr); + ok(hr == D3D_OK, "IDirect3D_CreateViewport failed: %08lx\n", hr); if(!Viewport) { return FALSE; }
hr = IDirect3DViewport_Initialize(Viewport, Direct3D1); - ok(hr == DDERR_ALREADYINITIALIZED, "IDirect3DViewport_Initialize returned %08x\n", hr); + ok(hr == DDERR_ALREADYINITIALIZED, "IDirect3DViewport_Initialize returned %08lx\n", hr);
hr = IDirect3DDevice_AddViewport(Direct3DDevice1, Viewport); - ok(hr == D3D_OK, "IDirect3DDevice_AddViewport returned %08x\n", hr); + ok(hr == D3D_OK, "IDirect3DDevice_AddViewport returned %08lx\n", hr); vp_data.dwSize = sizeof(vp_data); vp_data.dwX = 0; vp_data.dwY = 0; @@ -896,10 +896,10 @@ static BOOL D3D1_createObjects(void) vp_data.dvMinZ = 0; vp_data.dvMaxZ = 1; hr = IDirect3DViewport_SetViewport(Viewport, &vp_data); - ok(hr == D3D_OK, "IDirect3DViewport_SetViewport returned %08x\n", hr); + ok(hr == D3D_OK, "IDirect3DViewport_SetViewport returned %08lx\n", hr);
hr = IDirect3D_CreateLight(Direct3D1, &Light, NULL); - ok(hr == D3D_OK, "IDirect3D_CreateLight failed: %08x\n", hr); + ok(hr == D3D_OK, "IDirect3D_CreateLight failed: %08lx\n", hr); if (!Light) return FALSE;
@@ -929,14 +929,14 @@ static void ViewportTest(void) *(DWORD*)&infinity = 0x7f800000;
hr = IDirect3DDevice_AddViewport(Direct3DDevice1, Viewport); - ok(hr == D3D_OK, "IDirect3DDevice_AddViewport returned %08x\n", hr); + ok(hr == D3D_OK, "IDirect3DDevice_AddViewport returned %08lx\n", hr);
hr = IDirect3DViewport_QueryInterface(Viewport, &IID_IDirect3DViewport2, (void**) &Viewport2); - ok(hr==D3D_OK, "QueryInterface returned: %x\n", hr); + ok(hr==D3D_OK, "QueryInterface returned: %lx\n", hr); ok(Viewport2 == (IDirect3DViewport2 *)Viewport, "IDirect3DViewport2 iface different from IDirect3DViewport\n");
hr = IDirect3DViewport_QueryInterface(Viewport, &IID_IDirect3DViewport3, (void**) &Viewport3); - ok(hr==D3D_OK, "QueryInterface returned: %x\n", hr); + ok(hr==D3D_OK, "QueryInterface returned: %lx\n", hr); ok(Viewport3 == (IDirect3DViewport3 *)Viewport, "IDirect3DViewport3 iface different from IDirect3DViewport\n"); IDirect3DViewport3_Release(Viewport3);
@@ -965,18 +965,18 @@ static void ViewportTest(void) vp2_data.dvMaxZ = 0.9;
hr = IDirect3DViewport2_SetViewport(Viewport2, &vp1_data); - ok(hr == D3D_OK, "IDirect3DViewport2_SetViewport returned %08x\n", hr); + ok(hr == D3D_OK, "IDirect3DViewport2_SetViewport returned %08lx\n", hr);
memset(&ret_vp1_data, 0xff, sizeof(ret_vp1_data)); ret_vp1_data.dwSize = sizeof(vp1_data);
hr = IDirect3DViewport2_GetViewport(Viewport2, &ret_vp1_data); - ok(hr == D3D_OK, "IDirect3DViewport2_GetViewport returned %08x\n", hr); + ok(hr == D3D_OK, "IDirect3DViewport2_GetViewport returned %08lx\n", hr);
- ok(ret_vp1_data.dwX == vp1_data.dwX, "dwX is %u, expected %u\n", ret_vp1_data.dwX, vp1_data.dwX); - ok(ret_vp1_data.dwY == vp1_data.dwY, "dwY is %u, expected %u\n", ret_vp1_data.dwY, vp1_data.dwY); - ok(ret_vp1_data.dwWidth == vp1_data.dwWidth, "dwWidth is %u, expected %u\n", ret_vp1_data.dwWidth, vp1_data.dwWidth); - ok(ret_vp1_data.dwHeight == vp1_data.dwHeight, "dwHeight is %u, expected %u\n", ret_vp1_data.dwHeight, vp1_data.dwHeight); + ok(ret_vp1_data.dwX == vp1_data.dwX, "dwX is %lu, expected %lu\n", ret_vp1_data.dwX, vp1_data.dwX); + ok(ret_vp1_data.dwY == vp1_data.dwY, "dwY is %lu, expected %lu\n", ret_vp1_data.dwY, vp1_data.dwY); + ok(ret_vp1_data.dwWidth == vp1_data.dwWidth, "dwWidth is %lu, expected %lu\n", ret_vp1_data.dwWidth, vp1_data.dwWidth); + ok(ret_vp1_data.dwHeight == vp1_data.dwHeight, "dwHeight is %lu, expected %lu\n", ret_vp1_data.dwHeight, vp1_data.dwHeight); ok(ret_vp1_data.dvMaxX == vp1_data.dvMaxX, "dvMaxX is %f, expected %f\n", ret_vp1_data.dvMaxX, vp1_data.dvMaxX); ok(ret_vp1_data.dvMaxY == vp1_data.dvMaxY, "dvMaxY is %f, expected %f\n", ret_vp1_data.dvMaxY, vp1_data.dvMaxY); todo_wine ok(ret_vp1_data.dvScaleX == infinity, "dvScaleX is %f, expected %f\n", ret_vp1_data.dvScaleX, infinity); @@ -985,18 +985,18 @@ static void ViewportTest(void) ok(ret_vp1_data.dvMaxZ == 1.0, "dvMaxZ is %f, expected 1.0\n", ret_vp1_data.dvMaxZ);
hr = IDirect3DViewport2_SetViewport2(Viewport2, &vp2_data); - ok(hr == D3D_OK, "IDirect3DViewport2_SetViewport2 returned %08x\n", hr); + ok(hr == D3D_OK, "IDirect3DViewport2_SetViewport2 returned %08lx\n", hr);
memset(&ret_vp2_data, 0xff, sizeof(ret_vp2_data)); ret_vp2_data.dwSize = sizeof(vp2_data);
hr = IDirect3DViewport2_GetViewport2(Viewport2, &ret_vp2_data); - ok(hr == D3D_OK, "IDirect3DViewport2_GetViewport2 returned %08x\n", hr); + ok(hr == D3D_OK, "IDirect3DViewport2_GetViewport2 returned %08lx\n", hr);
- ok(ret_vp2_data.dwX == vp2_data.dwX, "dwX is %u, expected %u\n", ret_vp2_data.dwX, vp2_data.dwX); - ok(ret_vp2_data.dwY == vp2_data.dwY, "dwY is %u, expected %u\n", ret_vp2_data.dwY, vp2_data.dwY); - ok(ret_vp2_data.dwWidth == vp2_data.dwWidth, "dwWidth is %u, expected %u\n", ret_vp2_data.dwWidth, vp2_data.dwWidth); - ok(ret_vp2_data.dwHeight == vp2_data.dwHeight, "dwHeight is %u, expected %u\n", ret_vp2_data.dwHeight, vp2_data.dwHeight); + ok(ret_vp2_data.dwX == vp2_data.dwX, "dwX is %lu, expected %lu\n", ret_vp2_data.dwX, vp2_data.dwX); + ok(ret_vp2_data.dwY == vp2_data.dwY, "dwY is %lu, expected %lu\n", ret_vp2_data.dwY, vp2_data.dwY); + ok(ret_vp2_data.dwWidth == vp2_data.dwWidth, "dwWidth is %lu, expected %lu\n", ret_vp2_data.dwWidth, vp2_data.dwWidth); + ok(ret_vp2_data.dwHeight == vp2_data.dwHeight, "dwHeight is %lu, expected %lu\n", ret_vp2_data.dwHeight, vp2_data.dwHeight); ok(ret_vp2_data.dvClipX == vp2_data.dvClipX, "dvClipX is %f, expected %f\n", ret_vp2_data.dvClipX, vp2_data.dvClipX); ok(ret_vp2_data.dvClipY == vp2_data.dvClipY, "dvClipY is %f, expected %f\n", ret_vp2_data.dvClipY, vp2_data.dvClipY); ok(ret_vp2_data.dvClipWidth == vp2_data.dvClipWidth, "dvClipWidth is %f, expected %f\n", @@ -1010,12 +1010,12 @@ static void ViewportTest(void) ret_vp1_data.dwSize = sizeof(vp1_data);
hr = IDirect3DViewport2_GetViewport(Viewport2, &ret_vp1_data); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
- ok(ret_vp1_data.dwX == vp2_data.dwX, "dwX is %u, expected %u.\n", ret_vp1_data.dwX, vp2_data.dwX); - ok(ret_vp1_data.dwY == vp2_data.dwY, "dwY is %u, expected %u.\n", ret_vp1_data.dwY, vp2_data.dwY); - ok(ret_vp1_data.dwWidth == vp2_data.dwWidth, "dwWidth is %u, expected %u.\n", ret_vp1_data.dwWidth, vp2_data.dwWidth); - ok(ret_vp1_data.dwHeight == vp2_data.dwHeight, "dwHeight is %u, expected %u.\n", ret_vp1_data.dwHeight, vp2_data.dwHeight); + ok(ret_vp1_data.dwX == vp2_data.dwX, "dwX is %lu, expected %lu.\n", ret_vp1_data.dwX, vp2_data.dwX); + ok(ret_vp1_data.dwY == vp2_data.dwY, "dwY is %lu, expected %lu.\n", ret_vp1_data.dwY, vp2_data.dwY); + ok(ret_vp1_data.dwWidth == vp2_data.dwWidth, "dwWidth is %lu, expected %lu.\n", ret_vp1_data.dwWidth, vp2_data.dwWidth); + ok(ret_vp1_data.dwHeight == vp2_data.dwHeight, "dwHeight is %lu, expected %lu.\n", ret_vp1_data.dwHeight, vp2_data.dwHeight); ok(ret_vp1_data.dvMaxX == vp1_data.dvMaxX, "dvMaxX is %f, expected %f.\n", ret_vp1_data.dvMaxX, vp1_data.dvMaxX); ok(ret_vp1_data.dvMaxY == vp1_data.dvMaxY, "dvMaxY is %f, expected %f.\n", ret_vp1_data.dvMaxY, vp1_data.dvMaxY); ok(ret_vp1_data.dvScaleX == infinity, "dvScaleX is %f, expected %f.\n", ret_vp1_data.dvScaleX, infinity); @@ -1024,18 +1024,18 @@ static void ViewportTest(void) ok(ret_vp1_data.dvMaxZ == 1.0, "dvMaxZ is %f, expected 1.0.\n", ret_vp1_data.dvMaxZ);
hr = IDirect3DViewport2_SetViewport2(Viewport2, &vp2_data); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
memset(&ret_vp2_data, 0xff, sizeof(ret_vp2_data)); ret_vp2_data.dwSize = sizeof(vp2_data);
hr = IDirect3DViewport2_GetViewport2(Viewport2, &ret_vp2_data); - ok(hr == D3D_OK, "IDirect3DViewport2_GetViewport2 returned %08x\n", hr); + ok(hr == D3D_OK, "IDirect3DViewport2_GetViewport2 returned %08lx\n", hr);
- ok(ret_vp2_data.dwX == vp2_data.dwX, "dwX is %u, expected %u\n", ret_vp2_data.dwX, vp2_data.dwX); - ok(ret_vp2_data.dwY == vp2_data.dwY, "dwY is %u, expected %u\n", ret_vp2_data.dwY, vp2_data.dwY); - ok(ret_vp2_data.dwWidth == vp2_data.dwWidth, "dwWidth is %u, expected %u\n", ret_vp2_data.dwWidth, vp2_data.dwWidth); - ok(ret_vp2_data.dwHeight == vp2_data.dwHeight, "dwHeight is %u, expected %u\n", ret_vp2_data.dwHeight, vp2_data.dwHeight); + ok(ret_vp2_data.dwX == vp2_data.dwX, "dwX is %lu, expected %lu\n", ret_vp2_data.dwX, vp2_data.dwX); + ok(ret_vp2_data.dwY == vp2_data.dwY, "dwY is %lu, expected %lu\n", ret_vp2_data.dwY, vp2_data.dwY); + ok(ret_vp2_data.dwWidth == vp2_data.dwWidth, "dwWidth is %lu, expected %lu\n", ret_vp2_data.dwWidth, vp2_data.dwWidth); + ok(ret_vp2_data.dwHeight == vp2_data.dwHeight, "dwHeight is %lu, expected %lu\n", ret_vp2_data.dwHeight, vp2_data.dwHeight); ok(ret_vp2_data.dvClipX == vp2_data.dvClipX, "dvClipX is %f, expected %f\n", ret_vp2_data.dvClipX, vp2_data.dvClipX); ok(ret_vp2_data.dvClipY == vp2_data.dvClipY, "dvClipY is %f, expected %f\n", ret_vp2_data.dvClipY, vp2_data.dvClipY); ok(ret_vp2_data.dvClipWidth == vp2_data.dvClipWidth, "dvClipWidth is %f, expected %f\n", @@ -1046,18 +1046,18 @@ static void ViewportTest(void) ok(ret_vp2_data.dvMaxZ == vp2_data.dvMaxZ, "dvMaxZ is %f, expected %f\n", ret_vp2_data.dvMaxZ, vp2_data.dvMaxZ);
hr = IDirect3DViewport2_SetViewport(Viewport2, &vp1_data); - ok(hr == D3D_OK, "IDirect3DViewport2_SetViewport returned %08x\n", hr); + ok(hr == D3D_OK, "IDirect3DViewport2_SetViewport returned %08lx\n", hr);
memset(&ret_vp1_data, 0xff, sizeof(ret_vp1_data)); ret_vp1_data.dwSize = sizeof(vp1_data);
hr = IDirect3DViewport2_GetViewport(Viewport2, &ret_vp1_data); - ok(hr == D3D_OK, "IDirect3DViewport2_GetViewport returned %08x\n", hr); + ok(hr == D3D_OK, "IDirect3DViewport2_GetViewport returned %08lx\n", hr);
- ok(ret_vp1_data.dwX == vp1_data.dwX, "dwX is %u, expected %u\n", ret_vp1_data.dwX, vp1_data.dwX); - ok(ret_vp1_data.dwY == vp1_data.dwY, "dwY is %u, expected %u\n", ret_vp1_data.dwY, vp1_data.dwY); - ok(ret_vp1_data.dwWidth == vp1_data.dwWidth, "dwWidth is %u, expected %u\n", ret_vp1_data.dwWidth, vp1_data.dwWidth); - ok(ret_vp1_data.dwHeight == vp1_data.dwHeight, "dwHeight is %u, expected %u\n", ret_vp1_data.dwHeight, vp1_data.dwHeight); + ok(ret_vp1_data.dwX == vp1_data.dwX, "dwX is %lu, expected %lu\n", ret_vp1_data.dwX, vp1_data.dwX); + ok(ret_vp1_data.dwY == vp1_data.dwY, "dwY is %lu, expected %lu\n", ret_vp1_data.dwY, vp1_data.dwY); + ok(ret_vp1_data.dwWidth == vp1_data.dwWidth, "dwWidth is %lu, expected %lu\n", ret_vp1_data.dwWidth, vp1_data.dwWidth); + ok(ret_vp1_data.dwHeight == vp1_data.dwHeight, "dwHeight is %lu, expected %lu\n", ret_vp1_data.dwHeight, vp1_data.dwHeight); ok(ret_vp1_data.dvMaxX == vp1_data.dvMaxX, "dvMaxX is %f, expected %f\n", ret_vp1_data.dvMaxX, vp1_data.dvMaxX); ok(ret_vp1_data.dvMaxY == vp1_data.dvMaxY, "dvMaxY is %f, expected %f\n", ret_vp1_data.dvMaxY, vp1_data.dvMaxY); todo_wine ok(ret_vp1_data.dvScaleX == infinity, "dvScaleX is %f, expected %f\n", ret_vp1_data.dvScaleX, infinity); @@ -1069,13 +1069,13 @@ static void ViewportTest(void) ret_vp2_data.dwSize = sizeof(vp2_data);
hr = IDirect3DViewport2_GetViewport2(Viewport2, &ret_vp2_data); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
- ok(ret_vp2_data.dwX == vp1_data.dwX, "dwX is %u, expected %u.\n", ret_vp2_data.dwX, vp1_data.dwX); - ok(ret_vp2_data.dwY == vp1_data.dwY, "dwY is %u, expected %u.\n", ret_vp2_data.dwY, vp1_data.dwY); - ok(ret_vp2_data.dwWidth == vp1_data.dwWidth, "dwWidth is %u, expected %u.\n", + ok(ret_vp2_data.dwX == vp1_data.dwX, "dwX is %lu, expected %lu.\n", ret_vp2_data.dwX, vp1_data.dwX); + ok(ret_vp2_data.dwY == vp1_data.dwY, "dwY is %lu, expected %lu.\n", ret_vp2_data.dwY, vp1_data.dwY); + ok(ret_vp2_data.dwWidth == vp1_data.dwWidth, "dwWidth is %lu, expected %lu.\n", ret_vp2_data.dwWidth, vp1_data.dwWidth); - ok(ret_vp2_data.dwHeight == vp1_data.dwHeight, "dwHeight is %u, expected %u.\n", + ok(ret_vp2_data.dwHeight == vp1_data.dwHeight, "dwHeight is %lu, expected %lu.\n", ret_vp2_data.dwHeight, vp1_data.dwHeight); todo_wine ok(ret_vp2_data.dvClipX == vp2_data.dvClipX, "dvClipX is %f, expected %f.\n", ret_vp2_data.dvClipX, vp2_data.dvClipX); @@ -1091,7 +1091,7 @@ static void ViewportTest(void) IDirect3DViewport2_Release(Viewport2);
hr = IDirect3DDevice_DeleteViewport(Direct3DDevice1, Viewport); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); }
static void Direct3D1Test(void) @@ -1107,14 +1107,14 @@ static void Direct3D1Test(void)
/* Interface consistency check. */ hr = IDirect3DDevice_GetDirect3D(Direct3DDevice1, &Direct3D_alt); - ok(hr == D3D_OK, "IDirect3DDevice_GetDirect3D failed: %08x\n", hr); + ok(hr == D3D_OK, "IDirect3DDevice_GetDirect3D failed: %08lx\n", hr); ok(Direct3D_alt == Direct3D1, "Direct3D1 struct pointer mismatch: %p != %p\n", Direct3D_alt, Direct3D1); IDirect3D_Release(Direct3D_alt);
memset(&desc, 0, sizeof(desc)); desc.dwSize = sizeof(desc); hr = IDirect3DExecuteBuffer_Lock(ExecuteBuffer, &desc); - ok(hr == D3D_OK, "IDirect3DExecuteBuffer_Lock failed: %08x\n", hr); + ok(hr == D3D_OK, "IDirect3DExecuteBuffer_Lock failed: %08lx\n", hr);
memset(desc.lpData, 0, 128); instr = desc.lpData; @@ -1132,16 +1132,16 @@ static void Direct3D1Test(void) instr[idx].bSize = 0; instr[idx].wCount = 0; hr = IDirect3DExecuteBuffer_Unlock(ExecuteBuffer); - ok(hr == D3D_OK, "IDirect3DExecuteBuffer_Unlock failed: %08x\n", hr); + ok(hr == D3D_OK, "IDirect3DExecuteBuffer_Unlock failed: %08lx\n", hr);
hr = IDirect3DDevice_Execute(Direct3DDevice1, ExecuteBuffer, Viewport, D3DEXECUTE_CLIPPED); - ok(hr == D3D_OK, "IDirect3DDevice_Execute returned %08x\n", hr); + ok(hr == D3D_OK, "IDirect3DDevice_Execute returned %08lx\n", hr);
memset(&desc, 0, sizeof(desc)); desc.dwSize = sizeof(desc);
hr = IDirect3DExecuteBuffer_Lock(ExecuteBuffer, &desc); - ok(hr == D3D_OK, "IDirect3DExecuteBuffer_Lock failed: %08x\n", hr); + ok(hr == D3D_OK, "IDirect3DExecuteBuffer_Lock failed: %08lx\n", hr);
memset(desc.lpData, 0, 128); instr = desc.lpData; @@ -1160,17 +1160,17 @@ static void Direct3D1Test(void) instr[0].bSize = 0; instr[0].wCount = 0; hr = IDirect3DExecuteBuffer_Unlock(ExecuteBuffer); - ok(hr == D3D_OK, "IDirect3DExecuteBuffer_Unlock failed: %08x\n", hr); + ok(hr == D3D_OK, "IDirect3DExecuteBuffer_Unlock failed: %08lx\n", hr);
hr = IDirect3DDevice_Execute(Direct3DDevice1, ExecuteBuffer, Viewport, D3DEXECUTE_CLIPPED); - ok(hr == D3D_OK, "IDirect3DDevice_Execute returned %08x\n", hr); + ok(hr == D3D_OK, "IDirect3DDevice_Execute returned %08lx\n", hr);
/* Test rendering 0 triangles */ memset(&desc, 0, sizeof(desc)); desc.dwSize = sizeof(desc);
hr = IDirect3DExecuteBuffer_Lock(ExecuteBuffer, &desc); - ok(hr == D3D_OK, "IDirect3DExecuteBuffer_Lock failed: %08x\n", hr); + ok(hr == D3D_OK, "IDirect3DExecuteBuffer_Lock failed: %08lx\n", hr);
memset(desc.lpData, 0, 128); instr = desc.lpData; @@ -1183,29 +1183,29 @@ static void Direct3D1Test(void) instr->bSize = 0; instr->wCount = 0; hr = IDirect3DExecuteBuffer_Unlock(ExecuteBuffer); - ok(hr == D3D_OK, "IDirect3DExecuteBuffer_Unlock failed: %08x\n", hr); + ok(hr == D3D_OK, "IDirect3DExecuteBuffer_Unlock failed: %08lx\n", hr);
hr = IDirect3DDevice_Execute(Direct3DDevice1, ExecuteBuffer, Viewport, D3DEXECUTE_CLIPPED); - ok(hr == D3D_OK, "IDirect3DDevice_Execute returned %08x\n", hr); + ok(hr == D3D_OK, "IDirect3DDevice_Execute returned %08lx\n", hr);
hr = IDirect3DDevice_DeleteViewport(Direct3DDevice1, Viewport); - ok(hr == D3D_OK, "IDirect3DDevice_DeleteViewport returned %08x\n", hr); + ok(hr == D3D_OK, "IDirect3DDevice_DeleteViewport returned %08lx\n", hr);
hr = IDirect3DViewport_AddLight(Viewport, Light); - ok(hr == D3D_OK, "IDirect3DViewport_AddLight returned %08x\n", hr); + ok(hr == D3D_OK, "IDirect3DViewport_AddLight returned %08lx\n", hr); refcount = getRefcount((IUnknown*) Light); - ok(refcount == 2, "Refcount should be 2, returned is %d\n", refcount); + ok(refcount == 2, "Refcount should be 2, returned is %ld\n", refcount);
hr = IDirect3DViewport_NextLight(Viewport, NULL, &d3dlight, D3DNEXT_HEAD); - ok(hr == D3D_OK, "IDirect3DViewport_AddLight returned %08x\n", hr); + ok(hr == D3D_OK, "IDirect3DViewport_AddLight returned %08lx\n", hr); ok(d3dlight == Light, "Got different light returned %p, expected %p\n", d3dlight, Light); refcount = getRefcount((IUnknown*) Light); - ok(refcount == 3, "Refcount should be 2, returned is %d\n", refcount); + ok(refcount == 3, "Refcount should be 2, returned is %ld\n", refcount);
hr = IDirect3DViewport_DeleteLight(Viewport, Light); - ok(hr == D3D_OK, "IDirect3DViewport_DeleteLight returned %08x\n", hr); + ok(hr == D3D_OK, "IDirect3DViewport_DeleteLight returned %08lx\n", hr); refcount = getRefcount((IUnknown*) Light); - ok(refcount == 2, "Refcount should be 2, returned is %d\n", refcount); + ok(refcount == 2, "Refcount should be 2, returned is %ld\n", refcount);
IDirect3DLight_Release(Light); } @@ -1248,7 +1248,7 @@ static void TextureLoadTest(void) U1(ddsd.ddpfPixelFormat).dwRGBBitCount = 8;
hr = IDirectDraw_CreateSurface(DirectDraw1, &ddsd, &TexSurface, NULL); - ok(hr==D3D_OK, "CreateSurface returned: %x\n", hr); + ok(hr==D3D_OK, "CreateSurface returned: %lx\n", hr); if (FAILED(hr)) { skip("IDirectDraw_CreateSurface failed; skipping further tests\n"); goto cleanup; @@ -1256,14 +1256,14 @@ static void TextureLoadTest(void)
hr = IDirectDrawSurface_QueryInterface(TexSurface, &IID_IDirect3DTexture, (void *)&Texture); - ok(hr==D3D_OK, "IDirectDrawSurface_QueryInterface returned: %x\n", hr); + ok(hr==D3D_OK, "IDirectDrawSurface_QueryInterface returned: %lx\n", hr); if (FAILED(hr)) { skip("Can't get IDirect3DTexture interface; skipping further tests\n"); goto cleanup; }
hr = IDirectDraw_CreateSurface(DirectDraw1, &ddsd, &TexSurface2, NULL); - ok(hr==D3D_OK, "CreateSurface returned: %x\n", hr); + ok(hr==D3D_OK, "CreateSurface returned: %lx\n", hr); if (FAILED(hr)) { skip("IDirectDraw_CreateSurface failed; skipping further tests\n"); goto cleanup; @@ -1271,7 +1271,7 @@ static void TextureLoadTest(void)
hr = IDirectDrawSurface_QueryInterface(TexSurface2, &IID_IDirect3DTexture, (void *)&Texture2); - ok(hr==D3D_OK, "IDirectDrawSurface_QueryInterface returned: %x\n", hr); + ok(hr==D3D_OK, "IDirectDrawSurface_QueryInterface returned: %lx\n", hr); if (FAILED(hr)) { skip("Can't get IDirect3DTexture interface; skipping further tests\n"); goto cleanup; @@ -1279,11 +1279,11 @@ static void TextureLoadTest(void)
/* test load of Texture to Texture */ hr = IDirect3DTexture_Load(Texture, Texture); - ok(hr == DD_OK, "IDirect3DTexture_Load returned %08x\n", hr); + ok(hr == DD_OK, "IDirect3DTexture_Load returned %08lx\n", hr);
/* test Load when both textures have no palette */ hr = IDirect3DTexture_Load(Texture2, Texture); - ok(hr == DD_OK, "IDirect3DTexture_Load returned %08x\n", hr); + ok(hr == DD_OK, "IDirect3DTexture_Load returned %08lx\n", hr);
for (i = 0; i < 256; i++) { table1[i].peRed = i; @@ -1293,7 +1293,7 @@ static void TextureLoadTest(void) }
hr = IDirectDraw_CreatePalette(DirectDraw1, DDPCAPS_ALLOW256 | DDPCAPS_8BIT, table1, &palette, NULL); - ok(hr == DD_OK, "CreatePalette returned %08x\n", hr); + ok(hr == DD_OK, "CreatePalette returned %08lx\n", hr); if (FAILED(hr)) { skip("IDirectDraw_CreatePalette failed; skipping further tests\n"); goto cleanup; @@ -1301,9 +1301,9 @@ static void TextureLoadTest(void)
/* test Load when source texture has palette and destination has no palette */ hr = IDirectDrawSurface_SetPalette(TexSurface, palette); - ok(hr == DD_OK, "IDirectDrawSurface_SetPalette returned %08x\n", hr); + ok(hr == DD_OK, "IDirectDrawSurface_SetPalette returned %08lx\n", hr); hr = IDirect3DTexture_Load(Texture2, Texture); - ok(hr == DDERR_NOPALETTEATTACHED, "IDirect3DTexture_Load returned %08x\n", hr); + ok(hr == DDERR_NOPALETTEATTACHED, "IDirect3DTexture_Load returned %08lx\n", hr);
for (i = 0; i < 256; i++) { table2[i].peRed = 255 - i; @@ -1313,7 +1313,7 @@ static void TextureLoadTest(void) }
hr = IDirectDraw_CreatePalette(DirectDraw1, DDPCAPS_ALLOW256 | DDPCAPS_8BIT, table2, &palette2, NULL); - ok(hr == DD_OK, "CreatePalette returned %08x\n", hr); + ok(hr == DD_OK, "CreatePalette returned %08lx\n", hr); if (FAILED(hr)) { skip("IDirectDraw_CreatePalette failed; skipping further tests\n"); goto cleanup; @@ -1321,38 +1321,38 @@ static void TextureLoadTest(void)
/* test Load when source has no palette and destination has a palette */ hr = IDirectDrawSurface_SetPalette(TexSurface, NULL); - ok(hr == DD_OK, "IDirectDrawSurface_SetPalette returned %08x\n", hr); + ok(hr == DD_OK, "IDirectDrawSurface_SetPalette returned %08lx\n", hr); hr = IDirectDrawSurface_SetPalette(TexSurface2, palette2); - ok(hr == DD_OK, "IDirectDrawSurface_SetPalette returned %08x\n", hr); + ok(hr == DD_OK, "IDirectDrawSurface_SetPalette returned %08lx\n", hr); hr = IDirect3DTexture_Load(Texture2, Texture); - ok(hr == DD_OK, "IDirect3DTexture_Load returned %08x\n", hr); + ok(hr == DD_OK, "IDirect3DTexture_Load returned %08lx\n", hr); hr = IDirectDrawSurface_GetPalette(TexSurface2, &palette_tmp); - ok(hr == DD_OK, "IDirectDrawSurface_GetPalette returned %08x\n", hr); + ok(hr == DD_OK, "IDirectDrawSurface_GetPalette returned %08lx\n", hr); if (!palette_tmp) { skip("IDirectDrawSurface_GetPalette failed; skipping color table check\n"); goto cleanup; } else { hr = IDirectDrawPalette_GetEntries(palette_tmp, 0, 0, 256, table_tmp); - ok(hr == DD_OK, "IDirectDrawPalette_GetEntries returned %08x\n", hr); + ok(hr == DD_OK, "IDirectDrawPalette_GetEntries returned %08lx\n", hr); ok(colortables_check_equality(table2, table_tmp), "Unexpected palettized texture color table\n"); IDirectDrawPalette_Release(palette_tmp); }
/* test Load when both textures have palettes */ hr = IDirectDrawSurface_SetPalette(TexSurface, palette); - ok(hr == DD_OK, "IDirectDrawSurface_SetPalette returned %08x\n", hr); + ok(hr == DD_OK, "IDirectDrawSurface_SetPalette returned %08lx\n", hr); hr = IDirect3DTexture_Load(Texture2, Texture); - ok(hr == DD_OK, "IDirect3DTexture_Load returned %08x\n", hr); + ok(hr == DD_OK, "IDirect3DTexture_Load returned %08lx\n", hr); hr = IDirect3DTexture_Load(Texture2, Texture); - ok(hr == DD_OK, "IDirect3DTexture_Load returned %08x\n", hr); + ok(hr == DD_OK, "IDirect3DTexture_Load returned %08lx\n", hr); hr = IDirectDrawSurface_GetPalette(TexSurface2, &palette_tmp); - ok(hr == DD_OK, "IDirectDrawSurface_GetPalette returned %08x\n", hr); + ok(hr == DD_OK, "IDirectDrawSurface_GetPalette returned %08lx\n", hr); if (!palette_tmp) { skip("IDirectDrawSurface_GetPalette failed; skipping color table check\n"); goto cleanup; } else { hr = IDirectDrawPalette_GetEntries(palette_tmp, 0, 0, 256, table_tmp); - ok(hr == DD_OK, "IDirectDrawPalette_GetEntries returned %08x\n", hr); + ok(hr == DD_OK, "IDirectDrawPalette_GetEntries returned %08lx\n", hr); ok(colortables_check_equality(table1, table_tmp), "Unexpected palettized texture color table\n"); IDirectDrawPalette_Release(palette_tmp); } @@ -1383,10 +1383,10 @@ static void VertexBufferDescTest(void) desc.dwFVF = D3DFVF_XYZ; desc.dwNumVertices = 1; rc = IDirect3D7_CreateVertexBuffer(lpD3D, &desc, &lpVBufSrc, 0); - ok(rc==D3D_OK || rc==E_OUTOFMEMORY, "CreateVertexBuffer returned: %x\n", rc); + ok(rc==D3D_OK || rc==E_OUTOFMEMORY, "CreateVertexBuffer returned: %lx\n", rc); if (!lpVBufSrc) { - trace("IDirect3D7::CreateVertexBuffer() failed with an error %x\n", rc); + trace("IDirect3D7::CreateVertexBuffer() failed with an error %lx\n", rc); goto out; }
@@ -1397,9 +1397,9 @@ static void VertexBufferDescTest(void) skip("GetVertexBuffer Failed!\n"); ok( mem.desc2.dwSize == sizeof(D3DVERTEXBUFFERDESC)*2, "Size returned from GetVertexBufferDesc does not match the value put in\n" ); ok( mem.buffer[sizeof(D3DVERTEXBUFFERDESC)] == 0x12, "GetVertexBufferDesc cleared outside of the struct! (dwSize was double the size of the struct)\n"); - ok( mem.desc2.dwCaps == desc.dwCaps, "dwCaps returned differs. Got %x, expected %x\n", mem.desc2.dwCaps, desc.dwCaps); - ok( mem.desc2.dwFVF == desc.dwFVF, "dwFVF returned differs. Got %x, expected %x\n", mem.desc2.dwFVF, desc.dwFVF); - ok (mem.desc2.dwNumVertices == desc.dwNumVertices, "dwNumVertices returned differs. Got %x, expected %x\n", mem.desc2.dwNumVertices, desc.dwNumVertices); + ok( mem.desc2.dwCaps == desc.dwCaps, "dwCaps returned differs. Got %lx, expected %lx\n", mem.desc2.dwCaps, desc.dwCaps); + ok( mem.desc2.dwFVF == desc.dwFVF, "dwFVF returned differs. Got %lx, expected %lx\n", mem.desc2.dwFVF, desc.dwFVF); + ok (mem.desc2.dwNumVertices == desc.dwNumVertices, "dwNumVertices returned differs. Got %lx, expected %lx\n", mem.desc2.dwNumVertices, desc.dwNumVertices);
memset(mem.buffer, 0x12, sizeof(mem.buffer)); mem.desc2.dwSize = 0; @@ -1408,9 +1408,9 @@ static void VertexBufferDescTest(void) skip("GetVertexBuffer Failed!\n"); ok( mem.desc2.dwSize == 0, "Size returned from GetVertexBufferDesc does not match the value put in\n" ); ok( mem.buffer[sizeof(D3DVERTEXBUFFERDESC)] == 0x12, "GetVertexBufferDesc cleared outside of the struct! (dwSize was 0)\n"); - ok( mem.desc2.dwCaps == desc.dwCaps, "dwCaps returned differs. Got %x, expected %x\n", mem.desc2.dwCaps, desc.dwCaps); - ok( mem.desc2.dwFVF == desc.dwFVF, "dwFVF returned differs. Got %x, expected %x\n", mem.desc2.dwFVF, desc.dwFVF); - ok (mem.desc2.dwNumVertices == desc.dwNumVertices, "dwNumVertices returned differs. Got %x, expected %x\n", mem.desc2.dwNumVertices, desc.dwNumVertices); + ok( mem.desc2.dwCaps == desc.dwCaps, "dwCaps returned differs. Got %lx, expected %lx\n", mem.desc2.dwCaps, desc.dwCaps); + ok( mem.desc2.dwFVF == desc.dwFVF, "dwFVF returned differs. Got %lx, expected %lx\n", mem.desc2.dwFVF, desc.dwFVF); + ok (mem.desc2.dwNumVertices == desc.dwNumVertices, "dwNumVertices returned differs. Got %lx, expected %lx\n", mem.desc2.dwNumVertices, desc.dwNumVertices);
memset(mem.buffer, 0x12, sizeof(mem.buffer)); mem.desc2.dwSize = sizeof(D3DVERTEXBUFFERDESC); @@ -1419,9 +1419,9 @@ static void VertexBufferDescTest(void) skip("GetVertexBuffer Failed!\n"); ok( mem.desc2.dwSize == sizeof(D3DVERTEXBUFFERDESC), "Size returned from GetVertexBufferDesc does not match the value put in\n" ); ok( mem.buffer[sizeof(D3DVERTEXBUFFERDESC)] == 0x12, "GetVertexBufferDesc cleared outside of the struct! (dwSize was the size of the struct)\n"); - ok( mem.desc2.dwCaps == desc.dwCaps, "dwCaps returned differs. Got %x, expected %x\n", mem.desc2.dwCaps, desc.dwCaps); - ok( mem.desc2.dwFVF == desc.dwFVF, "dwFVF returned differs. Got %x, expected %x\n", mem.desc2.dwFVF, desc.dwFVF); - ok (mem.desc2.dwNumVertices == desc.dwNumVertices, "dwNumVertices returned differs. Got %x, expected %x\n", mem.desc2.dwNumVertices, desc.dwNumVertices); + ok( mem.desc2.dwCaps == desc.dwCaps, "dwCaps returned differs. Got %lx, expected %lx\n", mem.desc2.dwCaps, desc.dwCaps); + ok( mem.desc2.dwFVF == desc.dwFVF, "dwFVF returned differs. Got %lx, expected %lx\n", mem.desc2.dwFVF, desc.dwFVF); + ok (mem.desc2.dwNumVertices == desc.dwNumVertices, "dwNumVertices returned differs. Got %lx, expected %lx\n", mem.desc2.dwNumVertices, desc.dwNumVertices);
out: IDirect3DVertexBuffer7_Release(lpVBufSrc); @@ -1432,7 +1432,7 @@ static void SetMaterialTest(void) HRESULT rc;
rc =IDirect3DDevice7_SetMaterial(lpD3DDevice, NULL); - ok(rc == DDERR_INVALIDPARAMS, "Expected DDERR_INVALIDPARAMS, got %x\n", rc); + ok(rc == DDERR_INVALIDPARAMS, "Expected DDERR_INVALIDPARAMS, got %lx\n", rc); }
static void SetRenderTargetTest(void) @@ -1452,7 +1452,7 @@ static void SetRenderTargetTest(void) ddsd.dwHeight = 64;
hr = IDirectDraw7_CreateSurface(lpDD, &ddsd, &newrt, NULL); - ok(hr == DD_OK, "IDirectDraw7_CreateSurface failed, hr=0x%08x\n", hr); + ok(hr == DD_OK, "IDirectDraw7_CreateSurface failed, hr=0x%08lx\n", hr); if(FAILED(hr)) { skip("Skipping SetRenderTarget test\n"); @@ -1471,7 +1471,7 @@ static void SetRenderTargetTest(void) U3(U4(ddsd2).ddpfPixelFormat).dwZBitMask = 0x0000FFFF;
hr = IDirectDraw7_CreateSurface(lpDD, &ddsd2, &failrt, NULL); - ok(hr == DD_OK, "IDirectDraw7_CreateSurface failed, hr=0x%08x\n", hr); + ok(hr == DD_OK, "IDirectDraw7_CreateSurface failed, hr=0x%08lx\n", hr);
memset(&vp, 0, sizeof(vp)); vp.dwX = 10; @@ -1481,46 +1481,46 @@ static void SetRenderTargetTest(void) vp.dvMinZ = 0.25; vp.dvMaxZ = 0.75; hr = IDirect3DDevice7_SetViewport(lpD3DDevice, &vp); - ok(hr == D3D_OK, "IDirect3DDevice7_SetViewport failed, hr=0x%08x\n", hr); + ok(hr == D3D_OK, "IDirect3DDevice7_SetViewport failed, hr=0x%08lx\n", hr);
hr = IDirect3DDevice7_GetRenderTarget(lpD3DDevice, &oldrt); - ok(hr == DD_OK, "IDirect3DDevice7_GetRenderTarget failed, hr=0x%08x\n", hr); + ok(hr == DD_OK, "IDirect3DDevice7_GetRenderTarget failed, hr=0x%08lx\n", hr);
refcount = getRefcount((IUnknown*) oldrt); - ok(refcount == 3, "Refcount should be 3, returned is %d\n", refcount); + ok(refcount == 3, "Refcount should be 3, returned is %ld\n", refcount);
refcount = getRefcount((IUnknown*) failrt); - ok(refcount == 1, "Refcount should be 1, returned is %d\n", refcount); + ok(refcount == 1, "Refcount should be 1, returned is %ld\n", refcount);
hr = IDirect3DDevice7_SetRenderTarget(lpD3DDevice, failrt, 0); ok(hr != D3D_OK, "IDirect3DDevice7_SetRenderTarget succeeded\n");
refcount = getRefcount((IUnknown*) oldrt); - ok(refcount == 2, "Refcount should be 2, returned is %d\n", refcount); + ok(refcount == 2, "Refcount should be 2, returned is %ld\n", refcount);
refcount = getRefcount((IUnknown*) failrt); - ok(refcount == 2, "Refcount should be 2, returned is %d\n", refcount); + ok(refcount == 2, "Refcount should be 2, returned is %ld\n", refcount);
hr = IDirect3DDevice7_GetRenderTarget(lpD3DDevice, &temprt); - ok(hr == DD_OK, "IDirect3DDevice7_GetRenderTarget failed, hr=0x%08x\n", hr); + ok(hr == DD_OK, "IDirect3DDevice7_GetRenderTarget failed, hr=0x%08lx\n", hr); ok(failrt == temprt, "Wrong iface returned\n");
refcount = getRefcount((IUnknown*) failrt); - ok(refcount == 3, "Refcount should be 3, returned is %d\n", refcount); + ok(refcount == 3, "Refcount should be 3, returned is %ld\n", refcount);
hr = IDirect3DDevice7_SetRenderTarget(lpD3DDevice, newrt, 0); - ok(hr == D3D_OK, "IDirect3DDevice7_SetRenderTarget failed, hr=0x%08x\n", hr); + ok(hr == D3D_OK, "IDirect3DDevice7_SetRenderTarget failed, hr=0x%08lx\n", hr);
refcount = getRefcount((IUnknown*) failrt); - ok(refcount == 2, "Refcount should be 2, returned is %d\n", refcount); + ok(refcount == 2, "Refcount should be 2, returned is %ld\n", refcount);
memset(&vp, 0xff, sizeof(vp)); hr = IDirect3DDevice7_GetViewport(lpD3DDevice, &vp); - ok(hr == D3D_OK, "IDirect3DDevice7_GetViewport failed, hr=0x%08x\n", hr); - ok(vp.dwX == 10, "vp.dwX is %u, expected 10\n", vp.dwX); - ok(vp.dwY == 10, "vp.dwY is %u, expected 10\n", vp.dwY); - ok(vp.dwWidth == 246, "vp.dwWidth is %u, expected 246\n", vp.dwWidth); - ok(vp.dwHeight == 246, "vp.dwHeight is %u, expected 246\n", vp.dwHeight); + ok(hr == D3D_OK, "IDirect3DDevice7_GetViewport failed, hr=0x%08lx\n", hr); + ok(vp.dwX == 10, "vp.dwX is %lu, expected 10\n", vp.dwX); + ok(vp.dwY == 10, "vp.dwY is %lu, expected 10\n", vp.dwY); + ok(vp.dwWidth == 246, "vp.dwWidth is %lu, expected 246\n", vp.dwWidth); + ok(vp.dwHeight == 246, "vp.dwHeight is %lu, expected 246\n", vp.dwHeight); ok(vp.dvMinZ == 0.25, "vp.dvMinZ is %f, expected 0.25\n", vp.dvMinZ); ok(vp.dvMaxZ == 0.75, "vp.dvMaxZ is %f, expected 0.75\n", vp.dvMaxZ);
@@ -1532,39 +1532,39 @@ static void SetRenderTargetTest(void) vp.dvMinZ = 0.0; vp.dvMaxZ = 1.0; hr = IDirect3DDevice7_SetViewport(lpD3DDevice, &vp); - ok(hr == D3D_OK, "IDirect3DDevice7_SetViewport failed, hr=0x%08x\n", hr); + ok(hr == D3D_OK, "IDirect3DDevice7_SetViewport failed, hr=0x%08lx\n", hr);
hr = IDirect3DDevice7_BeginStateBlock(lpD3DDevice); - ok(hr == D3D_OK, "IDirect3DDevice7_BeginStateblock failed, hr=0x%08x\n", hr); + ok(hr == D3D_OK, "IDirect3DDevice7_BeginStateblock failed, hr=0x%08lx\n", hr); hr = IDirect3DDevice7_SetRenderTarget(lpD3DDevice, oldrt, 0); - ok(hr == D3D_OK, "IDirect3DDevice7_SetRenderTarget failed, hr=0x%08x\n", hr); + ok(hr == D3D_OK, "IDirect3DDevice7_SetRenderTarget failed, hr=0x%08lx\n", hr);
/* Check this twice, before and after ending the stateblock */ memset(&vp, 0xff, sizeof(vp)); hr = IDirect3DDevice7_GetViewport(lpD3DDevice, &vp); - ok(hr == D3D_OK, "IDirect3DDevice7_GetViewport failed, hr=0x%08x\n", hr); - ok(vp.dwX == 0, "vp.dwX is %u, expected 0\n", vp.dwX); - ok(vp.dwY == 0, "vp.dwY is %u, expected 0\n", vp.dwY); - ok(vp.dwWidth == 64, "vp.dwWidth is %u, expected 64\n", vp.dwWidth); - ok(vp.dwHeight == 64, "vp.dwHeight is %u, expected 64\n", vp.dwHeight); + ok(hr == D3D_OK, "IDirect3DDevice7_GetViewport failed, hr=0x%08lx\n", hr); + ok(vp.dwX == 0, "vp.dwX is %lu, expected 0\n", vp.dwX); + ok(vp.dwY == 0, "vp.dwY is %lu, expected 0\n", vp.dwY); + ok(vp.dwWidth == 64, "vp.dwWidth is %lu, expected 64\n", vp.dwWidth); + ok(vp.dwHeight == 64, "vp.dwHeight is %lu, expected 64\n", vp.dwHeight); ok(vp.dvMinZ == 0.0, "vp.dvMinZ is %f, expected 0.0\n", vp.dvMinZ); ok(vp.dvMaxZ == 1.0, "vp.dvMaxZ is %f, expected 1.0\n", vp.dvMaxZ);
hr = IDirect3DDevice7_EndStateBlock(lpD3DDevice, &stateblock); - ok(hr == D3D_OK, "IDirect3DDevice7_EndStateblock failed, hr=0x%08x\n", hr); + ok(hr == D3D_OK, "IDirect3DDevice7_EndStateblock failed, hr=0x%08lx\n", hr);
memset(&vp, 0xff, sizeof(vp)); hr = IDirect3DDevice7_GetViewport(lpD3DDevice, &vp); - ok(hr == D3D_OK, "IDirect3DDevice7_GetViewport failed, hr=0x%08x\n", hr); - ok(vp.dwX == 0, "vp.dwX is %u, expected 0\n", vp.dwX); - ok(vp.dwY == 0, "vp.dwY is %u, expected 0\n", vp.dwY); - ok(vp.dwWidth == 64, "vp.dwWidth is %u, expected 64\n", vp.dwWidth); - ok(vp.dwHeight == 64, "vp.dwHeight is %u, expected 64\n", vp.dwHeight); + ok(hr == D3D_OK, "IDirect3DDevice7_GetViewport failed, hr=0x%08lx\n", hr); + ok(vp.dwX == 0, "vp.dwX is %lu, expected 0\n", vp.dwX); + ok(vp.dwY == 0, "vp.dwY is %lu, expected 0\n", vp.dwY); + ok(vp.dwWidth == 64, "vp.dwWidth is %lu, expected 64\n", vp.dwWidth); + ok(vp.dwHeight == 64, "vp.dwHeight is %lu, expected 64\n", vp.dwHeight); ok(vp.dvMinZ == 0.0, "vp.dvMinZ is %f, expected 0.0\n", vp.dvMinZ); ok(vp.dvMaxZ == 1.0, "vp.dvMaxZ is %f, expected 1.0\n", vp.dvMaxZ);
hr = IDirect3DDevice7_DeleteStateBlock(lpD3DDevice, stateblock); - ok(hr == D3D_OK, "IDirect3DDevice7_DeleteStateblock failed, hr=0x%08x\n", hr); + ok(hr == D3D_OK, "IDirect3DDevice7_DeleteStateblock failed, hr=0x%08lx\n", hr);
memset(&vp, 0, sizeof(vp)); vp.dwX = 0; @@ -1574,7 +1574,7 @@ static void SetRenderTargetTest(void) vp.dvMinZ = 0.0; vp.dvMaxZ = 0.0; hr = IDirect3DDevice7_SetViewport(lpD3DDevice, &vp); - ok(hr == D3D_OK, "IDirect3DDevice7_SetViewport failed, hr=0x%08x\n", hr); + ok(hr == D3D_OK, "IDirect3DDevice7_SetViewport failed, hr=0x%08lx\n", hr);
IDirectDrawSurface7_Release(oldrt); IDirectDrawSurface7_Release(newrt); @@ -1617,18 +1617,18 @@ static void VertexBufferLockRest(void) desc.dwFVF = D3DFVF_XYZ; desc.dwNumVertices = 64; hr = IDirect3D7_CreateVertexBuffer(lpD3D, &desc, &buffer, 0); - ok(hr == D3D_OK, "IDirect3D7_CreateVertexBuffer failed, 0x%08x\n", hr); + ok(hr == D3D_OK, "IDirect3D7_CreateVertexBuffer failed, 0x%08lx\n", hr);
for(i = 0; i < (sizeof(test_data) / sizeof(*test_data)); i++) { hr = IDirect3DVertexBuffer7_Lock(buffer, test_data[i].flags, &data, NULL); - ok(hr == test_data[i].result, "Lock flags %s returned 0x%08x, expected 0x%08x\n", + ok(hr == test_data[i].result, "Lock flags %s returned 0x%08lx, expected 0x%08lx\n", test_data[i].debug_string, hr, test_data[i].result); if(SUCCEEDED(hr)) { ok(data != NULL, "The data pointer returned by Lock is NULL\n"); hr = IDirect3DVertexBuffer7_Unlock(buffer); - ok(hr == D3D_OK, "IDirect3DVertexBuffer7_Unlock failed, 0x%08x\n", hr); + ok(hr == D3D_OK, "IDirect3DVertexBuffer7_Unlock failed, 0x%08lx\n", hr); } }
@@ -1656,7 +1656,7 @@ static void BackBuffer3DCreateSurfaceTest(void) memset(&ddcaps, 0, sizeof(ddcaps)); ddcaps.dwSize = sizeof(DDCAPS); hr = IDirectDraw_GetCaps(DirectDraw1, &ddcaps, NULL); - ok(SUCCEEDED(hr), "DirectDraw_GetCaps failed: 0x%08x\n", hr); + ok(SUCCEEDED(hr), "DirectDraw_GetCaps failed: 0x%08lx\n", hr); if (!(ddcaps.ddsCaps.dwCaps & DDSCAPS_VIDEOMEMORY)) { skip("DDraw reported no VIDEOMEMORY cap. Broken video driver? Skipping surface caps tests.\n"); @@ -1679,20 +1679,20 @@ static void BackBuffer3DCreateSurfaceTest(void) created_ddsd.dwSize = sizeof(DDSURFACEDESC);
hr = IDirectDraw_CreateSurface(DirectDraw1, &ddsd, &surf, NULL); - ok(SUCCEEDED(hr), "IDirectDraw_CreateSurface failed: 0x%08x\n", hr); + ok(SUCCEEDED(hr), "IDirectDraw_CreateSurface failed: 0x%08lx\n", hr); if (surf != NULL) { hr = IDirectDrawSurface_GetSurfaceDesc(surf, &created_ddsd); - ok(SUCCEEDED(hr), "IDirectDraw_GetSurfaceDesc failed: 0x%08x\n", hr); + ok(SUCCEEDED(hr), "IDirectDraw_GetSurfaceDesc failed: 0x%08lx\n", hr); ok(created_ddsd.ddsCaps.dwCaps == expected_caps, - "GetSurfaceDesc returned caps %x, expected %x\n", created_ddsd.ddsCaps.dwCaps, + "GetSurfaceDesc returned caps %lx, expected %lx\n", created_ddsd.ddsCaps.dwCaps, expected_caps);
hr = IDirectDrawSurface_QueryInterface(surf, &IID_IDirect3DHALDevice, (void **)&d3dhal); /* Currently Wine only supports the creation of one Direct3D device for a given DirectDraw instance. It has been created already in D3D1_createObjects() - IID_IDirect3DRGBDevice */ - todo_wine ok(SUCCEEDED(hr), "Expected IDirectDrawSurface::QueryInterface to succeed, got 0x%08x\n", hr); + todo_wine ok(SUCCEEDED(hr), "Expected IDirectDrawSurface::QueryInterface to succeed, got 0x%08lx\n", hr);
if (SUCCEEDED(hr)) IDirect3DDevice_Release(d3dhal); @@ -1701,28 +1701,28 @@ static void BackBuffer3DCreateSurfaceTest(void) }
hr = IDirectDraw_QueryInterface(DirectDraw1, &IID_IDirectDraw2, (void **) &dd2); - ok(SUCCEEDED(hr), "IDirectDraw_QueryInterface failed: 0x%08x\n", hr); + ok(SUCCEEDED(hr), "IDirectDraw_QueryInterface failed: 0x%08lx\n", hr);
hr = IDirectDraw2_CreateSurface(dd2, &ddsd, &surf, NULL); - ok(hr == DDERR_INVALIDCAPS, "IDirectDraw2_CreateSurface didn't return %x08x, but %x08x\n", + ok(hr == DDERR_INVALIDCAPS, "IDirectDraw2_CreateSurface didn't return %lx08x, but %lx08x\n", DDERR_INVALIDCAPS, hr);
IDirectDraw2_Release(dd2);
hr = IDirectDraw_QueryInterface(DirectDraw1, &IID_IDirectDraw4, (void **) &dd4); - ok(SUCCEEDED(hr), "IDirectDraw_QueryInterface failed: 0x%08x\n", hr); + ok(SUCCEEDED(hr), "IDirectDraw_QueryInterface failed: 0x%08lx\n", hr);
hr = IDirectDraw4_CreateSurface(dd4, &ddsd2, &surf4, NULL); - ok(hr == DDERR_INVALIDCAPS, "IDirectDraw4_CreateSurface didn't return %x08x, but %x08x\n", + ok(hr == DDERR_INVALIDCAPS, "IDirectDraw4_CreateSurface didn't return %lx08x, but %lx08x\n", DDERR_INVALIDCAPS, hr);
IDirectDraw4_Release(dd4);
hr = IDirectDraw_QueryInterface(DirectDraw1, &IID_IDirectDraw7, (void **) &dd7); - ok(SUCCEEDED(hr), "IDirectDraw_QueryInterface failed: 0x%08x\n", hr); + ok(SUCCEEDED(hr), "IDirectDraw_QueryInterface failed: 0x%08lx\n", hr);
hr = IDirectDraw7_CreateSurface(dd7, &ddsd2, &surf7, NULL); - ok(hr == DDERR_INVALIDCAPS, "IDirectDraw7_CreateSurface didn't return %x08x, but %x08x\n", + ok(hr == DDERR_INVALIDCAPS, "IDirectDraw7_CreateSurface didn't return %lx08x, but %lx08x\n", DDERR_INVALIDCAPS, hr);
IDirectDraw7_Release(dd7); @@ -1737,7 +1737,7 @@ static void BackBuffer3DAttachmentTest(void) 100, 100, 160, 160, NULL, NULL, NULL, NULL);
hr = IDirectDraw_SetCooperativeLevel(DirectDraw1, window, DDSCL_EXCLUSIVE | DDSCL_FULLSCREEN); - ok(hr == DD_OK, "SetCooperativeLevel returned %08x\n", hr); + ok(hr == DD_OK, "SetCooperativeLevel returned %08lx\n", hr);
/* Perform attachment tests on a back-buffer */ memset(&ddsd, 0, sizeof(ddsd)); @@ -1747,7 +1747,7 @@ static void BackBuffer3DAttachmentTest(void) ddsd.dwWidth = GetSystemMetrics(SM_CXSCREEN); ddsd.dwHeight = GetSystemMetrics(SM_CYSCREEN); hr = IDirectDraw_CreateSurface(DirectDraw1, &ddsd, &surface2, NULL); - ok(SUCCEEDED(hr), "CreateSurface returned: %x\n",hr); + ok(SUCCEEDED(hr), "CreateSurface returned: %lx\n",hr);
if (surface2 != NULL) { @@ -1757,7 +1757,7 @@ static void BackBuffer3DAttachmentTest(void) ddsd.dwFlags = DDSD_CAPS; ddsd.ddsCaps.dwCaps = DDSCAPS_PRIMARYSURFACE; hr = IDirectDraw_CreateSurface(DirectDraw1, &ddsd, &surface1, NULL); - ok(hr==DD_OK,"CreateSurface returned: %x\n",hr); + ok(hr==DD_OK,"CreateSurface returned: %lx\n",hr);
memset(&ddsd, 0, sizeof(ddsd)); ddsd.dwSize = sizeof(ddsd); @@ -1766,7 +1766,7 @@ static void BackBuffer3DAttachmentTest(void) ddsd.dwWidth = GetSystemMetrics(SM_CXSCREEN); ddsd.dwHeight = GetSystemMetrics(SM_CYSCREEN); hr = IDirectDraw_CreateSurface(DirectDraw1, &ddsd, &surface3, NULL); - ok(hr==DD_OK,"CreateSurface returned: %x\n",hr); + ok(hr==DD_OK,"CreateSurface returned: %lx\n",hr);
/* This one has a different size */ memset(&ddsd, 0, sizeof(ddsd)); @@ -1776,43 +1776,43 @@ static void BackBuffer3DAttachmentTest(void) ddsd.dwWidth = 128; ddsd.dwHeight = 128; hr = IDirectDraw_CreateSurface(DirectDraw1, &ddsd, &surface4, NULL); - ok(hr==DD_OK,"CreateSurface returned: %x\n",hr); + ok(hr==DD_OK,"CreateSurface returned: %lx\n",hr);
hr = IDirectDrawSurface_AddAttachedSurface(surface1, surface2); todo_wine ok(hr == DD_OK || broken(hr == DDERR_CANNOTATTACHSURFACE), - "Attaching a back buffer to a front buffer returned %08x\n", hr); + "Attaching a back buffer to a front buffer returned %08lx\n", hr); if(SUCCEEDED(hr)) { /* Try the reverse without detaching first */ hr = IDirectDrawSurface_AddAttachedSurface(surface2, surface1); - ok(hr == DDERR_SURFACEALREADYATTACHED, "Attaching an attached surface to its attachee returned %08x\n", hr); + ok(hr == DDERR_SURFACEALREADYATTACHED, "Attaching an attached surface to its attachee returned %08lx\n", hr); hr = IDirectDrawSurface_DeleteAttachedSurface(surface1, 0, surface2); - ok(hr == DD_OK, "DeleteAttachedSurface failed with %08x\n", hr); + ok(hr == DD_OK, "DeleteAttachedSurface failed with %08lx\n", hr); } hr = IDirectDrawSurface_AddAttachedSurface(surface2, surface1); todo_wine ok(hr == DD_OK || broken(hr == DDERR_CANNOTATTACHSURFACE), - "Attaching a front buffer to a back buffer returned %08x\n", hr); + "Attaching a front buffer to a back buffer returned %08lx\n", hr); if(SUCCEEDED(hr)) { /* Try to detach reversed */ hr = IDirectDrawSurface_DeleteAttachedSurface(surface1, 0, surface2); - ok(hr == DDERR_CANNOTDETACHSURFACE, "DeleteAttachedSurface returned %08x\n", hr); + ok(hr == DDERR_CANNOTDETACHSURFACE, "DeleteAttachedSurface returned %08lx\n", hr); /* Now the proper detach */ hr = IDirectDrawSurface_DeleteAttachedSurface(surface2, 0, surface1); - ok(hr == DD_OK, "DeleteAttachedSurface failed with %08x\n", hr); + ok(hr == DD_OK, "DeleteAttachedSurface failed with %08lx\n", hr); } hr = IDirectDrawSurface_AddAttachedSurface(surface2, surface3); todo_wine ok(hr == DD_OK || broken(hr == DDERR_CANNOTATTACHSURFACE), - "Attaching a back buffer to another back buffer returned %08x\n", hr); + "Attaching a back buffer to another back buffer returned %08lx\n", hr); if(SUCCEEDED(hr)) { hr = IDirectDrawSurface_DeleteAttachedSurface(surface2, 0, surface3); - ok(hr == DD_OK, "DeleteAttachedSurface failed with %08x\n", hr); + ok(hr == DD_OK, "DeleteAttachedSurface failed with %08lx\n", hr); } hr = IDirectDrawSurface_AddAttachedSurface(surface1, surface4); - ok(hr == DDERR_CANNOTATTACHSURFACE, "Attaching a back buffer to a front buffer of different size returned %08x\n", hr); + ok(hr == DDERR_CANNOTATTACHSURFACE, "Attaching a back buffer to a front buffer of different size returned %08lx\n", hr); hr = IDirectDrawSurface_AddAttachedSurface(surface4, surface1); - ok(hr == DDERR_CANNOTATTACHSURFACE, "Attaching a front buffer to a back buffer of different size returned %08x\n", hr); + ok(hr == DDERR_CANNOTATTACHSURFACE, "Attaching a front buffer to a back buffer of different size returned %08lx\n", hr);
IDirectDrawSurface_Release(surface4); IDirectDrawSurface_Release(surface3); @@ -1821,16 +1821,16 @@ static void BackBuffer3DAttachmentTest(void) }
hr =IDirectDraw_SetCooperativeLevel(DirectDraw1, NULL, DDSCL_NORMAL); - ok(hr == DD_OK, "SetCooperativeLevel returned %08x\n", hr); + ok(hr == DD_OK, "SetCooperativeLevel returned %08lx\n", hr);
DestroyWindow(window); }
static void dump_format(const DDPIXELFORMAT *fmt) { - trace("dwFlags %08x, FourCC %08x, dwZBufferBitDepth %u, stencil %08x\n", fmt->dwFlags, fmt->dwFourCC, + trace("dwFlags %08lx, FourCC %08lx, dwZBufferBitDepth %lu, stencil %08lx\n", fmt->dwFlags, fmt->dwFourCC, U1(*fmt).dwZBufferBitDepth, U2(*fmt).dwStencilBitDepth); - trace("dwZBitMask %08x, dwStencilBitMask %08x, dwRGBZBitMask %08x\n", U3(*fmt).dwZBitMask, + trace("dwZBitMask %08lx, dwStencilBitMask %08lx, dwRGBZBitMask %08lx\n", U3(*fmt).dwZBitMask, U4(*fmt).dwStencilBitMask, U5(*fmt).dwRGBZBitMask); }
@@ -1881,11 +1881,11 @@ static HRESULT WINAPI enum_z_fmt_cb(DDPIXELFORMAT *fmt, void *ctx) ddsd.dwWidth = 1024; ddsd.dwHeight = 1024; hr = IDirectDraw7_CreateSurface(lpDD, &ddsd, &surface, NULL); - ok(SUCCEEDED(hr), "IDirectDraw7_CreateSurface failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "IDirectDraw7_CreateSurface failed, hr %#lx.\n", hr); memset(&ddsd, 0, sizeof(ddsd)); ddsd.dwSize = sizeof(ddsd); hr = IDirectDrawSurface7_GetSurfaceDesc(surface, &ddsd); - ok(SUCCEEDED(hr), "IDirectDrawSurface7_GetSurfaceDesc failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "IDirectDrawSurface7_GetSurfaceDesc failed, hr %#lx.\n", hr); IDirectDrawSurface7_Release(surface);
ok(ddsd.dwFlags & DDSD_PIXELFORMAT, "DDSD_PIXELFORMAT is not set\n"); @@ -1903,7 +1903,7 @@ static HRESULT WINAPI enum_z_fmt_cb(DDPIXELFORMAT *fmt, void *ctx) if (U1(ddsd).lPitch != 0 && U1(ddsd).lPitch != expected_pitch && !broken(U1(ddsd).lPitch == expected_pitch + 128)) { - ok(0, "Z buffer pitch is %u, expected %u\n", U1(ddsd).lPitch, expected_pitch); + ok(0, "Z buffer pitch is %lu, expected %u\n", U1(ddsd).lPitch, expected_pitch); dump_format(fmt); }
@@ -1930,7 +1930,7 @@ static void z_format_test(void) return; }
- ok(SUCCEEDED(hr), "IDirect3D7_EnumZBufferFormats failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "IDirect3D7_EnumZBufferFormats failed, hr %#lx.\n", hr); ok(count, "Expected at least one supported Z Buffer format\n"); }
@@ -1949,17 +1949,17 @@ static void test_get_caps1(void)
/* NULL pointers */ hr = IDirect3DDevice_GetCaps(Direct3DDevice1, &hw_caps, NULL); - ok(hr == DDERR_INVALIDPARAMS, "GetCaps with NULL hel caps returned hr %#x, expected INVALIDPARAMS.\n", hr); - ok(hw_caps.dwFlags == 0xdeadbeef, "hw_caps.dwFlags was modified: %#x.\n", hw_caps.dwFlags); + ok(hr == DDERR_INVALIDPARAMS, "GetCaps with NULL hel caps returned hr %#lx, expected INVALIDPARAMS.\n", hr); + ok(hw_caps.dwFlags == 0xdeadbeef, "hw_caps.dwFlags was modified: %#lx.\n", hw_caps.dwFlags); hr = IDirect3DDevice_GetCaps(Direct3DDevice1, NULL, &hel_caps); - ok(hr == DDERR_INVALIDPARAMS, "GetCaps with NULL hw caps returned hr %#x, expected INVALIDPARAMS.\n", hr); - ok(hel_caps.dwFlags == 0xdeadc0de, "hel_caps.dwFlags was modified: %#x.\n", hel_caps.dwFlags); + ok(hr == DDERR_INVALIDPARAMS, "GetCaps with NULL hw caps returned hr %#lx, expected INVALIDPARAMS.\n", hr); + ok(hel_caps.dwFlags == 0xdeadc0de, "hel_caps.dwFlags was modified: %#lx.\n", hel_caps.dwFlags);
/* Successful call: Both are modified */ hr = IDirect3DDevice_GetCaps(Direct3DDevice1, &hw_caps, &hel_caps); - ok(hr == D3D_OK, "GetCaps with correct size returned hr %#x, expected D3D_OK.\n", hr); - ok(hw_caps.dwFlags != 0xdeadbeef, "hw_caps.dwFlags was not modified: %#x.\n", hw_caps.dwFlags); - ok(hel_caps.dwFlags != 0xdeadc0de, "hel_caps.dwFlags was not modified: %#x.\n", hel_caps.dwFlags); + ok(hr == D3D_OK, "GetCaps with correct size returned hr %#lx, expected D3D_OK.\n", hr); + ok(hw_caps.dwFlags != 0xdeadbeef, "hw_caps.dwFlags was not modified: %#lx.\n", hw_caps.dwFlags); + ok(hel_caps.dwFlags != 0xdeadc0de, "hel_caps.dwFlags was not modified: %#lx.\n", hel_caps.dwFlags);
memset(&hw_caps, 0, sizeof(hw_caps)); hw_caps.dwSize = sizeof(hw_caps); @@ -1970,15 +1970,15 @@ static void test_get_caps1(void)
/* If one is invalid the call fails */ hr = IDirect3DDevice_GetCaps(Direct3DDevice1, &hw_caps, &hel_caps); - ok(hr == DDERR_INVALIDPARAMS, "GetCaps with invalid hel_caps size returned hr %#x, expected INVALIDPARAMS.\n", hr); - ok(hw_caps.dwFlags == 0xdeadbeef, "hw_caps.dwFlags was modified: %#x.\n", hw_caps.dwFlags); - ok(hel_caps.dwFlags == 0xdeadc0de, "hel_caps.dwFlags was modified: %#x.\n", hel_caps.dwFlags); + ok(hr == DDERR_INVALIDPARAMS, "GetCaps with invalid hel_caps size returned hr %#lx, expected INVALIDPARAMS.\n", hr); + ok(hw_caps.dwFlags == 0xdeadbeef, "hw_caps.dwFlags was modified: %#lx.\n", hw_caps.dwFlags); + ok(hel_caps.dwFlags == 0xdeadc0de, "hel_caps.dwFlags was modified: %#lx.\n", hel_caps.dwFlags); hel_caps.dwSize = sizeof(hel_caps); hw_caps.dwSize = sizeof(hw_caps) + 1; hr = IDirect3DDevice_GetCaps(Direct3DDevice1, &hw_caps, &hel_caps); - ok(hr == DDERR_INVALIDPARAMS, "GetCaps with invalid hw_caps size returned hr %#x, expected INVALIDPARAMS.\n", hr); - ok(hw_caps.dwFlags == 0xdeadbeef, "hw_caps.dwFlags was modified: %#x.\n", hw_caps.dwFlags); - ok(hel_caps.dwFlags == 0xdeadc0de, "hel_caps.dwFlags was modified: %#x.\n", hel_caps.dwFlags); + ok(hr == DDERR_INVALIDPARAMS, "GetCaps with invalid hw_caps size returned hr %#lx, expected INVALIDPARAMS.\n", hr); + ok(hw_caps.dwFlags == 0xdeadbeef, "hw_caps.dwFlags was modified: %#lx.\n", hw_caps.dwFlags); + ok(hel_caps.dwFlags == 0xdeadc0de, "hel_caps.dwFlags was modified: %#lx.\n", hel_caps.dwFlags);
for (i = 0; i < 1024; i++) { @@ -1990,24 +1990,24 @@ static void test_get_caps1(void) { /* D3DDEVICEDESCSIZE in old sdk versions */ case FIELD_OFFSET(D3DDEVICEDESC, dwMinTextureWidth): /* 172, DirectX 3, IDirect3DDevice1 */ - ok(hw_caps.dwMinTextureWidth == 0xfefefefe, "hw_caps.dwMinTextureWidth was modified: %#x.\n", + ok(hw_caps.dwMinTextureWidth == 0xfefefefe, "hw_caps.dwMinTextureWidth was modified: %#lx.\n", hw_caps.dwMinTextureWidth); - ok(hel_caps.dwMinTextureWidth == 0xfefefefe, "hel_caps.dwMinTextureWidth was modified: %#x.\n", + ok(hel_caps.dwMinTextureWidth == 0xfefefefe, "hel_caps.dwMinTextureWidth was modified: %#lx.\n", hel_caps.dwMinTextureWidth); /* drop through */ case FIELD_OFFSET(D3DDEVICEDESC, dwMaxTextureRepeat): /* 204, DirectX 5, IDirect3DDevice2 */ - ok(hw_caps.dwMaxTextureRepeat == 0xfefefefe, "hw_caps.dwMaxTextureRepeat was modified: %#x.\n", + ok(hw_caps.dwMaxTextureRepeat == 0xfefefefe, "hw_caps.dwMaxTextureRepeat was modified: %#lx.\n", hw_caps.dwMaxTextureRepeat); - ok(hel_caps.dwMaxTextureRepeat == 0xfefefefe, "hel_caps.dwMaxTextureRepeat was modified: %#x.\n", + ok(hel_caps.dwMaxTextureRepeat == 0xfefefefe, "hel_caps.dwMaxTextureRepeat was modified: %#lx.\n", hel_caps.dwMaxTextureRepeat); /* drop through */ case sizeof(D3DDEVICEDESC): /* 252, DirectX 6, IDirect3DDevice3 */ - ok(hr == D3D_OK, "GetCaps with size %u returned hr %#x, expected D3D_OK.\n", i, hr); + ok(hr == D3D_OK, "GetCaps with size %u returned hr %#lx, expected D3D_OK.\n", i, hr); break;
default: ok(hr == DDERR_INVALIDPARAMS, - "GetCaps with size %u returned hr %#x, expected DDERR_INVALIDPARAMS.\n", i, hr); + "GetCaps with size %u returned hr %#lx, expected DDERR_INVALIDPARAMS.\n", i, hr); break; } } @@ -2016,7 +2016,7 @@ static void test_get_caps1(void) hw_caps.dwSize = 172; hel_caps.dwSize = sizeof(D3DDEVICEDESC); hr = IDirect3DDevice_GetCaps(Direct3DDevice1, &hw_caps, &hel_caps); - ok(hr == D3D_OK, "GetCaps with different sizes returned hr %#x, expected D3D_OK.\n", hr); + ok(hr == D3D_OK, "GetCaps with different sizes returned hr %#lx, expected D3D_OK.\n", hr); }
static void test_get_caps7(void) @@ -2025,11 +2025,11 @@ static void test_get_caps7(void) D3DDEVICEDESC7 desc;
hr = IDirect3DDevice7_GetCaps(lpD3DDevice, NULL); - ok(hr == DDERR_INVALIDPARAMS, "IDirect3DDevice7::GetCaps(NULL) returned hr %#x, expected INVALIDPARAMS.\n", hr); + ok(hr == DDERR_INVALIDPARAMS, "IDirect3DDevice7::GetCaps(NULL) returned hr %#lx, expected INVALIDPARAMS.\n", hr);
memset(&desc, 0, sizeof(desc)); hr = IDirect3DDevice7_GetCaps(lpD3DDevice, &desc); - ok(hr == D3D_OK, "IDirect3DDevice7::GetCaps(non-NULL) returned hr %#x, expected D3D_OK.\n", hr); + ok(hr == D3D_OK, "IDirect3DDevice7::GetCaps(non-NULL) returned hr %#lx, expected D3D_OK.\n", hr);
/* There's no dwSize in D3DDEVICEDESC7 */ } @@ -2051,29 +2051,29 @@ static void d3d2_release_objects(struct d3d2_test_context *context) if (context->viewport) { hr = IDirect3DDevice2_DeleteViewport(context->device, context->viewport); - ok(hr == D3D_OK, "DeleteViewport returned %08x.\n", hr); + ok(hr == D3D_OK, "DeleteViewport returned %08lx.\n", hr); ref = IDirect3DViewport2_Release(context->viewport); - ok(ref == 0, "Viewport has reference count %d, expected 0.\n", ref); + ok(ref == 0, "Viewport has reference count %ld, expected 0.\n", ref); } if (context->device) { ref = IDirect3DDevice2_Release(context->device); - ok(ref == 0, "Device has reference count %d, expected 0.\n", ref); + ok(ref == 0, "Device has reference count %ld, expected 0.\n", ref); } if (context->surface) { ref = IDirectDrawSurface_Release(context->surface); - ok(ref == 0, "Surface has reference count %d, expected 0.\n", ref); + ok(ref == 0, "Surface has reference count %ld, expected 0.\n", ref); } if (context->d3d) { ref = IDirect3D2_Release(context->d3d); - ok(ref == 1, "IDirect3D2 has reference count %d, expected 1.\n", ref); + ok(ref == 1, "IDirect3D2 has reference count %ld, expected 1.\n", ref); } if (context->ddraw) { ref = IDirectDraw_Release(context->ddraw); - ok(ref == 0, "DDraw has reference count %d, expected 0.\n", ref); + ok(ref == 0, "DDraw has reference count %ld, expected 0.\n", ref); } }
@@ -2086,15 +2086,15 @@ static BOOL d3d2_create_objects(struct d3d2_test_context *context) memset(context, 0, sizeof(*context));
hr = DirectDrawCreate(NULL, &context->ddraw, NULL); - ok(hr == DD_OK || hr == DDERR_NODIRECTDRAWSUPPORT, "DirectDrawCreate failed: %08x.\n", hr); + ok(hr == DD_OK || hr == DDERR_NODIRECTDRAWSUPPORT, "DirectDrawCreate failed: %08lx.\n", hr); if (!context->ddraw) goto error;
hr = IDirectDraw_SetCooperativeLevel(context->ddraw, NULL, DDSCL_NORMAL); - ok(hr == DD_OK, "SetCooperativeLevel failed: %08x.\n", hr); + ok(hr == DD_OK, "SetCooperativeLevel failed: %08lx.\n", hr); if (FAILED(hr)) goto error;
hr = IDirectDraw_QueryInterface(context->ddraw, &IID_IDirect3D2, (void**) &context->d3d); - ok(hr == DD_OK || hr == E_NOINTERFACE, "QueryInterface failed: %08x.\n", hr); + ok(hr == DD_OK || hr == E_NOINTERFACE, "QueryInterface failed: %08lx.\n", hr); if (!context->d3d) goto error;
memset(&ddsd, 0, sizeof(ddsd)); @@ -2111,15 +2111,15 @@ static BOOL d3d2_create_objects(struct d3d2_test_context *context) }
hr = IDirect3D2_CreateDevice(context->d3d, &IID_IDirect3DHALDevice, context->surface, &context->device); - ok(hr == D3D_OK || hr == E_OUTOFMEMORY || hr == E_NOINTERFACE, "CreateDevice failed: %08x.\n", hr); + ok(hr == D3D_OK || hr == E_OUTOFMEMORY || hr == E_NOINTERFACE, "CreateDevice failed: %08lx.\n", hr); if (!context->device) goto error;
hr = IDirect3D2_CreateViewport(context->d3d, &context->viewport, NULL); - ok(hr == D3D_OK, "CreateViewport failed: %08x.\n", hr); + ok(hr == D3D_OK, "CreateViewport failed: %08lx.\n", hr); if (!context->viewport) goto error;
hr = IDirect3DDevice2_AddViewport(context->device, context->viewport); - ok(hr == D3D_OK, "AddViewport returned %08x.\n", hr); + ok(hr == D3D_OK, "AddViewport returned %08lx.\n", hr); vp_data.dwSize = sizeof(vp_data); vp_data.dwX = 0; vp_data.dwY = 0; @@ -2132,7 +2132,7 @@ static BOOL d3d2_create_objects(struct d3d2_test_context *context) vp_data.dvMinZ = 0; vp_data.dvMaxZ = 1; hr = IDirect3DViewport2_SetViewport(context->viewport, &vp_data); - ok(hr == D3D_OK, "SetViewport returned %08x.\n", hr); + ok(hr == D3D_OK, "SetViewport returned %08lx.\n", hr);
return TRUE;
@@ -2156,17 +2156,17 @@ static void test_get_caps2(const struct d3d2_test_context *context)
/* NULL pointers */ hr = IDirect3DDevice2_GetCaps(context->device, &hw_caps, NULL); - ok(hr == DDERR_INVALIDPARAMS, "GetCaps with NULL hel caps returned hr %#x, expected INVALIDPARAMS.\n", hr); - ok(hw_caps.dwFlags == 0xdeadbeef, "hw_caps.dwFlags was modified: %#x.\n", hw_caps.dwFlags); + ok(hr == DDERR_INVALIDPARAMS, "GetCaps with NULL hel caps returned hr %#lx, expected INVALIDPARAMS.\n", hr); + ok(hw_caps.dwFlags == 0xdeadbeef, "hw_caps.dwFlags was modified: %#lx.\n", hw_caps.dwFlags); hr = IDirect3DDevice2_GetCaps(context->device, NULL, &hel_caps); - ok(hr == DDERR_INVALIDPARAMS, "GetCaps with NULL hw caps returned hr %#x, expected INVALIDPARAMS.\n", hr); - ok(hel_caps.dwFlags == 0xdeadc0de, "hel_caps.dwFlags was modified: %#x.\n", hel_caps.dwFlags); + ok(hr == DDERR_INVALIDPARAMS, "GetCaps with NULL hw caps returned hr %#lx, expected INVALIDPARAMS.\n", hr); + ok(hel_caps.dwFlags == 0xdeadc0de, "hel_caps.dwFlags was modified: %#lx.\n", hel_caps.dwFlags);
/* Successful call: Both are modified */ hr = IDirect3DDevice2_GetCaps(context->device, &hw_caps, &hel_caps); - ok(hr == D3D_OK, "GetCaps with correct size returned hr %#x, expected D3D_OK.\n", hr); - ok(hw_caps.dwFlags != 0xdeadbeef, "hw_caps.dwFlags was not modified: %#x.\n", hw_caps.dwFlags); - ok(hel_caps.dwFlags != 0xdeadc0de, "hel_caps.dwFlags was not modified: %#x.\n", hel_caps.dwFlags); + ok(hr == D3D_OK, "GetCaps with correct size returned hr %#lx, expected D3D_OK.\n", hr); + ok(hw_caps.dwFlags != 0xdeadbeef, "hw_caps.dwFlags was not modified: %#lx.\n", hw_caps.dwFlags); + ok(hel_caps.dwFlags != 0xdeadc0de, "hel_caps.dwFlags was not modified: %#lx.\n", hel_caps.dwFlags);
memset(&hw_caps, 0, sizeof(hw_caps)); hw_caps.dwSize = sizeof(hw_caps); @@ -2177,15 +2177,15 @@ static void test_get_caps2(const struct d3d2_test_context *context)
/* If one is invalid the call fails */ hr = IDirect3DDevice2_GetCaps(context->device, &hw_caps, &hel_caps); - ok(hr == DDERR_INVALIDPARAMS, "GetCaps with invalid hel_caps size returned hr %#x, expected INVALIDPARAMS.\n", hr); - ok(hw_caps.dwFlags == 0xdeadbeef, "hw_caps.dwFlags was modified: %#x.\n", hw_caps.dwFlags); - ok(hel_caps.dwFlags == 0xdeadc0de, "hel_caps.dwFlags was modified: %#x.\n", hel_caps.dwFlags); + ok(hr == DDERR_INVALIDPARAMS, "GetCaps with invalid hel_caps size returned hr %#lx, expected INVALIDPARAMS.\n", hr); + ok(hw_caps.dwFlags == 0xdeadbeef, "hw_caps.dwFlags was modified: %#lx.\n", hw_caps.dwFlags); + ok(hel_caps.dwFlags == 0xdeadc0de, "hel_caps.dwFlags was modified: %#lx.\n", hel_caps.dwFlags); hel_caps.dwSize = sizeof(hel_caps); hw_caps.dwSize = sizeof(hw_caps) + 1; hr = IDirect3DDevice2_GetCaps(context->device, &hw_caps, &hel_caps); - ok(hr == DDERR_INVALIDPARAMS, "GetCaps with invalid hw_caps size returned hr %#x, expected INVALIDPARAMS.\n", hr); - ok(hw_caps.dwFlags == 0xdeadbeef, "hw_caps.dwFlags was modified: %#x.\n", hw_caps.dwFlags); - ok(hel_caps.dwFlags == 0xdeadc0de, "hel_caps.dwFlags was modified: %#x.\n", hel_caps.dwFlags); + ok(hr == DDERR_INVALIDPARAMS, "GetCaps with invalid hw_caps size returned hr %#lx, expected INVALIDPARAMS.\n", hr); + ok(hw_caps.dwFlags == 0xdeadbeef, "hw_caps.dwFlags was modified: %#lx.\n", hw_caps.dwFlags); + ok(hel_caps.dwFlags == 0xdeadc0de, "hel_caps.dwFlags was modified: %#lx.\n", hel_caps.dwFlags);
for (i = 0; i < 1024; i++) { @@ -2197,24 +2197,24 @@ static void test_get_caps2(const struct d3d2_test_context *context) { /* D3DDEVICEDESCSIZE in old sdk versions */ case FIELD_OFFSET(D3DDEVICEDESC, dwMinTextureWidth): /* 172, DirectX 3, IDirect3DDevice1 */ - ok(hw_caps.dwMinTextureWidth == 0xfefefefe, "dwMinTextureWidth was modified: %#x.\n", + ok(hw_caps.dwMinTextureWidth == 0xfefefefe, "dwMinTextureWidth was modified: %#lx.\n", hw_caps.dwMinTextureWidth); - ok(hel_caps.dwMinTextureWidth == 0xfefefefe, "dwMinTextureWidth was modified: %#x.\n", + ok(hel_caps.dwMinTextureWidth == 0xfefefefe, "dwMinTextureWidth was modified: %#lx.\n", hel_caps.dwMinTextureWidth); /* drop through */ case FIELD_OFFSET(D3DDEVICEDESC, dwMaxTextureRepeat): /* 204, DirectX 5, IDirect3DDevice2 */ - ok(hw_caps.dwMaxTextureRepeat == 0xfefefefe, "dwMaxTextureRepeat was modified: %#x.\n", + ok(hw_caps.dwMaxTextureRepeat == 0xfefefefe, "dwMaxTextureRepeat was modified: %#lx.\n", hw_caps.dwMaxTextureRepeat); - ok(hel_caps.dwMaxTextureRepeat == 0xfefefefe, "dwMaxTextureRepeat was modified: %#x.\n", + ok(hel_caps.dwMaxTextureRepeat == 0xfefefefe, "dwMaxTextureRepeat was modified: %#lx.\n", hel_caps.dwMaxTextureRepeat); /* drop through */ case sizeof(D3DDEVICEDESC): /* 252, DirectX 6, IDirect3DDevice3 */ - ok(hr == D3D_OK, "GetCaps with size %u returned hr %#x, expected D3D_OK.\n", i, hr); + ok(hr == D3D_OK, "GetCaps with size %u returned hr %#lx, expected D3D_OK.\n", i, hr); break;
default: ok(hr == DDERR_INVALIDPARAMS, - "GetCaps with size %u returned hr %#x, expected DDERR_INVALIDPARAMS.\n", i, hr); + "GetCaps with size %u returned hr %#lx, expected DDERR_INVALIDPARAMS.\n", i, hr); break; } } @@ -2223,7 +2223,7 @@ static void test_get_caps2(const struct d3d2_test_context *context) hw_caps.dwSize = 172; hel_caps.dwSize = sizeof(D3DDEVICEDESC); hr = IDirect3DDevice2_GetCaps(context->device, &hw_caps, &hel_caps); - ok(hr == D3D_OK, "GetCaps with different sizes returned hr %#x, expected D3D_OK.\n", hr); + ok(hr == D3D_OK, "GetCaps with different sizes returned hr %#lx, expected D3D_OK.\n", hr); }
START_TEST(d3d) diff --git a/dlls/ddraw/tests/ddraw1.c b/dlls/ddraw/tests/ddraw1.c index 458b3f48fdb..764b5e38704 100644 --- a/dlls/ddraw/tests/ddraw1.c +++ b/dlls/ddraw/tests/ddraw1.c @@ -120,9 +120,9 @@ static BOOL ddraw_get_identifier(IDirectDraw *ddraw, DDDEVICEIDENTIFIER *identif HRESULT hr;
hr = IDirectDraw_QueryInterface(ddraw, &IID_IDirectDraw4, (void **)&ddraw4); - ok(SUCCEEDED(hr), "Failed to get IDirectDraw4 interface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get IDirectDraw4 interface, hr %#lx.\n", hr); hr = IDirectDraw4_GetDeviceIdentifier(ddraw4, identifier, 0); - ok(SUCCEEDED(hr), "Failed to get device identifier, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get device identifier, hr %#lx.\n", hr); IDirectDraw4_Release(ddraw4);
return SUCCEEDED(hr); @@ -210,7 +210,7 @@ static DWORD WINAPI create_window_thread_proc(void *param)
p->window = create_window(); ret = SetEvent(p->window_created); - ok(ret, "SetEvent failed, last error %#x.\n", GetLastError()); + ok(ret, "SetEvent failed, last error %#lx.\n", GetLastError());
for (;;) { @@ -223,7 +223,7 @@ static DWORD WINAPI create_window_thread_proc(void *param) break; if (res != WAIT_TIMEOUT) { - ok(0, "Wait failed (%#x), last error %#x.\n", res, GetLastError()); + ok(0, "Wait failed (%#lx), last error %#lx.\n", res, GetLastError()); break; } } @@ -238,13 +238,13 @@ static void create_window_thread(struct create_window_thread_param *p) DWORD res, tid;
p->window_created = CreateEventA(NULL, FALSE, FALSE, NULL); - ok(!!p->window_created, "CreateEvent failed, last error %#x.\n", GetLastError()); + ok(!!p->window_created, "CreateEvent failed, last error %#lx.\n", GetLastError()); p->destroy_window = CreateEventA(NULL, FALSE, FALSE, NULL); - ok(!!p->destroy_window, "CreateEvent failed, last error %#x.\n", GetLastError()); + ok(!!p->destroy_window, "CreateEvent failed, last error %#lx.\n", GetLastError()); p->thread = CreateThread(NULL, 0, create_window_thread_proc, p, 0, &tid); - ok(!!p->thread, "Failed to create thread, last error %#x.\n", GetLastError()); + ok(!!p->thread, "Failed to create thread, last error %#lx.\n", GetLastError()); res = WaitForSingleObject(p->window_created, INFINITE); - ok(res == WAIT_OBJECT_0, "Wait failed (%#x), last error %#x.\n", res, GetLastError()); + ok(res == WAIT_OBJECT_0, "Wait failed (%#lx), last error %#lx.\n", res, GetLastError()); }
static void destroy_window_thread(struct create_window_thread_param *p) @@ -263,9 +263,9 @@ static IDirectDrawSurface *get_depth_stencil(IDirect3DDevice *device) HRESULT hr;
hr = IDirect3DDevice_QueryInterface(device, &IID_IDirectDrawSurface, (void **)&rt); - ok(SUCCEEDED(hr), "Failed to get render target, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get render target, hr %#lx.\n", hr); hr = IDirectDrawSurface_GetAttachedSurface(rt, &caps, &ret); - ok(SUCCEEDED(hr) || hr == DDERR_NOTFOUND, "Failed to get the z buffer, hr %#x.\n", hr); + ok(SUCCEEDED(hr) || hr == DDERR_NOTFOUND, "Failed to get the z buffer, hr %#lx.\n", hr); IDirectDrawSurface_Release(rt); return ret; } @@ -351,14 +351,14 @@ static D3DCOLOR get_surface_color(IDirectDrawSurface *surface, UINT x, UINT y) surface_desc.dwSize = sizeof(surface_desc);
hr = IDirectDrawSurface_Lock(surface, &rect, &surface_desc, DDLOCK_READONLY | DDLOCK_WAIT, NULL); - ok(SUCCEEDED(hr), "Failed to lock surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to lock surface, hr %#lx.\n", hr); if (FAILED(hr)) return 0xdeadbeef;
color = *((DWORD *)surface_desc.lpSurface) & 0x00ffffff;
hr = IDirectDrawSurface_Unlock(surface, NULL); - ok(SUCCEEDED(hr), "Failed to unlock surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to unlock surface, hr %#lx.\n", hr);
return color; } @@ -371,7 +371,7 @@ static void fill_surface(IDirectDrawSurface *surface, D3DCOLOR color) DWORD *ptr;
hr = IDirectDrawSurface_Lock(surface, NULL, &surface_desc, DDLOCK_WAIT, NULL); - ok(SUCCEEDED(hr), "Failed to lock surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to lock surface, hr %#lx.\n", hr);
for (y = 0; y < surface_desc.dwHeight; ++y) { @@ -383,7 +383,7 @@ static void fill_surface(IDirectDrawSurface *surface, D3DCOLOR color) }
hr = IDirectDrawSurface_Unlock(surface, NULL); - ok(SUCCEEDED(hr), "Failed to unlock surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to unlock surface, hr %#lx.\n", hr); }
static void check_rect(IDirectDrawSurface *surface, RECT r, const char *message) @@ -417,7 +417,7 @@ static void check_rect(IDirectDrawSurface *surface, RECT r, const char *message) if (x < 0 || x >= 640 || y < 0 || y >= 480) continue; color = get_surface_color(surface, x, y); - ok(color == expected, "%s: Pixel (%d, %d) has color %08x, expected %08x\n", + ok(color == expected, "%s: Pixel (%ld, %ld) has color %08lx, expected %08lx\n", message, x, y, color, expected); } } @@ -596,7 +596,7 @@ static void set_execute_data(IDirect3DExecuteBuffer *execute_buffer, UINT vertex exec_data.dwInstructionOffset = offset; exec_data.dwInstructionLength = len; hr = IDirect3DExecuteBuffer_SetExecuteData(execute_buffer, &exec_data); - ok(SUCCEEDED(hr), "Failed to set execute data, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set execute data, hr %#lx.\n", hr); }
static DWORD get_device_z_depth(IDirect3DDevice *device) @@ -647,7 +647,7 @@ static IDirect3DDevice *create_device_ex(IDirectDraw *ddraw, HWND window, DWORD HRESULT hr;
hr = IDirectDraw_SetCooperativeLevel(ddraw, window, coop_level); - ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#lx.\n", hr);
memset(&surface_desc, 0, sizeof(surface_desc)); surface_desc.dwSize = sizeof(surface_desc); @@ -659,18 +659,18 @@ static IDirect3DDevice *create_device_ex(IDirectDraw *ddraw, HWND window, DWORD surface_desc.dwHeight = 480;
hr = IDirectDraw_CreateSurface(ddraw, &surface_desc, &surface, NULL); - ok(SUCCEEDED(hr), "Failed to create surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create surface, hr %#lx.\n", hr);
if (coop_level & DDSCL_NORMAL) { IDirectDrawClipper *clipper;
hr = IDirectDraw_CreateClipper(ddraw, 0, &clipper, NULL); - ok(SUCCEEDED(hr), "Failed to create clipper, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create clipper, hr %#lx.\n", hr); hr = IDirectDrawClipper_SetHWnd(clipper, 0, window); - ok(SUCCEEDED(hr), "Failed to set clipper window, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set clipper window, hr %#lx.\n", hr); hr = IDirectDrawSurface_SetClipper(surface, clipper); - ok(SUCCEEDED(hr), "Failed to set surface clipper, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set surface clipper, hr %#lx.\n", hr); IDirectDrawClipper_Release(clipper); }
@@ -692,7 +692,7 @@ static IDirect3DDevice *create_device_ex(IDirectDraw *ddraw, HWND window, DWORD continue;
hr = IDirectDrawSurface_AddAttachedSurface(surface, ds); - ok(SUCCEEDED(hr), "Failed to attach depth buffer, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to attach depth buffer, hr %#lx.\n", hr); IDirectDrawSurface_Release(ds); if (FAILED(hr)) continue; @@ -720,11 +720,11 @@ static IDirect3DViewport *create_viewport(IDirect3DDevice *device, UINT x, UINT HRESULT hr;
hr = IDirect3DDevice_GetDirect3D(device, &d3d); - ok(SUCCEEDED(hr), "Failed to get d3d interface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get d3d interface, hr %#lx.\n", hr); hr = IDirect3D_CreateViewport(d3d, &viewport, NULL); - ok(SUCCEEDED(hr), "Failed to create viewport, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create viewport, hr %#lx.\n", hr); hr = IDirect3DDevice_AddViewport(device, viewport); - ok(SUCCEEDED(hr), "Failed to add viewport, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to add viewport, hr %#lx.\n", hr); memset(&vp, 0, sizeof(vp)); vp.dwSize = sizeof(vp); vp.dwX = x; @@ -738,7 +738,7 @@ static IDirect3DViewport *create_viewport(IDirect3DDevice *device, UINT x, UINT vp.dvMinZ = 0.0f; vp.dvMaxZ = 1.0f; hr = IDirect3DViewport_SetViewport(viewport, &vp); - ok(SUCCEEDED(hr), "Failed to set viewport data, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set viewport data, hr %#lx.\n", hr); IDirect3D_Release(d3d);
return viewport; @@ -751,9 +751,9 @@ static void viewport_set_background(IDirect3DDevice *device, IDirect3DViewport * HRESULT hr;
hr = IDirect3DMaterial2_GetHandle(material, device, &material_handle); - ok(SUCCEEDED(hr), "Failed to get material handle, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get material handle, hr %#lx.\n", hr); hr = IDirect3DViewport2_SetBackground(viewport, material_handle); - ok(SUCCEEDED(hr), "Failed to set viewport background, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set viewport background, hr %#lx.\n", hr); }
static void destroy_viewport(IDirect3DDevice *device, IDirect3DViewport *viewport) @@ -761,7 +761,7 @@ static void destroy_viewport(IDirect3DDevice *device, IDirect3DViewport *viewpor HRESULT hr;
hr = IDirect3DDevice_DeleteViewport(device, viewport); - ok(SUCCEEDED(hr), "Failed to delete viewport, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to delete viewport, hr %#lx.\n", hr); IDirect3DViewport_Release(viewport); }
@@ -772,11 +772,11 @@ static IDirect3DMaterial *create_material(IDirect3DDevice *device, D3DMATERIAL * HRESULT hr;
hr = IDirect3DDevice_GetDirect3D(device, &d3d); - ok(SUCCEEDED(hr), "Failed to get d3d interface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get d3d interface, hr %#lx.\n", hr); hr = IDirect3D_CreateMaterial(d3d, &material, NULL); - ok(SUCCEEDED(hr), "Failed to create material, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create material, hr %#lx.\n", hr); hr = IDirect3DMaterial_SetMaterial(material, mat); - ok(SUCCEEDED(hr), "Failed to set material data, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set material data, hr %#lx.\n", hr); IDirect3D_Release(d3d);
return material; @@ -866,7 +866,7 @@ static LRESULT CALLBACK test_proc(HWND hwnd, UINT message, WPARAM wparam, LPARAM { if (expect_messages->check_wparam) ok (wparam == expect_messages->expect_wparam, - "Got unexpected wparam %lx for message %x, expected %lx.\n", + "Got unexpected wparam %Ix for message %x, expected %Ix.\n", wparam, message, expect_messages->expect_wparam);
++expect_messages; @@ -888,9 +888,9 @@ static void fix_wndproc(HWND window, LONG_PTR proc)
SetWindowLongPtrA(window, GWLP_WNDPROC, proc); hr = IDirectDraw_SetCooperativeLevel(ddraw, window, DDSCL_EXCLUSIVE | DDSCL_FULLSCREEN); - ok(SUCCEEDED(hr), "SetCooperativeLevel failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "SetCooperativeLevel failed, hr %#lx.\n", hr); hr = IDirectDraw_SetCooperativeLevel(ddraw, window, DDSCL_NORMAL); - ok(SUCCEEDED(hr), "SetCooperativeLevel failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "SetCooperativeLevel failed, hr %#lx.\n", hr);
IDirectDraw_Release(ddraw); } @@ -898,7 +898,7 @@ static void fix_wndproc(HWND window, LONG_PTR proc) static HRESULT CALLBACK restore_callback(IDirectDrawSurface *surface, DDSURFACEDESC *desc, void *context) { HRESULT hr = IDirectDrawSurface_Restore(surface); - ok(SUCCEEDED(hr) || hr == DDERR_IMPLICITLYCREATED, "Failed to restore surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr) || hr == DDERR_IMPLICITLYCREATED, "Failed to restore surface, hr %#lx.\n", hr); IDirectDrawSurface_Release(surface);
return DDENUMRET_OK; @@ -921,23 +921,23 @@ static void test_coop_level_create_device_window(void) ok(!!ddraw, "Failed to create a ddraw object.\n");
hr = IDirectDraw_SetCooperativeLevel(ddraw, NULL, DDSCL_NORMAL); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); device_window = FindWindowA("DirectDrawDeviceWnd", "DirectDrawDeviceWnd"); ok(!device_window, "Unexpected device window found.\n"); hr = IDirectDraw_SetCooperativeLevel(ddraw, NULL, DDSCL_CREATEDEVICEWINDOW); - ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#lx.\n", hr); device_window = FindWindowA("DirectDrawDeviceWnd", "DirectDrawDeviceWnd"); ok(!device_window, "Unexpected device window found.\n"); hr = IDirectDraw_SetCooperativeLevel(ddraw, NULL, DDSCL_CREATEDEVICEWINDOW | DDSCL_NORMAL); - ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#lx.\n", hr); device_window = FindWindowA("DirectDrawDeviceWnd", "DirectDrawDeviceWnd"); ok(!device_window, "Unexpected device window found.\n"); hr = IDirectDraw_SetCooperativeLevel(ddraw, NULL, DDSCL_CREATEDEVICEWINDOW | DDSCL_NORMAL | DDSCL_FULLSCREEN); - ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#lx.\n", hr); device_window = FindWindowA("DirectDrawDeviceWnd", "DirectDrawDeviceWnd"); ok(!device_window, "Unexpected device window found.\n"); hr = IDirectDraw_SetCooperativeLevel(ddraw, NULL, DDSCL_CREATEDEVICEWINDOW | DDSCL_EXCLUSIVE | DDSCL_FULLSCREEN); - ok(hr == DDERR_NOFOCUSWINDOW || broken(hr == DDERR_INVALIDPARAMS), "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_NOFOCUSWINDOW || broken(hr == DDERR_INVALIDPARAMS), "Got unexpected hr %#lx.\n", hr); device_window = FindWindowA("DirectDrawDeviceWnd", "DirectDrawDeviceWnd"); ok(!device_window, "Unexpected device window found.\n");
@@ -951,48 +951,48 @@ static void test_coop_level_create_device_window(void) }
hr = IDirectDraw_SetCooperativeLevel(ddraw, NULL, DDSCL_NORMAL); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); device_window = FindWindowA("DirectDrawDeviceWnd", "DirectDrawDeviceWnd"); ok(!device_window, "Unexpected device window found.\n"); hr = IDirectDraw_SetCooperativeLevel(ddraw, focus_window, DDSCL_EXCLUSIVE | DDSCL_FULLSCREEN); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); device_window = FindWindowA("DirectDrawDeviceWnd", "DirectDrawDeviceWnd"); ok(!device_window, "Unexpected device window found.\n");
hr = IDirectDraw_SetCooperativeLevel(ddraw, NULL, DDSCL_NORMAL); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); device_window = FindWindowA("DirectDrawDeviceWnd", "DirectDrawDeviceWnd"); ok(!device_window, "Unexpected device window found.\n"); hr = IDirectDraw_SetCooperativeLevel(ddraw, NULL, DDSCL_SETFOCUSWINDOW | DDSCL_CREATEDEVICEWINDOW | DDSCL_EXCLUSIVE | DDSCL_FULLSCREEN); - ok(hr == DDERR_NOHWND, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_NOHWND, "Got unexpected hr %#lx.\n", hr); device_window = FindWindowA("DirectDrawDeviceWnd", "DirectDrawDeviceWnd"); ok(!!device_window, "Device window not found.\n");
hr = IDirectDraw_SetCooperativeLevel(ddraw, NULL, DDSCL_NORMAL); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); device_window = FindWindowA("DirectDrawDeviceWnd", "DirectDrawDeviceWnd"); ok(!device_window, "Unexpected device window found.\n"); hr = IDirectDraw_SetCooperativeLevel(ddraw, focus_window, DDSCL_SETFOCUSWINDOW | DDSCL_CREATEDEVICEWINDOW | DDSCL_EXCLUSIVE | DDSCL_FULLSCREEN); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); device_window = FindWindowA("DirectDrawDeviceWnd", "DirectDrawDeviceWnd"); ok(!!device_window, "Device window not found.\n");
hr = IDirectDraw_SetCooperativeLevel(ddraw, NULL, DDSCL_NORMAL); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); device_window = FindWindowA("DirectDrawDeviceWnd", "DirectDrawDeviceWnd"); ok(!device_window, "Unexpected device window found.\n"); hr = IDirectDraw_SetCooperativeLevel(ddraw, NULL, DDSCL_CREATEDEVICEWINDOW | DDSCL_EXCLUSIVE | DDSCL_FULLSCREEN); - ok(hr == DDERR_NOFOCUSWINDOW, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_NOFOCUSWINDOW, "Got unexpected hr %#lx.\n", hr); device_window = FindWindowA("DirectDrawDeviceWnd", "DirectDrawDeviceWnd"); ok(!device_window, "Unexpected device window found.\n"); hr = IDirectDraw_SetCooperativeLevel(ddraw, focus_window, DDSCL_SETFOCUSWINDOW); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); device_window = FindWindowA("DirectDrawDeviceWnd", "DirectDrawDeviceWnd"); ok(!device_window, "Unexpected device window found.\n"); hr = IDirectDraw_SetCooperativeLevel(ddraw, NULL, DDSCL_CREATEDEVICEWINDOW | DDSCL_EXCLUSIVE | DDSCL_FULLSCREEN); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); device_window = FindWindowA("DirectDrawDeviceWnd", "DirectDrawDeviceWnd"); ok(!!device_window, "Device window not found.\n");
@@ -1066,22 +1066,22 @@ static void test_clipper_blt(void) ok(ret, "Failed to map client rect.\n");
hr = IDirectDraw_SetCooperativeLevel(ddraw, window, DDSCL_NORMAL); - ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#lx.\n", hr);
hr = IDirectDraw_CreateClipper(ddraw, 0, &clipper, NULL); - ok(SUCCEEDED(hr), "Failed to create clipper, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create clipper, hr %#lx.\n", hr); hr = IDirectDrawClipper_GetClipList(clipper, NULL, NULL, &ret); - ok(hr == DDERR_NOCLIPLIST, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_NOCLIPLIST, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawClipper_SetHWnd(clipper, 0, window); - ok(SUCCEEDED(hr), "Failed to set clipper window, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set clipper window, hr %#lx.\n", hr); hr = IDirectDrawClipper_GetClipList(clipper, NULL, NULL, &ret); - ok(SUCCEEDED(hr), "Failed to get clip list size, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get clip list size, hr %#lx.\n", hr); rgn_data = HeapAlloc(GetProcessHeap(), 0, ret); hr = IDirectDrawClipper_GetClipList(clipper, NULL, rgn_data, &ret); - ok(SUCCEEDED(hr), "Failed to get clip list, hr %#x.\n", hr); - ok(rgn_data->rdh.dwSize == sizeof(rgn_data->rdh), "Got unexpected structure size %#x.\n", rgn_data->rdh.dwSize); - ok(rgn_data->rdh.iType == RDH_RECTANGLES, "Got unexpected type %#x.\n", rgn_data->rdh.iType); - ok(rgn_data->rdh.nCount >= 1, "Got unexpected count %u.\n", rgn_data->rdh.nCount); + ok(SUCCEEDED(hr), "Failed to get clip list, hr %#lx.\n", hr); + ok(rgn_data->rdh.dwSize == sizeof(rgn_data->rdh), "Got unexpected structure size %#lx.\n", rgn_data->rdh.dwSize); + ok(rgn_data->rdh.iType == RDH_RECTANGLES, "Got unexpected type %#lx.\n", rgn_data->rdh.iType); + ok(rgn_data->rdh.nCount >= 1, "Got unexpected count %lu.\n", rgn_data->rdh.nCount); ok(EqualRect(&rgn_data->rdh.rcBound, &client_rect), "Got unexpected bounding rect %s, expected %s.\n", wine_dbgstr_rect(&rgn_data->rdh.rcBound), wine_dbgstr_rect(&client_rect)); @@ -1101,11 +1101,11 @@ static void test_clipper_blt(void) DeleteObject(r1);
hr = IDirectDrawClipper_SetClipList(clipper, rgn_data, 0); - ok(hr == DDERR_CLIPPERISUSINGHWND, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_CLIPPERISUSINGHWND, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawClipper_SetHWnd(clipper, 0, NULL); - ok(SUCCEEDED(hr), "Failed to set clipper window, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set clipper window, hr %#lx.\n", hr); hr = IDirectDrawClipper_SetClipList(clipper, rgn_data, 0); - ok(SUCCEEDED(hr), "Failed to set clip list, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set clip list, hr %#lx.\n", hr);
HeapFree(GetProcessHeap(), 0, rgn_data);
@@ -1123,33 +1123,33 @@ static void test_clipper_blt(void) U4(surface_desc.ddpfPixelFormat).dwBBitMask = 0x000000ff;
hr = IDirectDraw_CreateSurface(ddraw, &surface_desc, &src_surface, NULL); - ok(SUCCEEDED(hr), "Failed to create source surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create source surface, hr %#lx.\n", hr); hr = IDirectDraw_CreateSurface(ddraw, &surface_desc, &dst_surface, NULL); - ok(SUCCEEDED(hr), "Failed to create destination surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create destination surface, hr %#lx.\n", hr);
memset(&fx, 0, sizeof(fx)); fx.dwSize = sizeof(fx); hr = IDirectDrawSurface_Blt(src_surface, NULL, NULL, NULL, DDBLT_COLORFILL | DDBLT_WAIT, &fx); - ok(SUCCEEDED(hr), "Failed to clear source surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to clear source surface, hr %#lx.\n", hr); hr = IDirectDrawSurface_Blt(dst_surface, NULL, NULL, NULL, DDBLT_COLORFILL | DDBLT_WAIT, &fx); - ok(SUCCEEDED(hr), "Failed to clear destination surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to clear destination surface, hr %#lx.\n", hr);
hr = IDirectDrawSurface_Lock(src_surface, NULL, &surface_desc, DDLOCK_WAIT, NULL); - ok(SUCCEEDED(hr), "Failed to lock source surface, hr %#x.\n", hr); - ok(U1(surface_desc).lPitch == 2560, "Got unexpected surface pitch %u.\n", U1(surface_desc).lPitch); + ok(SUCCEEDED(hr), "Failed to lock source surface, hr %#lx.\n", hr); + ok(U1(surface_desc).lPitch == 2560, "Got unexpected surface pitch %lu.\n", U1(surface_desc).lPitch); ptr = surface_desc.lpSurface; memcpy(&ptr[ 0], &src_data[ 0], 6 * sizeof(DWORD)); memcpy(&ptr[ 640], &src_data[ 6], 6 * sizeof(DWORD)); memcpy(&ptr[1280], &src_data[12], 6 * sizeof(DWORD)); hr = IDirectDrawSurface_Unlock(src_surface, NULL); - ok(SUCCEEDED(hr), "Failed to unlock source surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to unlock source surface, hr %#lx.\n", hr);
hr = IDirectDrawSurface_SetClipper(dst_surface, clipper); - ok(SUCCEEDED(hr), "Failed to set clipper, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set clipper, hr %#lx.\n", hr);
SetRect(&src_rect, 1, 1, 5, 2); hr = IDirectDrawSurface_Blt(dst_surface, NULL, src_surface, &src_rect, DDBLT_WAIT, NULL); - ok(SUCCEEDED(hr), "Failed to blit, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to blit, hr %#lx.\n", hr); for (i = 0; i < 4; ++i) { for (j = 0; j < 4; ++j) @@ -1159,13 +1159,13 @@ static void test_clipper_blt(void) color = get_surface_color(dst_surface, x, y); ok(compare_color(color, expected1[i * 4 + j], 1) || broken(compare_color(color, expected1_broken[i * 4 + j], 1)), - "Expected color 0x%08x at %u,%u, got 0x%08x.\n", expected1[i * 4 + j], x, y, color); + "Expected color 0x%08lx at %u,%u, got 0x%08lx.\n", expected1[i * 4 + j], x, y, color); } }
U5(fx).dwFillColor = 0xff0000ff; hr = IDirectDrawSurface_Blt(dst_surface, NULL, NULL, NULL, DDBLT_COLORFILL | DDBLT_WAIT, &fx); - ok(SUCCEEDED(hr), "Failed to clear destination surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to clear destination surface, hr %#lx.\n", hr); for (i = 0; i < 4; ++i) { for (j = 0; j < 4; ++j) @@ -1174,35 +1174,35 @@ static void test_clipper_blt(void) y = 60 * ((2 * i) + 1); color = get_surface_color(dst_surface, x, y); ok(compare_color(color, expected2[i * 4 + j], 1), - "Expected color 0x%08x at %u,%u, got 0x%08x.\n", expected2[i * 4 + j], x, y, color); + "Expected color 0x%08lx at %u,%u, got 0x%08lx.\n", expected2[i * 4 + j], x, y, color); } }
hr = IDirectDrawSurface_BltFast(dst_surface, 0, 0, src_surface, NULL, DDBLTFAST_WAIT); - ok(hr == DDERR_BLTFASTCANTCLIP || broken(hr == E_NOTIMPL /* NT4 */), "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_BLTFASTCANTCLIP || broken(hr == E_NOTIMPL /* NT4 */), "Got unexpected hr %#lx.\n", hr);
hr = IDirectDrawClipper_SetHWnd(clipper, 0, window); - ok(SUCCEEDED(hr), "Failed to set clipper window, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set clipper window, hr %#lx.\n", hr); hr = IDirectDrawClipper_GetClipList(clipper, NULL, NULL, &ret); - ok(SUCCEEDED(hr), "Failed to get clip list size, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get clip list size, hr %#lx.\n", hr); DestroyWindow(window); hr = IDirectDrawClipper_GetClipList(clipper, NULL, NULL, &ret); - ok(hr == E_FAIL, "Got unexpected hr %#x.\n", hr); + ok(hr == E_FAIL, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawClipper_SetHWnd(clipper, 0, NULL); - ok(SUCCEEDED(hr), "Failed to set clipper window, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set clipper window, hr %#lx.\n", hr); hr = IDirectDrawClipper_GetClipList(clipper, NULL, NULL, &ret); - ok(SUCCEEDED(hr), "Failed to get clip list size, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get clip list size, hr %#lx.\n", hr); hr = IDirectDrawClipper_SetClipList(clipper, NULL, 0); - ok(SUCCEEDED(hr), "Failed to set clip list, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set clip list, hr %#lx.\n", hr); hr = IDirectDrawClipper_GetClipList(clipper, NULL, NULL, &ret); - ok(hr == DDERR_NOCLIPLIST, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_NOCLIPLIST, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface_Blt(dst_surface, NULL, NULL, NULL, DDBLT_COLORFILL | DDBLT_WAIT, &fx); - ok(hr == DDERR_NOCLIPLIST, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_NOCLIPLIST, "Got unexpected hr %#lx.\n", hr);
IDirectDrawSurface_Release(dst_surface); IDirectDrawSurface_Release(src_surface); refcount = IDirectDrawClipper_Release(clipper); - ok(!refcount, "Clipper has %u references left.\n", refcount); + ok(!refcount, "Clipper has %lu references left.\n", refcount); IDirectDraw_Release(ddraw); }
@@ -1236,31 +1236,31 @@ static void test_coop_level_d3d_state(void) viewport_set_background(device, viewport, background);
hr = IDirect3DDevice_QueryInterface(device, &IID_IDirectDrawSurface, (void **)&rt); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirect3DViewport_Clear(viewport, 1, &clear_rect, D3DCLEAR_TARGET); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); color = get_surface_color(rt, 320, 240); - ok(compare_color(color, 0x00ff0000, 1), "Got unexpected color 0x%08x.\n", color); + ok(compare_color(color, 0x00ff0000, 1), "Got unexpected color 0x%08lx.\n", color);
hr = IDirectDraw_SetCooperativeLevel(ddraw, window, DDSCL_EXCLUSIVE | DDSCL_FULLSCREEN); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface_IsLost(rt); - ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#lx.\n", hr);
memset(&lock, 0, sizeof(lock)); lock.dwSize = sizeof(lock); lock.lpSurface = (void *)0xdeadbeef; hr = IDirectDrawSurface_Lock(rt, NULL, &lock, DDLOCK_READONLY, NULL); - ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#lx.\n", hr); ok(lock.lpSurface == (void *)0xdeadbeef, "Got unexpected lock.lpSurface %p.\n", lock.lpSurface);
hr = restore_surfaces(ddraw); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr);
hr = IDirectDrawSurface_Lock(rt, NULL, &lock, DDLOCK_READONLY, NULL); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface2_Unlock(rt, NULL); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr);
memset(&material, 0, sizeof(material)); material.dwSize = sizeof(material); @@ -1269,16 +1269,16 @@ static void test_coop_level_d3d_state(void) U3(U(material).diffuse).b = 0.0f; U4(U(material).diffuse).a = 1.0f; hr = IDirect3DMaterial_SetMaterial(background, &material); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr);
hr = IDirect3DDevice_QueryInterface(device, &IID_IDirectDrawSurface, (void **)&surface); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); ok(surface == rt, "Got unexpected surface %p.\n", surface); hr = IDirect3DViewport_Clear(viewport, 1, &clear_rect, D3DCLEAR_TARGET); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); color = get_surface_color(rt, 320, 240); ok(compare_color(color, 0x0000ff00, 1) || broken(compare_color(color, 0x00000000, 1)), - "Got unexpected color 0x%08x.\n", color); + "Got unexpected color 0x%08lx.\n", color);
destroy_viewport(device, viewport); destroy_material(background); @@ -1328,7 +1328,7 @@ static void test_surface_interface_mismatch(void) surface_desc.dwHeight = 480;
hr = IDirectDraw_CreateSurface(ddraw, &surface_desc, &surface, NULL); - ok(SUCCEEDED(hr), "Failed to create surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create surface, hr %#lx.\n", hr);
hr = IDirectDrawSurface_QueryInterface(surface, &IID_IDirectDrawSurface3, (void **)&surface3); if (FAILED(hr)) @@ -1345,15 +1345,15 @@ static void test_surface_interface_mismatch(void) surface_desc.dwWidth = 640; surface_desc.dwHeight = 480; hr = IDirectDraw_CreateSurface(ddraw, &surface_desc, &ds, NULL); - ok(SUCCEEDED(hr), "Failed to create depth buffer, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create depth buffer, hr %#lx.\n", hr); if (FAILED(hr)) goto cleanup;
/* Using a different surface interface version still works */ hr = IDirectDrawSurface3_AddAttachedSurface(surface3, (IDirectDrawSurface3 *)ds); - ok(SUCCEEDED(hr), "Failed to attach depth buffer, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to attach depth buffer, hr %#lx.\n", hr); refcount = IDirectDrawSurface_Release(ds); - ok(refcount == 1, "Got unexpected refcount %u.\n", refcount); + ok(refcount == 1, "Got unexpected refcount %lu.\n", refcount); if (FAILED(hr)) goto cleanup;
@@ -1368,9 +1368,9 @@ static void test_surface_interface_mismatch(void) viewport_set_background(device, viewport, background);
hr = IDirect3DViewport_Clear(viewport, 1, &clear_rect, D3DCLEAR_TARGET); - ok(SUCCEEDED(hr), "Failed to clear render target, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to clear render target, hr %#lx.\n", hr); color = get_surface_color(surface, 320, 240); - ok(compare_color(color, 0x00ff0000, 1), "Got unexpected color 0x%08x.\n", color); + ok(compare_color(color, 0x00ff0000, 1), "Got unexpected color 0x%08lx.\n", color);
cleanup: if (viewport) @@ -1395,7 +1395,7 @@ static void test_coop_level_threaded(void) create_window_thread(&p);
hr = IDirectDraw_SetCooperativeLevel(ddraw, p.window, DDSCL_EXCLUSIVE | DDSCL_FULLSCREEN); - ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#lx.\n", hr);
destroy_window_thread(&p); IDirectDraw_Release(ddraw); @@ -1448,79 +1448,79 @@ static void test_viewport_object(void) }
hr = IDirectDraw_QueryInterface(ddraw, &IID_IDirect3D, (void **)&d3d); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); ref = get_refcount((IUnknown *) d3d); - ok(ref == 2, "Got unexpected refcount %u.\n", ref); + ok(ref == 2, "Got unexpected refcount %lu.\n", ref);
hr = IDirect3D_CreateViewport(d3d, &viewport, NULL); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); ref = get_refcount((IUnknown *)viewport); - ok(ref == 1, "Got unexpected refcount %u.\n", ref); + ok(ref == 1, "Got unexpected refcount %lu.\n", ref); ref = get_refcount((IUnknown *)d3d); - ok(ref == 2, "Got unexpected refcount %u.\n", ref); + ok(ref == 2, "Got unexpected refcount %lu.\n", ref);
memset(&desc, 0, sizeof(desc)); hr = IDirect3DViewport_GetViewport(viewport, &desc.vp1); - todo_wine ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#x.\n", hr); + todo_wine ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#lx.\n", hr); desc.vp1.dwSize = sizeof(desc.vp1) + 1; hr = IDirect3DViewport_GetViewport(viewport, &desc.vp1); - todo_wine ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#x.\n", hr); + todo_wine ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#lx.\n", hr); desc.vp1.dwSize = sizeof(desc.vp1) - 1; hr = IDirect3DViewport_GetViewport(viewport, &desc.vp1); - todo_wine ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#x.\n", hr); + todo_wine ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#lx.\n", hr); desc.vp1.dwSize = sizeof(desc.vp1); hr = IDirect3DViewport_GetViewport(viewport, &desc.vp1); - ok(hr == D3DERR_VIEWPORTDATANOTSET, "Got unexpected hr %#x.\n", hr); - ok(desc.vp1.dwSize == sizeof(desc.vp1), "Got unexpected dwSize %u.\n", desc.vp1.dwSize); + ok(hr == D3DERR_VIEWPORTDATANOTSET, "Got unexpected hr %#lx.\n", hr); + ok(desc.vp1.dwSize == sizeof(desc.vp1), "Got unexpected dwSize %lu.\n", desc.vp1.dwSize);
/* E_FAIL return values are returned by Winetestbot Windows NT machines. While not supporting * newer interfaces is legitimate for old ddraw versions, E_FAIL violates Microsoft's rules * for QueryInterface, hence the broken() */ gamma = (IDirectDrawGammaControl *)0xdeadbeef; hr = IDirect3DViewport_QueryInterface(viewport, &IID_IDirectDrawGammaControl, (void **)&gamma); - ok(hr == E_NOINTERFACE || broken(hr == E_FAIL), "Got unexpected hr %#x.\n", hr); + ok(hr == E_NOINTERFACE || broken(hr == E_FAIL), "Got unexpected hr %#lx.\n", hr); ok(gamma == NULL, "Interface not set to NULL by failed QI call: %p\n", gamma);
hr = IDirect3DViewport_QueryInterface(viewport, &IID_IDirect3DViewport2, (void **)&viewport2); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr);
ref = get_refcount((IUnknown *)viewport); - ok(ref == 2, "Got unexpected refcount %u.\n", ref); + ok(ref == 2, "Got unexpected refcount %lu.\n", ref); ref = get_refcount((IUnknown *)viewport2); - ok(ref == 2, "Got unexpected refcount %u.\n", ref); + ok(ref == 2, "Got unexpected refcount %lu.\n", ref);
hr = IDirect3DViewport_QueryInterface(viewport, &IID_IDirect3DViewport3, (void **)&viewport3); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr);
ref = get_refcount((IUnknown *)viewport); - ok(ref == 3, "Got unexpected refcount %u.\n", ref); + ok(ref == 3, "Got unexpected refcount %lu.\n", ref); ref = get_refcount((IUnknown *)viewport3); - ok(ref == 3, "Got unexpected refcount %u.\n", ref); + ok(ref == 3, "Got unexpected refcount %lu.\n", ref); IDirect3DViewport3_Release(viewport3);
hr = IDirect3DViewport_QueryInterface(viewport, &IID_IUnknown, (void **)&unknown); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); ref = get_refcount((IUnknown *)viewport); - ok(ref == 3, "Got unexpected refcount %u.\n", ref); + ok(ref == 3, "Got unexpected refcount %lu.\n", ref); ref = get_refcount(unknown); - ok(ref == 3, "Got unexpected refcount %u.\n", ref); + ok(ref == 3, "Got unexpected refcount %lu.\n", ref); IUnknown_Release(unknown);
hr = IDirect3DDevice_DeleteViewport(device, NULL); - ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#lx.\n", hr);
hr = IDirect3D_CreateViewport(d3d, &another_vp, NULL); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr);
/* AddViewport(NULL): Segfault */ hr = IDirect3DDevice_AddViewport(device, viewport); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); ref = get_refcount((IUnknown *) viewport); - ok(ref == 3, "Got unexpected refcount %u.\n", ref); + ok(ref == 3, "Got unexpected refcount %lu.\n", ref); hr = IDirect3DDevice_AddViewport(device, another_vp); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); ref = get_refcount((IUnknown *) another_vp); - ok(ref == 2, "Got unexpected refcount %u.\n", ref); + ok(ref == 2, "Got unexpected refcount %lu.\n", ref);
memset(&vp, 0, sizeof(vp)); vp.dwX = 0; @@ -1534,11 +1534,11 @@ static void test_viewport_object(void) vp.dvMaxX = 1.0f; vp.dvMaxY = 1.0f; hr = IDirect3DViewport_SetViewport(viewport, &vp); - ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#lx.\n", hr);
vp.dwSize = sizeof(vp); hr = IDirect3DViewport_SetViewport(viewport, &vp); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr);
vp2.dwSize = sizeof(vp2); vp2.dwX = 160; @@ -1552,12 +1552,12 @@ static void test_viewport_object(void) vp2.dvMinZ = 0.5f; vp2.dvMaxZ = 2.0f; hr = IDirect3DViewport2_SetViewport2(viewport2, &vp2); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr);
memset(&vp, 0xff, sizeof(vp)); vp.dwSize = sizeof(vp); hr = IDirect3DViewport2_GetViewport(viewport2, &vp); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); ok(vp.dvMaxX == 4.5f && vp.dvMaxY == -1.75f && vp.dvScaleX == 192.0f && vp.dvScaleY == -240.0f && vp.dvMinZ == 0.0f && vp.dvMaxZ == 1.0f, "Got unexpected values %g, %g, %g, %g, %g, %g.\n", @@ -1571,12 +1571,12 @@ static void test_viewport_object(void) vp2.dvMaxZ = 0.5f;
hr = IDirect3DViewport2_SetViewport2(viewport2, &vp2); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr);
memset(&vp, 0xff, sizeof(vp)); vp.dwSize = sizeof(vp); hr = IDirect3DViewport2_GetViewport(viewport2, &vp); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); ok(vp.dvMaxX == -3.0f && vp.dvMaxY == 1.75f && vp.dvScaleX == -320.0f && vp.dvScaleY == 180.0f && vp.dvMinZ == 0.0f && vp.dvMaxZ == 1.0f, "Got unexpected values %g, %g, %g, %g, %g, %g.\n", @@ -1586,12 +1586,12 @@ static void test_viewport_object(void) vp.dvMinZ = 0.5f; vp.dvMaxZ = 2.0f; hr = IDirect3DViewport2_SetViewport(viewport2, &vp); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr);
memset(&vp2, 0xff, sizeof(vp2)); vp2.dwSize = sizeof(vp2); hr = IDirect3DViewport2_GetViewport2(viewport2, &vp2); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); ok(vp2.dvClipX == 0.75f && vp2.dvClipY == 1.0f && vp2.dvClipWidth == -1.5f && vp2.dvClipHeight == 2.0f && vp2.dvMinZ == 0.0f && vp2.dvMaxZ == 1.0f, "Got unexpected values %g, %g, %g, %g, %g, %g.\n", @@ -1605,12 +1605,12 @@ static void test_viewport_object(void) vp.dvMaxZ = 0.5f;
hr = IDirect3DViewport3_SetViewport(viewport3, &vp); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr);
memset(&vp2, 0xff, sizeof(vp2)); vp2.dwSize = sizeof(vp2); hr = IDirect3DViewport2_GetViewport2(viewport2, &vp2); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); ok(vp2.dvClipX == -1.25f && vp2.dvClipY == -0.75f && vp2.dvClipWidth == 2.5f && vp2.dvClipHeight == -1.5f && vp2.dvMinZ == 0.0f && vp2.dvMaxZ == 1.0f, "Got unexpected values %g, %g, %g, %g, %g, %g.\n", @@ -1619,16 +1619,16 @@ static void test_viewport_object(void) IDirect3DViewport2_Release(viewport2);
hr = IDirect3DDevice_DeleteViewport(device, another_vp); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); ref = get_refcount((IUnknown *) another_vp); - ok(ref == 1, "Got unexpected refcount %u.\n", ref); + ok(ref == 1, "Got unexpected refcount %lu.\n", ref);
IDirect3DDevice_Release(device); ref = get_refcount((IUnknown *) viewport); - ok(ref == 1, "Got unexpected refcount %u.\n", ref); + ok(ref == 1, "Got unexpected refcount %lu.\n", ref);
hr = IDirect3DViewport_SetViewport(viewport, &vp); - ok(hr == D3DERR_VIEWPORTHASNODEVICE, "Got unexpected hr %#x.\n", hr); + ok(hr == D3DERR_VIEWPORTHASNODEVICE, "Got unexpected hr %#lx.\n", hr);
IDirect3DViewport_Release(another_vp); IDirect3D_Release(d3d); @@ -1684,9 +1684,9 @@ static void test_zenable(const GUID *device_guid) exec_desc.dwCaps = D3DDEBCAPS_SYSTEMMEMORY;
hr = IDirect3DDevice_CreateExecuteBuffer(device, &exec_desc, &execute_buffer, NULL); - ok(SUCCEEDED(hr), "Failed to create execute buffer, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create execute buffer, hr %#lx.\n", hr); hr = IDirect3DExecuteBuffer_Lock(execute_buffer, &exec_desc); - ok(SUCCEEDED(hr), "Failed to lock execute buffer, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to lock execute buffer, hr %#lx.\n", hr); memcpy(exec_desc.lpData, tquad, sizeof(tquad)); ptr = ((BYTE *)exec_desc.lpData) + sizeof(tquad); emit_process_vertices(&ptr, D3DPROCESSVERTICES_COPY, 0, 4); @@ -1696,20 +1696,20 @@ static void test_zenable(const GUID *device_guid) inst_length = (BYTE *)ptr - (BYTE *)exec_desc.lpData; inst_length -= sizeof(tquad); hr = IDirect3DExecuteBuffer_Unlock(execute_buffer); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
hr = IDirect3DViewport_Clear(viewport, 1, &clear_rect, D3DCLEAR_TARGET); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirect3DDevice_BeginScene(device); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); set_execute_data(execute_buffer, 4, sizeof(tquad), inst_length); hr = IDirect3DDevice_Execute(device, execute_buffer, viewport, D3DEXECUTE_CLIPPED); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirect3DDevice_EndScene(device); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
hr = IDirect3DDevice_QueryInterface(device, &IID_IDirectDrawSurface, (void **)&rt); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); for (i = 0; i < 4; ++i) { for (j = 0; j < 4; ++j) @@ -1718,7 +1718,7 @@ static void test_zenable(const GUID *device_guid) y = 60 * ((2 * i) + 1); color = get_surface_color(rt, x, y); ok(compare_color(color, 0x0000ff00, 1), - "Expected color 0x0000ff00 at %u, %u, got 0x%08x.\n", x, y, color); + "Expected color 0x0000ff00 at %u, %u, got 0x%08lx.\n", x, y, color); } } IDirectDrawSurface_Release(rt); @@ -1832,11 +1832,11 @@ static void test_ck_rgba(const GUID *device_guid) surface_desc.ddckCKSrcBlt.dwColorSpaceLowValue = 0xff00ff00; surface_desc.ddckCKSrcBlt.dwColorSpaceHighValue = 0xff00ff00; hr = IDirectDraw_CreateSurface(ddraw, &surface_desc, &surface, NULL); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface_QueryInterface(surface, &IID_IDirect3DTexture, (void **)&texture); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirect3DTexture_GetHandle(texture, device, &texture_handle); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); IDirect3DTexture_Release(texture);
memset(&exec_desc, 0, sizeof(exec_desc)); @@ -1845,10 +1845,10 @@ static void test_ck_rgba(const GUID *device_guid) exec_desc.dwBufferSize = 1024; exec_desc.dwCaps = D3DDEBCAPS_SYSTEMMEMORY; hr = IDirect3DDevice_CreateExecuteBuffer(device, &exec_desc, &execute_buffer, NULL); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
hr = IDirect3DDevice_QueryInterface(device, &IID_IDirectDrawSurface, (void **)&rt); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
for (i = 0; i < ARRAY_SIZE(tests); ++i) { @@ -1856,7 +1856,7 @@ static void test_ck_rgba(const GUID *device_guid) void *ptr;
hr = IDirect3DExecuteBuffer_Lock(execute_buffer, &exec_desc); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); memcpy(exec_desc.lpData, tquad, sizeof(tquad)); ptr = ((BYTE *)exec_desc.lpData) + sizeof(tquad); emit_process_vertices(&ptr, D3DPROCESSVERTICES_COPY, 0, 4); @@ -1883,45 +1883,45 @@ static void test_ck_rgba(const GUID *device_guid) emit_end(&ptr); draw2_len = (BYTE *)ptr - (BYTE *)exec_desc.lpData - draw1_len; hr = IDirect3DExecuteBuffer_Unlock(execute_buffer); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
memset(&fx, 0, sizeof(fx)); fx.dwSize = sizeof(fx); U5(fx).dwFillColor = tests[i].fill_color; hr = IDirectDrawSurface_Blt(surface, NULL, NULL, NULL, DDBLT_COLORFILL | DDBLT_WAIT, &fx); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr);
hr = IDirect3DViewport_Clear(viewport, 1, &clear_rect, D3DCLEAR_TARGET | D3DCLEAR_ZBUFFER); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); /* RT clears are broken on Windows for software render target. */ if (is_software_device_type(device_guid)) fill_surface(rt, 0xffff0000);
hr = IDirect3DDevice_BeginScene(device); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); set_execute_data(execute_buffer, 8, sizeof(tquad), draw1_len); hr = IDirect3DDevice_Execute(device, execute_buffer, viewport, D3DEXECUTE_CLIPPED); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirect3DDevice_EndScene(device); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
color = get_surface_color(rt, 320, 240); ok(compare_color(color, tests[i].result1, 2) || broken(compare_color(color, tests[i].result1_r200, 1)) || broken(compare_color(color, tests[i].result1_warp, 1)), - "Got unexpected color 0x%08x for test %u.\n", color, i); + "Got unexpected color 0x%08lx for test %u.\n", color, i);
U5(fx).dwFillColor = 0xff0000ff; hr = IDirectDrawSurface_Blt(surface, NULL, NULL, NULL, DDBLT_COLORFILL | DDBLT_WAIT, &fx); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr);
hr = IDirect3DDevice_BeginScene(device); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); set_execute_data(execute_buffer, 8, sizeof(tquad) + draw1_len, draw2_len); hr = IDirect3DDevice_Execute(device, execute_buffer, viewport, D3DEXECUTE_CLIPPED); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirect3DDevice_EndScene(device); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
/* This tests that fragments that are masked out by the color key are * discarded, instead of just fully transparent. */ @@ -1929,7 +1929,7 @@ static void test_ck_rgba(const GUID *device_guid) ok(compare_color(color, tests[i].result2, 2) || broken(compare_color(color, tests[i].result2_r200, 1)) || broken(compare_color(color, tests[i].result2_warp, 1)), - "Got unexpected color 0x%08x for test %u.\n", color, i); + "Got unexpected color 0x%08lx for test %u.\n", color, i); }
IDirectDrawSurface_Release(rt); @@ -1984,7 +1984,7 @@ static void test_ck_default(void) }
hr = IDirect3DDevice_QueryInterface(device, &IID_IDirectDrawSurface, (void **)&rt); - ok(SUCCEEDED(hr), "Failed to get render target, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get render target, hr %#lx.\n", hr);
background = create_diffuse_material(device, 0.0, 1.0f, 0.0f, 1.0f); viewport = create_viewport(device, 0, 0, 640, 480); @@ -2005,18 +2005,18 @@ static void test_ck_default(void) surface_desc.ddckCKSrcBlt.dwColorSpaceLowValue = 0x000000ff; surface_desc.ddckCKSrcBlt.dwColorSpaceHighValue = 0x000000ff; hr = IDirectDraw_CreateSurface(ddraw, &surface_desc, &surface, NULL); - ok(SUCCEEDED(hr), "Failed to create surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create surface, hr %#lx.\n", hr); hr = IDirectDrawSurface_QueryInterface(surface, &IID_IDirect3DTexture, (void **)&texture); - ok(SUCCEEDED(hr), "Failed to get texture interface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get texture interface, hr %#lx.\n", hr); hr = IDirect3DTexture_GetHandle(texture, device, &texture_handle); - ok(SUCCEEDED(hr), "Failed to get texture handle, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get texture handle, hr %#lx.\n", hr); IDirect3DTexture_Release(texture);
memset(&fx, 0, sizeof(fx)); fx.dwSize = sizeof(fx); U5(fx).dwFillColor = 0x000000ff; hr = IDirectDrawSurface_Blt(surface, NULL, NULL, NULL, DDBLT_COLORFILL | DDBLT_WAIT, &fx); - ok(SUCCEEDED(hr), "Failed to fill surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to fill surface, hr %#lx.\n", hr);
memset(&exec_desc, 0, sizeof(exec_desc)); exec_desc.dwSize = sizeof(exec_desc); @@ -2024,10 +2024,10 @@ static void test_ck_default(void) exec_desc.dwBufferSize = 1024; exec_desc.dwCaps = D3DDEBCAPS_SYSTEMMEMORY; hr = IDirect3DDevice_CreateExecuteBuffer(device, &exec_desc, &execute_buffer, NULL); - ok(SUCCEEDED(hr), "Failed to create execute buffer, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create execute buffer, hr %#lx.\n", hr);
hr = IDirect3DExecuteBuffer_Lock(execute_buffer, &exec_desc); - ok(SUCCEEDED(hr), "Failed to lock execute buffer, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to lock execute buffer, hr %#lx.\n", hr); memcpy(exec_desc.lpData, tquad, sizeof(tquad)); ptr = (BYTE *)exec_desc.lpData + sizeof(tquad); emit_process_vertices(&ptr, D3DPROCESSVERTICES_COPY, 0, 4); @@ -2055,59 +2055,59 @@ static void test_ck_default(void) draw4_offset = draw3_offset + draw3_len; draw4_len = (BYTE *)ptr - (BYTE *)exec_desc.lpData - draw4_offset; hr = IDirect3DExecuteBuffer_Unlock(execute_buffer); - ok(SUCCEEDED(hr), "Failed to unlock execute buffer, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to unlock execute buffer, hr %#lx.\n", hr);
hr = IDirect3DViewport_Clear(viewport, 1, &clear_rect, D3DCLEAR_TARGET); - ok(SUCCEEDED(hr), "Failed to clear viewport, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to clear viewport, hr %#lx.\n", hr); hr = IDirect3DDevice_BeginScene(device); - ok(SUCCEEDED(hr), "Failed to begin scene, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to begin scene, hr %#lx.\n", hr); set_execute_data(execute_buffer, 4, draw1_offset, draw1_len); hr = IDirect3DDevice_Execute(device, execute_buffer, viewport, D3DEXECUTE_CLIPPED); - ok(SUCCEEDED(hr), "Failed to execute exec buffer, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to execute exec buffer, hr %#lx.\n", hr); hr = IDirect3DDevice_EndScene(device); - ok(SUCCEEDED(hr), "Failed to end scene, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to end scene, hr %#lx.\n", hr); color = get_surface_color(rt, 320, 240); /* Color keying is supposed to be on by default in ddraw1, but used only if a ckey is set. * WARP begs to differ. The default of D3DRENDERSTATE_COLORKEYENABLE is random, and it * doesn't mind the absence of a color key (the latter part affects other tests, not this one). */ ok(compare_color(color, 0x0000ff00, 1) || broken(ddraw_is_warp(ddraw) && compare_color(color, 0x000000ff, 1)), - "Got unexpected color 0x%08x.\n", color); + "Got unexpected color 0x%08lx.\n", color);
hr = IDirect3DViewport_Clear(viewport, 1, &clear_rect, D3DCLEAR_TARGET); - ok(SUCCEEDED(hr), "Failed to clear viewport, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to clear viewport, hr %#lx.\n", hr); hr = IDirect3DDevice_BeginScene(device); - ok(SUCCEEDED(hr), "Failed to begin scene, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to begin scene, hr %#lx.\n", hr); set_execute_data(execute_buffer, 4, draw2_offset, draw2_len); hr = IDirect3DDevice_Execute(device, execute_buffer, viewport, D3DEXECUTE_CLIPPED); - ok(SUCCEEDED(hr), "Failed to execute exec buffer, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to execute exec buffer, hr %#lx.\n", hr); hr = IDirect3DDevice_EndScene(device); - ok(SUCCEEDED(hr), "Failed to end scene, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to end scene, hr %#lx.\n", hr); color = get_surface_color(rt, 320, 240); - ok(compare_color(color, 0x000000ff, 1), "Got unexpected color 0x%08x.\n", color); + ok(compare_color(color, 0x000000ff, 1), "Got unexpected color 0x%08lx.\n", color);
hr = IDirect3DViewport_Clear(viewport, 1, &clear_rect, D3DCLEAR_TARGET); - ok(SUCCEEDED(hr), "Failed to clear viewport, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to clear viewport, hr %#lx.\n", hr); hr = IDirect3DDevice_BeginScene(device); - ok(SUCCEEDED(hr), "Failed to begin scene, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to begin scene, hr %#lx.\n", hr); set_execute_data(execute_buffer, 4, draw3_offset, draw3_len); hr = IDirect3DDevice_Execute(device, execute_buffer, viewport, D3DEXECUTE_CLIPPED); - ok(SUCCEEDED(hr), "Failed to execute exec buffer, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to execute exec buffer, hr %#lx.\n", hr); hr = IDirect3DDevice_EndScene(device); - ok(SUCCEEDED(hr), "Failed to end scene, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to end scene, hr %#lx.\n", hr); color = get_surface_color(rt, 320, 240); - ok(compare_color(color, 0x000000ff, 1), "Got unexpected color 0x%08x.\n", color); + ok(compare_color(color, 0x000000ff, 1), "Got unexpected color 0x%08lx.\n", color);
hr = IDirect3DViewport_Clear(viewport, 1, &clear_rect, D3DCLEAR_TARGET); - ok(SUCCEEDED(hr), "Failed to clear viewport, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to clear viewport, hr %#lx.\n", hr); hr = IDirect3DDevice_BeginScene(device); - ok(SUCCEEDED(hr), "Failed to begin scene, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to begin scene, hr %#lx.\n", hr); set_execute_data(execute_buffer, 4, draw4_offset, draw4_len); hr = IDirect3DDevice_Execute(device, execute_buffer, viewport, D3DEXECUTE_CLIPPED); - ok(SUCCEEDED(hr), "Failed to execute exec buffer, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to execute exec buffer, hr %#lx.\n", hr); hr = IDirect3DDevice_EndScene(device); - ok(SUCCEEDED(hr), "Failed to end scene, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to end scene, hr %#lx.\n", hr); color = get_surface_color(rt, 320, 240); - ok(compare_color(color, 0x0000ff00, 1), "Got unexpected color 0x%08x.\n", color); + ok(compare_color(color, 0x0000ff00, 1), "Got unexpected color 0x%08lx.\n", color);
IDirect3DExecuteBuffer_Release(execute_buffer); IDirectDrawSurface_Release(surface); @@ -2151,20 +2151,20 @@ static void test_ck_complex(void) surface_desc.dwWidth = 128; surface_desc.dwHeight = 128; hr = IDirectDraw_CreateSurface(ddraw, &surface_desc, &surface, NULL); - ok(SUCCEEDED(hr), "Failed to create surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create surface, hr %#lx.\n", hr);
hr = IDirectDrawSurface_GetColorKey(surface, DDCKEY_SRCBLT, &color_key); - ok(hr == DDERR_NOCOLORKEY, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_NOCOLORKEY, "Got unexpected hr %#lx.\n", hr); color_key.dwColorSpaceLowValue = 0x0000ff00; color_key.dwColorSpaceHighValue = 0x0000ff00; hr = IDirectDrawSurface_SetColorKey(surface, DDCKEY_SRCBLT, &color_key); - ok(SUCCEEDED(hr), "Failed to set color key, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set color key, hr %#lx.\n", hr); memset(&color_key, 0, sizeof(color_key)); hr = IDirectDrawSurface_GetColorKey(surface, DDCKEY_SRCBLT, &color_key); - ok(SUCCEEDED(hr), "Failed to get color key, hr %#x.\n", hr); - ok(color_key.dwColorSpaceLowValue == 0x0000ff00, "Got unexpected value 0x%08x.\n", + ok(SUCCEEDED(hr), "Failed to get color key, hr %#lx.\n", hr); + ok(color_key.dwColorSpaceLowValue == 0x0000ff00, "Got unexpected value 0x%08lx.\n", color_key.dwColorSpaceLowValue); - ok(color_key.dwColorSpaceHighValue == 0x0000ff00, "Got unexpected value 0x%08x.\n", + ok(color_key.dwColorSpaceHighValue == 0x0000ff00, "Got unexpected value 0x%08lx.\n", color_key.dwColorSpaceHighValue);
mipmap = surface; @@ -2172,20 +2172,20 @@ static void test_ck_complex(void) for (i = 0; i < 7; ++i) { hr = IDirectDrawSurface_GetAttachedSurface(mipmap, &caps, &tmp); - ok(SUCCEEDED(hr), "Failed to get attached surface, i %u, hr %#x.\n", i, hr); + ok(SUCCEEDED(hr), "Failed to get attached surface, i %u, hr %#lx.\n", i, hr);
hr = IDirectDrawSurface_GetColorKey(tmp, DDCKEY_SRCBLT, &color_key); - ok(hr == DDERR_NOCOLORKEY, "Got unexpected hr %#x, i %u.\n", hr, i); + ok(hr == DDERR_NOCOLORKEY, "Got unexpected hr %#lx, i %u.\n", hr, i); color_key.dwColorSpaceLowValue = 0x000000ff; color_key.dwColorSpaceHighValue = 0x000000ff; hr = IDirectDrawSurface_SetColorKey(tmp, DDCKEY_SRCBLT, &color_key); - ok(SUCCEEDED(hr), "Failed to set color key, hr %#x, i %u.\n", hr, i); + ok(SUCCEEDED(hr), "Failed to set color key, hr %#lx, i %u.\n", hr, i); memset(&color_key, 0, sizeof(color_key)); hr = IDirectDrawSurface_GetColorKey(tmp, DDCKEY_SRCBLT, &color_key); - ok(SUCCEEDED(hr), "Failed to get color key, hr %#x, i %u.\n", hr, i); - ok(color_key.dwColorSpaceLowValue == 0x000000ff, "Got unexpected value 0x%08x, i %u.\n", + ok(SUCCEEDED(hr), "Failed to get color key, hr %#lx, i %u.\n", hr, i); + ok(color_key.dwColorSpaceLowValue == 0x000000ff, "Got unexpected value 0x%08lx, i %u.\n", color_key.dwColorSpaceLowValue, i); - ok(color_key.dwColorSpaceHighValue == 0x000000ff, "Got unexpected value 0x%08x, i %u.\n", + ok(color_key.dwColorSpaceHighValue == 0x000000ff, "Got unexpected value 0x%08lx, i %u.\n", color_key.dwColorSpaceHighValue, i);
IDirectDrawSurface_Release(mipmap); @@ -2194,17 +2194,17 @@ static void test_ck_complex(void)
memset(&color_key, 0, sizeof(color_key)); hr = IDirectDrawSurface_GetColorKey(surface, DDCKEY_SRCBLT, &color_key); - ok(SUCCEEDED(hr), "Failed to get color key, hr %#x.\n", hr); - ok(color_key.dwColorSpaceLowValue == 0x0000ff00, "Got unexpected value 0x%08x.\n", + ok(SUCCEEDED(hr), "Failed to get color key, hr %#lx.\n", hr); + ok(color_key.dwColorSpaceLowValue == 0x0000ff00, "Got unexpected value 0x%08lx.\n", color_key.dwColorSpaceLowValue); - ok(color_key.dwColorSpaceHighValue == 0x0000ff00, "Got unexpected value 0x%08x.\n", + ok(color_key.dwColorSpaceHighValue == 0x0000ff00, "Got unexpected value 0x%08lx.\n", color_key.dwColorSpaceHighValue);
hr = IDirectDrawSurface_GetAttachedSurface(mipmap, &caps, &tmp); - ok(hr == DDERR_NOTFOUND, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_NOTFOUND, "Got unexpected hr %#lx.\n", hr); IDirectDrawSurface_Release(mipmap); refcount = IDirectDrawSurface_Release(surface); - ok(!refcount, "Got unexpected refcount %u.\n", refcount); + ok(!refcount, "Got unexpected refcount %lu.\n", refcount);
memset(&surface_desc, 0, sizeof(surface_desc)); surface_desc.dwSize = sizeof(surface_desc); @@ -2212,45 +2212,45 @@ static void test_ck_complex(void) surface_desc.ddsCaps.dwCaps = DDSCAPS_PRIMARYSURFACE | DDSCAPS_COMPLEX | DDSCAPS_FLIP; surface_desc.dwBackBufferCount = 1; hr = IDirectDraw_CreateSurface(ddraw, &surface_desc, &surface, NULL); - ok(SUCCEEDED(hr), "Failed to create surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create surface, hr %#lx.\n", hr);
hr = IDirectDrawSurface_GetColorKey(surface, DDCKEY_SRCBLT, &color_key); - ok(hr == DDERR_NOCOLORKEY, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_NOCOLORKEY, "Got unexpected hr %#lx.\n", hr); color_key.dwColorSpaceLowValue = 0x0000ff00; color_key.dwColorSpaceHighValue = 0x0000ff00; hr = IDirectDrawSurface_SetColorKey(surface, DDCKEY_SRCBLT, &color_key); - ok(SUCCEEDED(hr), "Failed to set color key, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set color key, hr %#lx.\n", hr); memset(&color_key, 0, sizeof(color_key)); hr = IDirectDrawSurface_GetColorKey(surface, DDCKEY_SRCBLT, &color_key); - ok(SUCCEEDED(hr), "Failed to get color key, hr %#x.\n", hr); - ok(color_key.dwColorSpaceLowValue == 0x0000ff00, "Got unexpected value 0x%08x.\n", + ok(SUCCEEDED(hr), "Failed to get color key, hr %#lx.\n", hr); + ok(color_key.dwColorSpaceLowValue == 0x0000ff00, "Got unexpected value 0x%08lx.\n", color_key.dwColorSpaceLowValue); - ok(color_key.dwColorSpaceHighValue == 0x0000ff00, "Got unexpected value 0x%08x.\n", + ok(color_key.dwColorSpaceHighValue == 0x0000ff00, "Got unexpected value 0x%08lx.\n", color_key.dwColorSpaceHighValue);
hr = IDirectDrawSurface_GetAttachedSurface(surface, &caps, &tmp); - ok(SUCCEEDED(hr), "Failed to get attached surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get attached surface, hr %#lx.\n", hr);
hr = IDirectDrawSurface_GetColorKey(tmp, DDCKEY_SRCBLT, &color_key); - ok(hr == DDERR_NOCOLORKEY, "Got unexpected hr %#x, i %u.\n", hr, i); + ok(hr == DDERR_NOCOLORKEY, "Got unexpected hr %#lx, i %u.\n", hr, i); color_key.dwColorSpaceLowValue = 0x0000ff00; color_key.dwColorSpaceHighValue = 0x0000ff00; hr = IDirectDrawSurface_SetColorKey(tmp, DDCKEY_SRCBLT, &color_key); - ok(SUCCEEDED(hr), "Failed to set color key, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set color key, hr %#lx.\n", hr); memset(&color_key, 0, sizeof(color_key)); hr = IDirectDrawSurface_GetColorKey(tmp, DDCKEY_SRCBLT, &color_key); - ok(SUCCEEDED(hr), "Failed to get color key, hr %#x.\n", hr); - ok(color_key.dwColorSpaceLowValue == 0x0000ff00, "Got unexpected value 0x%08x.\n", + ok(SUCCEEDED(hr), "Failed to get color key, hr %#lx.\n", hr); + ok(color_key.dwColorSpaceLowValue == 0x0000ff00, "Got unexpected value 0x%08lx.\n", color_key.dwColorSpaceLowValue); - ok(color_key.dwColorSpaceHighValue == 0x0000ff00, "Got unexpected value 0x%08x.\n", + ok(color_key.dwColorSpaceHighValue == 0x0000ff00, "Got unexpected value 0x%08lx.\n", color_key.dwColorSpaceHighValue);
IDirectDrawSurface_Release(tmp);
refcount = IDirectDrawSurface_Release(surface); - ok(!refcount, "Got unexpected refcount %u.\n", refcount); + ok(!refcount, "Got unexpected refcount %lu.\n", refcount); refcount = IDirectDraw_Release(ddraw); - ok(!refcount, "Got unexpected refcount %u.\n", refcount); + ok(!refcount, "Got unexpected refcount %lu.\n", refcount); DestroyWindow(window); }
@@ -2272,13 +2272,13 @@ static void test_qi(const char *test_name, IUnknown *base_iface, for (i = 0; i < entry_count; ++i) { hr = IUnknown_QueryInterface(base_iface, tests[i].iid, (void **)&iface1); - ok(hr == tests[i].hr, "Got hr %#x for test "%s" %u.\n", hr, test_name, i); + ok(hr == tests[i].hr, "Got hr %#lx for test "%s" %u.\n", hr, test_name, i); if (SUCCEEDED(hr)) { for (j = 0; j < entry_count; ++j) { hr = IUnknown_QueryInterface(iface1, tests[j].iid, (void **)&iface2); - ok(hr == tests[j].hr, "Got hr %#x for test "%s" %u, %u.\n", hr, test_name, i, j); + ok(hr == tests[j].hr, "Got hr %#lx for test "%s" %u, %u.\n", hr, test_name, i, j); if (SUCCEEDED(hr)) { expected_refcount = 0; @@ -2287,7 +2287,7 @@ static void test_qi(const char *test_name, IUnknown *base_iface, if (IsEqualGUID(tests[i].refcount_iid, tests[j].refcount_iid)) ++expected_refcount; refcount = IUnknown_Release(iface2); - ok(refcount == expected_refcount, "Got refcount %u for test "%s" %u, %u, expected %u.\n", + ok(refcount == expected_refcount, "Got refcount %lu for test "%s" %u, %u, expected %lu.\n", refcount, test_name, i, j, expected_refcount); } } @@ -2296,7 +2296,7 @@ static void test_qi(const char *test_name, IUnknown *base_iface, if (IsEqualGUID(refcount_iid, tests[i].refcount_iid)) ++expected_refcount; refcount = IUnknown_Release(iface1); - ok(refcount == expected_refcount, "Got refcount %u for test "%s" %u, expected %u.\n", + ok(refcount == expected_refcount, "Got refcount %lu for test "%s" %u, expected %lu.\n", refcount, test_name, i, expected_refcount); } } @@ -2379,9 +2379,9 @@ static void test_surface_qi(void) surface_desc.dwWidth = 512; surface_desc.dwHeight = 512; hr = IDirectDraw_CreateSurface(ddraw, &surface_desc, (IDirectDrawSurface **)0xdeadbeef, NULL); - ok(hr == E_INVALIDARG, "Got unexpected hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Got unexpected hr %#lx.\n", hr); hr = IDirectDraw_CreateSurface(ddraw, &surface_desc, &surface, NULL); - ok(SUCCEEDED(hr), "Failed to create surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create surface, hr %#lx.\n", hr);
test_qi("surface_qi", (IUnknown *)surface, &IID_IDirectDrawSurface, tests, ARRAY_SIZE(tests));
@@ -2493,36 +2493,36 @@ static void test_wndproc(void) WS_MAXIMIZE | WS_CAPTION , 0, 0, 640, 480, 0, 0, 0, 0);
proc = GetWindowLongPtrA(window, GWLP_WNDPROC); - ok(proc == (LONG_PTR)test_proc, "Expected wndproc %#lx, got %#lx.\n", + ok(proc == (LONG_PTR)test_proc, "Expected wndproc %#Ix, got %#Ix.\n", (LONG_PTR)test_proc, proc); expect_messages = messages; hr = IDirectDraw_SetCooperativeLevel(ddraw, window, DDSCL_EXCLUSIVE | DDSCL_FULLSCREEN); - ok(SUCCEEDED(hr), "SetCooperativeLevel failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "SetCooperativeLevel failed, hr %#lx.\n", hr); ok(!expect_messages->message, "Expected message %#x, but didn't receive it.\n", expect_messages->message); expect_messages = NULL; proc = GetWindowLongPtrA(window, GWLP_WNDPROC); - ok(proc != (LONG_PTR)test_proc, "Expected wndproc != %#lx, got %#lx.\n", + ok(proc != (LONG_PTR)test_proc, "Expected wndproc != %#Ix, got %#Ix.\n", (LONG_PTR)test_proc, proc); ref = IDirectDraw_Release(ddraw); - ok(ref == 0, "The ddraw object was not properly freed: refcount %u.\n", ref); + ok(ref == 0, "The ddraw object was not properly freed: refcount %lu.\n", ref); proc = GetWindowLongPtrA(window, GWLP_WNDPROC); - ok(proc == (LONG_PTR)test_proc, "Expected wndproc %#lx, got %#lx.\n", + ok(proc == (LONG_PTR)test_proc, "Expected wndproc %#Ix, got %#Ix.\n", (LONG_PTR)test_proc, proc);
/* DDSCL_NORMAL doesn't. */ ddraw = create_ddraw(); proc = GetWindowLongPtrA(window, GWLP_WNDPROC); - ok(proc == (LONG_PTR)test_proc, "Expected wndproc %#lx, got %#lx.\n", + ok(proc == (LONG_PTR)test_proc, "Expected wndproc %#Ix, got %#Ix.\n", (LONG_PTR)test_proc, proc); hr = IDirectDraw_SetCooperativeLevel(ddraw, window, DDSCL_NORMAL | DDSCL_FULLSCREEN); - ok(SUCCEEDED(hr), "SetCooperativeLevel failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "SetCooperativeLevel failed, hr %#lx.\n", hr); proc = GetWindowLongPtrA(window, GWLP_WNDPROC); - ok(proc == (LONG_PTR)test_proc, "Expected wndproc %#lx, got %#lx.\n", + ok(proc == (LONG_PTR)test_proc, "Expected wndproc %#Ix, got %#Ix.\n", (LONG_PTR)test_proc, proc); ref = IDirectDraw_Release(ddraw); - ok(ref == 0, "The ddraw object was not properly freed: refcount %u.\n", ref); + ok(ref == 0, "The ddraw object was not properly freed: refcount %lu.\n", ref); proc = GetWindowLongPtrA(window, GWLP_WNDPROC); - ok(proc == (LONG_PTR)test_proc, "Expected wndproc %#lx, got %#lx.\n", + ok(proc == (LONG_PTR)test_proc, "Expected wndproc %#Ix, got %#Ix.\n", (LONG_PTR)test_proc, proc);
/* The original window proc is only restored by ddraw if the current @@ -2530,53 +2530,53 @@ static void test_wndproc(void) * from DDSCL_NORMAL to DDSCL_EXCLUSIVE. */ ddraw = create_ddraw(); proc = GetWindowLongPtrA(window, GWLP_WNDPROC); - ok(proc == (LONG_PTR)test_proc, "Expected wndproc %#lx, got %#lx.\n", + ok(proc == (LONG_PTR)test_proc, "Expected wndproc %#Ix, got %#Ix.\n", (LONG_PTR)test_proc, proc); hr = IDirectDraw_SetCooperativeLevel(ddraw, window, DDSCL_EXCLUSIVE | DDSCL_FULLSCREEN); - ok(SUCCEEDED(hr), "SetCooperativeLevel failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "SetCooperativeLevel failed, hr %#lx.\n", hr); proc = GetWindowLongPtrA(window, GWLP_WNDPROC); - ok(proc != (LONG_PTR)test_proc, "Expected wndproc != %#lx, got %#lx.\n", + ok(proc != (LONG_PTR)test_proc, "Expected wndproc != %#Ix, got %#Ix.\n", (LONG_PTR)test_proc, proc); ddraw_proc = proc; hr = IDirectDraw_SetCooperativeLevel(ddraw, window, DDSCL_NORMAL); - ok(SUCCEEDED(hr), "SetCooperativeLevel failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "SetCooperativeLevel failed, hr %#lx.\n", hr); proc = GetWindowLongPtrA(window, GWLP_WNDPROC); - ok(proc == (LONG_PTR)test_proc, "Expected wndproc %#lx, got %#lx.\n", + ok(proc == (LONG_PTR)test_proc, "Expected wndproc %#Ix, got %#Ix.\n", (LONG_PTR)test_proc, proc); hr = IDirectDraw_SetCooperativeLevel(ddraw, window, DDSCL_EXCLUSIVE | DDSCL_FULLSCREEN); - ok(SUCCEEDED(hr), "SetCooperativeLevel failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "SetCooperativeLevel failed, hr %#lx.\n", hr); proc = SetWindowLongPtrA(window, GWLP_WNDPROC, (LONG_PTR)DefWindowProcA); - ok(proc != (LONG_PTR)test_proc, "Expected wndproc != %#lx, got %#lx.\n", + ok(proc != (LONG_PTR)test_proc, "Expected wndproc != %#Ix, got %#Ix.\n", (LONG_PTR)test_proc, proc); hr = IDirectDraw_SetCooperativeLevel(ddraw, window, DDSCL_NORMAL); - ok(SUCCEEDED(hr), "SetCooperativeLevel failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "SetCooperativeLevel failed, hr %#lx.\n", hr); proc = GetWindowLongPtrA(window, GWLP_WNDPROC); - ok(proc == (LONG_PTR)DefWindowProcA, "Expected wndproc %#lx, got %#lx.\n", + ok(proc == (LONG_PTR)DefWindowProcA, "Expected wndproc %#Ix, got %#Ix.\n", (LONG_PTR)DefWindowProcA, proc); hr = IDirectDraw_SetCooperativeLevel(ddraw, window, DDSCL_EXCLUSIVE | DDSCL_FULLSCREEN); - ok(SUCCEEDED(hr), "SetCooperativeLevel failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "SetCooperativeLevel failed, hr %#lx.\n", hr); proc = SetWindowLongPtrA(window, GWLP_WNDPROC, ddraw_proc); - ok(proc == (LONG_PTR)DefWindowProcA, "Expected wndproc %#lx, got %#lx.\n", + ok(proc == (LONG_PTR)DefWindowProcA, "Expected wndproc %#Ix, got %#Ix.\n", (LONG_PTR)DefWindowProcA, proc); ref = IDirectDraw_Release(ddraw); - ok(ref == 0, "The ddraw object was not properly freed: refcount %u.\n", ref); + ok(ref == 0, "The ddraw object was not properly freed: refcount %lu.\n", ref); proc = GetWindowLongPtrA(window, GWLP_WNDPROC); - ok(proc == (LONG_PTR)test_proc, "Expected wndproc %#lx, got %#lx.\n", + ok(proc == (LONG_PTR)test_proc, "Expected wndproc %#Ix, got %#Ix.\n", (LONG_PTR)test_proc, proc);
ddraw = create_ddraw(); proc = GetWindowLongPtrA(window, GWLP_WNDPROC); - ok(proc == (LONG_PTR)test_proc, "Expected wndproc %#lx, got %#lx.\n", + ok(proc == (LONG_PTR)test_proc, "Expected wndproc %#Ix, got %#Ix.\n", (LONG_PTR)test_proc, proc); hr = IDirectDraw_SetCooperativeLevel(ddraw, window, DDSCL_EXCLUSIVE | DDSCL_FULLSCREEN); - ok(SUCCEEDED(hr), "SetCooperativeLevel failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "SetCooperativeLevel failed, hr %#lx.\n", hr); proc = SetWindowLongPtrA(window, GWLP_WNDPROC, (LONG_PTR)DefWindowProcA); - ok(proc != (LONG_PTR)test_proc, "Expected wndproc != %#lx, got %#lx.\n", + ok(proc != (LONG_PTR)test_proc, "Expected wndproc != %#Ix, got %#Ix.\n", (LONG_PTR)test_proc, proc); ref = IDirectDraw_Release(ddraw); - ok(ref == 0, "The ddraw object was not properly freed: refcount %u.\n", ref); + ok(ref == 0, "The ddraw object was not properly freed: refcount %lu.\n", ref); proc = GetWindowLongPtrA(window, GWLP_WNDPROC); - ok(proc == (LONG_PTR)DefWindowProcA, "Expected wndproc %#lx, got %#lx.\n", + ok(proc == (LONG_PTR)DefWindowProcA, "Expected wndproc %#Ix, got %#Ix.\n", (LONG_PTR)DefWindowProcA, proc);
fix_wndproc(window, (LONG_PTR)test_proc); @@ -2607,12 +2607,12 @@ static void test_window_style(void) SetRect(&fullscreen_rect, 0, 0, registry_mode.dmPelsWidth, registry_mode.dmPelsHeight);
hr = IDirectDraw_SetCooperativeLevel(ddraw, window, DDSCL_EXCLUSIVE | DDSCL_FULLSCREEN); - ok(SUCCEEDED(hr), "SetCooperativeLevel failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "SetCooperativeLevel failed, hr %#lx.\n", hr);
tmp = GetWindowLongA(window, GWL_STYLE); - todo_wine ok(tmp == style, "Expected window style %#x, got %#x.\n", style, tmp); + todo_wine ok(tmp == style, "Expected window style %#lx, got %#lx.\n", style, tmp); tmp = GetWindowLongA(window, GWL_EXSTYLE); - todo_wine ok(tmp == exstyle, "Expected window extended style %#x, got %#x.\n", exstyle, tmp); + todo_wine ok(tmp == exstyle, "Expected window extended style %#lx, got %#lx.\n", exstyle, tmp);
GetWindowRect(window, &r); ok(EqualRect(&r, &fullscreen_rect), "Expected %s, got %s.\n", @@ -2624,9 +2624,9 @@ static void test_window_style(void) ok(ret, "Failed to set foreground window.\n");
tmp = GetWindowLongA(window, GWL_STYLE); - todo_wine ok(tmp == style, "Expected window style %#x, got %#x.\n", style, tmp); + todo_wine ok(tmp == style, "Expected window style %#lx, got %#lx.\n", style, tmp); tmp = GetWindowLongA(window, GWL_EXSTYLE); - todo_wine ok(tmp == exstyle, "Expected window extended style %#x, got %#x.\n", exstyle, tmp); + todo_wine ok(tmp == exstyle, "Expected window extended style %#lx, got %#lx.\n", exstyle, tmp);
ret = SetForegroundWindow(window); ok(ret, "Failed to set foreground window.\n"); @@ -2635,77 +2635,77 @@ static void test_window_style(void) ShowWindow(window, SW_HIDE);
hr = IDirectDraw_SetCooperativeLevel(ddraw, window, DDSCL_NORMAL); - ok(SUCCEEDED(hr), "SetCooperativeLevel failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "SetCooperativeLevel failed, hr %#lx.\n", hr);
tmp = GetWindowLongA(window, GWL_STYLE); - ok(tmp == style, "Expected window style %#x, got %#x.\n", style, tmp); + ok(tmp == style, "Expected window style %#lx, got %#lx.\n", style, tmp); tmp = GetWindowLongA(window, GWL_EXSTYLE); - ok(tmp == exstyle, "Expected window extended style %#x, got %#x.\n", exstyle, tmp); + ok(tmp == exstyle, "Expected window extended style %#lx, got %#lx.\n", exstyle, tmp);
hr = IDirectDraw_SetCooperativeLevel(ddraw, window, DDSCL_EXCLUSIVE | DDSCL_FULLSCREEN | DDSCL_NOWINDOWCHANGES); - ok(SUCCEEDED(hr), "SetCooperativeLevel failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "SetCooperativeLevel failed, hr %#lx.\n", hr);
tmp = GetWindowLongA(window, GWL_STYLE); - todo_wine ok(tmp == style, "Expected window style %#x, got %#x.\n", style, tmp); + todo_wine ok(tmp == style, "Expected window style %#lx, got %#lx.\n", style, tmp); tmp = GetWindowLongA(window, GWL_EXSTYLE); - todo_wine ok(tmp == exstyle, "Expected window extended style %#x, got %#x.\n", exstyle, tmp); + todo_wine ok(tmp == exstyle, "Expected window extended style %#lx, got %#lx.\n", exstyle, tmp);
hr = IDirectDraw_SetCooperativeLevel(ddraw, window, DDSCL_EXCLUSIVE | DDSCL_FULLSCREEN); - ok(SUCCEEDED(hr), "SetCooperativeLevel failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "SetCooperativeLevel failed, hr %#lx.\n", hr);
tmp = GetWindowLongA(window, GWL_STYLE); expected_style = style | WS_VISIBLE; - todo_wine ok(tmp == expected_style, "Expected window style %#x, got %#x.\n", expected_style, tmp); + todo_wine ok(tmp == expected_style, "Expected window style %#lx, got %#lx.\n", expected_style, tmp); tmp = GetWindowLongA(window, GWL_EXSTYLE); expected_style = exstyle | WS_EX_TOPMOST; - todo_wine ok(tmp == expected_style, "Expected window extended style %#x, got %#x.\n", expected_style, tmp); + todo_wine ok(tmp == expected_style, "Expected window extended style %#lx, got %#lx.\n", expected_style, tmp);
ShowWindow(window, SW_HIDE); tmp = GetWindowLongA(window, GWL_STYLE); - todo_wine ok(tmp == style, "Expected window style %#x, got %#x.\n", style, tmp); + todo_wine ok(tmp == style, "Expected window style %#lx, got %#lx.\n", style, tmp); tmp = GetWindowLongA(window, GWL_EXSTYLE); expected_style = exstyle | WS_EX_TOPMOST; - todo_wine ok(tmp == expected_style, "Expected window extended style %#x, got %#x.\n", expected_style, tmp); + todo_wine ok(tmp == expected_style, "Expected window extended style %#lx, got %#lx.\n", expected_style, tmp);
hr = IDirectDraw_SetCooperativeLevel(ddraw, window, DDSCL_NORMAL | DDSCL_NOWINDOWCHANGES); - ok(SUCCEEDED(hr), "SetCooperativeLevel failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "SetCooperativeLevel failed, hr %#lx.\n", hr);
tmp = GetWindowLongA(window, GWL_STYLE); - ok(tmp == style, "Expected window style %#x, got %#x.\n", style, tmp); + ok(tmp == style, "Expected window style %#lx, got %#lx.\n", style, tmp); tmp = GetWindowLongA(window, GWL_EXSTYLE); expected_style = exstyle | WS_EX_TOPMOST; - ok(tmp == expected_style, "Expected window extended style %#x, got %#x.\n", expected_style, tmp); + ok(tmp == expected_style, "Expected window extended style %#lx, got %#lx.\n", expected_style, tmp);
hr = IDirectDraw_SetCooperativeLevel(ddraw, window, DDSCL_NORMAL); - ok(SUCCEEDED(hr), "SetCooperativeLevel failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "SetCooperativeLevel failed, hr %#lx.\n", hr);
tmp = GetWindowLongA(window, GWL_STYLE); - ok(tmp == style, "Expected window style %#x, got %#x.\n", style, tmp); + ok(tmp == style, "Expected window style %#lx, got %#lx.\n", style, tmp); tmp = GetWindowLongA(window, GWL_EXSTYLE); expected_style = exstyle | WS_EX_TOPMOST; - ok(tmp == expected_style, "Expected window extended style %#x, got %#x.\n", expected_style, tmp); + ok(tmp == expected_style, "Expected window extended style %#lx, got %#lx.\n", expected_style, tmp);
ret = SetForegroundWindow(window); ok(ret, "Failed to set foreground window.\n");
hr = IDirectDraw_SetCooperativeLevel(ddraw, window, DDSCL_EXCLUSIVE | DDSCL_FULLSCREEN); - ok(SUCCEEDED(hr), "SetCooperativeLevel failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "SetCooperativeLevel failed, hr %#lx.\n", hr);
tmp = GetWindowLongA(window, GWL_STYLE); expected_style = style | WS_VISIBLE; - todo_wine ok(tmp == expected_style, "Expected window style %#x, got %#x.\n", expected_style, tmp); + todo_wine ok(tmp == expected_style, "Expected window style %#lx, got %#lx.\n", expected_style, tmp); tmp = GetWindowLongA(window, GWL_EXSTYLE); expected_style = exstyle | WS_EX_TOPMOST; - todo_wine ok(tmp == expected_style, "Expected window extended style %#x, got %#x.\n", expected_style, tmp); + todo_wine ok(tmp == expected_style, "Expected window extended style %#lx, got %#lx.\n", expected_style, tmp);
ShowWindow(window, SW_HIDE); hr = IDirectDraw_SetCooperativeLevel(ddraw, window, DDSCL_NORMAL); - ok(SUCCEEDED(hr), "SetCooperativeLevel failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "SetCooperativeLevel failed, hr %#lx.\n", hr);
tmp = GetWindowLongA(window, GWL_STYLE); - ok(tmp == style, "Expected window style %#x, got %#x.\n", style, tmp); + ok(tmp == style, "Expected window style %#lx, got %#lx.\n", style, tmp); tmp = GetWindowLongA(window, GWL_EXSTYLE); - ok(tmp == exstyle, "Expected window extended style %#x, got %#x.\n", exstyle, tmp); + ok(tmp == exstyle, "Expected window extended style %#lx, got %#lx.\n", exstyle, tmp);
ShowWindow(window, SW_SHOW); ret = SetForegroundWindow(GetDesktopWindow()); @@ -2713,20 +2713,20 @@ static void test_window_style(void) SetActiveWindow(window); ok(GetActiveWindow() == window, "Unexpected active window.\n"); hr = IDirectDraw_SetCooperativeLevel(ddraw, window, DDSCL_EXCLUSIVE | DDSCL_FULLSCREEN); - ok(SUCCEEDED(hr), "SetCooperativeLevel failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "SetCooperativeLevel failed, hr %#lx.\n", hr);
tmp = GetWindowLongA(window, GWL_STYLE); expected_style = style | WS_VISIBLE; - todo_wine ok(tmp == expected_style, "Expected window style %#x, got %#x.\n", expected_style, tmp); + todo_wine ok(tmp == expected_style, "Expected window style %#lx, got %#lx.\n", expected_style, tmp); tmp = GetWindowLongA(window, GWL_EXSTYLE); - todo_wine ok(tmp == exstyle, "Expected window extended style %#x, got %#x.\n", exstyle, tmp); + todo_wine ok(tmp == exstyle, "Expected window extended style %#lx, got %#lx.\n", exstyle, tmp);
GetWindowRect(window, &r); ok(EqualRect(&r, &fullscreen_rect), "Expected %s, got %s.\n", wine_dbgstr_rect(&fullscreen_rect), wine_dbgstr_rect(&r));
hr = IDirectDraw_SetCooperativeLevel(ddraw, window, DDSCL_NORMAL); - ok(SUCCEEDED(hr), "SetCooperativeLevel failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "SetCooperativeLevel failed, hr %#lx.\n", hr);
SetWindowPos(window, NULL, 0, 0, 100, 100, SWP_NOZORDER | SWP_NOACTIVATE); GetWindowRect(window, &r); @@ -2736,13 +2736,13 @@ static void test_window_style(void) ret = SetForegroundWindow(window2); ok(ret, "Failed to set foreground window.\n"); hr = IDirectDraw_SetCooperativeLevel(ddraw, window, DDSCL_EXCLUSIVE | DDSCL_FULLSCREEN); - ok(SUCCEEDED(hr), "SetCooperativeLevel failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "SetCooperativeLevel failed, hr %#lx.\n", hr);
tmp = GetWindowLongA(window, GWL_STYLE); expected_style = style | WS_VISIBLE; - todo_wine ok(tmp == expected_style, "Expected window style %#x, got %#x.\n", expected_style, tmp); + todo_wine ok(tmp == expected_style, "Expected window style %#lx, got %#lx.\n", expected_style, tmp); tmp = GetWindowLongA(window, GWL_EXSTYLE); - todo_wine ok(tmp == exstyle, "Expected window extended style %#x, got %#x.\n", exstyle, tmp); + todo_wine ok(tmp == exstyle, "Expected window extended style %#lx, got %#lx.\n", exstyle, tmp);
GetWindowRect(window, &r); ok(EqualRect(&r, &fullscreen_rect), "Expected %s, got %s.\n", @@ -2751,46 +2751,46 @@ static void test_window_style(void) ret = SetForegroundWindow(window); ok(ret, "Failed to set foreground window.\n"); hr = IDirectDraw_SetCooperativeLevel(ddraw, window, DDSCL_EXCLUSIVE | DDSCL_FULLSCREEN); - ok(SUCCEEDED(hr), "SetCooperativeLevel failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "SetCooperativeLevel failed, hr %#lx.\n", hr);
tmp = GetWindowLongA(window, GWL_STYLE); expected_style = style | WS_VISIBLE; - todo_wine ok(tmp == expected_style, "Expected window style %#x, got %#x.\n", expected_style, tmp); + todo_wine ok(tmp == expected_style, "Expected window style %#lx, got %#lx.\n", expected_style, tmp); tmp = GetWindowLongA(window, GWL_EXSTYLE); expected_style = exstyle | WS_EX_TOPMOST; - todo_wine ok(tmp == expected_style, "Expected window extended style %#x, got %#x.\n", expected_style, tmp); + todo_wine ok(tmp == expected_style, "Expected window extended style %#lx, got %#lx.\n", expected_style, tmp);
ShowWindow(window, SW_HIDE); hr = IDirectDraw_SetCooperativeLevel(ddraw, window, DDSCL_NORMAL); - ok(SUCCEEDED(hr), "SetCooperativeLevel failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "SetCooperativeLevel failed, hr %#lx.\n", hr);
tmp = GetWindowLongA(window, GWL_STYLE); - ok(tmp == style, "Expected window style %#x, got %#x.\n", style, tmp); + ok(tmp == style, "Expected window style %#lx, got %#lx.\n", style, tmp); tmp = GetWindowLongA(window, GWL_EXSTYLE); - ok(tmp == exstyle, "Expected window extended style %#x, got %#x.\n", exstyle, tmp); + ok(tmp == exstyle, "Expected window extended style %#lx, got %#lx.\n", exstyle, tmp);
ShowWindow(window, SW_SHOW); hr = IDirectDraw_SetCooperativeLevel(ddraw, window, DDSCL_EXCLUSIVE | DDSCL_FULLSCREEN); - ok(SUCCEEDED(hr), "SetCooperativeLevel failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "SetCooperativeLevel failed, hr %#lx.\n", hr);
tmp = GetWindowLongA(window, GWL_STYLE); expected_style = style | WS_VISIBLE; - todo_wine ok(tmp == expected_style, "Expected window style %#x, got %#x.\n", expected_style, tmp); + todo_wine ok(tmp == expected_style, "Expected window style %#lx, got %#lx.\n", expected_style, tmp); tmp = GetWindowLongA(window, GWL_EXSTYLE); expected_style = exstyle | WS_EX_TOPMOST; - todo_wine ok(tmp == expected_style, "Expected window extended style %#x, got %#x.\n", expected_style, tmp); + todo_wine ok(tmp == expected_style, "Expected window extended style %#lx, got %#lx.\n", expected_style, tmp);
ret = SetForegroundWindow(GetDesktopWindow()); ok(ret, "Failed to set foreground window.\n"); tmp = GetWindowLongA(window, GWL_STYLE); expected_style = style | WS_VISIBLE | WS_MINIMIZE; - todo_wine ok(tmp == expected_style, "Expected window style %#x, got %#x.\n", expected_style, tmp); + todo_wine ok(tmp == expected_style, "Expected window style %#lx, got %#lx.\n", expected_style, tmp); tmp = GetWindowLongA(window, GWL_EXSTYLE); expected_style = exstyle | WS_EX_TOPMOST; - todo_wine ok(tmp == expected_style, "Expected window extended style %#x, got %#x.\n", expected_style, tmp); + todo_wine ok(tmp == expected_style, "Expected window extended style %#lx, got %#lx.\n", expected_style, tmp);
ref = IDirectDraw_Release(ddraw); - ok(ref == 0, "The ddraw object was not properly freed: refcount %u.\n", ref); + ok(ref == 0, "The ddraw object was not properly freed: refcount %lu.\n", ref);
DestroyWindow(window2); DestroyWindow(window); @@ -2811,15 +2811,15 @@ static void test_redundant_mode_set(void) ok(!!ddraw, "Failed to create a ddraw object.\n");
hr = IDirectDraw_SetCooperativeLevel(ddraw, window, DDSCL_EXCLUSIVE | DDSCL_FULLSCREEN); - ok(SUCCEEDED(hr), "SetCooperativeLevel failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "SetCooperativeLevel failed, hr %#lx.\n", hr);
surface_desc.dwSize = sizeof(surface_desc); hr = IDirectDraw_GetDisplayMode(ddraw, &surface_desc); - ok(SUCCEEDED(hr), "GetDisplayMode failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "GetDisplayMode failed, hr %#lx.\n", hr);
hr = IDirectDraw_SetDisplayMode(ddraw, surface_desc.dwWidth, surface_desc.dwHeight, U1(surface_desc.ddpfPixelFormat).dwRGBBitCount); - ok(SUCCEEDED(hr), "SetDisplayMode failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "SetDisplayMode failed, hr %#lx.\n", hr);
GetWindowRect(window, &q); r = q; @@ -2831,14 +2831,14 @@ static void test_redundant_mode_set(void)
hr = IDirectDraw_SetDisplayMode(ddraw, surface_desc.dwWidth, surface_desc.dwHeight, U1(surface_desc.ddpfPixelFormat).dwRGBBitCount); - ok(SUCCEEDED(hr), "SetDisplayMode failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "SetDisplayMode failed, hr %#lx.\n", hr);
GetWindowRect(window, &s); ok(EqualRect(&r, &s) || broken(EqualRect(&q, &s) /* Windows 10 */), "Expected %s, got %s.\n", wine_dbgstr_rect(&r), wine_dbgstr_rect(&s));
ref = IDirectDraw_Release(ddraw); - ok(ref == 0, "The ddraw object was not properly freed: refcount %u.\n", ref); + ok(ref == 0, "The ddraw object was not properly freed: refcount %lu.\n", ref);
DestroyWindow(window); } @@ -2977,10 +2977,10 @@ static void test_coop_level_mode_set(void) memset(&devmode, 0, sizeof(devmode)); devmode.dmSize = sizeof(devmode); ret = EnumDisplaySettingsW(NULL, ENUM_CURRENT_SETTINGS, &devmode); - ok(ret, "EnumDisplaySettingsW failed, error %#x.\n", GetLastError()); + ok(ret, "EnumDisplaySettingsW failed, error %#lx.\n", GetLastError()); ok(compare_mode_rect(&devmode, ®istry_mode), "Got a different mode.\n"); ret = EnumDisplaySettingsW(NULL, ENUM_REGISTRY_SETTINGS, &devmode); - ok(ret, "EnumDisplaySettingsW failed, error %#x.\n", GetLastError()); + ok(ret, "EnumDisplaySettingsW failed, error %#lx.\n", GetLastError()); ok(compare_mode_rect(&devmode, ®istry_mode), "Got a different mode.\n");
ret = save_display_modes(&original_modes, &display_count); @@ -2991,9 +2991,9 @@ static void test_coop_level_mode_set(void)
memset(¶m, 0, sizeof(param)); hr = IDirectDraw_EnumDisplayModes(ddraw, 0, NULL, ¶m, test_coop_level_mode_set_enum_cb); - ok(SUCCEEDED(hr), "Failed to enumerate display mode, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to enumerate display mode, hr %#lx.\n", hr); ref = IDirectDraw_Release(ddraw); - ok(ref == 0, "The ddraw object was not properly freed: refcount %u.\n", ref); + ok(ref == 0, "The ddraw object was not properly freed: refcount %lu.\n", ref);
if (!param.user32_height) { @@ -3012,7 +3012,7 @@ static void test_coop_level_mode_set(void) devmode.dmPelsWidth = param.user32_width; devmode.dmPelsHeight = param.user32_height; change_ret = ChangeDisplaySettingsW(&devmode, CDS_FULLSCREEN); - ok(change_ret == DISP_CHANGE_SUCCESSFUL, "Failed to change display mode, ret %#x.\n", change_ret); + ok(change_ret == DISP_CHANGE_SUCCESSFUL, "Failed to change display mode, ret %#lx.\n", change_ret);
ddraw = create_ddraw(); ok(!!ddraw, "Failed to create a ddraw object.\n"); @@ -3025,7 +3025,7 @@ static void test_coop_level_mode_set(void) 0, 0, 100, 100, 0, 0, 0, 0);
hr = IDirectDraw_SetCooperativeLevel(ddraw, window, DDSCL_EXCLUSIVE | DDSCL_FULLSCREEN); - ok(SUCCEEDED(hr), "SetCooperativeLevel failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "SetCooperativeLevel failed, hr %#lx.\n", hr);
GetWindowRect(window, &r); ok(EqualRect(&r, &user32_rect), "Expected %s, got %s.\n", wine_dbgstr_rect(&user32_rect), @@ -3037,12 +3037,12 @@ static void test_coop_level_mode_set(void) ddsd.ddsCaps.dwCaps = DDSCAPS_PRIMARYSURFACE;
hr = IDirectDraw_CreateSurface(ddraw, &ddsd, &primary, NULL); - ok(SUCCEEDED(hr), "Failed to create surface, hr %#x.\n",hr); + ok(SUCCEEDED(hr), "Failed to create surface, hr %#lx.\n",hr); hr = IDirectDrawSurface_GetSurfaceDesc(primary, &ddsd); - ok(SUCCEEDED(hr), "Failed to get surface desc, hr %#x.\n", hr); - ok(ddsd.dwWidth == param.user32_width, "Expected surface width %u, got %u.\n", + ok(SUCCEEDED(hr), "Failed to get surface desc, hr %#lx.\n", hr); + ok(ddsd.dwWidth == param.user32_width, "Expected surface width %lu, got %lu.\n", param.user32_width, ddsd.dwWidth); - ok(ddsd.dwHeight == param.user32_height, "Expected surface height %u, got %u.\n", + ok(ddsd.dwHeight == param.user32_height, "Expected surface height %lu, got %lu.\n", param.user32_height, ddsd.dwHeight);
GetWindowRect(window, &r); @@ -3055,16 +3055,16 @@ static void test_coop_level_mode_set(void) screen_size.cy = 0;
hr = IDirectDrawSurface_IsLost(primary); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); hr = set_display_mode(ddraw, param.ddraw_width, param.ddraw_height); - ok(SUCCEEDED(hr), "Failed to set display mode, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set display mode, hr %#lx.\n", hr); hr = IDirectDrawSurface_IsLost(primary); - ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#lx.\n", hr);
ok(!expect_messages->message, "Expected message %#x, but didn't receive it.\n", expect_messages->message); expect_messages = NULL; ok(screen_size.cx == param.ddraw_width && screen_size.cy == param.ddraw_height, - "Expected screen size %ux%u, got %ux%u.\n", + "Expected screen size %lux%lu, got %lux%lu.\n", param.ddraw_width, param.ddraw_height, screen_size.cx, screen_size.cy);
GetWindowRect(window, &r); @@ -3072,10 +3072,10 @@ static void test_coop_level_mode_set(void) wine_dbgstr_rect(&r));
hr = IDirectDrawSurface_GetSurfaceDesc(primary, &ddsd); - ok(SUCCEEDED(hr), "Failed to get surface desc, hr %#x.\n", hr); - ok(ddsd.dwWidth == param.user32_width, "Expected surface width %u, got %u.\n", + ok(SUCCEEDED(hr), "Failed to get surface desc, hr %#lx.\n", hr); + ok(ddsd.dwWidth == param.user32_width, "Expected surface width %lu, got %lu.\n", param.user32_width, ddsd.dwWidth); - ok(ddsd.dwHeight == param.user32_height, "Expected surface height %u, got %u.\n", + ok(ddsd.dwHeight == param.user32_height, "Expected surface height %lu, got %lu.\n", param.user32_height, ddsd.dwHeight); IDirectDrawSurface_Release(primary);
@@ -3085,12 +3085,12 @@ static void test_coop_level_mode_set(void) ddsd.ddsCaps.dwCaps = DDSCAPS_PRIMARYSURFACE;
hr = IDirectDraw_CreateSurface(ddraw, &ddsd, &primary, NULL); - ok(SUCCEEDED(hr), "Failed to create surface, hr %#x.\n",hr); + ok(SUCCEEDED(hr), "Failed to create surface, hr %#lx.\n",hr); hr = IDirectDrawSurface_GetSurfaceDesc(primary, &ddsd); - ok(SUCCEEDED(hr), "Failed to get surface desc, hr %#x.\n", hr); - ok(ddsd.dwWidth == param.ddraw_width, "Expected surface width %u, got %u.\n", + ok(SUCCEEDED(hr), "Failed to get surface desc, hr %#lx.\n", hr); + ok(ddsd.dwWidth == param.ddraw_width, "Expected surface width %lu, got %lu.\n", param.ddraw_width, ddsd.dwWidth); - ok(ddsd.dwHeight == param.ddraw_height, "Expected surface height %u, got %u.\n", + ok(ddsd.dwHeight == param.ddraw_height, "Expected surface height %lu, got %lu.\n", param.ddraw_height, ddsd.dwHeight);
GetWindowRect(window, &r); @@ -3103,16 +3103,16 @@ static void test_coop_level_mode_set(void) screen_size.cy = 0;
hr = IDirectDrawSurface_IsLost(primary); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); change_ret = ChangeDisplaySettingsW(&devmode, CDS_FULLSCREEN); - ok(change_ret == DISP_CHANGE_SUCCESSFUL, "Failed to change display mode, ret %#x.\n", change_ret); + ok(change_ret == DISP_CHANGE_SUCCESSFUL, "Failed to change display mode, ret %#lx.\n", change_ret); hr = IDirectDrawSurface_IsLost(primary); - ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#lx.\n", hr);
ok(!expect_messages->message, "Expected message %#x, but didn't receive it.\n", expect_messages->message); expect_messages = NULL; ok(screen_size.cx == param.user32_width && screen_size.cy == param.user32_height, - "Expected screen size %ux%u, got %ux%u.\n", + "Expected screen size %lux%lu, got %lux%lu.\n", param.user32_width, param.user32_height, screen_size.cx, screen_size.cy);
GetWindowRect(window, &r); @@ -3128,7 +3128,7 @@ static void test_coop_level_mode_set(void) ret = EnumDisplaySettingsW(NULL, ENUM_CURRENT_SETTINGS, &devmode); ok(ret, "Failed to get display mode.\n"); ok(devmode.dmPelsWidth == registry_mode.dmPelsWidth - && devmode.dmPelsHeight == registry_mode.dmPelsHeight, "Got unexpected screen size %ux%u.\n", + && devmode.dmPelsHeight == registry_mode.dmPelsHeight, "Got unexpected screen size %lux%lu.\n", devmode.dmPelsWidth, devmode.dmPelsHeight);
expect_messages = exclusive_focus_restore_messages; @@ -3141,11 +3141,11 @@ static void test_coop_level_mode_set(void) ret = EnumDisplaySettingsW(NULL, ENUM_CURRENT_SETTINGS, &devmode); ok(ret, "Failed to get display mode.\n"); ok(devmode.dmPelsWidth == param.ddraw_width - && devmode.dmPelsHeight == param.ddraw_height, "Got unexpected screen size %ux%u.\n", + && devmode.dmPelsHeight == param.ddraw_height, "Got unexpected screen size %lux%lu.\n", devmode.dmPelsWidth, devmode.dmPelsHeight);
hr = IDirectDraw_SetCooperativeLevel(ddraw, window, DDSCL_EXCLUSIVE | DDSCL_FULLSCREEN); - ok(SUCCEEDED(hr), "SetCooperativeLevel failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "SetCooperativeLevel failed, hr %#lx.\n", hr); /* Normally the primary should be restored here. Unfortunately this causes the * GetSurfaceDesc call after the next display mode change to crash on the Windows 8 * testbot. Another Restore call would presumably avoid the crash, but it also moots @@ -3167,7 +3167,7 @@ static void test_coop_level_mode_set(void) expect_messages = NULL;
hr = IDirectDraw_SetCooperativeLevel(ddraw, window, DDSCL_EXCLUSIVE | DDSCL_FULLSCREEN); - ok(SUCCEEDED(hr), "SetCooperativeLevel failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "SetCooperativeLevel failed, hr %#lx.\n", hr);
PeekMessageA(&msg, 0, 0, 0, PM_NOREMOVE); expect_messages = exclusive_messages; @@ -3175,17 +3175,17 @@ static void test_coop_level_mode_set(void) screen_size.cy = 0;
hr = IDirectDrawSurface_IsLost(primary); - ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#lx.\n", hr); hr = IDirectDraw_RestoreDisplayMode(ddraw); - ok(SUCCEEDED(hr), "RestoreDisplayMode failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "RestoreDisplayMode failed, hr %#lx.\n", hr); hr = IDirectDrawSurface_IsLost(primary); - ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#lx.\n", hr);
ok(!expect_messages->message, "Expected message %#x, but didn't receive it.\n", expect_messages->message); expect_messages = NULL; ok(screen_size.cx == registry_mode.dmPelsWidth && screen_size.cy == registry_mode.dmPelsHeight, - "Expected screen size %ux%u, got %ux%u.\n", + "Expected screen size %lux%lu, got %lux%lu.\n", registry_mode.dmPelsWidth, registry_mode.dmPelsHeight, screen_size.cx, screen_size.cy);
GetWindowRect(window, &r); @@ -3193,16 +3193,16 @@ static void test_coop_level_mode_set(void) wine_dbgstr_rect(&r));
hr = IDirectDrawSurface_GetSurfaceDesc(primary, &ddsd); - ok(SUCCEEDED(hr), "Failed to get surface desc, hr %#x.\n", hr); - ok(ddsd.dwWidth == param.ddraw_width, "Expected surface width %u, got %u.\n", + ok(SUCCEEDED(hr), "Failed to get surface desc, hr %#lx.\n", hr); + ok(ddsd.dwWidth == param.ddraw_width, "Expected surface width %lu, got %lu.\n", param.ddraw_width, ddsd.dwWidth); - ok(ddsd.dwHeight == param.ddraw_height, "Expected surface height %u, got %u.\n", + ok(ddsd.dwHeight == param.ddraw_height, "Expected surface height %lu, got %lu.\n", param.ddraw_height, ddsd.dwHeight); IDirectDrawSurface_Release(primary);
/* For Wine. */ change_ret = ChangeDisplaySettingsW(NULL, CDS_FULLSCREEN); - ok(change_ret == DISP_CHANGE_SUCCESSFUL, "Failed to change display mode, ret %#x.\n", change_ret); + ok(change_ret == DISP_CHANGE_SUCCESSFUL, "Failed to change display mode, ret %#lx.\n", change_ret);
memset(&ddsd, 0, sizeof(ddsd)); ddsd.dwSize = sizeof(ddsd); @@ -3210,12 +3210,12 @@ static void test_coop_level_mode_set(void) ddsd.ddsCaps.dwCaps = DDSCAPS_PRIMARYSURFACE;
hr = IDirectDraw_CreateSurface(ddraw, &ddsd, &primary, NULL); - ok(SUCCEEDED(hr), "Failed to create surface, hr %#x.\n",hr); + ok(SUCCEEDED(hr), "Failed to create surface, hr %#lx.\n",hr); hr = IDirectDrawSurface_GetSurfaceDesc(primary, &ddsd); - ok(SUCCEEDED(hr), "Failed to get surface desc, hr %#x.\n", hr); - ok(ddsd.dwWidth == registry_mode.dmPelsWidth, "Expected surface width %u, got %u.\n", + ok(SUCCEEDED(hr), "Failed to get surface desc, hr %#lx.\n", hr); + ok(ddsd.dwWidth == registry_mode.dmPelsWidth, "Expected surface width %lu, got %lu.\n", registry_mode.dmPelsWidth, ddsd.dwWidth); - ok(ddsd.dwHeight == registry_mode.dmPelsHeight, "Expected surface height %u, got %u.\n", + ok(ddsd.dwHeight == registry_mode.dmPelsHeight, "Expected surface height %lu, got %lu.\n", registry_mode.dmPelsHeight, ddsd.dwHeight);
GetWindowRect(window, &r); @@ -3223,17 +3223,17 @@ static void test_coop_level_mode_set(void) wine_dbgstr_rect(&r));
hr = IDirectDraw_SetCooperativeLevel(ddraw, window, DDSCL_NORMAL); - ok(SUCCEEDED(hr), "SetCooperativeLevel failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "SetCooperativeLevel failed, hr %#lx.\n", hr);
GetWindowRect(window, &r); ok(EqualRect(&r, ®istry_rect), "Expected %s, got %s.\n", wine_dbgstr_rect(®istry_rect), wine_dbgstr_rect(&r));
hr = IDirectDrawSurface_GetSurfaceDesc(primary, &ddsd); - ok(SUCCEEDED(hr), "Failed to get surface desc, hr %#x.\n", hr); - ok(ddsd.dwWidth == registry_mode.dmPelsWidth, "Expected surface width %u, got %u.\n", + ok(SUCCEEDED(hr), "Failed to get surface desc, hr %#lx.\n", hr); + ok(ddsd.dwWidth == registry_mode.dmPelsWidth, "Expected surface width %lu, got %lu.\n", registry_mode.dmPelsWidth, ddsd.dwWidth); - ok(ddsd.dwHeight == registry_mode.dmPelsHeight, "Expected surface height %u, got %u.\n", + ok(ddsd.dwHeight == registry_mode.dmPelsHeight, "Expected surface height %lu, got %lu.\n", registry_mode.dmPelsHeight, ddsd.dwHeight); IDirectDrawSurface_Release(primary);
@@ -3243,12 +3243,12 @@ static void test_coop_level_mode_set(void) ddsd.ddsCaps.dwCaps = DDSCAPS_PRIMARYSURFACE;
hr = IDirectDraw_CreateSurface(ddraw, &ddsd, &primary, NULL); - ok(SUCCEEDED(hr), "Failed to create surface, hr %#x.\n",hr); + ok(SUCCEEDED(hr), "Failed to create surface, hr %#lx.\n",hr); hr = IDirectDrawSurface_GetSurfaceDesc(primary, &ddsd); - ok(SUCCEEDED(hr), "Failed to get surface desc, hr %#x.\n", hr); - ok(ddsd.dwWidth == registry_mode.dmPelsWidth, "Expected surface width %u, got %u.\n", + ok(SUCCEEDED(hr), "Failed to get surface desc, hr %#lx.\n", hr); + ok(ddsd.dwWidth == registry_mode.dmPelsWidth, "Expected surface width %lu, got %lu.\n", registry_mode.dmPelsWidth, ddsd.dwWidth); - ok(ddsd.dwHeight == registry_mode.dmPelsHeight, "Expected surface height %u, got %u.\n", + ok(ddsd.dwHeight == registry_mode.dmPelsHeight, "Expected surface height %lu, got %lu.\n", registry_mode.dmPelsHeight, ddsd.dwHeight);
GetWindowRect(window, &r); @@ -3261,18 +3261,18 @@ static void test_coop_level_mode_set(void) screen_size.cy = 0;
hr = IDirectDrawSurface_IsLost(primary); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); devmode.dmFields = DM_PELSWIDTH | DM_PELSHEIGHT; devmode.dmPelsWidth = param.user32_width; devmode.dmPelsHeight = param.user32_height; change_ret = ChangeDisplaySettingsW(&devmode, CDS_FULLSCREEN); - ok(change_ret == DISP_CHANGE_SUCCESSFUL, "Failed to change display mode, ret %#x.\n", change_ret); + ok(change_ret == DISP_CHANGE_SUCCESSFUL, "Failed to change display mode, ret %#lx.\n", change_ret); hr = IDirectDrawSurface_IsLost(primary); - todo_wine ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#x.\n", hr); + todo_wine ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#lx.\n", hr);
ok(!expect_messages->message, "Expected message %#x, but didn't receive it.\n", expect_messages->message); expect_messages = NULL; - ok(!screen_size.cx && !screen_size.cy, "Got unexpected screen size %ux%u.\n", screen_size.cx, screen_size.cy); + ok(!screen_size.cx && !screen_size.cy, "Got unexpected screen size %lux%lu.\n", screen_size.cx, screen_size.cy);
GetWindowRect(window, &r); ok(EqualRect(&r, ®istry_rect), "Expected %s, got %s.\n", wine_dbgstr_rect(®istry_rect), @@ -3284,7 +3284,7 @@ static void test_coop_level_mode_set(void) screen_size.cy = 0;
hr = IDirectDrawSurface_Restore(primary); - ok(hr == DDERR_WRONGMODE, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_WRONGMODE, "Got unexpected hr %#lx.\n", hr); hr = set_display_mode(ddraw, param.ddraw_width, param.ddraw_height); if (hr == DDERR_NOEXCLUSIVEMODE /* NT4 testbot */) { @@ -3293,25 +3293,25 @@ static void test_coop_level_mode_set(void) IDirectDraw_Release(ddraw); goto done; } - ok(SUCCEEDED(hr), "Failed to set display mode, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set display mode, hr %#lx.\n", hr); hr = IDirectDrawSurface_Restore(primary); - ok(hr == DDERR_WRONGMODE, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_WRONGMODE, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface_IsLost(primary); - ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#lx.\n", hr);
ok(!expect_messages->message, "Expected message %#x, but didn't receive it.\n", expect_messages->message); expect_messages = NULL; - ok(!screen_size.cx && !screen_size.cy, "Got unexpected screen size %ux%u.\n", screen_size.cx, screen_size.cy); + ok(!screen_size.cx && !screen_size.cy, "Got unexpected screen size %lux%lu.\n", screen_size.cx, screen_size.cy);
GetWindowRect(window, &r); ok(EqualRect(&r, ®istry_rect), "Expected %s, got %s.\n", wine_dbgstr_rect(®istry_rect), wine_dbgstr_rect(&r));
hr = IDirectDrawSurface_GetSurfaceDesc(primary, &ddsd); - ok(SUCCEEDED(hr), "Failed to get surface desc, hr %#x.\n", hr); - ok(ddsd.dwWidth == registry_mode.dmPelsWidth, "Expected surface width %u, got %u.\n", + ok(SUCCEEDED(hr), "Failed to get surface desc, hr %#lx.\n", hr); + ok(ddsd.dwWidth == registry_mode.dmPelsWidth, "Expected surface width %lu, got %lu.\n", registry_mode.dmPelsWidth, ddsd.dwWidth); - ok(ddsd.dwHeight == registry_mode.dmPelsHeight, "Expected surface height %u, got %u.\n", + ok(ddsd.dwHeight == registry_mode.dmPelsHeight, "Expected surface height %lu, got %lu.\n", registry_mode.dmPelsHeight, ddsd.dwHeight); IDirectDrawSurface_Release(primary);
@@ -3321,12 +3321,12 @@ static void test_coop_level_mode_set(void) ddsd.ddsCaps.dwCaps = DDSCAPS_PRIMARYSURFACE;
hr = IDirectDraw_CreateSurface(ddraw, &ddsd, &primary, NULL); - ok(SUCCEEDED(hr), "Failed to create surface, hr %#x.\n",hr); + ok(SUCCEEDED(hr), "Failed to create surface, hr %#lx.\n",hr); hr = IDirectDrawSurface_GetSurfaceDesc(primary, &ddsd); - ok(SUCCEEDED(hr), "Failed to get surface desc, hr %#x.\n", hr); - ok(ddsd.dwWidth == param.ddraw_width, "Expected surface width %u, got %u.\n", + ok(SUCCEEDED(hr), "Failed to get surface desc, hr %#lx.\n", hr); + ok(ddsd.dwWidth == param.ddraw_width, "Expected surface width %lu, got %lu.\n", param.ddraw_width, ddsd.dwWidth); - ok(ddsd.dwHeight == param.ddraw_height, "Expected surface height %u, got %u.\n", + ok(ddsd.dwHeight == param.ddraw_height, "Expected surface height %lu, got %lu.\n", param.ddraw_height, ddsd.dwHeight);
GetWindowRect(window, &r); @@ -3339,25 +3339,25 @@ static void test_coop_level_mode_set(void) screen_size.cy = 0;
hr = IDirectDrawSurface_IsLost(primary); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirectDraw_RestoreDisplayMode(ddraw); - ok(SUCCEEDED(hr), "RestoreDisplayMode failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "RestoreDisplayMode failed, hr %#lx.\n", hr); hr = IDirectDrawSurface_IsLost(primary); - ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#lx.\n", hr);
ok(!expect_messages->message, "Expected message %#x, but didn't receive it.\n", expect_messages->message); expect_messages = NULL; - ok(!screen_size.cx && !screen_size.cy, "Got unexpected screen size %ux%u.\n", screen_size.cx, screen_size.cy); + ok(!screen_size.cx && !screen_size.cy, "Got unexpected screen size %lux%lu.\n", screen_size.cx, screen_size.cy);
GetWindowRect(window, &r); ok(EqualRect(&r, ®istry_rect), "Expected %s, got %s.\n", wine_dbgstr_rect(®istry_rect), wine_dbgstr_rect(&r));
hr = IDirectDrawSurface_GetSurfaceDesc(primary, &ddsd); - ok(SUCCEEDED(hr), "Failed to get surface desc, hr %#x.\n", hr); - ok(ddsd.dwWidth == param.ddraw_width, "Expected surface width %u, got %u.\n", + ok(SUCCEEDED(hr), "Failed to get surface desc, hr %#lx.\n", hr); + ok(ddsd.dwWidth == param.ddraw_width, "Expected surface width %lu, got %lu.\n", param.ddraw_width, ddsd.dwWidth); - ok(ddsd.dwHeight == param.ddraw_height, "Expected surface height %u, got %u.\n", + ok(ddsd.dwHeight == param.ddraw_height, "Expected surface height %lu, got %lu.\n", param.ddraw_height, ddsd.dwHeight); IDirectDrawSurface_Release(primary);
@@ -3365,11 +3365,11 @@ static void test_coop_level_mode_set(void) ok(ret, "Failed to get display mode.\n"); ok(devmode.dmPelsWidth == registry_mode.dmPelsWidth && devmode.dmPelsHeight == registry_mode.dmPelsHeight, - "Expected resolution %ux%u, got %ux%u.\n", + "Expected resolution %lux%lu, got %lux%lu.\n", registry_mode.dmPelsWidth, registry_mode.dmPelsHeight, devmode.dmPelsWidth, devmode.dmPelsHeight); change_ret = ChangeDisplaySettingsW(NULL, CDS_FULLSCREEN); - ok(change_ret == DISP_CHANGE_SUCCESSFUL, "Failed to change display mode, ret %#x.\n", change_ret); + ok(change_ret == DISP_CHANGE_SUCCESSFUL, "Failed to change display mode, ret %#lx.\n", change_ret);
memset(&ddsd, 0, sizeof(ddsd)); ddsd.dwSize = sizeof(ddsd); @@ -3377,12 +3377,12 @@ static void test_coop_level_mode_set(void) ddsd.ddsCaps.dwCaps = DDSCAPS_PRIMARYSURFACE;
hr = IDirectDraw_CreateSurface(ddraw, &ddsd, &primary, NULL); - ok(SUCCEEDED(hr), "Failed to create surface, hr %#x.\n",hr); + ok(SUCCEEDED(hr), "Failed to create surface, hr %#lx.\n",hr); hr = IDirectDrawSurface_GetSurfaceDesc(primary, &ddsd); - ok(SUCCEEDED(hr), "Failed to get surface desc, hr %#x.\n", hr); - ok(ddsd.dwWidth == registry_mode.dmPelsWidth, "Expected surface width %u, got %u.\n", + ok(SUCCEEDED(hr), "Failed to get surface desc, hr %#lx.\n", hr); + ok(ddsd.dwWidth == registry_mode.dmPelsWidth, "Expected surface width %lu, got %lu.\n", registry_mode.dmPelsWidth, ddsd.dwWidth); - ok(ddsd.dwHeight == registry_mode.dmPelsHeight, "Expected surface height %u, got %u.\n", + ok(ddsd.dwHeight == registry_mode.dmPelsHeight, "Expected surface height %lu, got %lu.\n", registry_mode.dmPelsHeight, ddsd.dwHeight);
GetWindowRect(window, &r); @@ -3393,17 +3393,17 @@ static void test_coop_level_mode_set(void) * Resizing the window on mode changes is a property of DDSCL_EXCLUSIVE, * not DDSCL_FULLSCREEN. */ hr = IDirectDraw_SetCooperativeLevel(ddraw, window, DDSCL_NORMAL | DDSCL_FULLSCREEN); - ok(SUCCEEDED(hr), "SetCooperativeLevel failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "SetCooperativeLevel failed, hr %#lx.\n", hr);
GetWindowRect(window, &r); ok(EqualRect(&r, ®istry_rect), "Expected %s, got %s.\n", wine_dbgstr_rect(®istry_rect), wine_dbgstr_rect(&r));
hr = IDirectDrawSurface_GetSurfaceDesc(primary, &ddsd); - ok(SUCCEEDED(hr), "Failed to get surface desc, hr %#x.\n", hr); - ok(ddsd.dwWidth == registry_mode.dmPelsWidth, "Expected surface width %u, got %u.\n", + ok(SUCCEEDED(hr), "Failed to get surface desc, hr %#lx.\n", hr); + ok(ddsd.dwWidth == registry_mode.dmPelsWidth, "Expected surface width %lu, got %lu.\n", registry_mode.dmPelsWidth, ddsd.dwWidth); - ok(ddsd.dwHeight == registry_mode.dmPelsHeight, "Expected surface height %u, got %u.\n", + ok(ddsd.dwHeight == registry_mode.dmPelsHeight, "Expected surface height %lu, got %lu.\n", registry_mode.dmPelsHeight, ddsd.dwHeight); IDirectDrawSurface_Release(primary);
@@ -3413,12 +3413,12 @@ static void test_coop_level_mode_set(void) ddsd.ddsCaps.dwCaps = DDSCAPS_PRIMARYSURFACE;
hr = IDirectDraw_CreateSurface(ddraw, &ddsd, &primary, NULL); - ok(SUCCEEDED(hr), "Failed to create surface, hr %#x.\n",hr); + ok(SUCCEEDED(hr), "Failed to create surface, hr %#lx.\n",hr); hr = IDirectDrawSurface_GetSurfaceDesc(primary, &ddsd); - ok(SUCCEEDED(hr), "Failed to get surface desc, hr %#x.\n", hr); - ok(ddsd.dwWidth == registry_mode.dmPelsWidth, "Expected surface width %u, got %u.\n", + ok(SUCCEEDED(hr), "Failed to get surface desc, hr %#lx.\n", hr); + ok(ddsd.dwWidth == registry_mode.dmPelsWidth, "Expected surface width %lu, got %lu.\n", registry_mode.dmPelsWidth, ddsd.dwWidth); - ok(ddsd.dwHeight == registry_mode.dmPelsHeight, "Expected surface height %u, got %u.\n", + ok(ddsd.dwHeight == registry_mode.dmPelsHeight, "Expected surface height %lu, got %lu.\n", registry_mode.dmPelsHeight, ddsd.dwHeight);
GetWindowRect(window, &r); @@ -3431,18 +3431,18 @@ static void test_coop_level_mode_set(void) screen_size.cy = 0;
hr = IDirectDrawSurface_IsLost(primary); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); devmode.dmFields = DM_PELSWIDTH | DM_PELSHEIGHT; devmode.dmPelsWidth = param.user32_width; devmode.dmPelsHeight = param.user32_height; change_ret = ChangeDisplaySettingsW(&devmode, CDS_FULLSCREEN); - ok(change_ret == DISP_CHANGE_SUCCESSFUL, "Failed to change display mode, ret %#x.\n", change_ret); + ok(change_ret == DISP_CHANGE_SUCCESSFUL, "Failed to change display mode, ret %#lx.\n", change_ret); hr = IDirectDrawSurface_IsLost(primary); - todo_wine ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#x.\n", hr); + todo_wine ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#lx.\n", hr);
ok(!expect_messages->message, "Expected message %#x, but didn't receive it.\n", expect_messages->message); expect_messages = NULL; - ok(!screen_size.cx && !screen_size.cy, "Got unexpected screen size %ux%u.\n", screen_size.cx, screen_size.cy); + ok(!screen_size.cx && !screen_size.cy, "Got unexpected screen size %lux%lu.\n", screen_size.cx, screen_size.cy);
GetWindowRect(window, &r); ok(EqualRect(&r, ®istry_rect), "Expected %s, got %s.\n", wine_dbgstr_rect(®istry_rect), @@ -3454,27 +3454,27 @@ static void test_coop_level_mode_set(void) screen_size.cy = 0;
hr = IDirectDrawSurface_Restore(primary); - ok(hr == DDERR_WRONGMODE, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_WRONGMODE, "Got unexpected hr %#lx.\n", hr); hr = set_display_mode(ddraw, param.ddraw_width, param.ddraw_height); - ok(SUCCEEDED(hr), "Failed to set display mode, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set display mode, hr %#lx.\n", hr); hr = IDirectDrawSurface_Restore(primary); - ok(hr == DDERR_WRONGMODE, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_WRONGMODE, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface_IsLost(primary); - ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#lx.\n", hr);
ok(!expect_messages->message, "Expected message %#x, but didn't receive it.\n", expect_messages->message); expect_messages = NULL; - ok(!screen_size.cx && !screen_size.cy, "Got unexpected screen size %ux%u.\n", screen_size.cx, screen_size.cy); + ok(!screen_size.cx && !screen_size.cy, "Got unexpected screen size %lux%lu.\n", screen_size.cx, screen_size.cy);
GetWindowRect(window, &r); ok(EqualRect(&r, ®istry_rect), "Expected %s, got %s.\n", wine_dbgstr_rect(®istry_rect), wine_dbgstr_rect(&r));
hr = IDirectDrawSurface_GetSurfaceDesc(primary, &ddsd); - ok(SUCCEEDED(hr), "Failed to get surface desc, hr %#x.\n", hr); - ok(ddsd.dwWidth == registry_mode.dmPelsWidth, "Expected surface width %u, got %u.\n", + ok(SUCCEEDED(hr), "Failed to get surface desc, hr %#lx.\n", hr); + ok(ddsd.dwWidth == registry_mode.dmPelsWidth, "Expected surface width %lu, got %lu.\n", registry_mode.dmPelsWidth, ddsd.dwWidth); - ok(ddsd.dwHeight == registry_mode.dmPelsHeight, "Expected surface height %u, got %u.\n", + ok(ddsd.dwHeight == registry_mode.dmPelsHeight, "Expected surface height %lu, got %lu.\n", registry_mode.dmPelsHeight, ddsd.dwHeight); IDirectDrawSurface_Release(primary);
@@ -3484,12 +3484,12 @@ static void test_coop_level_mode_set(void) ddsd.ddsCaps.dwCaps = DDSCAPS_PRIMARYSURFACE;
hr = IDirectDraw_CreateSurface(ddraw, &ddsd, &primary, NULL); - ok(SUCCEEDED(hr), "Failed to create surface, hr %#x.\n",hr); + ok(SUCCEEDED(hr), "Failed to create surface, hr %#lx.\n",hr); hr = IDirectDrawSurface_GetSurfaceDesc(primary, &ddsd); - ok(SUCCEEDED(hr), "Failed to get surface desc, hr %#x.\n", hr); - ok(ddsd.dwWidth == param.ddraw_width, "Expected surface width %u, got %u.\n", + ok(SUCCEEDED(hr), "Failed to get surface desc, hr %#lx.\n", hr); + ok(ddsd.dwWidth == param.ddraw_width, "Expected surface width %lu, got %lu.\n", param.ddraw_width, ddsd.dwWidth); - ok(ddsd.dwHeight == param.ddraw_height, "Expected surface height %u, got %u.\n", + ok(ddsd.dwHeight == param.ddraw_height, "Expected surface height %lu, got %lu.\n", param.ddraw_height, ddsd.dwHeight);
GetWindowRect(window, &r); @@ -3502,25 +3502,25 @@ static void test_coop_level_mode_set(void) screen_size.cy = 0;
hr = IDirectDrawSurface_IsLost(primary); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirectDraw_RestoreDisplayMode(ddraw); - ok(SUCCEEDED(hr), "RestoreDisplayMode failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "RestoreDisplayMode failed, hr %#lx.\n", hr); hr = IDirectDrawSurface_IsLost(primary); - ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#lx.\n", hr);
ok(!expect_messages->message, "Expected message %#x, but didn't receive it.\n", expect_messages->message); expect_messages = NULL; - ok(!screen_size.cx && !screen_size.cy, "Got unexpected screen size %ux%u.\n", screen_size.cx, screen_size.cy); + ok(!screen_size.cx && !screen_size.cy, "Got unexpected screen size %lux%lu.\n", screen_size.cx, screen_size.cy);
GetWindowRect(window, &r); ok(EqualRect(&r, ®istry_rect), "Expected %s, got %s.\n", wine_dbgstr_rect(®istry_rect), wine_dbgstr_rect(&r));
hr = IDirectDrawSurface_GetSurfaceDesc(primary, &ddsd); - ok(SUCCEEDED(hr), "Failed to get surface desc, hr %#x.\n", hr); - ok(ddsd.dwWidth == param.ddraw_width, "Expected surface width %u, got %u.\n", + ok(SUCCEEDED(hr), "Failed to get surface desc, hr %#lx.\n", hr); + ok(ddsd.dwWidth == param.ddraw_width, "Expected surface width %lu, got %lu.\n", param.ddraw_width, ddsd.dwWidth); - ok(ddsd.dwHeight == param.ddraw_height, "Expected surface height %u, got %u.\n", + ok(ddsd.dwHeight == param.ddraw_height, "Expected surface height %lu, got %lu.\n", param.ddraw_height, ddsd.dwHeight); IDirectDrawSurface_Release(primary);
@@ -3528,11 +3528,11 @@ static void test_coop_level_mode_set(void) ok(ret, "Failed to get display mode.\n"); ok(devmode.dmPelsWidth == registry_mode.dmPelsWidth && devmode.dmPelsHeight == registry_mode.dmPelsHeight, - "Expected resolution %ux%u, got %ux%u.\n", + "Expected resolution %lux%lu, got %lux%lu.\n", registry_mode.dmPelsWidth, registry_mode.dmPelsHeight, devmode.dmPelsWidth, devmode.dmPelsHeight); change_ret = ChangeDisplaySettingsW(NULL, CDS_FULLSCREEN); - ok(change_ret == DISP_CHANGE_SUCCESSFUL, "Failed to change display mode, ret %#x.\n", change_ret); + ok(change_ret == DISP_CHANGE_SUCCESSFUL, "Failed to change display mode, ret %#lx.\n", change_ret);
memset(&ddsd, 0, sizeof(ddsd)); ddsd.dwSize = sizeof(ddsd); @@ -3540,12 +3540,12 @@ static void test_coop_level_mode_set(void) ddsd.ddsCaps.dwCaps = DDSCAPS_PRIMARYSURFACE;
hr = IDirectDraw_CreateSurface(ddraw, &ddsd, &primary, NULL); - ok(SUCCEEDED(hr), "Failed to create surface, hr %#x.\n",hr); + ok(SUCCEEDED(hr), "Failed to create surface, hr %#lx.\n",hr); hr = IDirectDrawSurface_GetSurfaceDesc(primary, &ddsd); - ok(SUCCEEDED(hr), "Failed to get surface desc, hr %#x.\n", hr); - ok(ddsd.dwWidth == registry_mode.dmPelsWidth, "Expected surface width %u, got %u.\n", + ok(SUCCEEDED(hr), "Failed to get surface desc, hr %#lx.\n", hr); + ok(ddsd.dwWidth == registry_mode.dmPelsWidth, "Expected surface width %lu, got %lu.\n", registry_mode.dmPelsWidth, ddsd.dwWidth); - ok(ddsd.dwHeight == registry_mode.dmPelsHeight, "Expected surface height %u, got %u.\n", + ok(ddsd.dwHeight == registry_mode.dmPelsHeight, "Expected surface height %lu, got %lu.\n", registry_mode.dmPelsHeight, ddsd.dwHeight); IDirectDrawSurface_Release(primary);
@@ -3555,12 +3555,12 @@ static void test_coop_level_mode_set(void)
/* Unlike ddraw2-7, changing from EXCLUSIVE to NORMAL does not restore the resolution */ hr = IDirectDraw_SetCooperativeLevel(ddraw, window, DDSCL_EXCLUSIVE | DDSCL_FULLSCREEN); - ok(SUCCEEDED(hr), "SetCooperativeLevel failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "SetCooperativeLevel failed, hr %#lx.\n", hr); hr = set_display_mode(ddraw, param.ddraw_width, param.ddraw_height); - ok(SUCCEEDED(hr), "Failed to set display mode, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set display mode, hr %#lx.\n", hr);
hr = IDirectDraw_SetCooperativeLevel(ddraw, window, DDSCL_NORMAL); - ok(SUCCEEDED(hr), "SetCooperativeLevel failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "SetCooperativeLevel failed, hr %#lx.\n", hr);
memset(&ddsd, 0, sizeof(ddsd)); ddsd.dwSize = sizeof(ddsd); @@ -3568,19 +3568,19 @@ static void test_coop_level_mode_set(void) ddsd.ddsCaps.dwCaps = DDSCAPS_PRIMARYSURFACE;
hr = IDirectDraw_CreateSurface(ddraw, &ddsd, &primary, NULL); - ok(SUCCEEDED(hr), "Failed to create surface, hr %#x.\n",hr); + ok(SUCCEEDED(hr), "Failed to create surface, hr %#lx.\n",hr); hr = IDirectDrawSurface_GetSurfaceDesc(primary, &ddsd); - ok(SUCCEEDED(hr), "Failed to get surface desc, hr %#x.\n", hr); - ok(ddsd.dwWidth == param.ddraw_width, "Expected surface width %u, got %u.\n", + ok(SUCCEEDED(hr), "Failed to get surface desc, hr %#lx.\n", hr); + ok(ddsd.dwWidth == param.ddraw_width, "Expected surface width %lu, got %lu.\n", param.ddraw_width, ddsd.dwWidth); - ok(ddsd.dwHeight == param.ddraw_height, "Expected surface height %u, got %u.\n", + ok(ddsd.dwHeight == param.ddraw_height, "Expected surface height %lu, got %lu.\n", param.ddraw_height, ddsd.dwHeight); IDirectDrawSurface_Release(primary); hr = IDirectDraw_RestoreDisplayMode(ddraw); - ok(SUCCEEDED(hr), "RestoreDisplayMode failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "RestoreDisplayMode failed, hr %#lx.\n", hr);
ref = IDirectDraw_Release(ddraw); - ok(ref == 0, "The ddraw object was not properly freed: refcount %u.\n", ref); + ok(ref == 0, "The ddraw object was not properly freed: refcount %lu.\n", ref);
GetWindowRect(window, &r); ok(EqualRect(&r, &ddraw_rect), "Expected %s, got %s.\n", wine_dbgstr_rect(&ddraw_rect), @@ -3594,36 +3594,36 @@ static void test_coop_level_mode_set(void) devmode.dmPelsWidth = param.user32_width; devmode.dmPelsHeight = param.user32_height; change_ret = ChangeDisplaySettingsW(&devmode, CDS_UPDATEREGISTRY | CDS_NORESET); - ok(change_ret == DISP_CHANGE_SUCCESSFUL, "ChangeDisplaySettingsW failed with %d.\n", change_ret); + ok(change_ret == DISP_CHANGE_SUCCESSFUL, "ChangeDisplaySettingsW failed with %ld.\n", change_ret);
ddraw = create_ddraw(); ok(!!ddraw, "Failed to create a ddraw object.\n"); ref = IDirectDraw_Release(ddraw); - ok(ref == 0, "The ddraw object was not properly freed: refcount %u.\n", ref); + ok(ref == 0, "The ddraw object was not properly freed: refcount %lu.\n", ref);
memset(&devmode2, 0, sizeof(devmode2)); devmode2.dmSize = sizeof(devmode2); ret = EnumDisplaySettingsW(NULL, ENUM_CURRENT_SETTINGS, &devmode2); - ok(ret, "EnumDisplaySettingsW failed, error %#x.\n", GetLastError()); + ok(ret, "EnumDisplaySettingsW failed, error %#lx.\n", GetLastError()); ok(compare_mode_rect(&devmode2, ®istry_mode), "Got a different mode.\n"); ret = restore_display_modes(original_modes, display_count); ok(ret, "Failed to restore display modes.\n");
/* Test that no mode restorations if no mode changes happened with fullscreen ddraw objects */ change_ret = ChangeDisplaySettingsW(&devmode, CDS_UPDATEREGISTRY | CDS_NORESET); - ok(change_ret == DISP_CHANGE_SUCCESSFUL, "ChangeDisplaySettingsW failed with %d.\n", change_ret); + ok(change_ret == DISP_CHANGE_SUCCESSFUL, "ChangeDisplaySettingsW failed with %ld.\n", change_ret);
ddraw = create_ddraw(); ok(!!ddraw, "Failed to create a ddraw object.\n"); hr = IDirectDraw_SetCooperativeLevel(ddraw, window, DDSCL_EXCLUSIVE | DDSCL_FULLSCREEN); - ok(hr == DD_OK, "SetCooperativeLevel failed, hr %#x.\n", hr); + ok(hr == DD_OK, "SetCooperativeLevel failed, hr %#lx.\n", hr); hr = IDirectDraw_SetCooperativeLevel(ddraw, window, DDSCL_NORMAL); - ok(hr == DD_OK, "SetCooperativeLevel failed, hr %#x.\n", hr); + ok(hr == DD_OK, "SetCooperativeLevel failed, hr %#lx.\n", hr); ref = IDirectDraw_Release(ddraw); - ok(ref == 0, "The ddraw object was not properly freed: refcount %u.\n", ref); + ok(ref == 0, "The ddraw object was not properly freed: refcount %lu.\n", ref);
ret = EnumDisplaySettingsW(NULL, ENUM_CURRENT_SETTINGS, &devmode2); - ok(ret, "EnumDisplaySettingsW failed, error %#x.\n", GetLastError()); + ok(ret, "EnumDisplaySettingsW failed, error %#lx.\n", GetLastError()); ok(compare_mode_rect(&devmode2, ®istry_mode), "Got a different mode.\n"); ret = restore_display_modes(original_modes, display_count); ok(ret, "Failed to restore display modes.\n"); @@ -3633,19 +3633,19 @@ static void test_coop_level_mode_set(void) ddraw = create_ddraw(); ok(!!ddraw, "Failed to create a ddraw object.\n"); hr = set_display_mode(ddraw, registry_mode.dmPelsWidth, registry_mode.dmPelsHeight); - ok(hr == DD_OK, "Failed to set display mode, hr %#x.\n", hr); + ok(hr == DD_OK, "Failed to set display mode, hr %#lx.\n", hr);
change_ret = ChangeDisplaySettingsW(&devmode, CDS_UPDATEREGISTRY | CDS_NORESET); - ok(change_ret == DISP_CHANGE_SUCCESSFUL, "ChangeDisplaySettingsW failed with %d.\n", change_ret); + ok(change_ret == DISP_CHANGE_SUCCESSFUL, "ChangeDisplaySettingsW failed with %ld.\n", change_ret);
ref = IDirectDraw_Release(ddraw); - ok(ref == 0, "The ddraw object was not properly freed: refcount %u.\n", ref); + ok(ref == 0, "The ddraw object was not properly freed: refcount %lu.\n", ref);
ret = EnumDisplaySettingsW(NULL, ENUM_CURRENT_SETTINGS, &devmode2); - ok(ret, "EnumDisplaySettingsW failed, error %#x.\n", GetLastError()); + ok(ret, "EnumDisplaySettingsW failed, error %#lx.\n", GetLastError()); ok(compare_mode_rect(&devmode2, &devmode), "Got a different mode.\n"); ret = EnumDisplaySettingsW(NULL, ENUM_REGISTRY_SETTINGS, &devmode2); - ok(ret, "EnumDisplaySettingsW failed, error %#x.\n", GetLastError()); + ok(ret, "EnumDisplaySettingsW failed, error %#lx.\n", GetLastError()); ok(compare_mode_rect(&devmode2, &devmode), "Got a different mode.\n"); ret = restore_display_modes(original_modes, display_count); ok(ret, "Failed to restore display modes.\n"); @@ -3654,23 +3654,23 @@ static void test_coop_level_mode_set(void) ddraw = create_ddraw(); ok(!!ddraw, "Failed to create a ddraw object.\n"); hr = set_display_mode(ddraw, param.ddraw_width, param.ddraw_height); - ok(hr == DD_OK, "Failed to set display mode, hr %#x.\n", hr); + ok(hr == DD_OK, "Failed to set display mode, hr %#lx.\n", hr);
change_ret = ChangeDisplaySettingsW(&devmode, CDS_UPDATEREGISTRY | CDS_NORESET); - ok(change_ret == DISP_CHANGE_SUCCESSFUL, "ChangeDisplaySettingsW failed with %d.\n", change_ret); + ok(change_ret == DISP_CHANGE_SUCCESSFUL, "ChangeDisplaySettingsW failed with %ld.\n", change_ret);
hr = IDirectDraw_RestoreDisplayMode(ddraw); - ok(hr == DD_OK, "RestoreDisplayMode failed, hr %#x.\n", hr); + ok(hr == DD_OK, "RestoreDisplayMode failed, hr %#lx.\n", hr);
ret = EnumDisplaySettingsW(NULL, ENUM_CURRENT_SETTINGS, &devmode2); - ok(ret, "EnumDisplaySettingsW failed, error %#x.\n", GetLastError()); + ok(ret, "EnumDisplaySettingsW failed, error %#lx.\n", GetLastError()); ok(compare_mode_rect(&devmode2, &devmode), "Got a different mode.\n"); ret = EnumDisplaySettingsW(NULL, ENUM_REGISTRY_SETTINGS, &devmode2); - ok(ret, "EnumDisplaySettingsW failed, error %#x.\n", GetLastError()); + ok(ret, "EnumDisplaySettingsW failed, error %#lx.\n", GetLastError()); ok(compare_mode_rect(&devmode2, &devmode), "Got a different mode.\n");
ref = IDirectDraw_Release(ddraw); - ok(ref == 0, "The ddraw object was not properly freed: refcount %u.\n", ref); + ok(ref == 0, "The ddraw object was not properly freed: refcount %lu.\n", ref);
done: expect_messages = NULL; @@ -3697,10 +3697,10 @@ static void test_coop_level_mode_set_multi(void) memset(&devmode, 0, sizeof(devmode)); devmode.dmSize = sizeof(devmode); ret = EnumDisplaySettingsW(NULL, ENUM_CURRENT_SETTINGS, &devmode); - ok(ret, "EnumDisplaySettingsW failed, error %#x.\n", GetLastError()); + ok(ret, "EnumDisplaySettingsW failed, error %#lx.\n", GetLastError()); ok(compare_mode_rect(&devmode, ®istry_mode), "Got a different mode.\n"); ret = EnumDisplaySettingsW(NULL, ENUM_REGISTRY_SETTINGS, &devmode); - ok(ret, "EnumDisplaySettingsW failed, error %#x.\n", GetLastError()); + ok(ret, "EnumDisplaySettingsW failed, error %#lx.\n", GetLastError()); ok(compare_mode_rect(&devmode, ®istry_mode), "Got a different mode.\n");
ret = save_display_modes(&original_modes, &display_count); @@ -3721,14 +3721,14 @@ static void test_coop_level_mode_set_multi(void) DestroyWindow(window); return; } - ok(SUCCEEDED(hr), "Failed to set display mode, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set display mode, hr %#lx.\n", hr); w = GetSystemMetrics(SM_CXSCREEN); ok(w == 800, "Got unexpected screen width %u.\n", w); h = GetSystemMetrics(SM_CYSCREEN); ok(h == 600, "Got unexpected screen height %u.\n", h);
ref = IDirectDraw_Release(ddraw1); - ok(ref == 0, "The ddraw object was not properly freed: refcount %u.\n", ref); + ok(ref == 0, "The ddraw object was not properly freed: refcount %lu.\n", ref); w = GetSystemMetrics(SM_CXSCREEN); ok(w == registry_mode.dmPelsWidth, "Got unexpected screen width %u.\n", w); h = GetSystemMetrics(SM_CYSCREEN); @@ -3738,7 +3738,7 @@ static void test_coop_level_mode_set_multi(void) * the initial mode, before the first SetDisplayMode() call. */ ddraw1 = create_ddraw(); hr = set_display_mode(ddraw1, 800, 600); - ok(SUCCEEDED(hr), "Failed to set display mode, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set display mode, hr %#lx.\n", hr); w = GetSystemMetrics(SM_CXSCREEN); ok(w == 800, "Got unexpected screen width %u.\n", w); h = GetSystemMetrics(SM_CYSCREEN); @@ -3746,21 +3746,21 @@ static void test_coop_level_mode_set_multi(void)
ddraw2 = create_ddraw(); hr = set_display_mode(ddraw2, 640, 480); - ok(SUCCEEDED(hr), "Failed to set display mode, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set display mode, hr %#lx.\n", hr); w = GetSystemMetrics(SM_CXSCREEN); ok(w == 640, "Got unexpected screen width %u.\n", w); h = GetSystemMetrics(SM_CYSCREEN); ok(h == 480, "Got unexpected screen height %u.\n", h);
ref = IDirectDraw_Release(ddraw2); - ok(ref == 0, "The ddraw object was not properly freed: refcount %u.\n", ref); + ok(ref == 0, "The ddraw object was not properly freed: refcount %lu.\n", ref); w = GetSystemMetrics(SM_CXSCREEN); ok(w == registry_mode.dmPelsWidth, "Got unexpected screen width %u.\n", w); h = GetSystemMetrics(SM_CYSCREEN); ok(h == registry_mode.dmPelsHeight, "Got unexpected screen height %u.\n", h);
ref = IDirectDraw_Release(ddraw1); - ok(ref == 0, "The ddraw object was not properly freed: refcount %u.\n", ref); + ok(ref == 0, "The ddraw object was not properly freed: refcount %lu.\n", ref); w = GetSystemMetrics(SM_CXSCREEN); ok(w == registry_mode.dmPelsWidth, "Got unexpected screen width %u.\n", w); h = GetSystemMetrics(SM_CYSCREEN); @@ -3769,7 +3769,7 @@ static void test_coop_level_mode_set_multi(void) /* Regardless of release ordering. */ ddraw1 = create_ddraw(); hr = set_display_mode(ddraw1, 800, 600); - ok(SUCCEEDED(hr), "Failed to set display mode, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set display mode, hr %#lx.\n", hr); w = GetSystemMetrics(SM_CXSCREEN); ok(w == 800, "Got unexpected screen width %u.\n", w); h = GetSystemMetrics(SM_CYSCREEN); @@ -3777,21 +3777,21 @@ static void test_coop_level_mode_set_multi(void)
ddraw2 = create_ddraw(); hr = set_display_mode(ddraw2, 640, 480); - ok(SUCCEEDED(hr), "Failed to set display mode, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set display mode, hr %#lx.\n", hr); w = GetSystemMetrics(SM_CXSCREEN); ok(w == 640, "Got unexpected screen width %u.\n", w); h = GetSystemMetrics(SM_CYSCREEN); ok(h == 480, "Got unexpected screen height %u.\n", h);
ref = IDirectDraw_Release(ddraw1); - ok(ref == 0, "The ddraw object was not properly freed: refcount %u.\n", ref); + ok(ref == 0, "The ddraw object was not properly freed: refcount %lu.\n", ref); w = GetSystemMetrics(SM_CXSCREEN); ok(w == registry_mode.dmPelsWidth, "Got unexpected screen width %u.\n", w); h = GetSystemMetrics(SM_CYSCREEN); ok(h == registry_mode.dmPelsHeight, "Got unexpected screen height %u.\n", h);
ref = IDirectDraw_Release(ddraw2); - ok(ref == 0, "The ddraw object was not properly freed: refcount %u.\n", ref); + ok(ref == 0, "The ddraw object was not properly freed: refcount %lu.\n", ref); w = GetSystemMetrics(SM_CXSCREEN); ok(w == registry_mode.dmPelsWidth, "Got unexpected screen width %u.\n", w); h = GetSystemMetrics(SM_CYSCREEN); @@ -3801,21 +3801,21 @@ static void test_coop_level_mode_set_multi(void) ddraw1 = create_ddraw(); ddraw2 = create_ddraw(); hr = set_display_mode(ddraw2, 640, 480); - ok(SUCCEEDED(hr), "Failed to set display mode, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set display mode, hr %#lx.\n", hr); w = GetSystemMetrics(SM_CXSCREEN); ok(w == 640, "Got unexpected screen width %u.\n", w); h = GetSystemMetrics(SM_CYSCREEN); ok(h == 480, "Got unexpected screen height %u.\n", h);
ref = IDirectDraw_Release(ddraw1); - ok(ref == 0, "The ddraw object was not properly freed: refcount %u.\n", ref); + ok(ref == 0, "The ddraw object was not properly freed: refcount %lu.\n", ref); w = GetSystemMetrics(SM_CXSCREEN); ok(w == 640, "Got unexpected screen width %u.\n", w); h = GetSystemMetrics(SM_CYSCREEN); ok(h == 480, "Got unexpected screen height %u.\n", h);
ref = IDirectDraw_Release(ddraw2); - ok(ref == 0, "The ddraw object was not properly freed: refcount %u.\n", ref); + ok(ref == 0, "The ddraw object was not properly freed: refcount %lu.\n", ref); w = GetSystemMetrics(SM_CXSCREEN); ok(w == registry_mode.dmPelsWidth, "Got unexpected screen width %u.\n", w); h = GetSystemMetrics(SM_CYSCREEN); @@ -3825,7 +3825,7 @@ static void test_coop_level_mode_set_multi(void) * restoring the display mode. */ ddraw1 = create_ddraw(); hr = set_display_mode(ddraw1, 800, 600); - ok(SUCCEEDED(hr), "Failed to set display mode, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set display mode, hr %#lx.\n", hr); w = GetSystemMetrics(SM_CXSCREEN); ok(w == 800, "Got unexpected screen width %u.\n", w); h = GetSystemMetrics(SM_CYSCREEN); @@ -3833,24 +3833,24 @@ static void test_coop_level_mode_set_multi(void)
ddraw2 = create_ddraw(); hr = set_display_mode(ddraw2, 640, 480); - ok(SUCCEEDED(hr), "Failed to set display mode, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set display mode, hr %#lx.\n", hr); w = GetSystemMetrics(SM_CXSCREEN); ok(w == 640, "Got unexpected screen width %u.\n", w); h = GetSystemMetrics(SM_CYSCREEN); ok(h == 480, "Got unexpected screen height %u.\n", h);
hr = IDirectDraw_SetCooperativeLevel(ddraw2, window, DDSCL_EXCLUSIVE | DDSCL_FULLSCREEN); - ok(SUCCEEDED(hr), "SetCooperativeLevel failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "SetCooperativeLevel failed, hr %#lx.\n", hr);
ref = IDirectDraw_Release(ddraw1); - ok(ref == 0, "The ddraw object was not properly freed: refcount %u.\n", ref); + ok(ref == 0, "The ddraw object was not properly freed: refcount %lu.\n", ref); w = GetSystemMetrics(SM_CXSCREEN); ok(w == 640, "Got unexpected screen width %u.\n", w); h = GetSystemMetrics(SM_CYSCREEN); ok(h == 480, "Got unexpected screen height %u.\n", h);
ref = IDirectDraw_Release(ddraw2); - ok(ref == 0, "The ddraw object was not properly freed: refcount %u.\n", ref); + ok(ref == 0, "The ddraw object was not properly freed: refcount %lu.\n", ref); w = GetSystemMetrics(SM_CXSCREEN); ok(w == registry_mode.dmPelsWidth, "Got unexpected screen width %u.\n", w); h = GetSystemMetrics(SM_CYSCREEN); @@ -3859,28 +3859,28 @@ static void test_coop_level_mode_set_multi(void) /* Exclusive mode blocks mode setting on other ddraw objects in general. */ ddraw1 = create_ddraw(); hr = set_display_mode(ddraw1, 800, 600); - ok(SUCCEEDED(hr), "Failed to set display mode, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set display mode, hr %#lx.\n", hr); w = GetSystemMetrics(SM_CXSCREEN); ok(w == 800, "Got unexpected screen width %u.\n", w); h = GetSystemMetrics(SM_CYSCREEN); ok(h == 600, "Got unexpected screen height %u.\n", h);
hr = IDirectDraw_SetCooperativeLevel(ddraw1, window, DDSCL_EXCLUSIVE | DDSCL_FULLSCREEN); - ok(SUCCEEDED(hr), "SetCooperativeLevel failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "SetCooperativeLevel failed, hr %#lx.\n", hr);
ddraw2 = create_ddraw(); hr = set_display_mode(ddraw2, 640, 480); - ok(hr == DDERR_NOEXCLUSIVEMODE, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_NOEXCLUSIVEMODE, "Got unexpected hr %#lx.\n", hr);
ref = IDirectDraw_Release(ddraw1); - ok(ref == 0, "The ddraw object was not properly freed: refcount %u.\n", ref); + ok(ref == 0, "The ddraw object was not properly freed: refcount %lu.\n", ref); w = GetSystemMetrics(SM_CXSCREEN); ok(w == registry_mode.dmPelsWidth, "Got unexpected screen width %u.\n", w); h = GetSystemMetrics(SM_CYSCREEN); ok(h == registry_mode.dmPelsHeight, "Got unexpected screen height %u.\n", h);
ref = IDirectDraw_Release(ddraw2); - ok(ref == 0, "The ddraw object was not properly freed: refcount %u.\n", ref); + ok(ref == 0, "The ddraw object was not properly freed: refcount %lu.\n", ref); w = GetSystemMetrics(SM_CXSCREEN); ok(w == registry_mode.dmPelsWidth, "Got unexpected screen width %u.\n", w); h = GetSystemMetrics(SM_CYSCREEN); @@ -3908,7 +3908,7 @@ static void test_coop_level_mode_set_multi(void) memset(&old_devmode, 0, sizeof(old_devmode)); old_devmode.dmSize = sizeof(old_devmode); ret = EnumDisplaySettingsW(second_monitor_name, ENUM_CURRENT_SETTINGS, &old_devmode); - ok(ret, "EnumDisplaySettingsW failed, error %#x.\n", GetLastError()); + ok(ret, "EnumDisplaySettingsW failed, error %#lx.\n", GetLastError());
devmode = old_devmode; while (EnumDisplaySettingsW(second_monitor_name, mode_idx++, &devmode)) @@ -3925,32 +3925,32 @@ static void test_coop_level_mode_set_multi(void) ddraw1 = create_ddraw(); ok(!!ddraw1, "Failed to create a ddraw object.\n"); hr = IDirectDraw_SetCooperativeLevel(ddraw1, window, DDSCL_EXCLUSIVE | DDSCL_FULLSCREEN); - ok(hr == DD_OK, "SetCooperativeLevel failed, hr %#x.\n", hr); + ok(hr == DD_OK, "SetCooperativeLevel failed, hr %#lx.\n", hr);
change_ret = ChangeDisplaySettingsExW(second_monitor_name, &devmode, NULL, CDS_RESET, NULL); - ok(change_ret == DISP_CHANGE_SUCCESSFUL, "ChangeDisplaySettingsExW failed with %d.\n", change_ret); + ok(change_ret == DISP_CHANGE_SUCCESSFUL, "ChangeDisplaySettingsExW failed with %ld.\n", change_ret);
memset(&devmode2, 0, sizeof(devmode2)); devmode2.dmSize = sizeof(devmode2); ret = EnumDisplaySettingsW(second_monitor_name, ENUM_CURRENT_SETTINGS, &devmode2); - ok(ret, "EnumDisplaySettingsW failed, error %#x.\n", GetLastError()); + ok(ret, "EnumDisplaySettingsW failed, error %#lx.\n", GetLastError()); if (compare_mode_rect(&devmode2, &old_devmode)) { skip("Failed to change display settings of the second monitor.\n"); ref = IDirectDraw_Release(ddraw1); - ok(ref == 0, "The ddraw object was not properly freed: refcount %u.\n", ref); + ok(ref == 0, "The ddraw object was not properly freed: refcount %lu.\n", ref); goto done; }
hr = IDirectDraw_SetCooperativeLevel(ddraw1, window, DDSCL_NORMAL); - ok(hr == DD_OK, "SetCooperativeLevel failed, hr %#x.\n", hr); + ok(hr == DD_OK, "SetCooperativeLevel failed, hr %#lx.\n", hr); ref = IDirectDraw_Release(ddraw1); - ok(ref == 0, "The ddraw object was not properly freed: refcount %u.\n", ref); + ok(ref == 0, "The ddraw object was not properly freed: refcount %lu.\n", ref);
memset(&devmode3, 0, sizeof(devmode3)); devmode3.dmSize = sizeof(devmode3); ret = EnumDisplaySettingsW(second_monitor_name, ENUM_CURRENT_SETTINGS, &devmode3); - ok(ret, "EnumDisplaySettingsW failed, error %#x.\n", GetLastError()); + ok(ret, "EnumDisplaySettingsW failed, error %#lx.\n", GetLastError()); ok(compare_mode_rect(&devmode3, &devmode2), "Got a different mode.\n"); ret = restore_display_modes(original_modes, display_count); ok(ret, "Failed to restore display modes.\n"); @@ -3960,19 +3960,19 @@ static void test_coop_level_mode_set_multi(void) ddraw1 = create_ddraw(); ok(!!ddraw1, "Failed to create a ddraw object.\n"); hr = set_display_mode(ddraw1, 800, 600); - ok(hr == DD_OK, "Failed to set display mode, hr %#x.\n", hr); + ok(hr == DD_OK, "Failed to set display mode, hr %#lx.\n", hr);
change_ret = ChangeDisplaySettingsExW(second_monitor_name, &devmode, NULL, CDS_RESET, NULL); - ok(change_ret == DISP_CHANGE_SUCCESSFUL, "ChangeDisplaySettingsExW failed with %d.\n", change_ret); + ok(change_ret == DISP_CHANGE_SUCCESSFUL, "ChangeDisplaySettingsExW failed with %ld.\n", change_ret);
ref = IDirectDraw_Release(ddraw1); - ok(ref == 0, "The ddraw object was not properly freed: refcount %u.\n", ref); + ok(ref == 0, "The ddraw object was not properly freed: refcount %lu.\n", ref);
ret = EnumDisplaySettingsW(second_monitor_name, ENUM_CURRENT_SETTINGS, &devmode2); - ok(ret, "EnumDisplaySettingsW failed, error %#x.\n", GetLastError()); + ok(ret, "EnumDisplaySettingsW failed, error %#lx.\n", GetLastError()); ok(compare_mode_rect(&devmode2, &old_devmode), "Got a different mode.\n"); ret = EnumDisplaySettingsW(second_monitor_name, ENUM_REGISTRY_SETTINGS, &devmode2); - ok(ret, "EnumDisplaySettingsW failed, error %#x.\n", GetLastError()); + ok(ret, "EnumDisplaySettingsW failed, error %#lx.\n", GetLastError()); ok(compare_mode_rect(&devmode2, &old_devmode), "Got a different mode.\n"); ret = restore_display_modes(original_modes, display_count); ok(ret, "Failed to restore display modes.\n"); @@ -3981,23 +3981,23 @@ static void test_coop_level_mode_set_multi(void) ddraw1 = create_ddraw(); ok(!!ddraw1, "Failed to create a ddraw object.\n"); hr = set_display_mode(ddraw1, 800, 600); - ok(hr == DD_OK, "Failed to set display mode, hr %#x.\n", hr); + ok(hr == DD_OK, "Failed to set display mode, hr %#lx.\n", hr);
change_ret = ChangeDisplaySettingsExW(second_monitor_name, &devmode, NULL, CDS_RESET, NULL); - ok(change_ret == DISP_CHANGE_SUCCESSFUL, "ChangeDisplaySettingsExW failed with %d.\n", change_ret); + ok(change_ret == DISP_CHANGE_SUCCESSFUL, "ChangeDisplaySettingsExW failed with %ld.\n", change_ret);
hr = IDirectDraw_RestoreDisplayMode(ddraw1); - ok(hr == DD_OK, "RestoreDisplayMode failed, hr %#x.\n", hr); + ok(hr == DD_OK, "RestoreDisplayMode failed, hr %#lx.\n", hr);
ret = EnumDisplaySettingsW(second_monitor_name, ENUM_CURRENT_SETTINGS, &devmode2); - ok(ret, "EnumDisplaySettingsW failed, error %#x.\n", GetLastError()); + ok(ret, "EnumDisplaySettingsW failed, error %#lx.\n", GetLastError()); ok(compare_mode_rect(&devmode2, &old_devmode), "Got a different mode.\n"); ret = EnumDisplaySettingsW(second_monitor_name, ENUM_REGISTRY_SETTINGS, &devmode2); - ok(ret, "EnumDisplaySettingsW failed, error %#x.\n", GetLastError()); + ok(ret, "EnumDisplaySettingsW failed, error %#lx.\n", GetLastError()); ok(compare_mode_rect(&devmode2, &old_devmode), "Got a different mode.\n");
ref = IDirectDraw_Release(ddraw1); - ok(ref == 0, "The ddraw object was not properly freed: refcount %u.\n", ref); + ok(ref == 0, "The ddraw object was not properly freed: refcount %lu.\n", ref); ret = restore_display_modes(original_modes, display_count); ok(ret, "Failed to restore display modes.\n");
@@ -4005,24 +4005,24 @@ static void test_coop_level_mode_set_multi(void) ddraw1 = create_ddraw(); ok(!!ddraw1, "Failed to create a ddraw object.\n"); hr = set_display_mode(ddraw1, 800, 600); - ok(hr == DD_OK, "Failed to set display mode, hr %#x.\n", hr); + ok(hr == DD_OK, "Failed to set display mode, hr %#lx.\n", hr);
change_ret = ChangeDisplaySettingsExW(second_monitor_name, &devmode, NULL, CDS_UPDATEREGISTRY | CDS_NORESET, NULL); - ok(change_ret == DISP_CHANGE_SUCCESSFUL, "ChangeDisplaySettingsExW failed with %d.\n", change_ret); + ok(change_ret == DISP_CHANGE_SUCCESSFUL, "ChangeDisplaySettingsExW failed with %ld.\n", change_ret);
ref = IDirectDraw_Release(ddraw1); - ok(ref == 0, "The ddraw object was not properly freed: refcount %u.\n", ref); + ok(ref == 0, "The ddraw object was not properly freed: refcount %lu.\n", ref);
ret = EnumDisplaySettingsW(second_monitor_name, ENUM_CURRENT_SETTINGS, &devmode2); - ok(ret, "EnumDisplaySettingsW failed, error %#x.\n", GetLastError()); + ok(ret, "EnumDisplaySettingsW failed, error %#lx.\n", GetLastError()); ok(devmode2.dmPelsWidth == devmode.dmPelsWidth && devmode2.dmPelsHeight == devmode.dmPelsHeight, - "Expected resolution %ux%u, got %ux%u.\n", devmode.dmPelsWidth, devmode.dmPelsHeight, + "Expected resolution %lux%lu, got %lux%lu.\n", devmode.dmPelsWidth, devmode.dmPelsHeight, devmode2.dmPelsWidth, devmode2.dmPelsHeight); ret = EnumDisplaySettingsW(second_monitor_name, ENUM_REGISTRY_SETTINGS, &devmode2); - ok(ret, "EnumDisplaySettingsW failed, error %#x.\n", GetLastError()); + ok(ret, "EnumDisplaySettingsW failed, error %#lx.\n", GetLastError()); ok(devmode2.dmPelsWidth == devmode.dmPelsWidth && devmode2.dmPelsHeight == devmode.dmPelsHeight, - "Expected resolution %ux%u, got %ux%u.\n", devmode.dmPelsWidth, devmode.dmPelsHeight, + "Expected resolution %lux%lu, got %lux%lu.\n", devmode.dmPelsWidth, devmode.dmPelsHeight, devmode2.dmPelsWidth, devmode2.dmPelsHeight); ret = restore_display_modes(original_modes, display_count); ok(ret, "Failed to restore display modes.\n"); @@ -4034,27 +4034,27 @@ static void test_coop_level_mode_set_multi(void) ddraw2 = create_ddraw(); ok(!!ddraw2, "Failed to create a ddraw object.\n"); hr = set_display_mode(ddraw1, 800, 600); - ok(hr == DD_OK, "Failed to set display mode, hr %#x.\n", hr); + ok(hr == DD_OK, "Failed to set display mode, hr %#lx.\n", hr); hr = set_display_mode(ddraw2, 640, 480); - ok(hr == DD_OK, "Failed to set display mode, hr %#x.\n", hr); + ok(hr == DD_OK, "Failed to set display mode, hr %#lx.\n", hr);
change_ret = ChangeDisplaySettingsExW(second_monitor_name, &devmode, NULL, CDS_RESET, NULL); - ok(change_ret == DISP_CHANGE_SUCCESSFUL, "ChangeDisplaySettingsExW failed with %d.\n", change_ret); + ok(change_ret == DISP_CHANGE_SUCCESSFUL, "ChangeDisplaySettingsExW failed with %ld.\n", change_ret);
hr = IDirectDraw_RestoreDisplayMode(ddraw2); - ok(hr == DD_OK, "RestoreDisplayMode failed, hr %#x.\n", hr); + ok(hr == DD_OK, "RestoreDisplayMode failed, hr %#lx.\n", hr);
ret = EnumDisplaySettingsW(second_monitor_name, ENUM_CURRENT_SETTINGS, &devmode2); - ok(ret, "EnumDisplaySettingsW failed, error %#x.\n", GetLastError()); + ok(ret, "EnumDisplaySettingsW failed, error %#lx.\n", GetLastError()); ok(compare_mode_rect(&devmode2, &old_devmode), "Got a different mode.\n"); ret = EnumDisplaySettingsW(second_monitor_name, ENUM_REGISTRY_SETTINGS, &devmode2); - ok(ret, "EnumDisplaySettingsW failed, error %#x.\n", GetLastError()); + ok(ret, "EnumDisplaySettingsW failed, error %#lx.\n", GetLastError()); ok(compare_mode_rect(&devmode2, &old_devmode), "Got a different mode.\n");
ref = IDirectDraw_Release(ddraw2); - ok(ref == 0, "The ddraw object was not properly freed: refcount %u.\n", ref); + ok(ref == 0, "The ddraw object was not properly freed: refcount %lu.\n", ref); ref = IDirectDraw_Release(ddraw1); - ok(ref == 0, "The ddraw object was not properly freed: refcount %u.\n", ref); + ok(ref == 0, "The ddraw object was not properly freed: refcount %lu.\n", ref); ret = restore_display_modes(original_modes, display_count); ok(ret, "Failed to restore display modes.\n");
@@ -4065,25 +4065,25 @@ static void test_coop_level_mode_set_multi(void) ddraw2 = create_ddraw(); ok(!!ddraw2, "Failed to create a ddraw object.\n"); hr = set_display_mode(ddraw1, 800, 600); - ok(hr == DD_OK, "Failed to set display mode, hr %#x.\n", hr); + ok(hr == DD_OK, "Failed to set display mode, hr %#lx.\n", hr); hr = set_display_mode(ddraw2, 640, 480); - ok(hr == DD_OK, "Failed to set display mode, hr %#x.\n", hr); + ok(hr == DD_OK, "Failed to set display mode, hr %#lx.\n", hr);
change_ret = ChangeDisplaySettingsExW(second_monitor_name, &devmode, NULL, CDS_RESET, NULL); - ok(change_ret == DISP_CHANGE_SUCCESSFUL, "ChangeDisplaySettingsExW failed with %d.\n", change_ret); + ok(change_ret == DISP_CHANGE_SUCCESSFUL, "ChangeDisplaySettingsExW failed with %ld.\n", change_ret);
ref = IDirectDraw_Release(ddraw2); - ok(ref == 0, "The ddraw object was not properly freed: refcount %u.\n", ref); + ok(ref == 0, "The ddraw object was not properly freed: refcount %lu.\n", ref);
ret = EnumDisplaySettingsW(second_monitor_name, ENUM_CURRENT_SETTINGS, &devmode2); - ok(ret, "EnumDisplaySettingsW failed, error %#x.\n", GetLastError()); + ok(ret, "EnumDisplaySettingsW failed, error %#lx.\n", GetLastError()); ok(compare_mode_rect(&devmode2, &old_devmode), "Got a different mode.\n"); ret = EnumDisplaySettingsW(second_monitor_name, ENUM_REGISTRY_SETTINGS, &devmode2); - ok(ret, "EnumDisplaySettingsW failed, error %#x.\n", GetLastError()); + ok(ret, "EnumDisplaySettingsW failed, error %#lx.\n", GetLastError()); ok(compare_mode_rect(&devmode2, &old_devmode), "Got a different mode.\n");
ref = IDirectDraw_Release(ddraw1); - ok(ref == 0, "The ddraw object was not properly freed: refcount %u.\n", ref); + ok(ref == 0, "The ddraw object was not properly freed: refcount %lu.\n", ref);
done: DestroyWindow(window); @@ -4102,26 +4102,26 @@ static void test_initialize(void) ok(!!ddraw, "Failed to create a ddraw object.\n");
hr = IDirectDraw_Initialize(ddraw, NULL); - ok(hr == DDERR_ALREADYINITIALIZED, "Initialize returned hr %#x.\n", hr); + ok(hr == DDERR_ALREADYINITIALIZED, "Initialize returned hr %#lx.\n", hr); IDirectDraw_Release(ddraw);
CoInitialize(NULL); hr = CoCreateInstance(&CLSID_DirectDraw, NULL, CLSCTX_INPROC_SERVER, &IID_IDirectDraw, (void **)&ddraw); - ok(SUCCEEDED(hr), "Failed to create IDirectDraw instance, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create IDirectDraw instance, hr %#lx.\n", hr); hr = IDirectDraw_QueryInterface(ddraw, &IID_IDirect3D, (void **)&d3d); if (SUCCEEDED(hr)) { /* IDirect3D_Initialize() just returns DDERR_ALREADYINITIALIZED. */ hr = IDirect3D_Initialize(d3d, NULL); - ok(hr == DDERR_ALREADYINITIALIZED, "Initialize returned hr %#x, expected DDERR_ALREADYINITIALIZED.\n", hr); + ok(hr == DDERR_ALREADYINITIALIZED, "Initialize returned hr %#lx, expected DDERR_ALREADYINITIALIZED.\n", hr); IDirect3D_Release(d3d); } else skip("D3D interface is not available, skipping test.\n"); hr = IDirectDraw_Initialize(ddraw, NULL); - ok(hr == DD_OK, "Initialize returned hr %#x, expected DD_OK.\n", hr); + ok(hr == DD_OK, "Initialize returned hr %#lx, expected DD_OK.\n", hr); hr = IDirectDraw_Initialize(ddraw, NULL); - ok(hr == DDERR_ALREADYINITIALIZED, "Initialize returned hr %#x, expected DDERR_ALREADYINITIALIZED.\n", hr); + ok(hr == DDERR_ALREADYINITIALIZED, "Initialize returned hr %#lx, expected DDERR_ALREADYINITIALIZED.\n", hr); IDirectDraw_Release(ddraw); CoUninitialize();
@@ -4129,7 +4129,7 @@ static void test_initialize(void) { CoInitialize(NULL); hr = CoCreateInstance(&CLSID_DirectDraw, NULL, CLSCTX_INPROC_SERVER, &IID_IDirect3D, (void **)&d3d); - ok(hr == E_NOINTERFACE, "CoCreateInstance returned hr %#x, expected E_NOINTERFACE.\n", hr); + ok(hr == E_NOINTERFACE, "CoCreateInstance returned hr %#lx, expected E_NOINTERFACE.\n", hr); CoUninitialize(); } } @@ -4150,20 +4150,20 @@ static void test_coop_level_surf_create(void) ddsd.ddsCaps.dwCaps = DDSCAPS_PRIMARYSURFACE; surface = (void *)0xdeadbeef; hr = IDirectDraw_CreateSurface(ddraw, &ddsd, &surface, NULL); - ok(hr == DDERR_NOCOOPERATIVELEVELSET, "Surface creation returned hr %#x.\n", hr); + ok(hr == DDERR_NOCOOPERATIVELEVELSET, "Surface creation returned hr %#lx.\n", hr); ok(surface == (void *)0xdeadbeef, "Got unexpected surface %p.\n", surface);
surface = (void *)0xdeadbeef; hr = IDirectDraw_CreateSurface(ddraw, NULL, &surface, NULL); - ok(hr == DDERR_NOCOOPERATIVELEVELSET, "Surface creation returned hr %#x.\n", hr); + ok(hr == DDERR_NOCOOPERATIVELEVELSET, "Surface creation returned hr %#lx.\n", hr); ok(surface == (void *)0xdeadbeef, "Got unexpected surface %p.\n", surface);
hr = IDirectDraw_SetCooperativeLevel(ddraw, NULL, DDSCL_NORMAL); - ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#lx.\n", hr);
surface = (void *)0xdeadbeef; hr = IDirectDraw_CreateSurface(ddraw, NULL, &surface, NULL); - ok(hr == DDERR_INVALIDPARAMS, "Unexpected hr %#x.\n", hr); + ok(hr == DDERR_INVALIDPARAMS, "Unexpected hr %#lx.\n", hr); ok(surface == (void *)0xdeadbeef, "Got unexpected surface %p.\n", surface);
IDirectDraw_Release(ddraw); @@ -4181,9 +4181,9 @@ static void test_coop_level_multi_window(void) ok(!!ddraw, "Failed to create a ddraw object.\n");
hr = IDirectDraw_SetCooperativeLevel(ddraw, window1, DDSCL_NORMAL); - ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#lx.\n", hr); hr = IDirectDraw_SetCooperativeLevel(ddraw, window2, DDSCL_NORMAL); - ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#lx.\n", hr); ok(IsWindow(window1), "Window 1 was destroyed.\n"); ok(IsWindow(window2), "Window 2 was destroyed.\n");
@@ -4216,7 +4216,7 @@ static void test_clear_rect_count(void) }
hr = IDirect3DDevice_QueryInterface(device, &IID_IDirectDrawSurface, (void **)&rt); - ok(SUCCEEDED(hr), "Failed to get render target, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get render target, hr %#lx.\n", hr);
white = create_diffuse_material(device, 1.0f, 1.0f, 1.0f, 1.0f); red = create_diffuse_material(device, 1.0f, 0.0f, 0.0f, 1.0f); @@ -4226,20 +4226,20 @@ static void test_clear_rect_count(void)
viewport_set_background(device, viewport, white); hr = IDirect3DViewport_Clear(viewport, 1, &clear_rect, D3DCLEAR_TARGET); - ok(SUCCEEDED(hr), "Failed to clear viewport, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to clear viewport, hr %#lx.\n", hr); viewport_set_background(device, viewport, red); hr = IDirect3DViewport_Clear(viewport, 0, &clear_rect, D3DCLEAR_TARGET); - ok(SUCCEEDED(hr), "Failed to clear viewport, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to clear viewport, hr %#lx.\n", hr); viewport_set_background(device, viewport, green); hr = IDirect3DViewport_Clear(viewport, 0, NULL, D3DCLEAR_TARGET); - ok(SUCCEEDED(hr), "Failed to clear viewport, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to clear viewport, hr %#lx.\n", hr); viewport_set_background(device, viewport, blue); hr = IDirect3DViewport_Clear(viewport, 1, NULL, D3DCLEAR_TARGET); - ok(SUCCEEDED(hr), "Failed to clear viewport, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to clear viewport, hr %#lx.\n", hr);
color = get_surface_color(rt, 320, 240); ok(compare_color(color, 0x00ffffff, 1) || broken(compare_color(color, 0x000000ff, 1)), - "Got unexpected color 0x%08x.\n", color); + "Got unexpected color 0x%08lx.\n", color);
IDirectDrawSurface_Release(rt); destroy_viewport(device, viewport); @@ -4270,7 +4270,7 @@ static LRESULT CALLBACK activateapp_test_proc(HWND hwnd, UINT message, WPARAM wp activateapp_testdata.received = FALSE; hr = IDirectDraw_SetCooperativeLevel(activateapp_testdata.ddraw, activateapp_testdata.window, activateapp_testdata.coop_level); - ok(SUCCEEDED(hr), "Recursive SetCooperativeLevel call failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Recursive SetCooperativeLevel call failed, hr %#lx.\n", hr); ok(!activateapp_testdata.received, "Received WM_ACTIVATEAPP during recursive SetCooperativeLevel call.\n"); } activateapp_testdata.received = TRUE; @@ -4302,31 +4302,31 @@ static void test_coop_level_activateapp(void) SetForegroundWindow(window); activateapp_testdata.received = FALSE; hr = IDirectDraw_SetCooperativeLevel(ddraw, window, DDSCL_EXCLUSIVE | DDSCL_FULLSCREEN); - ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#lx.\n", hr); ok(!activateapp_testdata.received, "Received WM_ACTIVATEAPP although window was already active.\n"); hr = IDirectDraw_SetCooperativeLevel(ddraw, NULL, DDSCL_NORMAL); - ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#lx.\n", hr);
/* Exclusive with window not active. */ SetForegroundWindow(GetDesktopWindow()); activateapp_testdata.received = FALSE; hr = IDirectDraw_SetCooperativeLevel(ddraw, window, DDSCL_EXCLUSIVE | DDSCL_FULLSCREEN); - ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#lx.\n", hr); ok(activateapp_testdata.received, "Expected WM_ACTIVATEAPP, but did not receive it.\n"); hr = IDirectDraw_SetCooperativeLevel(ddraw, NULL, DDSCL_NORMAL); - ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#lx.\n", hr);
/* Normal with window not active, then exclusive with the same window. */ SetForegroundWindow(GetDesktopWindow()); activateapp_testdata.received = FALSE; hr = IDirectDraw_SetCooperativeLevel(ddraw, window, DDSCL_NORMAL); - ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#lx.\n", hr); ok(!activateapp_testdata.received, "Received WM_ACTIVATEAPP when setting DDSCL_NORMAL.\n"); hr = IDirectDraw_SetCooperativeLevel(ddraw, window, DDSCL_EXCLUSIVE | DDSCL_FULLSCREEN); - ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#lx.\n", hr); ok(activateapp_testdata.received, "Expected WM_ACTIVATEAPP, but did not receive it.\n"); hr = IDirectDraw_SetCooperativeLevel(ddraw, NULL, DDSCL_NORMAL); - ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#lx.\n", hr);
/* Recursive set of DDSCL_EXCLUSIVE | DDSCL_FULLSCREEN. */ SetForegroundWindow(GetDesktopWindow()); @@ -4335,10 +4335,10 @@ static void test_coop_level_activateapp(void) activateapp_testdata.window = window; activateapp_testdata.coop_level = DDSCL_EXCLUSIVE | DDSCL_FULLSCREEN; hr = IDirectDraw_SetCooperativeLevel(ddraw, window, DDSCL_EXCLUSIVE | DDSCL_FULLSCREEN); - ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#lx.\n", hr); ok(activateapp_testdata.received, "Expected WM_ACTIVATEAPP, but did not receive it.\n"); hr = IDirectDraw_SetCooperativeLevel(ddraw, NULL, DDSCL_NORMAL); - ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#lx.\n", hr);
/* The recursive call seems to have some bad effect on native ddraw, despite (apparently) * succeeding. Another switch to exclusive and back to normal is needed to release the @@ -4346,9 +4346,9 @@ static void test_coop_level_activateapp(void) * WM_ACTIVATEAPP messages. */ activateapp_testdata.ddraw = NULL; hr = IDirectDraw_SetCooperativeLevel(ddraw, window, DDSCL_EXCLUSIVE | DDSCL_FULLSCREEN); - ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#lx.\n", hr); hr = IDirectDraw_SetCooperativeLevel(ddraw, NULL, DDSCL_NORMAL); - ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#lx.\n", hr);
/* Setting DDSCL_NORMAL with recursive invocation. */ SetForegroundWindow(GetDesktopWindow()); @@ -4357,7 +4357,7 @@ static void test_coop_level_activateapp(void) activateapp_testdata.window = window; activateapp_testdata.coop_level = DDSCL_NORMAL; hr = IDirectDraw_SetCooperativeLevel(ddraw, window, DDSCL_EXCLUSIVE | DDSCL_FULLSCREEN); - ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#lx.\n", hr); ok(activateapp_testdata.received, "Expected WM_ACTIVATEAPP, but did not receive it.\n");
/* DDraw is in exclusive mode now. */ @@ -4367,15 +4367,15 @@ static void test_coop_level_activateapp(void) ddsd.dwBackBufferCount = 1; ddsd.ddsCaps.dwCaps = DDSCAPS_PRIMARYSURFACE | DDSCAPS_COMPLEX | DDSCAPS_FLIP; hr = IDirectDraw_CreateSurface(ddraw, &ddsd, &surface, NULL); - ok(SUCCEEDED(hr), "Failed to create surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create surface, hr %#lx.\n", hr); IDirectDrawSurface_Release(surface);
/* Recover again, just to be sure. */ activateapp_testdata.ddraw = NULL; hr = IDirectDraw_SetCooperativeLevel(ddraw, window, DDSCL_EXCLUSIVE | DDSCL_FULLSCREEN); - ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#lx.\n", hr); hr = IDirectDraw_SetCooperativeLevel(ddraw, NULL, DDSCL_NORMAL); - ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#lx.\n", hr);
DestroyWindow(window); UnregisterClassA("ddraw_test_wndproc_wc", GetModuleHandleA(NULL)); @@ -4451,7 +4451,7 @@ static void test_unsupported_formats(void) { struct format_support_check check = {&formats[i].fmt, FALSE}; hr = IDirect3DDevice_EnumTextureFormats(device, test_unsupported_formats_cb, &check); - ok(SUCCEEDED(hr), "Failed to enumerate texture formats %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to enumerate texture formats %#lx.\n", hr);
for (j = 0; j < ARRAY_SIZE(caps); j++) { @@ -4470,7 +4470,7 @@ static void test_unsupported_formats(void)
hr = IDirectDraw_CreateSurface(ddraw, &ddsd, &surface, NULL); ok(SUCCEEDED(hr) == expect_success, - "Got unexpected hr %#x for format %s, caps %#x, expected %s.\n", + "Got unexpected hr %#lx for format %s, caps %#lx, expected %s.\n", hr, formats[i].name, caps[j], expect_success ? "success" : "failure"); if (FAILED(hr)) continue; @@ -4478,7 +4478,7 @@ static void test_unsupported_formats(void) memset(&ddsd, 0, sizeof(ddsd)); ddsd.dwSize = sizeof(ddsd); hr = IDirectDrawSurface_GetSurfaceDesc(surface, &ddsd); - ok(SUCCEEDED(hr), "Failed to get surface desc, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get surface desc, hr %#lx.\n", hr);
if (caps[j] & DDSCAPS_VIDEOMEMORY) expected_caps = DDSCAPS_VIDEOMEMORY; @@ -4490,7 +4490,7 @@ static void test_unsupported_formats(void) expected_caps = DDSCAPS_SYSTEMMEMORY;
ok(ddsd.ddsCaps.dwCaps & expected_caps, - "Expected capability %#x, format %s, input cap %#x.\n", + "Expected capability %#lx, format %s, input cap %#lx.\n", expected_caps, formats[i].name, caps[j]);
IDirectDrawSurface_Release(surface); @@ -4671,12 +4671,12 @@ static void test_rt_caps(const GUID *device_guid)
memset(palette_entries, 0, sizeof(palette_entries)); hr = IDirectDraw_CreatePalette(ddraw, DDPCAPS_ALLOW256 | DDPCAPS_8BIT, palette_entries, &palette, NULL); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr);
memset(&hal_caps, 0, sizeof(hal_caps)); hal_caps.dwSize = sizeof(hal_caps); hr = IDirectDraw_GetCaps(ddraw, &hal_caps, NULL); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr);
for (i = 0; i < ARRAY_SIZE(test_data); ++i) { @@ -4711,14 +4711,14 @@ static void test_rt_caps(const GUID *device_guid) hr = IDirectDraw_CreateSurface(ddraw, &surface_desc, &surface, NULL); ok(hr == expected_hr || broken(test_data[i].create_may_fail || (software_device && test_data[i].pf == &p8_fmt && hr == DDERR_INVALIDPIXELFORMAT)), - "Got unexpected hr %#x, test %u, software_device %u.\n", hr, i, software_device); + "Got unexpected hr %#lx, test %u, software_device %u.\n", hr, i, software_device); if (FAILED(hr)) continue;
memset(&surface_desc, 0, sizeof(surface_desc)); surface_desc.dwSize = sizeof(surface_desc); hr = IDirectDrawSurface_GetSurfaceDesc(surface, &surface_desc); - ok(hr == DD_OK, "Got unexpected hr %#x, test %u, software_device %u.\n", hr, i, software_device); + ok(hr == DD_OK, "Got unexpected hr %#lx, test %u, software_device %u.\n", hr, i, software_device);
if ((caps_in & DDSCAPS_SYSTEMMEMORY) || !(hal_caps.ddsCaps.dwCaps & DDSCAPS_VIDEOMEMORY)) expected_caps = caps_in | DDSCAPS_SYSTEMMEMORY; @@ -4729,43 +4729,43 @@ static void test_rt_caps(const GUID *device_guid) && surface_desc.ddsCaps.dwCaps == (caps_in | DDSCAPS_SYSTEMMEMORY)) || (software_device && caps_in & DDSCAPS_ZBUFFER && surface_desc.ddsCaps.dwCaps == (caps_in | DDSCAPS_SYSTEMMEMORY)), - "Got unexpected caps %#x, expected %#x, test %u, software_device %u.\n", + "Got unexpected caps %#lx, expected %#lx, test %u, software_device %u.\n", surface_desc.ddsCaps.dwCaps, expected_caps, i, software_device);
hr = IDirectDrawSurface_QueryInterface(surface, device_guid, (void **)&device); ok((!software_device && hr == test_data[i].create_device_hr) || (software_device && (hr == (test_data[i].create_device_hr == D3DERR_SURFACENOTINVIDMEM ? DD_OK : test_data[i].create_device_hr))), - "Got unexpected hr %#x, test %u, software_device %u.\n", hr, i, software_device); + "Got unexpected hr %#lx, test %u, software_device %u.\n", hr, i, software_device); if (hr == DDERR_NOPALETTEATTACHED) { hr = IDirectDrawSurface_SetPalette(surface, palette); - ok(hr == DD_OK, "Got unexpected hr %#x, test %u, software_device %u.\n", hr, i, software_device); + ok(hr == DD_OK, "Got unexpected hr %#lx, test %u, software_device %u.\n", hr, i, software_device); hr = IDirectDrawSurface_QueryInterface(surface, device_guid, (void **)&device); if (software_device) todo_wine - ok(hr == DD_OK, "Got unexpected hr %#x, test %u, software_device %u.\n", + ok(hr == DD_OK, "Got unexpected hr %#lx, test %u, software_device %u.\n", hr, i, software_device); else if (surface_desc.ddsCaps.dwCaps & DDSCAPS_VIDEOMEMORY) - ok(hr == DDERR_INVALIDPIXELFORMAT, "Got unexpected hr %#x, test %u, software_device %u.\n", + ok(hr == DDERR_INVALIDPIXELFORMAT, "Got unexpected hr %#lx, test %u, software_device %u.\n", hr, i, software_device); else - ok(hr == D3DERR_SURFACENOTINVIDMEM, "Got unexpected hr %#x, test %u, software_device %u.\n", + ok(hr == D3DERR_SURFACENOTINVIDMEM, "Got unexpected hr %#lx, test %u, software_device %u.\n", hr, i, software_device); } if (SUCCEEDED(hr)) { refcount = IDirect3DDevice_Release(device); - ok(refcount == 1, "Test %u: Got unexpected refcount %u.\n", i, refcount); + ok(refcount == 1, "Test %u: Got unexpected refcount %lu.\n", i, refcount); }
refcount = IDirectDrawSurface_Release(surface); - ok(refcount == 0, "Test %u: The surface was not properly freed, refcount %u.\n", i, refcount); + ok(refcount == 0, "Test %u: The surface was not properly freed, refcount %lu.\n", i, refcount); }
IDirectDrawPalette_Release(palette); refcount = IDirectDraw_Release(ddraw); - ok(refcount == 0, "The ddraw object was not properly freed, refcount %u.\n", refcount); + ok(refcount == 0, "The ddraw object was not properly freed, refcount %lu.\n", refcount); DestroyWindow(window); }
@@ -4890,7 +4890,7 @@ static void test_primary_caps(void) for (i = 0; i < ARRAY_SIZE(test_data); ++i) { hr = IDirectDraw_SetCooperativeLevel(ddraw, window, test_data[i].coop_level); - ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#lx.\n", hr);
memset(&surface_desc, 0, sizeof(surface_desc)); surface_desc.dwSize = sizeof(surface_desc); @@ -4900,23 +4900,23 @@ static void test_primary_caps(void) surface_desc.ddsCaps.dwCaps = test_data[i].caps_in; surface_desc.dwBackBufferCount = test_data[i].back_buffer_count; hr = IDirectDraw_CreateSurface(ddraw, &surface_desc, &surface, NULL); - ok(hr == test_data[i].hr, "Test %u: Got unexpected hr %#x, expected %#x.\n", i, hr, test_data[i].hr); + ok(hr == test_data[i].hr, "Test %u: Got unexpected hr %#lx, expected %#lx.\n", i, hr, test_data[i].hr); if (FAILED(hr)) continue;
memset(&surface_desc, 0, sizeof(surface_desc)); surface_desc.dwSize = sizeof(surface_desc); hr = IDirectDrawSurface_GetSurfaceDesc(surface, &surface_desc); - ok(SUCCEEDED(hr), "Test %u: Failed to get surface desc, hr %#x.\n", i, hr); + ok(SUCCEEDED(hr), "Test %u: Failed to get surface desc, hr %#lx.\n", i, hr); ok((surface_desc.ddsCaps.dwCaps & ~placement) == test_data[i].caps_out, - "Test %u: Got unexpected caps %#x, expected %#x.\n", + "Test %u: Got unexpected caps %#lx, expected %#lx.\n", i, surface_desc.ddsCaps.dwCaps, test_data[i].caps_out);
IDirectDrawSurface_Release(surface); }
refcount = IDirectDraw_Release(ddraw); - ok(refcount == 0, "The ddraw object was not properly freed, refcount %u.\n", refcount); + ok(refcount == 0, "The ddraw object was not properly freed, refcount %lu.\n", refcount); DestroyWindow(window); }
@@ -5001,27 +5001,27 @@ static void test_surface_lock(void) ddsd.ddsCaps.dwCaps = tests[i].caps;
hr = IDirectDraw_CreateSurface(ddraw, &ddsd, &surface, NULL); - ok(SUCCEEDED(hr), "Failed to create surface, type %s, hr %#x.\n", tests[i].name, hr); + ok(SUCCEEDED(hr), "Failed to create surface, type %s, hr %#lx.\n", tests[i].name, hr);
memset(&ddsd, 0, sizeof(ddsd)); ddsd.dwSize = sizeof(ddsd); hr = IDirectDrawSurface_Lock(surface, NULL, &ddsd, DDLOCK_WAIT, NULL); - ok(SUCCEEDED(hr), "Failed to lock surface, type %s, hr %#x.\n", tests[i].name, hr); + ok(SUCCEEDED(hr), "Failed to lock surface, type %s, hr %#lx.\n", tests[i].name, hr); if (SUCCEEDED(hr)) { hr = IDirectDrawSurface_Unlock(surface, NULL); - ok(SUCCEEDED(hr), "Failed to unlock surface, type %s, hr %#x.\n", tests[i].name, hr); + ok(SUCCEEDED(hr), "Failed to unlock surface, type %s, hr %#lx.\n", tests[i].name, hr); }
memset(&ddsd, 0, sizeof(ddsd)); hr = IDirectDrawSurface_Lock(surface, NULL, &ddsd, DDLOCK_WAIT, NULL); - ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#x, type %s.\n", hr, tests[i].name); + ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#lx, type %s.\n", hr, tests[i].name);
IDirectDrawSurface_Release(surface); }
refcount = IDirectDraw_Release(ddraw); - ok(refcount == 0, "The ddraw object was not properly freed, refcount %u.\n", refcount); + ok(refcount == 0, "The ddraw object was not properly freed, refcount %lu.\n", refcount); DestroyWindow(window); }
@@ -5072,7 +5072,7 @@ static void test_surface_discard(void) }
hr = IDirect3DDevice_QueryInterface(device, &IID_IDirectDrawSurface, (void**)&target); - ok(SUCCEEDED(hr), "Failed to get render target, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get render target, hr %#lx.\n", hr);
memset(&ddsd, 0, sizeof(ddsd)); ddsd.dwSize = sizeof(ddsd); @@ -5090,29 +5090,29 @@ static void test_surface_discard(void) memset(&ddsd, 0, sizeof(ddsd)); ddsd.dwSize = sizeof(ddsd); hr = IDirectDrawSurface_Lock(surface, NULL, &ddsd, DDLOCK_WAIT, NULL); - ok(SUCCEEDED(hr), "Failed to lock surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to lock surface, hr %#lx.\n", hr); addr = ddsd.lpSurface; hr = IDirectDrawSurface_Unlock(surface, NULL); - ok(SUCCEEDED(hr), "Failed to unlock surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to unlock surface, hr %#lx.\n", hr);
memset(&ddsd, 0, sizeof(ddsd)); ddsd.dwSize = sizeof(ddsd); hr = IDirectDrawSurface_Lock(surface, NULL, &ddsd, DDLOCK_DISCARDCONTENTS | DDLOCK_WAIT, NULL); - ok(SUCCEEDED(hr), "Failed to lock surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to lock surface, hr %#lx.\n", hr); discarded = ddsd.lpSurface != addr; hr = IDirectDrawSurface_Unlock(surface, NULL); - ok(SUCCEEDED(hr), "Failed to unlock surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to unlock surface, hr %#lx.\n", hr);
hr = IDirectDrawSurface_Blt(target, NULL, surface, NULL, DDBLT_WAIT, NULL); - ok(SUCCEEDED(hr), "Failed to blit, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to blit, hr %#lx.\n", hr);
memset(&ddsd, 0, sizeof(ddsd)); ddsd.dwSize = sizeof(ddsd); hr = IDirectDrawSurface_Lock(surface, NULL, &ddsd, DDLOCK_DISCARDCONTENTS | DDLOCK_WAIT, NULL); - ok(SUCCEEDED(hr), "Failed to lock surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to lock surface, hr %#lx.\n", hr); discarded |= ddsd.lpSurface != addr; hr = IDirectDrawSurface_Unlock(surface, NULL); - ok(SUCCEEDED(hr), "Failed to unlock surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to unlock surface, hr %#lx.\n", hr);
IDirectDrawSurface_Release(surface);
@@ -5160,7 +5160,7 @@ static void test_flip(void) ok(!!ddraw, "Failed to create a ddraw object.\n");
hr = IDirectDraw_SetCooperativeLevel(ddraw, window, DDSCL_EXCLUSIVE | DDSCL_FULLSCREEN); - ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#lx.\n", hr);
for (i = 0; i < ARRAY_SIZE(test_data); ++i) { @@ -5183,90 +5183,90 @@ static void test_flip(void) surface_desc.dwHeight = 512; surface_desc.dwBackBufferCount = 3; hr = IDirectDraw_CreateSurface(ddraw, &surface_desc, &frontbuffer, NULL); - ok(hr == DDERR_INVALIDCAPS, "%s: Got unexpected hr %#x.\n", test_data[i].name, hr); + ok(hr == DDERR_INVALIDCAPS, "%s: Got unexpected hr %#lx.\n", test_data[i].name, hr);
surface_desc.ddsCaps.dwCaps &= ~DDSCAPS_FLIP; surface_desc.dwFlags |= DDSD_BACKBUFFERCOUNT; hr = IDirectDraw_CreateSurface(ddraw, &surface_desc, &frontbuffer, NULL); - ok(hr == DDERR_INVALIDCAPS, "%s: Got unexpected hr %#x.\n", test_data[i].name, hr); + ok(hr == DDERR_INVALIDCAPS, "%s: Got unexpected hr %#lx.\n", test_data[i].name, hr);
surface_desc.ddsCaps.dwCaps &= ~DDSCAPS_COMPLEX; surface_desc.ddsCaps.dwCaps |= DDSCAPS_FLIP; hr = IDirectDraw_CreateSurface(ddraw, &surface_desc, &frontbuffer, NULL); - ok(hr == DDERR_INVALIDCAPS, "%s: Got unexpected hr %#x.\n", test_data[i].name, hr); + ok(hr == DDERR_INVALIDCAPS, "%s: Got unexpected hr %#lx.\n", test_data[i].name, hr);
surface_desc.ddsCaps.dwCaps |= DDSCAPS_COMPLEX; hr = IDirectDraw_CreateSurface(ddraw, &surface_desc, &frontbuffer, NULL); todo_wine_if(test_data[i].caps & DDSCAPS_TEXTURE) - ok(SUCCEEDED(hr), "%s: Failed to create surface, hr %#x.\n", test_data[i].name, hr); + ok(SUCCEEDED(hr), "%s: Failed to create surface, hr %#lx.\n", test_data[i].name, hr); if (FAILED(hr)) continue;
hr = IDirectDraw_SetCooperativeLevel(ddraw, window, DDSCL_NORMAL | DDSCL_FULLSCREEN); - ok(SUCCEEDED(hr), "%s: Failed to set cooperative level, hr %#x.\n", test_data[i].name, hr); + ok(SUCCEEDED(hr), "%s: Failed to set cooperative level, hr %#lx.\n", test_data[i].name, hr); hr = IDirectDrawSurface_IsLost(frontbuffer); - ok(hr == DD_OK, "%s: Got unexpected hr %#x.\n", test_data[i].name, hr); + ok(hr == DD_OK, "%s: Got unexpected hr %#lx.\n", test_data[i].name, hr); hr = IDirectDrawSurface_Flip(frontbuffer, NULL, DDFLIP_WAIT); if (test_data[i].caps & DDSCAPS_PRIMARYSURFACE) - ok(hr == DDERR_NOEXCLUSIVEMODE, "%s: Got unexpected hr %#x.\n", test_data[i].name, hr); + ok(hr == DDERR_NOEXCLUSIVEMODE, "%s: Got unexpected hr %#lx.\n", test_data[i].name, hr); else - ok(SUCCEEDED(hr), "%s: Failed to flip, hr %#x.\n", test_data[i].name, hr); + ok(SUCCEEDED(hr), "%s: Failed to flip, hr %#lx.\n", test_data[i].name, hr); hr = IDirectDraw_SetCooperativeLevel(ddraw, window, DDSCL_EXCLUSIVE | DDSCL_FULLSCREEN); - ok(SUCCEEDED(hr), "%s: Failed to set cooperative level, hr %#x.\n", test_data[i].name, hr); + ok(SUCCEEDED(hr), "%s: Failed to set cooperative level, hr %#lx.\n", test_data[i].name, hr); hr = IDirectDrawSurface_IsLost(frontbuffer); - todo_wine ok(hr == DDERR_SURFACELOST, "%s: Got unexpected hr %#x.\n", test_data[i].name, hr); + todo_wine ok(hr == DDERR_SURFACELOST, "%s: Got unexpected hr %#lx.\n", test_data[i].name, hr); hr = restore_surfaces(ddraw); - ok(SUCCEEDED(hr), "%s: Failed to restore surfaces, hr %#x.\n", test_data[i].name, hr); + ok(SUCCEEDED(hr), "%s: Failed to restore surfaces, hr %#lx.\n", test_data[i].name, hr);
memset(&surface_desc, 0, sizeof(surface_desc)); surface_desc.dwSize = sizeof(surface_desc); hr = IDirectDrawSurface_GetSurfaceDesc(frontbuffer, &surface_desc); - ok(SUCCEEDED(hr), "%s: Failed to get surface desc, hr %#x.\n", test_data[i].name, hr); + ok(SUCCEEDED(hr), "%s: Failed to get surface desc, hr %#lx.\n", test_data[i].name, hr); expected_caps = DDSCAPS_FRONTBUFFER | DDSCAPS_COMPLEX | DDSCAPS_FLIP | test_data[i].caps; if (test_data[i].caps & DDSCAPS_PRIMARYSURFACE) expected_caps |= DDSCAPS_VISIBLE; ok((surface_desc.ddsCaps.dwCaps & ~placement) == expected_caps, - "%s: Got unexpected caps %#x.\n", test_data[i].name, surface_desc.ddsCaps.dwCaps); + "%s: Got unexpected caps %#lx.\n", test_data[i].name, surface_desc.ddsCaps.dwCaps); sysmem_primary = surface_desc.ddsCaps.dwCaps & DDSCAPS_SYSTEMMEMORY;
hr = IDirectDrawSurface_GetAttachedSurface(frontbuffer, &caps, &backbuffer1); - ok(SUCCEEDED(hr), "%s: Failed to get attached surface, hr %#x.\n", test_data[i].name, hr); + ok(SUCCEEDED(hr), "%s: Failed to get attached surface, hr %#lx.\n", test_data[i].name, hr); memset(&surface_desc, 0, sizeof(surface_desc)); surface_desc.dwSize = sizeof(surface_desc); hr = IDirectDrawSurface_GetSurfaceDesc(backbuffer1, &surface_desc); - ok(SUCCEEDED(hr), "%s: Failed to get surface desc, hr %#x.\n", test_data[i].name, hr); - ok(!surface_desc.dwBackBufferCount, "%s: Got unexpected back buffer count %u.\n", + ok(SUCCEEDED(hr), "%s: Failed to get surface desc, hr %#lx.\n", test_data[i].name, hr); + ok(!surface_desc.dwBackBufferCount, "%s: Got unexpected back buffer count %lu.\n", test_data[i].name, surface_desc.dwBackBufferCount); expected_caps &= ~(DDSCAPS_VISIBLE | DDSCAPS_PRIMARYSURFACE | DDSCAPS_FRONTBUFFER); expected_caps |= DDSCAPS_BACKBUFFER; ok((surface_desc.ddsCaps.dwCaps & ~placement) == expected_caps, - "%s: Got unexpected caps %#x.\n", test_data[i].name, surface_desc.ddsCaps.dwCaps); + "%s: Got unexpected caps %#lx.\n", test_data[i].name, surface_desc.ddsCaps.dwCaps);
hr = IDirectDrawSurface_GetAttachedSurface(backbuffer1, &caps, &backbuffer2); - ok(SUCCEEDED(hr), "%s: Failed to get attached surface, hr %#x.\n", test_data[i].name, hr); + ok(SUCCEEDED(hr), "%s: Failed to get attached surface, hr %#lx.\n", test_data[i].name, hr); memset(&surface_desc, 0, sizeof(surface_desc)); surface_desc.dwSize = sizeof(surface_desc); hr = IDirectDrawSurface_GetSurfaceDesc(backbuffer2, &surface_desc); - ok(SUCCEEDED(hr), "%s: Failed to get surface desc, hr %#x.\n", test_data[i].name, hr); - ok(!surface_desc.dwBackBufferCount, "%s: Got unexpected back buffer count %u.\n", + ok(SUCCEEDED(hr), "%s: Failed to get surface desc, hr %#lx.\n", test_data[i].name, hr); + ok(!surface_desc.dwBackBufferCount, "%s: Got unexpected back buffer count %lu.\n", test_data[i].name, surface_desc.dwBackBufferCount); expected_caps &= ~DDSCAPS_BACKBUFFER; ok((surface_desc.ddsCaps.dwCaps & ~placement) == expected_caps, - "%s: Got unexpected caps %#x.\n", test_data[i].name, surface_desc.ddsCaps.dwCaps); + "%s: Got unexpected caps %#lx.\n", test_data[i].name, surface_desc.ddsCaps.dwCaps);
hr = IDirectDrawSurface_GetAttachedSurface(backbuffer2, &caps, &backbuffer3); - ok(SUCCEEDED(hr), "%s: Failed to get attached surface, hr %#x.\n", test_data[i].name, hr); + ok(SUCCEEDED(hr), "%s: Failed to get attached surface, hr %#lx.\n", test_data[i].name, hr); memset(&surface_desc, 0, sizeof(surface_desc)); surface_desc.dwSize = sizeof(surface_desc); hr = IDirectDrawSurface_GetSurfaceDesc(backbuffer3, &surface_desc); - ok(SUCCEEDED(hr), "%s: Failed to get surface desc, hr %#x.\n", test_data[i].name, hr); - ok(!surface_desc.dwBackBufferCount, "%s: Got unexpected back buffer count %u.\n", + ok(SUCCEEDED(hr), "%s: Failed to get surface desc, hr %#lx.\n", test_data[i].name, hr); + ok(!surface_desc.dwBackBufferCount, "%s: Got unexpected back buffer count %lu.\n", test_data[i].name, surface_desc.dwBackBufferCount); ok((surface_desc.ddsCaps.dwCaps & ~placement) == expected_caps, - "%s: Got unexpected caps %#x.\n", test_data[i].name, surface_desc.ddsCaps.dwCaps); + "%s: Got unexpected caps %#lx.\n", test_data[i].name, surface_desc.ddsCaps.dwCaps);
hr = IDirectDrawSurface_GetAttachedSurface(backbuffer3, &caps, &surface); - ok(SUCCEEDED(hr), "%s: Failed to get attached surface, hr %#x.\n", test_data[i].name, hr); + ok(SUCCEEDED(hr), "%s: Failed to get attached surface, hr %#lx.\n", test_data[i].name, hr); ok(surface == frontbuffer, "%s: Got unexpected surface %p, expected %p.\n", test_data[i].name, surface, frontbuffer); IDirectDrawSurface_Release(surface); @@ -5278,19 +5278,19 @@ static void test_flip(void) surface_desc.dwWidth = 640; surface_desc.dwHeight = 480; hr = IDirectDraw_CreateSurface(ddraw, &surface_desc, &surface, NULL); - ok(SUCCEEDED(hr), "%s: Failed to create surface, hr %#x.\n", test_data[i].name, hr); + ok(SUCCEEDED(hr), "%s: Failed to create surface, hr %#lx.\n", test_data[i].name, hr); hr = IDirectDrawSurface_Flip(frontbuffer, surface, DDFLIP_WAIT); - ok(hr == DDERR_NOTFLIPPABLE, "%s: Got unexpected hr %#x.\n", test_data[i].name, hr); + ok(hr == DDERR_NOTFLIPPABLE, "%s: Got unexpected hr %#lx.\n", test_data[i].name, hr); IDirectDrawSurface_Release(surface);
hr = IDirectDrawSurface_Flip(frontbuffer, frontbuffer, DDFLIP_WAIT); - ok(hr == DDERR_NOTFLIPPABLE, "%s: Got unexpected hr %#x.\n", test_data[i].name, hr); + ok(hr == DDERR_NOTFLIPPABLE, "%s: Got unexpected hr %#lx.\n", test_data[i].name, hr); hr = IDirectDrawSurface_Flip(backbuffer1, NULL, DDFLIP_WAIT); - ok(hr == DDERR_NOTFLIPPABLE, "%s: Got unexpected hr %#x.\n", test_data[i].name, hr); + ok(hr == DDERR_NOTFLIPPABLE, "%s: Got unexpected hr %#lx.\n", test_data[i].name, hr); hr = IDirectDrawSurface_Flip(backbuffer2, NULL, DDFLIP_WAIT); - ok(hr == DDERR_NOTFLIPPABLE, "%s: Got unexpected hr %#x.\n", test_data[i].name, hr); + ok(hr == DDERR_NOTFLIPPABLE, "%s: Got unexpected hr %#lx.\n", test_data[i].name, hr); hr = IDirectDrawSurface_Flip(backbuffer3, NULL, DDFLIP_WAIT); - ok(hr == DDERR_NOTFLIPPABLE, "%s: Got unexpected hr %#x.\n", test_data[i].name, hr); + ok(hr == DDERR_NOTFLIPPABLE, "%s: Got unexpected hr %#lx.\n", test_data[i].name, hr);
/* The Nvidia Geforce 7 driver cannot do a color fill on a texture backbuffer after * the backbuffer has been locked or GetSurfaceDesc has been called. Do it ourselves @@ -5300,59 +5300,59 @@ static void test_flip(void) fill_surface(backbuffer3, 0xff0000ff);
hr = IDirectDrawSurface_Flip(frontbuffer, NULL, DDFLIP_WAIT); - ok(SUCCEEDED(hr), "%s: Failed to flip, hr %#x.\n", test_data[i].name, hr); + ok(SUCCEEDED(hr), "%s: Failed to flip, hr %#lx.\n", test_data[i].name, hr); color = get_surface_color(backbuffer1, 320, 240); /* The testbot seems to just copy the contents of one surface to all the * others, instead of properly flipping. */ ok(compare_color(color, 0x0000ff00, 1) || broken(sysmem_primary && compare_color(color, 0x000000ff, 1)), - "%s: Got unexpected color 0x%08x.\n", test_data[i].name, color); + "%s: Got unexpected color 0x%08lx.\n", test_data[i].name, color); color = get_surface_color(backbuffer2, 320, 240); - ok(compare_color(color, 0x000000ff, 1), "%s: Got unexpected color 0x%08x.\n", test_data[i].name, color); + ok(compare_color(color, 0x000000ff, 1), "%s: Got unexpected color 0x%08lx.\n", test_data[i].name, color); fill_surface(backbuffer3, 0xffff0000);
hr = IDirectDrawSurface_Flip(frontbuffer, NULL, DDFLIP_WAIT); - ok(SUCCEEDED(hr), "%s: Failed to flip, hr %#x.\n", test_data[i].name, hr); + ok(SUCCEEDED(hr), "%s: Failed to flip, hr %#lx.\n", test_data[i].name, hr); color = get_surface_color(backbuffer1, 320, 240); ok(compare_color(color, 0x000000ff, 1) || broken(sysmem_primary && compare_color(color, 0x00ff0000, 1)), - "%s: Got unexpected color 0x%08x.\n", test_data[i].name, color); + "%s: Got unexpected color 0x%08lx.\n", test_data[i].name, color); color = get_surface_color(backbuffer2, 320, 240); - ok(compare_color(color, 0x00ff0000, 1), "%s: Got unexpected color 0x%08x.\n", test_data[i].name, color); + ok(compare_color(color, 0x00ff0000, 1), "%s: Got unexpected color 0x%08lx.\n", test_data[i].name, color); fill_surface(backbuffer3, 0xff00ff00);
hr = IDirectDrawSurface_Flip(frontbuffer, NULL, DDFLIP_WAIT); - ok(SUCCEEDED(hr), "%s: Failed to flip, hr %#x.\n", test_data[i].name, hr); + ok(SUCCEEDED(hr), "%s: Failed to flip, hr %#lx.\n", test_data[i].name, hr); color = get_surface_color(backbuffer1, 320, 240); ok(compare_color(color, 0x00ff0000, 1) || broken(sysmem_primary && compare_color(color, 0x0000ff00, 1)), - "%s: Got unexpected color 0x%08x.\n", test_data[i].name, color); + "%s: Got unexpected color 0x%08lx.\n", test_data[i].name, color); color = get_surface_color(backbuffer2, 320, 240); - ok(compare_color(color, 0x0000ff00, 1), "%s: Got unexpected color 0x%08x.\n", test_data[i].name, color); + ok(compare_color(color, 0x0000ff00, 1), "%s: Got unexpected color 0x%08lx.\n", test_data[i].name, color); fill_surface(backbuffer3, 0xff0000ff);
hr = IDirectDrawSurface_Flip(frontbuffer, backbuffer1, DDFLIP_WAIT); - ok(SUCCEEDED(hr), "%s: Failed to flip, hr %#x.\n", test_data[i].name, hr); + ok(SUCCEEDED(hr), "%s: Failed to flip, hr %#lx.\n", test_data[i].name, hr); color = get_surface_color(backbuffer2, 320, 240); ok(compare_color(color, 0x0000ff00, 1) || broken(sysmem_primary && compare_color(color, 0x000000ff, 1)), - "%s: Got unexpected color 0x%08x.\n", test_data[i].name, color); + "%s: Got unexpected color 0x%08lx.\n", test_data[i].name, color); color = get_surface_color(backbuffer3, 320, 240); - ok(compare_color(color, 0x000000ff, 1), "%s: Got unexpected color 0x%08x.\n", test_data[i].name, color); + ok(compare_color(color, 0x000000ff, 1), "%s: Got unexpected color 0x%08lx.\n", test_data[i].name, color); fill_surface(backbuffer1, 0xffff0000);
hr = IDirectDrawSurface_Flip(frontbuffer, backbuffer2, DDFLIP_WAIT); - ok(SUCCEEDED(hr), "%s: Failed to flip, hr %#x.\n", test_data[i].name, hr); + ok(SUCCEEDED(hr), "%s: Failed to flip, hr %#lx.\n", test_data[i].name, hr); color = get_surface_color(backbuffer1, 320, 240); - ok(compare_color(color, 0x00ff0000, 1), "%s: Got unexpected color 0x%08x.\n", test_data[i].name, color); + ok(compare_color(color, 0x00ff0000, 1), "%s: Got unexpected color 0x%08lx.\n", test_data[i].name, color); color = get_surface_color(backbuffer3, 320, 240); ok(compare_color(color, 0x000000ff, 1) || broken(sysmem_primary && compare_color(color, 0x00ff0000, 1)), - "%s: Got unexpected color 0x%08x.\n", test_data[i].name, color); + "%s: Got unexpected color 0x%08lx.\n", test_data[i].name, color); fill_surface(backbuffer2, 0xff00ff00);
hr = IDirectDrawSurface_Flip(frontbuffer, backbuffer3, DDFLIP_WAIT); - ok(SUCCEEDED(hr), "%s: Failed to flip, hr %#x.\n", test_data[i].name, hr); + ok(SUCCEEDED(hr), "%s: Failed to flip, hr %#lx.\n", test_data[i].name, hr); color = get_surface_color(backbuffer1, 320, 240); ok(compare_color(color, 0x00ff0000, 1) || broken(sysmem_primary && compare_color(color, 0x0000ff00, 1)), - "%s: Got unexpected color 0x%08x.\n", test_data[i].name, color); + "%s: Got unexpected color 0x%08lx.\n", test_data[i].name, color); color = get_surface_color(backbuffer2, 320, 240); - ok(compare_color(color, 0x0000ff00, 1), "%s: Got unexpected color 0x%08x.\n", test_data[i].name, color); + ok(compare_color(color, 0x0000ff00, 1), "%s: Got unexpected color 0x%08lx.\n", test_data[i].name, color);
IDirectDrawSurface_Release(backbuffer3); IDirectDrawSurface_Release(backbuffer2); @@ -5361,7 +5361,7 @@ static void test_flip(void) }
refcount = IDirectDraw_Release(ddraw); - ok(refcount == 0, "The ddraw object was not properly freed, refcount %u.\n", refcount); + ok(refcount == 0, "The ddraw object was not properly freed, refcount %lu.\n", refcount); DestroyWindow(window); }
@@ -5379,7 +5379,7 @@ static void test_sysmem_overlay(void) ok(!!ddraw, "Failed to create a ddraw object.\n");
hr = IDirectDraw_SetCooperativeLevel(ddraw, window, DDSCL_NORMAL); - ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#lx.\n", hr);
memset(&ddsd, 0, sizeof(ddsd)); ddsd.dwSize = sizeof(ddsd); @@ -5394,10 +5394,10 @@ static void test_sysmem_overlay(void) U3(ddsd.ddpfPixelFormat).dwGBitMask = 0x0000ff00; U4(ddsd.ddpfPixelFormat).dwBBitMask = 0x000000ff; hr = IDirectDraw_CreateSurface(ddraw, &ddsd, &surface, NULL); - ok(hr == DDERR_NOOVERLAYHW, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_NOOVERLAYHW, "Got unexpected hr %#lx.\n", hr);
ref = IDirectDraw_Release(ddraw); - ok(ref == 0, "Ddraw object not properly released, refcount %u.\n", ref); + ok(ref == 0, "Ddraw object not properly released, refcount %lu.\n", ref); DestroyWindow(window); }
@@ -5425,7 +5425,7 @@ static void test_primary_palette(void) return; } hr = IDirectDraw_SetCooperativeLevel(ddraw, window, DDSCL_EXCLUSIVE | DDSCL_FULLSCREEN); - ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#lx.\n", hr);
memset(&surface_desc, 0, sizeof(surface_desc)); surface_desc.dwSize = sizeof(surface_desc); @@ -5433,22 +5433,22 @@ static void test_primary_palette(void) surface_desc.ddsCaps.dwCaps = DDSCAPS_PRIMARYSURFACE | DDSCAPS_COMPLEX | DDSCAPS_FLIP; surface_desc.dwBackBufferCount = 1; hr = IDirectDraw_CreateSurface(ddraw, &surface_desc, &primary, NULL); - ok(SUCCEEDED(hr), "Failed to create surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create surface, hr %#lx.\n", hr); hr = IDirectDrawSurface_GetAttachedSurface(primary, &surface_caps, &backbuffer); - ok(SUCCEEDED(hr), "Failed to get attached surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get attached surface, hr %#lx.\n", hr);
memset(palette_entries, 0, sizeof(palette_entries)); hr = IDirectDraw_CreatePalette(ddraw, DDPCAPS_8BIT | DDPCAPS_ALLOW256, palette_entries, &palette, NULL); - ok(SUCCEEDED(hr), "Failed to create palette, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create palette, hr %#lx.\n", hr); refcount = get_refcount((IUnknown *)palette); - ok(refcount == 1, "Got unexpected refcount %u.\n", refcount); + ok(refcount == 1, "Got unexpected refcount %lu.\n", refcount);
hr = IDirectDrawPalette_GetCaps(palette, &palette_caps); - ok(SUCCEEDED(hr), "Failed to get palette caps, hr %#x.\n", hr); - ok(palette_caps == (DDPCAPS_8BIT | DDPCAPS_ALLOW256), "Got unexpected palette caps %#x.\n", palette_caps); + ok(SUCCEEDED(hr), "Failed to get palette caps, hr %#lx.\n", hr); + ok(palette_caps == (DDPCAPS_8BIT | DDPCAPS_ALLOW256), "Got unexpected palette caps %#lx.\n", palette_caps);
hr = IDirectDrawSurface_SetPalette(primary, palette); - ok(SUCCEEDED(hr), "Failed to set palette, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set palette, hr %#lx.\n", hr);
/* The Windows 8 testbot attaches the palette to the backbuffer as well, * and is generally somewhat broken with respect to 8 bpp / palette @@ -5461,99 +5461,99 @@ static void test_primary_palette(void) /* The Windows 8 testbot keeps extra references to the primary and * backbuffer while in 8 bpp mode. */ hr = IDirectDraw_RestoreDisplayMode(ddraw); - ok(SUCCEEDED(hr), "Failed to restore display mode, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to restore display mode, hr %#lx.\n", hr); goto done; }
refcount = get_refcount((IUnknown *)palette); - ok(refcount == 2, "Got unexpected refcount %u.\n", refcount); + ok(refcount == 2, "Got unexpected refcount %lu.\n", refcount);
hr = IDirectDrawPalette_GetCaps(palette, &palette_caps); - ok(SUCCEEDED(hr), "Failed to get palette caps, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get palette caps, hr %#lx.\n", hr); ok(palette_caps == (DDPCAPS_8BIT | DDPCAPS_PRIMARYSURFACE | DDPCAPS_ALLOW256), - "Got unexpected palette caps %#x.\n", palette_caps); + "Got unexpected palette caps %#lx.\n", palette_caps);
hr = IDirectDrawSurface_SetPalette(primary, NULL); - ok(SUCCEEDED(hr), "Failed to set palette, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set palette, hr %#lx.\n", hr); refcount = get_refcount((IUnknown *)palette); - ok(refcount == 1, "Got unexpected refcount %u.\n", refcount); + ok(refcount == 1, "Got unexpected refcount %lu.\n", refcount);
hr = IDirectDrawPalette_GetCaps(palette, &palette_caps); - ok(SUCCEEDED(hr), "Failed to get palette caps, hr %#x.\n", hr); - ok(palette_caps == (DDPCAPS_8BIT | DDPCAPS_ALLOW256), "Got unexpected palette caps %#x.\n", palette_caps); + ok(SUCCEEDED(hr), "Failed to get palette caps, hr %#lx.\n", hr); + ok(palette_caps == (DDPCAPS_8BIT | DDPCAPS_ALLOW256), "Got unexpected palette caps %#lx.\n", palette_caps);
hr = IDirectDrawSurface_SetPalette(primary, palette); - ok(SUCCEEDED(hr), "Failed to set palette, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set palette, hr %#lx.\n", hr); refcount = get_refcount((IUnknown *)palette); - ok(refcount == 2, "Got unexpected refcount %u.\n", refcount); + ok(refcount == 2, "Got unexpected refcount %lu.\n", refcount);
hr = IDirectDrawSurface_GetPalette(primary, &tmp); - ok(SUCCEEDED(hr), "Failed to get palette, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get palette, hr %#lx.\n", hr); ok(tmp == palette, "Got unexpected palette %p, expected %p.\n", tmp, palette); IDirectDrawPalette_Release(tmp); hr = IDirectDrawSurface_GetPalette(backbuffer, &tmp); - ok(hr == DDERR_NOPALETTEATTACHED, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_NOPALETTEATTACHED, "Got unexpected hr %#lx.\n", hr);
refcount = IDirectDrawPalette_Release(palette); - ok(refcount == 1, "Got unexpected refcount %u.\n", refcount); + ok(refcount == 1, "Got unexpected refcount %lu.\n", refcount); refcount = IDirectDrawPalette_Release(palette); - ok(!refcount, "Got unexpected refcount %u.\n", refcount); + ok(!refcount, "Got unexpected refcount %lu.\n", refcount);
/* Note that this only seems to work when the palette is attached to the * primary surface. When attached to a regular surface, attempting to get * the palette here will cause an access violation. */ hr = IDirectDrawSurface_GetPalette(primary, &tmp); - ok(hr == DDERR_NOPALETTEATTACHED, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_NOPALETTEATTACHED, "Got unexpected hr %#lx.\n", hr);
hr = IDirectDrawSurface_IsLost(primary); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr);
memset(&surface_desc, 0, sizeof(surface_desc)); surface_desc.dwSize = sizeof(surface_desc); hr = IDirectDrawSurface_GetSurfaceDesc(primary, &surface_desc); - ok(SUCCEEDED(hr), "Failed to get surface desc, hr %#x.\n", hr); - ok(surface_desc.dwWidth == 640, "Got unexpected surface width %u.\n", surface_desc.dwWidth); - ok(surface_desc.dwHeight == 480, "Got unexpected surface height %u.\n", surface_desc.dwHeight); - ok(U1(surface_desc.ddpfPixelFormat).dwRGBBitCount == 8, "Got unexpected bit count %u.\n", + ok(SUCCEEDED(hr), "Failed to get surface desc, hr %#lx.\n", hr); + ok(surface_desc.dwWidth == 640, "Got unexpected surface width %lu.\n", surface_desc.dwWidth); + ok(surface_desc.dwHeight == 480, "Got unexpected surface height %lu.\n", surface_desc.dwHeight); + ok(U1(surface_desc.ddpfPixelFormat).dwRGBBitCount == 8, "Got unexpected bit count %lu.\n", U1(surface_desc.ddpfPixelFormat).dwRGBBitCount);
hr = set_display_mode(ddraw, 640, 480); - ok(SUCCEEDED(hr), "Failed to set display mode, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set display mode, hr %#lx.\n", hr);
memset(&surface_desc, 0, sizeof(surface_desc)); surface_desc.dwSize = sizeof(surface_desc); hr = IDirectDrawSurface_GetSurfaceDesc(primary, &surface_desc); - ok(SUCCEEDED(hr), "Failed to get surface desc, hr %#x.\n", hr); - ok(surface_desc.dwWidth == 640, "Got unexpected surface width %u.\n", surface_desc.dwWidth); - ok(surface_desc.dwHeight == 480, "Got unexpected surface height %u.\n", surface_desc.dwHeight); + ok(SUCCEEDED(hr), "Failed to get surface desc, hr %#lx.\n", hr); + ok(surface_desc.dwWidth == 640, "Got unexpected surface width %lu.\n", surface_desc.dwWidth); + ok(surface_desc.dwHeight == 480, "Got unexpected surface height %lu.\n", surface_desc.dwHeight); ok(U1(surface_desc.ddpfPixelFormat).dwRGBBitCount == 32 || U1(surface_desc.ddpfPixelFormat).dwRGBBitCount == 24, - "Got unexpected bit count %u.\n", U1(surface_desc.ddpfPixelFormat).dwRGBBitCount); + "Got unexpected bit count %lu.\n", U1(surface_desc.ddpfPixelFormat).dwRGBBitCount);
hr = IDirectDrawSurface_IsLost(primary); - ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface_Restore(primary); - ok(hr == DDERR_WRONGMODE, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_WRONGMODE, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface_IsLost(primary); - ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#lx.\n", hr);
memset(&surface_desc, 0, sizeof(surface_desc)); surface_desc.dwSize = sizeof(surface_desc); hr = IDirectDrawSurface_GetSurfaceDesc(primary, &surface_desc); - ok(SUCCEEDED(hr), "Failed to get surface desc, hr %#x.\n", hr); - ok(surface_desc.dwWidth == 640, "Got unexpected surface width %u.\n", surface_desc.dwWidth); - ok(surface_desc.dwHeight == 480, "Got unexpected surface height %u.\n", surface_desc.dwHeight); + ok(SUCCEEDED(hr), "Failed to get surface desc, hr %#lx.\n", hr); + ok(surface_desc.dwWidth == 640, "Got unexpected surface width %lu.\n", surface_desc.dwWidth); + ok(surface_desc.dwHeight == 480, "Got unexpected surface height %lu.\n", surface_desc.dwHeight); ok(U1(surface_desc.ddpfPixelFormat).dwRGBBitCount == 32 || U1(surface_desc.ddpfPixelFormat).dwRGBBitCount == 24, - "Got unexpected bit count %u.\n", U1(surface_desc.ddpfPixelFormat).dwRGBBitCount); + "Got unexpected bit count %lu.\n", U1(surface_desc.ddpfPixelFormat).dwRGBBitCount);
done: refcount = IDirectDrawSurface_Release(backbuffer); - ok(refcount == 1, "Got unexpected refcount %u.\n", refcount); + ok(refcount == 1, "Got unexpected refcount %lu.\n", refcount); refcount = IDirectDrawSurface_Release(primary); - ok(!refcount, "Got unexpected refcount %u.\n", refcount); + ok(!refcount, "Got unexpected refcount %lu.\n", refcount); refcount = IDirectDraw_Release(ddraw); - ok(!refcount, "Got unexpected refcount %u.\n", refcount); + ok(!refcount, "Got unexpected refcount %lu.\n", refcount); DestroyWindow(window); }
@@ -5582,7 +5582,7 @@ static void test_surface_attachment(void) ddraw = create_ddraw(); ok(!!ddraw, "Failed to create a ddraw object.\n"); hr = IDirectDraw_SetCooperativeLevel(ddraw, window, DDSCL_NORMAL); - ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#lx.\n", hr);
memset(&surface_desc, 0, sizeof(surface_desc)); surface_desc.dwSize = sizeof(surface_desc); @@ -5592,14 +5592,14 @@ static void test_surface_attachment(void) surface_desc.dwWidth = 128; surface_desc.dwHeight = 128; hr = IDirectDraw_CreateSurface(ddraw, &surface_desc, &surface1, NULL); - ok(SUCCEEDED(hr), "Failed to create surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create surface, hr %#lx.\n", hr);
hr = IDirectDrawSurface_GetAttachedSurface(surface1, &caps, &surface2); - ok(SUCCEEDED(hr), "Failed to get mip level, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get mip level, hr %#lx.\n", hr); hr = IDirectDrawSurface_GetAttachedSurface(surface2, &caps, &surface3); - ok(SUCCEEDED(hr), "Failed to get mip level, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get mip level, hr %#lx.\n", hr); hr = IDirectDrawSurface_GetAttachedSurface(surface3, &caps, &surface4); - ok(hr == DDERR_NOTFOUND, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_NOTFOUND, "Got unexpected hr %#lx.\n", hr);
surface_count = 0; IDirectDrawSurface_EnumAttachedSurfaces(surface1, &surface_count, surface_counter); @@ -5618,20 +5618,20 @@ static void test_surface_attachment(void) surface_desc.dwWidth = 16; surface_desc.dwHeight = 16; hr = IDirectDraw_CreateSurface(ddraw, &surface_desc, &surface4, NULL); - ok(SUCCEEDED(hr), "Failed to create surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create surface, hr %#lx.\n", hr);
hr = IDirectDrawSurface_AddAttachedSurface(surface1, surface4); - ok(hr == DDERR_CANNOTATTACHSURFACE, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_CANNOTATTACHSURFACE, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface_AddAttachedSurface(surface4, surface1); - ok(hr == DDERR_CANNOTATTACHSURFACE, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_CANNOTATTACHSURFACE, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface_AddAttachedSurface(surface3, surface4); - ok(hr == DDERR_CANNOTATTACHSURFACE, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_CANNOTATTACHSURFACE, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface_AddAttachedSurface(surface4, surface3); - ok(hr == DDERR_CANNOTATTACHSURFACE, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_CANNOTATTACHSURFACE, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface_AddAttachedSurface(surface2, surface4); - ok(hr == DDERR_CANNOTATTACHSURFACE, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_CANNOTATTACHSURFACE, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface_AddAttachedSurface(surface4, surface2); - ok(hr == DDERR_CANNOTATTACHSURFACE, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_CANNOTATTACHSURFACE, "Got unexpected hr %#lx.\n", hr);
IDirectDrawSurface_Release(surface4);
@@ -5642,27 +5642,27 @@ static void test_surface_attachment(void) surface_desc.dwWidth = 16; surface_desc.dwHeight = 16; hr = IDirectDraw_CreateSurface(ddraw, &surface_desc, &surface4, NULL); - ok(SUCCEEDED(hr), "Failed to create surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create surface, hr %#lx.\n", hr);
if (SUCCEEDED(hr = IDirectDrawSurface_AddAttachedSurface(surface1, surface4))) { skip("Running on refrast, skipping some tests.\n"); hr = IDirectDrawSurface_DeleteAttachedSurface(surface1, 0, surface4); - ok(SUCCEEDED(hr), "Failed to detach surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to detach surface, hr %#lx.\n", hr); } else { - ok(hr == DDERR_CANNOTATTACHSURFACE, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_CANNOTATTACHSURFACE, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface_AddAttachedSurface(surface4, surface1); - ok(hr == DDERR_CANNOTATTACHSURFACE, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_CANNOTATTACHSURFACE, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface_AddAttachedSurface(surface3, surface4); - ok(hr == DDERR_CANNOTATTACHSURFACE, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_CANNOTATTACHSURFACE, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface_AddAttachedSurface(surface4, surface3); - ok(hr == DDERR_CANNOTATTACHSURFACE, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_CANNOTATTACHSURFACE, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface_AddAttachedSurface(surface2, surface4); - ok(hr == DDERR_CANNOTATTACHSURFACE, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_CANNOTATTACHSURFACE, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface_AddAttachedSurface(surface4, surface2); - ok(hr == DDERR_CANNOTATTACHSURFACE, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_CANNOTATTACHSURFACE, "Got unexpected hr %#lx.\n", hr); }
IDirectDrawSurface_Release(surface4); @@ -5671,7 +5671,7 @@ static void test_surface_attachment(void) IDirectDrawSurface_Release(surface1);
hr = IDirectDraw_SetCooperativeLevel(ddraw, window, DDSCL_EXCLUSIVE | DDSCL_FULLSCREEN); - ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#lx.\n", hr);
/* Try a single primary and two offscreen plain surfaces. */ memset(&surface_desc, 0, sizeof(surface_desc)); @@ -5679,7 +5679,7 @@ static void test_surface_attachment(void) surface_desc.dwFlags = DDSD_CAPS; surface_desc.ddsCaps.dwCaps = DDSCAPS_PRIMARYSURFACE; hr = IDirectDraw_CreateSurface(ddraw, &surface_desc, &surface1, NULL); - ok(SUCCEEDED(hr), "Failed to create surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create surface, hr %#lx.\n", hr);
memset(&surface_desc, 0, sizeof(surface_desc)); surface_desc.dwSize = sizeof(surface_desc); @@ -5688,7 +5688,7 @@ static void test_surface_attachment(void) surface_desc.dwWidth = registry_mode.dmPelsWidth; surface_desc.dwHeight = registry_mode.dmPelsHeight; hr = IDirectDraw_CreateSurface(ddraw, &surface_desc, &surface2, NULL); - ok(SUCCEEDED(hr), "Failed to create surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create surface, hr %#lx.\n", hr);
memset(&surface_desc, 0, sizeof(surface_desc)); surface_desc.dwSize = sizeof(surface_desc); @@ -5697,7 +5697,7 @@ static void test_surface_attachment(void) surface_desc.dwWidth = registry_mode.dmPelsWidth; surface_desc.dwHeight = registry_mode.dmPelsHeight; hr = IDirectDraw_CreateSurface(ddraw, &surface_desc, &surface3, NULL); - ok(SUCCEEDED(hr), "Failed to create surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create surface, hr %#lx.\n", hr);
/* This one has a different size. */ memset(&surface_desc, 0, sizeof(surface_desc)); @@ -5707,33 +5707,33 @@ static void test_surface_attachment(void) surface_desc.dwWidth = 128; surface_desc.dwHeight = 128; hr = IDirectDraw_CreateSurface(ddraw, &surface_desc, &surface4, NULL); - ok(SUCCEEDED(hr), "Failed to create surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create surface, hr %#lx.\n", hr);
hr = IDirectDrawSurface_AddAttachedSurface(surface1, surface2); - ok(SUCCEEDED(hr), "Failed to attach surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to attach surface, hr %#lx.\n", hr); /* Try the reverse without detaching first. */ hr = IDirectDrawSurface_AddAttachedSurface(surface2, surface1); - ok(hr == DDERR_SURFACEALREADYATTACHED, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_SURFACEALREADYATTACHED, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface_DeleteAttachedSurface(surface1, 0, surface2); - ok(SUCCEEDED(hr), "Failed to detach surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to detach surface, hr %#lx.\n", hr);
hr = IDirectDrawSurface_AddAttachedSurface(surface2, surface1); - ok(SUCCEEDED(hr), "Failed to attach surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to attach surface, hr %#lx.\n", hr); /* Try to detach reversed. */ hr = IDirectDrawSurface_DeleteAttachedSurface(surface1, 0, surface2); - ok(hr == DDERR_CANNOTDETACHSURFACE, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_CANNOTDETACHSURFACE, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface_DeleteAttachedSurface(surface2, 0, surface1); - ok(SUCCEEDED(hr), "Failed to detach surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to detach surface, hr %#lx.\n", hr);
hr = IDirectDrawSurface_AddAttachedSurface(surface2, surface3); - ok(SUCCEEDED(hr), "Failed to attach surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to attach surface, hr %#lx.\n", hr); hr = IDirectDrawSurface_DeleteAttachedSurface(surface2, 0, surface3); - ok(SUCCEEDED(hr), "Failed to detach surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to detach surface, hr %#lx.\n", hr);
hr = IDirectDrawSurface_AddAttachedSurface(surface1, surface4); - ok(hr == DDERR_CANNOTATTACHSURFACE, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_CANNOTATTACHSURFACE, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface_AddAttachedSurface(surface4, surface1); - ok(hr == DDERR_CANNOTATTACHSURFACE, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_CANNOTATTACHSURFACE, "Got unexpected hr %#lx.\n", hr);
IDirectDrawSurface_Release(surface4); IDirectDrawSurface_Release(surface3); @@ -5748,7 +5748,7 @@ static void test_surface_attachment(void) surface_desc.dwWidth = 64; surface_desc.dwHeight = 64; hr = IDirectDraw_CreateSurface(ddraw, &surface_desc, &surface1, NULL); - ok(hr == D3D_OK, "Failed to create surface, hr %#x.\n", hr); + ok(hr == D3D_OK, "Failed to create surface, hr %#lx.\n", hr);
memset(&surface_desc, 0, sizeof(surface_desc)); surface_desc.dwSize = sizeof(surface_desc); @@ -5761,26 +5761,26 @@ static void test_surface_attachment(void) surface_desc.dwWidth = 32; surface_desc.dwHeight = 32; hr = IDirectDraw_CreateSurface(ddraw, &surface_desc, &surface2, NULL); - ok(hr == D3D_OK, "Failed to create surface, hr %#x.\n", hr); + ok(hr == D3D_OK, "Failed to create surface, hr %#lx.\n", hr); surface_desc.dwWidth = 64; surface_desc.dwHeight = 64; hr = IDirectDraw_CreateSurface(ddraw, &surface_desc, &surface3, NULL); - ok(hr == D3D_OK, "Failed to create surface, hr %#x.\n", hr); + ok(hr == D3D_OK, "Failed to create surface, hr %#lx.\n", hr); surface_desc.dwWidth = 128; surface_desc.dwHeight = 128; hr = IDirectDraw_CreateSurface(ddraw, &surface_desc, &surface4, NULL); - ok(hr == D3D_OK, "Failed to create surface, hr %#x.\n", hr); + ok(hr == D3D_OK, "Failed to create surface, hr %#lx.\n", hr);
hr = IDirectDrawSurface_AddAttachedSurface(surface1, surface2); - todo_wine ok(hr == DDERR_CANNOTATTACHSURFACE, "Got unexpected hr %#x.\n", hr); + todo_wine ok(hr == DDERR_CANNOTATTACHSURFACE, "Got unexpected hr %#lx.\n", hr); if (SUCCEEDED(hr)) IDirectDrawSurface_DeleteAttachedSurface(surface1, 0, surface2); hr = IDirectDrawSurface_AddAttachedSurface(surface1, surface3); - ok(hr == D3D_OK, "Failed to attach depth buffer, hr %#x.\n", hr); + ok(hr == D3D_OK, "Failed to attach depth buffer, hr %#lx.\n", hr); hr = IDirectDrawSurface_DeleteAttachedSurface(surface1, 0, surface3); - ok(hr == D3D_OK, "Failed to detach depth buffer, hr %#x.\n", hr); + ok(hr == D3D_OK, "Failed to detach depth buffer, hr %#lx.\n", hr); hr = IDirectDrawSurface_AddAttachedSurface(surface1, surface4); - todo_wine ok(hr == DDERR_CANNOTATTACHSURFACE, "Got unexpected hr %#x.\n", hr); + todo_wine ok(hr == DDERR_CANNOTATTACHSURFACE, "Got unexpected hr %#lx.\n", hr);
IDirectDrawSurface_Release(surface4); IDirectDrawSurface_Release(surface3); @@ -5801,47 +5801,47 @@ static void test_surface_attachment(void) U3(surface_desc.ddpfPixelFormat).dwGBitMask = 0x07e0; U4(surface_desc.ddpfPixelFormat).dwBBitMask = 0x001f; hr = IDirectDraw_CreateSurface(ddraw, &surface_desc, &surface1, NULL); - ok(SUCCEEDED(hr), "Failed to create surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create surface, hr %#lx.\n", hr); hr = IDirectDraw_CreateSurface(ddraw, &surface_desc, &surface3, NULL); - ok(SUCCEEDED(hr), "Failed to create surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create surface, hr %#lx.\n", hr);
surface_desc.ddsCaps.dwCaps = DDSCAPS_ZBUFFER; surface_desc.ddpfPixelFormat.dwFlags = DDPF_ZBUFFER; U1(surface_desc.ddpfPixelFormat).dwZBufferBitDepth = 16; U3(surface_desc.ddpfPixelFormat).dwZBitMask = 0x0000ffff; hr = IDirectDraw_CreateSurface(ddraw, &surface_desc, &surface2, NULL); - ok(SUCCEEDED(hr), "Failed to create surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create surface, hr %#lx.\n", hr);
hr = IDirectDrawSurface_AddAttachedSurface(surface1, surface2); - ok(SUCCEEDED(hr), "Failed to attach surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to attach surface, hr %#lx.\n", hr); refcount = get_refcount((IUnknown *)surface2); - ok(refcount == 2, "Got unexpected refcount %u.\n", refcount); + ok(refcount == 2, "Got unexpected refcount %lu.\n", refcount); hr = IDirectDrawSurface_AddAttachedSurface(surface1, surface2); - ok(hr == DDERR_SURFACEALREADYATTACHED, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_SURFACEALREADYATTACHED, "Got unexpected hr %#lx.\n", hr);
/* Attaching while already attached to other surface. */ hr = IDirectDrawSurface_AddAttachedSurface(surface3, surface2); - todo_wine ok(SUCCEEDED(hr), "Failed to attach surface, hr %#x.\n", hr); + todo_wine ok(SUCCEEDED(hr), "Failed to attach surface, hr %#lx.\n", hr); hr = IDirectDrawSurface_DeleteAttachedSurface(surface3, 0, surface2); - todo_wine ok(SUCCEEDED(hr), "Failed to detach surface, hr %#x.\n", hr); + todo_wine ok(SUCCEEDED(hr), "Failed to detach surface, hr %#lx.\n", hr); IDirectDrawSurface_Release(surface3);
hr = IDirectDrawSurface_DeleteAttachedSurface(surface1, 0, surface2); - ok(SUCCEEDED(hr), "Failed to detach surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to detach surface, hr %#lx.\n", hr); refcount = get_refcount((IUnknown *)surface2); - ok(refcount == 1, "Got unexpected refcount %u.\n", refcount); + ok(refcount == 1, "Got unexpected refcount %lu.\n", refcount);
/* Automatic detachment on release. */ hr = IDirectDrawSurface_AddAttachedSurface(surface1, surface2); - ok(SUCCEEDED(hr), "Failed to attach surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to attach surface, hr %#lx.\n", hr); refcount = get_refcount((IUnknown *)surface2); - ok(refcount == 2, "Got unexpected refcount %u.\n", refcount); + ok(refcount == 2, "Got unexpected refcount %lu.\n", refcount); refcount = IDirectDrawSurface_Release(surface1); - ok(!refcount, "Got unexpected refcount %u.\n", refcount); + ok(!refcount, "Got unexpected refcount %lu.\n", refcount); refcount = IDirectDrawSurface_Release(surface2); - ok(!refcount, "Got unexpected refcount %u.\n", refcount); + ok(!refcount, "Got unexpected refcount %lu.\n", refcount); refcount = IDirectDraw_Release(ddraw); - ok(!refcount, "Got unexpected refcount %u.\n", refcount); + ok(!refcount, "Got unexpected refcount %lu.\n", refcount); DestroyWindow(window); }
@@ -5924,7 +5924,7 @@ static void test_pixel_format(void) hr = IDirectDraw_SetCooperativeLevel(ddraw, window, DDSCL_NORMAL); if (FAILED(hr)) { - skip("Failed to set cooperative level, hr %#x.\n", hr); + skip("Failed to set cooperative level, hr %#lx.\n", hr); goto cleanup; }
@@ -5934,9 +5934,9 @@ static void test_pixel_format(void) if (hdc2) { hr = IDirectDraw_CreateClipper(ddraw, 0, &clipper, NULL); - ok(SUCCEEDED(hr), "Failed to create clipper, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create clipper, hr %#lx.\n", hr); hr = IDirectDrawClipper_SetHWnd(clipper, 0, window2); - ok(SUCCEEDED(hr), "Failed to set clipper window, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set clipper window, hr %#lx.\n", hr);
test_format = GetPixelFormat(hdc); ok(test_format == format, "window has pixel format %d, expected %d\n", test_format, format); @@ -5951,7 +5951,7 @@ static void test_pixel_format(void) ddsd.ddsCaps.dwCaps = DDSCAPS_PRIMARYSURFACE;
hr = IDirectDraw_CreateSurface(ddraw, &ddsd, &primary, NULL); - ok(SUCCEEDED(hr), "Failed to create surface, hr %#x.\n",hr); + ok(SUCCEEDED(hr), "Failed to create surface, hr %#lx.\n",hr);
test_format = GetPixelFormat(hdc); ok(test_format == format, "window has pixel format %d, expected %d\n", test_format, format); @@ -5965,7 +5965,7 @@ static void test_pixel_format(void) if (clipper) { hr = IDirectDrawSurface_SetClipper(primary, clipper); - ok(SUCCEEDED(hr), "Failed to set clipper, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set clipper, hr %#lx.\n", hr);
test_format = GetPixelFormat(hdc); ok(test_format == format, "window has pixel format %d, expected %d\n", test_format, format); @@ -5980,18 +5980,18 @@ static void test_pixel_format(void) ddsd.ddsCaps.dwCaps = DDSCAPS_OFFSCREENPLAIN; ddsd.dwWidth = ddsd.dwHeight = 64; hr = IDirectDraw_CreateSurface(ddraw, &ddsd, &offscreen, NULL); - ok(SUCCEEDED(hr), "Failed to create surface, hr %#x.\n",hr); + ok(SUCCEEDED(hr), "Failed to create surface, hr %#lx.\n",hr);
memset(&fx, 0, sizeof(fx)); fx.dwSize = sizeof(fx); hr = IDirectDrawSurface_Blt(offscreen, NULL, NULL, NULL, DDBLT_WAIT | DDBLT_COLORFILL, &fx); - ok(SUCCEEDED(hr), "Failed to clear source surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to clear source surface, hr %#lx.\n", hr);
test_format = GetPixelFormat(hdc); ok(test_format == format, "window has pixel format %d, expected %d\n", test_format, format);
hr = IDirectDrawSurface_Blt(primary, NULL, offscreen, NULL, DDBLT_WAIT, NULL); - ok(SUCCEEDED(hr), "Failed to blit to primary surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to blit to primary surface, hr %#lx.\n", hr);
test_format = GetPixelFormat(hdc); ok(test_format == format, "window has pixel format %d, expected %d\n", test_format, format); @@ -6097,7 +6097,7 @@ static void test_create_surface_pitch(void) ddraw = create_ddraw(); ok(!!ddraw, "Failed to create a ddraw object.\n"); hr = IDirectDraw_SetCooperativeLevel(ddraw, window, DDSCL_NORMAL); - ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#lx.\n", hr);
mem = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, ((63 * 4) + 8) * 63);
@@ -6120,32 +6120,32 @@ static void test_create_surface_pitch(void) if (test_data[i].flags_in & DDSD_LPSURFACE) { HRESULT expected_hr = SUCCEEDED(test_data[i].hr) ? DDERR_INVALIDPARAMS : test_data[i].hr; - ok(hr == expected_hr, "Test %u: Got unexpected hr %#x, expected %#x.\n", i, hr, expected_hr); + ok(hr == expected_hr, "Test %u: Got unexpected hr %#lx, expected %#lx.\n", i, hr, expected_hr); surface_desc.lpSurface = mem; hr = IDirectDraw_CreateSurface(ddraw, &surface_desc, &surface, NULL); } if ((test_data[i].caps & DDSCAPS_VIDEOMEMORY) && hr == DDERR_NODIRECTDRAWHW) continue; - ok(hr == test_data[i].hr, "Test %u: Got unexpected hr %#x, expected %#x.\n", i, hr, test_data[i].hr); + ok(hr == test_data[i].hr, "Test %u: Got unexpected hr %#lx, expected %#lx.\n", i, hr, test_data[i].hr); if (FAILED(hr)) continue;
memset(&surface_desc, 0, sizeof(surface_desc)); surface_desc.dwSize = sizeof(surface_desc); hr = IDirectDrawSurface_GetSurfaceDesc(surface, &surface_desc); - ok(SUCCEEDED(hr), "Test %u: Failed to get surface desc, hr %#x.\n", i, hr); + ok(SUCCEEDED(hr), "Test %u: Failed to get surface desc, hr %#lx.\n", i, hr); ok((surface_desc.dwFlags & flags_mask) == test_data[i].flags_out, - "Test %u: Got unexpected flags %#x, expected %#x.\n", + "Test %u: Got unexpected flags %#lx, expected %#lx.\n", i, surface_desc.dwFlags & flags_mask, test_data[i].flags_out); if (!(test_data[i].caps & DDSCAPS_TEXTURE)) { if (is_ddraw64 && test_data[i].pitch_out32 != test_data[i].pitch_out64) todo_wine ok(U1(surface_desc).lPitch == test_data[i].pitch_out64, - "Test %u: Got unexpected pitch %u, expected %u.\n", + "Test %u: Got unexpected pitch %lu, expected %lu.\n", i, U1(surface_desc).lPitch, test_data[i].pitch_out64); else ok(U1(surface_desc).lPitch == test_data[i].pitch_out32, - "Test %u: Got unexpected pitch %u, expected %u.\n", + "Test %u: Got unexpected pitch %lu, expected %lu.\n", i, U1(surface_desc).lPitch, test_data[i].pitch_out32); } ok(!surface_desc.lpSurface, "Test %u: Got unexpected lpSurface %p.\n", i, surface_desc.lpSurface); @@ -6155,7 +6155,7 @@ static void test_create_surface_pitch(void)
HeapFree(GetProcessHeap(), 0, mem); refcount = IDirectDraw_Release(ddraw); - ok(!refcount, "Got unexpected refcount %u.\n", refcount); + ok(!refcount, "Got unexpected refcount %lu.\n", refcount); DestroyWindow(window); }
@@ -6195,12 +6195,12 @@ static void test_mipmap(void) ddraw = create_ddraw(); ok(!!ddraw, "Failed to create a ddraw object.\n"); hr = IDirectDraw_SetCooperativeLevel(ddraw, window, DDSCL_NORMAL); - ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#lx.\n", hr);
memset(&hal_caps, 0, sizeof(hal_caps)); hal_caps.dwSize = sizeof(hal_caps); hr = IDirectDraw_GetCaps(ddraw, &hal_caps, NULL); - ok(SUCCEEDED(hr), "Failed to get caps, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get caps, hr %#lx.\n", hr); if ((hal_caps.ddsCaps.dwCaps & (DDSCAPS_TEXTURE | DDSCAPS_MIPMAP)) != (DDSCAPS_TEXTURE | DDSCAPS_MIPMAP)) { skip("Mipmapped textures not supported, skipping tests.\n"); @@ -6220,18 +6220,18 @@ static void test_mipmap(void) if (tests[i].flags & DDSD_MIPMAPCOUNT) U2(surface_desc).dwMipMapCount = tests[i].mipmap_count_in; hr = IDirectDraw_CreateSurface(ddraw, &surface_desc, &surface, NULL); - ok(hr == tests[i].hr, "Test %u: Got unexpected hr %#x.\n", i, hr); + ok(hr == tests[i].hr, "Test %u: Got unexpected hr %#lx.\n", i, hr); if (FAILED(hr)) continue;
memset(&surface_desc, 0, sizeof(surface_desc)); surface_desc.dwSize = sizeof(surface_desc); hr = IDirectDrawSurface_GetSurfaceDesc(surface, &surface_desc); - ok(SUCCEEDED(hr), "Test %u: Failed to get surface desc, hr %#x.\n", i, hr); + ok(SUCCEEDED(hr), "Test %u: Failed to get surface desc, hr %#lx.\n", i, hr); ok(surface_desc.dwFlags & DDSD_MIPMAPCOUNT, - "Test %u: Got unexpected flags %#x.\n", i, surface_desc.dwFlags); + "Test %u: Got unexpected flags %#lx.\n", i, surface_desc.dwFlags); ok(U2(surface_desc).dwMipMapCount == tests[i].mipmap_count_out, - "Test %u: Got unexpected mipmap count %u.\n", i, U2(surface_desc).dwMipMapCount); + "Test %u: Got unexpected mipmap count %lu.\n", i, U2(surface_desc).dwMipMapCount);
surface_base = surface; IDirectDrawSurface2_AddRef(surface_base); @@ -6239,31 +6239,31 @@ static void test_mipmap(void) while (mipmap_count > 1) { hr = IDirectDrawSurface_GetAttachedSurface(surface_base, &caps, &surface_mip); - ok(SUCCEEDED(hr), "Test %u, %u: Failed to get attached surface, hr %#x.\n", i, mipmap_count, hr); + ok(SUCCEEDED(hr), "Test %u, %u: Failed to get attached surface, hr %#lx.\n", i, mipmap_count, hr);
memset(&surface_desc, 0, sizeof(surface_desc)); surface_desc.dwSize = sizeof(surface_desc); hr = IDirectDrawSurface_GetSurfaceDesc(surface_base, &surface_desc); - ok(SUCCEEDED(hr), "Test %u, %u: Failed to get surface desc, hr %#x.\n", i, mipmap_count, hr); + ok(SUCCEEDED(hr), "Test %u, %u: Failed to get surface desc, hr %#lx.\n", i, mipmap_count, hr); ok(surface_desc.dwFlags & DDSD_MIPMAPCOUNT, - "Test %u, %u: Got unexpected flags %#x.\n", i, mipmap_count, surface_desc.dwFlags); + "Test %u, %u: Got unexpected flags %#lx.\n", i, mipmap_count, surface_desc.dwFlags); ok(U2(surface_desc).dwMipMapCount == mipmap_count, - "Test %u, %u: Got unexpected mipmap count %u.\n", + "Test %u, %u: Got unexpected mipmap count %lu.\n", i, mipmap_count, U2(surface_desc).dwMipMapCount);
memset(&surface_desc, 0, sizeof(surface_desc)); surface_desc.dwSize = sizeof(surface_desc); hr = IDirectDrawSurface_Lock(surface_base, NULL, &surface_desc, 0, NULL); - ok(SUCCEEDED(hr), "Test %u, %u: Failed to lock surface, hr %#x.\n", i, mipmap_count, hr); + ok(SUCCEEDED(hr), "Test %u, %u: Failed to lock surface, hr %#lx.\n", i, mipmap_count, hr); ok(surface_desc.dwMipMapCount == mipmap_count, - "Test %u, %u: unexpected change of mipmap count %u.\n", + "Test %u, %u: unexpected change of mipmap count %lu.\n", i, mipmap_count, surface_desc.dwMipMapCount); memset(&surface_desc, 0, sizeof(surface_desc)); surface_desc.dwSize = sizeof(surface_desc); hr = IDirectDrawSurface_Lock(surface_mip, NULL, &surface_desc, 0, NULL); - ok(SUCCEEDED(hr), "Test %u, %u: Failed to lock surface, hr %#x.\n", i, mipmap_count, hr); + ok(SUCCEEDED(hr), "Test %u, %u: Failed to lock surface, hr %#lx.\n", i, mipmap_count, hr); ok(surface_desc.dwMipMapCount == mipmap_count - 1, - "Test %u, %u: Child mipmap count unexpected %u\n", i, mipmap_count, surface_desc.dwMipMapCount); + "Test %u, %u: Child mipmap count unexpected %lu\n", i, mipmap_count, surface_desc.dwMipMapCount); IDirectDrawSurface_Unlock(surface_mip, NULL); IDirectDrawSurface_Unlock(surface_base, NULL);
@@ -6277,7 +6277,7 @@ static void test_mipmap(void) }
refcount = IDirectDraw_Release(ddraw); - ok(!refcount, "Got unexpected refcount %u.\n", refcount); + ok(!refcount, "Got unexpected refcount %lu.\n", refcount); DestroyWindow(window); }
@@ -6302,12 +6302,12 @@ static void test_palette_complex(void) ddraw = create_ddraw(); ok(!!ddraw, "Failed to create a ddraw object.\n"); hr = IDirectDraw_SetCooperativeLevel(ddraw, window, DDSCL_NORMAL); - ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#lx.\n", hr);
memset(&hal_caps, 0, sizeof(hal_caps)); hal_caps.dwSize = sizeof(hal_caps); hr = IDirectDraw_GetCaps(ddraw, &hal_caps, NULL); - ok(SUCCEEDED(hr), "Failed to get caps, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get caps, hr %#lx.\n", hr); if ((hal_caps.ddsCaps.dwCaps & (DDSCAPS_TEXTURE | DDSCAPS_MIPMAP)) != (DDSCAPS_TEXTURE | DDSCAPS_MIPMAP)) { skip("Mipmapped textures not supported, skipping mipmap palette test.\n"); @@ -6326,28 +6326,28 @@ static void test_palette_complex(void) surface_desc.ddpfPixelFormat.dwFlags = DDPF_PALETTEINDEXED8 | DDPF_RGB; U1(surface_desc.ddpfPixelFormat).dwRGBBitCount = 8; hr = IDirectDraw_CreateSurface(ddraw, &surface_desc, &surface, NULL); - ok(SUCCEEDED(hr), "Failed to create surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create surface, hr %#lx.\n", hr);
memset(palette_entries, 0, sizeof(palette_entries)); hr = IDirectDraw_CreatePalette(ddraw, DDPCAPS_8BIT | DDPCAPS_ALLOW256, palette_entries, &palette, NULL); - ok(SUCCEEDED(hr), "Failed to create palette, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create palette, hr %#lx.\n", hr);
memset(palette_entries, 0, sizeof(palette_entries)); palette_entries[1].peRed = 0xff; palette_entries[1].peGreen = 0x80; hr = IDirectDraw_CreatePalette(ddraw, DDPCAPS_8BIT | DDPCAPS_ALLOW256, palette_entries, &palette_mipmap, NULL); - ok(SUCCEEDED(hr), "Failed to create palette, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create palette, hr %#lx.\n", hr);
palette2 = (void *)0xdeadbeef; hr = IDirectDrawSurface_GetPalette(surface, &palette2); - ok(hr == DDERR_NOPALETTEATTACHED, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_NOPALETTEATTACHED, "Got unexpected hr %#lx.\n", hr); ok(!palette2, "Got unexpected palette %p.\n", palette2); hr = IDirectDrawSurface_SetPalette(surface, palette); - ok(SUCCEEDED(hr), "Failed to set palette, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set palette, hr %#lx.\n", hr); hr = IDirectDrawSurface_GetPalette(surface, &palette2); - ok(SUCCEEDED(hr), "Failed to get palette, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get palette, hr %#lx.\n", hr); ok(palette == palette2, "Got unexpected palette %p.\n", palette2); IDirectDrawPalette_Release(palette2);
@@ -6356,46 +6356,46 @@ static void test_palette_complex(void) for (i = 0; i < 7; ++i) { hr = IDirectDrawSurface_GetAttachedSurface(mipmap, &caps, &tmp); - ok(SUCCEEDED(hr), "Failed to get attached surface, i %u, hr %#x.\n", i, hr); + ok(SUCCEEDED(hr), "Failed to get attached surface, i %u, hr %#lx.\n", i, hr); palette2 = (void *)0xdeadbeef; hr = IDirectDrawSurface_GetPalette(tmp, &palette2); - ok(hr == DDERR_NOPALETTEATTACHED, "Got unexpected hr %#x, i %u.\n", hr, i); + ok(hr == DDERR_NOPALETTEATTACHED, "Got unexpected hr %#lx, i %u.\n", hr, i); ok(!palette2, "Got unexpected palette %p, i %u.\n", palette2, i);
hr = IDirectDrawSurface_SetPalette(tmp, palette_mipmap); - ok(SUCCEEDED(hr), "Failed to set palette, i %u, hr %#x.\n", i, hr); + ok(SUCCEEDED(hr), "Failed to set palette, i %u, hr %#lx.\n", i, hr);
hr = IDirectDrawSurface_GetPalette(tmp, &palette2); - ok(SUCCEEDED(hr), "Failed to get palette, i %u, hr %#x.\n", i, hr); + ok(SUCCEEDED(hr), "Failed to get palette, i %u, hr %#lx.\n", i, hr); ok(palette_mipmap == palette2, "Got unexpected palette %p.\n", palette2); IDirectDrawPalette_Release(palette2);
hr = IDirectDrawSurface_GetDC(tmp, &dc); - ok(SUCCEEDED(hr), "Failed to get DC, i %u, hr %#x.\n", i, hr); + ok(SUCCEEDED(hr), "Failed to get DC, i %u, hr %#lx.\n", i, hr); count = GetDIBColorTable(dc, 1, 1, &rgbquad); ok(count == 1, "Expected count 1, got %u.\n", count); ok(rgbquad.rgbRed == 0xff, "Expected rgbRed = 0xff, got %#x.\n", rgbquad.rgbRed); ok(rgbquad.rgbGreen == 0x80, "Expected rgbGreen = 0x80, got %#x.\n", rgbquad.rgbGreen); ok(rgbquad.rgbBlue == 0x0, "Expected rgbBlue = 0x0, got %#x.\n", rgbquad.rgbBlue); hr = IDirectDrawSurface_ReleaseDC(tmp, dc); - ok(SUCCEEDED(hr), "Failed to release DC, i %u, hr %#x.\n", i, hr); + ok(SUCCEEDED(hr), "Failed to release DC, i %u, hr %#lx.\n", i, hr);
IDirectDrawSurface_Release(mipmap); mipmap = tmp; }
hr = IDirectDrawSurface_GetAttachedSurface(mipmap, &caps, &tmp); - ok(hr == DDERR_NOTFOUND, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_NOTFOUND, "Got unexpected hr %#lx.\n", hr); IDirectDrawSurface_Release(mipmap); refcount = IDirectDrawSurface_Release(surface); - ok(!refcount, "Got unexpected refcount %u.\n", refcount); + ok(!refcount, "Got unexpected refcount %lu.\n", refcount); refcount = IDirectDrawPalette_Release(palette_mipmap); - ok(!refcount, "Got unexpected refcount %u.\n", refcount); + ok(!refcount, "Got unexpected refcount %lu.\n", refcount); refcount = IDirectDrawPalette_Release(palette); - ok(!refcount, "Got unexpected refcount %u.\n", refcount); + ok(!refcount, "Got unexpected refcount %lu.\n", refcount);
refcount = IDirectDraw_Release(ddraw); - ok(!refcount, "Got unexpected refcount %u.\n", refcount); + ok(!refcount, "Got unexpected refcount %lu.\n", refcount); DestroyWindow(window); }
@@ -6426,7 +6426,7 @@ static void test_p8_blit(void) ddraw = create_ddraw(); ok(!!ddraw, "Failed to create a ddraw object.\n"); hr = IDirectDraw_SetCooperativeLevel(ddraw, window, DDSCL_NORMAL); - ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#lx.\n", hr); is_warp = ddraw_is_warp(ddraw);
memset(palette_entries, 0, sizeof(palette_entries)); @@ -6436,14 +6436,14 @@ static void test_p8_blit(void) palette_entries[4].peRed = 0xff; hr = IDirectDraw_CreatePalette(ddraw, DDPCAPS_8BIT | DDPCAPS_ALLOW256, palette_entries, &palette, NULL); - ok(SUCCEEDED(hr), "Failed to create palette, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create palette, hr %#lx.\n", hr); palette_entries[1].peBlue = 0xff; palette_entries[2].peGreen = 0xff; palette_entries[3].peRed = 0xff; palette_entries[4].peFlags = 0x0; hr = IDirectDraw_CreatePalette(ddraw, DDPCAPS_8BIT | DDPCAPS_ALLOW256, palette_entries, &palette2, NULL); - ok(SUCCEEDED(hr), "Failed to create palette, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create palette, hr %#lx.\n", hr);
memset(&surface_desc, 0, sizeof(surface_desc)); surface_desc.dwSize = sizeof(surface_desc); @@ -6455,11 +6455,11 @@ static void test_p8_blit(void) surface_desc.ddpfPixelFormat.dwFlags = DDPF_PALETTEINDEXED8 | DDPF_RGB; U1(surface_desc.ddpfPixelFormat).dwRGBBitCount = 8; hr = IDirectDraw_CreateSurface(ddraw, &surface_desc, &src, NULL); - ok(SUCCEEDED(hr), "Failed to create surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create surface, hr %#lx.\n", hr); hr = IDirectDraw_CreateSurface(ddraw, &surface_desc, &dst_p8, NULL); - ok(SUCCEEDED(hr), "Failed to create surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create surface, hr %#lx.\n", hr); hr = IDirectDrawSurface_SetPalette(dst_p8, palette2); - ok(SUCCEEDED(hr), "Failed to set palette, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set palette, hr %#lx.\n", hr);
memset(&surface_desc, 0, sizeof(surface_desc)); surface_desc.dwSize = sizeof(surface_desc); @@ -6475,34 +6475,34 @@ static void test_p8_blit(void) U4(surface_desc.ddpfPixelFormat).dwBBitMask = 0x000000ff; U5(surface_desc.ddpfPixelFormat).dwRGBAlphaBitMask = 0xff000000; hr = IDirectDraw_CreateSurface(ddraw, &surface_desc, &dst, NULL); - ok(SUCCEEDED(hr), "Failed to create surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create surface, hr %#lx.\n", hr);
memset(&surface_desc, 0, sizeof(surface_desc)); surface_desc.dwSize = sizeof(surface_desc); hr = IDirectDrawSurface_Lock(src, NULL, &surface_desc, DDLOCK_WAIT, NULL); - ok(SUCCEEDED(hr), "Failed to lock source surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to lock source surface, hr %#lx.\n", hr); memcpy(surface_desc.lpSurface, src_data, sizeof(src_data)); hr = IDirectDrawSurface_Unlock(src, NULL); - ok(SUCCEEDED(hr), "Failed to unlock source surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to unlock source surface, hr %#lx.\n", hr);
hr = IDirectDrawSurface_Lock(dst_p8, NULL, &surface_desc, DDLOCK_WAIT, NULL); - ok(SUCCEEDED(hr), "Failed to lock destination surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to lock destination surface, hr %#lx.\n", hr); memcpy(surface_desc.lpSurface, src_data2, sizeof(src_data2)); hr = IDirectDrawSurface_Unlock(dst_p8, NULL); - ok(SUCCEEDED(hr), "Failed to unlock destination surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to unlock destination surface, hr %#lx.\n", hr);
fx.dwSize = sizeof(fx); fx.dwFillColor = 0xdeadbeef; hr = IDirectDrawSurface_Blt(dst, NULL, NULL, NULL, DDBLT_WAIT | DDBLT_COLORFILL, &fx); - ok(SUCCEEDED(hr), "Failed to color fill %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to color fill %#lx.\n", hr);
hr = IDirectDrawSurface_SetPalette(src, palette); - ok(SUCCEEDED(hr), "Failed to set palette, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set palette, hr %#lx.\n", hr); hr = IDirectDrawSurface_Blt(dst, NULL, src, NULL, DDBLT_WAIT, NULL); /* The r500 Windows 7 driver returns E_NOTIMPL. r200 on Windows XP works. * The Geforce 7 driver on Windows Vista returns E_FAIL. Newer Nvidia GPUs work. */ ok(SUCCEEDED(hr) || broken(hr == E_NOTIMPL) || broken(hr == E_FAIL), - "Failed to blit, hr %#x.\n", hr); + "Failed to blit, hr %#lx.\n", hr);
if (SUCCEEDED(hr)) { @@ -6513,7 +6513,7 @@ static void test_p8_blit(void) * blits see below. */ todo_wine ok(compare_color(color, expected[x], 0) || broken(is_warp && compare_color(color, 0x00000000, 0)), - "Pixel %u: Got color %#x, expected %#x.\n", + "Pixel %u: Got color %#lx, expected %#lx.\n", x, color, expected[x]); } } @@ -6521,10 +6521,10 @@ static void test_p8_blit(void) fx.ddckSrcColorkey.dwColorSpaceHighValue = 0x2; fx.ddckSrcColorkey.dwColorSpaceLowValue = 0x2; hr = IDirectDrawSurface_Blt(dst_p8, NULL, src, NULL, DDBLT_WAIT | DDBLT_KEYSRCOVERRIDE, &fx); - ok(SUCCEEDED(hr), "Failed to blit, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to blit, hr %#lx.\n", hr);
hr = IDirectDrawSurface_Lock(dst_p8, NULL, &surface_desc, DDLOCK_READONLY | DDLOCK_WAIT, NULL); - ok(SUCCEEDED(hr), "Failed to lock destination surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to lock destination surface, hr %#lx.\n", hr); /* A color keyed P8 blit doesn't do anything on WARP - it just leaves the data in the destination * surface untouched. Error checking (DDBLT_KEYSRC without a key * for example) also works as expected. @@ -6535,7 +6535,7 @@ static void test_p8_blit(void) || broken(is_warp && !memcmp(surface_desc.lpSurface, src_data2, sizeof(src_data2))), "Got unexpected P8 color key blit result.\n"); hr = IDirectDrawSurface_Unlock(dst_p8, NULL); - ok(SUCCEEDED(hr), "Failed to unlock destination surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to unlock destination surface, hr %#lx.\n", hr);
IDirectDrawSurface_Release(src); IDirectDrawSurface_Release(dst); @@ -6544,7 +6544,7 @@ static void test_p8_blit(void) IDirectDrawPalette_Release(palette2);
refcount = IDirectDraw_Release(ddraw); - ok(!refcount, "Got unexpected refcount %u.\n", refcount); + ok(!refcount, "Got unexpected refcount %lu.\n", refcount); DestroyWindow(window); }
@@ -6597,7 +6597,7 @@ static void test_material(void) }
hr = IDirect3DDevice_QueryInterface(device, &IID_IDirectDrawSurface, (void **)&rt); - ok(SUCCEEDED(hr), "Failed to get render target, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get render target, hr %#lx.\n", hr);
background = create_diffuse_material(device, 0.0f, 0.0f, 1.0f, 1.0f); viewport = create_viewport(device, 0, 0, 640, 480); @@ -6605,7 +6605,7 @@ static void test_material(void)
material = create_emissive_material(device, 0.0f, 1.0f, 0.0f, 0.0f); hr = IDirect3DMaterial_GetHandle(material, device, &mat_handle); - ok(SUCCEEDED(hr), "Failed to get material handle, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get material handle, hr %#lx.\n", hr);
memset(&exec_desc, 0, sizeof(exec_desc)); exec_desc.dwSize = sizeof(exec_desc); @@ -6614,12 +6614,12 @@ static void test_material(void) exec_desc.dwCaps = D3DDEBCAPS_SYSTEMMEMORY;
hr = IDirect3DDevice_CreateExecuteBuffer(device, &exec_desc, &execute_buffer, NULL); - ok(SUCCEEDED(hr), "Failed to create execute buffer, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create execute buffer, hr %#lx.\n", hr);
for (i = 0; i < ARRAY_SIZE(test_data); ++i) { hr = IDirect3DExecuteBuffer_Lock(execute_buffer, &exec_desc); - ok(SUCCEEDED(hr), "Failed to lock execute buffer, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to lock execute buffer, hr %#lx.\n", hr);
memcpy(exec_desc.lpData, quad, sizeof(quad)); ptr = ((BYTE *)exec_desc.lpData) + sizeof(quad); @@ -6631,67 +6631,67 @@ static void test_material(void) inst_length -= sizeof(quad);
hr = IDirect3DExecuteBuffer_Unlock(execute_buffer); - ok(SUCCEEDED(hr), "Failed to unlock execute buffer, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to unlock execute buffer, hr %#lx.\n", hr);
hr = IDirect3DViewport_Clear(viewport, 1, &clear_rect, D3DCLEAR_TARGET | D3DCLEAR_ZBUFFER); - ok(SUCCEEDED(hr), "Failed to clear viewport, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to clear viewport, hr %#lx.\n", hr);
hr = IDirect3DDevice_BeginScene(device); - ok(SUCCEEDED(hr), "Failed to begin scene, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to begin scene, hr %#lx.\n", hr); set_execute_data(execute_buffer, 4, sizeof(quad), inst_length); hr = IDirect3DDevice_Execute(device, execute_buffer, viewport, D3DEXECUTE_CLIPPED); - ok(SUCCEEDED(hr), "Failed to execute exec buffer, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to execute exec buffer, hr %#lx.\n", hr); hr = IDirect3DDevice_EndScene(device); - ok(SUCCEEDED(hr), "Failed to end scene, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to end scene, hr %#lx.\n", hr); color = get_surface_color(rt, 320, 240); if (test_data[i].material) ok(compare_color(color, test_data[i].expected_color, 1) /* The Windows 8 testbot appears to return undefined results. */ || broken(TRUE), - "Got unexpected color 0x%08x, test %u.\n", color, i); + "Got unexpected color 0x%08lx, test %u.\n", color, i); else ok(compare_color(color, test_data[i].expected_color, 1), - "Got unexpected color 0x%08x, test %u.\n", color, i); + "Got unexpected color 0x%08lx, test %u.\n", color, i); }
destroy_material(material); material = create_diffuse_material(device, 1.0f, 0.0f, 0.0f, 1.0f); hr = IDirect3DMaterial_GetHandle(material, device, &mat_handle); - ok(SUCCEEDED(hr), "Failed to get material handle, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get material handle, hr %#lx.\n", hr);
hr = IDirect3DViewport_SetBackground(viewport, mat_handle); - ok(SUCCEEDED(hr), "Failed to set viewport background, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set viewport background, hr %#lx.\n", hr); hr = IDirect3DViewport_GetBackground(viewport, &tmp, &valid); - ok(SUCCEEDED(hr), "Failed to get viewport background, hr %#x.\n", hr); - ok(tmp == mat_handle, "Got unexpected material handle %#x, expected %#x.\n", tmp, mat_handle); + ok(SUCCEEDED(hr), "Failed to get viewport background, hr %#lx.\n", hr); + ok(tmp == mat_handle, "Got unexpected material handle %#lx, expected %#lx.\n", tmp, mat_handle); ok(valid, "Got unexpected valid %#x.\n", valid); hr = IDirect3DViewport_Clear(viewport, 1, &clear_rect, D3DCLEAR_TARGET); - ok(SUCCEEDED(hr), "Failed to clear viewport, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to clear viewport, hr %#lx.\n", hr); color = get_surface_color(rt, 320, 240); - ok(compare_color(color, 0x00ff0000, 1), "Got unexpected color 0x%08x.\n", color); + ok(compare_color(color, 0x00ff0000, 1), "Got unexpected color 0x%08lx.\n", color);
hr = IDirect3DViewport_SetBackground(viewport, 0); - ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#lx.\n", hr); hr = IDirect3DViewport_GetBackground(viewport, &tmp, &valid); - ok(SUCCEEDED(hr), "Failed to get viewport background, hr %#x.\n", hr); - ok(tmp == mat_handle, "Got unexpected material handle %#x, expected %#x.\n", tmp, mat_handle); + ok(SUCCEEDED(hr), "Failed to get viewport background, hr %#lx.\n", hr); + ok(tmp == mat_handle, "Got unexpected material handle %#lx, expected %#lx.\n", tmp, mat_handle); ok(valid, "Got unexpected valid %#x.\n", valid); hr = IDirect3DViewport_Clear(viewport, 1, &clear_rect, D3DCLEAR_TARGET); - ok(SUCCEEDED(hr), "Failed to clear viewport, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to clear viewport, hr %#lx.\n", hr); color = get_surface_color(rt, 320, 240); - ok(compare_color(color, 0x00ff0000, 1), "Got unexpected color 0x%08x.\n", color); + ok(compare_color(color, 0x00ff0000, 1), "Got unexpected color 0x%08lx.\n", color);
destroy_viewport(device, viewport); viewport = create_viewport(device, 0, 0, 640, 480);
hr = IDirect3DViewport_GetBackground(viewport, &tmp, &valid); - ok(SUCCEEDED(hr), "Failed to get viewport background, hr %#x.\n", hr); - ok(!tmp, "Got unexpected material handle %#x.\n", tmp); + ok(SUCCEEDED(hr), "Failed to get viewport background, hr %#lx.\n", hr); + ok(!tmp, "Got unexpected material handle %#lx.\n", tmp); ok(!valid, "Got unexpected valid %#x.\n", valid); hr = IDirect3DViewport_Clear(viewport, 1, &clear_rect, D3DCLEAR_TARGET); - ok(SUCCEEDED(hr), "Failed to clear viewport, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to clear viewport, hr %#lx.\n", hr); color = get_surface_color(rt, 320, 240); - ok(compare_color(color, 0x00000000, 1), "Got unexpected color 0x%08x.\n", color); + ok(compare_color(color, 0x00000000, 1), "Got unexpected color 0x%08lx.\n", color);
IDirect3DExecuteBuffer_Release(execute_buffer); destroy_viewport(device, viewport); @@ -6699,9 +6699,9 @@ static void test_material(void) destroy_material(material); IDirectDrawSurface_Release(rt); refcount = IDirect3DDevice_Release(device); - ok(!refcount, "Device has %u references left.\n", refcount); + ok(!refcount, "Device has %lu references left.\n", refcount); refcount = IDirectDraw_Release(ddraw); - ok(!refcount, "Ddraw object has %u references left.\n", refcount); + ok(!refcount, "Ddraw object has %lu references left.\n", refcount); DestroyWindow(window); }
@@ -6832,30 +6832,30 @@ static void test_lighting(void) }
hr = IDirect3DDevice_GetDirect3D(device, &d3d); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
hr = IDirect3DDevice_QueryInterface(device, &IID_IDirectDrawSurface, (void **)&rt); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
viewport = create_viewport(device, 0, 0, 640, 480); material = create_diffuse_and_ambient_material(device, 1.0f, 1.0f, 1.0f, 1.0f); viewport_set_background(device, viewport, material);
hr = IDirect3DViewport_Clear(viewport, 1, &clear_rect, D3DCLEAR_TARGET); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
hr = IDirect3DDevice_CreateMatrix(device, &world_handle); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirect3DDevice_SetMatrix(device, world_handle, &mat); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirect3DDevice_CreateMatrix(device, &view_handle); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirect3DDevice_SetMatrix(device, view_handle, &mat); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirect3DDevice_CreateMatrix(device, &proj_handle); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirect3DDevice_SetMatrix(device, proj_handle, &mat); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
memset(&exec_desc, 0, sizeof(exec_desc)); exec_desc.dwSize = sizeof(exec_desc); @@ -6864,10 +6864,10 @@ static void test_lighting(void) exec_desc.dwCaps = D3DDEBCAPS_SYSTEMMEMORY;
hr = IDirect3DDevice_CreateExecuteBuffer(device, &exec_desc, &execute_buffer, NULL); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
hr = IDirect3DExecuteBuffer_Lock(execute_buffer, &exec_desc); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
memcpy(exec_desc.lpData, unlitquad, sizeof(unlitquad)); ptr = ((BYTE *)exec_desc.lpData) + sizeof(unlitquad); @@ -6884,17 +6884,17 @@ static void test_lighting(void) inst_length -= sizeof(unlitquad);
hr = IDirect3DExecuteBuffer_Unlock(execute_buffer); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
hr = IDirect3DDevice_BeginScene(device); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
set_execute_data(execute_buffer, 4, sizeof(unlitquad), inst_length); hr = IDirect3DDevice_Execute(device, execute_buffer, viewport, D3DEXECUTE_CLIPPED); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
hr = IDirect3DExecuteBuffer_Lock(execute_buffer, &exec_desc); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
memcpy(exec_desc.lpData, litquad, sizeof(litquad)); ptr = ((BYTE *)exec_desc.lpData) + sizeof(litquad); @@ -6905,14 +6905,14 @@ static void test_lighting(void) inst_length -= sizeof(litquad);
hr = IDirect3DExecuteBuffer_Unlock(execute_buffer); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
set_execute_data(execute_buffer, 4, sizeof(litquad), inst_length); hr = IDirect3DDevice_Execute(device, execute_buffer, viewport, D3DEXECUTE_CLIPPED); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
hr = IDirect3DExecuteBuffer_Lock(execute_buffer, &exec_desc); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
memcpy(exec_desc.lpData, unlitnquad, sizeof(unlitnquad)); ptr = ((BYTE *)exec_desc.lpData) + sizeof(unlitnquad); @@ -6923,14 +6923,14 @@ static void test_lighting(void) inst_length -= sizeof(unlitnquad);
hr = IDirect3DExecuteBuffer_Unlock(execute_buffer); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
set_execute_data(execute_buffer, 4, sizeof(unlitnquad), inst_length); hr = IDirect3DDevice_Execute(device, execute_buffer, viewport, D3DEXECUTE_CLIPPED); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
hr = IDirect3DExecuteBuffer_Lock(execute_buffer, &exec_desc); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
memcpy(exec_desc.lpData, litnquad, sizeof(litnquad)); ptr = ((BYTE *)exec_desc.lpData) + sizeof(litnquad); @@ -6941,29 +6941,29 @@ static void test_lighting(void) inst_length -= sizeof(litnquad);
hr = IDirect3DExecuteBuffer_Unlock(execute_buffer); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
set_execute_data(execute_buffer, 4, sizeof(litnquad), inst_length); hr = IDirect3DDevice_Execute(device, execute_buffer, viewport, D3DEXECUTE_CLIPPED); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
hr = IDirect3DDevice_EndScene(device); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
color = get_surface_color(rt, 160, 360); - ok(color == 0x00ff0000, "Unlit quad without normals has color 0x%08x.\n", color); + ok(color == 0x00ff0000, "Unlit quad without normals has color 0x%08lx.\n", color); color = get_surface_color(rt, 160, 120); - ok(color == 0x0000ff00, "Lit quad without normals has color 0x%08x.\n", color); + ok(color == 0x0000ff00, "Lit quad without normals has color 0x%08lx.\n", color); color = get_surface_color(rt, 480, 360); - ok(color == 0x00ffffff, "Unlit quad with normals has color 0x%08x.\n", color); + ok(color == 0x00ffffff, "Unlit quad with normals has color 0x%08lx.\n", color); color = get_surface_color(rt, 480, 120); - ok(color == 0x00ffffff, "Lit quad with normals has color 0x%08x.\n", color); + ok(color == 0x00ffffff, "Lit quad with normals has color 0x%08lx.\n", color);
hr = IDirect3DMaterial_GetHandle(material, device, &mat_handle); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
hr = IDirect3D_CreateLight(d3d, &light, NULL); - ok(SUCCEEDED(hr), "Failed to create a light object, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create a light object, hr %#lx.\n", hr); memset(&light_desc, 0, sizeof(light_desc)); light_desc.dwSize = sizeof(light_desc); light_desc.dltType = D3DLIGHT_DIRECTIONAL; @@ -6973,35 +6973,35 @@ static void test_lighting(void) U4(light_desc.dcvColor).a = 1.0f; U3(light_desc.dvDirection).z = 1.0f; hr = IDirect3DLight_SetLight(light, &light_desc); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirect3DViewport_AddLight(viewport, light); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirect3DViewport_AddLight(viewport, light); - ok(hr == D3DERR_LIGHTHASVIEWPORT, "Got unexpected hr %#x.\n", hr); + ok(hr == D3DERR_LIGHTHASVIEWPORT, "Got unexpected hr %#lx.\n", hr);
viewport2 = create_viewport(device, 0, 0, 640, 480); hr = IDirect3DViewport_AddLight(viewport2, light); - ok(hr == D3DERR_LIGHTHASVIEWPORT, "Got unexpected hr %#x.\n", hr); + ok(hr == D3DERR_LIGHTHASVIEWPORT, "Got unexpected hr %#lx.\n", hr); destroy_viewport(device, viewport2);
hr = IDirect3DViewport_DeleteLight(viewport, light); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirect3DViewport_AddLight(viewport, light); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
for (i = 0; i < ARRAY_SIZE(tests); ++i) { hr = IDirect3DDevice_SetMatrix(device, world_handle, tests[i].world_matrix); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
hr = IDirect3DViewport_Clear(viewport, 1, &clear_rect, D3DCLEAR_TARGET); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
hr = IDirect3DDevice_BeginScene(device); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
hr = IDirect3DExecuteBuffer_Lock(execute_buffer, &exec_desc); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
memcpy(exec_desc.lpData, tests[i].quad, sizeof(nquad)); ptr = ((BYTE *)exec_desc.lpData) + sizeof(nquad); @@ -7014,17 +7014,17 @@ static void test_lighting(void) inst_length -= sizeof(nquad);
hr = IDirect3DExecuteBuffer_Unlock(execute_buffer); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
set_execute_data(execute_buffer, 4, sizeof(nquad), inst_length); hr = IDirect3DDevice_Execute(device, execute_buffer, viewport, D3DEXECUTE_CLIPPED); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
hr = IDirect3DDevice_EndScene(device); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
color = get_surface_color(rt, 320, 240); - ok(color == tests[i].expected, "%s has color 0x%08x.\n", tests[i].message, color); + ok(color == tests[i].expected, "%s has color 0x%08lx.\n", tests[i].message, color); }
IDirect3DExecuteBuffer_Release(execute_buffer); @@ -7032,16 +7032,16 @@ static void test_lighting(void) IDirect3DDevice_DeleteMatrix(device, view_handle); IDirect3DDevice_DeleteMatrix(device, proj_handle); hr = IDirect3DViewport_DeleteLight(viewport, light); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); IDirect3DLight_Release(light); destroy_material(material); destroy_viewport(device, viewport); IDirectDrawSurface_Release(rt); refcount = IDirect3DDevice_Release(device); - ok(!refcount, "Device has %u references left.\n", refcount); + ok(!refcount, "Device has %lu references left.\n", refcount); IDirect3D_Release(d3d); refcount = IDirectDraw_Release(ddraw); - ok(!refcount, "Ddraw object has %u references left.\n", refcount); + ok(!refcount, "Ddraw object has %lu references left.\n", refcount); DestroyWindow(window); }
@@ -7286,36 +7286,36 @@ static void test_specular_lighting(void) }
hr = IDirect3DDevice_GetDirect3D(device, &d3d); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
hr = IDirect3DDevice_QueryInterface(device, &IID_IDirectDrawSurface, (void **)&rt); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
viewport = create_viewport(device, 0, 0, 640, 480); background_material = create_diffuse_material(device, 1.0f, 0.0f, 0.0f, 1.0f); viewport_set_background(device, viewport, background_material);
hr = IDirect3DViewport_Clear(viewport, 1, &clear_rect, D3DCLEAR_TARGET); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
hr = IDirect3DDevice_CreateMatrix(device, &world_handle); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirect3DDevice_SetMatrix(device, world_handle, &mat); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirect3DDevice_CreateMatrix(device, &view_handle); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirect3DDevice_SetMatrix(device, view_handle, &mat); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirect3DDevice_CreateMatrix(device, &proj_handle); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirect3DDevice_SetMatrix(device, proj_handle, &mat); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
hr = IDirect3D_CreateLight(d3d, &light, NULL); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirect3DViewport_AddLight(viewport, light); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
memset(&exec_desc, 0, sizeof(exec_desc)); exec_desc.dwSize = sizeof(exec_desc); @@ -7324,26 +7324,26 @@ static void test_specular_lighting(void) exec_desc.dwCaps = D3DDEBCAPS_SYSTEMMEMORY;
hr = IDirect3DDevice_CreateExecuteBuffer(device, &exec_desc, &execute_buffer, NULL); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
for (i = 0; i < ARRAY_SIZE(tests); ++i) { tests[i].light->dwFlags = D3DLIGHT_ACTIVE; material = create_specular_material(device, 1.0f, 1.0f, 1.0f, 1.0f, tests[i].specular_power); hr = IDirect3DMaterial_GetHandle(material, device, &mat_handle); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
hr = IDirect3DLight_SetLight(light, (D3DLIGHT *)tests[i].light); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
hr = IDirect3DViewport_Clear(viewport, 1, &clear_rect, D3DCLEAR_TARGET); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
hr = IDirect3DDevice_BeginScene(device); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
hr = IDirect3DExecuteBuffer_Lock(execute_buffer, &exec_desc); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
memcpy(exec_desc.lpData, quad, sizeof(*quad) * vertex_count); ptr = ((BYTE *)exec_desc.lpData) + sizeof(*quad) * vertex_count; @@ -7363,21 +7363,21 @@ static void test_specular_lighting(void) inst_length -= sizeof(*quad) * vertex_count;
hr = IDirect3DExecuteBuffer_Unlock(execute_buffer); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
set_execute_data(execute_buffer, vertex_count, sizeof(*quad) * vertex_count, inst_length); hr = IDirect3DDevice_Execute(device, execute_buffer, viewport, D3DEXECUTE_CLIPPED); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
hr = IDirect3DDevice_EndScene(device); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
for (j = 0; j < tests[i].expected_count; ++j) { colour = get_surface_color(rt, tests[i].expected[j].x, tests[i].expected[j].y); ok(compare_color(colour, tests[i].expected[j].colour, 1) || broken(is_warp && compare_color(colour, 0x00ff0000, 1)), - "Expected colour 0x%08x at location (%u, %u), got 0x%08x, case %u.\n", + "Expected colour 0x%08lx at location (%u, %u), got 0x%08lx, case %u.\n", tests[i].expected[j].colour, tests[i].expected[j].x, tests[i].expected[j].y, colour, i); } @@ -7390,16 +7390,16 @@ static void test_specular_lighting(void) IDirect3DDevice_DeleteMatrix(device, proj_handle);
hr = IDirect3DViewport_DeleteLight(viewport, light); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); IDirect3DLight_Release(light); destroy_material(background_material); destroy_viewport(device, viewport); IDirectDrawSurface_Release(rt); refcount = IDirect3DDevice_Release(device); - ok(!refcount, "Device has %u references left.\n", refcount); + ok(!refcount, "Device has %lu references left.\n", refcount); IDirect3D_Release(d3d); refcount = IDirectDraw_Release(ddraw); - ok(!refcount, "Ddraw object has %u references left.\n", refcount); + ok(!refcount, "Ddraw object has %lu references left.\n", refcount); DestroyWindow(window); heap_free(indices); heap_free(quad); @@ -7447,7 +7447,7 @@ static void test_palette_gdi(void) ddraw = create_ddraw(); ok(!!ddraw, "Failed to create a ddraw object.\n"); hr = IDirectDraw_SetCooperativeLevel(ddraw, window, DDSCL_NORMAL); - ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#lx.\n", hr);
memset(&surface_desc, 0, sizeof(surface_desc)); surface_desc.dwSize = sizeof(surface_desc); @@ -7459,7 +7459,7 @@ static void test_palette_gdi(void) surface_desc.ddpfPixelFormat.dwFlags = DDPF_PALETTEINDEXED8 | DDPF_RGB; U1(surface_desc.ddpfPixelFormat).dwRGBBitCount = 8; hr = IDirectDraw_CreateSurface(ddraw, &surface_desc, &surface, NULL); - ok(SUCCEEDED(hr), "Failed to create surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create surface, hr %#lx.\n", hr);
/* Avoid colors from the Windows default palette. */ memset(palette_entries, 0, sizeof(palette_entries)); @@ -7471,7 +7471,7 @@ static void test_palette_gdi(void) palette_entries[4].peBlue = 0x15; hr = IDirectDraw_CreatePalette(ddraw, DDPCAPS_8BIT | DDPCAPS_ALLOW256, palette_entries, &palette, NULL); - ok(SUCCEEDED(hr), "Failed to create palette, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create palette, hr %#lx.\n", hr);
/* If there is no palette assigned and the display mode is not 8 bpp, some * drivers refuse to create a DC while others allow it. If a DC is created, @@ -7484,9 +7484,9 @@ static void test_palette_gdi(void) * contains uninitialized garbage. See comments below for the P8 case. */
hr = IDirectDrawSurface_SetPalette(surface, palette); - ok(SUCCEEDED(hr), "Failed to set palette, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set palette, hr %#lx.\n", hr); hr = IDirectDrawSurface_GetDC(surface, &dc); - ok(SUCCEEDED(hr), "Failed to get DC, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get DC, hr %#lx.\n", hr); ddraw_palette_handle = SelectPalette(dc, GetStockObject(DEFAULT_PALETTE), FALSE); ok(ddraw_palette_handle == GetStockObject(DEFAULT_PALETTE), "Got unexpected palette %p, expected %p.\n", @@ -7513,7 +7513,7 @@ static void test_palette_gdi(void) palette_entries[4].peGreen = 0x24; palette_entries[4].peBlue = 0x25; hr = IDirectDrawPalette_SetEntries(palette, 0, 4, 1, &palette_entries[4]); - ok(SUCCEEDED(hr), "Failed to set palette entries, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set palette entries, hr %#lx.\n", hr);
i = GetDIBColorTable(dc, 4, 1, &rgbquad[4]); ok(i == 1, "Expected count 1, got %u.\n", i); @@ -7524,9 +7524,9 @@ static void test_palette_gdi(void)
/* Neither does re-setting the palette. */ hr = IDirectDrawSurface_SetPalette(surface, NULL); - ok(SUCCEEDED(hr), "Failed to set palette, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set palette, hr %#lx.\n", hr); hr = IDirectDrawSurface_SetPalette(surface, palette); - ok(SUCCEEDED(hr), "Failed to set palette, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set palette, hr %#lx.\n", hr);
i = GetDIBColorTable(dc, 4, 1, &rgbquad[4]); ok(i == 1, "Expected count 1, got %u.\n", i); @@ -7536,11 +7536,11 @@ static void test_palette_gdi(void) expected1[4].rgbRed, expected1[4].rgbGreen, expected1[4].rgbBlue);
hr = IDirectDrawSurface_ReleaseDC(surface, dc); - ok(SUCCEEDED(hr), "Failed to release DC, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to release DC, hr %#lx.\n", hr);
/* Refresh the DC. This updates the palette. */ hr = IDirectDrawSurface_GetDC(surface, &dc); - ok(SUCCEEDED(hr), "Failed to get DC, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get DC, hr %#lx.\n", hr); i = GetDIBColorTable(dc, 0, ARRAY_SIZE(rgbquad), rgbquad); ok(i == ARRAY_SIZE(rgbquad), "Expected count 255, got %u.\n", i); for (i = 0; i < ARRAY_SIZE(expected2); i++) @@ -7557,13 +7557,13 @@ static void test_palette_gdi(void) i, rgbquad[i].rgbRed, rgbquad[i].rgbGreen, rgbquad[i].rgbBlue); } hr = IDirectDrawSurface_ReleaseDC(surface, dc); - ok(SUCCEEDED(hr), "Failed to release DC, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to release DC, hr %#lx.\n", hr);
refcount = IDirectDrawSurface_Release(surface); - ok(!refcount, "Got unexpected refcount %u.\n", refcount); + ok(!refcount, "Got unexpected refcount %lu.\n", refcount);
hr = IDirectDraw_SetCooperativeLevel(ddraw, window, DDSCL_FULLSCREEN | DDSCL_EXCLUSIVE); - ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#lx.\n", hr); if (FAILED(IDirectDraw_SetDisplayMode(ddraw, 640, 480, 8))) { win_skip("Failed to set 8 bpp display mode, skipping test.\n"); @@ -7572,35 +7572,35 @@ static void test_palette_gdi(void) DestroyWindow(window); return; } - ok(SUCCEEDED(hr), "Failed to set display mode, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set display mode, hr %#lx.\n", hr);
memset(&surface_desc, 0, sizeof(surface_desc)); surface_desc.dwSize = sizeof(surface_desc); surface_desc.dwFlags = DDSD_CAPS; surface_desc.ddsCaps.dwCaps = DDSCAPS_PRIMARYSURFACE; hr = IDirectDraw_CreateSurface(ddraw, &surface_desc, &primary, NULL); - ok(SUCCEEDED(hr), "Failed to create surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create surface, hr %#lx.\n", hr);
memset(&fx, 0, sizeof(fx)); fx.dwSize = sizeof(fx); U5(fx).dwFillColor = 3; SetRect(&r, 0, 0, 319, 479); hr = IDirectDrawSurface_Blt(primary, &r, NULL, NULL, DDBLT_COLORFILL | DDBLT_WAIT, &fx); - ok(SUCCEEDED(hr), "Failed to clear surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to clear surface, hr %#lx.\n", hr); SetRect(&r, 320, 0, 639, 479); U5(fx).dwFillColor = 4; hr = IDirectDrawSurface_Blt(primary, &r, NULL, NULL, DDBLT_COLORFILL | DDBLT_WAIT, &fx); - ok(SUCCEEDED(hr), "Failed to clear surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to clear surface, hr %#lx.\n", hr);
hr = IDirectDrawSurface_SetPalette(primary, palette); - ok(SUCCEEDED(hr), "Failed to set palette, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set palette, hr %#lx.\n", hr); hr = IDirectDrawSurface_GetDC(primary, &dc); - ok(SUCCEEDED(hr), "Failed to get DC, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get DC, hr %#lx.\n", hr);
color = GetPixel(dc, 160, 240); - ok(color == 0x00030000, "Clear index 3: Got unexpected color 0x%08x.\n", color); + ok(color == 0x00030000, "Clear index 3: Got unexpected color 0x%08lx.\n", color); color = GetPixel(dc, 480, 240); - ok(color == 0x00252423, "Clear index 4: Got unexpected color 0x%08x.\n", color); + ok(color == 0x00252423, "Clear index 4: Got unexpected color 0x%08lx.\n", color);
ddraw_palette_handle = SelectPalette(dc, GetStockObject(DEFAULT_PALETTE), FALSE); ok(ddraw_palette_handle == GetStockObject(DEFAULT_PALETTE), @@ -7630,7 +7630,7 @@ static void test_palette_gdi(void) i, rgbquad[i].rgbRed, rgbquad[i].rgbGreen, rgbquad[i].rgbBlue); } hr = IDirectDrawSurface_ReleaseDC(primary, dc); - ok(SUCCEEDED(hr), "Failed to release DC, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to release DC, hr %#lx.\n", hr);
memset(&surface_desc, 0, sizeof(surface_desc)); surface_desc.dwSize = sizeof(surface_desc); @@ -7639,12 +7639,12 @@ static void test_palette_gdi(void) surface_desc.dwHeight = 16; surface_desc.ddsCaps.dwCaps = DDSCAPS_OFFSCREENPLAIN; hr = IDirectDraw_CreateSurface(ddraw, &surface_desc, &surface, NULL); - ok(SUCCEEDED(hr), "Failed to create surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create surface, hr %#lx.\n", hr);
/* Here the offscreen surface appears to use the primary's palette, * but in all likelihood it is actually the system palette. */ hr = IDirectDrawSurface_GetDC(surface, &dc); - ok(SUCCEEDED(hr), "Failed to get DC, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get DC, hr %#lx.\n", hr); i = GetDIBColorTable(dc, 0, ARRAY_SIZE(rgbquad), rgbquad); ok(i == ARRAY_SIZE(rgbquad), "Expected count 255, got %u.\n", i); for (i = 0; i < ARRAY_SIZE(expected2); i++) @@ -7661,7 +7661,7 @@ static void test_palette_gdi(void) i, rgbquad[i].rgbRed, rgbquad[i].rgbGreen, rgbquad[i].rgbBlue); } hr = IDirectDrawSurface_ReleaseDC(surface, dc); - ok(SUCCEEDED(hr), "Failed to release DC, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to release DC, hr %#lx.\n", hr);
/* On real hardware a change to the primary surface's palette applies immediately, * even on device contexts from offscreen surfaces that do not have their own @@ -7677,14 +7677,14 @@ static void test_palette_gdi(void) palette_entries[4].peBlue = 0x56; hr = IDirectDraw_CreatePalette(ddraw, DDPCAPS_8BIT | DDPCAPS_ALLOW256, palette_entries, &palette2, NULL); - ok(SUCCEEDED(hr), "Failed to create palette, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create palette, hr %#lx.\n", hr); hr = IDirectDrawSurface_SetPalette(surface, palette2); - ok(SUCCEEDED(hr), "Failed to set palette, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set palette, hr %#lx.\n", hr);
/* A palette assigned to the offscreen surface overrides the primary / system * palette. */ hr = IDirectDrawSurface_GetDC(surface, &dc); - ok(SUCCEEDED(hr), "Failed to get DC, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get DC, hr %#lx.\n", hr); i = GetDIBColorTable(dc, 0, ARRAY_SIZE(rgbquad), rgbquad); ok(i == ARRAY_SIZE(rgbquad), "Expected count 255, got %u.\n", i); for (i = 0; i < ARRAY_SIZE(expected3); i++) @@ -7701,24 +7701,24 @@ static void test_palette_gdi(void) i, rgbquad[i].rgbRed, rgbquad[i].rgbGreen, rgbquad[i].rgbBlue); } hr = IDirectDrawSurface_ReleaseDC(surface, dc); - ok(SUCCEEDED(hr), "Failed to release DC, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to release DC, hr %#lx.\n", hr);
refcount = IDirectDrawSurface_Release(surface); - ok(!refcount, "Got unexpected refcount %u.\n", refcount); + ok(!refcount, "Got unexpected refcount %lu.\n", refcount);
/* The Windows 8 testbot keeps extra references to the primary and * backbuffer while in 8 bpp mode. */ hr = IDirectDraw_RestoreDisplayMode(ddraw); - ok(SUCCEEDED(hr), "Failed to restore display mode, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to restore display mode, hr %#lx.\n", hr);
refcount = IDirectDrawSurface_Release(primary); - ok(!refcount, "Got unexpected refcount %u.\n", refcount); + ok(!refcount, "Got unexpected refcount %lu.\n", refcount); refcount = IDirectDrawPalette_Release(palette2); - ok(!refcount, "Got unexpected refcount %u.\n", refcount); + ok(!refcount, "Got unexpected refcount %lu.\n", refcount); refcount = IDirectDrawPalette_Release(palette); - ok(!refcount, "Got unexpected refcount %u.\n", refcount); + ok(!refcount, "Got unexpected refcount %lu.\n", refcount); refcount = IDirectDraw_Release(ddraw); - ok(!refcount, "Got unexpected refcount %u.\n", refcount); + ok(!refcount, "Got unexpected refcount %lu.\n", refcount); DestroyWindow(window); }
@@ -7757,18 +7757,18 @@ static void test_palette_alpha(void) return; } hr = IDirectDraw_SetCooperativeLevel(ddraw, window, DDSCL_EXCLUSIVE | DDSCL_FULLSCREEN); - ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#lx.\n", hr);
memset(palette_entries, 0, sizeof(palette_entries)); palette_entries[1].peFlags = 0x42; palette_entries[2].peFlags = 0xff; palette_entries[3].peFlags = 0x80; hr = IDirectDraw_CreatePalette(ddraw, DDPCAPS_ALLOW256 | DDPCAPS_8BIT, palette_entries, &palette, NULL); - ok(SUCCEEDED(hr), "Failed to create palette, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create palette, hr %#lx.\n", hr);
memset(palette_entries, 0x66, sizeof(palette_entries)); hr = IDirectDrawPalette_GetEntries(palette, 0, 1, 4, palette_entries); - ok(SUCCEEDED(hr), "Failed to get palette entries, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get palette entries, hr %#lx.\n", hr); ok(palette_entries[0].peFlags == 0x42, "Got unexpected peFlags 0x%02x, expected 0xff.\n", palette_entries[0].peFlags); ok(palette_entries[1].peFlags == 0xff, "Got unexpected peFlags 0x%02x, expected 0xff.\n", @@ -7787,11 +7787,11 @@ static void test_palette_alpha(void) palette_entries[3].peFlags = 0x80; hr = IDirectDraw_CreatePalette(ddraw, DDPCAPS_ALLOW256 | DDPCAPS_8BIT | DDPCAPS_ALPHA, palette_entries, &palette, NULL); - ok(SUCCEEDED(hr), "Failed to create palette, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create palette, hr %#lx.\n", hr);
memset(palette_entries, 0x66, sizeof(palette_entries)); hr = IDirectDrawPalette_GetEntries(palette, 0, 1, 4, palette_entries); - ok(SUCCEEDED(hr), "Failed to get palette entries, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get palette entries, hr %#lx.\n", hr); ok(palette_entries[0].peFlags == 0x42, "Got unexpected peFlags 0x%02x, expected 0xff.\n", palette_entries[0].peFlags); ok(palette_entries[1].peFlags == 0xff, "Got unexpected peFlags 0x%02x, expected 0xff.\n", @@ -7810,13 +7810,13 @@ static void test_palette_alpha(void) surface_desc.dwHeight = 128; surface_desc.ddsCaps.dwCaps = test_data[i].caps; hr = IDirectDraw_CreateSurface(ddraw, &surface_desc, &surface, NULL); - ok(SUCCEEDED(hr), "Failed to create %s surface, hr %#x.\n", test_data[i].name, hr); + ok(SUCCEEDED(hr), "Failed to create %s surface, hr %#lx.\n", test_data[i].name, hr);
hr = IDirectDrawSurface_SetPalette(surface, palette); if (test_data[i].attach_allowed) - ok(SUCCEEDED(hr), "Failed to attach palette to %s surface, hr %#x.\n", test_data[i].name, hr); + ok(SUCCEEDED(hr), "Failed to attach palette to %s surface, hr %#lx.\n", test_data[i].name, hr); else - ok(hr == DDERR_INVALIDSURFACETYPE, "Got unexpected hr %#x, %s surface.\n", hr, test_data[i].name); + ok(hr == DDERR_INVALIDSURFACETYPE, "Got unexpected hr %#lx, %s surface.\n", hr, test_data[i].name);
if (SUCCEEDED(hr)) { @@ -7826,7 +7826,7 @@ static void test_palette_alpha(void)
hr = IDirectDrawSurface_GetDC(surface, &dc); ok(SUCCEEDED(hr) || broken(hr == DDERR_CANTCREATEDC) /* Win2k testbot */, - "Failed to get DC, hr %#x, %s surface.\n", hr, test_data[i].name); + "Failed to get DC, hr %#lx, %s surface.\n", hr, test_data[i].name); if (SUCCEEDED(hr)) { retval = GetDIBColorTable(dc, 1, 1, &rgbquad); @@ -7840,7 +7840,7 @@ static void test_palette_alpha(void) ok(rgbquad.rgbReserved == 0, "Expected rgbReserved = 0, got %u, %s surface.\n", rgbquad.rgbReserved, test_data[i].name); hr = IDirectDrawSurface_ReleaseDC(surface, dc); - ok(SUCCEEDED(hr), "Failed to release DC, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to release DC, hr %#lx.\n", hr); } } IDirectDrawSurface_Release(surface); @@ -7860,20 +7860,20 @@ static void test_palette_alpha(void) U3(surface_desc.ddpfPixelFormat).dwGBitMask = 0x0000ff00; U4(surface_desc.ddpfPixelFormat).dwBBitMask = 0x000000ff; hr = IDirectDraw_CreateSurface(ddraw, &surface_desc, &surface, NULL); - ok(SUCCEEDED(hr), "Failed to create surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create surface, hr %#lx.\n", hr); hr = IDirectDrawSurface_SetPalette(surface, palette); - ok(hr == DDERR_INVALIDSURFACETYPE, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_INVALIDSURFACETYPE, "Got unexpected hr %#lx.\n", hr); IDirectDrawSurface_Release(surface);
/* The Windows 8 testbot keeps extra references to the primary * while in 8 bpp mode. */ hr = IDirectDraw_RestoreDisplayMode(ddraw); - ok(SUCCEEDED(hr), "Failed to restore display mode, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to restore display mode, hr %#lx.\n", hr);
refcount = IDirectDrawPalette_Release(palette); - ok(!refcount, "Got unexpected refcount %u.\n", refcount); + ok(!refcount, "Got unexpected refcount %lu.\n", refcount); refcount = IDirectDraw_Release(ddraw); - ok(!refcount, "Got unexpected refcount %u.\n", refcount); + ok(!refcount, "Got unexpected refcount %lu.\n", refcount); DestroyWindow(window); }
@@ -7896,7 +7896,7 @@ static void test_lost_device(void) ddraw = create_ddraw(); ok(!!ddraw, "Failed to create a ddraw object.\n"); hr = IDirectDraw_SetCooperativeLevel(ddraw, window1, DDSCL_EXCLUSIVE | DDSCL_FULLSCREEN); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr);
memset(&surface_desc, 0, sizeof(surface_desc)); surface_desc.dwSize = sizeof(surface_desc); @@ -7904,7 +7904,7 @@ static void test_lost_device(void) surface_desc.ddsCaps.dwCaps = DDSCAPS_PRIMARYSURFACE | DDSCAPS_COMPLEX | DDSCAPS_FLIP; surface_desc.dwBackBufferCount = 1; hr = IDirectDraw_CreateSurface(ddraw, &surface_desc, &surface, NULL); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr);
memset(&surface_desc, 0, sizeof(surface_desc)); surface_desc.dwSize = sizeof(surface_desc); @@ -7913,7 +7913,7 @@ static void test_lost_device(void) surface_desc.dwWidth = 100; surface_desc.dwHeight = 100; hr = IDirectDraw_CreateSurface(ddraw, &surface_desc, &sysmem_surface, NULL); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr);
memset(&surface_desc, 0, sizeof(surface_desc)); surface_desc.dwSize = sizeof(surface_desc); @@ -7934,84 +7934,84 @@ static void test_lost_device(void) }
hr = IDirectDrawSurface_IsLost(surface); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface_Flip(surface, NULL, DDFLIP_WAIT); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface_IsLost(sysmem_surface); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); if (vidmem_surface) { hr = IDirectDrawSurface_IsLost(vidmem_surface); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); }
ret = SetForegroundWindow(GetDesktopWindow()); ok(ret, "Failed to set foreground window.\n"); hr = IDirectDrawSurface_IsLost(surface); - ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface_Flip(surface, NULL, DDFLIP_WAIT); - ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface_Restore(surface); - ok(hr == DDERR_WRONGMODE, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_WRONGMODE, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface_IsLost(surface); - ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface_IsLost(sysmem_surface); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface_Restore(sysmem_surface); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface_IsLost(sysmem_surface); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); if (vidmem_surface) { hr = IDirectDrawSurface_IsLost(vidmem_surface); - ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface_Restore(vidmem_surface); - ok(hr == DDERR_WRONGMODE, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_WRONGMODE, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface_IsLost(vidmem_surface); - ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#lx.\n", hr); }
ret = SetForegroundWindow(window1); ok(ret, "Failed to set foreground window.\n"); hr = IDirectDrawSurface_IsLost(surface); - ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface_Flip(surface, NULL, DDFLIP_WAIT); - ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface_IsLost(sysmem_surface); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); if (vidmem_surface) { hr = IDirectDrawSurface_IsLost(vidmem_surface); - ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#lx.\n", hr); }
hr = restore_surfaces(ddraw); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface_IsLost(surface); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface_Flip(surface, NULL, DDFLIP_WAIT); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface_IsLost(sysmem_surface); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); if (vidmem_surface) { hr = IDirectDrawSurface_IsLost(vidmem_surface); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); }
hr = IDirectDraw_SetCooperativeLevel(ddraw, window1, DDSCL_NORMAL); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface_IsLost(surface); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface_Flip(surface, NULL, DDFLIP_WAIT); ok(hr == DDERR_NOEXCLUSIVEMODE || broken(ddraw_is_warp(ddraw) && hr == DDERR_SURFACELOST), - "Got unexpected hr %#x.\n", hr); + "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface_IsLost(sysmem_surface); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); if (vidmem_surface) { hr = IDirectDrawSurface_IsLost(vidmem_surface); - ok(hr == DD_OK || broken(ddraw_is_warp(ddraw) && hr == DDERR_SURFACELOST), "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK || broken(ddraw_is_warp(ddraw) && hr == DDERR_SURFACELOST), "Got unexpected hr %#lx.\n", hr); }
/* Trying to restore the primary will crash, probably because flippable @@ -8022,59 +8022,59 @@ static void test_lost_device(void) surface_desc.dwFlags = DDSD_CAPS; surface_desc.ddsCaps.dwCaps = DDSCAPS_PRIMARYSURFACE; hr = IDirectDraw_CreateSurface(ddraw, &surface_desc, &surface, NULL); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); hr = restore_surfaces(ddraw); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr);
hr = IDirectDrawSurface_IsLost(surface); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr);
ret = SetForegroundWindow(GetDesktopWindow()); ok(ret, "Failed to set foreground window.\n"); hr = IDirectDrawSurface_IsLost(surface); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface_IsLost(sysmem_surface); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); if (vidmem_surface) { hr = IDirectDrawSurface_IsLost(vidmem_surface); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); }
ret = SetForegroundWindow(window1); ok(ret, "Failed to set foreground window.\n"); hr = IDirectDrawSurface_IsLost(surface); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface_IsLost(sysmem_surface); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); if (vidmem_surface) { hr = IDirectDrawSurface_IsLost(vidmem_surface); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); }
hr = IDirectDraw_SetCooperativeLevel(ddraw, window1, DDSCL_EXCLUSIVE | DDSCL_FULLSCREEN); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface_IsLost(surface); - ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface_IsLost(sysmem_surface); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); if (vidmem_surface) { hr = IDirectDrawSurface_IsLost(vidmem_surface); - ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#lx.\n", hr); }
hr = restore_surfaces(ddraw); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface_IsLost(surface); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface_IsLost(sysmem_surface); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); if (vidmem_surface) { hr = IDirectDrawSurface_IsLost(vidmem_surface); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); }
IDirectDrawSurface_Release(surface); @@ -8084,103 +8084,103 @@ static void test_lost_device(void) surface_desc.ddsCaps.dwCaps = DDSCAPS_PRIMARYSURFACE | DDSCAPS_COMPLEX | DDSCAPS_FLIP; surface_desc.dwBackBufferCount = 1; hr = IDirectDraw_CreateSurface(ddraw, &surface_desc, &surface, NULL); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr);
hr = IDirectDraw_SetCooperativeLevel(ddraw, window1, DDSCL_EXCLUSIVE | DDSCL_FULLSCREEN); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface_IsLost(surface); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface_Flip(surface, NULL, DDFLIP_WAIT); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface_IsLost(sysmem_surface); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); if (vidmem_surface) { hr = IDirectDrawSurface_IsLost(vidmem_surface); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); }
hr = IDirectDraw_SetCooperativeLevel(ddraw, window1, DDSCL_NORMAL | DDSCL_FULLSCREEN); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface_IsLost(surface); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface_Flip(surface, NULL, DDFLIP_WAIT); - ok(hr == DDERR_NOEXCLUSIVEMODE, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_NOEXCLUSIVEMODE, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface_IsLost(sysmem_surface); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); if (vidmem_surface) { hr = IDirectDrawSurface_IsLost(vidmem_surface); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); }
hr = IDirectDraw_SetCooperativeLevel(ddraw, window1, DDSCL_NORMAL); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface_IsLost(surface); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface_Flip(surface, NULL, DDFLIP_WAIT); - ok(hr == DDERR_NOEXCLUSIVEMODE, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_NOEXCLUSIVEMODE, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface_IsLost(sysmem_surface); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); if (vidmem_surface) { hr = IDirectDrawSurface_IsLost(vidmem_surface); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); }
hr = IDirectDraw_SetCooperativeLevel(ddraw, window2, DDSCL_NORMAL); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface_IsLost(surface); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface_Flip(surface, NULL, DDFLIP_WAIT); - ok(hr == DDERR_NOEXCLUSIVEMODE, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_NOEXCLUSIVEMODE, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface_IsLost(sysmem_surface); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); if (vidmem_surface) { hr = IDirectDrawSurface_IsLost(vidmem_surface); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); }
hr = IDirectDraw_SetCooperativeLevel(ddraw, window2, DDSCL_NORMAL | DDSCL_FULLSCREEN); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface_IsLost(surface); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface_Flip(surface, NULL, DDFLIP_WAIT); - ok(hr == DDERR_NOEXCLUSIVEMODE, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_NOEXCLUSIVEMODE, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface_IsLost(sysmem_surface); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); if (vidmem_surface) { hr = IDirectDrawSurface_IsLost(vidmem_surface); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); }
hr = IDirectDraw_SetCooperativeLevel(ddraw, window2, DDSCL_EXCLUSIVE | DDSCL_FULLSCREEN); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface_IsLost(surface); - ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface_Flip(surface, NULL, DDFLIP_WAIT); - ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface_IsLost(sysmem_surface); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); if (vidmem_surface) { hr = IDirectDrawSurface_IsLost(vidmem_surface); - ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#lx.\n", hr); }
memset(&caps, 0, sizeof(caps)); caps.dwCaps = DDSCAPS_FLIP;
hr = IDirectDrawSurface_GetAttachedSurface(surface, &caps, &back_buffer); - ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface_Restore(surface); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface_GetAttachedSurface(surface, &caps, &back_buffer); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface_IsLost(back_buffer); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); IDirectDrawSurface_Release(back_buffer);
if (vidmem_surface) @@ -8188,7 +8188,7 @@ static void test_lost_device(void) IDirectDrawSurface_Release(sysmem_surface); IDirectDrawSurface_Release(surface); refcount = IDirectDraw_Release(ddraw); - ok(!refcount, "Got unexpected refcount %u.\n", refcount); + ok(!refcount, "Got unexpected refcount %lu.\n", refcount); DestroyWindow(window2); DestroyWindow(window1); } @@ -8206,7 +8206,7 @@ static void test_surface_desc_lock(void) ddraw = create_ddraw(); ok(!!ddraw, "Failed to create a ddraw object.\n"); hr = IDirectDraw_SetCooperativeLevel(ddraw, window, DDSCL_NORMAL); - ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#lx.\n", hr);
memset(&surface_desc, 0, sizeof(surface_desc)); surface_desc.dwSize = sizeof(surface_desc); @@ -8215,36 +8215,36 @@ static void test_surface_desc_lock(void) surface_desc.dwHeight = 16; surface_desc.ddsCaps.dwCaps = DDSCAPS_OFFSCREENPLAIN; hr = IDirectDraw_CreateSurface(ddraw, &surface_desc, &surface, NULL); - ok(SUCCEEDED(hr), "Failed to create surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create surface, hr %#lx.\n", hr);
memset(&surface_desc, 0xaa, sizeof(surface_desc)); surface_desc.dwSize = sizeof(surface_desc); hr = IDirectDrawSurface_GetSurfaceDesc(surface, &surface_desc); - ok(SUCCEEDED(hr), "Failed to get surface desc, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get surface desc, hr %#lx.\n", hr); ok(!surface_desc.lpSurface, "Got unexpected lpSurface %p.\n", surface_desc.lpSurface);
memset(&surface_desc, 0xaa, sizeof(surface_desc)); surface_desc.dwSize = sizeof(surface_desc); hr = IDirectDrawSurface_Lock(surface, NULL, &surface_desc, 0, NULL); - ok(SUCCEEDED(hr), "Failed to lock surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to lock surface, hr %#lx.\n", hr); ok(surface_desc.lpSurface != NULL, "Got unexpected lpSurface %p.\n", surface_desc.lpSurface); memset(&surface_desc, 0xaa, sizeof(surface_desc)); surface_desc.dwSize = sizeof(surface_desc); hr = IDirectDrawSurface_GetSurfaceDesc(surface, &surface_desc); - ok(SUCCEEDED(hr), "Failed to get surface desc, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get surface desc, hr %#lx.\n", hr); ok(!surface_desc.lpSurface, "Got unexpected lpSurface %p.\n", surface_desc.lpSurface); hr = IDirectDrawSurface_Unlock(surface, NULL); - ok(SUCCEEDED(hr), "Failed to unlock surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to unlock surface, hr %#lx.\n", hr);
memset(&surface_desc, 0xaa, sizeof(surface_desc)); surface_desc.dwSize = sizeof(surface_desc); hr = IDirectDrawSurface_GetSurfaceDesc(surface, &surface_desc); - ok(SUCCEEDED(hr), "Failed to get surface desc, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get surface desc, hr %#lx.\n", hr); ok(!surface_desc.lpSurface, "Got unexpected lpSurface %p.\n", surface_desc.lpSurface);
IDirectDrawSurface_Release(surface); refcount = IDirectDraw_Release(ddraw); - ok(!refcount, "Got unexpected refcount %u.\n", refcount); + ok(!refcount, "Got unexpected refcount %lu.\n", refcount); DestroyWindow(window); }
@@ -8306,7 +8306,7 @@ static void test_texturemapblend(void) }
hr = IDirect3DDevice_QueryInterface(device, &IID_IDirectDrawSurface, (void **)&rt); - ok(SUCCEEDED(hr), "Failed to get render target, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get render target, hr %#lx.\n", hr);
material = create_diffuse_material(device, 0.0f, 0.0f, 0.0f, 1.0f); viewport = create_viewport(device, 0, 0, 640, 480); @@ -8318,7 +8318,7 @@ static void test_texturemapblend(void) exec_desc.dwBufferSize = 1024; exec_desc.dwCaps = D3DDEBCAPS_SYSTEMMEMORY; hr = IDirect3DDevice_CreateExecuteBuffer(device, &exec_desc, &execute_buffer, NULL); - ok(SUCCEEDED(hr), "Failed to create execute buffer, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create execute buffer, hr %#lx.\n", hr);
/* Test alpha with DDPF_ALPHAPIXELS texture - should be taken from texture alpha channel. * @@ -8338,27 +8338,27 @@ static void test_texturemapblend(void) U4(ddsd.ddpfPixelFormat).dwBBitMask = 0x000000ff; U5(ddsd.ddpfPixelFormat).dwRGBAlphaBitMask = 0xff000000; hr = IDirectDraw_CreateSurface(ddraw, &ddsd, &surface, NULL); - ok(SUCCEEDED(hr), "Failed to create surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create surface, hr %#lx.\n", hr);
hr = IDirectDrawSurface_QueryInterface(surface, &IID_IDirect3DTexture, (void **)&texture); - ok(SUCCEEDED(hr), "Failed to get texture interface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get texture interface, hr %#lx.\n", hr); hr = IDirect3DTexture_GetHandle(texture, device, &texture_handle); - ok(SUCCEEDED(hr), "Failed to get texture handle, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get texture handle, hr %#lx.\n", hr);
hr = IDirect3DViewport_Clear(viewport, 1, &clear_rect, D3DCLEAR_TARGET); - ok(SUCCEEDED(hr), "Failed to clear render target, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to clear render target, hr %#lx.\n", hr);
memset(&fx, 0, sizeof(fx)); fx.dwSize = sizeof(fx); U5(fx).dwFillColor = 0xff0000ff; hr = IDirectDrawSurface_Blt(surface, NULL, NULL, NULL, DDBLT_COLORFILL | DDBLT_WAIT, &fx); - ok(SUCCEEDED(hr), "Failed to clear texture, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to clear texture, hr %#lx.\n", hr); U5(fx).dwFillColor = 0x800000ff; hr = IDirectDrawSurface_Blt(surface, &rect, NULL, NULL, DDBLT_COLORFILL | DDBLT_WAIT, &fx); - ok(SUCCEEDED(hr), "Failed to clear texture, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to clear texture, hr %#lx.\n", hr);
hr = IDirect3DExecuteBuffer_Lock(execute_buffer, &exec_desc); - ok(SUCCEEDED(hr), "Failed to lock execute buffer, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to lock execute buffer, hr %#lx.\n", hr);
memcpy(exec_desc.lpData, test1_quads, sizeof(test1_quads));
@@ -8411,29 +8411,29 @@ static void test_texturemapblend(void) inst_length = (BYTE *)ptr - (BYTE *)exec_desc.lpData; inst_length -= sizeof(test1_quads); hr = IDirect3DExecuteBuffer_Unlock(execute_buffer); - ok(SUCCEEDED(hr), "Failed to unlock execute buffer, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to unlock execute buffer, hr %#lx.\n", hr); set_execute_data(execute_buffer, 8, sizeof(test1_quads), inst_length);
hr = IDirect3DDevice_BeginScene(device); - ok(SUCCEEDED(hr), "Failed to begin scene, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to begin scene, hr %#lx.\n", hr); hr = IDirect3DDevice_Execute(device, execute_buffer, viewport, D3DEXECUTE_UNCLIPPED); - ok(SUCCEEDED(hr), "Failed to execute exec buffer, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to execute exec buffer, hr %#lx.\n", hr); hr = IDirect3DDevice_EndScene(device); - ok(SUCCEEDED(hr), "Failed to end scene, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to end scene, hr %#lx.\n", hr);
/* The above SPECULARENABLE = FALSE on WARP matters here.*/ color = get_surface_color(rt, 5, 5); - ok(compare_color(color, 0x00000080, 2), "Got unexpected color 0x%08x.\n", color); + ok(compare_color(color, 0x00000080, 2), "Got unexpected color 0x%08lx.\n", color); color = get_surface_color(rt, 400, 5); - ok(compare_color(color, 0x000000ff, 2), "Got unexpected color 0x%08x.\n", color); + ok(compare_color(color, 0x000000ff, 2), "Got unexpected color 0x%08lx.\n", color); color = get_surface_color(rt, 5, 245); - ok(compare_color(color, 0x00000080, 2), "Got unexpected color 0x%08x.\n", color); + ok(compare_color(color, 0x00000080, 2), "Got unexpected color 0x%08lx.\n", color); color = get_surface_color(rt, 400, 245); - ok(compare_color(color, 0x000000ff, 2), "Got unexpected color 0x%08x.\n", color); + ok(compare_color(color, 0x000000ff, 2), "Got unexpected color 0x%08lx.\n", color);
IDirect3DTexture_Release(texture); ref = IDirectDrawSurface_Release(surface); - ok(ref == 0, "Surface not properly released, refcount %u.\n", ref); + ok(ref == 0, "Surface not properly released, refcount %lu.\n", ref);
/* Test alpha with texture that has no alpha channel - alpha should be taken from diffuse vertex color. */ memset(&ddsd, 0, sizeof(ddsd)); @@ -8450,25 +8450,25 @@ static void test_texturemapblend(void) U4(ddsd.ddpfPixelFormat).dwBBitMask = 0x000000ff;
hr = IDirectDraw_CreateSurface(ddraw, &ddsd, &surface, NULL); - ok(SUCCEEDED(hr), "Failed to create surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create surface, hr %#lx.\n", hr);
hr = IDirectDrawSurface_QueryInterface(surface, &IID_IDirect3DTexture, (void **)&texture); - ok(SUCCEEDED(hr), "Failed to get texture interface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get texture interface, hr %#lx.\n", hr); hr = IDirect3DTexture_GetHandle(texture, device, &texture_handle); - ok(SUCCEEDED(hr), "Failed to get texture handle, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get texture handle, hr %#lx.\n", hr);
hr = IDirect3DViewport_Clear(viewport, 1, &clear_rect, D3DCLEAR_TARGET); - ok(SUCCEEDED(hr), "Failed to clear render target, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to clear render target, hr %#lx.\n", hr);
U5(fx).dwFillColor = 0xff0000ff; hr = IDirectDrawSurface_Blt(surface, NULL, NULL, NULL, DDBLT_COLORFILL | DDBLT_WAIT, &fx); - ok(SUCCEEDED(hr), "Failed to clear texture, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to clear texture, hr %#lx.\n", hr); U5(fx).dwFillColor = 0x800000ff; hr = IDirectDrawSurface_Blt(surface, &rect, NULL, NULL, DDBLT_COLORFILL | DDBLT_WAIT, &fx); - ok(SUCCEEDED(hr), "Failed to clear texture, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to clear texture, hr %#lx.\n", hr);
hr = IDirect3DExecuteBuffer_Lock(execute_buffer, &exec_desc); - ok(SUCCEEDED(hr), "Failed to lock execute buffer, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to lock execute buffer, hr %#lx.\n", hr);
ptr = ((BYTE *)exec_desc.lpData) + sizeof(test1_quads); emit_process_vertices(&ptr, D3DPROCESSVERTICES_COPY, 0, 8); @@ -8481,15 +8481,15 @@ static void test_texturemapblend(void) inst_length = (BYTE *)ptr - (BYTE *)exec_desc.lpData; inst_length -= sizeof(test1_quads); hr = IDirect3DExecuteBuffer_Unlock(execute_buffer); - ok(SUCCEEDED(hr), "Failed to unlock execute buffer, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to unlock execute buffer, hr %#lx.\n", hr); set_execute_data(execute_buffer, 8, sizeof(test1_quads), inst_length);
hr = IDirect3DDevice_BeginScene(device); - ok(SUCCEEDED(hr), "Failed to begin scene, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to begin scene, hr %#lx.\n", hr); hr = IDirect3DDevice_Execute(device, execute_buffer, viewport, D3DEXECUTE_UNCLIPPED); - ok(SUCCEEDED(hr), "Failed to execute exec buffer, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to execute exec buffer, hr %#lx.\n", hr); hr = IDirect3DDevice_EndScene(device); - ok(SUCCEEDED(hr), "Failed to end scene, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to end scene, hr %#lx.\n", hr);
/* Despite our best efforts at not making color keying randomly triggering, those * four broken() results occur every now and then on WARP. Presumably the non- @@ -8497,23 +8497,23 @@ static void test_texturemapblend(void) color = get_surface_color(rt, 5, 5); ok(compare_color(color, 0x000000ff, 2) || broken(ddraw_is_warp(ddraw) && compare_color(color, 0x00000000, 2)), - "Got unexpected color 0x%08x.\n", color); + "Got unexpected color 0x%08lx.\n", color); color = get_surface_color(rt, 400, 5); ok(compare_color(color, 0x000000ff, 2) || broken(ddraw_is_warp(ddraw) && compare_color(color, 0x00000000, 2)), - "Got unexpected color 0x%08x.\n", color); + "Got unexpected color 0x%08lx.\n", color); color = get_surface_color(rt, 5, 245); ok(compare_color(color, 0x00000080, 2) || broken(ddraw_is_warp(ddraw) && compare_color(color, 0x00000000, 2)), - "Got unexpected color 0x%08x.\n", color); + "Got unexpected color 0x%08lx.\n", color); color = get_surface_color(rt, 400, 245); ok(compare_color(color, 0x00000080, 2) || broken(ddraw_is_warp(ddraw) && compare_color(color, 0x00000000, 2)), - "Got unexpected color 0x%08x.\n", color); + "Got unexpected color 0x%08lx.\n", color);
IDirect3DTexture_Release(texture); ref = IDirectDrawSurface_Release(surface); - ok(ref == 0, "Surface not properly released, refcount %u.\n", ref); + ok(ref == 0, "Surface not properly released, refcount %lu.\n", ref);
/* Test RGB - should multiply color components from diffuse vertex color and texture. */ memset(&ddsd, 0, sizeof(ddsd)); @@ -8530,25 +8530,25 @@ static void test_texturemapblend(void) U4(ddsd.ddpfPixelFormat).dwBBitMask = 0x000000ff; U5(ddsd.ddpfPixelFormat).dwRGBAlphaBitMask = 0xff000000; hr = IDirectDraw_CreateSurface(ddraw, &ddsd, &surface, NULL); - ok(SUCCEEDED(hr), "Failed to create surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create surface, hr %#lx.\n", hr);
hr = IDirectDrawSurface_QueryInterface(surface, &IID_IDirect3DTexture, (void **)&texture); - ok(SUCCEEDED(hr), "Failed to get texture interface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get texture interface, hr %#lx.\n", hr); hr = IDirect3DTexture_GetHandle(texture, device, &texture_handle); - ok(SUCCEEDED(hr), "Failed to get texture handle, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get texture handle, hr %#lx.\n", hr);
hr = IDirect3DViewport_Clear(viewport, 1, &clear_rect, D3DCLEAR_TARGET); - ok(SUCCEEDED(hr), "Failed to clear render target, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to clear render target, hr %#lx.\n", hr);
U5(fx).dwFillColor = 0x00ffffff; hr = IDirectDrawSurface_Blt(surface, NULL, NULL, NULL, DDBLT_COLORFILL | DDBLT_WAIT, &fx); - ok(SUCCEEDED(hr), "Failed to clear texture, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to clear texture, hr %#lx.\n", hr); U5(fx).dwFillColor = 0x00ffff80; hr = IDirectDrawSurface_Blt(surface, &rect, NULL, NULL, DDBLT_COLORFILL | DDBLT_WAIT, &fx); - ok(SUCCEEDED(hr), "Failed to clear texture, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to clear texture, hr %#lx.\n", hr);
hr = IDirect3DExecuteBuffer_Lock(execute_buffer, &exec_desc); - ok(SUCCEEDED(hr), "Failed to lock execute buffer, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to lock execute buffer, hr %#lx.\n", hr);
memcpy(exec_desc.lpData, test2_quads, sizeof(test2_quads));
@@ -8564,15 +8564,15 @@ static void test_texturemapblend(void) inst_length = (BYTE *)ptr - (BYTE *)exec_desc.lpData; inst_length -= sizeof(test2_quads); hr = IDirect3DExecuteBuffer_Unlock(execute_buffer); - ok(SUCCEEDED(hr), "Failed to unlock execute buffer, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to unlock execute buffer, hr %#lx.\n", hr); set_execute_data(execute_buffer, 8, sizeof(test2_quads), inst_length);
hr = IDirect3DDevice_BeginScene(device); - ok(SUCCEEDED(hr), "Failed to begin scene, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to begin scene, hr %#lx.\n", hr); hr = IDirect3DDevice_Execute(device, execute_buffer, viewport, D3DEXECUTE_UNCLIPPED); - ok(SUCCEEDED(hr), "Failed to execute exec buffer, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to execute exec buffer, hr %#lx.\n", hr); hr = IDirect3DDevice_EndScene(device); - ok(SUCCEEDED(hr), "Failed to end scene, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to end scene, hr %#lx.\n", hr);
/* WARP (Win8 testbot) emulates color keying with the alpha channel like Wine does, * but even applies it when there's no color key assigned. The surface alpha is zero @@ -8582,20 +8582,20 @@ static void test_texturemapblend(void) * different defaults in ddraw1 and ddraw2. */ color = get_surface_color(rt, 5, 5); ok(compare_color(color, 0x00ff0040, 2) || broken(compare_color(color, 0x00000000, 1)), - "Got unexpected color 0x%08x.\n", color); + "Got unexpected color 0x%08lx.\n", color); color = get_surface_color(rt, 400, 5); ok(compare_color(color, 0x00ff0080, 2) || broken(compare_color(color, 0x00000000, 1)), - "Got unexpected color 0x%08x.\n", color); + "Got unexpected color 0x%08lx.\n", color); color = get_surface_color(rt, 5, 245); ok(compare_color(color, 0x00800080, 2) || broken(compare_color(color, 0x00000000, 1)), - "Got unexpected color 0x%08x.\n", color); + "Got unexpected color 0x%08lx.\n", color); color = get_surface_color(rt, 400, 245); ok(compare_color(color, 0x008000ff, 2) || broken(compare_color(color, 0x00000000, 1)), - "Got unexpected color 0x%08x.\n", color); + "Got unexpected color 0x%08lx.\n", color);
IDirect3DTexture_Release(texture); ref = IDirectDrawSurface_Release(surface); - ok(ref == 0, "Surface not properly released, refcount %u.\n", ref); + ok(ref == 0, "Surface not properly released, refcount %lu.\n", ref);
/* Test alpha again, now with color keyed texture (colorkey emulation in wine can interfere). */ memset(&ddsd, 0, sizeof(ddsd)); @@ -8612,30 +8612,30 @@ static void test_texturemapblend(void) U4(ddsd.ddpfPixelFormat).dwBBitMask = 0x001f;
hr = IDirectDraw_CreateSurface(ddraw, &ddsd, &surface, NULL); - ok(SUCCEEDED(hr), "Failed to create surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create surface, hr %#lx.\n", hr);
hr = IDirectDrawSurface_QueryInterface(surface, &IID_IDirect3DTexture, (void **)&texture); - ok(SUCCEEDED(hr), "Failed to get texture interface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get texture interface, hr %#lx.\n", hr); hr = IDirect3DTexture_GetHandle(texture, device, &texture_handle); - ok(SUCCEEDED(hr), "Failed to get texture handle, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get texture handle, hr %#lx.\n", hr);
hr = IDirect3DViewport_Clear(viewport, 1, &clear_rect, D3DCLEAR_TARGET); - ok(SUCCEEDED(hr), "Failed to clear render target, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to clear render target, hr %#lx.\n", hr);
U5(fx).dwFillColor = 0xf800; hr = IDirectDrawSurface_Blt(surface, NULL, NULL, NULL, DDBLT_COLORFILL | DDBLT_WAIT, &fx); - ok(SUCCEEDED(hr), "Failed to clear texture, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to clear texture, hr %#lx.\n", hr); U5(fx).dwFillColor = 0x001f; hr = IDirectDrawSurface_Blt(surface, &rect, NULL, NULL, DDBLT_COLORFILL | DDBLT_WAIT, &fx); - ok(SUCCEEDED(hr), "Failed to clear texture, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to clear texture, hr %#lx.\n", hr);
ckey.dwColorSpaceLowValue = 0x001f; ckey.dwColorSpaceHighValue = 0x001f; hr = IDirectDrawSurface_SetColorKey(surface, DDCKEY_SRCBLT, &ckey); - ok(SUCCEEDED(hr), "Failed to set color key, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set color key, hr %#lx.\n", hr);
hr = IDirect3DExecuteBuffer_Lock(execute_buffer, &exec_desc); - ok(SUCCEEDED(hr), "Failed to lock execute buffer, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to lock execute buffer, hr %#lx.\n", hr);
memcpy(exec_desc.lpData, test1_quads, sizeof(test1_quads));
@@ -8658,41 +8658,41 @@ static void test_texturemapblend(void) inst_length = (BYTE *)ptr - (BYTE *)exec_desc.lpData; inst_length -= sizeof(test1_quads); hr = IDirect3DExecuteBuffer_Unlock(execute_buffer); - ok(SUCCEEDED(hr), "Failed to unlock execute buffer, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to unlock execute buffer, hr %#lx.\n", hr); set_execute_data(execute_buffer, 8, sizeof(test1_quads), inst_length);
hr = IDirect3DDevice_BeginScene(device); - ok(SUCCEEDED(hr), "Failed to begin scene, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to begin scene, hr %#lx.\n", hr); hr = IDirect3DDevice_Execute(device, execute_buffer, viewport, D3DEXECUTE_UNCLIPPED); - ok(SUCCEEDED(hr), "Failed to execute exec buffer, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to execute exec buffer, hr %#lx.\n", hr); hr = IDirect3DDevice_EndScene(device); - ok(SUCCEEDED(hr), "Failed to end scene, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to end scene, hr %#lx.\n", hr);
/* Allow broken WARP results (colorkey disabled). */ color = get_surface_color(rt, 5, 5); ok(compare_color(color, 0x00000000, 2) || broken(compare_color(color, 0x000000ff, 2)), - "Got unexpected color 0x%08x.\n", color); + "Got unexpected color 0x%08lx.\n", color); color = get_surface_color(rt, 400, 5); - ok(compare_color(color, 0x00ff0000, 2), "Got unexpected color 0x%08x.\n", color); + ok(compare_color(color, 0x00ff0000, 2), "Got unexpected color 0x%08lx.\n", color); color = get_surface_color(rt, 5, 245); ok(compare_color(color, 0x00000000, 2) || broken(compare_color(color, 0x00000080, 2)), - "Got unexpected color 0x%08x.\n", color); + "Got unexpected color 0x%08lx.\n", color); color = get_surface_color(rt, 400, 245); - ok(compare_color(color, 0x00800000, 2), "Got unexpected color 0x%08x.\n", color); + ok(compare_color(color, 0x00800000, 2), "Got unexpected color 0x%08lx.\n", color);
IDirect3DTexture_Release(texture); ref = IDirectDrawSurface_Release(surface); - ok(ref == 0, "Surface not properly released, refcount %u.\n", ref); + ok(ref == 0, "Surface not properly released, refcount %lu.\n", ref);
ref = IDirect3DExecuteBuffer_Release(execute_buffer); - ok(ref == 0, "Execute buffer not properly released, refcount %u.\n", ref); + ok(ref == 0, "Execute buffer not properly released, refcount %lu.\n", ref); destroy_viewport(device, viewport); ref = IDirect3DMaterial_Release(material); - ok(ref == 0, "Material not properly released, refcount %u.\n", ref); + ok(ref == 0, "Material not properly released, refcount %lu.\n", ref); IDirectDrawSurface_Release(rt); IDirect3DDevice_Release(device); ref = IDirectDraw_Release(ddraw); - ok(ref == 0, "Ddraw object not properly released, refcount %u.\n", ref); + ok(ref == 0, "Ddraw object not properly released, refcount %lu.\n", ref); DestroyWindow(window); }
@@ -8722,32 +8722,32 @@ static void test_viewport_clear_rect(void) }
hr = IDirect3DDevice_QueryInterface(device, &IID_IDirectDrawSurface, (void **)&rt); - ok(SUCCEEDED(hr), "Failed to get render target, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get render target, hr %#lx.\n", hr);
red = create_diffuse_material(device, 1.0f, 0.0f, 0.0f, 1.0f); viewport = create_viewport(device, 0, 0, 640, 480); viewport_set_background(device, viewport, red); hr = IDirect3DViewport_Clear(viewport, 1, &clear_rect, D3DCLEAR_TARGET); - ok(SUCCEEDED(hr), "Failed to clear viewport, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to clear viewport, hr %#lx.\n", hr);
green = create_diffuse_material(device, 0.0f, 1.0f, 0.0f, 1.0f); viewport2 = create_viewport(device, 100, 100, 20, 20); viewport_set_background(device, viewport2, green); hr = IDirect3DViewport_Clear(viewport2, 1, &clear_rect2, D3DCLEAR_TARGET); - ok(SUCCEEDED(hr), "Failed to clear viewport, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to clear viewport, hr %#lx.\n", hr);
color = get_surface_color(rt, 85, 85); /* Outside both. */ - ok(compare_color(color, 0x00ff0000, 1), "Got unexpected color 0x%08x.\n", color); + ok(compare_color(color, 0x00ff0000, 1), "Got unexpected color 0x%08lx.\n", color); color = get_surface_color(rt, 95, 95); /* Outside vp, inside rect. */ /* AMD GPUs ignore the viewport dimensions and only care about the rectangle. */ ok(compare_color(color, 0x00ff0000, 1) || broken(compare_color(color, 0x0000ff00, 1)), - "Got unexpected color 0x%08x.\n", color); + "Got unexpected color 0x%08lx.\n", color); color = get_surface_color(rt, 105, 105); /* Inside both. */ - ok(compare_color(color, 0x0000ff00, 1), "Got unexpected color 0x%08x.\n", color); + ok(compare_color(color, 0x0000ff00, 1), "Got unexpected color 0x%08lx.\n", color); color = get_surface_color(rt, 115, 115); /* Inside vp, outside rect. */ - ok(compare_color(color, 0x00ff0000, 1), "Got unexpected color 0x%08x.\n", color); + ok(compare_color(color, 0x00ff0000, 1), "Got unexpected color 0x%08lx.\n", color); color = get_surface_color(rt, 125, 125); /* Outside both. */ - ok(compare_color(color, 0x00ff0000, 1), "Got unexpected color 0x%08x.\n", color); + ok(compare_color(color, 0x00ff0000, 1), "Got unexpected color 0x%08lx.\n", color);
destroy_viewport(device, viewport2); destroy_material(green); @@ -8756,7 +8756,7 @@ static void test_viewport_clear_rect(void) IDirectDrawSurface_Release(rt); IDirect3DDevice_Release(device); ref = IDirectDraw_Release(ddraw); - ok(ref == 0, "Ddraw object not properly released, refcount %u.\n", ref); + ok(ref == 0, "Ddraw object not properly released, refcount %lu.\n", ref); DestroyWindow(window); }
@@ -8938,13 +8938,13 @@ static void test_color_fill(void) }
hr = IDirectDraw_GetFourCCCodes(ddraw, &num_fourcc_codes, NULL); - ok(SUCCEEDED(hr), "Failed to get fourcc codes %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get fourcc codes %#lx.\n", hr); fourcc_codes = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, num_fourcc_codes * sizeof(*fourcc_codes)); if (!fourcc_codes) goto done; hr = IDirectDraw_GetFourCCCodes(ddraw, &num_fourcc_codes, fourcc_codes); - ok(SUCCEEDED(hr), "Failed to get fourcc codes %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get fourcc codes %#lx.\n", hr); for (i = 0; i < num_fourcc_codes; i++) { if (fourcc_codes[i] == MAKEFOURCC('Y', 'U', 'Y', '2')) @@ -8957,7 +8957,7 @@ static void test_color_fill(void) memset(&hal_caps, 0, sizeof(hal_caps)); hal_caps.dwSize = sizeof(hal_caps); hr = IDirectDraw_GetCaps(ddraw, &hal_caps, NULL); - ok(SUCCEEDED(hr), "Failed to get caps, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get caps, hr %#lx.\n", hr);
if ((!support_yuy2 && !support_uyvy) || !(hal_caps.dwCaps & DDCAPS_OVERLAY)) skip("Overlays or some YUV formats not supported, skipping YUV colorfill tests.\n"); @@ -8984,7 +8984,7 @@ static void test_color_fill(void) { struct format_support_check check = {&tests[i].format, FALSE}; hr = IDirect3DDevice_EnumTextureFormats(device, test_unsupported_formats_cb, &check); - ok(SUCCEEDED(hr), "Failed to enumerate texture formats %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to enumerate texture formats %#lx.\n", hr); if (!check.supported) continue; } @@ -9019,16 +9019,16 @@ static void test_color_fill(void) }
hr = IDirectDraw_CreateSurface(ddraw, &surface_desc, &surface, NULL); - ok(SUCCEEDED(hr), "Failed to create surface, hr %#x, surface %s.\n", hr, tests[i].name); + ok(SUCCEEDED(hr), "Failed to create surface, hr %#lx, surface %s.\n", hr, tests[i].name);
hr = IDirectDrawSurface_Blt(surface, NULL, NULL, NULL, DDBLT_COLORFILL | DDBLT_WAIT, &fx); todo_wine_if (tests[i].format.dwFourCC) - ok(hr == tests[i].colorfill_hr, "Blt returned %#x, expected %#x, surface %s.\n", + ok(hr == tests[i].colorfill_hr, "Blt returned %#lx, expected %#lx, surface %s.\n", hr, tests[i].colorfill_hr, tests[i].name);
hr = IDirectDrawSurface_Blt(surface, &rect, NULL, NULL, DDBLT_COLORFILL | DDBLT_WAIT, &fx); todo_wine_if (tests[i].format.dwFourCC) - ok(hr == tests[i].colorfill_hr, "Blt returned %#x, expected %#x, surface %s.\n", + ok(hr == tests[i].colorfill_hr, "Blt returned %#lx, expected %#lx, surface %s.\n", hr, tests[i].colorfill_hr, tests[i].name);
if (SUCCEEDED(hr) && tests[i].check_result) @@ -9036,19 +9036,19 @@ static void test_color_fill(void) memset(&surface_desc, 0, sizeof(surface_desc)); surface_desc.dwSize = sizeof(surface_desc); hr = IDirectDrawSurface_Lock(surface, NULL, &surface_desc, DDLOCK_READONLY, 0); - ok(SUCCEEDED(hr), "Failed to lock surface, hr %#x, surface %s.\n", hr, tests[i].name); + ok(SUCCEEDED(hr), "Failed to lock surface, hr %#lx, surface %s.\n", hr, tests[i].name); color = surface_desc.lpSurface; - ok(*color == tests[i].result, "Got clear result 0x%08x, expected 0x%08x, surface %s.\n", + ok(*color == tests[i].result, "Got clear result 0x%08lx, expected 0x%08lx, surface %s.\n", *color, tests[i].result, tests[i].name); hr = IDirectDrawSurface_Unlock(surface, NULL); - ok(SUCCEEDED(hr), "Failed to unlock surface, hr %#x, surface %s.\n", hr, tests[i].name); + ok(SUCCEEDED(hr), "Failed to unlock surface, hr %#lx, surface %s.\n", hr, tests[i].name); }
hr = IDirectDrawSurface_Blt(surface, NULL, NULL, NULL, DDBLT_DEPTHFILL | DDBLT_WAIT, &fx); - ok(hr == tests[i].depthfill_hr, "Blt returned %#x, expected %#x, surface %s.\n", + ok(hr == tests[i].depthfill_hr, "Blt returned %#lx, expected %#lx, surface %s.\n", hr, tests[i].depthfill_hr, tests[i].name); hr = IDirectDrawSurface_Blt(surface, &rect, NULL, NULL, DDBLT_DEPTHFILL | DDBLT_WAIT, &fx); - ok(hr == tests[i].depthfill_hr, "Blt returned %#x, expected %#x, surface %s.\n", + ok(hr == tests[i].depthfill_hr, "Blt returned %#lx, expected %#lx, surface %s.\n", hr, tests[i].depthfill_hr, tests[i].name);
if (SUCCEEDED(hr) && tests[i].check_result) @@ -9056,23 +9056,23 @@ static void test_color_fill(void) memset(&surface_desc, 0, sizeof(surface_desc)); surface_desc.dwSize = sizeof(surface_desc); hr = IDirectDrawSurface_Lock(surface, NULL, &surface_desc, DDLOCK_READONLY, 0); - ok(SUCCEEDED(hr), "Failed to lock surface, hr %#x, surface %s.\n", hr, tests[i].name); + ok(SUCCEEDED(hr), "Failed to lock surface, hr %#lx, surface %s.\n", hr, tests[i].name); color = surface_desc.lpSurface; todo_wine_if(tests[i].caps & DDSCAPS_VIDEOMEMORY && U2(surface_desc).dwZBufferBitDepth != 16) ok((*color & mask) == (tests[i].result & mask) || broken((*color & mask) == (expected_broken & mask)) || broken(is_warp && (*color & mask) == (~0u & mask)) /* Windows 8+ testbot. */, - "Got clear result 0x%08x, expected 0x%08x, surface %s.\n", + "Got clear result 0x%08lx, expected 0x%08lx, surface %s.\n", *color & mask, tests[i].result & mask, tests[i].name); hr = IDirectDrawSurface_Unlock(surface, NULL); - ok(SUCCEEDED(hr), "Failed to unlock surface, hr %#x, surface %s.\n", hr, tests[i].name); + ok(SUCCEEDED(hr), "Failed to unlock surface, hr %#lx, surface %s.\n", hr, tests[i].name); }
U5(fx).dwFillColor = 0xdeadbeef; fx.dwROP = BLACKNESS; hr = IDirectDrawSurface_Blt(surface, NULL, NULL, NULL, DDBLT_ROP | DDBLT_WAIT, &fx); - ok(FAILED(hr) == !tests[i].rop_success, "Blt returned %#x, expected %s, surface %s.\n", + ok(FAILED(hr) == !tests[i].rop_success, "Blt returned %#lx, expected %s, surface %s.\n", hr, tests[i].rop_success ? "success" : "failure", tests[i].name); - ok(U5(fx).dwFillColor == 0xdeadbeef, "dwFillColor was set to 0x%08x, surface %s\n", + ok(U5(fx).dwFillColor == 0xdeadbeef, "dwFillColor was set to 0x%08lx, surface %s\n", U5(fx).dwFillColor, tests[i].name);
if (SUCCEEDED(hr) && tests[i].check_result) @@ -9080,19 +9080,19 @@ static void test_color_fill(void) memset(&surface_desc, 0, sizeof(surface_desc)); surface_desc.dwSize = sizeof(surface_desc); hr = IDirectDrawSurface_Lock(surface, NULL, &surface_desc, DDLOCK_READONLY, 0); - ok(SUCCEEDED(hr), "Failed to lock surface, hr %#x, surface %s.\n", hr, tests[i].name); + ok(SUCCEEDED(hr), "Failed to lock surface, hr %#lx, surface %s.\n", hr, tests[i].name); color = surface_desc.lpSurface; - ok(*color == 0, "Got clear result 0x%08x, expected 0x00000000, surface %s.\n", + ok(*color == 0, "Got clear result 0x%08lx, expected 0x00000000, surface %s.\n", *color, tests[i].name); hr = IDirectDrawSurface_Unlock(surface, NULL); - ok(SUCCEEDED(hr), "Failed to unlock surface, hr %#x, surface %s.\n", hr, tests[i].name); + ok(SUCCEEDED(hr), "Failed to unlock surface, hr %#lx, surface %s.\n", hr, tests[i].name); }
fx.dwROP = WHITENESS; hr = IDirectDrawSurface_Blt(surface, NULL, NULL, NULL, DDBLT_ROP | DDBLT_WAIT, &fx); - ok(FAILED(hr) == !tests[i].rop_success, "Blt returned %#x, expected %s, surface %s.\n", + ok(FAILED(hr) == !tests[i].rop_success, "Blt returned %#lx, expected %s, surface %s.\n", hr, tests[i].rop_success ? "success" : "failure", tests[i].name); - ok(U5(fx).dwFillColor == 0xdeadbeef, "dwFillColor was set to 0x%08x, surface %s\n", + ok(U5(fx).dwFillColor == 0xdeadbeef, "dwFillColor was set to 0x%08lx, surface %s\n", U5(fx).dwFillColor, tests[i].name);
if (SUCCEEDED(hr) && tests[i].check_result) @@ -9100,13 +9100,13 @@ static void test_color_fill(void) memset(&surface_desc, 0, sizeof(surface_desc)); surface_desc.dwSize = sizeof(surface_desc); hr = IDirectDrawSurface_Lock(surface, NULL, &surface_desc, DDLOCK_READONLY, 0); - ok(SUCCEEDED(hr), "Failed to lock surface, hr %#x, surface %s.\n", hr, tests[i].name); + ok(SUCCEEDED(hr), "Failed to lock surface, hr %#lx, surface %s.\n", hr, tests[i].name); color = surface_desc.lpSurface; /* WHITENESS sets the alpha channel to 0x00. Ignore this for now. */ - ok((*color & 0x00ffffff) == 0x00ffffff, "Got clear result 0x%08x, expected 0xffffffff, surface %s.\n", + ok((*color & 0x00ffffff) == 0x00ffffff, "Got clear result 0x%08lx, expected 0xffffffff, surface %s.\n", *color, tests[i].name); hr = IDirectDrawSurface_Unlock(surface, NULL); - ok(SUCCEEDED(hr), "Failed to unlock surface, hr %#x, surface %s.\n", hr, tests[i].name); + ok(SUCCEEDED(hr), "Failed to unlock surface, hr %#lx, surface %s.\n", hr, tests[i].name); }
IDirectDrawSurface_Release(surface); @@ -9130,78 +9130,78 @@ static void test_color_fill(void) U4(surface_desc.ddpfPixelFormat).dwBBitMask = 0x000000ff; surface_desc.ddsCaps.dwCaps = DDSCAPS_OFFSCREENPLAIN | DDSCAPS_SYSTEMMEMORY; hr = IDirectDraw_CreateSurface(ddraw, &surface_desc, &surface, NULL); - ok(SUCCEEDED(hr), "Failed to create surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create surface, hr %#lx.\n", hr); hr = IDirectDraw_CreateSurface(ddraw, &surface_desc, &surface2, NULL); - ok(SUCCEEDED(hr), "Failed to create surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create surface, hr %#lx.\n", hr);
/* No DDBLTFX. */ hr = IDirectDrawSurface_Blt(surface, NULL, NULL, &rect, DDBLT_COLORFILL | DDBLT_WAIT, NULL); - ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface_Blt(surface, NULL, NULL, &rect, DDBLT_ROP | DDBLT_WAIT, NULL); - ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#lx.\n", hr);
/* Unused source rectangle. */ hr = IDirectDrawSurface_Blt(surface, NULL, NULL, &rect, DDBLT_COLORFILL | DDBLT_WAIT, &fx); - ok(SUCCEEDED(hr), "Got unexpected hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface_Blt(surface, NULL, NULL, &rect, DDBLT_ROP | DDBLT_WAIT, &fx); - ok(SUCCEEDED(hr), "Got unexpected hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Got unexpected hr %#lx.\n", hr);
/* Unused source surface. */ hr = IDirectDrawSurface_Blt(surface, NULL, surface2, NULL, DDBLT_COLORFILL | DDBLT_WAIT, &fx); - ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface_Blt(surface, NULL, surface2, NULL, DDBLT_ROP | DDBLT_WAIT, &fx); - ok(SUCCEEDED(hr), "Got unexpected hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface_Blt(surface, NULL, surface2, &rect, DDBLT_COLORFILL | DDBLT_WAIT, &fx); - ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface_Blt(surface, NULL, surface2, &rect, DDBLT_ROP | DDBLT_WAIT, &fx); - ok(SUCCEEDED(hr), "Got unexpected hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Got unexpected hr %#lx.\n", hr);
/* Inverted destination or source rectangle. */ SetRect(&rect, 5, 7, 7, 5); hr = IDirectDrawSurface_Blt(surface, &rect, NULL, NULL, DDBLT_COLORFILL | DDBLT_WAIT, &fx); - ok(hr == DDERR_INVALIDRECT, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_INVALIDRECT, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface_Blt(surface, NULL, NULL, &rect, DDBLT_COLORFILL | DDBLT_WAIT, &fx); - ok(SUCCEEDED(hr), "Got unexpected hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface_Blt(surface, &rect, surface2, NULL, DDBLT_COLORFILL | DDBLT_WAIT, &fx); - ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface_Blt(surface, NULL, surface2, &rect, DDBLT_COLORFILL | DDBLT_WAIT, &fx); - ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface_Blt(surface, NULL, surface2, &rect, DDBLT_ROP | DDBLT_WAIT, &fx); - ok(hr == DDERR_INVALIDRECT, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_INVALIDRECT, "Got unexpected hr %#lx.\n", hr);
/* Negative rectangle. */ SetRect(&rect, -1, -1, 5, 5); hr = IDirectDrawSurface_Blt(surface, &rect, NULL, NULL, DDBLT_COLORFILL | DDBLT_WAIT, &fx); - ok(hr == DDERR_INVALIDRECT, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_INVALIDRECT, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface_Blt(surface, NULL, NULL, &rect, DDBLT_COLORFILL | DDBLT_WAIT, &fx); - ok(SUCCEEDED(hr), "Got unexpected hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface_Blt(surface, &rect, surface2, NULL, DDBLT_COLORFILL | DDBLT_WAIT, &fx); - ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface_Blt(surface, &rect, surface2, &rect, DDBLT_COLORFILL | DDBLT_WAIT, &fx); - ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface_Blt(surface, NULL, surface2, &rect, DDBLT_ROP | DDBLT_WAIT, &fx); - ok(hr == DDERR_INVALIDRECT, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_INVALIDRECT, "Got unexpected hr %#lx.\n", hr);
/* Out of bounds rectangle. */ SetRect(&rect, 0, 0, 65, 65); hr = IDirectDrawSurface_Blt(surface, &rect, NULL, NULL, DDBLT_COLORFILL | DDBLT_WAIT, &fx); - ok(hr == DDERR_INVALIDRECT, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_INVALIDRECT, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface_Blt(surface, NULL, surface2, &rect, DDBLT_ROP | DDBLT_WAIT, &fx); - ok(hr == DDERR_INVALIDRECT, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_INVALIDRECT, "Got unexpected hr %#lx.\n", hr);
/* Combine multiple flags. */ hr = IDirectDrawSurface_Blt(surface, NULL, NULL, NULL, DDBLT_COLORFILL | DDBLT_DEPTHFILL | DDBLT_WAIT, &fx); - ok(SUCCEEDED(hr), "Got unexpected hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface_Blt(surface, NULL, NULL, NULL, DDBLT_COLORFILL | DDBLT_ROP | DDBLT_WAIT, &fx); - ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface_Blt(surface, &rect, NULL, NULL, DDBLT_COLORFILL | DDBLT_ROP | DDBLT_WAIT, &fx); - ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#lx.\n", hr);
for (i = 0; i < ARRAY_SIZE(rops); i++) { fx.dwROP = rops[i].rop; hr = IDirectDrawSurface_Blt(surface, NULL, surface2, NULL, DDBLT_ROP | DDBLT_WAIT, &fx); - ok(hr == rops[i].hr, "Got unexpected hr %#x for rop %s.\n", hr, rops[i].name); + ok(hr == rops[i].hr, "Got unexpected hr %#lx for rop %s.\n", hr, rops[i].name); }
IDirectDrawSurface_Release(surface2); @@ -9215,54 +9215,54 @@ static void test_color_fill(void) U2(surface_desc).dwZBufferBitDepth = get_device_z_depth(device); surface_desc.ddsCaps.dwCaps = DDSCAPS_ZBUFFER; hr = IDirectDraw_CreateSurface(ddraw, &surface_desc, &surface, NULL); - ok(SUCCEEDED(hr), "Failed to create surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create surface, hr %#lx.\n", hr); hr = IDirectDraw_CreateSurface(ddraw, &surface_desc, &surface2, NULL); - ok(SUCCEEDED(hr), "Failed to create surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create surface, hr %#lx.\n", hr);
/* No DDBLTFX. */ hr = IDirectDrawSurface_Blt(surface, NULL, NULL, &rect, DDBLT_DEPTHFILL | DDBLT_WAIT, NULL); - ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#lx.\n", hr);
/* Unused source rectangle. */ hr = IDirectDrawSurface_Blt(surface, NULL, NULL, &rect, DDBLT_DEPTHFILL | DDBLT_WAIT, &fx); - ok(SUCCEEDED(hr), "Got unexpected hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Got unexpected hr %#lx.\n", hr);
/* Unused source surface. */ hr = IDirectDrawSurface_Blt(surface, NULL, surface2, NULL, DDBLT_DEPTHFILL | DDBLT_WAIT, &fx); - ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface_Blt(surface, NULL, surface2, &rect, DDBLT_DEPTHFILL | DDBLT_WAIT, &fx); - ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#lx.\n", hr);
/* Inverted destination or source rectangle. */ SetRect(&rect, 5, 7, 7, 5); hr = IDirectDrawSurface_Blt(surface, &rect, NULL, NULL, DDBLT_DEPTHFILL | DDBLT_WAIT, &fx); - ok(hr == DDERR_INVALIDRECT, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_INVALIDRECT, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface_Blt(surface, NULL, NULL, &rect, DDBLT_DEPTHFILL | DDBLT_WAIT, &fx); - ok(SUCCEEDED(hr), "Got unexpected hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface_Blt(surface, &rect, surface2, NULL, DDBLT_DEPTHFILL | DDBLT_WAIT, &fx); - ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface_Blt(surface, NULL, surface2, &rect, DDBLT_DEPTHFILL | DDBLT_WAIT, &fx); - ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#lx.\n", hr);
/* Negative rectangle. */ SetRect(&rect, -1, -1, 5, 5); hr = IDirectDrawSurface_Blt(surface, &rect, NULL, NULL, DDBLT_DEPTHFILL | DDBLT_WAIT, &fx); - ok(hr == DDERR_INVALIDRECT, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_INVALIDRECT, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface_Blt(surface, NULL, NULL, &rect, DDBLT_DEPTHFILL | DDBLT_WAIT, &fx); - ok(SUCCEEDED(hr), "Got unexpected hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface_Blt(surface, &rect, surface2, NULL, DDBLT_DEPTHFILL | DDBLT_WAIT, &fx); - ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface_Blt(surface, &rect, surface2, &rect, DDBLT_DEPTHFILL | DDBLT_WAIT, &fx); - ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#lx.\n", hr);
/* Out of bounds rectangle. */ SetRect(&rect, 0, 0, 65, 65); hr = IDirectDrawSurface_Blt(surface, &rect, NULL, NULL, DDBLT_DEPTHFILL | DDBLT_WAIT, &fx); - ok(hr == DDERR_INVALIDRECT, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_INVALIDRECT, "Got unexpected hr %#lx.\n", hr);
/* Combine multiple flags. */ hr = IDirectDrawSurface_Blt(surface, NULL, NULL, NULL, DDBLT_COLORFILL | DDBLT_DEPTHFILL | DDBLT_WAIT, &fx); - ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#lx.\n", hr);
IDirectDrawSurface_Release(surface2); IDirectDrawSurface_Release(surface); @@ -9270,7 +9270,7 @@ static void test_color_fill(void) done: IDirect3DDevice_Release(device); refcount = IDirectDraw_Release(ddraw); - ok(refcount == 0, "Ddraw object not properly released, refcount %u.\n", refcount); + ok(refcount == 0, "Ddraw object not properly released, refcount %lu.\n", refcount); DestroyWindow(window); }
@@ -9359,7 +9359,7 @@ static void test_colorkey_precision(void) return; } hr = IDirect3DDevice_QueryInterface(device, &IID_IDirectDrawSurface, (void **)&rt); - ok(SUCCEEDED(hr), "Failed to get render target, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get render target, hr %#lx.\n", hr);
is_nvidia = ddraw_is_nvidia(ddraw); /* The Windows 8 WARP driver has plenty of false negatives in X8R8G8B8 @@ -9380,7 +9380,7 @@ static void test_colorkey_precision(void) exec_desc.dwBufferSize = 1024; exec_desc.dwCaps = D3DDEBCAPS_SYSTEMMEMORY; hr = IDirect3DDevice_CreateExecuteBuffer(device, &exec_desc, &execute_buffer, NULL); - ok(SUCCEEDED(hr), "Failed to create execute buffer, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create execute buffer, hr %#lx.\n", hr);
memset(&fx, 0, sizeof(fx)); fx.dwSize = sizeof(fx); @@ -9405,9 +9405,9 @@ static void test_colorkey_precision(void) /* Windows XP (at least with the r200 driver, other drivers untested) produces * garbage when doing color keyed texture->texture blits. */ hr = IDirectDraw_CreateSurface(ddraw, &surface_desc, &src, NULL); - ok(SUCCEEDED(hr), "Failed to create surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create surface, hr %#lx.\n", hr); hr = IDirectDraw_CreateSurface(ddraw, &surface_desc, &dst, NULL); - ok(SUCCEEDED(hr), "Failed to create surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create surface, hr %#lx.\n", hr);
U5(fx).dwFillColor = tests[t].clear; /* On the w8 testbot (WARP driver) the blit result has different values in the @@ -9425,16 +9425,16 @@ static void test_colorkey_precision(void) surface_desc.ddckCKSrcBlt.dwColorSpaceLowValue = c << tests[t].shift; surface_desc.ddckCKSrcBlt.dwColorSpaceHighValue = c << tests[t].shift; hr = IDirectDraw_CreateSurface(ddraw, &surface_desc, &texture, NULL); - ok(SUCCEEDED(hr), "Failed to create surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create surface, hr %#lx.\n", hr);
hr = IDirectDrawSurface_QueryInterface(texture, &IID_IDirect3DTexture, (void **)&d3d_texture); - ok(SUCCEEDED(hr), "Failed to get texture interface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get texture interface, hr %#lx.\n", hr); hr = IDirect3DTexture_GetHandle(d3d_texture, device, &handle); - ok(SUCCEEDED(hr), "Failed to get texture handle, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get texture handle, hr %#lx.\n", hr); IDirect3DTexture_Release(d3d_texture);
hr = IDirect3DExecuteBuffer_Lock(execute_buffer, &exec_desc); - ok(SUCCEEDED(hr), "Failed to lock execute buffer, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to lock execute buffer, hr %#lx.\n", hr);
memcpy(exec_desc.lpData, quad, sizeof(quad));
@@ -9459,14 +9459,14 @@ static void test_colorkey_precision(void) inst_length = (BYTE *)ptr - (BYTE *)exec_desc.lpData; inst_length -= sizeof(quad); hr = IDirect3DExecuteBuffer_Unlock(execute_buffer); - ok(SUCCEEDED(hr), "Failed to unlock execute buffer, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to unlock execute buffer, hr %#lx.\n", hr); set_execute_data(execute_buffer, 8, sizeof(quad), inst_length);
hr = IDirectDrawSurface_Blt(dst, NULL, NULL, NULL, DDBLT_COLORFILL | DDBLT_WAIT, &fx); - ok(SUCCEEDED(hr), "Failed to clear destination surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to clear destination surface, hr %#lx.\n", hr);
hr = IDirectDrawSurface_Lock(src, NULL, &lock_desc, DDLOCK_WAIT, NULL); - ok(SUCCEEDED(hr), "Failed to lock surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to lock surface, hr %#lx.\n", hr); switch (tests[t].bpp) { case 4: @@ -9484,21 +9484,21 @@ static void test_colorkey_precision(void) break; } hr = IDirectDrawSurface_Unlock(src, 0); - ok(SUCCEEDED(hr), "Failed to unlock surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to unlock surface, hr %#lx.\n", hr); hr = IDirectDrawSurface_Blt(texture, NULL, src, NULL, DDBLT_WAIT, NULL); - ok(SUCCEEDED(hr), "Failed to blit, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to blit, hr %#lx.\n", hr);
ckey.dwColorSpaceLowValue = c << tests[t].shift; ckey.dwColorSpaceHighValue = c << tests[t].shift; hr = IDirectDrawSurface_SetColorKey(src, DDCKEY_SRCBLT, &ckey); - ok(SUCCEEDED(hr), "Failed to set color key, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set color key, hr %#lx.\n", hr);
hr = IDirectDrawSurface_Blt(dst, NULL, src, NULL, DDBLT_KEYSRC | DDBLT_WAIT, NULL); - ok(SUCCEEDED(hr), "Failed to blit, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to blit, hr %#lx.\n", hr);
/* Don't make this read only, it somehow breaks the detection of the Nvidia bug below. */ hr = IDirectDrawSurface_Lock(dst, NULL, &lock_desc, DDLOCK_WAIT, NULL); - ok(SUCCEEDED(hr), "Failed to lock surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to lock surface, hr %#lx.\n", hr); switch (tests[t].bpp) { case 4: @@ -9516,11 +9516,11 @@ static void test_colorkey_precision(void) break; } hr = IDirectDrawSurface_Unlock(dst, 0); - ok(SUCCEEDED(hr), "Failed to unlock surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to unlock surface, hr %#lx.\n", hr);
if (!c) { - ok(data[0] == tests[t].clear, "Expected surface content %#x, got %#x, format %s, c=%u.\n", + ok(data[0] == tests[t].clear, "Expected surface content %#x, got %#lx, format %s, c=%u.\n", tests[t].clear, data[0], tests[t].name, c);
if (data[3] == tests[t].clear) @@ -9544,52 +9544,52 @@ static void test_colorkey_precision(void) } } else - ok(data[0] == (c - 1) << tests[t].shift, "Expected surface content %#x, got %#x, format %s, c=%u.\n", + ok(data[0] == (c - 1) << tests[t].shift, "Expected surface content %#x, got %#lx, format %s, c=%u.\n", (c - 1) << tests[t].shift, data[0], tests[t].name, c);
- ok(data[1] == tests[t].clear, "Expected surface content %#x, got %#x, format %s, c=%u.\n", + ok(data[1] == tests[t].clear, "Expected surface content %#x, got %#lx, format %s, c=%u.\n", tests[t].clear, data[1], tests[t].name, c);
if (c == tests[t].max) - ok(data[2] == tests[t].clear, "Expected surface content %#x, got %#x, format %s, c=%u.\n", + ok(data[2] == tests[t].clear, "Expected surface content %#x, got %#lx, format %s, c=%u.\n", tests[t].clear, data[2], tests[t].name, c); else - ok(data[2] == (c + 1) << tests[t].shift, "Expected surface content %#x, got %#x, format %s, c=%u.\n", + ok(data[2] == (c + 1) << tests[t].shift, "Expected surface content %#x, got %#lx, format %s, c=%u.\n", (c + 1) << tests[t].shift, data[2], tests[t].name, c);
hr = IDirect3DViewport_Clear(viewport, 1, &clear_rect, D3DCLEAR_TARGET); - ok(SUCCEEDED(hr), "Failed to clear, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to clear, hr %#lx.\n", hr);
hr = IDirect3DDevice_BeginScene(device); - ok(SUCCEEDED(hr), "Failed to begin scene, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to begin scene, hr %#lx.\n", hr); hr = IDirect3DDevice_Execute(device, execute_buffer, viewport, D3DEXECUTE_UNCLIPPED); - ok(SUCCEEDED(hr), "Failed to draw, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to draw, hr %#lx.\n", hr); hr = IDirect3DDevice_EndScene(device); - ok(SUCCEEDED(hr), "Failed to end scene, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to end scene, hr %#lx.\n", hr);
color = get_surface_color(rt, 80, 240); if (!c) ok(compare_color(color, 0x0000ff00, 1) || broken(is_warp && compare_color(color, 0x00000000, 1)), - "Got unexpected color 0x%08x, format %s, c=%u.\n", + "Got unexpected color 0x%08lx, format %s, c=%u.\n", color, tests[t].name, c); else ok(compare_color(color, 0x00000000, 1) || broken(is_warp && compare_color(color, 0x0000ff00, 1)), - "Got unexpected color 0x%08x, format %s, c=%u.\n", + "Got unexpected color 0x%08lx, format %s, c=%u.\n", color, tests[t].name, c);
color = get_surface_color(rt, 240, 240); ok(compare_color(color, 0x0000ff00, 1) || broken(is_warp && compare_color(color, 0x00000000, 1)), - "Got unexpected color 0x%08x, format %s, c=%u.\n", + "Got unexpected color 0x%08lx, format %s, c=%u.\n", color, tests[t].name, c);
color = get_surface_color(rt, 400, 240); if (c == tests[t].max) ok(compare_color(color, 0x0000ff00, 1) || broken(is_warp && compare_color(color, 0x00000000, 1)), - "Got unexpected color 0x%08x, format %s, c=%u.\n", + "Got unexpected color 0x%08lx, format %s, c=%u.\n", color, tests[t].name, c); else ok(compare_color(color, 0x00000000, 1) || broken(is_warp && compare_color(color, 0x0000ff00, 1)), - "Got unexpected color 0x%08x, format %s, c=%u.\n", + "Got unexpected color 0x%08lx, format %s, c=%u.\n", color, tests[t].name, c);
IDirectDrawSurface_Release(texture); @@ -9605,7 +9605,7 @@ done: IDirect3DExecuteBuffer_Release(execute_buffer); IDirect3DDevice_Release(device); refcount = IDirectDraw_Release(ddraw); - ok(refcount == 0, "Ddraw object not properly released, refcount %u.\n", refcount); + ok(refcount == 0, "Ddraw object not properly released, refcount %lu.\n", refcount); DestroyWindow(window); }
@@ -9623,7 +9623,7 @@ static void test_range_colorkey(void) ddraw = create_ddraw(); ok(!!ddraw, "Failed to create a ddraw object.\n"); hr = IDirectDraw_SetCooperativeLevel(ddraw, window, DDSCL_NORMAL); - ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#lx.\n", hr);
memset(&surface_desc, 0, sizeof(surface_desc)); surface_desc.dwSize = sizeof(surface_desc); @@ -9642,85 +9642,85 @@ static void test_range_colorkey(void) surface_desc.ddckCKSrcBlt.dwColorSpaceLowValue = 0x00000000; surface_desc.ddckCKSrcBlt.dwColorSpaceHighValue = 0x00000001; hr = IDirectDraw_CreateSurface(ddraw, &surface_desc, &surface, NULL); - ok(hr == DDERR_NOCOLORKEYHW, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_NOCOLORKEYHW, "Got unexpected hr %#lx.\n", hr);
surface_desc.ddckCKSrcBlt.dwColorSpaceLowValue = 0x00000001; surface_desc.ddckCKSrcBlt.dwColorSpaceHighValue = 0x00000000; hr = IDirectDraw_CreateSurface(ddraw, &surface_desc, &surface, NULL); - ok(hr == DDERR_NOCOLORKEYHW, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_NOCOLORKEYHW, "Got unexpected hr %#lx.\n", hr);
/* Same for DDSCAPS_OFFSCREENPLAIN. */ surface_desc.ddsCaps.dwCaps = DDSCAPS_OFFSCREENPLAIN; surface_desc.ddckCKSrcBlt.dwColorSpaceLowValue = 0x00000000; surface_desc.ddckCKSrcBlt.dwColorSpaceHighValue = 0x00000001; hr = IDirectDraw_CreateSurface(ddraw, &surface_desc, &surface, NULL); - ok(hr == DDERR_NOCOLORKEYHW, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_NOCOLORKEYHW, "Got unexpected hr %#lx.\n", hr);
surface_desc.ddckCKSrcBlt.dwColorSpaceLowValue = 0x00000001; surface_desc.ddckCKSrcBlt.dwColorSpaceHighValue = 0x00000000; hr = IDirectDraw_CreateSurface(ddraw, &surface_desc, &surface, NULL); - ok(hr == DDERR_NOCOLORKEYHW, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_NOCOLORKEYHW, "Got unexpected hr %#lx.\n", hr);
surface_desc.ddckCKSrcBlt.dwColorSpaceLowValue = 0x00000000; surface_desc.ddckCKSrcBlt.dwColorSpaceHighValue = 0x00000000; hr = IDirectDraw_CreateSurface(ddraw, &surface_desc, &surface, NULL); - ok(SUCCEEDED(hr), "Failed to create surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create surface, hr %#lx.\n", hr);
/* Setting a range color key without DDCKEY_COLORSPACE collapses the key. */ ckey.dwColorSpaceLowValue = 0x00000000; ckey.dwColorSpaceHighValue = 0x00000001; hr = IDirectDrawSurface_SetColorKey(surface, DDCKEY_SRCBLT, &ckey); - ok(SUCCEEDED(hr), "Failed to set color key, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set color key, hr %#lx.\n", hr);
hr = IDirectDrawSurface_GetColorKey(surface, DDCKEY_SRCBLT, &ckey); - ok(SUCCEEDED(hr), "Failed to get color key, hr %#x.\n", hr); - ok(!ckey.dwColorSpaceLowValue, "Got unexpected value 0x%08x.\n", ckey.dwColorSpaceLowValue); - ok(!ckey.dwColorSpaceHighValue, "Got unexpected value 0x%08x.\n", ckey.dwColorSpaceHighValue); + ok(SUCCEEDED(hr), "Failed to get color key, hr %#lx.\n", hr); + ok(!ckey.dwColorSpaceLowValue, "Got unexpected value 0x%08lx.\n", ckey.dwColorSpaceLowValue); + ok(!ckey.dwColorSpaceHighValue, "Got unexpected value 0x%08lx.\n", ckey.dwColorSpaceHighValue);
ckey.dwColorSpaceLowValue = 0x00000001; ckey.dwColorSpaceHighValue = 0x00000000; hr = IDirectDrawSurface_SetColorKey(surface, DDCKEY_SRCBLT, &ckey); - ok(SUCCEEDED(hr), "Failed to set color key, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set color key, hr %#lx.\n", hr);
hr = IDirectDrawSurface_GetColorKey(surface, DDCKEY_SRCBLT, &ckey); - ok(SUCCEEDED(hr), "Failed to get color key, hr %#x.\n", hr); - ok(ckey.dwColorSpaceLowValue == 0x00000001, "Got unexpected value 0x%08x.\n", ckey.dwColorSpaceLowValue); - ok(ckey.dwColorSpaceHighValue == 0x00000001, "Got unexpected value 0x%08x.\n", ckey.dwColorSpaceHighValue); + ok(SUCCEEDED(hr), "Failed to get color key, hr %#lx.\n", hr); + ok(ckey.dwColorSpaceLowValue == 0x00000001, "Got unexpected value 0x%08lx.\n", ckey.dwColorSpaceLowValue); + ok(ckey.dwColorSpaceHighValue == 0x00000001, "Got unexpected value 0x%08lx.\n", ckey.dwColorSpaceHighValue);
/* DDCKEY_COLORSPACE is ignored if the key is a single value. */ ckey.dwColorSpaceLowValue = 0x00000000; ckey.dwColorSpaceHighValue = 0x00000000; hr = IDirectDrawSurface_SetColorKey(surface, DDCKEY_SRCBLT | DDCKEY_COLORSPACE, &ckey); - ok(SUCCEEDED(hr), "Failed to set color key, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set color key, hr %#lx.\n", hr);
/* Using it with a range key results in DDERR_NOCOLORKEYHW. */ ckey.dwColorSpaceLowValue = 0x00000001; ckey.dwColorSpaceHighValue = 0x00000000; hr = IDirectDrawSurface_SetColorKey(surface, DDCKEY_SRCBLT | DDCKEY_COLORSPACE, &ckey); - ok(hr == DDERR_NOCOLORKEYHW, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_NOCOLORKEYHW, "Got unexpected hr %#lx.\n", hr); ckey.dwColorSpaceLowValue = 0x00000000; ckey.dwColorSpaceHighValue = 0x00000001; hr = IDirectDrawSurface_SetColorKey(surface, DDCKEY_SRCBLT | DDCKEY_COLORSPACE, &ckey); - ok(hr == DDERR_NOCOLORKEYHW, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_NOCOLORKEYHW, "Got unexpected hr %#lx.\n", hr); /* Range destination keys don't work either. */ hr = IDirectDrawSurface_SetColorKey(surface, DDCKEY_DESTBLT | DDCKEY_COLORSPACE, &ckey); - ok(hr == DDERR_NOCOLORKEYHW, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_NOCOLORKEYHW, "Got unexpected hr %#lx.\n", hr);
/* Just to show it's not because of A, R, and G having equal values. */ ckey.dwColorSpaceLowValue = 0x00000000; ckey.dwColorSpaceHighValue = 0x01010101; hr = IDirectDrawSurface_SetColorKey(surface, DDCKEY_SRCBLT | DDCKEY_COLORSPACE, &ckey); - ok(hr == DDERR_NOCOLORKEYHW, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_NOCOLORKEYHW, "Got unexpected hr %#lx.\n", hr);
/* None of these operations modified the key. */ hr = IDirectDrawSurface_GetColorKey(surface, DDCKEY_SRCBLT, &ckey); - ok(SUCCEEDED(hr), "Failed to get color key, hr %#x.\n", hr); - ok(!ckey.dwColorSpaceLowValue, "Got unexpected value 0x%08x.\n", ckey.dwColorSpaceLowValue); - ok(!ckey.dwColorSpaceHighValue, "Got unexpected value 0x%08x.\n", ckey.dwColorSpaceHighValue); + ok(SUCCEEDED(hr), "Failed to get color key, hr %#lx.\n", hr); + ok(!ckey.dwColorSpaceLowValue, "Got unexpected value 0x%08lx.\n", ckey.dwColorSpaceLowValue); + ok(!ckey.dwColorSpaceHighValue, "Got unexpected value 0x%08lx.\n", ckey.dwColorSpaceHighValue);
IDirectDrawSurface_Release(surface); refcount = IDirectDraw_Release(ddraw); - ok(!refcount, "Got unexpected refcount %u.\n", refcount); + ok(!refcount, "Got unexpected refcount %lu.\n", refcount); DestroyWindow(window); }
@@ -9783,7 +9783,7 @@ static void test_shademode(void) }
hr = IDirect3DDevice_QueryInterface(device, &IID_IDirectDrawSurface, (void **)&rt); - ok(SUCCEEDED(hr), "Failed to get render target, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get render target, hr %#lx.\n", hr);
background = create_diffuse_material(device, 1.0f, 1.0f, 1.0f, 1.0f); viewport = create_viewport(device, 0, 0, 640, 480); @@ -9796,7 +9796,7 @@ static void test_shademode(void) exec_desc.dwCaps = D3DDEBCAPS_SYSTEMMEMORY;
hr = IDirect3DDevice_CreateExecuteBuffer(device, &exec_desc, &execute_buffer, NULL); - ok(SUCCEEDED(hr), "Failed to create execute buffer, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create execute buffer, hr %#lx.\n", hr);
/* Try it first with a TRIANGLESTRIP. Do it with different geometry because * the color fixups we have to do for FLAT shading will be dependent on that. */ @@ -9804,10 +9804,10 @@ static void test_shademode(void) for (i = 0; i < ARRAY_SIZE(tests); ++i) { hr = IDirect3DViewport_Clear(viewport, 1, &clear_rect, D3DCLEAR_TARGET); - ok(SUCCEEDED(hr), "Failed to clear viewport, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to clear viewport, hr %#lx.\n", hr);
hr = IDirect3DExecuteBuffer_Lock(execute_buffer, &exec_desc); - ok(SUCCEEDED(hr), "Failed to lock execute buffer, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to lock execute buffer, hr %#lx.\n", hr);
quad = tests[i].primtype == D3DPT_TRIANGLESTRIP ? quad_strip : quad_list; memcpy(exec_desc.lpData, quad, sizeof(quad_strip)); @@ -9827,14 +9827,14 @@ static void test_shademode(void) inst_length -= sizeof(quad_strip);
hr = IDirect3DExecuteBuffer_Unlock(execute_buffer); - ok(SUCCEEDED(hr), "Failed to unlock execute buffer, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to unlock execute buffer, hr %#lx.\n", hr);
hr = IDirect3DDevice_BeginScene(device); set_execute_data(execute_buffer, 4, sizeof(quad_strip), inst_length); hr = IDirect3DDevice_Execute(device, execute_buffer, viewport, D3DEXECUTE_CLIPPED); - ok(SUCCEEDED(hr), "Failed to execute exec buffer, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to execute exec buffer, hr %#lx.\n", hr); hr = IDirect3DDevice_EndScene(device); - ok(SUCCEEDED(hr), "Failed to end scene, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to end scene, hr %#lx.\n", hr);
color0 = get_surface_color(rt, 100, 100); /* Inside first triangle */ color1 = get_surface_color(rt, 500, 350); /* Inside second triangle */ @@ -9844,9 +9844,9 @@ static void test_shademode(void) * functionality being available. */ /* PHONG should be the same as GOURAUD, since no hardware implements * this. */ - ok(compare_color(color0, tests[i].color0, 1), "Test %u shading has color0 %08x, expected %08x.\n", + ok(compare_color(color0, tests[i].color0, 1), "Test %u shading has color0 %08lx, expected %08lx.\n", i, color0, tests[i].color0); - ok(compare_color(color1, tests[i].color1, 1), "Test %u shading has color1 %08x, expected %08x.\n", + ok(compare_color(color1, tests[i].color1, 1), "Test %u shading has color1 %08lx, expected %08lx.\n", i, color1, tests[i].color1); }
@@ -9855,7 +9855,7 @@ static void test_shademode(void) destroy_material(background); IDirectDrawSurface_Release(rt); refcount = IDirect3DDevice_Release(device); - ok(!refcount, "Device has %u references left.\n", refcount); + ok(!refcount, "Device has %lu references left.\n", refcount); IDirectDraw_Release(ddraw); DestroyWindow(window); } @@ -9909,12 +9909,12 @@ static void test_lockrect_invalid(void) ddraw = create_ddraw(); ok(!!ddraw, "Failed to create a ddraw object.\n"); hr = IDirectDraw_SetCooperativeLevel(ddraw, window, DDSCL_NORMAL); - ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#lx.\n", hr);
memset(&hal_caps, 0, sizeof(hal_caps)); hal_caps.dwSize = sizeof(hal_caps); hr = IDirectDraw_GetCaps(ddraw, &hal_caps, NULL); - ok(SUCCEEDED(hr), "Failed to get caps, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get caps, hr %#lx.\n", hr); if ((hal_caps.ddsCaps.dwCaps & needed_caps) != needed_caps) { skip("Required surface types not supported, skipping test.\n"); @@ -9937,10 +9937,10 @@ static void test_lockrect_invalid(void) U4(surface_desc.ddpfPixelFormat).dwBBitMask = 0x0000ff;
hr = IDirectDraw_CreateSurface(ddraw, &surface_desc, &surface, NULL); - ok(SUCCEEDED(hr), "Failed to create surface, hr %#x, type %s.\n", hr, resources[r].name); + ok(SUCCEEDED(hr), "Failed to create surface, hr %#lx, type %s.\n", hr, resources[r].name);
hr = IDirectDrawSurface_Lock(surface, NULL, NULL, DDLOCK_WAIT, NULL); - ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#x, type %s.\n", hr, resources[r].name); + ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#lx, type %s.\n", hr, resources[r].name);
for (i = 0; i < ARRAY_SIZE(valid); ++i) { @@ -9950,11 +9950,11 @@ static void test_lockrect_invalid(void) surface_desc.dwSize = sizeof(surface_desc);
hr = IDirectDrawSurface_Lock(surface, rect, &surface_desc, DDLOCK_WAIT, NULL); - ok(SUCCEEDED(hr), "Lock failed (%#x) for rect %s, type %s.\n", + ok(SUCCEEDED(hr), "Lock failed (%#lx) for rect %s, type %s.\n", hr, wine_dbgstr_rect(rect), resources[r].name);
hr = IDirectDrawSurface_Unlock(surface, NULL); - ok(SUCCEEDED(hr), "Failed to unlock surface, hr %#x, type %s.\n", hr, resources[r].name); + ok(SUCCEEDED(hr), "Failed to unlock surface, hr %#lx, type %s.\n", hr, resources[r].name); }
for (i = 0; i < ARRAY_SIZE(invalid); ++i) @@ -9965,37 +9965,37 @@ static void test_lockrect_invalid(void) surface_desc.dwSize = sizeof(surface_desc);
hr = IDirectDrawSurface_Lock(surface, rect, &surface_desc, DDLOCK_WAIT, NULL); - ok(hr == resources[r].hr, "Lock returned %#x for rect %s, type %s.\n", + ok(hr == resources[r].hr, "Lock returned %#lx for rect %s, type %s.\n", hr, wine_dbgstr_rect(rect), resources[r].name); if (SUCCEEDED(hr)) { hr = IDirectDrawSurface_Unlock(surface, NULL); - ok(SUCCEEDED(hr), "Failed to unlock surface, hr %#x, type %s.\n", hr, resources[r].name); + ok(SUCCEEDED(hr), "Failed to unlock surface, hr %#lx, type %s.\n", hr, resources[r].name); } else ok(!surface_desc.lpSurface, "Got unexpected lpSurface %p.\n", surface_desc.lpSurface); }
hr = IDirectDrawSurface_Lock(surface, NULL, &surface_desc, DDLOCK_WAIT, NULL); - ok(SUCCEEDED(hr), "Lock(rect = NULL) failed, hr %#x, type %s.\n", + ok(SUCCEEDED(hr), "Lock(rect = NULL) failed, hr %#lx, type %s.\n", hr, resources[r].name); hr = IDirectDrawSurface_Lock(surface, NULL, &surface_desc, DDLOCK_WAIT, NULL); - ok(hr == DDERR_SURFACEBUSY, "Double lock(rect = NULL) returned %#x, type %s.\n", + ok(hr == DDERR_SURFACEBUSY, "Double lock(rect = NULL) returned %#lx, type %s.\n", hr, resources[r].name); hr = IDirectDrawSurface_Unlock(surface, NULL); - ok(SUCCEEDED(hr), "Failed to unlock surface, hr %#x, type %s.\n", hr, resources[r].name); + ok(SUCCEEDED(hr), "Failed to unlock surface, hr %#lx, type %s.\n", hr, resources[r].name);
hr = IDirectDrawSurface_Lock(surface, &valid[0], &surface_desc, DDLOCK_WAIT, NULL); - ok(SUCCEEDED(hr), "Lock(rect = %s) failed (%#x).\n", wine_dbgstr_rect(&valid[0]), hr); + ok(SUCCEEDED(hr), "Lock(rect = %s) failed (%#lx).\n", wine_dbgstr_rect(&valid[0]), hr); hr = IDirectDrawSurface_Lock(surface, &valid[0], &surface_desc, DDLOCK_WAIT, NULL); - ok(hr == DDERR_SURFACEBUSY, "Double lock(rect = %s) failed (%#x).\n", + ok(hr == DDERR_SURFACEBUSY, "Double lock(rect = %s) failed (%#lx).\n", wine_dbgstr_rect(&valid[0]), hr);
/* Locking a different rectangle returns DD_OK, but it seems to break the surface. * Afterwards unlocking the surface fails(NULL rectangle or both locked rectangles) */
hr = IDirectDrawSurface_Unlock(surface, NULL); - ok(SUCCEEDED(hr), "Failed to unlock surface, hr %#x, type %s.\n", hr, resources[r].name); + ok(SUCCEEDED(hr), "Failed to unlock surface, hr %#lx, type %s.\n", hr, resources[r].name);
IDirectDrawSurface_Release(surface); } @@ -10020,7 +10020,7 @@ static void test_yv12_overlay(void) ddraw = create_ddraw(); ok(!!ddraw, "Failed to create a ddraw object.\n"); hr = IDirectDraw_SetCooperativeLevel(ddraw, window, DDSCL_NORMAL); - ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#lx.\n", hr);
if (!(src_surface = create_overlay(ddraw, 256, 256, MAKEFOURCC('Y','V','1','2')))) { @@ -10031,17 +10031,17 @@ static void test_yv12_overlay(void) memset(&desc, 0, sizeof(desc)); desc.dwSize = sizeof(desc); hr = IDirectDrawSurface_Lock(src_surface, NULL, &desc, DDLOCK_WAIT, NULL); - ok(SUCCEEDED(hr), "Failed to lock surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to lock surface, hr %#lx.\n", hr);
ok(desc.dwFlags == (DDSD_WIDTH | DDSD_HEIGHT | DDSD_PIXELFORMAT | DDSD_CAPS | DDSD_PITCH), - "Got unexpected flags %#x.\n", desc.dwFlags); + "Got unexpected flags %#lx.\n", desc.dwFlags); ok(desc.ddsCaps.dwCaps == (DDSCAPS_OVERLAY | DDSCAPS_VIDEOMEMORY | DDSCAPS_LOCALVIDMEM | DDSCAPS_HWCODEC) || desc.ddsCaps.dwCaps == (DDSCAPS_OVERLAY | DDSCAPS_VIDEOMEMORY | DDSCAPS_LOCALVIDMEM), - "Got unexpected caps %#x.\n", desc.ddsCaps.dwCaps); - ok(desc.dwWidth == 256, "Got unexpected width %u.\n", desc.dwWidth); - ok(desc.dwHeight == 256, "Got unexpected height %u.\n", desc.dwHeight); + "Got unexpected caps %#lx.\n", desc.ddsCaps.dwCaps); + ok(desc.dwWidth == 256, "Got unexpected width %lu.\n", desc.dwWidth); + ok(desc.dwHeight == 256, "Got unexpected height %lu.\n", desc.dwHeight); /* The overlay pitch seems to have 256 byte alignment. */ - ok(!(U1(desc).lPitch & 0xff), "Got unexpected pitch %u.\n", U1(desc).lPitch); + ok(!(U1(desc).lPitch & 0xff), "Got unexpected pitch %lu.\n", U1(desc).lPitch);
/* Fill the surface with some data for the blit test. */ base = desc.lpSurface; @@ -10062,7 +10062,7 @@ static void test_yv12_overlay(void) }
hr = IDirectDrawSurface_Unlock(src_surface, NULL); - ok(SUCCEEDED(hr), "Failed to unlock surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to unlock surface, hr %#lx.\n", hr);
/* YV12 uses 2x2 blocks with 6 bytes per block (4*Y, 1*U, 1*V). Unlike * other block-based formats like DXT the entire Y channel is stored in @@ -10070,12 +10070,12 @@ static void test_yv12_overlay(void) * locks do not really make sense. Show that they are allowed nevertheless * and the offset points into the luminance data. */ hr = IDirectDrawSurface_Lock(src_surface, &rect, &desc, DDLOCK_WAIT, NULL); - ok(SUCCEEDED(hr), "Failed to lock surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to lock surface, hr %#lx.\n", hr); offset = ((const unsigned char *)desc.lpSurface - base); - ok(offset == rect.top * U1(desc).lPitch + rect.left, "Got unexpected offset %u, expected %u.\n", + ok(offset == rect.top * U1(desc).lPitch + rect.left, "Got unexpected offset %u, expected %lu.\n", offset, rect.top * U1(desc).lPitch + rect.left); hr = IDirectDrawSurface_Unlock(src_surface, NULL); - ok(SUCCEEDED(hr), "Failed to unlock surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to unlock surface, hr %#lx.\n", hr);
if (!(dst_surface = create_overlay(ddraw, 256, 256, MAKEFOURCC('Y','V','1','2')))) { @@ -10089,14 +10089,14 @@ static void test_yv12_overlay(void) hr = IDirectDrawSurface_Blt(dst_surface, NULL, src_surface, NULL, DDBLT_WAIT, NULL); /* VMware rejects YV12 blits. This behavior has not been seen on real * hardware yet, so mark it broken. */ - ok(SUCCEEDED(hr) || broken(hr == E_NOTIMPL), "Failed to blit, hr %#x.\n", hr); + ok(SUCCEEDED(hr) || broken(hr == E_NOTIMPL), "Failed to blit, hr %#lx.\n", hr);
if (SUCCEEDED(hr)) { memset(&desc, 0, sizeof(desc)); desc.dwSize = sizeof(desc); hr = IDirectDrawSurface_Lock(dst_surface, NULL, &desc, DDLOCK_WAIT, NULL); - ok(SUCCEEDED(hr), "Failed to lock surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to lock surface, hr %#lx.\n", hr);
base = desc.lpSurface; ok(base[0] == 0x10, "Got unexpected Y data 0x%02x.\n", base[0]); @@ -10106,7 +10106,7 @@ static void test_yv12_overlay(void) todo_wine ok(base[0] == 0x30, "Got unexpected U data 0x%02x.\n", base[0]);
hr = IDirectDrawSurface_Unlock(dst_surface, NULL); - ok(SUCCEEDED(hr), "Failed to unlock surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to unlock surface, hr %#lx.\n", hr); }
IDirectDrawSurface_Release(dst_surface); @@ -10142,7 +10142,7 @@ static void test_offscreen_overlay(void) ddraw = create_ddraw(); ok(!!ddraw, "Failed to create a ddraw object.\n"); hr = IDirectDraw_SetCooperativeLevel(ddraw, window, DDSCL_NORMAL); - ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#lx.\n", hr);
if (!(overlay = create_overlay(ddraw, 64, 64, MAKEFOURCC('U','Y','V','Y')))) { @@ -10155,21 +10155,21 @@ static void test_offscreen_overlay(void) surface_desc.dwFlags = DDSD_CAPS; surface_desc.ddsCaps.dwCaps = DDSCAPS_PRIMARYSURFACE; hr = IDirectDraw_CreateSurface(ddraw, &surface_desc, &primary, NULL); - ok(SUCCEEDED(hr), "Failed to create surface, hr %#x.\n",hr); + ok(SUCCEEDED(hr), "Failed to create surface, hr %#lx.\n",hr);
/* On Windows 7, and probably Vista, UpdateOverlay() will return * DDERR_OUTOFCAPS if the dwm is active. Calling GetDC() on the primary * surface prevents this by disabling the dwm. */ hr = IDirectDrawSurface_GetDC(primary, &dc); - ok(SUCCEEDED(hr), "Failed to get DC, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get DC, hr %#lx.\n", hr); hr = IDirectDrawSurface_ReleaseDC(primary, dc); - ok(SUCCEEDED(hr), "Failed to release DC, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to release DC, hr %#lx.\n", hr);
/* Try to overlay a NULL surface. */ hr = IDirectDrawSurface_UpdateOverlay(overlay, NULL, NULL, NULL, DDOVER_SHOW, NULL); - ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface_UpdateOverlay(overlay, NULL, NULL, NULL, DDOVER_HIDE, NULL); - ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#lx.\n", hr);
/* Try to overlay an offscreen surface. */ memset(&surface_desc, 0, sizeof(surface_desc)); @@ -10186,18 +10186,18 @@ static void test_offscreen_overlay(void) U3(surface_desc.ddpfPixelFormat).dwGBitMask = 0x07e0; U4(surface_desc.ddpfPixelFormat).dwBBitMask = 0x001f; hr = IDirectDraw_CreateSurface(ddraw, &surface_desc, &offscreen, NULL); - ok(SUCCEEDED(hr), "Failed to create surface, hr %#x.\n",hr); + ok(SUCCEEDED(hr), "Failed to create surface, hr %#lx.\n",hr);
hr = IDirectDrawSurface_UpdateOverlay(overlay, NULL, offscreen, NULL, DDOVER_SHOW, NULL); ok(SUCCEEDED(hr) || broken(hr == DDERR_OUTOFCAPS && dwm_enabled()) || broken(hr == E_NOTIMPL && ddraw_is_vmware(ddraw)), - "Failed to update overlay, hr %#x.\n", hr); + "Failed to update overlay, hr %#lx.\n", hr);
/* Try to overlay the primary with a non-overlay surface. */ hr = IDirectDrawSurface_UpdateOverlay(offscreen, NULL, primary, NULL, DDOVER_SHOW, NULL); - ok(hr == DDERR_NOTAOVERLAYSURFACE, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_NOTAOVERLAYSURFACE, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface_UpdateOverlay(offscreen, NULL, primary, NULL, DDOVER_HIDE, NULL); - ok(hr == DDERR_NOTAOVERLAYSURFACE, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_NOTAOVERLAYSURFACE, "Got unexpected hr %#lx.\n", hr);
IDirectDrawSurface_Release(offscreen); IDirectDrawSurface_Release(primary); @@ -10222,7 +10222,7 @@ static void test_overlay_rect(void) ddraw = create_ddraw(); ok(!!ddraw, "Failed to create a ddraw object.\n"); hr = IDirectDraw_SetCooperativeLevel(ddraw, window, DDSCL_NORMAL); - ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#lx.\n", hr);
if (!(overlay = create_overlay(ddraw, 64, 64, MAKEFOURCC('U','Y','V','Y')))) { @@ -10235,15 +10235,15 @@ static void test_overlay_rect(void) surface_desc.dwFlags = DDSD_CAPS; surface_desc.ddsCaps.dwCaps = DDSCAPS_PRIMARYSURFACE; hr = IDirectDraw_CreateSurface(ddraw, &surface_desc, &primary, NULL); - ok(SUCCEEDED(hr), "Failed to create surface, hr %#x.\n",hr); + ok(SUCCEEDED(hr), "Failed to create surface, hr %#lx.\n",hr);
/* On Windows 7, and probably Vista, UpdateOverlay() will return * DDERR_OUTOFCAPS if the dwm is active. Calling GetDC() on the primary * surface prevents this by disabling the dwm. */ hr = IDirectDrawSurface_GetDC(primary, &dc); - ok(SUCCEEDED(hr), "Failed to get DC, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get DC, hr %#lx.\n", hr); hr = IDirectDrawSurface_ReleaseDC(primary, dc); - ok(SUCCEEDED(hr), "Failed to release DC, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to release DC, hr %#lx.\n", hr);
/* On Windows 8 and newer DWM can't be turned off, making overlays unusable. */ if (dwm_enabled()) @@ -10256,48 +10256,48 @@ static void test_overlay_rect(void) * used. This is not true in Windows Vista and earlier, but changed in * Windows 7. */ hr = IDirectDrawSurface_UpdateOverlay(overlay, NULL, primary, &rect, DDOVER_SHOW, NULL); - ok(SUCCEEDED(hr), "Failed to update overlay, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to update overlay, hr %#lx.\n", hr); hr = IDirectDrawSurface_UpdateOverlay(overlay, NULL, primary, NULL, DDOVER_HIDE, NULL); - ok(SUCCEEDED(hr), "Failed to update overlay, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to update overlay, hr %#lx.\n", hr); hr = IDirectDrawSurface_UpdateOverlay(overlay, NULL, primary, NULL, DDOVER_SHOW, NULL); - ok(hr == DD_OK || hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK || hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#lx.\n", hr);
/* Show that the overlay position is the (top, left) coordinate of the * destination rectangle. */ OffsetRect(&rect, 32, 16); hr = IDirectDrawSurface_UpdateOverlay(overlay, NULL, primary, &rect, DDOVER_SHOW, NULL); - ok(SUCCEEDED(hr), "Failed to update overlay, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to update overlay, hr %#lx.\n", hr); pos_x = -1; pos_y = -1; hr = IDirectDrawSurface_GetOverlayPosition(overlay, &pos_x, &pos_y); - ok(SUCCEEDED(hr), "Failed to get overlay position, hr %#x.\n", hr); - ok(pos_x == rect.left, "Got unexpected pos_x %d, expected %d.\n", pos_x, rect.left); - ok(pos_y == rect.top, "Got unexpected pos_y %d, expected %d.\n", pos_y, rect.top); + ok(SUCCEEDED(hr), "Failed to get overlay position, hr %#lx.\n", hr); + ok(pos_x == rect.left, "Got unexpected pos_x %ld, expected %ld.\n", pos_x, rect.left); + ok(pos_y == rect.top, "Got unexpected pos_y %ld, expected %ld.\n", pos_y, rect.top);
/* Passing a NULL dest rect sets the position to 0/0. Visually it can be * seen that the overlay overlays the whole primary(==screen). */ hr2 = IDirectDrawSurface_UpdateOverlay(overlay, NULL, primary, NULL, 0, NULL); - ok(hr2 == DD_OK || hr2 == DDERR_INVALIDPARAMS || hr2 == DDERR_OUTOFCAPS, "Got unexpected hr %#x.\n", hr2); + ok(hr2 == DD_OK || hr2 == DDERR_INVALIDPARAMS || hr2 == DDERR_OUTOFCAPS, "Got unexpected hr %#lx.\n", hr2); hr = IDirectDrawSurface_GetOverlayPosition(overlay, &pos_x, &pos_y); - ok(SUCCEEDED(hr), "Failed to get overlay position, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get overlay position, hr %#lx.\n", hr); if (SUCCEEDED(hr2)) { - ok(!pos_x, "Got unexpected pos_x %d.\n", pos_x); - ok(!pos_y, "Got unexpected pos_y %d.\n", pos_y); + ok(!pos_x, "Got unexpected pos_x %ld.\n", pos_x); + ok(!pos_y, "Got unexpected pos_y %ld.\n", pos_y); } else { - ok(pos_x == 32, "Got unexpected pos_x %d.\n", pos_x); - ok(pos_y == 16, "Got unexpected pos_y %d.\n", pos_y); + ok(pos_x == 32, "Got unexpected pos_x %ld.\n", pos_x); + ok(pos_y == 16, "Got unexpected pos_y %ld.\n", pos_y); }
/* The position cannot be retrieved when the overlay is not shown. */ hr = IDirectDrawSurface_UpdateOverlay(overlay, NULL, primary, &rect, DDOVER_HIDE, NULL); - ok(SUCCEEDED(hr), "Failed to update overlay, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to update overlay, hr %#lx.\n", hr); pos_x = -1; pos_y = -1; hr = IDirectDrawSurface_GetOverlayPosition(overlay, &pos_x, &pos_y); - ok(hr == DDERR_OVERLAYNOTVISIBLE, "Got unexpected hr %#x.\n", hr); - ok(!pos_x, "Got unexpected pos_x %d.\n", pos_x); - ok(!pos_y, "Got unexpected pos_y %d.\n", pos_y); + ok(hr == DDERR_OVERLAYNOTVISIBLE, "Got unexpected hr %#lx.\n", hr); + ok(!pos_x, "Got unexpected pos_x %ld.\n", pos_x); + ok(!pos_y, "Got unexpected pos_y %ld.\n", pos_y);
done: if (primary) @@ -10351,7 +10351,7 @@ static void test_blt(void) }
hr = IDirect3DDevice_QueryInterface(device, &IID_IDirectDrawSurface, (void **)&rt); - ok(SUCCEEDED(hr), "Failed to get render target, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get render target, hr %#lx.\n", hr);
memset(&surface_desc, 0, sizeof(surface_desc)); surface_desc.dwSize = sizeof(surface_desc); @@ -10360,36 +10360,36 @@ static void test_blt(void) surface_desc.dwHeight = 480; surface_desc.ddsCaps.dwCaps = DDSCAPS_OFFSCREENPLAIN; hr = IDirectDraw_CreateSurface(ddraw, &surface_desc, &surface, NULL); - ok(SUCCEEDED(hr), "Failed to create surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create surface, hr %#lx.\n", hr);
hr = IDirectDrawSurface_Blt(surface, NULL, surface, NULL, 0, NULL); - ok(SUCCEEDED(hr), "Failed to blit, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to blit, hr %#lx.\n", hr);
hr = IDirectDrawSurface_Blt(surface, NULL, rt, NULL, 0, NULL); - ok(SUCCEEDED(hr), "Failed to blit, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to blit, hr %#lx.\n", hr);
for (i = 0; i < ARRAY_SIZE(test_data); ++i) { hr = IDirectDrawSurface_Blt(surface, &test_data[i].dst_rect, surface, &test_data[i].src_rect, DDBLT_WAIT, NULL); - ok(hr == test_data[i].hr, "Test %u: Got unexpected hr %#x, expected %#x.\n", i, hr, test_data[i].hr); + ok(hr == test_data[i].hr, "Test %u: Got unexpected hr %#lx, expected %#lx.\n", i, hr, test_data[i].hr);
hr = IDirectDrawSurface_Blt(surface, &test_data[i].dst_rect, rt, &test_data[i].src_rect, DDBLT_WAIT, NULL); - ok(hr == test_data[i].hr, "Test %u: Got unexpected hr %#x, expected %#x.\n", i, hr, test_data[i].hr); + ok(hr == test_data[i].hr, "Test %u: Got unexpected hr %#lx, expected %#lx.\n", i, hr, test_data[i].hr);
hr = IDirectDrawSurface_Blt(surface, &test_data[i].dst_rect, NULL, &test_data[i].src_rect, DDBLT_WAIT, NULL); - ok(hr == DDERR_INVALIDPARAMS, "Test %u: Got unexpected hr %#x.\n", i, hr); + ok(hr == DDERR_INVALIDPARAMS, "Test %u: Got unexpected hr %#lx.\n", i, hr);
hr = IDirectDrawSurface_Blt(surface, &test_data[i].dst_rect, NULL, NULL, DDBLT_WAIT, NULL); - ok(hr == DDERR_INVALIDPARAMS, "Test %u: Got unexpected hr %#x.\n", i, hr); + ok(hr == DDERR_INVALIDPARAMS, "Test %u: Got unexpected hr %#lx.\n", i, hr); }
IDirectDrawSurface_Release(surface); IDirectDrawSurface_Release(rt); refcount = IDirect3DDevice_Release(device); - ok(!refcount, "Device has %u references left.\n", refcount); + ok(!refcount, "Device has %lu references left.\n", refcount); IDirectDraw_Release(ddraw); DestroyWindow(window); } @@ -10431,7 +10431,7 @@ static void test_blt_z_alpha(void) ddraw = create_ddraw(); ok(!!ddraw, "Failed to create a ddraw object.\n"); hr = IDirectDraw_SetCooperativeLevel(ddraw, window, DDSCL_NORMAL); - ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#lx.\n", hr);
memset(&pf, 0, sizeof(pf)); pf.dwSize = sizeof(pf); @@ -10451,9 +10451,9 @@ static void test_blt_z_alpha(void) surface_desc.ddsCaps.dwCaps = DDSCAPS_OFFSCREENPLAIN;
hr = IDirectDraw_CreateSurface(ddraw, &surface_desc, &src_surface, NULL); - ok(SUCCEEDED(hr), "Failed to create source surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create source surface, hr %#lx.\n", hr); hr = IDirectDraw_CreateSurface(ddraw, &surface_desc, &dst_surface, NULL); - ok(SUCCEEDED(hr), "Failed to create destination surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create destination surface, hr %#lx.\n", hr);
memset(&fx, 0, sizeof(fx)); fx.dwSize = sizeof(fx); @@ -10473,23 +10473,23 @@ static void test_blt_z_alpha(void) { U5(fx).dwFillColor = 0x3300ff00; hr = IDirectDrawSurface_Blt(src_surface, NULL, NULL, NULL, DDBLT_COLORFILL | DDBLT_WAIT, &fx); - ok(SUCCEEDED(hr), "Test %u: Got unexpected hr %#x.\n", i, hr); + ok(SUCCEEDED(hr), "Test %u: Got unexpected hr %#lx.\n", i, hr);
U5(fx).dwFillColor = 0xccff0000; hr = IDirectDrawSurface_Blt(dst_surface, NULL, NULL, NULL, DDBLT_COLORFILL | DDBLT_WAIT, &fx); - ok(SUCCEEDED(hr), "Test %u: Got unexpected hr %#x.\n", i, hr); + ok(SUCCEEDED(hr), "Test %u: Got unexpected hr %#lx.\n", i, hr);
hr = IDirectDrawSurface_Blt(dst_surface, NULL, src_surface, NULL, blt_flags[i] | DDBLT_WAIT, &fx); - ok(SUCCEEDED(hr), "Test %u: Got unexpected hr %#x.\n", i, hr); + ok(SUCCEEDED(hr), "Test %u: Got unexpected hr %#lx.\n", i, hr);
color = get_surface_color(dst_surface, 32, 32); - ok(compare_color(color, 0x0000ff00, 0), "Test %u: Got unexpected color 0x%08x.\n", i, color); + ok(compare_color(color, 0x0000ff00, 0), "Test %u: Got unexpected color 0x%08lx.\n", i, color); }
IDirectDrawSurface_Release(dst_surface); IDirectDrawSurface_Release(src_surface); refcount = IDirectDraw_Release(ddraw); - ok(!refcount, "DirectDraw has %u references left.\n", refcount); + ok(!refcount, "DirectDraw has %lu references left.\n", refcount); DestroyWindow(window); }
@@ -10535,7 +10535,7 @@ static void test_cross_device_blt(void) surface_desc.dwHeight = 480; surface_desc.ddsCaps.dwCaps = DDSCAPS_OFFSCREENPLAIN | DDSCAPS_SYSTEMMEMORY; hr = IDirectDraw_CreateSurface(ddraw, &surface_desc, &sysmem_surface, NULL); - ok(SUCCEEDED(hr), "Failed to create surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create surface, hr %#lx.\n", hr);
memset(&surface_desc, 0, sizeof(surface_desc)); surface_desc.dwSize = sizeof(surface_desc); @@ -10543,7 +10543,7 @@ static void test_cross_device_blt(void) surface_desc.ddsCaps.dwCaps = DDSCAPS_PRIMARYSURFACE | DDSCAPS_COMPLEX | DDSCAPS_FLIP | DDSCAPS_VIDEOMEMORY; surface_desc.dwBackBufferCount = 2; hr = IDirectDraw_CreateSurface(ddraw, &surface_desc, &surface, NULL); - ok(SUCCEEDED(hr), "Failed to create surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create surface, hr %#lx.\n", hr);
memset(&surface_desc, 0, sizeof(surface_desc)); surface_desc.dwSize = sizeof(surface_desc); @@ -10558,37 +10558,37 @@ static void test_cross_device_blt(void) U3(surface_desc.ddpfPixelFormat).dwGBitMask = 0x000003e0; U4(surface_desc.ddpfPixelFormat).dwBBitMask = 0x0000001f; hr = IDirectDraw_CreateSurface(ddraw2, &surface_desc, &surface2, NULL); - ok(SUCCEEDED(hr), "Failed to create surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create surface, hr %#lx.\n", hr);
memset(&fx, 0, sizeof(fx)); fx.dwSize = sizeof(fx); U5(fx).dwFillColor = 0xff0000ff; hr = IDirectDrawSurface_Blt(surface2, NULL, NULL, NULL, DDBLT_COLORFILL | DDBLT_WAIT, &fx); - ok(SUCCEEDED(hr), "Failed to fill surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to fill surface, hr %#lx.\n", hr);
hr = IDirectDrawSurface_Blt(surface, NULL, surface2, NULL, DDBLT_WAIT, NULL); - ok(hr == E_NOTIMPL, "Got unexpected hr %#x.\n", hr); + ok(hr == E_NOTIMPL, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface_Flip(surface, NULL, DDFLIP_WAIT); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface_Blt(surface, NULL, surface2, NULL, DDBLT_WAIT, NULL); - ok(hr == E_NOTIMPL, "Got unexpected hr %#x.\n", hr); + ok(hr == E_NOTIMPL, "Got unexpected hr %#lx.\n", hr); color = get_surface_color(surface, 320, 240); - ok(color == 0x00000000, "Got unexpected color 0x%08x.\n", color); + ok(color == 0x00000000, "Got unexpected color 0x%08lx.\n", color);
hr = IDirectDrawSurface_Blt(sysmem_surface, NULL, surface2, NULL, DDBLT_WAIT, NULL); - ok(hr == E_NOTIMPL, "Got unexpected hr %#x.\n", hr); + ok(hr == E_NOTIMPL, "Got unexpected hr %#lx.\n", hr); color = get_surface_color(sysmem_surface, 320, 240); - ok(color == 0x00000000, "Got unexpected color 0x%08x.\n", color); + ok(color == 0x00000000, "Got unexpected color 0x%08lx.\n", color);
hr = IDirectDraw_SetCooperativeLevel(ddraw, window, DDSCL_NORMAL); - ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#lx.\n", hr); hr = IDirectDrawSurface_IsLost(sysmem_surface); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
hr = IDirectDrawSurface_Blt(sysmem_surface, NULL, surface2, NULL, DDBLT_WAIT, NULL); - ok(hr == E_NOTIMPL, "Got unexpected hr %#x.\n", hr); + ok(hr == E_NOTIMPL, "Got unexpected hr %#lx.\n", hr); color = get_surface_color(sysmem_surface, 320, 240); - ok(color == 0x00000000, "Got unexpected color 0x%08x.\n", color); + ok(color == 0x00000000, "Got unexpected color 0x%08lx.\n", color);
IDirectDrawSurface_Release(surface2); memset(&surface_desc, 0, sizeof(surface_desc)); @@ -10598,22 +10598,22 @@ static void test_cross_device_blt(void) surface_desc.dwHeight = 480; surface_desc.ddsCaps.dwCaps = DDSCAPS_OFFSCREENPLAIN | DDSCAPS_SYSTEMMEMORY; hr = IDirectDraw_CreateSurface(ddraw2, &surface_desc, &surface2, NULL); - ok(SUCCEEDED(hr), "Failed to create surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create surface, hr %#lx.\n", hr); hr = IDirectDrawSurface_Blt(surface2, NULL, NULL, NULL, DDBLT_COLORFILL | DDBLT_WAIT, &fx); - ok(SUCCEEDED(hr), "Failed to fill surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to fill surface, hr %#lx.\n", hr);
hr = IDirectDrawSurface_Blt(sysmem_surface, NULL, surface2, NULL, DDBLT_WAIT, NULL); - todo_wine ok(hr == D3D_OK, "Failed to blit, hr %#x.\n", hr); + todo_wine ok(hr == D3D_OK, "Failed to blit, hr %#lx.\n", hr); color = get_surface_color(sysmem_surface, 320, 240); - todo_wine ok(compare_color(color, 0x000000ff, 1), "Got unexpected color 0x%08x.\n", color); + todo_wine ok(compare_color(color, 0x000000ff, 1), "Got unexpected color 0x%08lx.\n", color);
IDirectDrawSurface_Release(surface); IDirectDrawSurface_Release(surface2); IDirectDrawSurface_Release(sysmem_surface); refcount = IDirect3DDevice_Release(device); - ok(!refcount, "Device has %u references left.\n", refcount); + ok(!refcount, "Device has %lu references left.\n", refcount); refcount = IDirect3DDevice_Release(device2); - ok(!refcount, "Device has %u references left.\n", refcount); + ok(!refcount, "Device has %lu references left.\n", refcount); IDirectDraw_Release(ddraw); IDirectDraw_Release(ddraw2); DestroyWindow(window); @@ -10688,11 +10688,11 @@ static void test_getdc(void) ddraw = create_ddraw(); ok(!!ddraw, "Failed to create a ddraw object.\n"); hr = IDirectDraw_SetCooperativeLevel(ddraw, window, DDSCL_NORMAL); - ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#lx.\n", hr);
surface_desc.dwSize = sizeof(surface_desc); hr = IDirectDraw_GetDisplayMode(ddraw, &surface_desc); - ok(SUCCEEDED(hr), "Failed to get display mode, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get display mode, hr %#lx.\n", hr); screen_bpp = U1(surface_desc.ddpfPixelFormat).dwRGBBitCount;
for (i = 0; i < ARRAY_SIZE(test_data); ++i) @@ -10710,7 +10710,7 @@ static void test_getdc(void) surface_desc.ddsCaps.dwCaps = DDSCAPS_TEXTURE; if (FAILED(hr = IDirectDraw_CreateSurface(ddraw, &surface_desc, &surface, NULL))) { - skip("Failed to create surface for format %s (hr %#x), skipping tests.\n", test_data[i].name, hr); + skip("Failed to create surface for format %s (hr %#lx), skipping tests.\n", test_data[i].name, hr); continue; } } @@ -10719,9 +10719,9 @@ static void test_getdc(void) hr = IDirectDrawSurface_GetDC(surface, &dc); if (test_data[i].getdc_supported) ok(SUCCEEDED(hr) || broken(hr == test_data[i].alt_result || ddraw_is_vmware(ddraw)), - "Got unexpected hr %#x for format %s.\n", hr, test_data[i].name); + "Got unexpected hr %#lx for format %s.\n", hr, test_data[i].name); else - ok(FAILED(hr), "Got unexpected hr %#x for format %s.\n", hr, test_data[i].name); + ok(FAILED(hr), "Got unexpected hr %#lx for format %s.\n", hr, test_data[i].name);
if (SUCCEEDED(hr)) { @@ -10732,10 +10732,10 @@ static void test_getdc(void) int size;
type = GetObjectType(dc); - ok(type == OBJ_MEMDC, "Got unexpected object type %#x for format %s.\n", type, test_data[i].name); + ok(type == OBJ_MEMDC, "Got unexpected object type %#lx for format %s.\n", type, test_data[i].name); bitmap = GetCurrentObject(dc, OBJ_BITMAP); type = GetObjectType(bitmap); - ok(type == OBJ_BITMAP, "Got unexpected object type %#x for format %s.\n", type, test_data[i].name); + ok(type == OBJ_BITMAP, "Got unexpected object type %#lx for format %s.\n", type, test_data[i].name);
size = GetObjectA(bitmap, sizeof(dib), &dib); ok(size == sizeof(dib), "Got unexpected size %d for format %s.\n", size, test_data[i].name); @@ -10759,11 +10759,11 @@ static void test_getdc(void) ok(!!dib.dsBm.bmBits || broken(!pDwmIsCompositionEnabled && dib.dsBm.bmBitsPixel == screen_bpp), "Got unexpected bits %p for format %s.\n", dib.dsBm.bmBits, test_data[i].name);
- ok(dib.dsBmih.biSize == sizeof(dib.dsBmih), "Got unexpected size %u for format %s.\n", + ok(dib.dsBmih.biSize == sizeof(dib.dsBmih), "Got unexpected size %lu for format %s.\n", dib.dsBmih.biSize, test_data[i].name); - ok(dib.dsBmih.biWidth == surface_desc.dwWidth, "Got unexpected width %d for format %s.\n", + ok(dib.dsBmih.biWidth == surface_desc.dwWidth, "Got unexpected width %ld for format %s.\n", dib.dsBmih.biHeight, test_data[i].name); - ok(dib.dsBmih.biHeight == surface_desc.dwHeight, "Got unexpected height %d for format %s.\n", + ok(dib.dsBmih.biHeight == surface_desc.dwHeight, "Got unexpected height %ld for format %s.\n", dib.dsBmih.biHeight, test_data[i].name); ok(dib.dsBmih.biPlanes == 1, "Got unexpected plane count %u for format %s.\n", dib.dsBmih.biPlanes, test_data[i].name); @@ -10772,17 +10772,17 @@ static void test_getdc(void) dib.dsBmih.biBitCount, test_data[i].name); ok(dib.dsBmih.biCompression == (U1(test_data[i].format).dwRGBBitCount == 16 ? BI_BITFIELDS : BI_RGB) || broken(U1(test_data[i].format).dwRGBBitCount == 32 && dib.dsBmih.biCompression == BI_BITFIELDS), - "Got unexpected compression %#x for format %s.\n", + "Got unexpected compression %#lx for format %s.\n", dib.dsBmih.biCompression, test_data[i].name); - ok(!dib.dsBmih.biSizeImage, "Got unexpected image size %u for format %s.\n", + ok(!dib.dsBmih.biSizeImage, "Got unexpected image size %lu for format %s.\n", dib.dsBmih.biSizeImage, test_data[i].name); - ok(!dib.dsBmih.biXPelsPerMeter, "Got unexpected horizontal resolution %d for format %s.\n", + ok(!dib.dsBmih.biXPelsPerMeter, "Got unexpected horizontal resolution %ld for format %s.\n", dib.dsBmih.biXPelsPerMeter, test_data[i].name); - ok(!dib.dsBmih.biYPelsPerMeter, "Got unexpected vertical resolution %d for format %s.\n", + ok(!dib.dsBmih.biYPelsPerMeter, "Got unexpected vertical resolution %ld for format %s.\n", dib.dsBmih.biYPelsPerMeter, test_data[i].name); - ok(!dib.dsBmih.biClrUsed, "Got unexpected used colour count %u for format %s.\n", + ok(!dib.dsBmih.biClrUsed, "Got unexpected used colour count %lu for format %s.\n", dib.dsBmih.biClrUsed, test_data[i].name); - ok(!dib.dsBmih.biClrImportant, "Got unexpected important colour count %u for format %s.\n", + ok(!dib.dsBmih.biClrImportant, "Got unexpected important colour count %lu for format %s.\n", dib.dsBmih.biClrImportant, test_data[i].name);
if (dib.dsBmih.biCompression == BI_BITFIELDS) @@ -10791,20 +10791,20 @@ static void test_getdc(void) && dib.dsBitfields[1] == U3(test_data[i].format).dwGBitMask && dib.dsBitfields[2] == U4(test_data[i].format).dwBBitMask) || broken(!dib.dsBitfields[0] && !dib.dsBitfields[1] && !dib.dsBitfields[2]), - "Got unexpected colour masks 0x%08x 0x%08x 0x%08x for format %s.\n", + "Got unexpected colour masks 0x%08lx 0x%08lx 0x%08lx for format %s.\n", dib.dsBitfields[0], dib.dsBitfields[1], dib.dsBitfields[2], test_data[i].name); } else { ok(!dib.dsBitfields[0] && !dib.dsBitfields[1] && !dib.dsBitfields[2], - "Got unexpected colour masks 0x%08x 0x%08x 0x%08x for format %s.\n", + "Got unexpected colour masks 0x%08lx 0x%08lx 0x%08lx for format %s.\n", dib.dsBitfields[0], dib.dsBitfields[1], dib.dsBitfields[2], test_data[i].name); } ok(!dib.dshSection, "Got unexpected section %p for format %s.\n", dib.dshSection, test_data[i].name); - ok(!dib.dsOffset, "Got unexpected offset %u for format %s.\n", dib.dsOffset, test_data[i].name); + ok(!dib.dsOffset, "Got unexpected offset %lu for format %s.\n", dib.dsOffset, test_data[i].name);
hr = IDirectDrawSurface_ReleaseDC(surface, dc); - ok(hr == DD_OK, "Failed to release DC for format %s, hr %#x.\n", test_data[i].name, hr); + ok(hr == DD_OK, "Failed to release DC for format %s, hr %#lx.\n", test_data[i].name, hr); } else { @@ -10819,152 +10819,152 @@ static void test_getdc(void) surface_desc.ddsCaps.dwCaps = DDSCAPS_TEXTURE | DDSCAPS_COMPLEX | DDSCAPS_MIPMAP; if (FAILED(hr = IDirectDraw_CreateSurface(ddraw, &surface_desc, &surface, NULL))) { - skip("Failed to create mip-mapped texture for format %s (hr %#x), skipping tests.\n", + skip("Failed to create mip-mapped texture for format %s (hr %#lx), skipping tests.\n", test_data[i].name, hr); continue; }
hr = IDirectDrawSurface_GetAttachedSurface(surface, &caps, &tmp); - ok(SUCCEEDED(hr), "Failed to get attached surface for format %s, hr %#x.\n", test_data[i].name, hr); + ok(SUCCEEDED(hr), "Failed to get attached surface for format %s, hr %#lx.\n", test_data[i].name, hr); hr = IDirectDrawSurface_GetAttachedSurface(tmp, &caps, &surface2); - ok(SUCCEEDED(hr), "Failed to get attached surface for format %s, hr %#x.\n", test_data[i].name, hr); + ok(SUCCEEDED(hr), "Failed to get attached surface for format %s, hr %#lx.\n", test_data[i].name, hr); IDirectDrawSurface_Release(tmp);
hr = IDirectDrawSurface_GetDC(surface, &dc); - ok(SUCCEEDED(hr), "Failed to get DC for format %s, hr %#x.\n", test_data[i].name, hr); + ok(SUCCEEDED(hr), "Failed to get DC for format %s, hr %#lx.\n", test_data[i].name, hr); hr = IDirectDrawSurface_ReleaseDC(surface, dc); - ok(SUCCEEDED(hr), "Failed to release DC for format %s, hr %#x.\n", test_data[i].name, hr); + ok(SUCCEEDED(hr), "Failed to release DC for format %s, hr %#lx.\n", test_data[i].name, hr); hr = IDirectDrawSurface_GetDC(surface2, &dc); - ok(SUCCEEDED(hr), "Failed to get DC for format %s, hr %#x.\n", test_data[i].name, hr); + ok(SUCCEEDED(hr), "Failed to get DC for format %s, hr %#lx.\n", test_data[i].name, hr); hr = IDirectDrawSurface_ReleaseDC(surface2, dc); - ok(SUCCEEDED(hr), "Failed to release DC for format %s, hr %#x.\n", test_data[i].name, hr); + ok(SUCCEEDED(hr), "Failed to release DC for format %s, hr %#lx.\n", test_data[i].name, hr);
hr = IDirectDrawSurface_GetDC(surface, &dc); - ok(SUCCEEDED(hr), "Failed to get DC for format %s, hr %#x.\n", test_data[i].name, hr); + ok(SUCCEEDED(hr), "Failed to get DC for format %s, hr %#lx.\n", test_data[i].name, hr); dc2 = (void *)0x1234; hr = IDirectDrawSurface_GetDC(surface, &dc2); - ok(hr == DDERR_DCALREADYCREATED, "Got unexpected hr %#x for format %s.\n", hr, test_data[i].name); + ok(hr == DDERR_DCALREADYCREATED, "Got unexpected hr %#lx for format %s.\n", hr, test_data[i].name); ok(dc2 == (void *)0x1234, "Got unexpected dc %p for format %s.\n", dc, test_data[i].name); hr = IDirectDrawSurface_ReleaseDC(surface, dc); - ok(SUCCEEDED(hr), "Failed to release DC for format %s, hr %#x.\n", test_data[i].name, hr); + ok(SUCCEEDED(hr), "Failed to release DC for format %s, hr %#lx.\n", test_data[i].name, hr); hr = IDirectDrawSurface_ReleaseDC(surface, dc); - ok(hr == DDERR_NODC, "Got unexpected hr %#x for format %s.\n", hr, test_data[i].name); + ok(hr == DDERR_NODC, "Got unexpected hr %#lx for format %s.\n", hr, test_data[i].name);
map_desc.dwSize = sizeof(map_desc); hr = IDirectDrawSurface_Lock(surface, NULL, &map_desc, DDLOCK_READONLY | DDLOCK_WAIT, NULL); - ok(SUCCEEDED(hr), "Failed to map surface for format %s, hr %#x.\n", test_data[i].name, hr); + ok(SUCCEEDED(hr), "Failed to map surface for format %s, hr %#lx.\n", test_data[i].name, hr); hr = IDirectDrawSurface_Lock(surface, NULL, &map_desc, DDLOCK_READONLY | DDLOCK_WAIT, NULL); - ok(hr == DDERR_SURFACEBUSY, "Got unexpected hr %#x for format %s.\n", hr, test_data[i].name); + ok(hr == DDERR_SURFACEBUSY, "Got unexpected hr %#lx for format %s.\n", hr, test_data[i].name); hr = IDirectDrawSurface_Unlock(surface, NULL); - ok(SUCCEEDED(hr), "Failed to unmap surface for format %s, hr %#x.\n", test_data[i].name, hr); + ok(SUCCEEDED(hr), "Failed to unmap surface for format %s, hr %#lx.\n", test_data[i].name, hr); hr = IDirectDrawSurface_Unlock(surface, NULL); - ok(hr == DDERR_NOTLOCKED, "Got unexpected hr %#x for format %s.\n", hr, test_data[i].name); + ok(hr == DDERR_NOTLOCKED, "Got unexpected hr %#lx for format %s.\n", hr, test_data[i].name);
hr = IDirectDrawSurface_GetDC(surface, &dc); - ok(SUCCEEDED(hr), "Failed to get DC for format %s, hr %#x.\n", test_data[i].name, hr); + ok(SUCCEEDED(hr), "Failed to get DC for format %s, hr %#lx.\n", test_data[i].name, hr); hr = IDirectDrawSurface_Lock(surface, NULL, &map_desc, DDLOCK_READONLY | DDLOCK_WAIT, NULL); - ok(hr == DDERR_SURFACEBUSY, "Got unexpected hr %#x for format %s.\n", hr, test_data[i].name); + ok(hr == DDERR_SURFACEBUSY, "Got unexpected hr %#lx for format %s.\n", hr, test_data[i].name); hr = IDirectDrawSurface_ReleaseDC(surface, dc); - ok(SUCCEEDED(hr), "Failed to release DC for format %s, hr %#x.\n", test_data[i].name, hr); + ok(SUCCEEDED(hr), "Failed to release DC for format %s, hr %#lx.\n", test_data[i].name, hr);
hr = IDirectDrawSurface_Lock(surface, NULL, &map_desc, DDLOCK_READONLY | DDLOCK_WAIT, NULL); - ok(SUCCEEDED(hr), "Failed to map surface for format %s, hr %#x.\n", test_data[i].name, hr); + ok(SUCCEEDED(hr), "Failed to map surface for format %s, hr %#lx.\n", test_data[i].name, hr); hr = IDirectDrawSurface_GetDC(surface, &dc); - ok(SUCCEEDED(hr), "Failed to get DC for format %s, hr %#x.\n", test_data[i].name, hr); + ok(SUCCEEDED(hr), "Failed to get DC for format %s, hr %#lx.\n", test_data[i].name, hr); hr = IDirectDrawSurface_ReleaseDC(surface, dc); - ok(SUCCEEDED(hr), "Failed to release DC for format %s, hr %#x.\n", test_data[i].name, hr); + ok(SUCCEEDED(hr), "Failed to release DC for format %s, hr %#lx.\n", test_data[i].name, hr); /* Geforce 9600, Windows 7 returns E_FAIL. The unlock still seems to work as intended, after- * wards the surface can be locked again. ReleaseDC() does not unlock the surface, trying to * Lock it after ReleaseDC returns DDERR_SURFACEBUSY. ddraw4 and 7 are unaffected. */ hr = IDirectDrawSurface_Unlock(surface, NULL); ok(SUCCEEDED(hr) || broken(ddraw_is_nvidia(ddraw) && hr == E_FAIL), - "Failed to unmap surface for format %s, hr %#x.\n", test_data[i].name, hr); + "Failed to unmap surface for format %s, hr %#lx.\n", test_data[i].name, hr);
hr = IDirectDrawSurface_GetDC(surface, &dc); - ok(SUCCEEDED(hr), "Failed to get DC for format %s, hr %#x.\n", test_data[i].name, hr); + ok(SUCCEEDED(hr), "Failed to get DC for format %s, hr %#lx.\n", test_data[i].name, hr); hr = IDirectDrawSurface_GetDC(surface2, &dc2); - ok(SUCCEEDED(hr), "Failed to get DC for format %s, hr %#x.\n", test_data[i].name, hr); + ok(SUCCEEDED(hr), "Failed to get DC for format %s, hr %#lx.\n", test_data[i].name, hr); hr = IDirectDrawSurface_ReleaseDC(surface2, dc2); - ok(SUCCEEDED(hr), "Failed to release DC for format %s, hr %#x.\n", test_data[i].name, hr); + ok(SUCCEEDED(hr), "Failed to release DC for format %s, hr %#lx.\n", test_data[i].name, hr); hr = IDirectDrawSurface_ReleaseDC(surface, dc); - ok(SUCCEEDED(hr), "Failed to release DC for format %s, hr %#x.\n", test_data[i].name, hr); + ok(SUCCEEDED(hr), "Failed to release DC for format %s, hr %#lx.\n", test_data[i].name, hr);
hr = IDirectDrawSurface_GetDC(surface2, &dc); - ok(SUCCEEDED(hr), "Failed to get DC for format %s, hr %#x.\n", test_data[i].name, hr); + ok(SUCCEEDED(hr), "Failed to get DC for format %s, hr %#lx.\n", test_data[i].name, hr); hr = IDirectDrawSurface_GetDC(surface, &dc2); - ok(SUCCEEDED(hr), "Failed to get DC for format %s, hr %#x.\n", test_data[i].name, hr); + ok(SUCCEEDED(hr), "Failed to get DC for format %s, hr %#lx.\n", test_data[i].name, hr); hr = IDirectDrawSurface_ReleaseDC(surface, dc2); - ok(SUCCEEDED(hr), "Failed to release DC for format %s, hr %#x.\n", test_data[i].name, hr); + ok(SUCCEEDED(hr), "Failed to release DC for format %s, hr %#lx.\n", test_data[i].name, hr); hr = IDirectDrawSurface_ReleaseDC(surface2, dc); - ok(SUCCEEDED(hr), "Failed to release DC for format %s, hr %#x.\n", test_data[i].name, hr); + ok(SUCCEEDED(hr), "Failed to release DC for format %s, hr %#lx.\n", test_data[i].name, hr);
hr = IDirectDrawSurface_Lock(surface, NULL, &map_desc, DDLOCK_READONLY | DDLOCK_WAIT, NULL); - ok(SUCCEEDED(hr), "Failed to map surface for format %s, hr %#x.\n", test_data[i].name, hr); + ok(SUCCEEDED(hr), "Failed to map surface for format %s, hr %#lx.\n", test_data[i].name, hr); hr = IDirectDrawSurface_Lock(surface2, NULL, &map_desc, DDLOCK_READONLY | DDLOCK_WAIT, NULL); - ok(SUCCEEDED(hr), "Failed to map surface for format %s, hr %#x.\n", test_data[i].name, hr); + ok(SUCCEEDED(hr), "Failed to map surface for format %s, hr %#lx.\n", test_data[i].name, hr); hr = IDirectDrawSurface_Unlock(surface2, NULL); - ok(SUCCEEDED(hr), "Failed to unmap surface for format %s, hr %#x.\n", test_data[i].name, hr); + ok(SUCCEEDED(hr), "Failed to unmap surface for format %s, hr %#lx.\n", test_data[i].name, hr); hr = IDirectDrawSurface_Unlock(surface, NULL); - ok(SUCCEEDED(hr), "Failed to unmap surface for format %s, hr %#x.\n", test_data[i].name, hr); + ok(SUCCEEDED(hr), "Failed to unmap surface for format %s, hr %#lx.\n", test_data[i].name, hr);
hr = IDirectDrawSurface_Lock(surface, NULL, &map_desc, DDLOCK_READONLY | DDLOCK_WAIT, NULL); - ok(SUCCEEDED(hr), "Failed to map surface for format %s, hr %#x.\n", test_data[i].name, hr); + ok(SUCCEEDED(hr), "Failed to map surface for format %s, hr %#lx.\n", test_data[i].name, hr); hr = IDirectDrawSurface_GetDC(surface, &dc); - ok(SUCCEEDED(hr), "Failed to get DC for format %s, hr %#x.\n", test_data[i].name, hr); + ok(SUCCEEDED(hr), "Failed to get DC for format %s, hr %#lx.\n", test_data[i].name, hr); hr = IDirectDrawSurface_ReleaseDC(surface, dc); - ok(SUCCEEDED(hr), "Failed to release DC for format %s, hr %#x.\n", test_data[i].name, hr); + ok(SUCCEEDED(hr), "Failed to release DC for format %s, hr %#lx.\n", test_data[i].name, hr); hr = IDirectDrawSurface_Unlock(surface, NULL); ok(SUCCEEDED(hr) || broken(ddraw_is_nvidia(ddraw) && hr == E_FAIL), - "Failed to unmap surface for format %s, hr %#x.\n", test_data[i].name, hr); + "Failed to unmap surface for format %s, hr %#lx.\n", test_data[i].name, hr);
hr = IDirectDrawSurface_Lock(surface2, NULL, &map_desc, DDLOCK_READONLY | DDLOCK_WAIT, NULL); - ok(SUCCEEDED(hr), "Failed to map surface for format %s, hr %#x.\n", test_data[i].name, hr); + ok(SUCCEEDED(hr), "Failed to map surface for format %s, hr %#lx.\n", test_data[i].name, hr); hr = IDirectDrawSurface_GetDC(surface, &dc); - ok(SUCCEEDED(hr), "Failed to get DC for format %s, hr %#x.\n", test_data[i].name, hr); + ok(SUCCEEDED(hr), "Failed to get DC for format %s, hr %#lx.\n", test_data[i].name, hr); hr = IDirectDrawSurface_ReleaseDC(surface, dc); - ok(SUCCEEDED(hr), "Failed to release DC for format %s, hr %#x.\n", test_data[i].name, hr); + ok(SUCCEEDED(hr), "Failed to release DC for format %s, hr %#lx.\n", test_data[i].name, hr); hr = IDirectDrawSurface_Unlock(surface2, NULL); - ok(SUCCEEDED(hr), "Failed to unmap surface for format %s, hr %#x.\n", test_data[i].name, hr); + ok(SUCCEEDED(hr), "Failed to unmap surface for format %s, hr %#lx.\n", test_data[i].name, hr);
hr = IDirectDrawSurface_GetDC(surface, &dc); - ok(SUCCEEDED(hr), "Failed to get DC for format %s, hr %#x.\n", test_data[i].name, hr); + ok(SUCCEEDED(hr), "Failed to get DC for format %s, hr %#lx.\n", test_data[i].name, hr); hr = IDirectDrawSurface_Lock(surface2, NULL, &map_desc, DDLOCK_READONLY | DDLOCK_WAIT, NULL); - ok(SUCCEEDED(hr), "Failed to map surface for format %s, hr %#x.\n", test_data[i].name, hr); + ok(SUCCEEDED(hr), "Failed to map surface for format %s, hr %#lx.\n", test_data[i].name, hr); hr = IDirectDrawSurface_Unlock(surface2, NULL); - ok(SUCCEEDED(hr), "Failed to unmap surface for format %s, hr %#x.\n", test_data[i].name, hr); + ok(SUCCEEDED(hr), "Failed to unmap surface for format %s, hr %#lx.\n", test_data[i].name, hr); hr = IDirectDrawSurface_ReleaseDC(surface, dc); - ok(SUCCEEDED(hr), "Failed to release DC for format %s, hr %#x.\n", test_data[i].name, hr); + ok(SUCCEEDED(hr), "Failed to release DC for format %s, hr %#lx.\n", test_data[i].name, hr);
hr = IDirectDrawSurface_GetDC(surface2, &dc); - ok(SUCCEEDED(hr), "Failed to get DC for format %s, hr %#x.\n", test_data[i].name, hr); + ok(SUCCEEDED(hr), "Failed to get DC for format %s, hr %#lx.\n", test_data[i].name, hr); hr = IDirectDrawSurface_Lock(surface, NULL, &map_desc, DDLOCK_READONLY | DDLOCK_WAIT, NULL); - ok(SUCCEEDED(hr), "Failed to map surface for format %s, hr %#x.\n", test_data[i].name, hr); + ok(SUCCEEDED(hr), "Failed to map surface for format %s, hr %#lx.\n", test_data[i].name, hr); hr = IDirectDrawSurface_Unlock(surface, NULL); - ok(SUCCEEDED(hr), "Failed to unmap surface for format %s, hr %#x.\n", test_data[i].name, hr); + ok(SUCCEEDED(hr), "Failed to unmap surface for format %s, hr %#lx.\n", test_data[i].name, hr); hr = IDirectDrawSurface_ReleaseDC(surface2, dc); - ok(SUCCEEDED(hr), "Failed to release DC for format %s, hr %#x.\n", test_data[i].name, hr); + ok(SUCCEEDED(hr), "Failed to release DC for format %s, hr %#lx.\n", test_data[i].name, hr);
hr = IDirectDrawSurface_Unlock(surface, NULL); - ok(hr == DDERR_NOTLOCKED, "Got unexpected hr %#x for format %s.\n", hr, test_data[i].name); + ok(hr == DDERR_NOTLOCKED, "Got unexpected hr %#lx for format %s.\n", hr, test_data[i].name); hr = IDirectDrawSurface_GetDC(surface2, &dc); - ok(SUCCEEDED(hr), "Failed to get DC for format %s, hr %#x.\n", test_data[i].name, hr); + ok(SUCCEEDED(hr), "Failed to get DC for format %s, hr %#lx.\n", test_data[i].name, hr); hr = IDirectDrawSurface_Unlock(surface, NULL); - ok(hr == DDERR_NOTLOCKED, "Got unexpected hr %#x for format %s.\n", hr, test_data[i].name); + ok(hr == DDERR_NOTLOCKED, "Got unexpected hr %#lx for format %s.\n", hr, test_data[i].name); hr = IDirectDrawSurface_ReleaseDC(surface2, dc); - ok(SUCCEEDED(hr), "Failed to release DC for format %s, hr %#x.\n", test_data[i].name, hr); + ok(SUCCEEDED(hr), "Failed to release DC for format %s, hr %#lx.\n", test_data[i].name, hr); hr = IDirectDrawSurface_Unlock(surface, NULL); - ok(hr == DDERR_NOTLOCKED, "Got unexpected hr %#x for format %s.\n", hr, test_data[i].name); + ok(hr == DDERR_NOTLOCKED, "Got unexpected hr %#lx for format %s.\n", hr, test_data[i].name);
hr = IDirectDrawSurface_Unlock(surface2, NULL); - ok(hr == DDERR_NOTLOCKED, "Got unexpected hr %#x for format %s.\n", hr, test_data[i].name); + ok(hr == DDERR_NOTLOCKED, "Got unexpected hr %#lx for format %s.\n", hr, test_data[i].name); hr = IDirectDrawSurface_GetDC(surface, &dc); - ok(SUCCEEDED(hr), "Failed to get DC for format %s, hr %#x.\n", test_data[i].name, hr); + ok(SUCCEEDED(hr), "Failed to get DC for format %s, hr %#lx.\n", test_data[i].name, hr); hr = IDirectDrawSurface_Unlock(surface2, NULL); - ok(hr == DDERR_NOTLOCKED, "Got unexpected hr %#x for format %s.\n", hr, test_data[i].name); + ok(hr == DDERR_NOTLOCKED, "Got unexpected hr %#lx for format %s.\n", hr, test_data[i].name); hr = IDirectDrawSurface_ReleaseDC(surface, dc); - ok(SUCCEEDED(hr), "Failed to release DC for format %s, hr %#x.\n", test_data[i].name, hr); + ok(SUCCEEDED(hr), "Failed to release DC for format %s, hr %#lx.\n", test_data[i].name, hr); hr = IDirectDrawSurface_Unlock(surface2, NULL); - ok(hr == DDERR_NOTLOCKED, "Got unexpected hr %#x for format %s.\n", hr, test_data[i].name); + ok(hr == DDERR_NOTLOCKED, "Got unexpected hr %#lx for format %s.\n", hr, test_data[i].name);
IDirectDrawSurface_Release(surface2); IDirectDrawSurface_Release(surface); @@ -11089,11 +11089,11 @@ static void test_transform_vertices(void) }
hr = IDirect3DDevice_QueryInterface(device, &IID_IDirectDrawSurface, (void **)&rt); - ok(SUCCEEDED(hr), "Failed to get render target, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get render target, hr %#lx.\n", hr);
viewport = create_viewport(device, 0, 0, 256, 256); hr = IDirect3DViewport_SetViewport(viewport, &vp_data); - ok(SUCCEEDED(hr), "Failed to set viewport, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set viewport, hr %#lx.\n", hr);
memset(&transformdata, 0, sizeof(transformdata)); transformdata.dwSize = sizeof(transformdata); @@ -11105,8 +11105,8 @@ static void test_transform_vertices(void)
hr = IDirect3DViewport_TransformVertices(viewport, ARRAY_SIZE(position_tests), &transformdata, D3DTRANSFORM_UNCLIPPED, &offscreen); - ok(SUCCEEDED(hr), "Failed to transform vertices, hr %#x.\n", hr); - ok(!offscreen, "Offscreen is %x.\n", offscreen); + ok(SUCCEEDED(hr), "Failed to transform vertices, hr %#lx.\n", hr); + ok(!offscreen, "Offscreen is %lx.\n", offscreen);
for (i = 0; i < ARRAY_SIZE(position_tests); ++i) { @@ -11121,19 +11121,19 @@ static void test_transform_vertices(void) out[i].x, out[i].y, out[i].z, out[i].w); ok(out[i].v1 == position_tests[i].v1 && out[i].v2 == position_tests[i].v2 && out[i].v3 == position_tests[i].v3 && out[i].v4 == position_tests[i].v4, - "Vertex %u payload is %u %u %u %u.\n", i, out[i].v1, out[i].v2, out[i].v3, out[i].v4); + "Vertex %u payload is %lu %lu %lu %lu.\n", i, out[i].v1, out[i].v2, out[i].v3, out[i].v4); ok(out[i].unused3 == 0xdeadbeef && out[i].unused4 == 0xcafecafe, - "Vertex %u unused data is %#x, %#x.\n", i, out[i].unused3, out[i].unused4); + "Vertex %u unused data is %#lx, %#lx.\n", i, out[i].unused3, out[i].unused4); }
vp_data = vp_template; hr = IDirect3DViewport_SetViewport(viewport, &vp_data); - ok(SUCCEEDED(hr), "Failed to set viewport, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set viewport, hr %#lx.\n", hr); offscreen = 0xdeadbeef; hr = IDirect3DViewport_TransformVertices(viewport, ARRAY_SIZE(position_tests), &transformdata, D3DTRANSFORM_UNCLIPPED, &offscreen); - ok(SUCCEEDED(hr), "Failed to transform vertices, hr %#x.\n", hr); - ok(!offscreen, "Offscreen is %x.\n", offscreen); + ok(SUCCEEDED(hr), "Failed to transform vertices, hr %#lx.\n", hr); + ok(!offscreen, "Offscreen is %lx.\n", offscreen);
for (i = 0; i < ARRAY_SIZE(position_tests); ++i) { @@ -11150,12 +11150,12 @@ static void test_transform_vertices(void) vp_data.dwX = 10; vp_data.dwY = 20; hr = IDirect3DViewport_SetViewport(viewport, &vp_data); - ok(SUCCEEDED(hr), "Failed to set viewport, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set viewport, hr %#lx.\n", hr); offscreen = 0xdeadbeef; hr = IDirect3DViewport_TransformVertices(viewport, ARRAY_SIZE(position_tests), &transformdata, D3DTRANSFORM_UNCLIPPED, &offscreen); - ok(SUCCEEDED(hr), "Failed to transform vertices, hr %#x.\n", hr); - ok(!offscreen, "Offscreen is %x.\n", offscreen); + ok(SUCCEEDED(hr), "Failed to transform vertices, hr %#lx.\n", hr); + ok(!offscreen, "Offscreen is %lx.\n", offscreen); for (i = 0; i < ARRAY_SIZE(position_tests); ++i) { static const struct vec4 cmp[] = @@ -11172,8 +11172,8 @@ static void test_transform_vertices(void) offscreen = 0xdeadbeef; hr = IDirect3DViewport_TransformVertices(viewport, ARRAY_SIZE(position_tests), &transformdata, D3DTRANSFORM_CLIPPED, &offscreen); - ok(SUCCEEDED(hr), "Failed to transform vertices, hr %#x.\n", hr); - ok(!offscreen, "Offscreen is %x.\n", offscreen); + ok(SUCCEEDED(hr), "Failed to transform vertices, hr %#lx.\n", hr); + ok(!offscreen, "Offscreen is %lx.\n", offscreen); for (i = 0; i < ARRAY_SIZE(position_tests); ++i) { static const D3DHVERTEX cmp_h[] = @@ -11186,7 +11186,7 @@ static void test_transform_vertices(void) && compare_float(U2(cmp_h[i]).hy, U2(out_h[i]).hy, 4096) && compare_float(U3(cmp_h[i]).hz, U3(out_h[i]).hz, 4096) && cmp_h[i].dwFlags == out_h[i].dwFlags, - "HVertex %u differs. Got %#x %f %f %f.\n", i, + "HVertex %u differs. Got %#lx %f %f %f.\n", i, out_h[i].dwFlags, U1(out_h[i]).hx, U2(out_h[i]).hy, U3(out_h[i]).hz);
/* No scheme has been found behind those return values. It seems to be @@ -11211,8 +11211,8 @@ static void test_transform_vertices(void) offscreen = 0xdeadbeef; hr = IDirect3DViewport_TransformVertices(viewport, ARRAY_SIZE(cliptest), &transformdata, D3DTRANSFORM_CLIPPED, &offscreen); - ok(SUCCEEDED(hr), "Failed to transform vertices, hr %#x.\n", hr); - ok(!offscreen, "Offscreen is %x.\n", offscreen); + ok(SUCCEEDED(hr), "Failed to transform vertices, hr %#lx.\n", hr); + ok(!offscreen, "Offscreen is %lx.\n", offscreen); for (i = 0; i < ARRAY_SIZE(cliptest); ++i) { static const DWORD flags[] = @@ -11222,19 +11222,19 @@ static void test_transform_vertices(void) 0, D3DCLIP_LEFT | D3DCLIP_BOTTOM | D3DCLIP_FRONT, }; - ok(flags[i] == out_h[i].dwFlags, "Cliptest %u returned %#x.\n", i, out_h[i].dwFlags); + ok(flags[i] == out_h[i].dwFlags, "Cliptest %u returned %#lx.\n", i, out_h[i].dwFlags); }
vp_data = vp_template; vp_data.dwWidth = 10; vp_data.dwHeight = 1000; hr = IDirect3DViewport_SetViewport(viewport, &vp_data); - ok(SUCCEEDED(hr), "Failed to set viewport, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set viewport, hr %#lx.\n", hr); offscreen = 0xdeadbeef; hr = IDirect3DViewport_TransformVertices(viewport, ARRAY_SIZE(cliptest), &transformdata, D3DTRANSFORM_CLIPPED, &offscreen); - ok(SUCCEEDED(hr), "Failed to transform vertices, hr %#x.\n", hr); - ok(!offscreen, "Offscreen is %x.\n", offscreen); + ok(SUCCEEDED(hr), "Failed to transform vertices, hr %#lx.\n", hr); + ok(!offscreen, "Offscreen is %lx.\n", offscreen); for (i = 0; i < ARRAY_SIZE(cliptest); ++i) { static const DWORD flags[] = @@ -11244,7 +11244,7 @@ static void test_transform_vertices(void) D3DCLIP_LEFT, D3DCLIP_LEFT | D3DCLIP_FRONT, }; - ok(flags[i] == out_h[i].dwFlags, "Cliptest %u returned %#x.\n", i, out_h[i].dwFlags); + ok(flags[i] == out_h[i].dwFlags, "Cliptest %u returned %#lx.\n", i, out_h[i].dwFlags); }
vp_data = vp_template; @@ -11253,11 +11253,11 @@ static void test_transform_vertices(void) vp_data.dvScaleX = 1; vp_data.dvScaleY = 1; hr = IDirect3DViewport_SetViewport(viewport, &vp_data); - ok(SUCCEEDED(hr), "Failed to set viewport, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set viewport, hr %#lx.\n", hr); hr = IDirect3DViewport_TransformVertices(viewport, ARRAY_SIZE(cliptest), &transformdata, D3DTRANSFORM_CLIPPED, &offscreen); - ok(SUCCEEDED(hr), "Failed to transform vertices, hr %#x.\n", hr); - ok(!offscreen, "Offscreen is %x.\n", offscreen); + ok(SUCCEEDED(hr), "Failed to transform vertices, hr %#lx.\n", hr); + ok(!offscreen, "Offscreen is %lx.\n", offscreen); for (i = 0; i < ARRAY_SIZE(cliptest); ++i) { static const DWORD flags[] = @@ -11267,7 +11267,7 @@ static void test_transform_vertices(void) 0, D3DCLIP_FRONT, }; - ok(flags[i] == out_h[i].dwFlags, "Cliptest %u returned %#x.\n", i, out_h[i].dwFlags); + ok(flags[i] == out_h[i].dwFlags, "Cliptest %u returned %#lx.\n", i, out_h[i].dwFlags); }
/* Finally try to figure out how the DWORD dwOffscreen works. @@ -11278,51 +11278,51 @@ static void test_transform_vertices(void) vp_data.dvScaleX = 10000.0f; vp_data.dvScaleY = 10000.0f; hr = IDirect3DViewport_SetViewport(viewport, &vp_data); - ok(SUCCEEDED(hr), "Failed to set viewport, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set viewport, hr %#lx.\n", hr); transformdata.lpIn = cliptest; offscreen = 0xdeadbeef; hr = IDirect3DViewport_TransformVertices(viewport, 1, &transformdata, D3DTRANSFORM_UNCLIPPED, &offscreen); - ok(SUCCEEDED(hr), "Failed to transform vertices, hr %#x.\n", hr); - ok(!offscreen, "Offscreen is %x.\n", offscreen); + ok(SUCCEEDED(hr), "Failed to transform vertices, hr %#lx.\n", hr); + ok(!offscreen, "Offscreen is %lx.\n", offscreen);
offscreen = 0xdeadbeef; hr = IDirect3DViewport_TransformVertices(viewport, 1, &transformdata, D3DTRANSFORM_CLIPPED, &offscreen); - ok(SUCCEEDED(hr), "Failed to transform vertices, hr %#x.\n", hr); - ok(offscreen == (D3DCLIP_RIGHT | D3DCLIP_TOP), "Offscreen is %x.\n", offscreen); + ok(SUCCEEDED(hr), "Failed to transform vertices, hr %#lx.\n", hr); + ok(offscreen == (D3DCLIP_RIGHT | D3DCLIP_TOP), "Offscreen is %lx.\n", offscreen); offscreen = 0xdeadbeef; hr = IDirect3DViewport_TransformVertices(viewport, 2, &transformdata, D3DTRANSFORM_CLIPPED, &offscreen); - ok(SUCCEEDED(hr), "Failed to transform vertices, hr %#x.\n", hr); - ok(offscreen == (D3DCLIP_RIGHT | D3DCLIP_TOP), "Offscreen is %x.\n", offscreen); + ok(SUCCEEDED(hr), "Failed to transform vertices, hr %#lx.\n", hr); + ok(offscreen == (D3DCLIP_RIGHT | D3DCLIP_TOP), "Offscreen is %lx.\n", offscreen); hr = IDirect3DViewport_TransformVertices(viewport, 3, &transformdata, D3DTRANSFORM_CLIPPED, &offscreen); - ok(SUCCEEDED(hr), "Failed to transform vertices, hr %#x.\n", hr); - ok(!offscreen, "Offscreen is %x.\n", offscreen); + ok(SUCCEEDED(hr), "Failed to transform vertices, hr %#lx.\n", hr); + ok(!offscreen, "Offscreen is %lx.\n", offscreen);
transformdata.lpIn = cliptest + 1; hr = IDirect3DViewport_TransformVertices(viewport, 1, &transformdata, D3DTRANSFORM_CLIPPED, &offscreen); - ok(SUCCEEDED(hr), "Failed to transform vertices, hr %#x.\n", hr); - ok(offscreen == (D3DCLIP_BACK | D3DCLIP_RIGHT | D3DCLIP_TOP), "Offscreen is %x.\n", offscreen); + ok(SUCCEEDED(hr), "Failed to transform vertices, hr %#lx.\n", hr); + ok(offscreen == (D3DCLIP_BACK | D3DCLIP_RIGHT | D3DCLIP_TOP), "Offscreen is %lx.\n", offscreen);
transformdata.lpIn = cliptest + 2; hr = IDirect3DViewport_TransformVertices(viewport, 1, &transformdata, D3DTRANSFORM_CLIPPED, &offscreen); - ok(SUCCEEDED(hr), "Failed to transform vertices, hr %#x.\n", hr); - ok(offscreen == (D3DCLIP_BOTTOM | D3DCLIP_LEFT), "Offscreen is %x.\n", offscreen); + ok(SUCCEEDED(hr), "Failed to transform vertices, hr %#lx.\n", hr); + ok(offscreen == (D3DCLIP_BOTTOM | D3DCLIP_LEFT), "Offscreen is %lx.\n", offscreen); offscreen = 0xdeadbeef; hr = IDirect3DViewport_TransformVertices(viewport, 2, &transformdata, D3DTRANSFORM_CLIPPED, &offscreen); - ok(SUCCEEDED(hr), "Failed to transform vertices, hr %#x.\n", hr); - ok(offscreen == (D3DCLIP_BOTTOM | D3DCLIP_LEFT), "Offscreen is %x.\n", offscreen); + ok(SUCCEEDED(hr), "Failed to transform vertices, hr %#lx.\n", hr); + ok(offscreen == (D3DCLIP_BOTTOM | D3DCLIP_LEFT), "Offscreen is %lx.\n", offscreen);
transformdata.lpIn = cliptest + 3; hr = IDirect3DViewport_TransformVertices(viewport, 1, &transformdata, D3DTRANSFORM_CLIPPED, &offscreen); - ok(SUCCEEDED(hr), "Failed to transform vertices, hr %#x.\n", hr); - ok(offscreen == (D3DCLIP_FRONT | D3DCLIP_BOTTOM | D3DCLIP_LEFT), "Offscreen is %x.\n", offscreen); + ok(SUCCEEDED(hr), "Failed to transform vertices, hr %#lx.\n", hr); + ok(offscreen == (D3DCLIP_FRONT | D3DCLIP_BOTTOM | D3DCLIP_LEFT), "Offscreen is %lx.\n", offscreen);
transformdata.lpIn = offscreentest; transformdata.dwInSize = sizeof(offscreentest[0]); @@ -11332,21 +11332,21 @@ static void test_transform_vertices(void) vp_data.dvScaleX = 1.0f; vp_data.dvScaleY = 1.0f; hr = IDirect3DViewport_SetViewport(viewport, &vp_data); - ok(SUCCEEDED(hr), "Failed to set viewport, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set viewport, hr %#lx.\n", hr); offscreen = 0xdeadbeef; hr = IDirect3DViewport_TransformVertices(viewport, 1, &transformdata, D3DTRANSFORM_CLIPPED, &offscreen); - ok(SUCCEEDED(hr), "Failed to transform vertices, hr %#x.\n", hr); - ok(!offscreen, "Offscreen is %x.\n", offscreen); + ok(SUCCEEDED(hr), "Failed to transform vertices, hr %#lx.\n", hr); + ok(!offscreen, "Offscreen is %lx.\n", offscreen);
vp_data.dwWidth = 256; vp_data.dwHeight = 256; hr = IDirect3DViewport_SetViewport(viewport, &vp_data); - ok(SUCCEEDED(hr), "Failed to set viewport, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set viewport, hr %#lx.\n", hr); hr = IDirect3DViewport_TransformVertices(viewport, 1, &transformdata, D3DTRANSFORM_CLIPPED, &offscreen); - ok(SUCCEEDED(hr), "Failed to transform vertices, hr %#x.\n", hr); - ok(offscreen == D3DCLIP_RIGHT, "Offscreen is %x.\n", offscreen); + ok(SUCCEEDED(hr), "Failed to transform vertices, hr %#lx.\n", hr); + ok(offscreen == D3DCLIP_RIGHT, "Offscreen is %lx.\n", offscreen);
/* Test the effect of Matrices. * @@ -11362,22 +11362,22 @@ static void test_transform_vertices(void) vp_data.dvMinZ = 0.0f; vp_data.dvMaxZ = 1.0f; hr = IDirect3DViewport_SetViewport(viewport, &vp_data); - ok(SUCCEEDED(hr), "Failed to set viewport, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set viewport, hr %#lx.\n", hr);
hr = IDirect3DDevice_CreateMatrix(device, &world_handle); - ok(hr == D3D_OK, "Creating a matrix object failed, hr %#x.\n", hr); + ok(hr == D3D_OK, "Creating a matrix object failed, hr %#lx.\n", hr); hr = IDirect3DDevice_SetMatrix(device, world_handle, &mat_translate1); - ok(hr == D3D_OK, "Setting a matrix object failed, hr %#x.\n", hr); + ok(hr == D3D_OK, "Setting a matrix object failed, hr %#lx.\n", hr);
hr = IDirect3DDevice_CreateMatrix(device, &view_handle); - ok(hr == D3D_OK, "Creating a matrix object failed, hr %#x.\n", hr); + ok(hr == D3D_OK, "Creating a matrix object failed, hr %#lx.\n", hr); hr = IDirect3DDevice_SetMatrix(device, view_handle, &mat_scale); - ok(hr == D3D_OK, "Setting a matrix object failed, hr %#x.\n", hr); + ok(hr == D3D_OK, "Setting a matrix object failed, hr %#lx.\n", hr);
hr = IDirect3DDevice_CreateMatrix(device, &proj_handle); - ok(hr == D3D_OK, "Creating a matrix object failed, hr %#x.\n", hr); + ok(hr == D3D_OK, "Creating a matrix object failed, hr %#lx.\n", hr); hr = IDirect3DDevice_SetMatrix(device, proj_handle, &mat_translate2); - ok(hr == D3D_OK, "Setting a matrix object failed, hr %#x.\n", hr); + ok(hr == D3D_OK, "Setting a matrix object failed, hr %#lx.\n", hr);
memset(&exec_desc, 0, sizeof(exec_desc)); exec_desc.dwSize = sizeof(exec_desc); @@ -11385,10 +11385,10 @@ static void test_transform_vertices(void) exec_desc.dwBufferSize = 1024; exec_desc.dwCaps = D3DDEBCAPS_SYSTEMMEMORY; hr = IDirect3DDevice_CreateExecuteBuffer(device, &exec_desc, &execute_buffer, NULL); - ok(SUCCEEDED(hr), "Failed to create execute buffer, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create execute buffer, hr %#lx.\n", hr);
hr = IDirect3DExecuteBuffer_Lock(execute_buffer, &exec_desc); - ok(SUCCEEDED(hr), "Failed to lock execute buffer, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to lock execute buffer, hr %#lx.\n", hr); ptr = (BYTE *)exec_desc.lpData; emit_set_ts(&ptr, D3DTRANSFORMSTATE_WORLD, world_handle); emit_set_ts(&ptr, D3DTRANSFORMSTATE_VIEW, view_handle); @@ -11396,21 +11396,21 @@ static void test_transform_vertices(void) emit_end(&ptr); inst_length = (BYTE *)ptr - (BYTE *)exec_desc.lpData; hr = IDirect3DExecuteBuffer_Unlock(execute_buffer); - ok(SUCCEEDED(hr), "Failed to unlock execute buffer, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to unlock execute buffer, hr %#lx.\n", hr);
set_execute_data(execute_buffer, 0, 0, inst_length); hr = IDirect3DDevice_BeginScene(device); - ok(SUCCEEDED(hr), "Failed to begin scene, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to begin scene, hr %#lx.\n", hr); hr = IDirect3DDevice_Execute(device, execute_buffer, viewport, D3DEXECUTE_CLIPPED); - ok(SUCCEEDED(hr), "Failed to execute exec buffer, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to execute exec buffer, hr %#lx.\n", hr); hr = IDirect3DDevice_EndScene(device); - ok(SUCCEEDED(hr), "Failed to end scene, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to end scene, hr %#lx.\n", hr);
transformdata.lpIn = position_tests; transformdata.dwInSize = sizeof(position_tests[0]); hr = IDirect3DViewport_TransformVertices(viewport, ARRAY_SIZE(position_tests), &transformdata, D3DTRANSFORM_UNCLIPPED, &offscreen); - ok(SUCCEEDED(hr), "Failed to transform vertices, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to transform vertices, hr %#lx.\n", hr);
for (i = 0; i < ARRAY_SIZE(position_tests); ++i) { @@ -11429,48 +11429,48 @@ static void test_transform_vertices(void) offscreen = 0xdeadbeef; hr = IDirect3DViewport_TransformVertices(viewport, ARRAY_SIZE(position_tests), &transformdata, 0, &offscreen); - ok(hr == DDERR_INVALIDPARAMS, "TransformVertices returned %#x.\n", hr); - ok(offscreen == 0xdeadbeef, "Offscreen is %x.\n", offscreen); + ok(hr == DDERR_INVALIDPARAMS, "TransformVertices returned %#lx.\n", hr); + ok(offscreen == 0xdeadbeef, "Offscreen is %lx.\n", offscreen);
/* NULL transform data. */ hr = IDirect3DViewport_TransformVertices(viewport, 1, NULL, D3DTRANSFORM_UNCLIPPED, &offscreen); - ok(hr == DDERR_INVALIDPARAMS, "TransformVertices returned %#x.\n", hr); - ok(offscreen == 0xdeadbeef, "Offscreen is %x.\n", offscreen); + ok(hr == DDERR_INVALIDPARAMS, "TransformVertices returned %#lx.\n", hr); + ok(offscreen == 0xdeadbeef, "Offscreen is %lx.\n", offscreen); hr = IDirect3DViewport_TransformVertices(viewport, 0, NULL, D3DTRANSFORM_UNCLIPPED, &offscreen); - ok(hr == DDERR_INVALIDPARAMS, "TransformVertices returned %#x.\n", hr); - ok(offscreen == 0xdeadbeef, "Offscreen is %x.\n", offscreen); + ok(hr == DDERR_INVALIDPARAMS, "TransformVertices returned %#lx.\n", hr); + ok(offscreen == 0xdeadbeef, "Offscreen is %lx.\n", offscreen);
/* NULL transform data and NULL dwOffscreen. * * Valid transform data + NULL dwOffscreen -> crash. */ hr = IDirect3DViewport_TransformVertices(viewport, 1, NULL, D3DTRANSFORM_UNCLIPPED, NULL); - ok(hr == DDERR_INVALIDPARAMS, "TransformVertices returned %#x.\n", hr); + ok(hr == DDERR_INVALIDPARAMS, "TransformVertices returned %#lx.\n", hr);
/* No vertices. */ hr = IDirect3DViewport_TransformVertices(viewport, 0, &transformdata, D3DTRANSFORM_UNCLIPPED, &offscreen); - ok(SUCCEEDED(hr), "Failed to transform vertices, hr %#x.\n", hr); - ok(!offscreen, "Offscreen is %x.\n", offscreen); + ok(SUCCEEDED(hr), "Failed to transform vertices, hr %#lx.\n", hr); + ok(!offscreen, "Offscreen is %lx.\n", offscreen); hr = IDirect3DViewport_TransformVertices(viewport, 0, &transformdata, D3DTRANSFORM_CLIPPED, &offscreen); - ok(SUCCEEDED(hr), "Failed to transform vertices, hr %#x.\n", hr); - ok(offscreen == ~0U, "Offscreen is %x.\n", offscreen); + ok(SUCCEEDED(hr), "Failed to transform vertices, hr %#lx.\n", hr); + ok(offscreen == ~0U, "Offscreen is %lx.\n", offscreen);
/* Invalid sizes. */ offscreen = 0xdeadbeef; transformdata.dwSize = sizeof(transformdata) - 1; hr = IDirect3DViewport_TransformVertices(viewport, 1, &transformdata, D3DTRANSFORM_UNCLIPPED, &offscreen); - ok(hr == DDERR_INVALIDPARAMS, "TransformVertices returned %#x.\n", hr); - ok(offscreen == 0xdeadbeef, "Offscreen is %x.\n", offscreen); + ok(hr == DDERR_INVALIDPARAMS, "TransformVertices returned %#lx.\n", hr); + ok(offscreen == 0xdeadbeef, "Offscreen is %lx.\n", offscreen); transformdata.dwSize = sizeof(transformdata) + 1; hr = IDirect3DViewport_TransformVertices(viewport, 1, &transformdata, D3DTRANSFORM_UNCLIPPED, &offscreen); - ok(hr == DDERR_INVALIDPARAMS, "TransformVertices returned %#x.\n", hr); - ok(offscreen == 0xdeadbeef, "Offscreen is %x.\n", offscreen); + ok(hr == DDERR_INVALIDPARAMS, "TransformVertices returned %#lx.\n", hr); + ok(offscreen == 0xdeadbeef, "Offscreen is %lx.\n", offscreen);
/* NULL lpIn or lpOut -> crash, except when transforming 0 vertices. */ transformdata.dwSize = sizeof(transformdata); @@ -11479,8 +11479,8 @@ static void test_transform_vertices(void) offscreen = 0xdeadbeef; hr = IDirect3DViewport_TransformVertices(viewport, 0, &transformdata, D3DTRANSFORM_CLIPPED, &offscreen); - ok(SUCCEEDED(hr), "Failed to transform vertices, hr %#x.\n", hr); - ok(offscreen == ~0U, "Offscreen is %x.\n", offscreen); + ok(SUCCEEDED(hr), "Failed to transform vertices, hr %#lx.\n", hr); + ok(offscreen == ~0U, "Offscreen is %lx.\n", offscreen);
/* Test how vertices are transformed by execute buffers. */ vp_data.dwX = 20; @@ -11492,15 +11492,15 @@ static void test_transform_vertices(void) vp_data.dvMinZ = 0.0f; vp_data.dvMaxZ = 1.0f; hr = IDirect3DViewport_SetViewport(viewport, &vp_data); - ok(SUCCEEDED(hr), "Failed to set viewport, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set viewport, hr %#lx.\n", hr);
background = create_diffuse_material(device, 0.0f, 0.0f, 1.0f, 0.0f); viewport_set_background(device, viewport, background); hr = IDirect3DViewport_Clear(viewport, 1, &clear_rect, D3DCLEAR_TARGET); - ok(SUCCEEDED(hr), "Failed to clear viewport, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to clear viewport, hr %#lx.\n", hr);
hr = IDirect3DExecuteBuffer_Lock(execute_buffer, &exec_desc); - ok(SUCCEEDED(hr), "Failed to lock execute buffer, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to lock execute buffer, hr %#lx.\n", hr); memcpy(exec_desc.lpData, quad, sizeof(quad)); ptr = ((BYTE *)exec_desc.lpData) + sizeof(quad); emit_process_vertices(&ptr, D3DPROCESSVERTICES_TRANSFORM, 0, 4); @@ -11508,33 +11508,33 @@ static void test_transform_vertices(void) emit_end(&ptr); inst_length = (BYTE *)ptr - (BYTE *)exec_desc.lpData; hr = IDirect3DExecuteBuffer_Unlock(execute_buffer); - ok(SUCCEEDED(hr), "Failed to unlock execute buffer, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to unlock execute buffer, hr %#lx.\n", hr);
set_execute_data(execute_buffer, 4, sizeof(quad), inst_length); hr = IDirect3DDevice_BeginScene(device); - ok(SUCCEEDED(hr), "Failed to begin scene, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to begin scene, hr %#lx.\n", hr); hr = IDirect3DDevice_Execute(device, execute_buffer, viewport, D3DEXECUTE_CLIPPED); - ok(SUCCEEDED(hr), "Failed to execute exec buffer, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to execute exec buffer, hr %#lx.\n", hr); hr = IDirect3DDevice_EndScene(device); - ok(SUCCEEDED(hr), "Failed to end scene, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to end scene, hr %#lx.\n", hr);
color = get_surface_color(rt, 128, 143); - ok(compare_color(color, 0x000000ff, 1), "Got unexpected color 0x%08x.\n", color); + ok(compare_color(color, 0x000000ff, 1), "Got unexpected color 0x%08lx.\n", color); color = get_surface_color(rt, 132, 143); - ok(compare_color(color, 0x000000ff, 1), "Got unexpected color 0x%08x.\n", color); + ok(compare_color(color, 0x000000ff, 1), "Got unexpected color 0x%08lx.\n", color); color = get_surface_color(rt, 128, 147); - ok(compare_color(color, 0x000000ff, 1), "Got unexpected color 0x%08x.\n", color); + ok(compare_color(color, 0x000000ff, 1), "Got unexpected color 0x%08lx.\n", color); color = get_surface_color(rt, 132, 147); - ok(compare_color(color, 0x00ff0000, 1), "Got unexpected color 0x%08x.\n", color); + ok(compare_color(color, 0x00ff0000, 1), "Got unexpected color 0x%08lx.\n", color);
color = get_surface_color(rt, 177, 217); - ok(compare_color(color, 0x00ff0000, 1), "Got unexpected color 0x%08x.\n", color); + ok(compare_color(color, 0x00ff0000, 1), "Got unexpected color 0x%08lx.\n", color); color = get_surface_color(rt, 181, 217); - ok(compare_color(color, 0x000000ff, 1), "Got unexpected color 0x%08x.\n", color); + ok(compare_color(color, 0x000000ff, 1), "Got unexpected color 0x%08lx.\n", color); color = get_surface_color(rt, 177, 221); - ok(compare_color(color, 0x000000ff, 1), "Got unexpected color 0x%08x.\n", color); + ok(compare_color(color, 0x000000ff, 1), "Got unexpected color 0x%08lx.\n", color); color = get_surface_color(rt, 181, 221); - ok(compare_color(color, 0x000000ff, 1), "Got unexpected color 0x%08x.\n", color); + ok(compare_color(color, 0x000000ff, 1), "Got unexpected color 0x%08lx.\n", color);
IDirect3DDevice_DeleteMatrix(device, world_handle); IDirect3DDevice_DeleteMatrix(device, view_handle); @@ -11545,7 +11545,7 @@ static void test_transform_vertices(void) destroy_viewport(device, viewport); IDirect3DMaterial_Release(background); refcount = IDirect3DDevice_Release(device); - ok(!refcount, "Device has %u references left.\n", refcount); + ok(!refcount, "Device has %lu references left.\n", refcount); IDirectDraw_Release(ddraw); DestroyWindow(window); } @@ -11568,14 +11568,14 @@ static void test_display_mode_surface_pixel_format(void)
surface_desc.dwSize = sizeof(surface_desc); hr = IDirectDraw_GetDisplayMode(ddraw, &surface_desc); - ok(SUCCEEDED(hr), "Failed to get display mode, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get display mode, hr %#lx.\n", hr); width = surface_desc.dwWidth; height = surface_desc.dwHeight;
window = CreateWindowA("static", "ddraw_test", WS_OVERLAPPEDWINDOW, 0, 0, width, height, NULL, NULL, NULL, NULL); hr = IDirectDraw_SetCooperativeLevel(ddraw, window, DDSCL_EXCLUSIVE | DDSCL_FULLSCREEN); - ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#lx.\n", hr);
bpp = 0; if (SUCCEEDED(IDirectDraw_SetDisplayMode(ddraw, width, height, 16))) @@ -11588,10 +11588,10 @@ static void test_display_mode_surface_pixel_format(void)
surface_desc.dwSize = sizeof(surface_desc); hr = IDirectDraw_GetDisplayMode(ddraw, &surface_desc); - ok(SUCCEEDED(hr), "Failed to get display mode, hr %#x.\n", hr); - ok(surface_desc.dwWidth == width, "Got width %u, expected %u.\n", surface_desc.dwWidth, width); - ok(surface_desc.dwHeight == height, "Got height %u, expected %u.\n", surface_desc.dwHeight, height); - ok(U1(surface_desc.ddpfPixelFormat).dwRGBBitCount == bpp, "Got bpp %u, expected %u.\n", + ok(SUCCEEDED(hr), "Failed to get display mode, hr %#lx.\n", hr); + ok(surface_desc.dwWidth == width, "Got width %lu, expected %u.\n", surface_desc.dwWidth, width); + ok(surface_desc.dwHeight == height, "Got height %lu, expected %u.\n", surface_desc.dwHeight, height); + ok(U1(surface_desc.ddpfPixelFormat).dwRGBBitCount == bpp, "Got bpp %lu, expected %u.\n", U1(surface_desc.ddpfPixelFormat).dwRGBBitCount, bpp);
memset(&surface_desc, 0, sizeof(surface_desc)); @@ -11600,14 +11600,14 @@ static void test_display_mode_surface_pixel_format(void) surface_desc.dwBackBufferCount = 1; surface_desc.ddsCaps.dwCaps = DDSCAPS_COMPLEX | DDSCAPS_FLIP | DDSCAPS_PRIMARYSURFACE; hr = IDirectDraw_CreateSurface(ddraw, &surface_desc, &surface, NULL); - ok(hr == D3D_OK, "Failed to create surface, hr %#x.\n", hr); + ok(hr == D3D_OK, "Failed to create surface, hr %#lx.\n", hr); hr = IDirectDrawSurface_GetSurfaceDesc(surface, &surface_desc); - ok(SUCCEEDED(hr), "Failed to get surface desc, hr %#x.\n", hr); - ok(surface_desc.dwWidth == width, "Got width %u, expected %u.\n", surface_desc.dwWidth, width); - ok(surface_desc.dwHeight == height, "Got height %u, expected %u.\n", surface_desc.dwHeight, height); - ok(surface_desc.ddpfPixelFormat.dwFlags == DDPF_RGB, "Got unexpected pixel format flags %#x.\n", + ok(SUCCEEDED(hr), "Failed to get surface desc, hr %#lx.\n", hr); + ok(surface_desc.dwWidth == width, "Got width %lu, expected %u.\n", surface_desc.dwWidth, width); + ok(surface_desc.dwHeight == height, "Got height %lu, expected %u.\n", surface_desc.dwHeight, height); + ok(surface_desc.ddpfPixelFormat.dwFlags == DDPF_RGB, "Got unexpected pixel format flags %#lx.\n", surface_desc.ddpfPixelFormat.dwFlags); - ok(U1(surface_desc.ddpfPixelFormat).dwRGBBitCount == bpp, "Got bpp %u, expected %u.\n", + ok(U1(surface_desc.ddpfPixelFormat).dwRGBBitCount == bpp, "Got bpp %lu, expected %u.\n", U1(surface_desc.ddpfPixelFormat).dwRGBBitCount, bpp); IDirectDrawSurface_Release(surface);
@@ -11618,17 +11618,17 @@ static void test_display_mode_surface_pixel_format(void) surface_desc.dwHeight = height; surface_desc.ddsCaps.dwCaps = DDSCAPS_OFFSCREENPLAIN; hr = IDirectDraw_CreateSurface(ddraw, &surface_desc, &surface, NULL); - ok(hr == D3D_OK, "Failed to create surface, hr %#x.\n", hr); + ok(hr == D3D_OK, "Failed to create surface, hr %#lx.\n", hr); hr = IDirectDrawSurface_GetSurfaceDesc(surface, &surface_desc); - ok(SUCCEEDED(hr), "Failed to get surface desc, hr %#x.\n", hr); - ok(surface_desc.ddpfPixelFormat.dwFlags == DDPF_RGB, "Got unexpected pixel format flags %#x.\n", + ok(SUCCEEDED(hr), "Failed to get surface desc, hr %#lx.\n", hr); + ok(surface_desc.ddpfPixelFormat.dwFlags == DDPF_RGB, "Got unexpected pixel format flags %#lx.\n", surface_desc.ddpfPixelFormat.dwFlags); - ok(U1(surface_desc.ddpfPixelFormat).dwRGBBitCount == bpp, "Got bpp %u, expected %u.\n", + ok(U1(surface_desc.ddpfPixelFormat).dwRGBBitCount == bpp, "Got bpp %lu, expected %u.\n", U1(surface_desc.ddpfPixelFormat).dwRGBBitCount, bpp); IDirectDrawSurface_Release(surface);
refcount = IDirectDraw_Release(ddraw); - ok(!refcount, "DirectDraw has %u references left.\n", refcount); + ok(!refcount, "DirectDraw has %lu references left.\n", refcount); DestroyWindow(window); }
@@ -11685,7 +11685,7 @@ static void test_surface_desc_size(void) return; } hr = IDirectDraw_SetCooperativeLevel(ddraw, NULL, DDSCL_NORMAL); - ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#lx.\n", hr);
for (i = 0; i < ARRAY_SIZE(surface_caps); ++i) { @@ -11701,7 +11701,7 @@ static void test_surface_desc_size(void) continue; } hr = IDirectDrawSurface_QueryInterface(surface, &IID_IDirectDrawSurface7, (void **)&surface7); - ok(hr == DD_OK, "Failed to query IDirectDrawSurface7, hr %#x, type %s.\n", hr, surface_caps[i].name); + ok(hr == DD_OK, "Failed to query IDirectDrawSurface7, hr %#lx, type %s.\n", hr, surface_caps[i].name);
/* GetSurfaceDesc() */ for (j = 0; j < ARRAY_SIZE(desc_sizes); ++j) @@ -11710,14 +11710,14 @@ static void test_surface_desc_size(void) desc.dwSize = desc_sizes[j]; expected_hr = desc.dwSize == sizeof(DDSURFACEDESC) ? DD_OK : DDERR_INVALIDPARAMS; hr = IDirectDrawSurface_GetSurfaceDesc(surface, &desc.desc1); - ok(hr == expected_hr, "Got hr %#x, expected %#x, dwSize %u, type %s.\n", + ok(hr == expected_hr, "Got hr %#lx, expected %#lx, dwSize %u, type %s.\n", hr, expected_hr, desc_sizes[j], surface_caps[i].name);
memset(&desc, 0, sizeof(desc)); desc.dwSize = desc_sizes[j]; expected_hr = desc.dwSize == sizeof(DDSURFACEDESC2) ? DD_OK : DDERR_INVALIDPARAMS; hr = IDirectDrawSurface7_GetSurfaceDesc(surface7, &desc.desc2); - ok(hr == expected_hr, "Got hr %#x, expected %#x, dwSize %u, type %s.\n", + ok(hr == expected_hr, "Got hr %#lx, expected %#lx, dwSize %u, type %s.\n", hr, expected_hr, desc_sizes[j], surface_caps[i].name); }
@@ -11734,22 +11734,22 @@ static void test_surface_desc_size(void) desc.blob[sizeof(DDSURFACEDESC2)] = 0xef; hr = IDirectDrawSurface_Lock(surface, NULL, &desc.desc1, 0, 0); expected_hr = valid_size ? DD_OK : DDERR_INVALIDPARAMS; - ok(hr == expected_hr, "Got hr %#x, expected %#x, dwSize %u, type %s.\n", + ok(hr == expected_hr, "Got hr %#lx, expected %#lx, dwSize %u, type %s.\n", hr, expected_hr, desc_sizes[j], surface_caps[i].name); - ok(desc.dwSize == desc_sizes[j], "dwSize was changed from %u to %u, type %s.\n", + ok(desc.dwSize == desc_sizes[j], "dwSize was changed from %u to %lu, type %s.\n", desc_sizes[j], desc.dwSize, surface_caps[i].name); ok(desc.blob[sizeof(DDSURFACEDESC2)] == 0xef, "Got unexpected byte %02x, dwSize %u, type %s.\n", desc.blob[sizeof(DDSURFACEDESC2)], desc_sizes[j], surface_caps[i].name); if (SUCCEEDED(hr)) { - ok(desc.desc1.dwWidth == 128, "Got unexpected width %u, dwSize %u, type %s.\n", + ok(desc.desc1.dwWidth == 128, "Got unexpected width %lu, dwSize %u, type %s.\n", desc.desc1.dwWidth, desc_sizes[j], surface_caps[i].name); - ok(desc.desc1.dwHeight == 128, "Got unexpected height %u, dwSize %u, type %s.\n", + ok(desc.desc1.dwHeight == 128, "Got unexpected height %lu, dwSize %u, type %s.\n", desc.desc1.dwHeight, desc_sizes[j], surface_caps[i].name); expected_texture_stage = desc_sizes[j] >= sizeof(DDSURFACEDESC2) ? 0 : 0xdeadbeef; todo_wine_if(!expected_texture_stage) ok(desc.desc2.dwTextureStage == expected_texture_stage, - "Got unexpected texture stage %#x, dwSize %u, type %s.\n", + "Got unexpected texture stage %#lx, dwSize %u, type %s.\n", desc.desc2.dwTextureStage, desc_sizes[j], surface_caps[i].name); IDirectDrawSurface_Unlock(surface, NULL); } @@ -11760,21 +11760,21 @@ static void test_surface_desc_size(void) desc.blob[sizeof(DDSURFACEDESC2)] = 0xef; hr = IDirectDrawSurface7_Lock(surface7, NULL, &desc.desc2, 0, 0); expected_hr = valid_size ? DD_OK : DDERR_INVALIDPARAMS; - ok(hr == expected_hr, "Got hr %#x, expected %#x, dwSize %u, type %s.\n", + ok(hr == expected_hr, "Got hr %#lx, expected %#lx, dwSize %u, type %s.\n", hr, expected_hr, desc_sizes[j], surface_caps[i].name); - ok(desc.dwSize == desc_sizes[j], "dwSize was changed from %u to %u, type %s.\n", + ok(desc.dwSize == desc_sizes[j], "dwSize was changed from %u to %lu, type %s.\n", desc_sizes[j], desc.dwSize, surface_caps[i].name); ok(desc.blob[sizeof(DDSURFACEDESC2)] == 0xef, "Got unexpected byte %02x, dwSize %u, type %s.\n", desc.blob[sizeof(DDSURFACEDESC2)], desc_sizes[j], surface_caps[i].name); if (SUCCEEDED(hr)) { - ok(desc.desc2.dwWidth == 128, "Got unexpected width %u, dwSize %u, type %s.\n", + ok(desc.desc2.dwWidth == 128, "Got unexpected width %lu, dwSize %u, type %s.\n", desc.desc2.dwWidth, desc_sizes[j], surface_caps[i].name); - ok(desc.desc2.dwHeight == 128, "Got unexpected height %u, dwSize %u, type %s.\n", + ok(desc.desc2.dwHeight == 128, "Got unexpected height %lu, dwSize %u, type %s.\n", desc.desc2.dwHeight, desc_sizes[j], surface_caps[i].name); expected_texture_stage = desc_sizes[j] >= sizeof(DDSURFACEDESC2) ? 0 : 0xdeadbeef; ok(desc.desc2.dwTextureStage == expected_texture_stage, - "Got unexpected texture stage %#x, dwSize %u, type %s.\n", + "Got unexpected texture stage %#lx, dwSize %u, type %s.\n", desc.desc2.dwTextureStage, desc_sizes[j], surface_caps[i].name); IDirectDrawSurface7_Unlock(surface7, NULL); } @@ -11792,17 +11792,17 @@ static void test_surface_desc_size(void) expected_hr = (desc.dwSize == sizeof(DDSURFACEDESC) || desc.dwSize == sizeof(DDSURFACEDESC2)) ? DD_OK : DDERR_INVALIDPARAMS; hr = IDirectDraw_GetDisplayMode(ddraw, &desc.desc1); - ok(hr == expected_hr, "Got hr %#x, expected %#x, size %u.\n", hr, expected_hr, desc_sizes[j]); + ok(hr == expected_hr, "Got hr %#lx, expected %#lx, size %u.\n", hr, expected_hr, desc_sizes[j]); if (SUCCEEDED(hr)) { - ok(desc.dwSize == sizeof(DDSURFACEDESC), "Wrong size %u for %u.\n", desc.dwSize, desc_sizes[j]); + ok(desc.dwSize == sizeof(DDSURFACEDESC), "Wrong size %lu for %u.\n", desc.dwSize, desc_sizes[j]); ok(desc.blob[desc_sizes[j]] == 0xcc, "Overflow for size %u.\n", desc_sizes[j]); ok(desc.blob[desc_sizes[j] - 1] != 0xcc, "Struct not cleared for size %u.\n", desc_sizes[j]); } }
refcount = IDirectDraw_Release(ddraw); - ok(!refcount, "DirectDraw has %u references left.\n", refcount); + ok(!refcount, "DirectDraw has %lu references left.\n", refcount); }
static void test_texture_load(void) @@ -11846,7 +11846,7 @@ static void test_texture_load(void) }
hr = IDirect3DDevice_QueryInterface(device, &IID_IDirectDrawSurface, (void **)&rt); - ok(SUCCEEDED(hr), "Failed to get render target, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get render target, hr %#lx.\n", hr);
background = create_diffuse_material(device, 1.0f, 1.0f, 1.0f, 1.0f); viewport = create_viewport(device, 0, 0, 640, 480); @@ -11858,7 +11858,7 @@ static void test_texture_load(void) exec_desc.dwBufferSize = 1024; exec_desc.dwCaps = D3DDEBCAPS_SYSTEMMEMORY; hr = IDirect3DDevice_CreateExecuteBuffer(device, &exec_desc, &execute_buffer, NULL); - ok(SUCCEEDED(hr), "Failed to create execute buffer, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create execute buffer, hr %#lx.\n", hr);
memset(&surface_desc, 0, sizeof(surface_desc)); surface_desc.dwSize = sizeof(surface_desc); @@ -11874,29 +11874,29 @@ static void test_texture_load(void) U4(surface_desc.ddpfPixelFormat).dwBBitMask = 0x000000ff;
hr = IDirectDraw_CreateSurface(ddraw, &surface_desc, &src_surface, NULL); - ok(SUCCEEDED(hr), "Failed to create surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create surface, hr %#lx.\n", hr); hr = IDirectDrawSurface_QueryInterface(src_surface, &IID_IDirect3DTexture, (void **)&texture); - ok(SUCCEEDED(hr), "Failed to get texture interface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get texture interface, hr %#lx.\n", hr); hr = IDirect3DTexture_GetHandle(texture, device, &src_texture_handle); - ok(SUCCEEDED(hr), "Failed to get texture handle, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get texture handle, hr %#lx.\n", hr); IDirect3DTexture_Release(texture);
hr = IDirectDraw_CreateSurface(ddraw, &surface_desc, &dst_surface, NULL); - ok(SUCCEEDED(hr), "Failed to create surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create surface, hr %#lx.\n", hr); hr = IDirectDrawSurface_QueryInterface(dst_surface, &IID_IDirect3DTexture, (void **)&texture); - ok(SUCCEEDED(hr), "Failed to get texture interface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get texture interface, hr %#lx.\n", hr); hr = IDirect3DTexture_GetHandle(texture, device, &dst_texture_handle); - ok(SUCCEEDED(hr), "Failed to get texture handle, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get texture handle, hr %#lx.\n", hr); IDirect3DTexture_Release(texture);
memset(&fx, 0, sizeof(fx)); fx.dwSize = sizeof(fx); U5(fx).dwFillColor = 0x0000ffff; hr = IDirectDrawSurface_Blt(src_surface, NULL, NULL, NULL, DDBLT_COLORFILL | DDBLT_WAIT, &fx); - ok(SUCCEEDED(hr), "Failed to fill surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to fill surface, hr %#lx.\n", hr);
hr = IDirect3DExecuteBuffer_Lock(execute_buffer, &exec_desc); - ok(SUCCEEDED(hr), "Failed to lock execute buffer, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to lock execute buffer, hr %#lx.\n", hr); memcpy(exec_desc.lpData, tquad, sizeof(tquad)); ptr = (BYTE *)exec_desc.lpData + sizeof(tquad); emit_process_vertices(&ptr, D3DPROCESSVERTICES_COPY, 0, 4); @@ -11908,41 +11908,41 @@ static void test_texture_load(void) emit_end(&ptr); inst_length = (BYTE *)ptr - (BYTE *)exec_desc.lpData - sizeof(tquad); hr = IDirect3DExecuteBuffer_Unlock(execute_buffer); - ok(SUCCEEDED(hr), "Failed to unlock execute buffer, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to unlock execute buffer, hr %#lx.\n", hr);
hr = IDirect3DViewport_Clear(viewport, 1, &clear_rect, D3DCLEAR_TARGET); - ok(SUCCEEDED(hr), "Failed to clear viewport, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to clear viewport, hr %#lx.\n", hr); color = get_surface_color(rt, 320, 240); - ok(compare_color(color, 0x00ffffff, 1), "Got unexpected color 0x%08x.\n", color); + ok(compare_color(color, 0x00ffffff, 1), "Got unexpected color 0x%08lx.\n", color); set_execute_data(execute_buffer, 4, sizeof(tquad), inst_length); hr = IDirect3DDevice_BeginScene(device); - ok(SUCCEEDED(hr), "Failed to begin scene, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to begin scene, hr %#lx.\n", hr); hr = IDirect3DDevice_Execute(device, execute_buffer, viewport, D3DEXECUTE_CLIPPED); - ok(SUCCEEDED(hr), "Failed to execute exec buffer, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to execute exec buffer, hr %#lx.\n", hr); hr = IDirect3DDevice_EndScene(device); - ok(SUCCEEDED(hr), "Failed to end scene, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to end scene, hr %#lx.\n", hr); color = get_surface_color(rt, 320, 240); - ok(compare_color(color, 0x0000ffff, 1), "Got unexpected color 0x%08x.\n", color); + ok(compare_color(color, 0x0000ffff, 1), "Got unexpected color 0x%08lx.\n", color);
memset(&fx, 0, sizeof(fx)); fx.dwSize = sizeof(fx); U5(fx).dwFillColor = 0x000000ff; hr = IDirectDrawSurface_Blt(src_surface, NULL, NULL, NULL, DDBLT_COLORFILL | DDBLT_WAIT, &fx); - ok(SUCCEEDED(hr), "Failed to fill surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to fill surface, hr %#lx.\n", hr);
hr = IDirect3DViewport_Clear(viewport, 1, &clear_rect, D3DCLEAR_TARGET); - ok(SUCCEEDED(hr), "Failed to clear viewport, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to clear viewport, hr %#lx.\n", hr); color = get_surface_color(rt, 320, 240); - ok(compare_color(color, 0x00ffffff, 1), "Got unexpected color 0x%08x.\n", color); + ok(compare_color(color, 0x00ffffff, 1), "Got unexpected color 0x%08lx.\n", color); set_execute_data(execute_buffer, 4, sizeof(tquad), inst_length); hr = IDirect3DDevice_BeginScene(device); - ok(SUCCEEDED(hr), "Failed to begin scene, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to begin scene, hr %#lx.\n", hr); hr = IDirect3DDevice_Execute(device, execute_buffer, viewport, D3DEXECUTE_CLIPPED); - ok(SUCCEEDED(hr), "Failed to execute exec buffer, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to execute exec buffer, hr %#lx.\n", hr); hr = IDirect3DDevice_EndScene(device); - ok(SUCCEEDED(hr), "Failed to end scene, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to end scene, hr %#lx.\n", hr); color = get_surface_color(rt, 320, 240); - ok(compare_color(color, 0x000000ff, 1), "Got unexpected color 0x%08x.\n", color); + ok(compare_color(color, 0x000000ff, 1), "Got unexpected color 0x%08lx.\n", color);
IDirectDrawSurface_Release(dst_surface); IDirectDrawSurface_Release(src_surface); @@ -11952,7 +11952,7 @@ static void test_texture_load(void) destroy_viewport(device, viewport); IDirect3DDevice_Release(device); refcount = IDirectDraw_Release(ddraw); - ok(!refcount, "DirectDraw has %u references left.\n", refcount); + ok(!refcount, "DirectDraw has %lu references left.\n", refcount); DestroyWindow(window); }
@@ -11974,7 +11974,7 @@ static void test_ck_operation(void) ddraw = create_ddraw(); ok(!!ddraw, "Failed to create a ddraw object.\n"); hr = IDirectDraw_SetCooperativeLevel(ddraw, window, DDSCL_NORMAL); - ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#lx.\n", hr);
memset(&surface_desc, 0, sizeof(surface_desc)); surface_desc.dwSize = sizeof(surface_desc); @@ -11988,16 +11988,16 @@ static void test_ck_operation(void) U3(surface_desc.ddpfPixelFormat).dwGBitMask = 0x0000ff00; U4(surface_desc.ddpfPixelFormat).dwBBitMask = 0x000000ff; hr = IDirectDraw_CreateSurface(ddraw, &surface_desc, &dst, NULL); - ok(SUCCEEDED(hr), "Failed to create surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create surface, hr %#lx.\n", hr);
surface_desc.dwFlags |= DDSD_CKSRCBLT; surface_desc.ddckCKSrcBlt.dwColorSpaceLowValue = 0x00ff00ff; surface_desc.ddckCKSrcBlt.dwColorSpaceHighValue = 0x00ff00ff; hr = IDirectDraw_CreateSurface(ddraw, &surface_desc, &src, NULL); - ok(SUCCEEDED(hr), "Failed to create surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create surface, hr %#lx.\n", hr);
hr = IDirectDrawSurface_Lock(src, NULL, &surface_desc, DDLOCK_WAIT, NULL); - ok(SUCCEEDED(hr), "Failed to lock surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to lock surface, hr %#lx.\n", hr); ok(!(surface_desc.dwFlags & DDSD_LPSURFACE), "Surface desc has LPSURFACE Flags set.\n"); color = surface_desc.lpSurface; color[0] = 0x77010203; @@ -12005,33 +12005,33 @@ static void test_ck_operation(void) color[2] = 0x77ff00ff; color[3] = 0x00ff00ff; hr = IDirectDrawSurface_Unlock(src, NULL); - ok(SUCCEEDED(hr), "Failed to unlock surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to unlock surface, hr %#lx.\n", hr);
for (i = 0; i < 2; ++i) { hr = IDirectDrawSurface_Lock(dst, NULL, &surface_desc, DDLOCK_WAIT, NULL); - ok(SUCCEEDED(hr), "Failed to lock surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to lock surface, hr %#lx.\n", hr); color = surface_desc.lpSurface; color[0] = 0xcccccccc; color[1] = 0xcccccccc; color[2] = 0xcccccccc; color[3] = 0xcccccccc; hr = IDirectDrawSurface_Unlock(dst, NULL); - ok(SUCCEEDED(hr), "Failed to unlock surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to unlock surface, hr %#lx.\n", hr);
if (i) { hr = IDirectDrawSurface_BltFast(dst, 0, 0, src, NULL, DDBLTFAST_SRCCOLORKEY); - ok(SUCCEEDED(hr), "Failed to blit, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to blit, hr %#lx.\n", hr); } else { hr = IDirectDrawSurface_Blt(dst, NULL, src, NULL, DDBLT_KEYSRC, NULL); - ok(SUCCEEDED(hr), "Failed to blit, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to blit, hr %#lx.\n", hr); }
hr = IDirectDrawSurface_Lock(dst, NULL, &surface_desc, DDLOCK_WAIT | DDLOCK_READONLY, NULL); - ok(SUCCEEDED(hr), "Failed to lock surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to lock surface, hr %#lx.\n", hr); ok(!(surface_desc.dwFlags & DDSD_LPSURFACE), "Surface desc has LPSURFACE Flags set.\n"); color = surface_desc.lpSurface; /* Different behavior on some drivers / windows versions. Some versions ignore the X channel when @@ -12046,69 +12046,69 @@ static void test_ck_operation(void) && color[2] == 0xcccccccc && color[3] == 0xcccccccc) /* Nvidia */ || broken(color[0] == 0xff010203 && color[1] == 0xff010203 && color[2] == 0xcccccccc && color[3] == 0xcccccccc) /* Testbot */, - "Destination data after blitting is %08x %08x %08x %08x, i=%u.\n", + "Destination data after blitting is %08lx %08lx %08lx %08lx, i=%u.\n", color[0], color[1], color[2], color[3], i); hr = IDirectDrawSurface_Unlock(dst, NULL); - ok(SUCCEEDED(hr), "Failed to unlock surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to unlock surface, hr %#lx.\n", hr); }
hr = IDirectDrawSurface_GetColorKey(src, DDCKEY_SRCBLT, &ckey); - ok(SUCCEEDED(hr), "Failed to get color key, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get color key, hr %#lx.\n", hr); ok(ckey.dwColorSpaceLowValue == 0x00ff00ff && ckey.dwColorSpaceHighValue == 0x00ff00ff, - "Got unexpected color key low=%08x high=%08x.\n", ckey.dwColorSpaceLowValue, ckey.dwColorSpaceHighValue); + "Got unexpected color key low=%08lx high=%08lx.\n", ckey.dwColorSpaceLowValue, ckey.dwColorSpaceHighValue);
ckey.dwColorSpaceLowValue = ckey.dwColorSpaceHighValue = 0x0000ff00; hr = IDirectDrawSurface_SetColorKey(src, DDCKEY_SRCBLT, &ckey); - ok(SUCCEEDED(hr), "Failed to set color key, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set color key, hr %#lx.\n", hr);
ckey.dwColorSpaceLowValue = ckey.dwColorSpaceHighValue = 0; hr = IDirectDrawSurface_GetColorKey(src, DDCKEY_SRCBLT, &ckey); - ok(SUCCEEDED(hr), "Failed to get color key, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get color key, hr %#lx.\n", hr); ok(ckey.dwColorSpaceLowValue == 0x0000ff00 && ckey.dwColorSpaceHighValue == 0x0000ff00, - "Got unexpected color key low=%08x high=%08x.\n", ckey.dwColorSpaceLowValue, ckey.dwColorSpaceHighValue); + "Got unexpected color key low=%08lx high=%08lx.\n", ckey.dwColorSpaceLowValue, ckey.dwColorSpaceHighValue);
surface_desc.ddckCKSrcBlt.dwColorSpaceLowValue = 0; surface_desc.ddckCKSrcBlt.dwColorSpaceHighValue = 0; hr = IDirectDrawSurface_GetSurfaceDesc(src, &surface_desc); - ok(SUCCEEDED(hr), "Failed to get surface desc, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get surface desc, hr %#lx.\n", hr); ok(surface_desc.ddckCKSrcBlt.dwColorSpaceLowValue == 0x0000ff00 && surface_desc.ddckCKSrcBlt.dwColorSpaceHighValue == 0x0000ff00, - "Got unexpected color key low=%08x high=%08x.\n", surface_desc.ddckCKSrcBlt.dwColorSpaceLowValue, + "Got unexpected color key low=%08lx high=%08lx.\n", surface_desc.ddckCKSrcBlt.dwColorSpaceLowValue, surface_desc.ddckCKSrcBlt.dwColorSpaceHighValue);
/* Test SetColorKey with dwColorSpaceHighValue < dwColorSpaceLowValue */ ckey.dwColorSpaceLowValue = 0x000000ff; ckey.dwColorSpaceHighValue = 0x00000000; hr = IDirectDrawSurface_SetColorKey(src, DDCKEY_SRCBLT, &ckey); - ok(SUCCEEDED(hr), "Failed to set color key, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set color key, hr %#lx.\n", hr);
ckey.dwColorSpaceLowValue = ckey.dwColorSpaceHighValue = 0; hr = IDirectDrawSurface_GetColorKey(src, DDCKEY_SRCBLT, &ckey); - ok(SUCCEEDED(hr), "Failed to get color key, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get color key, hr %#lx.\n", hr); ok(ckey.dwColorSpaceLowValue == 0x000000ff && ckey.dwColorSpaceHighValue == 0x000000ff, - "Got unexpected color key low=%08x high=%08x.\n", ckey.dwColorSpaceLowValue, ckey.dwColorSpaceHighValue); + "Got unexpected color key low=%08lx high=%08lx.\n", ckey.dwColorSpaceLowValue, ckey.dwColorSpaceHighValue);
ckey.dwColorSpaceLowValue = 0x000000ff; ckey.dwColorSpaceHighValue = 0x00000001; hr = IDirectDrawSurface_SetColorKey(src, DDCKEY_SRCBLT, &ckey); - ok(SUCCEEDED(hr), "Failed to set color key, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set color key, hr %#lx.\n", hr);
ckey.dwColorSpaceLowValue = ckey.dwColorSpaceHighValue = 0; hr = IDirectDrawSurface_GetColorKey(src, DDCKEY_SRCBLT, &ckey); - ok(SUCCEEDED(hr), "Failed to get color key, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get color key, hr %#lx.\n", hr); ok(ckey.dwColorSpaceLowValue == 0x000000ff && ckey.dwColorSpaceHighValue == 0x000000ff, - "Got unexpected color key low=%08x high=%08x.\n", ckey.dwColorSpaceLowValue, ckey.dwColorSpaceHighValue); + "Got unexpected color key low=%08lx high=%08lx.\n", ckey.dwColorSpaceLowValue, ckey.dwColorSpaceHighValue);
ckey.dwColorSpaceLowValue = 0x000000fe; ckey.dwColorSpaceHighValue = 0x000000fd; hr = IDirectDrawSurface_SetColorKey(src, DDCKEY_SRCBLT, &ckey); - ok(SUCCEEDED(hr), "Failed to set color key, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set color key, hr %#lx.\n", hr);
ckey.dwColorSpaceLowValue = ckey.dwColorSpaceHighValue = 0; hr = IDirectDrawSurface_GetColorKey(src, DDCKEY_SRCBLT, &ckey); - ok(SUCCEEDED(hr), "Failed to get color key, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get color key, hr %#lx.\n", hr); ok(ckey.dwColorSpaceLowValue == 0x000000fe && ckey.dwColorSpaceHighValue == 0x000000fe, - "Got unexpected color key low=%08x high=%08x.\n", ckey.dwColorSpaceLowValue, ckey.dwColorSpaceHighValue); + "Got unexpected color key low=%08lx high=%08lx.\n", ckey.dwColorSpaceLowValue, ckey.dwColorSpaceHighValue);
IDirectDrawSurface_Release(src); IDirectDrawSurface_Release(dst); @@ -12128,18 +12128,18 @@ static void test_ck_operation(void) U4(surface_desc.ddpfPixelFormat).dwBBitMask = 0x000000ff; U5(surface_desc.ddpfPixelFormat).dwRGBAlphaBitMask = 0xff000000; hr = IDirectDraw_CreateSurface(ddraw, &surface_desc, &dst, NULL); - ok(SUCCEEDED(hr), "Failed to create surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create surface, hr %#lx.\n", hr); hr = IDirectDraw_CreateSurface(ddraw, &surface_desc, &src, NULL); - ok(SUCCEEDED(hr), "Failed to create surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create surface, hr %#lx.\n", hr);
ckey.dwColorSpaceLowValue = 0x0000ff00; ckey.dwColorSpaceHighValue = 0x0000ff00; hr = IDirectDrawSurface_SetColorKey(dst, DDCKEY_SRCBLT, &ckey); - ok(SUCCEEDED(hr), "Failed to set color key, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set color key, hr %#lx.\n", hr); ckey.dwColorSpaceLowValue = 0x00ff0000; ckey.dwColorSpaceHighValue = 0x00ff0000; hr = IDirectDrawSurface_SetColorKey(dst, DDCKEY_DESTBLT, &ckey); - ok(SUCCEEDED(hr) || hr == DDERR_NOCOLORKEYHW, "Failed to set color key, hr %#x.\n", hr); + ok(SUCCEEDED(hr) || hr == DDERR_NOCOLORKEYHW, "Failed to set color key, hr %#lx.\n", hr); if (FAILED(hr)) { /* Nvidia reject dest keys, AMD allows them. This applies to vidmem and sysmem surfaces. */ @@ -12150,11 +12150,11 @@ static void test_ck_operation(void) ckey.dwColorSpaceLowValue = 0x000000ff; ckey.dwColorSpaceHighValue = 0x000000ff; hr = IDirectDrawSurface_SetColorKey(src, DDCKEY_SRCBLT, &ckey); - ok(SUCCEEDED(hr), "Failed to set color key, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set color key, hr %#lx.\n", hr); ckey.dwColorSpaceLowValue = 0x000000aa; ckey.dwColorSpaceHighValue = 0x000000aa; hr = IDirectDrawSurface_SetColorKey(src, DDCKEY_DESTBLT, &ckey); - ok(SUCCEEDED(hr), "Failed to set color key, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set color key, hr %#lx.\n", hr);
memset(&fx, 0, sizeof(fx)); fx.dwSize = sizeof(fx); @@ -12164,7 +12164,7 @@ static void test_ck_operation(void) fx.ddckDestColorkey.dwColorSpaceLowValue = 0x00001100;
hr = IDirectDrawSurface_Lock(src, NULL, &surface_desc, DDLOCK_WAIT, NULL); - ok(SUCCEEDED(hr), "Failed to lock surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to lock surface, hr %#lx.\n", hr); color = surface_desc.lpSurface; color[0] = 0x000000ff; /* Applies to src blt key in src surface. */ color[1] = 0x000000aa; /* Applies to dst blt key in src surface. */ @@ -12173,77 +12173,77 @@ static void test_ck_operation(void) color[4] = 0x00001100; /* Src color key in ddbltfx. */ color[5] = 0x00110000; /* Dst color key in ddbltfx. */ hr = IDirectDrawSurface_Unlock(src, NULL); - ok(SUCCEEDED(hr), "Failed to unlock surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to unlock surface, hr %#lx.\n", hr);
hr = IDirectDrawSurface_Lock(dst, NULL, &surface_desc, DDLOCK_WAIT, NULL); - ok(SUCCEEDED(hr), "Failed to lock surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to lock surface, hr %#lx.\n", hr); color = surface_desc.lpSurface; color[0] = color[1] = color[2] = color[3] = color[4] = color[5] = 0x55555555; hr = IDirectDrawSurface_Unlock(dst, NULL); - ok(SUCCEEDED(hr), "Failed to unlock surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to unlock surface, hr %#lx.\n", hr);
/* Test a blit without keying. */ hr = IDirectDrawSurface_Blt(dst, NULL, src, NULL, 0, &fx); - ok(SUCCEEDED(hr), "Failed to blit, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to blit, hr %#lx.\n", hr);
hr = IDirectDrawSurface_Lock(dst, NULL, &surface_desc, DDLOCK_WAIT, NULL); - ok(SUCCEEDED(hr), "Failed to lock surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to lock surface, hr %#lx.\n", hr); color = surface_desc.lpSurface; /* Should have copied src data unmodified to dst. */ ok(color[0] == 0x000000ff && color[1] == 0x000000aa && color[2] == 0x00ff0000 && color[3] == 0x0000ff00 && color[4] == 0x00001100 && color[5] == 0x00110000, - "Got unexpected content %08x %08x %08x %08x %08x %08x.\n", + "Got unexpected content %08lx %08lx %08lx %08lx %08lx %08lx.\n", color[0], color[1], color[2], color[3], color[4], color[5]);
color[0] = color[1] = color[2] = color[3] = color[4] = color[5] = 0x55555555; hr = IDirectDrawSurface_Unlock(dst, NULL); - ok(SUCCEEDED(hr), "Failed to unlock surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to unlock surface, hr %#lx.\n", hr);
/* Src key. */ hr = IDirectDrawSurface_Blt(dst, NULL, src, NULL, DDBLT_KEYSRC, &fx); - ok(SUCCEEDED(hr), "Failed to blit, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to blit, hr %#lx.\n", hr);
hr = IDirectDrawSurface_Lock(dst, NULL, &surface_desc, DDLOCK_WAIT, NULL); - ok(SUCCEEDED(hr), "Failed to lock surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to lock surface, hr %#lx.\n", hr); color = surface_desc.lpSurface; /* Src key applied to color[0]. It is unmodified, the others are copied. */ ok(color[0] == 0x55555555 && color[1] == 0x000000aa && color[2] == 0x00ff0000 && color[3] == 0x0000ff00 && color[4] == 0x00001100 && color[5] == 0x00110000, - "Got unexpected content %08x %08x %08x %08x %08x %08x.\n", + "Got unexpected content %08lx %08lx %08lx %08lx %08lx %08lx.\n", color[0], color[1], color[2], color[3], color[4], color[5]);
color[0] = color[1] = color[2] = color[3] = color[4] = color[5] = 0x55555555; hr = IDirectDrawSurface_Unlock(dst, NULL); - ok(SUCCEEDED(hr), "Failed to unlock surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to unlock surface, hr %#lx.\n", hr);
/* Src override. */ hr = IDirectDrawSurface_Blt(dst, NULL, src, NULL, DDBLT_KEYSRCOVERRIDE, &fx); - ok(SUCCEEDED(hr), "Failed to blit, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to blit, hr %#lx.\n", hr);
hr = IDirectDrawSurface_Lock(dst, NULL, &surface_desc, DDLOCK_WAIT, NULL); - ok(SUCCEEDED(hr), "Failed to lock surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to lock surface, hr %#lx.\n", hr); color = surface_desc.lpSurface; /* Override key applied to color[5]. It is unmodified, the others are copied. */ ok(color[0] == 0x000000ff && color[1] == 0x000000aa && color[2] == 0x00ff0000 && color[3] == 0x0000ff00 && color[4] == 0x00001100 && color[5] == 0x55555555, - "Got unexpected content %08x %08x %08x %08x %08x %08x.\n", + "Got unexpected content %08lx %08lx %08lx %08lx %08lx %08lx.\n", color[0], color[1], color[2], color[3], color[4], color[5]);
color[0] = color[1] = color[2] = color[3] = color[4] = color[5] = 0x55555555; hr = IDirectDrawSurface_Unlock(dst, NULL); - ok(SUCCEEDED(hr), "Failed to unlock surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to unlock surface, hr %#lx.\n", hr);
/* Src override AND src key. That is not supposed to work. */ hr = IDirectDrawSurface_Blt(dst, NULL, src, NULL, DDBLT_KEYSRC | DDBLT_KEYSRCOVERRIDE, &fx); - ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#lx.\n", hr);
hr = IDirectDrawSurface_Lock(dst, NULL, &surface_desc, DDLOCK_WAIT, NULL); - ok(SUCCEEDED(hr), "Failed to lock surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to lock surface, hr %#lx.\n", hr); color = surface_desc.lpSurface; /* Ensure the destination was not changed. */ ok(color[0] == 0x55555555 && color[1] == 0x55555555 && color[2] == 0x55555555 && color[3] == 0x55555555 && color[4] == 0x55555555 && color[5] == 0x55555555, - "Got unexpected content %08x %08x %08x %08x %08x %08x.\n", + "Got unexpected content %08lx %08lx %08lx %08lx %08lx %08lx.\n", color[0], color[1], color[2], color[3], color[4], color[5]);
/* Use different dst colors for the dst key test. */ @@ -12254,18 +12254,18 @@ static void test_ck_operation(void) color[4] = 0x000000aa; /* Dest key in src surface. */ color[5] = 0x000000aa; /* Dest key in src surface. */ hr = IDirectDrawSurface_Unlock(dst, NULL); - ok(SUCCEEDED(hr), "Failed to unlock surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to unlock surface, hr %#lx.\n", hr);
hr = IDirectDrawSurface_Blt(dst, NULL, src, NULL, DDBLT_KEYDEST, &fx); - ok(SUCCEEDED(hr), "Failed to blit, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to blit, hr %#lx.\n", hr);
hr = IDirectDrawSurface_Lock(dst, NULL, &surface_desc, DDLOCK_WAIT, NULL); - ok(SUCCEEDED(hr), "Failed to lock surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to lock surface, hr %#lx.\n", hr); color = surface_desc.lpSurface; /* Dst key applied to color[4,5], they are the only changed pixels. */ ok(color[0] == 0x00ff0000 && color[1] == 0x00ff0000 && color[2] == 0x00001100 && color[3] == 0x00001100 && color[4] == 0x00001100 && color[5] == 0x00110000, - "Got unexpected content %08x %08x %08x %08x %08x %08x.\n", + "Got unexpected content %08lx %08lx %08lx %08lx %08lx %08lx.\n", color[0], color[1], color[2], color[3], color[4], color[5]);
color[0] = 0x00ff0000; /* Dest key in dst surface. */ @@ -12275,28 +12275,28 @@ static void test_ck_operation(void) color[4] = 0x000000aa; /* Dest key in src surface. */ color[5] = 0x000000aa; /* Dest key in src surface. */ hr = IDirectDrawSurface_Unlock(dst, NULL); - ok(SUCCEEDED(hr), "Failed to unlock surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to unlock surface, hr %#lx.\n", hr);
/* What happens with a QI'd newer version of the interface? It takes the key * from the destination surface. */ hr = IDirectDrawSurface_QueryInterface(src, &IID_IDirectDrawSurface7, (void **)&src7); - ok(SUCCEEDED(hr), "Failed to query IDirectDrawSurface interface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to query IDirectDrawSurface interface, hr %#lx.\n", hr); hr = IDirectDrawSurface_QueryInterface(dst, &IID_IDirectDrawSurface7, (void **)&dst7); - ok(SUCCEEDED(hr), "Failed to query IDirectDrawSurface interface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to query IDirectDrawSurface interface, hr %#lx.\n", hr);
hr = IDirectDrawSurface7_Blt(dst7, NULL, src7, NULL, DDBLT_KEYDEST, &fx); - ok(SUCCEEDED(hr), "Failed to blit, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to blit, hr %#lx.\n", hr);
IDirectDrawSurface7_Release(dst7); IDirectDrawSurface7_Release(src7);
hr = IDirectDrawSurface_Lock(dst, NULL, &surface_desc, DDLOCK_WAIT, NULL); - ok(SUCCEEDED(hr), "Failed to lock surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to lock surface, hr %#lx.\n", hr); color = surface_desc.lpSurface; /* Dst key applied to color[0,1], they are the only changed pixels. */ todo_wine ok(color[0] == 0x000000ff && color[1] == 0x000000aa && color[2] == 0x00001100 && color[3] == 0x00001100 && color[4] == 0x000000aa && color[5] == 0x000000aa, - "Got unexpected content %08x %08x %08x %08x %08x %08x.\n", + "Got unexpected content %08lx %08lx %08lx %08lx %08lx %08lx.\n", color[0], color[1], color[2], color[3], color[4], color[5]);
color[0] = 0x00ff0000; /* Dest key in dst surface. */ @@ -12306,19 +12306,19 @@ static void test_ck_operation(void) color[4] = 0x000000aa; /* Dest key in src surface. */ color[5] = 0x000000aa; /* Dest key in src surface. */ hr = IDirectDrawSurface_Unlock(dst, NULL); - ok(SUCCEEDED(hr), "Failed to unlock surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to unlock surface, hr %#lx.\n", hr);
/* Dest override key blit. */ hr = IDirectDrawSurface_Blt(dst, NULL, src, NULL, DDBLT_KEYDESTOVERRIDE, &fx); - ok(SUCCEEDED(hr), "Failed to blit, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to blit, hr %#lx.\n", hr);
hr = IDirectDrawSurface_Lock(dst, NULL, &surface_desc, DDLOCK_WAIT, NULL); - ok(SUCCEEDED(hr), "Failed to lock surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to lock surface, hr %#lx.\n", hr); color = surface_desc.lpSurface; /* Dst key applied to color[2,3], they are the only changed pixels. */ ok(color[0] == 0x00ff0000 && color[1] == 0x00ff0000 && color[2] == 0x00ff0000 && color[3] == 0x0000ff00 && color[4] == 0x000000aa && color[5] == 0x000000aa, - "Got unexpected content %08x %08x %08x %08x %08x %08x.\n", + "Got unexpected content %08lx %08lx %08lx %08lx %08lx %08lx.\n", color[0], color[1], color[2], color[3], color[4], color[5]);
color[0] = 0x00ff0000; /* Dest key in dst surface. */ @@ -12328,38 +12328,38 @@ static void test_ck_operation(void) color[4] = 0x000000aa; /* Dest key in src surface. */ color[5] = 0x000000aa; /* Dest key in src surface. */ hr = IDirectDrawSurface_Unlock(dst, NULL); - ok(SUCCEEDED(hr), "Failed to unlock surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to unlock surface, hr %#lx.\n", hr);
/* Dest override together with surface key. Supposed to fail. */ hr = IDirectDrawSurface_Blt(dst, NULL, src, NULL, DDBLT_KEYDEST | DDBLT_KEYDESTOVERRIDE, &fx); - ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#lx.\n", hr);
hr = IDirectDrawSurface_Lock(dst, NULL, &surface_desc, DDLOCK_WAIT, NULL); - ok(SUCCEEDED(hr), "Failed to lock surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to lock surface, hr %#lx.\n", hr); color = surface_desc.lpSurface; /* Destination is unchanged. */ ok(color[0] == 0x00ff0000 && color[1] == 0x00ff0000 && color[2] == 0x00001100 && color[3] == 0x00001100 && color[4] == 0x000000aa && color[5] == 0x000000aa, - "Got unexpected content %08x %08x %08x %08x %08x %08x.\n", + "Got unexpected content %08lx %08lx %08lx %08lx %08lx %08lx.\n", color[0], color[1], color[2], color[3], color[4], color[5]); hr = IDirectDrawSurface_Unlock(dst, NULL); - ok(SUCCEEDED(hr), "Failed to unlock surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to unlock surface, hr %#lx.\n", hr);
/* Source and destination key. This is driver dependent. New HW treats it like * DDBLT_KEYSRC. Older HW and some software renderers apply both keys. */ if (0) { hr = IDirectDrawSurface_Blt(dst, NULL, src, NULL, DDBLT_KEYDEST | DDBLT_KEYSRC, &fx); - ok(SUCCEEDED(hr), "Failed to blit, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to blit, hr %#lx.\n", hr);
hr = IDirectDrawSurface_Lock(dst, NULL, &surface_desc, DDLOCK_WAIT, NULL); - ok(SUCCEEDED(hr), "Failed to lock surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to lock surface, hr %#lx.\n", hr); color = surface_desc.lpSurface; /* Color[0] is filtered by the src key, 2-5 are filtered by the dst key, if * the driver applies it. */ ok(color[0] == 0x00ff0000 && color[1] == 0x000000aa && color[2] == 0x00ff0000 && color[3] == 0x0000ff00 && color[4] == 0x00001100 && color[5] == 0x00110000, - "Got unexpected content %08x %08x %08x %08x %08x %08x.\n", + "Got unexpected content %08lx %08lx %08lx %08lx %08lx %08lx.\n", color[0], color[1], color[2], color[3], color[4], color[5]);
color[0] = 0x00ff0000; /* Dest key in dst surface. */ @@ -12369,70 +12369,70 @@ static void test_ck_operation(void) color[4] = 0x000000aa; /* Dest key in src surface. */ color[5] = 0x000000aa; /* Dest key in src surface. */ hr = IDirectDrawSurface_Unlock(dst, NULL); - ok(SUCCEEDED(hr), "Failed to unlock surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to unlock surface, hr %#lx.\n", hr); }
/* Override keys without ddbltfx parameter fail */ hr = IDirectDrawSurface_Blt(dst, NULL, src, NULL, DDBLT_KEYDESTOVERRIDE, NULL); - ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface_Blt(dst, NULL, src, NULL, DDBLT_KEYSRCOVERRIDE, NULL); - ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#lx.\n", hr);
/* Try blitting without keys in the source surface. */ hr = IDirectDrawSurface_SetColorKey(src, DDCKEY_SRCBLT, NULL); - ok(SUCCEEDED(hr), "Failed to set color key, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set color key, hr %#lx.\n", hr); hr = IDirectDrawSurface_SetColorKey(src, DDCKEY_DESTBLT, NULL); - ok(SUCCEEDED(hr), "Failed to set color key, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set color key, hr %#lx.\n", hr);
/* That fails now. Do not bother to check that the data is unmodified. */ hr = IDirectDrawSurface_Blt(dst, NULL, src, NULL, DDBLT_KEYSRC, &fx); - ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#lx.\n", hr);
/* Surprisingly this still works. It uses the old key from the src surface. */ hr = IDirectDrawSurface_Blt(dst, NULL, src, NULL, DDBLT_KEYDEST, &fx); - ok(SUCCEEDED(hr), "Failed to blit, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to blit, hr %#lx.\n", hr);
hr = IDirectDrawSurface_Lock(dst, NULL, &surface_desc, DDLOCK_WAIT, NULL); - ok(SUCCEEDED(hr), "Failed to lock surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to lock surface, hr %#lx.\n", hr); color = surface_desc.lpSurface; /* Dst key applied to color[4,5], they are the only changed pixels. */ ok(color[0] == 0x00ff0000 && color[1] == 0x00ff0000 && color[2] == 0x00001100 && color[3] == 0x00001100 && color[4] == 0x00001100 && color[5] == 0x00110000, - "Got unexpected content %08x %08x %08x %08x %08x %08x.\n", + "Got unexpected content %08lx %08lx %08lx %08lx %08lx %08lx.\n", color[0], color[1], color[2], color[3], color[4], color[5]); hr = IDirectDrawSurface_Unlock(dst, NULL); - ok(SUCCEEDED(hr), "Failed to unlock surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to unlock surface, hr %#lx.\n", hr);
/* This returns DDERR_NOCOLORKEY as expected. */ hr = IDirectDrawSurface_GetColorKey(src, DDCKEY_DESTBLT, &ckey); - ok(hr == DDERR_NOCOLORKEY, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_NOCOLORKEY, "Got unexpected hr %#lx.\n", hr);
/* GetSurfaceDesc returns a zeroed key as expected. */ surface_desc.ddckCKSrcBlt.dwColorSpaceLowValue = 0x12345678; surface_desc.ddckCKSrcBlt.dwColorSpaceHighValue = 0x12345678; hr = IDirectDrawSurface_GetSurfaceDesc(src, &surface_desc); - ok(SUCCEEDED(hr), "Failed to get surface desc, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get surface desc, hr %#lx.\n", hr); ok(!surface_desc.ddckCKSrcBlt.dwColorSpaceLowValue && !surface_desc.ddckCKSrcBlt.dwColorSpaceHighValue, - "Got unexpected color key low=%08x high=%08x.\n", surface_desc.ddckCKSrcBlt.dwColorSpaceLowValue, + "Got unexpected color key low=%08lx high=%08lx.\n", surface_desc.ddckCKSrcBlt.dwColorSpaceLowValue, surface_desc.ddckCKSrcBlt.dwColorSpaceHighValue);
/* Try blitting without keys in the destination surface. */ hr = IDirectDrawSurface_SetColorKey(dst, DDCKEY_SRCBLT, NULL); - ok(SUCCEEDED(hr), "Failed to set color key, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set color key, hr %#lx.\n", hr); hr = IDirectDrawSurface_SetColorKey(dst, DDCKEY_DESTBLT, NULL); - ok(SUCCEEDED(hr), "Failed to set color key, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set color key, hr %#lx.\n", hr);
/* This is weird. It makes sense in v4 and v7, but because v1 * uses the key from the src surface it makes no sense here. */ hr = IDirectDrawSurface_Blt(dst, NULL, src, NULL, DDBLT_KEYDEST, &fx); - ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#lx.\n", hr);
done: IDirectDrawSurface_Release(src); IDirectDrawSurface_Release(dst); refcount = IDirectDraw_Release(ddraw); - ok(!refcount, "DirectDraw has %u references left.\n", refcount); + ok(!refcount, "DirectDraw has %lu references left.\n", refcount); DestroyWindow(window); }
@@ -12488,7 +12488,7 @@ static void test_depth_readback(void) }
hr = IDirect3DDevice_QueryInterface(device, &IID_IDirectDrawSurface, (void **)&rt); - ok(SUCCEEDED(hr), "Failed to get render target, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get render target, hr %#lx.\n", hr); z_depth = get_device_z_depth(device); z_mask = 0xffffffff >> (32 - z_depth); ds = get_depth_stencil(device); @@ -12506,10 +12506,10 @@ static void test_depth_readback(void) exec_desc.dwBufferSize = 1024; exec_desc.dwCaps = D3DDEBCAPS_SYSTEMMEMORY; hr = IDirect3DDevice_CreateExecuteBuffer(device, &exec_desc, &execute_buffer, NULL); - ok(SUCCEEDED(hr), "Failed to create execute buffer, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create execute buffer, hr %#lx.\n", hr);
hr = IDirect3DExecuteBuffer_Lock(execute_buffer, &exec_desc); - ok(SUCCEEDED(hr), "Failed to lock execute buffer, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to lock execute buffer, hr %#lx.\n", hr);
memcpy(exec_desc.lpData, quad, sizeof(quad)); ptr = (BYTE *)exec_desc.lpData + sizeof(quad); @@ -12520,22 +12520,22 @@ static void test_depth_readback(void) inst_length = ((BYTE *)ptr - sizeof(quad)) - (BYTE *)exec_desc.lpData;
hr = IDirect3DExecuteBuffer_Unlock(execute_buffer); - ok(SUCCEEDED(hr), "Failed to unlock execute buffer, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to unlock execute buffer, hr %#lx.\n", hr);
hr = IDirect3DViewport_Clear(viewport, 1, &clear_rect, D3DCLEAR_TARGET | D3DCLEAR_ZBUFFER); - ok(SUCCEEDED(hr), "Failed to clear, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to clear, hr %#lx.\n", hr); hr = IDirect3DDevice_BeginScene(device); - ok(SUCCEEDED(hr), "Failed to begin scene, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to begin scene, hr %#lx.\n", hr); set_execute_data(execute_buffer, 4, sizeof(quad), inst_length); hr = IDirect3DDevice_Execute(device, execute_buffer, viewport, D3DEXECUTE_UNCLIPPED); - ok(SUCCEEDED(hr), "Failed to execute exec buffer, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to execute exec buffer, hr %#lx.\n", hr); hr = IDirect3DDevice_EndScene(device); - ok(SUCCEEDED(hr), "Failed to end scene, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to end scene, hr %#lx.\n", hr);
memset(&surface_desc, 0, sizeof(surface_desc)); surface_desc.dwSize = sizeof(surface_desc); hr = IDirectDrawSurface_Lock(ds, NULL, &surface_desc, DDLOCK_READONLY | DDLOCK_WAIT, NULL); - ok(SUCCEEDED(hr), "Failed to lock surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to lock surface, hr %#lx.\n", hr);
for (y = 60; y < 480; y += 120) { @@ -12548,13 +12548,13 @@ static void test_depth_readback(void) expected_depth = (x * (0.9 / 640.0) + y * (0.1 / 480.0)) * z_mask; max_diff = ((0.5f * 0.9f) / 640.0f) * z_mask; ok(compare_uint(expected_depth, depth, max_diff), - "z_depth %u: Got depth 0x%08x (diff %d), expected 0x%08x+/-%u, at %u, %u.\n", + "z_depth %lu: Got depth 0x%08lx (diff %ld), expected 0x%08lx+/-%lu, at %u, %u.\n", z_depth, depth, expected_depth - depth, expected_depth, max_diff, x, y); } }
hr = IDirectDrawSurface_Unlock(ds, NULL); - ok(SUCCEEDED(hr), "Failed to unlock surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to unlock surface, hr %#lx.\n", hr);
IDirect3DExecuteBuffer_Release(execute_buffer); destroy_viewport(device, viewport); @@ -12562,7 +12562,7 @@ static void test_depth_readback(void) IDirectDrawSurface_Release(ds); IDirect3DDevice_Release(device); refcount = IDirectDrawSurface_Release(rt); - ok(!refcount, "Device has %u references left.\n", refcount); + ok(!refcount, "Device has %lu references left.\n", refcount); IDirectDraw_Release(ddraw); DestroyWindow(window); } @@ -12592,7 +12592,7 @@ static void test_clear(void) return; } hr = IDirect3DDevice_QueryInterface(device, &IID_IDirectDrawSurface, (void **)&rt); - ok(SUCCEEDED(hr), "Failed to get render target, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get render target, hr %#lx.\n", hr);
viewport = create_viewport(device, 0, 0, 640, 480);
@@ -12603,7 +12603,7 @@ static void test_clear(void)
viewport_set_background(device, viewport, white); hr = IDirect3DViewport_Clear(viewport, 1, &rect_full, D3DCLEAR_TARGET); - ok(SUCCEEDED(hr), "Failed to clear, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to clear, hr %#lx.\n", hr);
/* Positive x, negative y. */ U1(rect[0]).x1 = 0; @@ -12621,20 +12621,20 @@ static void test_clear(void) * refuse negative rectangles, but it will not clear them either. */ viewport_set_background(device, viewport, red); hr = IDirect3DViewport_Clear(viewport, 2, rect, D3DCLEAR_TARGET); - ok(SUCCEEDED(hr), "Failed to clear, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to clear, hr %#lx.\n", hr);
color = get_surface_color(rt, 160, 360); - ok(compare_color(color, 0x00ffffff, 0), "Clear rectangle 3 (pos, neg) has color 0x%08x.\n", color); + ok(compare_color(color, 0x00ffffff, 0), "Clear rectangle 3 (pos, neg) has color 0x%08lx.\n", color); color = get_surface_color(rt, 160, 120); - ok(compare_color(color, 0x00ff0000, 0), "Clear rectangle 1 (pos, pos) has color 0x%08x.\n", color); + ok(compare_color(color, 0x00ff0000, 0), "Clear rectangle 1 (pos, pos) has color 0x%08lx.\n", color); color = get_surface_color(rt, 480, 360); - ok(compare_color(color, 0x00ffffff, 0), "Clear rectangle 4 (NULL) has color 0x%08x.\n", color); + ok(compare_color(color, 0x00ffffff, 0), "Clear rectangle 4 (NULL) has color 0x%08lx.\n", color); color = get_surface_color(rt, 480, 120); - ok(compare_color(color, 0x00ffffff, 0), "Clear rectangle 4 (neg, neg) has color 0x%08x.\n", color); + ok(compare_color(color, 0x00ffffff, 0), "Clear rectangle 4 (neg, neg) has color 0x%08lx.\n", color);
viewport_set_background(device, viewport, white); hr = IDirect3DViewport_Clear(viewport, 1, &rect_full, D3DCLEAR_TARGET); - ok(SUCCEEDED(hr), "Failed to clear, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to clear, hr %#lx.\n", hr);
/* negative x, negative y. * Also ignored, except on WARP, which clears the entire screen. */ @@ -12644,34 +12644,34 @@ static void test_clear(void) U4(rect_negneg).y2 = 0; viewport_set_background(device, viewport, green); hr = IDirect3DViewport_Clear(viewport, 1, &rect_negneg, D3DCLEAR_TARGET); - ok(SUCCEEDED(hr), "Failed to clear, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to clear, hr %#lx.\n", hr);
color = get_surface_color(rt, 160, 360); ok(compare_color(color, 0x00ffffff, 0) || broken(ddraw_is_warp(ddraw) && compare_color(color, 0x0000ff00, 0)), - "Got unexpected color 0x%08x.\n", color); + "Got unexpected color 0x%08lx.\n", color); color = get_surface_color(rt, 160, 120); ok(compare_color(color, 0x00ffffff, 0) || broken(ddraw_is_warp(ddraw) && compare_color(color, 0x0000ff00, 0)), - "Got unexpected color 0x%08x.\n", color); + "Got unexpected color 0x%08lx.\n", color); color = get_surface_color(rt, 480, 360); ok(compare_color(color, 0x00ffffff, 0) || broken(ddraw_is_warp(ddraw) && compare_color(color, 0x0000ff00, 0)), - "Got unexpected color 0x%08x.\n", color); + "Got unexpected color 0x%08lx.\n", color); color = get_surface_color(rt, 480, 120); ok(compare_color(color, 0x00ffffff, 0) || broken(ddraw_is_warp(ddraw) && compare_color(color, 0x0000ff00, 0)), - "Got unexpected color 0x%08x.\n", color); + "Got unexpected color 0x%08lx.\n", color);
/* Test how the viewport affects clears. */ viewport_set_background(device, viewport, white); hr = IDirect3DViewport_Clear(viewport, 1, &rect_full, D3DCLEAR_TARGET); - ok(SUCCEEDED(hr), "Failed to clear, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to clear, hr %#lx.\n", hr);
viewport2 = create_viewport(device, 160, 120, 160, 120); viewport_set_background(device, viewport2, blue); hr = IDirect3DViewport_Clear(viewport2, 1, &rect_full, D3DCLEAR_TARGET); - ok(SUCCEEDED(hr), "Failed to clear, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to clear, hr %#lx.\n", hr);
viewport3 = create_viewport(device, 320, 240, 320, 240); viewport_set_background(device, viewport3, green); @@ -12681,7 +12681,7 @@ static void test_clear(void) U3(rect[0]).x2 = 480; U4(rect[0]).y2 = 360; hr = IDirect3DViewport_Clear(viewport3, 1, &rect[0], D3DCLEAR_TARGET); - ok(SUCCEEDED(hr), "Failed to clear, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to clear, hr %#lx.\n", hr);
/* AMD drivers do not limit the clear area to the viewport rectangle in * d3d1. It works as intended on other drivers and on d3d2 and newer on @@ -12689,96 +12689,96 @@ static void test_clear(void) color = get_surface_color(rt, 158, 118); ok(compare_color(color, 0x00ffffff, 0) || broken(ddraw_is_amd(ddraw) && compare_color(color, 0x000000ff, 0)), - "(158, 118) has color 0x%08x.\n", color); + "(158, 118) has color 0x%08lx.\n", color); color = get_surface_color(rt, 162, 118); ok(compare_color(color, 0x00ffffff, 0) || broken(ddraw_is_amd(ddraw) && compare_color(color, 0x000000ff, 0)), - "(162, 118) has color 0x%08x.\n", color); + "(162, 118) has color 0x%08lx.\n", color); color = get_surface_color(rt, 158, 122); ok(compare_color(color, 0x00ffffff, 0) || broken(ddraw_is_amd(ddraw) && compare_color(color, 0x000000ff, 0)), - "(158, 122) has color 0x%08x.\n", color); + "(158, 122) has color 0x%08lx.\n", color); color = get_surface_color(rt, 162, 122); ok(compare_color(color, 0x000000ff, 0) || broken(ddraw_is_amd(ddraw) && compare_color(color, 0x0000ff00, 0)), - "(162, 122) has color 0x%08x.\n", color); + "(162, 122) has color 0x%08lx.\n", color);
color = get_surface_color(rt, 318, 238); ok(compare_color(color, 0x000000ff, 0) || broken(ddraw_is_amd(ddraw) && compare_color(color, 0x0000ff00, 0)), - "(318, 238) has color 0x%08x.\n", color); + "(318, 238) has color 0x%08lx.\n", color); color = get_surface_color(rt, 322, 238); ok(compare_color(color, 0x00ffffff, 0) || broken(ddraw_is_amd(ddraw) && compare_color(color, 0x0000ff00, 0)), - "(322, 328) has color 0x%08x.\n", color); + "(322, 328) has color 0x%08lx.\n", color); color = get_surface_color(rt, 318, 242); ok(compare_color(color, 0x00ffffff, 0) || broken(ddraw_is_amd(ddraw) && compare_color(color, 0x0000ff00, 0)), - "(318, 242) has color 0x%08x.\n", color); + "(318, 242) has color 0x%08lx.\n", color); color = get_surface_color(rt, 322, 242); - ok(compare_color(color, 0x0000ff00, 0), "(322, 242) has color 0x%08x.\n", color); + ok(compare_color(color, 0x0000ff00, 0), "(322, 242) has color 0x%08lx.\n", color);
color = get_surface_color(rt, 478, 358); - ok(compare_color(color, 0x0000ff00, 0), "(478, 358) has color 0x%08x.\n", color); + ok(compare_color(color, 0x0000ff00, 0), "(478, 358) has color 0x%08lx.\n", color); color = get_surface_color(rt, 482, 358); ok(compare_color(color, 0x00ffffff, 0) || broken(ddraw_is_amd(ddraw) && compare_color(color, 0x000000ff, 0)), - "(482, 358) has color 0x%08x.\n", color); + "(482, 358) has color 0x%08lx.\n", color); color = get_surface_color(rt, 478, 362); ok(compare_color(color, 0x00ffffff, 0) || broken(ddraw_is_amd(ddraw) && compare_color(color, 0x000000ff, 0)), - "(478, 362) has color 0x%08x.\n", color); + "(478, 362) has color 0x%08lx.\n", color); color = get_surface_color(rt, 482, 362); ok(compare_color(color, 0x00ffffff, 0) || broken(ddraw_is_amd(ddraw) && compare_color(color, 0x000000ff, 0)), - "(482, 362) has color 0x%08x.\n", color); + "(482, 362) has color 0x%08lx.\n", color);
/* The clear rectangle is rendertarget absolute, not relative to the * viewport. */ hr = IDirect3DViewport_Clear(viewport, 1, &rect_full, D3DCLEAR_TARGET); - ok(SUCCEEDED(hr), "Failed to clear, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to clear, hr %#lx.\n", hr); U1(rect[0]).x1 = 330; U2(rect[0]).y1 = 250; U3(rect[0]).x2 = 340; U4(rect[0]).y2 = 260; hr = IDirect3DViewport_Clear(viewport3, 1, &rect[0], D3DCLEAR_TARGET); - ok(SUCCEEDED(hr), "Failed to clear, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to clear, hr %#lx.\n", hr);
color = get_surface_color(rt, 328, 248); - ok(compare_color(color, 0x00ffffff, 0), "(328, 248) has color 0x%08x.\n", color); + ok(compare_color(color, 0x00ffffff, 0), "(328, 248) has color 0x%08lx.\n", color); color = get_surface_color(rt, 332, 248); - ok(compare_color(color, 0x00ffffff, 0), "(332, 248) has color 0x%08x.\n", color); + ok(compare_color(color, 0x00ffffff, 0), "(332, 248) has color 0x%08lx.\n", color); color = get_surface_color(rt, 328, 252); - ok(compare_color(color, 0x00ffffff, 0), "(328, 252) has color 0x%08x.\n", color); + ok(compare_color(color, 0x00ffffff, 0), "(328, 252) has color 0x%08lx.\n", color); color = get_surface_color(rt, 332, 252); - ok(compare_color(color, 0x0000ff00, 0), "(332, 252) has color 0x%08x.\n", color); + ok(compare_color(color, 0x0000ff00, 0), "(332, 252) has color 0x%08lx.\n", color);
color = get_surface_color(rt, 338, 248); - ok(compare_color(color, 0x00ffffff, 0), "(338, 248) has color 0x%08x.\n", color); + ok(compare_color(color, 0x00ffffff, 0), "(338, 248) has color 0x%08lx.\n", color); color = get_surface_color(rt, 342, 248); - ok(compare_color(color, 0x00ffffff, 0), "(342, 248) has color 0x%08x.\n", color); + ok(compare_color(color, 0x00ffffff, 0), "(342, 248) has color 0x%08lx.\n", color); color = get_surface_color(rt, 338, 252); - ok(compare_color(color, 0x0000ff00, 0), "(338, 252) has color 0x%08x.\n", color); + ok(compare_color(color, 0x0000ff00, 0), "(338, 252) has color 0x%08lx.\n", color); color = get_surface_color(rt, 342, 252); - ok(compare_color(color, 0x00ffffff, 0), "(342, 252) has color 0x%08x.\n", color); + ok(compare_color(color, 0x00ffffff, 0), "(342, 252) has color 0x%08lx.\n", color);
color = get_surface_color(rt, 328, 258); - ok(compare_color(color, 0x00ffffff, 0), "(328, 258) has color 0x%08x.\n", color); + ok(compare_color(color, 0x00ffffff, 0), "(328, 258) has color 0x%08lx.\n", color); color = get_surface_color(rt, 332, 258); - ok(compare_color(color, 0x0000ff00, 0), "(332, 258) has color 0x%08x.\n", color); + ok(compare_color(color, 0x0000ff00, 0), "(332, 258) has color 0x%08lx.\n", color); color = get_surface_color(rt, 328, 262); - ok(compare_color(color, 0x00ffffff, 0), "(328, 262) has color 0x%08x.\n", color); + ok(compare_color(color, 0x00ffffff, 0), "(328, 262) has color 0x%08lx.\n", color); color = get_surface_color(rt, 332, 262); - ok(compare_color(color, 0x00ffffff, 0), "(332, 262) has color 0x%08x.\n", color); + ok(compare_color(color, 0x00ffffff, 0), "(332, 262) has color 0x%08lx.\n", color);
color = get_surface_color(rt, 338, 258); - ok(compare_color(color, 0x0000ff00, 0), "(338, 258) has color 0x%08x.\n", color); + ok(compare_color(color, 0x0000ff00, 0), "(338, 258) has color 0x%08lx.\n", color); color = get_surface_color(rt, 342, 258); - ok(compare_color(color, 0x00ffffff, 0), "(342, 258) has color 0x%08x.\n", color); + ok(compare_color(color, 0x00ffffff, 0), "(342, 258) has color 0x%08lx.\n", color); color = get_surface_color(rt, 338, 262); - ok(compare_color(color, 0x00ffffff, 0), "(338, 262) has color 0x%08x.\n", color); + ok(compare_color(color, 0x00ffffff, 0), "(338, 262) has color 0x%08lx.\n", color); color = get_surface_color(rt, 342, 262); - ok(compare_color(color, 0x00ffffff, 0), "(342, 262) has color 0x%08x.\n", color); + ok(compare_color(color, 0x00ffffff, 0), "(342, 262) has color 0x%08lx.\n", color);
/* COLORWRITEENABLE, SRGBWRITEENABLE and scissor rectangles do not exist * in d3d1. */ @@ -12792,9 +12792,9 @@ static void test_clear(void) IDirect3DMaterial_Release(blue); IDirectDrawSurface_Release(rt); refcount = IDirect3DDevice_Release(device); - ok(!refcount, "Device has %u references left.\n", refcount); + ok(!refcount, "Device has %lu references left.\n", refcount); refcount = IDirectDraw_Release(ddraw); - ok(!refcount, "Ddraw object has %u references left.\n", refcount); + ok(!refcount, "Ddraw object has %lu references left.\n", refcount); DestroyWindow(window); }
@@ -12852,12 +12852,12 @@ static HRESULT WINAPI enum_surfaces_create_cb(IDirectDrawSurface *surface, DDSUR struct enum_surfaces_param *param = context;
ok(!surface, "Unexpected surface %p.\n", surface); - ok((desc->dwFlags & expect_flags) == expect_flags, "Got unexpected flags %#x.\n", desc->dwFlags); + ok((desc->dwFlags & expect_flags) == expect_flags, "Got unexpected flags %#lx.\n", desc->dwFlags); if (param->count < ARRAY_SIZE(param->modes)) { const DDSURFACEDESC *expect = ¶m->modes[param->count]; - ok(desc->dwWidth == expect->dwWidth, "Expected width %u, got %u.\n", expect->dwWidth, desc->dwWidth); - ok(desc->dwHeight == expect->dwHeight, "Expected height %u, got %u.\n", expect->dwHeight, desc->dwHeight); + ok(desc->dwWidth == expect->dwWidth, "Expected width %lu, got %lu.\n", expect->dwWidth, desc->dwWidth); + ok(desc->dwHeight == expect->dwHeight, "Expected height %lu, got %lu.\n", expect->dwHeight, desc->dwHeight); ok(!memcmp(&U4(*desc).ddpfPixelFormat, &U4(*expect).ddpfPixelFormat, sizeof(U4(*desc).ddpfPixelFormat)), "Pixel formats didn't match.\n"); } @@ -12882,18 +12882,18 @@ static void test_enum_surfaces(void) memset(&desc, 0, sizeof(desc)); desc.dwSize = sizeof(desc); hr = IDirectDraw_GetDisplayMode(ddraw, &desc); - ok(hr == DD_OK, "Failed to get display mode, hr %#x.\n", hr); + ok(hr == DD_OK, "Failed to get display mode, hr %#lx.\n", hr); current_format = desc.ddpfPixelFormat;
hr = IDirectDraw_SetCooperativeLevel(ddraw, NULL, DDSCL_NORMAL); - ok(hr == DD_OK, "Failed to set cooperative level, hr %#x.\n", hr); + ok(hr == DD_OK, "Failed to set cooperative level, hr %#lx.\n", hr);
hr = IDirectDraw_EnumSurfaces(ddraw, DDENUMSURFACES_ALL, NULL, NULL, enum_surfaces_cb); - ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#lx.\n", hr);
hr = IDirectDraw_EnumSurfaces(ddraw, DDENUMSURFACES_CANBECREATED | DDENUMSURFACES_ALL, NULL, NULL, enum_surfaces_cb); - ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#lx.\n", hr);
memset(&desc, 0, sizeof(desc)); desc.dwSize = sizeof(desc); @@ -12903,52 +12903,52 @@ static void test_enum_surfaces(void) desc.dwWidth = 32; desc.dwHeight = 32; hr = IDirectDraw_CreateSurface(ddraw, &desc, ¶m.surfaces[0], NULL); - ok(SUCCEEDED(hr), "Failed to create surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create surface, hr %#lx.\n", hr);
hr = IDirectDrawSurface_GetAttachedSurface(param.surfaces[0], &desc.ddsCaps, ¶m.surfaces[1]); - ok(SUCCEEDED(hr), "Failed to get attached surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get attached surface, hr %#lx.\n", hr); hr = IDirectDrawSurface_GetAttachedSurface(param.surfaces[1], &desc.ddsCaps, ¶m.surfaces[2]); - ok(SUCCEEDED(hr), "Failed to get attached surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get attached surface, hr %#lx.\n", hr); hr = IDirectDrawSurface_GetAttachedSurface(param.surfaces[2], &desc.ddsCaps, ¶m.surfaces[3]); - ok(hr == DDERR_NOTFOUND, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_NOTFOUND, "Got unexpected hr %#lx.\n", hr); ok(!param.surfaces[3], "Got unexpected pointer %p.\n", param.surfaces[3]);
param.count = 0; hr = IDirectDraw_EnumSurfaces(ddraw, DDENUMSURFACES_DOESEXIST | DDENUMSURFACES_ALL, &desc, ¶m, enum_surfaces_cb); - ok(SUCCEEDED(hr), "Failed to enumerate surfaces, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to enumerate surfaces, hr %#lx.\n", hr); ok(param.count == 3, "Got unexpected number of enumerated surfaces %u.\n", param.count);
param.count = 0; hr = IDirectDraw_EnumSurfaces(ddraw, DDENUMSURFACES_DOESEXIST | DDENUMSURFACES_ALL, NULL, ¶m, enum_surfaces_cb); - ok(SUCCEEDED(hr), "Failed to enumerate surfaces, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to enumerate surfaces, hr %#lx.\n", hr); ok(param.count == 3, "Got unexpected number of enumerated surfaces %u.\n", param.count);
desc.dwFlags = DDSD_WIDTH | DDSD_HEIGHT; param.count = 0; hr = IDirectDraw_EnumSurfaces(ddraw, DDENUMSURFACES_DOESEXIST | DDENUMSURFACES_MATCH, &desc, ¶m, enum_surfaces_cb); - ok(hr == DD_OK, "Failed to enumerate surfaces, hr %#x.\n", hr); + ok(hr == DD_OK, "Failed to enumerate surfaces, hr %#lx.\n", hr); ok(param.count == 1, "Got unexpected number of enumerated surfaces %u.\n", param.count);
param.count = 0; hr = IDirectDraw_EnumSurfaces(ddraw, DDENUMSURFACES_DOESEXIST | DDENUMSURFACES_NOMATCH, &desc, ¶m, enum_surfaces_cb); - ok(hr == DD_OK, "Failed to enumerate surfaces, hr %#x.\n", hr); + ok(hr == DD_OK, "Failed to enumerate surfaces, hr %#lx.\n", hr); ok(param.count == 2, "Got unexpected number of enumerated surfaces %u.\n", param.count);
desc.dwFlags = 0; param.count = 0; hr = IDirectDraw_EnumSurfaces(ddraw, DDENUMSURFACES_DOESEXIST | DDENUMSURFACES_MATCH, &desc, ¶m, enum_surfaces_cb); - ok(hr == DD_OK, "Failed to enumerate surfaces, hr %#x.\n", hr); + ok(hr == DD_OK, "Failed to enumerate surfaces, hr %#lx.\n", hr); ok(param.count == 3, "Got unexpected number of enumerated surfaces %u.\n", param.count);
desc.dwFlags = 0; param.count = 0; hr = IDirectDraw_EnumSurfaces(ddraw, DDENUMSURFACES_DOESEXIST, &desc, ¶m, enum_surfaces_cb); - ok(hr == DD_OK, "Failed to enumerate surfaces, hr %#x.\n", hr); + ok(hr == DD_OK, "Failed to enumerate surfaces, hr %#lx.\n", hr); ok(param.count == 3, "Got unexpected number of enumerated surfaces %u.\n", param.count);
IDirectDrawSurface_Release(param.surfaces[2]); @@ -12958,7 +12958,7 @@ static void test_enum_surfaces(void) param.count = 0; hr = IDirectDraw_EnumSurfaces(ddraw, DDENUMSURFACES_DOESEXIST | DDENUMSURFACES_ALL, NULL, ¶m, enum_surfaces_cb); - ok(hr == DD_OK, "Failed to enumerate surfaces, hr %#x.\n", hr); + ok(hr == DD_OK, "Failed to enumerate surfaces, hr %#lx.\n", hr); ok(!param.count, "Got unexpected number of enumerated surfaces %u.\n", param.count);
memset(&desc, 0, sizeof(desc)); @@ -12968,15 +12968,15 @@ static void test_enum_surfaces(void)
hr = IDirectDraw_EnumSurfaces(ddraw, DDENUMSURFACES_CANBECREATED | DDENUMSURFACES_ALL, &desc, ¶m, enum_surfaces_create_cb); - ok(hr == DDERR_INVALIDPARAMS, "Failed to enumerate surfaces, hr %#x.\n", hr); + ok(hr == DDERR_INVALIDPARAMS, "Failed to enumerate surfaces, hr %#lx.\n", hr);
hr = IDirectDraw_EnumSurfaces(ddraw, DDENUMSURFACES_CANBECREATED | DDENUMSURFACES_NOMATCH, &desc, ¶m, enum_surfaces_create_cb); - ok(hr == DDERR_INVALIDPARAMS, "Failed to enumerate surfaces, hr %#x.\n", hr); + ok(hr == DDERR_INVALIDPARAMS, "Failed to enumerate surfaces, hr %#lx.\n", hr);
hr = IDirectDraw_EnumSurfaces(ddraw, DDENUMSURFACES_CANBECREATED, &desc, ¶m, enum_surfaces_create_cb); - ok(hr == DDERR_INVALIDPARAMS, "Failed to enumerate surfaces, hr %#x.\n", hr); + ok(hr == DDERR_INVALIDPARAMS, "Failed to enumerate surfaces, hr %#lx.\n", hr);
/* When not passed width and height, the callback is called with every * available display resolution. */ @@ -12985,13 +12985,13 @@ static void test_enum_surfaces(void) desc.dwFlags |= DDSD_PIXELFORMAT; U4(desc).ddpfPixelFormat = current_format; hr = IDirectDraw_EnumDisplayModes(ddraw, 0, &desc, ¶m, build_mode_list_cb); - ok(hr == DD_OK, "Failed to build mode list, hr %#x.\n", hr); + ok(hr == DD_OK, "Failed to build mode list, hr %#lx.\n", hr);
param.count = 0; desc.dwFlags &= ~DDSD_PIXELFORMAT; hr = IDirectDraw_EnumSurfaces(ddraw, DDENUMSURFACES_CANBECREATED | DDENUMSURFACES_MATCH, &desc, ¶m, enum_surfaces_create_cb); - ok(hr == DD_OK, "Failed to enumerate surfaces, hr %#x.\n", hr); + ok(hr == DD_OK, "Failed to enumerate surfaces, hr %#lx.\n", hr); ok(param.count == param.mode_count, "Expected %u surfaces, got %u.\n", param.mode_count, param.count);
desc.dwFlags |= DDSD_WIDTH | DDSD_HEIGHT; @@ -13002,15 +13002,15 @@ static void test_enum_surfaces(void) param.count = 0; hr = IDirectDraw_EnumSurfaces(ddraw, DDENUMSURFACES_CANBECREATED | DDENUMSURFACES_MATCH, &desc, ¶m, enum_surfaces_create_cb); - ok(hr == DD_OK, "Failed to enumerate surfaces, hr %#x.\n", hr); + ok(hr == DD_OK, "Failed to enumerate surfaces, hr %#lx.\n", hr); ok(param.count == 1, "Got unexpected number of enumerated surfaces %u.\n", param.count);
hr = IDirectDraw_CreateSurface(ddraw, &desc, ¶m.surfaces[0], NULL); - ok(hr == DD_OK, "Failed to create surface, hr %#x.\n", hr); + ok(hr == DD_OK, "Failed to create surface, hr %#lx.\n", hr); param.count = 0; hr = IDirectDraw_EnumSurfaces(ddraw, DDENUMSURFACES_CANBECREATED | DDENUMSURFACES_DOESEXIST | DDENUMSURFACES_MATCH, &desc, ¶m, enum_surfaces_create_cb); - ok(hr == DD_OK, "Failed to enumerate surfaces, hr %#x.\n", hr); + ok(hr == DD_OK, "Failed to enumerate surfaces, hr %#lx.\n", hr); ok(param.count == 1, "Got unexpected number of enumerated surfaces %u.\n", param.count); IDirectDrawSurface_Release(param.surfaces[0]);
@@ -13022,7 +13022,7 @@ static void test_enum_surfaces(void) param.count = 0; hr = IDirectDraw_EnumSurfaces(ddraw, DDENUMSURFACES_CANBECREATED | DDENUMSURFACES_MATCH, &desc, ¶m, enum_surfaces_create_cb); - ok(hr == DD_OK, "Failed to enumerate surfaces, hr %#x.\n", hr); + ok(hr == DD_OK, "Failed to enumerate surfaces, hr %#lx.\n", hr); ok(!param.count, "Got unexpected number of enumerated surfaces %u.\n", param.count);
IDirectDraw_Release(ddraw); @@ -13056,7 +13056,7 @@ static void test_execute_data(void) exec_desc.dwCaps = D3DDEBCAPS_SYSTEMMEMORY;
hr = IDirect3DDevice_CreateExecuteBuffer(device, &exec_desc, &execute_buffer, NULL); - ok(SUCCEEDED(hr), "Failed to create execute buffer, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create execute buffer, hr %#lx.\n", hr);
memset(&exec_data, 0, sizeof(exec_data));
@@ -13066,87 +13066,87 @@ static void test_execute_data(void) exec_data.dwInstructionOffset = 3 * sizeof(D3DVERTEX); exec_data.dwInstructionLength = 10; hr = IDirect3DExecuteBuffer_SetExecuteData(execute_buffer, &exec_data); - ok(SUCCEEDED(hr), "Failed to set execute data, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set execute data, hr %#lx.\n", hr);
/* dwSize is checked against the expected struct size. */ exec_data.dwSize = sizeof(exec_data) - 1; hr = IDirect3DExecuteBuffer_SetExecuteData(execute_buffer, &exec_data); - ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#lx.\n", hr); exec_data.dwSize = sizeof(exec_data) + 1; hr = IDirect3DExecuteBuffer_SetExecuteData(execute_buffer, &exec_data); - ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#lx.\n", hr);
/* The rest of the data is not checked for plausibility. */ exec_data.dwSize = sizeof(exec_data); exec_data.dwVertexCount = 0; hr = IDirect3DExecuteBuffer_SetExecuteData(execute_buffer, &exec_data); - ok(SUCCEEDED(hr), "Failed to set execute data, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set execute data, hr %#lx.\n", hr); exec_data.dwVertexCount = exec_desc.dwBufferSize / sizeof(D3DVERTEX) - 1; hr = IDirect3DExecuteBuffer_SetExecuteData(execute_buffer, &exec_data); - ok(SUCCEEDED(hr), "Failed to set execute data, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set execute data, hr %#lx.\n", hr); exec_data.dwVertexCount = exec_desc.dwBufferSize / sizeof(D3DVERTEX); hr = IDirect3DExecuteBuffer_SetExecuteData(execute_buffer, &exec_data); - ok(SUCCEEDED(hr), "Failed to set execute data, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set execute data, hr %#lx.\n", hr); exec_data.dwVertexCount = exec_desc.dwBufferSize / sizeof(D3DVERTEX) + 1; hr = IDirect3DExecuteBuffer_SetExecuteData(execute_buffer, &exec_data); - ok(SUCCEEDED(hr), "Failed to set execute data, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set execute data, hr %#lx.\n", hr); exec_data.dwVertexCount = 999999; hr = IDirect3DExecuteBuffer_SetExecuteData(execute_buffer, &exec_data); - ok(SUCCEEDED(hr), "Failed to set execute data, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set execute data, hr %#lx.\n", hr); exec_data.dwInstructionOffset = 999999 * sizeof(D3DVERTEX); hr = IDirect3DExecuteBuffer_SetExecuteData(execute_buffer, &exec_data); - ok(SUCCEEDED(hr), "Failed to set execute data, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set execute data, hr %#lx.\n", hr); exec_data.dwInstructionLength = 10240; hr = IDirect3DExecuteBuffer_SetExecuteData(execute_buffer, &exec_data); - ok(SUCCEEDED(hr), "Failed to set execute data, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set execute data, hr %#lx.\n", hr);
/* The input structure is not modified. */ - ok(exec_data.dwSize == sizeof(exec_data), "Got unexpected struct size %u\n", + ok(exec_data.dwSize == sizeof(exec_data), "Got unexpected struct size %lu\n", exec_data.dwSize); - ok(exec_data.dwVertexCount == 999999, "Got unexpected vertex count %u\n", + ok(exec_data.dwVertexCount == 999999, "Got unexpected vertex count %lu\n", exec_data.dwVertexCount); - ok(exec_data.dwInstructionOffset == 999999 * sizeof(D3DVERTEX), "Got unexpected instruction offset %u\n", + ok(exec_data.dwInstructionOffset == 999999 * sizeof(D3DVERTEX), "Got unexpected instruction offset %lu\n", exec_data.dwInstructionOffset); - ok(exec_data.dwInstructionLength == 10240, "Got unexpected instruction length %u\n", + ok(exec_data.dwInstructionLength == 10240, "Got unexpected instruction length %lu\n", exec_data.dwInstructionLength);
/* No validation in GetExecuteData. */ memset(&exec_data, 0, sizeof(exec_data)); exec_desc.dwSize = sizeof(exec_desc); hr = IDirect3DExecuteBuffer_GetExecuteData(execute_buffer, &exec_data); - ok(SUCCEEDED(hr), "Failed to get execute data, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get execute data, hr %#lx.\n", hr);
- ok(exec_data.dwSize == sizeof(exec_data), "Got unexpected struct size %u\n", + ok(exec_data.dwSize == sizeof(exec_data), "Got unexpected struct size %lu\n", exec_data.dwSize); - ok(exec_data.dwVertexCount == 999999, "Got unexpected vertex count %u\n", + ok(exec_data.dwVertexCount == 999999, "Got unexpected vertex count %lu\n", exec_data.dwVertexCount); - ok(exec_data.dwInstructionOffset == 999999 * sizeof(D3DVERTEX), "Got unexpected instruction offset %u\n", + ok(exec_data.dwInstructionOffset == 999999 * sizeof(D3DVERTEX), "Got unexpected instruction offset %lu\n", exec_data.dwInstructionOffset); - ok(exec_data.dwInstructionLength == 10240, "Got unexpected instruction length %u\n", + ok(exec_data.dwInstructionLength == 10240, "Got unexpected instruction length %lu\n", exec_data.dwInstructionLength);
memset(&exec_data, 0xaa, sizeof(exec_data)); exec_desc.dwSize = sizeof(exec_desc) - 1; hr = IDirect3DExecuteBuffer_GetExecuteData(execute_buffer, &exec_data); - ok(SUCCEEDED(hr), "Failed to get execute data, hr %#x.\n", hr); - ok(exec_data.dwSize == sizeof(exec_data), "Got unexpected struct size %u\n", + ok(SUCCEEDED(hr), "Failed to get execute data, hr %#lx.\n", hr); + ok(exec_data.dwSize == sizeof(exec_data), "Got unexpected struct size %lu\n", exec_data.dwSize); - ok(exec_data.dwVertexCount == 999999, "Got unexpected vertex count %u\n", + ok(exec_data.dwVertexCount == 999999, "Got unexpected vertex count %lu\n", exec_data.dwVertexCount); - ok(exec_data.dwInstructionOffset == 999999 * sizeof(D3DVERTEX), "Got unexpected instruction offset %u\n", + ok(exec_data.dwInstructionOffset == 999999 * sizeof(D3DVERTEX), "Got unexpected instruction offset %lu\n", exec_data.dwInstructionOffset); - ok(exec_data.dwInstructionLength == 10240, "Got unexpected instruction length %u\n", + ok(exec_data.dwInstructionLength == 10240, "Got unexpected instruction length %lu\n", exec_data.dwInstructionLength);
exec_desc.dwSize = 0; hr = IDirect3DExecuteBuffer_GetExecuteData(execute_buffer, &exec_data); - ok(SUCCEEDED(hr), "Failed to get execute data, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get execute data, hr %#lx.\n", hr); exec_desc.dwSize = sizeof(exec_desc) + 1; hr = IDirect3DExecuteBuffer_GetExecuteData(execute_buffer, &exec_data); - ok(SUCCEEDED(hr), "Failed to get execute data, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get execute data, hr %#lx.\n", hr); exec_desc.dwSize = ~0U; hr = IDirect3DExecuteBuffer_GetExecuteData(execute_buffer, &exec_data); - ok(SUCCEEDED(hr), "Failed to get execute data, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get execute data, hr %#lx.\n", hr);
IDirect3DExecuteBuffer_Release(execute_buffer); IDirect3DDevice_Release(device); @@ -13216,25 +13216,25 @@ static void test_viewport(void) }
hr = IDirect3DDevice_QueryInterface(device, &IID_IDirectDrawSurface, (void **)&rt); - ok(SUCCEEDED(hr), "Failed to get render target, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get render target, hr %#lx.\n", hr);
hr = IDirect3DDevice_GetDirect3D(device, &d3d); - ok(SUCCEEDED(hr), "Failed to get Direct3D3 interface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get Direct3D3 interface, hr %#lx.\n", hr);
black_background = create_diffuse_material(device, 0.0f, 0.0f, 0.0f, 0.0f);
hr = IDirect3DDevice_CreateMatrix(device, &world_handle); - ok(SUCCEEDED(hr), "Creating a matrix object failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Creating a matrix object failed, hr %#lx.\n", hr); hr = IDirect3DDevice_SetMatrix(device, world_handle, &mat); - ok(SUCCEEDED(hr), "Setting a matrix object failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Setting a matrix object failed, hr %#lx.\n", hr); hr = IDirect3DDevice_CreateMatrix(device, &view_handle); - ok(SUCCEEDED(hr), "Creating a matrix object failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Creating a matrix object failed, hr %#lx.\n", hr); hr = IDirect3DDevice_SetMatrix(device, view_handle, &mat); - ok(SUCCEEDED(hr), "Setting a matrix object failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Setting a matrix object failed, hr %#lx.\n", hr); hr = IDirect3DDevice_CreateMatrix(device, &proj_handle); - ok(SUCCEEDED(hr), "Creating a matrix object failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Creating a matrix object failed, hr %#lx.\n", hr); hr = IDirect3DDevice_SetMatrix(device, proj_handle, &mat); - ok(SUCCEEDED(hr), "Setting a matrix object failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Setting a matrix object failed, hr %#lx.\n", hr);
memset(&exec_desc, 0, sizeof(exec_desc)); exec_desc.dwSize = sizeof(exec_desc); @@ -13243,10 +13243,10 @@ static void test_viewport(void) exec_desc.dwCaps = D3DDEBCAPS_SYSTEMMEMORY;
hr = IDirect3DDevice_CreateExecuteBuffer(device, &exec_desc, &execute_buffer, NULL); - ok(SUCCEEDED(hr), "Failed to create execute buffer, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create execute buffer, hr %#lx.\n", hr);
hr = IDirect3DExecuteBuffer_Lock(execute_buffer, &exec_desc); - ok(SUCCEEDED(hr), "Failed to lock execute buffer, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to lock execute buffer, hr %#lx.\n", hr);
memcpy(exec_desc.lpData, quad, sizeof(quad)); ptr = ((BYTE *)exec_desc.lpData) + sizeof(quad); @@ -13263,7 +13263,7 @@ static void test_viewport(void) inst_length -= sizeof(quad);
hr = IDirect3DExecuteBuffer_Unlock(execute_buffer); - ok(SUCCEEDED(hr), "Failed to unlock execute buffer, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to unlock execute buffer, hr %#lx.\n", hr);
full_viewport = create_viewport(device, 0, 0, 640, 480); viewport_set_background(device, full_viewport, black_background); @@ -13275,10 +13275,10 @@ static void test_viewport(void) for (j = 0; j < ARRAY_SIZE(tests); ++j) { hr = IDirect3DViewport_Clear(full_viewport, 1, &clear_rect, D3DCLEAR_TARGET); - ok(SUCCEEDED(hr), "Failed to clear viewport, hr %#x (j %u).\n", hr, j); + ok(SUCCEEDED(hr), "Failed to clear viewport, hr %#lx (j %u).\n", hr, j);
hr = IDirect3D_CreateViewport(d3d, &viewport, NULL); - ok(SUCCEEDED(hr), "Failed to create viewport, hr %#x (j %u).\n", hr, j); + ok(SUCCEEDED(hr), "Failed to create viewport, hr %#lx (j %u).\n", hr, j); memset(&vp, 0, sizeof(vp)); vp.dwSize = sizeof(vp); vp.dwX = tests[j].vp.dwX; @@ -13293,21 +13293,21 @@ static void test_viewport(void) vp.dvMaxZ = 1.0f; hr = IDirect3DViewport_SetViewport(viewport, &vp); ok(hr == D3DERR_VIEWPORTHASNODEVICE, - "Setting viewport data returned unexpected hr %#x (j %u).\n", hr, j); + "Setting viewport data returned unexpected hr %#lx (j %u).\n", hr, j); hr = IDirect3DDevice_AddViewport(device, viewport); - ok(SUCCEEDED(hr), "Failed to add viewport, hr %#x (j %u).\n", hr, j); + ok(SUCCEEDED(hr), "Failed to add viewport, hr %#lx (j %u).\n", hr, j); hr = IDirect3DViewport_SetViewport(viewport, &vp); - ok(SUCCEEDED(hr), "Failed to set viewport data, hr %#x (j %u).\n", hr, j); + ok(SUCCEEDED(hr), "Failed to set viewport data, hr %#lx (j %u).\n", hr, j);
hr = IDirect3DDevice_BeginScene(device); - ok(SUCCEEDED(hr), "Failed to begin scene, hr %#x (j %u).\n", hr, j); + ok(SUCCEEDED(hr), "Failed to begin scene, hr %#lx (j %u).\n", hr, j);
set_execute_data(execute_buffer, 4, sizeof(quad), inst_length); hr = IDirect3DDevice_Execute(device, execute_buffer, viewport, D3DEXECUTE_CLIPPED); - ok(SUCCEEDED(hr), "Failed to execute exec buffer, hr %#x (j %u).\n", hr, j); + ok(SUCCEEDED(hr), "Failed to execute exec buffer, hr %#lx (j %u).\n", hr, j);
hr = IDirect3DDevice_EndScene(device); - ok(SUCCEEDED(hr), "Failed to end scene, hr %#x (j %u).\n", hr, j); + ok(SUCCEEDED(hr), "Failed to end scene, hr %#lx (j %u).\n", hr, j);
check_rect(rt, tests[j].expected_rect, tests[j].message);
@@ -13323,7 +13323,7 @@ static void test_viewport(void) IDirect3DDevice_DeleteMatrix(device, proj_handle); destroy_material(black_background); refcount = IDirect3DDevice_Release(device); - ok(!refcount, "Device has %u references left.\n", refcount); + ok(!refcount, "Device has %lu references left.\n", refcount); IDirect3D2_Release(d3d); IDirectDraw_Release(ddraw); DestroyWindow(window); @@ -13385,48 +13385,48 @@ static void test_find_device(void) result.dwSize = sizeof(result); search.dwSize = sizeof(search); hr = IDirect3D_FindDevice(d3d, NULL, NULL); - ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#lx.\n", hr); hr = IDirect3D_FindDevice(d3d, NULL, &result); - ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#lx.\n", hr); hr = IDirect3D_FindDevice(d3d, &search, NULL); - ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#lx.\n", hr); hr = IDirect3D_FindDevice(d3d, &search, &result); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); - ok(result.dwSize == sizeof(result), "Got unexpected result size %u.\n", result.dwSize); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); + ok(result.dwSize == sizeof(result), "Got unexpected result size %lu.\n", result.dwSize); ok(result.ddHwDesc.dwSize == sizeof(result_v1.hw_desc), - "Got unexpected HW desc size %u.\n", result.ddHwDesc.dwSize); + "Got unexpected HW desc size %lu.\n", result.ddHwDesc.dwSize); ok(result.ddSwDesc.dwSize == sizeof(result_v1.sw_desc), - "Got unexpected SW desc size %u.\n", result.ddSwDesc.dwSize); + "Got unexpected SW desc size %lu.\n", result.ddSwDesc.dwSize);
memset(&search, 0, sizeof(search)); memset(&result, 0, sizeof(result)); hr = IDirect3D_FindDevice(d3d, &search, &result); - ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#lx.\n", hr);
search.dwSize = sizeof(search) + 1; result.dwSize = sizeof(result) + 1; hr = IDirect3D_FindDevice(d3d, &search, &result); - ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#lx.\n", hr);
search.dwSize = sizeof(search);
memset(&result_v1, 0, sizeof(result_v1)); result_v1.size = sizeof(result_v1); hr = IDirect3D_FindDevice(d3d, &search, (D3DFINDDEVICERESULT *)&result_v1); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); ok(result_v1.hw_desc.dwSize == sizeof(result_v1.hw_desc), - "Got unexpected HW desc size %u.\n", result_v1.hw_desc.dwSize); + "Got unexpected HW desc size %lu.\n", result_v1.hw_desc.dwSize); ok(result_v1.sw_desc.dwSize == sizeof(result_v1.sw_desc), - "Got unexpected SW desc size %u.\n", result_v1.sw_desc.dwSize); + "Got unexpected SW desc size %lu.\n", result_v1.sw_desc.dwSize);
memset(&result_v2, 0, sizeof(result_v2)); result_v2.size = sizeof(result_v2); hr = IDirect3D_FindDevice(d3d, &search, (D3DFINDDEVICERESULT *)&result_v2); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); ok(result_v2.hw_desc.dwSize == sizeof(result_v1.hw_desc), - "Got unexpected HW desc size %u.\n", result_v2.hw_desc.dwSize); + "Got unexpected HW desc size %lu.\n", result_v2.hw_desc.dwSize); ok(result_v2.sw_desc.dwSize == sizeof(result_v1.sw_desc), - "Got unexpected SW desc size %u.\n", result_v2.sw_desc.dwSize); + "Got unexpected SW desc size %lu.\n", result_v2.sw_desc.dwSize);
for (i = 0; i < ARRAY_SIZE(tests); ++i) { @@ -13439,21 +13439,21 @@ static void test_find_device(void) result.dwSize = sizeof(result);
hr = IDirect3D_FindDevice(d3d, &search, &result); - ok(hr == tests[i].hr, "Test %u: Got unexpected hr %#x.\n", i, hr); - ok(result.dwSize == sizeof(result), "Test %u: Got unexpected result size %u.\n", i, result.dwSize); + ok(hr == tests[i].hr, "Test %u: Got unexpected hr %#lx.\n", i, hr); + ok(result.dwSize == sizeof(result), "Test %u: Got unexpected result size %lu.\n", i, result.dwSize); if (SUCCEEDED(hr)) { ok(result.ddHwDesc.dwSize == sizeof(result_v1.hw_desc), - "Test %u: Got unexpected HW desc size %u.\n", i, result.ddHwDesc.dwSize); + "Test %u: Got unexpected HW desc size %lu.\n", i, result.ddHwDesc.dwSize); ok(result.ddSwDesc.dwSize == sizeof(result_v1.sw_desc), - "Test %u: Got unexpected SW desc size %u.\n", i, result.ddSwDesc.dwSize); + "Test %u: Got unexpected SW desc size %lu.\n", i, result.ddSwDesc.dwSize); } else { ok(!result.ddHwDesc.dwSize, - "Test %u: Got unexpected HW desc size %u.\n", i, result.ddHwDesc.dwSize); + "Test %u: Got unexpected HW desc size %lu.\n", i, result.ddHwDesc.dwSize); ok(!result.ddSwDesc.dwSize, - "Test %u: Got unexpected SW desc size %u.\n", i, result.ddSwDesc.dwSize); + "Test %u: Got unexpected SW desc size %lu.\n", i, result.ddSwDesc.dwSize); } }
@@ -13480,7 +13480,7 @@ static void test_find_device(void) search.dcmColorModel = 0xdeadbeef; result.dwSize = sizeof(result); hr = IDirect3D_FindDevice(d3d, &search, &result); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
IDirect3D_Release(d3d); IDirectDraw_Release(ddraw); @@ -13496,9 +13496,9 @@ static LRESULT CALLBACK killfocus_proc(HWND window, UINT message, WPARAM wparam, if (message == WM_KILLFOCUS) { ref = IDirectDrawSurface_Release(killfocus_surface); - ok(!ref, "Unexpected surface refcount %u.\n", ref); + ok(!ref, "Unexpected surface refcount %lu.\n", ref); ref = IDirectDraw_Release(killfocus_ddraw); - ok(!ref, "Unexpected ddraw refcount %u.\n", ref); + ok(!ref, "Unexpected ddraw refcount %lu.\n", ref); killfocus_ddraw = NULL; }
@@ -13523,14 +13523,14 @@ static void test_killfocus(void) ok(!!killfocus_ddraw, "Failed to create a ddraw object.\n");
hr = IDirectDraw_SetCooperativeLevel(killfocus_ddraw, window, DDSCL_FULLSCREEN | DDSCL_EXCLUSIVE); - ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#lx.\n", hr);
memset(&surface_desc, 0, sizeof(surface_desc)); surface_desc.dwSize = sizeof(surface_desc); surface_desc.dwFlags = DDSD_CAPS; surface_desc.ddsCaps.dwCaps = DDSCAPS_PRIMARYSURFACE; hr = IDirectDraw_CreateSurface(killfocus_ddraw, &surface_desc, &killfocus_surface, NULL); - ok(SUCCEEDED(hr), "Failed to create surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create surface, hr %#lx.\n", hr);
SetForegroundWindow(GetDesktopWindow()); ok(!killfocus_ddraw, "WM_KILLFOCUS was not received.\n"); @@ -13553,38 +13553,38 @@ static void test_gdi_surface(void) ddraw = create_ddraw(); ok(!!ddraw, "Failed to create a ddraw object.\n"); hr = IDirectDraw_SetCooperativeLevel(ddraw, window, DDSCL_NORMAL); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr);
/* Retrieving the GDI surface requires a primary surface to exist. */ gdi_surface = (void *)0xc0dec0de; hr = IDirectDraw_GetGDISurface(ddraw, &gdi_surface); - ok(hr == DDERR_NOTFOUND, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_NOTFOUND, "Got unexpected hr %#lx.\n", hr); ok(!gdi_surface, "Got unexpected surface %p.\n", gdi_surface);
hr = IDirectDraw_FlipToGDISurface(ddraw); - ok(hr == DDERR_NOTFOUND, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_NOTFOUND, "Got unexpected hr %#lx.\n", hr);
memset(&surface_desc, 0, sizeof(surface_desc)); surface_desc.dwSize = sizeof(surface_desc); surface_desc.dwFlags = DDSD_CAPS; surface_desc.ddsCaps.dwCaps = DDSCAPS_PRIMARYSURFACE; hr = IDirectDraw_CreateSurface(ddraw, &surface_desc, &primary, NULL); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr);
hr = IDirectDraw_GetGDISurface(ddraw, &gdi_surface); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); ok(gdi_surface == primary, "Got unexpected surface %p, expected %p.\n", gdi_surface, primary); IDirectDrawSurface_Release(gdi_surface);
/* Flipping to the GDI surface requires the primary surface to be * flippable. */ hr = IDirectDraw_FlipToGDISurface(ddraw); - ok(hr == DDERR_NOTFLIPPABLE, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_NOTFLIPPABLE, "Got unexpected hr %#lx.\n", hr);
IDirectDrawSurface_Release(primary);
hr = IDirectDraw_SetCooperativeLevel(ddraw, window, DDSCL_EXCLUSIVE | DDSCL_FULLSCREEN); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr);
memset(&surface_desc, 0, sizeof(surface_desc)); surface_desc.dwSize = sizeof(surface_desc); @@ -13592,40 +13592,40 @@ static void test_gdi_surface(void) surface_desc.ddsCaps.dwCaps = DDSCAPS_PRIMARYSURFACE | DDSCAPS_COMPLEX | DDSCAPS_FLIP; U5(surface_desc).dwBackBufferCount = 1; hr = IDirectDraw_CreateSurface(ddraw, &surface_desc, &primary, NULL); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface_GetAttachedSurface(primary, &caps, &backbuffer); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); ok(backbuffer != primary, "Got unexpected backbuffer %p.\n", backbuffer);
hr = IDirectDraw_GetGDISurface(ddraw, &gdi_surface); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); ok(gdi_surface == primary, "Got unexpected surface %p, expected %p.\n", gdi_surface, primary); IDirectDrawSurface_Release(gdi_surface);
hr = IDirectDrawSurface_Flip(primary, NULL, DDFLIP_WAIT); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirectDraw_GetGDISurface(ddraw, &gdi_surface); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); ok(gdi_surface == backbuffer || broken(gdi_surface == primary), "Got unexpected surface %p, expected %p.\n", gdi_surface, backbuffer); IDirectDrawSurface_Release(gdi_surface);
hr = IDirectDraw_FlipToGDISurface(ddraw); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr);
hr = IDirectDraw_GetGDISurface(ddraw, &gdi_surface); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); ok(gdi_surface == primary, "Got unexpected surface %p, expected %p.\n", gdi_surface, primary); IDirectDrawSurface_Release(gdi_surface);
hr = IDirectDraw_FlipToGDISurface(ddraw); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr);
IDirectDrawSurface_Release(backbuffer); IDirectDrawSurface_Release(primary);
refcount = IDirectDraw_Release(ddraw); - ok(!refcount, "%u references left.\n", refcount); + ok(!refcount, "%lu references left.\n", refcount); DestroyWindow(window); }
@@ -13686,7 +13686,7 @@ static void test_alphatest(void) return; } hr = IDirect3DDevice_QueryInterface(device, &IID_IDirectDrawSurface, (void **)&rt); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
blue = create_diffuse_material(device, 0.0f, 0.0f, 1.0f, 1.0f); failed = create_diffuse_material(device, 1.0f, 0.0f, 0.0f, 1.0f); @@ -13695,7 +13695,7 @@ static void test_alphatest(void)
viewport_set_background(device, viewport, blue); hr = IDirect3DViewport_Clear(viewport, 1, &rect_full, D3DCLEAR_TARGET); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
memset(&exec_desc, 0, sizeof(exec_desc)); exec_desc.dwSize = sizeof(exec_desc); @@ -13704,10 +13704,10 @@ static void test_alphatest(void) exec_desc.dwCaps = D3DDEBCAPS_SYSTEMMEMORY;
hr = IDirect3DDevice_CreateExecuteBuffer(device, &exec_desc, &execute_buffer, NULL); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
hr = IDirect3DExecuteBuffer_Lock(execute_buffer, &exec_desc); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
ptr = exec_desc.lpData; emit_set_rs(&ptr, D3DRENDERSTATE_LIGHTING, FALSE); @@ -13717,17 +13717,17 @@ static void test_alphatest(void) inst_length = (BYTE *)ptr - (BYTE *)exec_desc.lpData;
hr = IDirect3DExecuteBuffer_Unlock(execute_buffer); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
set_execute_data(execute_buffer, 0, 0, inst_length); hr = IDirect3DDevice_Execute(device, execute_buffer, viewport, D3DEXECUTE_CLIPPED); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
viewport_set_background(device, viewport, failed); for (i = 0; i < ARRAY_SIZE(test_data); ++i) { hr = IDirect3DExecuteBuffer_Lock(execute_buffer, &exec_desc); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
memcpy(exec_desc.lpData, quad, sizeof(quad)); ptr = ((BYTE *)exec_desc.lpData) + sizeof(quad); @@ -13740,24 +13740,24 @@ static void test_alphatest(void) inst_length -= sizeof(quad);
hr = IDirect3DExecuteBuffer_Unlock(execute_buffer); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
hr = IDirect3DViewport_Clear(viewport, 1, &rect_full, D3DCLEAR_TARGET); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirect3DDevice_BeginScene(device); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); set_execute_data(execute_buffer, ARRAY_SIZE(quad), sizeof(quad), inst_length); hr = IDirect3DDevice_Execute(device, execute_buffer, viewport, D3DEXECUTE_CLIPPED); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirect3DDevice_EndScene(device); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); color = get_surface_color(rt, 320, 240); ok(compare_color(color, test_data[i].color_greater, 0), - "Alphatest failed, color 0x%08x, expected 0x%08x, alpha > ref, func %u.\n", + "Alphatest failed, color 0x%08lx, expected 0x%08lx, alpha > ref, func %u.\n", color, test_data[i].color_greater, test_data[i].func);
hr = IDirect3DExecuteBuffer_Lock(execute_buffer, &exec_desc); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
memcpy(exec_desc.lpData, quad, sizeof(quad)); ptr = ((BYTE *)exec_desc.lpData) + sizeof(quad); @@ -13769,20 +13769,20 @@ static void test_alphatest(void) inst_length -= sizeof(quad);
hr = IDirect3DExecuteBuffer_Unlock(execute_buffer); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
hr = IDirect3DViewport_Clear(viewport, 1, &rect_full, D3DCLEAR_TARGET); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirect3DDevice_BeginScene(device); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); set_execute_data(execute_buffer, ARRAY_SIZE(quad), sizeof(quad), inst_length); hr = IDirect3DDevice_Execute(device, execute_buffer, viewport, D3DEXECUTE_CLIPPED); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirect3DDevice_EndScene(device); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); color = get_surface_color(rt, 320, 240); ok(compare_color(color, test_data[i].color_greater, 0), - "Alphatest failed, color 0x%08x, expected 0x%08x, alpha > ref, func %u.\n", + "Alphatest failed, color 0x%08lx, expected 0x%08lx, alpha > ref, func %u.\n", color, test_data[i].color_greater, test_data[i].func); }
@@ -13792,9 +13792,9 @@ static void test_alphatest(void) destroy_material(blue); IDirectDrawSurface_Release(rt); refcount = IDirect3DDevice_Release(device); - ok(!refcount, "Device has %u references left.\n", refcount); + ok(!refcount, "Device has %lu references left.\n", refcount); refcount = IDirectDraw_Release(ddraw); - ok(!refcount, "DirectDraw has %u references left.\n", refcount); + ok(!refcount, "DirectDraw has %lu references left.\n", refcount); DestroyWindow(window); }
@@ -13814,24 +13814,24 @@ static void test_clipper_refcount(void) ddraw = create_ddraw(); ok(!!ddraw, "Failed to create a ddraw object.\n"); hr = IDirectDraw_SetCooperativeLevel(ddraw, window, DDSCL_NORMAL); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr);
memset(&surface_desc, 0, sizeof(surface_desc)); surface_desc.dwSize = sizeof(surface_desc); surface_desc.dwFlags = DDSD_CAPS; surface_desc.ddsCaps.dwCaps = DDSCAPS_PRIMARYSURFACE; hr = IDirectDraw_CreateSurface(ddraw, &surface_desc, &surface, NULL); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr);
hr = IDirectDraw_CreateClipper(ddraw, 0, &clipper, NULL); - ok(SUCCEEDED(hr), "Failed to create clipper, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create clipper, hr %#lx.\n", hr); refcount = get_refcount((IUnknown *)clipper); - ok(refcount == 1, "Got unexpected refcount %u.\n", refcount); + ok(refcount == 1, "Got unexpected refcount %lu.\n", refcount);
/* Show that clipper validation doesn't somehow happen through per-clipper vtable * pointers. */ hr = IDirectDraw_CreateClipper(ddraw, 0, &clipper2, NULL); - ok(SUCCEEDED(hr), "Failed to create clipper, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create clipper, hr %#lx.\n", hr); ok(clipper->lpVtbl == clipper2->lpVtbl, "Got different clipper vtables %p and %p.\n", clipper->lpVtbl, clipper2->lpVtbl); orig_vtbl = clipper->lpVtbl; @@ -13839,50 +13839,50 @@ static void test_clipper_refcount(void)
/* Surfaces hold a reference to clippers. No surprises there. */ hr = IDirectDrawSurface_SetClipper(surface, clipper); - ok(SUCCEEDED(hr), "Failed to set clipper, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set clipper, hr %#lx.\n", hr); refcount = get_refcount((IUnknown *)clipper); - ok(refcount == 2, "Got unexpected refcount %u.\n", refcount); + ok(refcount == 2, "Got unexpected refcount %lu.\n", refcount);
hr = IDirectDrawSurface_GetClipper(surface, &clipper2); - ok(SUCCEEDED(hr), "Failed to get clipper, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get clipper, hr %#lx.\n", hr); ok(clipper == clipper2, "Got clipper %p, expected %p.\n", clipper2, clipper); refcount = IDirectDrawClipper_Release(clipper2); - ok(refcount == 2, "Got unexpected refcount %u.\n", refcount); + ok(refcount == 2, "Got unexpected refcount %lu.\n", refcount);
hr = IDirectDrawSurface_SetClipper(surface, NULL); - ok(SUCCEEDED(hr), "Failed to set clipper, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set clipper, hr %#lx.\n", hr); refcount = get_refcount((IUnknown *)clipper); - ok(refcount == 1, "Got unexpected refcount %u.\n", refcount); + ok(refcount == 1, "Got unexpected refcount %lu.\n", refcount);
hr = IDirectDrawSurface_SetClipper(surface, clipper); - ok(SUCCEEDED(hr), "Failed to set clipper, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set clipper, hr %#lx.\n", hr); refcount = get_refcount((IUnknown *)clipper); - ok(refcount == 2, "Got unexpected refcount %u.\n", refcount); + ok(refcount == 2, "Got unexpected refcount %lu.\n", refcount);
refcount = IDirectDrawSurface_Release(surface); - ok(!refcount, "%u references left.\n", refcount); + ok(!refcount, "%lu references left.\n", refcount); refcount = get_refcount((IUnknown *)clipper); - ok(refcount == 1, "Got unexpected refcount %u.\n", refcount); + ok(refcount == 1, "Got unexpected refcount %lu.\n", refcount);
/* SetClipper with an invalid pointer crashes. */
/* Clipper methods work with a broken vtable, with the exception of Release. */ clipper->lpVtbl = (void *)0xdeadbeef; refcount = orig_vtbl->AddRef(clipper); - todo_wine ok(refcount == 2, "Got unexpected refcount %u.\n", refcount); + todo_wine ok(refcount == 2, "Got unexpected refcount %lu.\n", refcount); refcount = orig_vtbl->Release(clipper); - ok(!refcount, "Got unexpected refcount %u.\n", refcount); + ok(!refcount, "Got unexpected refcount %lu.\n", refcount);
clipper->lpVtbl = orig_vtbl; refcount = orig_vtbl->Release(clipper); - todo_wine ok(refcount == 1, "Got unexpected refcount %u.\n", refcount); + todo_wine ok(refcount == 1, "Got unexpected refcount %lu.\n", refcount);
/* Fix the refcount difference because Wine did not increase the ref in the * AddRef call above. */ if (refcount) { refcount = IDirectDrawClipper_Release(clipper); - ok(!refcount, "Got unexpected refcount %u.\n", refcount); + ok(!refcount, "Got unexpected refcount %lu.\n", refcount); }
/* Steal the reference and see what happens - releasing the surface works fine. @@ -13890,11 +13890,11 @@ static void test_clipper_refcount(void) * release it after the GetClipper call is likely to crash, and certain to crash * if we allocate and zero as much heap memory as we can get. */ hr = IDirectDraw_CreateSurface(ddraw, &surface_desc, &surface, NULL); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirectDraw_CreateClipper(ddraw, 0, &clipper, NULL); - ok(SUCCEEDED(hr), "Failed to create clipper, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create clipper, hr %#lx.\n", hr); hr = IDirectDrawSurface_SetClipper(surface, clipper); - ok(SUCCEEDED(hr), "Failed to set clipper, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set clipper, hr %#lx.\n", hr);
IDirectDrawClipper_Release(clipper); IDirectDrawClipper_Release(clipper); @@ -13910,7 +13910,7 @@ static void test_clipper_refcount(void) * The same Windows and driver versions run the test without heap corruption on * a Geforce 1060 GTX card. I have not seen the problem on AMD GPUs either. */ hr = IDirectDrawSurface_GetClipper(surface, &clipper2); - ok(SUCCEEDED(hr), "Failed to get clipper, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get clipper, hr %#lx.\n", hr); ok(clipper == clipper2, "Got clipper %p, expected %p.\n", clipper2, clipper); }
@@ -13918,10 +13918,10 @@ static void test_clipper_refcount(void) * vtable through the clipper pointer because it is no longer pointing to * valid memory. */ refcount = orig_vtbl->Release(clipper); - ok(!refcount, "%u references left.\n", refcount); + ok(!refcount, "%lu references left.\n", refcount);
refcount = IDirectDrawSurface_Release(surface); - ok(!refcount, "%u references left.\n", refcount); + ok(!refcount, "%lu references left.\n", refcount);
/* It looks like the protection against invalid thispointers is part of * the IDirectDrawClipper method implementation, not IDirectDrawSurface. */ @@ -13934,28 +13934,28 @@ static void test_clipper_refcount(void) clipper->lpVtbl = orig_vtbl;
refcount = orig_vtbl->AddRef(clipper); - todo_wine ok(!refcount, "Got refcount %u.\n", refcount); + todo_wine ok(!refcount, "Got refcount %lu.\n", refcount); refcount = orig_vtbl->AddRef((IDirectDrawClipper *)(ULONG_PTR)0xdeadbeef); - ok(!refcount, "Got refcount %u.\n", refcount); + ok(!refcount, "Got refcount %lu.\n", refcount);
changed = 0x1234; hr = orig_vtbl->IsClipListChanged(clipper, &changed); - todo_wine ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#x.\n", hr); + todo_wine ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#lx.\n", hr); todo_wine ok(changed == 0x1234, "'changed' changed: %x.\n", changed);
changed = 0x1234; hr = orig_vtbl->IsClipListChanged((IDirectDrawClipper *)(ULONG_PTR)0xdeadbeef, &changed); - ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#lx.\n", hr); ok(changed == 0x1234, "'changed' changed: %x.\n", changed);
/* Nope, we can't initialize our fake clipper. */ hr = orig_vtbl->Initialize(clipper, ddraw, 0); - todo_wine ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#x.\n", hr); + todo_wine ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#lx.\n", hr);
HeapFree(GetProcessHeap(), 0, clipper);
refcount = IDirectDraw_Release(ddraw); - ok(!refcount, "%u references left.\n", refcount); + ok(!refcount, "%lu references left.\n", refcount); DestroyWindow(window); }
@@ -14007,68 +14007,68 @@ static void test_caps(void) hal_caps.dwSize = sizeof(hal_caps); hel_caps.dwSize = sizeof(hel_caps); hr = IDirectDraw_GetCaps(ddraw, &hal_caps, &hel_caps); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); ok(hal_caps.ddsOldCaps.dwCaps == hal_caps.ddsCaps.dwCaps, - "Got unexpected caps %#x, expected %#x.\n", + "Got unexpected caps %#lx, expected %#lx.\n", hal_caps.ddsOldCaps.dwCaps, hal_caps.ddsCaps.dwCaps); ok(hel_caps.ddsOldCaps.dwCaps == hel_caps.ddsCaps.dwCaps, - "Got unexpected caps %#x, expected %#x.\n", + "Got unexpected caps %#lx, expected %#lx.\n", hel_caps.ddsOldCaps.dwCaps, hel_caps.ddsCaps.dwCaps);
no3d = !(hal_caps.ddsCaps.dwCaps & DDSCAPS_3DDEVICE); if (hal_caps.ddsCaps.dwCaps) { - ok(!(hal_caps.ddsCaps.dwCaps & caps_never), "Got unexpected caps %#x.\n", hal_caps.ddsCaps.dwCaps); - ok(!(~hal_caps.ddsCaps.dwCaps & caps_always), "Got unexpected caps %#x.\n", hal_caps.ddsCaps.dwCaps); + ok(!(hal_caps.ddsCaps.dwCaps & caps_never), "Got unexpected caps %#lx.\n", hal_caps.ddsCaps.dwCaps); + ok(!(~hal_caps.ddsCaps.dwCaps & caps_always), "Got unexpected caps %#lx.\n", hal_caps.ddsCaps.dwCaps); todo_wine_if(no3d) ok(!(~hal_caps.ddsCaps.dwCaps & caps_hal), - "Got unexpected caps %#x.\n", hal_caps.ddsCaps.dwCaps); + "Got unexpected caps %#lx.\n", hal_caps.ddsCaps.dwCaps); } - ok(!(hel_caps.ddsCaps.dwCaps & caps_never), "Got unexpected caps %#x.\n", hel_caps.ddsCaps.dwCaps); - ok(!(~hel_caps.ddsCaps.dwCaps & caps_always), "Got unexpected caps %#x.\n", hel_caps.ddsCaps.dwCaps); + ok(!(hel_caps.ddsCaps.dwCaps & caps_never), "Got unexpected caps %#lx.\n", hel_caps.ddsCaps.dwCaps); + ok(!(~hel_caps.ddsCaps.dwCaps & caps_always), "Got unexpected caps %#lx.\n", hel_caps.ddsCaps.dwCaps); todo_wine_if(!no3d) ok(!(hel_caps.ddsCaps.dwCaps & caps_hal), - "Got unexpected caps %#x.\n", hel_caps.ddsCaps.dwCaps); + "Got unexpected caps %#lx.\n", hel_caps.ddsCaps.dwCaps);
IDirectDraw_Release(ddraw);
if (hal_caps.ddsCaps.dwCaps) { hr = DirectDrawCreate((GUID *)DDCREATE_HARDWAREONLY, &ddraw, NULL); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr);
memset(&hal_caps, 0, sizeof(hal_caps)); memset(&hel_caps, 0, sizeof(hel_caps)); hal_caps.dwSize = sizeof(hal_caps); hel_caps.dwSize = sizeof(hel_caps); hr = IDirectDraw_GetCaps(ddraw, &hal_caps, &hel_caps); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); ok(hal_caps.ddsOldCaps.dwCaps == hal_caps.ddsCaps.dwCaps, - "Got unexpected caps %#x, expected %#x.\n", + "Got unexpected caps %#lx, expected %#lx.\n", hal_caps.ddsOldCaps.dwCaps, hal_caps.ddsCaps.dwCaps); ok(hel_caps.ddsOldCaps.dwCaps == hel_caps.ddsCaps.dwCaps, - "Got unexpected caps %#x, expected %#x.\n", + "Got unexpected caps %#lx, expected %#lx.\n", hel_caps.ddsOldCaps.dwCaps, hel_caps.ddsCaps.dwCaps);
- ok(!(hal_caps.ddsCaps.dwCaps & caps_never), "Got unexpected caps %#x.\n", hal_caps.ddsCaps.dwCaps); - ok(!(~hal_caps.ddsCaps.dwCaps & caps_always), "Got unexpected caps %#x.\n", hal_caps.ddsCaps.dwCaps); + ok(!(hal_caps.ddsCaps.dwCaps & caps_never), "Got unexpected caps %#lx.\n", hal_caps.ddsCaps.dwCaps); + ok(!(~hal_caps.ddsCaps.dwCaps & caps_always), "Got unexpected caps %#lx.\n", hal_caps.ddsCaps.dwCaps); todo_wine_if(no3d) ok(!(~hal_caps.ddsCaps.dwCaps & caps_hal), - "Got unexpected caps %#x.\n", hal_caps.ddsCaps.dwCaps); + "Got unexpected caps %#lx.\n", hal_caps.ddsCaps.dwCaps); if (is_ddraw64) { - ok(!(hel_caps.ddsCaps.dwCaps & caps_never), "Got unexpected caps %#x.\n", hel_caps.ddsCaps.dwCaps); - ok(!(~hel_caps.ddsCaps.dwCaps & caps_always), "Got unexpected caps %#x.\n", hel_caps.ddsCaps.dwCaps); + ok(!(hel_caps.ddsCaps.dwCaps & caps_never), "Got unexpected caps %#lx.\n", hel_caps.ddsCaps.dwCaps); + ok(!(~hel_caps.ddsCaps.dwCaps & caps_always), "Got unexpected caps %#lx.\n", hel_caps.ddsCaps.dwCaps); todo_wine_if(!no3d) ok(!(hel_caps.ddsCaps.dwCaps & caps_hal), - "Got unexpected caps %#x.\n", hel_caps.ddsCaps.dwCaps); + "Got unexpected caps %#lx.\n", hel_caps.ddsCaps.dwCaps); } else { - todo_wine ok(!hel_caps.ddsCaps.dwCaps, "Got unexpected caps %#x.\n", hel_caps.ddsCaps.dwCaps); + todo_wine ok(!hel_caps.ddsCaps.dwCaps, "Got unexpected caps %#lx.\n", hel_caps.ddsCaps.dwCaps); }
IDirectDraw_Release(ddraw); }
hr = DirectDrawCreate((GUID *)DDCREATE_EMULATIONONLY, &ddraw, NULL); - ok(hr == DD_OK || (is_ddraw64 && hr == E_FAIL), "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK || (is_ddraw64 && hr == E_FAIL), "Got unexpected hr %#lx.\n", hr); if (SUCCEEDED(hr)) { memset(&hal_caps, 0, sizeof(hal_caps)); @@ -14076,19 +14076,19 @@ static void test_caps(void) hal_caps.dwSize = sizeof(hal_caps); hel_caps.dwSize = sizeof(hel_caps); hr = IDirectDraw_GetCaps(ddraw, &hal_caps, &hel_caps); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); ok(hal_caps.ddsOldCaps.dwCaps == hal_caps.ddsCaps.dwCaps, - "Got unexpected caps %#x, expected %#x.\n", + "Got unexpected caps %#lx, expected %#lx.\n", hal_caps.ddsOldCaps.dwCaps, hal_caps.ddsCaps.dwCaps); ok(hel_caps.ddsOldCaps.dwCaps == hel_caps.ddsCaps.dwCaps, - "Got unexpected caps %#x, expected %#x.\n", + "Got unexpected caps %#lx, expected %#lx.\n", hel_caps.ddsOldCaps.dwCaps, hel_caps.ddsCaps.dwCaps);
- todo_wine ok(!hal_caps.ddsCaps.dwCaps, "Got unexpected caps %#x.\n", hal_caps.ddsCaps.dwCaps); - ok(!(hel_caps.ddsCaps.dwCaps & caps_never), "Got unexpected caps %#x.\n", hel_caps.ddsCaps.dwCaps); - ok(!(~hel_caps.ddsCaps.dwCaps & caps_always), "Got unexpected caps %#x.\n", hel_caps.ddsCaps.dwCaps); + todo_wine ok(!hal_caps.ddsCaps.dwCaps, "Got unexpected caps %#lx.\n", hal_caps.ddsCaps.dwCaps); + ok(!(hel_caps.ddsCaps.dwCaps & caps_never), "Got unexpected caps %#lx.\n", hel_caps.ddsCaps.dwCaps); + ok(!(~hel_caps.ddsCaps.dwCaps & caps_always), "Got unexpected caps %#lx.\n", hel_caps.ddsCaps.dwCaps); todo_wine_if(!no3d) ok(!(hel_caps.ddsCaps.dwCaps & caps_hal), - "Got unexpected caps %#x.\n", hel_caps.ddsCaps.dwCaps); + "Got unexpected caps %#lx.\n", hel_caps.ddsCaps.dwCaps);
IDirectDraw_Release(ddraw); } @@ -14107,7 +14107,7 @@ static void test_d32_support(void) ddraw = create_ddraw(); ok(!!ddraw, "Failed to create a ddraw object.\n"); hr = IDirectDraw_SetCooperativeLevel(ddraw, window, DDSCL_NORMAL); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr);
memset(&surface_desc, 0, sizeof(surface_desc)); surface_desc.dwSize = sizeof(surface_desc); @@ -14117,21 +14117,21 @@ static void test_d32_support(void) surface_desc.dwWidth = 64; surface_desc.dwHeight = 64; hr = IDirectDraw_CreateSurface(ddraw, &surface_desc, &surface, NULL); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr);
memset(&surface_desc, 0, sizeof(surface_desc)); surface_desc.dwSize = sizeof(surface_desc); hr = IDirectDrawSurface_GetSurfaceDesc(surface, &surface_desc); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); - ok((surface_desc.dwFlags & DDSD_ZBUFFERBITDEPTH), "Got unexpected flags %#x.\n", surface_desc.dwFlags); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); + ok((surface_desc.dwFlags & DDSD_ZBUFFERBITDEPTH), "Got unexpected flags %#lx.\n", surface_desc.dwFlags); ok(U2(surface_desc).dwZBufferBitDepth == 32, - "Got unexpected dwZBufferBitDepth %u.\n", U2(surface_desc).dwZBufferBitDepth); + "Got unexpected dwZBufferBitDepth %lu.\n", U2(surface_desc).dwZBufferBitDepth); ok(!(surface_desc.ddsCaps.dwCaps & DDSCAPS_VIDEOMEMORY), - "Got unexpected surface caps %#x.\n", surface_desc.ddsCaps.dwCaps); + "Got unexpected surface caps %#lx.\n", surface_desc.ddsCaps.dwCaps); IDirectDrawSurface_Release(surface);
refcount = IDirectDraw_Release(ddraw); - ok(!refcount, "%u references left.\n", refcount); + ok(!refcount, "%lu references left.\n", refcount); DestroyWindow(window); }
@@ -14178,13 +14178,13 @@ static void test_cursor_clipping(void) memset(&surface_desc, 0, sizeof(surface_desc)); surface_desc.dwSize = sizeof(surface_desc); hr = IDirectDraw_GetDisplayMode(ddraw, &surface_desc); - ok(hr == DD_OK, "GetDisplayMode failed, hr %#x.\n", hr); + ok(hr == DD_OK, "GetDisplayMode failed, hr %#lx.\n", hr);
memset(¶m, 0, sizeof(param)); param.old_width = surface_desc.dwWidth; param.old_height = surface_desc.dwHeight; hr = IDirectDraw_EnumDisplayModes(ddraw, 0, NULL, ¶m, find_different_mode_callback); - ok(hr == DD_OK, "EnumDisplayModes failed, hr %#x.\n", hr); + ok(hr == DD_OK, "EnumDisplayModes failed, hr %#lx.\n", hr); if (!(param.new_width && param.new_height)) { skip("Failed to find a different mode than %ux%u.\n", param.old_width, param.old_height); @@ -14192,87 +14192,87 @@ static void test_cursor_clipping(void) }
ret = ClipCursor(NULL); - ok(ret, "ClipCursor failed, error %#x.\n", GetLastError()); + ok(ret, "ClipCursor failed, error %#lx.\n", GetLastError()); get_virtual_rect(&rect); ret = GetClipCursor(&clip_rect); - ok(ret, "GetClipCursor failed, error %#x.\n", GetLastError()); + ok(ret, "GetClipCursor failed, error %#lx.\n", GetLastError()); ok(EqualRect(&clip_rect, &rect), "Expect clip rect %s, got %s.\n", wine_dbgstr_rect(&rect), wine_dbgstr_rect(&clip_rect));
/* Set cooperative level to normal */ hr = IDirectDraw_SetCooperativeLevel(ddraw, window, DDSCL_NORMAL); - ok(hr == DD_OK, "SetCooperativeLevel failed, hr %#x.\n", hr); + ok(hr == DD_OK, "SetCooperativeLevel failed, hr %#lx.\n", hr); flush_events(); get_virtual_rect(&rect); ret = GetClipCursor(&clip_rect); - ok(ret, "GetClipCursor failed, error %#x.\n", GetLastError()); + ok(ret, "GetClipCursor failed, error %#lx.\n", GetLastError()); ok(EqualRect(&clip_rect, &rect), "Expect clip rect %s, got %s.\n", wine_dbgstr_rect(&rect), wine_dbgstr_rect(&clip_rect));
hr = set_display_mode(ddraw, param.new_width, param.new_height); - ok(hr == DD_OK || hr == DDERR_UNSUPPORTED, "SetDisplayMode failed, hr %#x.\n", hr); + ok(hr == DD_OK || hr == DDERR_UNSUPPORTED, "SetDisplayMode failed, hr %#lx.\n", hr); if (FAILED(hr)) { - win_skip("SetDisplayMode failed, hr %#x.\n", hr); + win_skip("SetDisplayMode failed, hr %#lx.\n", hr); goto done; } flush_events(); get_virtual_rect(&rect); ret = GetClipCursor(&clip_rect); - ok(ret, "GetClipCursor failed, error %#x.\n", GetLastError()); + ok(ret, "GetClipCursor failed, error %#lx.\n", GetLastError()); ok(EqualRect(&clip_rect, &rect), "Expect clip rect %s, got %s.\n", wine_dbgstr_rect(&rect), wine_dbgstr_rect(&clip_rect));
hr = IDirectDraw_RestoreDisplayMode(ddraw); - ok(hr == DD_OK, "RestoreDisplayMode failed, hr %#x.\n", hr); + ok(hr == DD_OK, "RestoreDisplayMode failed, hr %#lx.\n", hr); flush_events(); get_virtual_rect(&rect); ret = GetClipCursor(&clip_rect); - ok(ret, "GetClipCursor failed, error %#x.\n", GetLastError()); + ok(ret, "GetClipCursor failed, error %#lx.\n", GetLastError()); ok(EqualRect(&clip_rect, &rect), "Expect clip rect %s, got %s.\n", wine_dbgstr_rect(&rect), wine_dbgstr_rect(&clip_rect));
/* Switch to full screen cooperative level */ hr = IDirectDraw_SetCooperativeLevel(ddraw, window, DDSCL_EXCLUSIVE | DDSCL_FULLSCREEN); - ok(hr == DD_OK, "SetCooperativeLevel failed, hr %#x.\n", hr); + ok(hr == DD_OK, "SetCooperativeLevel failed, hr %#lx.\n", hr); flush_events(); SetRect(&rect, 0, 0, param.old_width, param.old_height); ret = GetClipCursor(&clip_rect); - ok(ret, "GetClipCursor failed, error %#x.\n", GetLastError()); + ok(ret, "GetClipCursor failed, error %#lx.\n", GetLastError()); ok(EqualRect(&clip_rect, &rect), "Expect clip rect %s, got %s.\n", wine_dbgstr_rect(&rect), wine_dbgstr_rect(&clip_rect));
hr = set_display_mode(ddraw, param.new_width, param.new_height); - ok(hr == DD_OK || hr == DDERR_UNSUPPORTED, "SetDisplayMode failed, hr %#x.\n", hr); + ok(hr == DD_OK || hr == DDERR_UNSUPPORTED, "SetDisplayMode failed, hr %#lx.\n", hr); if (FAILED(hr)) { - win_skip("SetDisplayMode failed, hr %#x.\n", hr); + win_skip("SetDisplayMode failed, hr %#lx.\n", hr); goto done; } flush_events(); SetRect(&rect, 0, 0, param.new_width, param.new_height); ret = GetClipCursor(&clip_rect); - ok(ret, "GetClipCursor failed, error %#x.\n", GetLastError()); + ok(ret, "GetClipCursor failed, error %#lx.\n", GetLastError()); ok(EqualRect(&clip_rect, &rect), "Expect clip rect %s, got %s.\n", wine_dbgstr_rect(&rect), wine_dbgstr_rect(&clip_rect));
/* Restore display mode */ hr = IDirectDraw_RestoreDisplayMode(ddraw); - ok(hr == DD_OK, "RestoreDisplayMode failed, hr %#x.\n", hr); + ok(hr == DD_OK, "RestoreDisplayMode failed, hr %#lx.\n", hr); flush_events(); SetRect(&rect, 0, 0, param.old_width, param.old_height); ret = GetClipCursor(&clip_rect); - ok(ret, "GetClipCursor failed, error %#x.\n", GetLastError()); + ok(ret, "GetClipCursor failed, error %#lx.\n", GetLastError()); ok(EqualRect(&clip_rect, &rect), "Expect clip rect %s, got %s.\n", wine_dbgstr_rect(&rect), wine_dbgstr_rect(&clip_rect));
/* Switch to normal cooperative level */ hr = IDirectDraw_SetCooperativeLevel(ddraw, window, DDSCL_NORMAL); - ok(hr == DD_OK, "SetCooperativeLevel failed, hr %#x.\n", hr); + ok(hr == DD_OK, "SetCooperativeLevel failed, hr %#lx.\n", hr); flush_events(); get_virtual_rect(&rect); ret = GetClipCursor(&clip_rect); - ok(ret, "GetClipCursor failed, error %#x.\n", GetLastError()); + ok(ret, "GetClipCursor failed, error %#lx.\n", GetLastError()); ok(EqualRect(&clip_rect, &rect), "Expect clip rect %s, got %s.\n", wine_dbgstr_rect(&rect), wine_dbgstr_rect(&clip_rect));
@@ -14286,7 +14286,7 @@ static void check_vtbl_protection_(int line, const void *vtbl) MEMORY_BASIC_INFORMATION info; SIZE_T ret = VirtualQuery(vtbl, &info, sizeof(info)); ok_(__FILE__, line)(ret == sizeof(info), "Failed to query memory.\n"); - ok_(__FILE__, line)(info.Protect & (PAGE_READWRITE | PAGE_WRITECOPY), "Got protection %#x.\n", info.Protect); + ok_(__FILE__, line)(info.Protect & (PAGE_READWRITE | PAGE_WRITECOPY), "Got protection %#lx.\n", info.Protect); } #define check_vtbl_protection(a) check_vtbl_protection_(__LINE__, a)
@@ -14309,27 +14309,27 @@ static void test_vtbl_protection(void) ddraw = create_ddraw(); ok(!!ddraw, "Failed to create a ddraw object.\n"); hr = IDirectDraw_SetCooperativeLevel(ddraw, window, DDSCL_NORMAL); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr);
memset(&surface_desc, 0, sizeof(surface_desc)); surface_desc.dwSize = sizeof(surface_desc); surface_desc.dwFlags = DDSD_CAPS; surface_desc.ddsCaps.dwCaps = DDSCAPS_PRIMARYSURFACE; hr = IDirectDraw_CreateSurface(ddraw, &surface_desc, &surface1, NULL); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface_QueryInterface(surface1, &IID_IDirectDrawSurface2, (void **)&surface2); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface_QueryInterface(surface1, &IID_IDirectDrawSurface3, (void **)&surface3); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface_QueryInterface(surface1, &IID_IDirectDrawSurface4, (void **)&surface4); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface_QueryInterface(surface1, &IID_IDirectDrawSurface7, (void **)&surface7); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr);
memset(palette_entries, 0, sizeof(palette_entries)); hr = IDirectDraw_CreatePalette(ddraw, DDPCAPS_8BIT | DDPCAPS_ALLOW256, palette_entries, &palette, NULL); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr);
check_vtbl_protection(ddraw->lpVtbl); check_vtbl_protection(palette->lpVtbl); @@ -14346,7 +14346,7 @@ static void test_vtbl_protection(void) IDirectDrawSurface4_Release(surface4); IDirectDrawSurface7_Release(surface7); refcount = IDirectDraw_Release(ddraw); - ok(!refcount, "%u references left.\n", refcount); + ok(!refcount, "%lu references left.\n", refcount); DestroyWindow(window); }
@@ -14368,10 +14368,10 @@ static BOOL CALLBACK test_window_position_cb(HMONITOR monitor, HDC hdc, RECT *mo flush_events();
hr = IDirectDraw_SetCooperativeLevel(ddraw, window, DDSCL_EXCLUSIVE | DDSCL_FULLSCREEN); - ok(hr == DD_OK, "SetCooperativeLevel failed, hr %#x.\n", hr); + ok(hr == DD_OK, "SetCooperativeLevel failed, hr %#lx.\n", hr); flush_events(); ret = GetWindowRect(window, &window_rect); - ok(ret, "GetWindowRect failed, error %#x.\n", GetLastError()); + ok(ret, "GetWindowRect failed, error %#lx.\n", GetLastError()); SetRect(&primary_rect, 0, 0, GetSystemMetrics(SM_CXSCREEN), GetSystemMetrics(SM_CYSCREEN)); ok(EqualRect(&window_rect, &primary_rect), "Expect window rect %s, got %s.\n", wine_dbgstr_rect(&primary_rect), wine_dbgstr_rect(&window_rect)); @@ -14382,9 +14382,9 @@ static BOOL CALLBACK test_window_position_cb(HMONITOR monitor, HDC hdc, RECT *mo
ret = MoveWindow(window, new_rect.left, new_rect.top, new_rect.right - new_rect.left, new_rect.bottom - new_rect.top, TRUE); - ok(ret, "Got unexpected ret %#x, error %#x.\n", ret, GetLastError()); + ok(ret, "Got unexpected ret %#x, error %#lx.\n", ret, GetLastError()); ret = GetWindowRect(window, &window_rect); - ok(ret, "Got unexpected ret %#x, error %#x.\n", ret, GetLastError()); + ok(ret, "Got unexpected ret %#x, error %#lx.\n", ret, GetLastError()); ok(EqualRect(&window_rect, &new_rect), "Expected window rect %s, got %s.\n", wine_dbgstr_rect(monitor_rect), wine_dbgstr_rect(&window_rect)); @@ -14392,7 +14392,7 @@ static BOOL CALLBACK test_window_position_cb(HMONITOR monitor, HDC hdc, RECT *mo * on the second resize remains. */ flush_events(); ret = GetWindowRect(window, &window_rect); - ok(ret, "Got unexpected ret %#x, error %#x.\n", ret, GetLastError()); + ok(ret, "Got unexpected ret %#x, error %#lx.\n", ret, GetLastError()); /* Both Windows and Wine change the size of the window. On Windows it is exactly the new size but in Wine * it may get adjusted depending on window manager. */ ok(window_rect.right != monitor_rect->right && window_rect.bottom != monitor_rect->bottom, @@ -14401,15 +14401,15 @@ static BOOL CALLBACK test_window_position_cb(HMONITOR monitor, HDC hdc, RECT *mo
ret = MoveWindow(window, new_rect.left, new_rect.top, new_rect.right - new_rect.left, new_rect.bottom - new_rect.top, TRUE); - ok(ret, "Got unexpected ret %#x, error %#x.\n", ret, GetLastError()); + ok(ret, "Got unexpected ret %#x, error %#lx.\n", ret, GetLastError()); ret = GetWindowRect(window, &window_rect); - ok(ret, "Got unexpected ret %#x, error %#x.\n", ret, GetLastError()); + ok(ret, "Got unexpected ret %#x, error %#lx.\n", ret, GetLastError()); ok(EqualRect(&window_rect, &new_rect), "Expected window rect %s, got %s.\n", wine_dbgstr_rect(monitor_rect), wine_dbgstr_rect(&window_rect)); flush_events(); ret = GetWindowRect(window, &window_rect); - ok(ret, "Got unexpected ret %#x, error %#x.\n", ret, GetLastError()); + ok(ret, "Got unexpected ret %#x, error %#lx.\n", ret, GetLastError()); ok(window_rect.right != monitor_rect->right && window_rect.bottom != monitor_rect->bottom, "Expected window rect %s, got %s.\n", wine_dbgstr_rect(monitor_rect), wine_dbgstr_rect(&window_rect)); @@ -14417,25 +14417,25 @@ static BOOL CALLBACK test_window_position_cb(HMONITOR monitor, HDC hdc, RECT *mo /* Window activation should restore the window to fit the whole primary monitor */ ret = SetWindowPos(window, 0, monitor_rect->left, monitor_rect->top, 0, 0, SWP_NOZORDER | SWP_NOSIZE); - ok(ret, "SetWindowPos failed, error %#x.\n", GetLastError()); + ok(ret, "SetWindowPos failed, error %#lx.\n", GetLastError()); ret = SetForegroundWindow(GetDesktopWindow()); ok(ret, "Failed to set foreground window.\n"); flush_events(); ret = ShowWindow(window, SW_RESTORE); - ok(ret, "Failed to restore window, error %#x.\n", GetLastError()); + ok(ret, "Failed to restore window, error %#lx.\n", GetLastError()); flush_events(); ret = SetForegroundWindow(window); - ok(ret, "SetForegroundWindow failed, error %#x.\n", GetLastError()); + ok(ret, "SetForegroundWindow failed, error %#lx.\n", GetLastError()); flush_events(); ret = GetWindowRect(window, &window_rect); - ok(ret, "GetWindowRect failed, error %#x.\n", GetLastError()); + ok(ret, "GetWindowRect failed, error %#lx.\n", GetLastError()); ok(EqualRect(&window_rect, &primary_rect), "Expect window rect %s, got %s.\n", wine_dbgstr_rect(&primary_rect), wine_dbgstr_rect(&window_rect));
hr = IDirectDraw_SetCooperativeLevel(ddraw, window, DDSCL_NORMAL); - ok(hr == DD_OK, "SetCooperativeLevel failed, hr %#x.\n", hr); + ok(hr == DD_OK, "SetCooperativeLevel failed, hr %#lx.\n", hr); ret = GetWindowRect(window, &window_rect); - ok(ret, "GetWindowRect failed, error %#x.\n", GetLastError()); + ok(ret, "GetWindowRect failed, error %#lx.\n", GetLastError()); ok(EqualRect(&window_rect, &primary_rect), "Expect window rect %s, got %s.\n", wine_dbgstr_rect(&primary_rect), wine_dbgstr_rect(&window_rect));
@@ -14466,14 +14466,14 @@ static BOOL CALLBACK test_get_display_mode_cb(HMONITOR monitor, HDC hdc, RECT *m /* Test that DirectDraw doesn't use the device window to determine which monitor to use */ ret = SetWindowPos(window, 0, monitor_rect->left, monitor_rect->top, 0, 0, SWP_NOZORDER | SWP_NOSIZE); - ok(ret, "SetWindowPos failed, error %#x.\n", GetLastError()); + ok(ret, "SetWindowPos failed, error %#lx.\n", GetLastError());
surface_desc.dwSize = sizeof(surface_desc); hr = IDirectDraw_GetDisplayMode(ddraw, &surface_desc); - ok(hr == DD_OK, "GetDisplayMode failed, hr %#x.\n", hr); - ok(surface_desc.dwWidth == GetSystemMetrics(SM_CXSCREEN), "Expect width %d, got %d.\n", + ok(hr == DD_OK, "GetDisplayMode failed, hr %#lx.\n", hr); + ok(surface_desc.dwWidth == GetSystemMetrics(SM_CXSCREEN), "Expect width %d, got %ld.\n", GetSystemMetrics(SM_CXSCREEN), surface_desc.dwWidth); - ok(surface_desc.dwHeight == GetSystemMetrics(SM_CYSCREEN), "Expect height %d, got %d.\n", + ok(surface_desc.dwHeight == GetSystemMetrics(SM_CYSCREEN), "Expect height %d, got %ld.\n", GetSystemMetrics(SM_CYSCREEN), surface_desc.dwHeight);
DestroyWindow(window); @@ -14498,29 +14498,29 @@ static void test_get_display_mode(void) memset(&devmode, 0, sizeof(devmode)); devmode.dmSize = sizeof(devmode); ret = EnumDisplaySettingsW(NULL, ENUM_CURRENT_SETTINGS, &devmode); - ok(ret, "EnumDisplaySettingsW failed, error %#x.\n", GetLastError()); + ok(ret, "EnumDisplaySettingsW failed, error %#lx.\n", GetLastError());
surface_desc.dwSize = sizeof(surface_desc); hr = IDirectDraw_GetDisplayMode(ddraw, &surface_desc); - ok(hr == DD_OK, "GetDisplayMode failed, hr %#x.\n", hr); - ok(surface_desc.dwSize == sizeof(surface_desc), "Expected dwSize %u, got %u.\n", + ok(hr == DD_OK, "GetDisplayMode failed, hr %#lx.\n", hr); + ok(surface_desc.dwSize == sizeof(surface_desc), "Expected dwSize %Iu, got %lu.\n", sizeof(surface_desc), surface_desc.dwSize); - ok(surface_desc.dwFlags == flags, "Expected dwFlags %#x, got %#x.\n", flags, + ok(surface_desc.dwFlags == flags, "Expected dwFlags %#lx, got %#lx.\n", flags, surface_desc.dwFlags); - ok(surface_desc.dwWidth == devmode.dmPelsWidth, "Expected width %u, got %u.\n", + ok(surface_desc.dwWidth == devmode.dmPelsWidth, "Expected width %lu, got %lu.\n", devmode.dmPelsWidth, surface_desc.dwWidth); - ok(surface_desc.dwHeight == devmode.dmPelsHeight, "Expected height %u, got %u.\n", + ok(surface_desc.dwHeight == devmode.dmPelsHeight, "Expected height %lu, got %lu.\n", devmode.dmPelsHeight, surface_desc.dwHeight); - ok(surface_desc.dwRefreshRate == devmode.dmDisplayFrequency, "Expected frequency %u, got %u.\n", + ok(surface_desc.dwRefreshRate == devmode.dmDisplayFrequency, "Expected frequency %lu, got %lu.\n", devmode.dmDisplayFrequency, surface_desc.dwRefreshRate); ok(surface_desc.ddpfPixelFormat.dwSize == sizeof(surface_desc.ddpfPixelFormat), - "Expected ddpfPixelFormat.dwSize %u, got %u.\n", sizeof(surface_desc.ddpfPixelFormat), + "Expected ddpfPixelFormat.dwSize %Iu, got %lu.\n", sizeof(surface_desc.ddpfPixelFormat), surface_desc.ddpfPixelFormat.dwSize); ok(surface_desc.ddpfPixelFormat.dwRGBBitCount == devmode.dmBitsPerPel, - "Expected ddpfPixelFormat.dwRGBBitCount %u, got %u.\n", devmode.dmBitsPerPel, + "Expected ddpfPixelFormat.dwRGBBitCount %lu, got %lu.\n", devmode.dmBitsPerPel, surface_desc.ddpfPixelFormat.dwRGBBitCount); ok(surface_desc.lPitch == devmode.dmPelsWidth * devmode.dmBitsPerPel / 8, - "Expected pitch %u, got %u.\n", devmode.dmPelsWidth * devmode.dmBitsPerPel / 8, + "Expected pitch %lu, got %lu.\n", devmode.dmPelsWidth * devmode.dmBitsPerPel / 8, surface_desc.lPitch);
IDirectDraw_Release(ddraw); @@ -14574,7 +14574,7 @@ static void test_texture_wrong_caps(const GUID *device_guid) return; } hr = IDirect3DDevice_QueryInterface(device, &IID_IDirectDrawSurface, (void **)&rt); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
viewport = create_viewport(device, 0, 0, 640, 480);
@@ -14586,11 +14586,11 @@ static void test_texture_wrong_caps(const GUID *device_guid) ddsd.ddsCaps.dwCaps = DDSCAPS_OFFSCREENPLAIN; U4(ddsd).ddpfPixelFormat = fmt; hr = IDirectDraw_CreateSurface(ddraw, &ddsd, &surface, NULL); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface_QueryInterface(surface, &IID_IDirect3DTexture, (void **)&texture); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirect3DTexture_GetHandle(texture, device, &texture_handle); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
fill_surface(surface, 0xff00ff00);
@@ -14598,7 +14598,7 @@ static void test_texture_wrong_caps(const GUID *device_guid) viewport_set_background(device, viewport, background);
hr = IDirect3DViewport_Clear(viewport, 1, &clear_rect, D3DCLEAR_TARGET); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); if (is_software_device_type(device_guid)) fill_surface(rt, 0xffff0000);
@@ -14608,10 +14608,10 @@ static void test_texture_wrong_caps(const GUID *device_guid) exec_desc.dwBufferSize = 1024; exec_desc.dwCaps = D3DDEBCAPS_SYSTEMMEMORY; hr = IDirect3DDevice_CreateExecuteBuffer(device, &exec_desc, &execute_buffer, NULL); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
hr = IDirect3DExecuteBuffer_Lock(execute_buffer, &exec_desc); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); memcpy(exec_desc.lpData, quad, sizeof(quad)); ptr = (BYTE *)exec_desc.lpData + sizeof(quad); emit_process_vertices(&ptr, D3DPROCESSVERTICES_COPY, 0, 4); @@ -14620,20 +14620,20 @@ static void test_texture_wrong_caps(const GUID *device_guid) emit_end(&ptr); inst_length = (BYTE *)ptr - (BYTE *)exec_desc.lpData - sizeof(quad); hr = IDirect3DExecuteBuffer_Unlock(execute_buffer); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
set_execute_data(execute_buffer, 4, sizeof(quad), inst_length);
hr = IDirect3DDevice_BeginScene(device); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirect3DDevice_Execute(device, execute_buffer, viewport, D3DEXECUTE_CLIPPED); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirect3DDevice_EndScene(device); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
expected_color = is_software_device_type(device_guid) ? 0x0000ff00 : 0x00ffffff; color = get_surface_color(rt, 320, 240); - ok(compare_color(color, expected_color, 1), "Got color 0x%08x, expected 0x%08x.\n", color, expected_color); + ok(compare_color(color, expected_color, 1), "Got color 0x%08lx, expected 0x%08lx.\n", color, expected_color);
IDirect3DTexture_Release(texture); IDirectDrawSurface_Release(surface); @@ -14644,7 +14644,7 @@ static void test_texture_wrong_caps(const GUID *device_guid)
IDirect3DDevice_Release(device); refcount = IDirectDraw_Release(ddraw); - ok(!refcount, "DirectDraw has %u references left.\n", refcount); + ok(!refcount, "DirectDraw has %lu references left.\n", refcount); DestroyWindow(window); }
@@ -14991,7 +14991,7 @@ static void test_filling_convention(void) }
hr = IDirect3DDevice_QueryInterface(device, &IID_IDirectDrawSurface, (void **)&backbuffer); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
viewport = create_viewport(device, 0, 0, vp_size, vp_size); background = create_diffuse_material(device, 0.0f, 0.0f, 1.0f, 1.0f); @@ -15004,15 +15004,15 @@ static void test_filling_convention(void) exec_desc.dwCaps = D3DDEBCAPS_SYSTEMMEMORY;
hr = IDirect3DDevice_CreateExecuteBuffer(device, &exec_desc, &execute_buffer, NULL); - ok(hr == D3D_OK, "Failed to create execute buffer, hr %#x.\n", hr); + ok(hr == D3D_OK, "Failed to create execute buffer, hr %#lx.\n", hr);
for (i = 0; i < ARRAY_SIZE(tests); ++i) { hr = IDirect3DViewport_Clear(viewport, 1, &clear_rect, D3DCLEAR_TARGET); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
hr = IDirect3DExecuteBuffer_Lock(execute_buffer, &exec_desc); - ok(hr == D3D_OK, "Failed to lock execute buffer, hr %#x.\n", hr); + ok(hr == D3D_OK, "Failed to lock execute buffer, hr %#lx.\n", hr);
/* All test geometry has the same vertex count and vertex size. */ memcpy(exec_desc.lpData, tests[i].geometry, sizeof(center_tris)); @@ -15028,16 +15028,16 @@ static void test_filling_convention(void) inst_length -= sizeof(center_tris);
hr = IDirect3DExecuteBuffer_Unlock(execute_buffer); - ok(hr == D3D_OK, "Failed to lock execute buffer, hr %#x.\n", hr); + ok(hr == D3D_OK, "Failed to lock execute buffer, hr %#lx.\n", hr);
set_execute_data(execute_buffer, 12, sizeof(center_tris), inst_length);
hr = IDirect3DDevice_BeginScene(device); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirect3DDevice_Execute(device, execute_buffer, viewport, D3DEXECUTE_CLIPPED); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirect3DDevice_EndScene(device); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
for (y = 0; y < 8; y++) { @@ -15075,7 +15075,7 @@ static void test_filling_convention(void) * convention, but because wined3d will nudge geometry to the left to * keep diagonals (the 'R' in test case 'edge_tris') intact. */ todo_wine_if(todo && !compare_color(colour, expected, 1)) - ok(compare_color(colour, expected, 1), "Got unexpected colour %08x, %ux%u, case %u.\n", + ok(compare_color(colour, expected, 1), "Got unexpected colour %08lx, %ux%u, case %u.\n", colour, x, y, i); } } @@ -15085,7 +15085,7 @@ static void test_filling_convention(void) IDirectDrawSurface_Release(backbuffer); IDirect3DDevice_Release(device); refcount = IDirectDraw_Release(ddraw); - ok(!refcount, "Device has %u references left.\n", refcount); + ok(!refcount, "Device has %lu references left.\n", refcount); DestroyWindow(window); }
diff --git a/dlls/ddraw/tests/ddraw2.c b/dlls/ddraw/tests/ddraw2.c index 1285fa1b682..1298d1bc605 100644 --- a/dlls/ddraw/tests/ddraw2.c +++ b/dlls/ddraw/tests/ddraw2.c @@ -122,9 +122,9 @@ static BOOL ddraw_get_identifier(IDirectDraw2 *ddraw, DDDEVICEIDENTIFIER *identi HRESULT hr;
hr = IDirectDraw2_QueryInterface(ddraw, &IID_IDirectDraw4, (void **)&ddraw4); - ok(SUCCEEDED(hr), "Failed to get IDirectDraw4 interface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get IDirectDraw4 interface, hr %#lx.\n", hr); hr = IDirectDraw4_GetDeviceIdentifier(ddraw4, identifier, 0); - ok(SUCCEEDED(hr), "Failed to get device identifier, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get device identifier, hr %#lx.\n", hr); IDirectDraw4_Release(ddraw4);
return SUCCEEDED(hr); @@ -212,7 +212,7 @@ static DWORD WINAPI create_window_thread_proc(void *param)
p->window = create_window(); ret = SetEvent(p->window_created); - ok(ret, "SetEvent failed, last error %#x.\n", GetLastError()); + ok(ret, "SetEvent failed, last error %#lx.\n", GetLastError());
for (;;) { @@ -225,7 +225,7 @@ static DWORD WINAPI create_window_thread_proc(void *param) break; if (res != WAIT_TIMEOUT) { - ok(0, "Wait failed (%#x), last error %#x.\n", res, GetLastError()); + ok(0, "Wait failed (%#lx), last error %#lx.\n", res, GetLastError()); break; } } @@ -240,13 +240,13 @@ static void create_window_thread(struct create_window_thread_param *p) DWORD res, tid;
p->window_created = CreateEventA(NULL, FALSE, FALSE, NULL); - ok(!!p->window_created, "CreateEvent failed, last error %#x.\n", GetLastError()); + ok(!!p->window_created, "CreateEvent failed, last error %#lx.\n", GetLastError()); p->destroy_window = CreateEventA(NULL, FALSE, FALSE, NULL); - ok(!!p->destroy_window, "CreateEvent failed, last error %#x.\n", GetLastError()); + ok(!!p->destroy_window, "CreateEvent failed, last error %#lx.\n", GetLastError()); p->thread = CreateThread(NULL, 0, create_window_thread_proc, p, 0, &tid); - ok(!!p->thread, "Failed to create thread, last error %#x.\n", GetLastError()); + ok(!!p->thread, "Failed to create thread, last error %#lx.\n", GetLastError()); res = WaitForSingleObject(p->window_created, INFINITE); - ok(res == WAIT_OBJECT_0, "Wait failed (%#x), last error %#x.\n", res, GetLastError()); + ok(res == WAIT_OBJECT_0, "Wait failed (%#lx), last error %#lx.\n", res, GetLastError()); }
static void destroy_window_thread(struct create_window_thread_param *p) @@ -265,9 +265,9 @@ static IDirectDrawSurface *get_depth_stencil(IDirect3DDevice2 *device) HRESULT hr;
hr = IDirect3DDevice2_GetRenderTarget(device, &rt); - ok(SUCCEEDED(hr), "Failed to get render target, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get render target, hr %#lx.\n", hr); hr = IDirectDrawSurface_GetAttachedSurface(rt, &caps, &ret); - ok(SUCCEEDED(hr) || hr == DDERR_NOTFOUND, "Failed to get the z buffer, hr %#x.\n", hr); + ok(SUCCEEDED(hr) || hr == DDERR_NOTFOUND, "Failed to get the z buffer, hr %#lx.\n", hr); IDirectDrawSurface_Release(rt); return ret; } @@ -353,14 +353,14 @@ static D3DCOLOR get_surface_color(IDirectDrawSurface *surface, UINT x, UINT y) surface_desc.dwSize = sizeof(surface_desc);
hr = IDirectDrawSurface_Lock(surface, &rect, &surface_desc, DDLOCK_READONLY | DDLOCK_WAIT, NULL); - ok(SUCCEEDED(hr), "Failed to lock surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to lock surface, hr %#lx.\n", hr); if (FAILED(hr)) return 0xdeadbeef;
color = *((DWORD *)surface_desc.lpSurface) & 0x00ffffff;
hr = IDirectDrawSurface_Unlock(surface, NULL); - ok(SUCCEEDED(hr), "Failed to unlock surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to unlock surface, hr %#lx.\n", hr);
return color; } @@ -373,7 +373,7 @@ static void fill_surface(IDirectDrawSurface *surface, D3DCOLOR color) DWORD *ptr;
hr = IDirectDrawSurface_Lock(surface, NULL, &surface_desc, DDLOCK_WAIT, NULL); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr);
for (y = 0; y < surface_desc.dwHeight; ++y) { @@ -385,7 +385,7 @@ static void fill_surface(IDirectDrawSurface *surface, D3DCOLOR color) }
hr = IDirectDrawSurface_Unlock(surface, NULL); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); }
static void check_rect(IDirectDrawSurface *surface, RECT r, const char *message) @@ -419,7 +419,7 @@ static void check_rect(IDirectDrawSurface *surface, RECT r, const char *message) if (x < 0 || x >= 640 || y < 0 || y >= 480) continue; color = get_surface_color(surface, x, y); - ok(color == expected, "%s: Pixel (%d, %d) has color %08x, expected %08x\n", + ok(color == expected, "%s: Pixel (%ld, %ld) has color %08lx, expected %08lx\n", message, x, y, color, expected); } } @@ -483,7 +483,7 @@ static IDirect3DDevice2 *create_device_ex(IDirectDraw2 *ddraw, HWND window, DWOR HRESULT hr;
hr = IDirectDraw2_SetCooperativeLevel(ddraw, window, coop_level); - ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#lx.\n", hr);
memset(&surface_desc, 0, sizeof(surface_desc)); surface_desc.dwSize = sizeof(surface_desc); @@ -495,18 +495,18 @@ static IDirect3DDevice2 *create_device_ex(IDirectDraw2 *ddraw, HWND window, DWOR surface_desc.dwHeight = 480;
hr = IDirectDraw2_CreateSurface(ddraw, &surface_desc, &surface, NULL); - ok(SUCCEEDED(hr), "Failed to create surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create surface, hr %#lx.\n", hr);
if (coop_level & DDSCL_NORMAL) { IDirectDrawClipper *clipper;
hr = IDirectDraw2_CreateClipper(ddraw, 0, &clipper, NULL); - ok(SUCCEEDED(hr), "Failed to create clipper, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create clipper, hr %#lx.\n", hr); hr = IDirectDrawClipper_SetHWnd(clipper, 0, window); - ok(SUCCEEDED(hr), "Failed to set clipper window, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set clipper window, hr %#lx.\n", hr); hr = IDirectDrawSurface_SetClipper(surface, clipper); - ok(SUCCEEDED(hr), "Failed to set surface clipper, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set surface clipper, hr %#lx.\n", hr); IDirectDrawClipper_Release(clipper); }
@@ -535,7 +535,7 @@ static IDirect3DDevice2 *create_device_ex(IDirectDraw2 *ddraw, HWND window, DWOR continue;
hr = IDirectDrawSurface_AddAttachedSurface(surface, ds); - ok(SUCCEEDED(hr), "Failed to attach depth buffer, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to attach depth buffer, hr %#lx.\n", hr); IDirectDrawSurface_Release(ds); if (FAILED(hr)) continue; @@ -564,11 +564,11 @@ static IDirect3DViewport2 *create_viewport(IDirect3DDevice2 *device, UINT x, UIN HRESULT hr;
hr = IDirect3DDevice2_GetDirect3D(device, &d3d); - ok(SUCCEEDED(hr), "Failed to get d3d interface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get d3d interface, hr %#lx.\n", hr); hr = IDirect3D2_CreateViewport(d3d, &viewport, NULL); - ok(SUCCEEDED(hr), "Failed to create viewport, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create viewport, hr %#lx.\n", hr); hr = IDirect3DDevice2_AddViewport(device, viewport); - ok(SUCCEEDED(hr), "Failed to add viewport, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to add viewport, hr %#lx.\n", hr); memset(&vp, 0, sizeof(vp)); vp.dwSize = sizeof(vp); vp.dwX = x; @@ -582,7 +582,7 @@ static IDirect3DViewport2 *create_viewport(IDirect3DDevice2 *device, UINT x, UIN vp.dvMinZ = 0.0f; vp.dvMaxZ = 1.0f; hr = IDirect3DViewport2_SetViewport2(viewport, &vp); - ok(SUCCEEDED(hr), "Failed to set viewport data, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set viewport data, hr %#lx.\n", hr); IDirect3D2_Release(d3d);
return viewport; @@ -595,9 +595,9 @@ static void viewport_set_background(IDirect3DDevice2 *device, IDirect3DViewport2 HRESULT hr;
hr = IDirect3DMaterial2_GetHandle(material, device, &material_handle); - ok(SUCCEEDED(hr), "Failed to get material handle, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get material handle, hr %#lx.\n", hr); hr = IDirect3DViewport2_SetBackground(viewport, material_handle); - ok(SUCCEEDED(hr), "Failed to set viewport background, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set viewport background, hr %#lx.\n", hr); }
static void destroy_viewport(IDirect3DDevice2 *device, IDirect3DViewport2 *viewport) @@ -605,7 +605,7 @@ static void destroy_viewport(IDirect3DDevice2 *device, IDirect3DViewport2 *viewp HRESULT hr;
hr = IDirect3DDevice2_DeleteViewport(device, viewport); - ok(SUCCEEDED(hr), "Failed to delete viewport, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to delete viewport, hr %#lx.\n", hr); IDirect3DViewport2_Release(viewport); }
@@ -616,11 +616,11 @@ static IDirect3DMaterial2 *create_material(IDirect3DDevice2 *device, D3DMATERIAL HRESULT hr;
hr = IDirect3DDevice2_GetDirect3D(device, &d3d); - ok(SUCCEEDED(hr), "Failed to get d3d interface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get d3d interface, hr %#lx.\n", hr); hr = IDirect3D2_CreateMaterial(d3d, &material, NULL); - ok(SUCCEEDED(hr), "Failed to create material, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create material, hr %#lx.\n", hr); hr = IDirect3DMaterial2_SetMaterial(material, mat); - ok(SUCCEEDED(hr), "Failed to set material data, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set material data, hr %#lx.\n", hr); IDirect3D2_Release(d3d);
return material; @@ -710,7 +710,7 @@ static LRESULT CALLBACK test_proc(HWND hwnd, UINT message, WPARAM wparam, LPARAM { if (expect_messages->check_wparam) ok (wparam == expect_messages->expect_wparam, - "Got unexpected wparam %lx for message %x, expected %lx.\n", + "Got unexpected wparam %Ix for message %x, expected %Ix.\n", wparam, message, expect_messages->expect_wparam);
++expect_messages; @@ -732,9 +732,9 @@ static void fix_wndproc(HWND window, LONG_PTR proc)
SetWindowLongPtrA(window, GWLP_WNDPROC, proc); hr = IDirectDraw2_SetCooperativeLevel(ddraw, window, DDSCL_EXCLUSIVE | DDSCL_FULLSCREEN); - ok(SUCCEEDED(hr), "SetCooperativeLevel failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "SetCooperativeLevel failed, hr %#lx.\n", hr); hr = IDirectDraw2_SetCooperativeLevel(ddraw, window, DDSCL_NORMAL); - ok(SUCCEEDED(hr), "SetCooperativeLevel failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "SetCooperativeLevel failed, hr %#lx.\n", hr);
IDirectDraw2_Release(ddraw); } @@ -742,7 +742,7 @@ static void fix_wndproc(HWND window, LONG_PTR proc) static HRESULT CALLBACK restore_callback(IDirectDrawSurface *surface, DDSURFACEDESC *desc, void *context) { HRESULT hr = IDirectDrawSurface_Restore(surface); - ok(SUCCEEDED(hr) || hr == DDERR_IMPLICITLYCREATED, "Failed to restore surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr) || hr == DDERR_IMPLICITLYCREATED, "Failed to restore surface, hr %#lx.\n", hr); IDirectDrawSurface_Release(surface);
return DDENUMRET_OK; @@ -765,23 +765,23 @@ static void test_coop_level_create_device_window(void) ok(!!ddraw, "Failed to create a ddraw object.\n");
hr = IDirectDraw2_SetCooperativeLevel(ddraw, NULL, DDSCL_NORMAL); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); device_window = FindWindowA("DirectDrawDeviceWnd", "DirectDrawDeviceWnd"); ok(!device_window, "Unexpected device window found.\n"); hr = IDirectDraw2_SetCooperativeLevel(ddraw, NULL, DDSCL_CREATEDEVICEWINDOW); - ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#lx.\n", hr); device_window = FindWindowA("DirectDrawDeviceWnd", "DirectDrawDeviceWnd"); ok(!device_window, "Unexpected device window found.\n"); hr = IDirectDraw2_SetCooperativeLevel(ddraw, NULL, DDSCL_CREATEDEVICEWINDOW | DDSCL_NORMAL); - ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#lx.\n", hr); device_window = FindWindowA("DirectDrawDeviceWnd", "DirectDrawDeviceWnd"); ok(!device_window, "Unexpected device window found.\n"); hr = IDirectDraw2_SetCooperativeLevel(ddraw, NULL, DDSCL_CREATEDEVICEWINDOW | DDSCL_NORMAL | DDSCL_FULLSCREEN); - ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#lx.\n", hr); device_window = FindWindowA("DirectDrawDeviceWnd", "DirectDrawDeviceWnd"); ok(!device_window, "Unexpected device window found.\n"); hr = IDirectDraw2_SetCooperativeLevel(ddraw, NULL, DDSCL_CREATEDEVICEWINDOW | DDSCL_EXCLUSIVE | DDSCL_FULLSCREEN); - ok(hr == DDERR_NOFOCUSWINDOW || broken(hr == DDERR_INVALIDPARAMS), "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_NOFOCUSWINDOW || broken(hr == DDERR_INVALIDPARAMS), "Got unexpected hr %#lx.\n", hr); device_window = FindWindowA("DirectDrawDeviceWnd", "DirectDrawDeviceWnd"); ok(!device_window, "Unexpected device window found.\n");
@@ -795,48 +795,48 @@ static void test_coop_level_create_device_window(void) }
hr = IDirectDraw2_SetCooperativeLevel(ddraw, NULL, DDSCL_NORMAL); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); device_window = FindWindowA("DirectDrawDeviceWnd", "DirectDrawDeviceWnd"); ok(!device_window, "Unexpected device window found.\n"); hr = IDirectDraw2_SetCooperativeLevel(ddraw, focus_window, DDSCL_EXCLUSIVE | DDSCL_FULLSCREEN); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); device_window = FindWindowA("DirectDrawDeviceWnd", "DirectDrawDeviceWnd"); ok(!device_window, "Unexpected device window found.\n");
hr = IDirectDraw2_SetCooperativeLevel(ddraw, NULL, DDSCL_NORMAL); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); device_window = FindWindowA("DirectDrawDeviceWnd", "DirectDrawDeviceWnd"); ok(!device_window, "Unexpected device window found.\n"); hr = IDirectDraw2_SetCooperativeLevel(ddraw, NULL, DDSCL_SETFOCUSWINDOW | DDSCL_CREATEDEVICEWINDOW | DDSCL_EXCLUSIVE | DDSCL_FULLSCREEN); - ok(hr == DDERR_NOHWND, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_NOHWND, "Got unexpected hr %#lx.\n", hr); device_window = FindWindowA("DirectDrawDeviceWnd", "DirectDrawDeviceWnd"); ok(!!device_window, "Device window not found.\n");
hr = IDirectDraw2_SetCooperativeLevel(ddraw, NULL, DDSCL_NORMAL); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); device_window = FindWindowA("DirectDrawDeviceWnd", "DirectDrawDeviceWnd"); ok(!device_window, "Unexpected device window found.\n"); hr = IDirectDraw2_SetCooperativeLevel(ddraw, focus_window, DDSCL_SETFOCUSWINDOW | DDSCL_CREATEDEVICEWINDOW | DDSCL_EXCLUSIVE | DDSCL_FULLSCREEN); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); device_window = FindWindowA("DirectDrawDeviceWnd", "DirectDrawDeviceWnd"); ok(!!device_window, "Device window not found.\n");
hr = IDirectDraw2_SetCooperativeLevel(ddraw, NULL, DDSCL_NORMAL); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); device_window = FindWindowA("DirectDrawDeviceWnd", "DirectDrawDeviceWnd"); ok(!device_window, "Unexpected device window found.\n"); hr = IDirectDraw2_SetCooperativeLevel(ddraw, NULL, DDSCL_CREATEDEVICEWINDOW | DDSCL_EXCLUSIVE | DDSCL_FULLSCREEN); - ok(hr == DDERR_NOFOCUSWINDOW, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_NOFOCUSWINDOW, "Got unexpected hr %#lx.\n", hr); device_window = FindWindowA("DirectDrawDeviceWnd", "DirectDrawDeviceWnd"); ok(!device_window, "Unexpected device window found.\n"); hr = IDirectDraw2_SetCooperativeLevel(ddraw, focus_window, DDSCL_SETFOCUSWINDOW); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); device_window = FindWindowA("DirectDrawDeviceWnd", "DirectDrawDeviceWnd"); ok(!device_window, "Unexpected device window found.\n"); hr = IDirectDraw2_SetCooperativeLevel(ddraw, NULL, DDSCL_CREATEDEVICEWINDOW | DDSCL_EXCLUSIVE | DDSCL_FULLSCREEN); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); device_window = FindWindowA("DirectDrawDeviceWnd", "DirectDrawDeviceWnd"); ok(!!device_window, "Device window not found.\n");
@@ -910,22 +910,22 @@ static void test_clipper_blt(void) ok(ret, "Failed to map client rect.\n");
hr = IDirectDraw2_SetCooperativeLevel(ddraw, window, DDSCL_NORMAL); - ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#lx.\n", hr);
hr = IDirectDraw2_CreateClipper(ddraw, 0, &clipper, NULL); - ok(SUCCEEDED(hr), "Failed to create clipper, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create clipper, hr %#lx.\n", hr); hr = IDirectDrawClipper_GetClipList(clipper, NULL, NULL, &ret); - ok(hr == DDERR_NOCLIPLIST, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_NOCLIPLIST, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawClipper_SetHWnd(clipper, 0, window); - ok(SUCCEEDED(hr), "Failed to set clipper window, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set clipper window, hr %#lx.\n", hr); hr = IDirectDrawClipper_GetClipList(clipper, NULL, NULL, &ret); - ok(SUCCEEDED(hr), "Failed to get clip list size, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get clip list size, hr %#lx.\n", hr); rgn_data = HeapAlloc(GetProcessHeap(), 0, ret); hr = IDirectDrawClipper_GetClipList(clipper, NULL, rgn_data, &ret); - ok(SUCCEEDED(hr), "Failed to get clip list, hr %#x.\n", hr); - ok(rgn_data->rdh.dwSize == sizeof(rgn_data->rdh), "Got unexpected structure size %#x.\n", rgn_data->rdh.dwSize); - ok(rgn_data->rdh.iType == RDH_RECTANGLES, "Got unexpected type %#x.\n", rgn_data->rdh.iType); - ok(rgn_data->rdh.nCount >= 1, "Got unexpected count %u.\n", rgn_data->rdh.nCount); + ok(SUCCEEDED(hr), "Failed to get clip list, hr %#lx.\n", hr); + ok(rgn_data->rdh.dwSize == sizeof(rgn_data->rdh), "Got unexpected structure size %#lx.\n", rgn_data->rdh.dwSize); + ok(rgn_data->rdh.iType == RDH_RECTANGLES, "Got unexpected type %#lx.\n", rgn_data->rdh.iType); + ok(rgn_data->rdh.nCount >= 1, "Got unexpected count %lu.\n", rgn_data->rdh.nCount); ok(EqualRect(&rgn_data->rdh.rcBound, &client_rect), "Got unexpected bounding rect %s, expected %s.\n", wine_dbgstr_rect(&rgn_data->rdh.rcBound), wine_dbgstr_rect(&client_rect)); @@ -945,11 +945,11 @@ static void test_clipper_blt(void) DeleteObject(r1);
hr = IDirectDrawClipper_SetClipList(clipper, rgn_data, 0); - ok(hr == DDERR_CLIPPERISUSINGHWND, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_CLIPPERISUSINGHWND, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawClipper_SetHWnd(clipper, 0, NULL); - ok(SUCCEEDED(hr), "Failed to set clipper window, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set clipper window, hr %#lx.\n", hr); hr = IDirectDrawClipper_SetClipList(clipper, rgn_data, 0); - ok(SUCCEEDED(hr), "Failed to set clip list, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set clip list, hr %#lx.\n", hr);
HeapFree(GetProcessHeap(), 0, rgn_data);
@@ -967,33 +967,33 @@ static void test_clipper_blt(void) U4(surface_desc.ddpfPixelFormat).dwBBitMask = 0x000000ff;
hr = IDirectDraw2_CreateSurface(ddraw, &surface_desc, &src_surface, NULL); - ok(SUCCEEDED(hr), "Failed to create source surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create source surface, hr %#lx.\n", hr); hr = IDirectDraw2_CreateSurface(ddraw, &surface_desc, &dst_surface, NULL); - ok(SUCCEEDED(hr), "Failed to create destination surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create destination surface, hr %#lx.\n", hr);
memset(&fx, 0, sizeof(fx)); fx.dwSize = sizeof(fx); hr = IDirectDrawSurface_Blt(src_surface, NULL, NULL, NULL, DDBLT_COLORFILL | DDBLT_WAIT, &fx); - ok(SUCCEEDED(hr), "Failed to clear source surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to clear source surface, hr %#lx.\n", hr); hr = IDirectDrawSurface_Blt(dst_surface, NULL, NULL, NULL, DDBLT_COLORFILL | DDBLT_WAIT, &fx); - ok(SUCCEEDED(hr), "Failed to clear destination surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to clear destination surface, hr %#lx.\n", hr);
hr = IDirectDrawSurface_Lock(src_surface, NULL, &surface_desc, DDLOCK_WAIT, NULL); - ok(SUCCEEDED(hr), "Failed to lock source surface, hr %#x.\n", hr); - ok(U1(surface_desc).lPitch == 2560, "Got unexpected surface pitch %u.\n", U1(surface_desc).lPitch); + ok(SUCCEEDED(hr), "Failed to lock source surface, hr %#lx.\n", hr); + ok(U1(surface_desc).lPitch == 2560, "Got unexpected surface pitch %lu.\n", U1(surface_desc).lPitch); ptr = surface_desc.lpSurface; memcpy(&ptr[ 0], &src_data[ 0], 6 * sizeof(DWORD)); memcpy(&ptr[ 640], &src_data[ 6], 6 * sizeof(DWORD)); memcpy(&ptr[1280], &src_data[12], 6 * sizeof(DWORD)); hr = IDirectDrawSurface_Unlock(src_surface, NULL); - ok(SUCCEEDED(hr), "Failed to unlock source surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to unlock source surface, hr %#lx.\n", hr);
hr = IDirectDrawSurface_SetClipper(dst_surface, clipper); - ok(SUCCEEDED(hr), "Failed to set clipper, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set clipper, hr %#lx.\n", hr);
SetRect(&src_rect, 1, 1, 5, 2); hr = IDirectDrawSurface_Blt(dst_surface, NULL, src_surface, &src_rect, DDBLT_WAIT, NULL); - ok(SUCCEEDED(hr), "Failed to blit, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to blit, hr %#lx.\n", hr); for (i = 0; i < 4; ++i) { for (j = 0; j < 4; ++j) @@ -1003,13 +1003,13 @@ static void test_clipper_blt(void) color = get_surface_color(dst_surface, x, y); ok(compare_color(color, expected1[i * 4 + j], 1) || broken(compare_color(color, expected1_broken[i * 4 + j], 1)), - "Expected color 0x%08x at %u,%u, got 0x%08x.\n", expected1[i * 4 + j], x, y, color); + "Expected color 0x%08lx at %u,%u, got 0x%08lx.\n", expected1[i * 4 + j], x, y, color); } }
U5(fx).dwFillColor = 0xff0000ff; hr = IDirectDrawSurface_Blt(dst_surface, NULL, NULL, NULL, DDBLT_COLORFILL | DDBLT_WAIT, &fx); - ok(SUCCEEDED(hr), "Failed to clear destination surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to clear destination surface, hr %#lx.\n", hr); for (i = 0; i < 4; ++i) { for (j = 0; j < 4; ++j) @@ -1018,35 +1018,35 @@ static void test_clipper_blt(void) y = 60 * ((2 * i) + 1); color = get_surface_color(dst_surface, x, y); ok(compare_color(color, expected2[i * 4 + j], 1), - "Expected color 0x%08x at %u,%u, got 0x%08x.\n", expected2[i * 4 + j], x, y, color); + "Expected color 0x%08lx at %u,%u, got 0x%08lx.\n", expected2[i * 4 + j], x, y, color); } }
hr = IDirectDrawSurface_BltFast(dst_surface, 0, 0, src_surface, NULL, DDBLTFAST_WAIT); - ok(hr == DDERR_BLTFASTCANTCLIP || broken(hr == E_NOTIMPL /* NT4 */), "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_BLTFASTCANTCLIP || broken(hr == E_NOTIMPL /* NT4 */), "Got unexpected hr %#lx.\n", hr);
hr = IDirectDrawClipper_SetHWnd(clipper, 0, window); - ok(SUCCEEDED(hr), "Failed to set clipper window, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set clipper window, hr %#lx.\n", hr); hr = IDirectDrawClipper_GetClipList(clipper, NULL, NULL, &ret); - ok(SUCCEEDED(hr), "Failed to get clip list size, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get clip list size, hr %#lx.\n", hr); DestroyWindow(window); hr = IDirectDrawClipper_GetClipList(clipper, NULL, NULL, &ret); - ok(hr == E_FAIL, "Got unexpected hr %#x.\n", hr); + ok(hr == E_FAIL, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawClipper_SetHWnd(clipper, 0, NULL); - ok(SUCCEEDED(hr), "Failed to set clipper window, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set clipper window, hr %#lx.\n", hr); hr = IDirectDrawClipper_GetClipList(clipper, NULL, NULL, &ret); - ok(SUCCEEDED(hr), "Failed to get clip list size, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get clip list size, hr %#lx.\n", hr); hr = IDirectDrawClipper_SetClipList(clipper, NULL, 0); - ok(SUCCEEDED(hr), "Failed to set clip list, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set clip list, hr %#lx.\n", hr); hr = IDirectDrawClipper_GetClipList(clipper, NULL, NULL, &ret); - ok(hr == DDERR_NOCLIPLIST, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_NOCLIPLIST, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface_Blt(dst_surface, NULL, NULL, NULL, DDBLT_COLORFILL | DDBLT_WAIT, &fx); - ok(hr == DDERR_NOCLIPLIST, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_NOCLIPLIST, "Got unexpected hr %#lx.\n", hr);
IDirectDrawSurface_Release(dst_surface); IDirectDrawSurface_Release(src_surface); refcount = IDirectDrawClipper_Release(clipper); - ok(!refcount, "Clipper has %u references left.\n", refcount); + ok(!refcount, "Clipper has %lu references left.\n", refcount); IDirectDraw2_Release(ddraw); }
@@ -1100,44 +1100,44 @@ static void test_coop_level_d3d_state(void) viewport_set_background(device, viewport, background);
hr = IDirect3DDevice2_SetRenderState(device, D3DRENDERSTATE_SRCBLEND, D3DBLEND_SRCALPHA); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirect3DDevice2_SetRenderState(device, D3DRENDERSTATE_DESTBLEND, D3DBLEND_DESTALPHA); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr);
hr = IDirect3DDevice2_GetRenderTarget(device, &rt); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirect3DDevice2_GetRenderState(device, D3DRENDERSTATE_ZENABLE, &value); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); - ok(!!value, "Got unexpected z-enable state %#x.\n", value); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); + ok(!!value, "Got unexpected z-enable state %#lx.\n", value); hr = IDirect3DDevice2_GetRenderState(device, D3DRENDERSTATE_ALPHABLENDENABLE, &value); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); - ok(!value, "Got unexpected alpha blend enable state %#x.\n", value); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); + ok(!value, "Got unexpected alpha blend enable state %#lx.\n", value); hr = IDirect3DDevice2_SetRenderState(device, D3DRENDERSTATE_ALPHABLENDENABLE, TRUE); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirect3DViewport2_Clear(viewport, 1, &clear_rect, D3DCLEAR_TARGET); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); color = get_surface_color(rt, 320, 240); - ok(compare_color(color, 0x00ff0000, 1), "Got unexpected color 0x%08x.\n", color); + ok(compare_color(color, 0x00ff0000, 1), "Got unexpected color 0x%08lx.\n", color);
hr = IDirectDraw2_SetCooperativeLevel(ddraw, window, DDSCL_EXCLUSIVE | DDSCL_FULLSCREEN); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface_IsLost(rt); - ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#lx.\n", hr);
memset(&lock, 0, sizeof(lock)); lock.dwSize = sizeof(lock); lock.lpSurface = (void *)0xdeadbeef; hr = IDirectDrawSurface2_Lock(rt, NULL, &lock, DDLOCK_READONLY, NULL); - ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#lx.\n", hr); ok(lock.lpSurface == (void *)0xdeadbeef, "Got unexpected lock.lpSurface %p.\n", lock.lpSurface);
hr = restore_surfaces(ddraw); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr);
hr = IDirectDrawSurface2_Lock(rt, NULL, &lock, DDLOCK_READONLY, NULL); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface2_Unlock(rt, NULL); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr);
memset(&material, 0, sizeof(material)); material.dwSize = sizeof(material); @@ -1146,33 +1146,33 @@ static void test_coop_level_d3d_state(void) U3(U(material).diffuse).b = 0.0f; U4(U(material).diffuse).a = 1.0f; hr = IDirect3DMaterial2_SetMaterial(background, &material); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr);
hr = IDirect3DDevice2_GetRenderTarget(device, &surface); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); ok(surface == rt, "Got unexpected surface %p.\n", surface); hr = IDirect3DDevice2_GetRenderState(device, D3DRENDERSTATE_ZENABLE, &value); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); - ok(!!value, "Got unexpected z-enable state %#x.\n", value); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); + ok(!!value, "Got unexpected z-enable state %#lx.\n", value); hr = IDirect3DDevice2_GetRenderState(device, D3DRENDERSTATE_ALPHABLENDENABLE, &value); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); - ok(!!value, "Got unexpected alpha blend enable state %#x.\n", value); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); + ok(!!value, "Got unexpected alpha blend enable state %#lx.\n", value); hr = IDirect3DViewport2_Clear(viewport, 1, &clear_rect, D3DCLEAR_TARGET | D3DCLEAR_ZBUFFER); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); color = get_surface_color(rt, 320, 240); ok(compare_color(color, 0x0000ff00, 1) || broken(compare_color(color, 0x00000000, 1)), - "Got unexpected color 0x%08x.\n", color); + "Got unexpected color 0x%08lx.\n", color);
hr = IDirect3DDevice2_SetCurrentViewport(device, viewport); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirect3DDevice2_BeginScene(device); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirect3DDevice2_DrawPrimitive(device, D3DPT_TRIANGLESTRIP, D3DVT_LVERTEX, quad, ARRAY_SIZE(quad), 0); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirect3DDevice2_EndScene(device); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); color = get_surface_color(rt, 320, 240); - ok(compare_color(color, 0x0000ff80, 1), "Got unexpected color 0x%08x.\n", color); + ok(compare_color(color, 0x0000ff80, 1), "Got unexpected color 0x%08lx.\n", color);
destroy_viewport(device, viewport); destroy_material(background); @@ -1223,7 +1223,7 @@ static void test_surface_interface_mismatch(void) surface_desc.dwHeight = 480;
hr = IDirectDraw2_CreateSurface(ddraw, &surface_desc, &surface, NULL); - ok(SUCCEEDED(hr), "Failed to create surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create surface, hr %#lx.\n", hr);
hr = IDirectDrawSurface2_QueryInterface(surface, &IID_IDirectDrawSurface3, (void **)&surface3); if (FAILED(hr)) @@ -1246,15 +1246,15 @@ static void test_surface_interface_mismatch(void) surface_desc.dwWidth = 640; surface_desc.dwHeight = 480; hr = IDirectDraw2_CreateSurface(ddraw, &surface_desc, &ds, NULL); - ok(SUCCEEDED(hr), "Failed to create depth buffer, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create depth buffer, hr %#lx.\n", hr); if (FAILED(hr)) goto cleanup;
/* Using a different surface interface version still works */ hr = IDirectDrawSurface3_AddAttachedSurface(surface3, (IDirectDrawSurface3 *)ds); - ok(SUCCEEDED(hr), "Failed to attach depth buffer, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to attach depth buffer, hr %#lx.\n", hr); refcount = IDirectDrawSurface_Release(ds); - ok(refcount == 1, "Got unexpected refcount %u.\n", refcount); + ok(refcount == 1, "Got unexpected refcount %lu.\n", refcount); if (FAILED(hr)) goto cleanup;
@@ -1269,9 +1269,9 @@ static void test_surface_interface_mismatch(void) viewport_set_background(device, viewport, background);
hr = IDirect3DViewport2_Clear(viewport, 1, &clear_rect, D3DCLEAR_TARGET); - ok(SUCCEEDED(hr), "Failed to clear render target, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to clear render target, hr %#lx.\n", hr); color = get_surface_color(surface, 320, 240); - ok(compare_color(color, 0x00ff0000, 1), "Got unexpected color 0x%08x.\n", color); + ok(compare_color(color, 0x00ff0000, 1), "Got unexpected color 0x%08lx.\n", color);
cleanup: if (viewport) @@ -1297,7 +1297,7 @@ static void test_coop_level_threaded(void) create_window_thread(&p);
hr = IDirectDraw2_SetCooperativeLevel(ddraw, p.window, DDSCL_EXCLUSIVE | DDSCL_FULLSCREEN); - ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#lx.\n", hr);
destroy_window_thread(&p); IDirectDraw2_Release(ddraw); @@ -1353,7 +1353,7 @@ static void test_depth_blit(const GUID *device_guid) memset(&ddsd_existing, 0, sizeof(ddsd_existing)); ddsd_existing.dwSize = sizeof(ddsd_existing); hr = IDirectDrawSurface_GetSurfaceDesc(ds1, &ddsd_existing); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); ddsd_new.dwFlags = DDSD_CAPS | DDSD_WIDTH | DDSD_HEIGHT | DDSD_PIXELFORMAT; ddsd_new.ddsCaps.dwCaps = DDSCAPS_ZBUFFER; if (is_software_device_type(device_guid)) @@ -1362,71 +1362,71 @@ static void test_depth_blit(const GUID *device_guid) ddsd_new.dwHeight = ddsd_existing.dwHeight; ddsd_new.ddpfPixelFormat = ddsd_existing.ddpfPixelFormat; hr = IDirectDraw2_CreateSurface(ddraw, &ddsd_new, &ds2, NULL); - ok(SUCCEEDED(hr), "Failed to create a surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create a surface, hr %#lx.\n", hr); hr = IDirectDraw2_CreateSurface(ddraw, &ddsd_new, &ds3, NULL); - ok(SUCCEEDED(hr), "Failed to create a surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create a surface, hr %#lx.\n", hr);
background = create_diffuse_material(device, 1.0f, 0.0f, 0.0f, 1.0f); viewport = create_viewport(device, 0, 0, ddsd_existing.dwWidth, ddsd_existing.dwHeight); viewport_set_background(device, viewport, background); hr = IDirect3DDevice2_SetCurrentViewport(device, viewport); - ok(SUCCEEDED(hr), "Failed to activate the viewport, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to activate the viewport, hr %#lx.\n", hr);
hr = IDirect3DDevice2_SetRenderState(device, D3DRENDERSTATE_ZENABLE, D3DZB_TRUE); - ok(SUCCEEDED(hr), "Failed to enable z testing, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to enable z testing, hr %#lx.\n", hr); hr = IDirect3DDevice2_SetRenderState(device, D3DRENDERSTATE_ZFUNC, D3DCMP_LESSEQUAL); - ok(SUCCEEDED(hr), "Failed to set the z function, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set the z function, hr %#lx.\n", hr);
U1(d3drect).x1 = U2(d3drect).y1 = 0; U3(d3drect).x2 = ddsd_existing.dwWidth; U4(d3drect).y2 = ddsd_existing.dwHeight; hr = IDirect3DViewport2_Clear(viewport, 1, &d3drect, D3DCLEAR_ZBUFFER); - ok(SUCCEEDED(hr), "Failed to clear the z buffer, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to clear the z buffer, hr %#lx.\n", hr);
/* Partial blit. */ SetRect(&src_rect, 0, 0, 320, 240); SetRect(&dst_rect, 0, 0, 320, 240); hr = IDirectDrawSurface_Blt(ds2, &dst_rect, ds1, &src_rect, DDBLT_WAIT, NULL); - ok(SUCCEEDED(hr), "Got unexpected hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Got unexpected hr %#lx.\n", hr); /* Different locations. */ SetRect(&src_rect, 0, 0, 320, 240); SetRect(&dst_rect, 320, 240, 640, 480); hr = IDirectDrawSurface_Blt(ds2, &dst_rect, ds1, &src_rect, DDBLT_WAIT, NULL); - ok(SUCCEEDED(hr), "Got unexpected hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Got unexpected hr %#lx.\n", hr); /* Stretched. */ SetRect(&src_rect, 0, 0, 320, 240); SetRect(&dst_rect, 0, 0, 640, 480); hr = IDirectDrawSurface_Blt(ds2, &dst_rect, ds1, &src_rect, DDBLT_WAIT, NULL); - ok(SUCCEEDED(hr), "Got unexpected hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Got unexpected hr %#lx.\n", hr); /* Flipped. */ SetRect(&src_rect, 0, 480, 640, 0); SetRect(&dst_rect, 0, 0, 640, 480); hr = IDirectDrawSurface_Blt(ds2, &dst_rect, ds1, &src_rect, DDBLT_WAIT, NULL); - ok(hr == DDERR_INVALIDRECT, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_INVALIDRECT, "Got unexpected hr %#lx.\n", hr); SetRect(&src_rect, 0, 0, 640, 480); SetRect(&dst_rect, 0, 480, 640, 0); hr = IDirectDrawSurface_Blt(ds2, &dst_rect, ds1, &src_rect, DDBLT_WAIT, NULL); - ok(hr == DDERR_INVALIDRECT, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_INVALIDRECT, "Got unexpected hr %#lx.\n", hr); /* Full, explicit. */ SetRect(&src_rect, 0, 0, 640, 480); SetRect(&dst_rect, 0, 0, 640, 480); hr = IDirectDrawSurface_Blt(ds2, &dst_rect, ds1, &src_rect, DDBLT_WAIT, NULL); - ok(SUCCEEDED(hr), "Got unexpected hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Got unexpected hr %#lx.\n", hr); /* Depth -> color blit: Succeeds on Win7 + Radeon HD 5700, fails on WinXP + Radeon X1600 */
/* Depth blit inside a BeginScene / EndScene pair */ hr = IDirect3DDevice2_BeginScene(device); - ok(SUCCEEDED(hr), "Failed to start a scene, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to start a scene, hr %#lx.\n", hr); /* From the current depth stencil */ hr = IDirectDrawSurface_Blt(ds2, NULL, ds1, NULL, DDBLT_WAIT, NULL); - ok(SUCCEEDED(hr), "Got unexpected hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Got unexpected hr %#lx.\n", hr); /* To the current depth stencil */ hr = IDirectDrawSurface_Blt(ds1, NULL, ds2, NULL, DDBLT_WAIT, NULL); - ok(SUCCEEDED(hr), "Got unexpected hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Got unexpected hr %#lx.\n", hr); /* Between unbound surfaces */ hr = IDirectDrawSurface_Blt(ds3, NULL, ds2, NULL, DDBLT_WAIT, NULL); - ok(SUCCEEDED(hr), "Got unexpected hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Got unexpected hr %#lx.\n", hr); hr = IDirect3DDevice2_EndScene(device); - ok(SUCCEEDED(hr), "Failed to end a scene, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to end a scene, hr %#lx.\n", hr);
/* Avoid changing the depth stencil, it doesn't work properly on Windows. * Instead use DDBLT_DEPTHFILL to clear the depth stencil. Unfortunately @@ -1437,42 +1437,42 @@ static void test_depth_blit(const GUID *device_guid) U5(fx).dwFillDepth = 0; hr = IDirectDrawSurface_Blt(ds2, NULL, NULL, NULL, DDBLT_DEPTHFILL | DDBLT_WAIT, &fx); ok(hr == D3D_OK || broken(is_software_device_type(device_guid) - && hr == 0x8876086c /* D3DERR_INVALIDCALL */), "Got unexpected hr %#x.\n", hr); + && hr == 0x8876086c /* D3DERR_INVALIDCALL */), "Got unexpected hr %#lx.\n", hr); if (hr != D3D_OK) depth_fill_broken = TRUE;
/* This clears the Z buffer with 1.0 */ hr = IDirect3DViewport2_Clear(viewport, 1, &d3drect, D3DCLEAR_ZBUFFER | D3DCLEAR_TARGET); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
hr = IDirect3DDevice2_GetRenderTarget(device, &rt); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
color = get_surface_color(rt, 80, 60); /* For some reason clears and colour fill blits randomly fail with software render target. */ ok(color == 0x00ff0000 || broken(is_software_device_type(device_guid) && !color), - "Got unexpected colour 0x%08x.\n", color); + "Got unexpected colour 0x%08lx.\n", color); if (!color) { fill_surface(rt, 0xffff0000);
color = get_surface_color(rt, 80, 60); - ok(color == 0x00ff0000, "Got unexpected colour 0x%08x.\n", color); + ok(color == 0x00ff0000, "Got unexpected colour 0x%08lx.\n", color); }
SetRect(&dst_rect, 0, 0, 320, 240); hr = IDirectDrawSurface_Blt(ds1, &dst_rect, ds2, NULL, DDBLT_WAIT, NULL); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); IDirectDrawSurface_Release(ds3); IDirectDrawSurface_Release(ds2); IDirectDrawSurface_Release(ds1);
hr = IDirect3DDevice2_BeginScene(device); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirect3DDevice2_DrawPrimitive(device, D3DPT_TRIANGLESTRIP, D3DVT_LVERTEX, quad1, 4, 0); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirect3DDevice2_EndScene(device); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
for (i = 0; i < 4; ++i) { @@ -1482,7 +1482,7 @@ static void test_depth_blit(const GUID *device_guid) unsigned int y = 60 * ((2 * i) + 1); color = get_surface_color(rt, x, y); ok(compare_color(color, expected_colors[i][j], 1) || broken(depth_fill_broken && color == 0x0000ff00), - "Expected color 0x%08x at %u,%u, got 0x%08x.\n", expected_colors[i][j], x, y, color); + "Expected color 0x%08lx at %u,%u, got 0x%08lx.\n", expected_colors[i][j], x, y, color); } } IDirectDrawSurface_Release(rt); @@ -1508,7 +1508,7 @@ static void test_texture_load_ckey(void) ddraw = create_ddraw(); ok(!!ddraw, "Failed to create a ddraw object.\n"); hr = IDirectDraw2_SetCooperativeLevel(ddraw, NULL, DDSCL_NORMAL); - ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#lx.\n", hr);
memset(&ddsd, 0, sizeof(ddsd)); ddsd.dwSize = sizeof(ddsd); @@ -1517,13 +1517,13 @@ static void test_texture_load_ckey(void) ddsd.dwWidth = 128; ddsd.ddsCaps.dwCaps = DDSCAPS_TEXTURE | DDSCAPS_SYSTEMMEMORY; hr = IDirectDraw2_CreateSurface(ddraw, &ddsd, &src, NULL); - ok(SUCCEEDED(hr), "Failed to create source texture, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create source texture, hr %#lx.\n", hr); ddsd.ddsCaps.dwCaps = DDSCAPS_TEXTURE; hr = IDirectDraw2_CreateSurface(ddraw, &ddsd, &dst, NULL); - ok(SUCCEEDED(hr), "Failed to create destination texture, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create destination texture, hr %#lx.\n", hr);
hr = IDirectDrawSurface_QueryInterface(src, &IID_IDirect3DTexture, (void **)&src_tex); - ok(SUCCEEDED(hr) || hr == E_NOINTERFACE, "Failed to get Direct3DTexture interface, hr %#x.\n", hr); + ok(SUCCEEDED(hr) || hr == E_NOINTERFACE, "Failed to get Direct3DTexture interface, hr %#lx.\n", hr); if (FAILED(hr)) { /* 64 bit ddraw does not support d3d */ @@ -1531,11 +1531,11 @@ static void test_texture_load_ckey(void) goto done; } hr = IDirectDrawSurface_QueryInterface(dst, &IID_IDirect3DTexture, (void **)&dst_tex); - ok(SUCCEEDED(hr), "Failed to get Direct3DTexture interface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get Direct3DTexture interface, hr %#lx.\n", hr);
/* No surface has a color key */ hr = IDirect3DTexture_Load(dst_tex, src_tex); - ok(SUCCEEDED(hr) || broken(hr == DDERR_INVALIDCAPS), "Got unexpected hr %#x.\n", hr); + ok(SUCCEEDED(hr) || broken(hr == DDERR_INVALIDCAPS), "Got unexpected hr %#lx.\n", hr); if (FAILED(hr)) { /* Testbot Windows NT VMs */ @@ -1545,43 +1545,43 @@ static void test_texture_load_ckey(void)
ckey.dwColorSpaceLowValue = ckey.dwColorSpaceHighValue = 0xdeadbeef; hr = IDirectDrawSurface_GetColorKey(dst, DDCKEY_SRCBLT, &ckey); - ok(hr == DDERR_NOCOLORKEY, "Got unexpected hr %#x.\n", hr); - ok(ckey.dwColorSpaceLowValue == 0xdeadbeef, "dwColorSpaceLowValue is %#x.\n", ckey.dwColorSpaceLowValue); - ok(ckey.dwColorSpaceHighValue == 0xdeadbeef, "dwColorSpaceHighValue is %#x.\n", ckey.dwColorSpaceHighValue); + ok(hr == DDERR_NOCOLORKEY, "Got unexpected hr %#lx.\n", hr); + ok(ckey.dwColorSpaceLowValue == 0xdeadbeef, "dwColorSpaceLowValue is %#lx.\n", ckey.dwColorSpaceLowValue); + ok(ckey.dwColorSpaceHighValue == 0xdeadbeef, "dwColorSpaceHighValue is %#lx.\n", ckey.dwColorSpaceHighValue);
/* Source surface has a color key */ ckey.dwColorSpaceLowValue = ckey.dwColorSpaceHighValue = 0x0000ff00; hr = IDirectDrawSurface_SetColorKey(src, DDCKEY_SRCBLT, &ckey); - ok(SUCCEEDED(hr), "Failed to set color key, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set color key, hr %#lx.\n", hr); hr = IDirect3DTexture_Load(dst_tex, src_tex); - ok(SUCCEEDED(hr), "Got unexpected hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface_GetColorKey(dst, DDCKEY_SRCBLT, &ckey); - ok(SUCCEEDED(hr), "Got unexpected hr %#x.\n", hr); - ok(ckey.dwColorSpaceLowValue == 0x0000ff00, "dwColorSpaceLowValue is %#x.\n", ckey.dwColorSpaceLowValue); - ok(ckey.dwColorSpaceHighValue == 0x0000ff00, "dwColorSpaceHighValue is %#x.\n", ckey.dwColorSpaceHighValue); + ok(SUCCEEDED(hr), "Got unexpected hr %#lx.\n", hr); + ok(ckey.dwColorSpaceLowValue == 0x0000ff00, "dwColorSpaceLowValue is %#lx.\n", ckey.dwColorSpaceLowValue); + ok(ckey.dwColorSpaceHighValue == 0x0000ff00, "dwColorSpaceHighValue is %#lx.\n", ckey.dwColorSpaceHighValue);
/* Both surfaces have a color key: Dest ckey is overwritten */ ckey.dwColorSpaceLowValue = ckey.dwColorSpaceHighValue = 0x000000ff; hr = IDirectDrawSurface_SetColorKey(dst, DDCKEY_SRCBLT, &ckey); - ok(SUCCEEDED(hr), "Failed to set color key, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set color key, hr %#lx.\n", hr); hr = IDirect3DTexture_Load(dst_tex, src_tex); - ok(SUCCEEDED(hr), "Got unexpected hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface_GetColorKey(dst, DDCKEY_SRCBLT, &ckey); - ok(SUCCEEDED(hr), "Got unexpected hr %#x.\n", hr); - ok(ckey.dwColorSpaceLowValue == 0x0000ff00, "dwColorSpaceLowValue is %#x.\n", ckey.dwColorSpaceLowValue); - ok(ckey.dwColorSpaceHighValue == 0x0000ff00, "dwColorSpaceHighValue is %#x.\n", ckey.dwColorSpaceHighValue); + ok(SUCCEEDED(hr), "Got unexpected hr %#lx.\n", hr); + ok(ckey.dwColorSpaceLowValue == 0x0000ff00, "dwColorSpaceLowValue is %#lx.\n", ckey.dwColorSpaceLowValue); + ok(ckey.dwColorSpaceHighValue == 0x0000ff00, "dwColorSpaceHighValue is %#lx.\n", ckey.dwColorSpaceHighValue);
/* Only the destination has a color key: It is not deleted */ hr = IDirectDrawSurface_SetColorKey(src, DDCKEY_SRCBLT, NULL); - ok(SUCCEEDED(hr), "Failed to set color key, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set color key, hr %#lx.\n", hr); hr = IDirectDrawSurface_GetColorKey(src, DDCKEY_SRCBLT, &ckey); - ok(hr == DDERR_NOCOLORKEY, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_NOCOLORKEY, "Got unexpected hr %#lx.\n", hr); hr = IDirect3DTexture_Load(dst_tex, src_tex); - ok(SUCCEEDED(hr), "Got unexpected hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface_GetColorKey(dst, DDCKEY_SRCBLT, &ckey); - ok(SUCCEEDED(hr), "Got unexpected hr %#x.\n", hr); - ok(ckey.dwColorSpaceLowValue == 0x0000ff00, "dwColorSpaceLowValue is %#x.\n", ckey.dwColorSpaceLowValue); - ok(ckey.dwColorSpaceHighValue == 0x0000ff00, "dwColorSpaceHighValue is %#x.\n", ckey.dwColorSpaceHighValue); + ok(SUCCEEDED(hr), "Got unexpected hr %#lx.\n", hr); + ok(ckey.dwColorSpaceLowValue == 0x0000ff00, "dwColorSpaceLowValue is %#lx.\n", ckey.dwColorSpaceLowValue); + ok(ckey.dwColorSpaceHighValue == 0x0000ff00, "dwColorSpaceHighValue is %#lx.\n", ckey.dwColorSpaceHighValue);
done: if (dst_tex) IDirect3DTexture_Release(dst_tex); @@ -1639,7 +1639,7 @@ static void test_viewport_object(void) }
hr = IDirectDraw2_QueryInterface(ddraw, &IID_IDirect3D2, (void **)&d3d); - ok(SUCCEEDED(hr) || hr == E_NOINTERFACE, "Failed to get d3d interface, hr %#x.\n", hr); + ok(SUCCEEDED(hr) || hr == E_NOINTERFACE, "Failed to get d3d interface, hr %#lx.\n", hr); if (FAILED(hr)) { skip("D3D interface is not available, skipping test.\n"); @@ -1649,106 +1649,106 @@ static void test_viewport_object(void) old_d3d_ref = get_refcount((IUnknown *)d3d);
hr = IDirect3D2_CreateViewport(d3d, &viewport2, NULL); - ok(SUCCEEDED(hr), "Failed to create viewport, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create viewport, hr %#lx.\n", hr); ref = get_refcount((IUnknown *)viewport2); - ok(ref == 1, "Got unexpected refcount %u.\n", ref); + ok(ref == 1, "Got unexpected refcount %lu.\n", ref); ref = get_refcount((IUnknown *)d3d); - ok(ref == old_d3d_ref, "Got unexpected refcount %u.\n", ref); + ok(ref == old_d3d_ref, "Got unexpected refcount %lu.\n", ref);
memset(&desc, 0, sizeof(desc)); hr = IDirect3DViewport2_GetViewport(viewport2, &desc.vp1); - todo_wine ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#x.\n", hr); + todo_wine ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#lx.\n", hr); desc.vp1.dwSize = sizeof(desc.vp1) + 1; hr = IDirect3DViewport2_GetViewport(viewport2, &desc.vp1); - todo_wine ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#x.\n", hr); + todo_wine ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#lx.\n", hr); desc.vp1.dwSize = sizeof(desc.vp1) - 1; hr = IDirect3DViewport2_GetViewport(viewport2, &desc.vp1); - todo_wine ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#x.\n", hr); + todo_wine ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#lx.\n", hr); desc.vp1.dwSize = sizeof(desc.vp1); hr = IDirect3DViewport2_GetViewport(viewport2, &desc.vp1); - ok(hr == D3DERR_VIEWPORTDATANOTSET, "Got unexpected hr %#x.\n", hr); - ok(desc.vp1.dwSize == sizeof(desc.vp1), "Got unexpected dwSize %u.\n", desc.vp1.dwSize); + ok(hr == D3DERR_VIEWPORTDATANOTSET, "Got unexpected hr %#lx.\n", hr); + ok(desc.vp1.dwSize == sizeof(desc.vp1), "Got unexpected dwSize %lu.\n", desc.vp1.dwSize); hr = IDirect3DViewport2_GetViewport2(viewport2, &desc.vp2); - ok(hr == D3DERR_VIEWPORTDATANOTSET, "Got unexpected hr %#x.\n", hr); - ok(desc.vp2.dwSize == sizeof(desc.vp2), "Got unexpected dwSize %u.\n", desc.vp2.dwSize); + ok(hr == D3DERR_VIEWPORTDATANOTSET, "Got unexpected hr %#lx.\n", hr); + ok(desc.vp2.dwSize == sizeof(desc.vp2), "Got unexpected dwSize %lu.\n", desc.vp2.dwSize); desc.vp2.dwSize = sizeof(desc.vp2) + 1; hr = IDirect3DViewport2_GetViewport2(viewport2, &desc.vp2); - todo_wine ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#x.\n", hr); + todo_wine ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#lx.\n", hr);
gamma = (IDirectDrawGammaControl *)0xdeadbeef; hr = IDirect3DViewport2_QueryInterface(viewport2, &IID_IDirectDrawGammaControl, (void **)&gamma); - ok(hr == E_NOINTERFACE, "Got unexpected hr %#x.\n", hr); + ok(hr == E_NOINTERFACE, "Got unexpected hr %#lx.\n", hr); ok(!gamma, "Interface not set to NULL by failed QI call: %p\n", gamma); /* NULL iid: Segfaults */
hr = IDirect3DViewport2_QueryInterface(viewport2, &IID_IDirect3DViewport, (void **)&viewport); - ok(SUCCEEDED(hr), "Failed to QI IDirect3DViewport, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to QI IDirect3DViewport, hr %#lx.\n", hr); ref = get_refcount((IUnknown *)viewport); - ok(ref == 2, "Got unexpected refcount %u.\n", ref); + ok(ref == 2, "Got unexpected refcount %lu.\n", ref); ref = get_refcount((IUnknown *)viewport2); - ok(ref == 2, "Got unexpected refcount %u.\n", ref); + ok(ref == 2, "Got unexpected refcount %lu.\n", ref); IDirect3DViewport_Release(viewport); viewport = NULL;
hr = IDirect3DViewport2_QueryInterface(viewport2, &IID_IDirect3DViewport3, (void **)&viewport3); - ok(SUCCEEDED(hr) || hr == E_NOINTERFACE, "Failed to QI IDirect3DViewport3, hr %#x.\n", hr); + ok(SUCCEEDED(hr) || hr == E_NOINTERFACE, "Failed to QI IDirect3DViewport3, hr %#lx.\n", hr); if (viewport3) { ref = get_refcount((IUnknown *)viewport2); - ok(ref == 2, "Got unexpected refcount %u.\n", ref); + ok(ref == 2, "Got unexpected refcount %lu.\n", ref); ref = get_refcount((IUnknown *)viewport3); - ok(ref == 2, "Got unexpected refcount %u.\n", ref); + ok(ref == 2, "Got unexpected refcount %lu.\n", ref); IDirect3DViewport3_Release(viewport3); }
hr = IDirect3DViewport2_QueryInterface(viewport2, &IID_IUnknown, (void **)&unknown); - ok(SUCCEEDED(hr), "Failed to QI IUnknown, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to QI IUnknown, hr %#lx.\n", hr); ref = get_refcount((IUnknown *)viewport2); - ok(ref == 2, "Got unexpected refcount %u.\n", ref); + ok(ref == 2, "Got unexpected refcount %lu.\n", ref); ref = get_refcount(unknown); - ok(ref == 2, "Got unexpected refcount %u.\n", ref); + ok(ref == 2, "Got unexpected refcount %lu.\n", ref); IUnknown_Release(unknown);
hr = IDirect3DDevice2_DeleteViewport(device, NULL); - ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#lx.\n", hr); hr = IDirect3DDevice2_GetCurrentViewport(device, NULL); - ok(hr == D3DERR_NOCURRENTVIEWPORT, "Got unexpected hr %#x.\n", hr); + ok(hr == D3DERR_NOCURRENTVIEWPORT, "Got unexpected hr %#lx.\n", hr);
hr = IDirect3D2_CreateViewport(d3d, &another_vp, NULL); - ok(SUCCEEDED(hr), "Failed to create viewport, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create viewport, hr %#lx.\n", hr);
/* Setting a viewport not in the viewport list fails */ hr = IDirect3DDevice2_SetCurrentViewport(device, another_vp); - ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#lx.\n", hr);
/* AddViewport(NULL): Segfault */ hr = IDirect3DDevice2_AddViewport(device, viewport2); - ok(SUCCEEDED(hr), "Failed to add viewport to device, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to add viewport to device, hr %#lx.\n", hr); ref = get_refcount((IUnknown *) viewport2); - ok(ref == 2, "viewport2 refcount is %u.\n", ref); + ok(ref == 2, "viewport2 refcount is %lu.\n", ref); hr = IDirect3DDevice2_AddViewport(device, another_vp); - ok(SUCCEEDED(hr), "Failed to add viewport to device, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to add viewport to device, hr %#lx.\n", hr); ref = get_refcount((IUnknown *) another_vp); - ok(ref == 2, "another_vp refcount is %u.\n", ref); + ok(ref == 2, "another_vp refcount is %lu.\n", ref);
test_vp = (IDirect3DViewport2 *) 0xbaadc0de; hr = IDirect3DDevice2_GetCurrentViewport(device, &test_vp); - ok(hr == D3DERR_NOCURRENTVIEWPORT, "Got unexpected hr %#x.\n", hr); + ok(hr == D3DERR_NOCURRENTVIEWPORT, "Got unexpected hr %#lx.\n", hr); ok(test_vp == (IDirect3DViewport2 *) 0xbaadc0de, "Got unexpected pointer %p\n", test_vp);
hr = IDirect3DDevice2_SetCurrentViewport(device, viewport2); - ok(SUCCEEDED(hr), "Failed to set current viewport, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set current viewport, hr %#lx.\n", hr); ref = get_refcount((IUnknown *) viewport2); - ok(ref == 3, "Got unexpected refcount %u.\n", ref); + ok(ref == 3, "Got unexpected refcount %lu.\n", ref); ref = get_refcount((IUnknown *) device); - ok(ref == 1, "Got unexpected refcount %u.\n", ref); + ok(ref == 1, "Got unexpected refcount %lu.\n", ref);
test_vp = NULL; hr = IDirect3DDevice2_GetCurrentViewport(device, &test_vp); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); ok(test_vp == viewport2, "Got unexpected viewport %p\n", test_vp); ref = get_refcount((IUnknown *) viewport2); - ok(ref == 4, "Got unexpected refcount %u.\n", ref); + ok(ref == 4, "Got unexpected refcount %lu.\n", ref); if (test_vp) IDirect3DViewport2_Release(test_vp);
@@ -1756,43 +1756,43 @@ static void test_viewport_object(void)
/* Cannot set the viewport to NULL */ hr = IDirect3DDevice2_SetCurrentViewport(device, NULL); - ok(hr == DDERR_INVALIDPARAMS, "Failed to set viewport to NULL, hr %#x.\n", hr); + ok(hr == DDERR_INVALIDPARAMS, "Failed to set viewport to NULL, hr %#lx.\n", hr); test_vp = NULL; hr = IDirect3DDevice2_GetCurrentViewport(device, &test_vp); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); ok(test_vp == viewport2, "Got unexpected viewport %p\n", test_vp); if (test_vp) IDirect3DViewport2_Release(test_vp);
/* SetCurrentViewport properly releases the old viewport's reference */ hr = IDirect3DDevice2_SetCurrentViewport(device, another_vp); - ok(SUCCEEDED(hr), "Failed to set current viewport, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set current viewport, hr %#lx.\n", hr); ref = get_refcount((IUnknown *) viewport2); - ok(ref == 2, "Got unexpected refcount %u.\n", ref); + ok(ref == 2, "Got unexpected refcount %lu.\n", ref); ref = get_refcount((IUnknown *) another_vp); - ok(ref == 3, "Got unexpected refcount %u.\n", ref); + ok(ref == 3, "Got unexpected refcount %lu.\n", ref);
/* Deleting the viewport removes the reference added by AddViewport, but not * the one added by SetCurrentViewport. */ hr = IDirect3DDevice2_DeleteViewport(device, another_vp); - ok(SUCCEEDED(hr), "Failed to delete viewport from device, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to delete viewport from device, hr %#lx.\n", hr); ref = get_refcount((IUnknown *) another_vp); - todo_wine ok(ref == 2, "Got unexpected refcount %u.\n", ref); + todo_wine ok(ref == 2, "Got unexpected refcount %lu.\n", ref);
/* GetCurrentViewport fails though */ test_vp = NULL; hr = IDirect3DDevice2_GetCurrentViewport(device, &test_vp); - ok(hr == D3DERR_NOCURRENTVIEWPORT, "Got unexpected hr %#x.\n", hr); + ok(hr == D3DERR_NOCURRENTVIEWPORT, "Got unexpected hr %#lx.\n", hr); ok(!test_vp, "Got unexpected viewport %p\n", test_vp);
/* Setting a different viewport does not free the leaked reference. How * do I get rid of it? Leak the viewport for now. */ hr = IDirect3DDevice2_SetCurrentViewport(device, viewport2); - ok(SUCCEEDED(hr), "Failed to set current viewport, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set current viewport, hr %#lx.\n", hr); ref = get_refcount((IUnknown *) viewport2); - ok(ref == 3, "Got unexpected refcount %u.\n", ref); + ok(ref == 3, "Got unexpected refcount %lu.\n", ref); ref = get_refcount((IUnknown *) another_vp); - todo_wine ok(ref == 2, "Got unexpected refcount %u.\n", ref); + todo_wine ok(ref == 2, "Got unexpected refcount %lu.\n", ref);
memset(&vp, 0, sizeof(vp)); memset(&vp, 0, sizeof(vp2)); @@ -1811,29 +1811,29 @@ static void test_viewport_object(void) vp2.dvClipWidth = 2.0f; vp2.dvClipHeight = 2.0f; hr = IDirect3DViewport2_SetViewport(viewport2, &vp); - ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#lx.\n", hr); hr = IDirect3DViewport2_SetViewport2(viewport2, &vp2); - ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#lx.\n", hr);
vp.dwSize = sizeof(vp); hr = IDirect3DViewport2_SetViewport(viewport2, &vp); - ok(SUCCEEDED(hr), "Failed to set viewport data, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set viewport data, hr %#lx.\n", hr); vp2.dwSize = sizeof(vp2); hr = IDirect3DViewport2_SetViewport2(viewport2, &vp2); - ok(SUCCEEDED(hr), "Failed to set viewport data, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set viewport data, hr %#lx.\n", hr);
/* Destroying the device removes the viewport, but does not free the reference * added by SetCurrentViewport. */ IDirect3DDevice2_Release(device); ref = get_refcount((IUnknown *) viewport2); - todo_wine ok(ref == 2, "Got unexpected refcount %u.\n", ref); + todo_wine ok(ref == 2, "Got unexpected refcount %lu.\n", ref);
vp.dwSize = sizeof(vp); hr = IDirect3DViewport2_SetViewport(viewport2, &vp); - ok(hr == D3DERR_VIEWPORTHASNODEVICE, "Got unexpected hr %#x.\n", hr); + ok(hr == D3DERR_VIEWPORTHASNODEVICE, "Got unexpected hr %#lx.\n", hr); vp2.dwSize = sizeof(vp2); hr = IDirect3DViewport2_SetViewport2(viewport2, &vp2); - ok(hr == D3DERR_VIEWPORTHASNODEVICE, "Got unexpected hr %#x.\n", hr); + ok(hr == D3DERR_VIEWPORTHASNODEVICE, "Got unexpected hr %#lx.\n", hr);
IDirect3DViewport2_Release(another_vp); IDirect3DViewport2_Release(viewport2); @@ -1878,35 +1878,35 @@ static void test_zenable(const GUID *device_guid) viewport = create_viewport(device, 0, 0, 640, 480); viewport_set_background(device, viewport, background); hr = IDirect3DDevice2_SetCurrentViewport(device, viewport); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
hr = IDirect3DDevice2_SetRenderState(device, D3DRENDERSTATE_ZENABLE, D3DZB_FALSE); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
hr = IDirect3DViewport2_Clear(viewport, 1, &clear_rect, D3DCLEAR_TARGET); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
hr = IDirect3DDevice2_GetRenderTarget(device, &rt); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
color = get_surface_color(rt, 80, 60); /* For some reason clears and colour fill blits randomly fail with software render target. */ ok(color == 0x00ff0000 || broken(is_software_device_type(device_guid) && !color), - "Got unexpected colour 0x%08x.\n", color); + "Got unexpected colour 0x%08lx.\n", color); if (!color) { fill_surface(rt, 0xffff0000);
color = get_surface_color(rt, 80, 60); - ok(color == 0x00ff0000, "Got unexpected colour 0x%08x.\n", color); + ok(color == 0x00ff0000, "Got unexpected colour 0x%08lx.\n", color); }
hr = IDirect3DDevice2_BeginScene(device); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirect3DDevice2_DrawPrimitive(device, D3DPT_TRIANGLESTRIP, D3DVT_TLVERTEX, tquad, 4, 0); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirect3DDevice2_EndScene(device); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
for (i = 0; i < 4; ++i) { @@ -1916,7 +1916,7 @@ static void test_zenable(const GUID *device_guid) y = 60 * ((2 * i) + 1); color = get_surface_color(rt, x, y); ok(compare_color(color, 0x0000ff00, 1), - "Expected color 0x0000ff00 at %u, %u, got 0x%08x.\n", x, y, color); + "Expected color 0x0000ff00 at %u, %u, got 0x%08lx.\n", x, y, color); } } IDirectDrawSurface_Release(rt); @@ -1994,7 +1994,7 @@ static void test_ck_rgba(const GUID *device_guid) viewport = create_viewport(device, 0, 0, 640, 480); viewport_set_background(device, viewport, background); hr = IDirect3DDevice2_SetCurrentViewport(device, viewport); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
memset(&surface_desc, 0, sizeof(surface_desc)); surface_desc.dwSize = sizeof(surface_desc); @@ -2014,76 +2014,76 @@ static void test_ck_rgba(const GUID *device_guid) surface_desc.ddckCKSrcBlt.dwColorSpaceLowValue = 0xff00ff00; surface_desc.ddckCKSrcBlt.dwColorSpaceHighValue = 0xff00ff00; hr = IDirectDraw2_CreateSurface(ddraw, &surface_desc, &surface, NULL); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface_QueryInterface(surface, &IID_IDirect3DTexture2, (void **)&texture); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirect3DTexture2_GetHandle(texture, device, &texture_handle); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); IDirect3DTexture2_Release(texture);
hr = IDirect3DDevice2_SetRenderState(device, D3DRENDERSTATE_TEXTUREHANDLE, texture_handle); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirect3DDevice2_SetRenderState(device, D3DRENDERSTATE_SRCBLEND, D3DBLEND_SRCALPHA); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirect3DDevice2_SetRenderState(device, D3DRENDERSTATE_DESTBLEND, D3DBLEND_INVSRCALPHA); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
hr = IDirect3DDevice2_GetRenderTarget(device, &rt); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
for (i = 0; i < ARRAY_SIZE(tests); ++i) { hr = IDirect3DDevice2_SetRenderState(device, D3DRENDERSTATE_COLORKEYENABLE, tests[i].color_key); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirect3DDevice2_SetRenderState(device, D3DRENDERSTATE_ALPHABLENDENABLE, tests[i].blend); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
memset(&fx, 0, sizeof(fx)); fx.dwSize = sizeof(fx); U5(fx).dwFillColor = tests[i].fill_color; hr = IDirectDrawSurface_Blt(surface, NULL, NULL, NULL, DDBLT_COLORFILL | DDBLT_WAIT, &fx); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr);
hr = IDirect3DViewport2_Clear(viewport, 1, &clear_rect, D3DCLEAR_TARGET | D3DCLEAR_ZBUFFER); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); /* RT clears are broken on Windows for software render target. */ if (is_software_device_type(device_guid)) fill_surface(rt, 0xffff0000);
hr = IDirect3DDevice2_BeginScene(device); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirect3DDevice2_DrawPrimitive(device, D3DPT_TRIANGLESTRIP, D3DVT_TLVERTEX, &tquad[0], 4, 0); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirect3DDevice2_EndScene(device); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
color = get_surface_color(rt, 320, 240); ok(compare_color(color, tests[i].result1, 2) || compare_color(color, tests[i].result1_broken, 1), - "Expected color 0x%08x for test %u, got 0x%08x.\n", + "Expected color 0x%08lx for test %u, got 0x%08lx.\n", tests[i].result1, i, color);
U5(fx).dwFillColor = 0xff0000ff; hr = IDirectDrawSurface_Blt(surface, NULL, NULL, NULL, DDBLT_COLORFILL | DDBLT_WAIT, &fx); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr);
hr = IDirect3DDevice2_BeginScene(device); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirect3DDevice2_DrawPrimitive(device, D3DPT_TRIANGLESTRIP, D3DVT_TLVERTEX, &tquad[4], 4, 0); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirect3DDevice2_EndScene(device); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
/* This tests that fragments that are masked out by the color key are * discarded, instead of just fully transparent. */ color = get_surface_color(rt, 320, 240); ok(compare_color(color, tests[i].result2, 2) || compare_color(color, tests[i].result2_broken, 1), - "Expected color 0x%08x for test %u, got 0x%08x.\n", + "Expected color 0x%08lx for test %u, got 0x%08lx.\n", tests[i].result2, i, color); }
IDirectDrawSurface_Release(rt); hr = IDirect3DDevice2_SetRenderState(device, D3DRENDERSTATE_TEXTUREHANDLE, 0); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); IDirectDrawSurface_Release(surface); destroy_viewport(device, viewport); destroy_material(background); @@ -2128,13 +2128,13 @@ static void test_ck_default(void) }
hr = IDirect3DDevice2_GetRenderTarget(device, &rt); - ok(SUCCEEDED(hr), "Failed to get render target, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get render target, hr %#lx.\n", hr);
background = create_diffuse_material(device, 0.0, 1.0f, 0.0f, 1.0f); viewport = create_viewport(device, 0, 0, 640, 480); viewport_set_background(device, viewport, background); hr = IDirect3DDevice2_SetCurrentViewport(device, viewport); - ok(SUCCEEDED(hr), "Failed to set current viewport, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set current viewport, hr %#lx.\n", hr);
memset(&surface_desc, 0, sizeof(surface_desc)); surface_desc.dwSize = sizeof(surface_desc); @@ -2151,52 +2151,52 @@ static void test_ck_default(void) surface_desc.ddckCKSrcBlt.dwColorSpaceLowValue = 0x000000ff; surface_desc.ddckCKSrcBlt.dwColorSpaceHighValue = 0x000000ff; hr = IDirectDraw2_CreateSurface(ddraw, &surface_desc, &surface, NULL); - ok(SUCCEEDED(hr), "Failed to create surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create surface, hr %#lx.\n", hr); hr = IDirectDrawSurface_QueryInterface(surface, &IID_IDirect3DTexture2, (void **)&texture); - ok(SUCCEEDED(hr), "Failed to get texture interface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get texture interface, hr %#lx.\n", hr); hr = IDirect3DTexture2_GetHandle(texture, device, &texture_handle); - ok(SUCCEEDED(hr), "Failed to get texture handle, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get texture handle, hr %#lx.\n", hr); IDirect3DTexture_Release(texture);
memset(&fx, 0, sizeof(fx)); fx.dwSize = sizeof(fx); U5(fx).dwFillColor = 0x000000ff; hr = IDirectDrawSurface_Blt(surface, NULL, NULL, NULL, DDBLT_COLORFILL | DDBLT_WAIT, &fx); - ok(SUCCEEDED(hr), "Failed to fill surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to fill surface, hr %#lx.\n", hr);
hr = IDirect3DViewport2_Clear(viewport, 1, &clear_rect, D3DCLEAR_TARGET); - ok(SUCCEEDED(hr), "Failed to clear viewport, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to clear viewport, hr %#lx.\n", hr); hr = IDirect3DDevice2_BeginScene(device); - ok(SUCCEEDED(hr), "Failed to begin scene, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to begin scene, hr %#lx.\n", hr); hr = IDirect3DDevice2_SetRenderState(device, D3DRENDERSTATE_TEXTUREHANDLE, texture_handle); - ok(SUCCEEDED(hr), "Failed to set texture handle, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set texture handle, hr %#lx.\n", hr); hr = IDirect3DDevice2_GetRenderState(device, D3DRENDERSTATE_COLORKEYENABLE, &value); - ok(SUCCEEDED(hr), "Failed to get render state, hr %#x.\n", hr); - ok(!value, "Got unexpected color keying state %#x.\n", value); + ok(SUCCEEDED(hr), "Failed to get render state, hr %#lx.\n", hr); + ok(!value, "Got unexpected color keying state %#lx.\n", value); hr = IDirect3DDevice2_DrawPrimitive(device, D3DPT_TRIANGLESTRIP, D3DVT_TLVERTEX, &tquad[0], 4, 0); - ok(SUCCEEDED(hr), "Failed to draw, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to draw, hr %#lx.\n", hr); hr = IDirect3DDevice2_EndScene(device); - ok(SUCCEEDED(hr), "Failed to end scene, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to end scene, hr %#lx.\n", hr); color = get_surface_color(rt, 320, 240); - ok(compare_color(color, 0x000000ff, 1), "Got unexpected color 0x%08x.\n", color); + ok(compare_color(color, 0x000000ff, 1), "Got unexpected color 0x%08lx.\n", color);
hr = IDirect3DViewport2_Clear(viewport, 1, &clear_rect, D3DCLEAR_TARGET); - ok(SUCCEEDED(hr), "Failed to clear viewport, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to clear viewport, hr %#lx.\n", hr); hr = IDirect3DDevice2_BeginScene(device); - ok(SUCCEEDED(hr), "Failed to begin scene, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to begin scene, hr %#lx.\n", hr); hr = IDirect3DDevice2_SetRenderState(device, D3DRENDERSTATE_COLORKEYENABLE, TRUE); - ok(SUCCEEDED(hr), "Failed to enable color keying, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to enable color keying, hr %#lx.\n", hr); hr = IDirect3DDevice2_DrawPrimitive(device, D3DPT_TRIANGLESTRIP, D3DVT_TLVERTEX, &tquad[0], 4, 0); - ok(SUCCEEDED(hr), "Failed to draw, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to draw, hr %#lx.\n", hr); hr = IDirect3DDevice2_GetRenderState(device, D3DRENDERSTATE_COLORKEYENABLE, &value); - ok(SUCCEEDED(hr), "Failed to get render state, hr %#x.\n", hr); - ok(!!value, "Got unexpected color keying state %#x.\n", value); + ok(SUCCEEDED(hr), "Failed to get render state, hr %#lx.\n", hr); + ok(!!value, "Got unexpected color keying state %#lx.\n", value); hr = IDirect3DDevice2_SetRenderState(device, D3DRENDERSTATE_TEXTUREHANDLE, 0); - ok(SUCCEEDED(hr), "Failed to set texture handle, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set texture handle, hr %#lx.\n", hr); hr = IDirect3DDevice2_EndScene(device); - ok(SUCCEEDED(hr), "Failed to end scene, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to end scene, hr %#lx.\n", hr); color = get_surface_color(rt, 320, 240); - ok(compare_color(color, 0x0000ff00, 1), "Got unexpected color 0x%08x.\n", color); + ok(compare_color(color, 0x0000ff00, 1), "Got unexpected color 0x%08lx.\n", color);
IDirectDrawSurface_Release(surface); destroy_viewport(device, viewport); @@ -2239,20 +2239,20 @@ static void test_ck_complex(void) surface_desc.dwWidth = 128; surface_desc.dwHeight = 128; hr = IDirectDraw2_CreateSurface(ddraw, &surface_desc, &surface, NULL); - ok(SUCCEEDED(hr), "Failed to create surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create surface, hr %#lx.\n", hr);
hr = IDirectDrawSurface_GetColorKey(surface, DDCKEY_SRCBLT, &color_key); - ok(hr == DDERR_NOCOLORKEY, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_NOCOLORKEY, "Got unexpected hr %#lx.\n", hr); color_key.dwColorSpaceLowValue = 0x0000ff00; color_key.dwColorSpaceHighValue = 0x0000ff00; hr = IDirectDrawSurface_SetColorKey(surface, DDCKEY_SRCBLT, &color_key); - ok(SUCCEEDED(hr), "Failed to set color key, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set color key, hr %#lx.\n", hr); memset(&color_key, 0, sizeof(color_key)); hr = IDirectDrawSurface_GetColorKey(surface, DDCKEY_SRCBLT, &color_key); - ok(SUCCEEDED(hr), "Failed to get color key, hr %#x.\n", hr); - ok(color_key.dwColorSpaceLowValue == 0x0000ff00, "Got unexpected value 0x%08x.\n", + ok(SUCCEEDED(hr), "Failed to get color key, hr %#lx.\n", hr); + ok(color_key.dwColorSpaceLowValue == 0x0000ff00, "Got unexpected value 0x%08lx.\n", color_key.dwColorSpaceLowValue); - ok(color_key.dwColorSpaceHighValue == 0x0000ff00, "Got unexpected value 0x%08x.\n", + ok(color_key.dwColorSpaceHighValue == 0x0000ff00, "Got unexpected value 0x%08lx.\n", color_key.dwColorSpaceHighValue);
mipmap = surface; @@ -2260,20 +2260,20 @@ static void test_ck_complex(void) for (i = 0; i < 7; ++i) { hr = IDirectDrawSurface_GetAttachedSurface(mipmap, &caps, &tmp); - ok(SUCCEEDED(hr), "Failed to get attached surface, i %u, hr %#x.\n", i, hr); + ok(SUCCEEDED(hr), "Failed to get attached surface, i %u, hr %#lx.\n", i, hr);
hr = IDirectDrawSurface_GetColorKey(tmp, DDCKEY_SRCBLT, &color_key); - ok(hr == DDERR_NOCOLORKEY, "Got unexpected hr %#x, i %u.\n", hr, i); + ok(hr == DDERR_NOCOLORKEY, "Got unexpected hr %#lx, i %u.\n", hr, i); color_key.dwColorSpaceLowValue = 0x000000ff; color_key.dwColorSpaceHighValue = 0x000000ff; hr = IDirectDrawSurface_SetColorKey(tmp, DDCKEY_SRCBLT, &color_key); - ok(SUCCEEDED(hr), "Failed to set color key, hr %#x, i %u.\n", hr, i); + ok(SUCCEEDED(hr), "Failed to set color key, hr %#lx, i %u.\n", hr, i); memset(&color_key, 0, sizeof(color_key)); hr = IDirectDrawSurface_GetColorKey(tmp, DDCKEY_SRCBLT, &color_key); - ok(SUCCEEDED(hr), "Failed to get color key, hr %#x, i %u.\n", hr, i); - ok(color_key.dwColorSpaceLowValue == 0x000000ff, "Got unexpected value 0x%08x, i %u.\n", + ok(SUCCEEDED(hr), "Failed to get color key, hr %#lx, i %u.\n", hr, i); + ok(color_key.dwColorSpaceLowValue == 0x000000ff, "Got unexpected value 0x%08lx, i %u.\n", color_key.dwColorSpaceLowValue, i); - ok(color_key.dwColorSpaceHighValue == 0x000000ff, "Got unexpected value 0x%08x, i %u.\n", + ok(color_key.dwColorSpaceHighValue == 0x000000ff, "Got unexpected value 0x%08lx, i %u.\n", color_key.dwColorSpaceHighValue, i);
IDirectDrawSurface_Release(mipmap); @@ -2282,17 +2282,17 @@ static void test_ck_complex(void)
memset(&color_key, 0, sizeof(color_key)); hr = IDirectDrawSurface_GetColorKey(surface, DDCKEY_SRCBLT, &color_key); - ok(SUCCEEDED(hr), "Failed to get color key, hr %#x.\n", hr); - ok(color_key.dwColorSpaceLowValue == 0x0000ff00, "Got unexpected value 0x%08x.\n", + ok(SUCCEEDED(hr), "Failed to get color key, hr %#lx.\n", hr); + ok(color_key.dwColorSpaceLowValue == 0x0000ff00, "Got unexpected value 0x%08lx.\n", color_key.dwColorSpaceLowValue); - ok(color_key.dwColorSpaceHighValue == 0x0000ff00, "Got unexpected value 0x%08x.\n", + ok(color_key.dwColorSpaceHighValue == 0x0000ff00, "Got unexpected value 0x%08lx.\n", color_key.dwColorSpaceHighValue);
hr = IDirectDrawSurface_GetAttachedSurface(mipmap, &caps, &tmp); - ok(hr == DDERR_NOTFOUND, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_NOTFOUND, "Got unexpected hr %#lx.\n", hr); IDirectDrawSurface_Release(mipmap); refcount = IDirectDrawSurface_Release(surface); - ok(!refcount, "Got unexpected refcount %u.\n", refcount); + ok(!refcount, "Got unexpected refcount %lu.\n", refcount);
memset(&surface_desc, 0, sizeof(surface_desc)); surface_desc.dwSize = sizeof(surface_desc); @@ -2300,45 +2300,45 @@ static void test_ck_complex(void) surface_desc.ddsCaps.dwCaps = DDSCAPS_PRIMARYSURFACE | DDSCAPS_COMPLEX | DDSCAPS_FLIP; surface_desc.dwBackBufferCount = 1; hr = IDirectDraw2_CreateSurface(ddraw, &surface_desc, &surface, NULL); - ok(SUCCEEDED(hr), "Failed to create surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create surface, hr %#lx.\n", hr);
hr = IDirectDrawSurface_GetColorKey(surface, DDCKEY_SRCBLT, &color_key); - ok(hr == DDERR_NOCOLORKEY, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_NOCOLORKEY, "Got unexpected hr %#lx.\n", hr); color_key.dwColorSpaceLowValue = 0x0000ff00; color_key.dwColorSpaceHighValue = 0x0000ff00; hr = IDirectDrawSurface_SetColorKey(surface, DDCKEY_SRCBLT, &color_key); - ok(SUCCEEDED(hr), "Failed to set color key, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set color key, hr %#lx.\n", hr); memset(&color_key, 0, sizeof(color_key)); hr = IDirectDrawSurface_GetColorKey(surface, DDCKEY_SRCBLT, &color_key); - ok(SUCCEEDED(hr), "Failed to get color key, hr %#x.\n", hr); - ok(color_key.dwColorSpaceLowValue == 0x0000ff00, "Got unexpected value 0x%08x.\n", + ok(SUCCEEDED(hr), "Failed to get color key, hr %#lx.\n", hr); + ok(color_key.dwColorSpaceLowValue == 0x0000ff00, "Got unexpected value 0x%08lx.\n", color_key.dwColorSpaceLowValue); - ok(color_key.dwColorSpaceHighValue == 0x0000ff00, "Got unexpected value 0x%08x.\n", + ok(color_key.dwColorSpaceHighValue == 0x0000ff00, "Got unexpected value 0x%08lx.\n", color_key.dwColorSpaceHighValue);
hr = IDirectDrawSurface_GetAttachedSurface(surface, &caps, &tmp); - ok(SUCCEEDED(hr), "Failed to get attached surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get attached surface, hr %#lx.\n", hr);
hr = IDirectDrawSurface_GetColorKey(tmp, DDCKEY_SRCBLT, &color_key); - ok(hr == DDERR_NOCOLORKEY, "Got unexpected hr %#x, i %u.\n", hr, i); + ok(hr == DDERR_NOCOLORKEY, "Got unexpected hr %#lx, i %u.\n", hr, i); color_key.dwColorSpaceLowValue = 0x0000ff00; color_key.dwColorSpaceHighValue = 0x0000ff00; hr = IDirectDrawSurface_SetColorKey(tmp, DDCKEY_SRCBLT, &color_key); - ok(SUCCEEDED(hr), "Failed to set color key, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set color key, hr %#lx.\n", hr); memset(&color_key, 0, sizeof(color_key)); hr = IDirectDrawSurface_GetColorKey(tmp, DDCKEY_SRCBLT, &color_key); - ok(SUCCEEDED(hr), "Failed to get color key, hr %#x.\n", hr); - ok(color_key.dwColorSpaceLowValue == 0x0000ff00, "Got unexpected value 0x%08x.\n", + ok(SUCCEEDED(hr), "Failed to get color key, hr %#lx.\n", hr); + ok(color_key.dwColorSpaceLowValue == 0x0000ff00, "Got unexpected value 0x%08lx.\n", color_key.dwColorSpaceLowValue); - ok(color_key.dwColorSpaceHighValue == 0x0000ff00, "Got unexpected value 0x%08x.\n", + ok(color_key.dwColorSpaceHighValue == 0x0000ff00, "Got unexpected value 0x%08lx.\n", color_key.dwColorSpaceHighValue);
IDirectDrawSurface_Release(tmp);
refcount = IDirectDrawSurface_Release(surface); - ok(!refcount, "Got unexpected refcount %u.\n", refcount); + ok(!refcount, "Got unexpected refcount %lu.\n", refcount); refcount = IDirectDraw2_Release(ddraw); - ok(!refcount, "Got unexpected refcount %u.\n", refcount); + ok(!refcount, "Got unexpected refcount %lu.\n", refcount); DestroyWindow(window); }
@@ -2360,13 +2360,13 @@ static void test_qi(const char *test_name, IUnknown *base_iface, for (i = 0; i < entry_count; ++i) { hr = IUnknown_QueryInterface(base_iface, tests[i].iid, (void **)&iface1); - ok(hr == tests[i].hr, "Got hr %#x for test "%s" %u.\n", hr, test_name, i); + ok(hr == tests[i].hr, "Got hr %#lx for test "%s" %u.\n", hr, test_name, i); if (SUCCEEDED(hr)) { for (j = 0; j < entry_count; ++j) { hr = IUnknown_QueryInterface(iface1, tests[j].iid, (void **)&iface2); - ok(hr == tests[j].hr, "Got hr %#x for test "%s" %u, %u.\n", hr, test_name, i, j); + ok(hr == tests[j].hr, "Got hr %#lx for test "%s" %u, %u.\n", hr, test_name, i, j); if (SUCCEEDED(hr)) { expected_refcount = 0; @@ -2375,7 +2375,7 @@ static void test_qi(const char *test_name, IUnknown *base_iface, if (IsEqualGUID(tests[i].refcount_iid, tests[j].refcount_iid)) ++expected_refcount; refcount = IUnknown_Release(iface2); - ok(refcount == expected_refcount, "Got refcount %u for test "%s" %u, %u, expected %u.\n", + ok(refcount == expected_refcount, "Got refcount %lu for test "%s" %u, %u, expected %lu.\n", refcount, test_name, i, j, expected_refcount); } } @@ -2384,7 +2384,7 @@ static void test_qi(const char *test_name, IUnknown *base_iface, if (IsEqualGUID(refcount_iid, tests[i].refcount_iid)) ++expected_refcount; refcount = IUnknown_Release(iface1); - ok(refcount == expected_refcount, "Got refcount %u for test "%s" %u, expected %u.\n", + ok(refcount == expected_refcount, "Got refcount %lu for test "%s" %u, expected %lu.\n", refcount, test_name, i, expected_refcount); } } @@ -2467,9 +2467,9 @@ static void test_surface_qi(void) surface_desc.dwWidth = 512; surface_desc.dwHeight = 512; hr = IDirectDraw2_CreateSurface(ddraw, &surface_desc, (IDirectDrawSurface **)0xdeadbeef, NULL); - ok(hr == E_INVALIDARG, "Got unexpected hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Got unexpected hr %#lx.\n", hr); hr = IDirectDraw2_CreateSurface(ddraw, &surface_desc, &surface, NULL); - ok(SUCCEEDED(hr), "Failed to create surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create surface, hr %#lx.\n", hr);
test_qi("surface_qi", (IUnknown *)surface, &IID_IDirectDrawSurface, tests, ARRAY_SIZE(tests));
@@ -2580,36 +2580,36 @@ static void test_wndproc(void) WS_MAXIMIZE | WS_CAPTION , 0, 0, 640, 480, 0, 0, 0, 0);
proc = GetWindowLongPtrA(window, GWLP_WNDPROC); - ok(proc == (LONG_PTR)test_proc, "Expected wndproc %#lx, got %#lx.\n", + ok(proc == (LONG_PTR)test_proc, "Expected wndproc %#Ix, got %#Ix.\n", (LONG_PTR)test_proc, proc); expect_messages = messages; hr = IDirectDraw2_SetCooperativeLevel(ddraw, window, DDSCL_EXCLUSIVE | DDSCL_FULLSCREEN); - ok(SUCCEEDED(hr), "SetCooperativeLevel failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "SetCooperativeLevel failed, hr %#lx.\n", hr); ok(!expect_messages->message, "Expected message %#x, but didn't receive it.\n", expect_messages->message); expect_messages = NULL; proc = GetWindowLongPtrA(window, GWLP_WNDPROC); - ok(proc != (LONG_PTR)test_proc, "Expected wndproc != %#lx, got %#lx.\n", + ok(proc != (LONG_PTR)test_proc, "Expected wndproc != %#Ix, got %#Ix.\n", (LONG_PTR)test_proc, proc); ref = IDirectDraw2_Release(ddraw); - ok(ref == 0, "The ddraw object was not properly freed: refcount %u.\n", ref); + ok(ref == 0, "The ddraw object was not properly freed: refcount %lu.\n", ref); proc = GetWindowLongPtrA(window, GWLP_WNDPROC); - ok(proc == (LONG_PTR)test_proc, "Expected wndproc %#lx, got %#lx.\n", + ok(proc == (LONG_PTR)test_proc, "Expected wndproc %#Ix, got %#Ix.\n", (LONG_PTR)test_proc, proc);
/* DDSCL_NORMAL doesn't. */ ddraw = create_ddraw(); proc = GetWindowLongPtrA(window, GWLP_WNDPROC); - ok(proc == (LONG_PTR)test_proc, "Expected wndproc %#lx, got %#lx.\n", + ok(proc == (LONG_PTR)test_proc, "Expected wndproc %#Ix, got %#Ix.\n", (LONG_PTR)test_proc, proc); hr = IDirectDraw2_SetCooperativeLevel(ddraw, window, DDSCL_NORMAL | DDSCL_FULLSCREEN); - ok(SUCCEEDED(hr), "SetCooperativeLevel failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "SetCooperativeLevel failed, hr %#lx.\n", hr); proc = GetWindowLongPtrA(window, GWLP_WNDPROC); - ok(proc == (LONG_PTR)test_proc, "Expected wndproc %#lx, got %#lx.\n", + ok(proc == (LONG_PTR)test_proc, "Expected wndproc %#Ix, got %#Ix.\n", (LONG_PTR)test_proc, proc); ref = IDirectDraw2_Release(ddraw); - ok(ref == 0, "The ddraw object was not properly freed: refcount %u.\n", ref); + ok(ref == 0, "The ddraw object was not properly freed: refcount %lu.\n", ref); proc = GetWindowLongPtrA(window, GWLP_WNDPROC); - ok(proc == (LONG_PTR)test_proc, "Expected wndproc %#lx, got %#lx.\n", + ok(proc == (LONG_PTR)test_proc, "Expected wndproc %#Ix, got %#Ix.\n", (LONG_PTR)test_proc, proc);
/* The original window proc is only restored by ddraw if the current @@ -2617,53 +2617,53 @@ static void test_wndproc(void) * from DDSCL_NORMAL to DDSCL_EXCLUSIVE. */ ddraw = create_ddraw(); proc = GetWindowLongPtrA(window, GWLP_WNDPROC); - ok(proc == (LONG_PTR)test_proc, "Expected wndproc %#lx, got %#lx.\n", + ok(proc == (LONG_PTR)test_proc, "Expected wndproc %#Ix, got %#Ix.\n", (LONG_PTR)test_proc, proc); hr = IDirectDraw2_SetCooperativeLevel(ddraw, window, DDSCL_EXCLUSIVE | DDSCL_FULLSCREEN); - ok(SUCCEEDED(hr), "SetCooperativeLevel failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "SetCooperativeLevel failed, hr %#lx.\n", hr); proc = GetWindowLongPtrA(window, GWLP_WNDPROC); - ok(proc != (LONG_PTR)test_proc, "Expected wndproc != %#lx, got %#lx.\n", + ok(proc != (LONG_PTR)test_proc, "Expected wndproc != %#Ix, got %#Ix.\n", (LONG_PTR)test_proc, proc); ddraw_proc = proc; hr = IDirectDraw2_SetCooperativeLevel(ddraw, window, DDSCL_NORMAL); - ok(SUCCEEDED(hr), "SetCooperativeLevel failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "SetCooperativeLevel failed, hr %#lx.\n", hr); proc = GetWindowLongPtrA(window, GWLP_WNDPROC); - ok(proc == (LONG_PTR)test_proc, "Expected wndproc %#lx, got %#lx.\n", + ok(proc == (LONG_PTR)test_proc, "Expected wndproc %#Ix, got %#Ix.\n", (LONG_PTR)test_proc, proc); hr = IDirectDraw2_SetCooperativeLevel(ddraw, window, DDSCL_EXCLUSIVE | DDSCL_FULLSCREEN); - ok(SUCCEEDED(hr), "SetCooperativeLevel failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "SetCooperativeLevel failed, hr %#lx.\n", hr); proc = SetWindowLongPtrA(window, GWLP_WNDPROC, (LONG_PTR)DefWindowProcA); - ok(proc != (LONG_PTR)test_proc, "Expected wndproc != %#lx, got %#lx.\n", + ok(proc != (LONG_PTR)test_proc, "Expected wndproc != %#Ix, got %#Ix.\n", (LONG_PTR)test_proc, proc); hr = IDirectDraw2_SetCooperativeLevel(ddraw, window, DDSCL_NORMAL); - ok(SUCCEEDED(hr), "SetCooperativeLevel failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "SetCooperativeLevel failed, hr %#lx.\n", hr); proc = GetWindowLongPtrA(window, GWLP_WNDPROC); - ok(proc == (LONG_PTR)DefWindowProcA, "Expected wndproc %#lx, got %#lx.\n", + ok(proc == (LONG_PTR)DefWindowProcA, "Expected wndproc %#Ix, got %#Ix.\n", (LONG_PTR)DefWindowProcA, proc); hr = IDirectDraw2_SetCooperativeLevel(ddraw, window, DDSCL_EXCLUSIVE | DDSCL_FULLSCREEN); - ok(SUCCEEDED(hr), "SetCooperativeLevel failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "SetCooperativeLevel failed, hr %#lx.\n", hr); proc = SetWindowLongPtrA(window, GWLP_WNDPROC, ddraw_proc); - ok(proc == (LONG_PTR)DefWindowProcA, "Expected wndproc %#lx, got %#lx.\n", + ok(proc == (LONG_PTR)DefWindowProcA, "Expected wndproc %#Ix, got %#Ix.\n", (LONG_PTR)DefWindowProcA, proc); ref = IDirectDraw2_Release(ddraw); - ok(ref == 0, "The ddraw object was not properly freed: refcount %u.\n", ref); + ok(ref == 0, "The ddraw object was not properly freed: refcount %lu.\n", ref); proc = GetWindowLongPtrA(window, GWLP_WNDPROC); - ok(proc == (LONG_PTR)test_proc, "Expected wndproc %#lx, got %#lx.\n", + ok(proc == (LONG_PTR)test_proc, "Expected wndproc %#Ix, got %#Ix.\n", (LONG_PTR)test_proc, proc);
ddraw = create_ddraw(); proc = GetWindowLongPtrA(window, GWLP_WNDPROC); - ok(proc == (LONG_PTR)test_proc, "Expected wndproc %#lx, got %#lx.\n", + ok(proc == (LONG_PTR)test_proc, "Expected wndproc %#Ix, got %#Ix.\n", (LONG_PTR)test_proc, proc); hr = IDirectDraw2_SetCooperativeLevel(ddraw, window, DDSCL_EXCLUSIVE | DDSCL_FULLSCREEN); - ok(SUCCEEDED(hr), "SetCooperativeLevel failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "SetCooperativeLevel failed, hr %#lx.\n", hr); proc = SetWindowLongPtrA(window, GWLP_WNDPROC, (LONG_PTR)DefWindowProcA); - ok(proc != (LONG_PTR)test_proc, "Expected wndproc != %#lx, got %#lx.\n", + ok(proc != (LONG_PTR)test_proc, "Expected wndproc != %#Ix, got %#Ix.\n", (LONG_PTR)test_proc, proc); ref = IDirectDraw2_Release(ddraw); - ok(ref == 0, "The ddraw object was not properly freed: refcount %u.\n", ref); + ok(ref == 0, "The ddraw object was not properly freed: refcount %lu.\n", ref); proc = GetWindowLongPtrA(window, GWLP_WNDPROC); - ok(proc == (LONG_PTR)DefWindowProcA, "Expected wndproc %#lx, got %#lx.\n", + ok(proc == (LONG_PTR)DefWindowProcA, "Expected wndproc %#Ix, got %#Ix.\n", (LONG_PTR)DefWindowProcA, proc);
fix_wndproc(window, (LONG_PTR)test_proc); @@ -2694,12 +2694,12 @@ static void test_window_style(void) SetRect(&fullscreen_rect, 0, 0, registry_mode.dmPelsWidth, registry_mode.dmPelsHeight);
hr = IDirectDraw2_SetCooperativeLevel(ddraw, window, DDSCL_EXCLUSIVE | DDSCL_FULLSCREEN); - ok(SUCCEEDED(hr), "SetCooperativeLevel failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "SetCooperativeLevel failed, hr %#lx.\n", hr);
tmp = GetWindowLongA(window, GWL_STYLE); - todo_wine ok(tmp == style, "Expected window style %#x, got %#x.\n", style, tmp); + todo_wine ok(tmp == style, "Expected window style %#lx, got %#lx.\n", style, tmp); tmp = GetWindowLongA(window, GWL_EXSTYLE); - todo_wine ok(tmp == exstyle, "Expected window extended style %#x, got %#x.\n", exstyle, tmp); + todo_wine ok(tmp == exstyle, "Expected window extended style %#lx, got %#lx.\n", exstyle, tmp);
GetWindowRect(window, &r); ok(EqualRect(&r, &fullscreen_rect), "Expected %s, got %s.\n", @@ -2711,9 +2711,9 @@ static void test_window_style(void) ok(ret, "Failed to set foreground window.\n");
tmp = GetWindowLongA(window, GWL_STYLE); - todo_wine ok(tmp == style, "Expected window style %#x, got %#x.\n", style, tmp); + todo_wine ok(tmp == style, "Expected window style %#lx, got %#lx.\n", style, tmp); tmp = GetWindowLongA(window, GWL_EXSTYLE); - todo_wine ok(tmp == exstyle, "Expected window extended style %#x, got %#x.\n", exstyle, tmp); + todo_wine ok(tmp == exstyle, "Expected window extended style %#lx, got %#lx.\n", exstyle, tmp);
ret = SetForegroundWindow(window); ok(ret, "Failed to set foreground window.\n"); @@ -2722,77 +2722,77 @@ static void test_window_style(void) ShowWindow(window, SW_HIDE);
hr = IDirectDraw2_SetCooperativeLevel(ddraw, window, DDSCL_NORMAL); - ok(SUCCEEDED(hr), "SetCooperativeLevel failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "SetCooperativeLevel failed, hr %#lx.\n", hr);
tmp = GetWindowLongA(window, GWL_STYLE); - ok(tmp == style, "Expected window style %#x, got %#x.\n", style, tmp); + ok(tmp == style, "Expected window style %#lx, got %#lx.\n", style, tmp); tmp = GetWindowLongA(window, GWL_EXSTYLE); - ok(tmp == exstyle, "Expected window extended style %#x, got %#x.\n", exstyle, tmp); + ok(tmp == exstyle, "Expected window extended style %#lx, got %#lx.\n", exstyle, tmp);
hr = IDirectDraw2_SetCooperativeLevel(ddraw, window, DDSCL_EXCLUSIVE | DDSCL_FULLSCREEN | DDSCL_NOWINDOWCHANGES); - ok(SUCCEEDED(hr), "SetCooperativeLevel failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "SetCooperativeLevel failed, hr %#lx.\n", hr);
tmp = GetWindowLongA(window, GWL_STYLE); - todo_wine ok(tmp == style, "Expected window style %#x, got %#x.\n", style, tmp); + todo_wine ok(tmp == style, "Expected window style %#lx, got %#lx.\n", style, tmp); tmp = GetWindowLongA(window, GWL_EXSTYLE); - todo_wine ok(tmp == exstyle, "Expected window extended style %#x, got %#x.\n", exstyle, tmp); + todo_wine ok(tmp == exstyle, "Expected window extended style %#lx, got %#lx.\n", exstyle, tmp);
hr = IDirectDraw2_SetCooperativeLevel(ddraw, window, DDSCL_EXCLUSIVE | DDSCL_FULLSCREEN); - ok(SUCCEEDED(hr), "SetCooperativeLevel failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "SetCooperativeLevel failed, hr %#lx.\n", hr);
tmp = GetWindowLongA(window, GWL_STYLE); expected_style = style | WS_VISIBLE; - todo_wine ok(tmp == expected_style, "Expected window style %#x, got %#x.\n", expected_style, tmp); + todo_wine ok(tmp == expected_style, "Expected window style %#lx, got %#lx.\n", expected_style, tmp); tmp = GetWindowLongA(window, GWL_EXSTYLE); expected_style = exstyle | WS_EX_TOPMOST; - todo_wine ok(tmp == expected_style, "Expected window extended style %#x, got %#x.\n", expected_style, tmp); + todo_wine ok(tmp == expected_style, "Expected window extended style %#lx, got %#lx.\n", expected_style, tmp);
ShowWindow(window, SW_HIDE); tmp = GetWindowLongA(window, GWL_STYLE); - todo_wine ok(tmp == style, "Expected window style %#x, got %#x.\n", style, tmp); + todo_wine ok(tmp == style, "Expected window style %#lx, got %#lx.\n", style, tmp); tmp = GetWindowLongA(window, GWL_EXSTYLE); expected_style = exstyle | WS_EX_TOPMOST; - todo_wine ok(tmp == expected_style, "Expected window extended style %#x, got %#x.\n", expected_style, tmp); + todo_wine ok(tmp == expected_style, "Expected window extended style %#lx, got %#lx.\n", expected_style, tmp);
hr = IDirectDraw2_SetCooperativeLevel(ddraw, window, DDSCL_NORMAL | DDSCL_NOWINDOWCHANGES); - ok(SUCCEEDED(hr), "SetCooperativeLevel failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "SetCooperativeLevel failed, hr %#lx.\n", hr);
tmp = GetWindowLongA(window, GWL_STYLE); - ok(tmp == style, "Expected window style %#x, got %#x.\n", style, tmp); + ok(tmp == style, "Expected window style %#lx, got %#lx.\n", style, tmp); tmp = GetWindowLongA(window, GWL_EXSTYLE); expected_style = exstyle | WS_EX_TOPMOST; - ok(tmp == expected_style, "Expected window extended style %#x, got %#x.\n", expected_style, tmp); + ok(tmp == expected_style, "Expected window extended style %#lx, got %#lx.\n", expected_style, tmp);
hr = IDirectDraw2_SetCooperativeLevel(ddraw, window, DDSCL_NORMAL); - ok(SUCCEEDED(hr), "SetCooperativeLevel failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "SetCooperativeLevel failed, hr %#lx.\n", hr);
tmp = GetWindowLongA(window, GWL_STYLE); - ok(tmp == style, "Expected window style %#x, got %#x.\n", style, tmp); + ok(tmp == style, "Expected window style %#lx, got %#lx.\n", style, tmp); tmp = GetWindowLongA(window, GWL_EXSTYLE); expected_style = exstyle | WS_EX_TOPMOST; - ok(tmp == expected_style, "Expected window extended style %#x, got %#x.\n", expected_style, tmp); + ok(tmp == expected_style, "Expected window extended style %#lx, got %#lx.\n", expected_style, tmp);
ret = SetForegroundWindow(window); ok(ret, "Failed to set foreground window.\n");
hr = IDirectDraw2_SetCooperativeLevel(ddraw, window, DDSCL_EXCLUSIVE | DDSCL_FULLSCREEN); - ok(SUCCEEDED(hr), "SetCooperativeLevel failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "SetCooperativeLevel failed, hr %#lx.\n", hr);
tmp = GetWindowLongA(window, GWL_STYLE); expected_style = style | WS_VISIBLE; - todo_wine ok(tmp == expected_style, "Expected window style %#x, got %#x.\n", expected_style, tmp); + todo_wine ok(tmp == expected_style, "Expected window style %#lx, got %#lx.\n", expected_style, tmp); tmp = GetWindowLongA(window, GWL_EXSTYLE); expected_style = exstyle | WS_EX_TOPMOST; - todo_wine ok(tmp == expected_style, "Expected window extended style %#x, got %#x.\n", expected_style, tmp); + todo_wine ok(tmp == expected_style, "Expected window extended style %#lx, got %#lx.\n", expected_style, tmp);
ShowWindow(window, SW_HIDE); hr = IDirectDraw2_SetCooperativeLevel(ddraw, window, DDSCL_NORMAL); - ok(SUCCEEDED(hr), "SetCooperativeLevel failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "SetCooperativeLevel failed, hr %#lx.\n", hr);
tmp = GetWindowLongA(window, GWL_STYLE); - ok(tmp == style, "Expected window style %#x, got %#x.\n", style, tmp); + ok(tmp == style, "Expected window style %#lx, got %#lx.\n", style, tmp); tmp = GetWindowLongA(window, GWL_EXSTYLE); - ok(tmp == exstyle, "Expected window extended style %#x, got %#x.\n", exstyle, tmp); + ok(tmp == exstyle, "Expected window extended style %#lx, got %#lx.\n", exstyle, tmp);
ShowWindow(window, SW_SHOW); ret = SetForegroundWindow(GetDesktopWindow()); @@ -2800,20 +2800,20 @@ static void test_window_style(void) SetActiveWindow(window); ok(GetActiveWindow() == window, "Unexpected active window.\n"); hr = IDirectDraw2_SetCooperativeLevel(ddraw, window, DDSCL_EXCLUSIVE | DDSCL_FULLSCREEN); - ok(SUCCEEDED(hr), "SetCooperativeLevel failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "SetCooperativeLevel failed, hr %#lx.\n", hr);
tmp = GetWindowLongA(window, GWL_STYLE); expected_style = style | WS_VISIBLE; - todo_wine ok(tmp == expected_style, "Expected window style %#x, got %#x.\n", expected_style, tmp); + todo_wine ok(tmp == expected_style, "Expected window style %#lx, got %#lx.\n", expected_style, tmp); tmp = GetWindowLongA(window, GWL_EXSTYLE); - todo_wine ok(tmp == exstyle, "Expected window extended style %#x, got %#x.\n", exstyle, tmp); + todo_wine ok(tmp == exstyle, "Expected window extended style %#lx, got %#lx.\n", exstyle, tmp);
GetWindowRect(window, &r); ok(EqualRect(&r, &fullscreen_rect), "Expected %s, got %s.\n", wine_dbgstr_rect(&fullscreen_rect), wine_dbgstr_rect(&r));
hr = IDirectDraw2_SetCooperativeLevel(ddraw, window, DDSCL_NORMAL); - ok(SUCCEEDED(hr), "SetCooperativeLevel failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "SetCooperativeLevel failed, hr %#lx.\n", hr);
SetWindowPos(window, NULL, 0, 0, 100, 100, SWP_NOZORDER | SWP_NOACTIVATE); GetWindowRect(window, &r); @@ -2823,13 +2823,13 @@ static void test_window_style(void) ret = SetForegroundWindow(window2); ok(ret, "Failed to set foreground window.\n"); hr = IDirectDraw2_SetCooperativeLevel(ddraw, window, DDSCL_EXCLUSIVE | DDSCL_FULLSCREEN); - ok(SUCCEEDED(hr), "SetCooperativeLevel failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "SetCooperativeLevel failed, hr %#lx.\n", hr);
tmp = GetWindowLongA(window, GWL_STYLE); expected_style = style | WS_VISIBLE; - todo_wine ok(tmp == expected_style, "Expected window style %#x, got %#x.\n", expected_style, tmp); + todo_wine ok(tmp == expected_style, "Expected window style %#lx, got %#lx.\n", expected_style, tmp); tmp = GetWindowLongA(window, GWL_EXSTYLE); - todo_wine ok(tmp == exstyle, "Expected window extended style %#x, got %#x.\n", exstyle, tmp); + todo_wine ok(tmp == exstyle, "Expected window extended style %#lx, got %#lx.\n", exstyle, tmp);
GetWindowRect(window, &r); ok(EqualRect(&r, &fullscreen_rect), "Expected %s, got %s.\n", @@ -2838,46 +2838,46 @@ static void test_window_style(void) ret = SetForegroundWindow(window); ok(ret, "Failed to set foreground window.\n"); hr = IDirectDraw2_SetCooperativeLevel(ddraw, window, DDSCL_EXCLUSIVE | DDSCL_FULLSCREEN); - ok(SUCCEEDED(hr), "SetCooperativeLevel failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "SetCooperativeLevel failed, hr %#lx.\n", hr);
tmp = GetWindowLongA(window, GWL_STYLE); expected_style = style | WS_VISIBLE; - todo_wine ok(tmp == expected_style, "Expected window style %#x, got %#x.\n", expected_style, tmp); + todo_wine ok(tmp == expected_style, "Expected window style %#lx, got %#lx.\n", expected_style, tmp); tmp = GetWindowLongA(window, GWL_EXSTYLE); expected_style = exstyle | WS_EX_TOPMOST; - todo_wine ok(tmp == expected_style, "Expected window extended style %#x, got %#x.\n", expected_style, tmp); + todo_wine ok(tmp == expected_style, "Expected window extended style %#lx, got %#lx.\n", expected_style, tmp);
ShowWindow(window, SW_HIDE); hr = IDirectDraw2_SetCooperativeLevel(ddraw, window, DDSCL_NORMAL); - ok(SUCCEEDED(hr), "SetCooperativeLevel failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "SetCooperativeLevel failed, hr %#lx.\n", hr);
tmp = GetWindowLongA(window, GWL_STYLE); - ok(tmp == style, "Expected window style %#x, got %#x.\n", style, tmp); + ok(tmp == style, "Expected window style %#lx, got %#lx.\n", style, tmp); tmp = GetWindowLongA(window, GWL_EXSTYLE); - ok(tmp == exstyle, "Expected window extended style %#x, got %#x.\n", exstyle, tmp); + ok(tmp == exstyle, "Expected window extended style %#lx, got %#lx.\n", exstyle, tmp);
ShowWindow(window, SW_SHOW); hr = IDirectDraw2_SetCooperativeLevel(ddraw, window, DDSCL_EXCLUSIVE | DDSCL_FULLSCREEN); - ok(SUCCEEDED(hr), "SetCooperativeLevel failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "SetCooperativeLevel failed, hr %#lx.\n", hr);
tmp = GetWindowLongA(window, GWL_STYLE); expected_style = style | WS_VISIBLE; - todo_wine ok(tmp == expected_style, "Expected window style %#x, got %#x.\n", expected_style, tmp); + todo_wine ok(tmp == expected_style, "Expected window style %#lx, got %#lx.\n", expected_style, tmp); tmp = GetWindowLongA(window, GWL_EXSTYLE); expected_style = exstyle | WS_EX_TOPMOST; - todo_wine ok(tmp == expected_style, "Expected window extended style %#x, got %#x.\n", expected_style, tmp); + todo_wine ok(tmp == expected_style, "Expected window extended style %#lx, got %#lx.\n", expected_style, tmp);
ret = SetForegroundWindow(GetDesktopWindow()); ok(ret, "Failed to set foreground window.\n"); tmp = GetWindowLongA(window, GWL_STYLE); expected_style = style | WS_VISIBLE | WS_MINIMIZE; - todo_wine ok(tmp == expected_style, "Expected window style %#x, got %#x.\n", expected_style, tmp); + todo_wine ok(tmp == expected_style, "Expected window style %#lx, got %#lx.\n", expected_style, tmp); tmp = GetWindowLongA(window, GWL_EXSTYLE); expected_style = exstyle | WS_EX_TOPMOST; - todo_wine ok(tmp == expected_style, "Expected window extended style %#x, got %#x.\n", expected_style, tmp); + todo_wine ok(tmp == expected_style, "Expected window extended style %#lx, got %#lx.\n", expected_style, tmp);
ref = IDirectDraw2_Release(ddraw); - ok(ref == 0, "The ddraw object was not properly freed: refcount %u.\n", ref); + ok(ref == 0, "The ddraw object was not properly freed: refcount %lu.\n", ref);
DestroyWindow(window2); DestroyWindow(window); @@ -2898,15 +2898,15 @@ static void test_redundant_mode_set(void) ok(!!ddraw, "Failed to create a ddraw object.\n");
hr = IDirectDraw2_SetCooperativeLevel(ddraw, window, DDSCL_EXCLUSIVE | DDSCL_FULLSCREEN); - ok(SUCCEEDED(hr), "SetCooperativeLevel failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "SetCooperativeLevel failed, hr %#lx.\n", hr);
surface_desc.dwSize = sizeof(surface_desc); hr = IDirectDraw2_GetDisplayMode(ddraw, &surface_desc); - ok(SUCCEEDED(hr), "GetDisplayMode failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "GetDisplayMode failed, hr %#lx.\n", hr);
hr = IDirectDraw2_SetDisplayMode(ddraw, surface_desc.dwWidth, surface_desc.dwHeight, U1(surface_desc.ddpfPixelFormat).dwRGBBitCount, 0, 0); - ok(SUCCEEDED(hr), "SetDisplayMode failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "SetDisplayMode failed, hr %#lx.\n", hr);
GetWindowRect(window, &q); r = q; @@ -2918,14 +2918,14 @@ static void test_redundant_mode_set(void)
hr = IDirectDraw2_SetDisplayMode(ddraw, surface_desc.dwWidth, surface_desc.dwHeight, U1(surface_desc.ddpfPixelFormat).dwRGBBitCount, 0, 0); - ok(SUCCEEDED(hr), "SetDisplayMode failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "SetDisplayMode failed, hr %#lx.\n", hr);
GetWindowRect(window, &s); ok(EqualRect(&r, &s) || broken(EqualRect(&q, &s) /* Windows 10 */), "Expected %s, got %s.\n", wine_dbgstr_rect(&r), wine_dbgstr_rect(&s));
ref = IDirectDraw2_Release(ddraw); - ok(ref == 0, "The ddraw object was not properly freed: refcount %u.\n", ref); + ok(ref == 0, "The ddraw object was not properly freed: refcount %lu.\n", ref);
DestroyWindow(window); } @@ -3075,10 +3075,10 @@ static void test_coop_level_mode_set(void) memset(&devmode, 0, sizeof(devmode)); devmode.dmSize = sizeof(devmode); ret = EnumDisplaySettingsW(NULL, ENUM_CURRENT_SETTINGS, &devmode); - ok(ret, "EnumDisplaySettingsW failed, error %#x.\n", GetLastError()); + ok(ret, "EnumDisplaySettingsW failed, error %#lx.\n", GetLastError()); ok(compare_mode_rect(&devmode, ®istry_mode), "Got a different mode.\n"); ret = EnumDisplaySettingsW(NULL, ENUM_REGISTRY_SETTINGS, &devmode); - ok(ret, "EnumDisplaySettingsW failed, error %#x.\n", GetLastError()); + ok(ret, "EnumDisplaySettingsW failed, error %#lx.\n", GetLastError()); ok(compare_mode_rect(&devmode, ®istry_mode), "Got a different mode.\n");
ret = save_display_modes(&original_modes, &display_count); @@ -3089,9 +3089,9 @@ static void test_coop_level_mode_set(void)
memset(¶m, 0, sizeof(param)); hr = IDirectDraw2_EnumDisplayModes(ddraw, 0, NULL, ¶m, test_coop_level_mode_set_enum_cb); - ok(SUCCEEDED(hr), "Failed to enumerate display mode, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to enumerate display mode, hr %#lx.\n", hr); ref = IDirectDraw2_Release(ddraw); - ok(ref == 0, "The ddraw object was not properly freed: refcount %u.\n", ref); + ok(ref == 0, "The ddraw object was not properly freed: refcount %lu.\n", ref);
if (!param.user32_height) { @@ -3110,7 +3110,7 @@ static void test_coop_level_mode_set(void) devmode.dmPelsWidth = param.user32_width; devmode.dmPelsHeight = param.user32_height; change_ret = ChangeDisplaySettingsW(&devmode, CDS_FULLSCREEN); - ok(change_ret == DISP_CHANGE_SUCCESSFUL, "Failed to change display mode, ret %#x.\n", change_ret); + ok(change_ret == DISP_CHANGE_SUCCESSFUL, "Failed to change display mode, ret %#lx.\n", change_ret);
ddraw = create_ddraw(); ok(!!ddraw, "Failed to create a ddraw object.\n"); @@ -3128,7 +3128,7 @@ static void test_coop_level_mode_set(void) 0, 0, 100, 100, 0, 0, 0, 0);
hr = IDirectDraw2_SetCooperativeLevel(ddraw, window, DDSCL_EXCLUSIVE | DDSCL_FULLSCREEN); - ok(SUCCEEDED(hr), "SetCooperativeLevel failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "SetCooperativeLevel failed, hr %#lx.\n", hr);
GetWindowRect(window, &r); ok(EqualRect(&r, &user32_rect), "Expected %s, got %s.\n", wine_dbgstr_rect(&user32_rect), @@ -3140,12 +3140,12 @@ static void test_coop_level_mode_set(void) ddsd.ddsCaps.dwCaps = DDSCAPS_PRIMARYSURFACE;
hr = IDirectDraw2_CreateSurface(ddraw, &ddsd, &primary, NULL); - ok(SUCCEEDED(hr), "Failed to create surface, hr %#x.\n",hr); + ok(SUCCEEDED(hr), "Failed to create surface, hr %#lx.\n",hr); hr = IDirectDrawSurface_GetSurfaceDesc(primary, &ddsd); - ok(SUCCEEDED(hr), "Failed to get surface desc, hr %#x.\n", hr); - ok(ddsd.dwWidth == param.user32_width, "Expected surface width %u, got %u.\n", + ok(SUCCEEDED(hr), "Failed to get surface desc, hr %#lx.\n", hr); + ok(ddsd.dwWidth == param.user32_width, "Expected surface width %lu, got %lu.\n", param.user32_width, ddsd.dwWidth); - ok(ddsd.dwHeight == param.user32_height, "Expected surface height %u, got %u.\n", + ok(ddsd.dwHeight == param.user32_height, "Expected surface height %lu, got %lu.\n", param.user32_height, ddsd.dwHeight);
GetWindowRect(window, &r); @@ -3158,16 +3158,16 @@ static void test_coop_level_mode_set(void) screen_size.cy = 0;
hr = IDirectDrawSurface_IsLost(primary); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); hr = set_display_mode(ddraw, param.ddraw_width, param.ddraw_height); - ok(SUCCEEDED(hr), "Failed to set display mode, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set display mode, hr %#lx.\n", hr); hr = IDirectDrawSurface_IsLost(primary); - ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#lx.\n", hr);
ok(!expect_messages->message, "Expected message %#x, but didn't receive it.\n", expect_messages->message); expect_messages = NULL; ok(screen_size.cx == param.ddraw_width && screen_size.cy == param.ddraw_height, - "Expected screen size %ux%u, got %ux%u.\n", + "Expected screen size %lux%lu, got %lux%lu.\n", param.ddraw_width, param.ddraw_height, screen_size.cx, screen_size.cy);
GetWindowRect(window, &r); @@ -3175,10 +3175,10 @@ static void test_coop_level_mode_set(void) wine_dbgstr_rect(&r));
hr = IDirectDrawSurface_GetSurfaceDesc(primary, &ddsd); - ok(SUCCEEDED(hr), "Failed to get surface desc, hr %#x.\n", hr); - ok(ddsd.dwWidth == param.user32_width, "Expected surface width %u, got %u.\n", + ok(SUCCEEDED(hr), "Failed to get surface desc, hr %#lx.\n", hr); + ok(ddsd.dwWidth == param.user32_width, "Expected surface width %lu, got %lu.\n", param.user32_width, ddsd.dwWidth); - ok(ddsd.dwHeight == param.user32_height, "Expected surface height %u, got %u.\n", + ok(ddsd.dwHeight == param.user32_height, "Expected surface height %lu, got %lu.\n", param.user32_height, ddsd.dwHeight); IDirectDrawSurface_Release(primary);
@@ -3188,12 +3188,12 @@ static void test_coop_level_mode_set(void) ddsd.ddsCaps.dwCaps = DDSCAPS_PRIMARYSURFACE;
hr = IDirectDraw2_CreateSurface(ddraw, &ddsd, &primary, NULL); - ok(SUCCEEDED(hr), "Failed to create surface, hr %#x.\n",hr); + ok(SUCCEEDED(hr), "Failed to create surface, hr %#lx.\n",hr); hr = IDirectDrawSurface_GetSurfaceDesc(primary, &ddsd); - ok(SUCCEEDED(hr), "Failed to get surface desc, hr %#x.\n", hr); - ok(ddsd.dwWidth == param.ddraw_width, "Expected surface width %u, got %u.\n", + ok(SUCCEEDED(hr), "Failed to get surface desc, hr %#lx.\n", hr); + ok(ddsd.dwWidth == param.ddraw_width, "Expected surface width %lu, got %lu.\n", param.ddraw_width, ddsd.dwWidth); - ok(ddsd.dwHeight == param.ddraw_height, "Expected surface height %u, got %u.\n", + ok(ddsd.dwHeight == param.ddraw_height, "Expected surface height %lu, got %lu.\n", param.ddraw_height, ddsd.dwHeight);
GetWindowRect(window, &r); @@ -3206,16 +3206,16 @@ static void test_coop_level_mode_set(void) screen_size.cy = 0;
hr = IDirectDrawSurface_IsLost(primary); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); change_ret = ChangeDisplaySettingsW(&devmode, CDS_FULLSCREEN); - ok(change_ret == DISP_CHANGE_SUCCESSFUL, "Failed to change display mode, ret %#x.\n", change_ret); + ok(change_ret == DISP_CHANGE_SUCCESSFUL, "Failed to change display mode, ret %#lx.\n", change_ret); hr = IDirectDrawSurface_IsLost(primary); - ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#lx.\n", hr);
ok(!expect_messages->message, "Expected message %#x, but didn't receive it.\n", expect_messages->message); expect_messages = NULL; ok(screen_size.cx == param.user32_width && screen_size.cy == param.user32_height, - "Expected screen size %ux%u, got %ux%u.\n", + "Expected screen size %lux%lu, got %lux%lu.\n", param.user32_width, param.user32_height, screen_size.cx, screen_size.cy);
GetWindowRect(window, &r); @@ -3231,7 +3231,7 @@ static void test_coop_level_mode_set(void) ret = EnumDisplaySettingsW(NULL, ENUM_CURRENT_SETTINGS, &devmode); ok(ret, "Failed to get display mode.\n"); ok(devmode.dmPelsWidth == registry_mode.dmPelsWidth - && devmode.dmPelsHeight == registry_mode.dmPelsHeight, "Got unexpected screen size %ux%u.\n", + && devmode.dmPelsHeight == registry_mode.dmPelsHeight, "Got unexpected screen size %lux%lu.\n", devmode.dmPelsWidth, devmode.dmPelsHeight);
expect_messages = exclusive_focus_restore_messages; @@ -3244,11 +3244,11 @@ static void test_coop_level_mode_set(void) ret = EnumDisplaySettingsW(NULL, ENUM_CURRENT_SETTINGS, &devmode); ok(ret, "Failed to get display mode.\n"); ok(devmode.dmPelsWidth == param.ddraw_width - && devmode.dmPelsHeight == param.ddraw_height, "Got unexpected screen size %ux%u.\n", + && devmode.dmPelsHeight == param.ddraw_height, "Got unexpected screen size %lux%lu.\n", devmode.dmPelsWidth, devmode.dmPelsHeight);
hr = IDirectDraw2_SetCooperativeLevel(ddraw, window, DDSCL_EXCLUSIVE | DDSCL_FULLSCREEN); - ok(SUCCEEDED(hr), "SetCooperativeLevel failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "SetCooperativeLevel failed, hr %#lx.\n", hr); /* Normally the primary should be restored here. Unfortunately this causes the * GetSurfaceDesc call after the next display mode change to crash on the Windows 8 * testbot. Another Restore call would presumably avoid the crash, but it also moots @@ -3270,7 +3270,7 @@ static void test_coop_level_mode_set(void) expect_messages = NULL;
hr = IDirectDraw2_SetCooperativeLevel(ddraw, window, DDSCL_EXCLUSIVE | DDSCL_FULLSCREEN); - ok(SUCCEEDED(hr), "SetCooperativeLevel failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "SetCooperativeLevel failed, hr %#lx.\n", hr);
PeekMessageA(&msg, 0, 0, 0, PM_NOREMOVE); expect_messages = exclusive_messages; @@ -3278,17 +3278,17 @@ static void test_coop_level_mode_set(void) screen_size.cy = 0;
hr = IDirectDrawSurface_IsLost(primary); - ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#lx.\n", hr); hr = IDirectDraw2_RestoreDisplayMode(ddraw); - ok(SUCCEEDED(hr), "RestoreDisplayMode failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "RestoreDisplayMode failed, hr %#lx.\n", hr); hr = IDirectDrawSurface_IsLost(primary); - ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#lx.\n", hr);
ok(!expect_messages->message, "Expected message %#x, but didn't receive it.\n", expect_messages->message); expect_messages = NULL; ok(screen_size.cx == registry_mode.dmPelsWidth && screen_size.cy == registry_mode.dmPelsHeight, - "Expected screen size %ux%u, got %ux%u.\n", + "Expected screen size %lux%lu, got %lux%lu.\n", registry_mode.dmPelsWidth, registry_mode.dmPelsHeight, screen_size.cx, screen_size.cy);
GetWindowRect(window, &r); @@ -3296,16 +3296,16 @@ static void test_coop_level_mode_set(void) wine_dbgstr_rect(&r));
hr = IDirectDrawSurface_GetSurfaceDesc(primary, &ddsd); - ok(SUCCEEDED(hr), "Failed to get surface desc, hr %#x.\n", hr); - ok(ddsd.dwWidth == param.ddraw_width, "Expected surface width %u, got %u.\n", + ok(SUCCEEDED(hr), "Failed to get surface desc, hr %#lx.\n", hr); + ok(ddsd.dwWidth == param.ddraw_width, "Expected surface width %lu, got %lu.\n", param.ddraw_width, ddsd.dwWidth); - ok(ddsd.dwHeight == param.ddraw_height, "Expected surface height %u, got %u.\n", + ok(ddsd.dwHeight == param.ddraw_height, "Expected surface height %lu, got %lu.\n", param.ddraw_height, ddsd.dwHeight); IDirectDrawSurface_Release(primary);
/* For Wine. */ change_ret = ChangeDisplaySettingsW(NULL, CDS_FULLSCREEN); - ok(change_ret == DISP_CHANGE_SUCCESSFUL, "Failed to change display mode, ret %#x.\n", change_ret); + ok(change_ret == DISP_CHANGE_SUCCESSFUL, "Failed to change display mode, ret %#lx.\n", change_ret);
memset(&ddsd, 0, sizeof(ddsd)); ddsd.dwSize = sizeof(ddsd); @@ -3313,12 +3313,12 @@ static void test_coop_level_mode_set(void) ddsd.ddsCaps.dwCaps = DDSCAPS_PRIMARYSURFACE;
hr = IDirectDraw2_CreateSurface(ddraw, &ddsd, &primary, NULL); - ok(SUCCEEDED(hr), "Failed to create surface, hr %#x.\n",hr); + ok(SUCCEEDED(hr), "Failed to create surface, hr %#lx.\n",hr); hr = IDirectDrawSurface_GetSurfaceDesc(primary, &ddsd); - ok(SUCCEEDED(hr), "Failed to get surface desc, hr %#x.\n", hr); - ok(ddsd.dwWidth == registry_mode.dmPelsWidth, "Expected surface width %u, got %u.\n", + ok(SUCCEEDED(hr), "Failed to get surface desc, hr %#lx.\n", hr); + ok(ddsd.dwWidth == registry_mode.dmPelsWidth, "Expected surface width %lu, got %lu.\n", registry_mode.dmPelsWidth, ddsd.dwWidth); - ok(ddsd.dwHeight == registry_mode.dmPelsHeight, "Expected surface height %u, got %u.\n", + ok(ddsd.dwHeight == registry_mode.dmPelsHeight, "Expected surface height %lu, got %lu.\n", registry_mode.dmPelsHeight, ddsd.dwHeight);
GetWindowRect(window, &r); @@ -3326,17 +3326,17 @@ static void test_coop_level_mode_set(void) wine_dbgstr_rect(&r));
hr = IDirectDraw2_SetCooperativeLevel(ddraw, window, DDSCL_NORMAL); - ok(SUCCEEDED(hr), "SetCooperativeLevel failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "SetCooperativeLevel failed, hr %#lx.\n", hr);
GetWindowRect(window, &r); ok(EqualRect(&r, ®istry_rect), "Expected %s, got %s.\n", wine_dbgstr_rect(®istry_rect), wine_dbgstr_rect(&r));
hr = IDirectDrawSurface_GetSurfaceDesc(primary, &ddsd); - ok(SUCCEEDED(hr), "Failed to get surface desc, hr %#x.\n", hr); - ok(ddsd.dwWidth == registry_mode.dmPelsWidth, "Expected surface width %u, got %u.\n", + ok(SUCCEEDED(hr), "Failed to get surface desc, hr %#lx.\n", hr); + ok(ddsd.dwWidth == registry_mode.dmPelsWidth, "Expected surface width %lu, got %lu.\n", registry_mode.dmPelsWidth, ddsd.dwWidth); - ok(ddsd.dwHeight == registry_mode.dmPelsHeight, "Expected surface height %u, got %u.\n", + ok(ddsd.dwHeight == registry_mode.dmPelsHeight, "Expected surface height %lu, got %lu.\n", registry_mode.dmPelsHeight, ddsd.dwHeight); IDirectDrawSurface_Release(primary);
@@ -3346,12 +3346,12 @@ static void test_coop_level_mode_set(void) ddsd.ddsCaps.dwCaps = DDSCAPS_PRIMARYSURFACE;
hr = IDirectDraw2_CreateSurface(ddraw, &ddsd, &primary, NULL); - ok(SUCCEEDED(hr), "Failed to create surface, hr %#x.\n",hr); + ok(SUCCEEDED(hr), "Failed to create surface, hr %#lx.\n",hr); hr = IDirectDrawSurface_GetSurfaceDesc(primary, &ddsd); - ok(SUCCEEDED(hr), "Failed to get surface desc, hr %#x.\n", hr); - ok(ddsd.dwWidth == registry_mode.dmPelsWidth, "Expected surface width %u, got %u.\n", + ok(SUCCEEDED(hr), "Failed to get surface desc, hr %#lx.\n", hr); + ok(ddsd.dwWidth == registry_mode.dmPelsWidth, "Expected surface width %lu, got %lu.\n", registry_mode.dmPelsWidth, ddsd.dwWidth); - ok(ddsd.dwHeight == registry_mode.dmPelsHeight, "Expected surface height %u, got %u.\n", + ok(ddsd.dwHeight == registry_mode.dmPelsHeight, "Expected surface height %lu, got %lu.\n", registry_mode.dmPelsHeight, ddsd.dwHeight);
GetWindowRect(window, &r); @@ -3364,18 +3364,18 @@ static void test_coop_level_mode_set(void) screen_size.cy = 0;
hr = IDirectDrawSurface_IsLost(primary); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); devmode.dmFields = DM_PELSWIDTH | DM_PELSHEIGHT; devmode.dmPelsWidth = param.user32_width; devmode.dmPelsHeight = param.user32_height; change_ret = ChangeDisplaySettingsW(&devmode, CDS_FULLSCREEN); - ok(change_ret == DISP_CHANGE_SUCCESSFUL, "Failed to change display mode, ret %#x.\n", change_ret); + ok(change_ret == DISP_CHANGE_SUCCESSFUL, "Failed to change display mode, ret %#lx.\n", change_ret); hr = IDirectDrawSurface_IsLost(primary); - todo_wine ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#x.\n", hr); + todo_wine ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#lx.\n", hr);
ok(!expect_messages->message, "Expected message %#x, but didn't receive it.\n", expect_messages->message); expect_messages = NULL; - ok(!screen_size.cx && !screen_size.cy, "Got unexpected screen size %ux%u.\n", screen_size.cx, screen_size.cy); + ok(!screen_size.cx && !screen_size.cy, "Got unexpected screen size %lux%lu.\n", screen_size.cx, screen_size.cy);
GetWindowRect(window, &r); ok(EqualRect(&r, ®istry_rect), "Expected %s, got %s.\n", wine_dbgstr_rect(®istry_rect), @@ -3387,7 +3387,7 @@ static void test_coop_level_mode_set(void) screen_size.cy = 0;
hr = IDirectDrawSurface_Restore(primary); - ok(hr == DDERR_WRONGMODE, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_WRONGMODE, "Got unexpected hr %#lx.\n", hr); hr = set_display_mode(ddraw, param.ddraw_width, param.ddraw_height); if (hr == DDERR_NOEXCLUSIVEMODE /* NT4 testbot */) { @@ -3396,25 +3396,25 @@ static void test_coop_level_mode_set(void) IDirectDraw2_Release(ddraw); goto done; } - ok(SUCCEEDED(hr), "Failed to set display mode, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set display mode, hr %#lx.\n", hr); hr = IDirectDrawSurface_Restore(primary); - ok(hr == DDERR_WRONGMODE, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_WRONGMODE, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface_IsLost(primary); - ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#lx.\n", hr);
ok(!expect_messages->message, "Expected message %#x, but didn't receive it.\n", expect_messages->message); expect_messages = NULL; - ok(!screen_size.cx && !screen_size.cy, "Got unexpected screen size %ux%u.\n", screen_size.cx, screen_size.cy); + ok(!screen_size.cx && !screen_size.cy, "Got unexpected screen size %lux%lu.\n", screen_size.cx, screen_size.cy);
GetWindowRect(window, &r); ok(EqualRect(&r, ®istry_rect), "Expected %s, got %s.\n", wine_dbgstr_rect(®istry_rect), wine_dbgstr_rect(&r));
hr = IDirectDrawSurface_GetSurfaceDesc(primary, &ddsd); - ok(SUCCEEDED(hr), "Failed to get surface desc, hr %#x.\n", hr); - ok(ddsd.dwWidth == registry_mode.dmPelsWidth, "Expected surface width %u, got %u.\n", + ok(SUCCEEDED(hr), "Failed to get surface desc, hr %#lx.\n", hr); + ok(ddsd.dwWidth == registry_mode.dmPelsWidth, "Expected surface width %lu, got %lu.\n", registry_mode.dmPelsWidth, ddsd.dwWidth); - ok(ddsd.dwHeight == registry_mode.dmPelsHeight, "Expected surface height %u, got %u.\n", + ok(ddsd.dwHeight == registry_mode.dmPelsHeight, "Expected surface height %lu, got %lu.\n", registry_mode.dmPelsHeight, ddsd.dwHeight); IDirectDrawSurface_Release(primary);
@@ -3424,12 +3424,12 @@ static void test_coop_level_mode_set(void) ddsd.ddsCaps.dwCaps = DDSCAPS_PRIMARYSURFACE;
hr = IDirectDraw2_CreateSurface(ddraw, &ddsd, &primary, NULL); - ok(SUCCEEDED(hr), "Failed to create surface, hr %#x.\n",hr); + ok(SUCCEEDED(hr), "Failed to create surface, hr %#lx.\n",hr); hr = IDirectDrawSurface_GetSurfaceDesc(primary, &ddsd); - ok(SUCCEEDED(hr), "Failed to get surface desc, hr %#x.\n", hr); - ok(ddsd.dwWidth == param.ddraw_width, "Expected surface width %u, got %u.\n", + ok(SUCCEEDED(hr), "Failed to get surface desc, hr %#lx.\n", hr); + ok(ddsd.dwWidth == param.ddraw_width, "Expected surface width %lu, got %lu.\n", param.ddraw_width, ddsd.dwWidth); - ok(ddsd.dwHeight == param.ddraw_height, "Expected surface height %u, got %u.\n", + ok(ddsd.dwHeight == param.ddraw_height, "Expected surface height %lu, got %lu.\n", param.ddraw_height, ddsd.dwHeight);
GetWindowRect(window, &r); @@ -3442,25 +3442,25 @@ static void test_coop_level_mode_set(void) screen_size.cy = 0;
hr = IDirectDrawSurface_IsLost(primary); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirectDraw2_RestoreDisplayMode(ddraw); - ok(SUCCEEDED(hr), "RestoreDisplayMode failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "RestoreDisplayMode failed, hr %#lx.\n", hr); hr = IDirectDrawSurface_IsLost(primary); - ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#lx.\n", hr);
ok(!expect_messages->message, "Expected message %#x, but didn't receive it.\n", expect_messages->message); expect_messages = NULL; - ok(!screen_size.cx && !screen_size.cy, "Got unexpected screen size %ux%u.\n", screen_size.cx, screen_size.cy); + ok(!screen_size.cx && !screen_size.cy, "Got unexpected screen size %lux%lu.\n", screen_size.cx, screen_size.cy);
GetWindowRect(window, &r); ok(EqualRect(&r, ®istry_rect), "Expected %s, got %s.\n", wine_dbgstr_rect(®istry_rect), wine_dbgstr_rect(&r));
hr = IDirectDrawSurface_GetSurfaceDesc(primary, &ddsd); - ok(SUCCEEDED(hr), "Failed to get surface desc, hr %#x.\n", hr); - ok(ddsd.dwWidth == param.ddraw_width, "Expected surface width %u, got %u.\n", + ok(SUCCEEDED(hr), "Failed to get surface desc, hr %#lx.\n", hr); + ok(ddsd.dwWidth == param.ddraw_width, "Expected surface width %lu, got %lu.\n", param.ddraw_width, ddsd.dwWidth); - ok(ddsd.dwHeight == param.ddraw_height, "Expected surface height %u, got %u.\n", + ok(ddsd.dwHeight == param.ddraw_height, "Expected surface height %lu, got %lu.\n", param.ddraw_height, ddsd.dwHeight); IDirectDrawSurface_Release(primary);
@@ -3468,11 +3468,11 @@ static void test_coop_level_mode_set(void) ok(ret, "Failed to get display mode.\n"); ok(devmode.dmPelsWidth == registry_mode.dmPelsWidth && devmode.dmPelsHeight == registry_mode.dmPelsHeight, - "Expected resolution %ux%u, got %ux%u.\n", + "Expected resolution %lux%lu, got %lux%lu.\n", registry_mode.dmPelsWidth, registry_mode.dmPelsHeight, devmode.dmPelsWidth, devmode.dmPelsHeight); change_ret = ChangeDisplaySettingsW(NULL, CDS_FULLSCREEN); - ok(change_ret == DISP_CHANGE_SUCCESSFUL, "Failed to change display mode, ret %#x.\n", change_ret); + ok(change_ret == DISP_CHANGE_SUCCESSFUL, "Failed to change display mode, ret %#lx.\n", change_ret);
memset(&ddsd, 0, sizeof(ddsd)); ddsd.dwSize = sizeof(ddsd); @@ -3480,12 +3480,12 @@ static void test_coop_level_mode_set(void) ddsd.ddsCaps.dwCaps = DDSCAPS_PRIMARYSURFACE;
hr = IDirectDraw2_CreateSurface(ddraw, &ddsd, &primary, NULL); - ok(SUCCEEDED(hr), "Failed to create surface, hr %#x.\n",hr); + ok(SUCCEEDED(hr), "Failed to create surface, hr %#lx.\n",hr); hr = IDirectDrawSurface_GetSurfaceDesc(primary, &ddsd); - ok(SUCCEEDED(hr), "Failed to get surface desc, hr %#x.\n", hr); - ok(ddsd.dwWidth == registry_mode.dmPelsWidth, "Expected surface width %u, got %u.\n", + ok(SUCCEEDED(hr), "Failed to get surface desc, hr %#lx.\n", hr); + ok(ddsd.dwWidth == registry_mode.dmPelsWidth, "Expected surface width %lu, got %lu.\n", registry_mode.dmPelsWidth, ddsd.dwWidth); - ok(ddsd.dwHeight == registry_mode.dmPelsHeight, "Expected surface height %u, got %u.\n", + ok(ddsd.dwHeight == registry_mode.dmPelsHeight, "Expected surface height %lu, got %lu.\n", registry_mode.dmPelsHeight, ddsd.dwHeight);
GetWindowRect(window, &r); @@ -3496,17 +3496,17 @@ static void test_coop_level_mode_set(void) * Resizing the window on mode changes is a property of DDSCL_EXCLUSIVE, * not DDSCL_FULLSCREEN. */ hr = IDirectDraw2_SetCooperativeLevel(ddraw, window, DDSCL_NORMAL | DDSCL_FULLSCREEN); - ok(SUCCEEDED(hr), "SetCooperativeLevel failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "SetCooperativeLevel failed, hr %#lx.\n", hr);
GetWindowRect(window, &r); ok(EqualRect(&r, ®istry_rect), "Expected %s, got %s.\n", wine_dbgstr_rect(®istry_rect), wine_dbgstr_rect(&r));
hr = IDirectDrawSurface_GetSurfaceDesc(primary, &ddsd); - ok(SUCCEEDED(hr), "Failed to get surface desc, hr %#x.\n", hr); - ok(ddsd.dwWidth == registry_mode.dmPelsWidth, "Expected surface width %u, got %u.\n", + ok(SUCCEEDED(hr), "Failed to get surface desc, hr %#lx.\n", hr); + ok(ddsd.dwWidth == registry_mode.dmPelsWidth, "Expected surface width %lu, got %lu.\n", registry_mode.dmPelsWidth, ddsd.dwWidth); - ok(ddsd.dwHeight == registry_mode.dmPelsHeight, "Expected surface height %u, got %u.\n", + ok(ddsd.dwHeight == registry_mode.dmPelsHeight, "Expected surface height %lu, got %lu.\n", registry_mode.dmPelsHeight, ddsd.dwHeight); IDirectDrawSurface_Release(primary);
@@ -3516,12 +3516,12 @@ static void test_coop_level_mode_set(void) ddsd.ddsCaps.dwCaps = DDSCAPS_PRIMARYSURFACE;
hr = IDirectDraw2_CreateSurface(ddraw, &ddsd, &primary, NULL); - ok(SUCCEEDED(hr), "Failed to create surface, hr %#x.\n",hr); + ok(SUCCEEDED(hr), "Failed to create surface, hr %#lx.\n",hr); hr = IDirectDrawSurface_GetSurfaceDesc(primary, &ddsd); - ok(SUCCEEDED(hr), "Failed to get surface desc, hr %#x.\n", hr); - ok(ddsd.dwWidth == registry_mode.dmPelsWidth, "Expected surface width %u, got %u.\n", + ok(SUCCEEDED(hr), "Failed to get surface desc, hr %#lx.\n", hr); + ok(ddsd.dwWidth == registry_mode.dmPelsWidth, "Expected surface width %lu, got %lu.\n", registry_mode.dmPelsWidth, ddsd.dwWidth); - ok(ddsd.dwHeight == registry_mode.dmPelsHeight, "Expected surface height %u, got %u.\n", + ok(ddsd.dwHeight == registry_mode.dmPelsHeight, "Expected surface height %lu, got %lu.\n", registry_mode.dmPelsHeight, ddsd.dwHeight);
GetWindowRect(window, &r); @@ -3534,18 +3534,18 @@ static void test_coop_level_mode_set(void) screen_size.cy = 0;
hr = IDirectDrawSurface_IsLost(primary); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); devmode.dmFields = DM_PELSWIDTH | DM_PELSHEIGHT; devmode.dmPelsWidth = param.user32_width; devmode.dmPelsHeight = param.user32_height; change_ret = ChangeDisplaySettingsW(&devmode, CDS_FULLSCREEN); - ok(change_ret == DISP_CHANGE_SUCCESSFUL, "Failed to change display mode, ret %#x.\n", change_ret); + ok(change_ret == DISP_CHANGE_SUCCESSFUL, "Failed to change display mode, ret %#lx.\n", change_ret); hr = IDirectDrawSurface_IsLost(primary); - todo_wine ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#x.\n", hr); + todo_wine ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#lx.\n", hr);
ok(!expect_messages->message, "Expected message %#x, but didn't receive it.\n", expect_messages->message); expect_messages = NULL; - ok(!screen_size.cx && !screen_size.cy, "Got unexpected screen size %ux%u.\n", screen_size.cx, screen_size.cy); + ok(!screen_size.cx && !screen_size.cy, "Got unexpected screen size %lux%lu.\n", screen_size.cx, screen_size.cy);
GetWindowRect(window, &r); ok(EqualRect(&r, ®istry_rect), "Expected %s, got %s.\n", wine_dbgstr_rect(®istry_rect), @@ -3557,27 +3557,27 @@ static void test_coop_level_mode_set(void) screen_size.cy = 0;
hr = IDirectDrawSurface_Restore(primary); - ok(hr == DDERR_WRONGMODE, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_WRONGMODE, "Got unexpected hr %#lx.\n", hr); hr = set_display_mode(ddraw, param.ddraw_width, param.ddraw_height); - ok(SUCCEEDED(hr), "Failed to set display mode, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set display mode, hr %#lx.\n", hr); hr = IDirectDrawSurface_Restore(primary); - ok(hr == DDERR_WRONGMODE, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_WRONGMODE, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface_IsLost(primary); - ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#lx.\n", hr);
ok(!expect_messages->message, "Expected message %#x, but didn't receive it.\n", expect_messages->message); expect_messages = NULL; - ok(!screen_size.cx && !screen_size.cy, "Got unexpected screen size %ux%u.\n", screen_size.cx, screen_size.cy); + ok(!screen_size.cx && !screen_size.cy, "Got unexpected screen size %lux%lu.\n", screen_size.cx, screen_size.cy);
GetWindowRect(window, &r); ok(EqualRect(&r, ®istry_rect), "Expected %s, got %s.\n", wine_dbgstr_rect(®istry_rect), wine_dbgstr_rect(&r));
hr = IDirectDrawSurface_GetSurfaceDesc(primary, &ddsd); - ok(SUCCEEDED(hr), "Failed to get surface desc, hr %#x.\n", hr); - ok(ddsd.dwWidth == registry_mode.dmPelsWidth, "Expected surface width %u, got %u.\n", + ok(SUCCEEDED(hr), "Failed to get surface desc, hr %#lx.\n", hr); + ok(ddsd.dwWidth == registry_mode.dmPelsWidth, "Expected surface width %lu, got %lu.\n", registry_mode.dmPelsWidth, ddsd.dwWidth); - ok(ddsd.dwHeight == registry_mode.dmPelsHeight, "Expected surface height %u, got %u.\n", + ok(ddsd.dwHeight == registry_mode.dmPelsHeight, "Expected surface height %lu, got %lu.\n", registry_mode.dmPelsHeight, ddsd.dwHeight); IDirectDrawSurface_Release(primary);
@@ -3587,12 +3587,12 @@ static void test_coop_level_mode_set(void) ddsd.ddsCaps.dwCaps = DDSCAPS_PRIMARYSURFACE;
hr = IDirectDraw2_CreateSurface(ddraw, &ddsd, &primary, NULL); - ok(SUCCEEDED(hr), "Failed to create surface, hr %#x.\n",hr); + ok(SUCCEEDED(hr), "Failed to create surface, hr %#lx.\n",hr); hr = IDirectDrawSurface_GetSurfaceDesc(primary, &ddsd); - ok(SUCCEEDED(hr), "Failed to get surface desc, hr %#x.\n", hr); - ok(ddsd.dwWidth == param.ddraw_width, "Expected surface width %u, got %u.\n", + ok(SUCCEEDED(hr), "Failed to get surface desc, hr %#lx.\n", hr); + ok(ddsd.dwWidth == param.ddraw_width, "Expected surface width %lu, got %lu.\n", param.ddraw_width, ddsd.dwWidth); - ok(ddsd.dwHeight == param.ddraw_height, "Expected surface height %u, got %u.\n", + ok(ddsd.dwHeight == param.ddraw_height, "Expected surface height %lu, got %lu.\n", param.ddraw_height, ddsd.dwHeight);
GetWindowRect(window, &r); @@ -3605,25 +3605,25 @@ static void test_coop_level_mode_set(void) screen_size.cy = 0;
hr = IDirectDrawSurface_IsLost(primary); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirectDraw2_RestoreDisplayMode(ddraw); - ok(SUCCEEDED(hr), "RestoreDisplayMode failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "RestoreDisplayMode failed, hr %#lx.\n", hr); hr = IDirectDrawSurface_IsLost(primary); - ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#lx.\n", hr);
ok(!expect_messages->message, "Expected message %#x, but didn't receive it.\n", expect_messages->message); expect_messages = NULL; - ok(!screen_size.cx && !screen_size.cy, "Got unexpected screen size %ux%u.\n", screen_size.cx, screen_size.cy); + ok(!screen_size.cx && !screen_size.cy, "Got unexpected screen size %lux%lu.\n", screen_size.cx, screen_size.cy);
GetWindowRect(window, &r); ok(EqualRect(&r, ®istry_rect), "Expected %s, got %s.\n", wine_dbgstr_rect(®istry_rect), wine_dbgstr_rect(&r));
hr = IDirectDrawSurface_GetSurfaceDesc(primary, &ddsd); - ok(SUCCEEDED(hr), "Failed to get surface desc, hr %#x.\n", hr); - ok(ddsd.dwWidth == param.ddraw_width, "Expected surface width %u, got %u.\n", + ok(SUCCEEDED(hr), "Failed to get surface desc, hr %#lx.\n", hr); + ok(ddsd.dwWidth == param.ddraw_width, "Expected surface width %lu, got %lu.\n", param.ddraw_width, ddsd.dwWidth); - ok(ddsd.dwHeight == param.ddraw_height, "Expected surface height %u, got %u.\n", + ok(ddsd.dwHeight == param.ddraw_height, "Expected surface height %lu, got %lu.\n", param.ddraw_height, ddsd.dwHeight); IDirectDrawSurface_Release(primary);
@@ -3631,11 +3631,11 @@ static void test_coop_level_mode_set(void) ok(ret, "Failed to get display mode.\n"); ok(devmode.dmPelsWidth == registry_mode.dmPelsWidth && devmode.dmPelsHeight == registry_mode.dmPelsHeight, - "Expected resolution %ux%u, got %ux%u.\n", + "Expected resolution %lux%lu, got %lux%lu.\n", registry_mode.dmPelsWidth, registry_mode.dmPelsHeight, devmode.dmPelsWidth, devmode.dmPelsHeight); change_ret = ChangeDisplaySettingsW(NULL, CDS_FULLSCREEN); - ok(change_ret == DISP_CHANGE_SUCCESSFUL, "Failed to change display mode, ret %#x.\n", change_ret); + ok(change_ret == DISP_CHANGE_SUCCESSFUL, "Failed to change display mode, ret %#lx.\n", change_ret);
memset(&ddsd, 0, sizeof(ddsd)); ddsd.dwSize = sizeof(ddsd); @@ -3643,12 +3643,12 @@ static void test_coop_level_mode_set(void) ddsd.ddsCaps.dwCaps = DDSCAPS_PRIMARYSURFACE;
hr = IDirectDraw2_CreateSurface(ddraw, &ddsd, &primary, NULL); - ok(SUCCEEDED(hr), "Failed to create surface, hr %#x.\n",hr); + ok(SUCCEEDED(hr), "Failed to create surface, hr %#lx.\n",hr); hr = IDirectDrawSurface_GetSurfaceDesc(primary, &ddsd); - ok(SUCCEEDED(hr), "Failed to get surface desc, hr %#x.\n", hr); - ok(ddsd.dwWidth == registry_mode.dmPelsWidth, "Expected surface width %u, got %u.\n", + ok(SUCCEEDED(hr), "Failed to get surface desc, hr %#lx.\n", hr); + ok(ddsd.dwWidth == registry_mode.dmPelsWidth, "Expected surface width %lu, got %lu.\n", registry_mode.dmPelsWidth, ddsd.dwWidth); - ok(ddsd.dwHeight == registry_mode.dmPelsHeight, "Expected surface height %u, got %u.\n", + ok(ddsd.dwHeight == registry_mode.dmPelsHeight, "Expected surface height %lu, got %lu.\n", registry_mode.dmPelsHeight, ddsd.dwHeight); IDirectDrawSurface_Release(primary);
@@ -3658,9 +3658,9 @@ static void test_coop_level_mode_set(void)
/* Changing the coop level from EXCLUSIVE to NORMAL restores the screen resolution */ hr = IDirectDraw2_SetCooperativeLevel(ddraw, window, DDSCL_EXCLUSIVE | DDSCL_FULLSCREEN); - ok(SUCCEEDED(hr), "SetCooperativeLevel failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "SetCooperativeLevel failed, hr %#lx.\n", hr); hr = set_display_mode(ddraw, param.ddraw_width, param.ddraw_height); - ok(SUCCEEDED(hr), "Failed to set display mode, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set display mode, hr %#lx.\n", hr);
PeekMessageA(&msg, 0, 0, 0, PM_NOREMOVE); expect_messages = exclusive_messages; @@ -3668,13 +3668,13 @@ static void test_coop_level_mode_set(void) screen_size.cy = 0;
hr = IDirectDraw2_SetCooperativeLevel(ddraw, window, DDSCL_NORMAL); - ok(SUCCEEDED(hr), "SetCooperativeLevel failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "SetCooperativeLevel failed, hr %#lx.\n", hr);
ok(!expect_messages->message, "Expected message %#x, but didn't receive it.\n", expect_messages->message); expect_messages = NULL; ok(screen_size.cx == registry_mode.dmPelsWidth && screen_size.cy == registry_mode.dmPelsHeight, - "Expected screen size %ux%u, got %ux%u.\n", + "Expected screen size %lux%lu, got %lux%lu.\n", registry_mode.dmPelsWidth, registry_mode.dmPelsHeight, screen_size.cx, screen_size.cy);
@@ -3688,23 +3688,23 @@ static void test_coop_level_mode_set(void) ddsd.ddsCaps.dwCaps = DDSCAPS_PRIMARYSURFACE;
hr = IDirectDraw2_CreateSurface(ddraw, &ddsd, &primary, NULL); - ok(SUCCEEDED(hr), "Failed to create surface, hr %#x.\n",hr); + ok(SUCCEEDED(hr), "Failed to create surface, hr %#lx.\n",hr); hr = IDirectDrawSurface_GetSurfaceDesc(primary, &ddsd); - ok(SUCCEEDED(hr), "Failed to get surface desc, hr %#x.\n", hr); - ok(ddsd.dwWidth == registry_mode.dmPelsWidth, "Expected surface width %u, got %u.\n", + ok(SUCCEEDED(hr), "Failed to get surface desc, hr %#lx.\n", hr); + ok(ddsd.dwWidth == registry_mode.dmPelsWidth, "Expected surface width %lu, got %lu.\n", registry_mode.dmPelsWidth, ddsd.dwWidth); - ok(ddsd.dwHeight == registry_mode.dmPelsHeight, "Expected surface height %u, got %u.\n", + ok(ddsd.dwHeight == registry_mode.dmPelsHeight, "Expected surface height %lu, got %lu.\n", registry_mode.dmPelsHeight, ddsd.dwHeight); IDirectDrawSurface_Release(primary);
/* The screen restore is a property of DDSCL_EXCLUSIVE */ hr = IDirectDraw2_SetCooperativeLevel(ddraw, window, DDSCL_NORMAL | DDSCL_FULLSCREEN); - ok(SUCCEEDED(hr), "SetCooperativeLevel failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "SetCooperativeLevel failed, hr %#lx.\n", hr); hr = set_display_mode(ddraw, param.ddraw_width, param.ddraw_height); - ok(SUCCEEDED(hr), "Failed to set display mode, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set display mode, hr %#lx.\n", hr);
hr = IDirectDraw2_SetCooperativeLevel(ddraw, window, DDSCL_NORMAL); - ok(SUCCEEDED(hr), "SetCooperativeLevel failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "SetCooperativeLevel failed, hr %#lx.\n", hr);
memset(&ddsd, 0, sizeof(ddsd)); ddsd.dwSize = sizeof(ddsd); @@ -3712,23 +3712,23 @@ static void test_coop_level_mode_set(void) ddsd.ddsCaps.dwCaps = DDSCAPS_PRIMARYSURFACE;
hr = IDirectDraw2_CreateSurface(ddraw, &ddsd, &primary, NULL); - ok(SUCCEEDED(hr), "Failed to create surface, hr %#x.\n",hr); + ok(SUCCEEDED(hr), "Failed to create surface, hr %#lx.\n",hr); hr = IDirectDrawSurface_GetSurfaceDesc(primary, &ddsd); - ok(SUCCEEDED(hr), "Failed to get surface desc, hr %#x.\n", hr); - ok(ddsd.dwWidth == param.ddraw_width, "Expected surface width %u, got %u.\n", + ok(SUCCEEDED(hr), "Failed to get surface desc, hr %#lx.\n", hr); + ok(ddsd.dwWidth == param.ddraw_width, "Expected surface width %lu, got %lu.\n", param.ddraw_width, ddsd.dwWidth); - ok(ddsd.dwHeight == param.ddraw_height, "Expected surface height %u, got %u.\n", + ok(ddsd.dwHeight == param.ddraw_height, "Expected surface height %lu, got %lu.\n", param.ddraw_height, ddsd.dwHeight); IDirectDrawSurface_Release(primary);
hr = IDirectDraw2_RestoreDisplayMode(ddraw); - ok(SUCCEEDED(hr), "RestoreDisplayMode failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "RestoreDisplayMode failed, hr %#lx.\n", hr);
/* If the window is changed at the same time, messages are sent to the new window. */ hr = IDirectDraw2_SetCooperativeLevel(ddraw, window, DDSCL_EXCLUSIVE | DDSCL_FULLSCREEN); - ok(SUCCEEDED(hr), "SetCooperativeLevel failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "SetCooperativeLevel failed, hr %#lx.\n", hr); hr = set_display_mode(ddraw, param.ddraw_width, param.ddraw_height); - ok(SUCCEEDED(hr), "Failed to set display mode, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set display mode, hr %#lx.\n", hr);
PeekMessageA(&msg, 0, 0, 0, PM_NOREMOVE); expect_messages = exclusive_messages; @@ -3738,14 +3738,14 @@ static void test_coop_level_mode_set(void) screen_size2.cy = 0;
hr = IDirectDraw2_SetCooperativeLevel(ddraw, window2, DDSCL_NORMAL); - ok(SUCCEEDED(hr), "SetCooperativeLevel failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "SetCooperativeLevel failed, hr %#lx.\n", hr);
ok(!expect_messages->message, "Expected message %#x, but didn't receive it.\n", expect_messages->message); expect_messages = NULL; - ok(!screen_size.cx && !screen_size.cy, "Got unexpected screen size %ux%u.\n", + ok(!screen_size.cx && !screen_size.cy, "Got unexpected screen size %lux%lu.\n", screen_size.cx, screen_size.cy); ok(screen_size2.cx == registry_mode.dmPelsWidth && screen_size2.cy == registry_mode.dmPelsHeight, - "Expected screen size 2 %ux%u, got %ux%u.\n", + "Expected screen size 2 %lux%lu, got %lux%lu.\n", registry_mode.dmPelsWidth, registry_mode.dmPelsHeight, screen_size2.cx, screen_size2.cy);
GetWindowRect(window, &r); @@ -3761,17 +3761,17 @@ static void test_coop_level_mode_set(void) ddsd.ddsCaps.dwCaps = DDSCAPS_PRIMARYSURFACE;
hr = IDirectDraw2_CreateSurface(ddraw, &ddsd, &primary, NULL); - ok(SUCCEEDED(hr), "Failed to create surface, hr %#x.\n",hr); + ok(SUCCEEDED(hr), "Failed to create surface, hr %#lx.\n",hr); hr = IDirectDrawSurface_GetSurfaceDesc(primary, &ddsd); - ok(SUCCEEDED(hr), "Failed to get surface desc, hr %#x.\n", hr); - ok(ddsd.dwWidth == registry_mode.dmPelsWidth, "Expected surface width %u, got %u.\n", + ok(SUCCEEDED(hr), "Failed to get surface desc, hr %#lx.\n", hr); + ok(ddsd.dwWidth == registry_mode.dmPelsWidth, "Expected surface width %lu, got %lu.\n", registry_mode.dmPelsWidth, ddsd.dwWidth); - ok(ddsd.dwHeight == registry_mode.dmPelsHeight, "Expected surface height %u, got %u.\n", + ok(ddsd.dwHeight == registry_mode.dmPelsHeight, "Expected surface height %lu, got %lu.\n", registry_mode.dmPelsHeight, ddsd.dwHeight); IDirectDrawSurface_Release(primary);
ref = IDirectDraw2_Release(ddraw); - ok(ref == 0, "The ddraw object was not properly freed: refcount %u.\n", ref); + ok(ref == 0, "The ddraw object was not properly freed: refcount %lu.\n", ref);
GetWindowRect(window, &r); ok(EqualRect(&r, &ddraw_rect), "Expected %s, got %s.\n", wine_dbgstr_rect(&ddraw_rect), @@ -3785,36 +3785,36 @@ static void test_coop_level_mode_set(void) devmode.dmPelsWidth = param.user32_width; devmode.dmPelsHeight = param.user32_height; change_ret = ChangeDisplaySettingsW(&devmode, CDS_UPDATEREGISTRY | CDS_NORESET); - ok(change_ret == DISP_CHANGE_SUCCESSFUL, "ChangeDisplaySettingsW failed with %d.\n", change_ret); + ok(change_ret == DISP_CHANGE_SUCCESSFUL, "ChangeDisplaySettingsW failed with %ld.\n", change_ret);
ddraw = create_ddraw(); ok(!!ddraw, "Failed to create a ddraw object.\n"); ref = IDirectDraw2_Release(ddraw); - ok(ref == 0, "The ddraw object was not properly freed: refcount %u.\n", ref); + ok(ref == 0, "The ddraw object was not properly freed: refcount %lu.\n", ref);
memset(&devmode2, 0, sizeof(devmode2)); devmode2.dmSize = sizeof(devmode2); ret = EnumDisplaySettingsW(NULL, ENUM_CURRENT_SETTINGS, &devmode2); - ok(ret, "EnumDisplaySettingsW failed, error %#x.\n", GetLastError()); + ok(ret, "EnumDisplaySettingsW failed, error %#lx.\n", GetLastError()); ok(compare_mode_rect(&devmode2, ®istry_mode), "Got a different mode.\n"); ret = restore_display_modes(original_modes, display_count); ok(ret, "Failed to restore display modes.\n");
/* Test that no mode restorations if no mode changes happened with fullscreen ddraw objects */ change_ret = ChangeDisplaySettingsW(&devmode, CDS_UPDATEREGISTRY | CDS_NORESET); - ok(change_ret == DISP_CHANGE_SUCCESSFUL, "ChangeDisplaySettingsW failed with %d.\n", change_ret); + ok(change_ret == DISP_CHANGE_SUCCESSFUL, "ChangeDisplaySettingsW failed with %ld.\n", change_ret);
ddraw = create_ddraw(); ok(!!ddraw, "Failed to create a ddraw object.\n"); hr = IDirectDraw2_SetCooperativeLevel(ddraw, window, DDSCL_EXCLUSIVE | DDSCL_FULLSCREEN); - ok(hr == DD_OK, "SetCooperativeLevel failed, hr %#x.\n", hr); + ok(hr == DD_OK, "SetCooperativeLevel failed, hr %#lx.\n", hr); hr = IDirectDraw2_SetCooperativeLevel(ddraw, window, DDSCL_NORMAL); - ok(hr == DD_OK, "SetCooperativeLevel failed, hr %#x.\n", hr); + ok(hr == DD_OK, "SetCooperativeLevel failed, hr %#lx.\n", hr); ref = IDirectDraw2_Release(ddraw); - ok(ref == 0, "The ddraw object was not properly freed: refcount %u.\n", ref); + ok(ref == 0, "The ddraw object was not properly freed: refcount %lu.\n", ref);
ret = EnumDisplaySettingsW(NULL, ENUM_CURRENT_SETTINGS, &devmode2); - ok(ret, "EnumDisplaySettingsW failed, error %#x.\n", GetLastError()); + ok(ret, "EnumDisplaySettingsW failed, error %#lx.\n", GetLastError()); ok(compare_mode_rect(&devmode2, ®istry_mode), "Got a different mode.\n"); ret = restore_display_modes(original_modes, display_count); ok(ret, "Failed to restore display modes.\n"); @@ -3824,19 +3824,19 @@ static void test_coop_level_mode_set(void) ddraw = create_ddraw(); ok(!!ddraw, "Failed to create a ddraw object.\n"); hr = set_display_mode(ddraw, registry_mode.dmPelsWidth, registry_mode.dmPelsHeight); - ok(hr == DD_OK, "Failed to set display mode, hr %#x.\n", hr); + ok(hr == DD_OK, "Failed to set display mode, hr %#lx.\n", hr);
change_ret = ChangeDisplaySettingsW(&devmode, CDS_UPDATEREGISTRY | CDS_NORESET); - ok(change_ret == DISP_CHANGE_SUCCESSFUL, "ChangeDisplaySettingsW failed with %d.\n", change_ret); + ok(change_ret == DISP_CHANGE_SUCCESSFUL, "ChangeDisplaySettingsW failed with %ld.\n", change_ret);
ref = IDirectDraw2_Release(ddraw); - ok(ref == 0, "The ddraw object was not properly freed: refcount %u.\n", ref); + ok(ref == 0, "The ddraw object was not properly freed: refcount %lu.\n", ref);
ret = EnumDisplaySettingsW(NULL, ENUM_CURRENT_SETTINGS, &devmode2); - ok(ret, "EnumDisplaySettingsW failed, error %#x.\n", GetLastError()); + ok(ret, "EnumDisplaySettingsW failed, error %#lx.\n", GetLastError()); ok(compare_mode_rect(&devmode2, &devmode), "Got a different mode.\n"); ret = EnumDisplaySettingsW(NULL, ENUM_REGISTRY_SETTINGS, &devmode2); - ok(ret, "EnumDisplaySettingsW failed, error %#x.\n", GetLastError()); + ok(ret, "EnumDisplaySettingsW failed, error %#lx.\n", GetLastError()); ok(compare_mode_rect(&devmode2, &devmode), "Got a different mode.\n"); ret = restore_display_modes(original_modes, display_count); ok(ret, "Failed to restore display modes.\n"); @@ -3845,23 +3845,23 @@ static void test_coop_level_mode_set(void) ddraw = create_ddraw(); ok(!!ddraw, "Failed to create a ddraw object.\n"); hr = set_display_mode(ddraw, param.ddraw_width, param.ddraw_height); - ok(hr == DD_OK, "Failed to set display mode, hr %#x.\n", hr); + ok(hr == DD_OK, "Failed to set display mode, hr %#lx.\n", hr);
change_ret = ChangeDisplaySettingsW(&devmode, CDS_UPDATEREGISTRY | CDS_NORESET); - ok(change_ret == DISP_CHANGE_SUCCESSFUL, "ChangeDisplaySettingsW failed with %d.\n", change_ret); + ok(change_ret == DISP_CHANGE_SUCCESSFUL, "ChangeDisplaySettingsW failed with %ld.\n", change_ret);
hr = IDirectDraw2_RestoreDisplayMode(ddraw); - ok(hr == DD_OK, "RestoreDisplayMode failed, hr %#x.\n", hr); + ok(hr == DD_OK, "RestoreDisplayMode failed, hr %#lx.\n", hr);
ret = EnumDisplaySettingsW(NULL, ENUM_CURRENT_SETTINGS, &devmode2); - ok(ret, "EnumDisplaySettingsW failed, error %#x.\n", GetLastError()); + ok(ret, "EnumDisplaySettingsW failed, error %#lx.\n", GetLastError()); ok(compare_mode_rect(&devmode2, &devmode), "Got a different mode.\n"); ret = EnumDisplaySettingsW(NULL, ENUM_REGISTRY_SETTINGS, &devmode2); - ok(ret, "EnumDisplaySettingsW failed, error %#x.\n", GetLastError()); + ok(ret, "EnumDisplaySettingsW failed, error %#lx.\n", GetLastError()); ok(compare_mode_rect(&devmode2, &devmode), "Got a different mode.\n");
ref = IDirectDraw2_Release(ddraw); - ok(ref == 0, "The ddraw object was not properly freed: refcount %u.\n", ref); + ok(ref == 0, "The ddraw object was not properly freed: refcount %lu.\n", ref);
done: expect_messages = NULL; @@ -3890,10 +3890,10 @@ static void test_coop_level_mode_set_multi(void) memset(&devmode, 0, sizeof(devmode)); devmode.dmSize = sizeof(devmode); ret = EnumDisplaySettingsW(NULL, ENUM_CURRENT_SETTINGS, &devmode); - ok(ret, "EnumDisplaySettingsW failed, error %#x.\n", GetLastError()); + ok(ret, "EnumDisplaySettingsW failed, error %#lx.\n", GetLastError()); ok(compare_mode_rect(&devmode, ®istry_mode), "Got a different mode.\n"); ret = EnumDisplaySettingsW(NULL, ENUM_REGISTRY_SETTINGS, &devmode); - ok(ret, "EnumDisplaySettingsW failed, error %#x.\n", GetLastError()); + ok(ret, "EnumDisplaySettingsW failed, error %#lx.\n", GetLastError()); ok(compare_mode_rect(&devmode, ®istry_mode), "Got a different mode.\n");
ret = save_display_modes(&original_modes, &display_count); @@ -3914,14 +3914,14 @@ static void test_coop_level_mode_set_multi(void) DestroyWindow(window); return; } - ok(SUCCEEDED(hr), "Failed to set display mode, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set display mode, hr %#lx.\n", hr); w = GetSystemMetrics(SM_CXSCREEN); ok(w == 800, "Got unexpected screen width %u.\n", w); h = GetSystemMetrics(SM_CYSCREEN); ok(h == 600, "Got unexpected screen height %u.\n", h);
ref = IDirectDraw2_Release(ddraw1); - ok(ref == 0, "The ddraw object was not properly freed: refcount %u.\n", ref); + ok(ref == 0, "The ddraw object was not properly freed: refcount %lu.\n", ref); w = GetSystemMetrics(SM_CXSCREEN); ok(w == registry_mode.dmPelsWidth, "Got unexpected screen width %u.\n", w); h = GetSystemMetrics(SM_CYSCREEN); @@ -3931,7 +3931,7 @@ static void test_coop_level_mode_set_multi(void) * the initial mode, before the first SetDisplayMode() call. */ ddraw1 = create_ddraw(); hr = set_display_mode(ddraw1, 800, 600); - ok(SUCCEEDED(hr), "Failed to set display mode, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set display mode, hr %#lx.\n", hr); w = GetSystemMetrics(SM_CXSCREEN); ok(w == 800, "Got unexpected screen width %u.\n", w); h = GetSystemMetrics(SM_CYSCREEN); @@ -3939,21 +3939,21 @@ static void test_coop_level_mode_set_multi(void)
ddraw2 = create_ddraw(); hr = set_display_mode(ddraw2, 640, 480); - ok(SUCCEEDED(hr), "Failed to set display mode, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set display mode, hr %#lx.\n", hr); w = GetSystemMetrics(SM_CXSCREEN); ok(w == 640, "Got unexpected screen width %u.\n", w); h = GetSystemMetrics(SM_CYSCREEN); ok(h == 480, "Got unexpected screen height %u.\n", h);
ref = IDirectDraw2_Release(ddraw2); - ok(ref == 0, "The ddraw object was not properly freed: refcount %u.\n", ref); + ok(ref == 0, "The ddraw object was not properly freed: refcount %lu.\n", ref); w = GetSystemMetrics(SM_CXSCREEN); ok(w == registry_mode.dmPelsWidth, "Got unexpected screen width %u.\n", w); h = GetSystemMetrics(SM_CYSCREEN); ok(h == registry_mode.dmPelsHeight, "Got unexpected screen height %u.\n", h);
ref = IDirectDraw2_Release(ddraw1); - ok(ref == 0, "The ddraw object was not properly freed: refcount %u.\n", ref); + ok(ref == 0, "The ddraw object was not properly freed: refcount %lu.\n", ref); w = GetSystemMetrics(SM_CXSCREEN); ok(w == registry_mode.dmPelsWidth, "Got unexpected screen width %u.\n", w); h = GetSystemMetrics(SM_CYSCREEN); @@ -3962,7 +3962,7 @@ static void test_coop_level_mode_set_multi(void) /* Regardless of release ordering. */ ddraw1 = create_ddraw(); hr = set_display_mode(ddraw1, 800, 600); - ok(SUCCEEDED(hr), "Failed to set display mode, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set display mode, hr %#lx.\n", hr); w = GetSystemMetrics(SM_CXSCREEN); ok(w == 800, "Got unexpected screen width %u.\n", w); h = GetSystemMetrics(SM_CYSCREEN); @@ -3970,21 +3970,21 @@ static void test_coop_level_mode_set_multi(void)
ddraw2 = create_ddraw(); hr = set_display_mode(ddraw2, 640, 480); - ok(SUCCEEDED(hr), "Failed to set display mode, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set display mode, hr %#lx.\n", hr); w = GetSystemMetrics(SM_CXSCREEN); ok(w == 640, "Got unexpected screen width %u.\n", w); h = GetSystemMetrics(SM_CYSCREEN); ok(h == 480, "Got unexpected screen height %u.\n", h);
ref = IDirectDraw2_Release(ddraw1); - ok(ref == 0, "The ddraw object was not properly freed: refcount %u.\n", ref); + ok(ref == 0, "The ddraw object was not properly freed: refcount %lu.\n", ref); w = GetSystemMetrics(SM_CXSCREEN); ok(w == registry_mode.dmPelsWidth, "Got unexpected screen width %u.\n", w); h = GetSystemMetrics(SM_CYSCREEN); ok(h == registry_mode.dmPelsHeight, "Got unexpected screen height %u.\n", h);
ref = IDirectDraw2_Release(ddraw2); - ok(ref == 0, "The ddraw object was not properly freed: refcount %u.\n", ref); + ok(ref == 0, "The ddraw object was not properly freed: refcount %lu.\n", ref); w = GetSystemMetrics(SM_CXSCREEN); ok(w == registry_mode.dmPelsWidth, "Got unexpected screen width %u.\n", w); h = GetSystemMetrics(SM_CYSCREEN); @@ -3994,21 +3994,21 @@ static void test_coop_level_mode_set_multi(void) ddraw1 = create_ddraw(); ddraw2 = create_ddraw(); hr = set_display_mode(ddraw2, 640, 480); - ok(SUCCEEDED(hr), "Failed to set display mode, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set display mode, hr %#lx.\n", hr); w = GetSystemMetrics(SM_CXSCREEN); ok(w == 640, "Got unexpected screen width %u.\n", w); h = GetSystemMetrics(SM_CYSCREEN); ok(h == 480, "Got unexpected screen height %u.\n", h);
ref = IDirectDraw2_Release(ddraw1); - ok(ref == 0, "The ddraw object was not properly freed: refcount %u.\n", ref); + ok(ref == 0, "The ddraw object was not properly freed: refcount %lu.\n", ref); w = GetSystemMetrics(SM_CXSCREEN); ok(w == 640, "Got unexpected screen width %u.\n", w); h = GetSystemMetrics(SM_CYSCREEN); ok(h == 480, "Got unexpected screen height %u.\n", h);
ref = IDirectDraw2_Release(ddraw2); - ok(ref == 0, "The ddraw object was not properly freed: refcount %u.\n", ref); + ok(ref == 0, "The ddraw object was not properly freed: refcount %lu.\n", ref); w = GetSystemMetrics(SM_CXSCREEN); ok(w == registry_mode.dmPelsWidth, "Got unexpected screen width %u.\n", w); h = GetSystemMetrics(SM_CYSCREEN); @@ -4018,7 +4018,7 @@ static void test_coop_level_mode_set_multi(void) * restoring the display mode. */ ddraw1 = create_ddraw(); hr = set_display_mode(ddraw1, 800, 600); - ok(SUCCEEDED(hr), "Failed to set display mode, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set display mode, hr %#lx.\n", hr); w = GetSystemMetrics(SM_CXSCREEN); ok(w == 800, "Got unexpected screen width %u.\n", w); h = GetSystemMetrics(SM_CYSCREEN); @@ -4026,24 +4026,24 @@ static void test_coop_level_mode_set_multi(void)
ddraw2 = create_ddraw(); hr = set_display_mode(ddraw2, 640, 480); - ok(SUCCEEDED(hr), "Failed to set display mode, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set display mode, hr %#lx.\n", hr); w = GetSystemMetrics(SM_CXSCREEN); ok(w == 640, "Got unexpected screen width %u.\n", w); h = GetSystemMetrics(SM_CYSCREEN); ok(h == 480, "Got unexpected screen height %u.\n", h);
hr = IDirectDraw2_SetCooperativeLevel(ddraw2, window, DDSCL_EXCLUSIVE | DDSCL_FULLSCREEN); - ok(SUCCEEDED(hr), "SetCooperativeLevel failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "SetCooperativeLevel failed, hr %#lx.\n", hr);
ref = IDirectDraw2_Release(ddraw1); - ok(ref == 0, "The ddraw object was not properly freed: refcount %u.\n", ref); + ok(ref == 0, "The ddraw object was not properly freed: refcount %lu.\n", ref); w = GetSystemMetrics(SM_CXSCREEN); ok(w == 640, "Got unexpected screen width %u.\n", w); h = GetSystemMetrics(SM_CYSCREEN); ok(h == 480, "Got unexpected screen height %u.\n", h);
ref = IDirectDraw2_Release(ddraw2); - ok(ref == 0, "The ddraw object was not properly freed: refcount %u.\n", ref); + ok(ref == 0, "The ddraw object was not properly freed: refcount %lu.\n", ref); w = GetSystemMetrics(SM_CXSCREEN); ok(w == registry_mode.dmPelsWidth, "Got unexpected screen width %u.\n", w); h = GetSystemMetrics(SM_CYSCREEN); @@ -4052,28 +4052,28 @@ static void test_coop_level_mode_set_multi(void) /* Exclusive mode blocks mode setting on other ddraw objects in general. */ ddraw1 = create_ddraw(); hr = set_display_mode(ddraw1, 800, 600); - ok(SUCCEEDED(hr), "Failed to set display mode, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set display mode, hr %#lx.\n", hr); w = GetSystemMetrics(SM_CXSCREEN); ok(w == 800, "Got unexpected screen width %u.\n", w); h = GetSystemMetrics(SM_CYSCREEN); ok(h == 600, "Got unexpected screen height %u.\n", h);
hr = IDirectDraw2_SetCooperativeLevel(ddraw1, window, DDSCL_EXCLUSIVE | DDSCL_FULLSCREEN); - ok(SUCCEEDED(hr), "SetCooperativeLevel failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "SetCooperativeLevel failed, hr %#lx.\n", hr);
ddraw2 = create_ddraw(); hr = set_display_mode(ddraw2, 640, 480); - ok(hr == DDERR_NOEXCLUSIVEMODE, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_NOEXCLUSIVEMODE, "Got unexpected hr %#lx.\n", hr);
ref = IDirectDraw2_Release(ddraw1); - ok(ref == 0, "The ddraw object was not properly freed: refcount %u.\n", ref); + ok(ref == 0, "The ddraw object was not properly freed: refcount %lu.\n", ref); w = GetSystemMetrics(SM_CXSCREEN); ok(w == registry_mode.dmPelsWidth, "Got unexpected screen width %u.\n", w); h = GetSystemMetrics(SM_CYSCREEN); ok(h == registry_mode.dmPelsHeight, "Got unexpected screen height %u.\n", h);
ref = IDirectDraw2_Release(ddraw2); - ok(ref == 0, "The ddraw object was not properly freed: refcount %u.\n", ref); + ok(ref == 0, "The ddraw object was not properly freed: refcount %lu.\n", ref); w = GetSystemMetrics(SM_CXSCREEN); ok(w == registry_mode.dmPelsWidth, "Got unexpected screen width %u.\n", w); h = GetSystemMetrics(SM_CYSCREEN); @@ -4101,7 +4101,7 @@ static void test_coop_level_mode_set_multi(void) memset(&old_devmode, 0, sizeof(old_devmode)); old_devmode.dmSize = sizeof(old_devmode); ret = EnumDisplaySettingsW(second_monitor_name, ENUM_CURRENT_SETTINGS, &old_devmode); - ok(ret, "EnumDisplaySettingsW failed, error %#x.\n", GetLastError()); + ok(ret, "EnumDisplaySettingsW failed, error %#lx.\n", GetLastError());
devmode = old_devmode; while (EnumDisplaySettingsW(second_monitor_name, mode_idx++, &devmode)) @@ -4118,32 +4118,32 @@ static void test_coop_level_mode_set_multi(void) ddraw1 = create_ddraw(); ok(!!ddraw1, "Failed to create a ddraw object.\n"); hr = IDirectDraw2_SetCooperativeLevel(ddraw1, window, DDSCL_EXCLUSIVE | DDSCL_FULLSCREEN); - ok(hr == DD_OK, "SetCooperativeLevel failed, hr %#x.\n", hr); + ok(hr == DD_OK, "SetCooperativeLevel failed, hr %#lx.\n", hr);
change_ret = ChangeDisplaySettingsExW(second_monitor_name, &devmode, NULL, CDS_RESET, NULL); - ok(change_ret == DISP_CHANGE_SUCCESSFUL, "ChangeDisplaySettingsExW failed with %d.\n", change_ret); + ok(change_ret == DISP_CHANGE_SUCCESSFUL, "ChangeDisplaySettingsExW failed with %ld.\n", change_ret);
memset(&devmode2, 0, sizeof(devmode2)); devmode2.dmSize = sizeof(devmode2); ret = EnumDisplaySettingsW(second_monitor_name, ENUM_CURRENT_SETTINGS, &devmode2); - ok(ret, "EnumDisplaySettingsW failed, error %#x.\n", GetLastError()); + ok(ret, "EnumDisplaySettingsW failed, error %#lx.\n", GetLastError()); if (compare_mode_rect(&devmode2, &old_devmode)) { skip("Failed to change display settings of the second monitor.\n"); ref = IDirectDraw2_Release(ddraw1); - ok(ref == 0, "The ddraw object was not properly freed: refcount %u.\n", ref); + ok(ref == 0, "The ddraw object was not properly freed: refcount %lu.\n", ref); goto done; }
hr = IDirectDraw2_SetCooperativeLevel(ddraw1, window, DDSCL_NORMAL); - ok(hr == DD_OK, "SetCooperativeLevel failed, hr %#x.\n", hr); + ok(hr == DD_OK, "SetCooperativeLevel failed, hr %#lx.\n", hr); ref = IDirectDraw2_Release(ddraw1); - ok(ref == 0, "The ddraw object was not properly freed: refcount %u.\n", ref); + ok(ref == 0, "The ddraw object was not properly freed: refcount %lu.\n", ref);
memset(&devmode3, 0, sizeof(devmode3)); devmode3.dmSize = sizeof(devmode3); ret = EnumDisplaySettingsW(second_monitor_name, ENUM_CURRENT_SETTINGS, &devmode3); - ok(ret, "EnumDisplaySettingsW failed, error %#x.\n", GetLastError()); + ok(ret, "EnumDisplaySettingsW failed, error %#lx.\n", GetLastError()); ok(compare_mode_rect(&devmode3, &devmode2), "Got a different mode.\n"); ret = restore_display_modes(original_modes, display_count); ok(ret, "Failed to restore display modes.\n"); @@ -4153,19 +4153,19 @@ static void test_coop_level_mode_set_multi(void) ddraw1 = create_ddraw(); ok(!!ddraw1, "Failed to create a ddraw object.\n"); hr = set_display_mode(ddraw1, 800, 600); - ok(hr == DD_OK, "Failed to set display mode, hr %#x.\n", hr); + ok(hr == DD_OK, "Failed to set display mode, hr %#lx.\n", hr);
change_ret = ChangeDisplaySettingsExW(second_monitor_name, &devmode, NULL, CDS_RESET, NULL); - ok(change_ret == DISP_CHANGE_SUCCESSFUL, "ChangeDisplaySettingsExW failed with %d.\n", change_ret); + ok(change_ret == DISP_CHANGE_SUCCESSFUL, "ChangeDisplaySettingsExW failed with %ld.\n", change_ret);
ref = IDirectDraw2_Release(ddraw1); - ok(ref == 0, "The ddraw object was not properly freed: refcount %u.\n", ref); + ok(ref == 0, "The ddraw object was not properly freed: refcount %lu.\n", ref);
ret = EnumDisplaySettingsW(second_monitor_name, ENUM_CURRENT_SETTINGS, &devmode2); - ok(ret, "EnumDisplaySettingsW failed, error %#x.\n", GetLastError()); + ok(ret, "EnumDisplaySettingsW failed, error %#lx.\n", GetLastError()); ok(compare_mode_rect(&devmode2, &old_devmode), "Got a different mode.\n"); ret = EnumDisplaySettingsW(second_monitor_name, ENUM_REGISTRY_SETTINGS, &devmode2); - ok(ret, "EnumDisplaySettingsW failed, error %#x.\n", GetLastError()); + ok(ret, "EnumDisplaySettingsW failed, error %#lx.\n", GetLastError()); ok(compare_mode_rect(&devmode2, &old_devmode), "Got a different mode.\n"); ret = restore_display_modes(original_modes, display_count); ok(ret, "Failed to restore display modes.\n"); @@ -4174,23 +4174,23 @@ static void test_coop_level_mode_set_multi(void) ddraw1 = create_ddraw(); ok(!!ddraw1, "Failed to create a ddraw object.\n"); hr = set_display_mode(ddraw1, 800, 600); - ok(hr == DD_OK, "Failed to set display mode, hr %#x.\n", hr); + ok(hr == DD_OK, "Failed to set display mode, hr %#lx.\n", hr);
change_ret = ChangeDisplaySettingsExW(second_monitor_name, &devmode, NULL, CDS_RESET, NULL); - ok(change_ret == DISP_CHANGE_SUCCESSFUL, "ChangeDisplaySettingsExW failed with %d.\n", change_ret); + ok(change_ret == DISP_CHANGE_SUCCESSFUL, "ChangeDisplaySettingsExW failed with %ld.\n", change_ret);
hr = IDirectDraw2_RestoreDisplayMode(ddraw1); - ok(hr == DD_OK, "RestoreDisplayMode failed, hr %#x.\n", hr); + ok(hr == DD_OK, "RestoreDisplayMode failed, hr %#lx.\n", hr);
ret = EnumDisplaySettingsW(second_monitor_name, ENUM_CURRENT_SETTINGS, &devmode2); - ok(ret, "EnumDisplaySettingsW failed, error %#x.\n", GetLastError()); + ok(ret, "EnumDisplaySettingsW failed, error %#lx.\n", GetLastError()); ok(compare_mode_rect(&devmode2, &old_devmode), "Got a different mode.\n"); ret = EnumDisplaySettingsW(second_monitor_name, ENUM_REGISTRY_SETTINGS, &devmode2); - ok(ret, "EnumDisplaySettingsW failed, error %#x.\n", GetLastError()); + ok(ret, "EnumDisplaySettingsW failed, error %#lx.\n", GetLastError()); ok(compare_mode_rect(&devmode2, &old_devmode), "Got a different mode.\n");
ref = IDirectDraw2_Release(ddraw1); - ok(ref == 0, "The ddraw object was not properly freed: refcount %u.\n", ref); + ok(ref == 0, "The ddraw object was not properly freed: refcount %lu.\n", ref); ret = restore_display_modes(original_modes, display_count); ok(ret, "Failed to restore display modes.\n");
@@ -4198,24 +4198,24 @@ static void test_coop_level_mode_set_multi(void) ddraw1 = create_ddraw(); ok(!!ddraw1, "Failed to create a ddraw object.\n"); hr = set_display_mode(ddraw1, 800, 600); - ok(hr == DD_OK, "Failed to set display mode, hr %#x.\n", hr); + ok(hr == DD_OK, "Failed to set display mode, hr %#lx.\n", hr);
change_ret = ChangeDisplaySettingsExW(second_monitor_name, &devmode, NULL, CDS_UPDATEREGISTRY | CDS_NORESET, NULL); - ok(change_ret == DISP_CHANGE_SUCCESSFUL, "ChangeDisplaySettingsExW failed with %d.\n", change_ret); + ok(change_ret == DISP_CHANGE_SUCCESSFUL, "ChangeDisplaySettingsExW failed with %ld.\n", change_ret);
ref = IDirectDraw2_Release(ddraw1); - ok(ref == 0, "The ddraw object was not properly freed: refcount %u.\n", ref); + ok(ref == 0, "The ddraw object was not properly freed: refcount %lu.\n", ref);
ret = EnumDisplaySettingsW(second_monitor_name, ENUM_CURRENT_SETTINGS, &devmode2); - ok(ret, "EnumDisplaySettingsW failed, error %#x.\n", GetLastError()); + ok(ret, "EnumDisplaySettingsW failed, error %#lx.\n", GetLastError()); ok(devmode2.dmPelsWidth == devmode.dmPelsWidth && devmode2.dmPelsHeight == devmode.dmPelsHeight, - "Expected resolution %ux%u, got %ux%u.\n", devmode.dmPelsWidth, devmode.dmPelsHeight, + "Expected resolution %lux%lu, got %lux%lu.\n", devmode.dmPelsWidth, devmode.dmPelsHeight, devmode2.dmPelsWidth, devmode2.dmPelsHeight); ret = EnumDisplaySettingsW(second_monitor_name, ENUM_REGISTRY_SETTINGS, &devmode2); - ok(ret, "EnumDisplaySettingsW failed, error %#x.\n", GetLastError()); + ok(ret, "EnumDisplaySettingsW failed, error %#lx.\n", GetLastError()); ok(devmode2.dmPelsWidth == devmode.dmPelsWidth && devmode2.dmPelsHeight == devmode.dmPelsHeight, - "Expected resolution %ux%u, got %ux%u.\n", devmode.dmPelsWidth, devmode.dmPelsHeight, + "Expected resolution %lux%lu, got %lux%lu.\n", devmode.dmPelsWidth, devmode.dmPelsHeight, devmode2.dmPelsWidth, devmode2.dmPelsHeight); ret = restore_display_modes(original_modes, display_count); ok(ret, "Failed to restore display modes.\n"); @@ -4227,27 +4227,27 @@ static void test_coop_level_mode_set_multi(void) ddraw2 = create_ddraw(); ok(!!ddraw2, "Failed to create a ddraw object.\n"); hr = set_display_mode(ddraw1, 800, 600); - ok(hr == DD_OK, "Failed to set display mode, hr %#x.\n", hr); + ok(hr == DD_OK, "Failed to set display mode, hr %#lx.\n", hr); hr = set_display_mode(ddraw2, 640, 480); - ok(hr == DD_OK, "Failed to set display mode, hr %#x.\n", hr); + ok(hr == DD_OK, "Failed to set display mode, hr %#lx.\n", hr);
change_ret = ChangeDisplaySettingsExW(second_monitor_name, &devmode, NULL, CDS_RESET, NULL); - ok(change_ret == DISP_CHANGE_SUCCESSFUL, "ChangeDisplaySettingsExW failed with %d.\n", change_ret); + ok(change_ret == DISP_CHANGE_SUCCESSFUL, "ChangeDisplaySettingsExW failed with %ld.\n", change_ret);
hr = IDirectDraw2_RestoreDisplayMode(ddraw2); - ok(hr == DD_OK, "RestoreDisplayMode failed, hr %#x.\n", hr); + ok(hr == DD_OK, "RestoreDisplayMode failed, hr %#lx.\n", hr);
ret = EnumDisplaySettingsW(second_monitor_name, ENUM_CURRENT_SETTINGS, &devmode2); - ok(ret, "EnumDisplaySettingsW failed, error %#x.\n", GetLastError()); + ok(ret, "EnumDisplaySettingsW failed, error %#lx.\n", GetLastError()); ok(compare_mode_rect(&devmode2, &old_devmode), "Got a different mode.\n"); ret = EnumDisplaySettingsW(second_monitor_name, ENUM_REGISTRY_SETTINGS, &devmode2); - ok(ret, "EnumDisplaySettingsW failed, error %#x.\n", GetLastError()); + ok(ret, "EnumDisplaySettingsW failed, error %#lx.\n", GetLastError()); ok(compare_mode_rect(&devmode2, &old_devmode), "Got a different mode.\n");
ref = IDirectDraw2_Release(ddraw2); - ok(ref == 0, "The ddraw object was not properly freed: refcount %u.\n", ref); + ok(ref == 0, "The ddraw object was not properly freed: refcount %lu.\n", ref); ref = IDirectDraw2_Release(ddraw1); - ok(ref == 0, "The ddraw object was not properly freed: refcount %u.\n", ref); + ok(ref == 0, "The ddraw object was not properly freed: refcount %lu.\n", ref); ret = restore_display_modes(original_modes, display_count); ok(ret, "Failed to restore display modes.\n");
@@ -4258,25 +4258,25 @@ static void test_coop_level_mode_set_multi(void) ddraw2 = create_ddraw(); ok(!!ddraw2, "Failed to create a ddraw object.\n"); hr = set_display_mode(ddraw1, 800, 600); - ok(hr == DD_OK, "Failed to set display mode, hr %#x.\n", hr); + ok(hr == DD_OK, "Failed to set display mode, hr %#lx.\n", hr); hr = set_display_mode(ddraw2, 640, 480); - ok(hr == DD_OK, "Failed to set display mode, hr %#x.\n", hr); + ok(hr == DD_OK, "Failed to set display mode, hr %#lx.\n", hr);
change_ret = ChangeDisplaySettingsExW(second_monitor_name, &devmode, NULL, CDS_RESET, NULL); - ok(change_ret == DISP_CHANGE_SUCCESSFUL, "ChangeDisplaySettingsExW failed with %d.\n", change_ret); + ok(change_ret == DISP_CHANGE_SUCCESSFUL, "ChangeDisplaySettingsExW failed with %ld.\n", change_ret);
ref = IDirectDraw2_Release(ddraw2); - ok(ref == 0, "The ddraw object was not properly freed: refcount %u.\n", ref); + ok(ref == 0, "The ddraw object was not properly freed: refcount %lu.\n", ref);
ret = EnumDisplaySettingsW(second_monitor_name, ENUM_CURRENT_SETTINGS, &devmode2); - ok(ret, "EnumDisplaySettingsW failed, error %#x.\n", GetLastError()); + ok(ret, "EnumDisplaySettingsW failed, error %#lx.\n", GetLastError()); ok(compare_mode_rect(&devmode2, &old_devmode), "Got a different mode.\n"); ret = EnumDisplaySettingsW(second_monitor_name, ENUM_REGISTRY_SETTINGS, &devmode2); - ok(ret, "EnumDisplaySettingsW failed, error %#x.\n", GetLastError()); + ok(ret, "EnumDisplaySettingsW failed, error %#lx.\n", GetLastError()); ok(compare_mode_rect(&devmode2, &old_devmode), "Got a different mode.\n");
ref = IDirectDraw2_Release(ddraw1); - ok(ref == 0, "The ddraw object was not properly freed: refcount %u.\n", ref); + ok(ref == 0, "The ddraw object was not properly freed: refcount %lu.\n", ref);
done: DestroyWindow(window); @@ -4294,16 +4294,16 @@ static void test_initialize(void) ok(!!ddraw, "Failed to create a ddraw object.\n");
hr = IDirectDraw2_Initialize(ddraw, NULL); - ok(hr == DDERR_ALREADYINITIALIZED, "Initialize returned hr %#x.\n", hr); + ok(hr == DDERR_ALREADYINITIALIZED, "Initialize returned hr %#lx.\n", hr); IDirectDraw2_Release(ddraw);
CoInitialize(NULL); hr = CoCreateInstance(&CLSID_DirectDraw, NULL, CLSCTX_INPROC_SERVER, &IID_IDirectDraw2, (void **)&ddraw); - ok(SUCCEEDED(hr), "Failed to create IDirectDraw2 instance, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create IDirectDraw2 instance, hr %#lx.\n", hr); hr = IDirectDraw2_Initialize(ddraw, NULL); - ok(hr == DD_OK, "Initialize returned hr %#x, expected DD_OK.\n", hr); + ok(hr == DD_OK, "Initialize returned hr %#lx, expected DD_OK.\n", hr); hr = IDirectDraw2_Initialize(ddraw, NULL); - ok(hr == DDERR_ALREADYINITIALIZED, "Initialize returned hr %#x, expected DDERR_ALREADYINITIALIZED.\n", hr); + ok(hr == DDERR_ALREADYINITIALIZED, "Initialize returned hr %#lx, expected DDERR_ALREADYINITIALIZED.\n", hr); IDirectDraw2_Release(ddraw); CoUninitialize(); } @@ -4324,20 +4324,20 @@ static void test_coop_level_surf_create(void) ddsd.ddsCaps.dwCaps = DDSCAPS_PRIMARYSURFACE; surface = (void *)0xdeadbeef; hr = IDirectDraw2_CreateSurface(ddraw, &ddsd, &surface, NULL); - ok(hr == DDERR_NOCOOPERATIVELEVELSET, "Surface creation returned hr %#x.\n", hr); + ok(hr == DDERR_NOCOOPERATIVELEVELSET, "Surface creation returned hr %#lx.\n", hr); ok(surface == (void *)0xdeadbeef, "Got unexpected surface %p.\n", surface);
surface = (void *)0xdeadbeef; hr = IDirectDraw2_CreateSurface(ddraw, NULL, &surface, NULL); - ok(hr == DDERR_NOCOOPERATIVELEVELSET, "Surface creation returned hr %#x.\n", hr); + ok(hr == DDERR_NOCOOPERATIVELEVELSET, "Surface creation returned hr %#lx.\n", hr); ok(surface == (void *)0xdeadbeef, "Got unexpected surface %p.\n", surface);
hr = IDirectDraw2_SetCooperativeLevel(ddraw, NULL, DDSCL_NORMAL); - ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#lx.\n", hr);
surface = (void *)0xdeadbeef; hr = IDirectDraw2_CreateSurface(ddraw, NULL, &surface, NULL); - ok(hr == DDERR_INVALIDPARAMS, "Unexpected hr %#x.\n", hr); + ok(hr == DDERR_INVALIDPARAMS, "Unexpected hr %#lx.\n", hr); ok(surface == (void *)0xdeadbeef, "Got unexpected surface %p.\n", surface);
IDirectDraw2_Release(ddraw); @@ -4355,9 +4355,9 @@ static void test_coop_level_multi_window(void) ok(!!ddraw, "Failed to create a ddraw object.\n");
hr = IDirectDraw2_SetCooperativeLevel(ddraw, window1, DDSCL_NORMAL); - ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#lx.\n", hr); hr = IDirectDraw2_SetCooperativeLevel(ddraw, window2, DDSCL_NORMAL); - ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#lx.\n", hr); ok(IsWindow(window1), "Window 1 was destroyed.\n"); ok(IsWindow(window2), "Window 2 was destroyed.\n");
@@ -4390,7 +4390,7 @@ static void test_clear_rect_count(void) }
hr = IDirect3DDevice2_GetRenderTarget(device, &rt); - ok(SUCCEEDED(hr), "Failed to get render target, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get render target, hr %#lx.\n", hr);
white = create_diffuse_material(device, 1.0f, 1.0f, 1.0f, 1.0f); red = create_diffuse_material(device, 1.0f, 0.0f, 0.0f, 1.0f); @@ -4399,24 +4399,24 @@ static void test_clear_rect_count(void)
viewport = create_viewport(device, 0, 0, 640, 480); hr = IDirect3DDevice2_SetCurrentViewport(device, viewport); - ok(SUCCEEDED(hr), "Failed to set current viewport, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set current viewport, hr %#lx.\n", hr);
viewport_set_background(device, viewport, white); hr = IDirect3DViewport2_Clear(viewport, 1, &clear_rect, D3DCLEAR_TARGET); - ok(SUCCEEDED(hr), "Failed to clear viewport, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to clear viewport, hr %#lx.\n", hr); viewport_set_background(device, viewport, red); hr = IDirect3DViewport2_Clear(viewport, 0, &clear_rect, D3DCLEAR_TARGET); - ok(SUCCEEDED(hr), "Failed to clear viewport, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to clear viewport, hr %#lx.\n", hr); viewport_set_background(device, viewport, green); hr = IDirect3DViewport2_Clear(viewport, 0, NULL, D3DCLEAR_TARGET); - ok(SUCCEEDED(hr), "Failed to clear viewport, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to clear viewport, hr %#lx.\n", hr); viewport_set_background(device, viewport, blue); hr = IDirect3DViewport2_Clear(viewport, 0, &clear_rect, D3DCLEAR_TARGET); - ok(SUCCEEDED(hr), "Failed to clear viewport, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to clear viewport, hr %#lx.\n", hr);
color = get_surface_color(rt, 320, 240); ok(compare_color(color, 0x00ffffff, 1) || broken(compare_color(color, 0x000000ff, 1)), - "Got unexpected color 0x%08x.\n", color); + "Got unexpected color 0x%08lx.\n", color);
IDirectDrawSurface_Release(rt); destroy_viewport(device, viewport); @@ -4437,21 +4437,21 @@ static BOOL test_mode_restored(IDirectDraw2 *ddraw, HWND window) memset(&ddsd1, 0, sizeof(ddsd1)); ddsd1.dwSize = sizeof(ddsd1); hr = IDirectDraw2_GetDisplayMode(ddraw, &ddsd1); - ok(SUCCEEDED(hr), "GetDisplayMode failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "GetDisplayMode failed, hr %#lx.\n", hr);
hr = IDirectDraw2_SetCooperativeLevel(ddraw, window, DDSCL_EXCLUSIVE | DDSCL_FULLSCREEN); - ok(SUCCEEDED(hr), "SetCooperativeLevel failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "SetCooperativeLevel failed, hr %#lx.\n", hr); hr = set_display_mode(ddraw, 640, 480); - ok(SUCCEEDED(hr), "Failed to set display mode, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set display mode, hr %#lx.\n", hr); hr = IDirectDraw2_SetCooperativeLevel(ddraw, window, DDSCL_NORMAL); - ok(SUCCEEDED(hr), "SetCooperativeLevel failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "SetCooperativeLevel failed, hr %#lx.\n", hr);
memset(&ddsd2, 0, sizeof(ddsd2)); ddsd2.dwSize = sizeof(ddsd2); hr = IDirectDraw2_GetDisplayMode(ddraw, &ddsd2); - ok(SUCCEEDED(hr), "GetDisplayMode failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "GetDisplayMode failed, hr %#lx.\n", hr); hr = IDirectDraw2_RestoreDisplayMode(ddraw); - ok(SUCCEEDED(hr), "RestoreDisplayMode failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "RestoreDisplayMode failed, hr %#lx.\n", hr);
return ddsd1.dwWidth == ddsd2.dwWidth && ddsd1.dwHeight == ddsd2.dwHeight; } @@ -4475,16 +4475,16 @@ static void test_coop_level_versions(void)
/* A failing ddraw1::SetCooperativeLevel call does not have an effect */ hr = IDirectDraw2_QueryInterface(ddraw2, &IID_IDirectDraw, (void **)&ddraw); - ok(SUCCEEDED(hr), "QueryInterface failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "QueryInterface failed, hr %#lx.\n", hr);
hr = IDirectDraw_SetCooperativeLevel(ddraw, NULL, DDSCL_FULLSCREEN | DDSCL_EXCLUSIVE); - ok(FAILED(hr), "SetCooperativeLevel returned %#x, expected failure.\n", hr); + ok(FAILED(hr), "SetCooperativeLevel returned %#lx, expected failure.\n", hr); restored = test_mode_restored(ddraw2, window); ok(restored, "Display mode not restored after bad ddraw1::SetCooperativeLevel call\n");
/* A successful one does */ hr = IDirectDraw_SetCooperativeLevel(ddraw, NULL, DDSCL_NORMAL); - ok(SUCCEEDED(hr), "SetCooperativeLevel failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "SetCooperativeLevel failed, hr %#lx.\n", hr); restored = test_mode_restored(ddraw2, window); ok(!restored, "Display mode restored after good ddraw1::SetCooperativeLevel call\n");
@@ -4494,10 +4494,10 @@ static void test_coop_level_versions(void) ddraw2 = create_ddraw(); ok(!!ddraw2, "Failed to create a ddraw object.\n"); hr = IDirectDraw2_QueryInterface(ddraw2, &IID_IDirectDraw, (void **)&ddraw); - ok(SUCCEEDED(hr), "QueryInterface failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "QueryInterface failed, hr %#lx.\n", hr);
hr = IDirectDraw_SetCooperativeLevel(ddraw, window, DDSCL_SETFOCUSWINDOW); - ok(SUCCEEDED(hr), "SetCooperativeLevel failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "SetCooperativeLevel failed, hr %#lx.\n", hr); restored = test_mode_restored(ddraw2, window); ok(!restored, "Display mode restored after ddraw1::SetCooperativeLevel(SETFOCUSWINDOW) call\n");
@@ -4508,12 +4508,12 @@ static void test_coop_level_versions(void) ddraw2 = create_ddraw(); ok(!!ddraw2, "Failed to create a ddraw object.\n"); hr = IDirectDraw2_QueryInterface(ddraw2, &IID_IDirectDraw, (void **)&ddraw); - ok(SUCCEEDED(hr), "QueryInterface failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "QueryInterface failed, hr %#lx.\n", hr);
hr = IDirectDraw_SetCooperativeLevel(ddraw, NULL, DDSCL_NORMAL); - ok(SUCCEEDED(hr), "SetCooperativeLevel failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "SetCooperativeLevel failed, hr %#lx.\n", hr); hr = IDirectDraw_SetCooperativeLevel(ddraw, NULL, DDSCL_FULLSCREEN | DDSCL_EXCLUSIVE); - ok(FAILED(hr), "SetCooperativeLevel returned %#x, expected failure.\n", hr); + ok(FAILED(hr), "SetCooperativeLevel returned %#lx, expected failure.\n", hr); restored = test_mode_restored(ddraw2, window); ok(!restored, "Display mode restored after good-bad ddraw1::SetCooperativeLevel() call sequence\n");
@@ -4524,14 +4524,14 @@ static void test_coop_level_versions(void) ddraw2 = create_ddraw(); ok(!!ddraw2, "Failed to create a ddraw object.\n"); hr = IDirectDraw2_QueryInterface(ddraw2, &IID_IDirectDraw, (void **)&ddraw); - ok(SUCCEEDED(hr), "QueryInterface failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "QueryInterface failed, hr %#lx.\n", hr);
hr = IDirectDraw_SetCooperativeLevel(ddraw, NULL, DDSCL_NORMAL); - ok(SUCCEEDED(hr), "SetCooperativeLevel failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "SetCooperativeLevel failed, hr %#lx.\n", hr); hr = IDirectDraw2_SetCooperativeLevel(ddraw2, window, DDSCL_FULLSCREEN | DDSCL_EXCLUSIVE); - ok(SUCCEEDED(hr), "SetCooperativeLevel failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "SetCooperativeLevel failed, hr %#lx.\n", hr); hr = IDirectDraw2_SetCooperativeLevel(ddraw2, window, DDSCL_NORMAL); - ok(SUCCEEDED(hr), "SetCooperativeLevel failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "SetCooperativeLevel failed, hr %#lx.\n", hr);
restored = test_mode_restored(ddraw2, window); ok(!restored, "Display mode restored after ddraw1-ddraw2 SetCooperativeLevel() call sequence\n"); @@ -4542,10 +4542,10 @@ static void test_coop_level_versions(void) ddraw2 = create_ddraw(); ok(!!ddraw2, "Failed to create a ddraw object.\n"); hr = IDirectDraw2_QueryInterface(ddraw2, &IID_IDirectDraw, (void **)&ddraw); - ok(SUCCEEDED(hr), "QueryInterface failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "QueryInterface failed, hr %#lx.\n", hr);
hr = IDirectDraw2_SetCooperativeLevel(ddraw2, window, DDSCL_NORMAL); - ok(SUCCEEDED(hr), "SetCooperativeLevel failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "SetCooperativeLevel failed, hr %#lx.\n", hr);
memset(&ddsd, 0, sizeof(ddsd)); ddsd.dwSize = sizeof(ddsd); @@ -4553,7 +4553,7 @@ static void test_coop_level_versions(void) ddsd.ddsCaps.dwCaps = DDSCAPS_OFFSCREENPLAIN; ddsd.dwWidth = ddsd.dwHeight = 8; hr = IDirectDraw_CreateSurface(ddraw, &ddsd, &surface, NULL); - ok(SUCCEEDED(hr), "CreateSurface failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "CreateSurface failed, hr %#lx.\n", hr); IDirectDrawSurface_Release(surface); restored = test_mode_restored(ddraw2, window); ok(restored, "Display mode not restored after ddraw1::CreateSurface() call\n"); @@ -4652,49 +4652,49 @@ static void test_lighting_interface_versions(void) }
hr = IDirect3DDevice2_GetRenderTarget(device, &rt); - ok(SUCCEEDED(hr), "Failed to get render target, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get render target, hr %#lx.\n", hr);
viewport = create_viewport(device, 0, 0, 640, 480); hr = IDirect3DDevice2_SetCurrentViewport(device, viewport); - ok(SUCCEEDED(hr), "Failed to set current viewport, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set current viewport, hr %#lx.\n", hr);
emissive = create_emissive_material(device, 0.0f, 1.0f, 0.0f, 0.0f); hr = IDirect3DMaterial2_GetHandle(emissive, device, &mat_handle); - ok(SUCCEEDED(hr), "Failed to get material handle, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get material handle, hr %#lx.\n", hr); hr = IDirect3DDevice2_SetLightState(device, D3DLIGHTSTATE_MATERIAL, mat_handle); - ok(SUCCEEDED(hr), "Failed to set material state, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set material state, hr %#lx.\n", hr); hr = IDirect3DDevice2_SetRenderState(device, D3DRENDERSTATE_ZENABLE, D3DZB_FALSE); - ok(SUCCEEDED(hr), "Failed to disable z test, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to disable z test, hr %#lx.\n", hr);
background = create_diffuse_material(device, 0.1f, 0.1f, 0.1f, 0.1f); viewport_set_background(device, viewport, background);
hr = IDirect3DDevice2_GetRenderState(device, D3DRENDERSTATE_SPECULARENABLE, &rs); - ok(SUCCEEDED(hr), "Failed to get specularenable render state, hr %#x.\n", hr); - ok(rs == TRUE, "Initial D3DRENDERSTATE_SPECULARENABLE is %#x, expected TRUE.\n", rs); + ok(SUCCEEDED(hr), "Failed to get specularenable render state, hr %#lx.\n", hr); + ok(rs == TRUE, "Initial D3DRENDERSTATE_SPECULARENABLE is %#lx, expected TRUE.\n", rs);
for (i = 0; i < ARRAY_SIZE(tests); i++) { hr = IDirect3DViewport2_Clear(viewport, 1, &clear_rect, D3DCLEAR_TARGET); - ok(SUCCEEDED(hr), "Failed to clear viewport, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to clear viewport, hr %#lx.\n", hr);
hr = IDirect3DDevice2_SetRenderState(device, D3DRENDERSTATE_LIGHTING, tests[i].d3drs_lighting); - ok(SUCCEEDED(hr), "Failed to set lighting render state, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set lighting render state, hr %#lx.\n", hr); hr = IDirect3DDevice2_SetRenderState(device, D3DRENDERSTATE_SPECULARENABLE, tests[i].d3drs_specular); - ok(SUCCEEDED(hr), "Failed to set specularenable render state, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set specularenable render state, hr %#lx.\n", hr);
hr = IDirect3DDevice2_BeginScene(device); - ok(SUCCEEDED(hr), "Failed to begin scene, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to begin scene, hr %#lx.\n", hr); hr = IDirect3DDevice2_DrawPrimitive(device, D3DPT_TRIANGLESTRIP, tests[i].vertextype, tests[i].data, 4, tests[i].draw_flags | D3DDP_WAIT); - ok(SUCCEEDED(hr), "Failed to draw, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to draw, hr %#lx.\n", hr); hr = IDirect3DDevice2_EndScene(device); - ok(SUCCEEDED(hr), "Failed to end scene, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to end scene, hr %#lx.\n", hr);
color = get_surface_color(rt, 320, 240); ok(compare_color(color, tests[i].color, 1), - "Got unexpected color 0x%08x, expected 0x%08x, test %u.\n", + "Got unexpected color 0x%08lx, expected 0x%08lx, test %u.\n", color, tests[i].color, i); }
@@ -4704,7 +4704,7 @@ static void test_lighting_interface_versions(void) IDirectDrawSurface_Release(rt); IDirect3DDevice2_Release(device); ref = IDirectDraw2_Release(ddraw); - ok(ref == 0, "Ddraw object not properly released, refcount %u.\n", ref); + ok(ref == 0, "Ddraw object not properly released, refcount %lu.\n", ref); DestroyWindow(window); }
@@ -4726,7 +4726,7 @@ static LRESULT CALLBACK activateapp_test_proc(HWND hwnd, UINT message, WPARAM wp activateapp_testdata.received = FALSE; hr = IDirectDraw2_SetCooperativeLevel(activateapp_testdata.ddraw, activateapp_testdata.window, activateapp_testdata.coop_level); - ok(SUCCEEDED(hr), "Recursive SetCooperativeLevel call failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Recursive SetCooperativeLevel call failed, hr %#lx.\n", hr); ok(!activateapp_testdata.received, "Received WM_ACTIVATEAPP during recursive SetCooperativeLevel call.\n"); } activateapp_testdata.received = TRUE; @@ -4758,31 +4758,31 @@ static void test_coop_level_activateapp(void) SetForegroundWindow(window); activateapp_testdata.received = FALSE; hr = IDirectDraw2_SetCooperativeLevel(ddraw, window, DDSCL_EXCLUSIVE | DDSCL_FULLSCREEN); - ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#lx.\n", hr); ok(!activateapp_testdata.received, "Received WM_ACTIVATEAPP although window was already active.\n"); hr = IDirectDraw2_SetCooperativeLevel(ddraw, NULL, DDSCL_NORMAL); - ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#lx.\n", hr);
/* Exclusive with window not active. */ SetForegroundWindow(GetDesktopWindow()); activateapp_testdata.received = FALSE; hr = IDirectDraw2_SetCooperativeLevel(ddraw, window, DDSCL_EXCLUSIVE | DDSCL_FULLSCREEN); - ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#lx.\n", hr); ok(activateapp_testdata.received, "Expected WM_ACTIVATEAPP, but did not receive it.\n"); hr = IDirectDraw2_SetCooperativeLevel(ddraw, NULL, DDSCL_NORMAL); - ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#lx.\n", hr);
/* Normal with window not active, then exclusive with the same window. */ SetForegroundWindow(GetDesktopWindow()); activateapp_testdata.received = FALSE; hr = IDirectDraw2_SetCooperativeLevel(ddraw, window, DDSCL_NORMAL); - ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#lx.\n", hr); ok(!activateapp_testdata.received, "Received WM_ACTIVATEAPP when setting DDSCL_NORMAL.\n"); hr = IDirectDraw2_SetCooperativeLevel(ddraw, window, DDSCL_EXCLUSIVE | DDSCL_FULLSCREEN); - ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#lx.\n", hr); ok(activateapp_testdata.received, "Expected WM_ACTIVATEAPP, but did not receive it.\n"); hr = IDirectDraw2_SetCooperativeLevel(ddraw, NULL, DDSCL_NORMAL); - ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#lx.\n", hr);
/* Recursive set of DDSCL_EXCLUSIVE | DDSCL_FULLSCREEN. */ SetForegroundWindow(GetDesktopWindow()); @@ -4791,10 +4791,10 @@ static void test_coop_level_activateapp(void) activateapp_testdata.window = window; activateapp_testdata.coop_level = DDSCL_EXCLUSIVE | DDSCL_FULLSCREEN; hr = IDirectDraw2_SetCooperativeLevel(ddraw, window, DDSCL_EXCLUSIVE | DDSCL_FULLSCREEN); - ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#lx.\n", hr); ok(activateapp_testdata.received, "Expected WM_ACTIVATEAPP, but did not receive it.\n"); hr = IDirectDraw2_SetCooperativeLevel(ddraw, NULL, DDSCL_NORMAL); - ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#lx.\n", hr);
/* The recursive call seems to have some bad effect on native ddraw, despite (apparently) * succeeding. Another switch to exclusive and back to normal is needed to release the @@ -4802,9 +4802,9 @@ static void test_coop_level_activateapp(void) * WM_ACTIVATEAPP messages. */ activateapp_testdata.ddraw = NULL; hr = IDirectDraw2_SetCooperativeLevel(ddraw, window, DDSCL_EXCLUSIVE | DDSCL_FULLSCREEN); - ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#lx.\n", hr); hr = IDirectDraw2_SetCooperativeLevel(ddraw, NULL, DDSCL_NORMAL); - ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#lx.\n", hr);
/* Setting DDSCL_NORMAL with recursive invocation. */ SetForegroundWindow(GetDesktopWindow()); @@ -4813,7 +4813,7 @@ static void test_coop_level_activateapp(void) activateapp_testdata.window = window; activateapp_testdata.coop_level = DDSCL_NORMAL; hr = IDirectDraw2_SetCooperativeLevel(ddraw, window, DDSCL_EXCLUSIVE | DDSCL_FULLSCREEN); - ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#lx.\n", hr); ok(activateapp_testdata.received, "Expected WM_ACTIVATEAPP, but did not receive it.\n");
/* DDraw is in exclusive mode now. */ @@ -4823,15 +4823,15 @@ static void test_coop_level_activateapp(void) ddsd.dwBackBufferCount = 1; ddsd.ddsCaps.dwCaps = DDSCAPS_PRIMARYSURFACE | DDSCAPS_COMPLEX | DDSCAPS_FLIP; hr = IDirectDraw2_CreateSurface(ddraw, &ddsd, &surface, NULL); - ok(SUCCEEDED(hr), "Failed to create surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create surface, hr %#lx.\n", hr); IDirectDrawSurface_Release(surface);
/* Recover again, just to be sure. */ activateapp_testdata.ddraw = NULL; hr = IDirectDraw2_SetCooperativeLevel(ddraw, window, DDSCL_EXCLUSIVE | DDSCL_FULLSCREEN); - ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#lx.\n", hr); hr = IDirectDraw2_SetCooperativeLevel(ddraw, NULL, DDSCL_NORMAL); - ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#lx.\n", hr);
DestroyWindow(window); UnregisterClassA("ddraw_test_wndproc_wc", GetModuleHandleA(NULL)); @@ -4907,7 +4907,7 @@ static void test_unsupported_formats(void) { struct format_support_check check = {&formats[i].fmt, FALSE}; hr = IDirect3DDevice2_EnumTextureFormats(device, test_unsupported_formats_cb, &check); - ok(SUCCEEDED(hr), "Failed to enumerate texture formats %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to enumerate texture formats %#lx.\n", hr);
for (j = 0; j < ARRAY_SIZE(caps); j++) { @@ -4926,7 +4926,7 @@ static void test_unsupported_formats(void)
hr = IDirectDraw2_CreateSurface(ddraw, &ddsd, &surface, NULL); ok(SUCCEEDED(hr) == expect_success, - "Got unexpected hr %#x for format %s, caps %#x, expected %s.\n", + "Got unexpected hr %#lx for format %s, caps %#lx, expected %s.\n", hr, formats[i].name, caps[j], expect_success ? "success" : "failure"); if (FAILED(hr)) continue; @@ -4934,7 +4934,7 @@ static void test_unsupported_formats(void) memset(&ddsd, 0, sizeof(ddsd)); ddsd.dwSize = sizeof(ddsd); hr = IDirectDrawSurface_GetSurfaceDesc(surface, &ddsd); - ok(SUCCEEDED(hr), "Failed to get surface desc, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get surface desc, hr %#lx.\n", hr);
if (caps[j] & DDSCAPS_VIDEOMEMORY) expected_caps = DDSCAPS_VIDEOMEMORY; @@ -4946,7 +4946,7 @@ static void test_unsupported_formats(void) expected_caps = DDSCAPS_SYSTEMMEMORY;
ok(ddsd.ddsCaps.dwCaps & expected_caps, - "Expected capability %#x, format %s, input cap %#x.\n", + "Expected capability %#lx, format %s, input cap %#lx.\n", expected_caps, formats[i].name, caps[j]);
IDirectDrawSurface_Release(surface); @@ -5176,12 +5176,12 @@ static void test_rt_caps(const GUID *device_guid)
memset(palette_entries, 0, sizeof(palette_entries)); hr = IDirectDraw2_CreatePalette(ddraw, DDPCAPS_ALLOW256 | DDPCAPS_8BIT, palette_entries, &palette, NULL); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr);
memset(&hal_caps, 0, sizeof(hal_caps)); hal_caps.dwSize = sizeof(hal_caps); hr = IDirectDraw2_GetCaps(ddraw, &hal_caps, NULL); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr);
for (i = 0; i < ARRAY_SIZE(test_data); ++i) { @@ -5216,7 +5216,7 @@ static void test_rt_caps(const GUID *device_guid) hr = IDirectDraw2_CreateSurface(ddraw, &surface_desc, &surface, NULL); ok(hr == expected_hr || broken(test_data[i].create_may_fail || (software_device && test_data[i].pf == &p8_fmt && hr == DDERR_INVALIDPIXELFORMAT)), - "Got unexpected hr %#x, test %u, software_device %u.\n", hr, i, software_device); + "Got unexpected hr %#lx, test %u, software_device %u.\n", hr, i, software_device); if (FAILED(hr)) continue;
@@ -5233,7 +5233,7 @@ static void test_rt_caps(const GUID *device_guid) && surface_desc.ddsCaps.dwCaps == (caps_in | DDSCAPS_SYSTEMMEMORY)) || (software_device && caps_in & DDSCAPS_ZBUFFER && surface_desc.ddsCaps.dwCaps == (caps_in | DDSCAPS_SYSTEMMEMORY)), - "Got unexpected caps %#x, expected %#x, test %u, software_device %u.\n", + "Got unexpected caps %#lx, expected %#lx, test %u, software_device %u.\n", surface_desc.ddsCaps.dwCaps, expected_caps, i, software_device);
hr = IDirect3D2_CreateDevice(d3d, device_guid, surface, &device); @@ -5241,30 +5241,30 @@ static void test_rt_caps(const GUID *device_guid) ok((!software_device && hr == test_data[i].create_device_hr) || (software_device && (hr == (test_data[i].create_device_hr == D3DERR_SURFACENOTINVIDMEM ? DD_OK : test_data[i].create_device_hr))), - "Got unexpected hr %#x, test %u, software_device %u.\n", hr, i, software_device); + "Got unexpected hr %#lx, test %u, software_device %u.\n", hr, i, software_device);
if (FAILED(hr)) { if (hr == DDERR_NOPALETTEATTACHED) { hr = IDirectDrawSurface_SetPalette(surface, palette); - ok(hr == DD_OK, "Got unexpected hr %#x, test %u, software_device %u.\n", hr, i, software_device); + ok(hr == DD_OK, "Got unexpected hr %#lx, test %u, software_device %u.\n", hr, i, software_device); hr = IDirect3D2_CreateDevice(d3d, device_guid, surface, &device); if (software_device) todo_wine - ok(hr == DD_OK, "Got unexpected hr %#x, test %u, software_device %u.\n", + ok(hr == DD_OK, "Got unexpected hr %#lx, test %u, software_device %u.\n", hr, i, software_device); else if (surface_desc.ddsCaps.dwCaps & DDSCAPS_VIDEOMEMORY) - ok(hr == DDERR_INVALIDPIXELFORMAT, "Got unexpected hr %#x, test %u, software_device %u.\n", + ok(hr == DDERR_INVALIDPIXELFORMAT, "Got unexpected hr %#lx, test %u, software_device %u.\n", hr, i, software_device); else - ok(hr == D3DERR_SURFACENOTINVIDMEM, "Got unexpected hr %#x, test %u, software_device %u.\n", + ok(hr == D3DERR_SURFACENOTINVIDMEM, "Got unexpected hr %#lx, test %u, software_device %u.\n", hr, i, software_device);
if (hr == DD_OK) { refcount = IDirect3DDevice2_Release(device); - ok(!refcount, "Test %u: The device was not properly freed, refcount %u.\n", i, refcount); + ok(!refcount, "Test %u: The device was not properly freed, refcount %lu.\n", i, refcount); } } IDirectDrawSurface_Release(surface); @@ -5276,10 +5276,10 @@ static void test_rt_caps(const GUID *device_guid) surface_desc.dwWidth = 640; surface_desc.dwHeight = 480; hr = IDirectDraw2_CreateSurface(ddraw, &surface_desc, &surface, NULL); - ok(hr == DD_OK, "Got unexpected hr %#x, test %u, software_device %u.\n", hr, i, software_device); + ok(hr == DD_OK, "Got unexpected hr %#lx, test %u, software_device %u.\n", hr, i, software_device);
hr = IDirect3D2_CreateDevice(d3d, device_guid, surface, &device); - ok(hr == DD_OK, "Got unexpected hr %#x, test %u, software_device %u.\n", hr, i, software_device); + ok(hr == DD_OK, "Got unexpected hr %#lx, test %u, software_device %u.\n", hr, i, software_device); }
memset(&surface_desc, 0, sizeof(surface_desc)); @@ -5299,12 +5299,12 @@ static void test_rt_caps(const GUID *device_guid) surface_desc.dwWidth = 640; surface_desc.dwHeight = 480; hr = IDirectDraw2_CreateSurface(ddraw, &surface_desc, &rt, NULL); - ok(hr == DD_OK, "Got unexpected hr %#x, test %u, software_device %u.\n", hr, i, software_device); + ok(hr == DD_OK, "Got unexpected hr %#lx, test %u, software_device %u.\n", hr, i, software_device);
hr = IDirect3DDevice2_SetRenderTarget(device, rt, 0); ok(hr == test_data[i].set_rt_hr || (software_device && hr == DDERR_NOPALETTEATTACHED) || broken(hr == test_data[i].alternative_set_rt_hr), - "Got unexpected hr %#x, test %u, software_device %u.\n", + "Got unexpected hr %#lx, test %u, software_device %u.\n", hr, i, software_device);
if (SUCCEEDED(hr) || hr == DDERR_INVALIDPIXELFORMAT) @@ -5317,19 +5317,19 @@ static void test_rt_caps(const GUID *device_guid) if (hr == DDERR_INVALIDPIXELFORMAT) { refcount = IDirectDrawSurface_AddRef(rt); - ok(refcount == 2, "Test %u: Got unexpected refcount %u.\n", i, refcount); + ok(refcount == 2, "Test %u: Got unexpected refcount %lu.\n", i, refcount); }
hr = IDirect3DDevice2_GetRenderTarget(device, &tmp); - ok(hr == DD_OK, "Got unexpected hr %#x, test %u, software_device %u.\n", hr, i, software_device); + ok(hr == DD_OK, "Got unexpected hr %#lx, test %u, software_device %u.\n", hr, i, software_device); ok(tmp == expected_rt, "Got unexpected rt %p, test %u, software_device %u.\n", tmp, i, software_device);
IDirectDrawSurface_Release(tmp); IDirectDrawSurface_Release(rt); refcount = IDirect3DDevice2_Release(device); - ok(refcount == 0, "Test %u: The device was not properly freed, refcount %u.\n", i, refcount); + ok(refcount == 0, "Test %u: The device was not properly freed, refcount %lu.\n", i, refcount); refcount = IDirectDrawSurface_Release(surface); - ok(refcount == 0, "Test %u: The surface was not properly freed, refcount %u.\n", i, refcount); + ok(refcount == 0, "Test %u: The surface was not properly freed, refcount %lu.\n", i, refcount); }
IDirectDrawPalette_Release(palette); @@ -5337,7 +5337,7 @@ static void test_rt_caps(const GUID *device_guid)
done: refcount = IDirectDraw2_Release(ddraw); - ok(refcount == 0, "The ddraw object was not properly freed, refcount %u.\n", refcount); + ok(refcount == 0, "The ddraw object was not properly freed, refcount %lu.\n", refcount); DestroyWindow(window); }
@@ -5462,7 +5462,7 @@ static void test_primary_caps(void) for (i = 0; i < ARRAY_SIZE(test_data); ++i) { hr = IDirectDraw2_SetCooperativeLevel(ddraw, window, test_data[i].coop_level); - ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#lx.\n", hr);
memset(&surface_desc, 0, sizeof(surface_desc)); surface_desc.dwSize = sizeof(surface_desc); @@ -5472,23 +5472,23 @@ static void test_primary_caps(void) surface_desc.ddsCaps.dwCaps = test_data[i].caps_in; surface_desc.dwBackBufferCount = test_data[i].back_buffer_count; hr = IDirectDraw2_CreateSurface(ddraw, &surface_desc, &surface, NULL); - ok(hr == test_data[i].hr, "Test %u: Got unexpected hr %#x, expected %#x.\n", i, hr, test_data[i].hr); + ok(hr == test_data[i].hr, "Test %u: Got unexpected hr %#lx, expected %#lx.\n", i, hr, test_data[i].hr); if (FAILED(hr)) continue;
memset(&surface_desc, 0, sizeof(surface_desc)); surface_desc.dwSize = sizeof(surface_desc); hr = IDirectDrawSurface_GetSurfaceDesc(surface, &surface_desc); - ok(SUCCEEDED(hr), "Test %u: Failed to get surface desc, hr %#x.\n", i, hr); + ok(SUCCEEDED(hr), "Test %u: Failed to get surface desc, hr %#lx.\n", i, hr); ok((surface_desc.ddsCaps.dwCaps & ~placement) == test_data[i].caps_out, - "Test %u: Got unexpected caps %#x, expected %#x.\n", + "Test %u: Got unexpected caps %#lx, expected %#lx.\n", i, surface_desc.ddsCaps.dwCaps, test_data[i].caps_out);
IDirectDrawSurface_Release(surface); }
refcount = IDirectDraw2_Release(ddraw); - ok(refcount == 0, "The ddraw object was not properly freed, refcount %u.\n", refcount); + ok(refcount == 0, "The ddraw object was not properly freed, refcount %lu.\n", refcount); DestroyWindow(window); }
@@ -5573,27 +5573,27 @@ static void test_surface_lock(void) ddsd.ddsCaps.dwCaps = tests[i].caps;
hr = IDirectDraw2_CreateSurface(ddraw, &ddsd, &surface, NULL); - ok(SUCCEEDED(hr), "Failed to create surface, type %s, hr %#x.\n", tests[i].name, hr); + ok(SUCCEEDED(hr), "Failed to create surface, type %s, hr %#lx.\n", tests[i].name, hr);
memset(&ddsd, 0, sizeof(ddsd)); ddsd.dwSize = sizeof(ddsd); hr = IDirectDrawSurface_Lock(surface, NULL, &ddsd, DDLOCK_WAIT, NULL); - ok(SUCCEEDED(hr), "Failed to lock surface, type %s, hr %#x.\n", tests[i].name, hr); + ok(SUCCEEDED(hr), "Failed to lock surface, type %s, hr %#lx.\n", tests[i].name, hr); if (SUCCEEDED(hr)) { hr = IDirectDrawSurface_Unlock(surface, NULL); - ok(SUCCEEDED(hr), "Failed to unlock surface, type %s, hr %#x.\n", tests[i].name, hr); + ok(SUCCEEDED(hr), "Failed to unlock surface, type %s, hr %#lx.\n", tests[i].name, hr); }
memset(&ddsd, 0, sizeof(ddsd)); hr = IDirectDrawSurface_Lock(surface, NULL, &ddsd, DDLOCK_WAIT, NULL); - ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#x, type %s.\n", hr, tests[i].name); + ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#lx, type %s.\n", hr, tests[i].name);
IDirectDrawSurface_Release(surface); }
refcount = IDirectDraw2_Release(ddraw); - ok(refcount == 0, "The ddraw object was not properly freed, refcount %u.\n", refcount); + ok(refcount == 0, "The ddraw object was not properly freed, refcount %lu.\n", refcount); DestroyWindow(window); }
@@ -5644,7 +5644,7 @@ static void test_surface_discard(void) }
hr = IDirect3DDevice2_GetRenderTarget(device, &target); - ok(SUCCEEDED(hr), "Failed to get render target, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get render target, hr %#lx.\n", hr);
memset(&ddsd, 0, sizeof(ddsd)); ddsd.dwSize = sizeof(ddsd); @@ -5662,29 +5662,29 @@ static void test_surface_discard(void) memset(&ddsd, 0, sizeof(ddsd)); ddsd.dwSize = sizeof(ddsd); hr = IDirectDrawSurface_Lock(surface, NULL, &ddsd, DDLOCK_WAIT, NULL); - ok(SUCCEEDED(hr), "Failed to lock surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to lock surface, hr %#lx.\n", hr); addr = ddsd.lpSurface; hr = IDirectDrawSurface_Unlock(surface, NULL); - ok(SUCCEEDED(hr), "Failed to unlock surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to unlock surface, hr %#lx.\n", hr);
memset(&ddsd, 0, sizeof(ddsd)); ddsd.dwSize = sizeof(ddsd); hr = IDirectDrawSurface_Lock(surface, NULL, &ddsd, DDLOCK_DISCARDCONTENTS | DDLOCK_WAIT, NULL); - ok(SUCCEEDED(hr) , "Failed to lock surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr) , "Failed to lock surface, hr %#lx.\n", hr); discarded = ddsd.lpSurface != addr; hr = IDirectDrawSurface_Unlock(surface, NULL); - ok(SUCCEEDED(hr), "Failed to unlock surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to unlock surface, hr %#lx.\n", hr);
hr = IDirectDrawSurface_Blt(target, NULL, surface, NULL, DDBLT_WAIT, NULL); - ok(SUCCEEDED(hr), "Failed to blit, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to blit, hr %#lx.\n", hr);
memset(&ddsd, 0, sizeof(ddsd)); ddsd.dwSize = sizeof(ddsd); hr = IDirectDrawSurface_Lock(surface, NULL, &ddsd, DDLOCK_DISCARDCONTENTS | DDLOCK_WAIT, NULL); - ok(SUCCEEDED(hr), "Failed to lock surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to lock surface, hr %#lx.\n", hr); discarded |= ddsd.lpSurface != addr; hr = IDirectDrawSurface_Unlock(surface, NULL); - ok(SUCCEEDED(hr), "Failed to unlock surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to unlock surface, hr %#lx.\n", hr);
IDirectDrawSurface_Release(surface);
@@ -5732,7 +5732,7 @@ static void test_flip(void) ok(!!ddraw, "Failed to create a ddraw object.\n");
hr = IDirectDraw2_SetCooperativeLevel(ddraw, window, DDSCL_EXCLUSIVE | DDSCL_FULLSCREEN); - ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#lx.\n", hr);
for (i = 0; i < ARRAY_SIZE(test_data); ++i) { @@ -5755,90 +5755,90 @@ static void test_flip(void) surface_desc.dwHeight = 512; surface_desc.dwBackBufferCount = 3; hr = IDirectDraw2_CreateSurface(ddraw, &surface_desc, &frontbuffer, NULL); - ok(hr == DDERR_INVALIDCAPS, "%s: Got unexpected hr %#x.\n", test_data[i].name, hr); + ok(hr == DDERR_INVALIDCAPS, "%s: Got unexpected hr %#lx.\n", test_data[i].name, hr);
surface_desc.ddsCaps.dwCaps &= ~DDSCAPS_FLIP; surface_desc.dwFlags |= DDSD_BACKBUFFERCOUNT; hr = IDirectDraw2_CreateSurface(ddraw, &surface_desc, &frontbuffer, NULL); - ok(hr == DDERR_INVALIDCAPS, "%s: Got unexpected hr %#x.\n", test_data[i].name, hr); + ok(hr == DDERR_INVALIDCAPS, "%s: Got unexpected hr %#lx.\n", test_data[i].name, hr);
surface_desc.ddsCaps.dwCaps &= ~DDSCAPS_COMPLEX; surface_desc.ddsCaps.dwCaps |= DDSCAPS_FLIP; hr = IDirectDraw2_CreateSurface(ddraw, &surface_desc, &frontbuffer, NULL); - ok(hr == DDERR_INVALIDCAPS, "%s: Got unexpected hr %#x.\n", test_data[i].name, hr); + ok(hr == DDERR_INVALIDCAPS, "%s: Got unexpected hr %#lx.\n", test_data[i].name, hr);
surface_desc.ddsCaps.dwCaps |= DDSCAPS_COMPLEX; hr = IDirectDraw2_CreateSurface(ddraw, &surface_desc, &frontbuffer, NULL); todo_wine_if(test_data[i].caps & DDSCAPS_TEXTURE) - ok(SUCCEEDED(hr), "%s: Failed to create surface, hr %#x.\n", test_data[i].name, hr); + ok(SUCCEEDED(hr), "%s: Failed to create surface, hr %#lx.\n", test_data[i].name, hr); if (FAILED(hr)) continue;
hr = IDirectDraw2_SetCooperativeLevel(ddraw, window, DDSCL_NORMAL | DDSCL_FULLSCREEN); - ok(SUCCEEDED(hr), "%s: Failed to set cooperative level, hr %#x.\n", test_data[i].name, hr); + ok(SUCCEEDED(hr), "%s: Failed to set cooperative level, hr %#lx.\n", test_data[i].name, hr); hr = IDirectDrawSurface_IsLost(frontbuffer); - ok(hr == DD_OK, "%s: Got unexpected hr %#x.\n", test_data[i].name, hr); + ok(hr == DD_OK, "%s: Got unexpected hr %#lx.\n", test_data[i].name, hr); hr = IDirectDrawSurface_Flip(frontbuffer, NULL, DDFLIP_WAIT); if (test_data[i].caps & DDSCAPS_PRIMARYSURFACE) - ok(hr == DDERR_NOEXCLUSIVEMODE, "%s: Got unexpected hr %#x.\n", test_data[i].name, hr); + ok(hr == DDERR_NOEXCLUSIVEMODE, "%s: Got unexpected hr %#lx.\n", test_data[i].name, hr); else - ok(SUCCEEDED(hr), "%s: Failed to flip, hr %#x.\n", test_data[i].name, hr); + ok(SUCCEEDED(hr), "%s: Failed to flip, hr %#lx.\n", test_data[i].name, hr); hr = IDirectDraw2_SetCooperativeLevel(ddraw, window, DDSCL_EXCLUSIVE | DDSCL_FULLSCREEN); - ok(SUCCEEDED(hr), "%s: Failed to set cooperative level, hr %#x.\n", test_data[i].name, hr); + ok(SUCCEEDED(hr), "%s: Failed to set cooperative level, hr %#lx.\n", test_data[i].name, hr); hr = IDirectDrawSurface_IsLost(frontbuffer); - todo_wine ok(hr == DDERR_SURFACELOST, "%s: Got unexpected hr %#x.\n", test_data[i].name, hr); + todo_wine ok(hr == DDERR_SURFACELOST, "%s: Got unexpected hr %#lx.\n", test_data[i].name, hr); hr = restore_surfaces(ddraw); - ok(SUCCEEDED(hr), "%s: Failed to restore surfaces, hr %#x.\n", test_data[i].name, hr); + ok(SUCCEEDED(hr), "%s: Failed to restore surfaces, hr %#lx.\n", test_data[i].name, hr);
memset(&surface_desc, 0, sizeof(surface_desc)); surface_desc.dwSize = sizeof(surface_desc); hr = IDirectDrawSurface_GetSurfaceDesc(frontbuffer, &surface_desc); - ok(SUCCEEDED(hr), "%s: Failed to get surface desc, hr %#x.\n", test_data[i].name, hr); + ok(SUCCEEDED(hr), "%s: Failed to get surface desc, hr %#lx.\n", test_data[i].name, hr); expected_caps = DDSCAPS_FRONTBUFFER | DDSCAPS_COMPLEX | DDSCAPS_FLIP | test_data[i].caps; if (test_data[i].caps & DDSCAPS_PRIMARYSURFACE) expected_caps |= DDSCAPS_VISIBLE; ok((surface_desc.ddsCaps.dwCaps & ~placement) == expected_caps, - "%s: Got unexpected caps %#x.\n", test_data[i].name, surface_desc.ddsCaps.dwCaps); + "%s: Got unexpected caps %#lx.\n", test_data[i].name, surface_desc.ddsCaps.dwCaps); sysmem_primary = surface_desc.ddsCaps.dwCaps & DDSCAPS_SYSTEMMEMORY;
hr = IDirectDrawSurface_GetAttachedSurface(frontbuffer, &caps, &backbuffer1); - ok(SUCCEEDED(hr), "%s: Failed to get attached surface, hr %#x.\n", test_data[i].name, hr); + ok(SUCCEEDED(hr), "%s: Failed to get attached surface, hr %#lx.\n", test_data[i].name, hr); memset(&surface_desc, 0, sizeof(surface_desc)); surface_desc.dwSize = sizeof(surface_desc); hr = IDirectDrawSurface_GetSurfaceDesc(backbuffer1, &surface_desc); - ok(SUCCEEDED(hr), "%s: Failed to get surface desc, hr %#x.\n", test_data[i].name, hr); - ok(!surface_desc.dwBackBufferCount, "%s: Got unexpected back buffer count %u.\n", + ok(SUCCEEDED(hr), "%s: Failed to get surface desc, hr %#lx.\n", test_data[i].name, hr); + ok(!surface_desc.dwBackBufferCount, "%s: Got unexpected back buffer count %lu.\n", test_data[i].name, surface_desc.dwBackBufferCount); expected_caps &= ~(DDSCAPS_VISIBLE | DDSCAPS_PRIMARYSURFACE | DDSCAPS_FRONTBUFFER); expected_caps |= DDSCAPS_BACKBUFFER; ok((surface_desc.ddsCaps.dwCaps & ~placement) == expected_caps, - "%s: Got unexpected caps %#x.\n", test_data[i].name, surface_desc.ddsCaps.dwCaps); + "%s: Got unexpected caps %#lx.\n", test_data[i].name, surface_desc.ddsCaps.dwCaps);
hr = IDirectDrawSurface_GetAttachedSurface(backbuffer1, &caps, &backbuffer2); - ok(SUCCEEDED(hr), "%s: Failed to get attached surface, hr %#x.\n", test_data[i].name, hr); + ok(SUCCEEDED(hr), "%s: Failed to get attached surface, hr %#lx.\n", test_data[i].name, hr); memset(&surface_desc, 0, sizeof(surface_desc)); surface_desc.dwSize = sizeof(surface_desc); hr = IDirectDrawSurface_GetSurfaceDesc(backbuffer2, &surface_desc); - ok(SUCCEEDED(hr), "%s: Failed to get surface desc, hr %#x.\n", test_data[i].name, hr); - ok(!surface_desc.dwBackBufferCount, "%s: Got unexpected back buffer count %u.\n", + ok(SUCCEEDED(hr), "%s: Failed to get surface desc, hr %#lx.\n", test_data[i].name, hr); + ok(!surface_desc.dwBackBufferCount, "%s: Got unexpected back buffer count %lu.\n", test_data[i].name, surface_desc.dwBackBufferCount); expected_caps &= ~DDSCAPS_BACKBUFFER; ok((surface_desc.ddsCaps.dwCaps & ~placement) == expected_caps, - "%s: Got unexpected caps %#x.\n", test_data[i].name, surface_desc.ddsCaps.dwCaps); + "%s: Got unexpected caps %#lx.\n", test_data[i].name, surface_desc.ddsCaps.dwCaps);
hr = IDirectDrawSurface_GetAttachedSurface(backbuffer2, &caps, &backbuffer3); - ok(SUCCEEDED(hr), "%s: Failed to get attached surface, hr %#x.\n", test_data[i].name, hr); + ok(SUCCEEDED(hr), "%s: Failed to get attached surface, hr %#lx.\n", test_data[i].name, hr); memset(&surface_desc, 0, sizeof(surface_desc)); surface_desc.dwSize = sizeof(surface_desc); hr = IDirectDrawSurface_GetSurfaceDesc(backbuffer3, &surface_desc); - ok(SUCCEEDED(hr), "%s: Failed to get surface desc, hr %#x.\n", test_data[i].name, hr); - ok(!surface_desc.dwBackBufferCount, "%s: Got unexpected back buffer count %u.\n", + ok(SUCCEEDED(hr), "%s: Failed to get surface desc, hr %#lx.\n", test_data[i].name, hr); + ok(!surface_desc.dwBackBufferCount, "%s: Got unexpected back buffer count %lu.\n", test_data[i].name, surface_desc.dwBackBufferCount); ok((surface_desc.ddsCaps.dwCaps & ~placement) == expected_caps, - "%s: Got unexpected caps %#x.\n", test_data[i].name, surface_desc.ddsCaps.dwCaps); + "%s: Got unexpected caps %#lx.\n", test_data[i].name, surface_desc.ddsCaps.dwCaps);
hr = IDirectDrawSurface_GetAttachedSurface(backbuffer3, &caps, &surface); - ok(SUCCEEDED(hr), "%s: Failed to get attached surface, hr %#x.\n", test_data[i].name, hr); + ok(SUCCEEDED(hr), "%s: Failed to get attached surface, hr %#lx.\n", test_data[i].name, hr); ok(surface == frontbuffer, "%s: Got unexpected surface %p, expected %p.\n", test_data[i].name, surface, frontbuffer); IDirectDrawSurface_Release(surface); @@ -5850,19 +5850,19 @@ static void test_flip(void) surface_desc.dwWidth = 640; surface_desc.dwHeight = 480; hr = IDirectDraw2_CreateSurface(ddraw, &surface_desc, &surface, NULL); - ok(SUCCEEDED(hr), "%s: Failed to create surface, hr %#x.\n", test_data[i].name, hr); + ok(SUCCEEDED(hr), "%s: Failed to create surface, hr %#lx.\n", test_data[i].name, hr); hr = IDirectDrawSurface_Flip(frontbuffer, surface, DDFLIP_WAIT); - ok(hr == DDERR_NOTFLIPPABLE, "%s: Got unexpected hr %#x.\n", test_data[i].name, hr); + ok(hr == DDERR_NOTFLIPPABLE, "%s: Got unexpected hr %#lx.\n", test_data[i].name, hr); IDirectDrawSurface_Release(surface);
hr = IDirectDrawSurface_Flip(frontbuffer, frontbuffer, DDFLIP_WAIT); - ok(hr == DDERR_NOTFLIPPABLE, "%s: Got unexpected hr %#x.\n", test_data[i].name, hr); + ok(hr == DDERR_NOTFLIPPABLE, "%s: Got unexpected hr %#lx.\n", test_data[i].name, hr); hr = IDirectDrawSurface_Flip(backbuffer1, NULL, DDFLIP_WAIT); - ok(hr == DDERR_NOTFLIPPABLE, "%s: Got unexpected hr %#x.\n", test_data[i].name, hr); + ok(hr == DDERR_NOTFLIPPABLE, "%s: Got unexpected hr %#lx.\n", test_data[i].name, hr); hr = IDirectDrawSurface_Flip(backbuffer2, NULL, DDFLIP_WAIT); - ok(hr == DDERR_NOTFLIPPABLE, "%s: Got unexpected hr %#x.\n", test_data[i].name, hr); + ok(hr == DDERR_NOTFLIPPABLE, "%s: Got unexpected hr %#lx.\n", test_data[i].name, hr); hr = IDirectDrawSurface_Flip(backbuffer3, NULL, DDFLIP_WAIT); - ok(hr == DDERR_NOTFLIPPABLE, "%s: Got unexpected hr %#x.\n", test_data[i].name, hr); + ok(hr == DDERR_NOTFLIPPABLE, "%s: Got unexpected hr %#lx.\n", test_data[i].name, hr);
/* The Nvidia Geforce 7 driver cannot do a color fill on a texture backbuffer after * the backbuffer has been locked or GetSurfaceDesc has been called. Do it ourselves @@ -5872,59 +5872,59 @@ static void test_flip(void) fill_surface(backbuffer3, 0xff0000ff);
hr = IDirectDrawSurface_Flip(frontbuffer, NULL, DDFLIP_WAIT); - ok(SUCCEEDED(hr), "%s: Failed to flip, hr %#x.\n", test_data[i].name, hr); + ok(SUCCEEDED(hr), "%s: Failed to flip, hr %#lx.\n", test_data[i].name, hr); color = get_surface_color(backbuffer1, 320, 240); /* The testbot seems to just copy the contents of one surface to all the * others, instead of properly flipping. */ ok(compare_color(color, 0x0000ff00, 1) || broken(sysmem_primary && compare_color(color, 0x000000ff, 1)), - "%s: Got unexpected color 0x%08x.\n", test_data[i].name, color); + "%s: Got unexpected color 0x%08lx.\n", test_data[i].name, color); color = get_surface_color(backbuffer2, 320, 240); - ok(compare_color(color, 0x000000ff, 1), "%s: Got unexpected color 0x%08x.\n", test_data[i].name, color); + ok(compare_color(color, 0x000000ff, 1), "%s: Got unexpected color 0x%08lx.\n", test_data[i].name, color); fill_surface(backbuffer3, 0xffff0000);
hr = IDirectDrawSurface_Flip(frontbuffer, NULL, DDFLIP_WAIT); - ok(SUCCEEDED(hr), "%s: Failed to flip, hr %#x.\n", test_data[i].name, hr); + ok(SUCCEEDED(hr), "%s: Failed to flip, hr %#lx.\n", test_data[i].name, hr); color = get_surface_color(backbuffer1, 320, 240); ok(compare_color(color, 0x000000ff, 1) || broken(sysmem_primary && compare_color(color, 0x00ff0000, 1)), - "%s: Got unexpected color 0x%08x.\n", test_data[i].name, color); + "%s: Got unexpected color 0x%08lx.\n", test_data[i].name, color); color = get_surface_color(backbuffer2, 320, 240); - ok(compare_color(color, 0x00ff0000, 1), "%s: Got unexpected color 0x%08x.\n", test_data[i].name, color); + ok(compare_color(color, 0x00ff0000, 1), "%s: Got unexpected color 0x%08lx.\n", test_data[i].name, color); fill_surface(backbuffer3, 0xff00ff00);
hr = IDirectDrawSurface_Flip(frontbuffer, NULL, DDFLIP_WAIT); - ok(SUCCEEDED(hr), "%s: Failed to flip, hr %#x.\n", test_data[i].name, hr); + ok(SUCCEEDED(hr), "%s: Failed to flip, hr %#lx.\n", test_data[i].name, hr); color = get_surface_color(backbuffer1, 320, 240); ok(compare_color(color, 0x00ff0000, 1) || broken(sysmem_primary && compare_color(color, 0x0000ff00, 1)), - "%s: Got unexpected color 0x%08x.\n", test_data[i].name, color); + "%s: Got unexpected color 0x%08lx.\n", test_data[i].name, color); color = get_surface_color(backbuffer2, 320, 240); - ok(compare_color(color, 0x0000ff00, 1), "%s: Got unexpected color 0x%08x.\n", test_data[i].name, color); + ok(compare_color(color, 0x0000ff00, 1), "%s: Got unexpected color 0x%08lx.\n", test_data[i].name, color); fill_surface(backbuffer3, 0xff0000ff);
hr = IDirectDrawSurface_Flip(frontbuffer, backbuffer1, DDFLIP_WAIT); - ok(SUCCEEDED(hr), "%s: Failed to flip, hr %#x.\n", test_data[i].name, hr); + ok(SUCCEEDED(hr), "%s: Failed to flip, hr %#lx.\n", test_data[i].name, hr); color = get_surface_color(backbuffer2, 320, 240); ok(compare_color(color, 0x0000ff00, 1) || broken(sysmem_primary && compare_color(color, 0x000000ff, 1)), - "%s: Got unexpected color 0x%08x.\n", test_data[i].name, color); + "%s: Got unexpected color 0x%08lx.\n", test_data[i].name, color); color = get_surface_color(backbuffer3, 320, 240); - ok(compare_color(color, 0x000000ff, 1), "%s: Got unexpected color 0x%08x.\n", test_data[i].name, color); + ok(compare_color(color, 0x000000ff, 1), "%s: Got unexpected color 0x%08lx.\n", test_data[i].name, color); fill_surface(backbuffer1, 0xffff0000);
hr = IDirectDrawSurface_Flip(frontbuffer, backbuffer2, DDFLIP_WAIT); - ok(SUCCEEDED(hr), "%s: Failed to flip, hr %#x.\n", test_data[i].name, hr); + ok(SUCCEEDED(hr), "%s: Failed to flip, hr %#lx.\n", test_data[i].name, hr); color = get_surface_color(backbuffer1, 320, 240); - ok(compare_color(color, 0x00ff0000, 1), "%s: Got unexpected color 0x%08x.\n", test_data[i].name, color); + ok(compare_color(color, 0x00ff0000, 1), "%s: Got unexpected color 0x%08lx.\n", test_data[i].name, color); color = get_surface_color(backbuffer3, 320, 240); ok(compare_color(color, 0x000000ff, 1) || broken(sysmem_primary && compare_color(color, 0x00ff0000, 1)), - "%s: Got unexpected color 0x%08x.\n", test_data[i].name, color); + "%s: Got unexpected color 0x%08lx.\n", test_data[i].name, color); fill_surface(backbuffer2, 0xff00ff00);
hr = IDirectDrawSurface_Flip(frontbuffer, backbuffer3, DDFLIP_WAIT); - ok(SUCCEEDED(hr), "%s: Failed to flip, hr %#x.\n", test_data[i].name, hr); + ok(SUCCEEDED(hr), "%s: Failed to flip, hr %#lx.\n", test_data[i].name, hr); color = get_surface_color(backbuffer1, 320, 240); ok(compare_color(color, 0x00ff0000, 1) || broken(sysmem_primary && compare_color(color, 0x0000ff00, 1)), - "%s: Got unexpected color 0x%08x.\n", test_data[i].name, color); + "%s: Got unexpected color 0x%08lx.\n", test_data[i].name, color); color = get_surface_color(backbuffer2, 320, 240); - ok(compare_color(color, 0x0000ff00, 1), "%s: Got unexpected color 0x%08x.\n", test_data[i].name, color); + ok(compare_color(color, 0x0000ff00, 1), "%s: Got unexpected color 0x%08lx.\n", test_data[i].name, color);
IDirectDrawSurface_Release(backbuffer3); IDirectDrawSurface_Release(backbuffer2); @@ -5933,7 +5933,7 @@ static void test_flip(void) }
refcount = IDirectDraw2_Release(ddraw); - ok(refcount == 0, "The ddraw object was not properly freed, refcount %u.\n", refcount); + ok(refcount == 0, "The ddraw object was not properly freed, refcount %lu.\n", refcount); DestroyWindow(window); }
@@ -5971,7 +5971,7 @@ static void test_set_surface_desc(void) ddraw = create_ddraw(); ok(!!ddraw, "Failed to create a ddraw object.\n"); hr = IDirectDraw2_SetCooperativeLevel(ddraw, window, DDSCL_NORMAL); - ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#lx.\n", hr);
reset_ddsd(&ddsd); ddsd.dwFlags = DDSD_WIDTH | DDSD_HEIGHT | DDSD_CAPS | DDSD_PIXELFORMAT; @@ -5986,131 +5986,131 @@ static void test_set_surface_desc(void) ddsd.ddsCaps.dwCaps = DDSCAPS_SYSTEMMEMORY | DDSCAPS_OFFSCREENPLAIN;
hr = IDirectDraw2_CreateSurface(ddraw, &ddsd, &surface, NULL); - ok(SUCCEEDED(hr), "Failed to create surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create surface, hr %#lx.\n", hr);
hr = IDirectDrawSurface_QueryInterface(surface, &IID_IDirectDrawSurface3, (void **)&surface3); - ok(SUCCEEDED(hr), "Failed to get IDirectDrawSurface3 interface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get IDirectDrawSurface3 interface, hr %#lx.\n", hr); IDirectDrawSurface_Release(surface);
reset_ddsd(&ddsd); ddsd.dwFlags = DDSD_LPSURFACE; ddsd.lpSurface = data; hr = IDirectDrawSurface3_SetSurfaceDesc(surface3, &ddsd, 0); - ok(SUCCEEDED(hr), "Failed to set surface desc, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set surface desc, hr %#lx.\n", hr);
/* Redundantly setting the same lpSurface is not an error. */ hr = IDirectDrawSurface3_SetSurfaceDesc(surface3, &ddsd, 0); - ok(SUCCEEDED(hr), "Failed to set surface desc, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set surface desc, hr %#lx.\n", hr); hr = IDirectDrawSurface3_GetSurfaceDesc(surface3, &ddsd); - ok(SUCCEEDED(hr), "Failed to get surface desc, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get surface desc, hr %#lx.\n", hr); ok(!(ddsd.dwFlags & DDSD_LPSURFACE), "DDSD_LPSURFACE is set.\n"); ok(ddsd.lpSurface == NULL, "lpSurface is %p, expected NULL.\n", ddsd.lpSurface);
hr = IDirectDrawSurface3_Lock(surface3, NULL, &ddsd, 0, NULL); - ok(SUCCEEDED(hr), "Failed to lock surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to lock surface, hr %#lx.\n", hr); ok(!(ddsd.dwFlags & DDSD_LPSURFACE), "DDSD_LPSURFACE is set.\n"); ok(ddsd.lpSurface == data, "lpSurface is %p, expected %p.\n", data, data); hr = IDirectDrawSurface3_Unlock(surface3, NULL); - ok(SUCCEEDED(hr), "Failed to unlock surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to unlock surface, hr %#lx.\n", hr);
reset_ddsd(&ddsd); ddsd.dwFlags = DDSD_LPSURFACE; ddsd.lpSurface = data; hr = IDirectDrawSurface3_SetSurfaceDesc(surface3, &ddsd, 1); - ok(hr == DDERR_INVALIDPARAMS, "SetSurfaceDesc with flags=1 returned %#x.\n", hr); + ok(hr == DDERR_INVALIDPARAMS, "SetSurfaceDesc with flags=1 returned %#lx.\n", hr);
ddsd.lpSurface = NULL; hr = IDirectDrawSurface3_SetSurfaceDesc(surface3, &ddsd, 0); - ok(hr == DDERR_INVALIDPARAMS, "Setting lpSurface=NULL returned %#x.\n", hr); + ok(hr == DDERR_INVALIDPARAMS, "Setting lpSurface=NULL returned %#lx.\n", hr);
hr = IDirectDrawSurface3_SetSurfaceDesc(surface3, NULL, 0); - ok(hr == DDERR_INVALIDPARAMS, "SetSurfaceDesc with NULL desc returned %#x.\n", hr); + ok(hr == DDERR_INVALIDPARAMS, "SetSurfaceDesc with NULL desc returned %#lx.\n", hr);
hr = IDirectDrawSurface3_GetSurfaceDesc(surface3, &ddsd); - ok(SUCCEEDED(hr), "Failed to get surface desc, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get surface desc, hr %#lx.\n", hr); ok(ddsd.ddsCaps.dwCaps == (DDSCAPS_SYSTEMMEMORY | DDSCAPS_OFFSCREENPLAIN), - "Got unexpected caps %#x.\n", ddsd.ddsCaps.dwCaps); + "Got unexpected caps %#lx.\n", ddsd.ddsCaps.dwCaps);
/* Setting the caps is an error. This also means the original description cannot be reapplied. */ hr = IDirectDrawSurface3_SetSurfaceDesc(surface3, &ddsd, 0); - ok(hr == DDERR_INVALIDPARAMS, "Setting the original desc returned %#x.\n", hr); + ok(hr == DDERR_INVALIDPARAMS, "Setting the original desc returned %#lx.\n", hr);
ddsd.dwFlags = DDSD_CAPS; hr = IDirectDrawSurface3_SetSurfaceDesc(surface3, &ddsd, 0); - ok(hr == DDERR_INVALIDPARAMS, "Setting DDSD_CAPS returned %#x.\n", hr); + ok(hr == DDERR_INVALIDPARAMS, "Setting DDSD_CAPS returned %#lx.\n", hr);
/* dwCaps = 0 is allowed, but ignored. */ ddsd.dwFlags = DDSD_CAPS | DDSD_LPSURFACE; ddsd.lpSurface = data; hr = IDirectDrawSurface3_SetSurfaceDesc(surface3, &ddsd, 0); - ok(hr == DDERR_INVALIDCAPS, "Setting DDSD_CAPS returned %#x.\n", hr); + ok(hr == DDERR_INVALIDCAPS, "Setting DDSD_CAPS returned %#lx.\n", hr); ddsd.ddsCaps.dwCaps = DDSCAPS_SYSTEMMEMORY | DDSCAPS_OFFSCREENPLAIN; hr = IDirectDrawSurface3_SetSurfaceDesc(surface3, &ddsd, 0); - ok(hr == DDERR_INVALIDCAPS, "Setting DDSD_CAPS returned %#x.\n", hr); + ok(hr == DDERR_INVALIDCAPS, "Setting DDSD_CAPS returned %#lx.\n", hr); ddsd.ddsCaps.dwCaps = 0; hr = IDirectDrawSurface3_SetSurfaceDesc(surface3, &ddsd, 0); - ok(SUCCEEDED(hr), "Failed to set surface desc, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set surface desc, hr %#lx.\n", hr);
hr = IDirectDrawSurface3_GetSurfaceDesc(surface3, &ddsd); - ok(SUCCEEDED(hr), "Failed to get surface desc, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get surface desc, hr %#lx.\n", hr); ok(ddsd.ddsCaps.dwCaps == (DDSCAPS_SYSTEMMEMORY | DDSCAPS_OFFSCREENPLAIN), - "Got unexpected caps %#x.\n", ddsd.ddsCaps.dwCaps); + "Got unexpected caps %#lx.\n", ddsd.ddsCaps.dwCaps);
/* Setting the height is allowed, but it cannot be set to 0, and only if LPSURFACE is set too. */ reset_ddsd(&ddsd); ddsd.dwFlags = DDSD_HEIGHT; ddsd.dwHeight = 16; hr = IDirectDrawSurface3_SetSurfaceDesc(surface3, &ddsd, 0); - ok(hr == DDERR_INVALIDPARAMS, "Setting height without lpSurface returned %#x.\n", hr); + ok(hr == DDERR_INVALIDPARAMS, "Setting height without lpSurface returned %#lx.\n", hr);
ddsd.lpSurface = data; ddsd.dwFlags = DDSD_HEIGHT | DDSD_LPSURFACE; hr = IDirectDrawSurface3_SetSurfaceDesc(surface3, &ddsd, 0); - ok(SUCCEEDED(hr), "Failed to set surface desc, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set surface desc, hr %#lx.\n", hr);
ddsd.dwHeight = 0; hr = IDirectDrawSurface3_SetSurfaceDesc(surface3, &ddsd, 0); - ok(hr == DDERR_INVALIDPARAMS, "Setting height=0 returned %#x.\n", hr); + ok(hr == DDERR_INVALIDPARAMS, "Setting height=0 returned %#lx.\n", hr);
reset_ddsd(&ddsd); hr = IDirectDrawSurface3_GetSurfaceDesc(surface3, &ddsd); - ok(SUCCEEDED(hr), "GetSurfaceDesc failed, hr %#x.\n", hr); - ok(ddsd.dwWidth == 8, "SetSurfaceDesc: Expected width 8, got %u.\n", ddsd.dwWidth); - ok(ddsd.dwHeight == 16, "SetSurfaceDesc: Expected height 16, got %u.\n", ddsd.dwHeight); + ok(SUCCEEDED(hr), "GetSurfaceDesc failed, hr %#lx.\n", hr); + ok(ddsd.dwWidth == 8, "SetSurfaceDesc: Expected width 8, got %lu.\n", ddsd.dwWidth); + ok(ddsd.dwHeight == 16, "SetSurfaceDesc: Expected height 16, got %lu.\n", ddsd.dwHeight);
/* Pitch and width can be set, but only together, and only with LPSURFACE. They must not be 0. */ reset_ddsd(&ddsd); ddsd.dwFlags = DDSD_PITCH; U1(ddsd).lPitch = 8 * 4; hr = IDirectDrawSurface3_SetSurfaceDesc(surface3, &ddsd, 0); - ok(hr == DDERR_INVALIDPARAMS, "Setting pitch without lpSurface or width returned %#x.\n", hr); + ok(hr == DDERR_INVALIDPARAMS, "Setting pitch without lpSurface or width returned %#lx.\n", hr);
ddsd.dwFlags = DDSD_WIDTH; ddsd.dwWidth = 16; hr = IDirectDrawSurface3_SetSurfaceDesc(surface3, &ddsd, 0); - ok(hr == DDERR_INVALIDPARAMS, "Setting width without lpSurface or pitch returned %#x.\n", hr); + ok(hr == DDERR_INVALIDPARAMS, "Setting width without lpSurface or pitch returned %#lx.\n", hr);
ddsd.dwFlags = DDSD_PITCH | DDSD_LPSURFACE; ddsd.lpSurface = data; hr = IDirectDrawSurface3_SetSurfaceDesc(surface3, &ddsd, 0); - ok(hr == DDERR_INVALIDPARAMS, "Setting pitch and lpSurface without width returned %#x.\n", hr); + ok(hr == DDERR_INVALIDPARAMS, "Setting pitch and lpSurface without width returned %#lx.\n", hr);
ddsd.dwFlags = DDSD_WIDTH | DDSD_LPSURFACE; hr = IDirectDrawSurface3_SetSurfaceDesc(surface3, &ddsd, 0); - ok(hr == DDERR_INVALIDPARAMS, "Setting width and lpSurface without pitch returned %#x.\n", hr); + ok(hr == DDERR_INVALIDPARAMS, "Setting width and lpSurface without pitch returned %#lx.\n", hr);
ddsd.dwFlags = DDSD_WIDTH | DDSD_PITCH | DDSD_LPSURFACE; U1(ddsd).lPitch = 16 * 4; ddsd.dwWidth = 16; hr = IDirectDrawSurface3_SetSurfaceDesc(surface3, &ddsd, 0); - ok(SUCCEEDED(hr), "Failed to set surface desc, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set surface desc, hr %#lx.\n", hr);
reset_ddsd(&ddsd); hr = IDirectDrawSurface3_GetSurfaceDesc(surface3, &ddsd); - ok(SUCCEEDED(hr), "Failed to get surface desc, hr %#x.\n", hr); - ok(ddsd.dwWidth == 16, "SetSurfaceDesc: Expected width 8, got %u.\n", ddsd.dwWidth); - ok(ddsd.dwHeight == 16, "SetSurfaceDesc: Expected height 16, got %u.\n", ddsd.dwHeight); - ok(U1(ddsd).lPitch == 16 * 4, "SetSurfaceDesc: Expected pitch 64, got %u.\n", U1(ddsd).lPitch); + ok(SUCCEEDED(hr), "Failed to get surface desc, hr %#lx.\n", hr); + ok(ddsd.dwWidth == 16, "SetSurfaceDesc: Expected width 8, got %lu.\n", ddsd.dwWidth); + ok(ddsd.dwHeight == 16, "SetSurfaceDesc: Expected height 16, got %lu.\n", ddsd.dwHeight); + ok(U1(ddsd).lPitch == 16 * 4, "SetSurfaceDesc: Expected pitch 64, got %lu.\n", U1(ddsd).lPitch);
/* The pitch must be 32 bit aligned and > 0, but is not verified for sanity otherwise. * @@ -6119,27 +6119,27 @@ static void test_set_surface_desc(void) U1(ddsd).lPitch = 4 * 4; ddsd.lpSurface = data; hr = IDirectDrawSurface3_SetSurfaceDesc(surface3, &ddsd, 0); - ok(SUCCEEDED(hr) || broken(hr == DDERR_INVALIDPARAMS), "Failed to set surface desc, hr %#x.\n", hr); + ok(SUCCEEDED(hr) || broken(hr == DDERR_INVALIDPARAMS), "Failed to set surface desc, hr %#lx.\n", hr);
U1(ddsd).lPitch = 4; hr = IDirectDrawSurface3_SetSurfaceDesc(surface3, &ddsd, 0); - ok(SUCCEEDED(hr) || broken(hr == DDERR_INVALIDPARAMS), "Failed to set surface desc, hr %#x.\n", hr); + ok(SUCCEEDED(hr) || broken(hr == DDERR_INVALIDPARAMS), "Failed to set surface desc, hr %#lx.\n", hr);
U1(ddsd).lPitch = 16 * 4 + 1; hr = IDirectDrawSurface3_SetSurfaceDesc(surface3, &ddsd, 0); - ok(hr == DDERR_INVALIDPARAMS, "Setting misaligned pitch returned %#x.\n", hr); + ok(hr == DDERR_INVALIDPARAMS, "Setting misaligned pitch returned %#lx.\n", hr);
U1(ddsd).lPitch = 16 * 4 + 3; hr = IDirectDrawSurface3_SetSurfaceDesc(surface3, &ddsd, 0); - ok(hr == DDERR_INVALIDPARAMS, "Setting misaligned pitch returned %#x.\n", hr); + ok(hr == DDERR_INVALIDPARAMS, "Setting misaligned pitch returned %#lx.\n", hr);
U1(ddsd).lPitch = -4; hr = IDirectDrawSurface3_SetSurfaceDesc(surface3, &ddsd, 0); - ok(hr == DDERR_INVALIDPARAMS, "Setting negative pitch returned %#x.\n", hr); + ok(hr == DDERR_INVALIDPARAMS, "Setting negative pitch returned %#lx.\n", hr);
U1(ddsd).lPitch = 16 * 4; hr = IDirectDrawSurface3_SetSurfaceDesc(surface3, &ddsd, 0); - ok(SUCCEEDED(hr), "Failed to set surface desc, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set surface desc, hr %#lx.\n", hr);
reset_ddsd(&ddsd); ddsd.dwFlags = DDSD_WIDTH | DDSD_PITCH | DDSD_LPSURFACE; @@ -6147,13 +6147,13 @@ static void test_set_surface_desc(void) ddsd.dwWidth = 16; ddsd.lpSurface = data; hr = IDirectDrawSurface3_SetSurfaceDesc(surface3, &ddsd, 0); - ok(hr == DDERR_INVALIDPARAMS, "Setting zero pitch returned %#x.\n", hr); + ok(hr == DDERR_INVALIDPARAMS, "Setting zero pitch returned %#lx.\n", hr);
ddsd.dwFlags = DDSD_WIDTH | DDSD_PITCH | DDSD_LPSURFACE; U1(ddsd).lPitch = 16 * 4; ddsd.dwWidth = 0; hr = IDirectDrawSurface3_SetSurfaceDesc(surface3, &ddsd, 0); - ok(hr == DDERR_INVALIDPARAMS, "Setting zero width returned %#x.\n", hr); + ok(hr == DDERR_INVALIDPARAMS, "Setting zero width returned %#lx.\n", hr);
/* Setting the pixelformat without LPSURFACE is an error, but with LPSURFACE it works. */ ddsd.dwFlags = DDSD_PIXELFORMAT; @@ -6164,11 +6164,11 @@ static void test_set_surface_desc(void) U3(ddsd.ddpfPixelFormat).dwGBitMask = 0x0000ff00; U4(ddsd.ddpfPixelFormat).dwBBitMask = 0x000000ff; hr = IDirectDrawSurface3_SetSurfaceDesc(surface3, &ddsd, 0); - ok(hr == DDERR_INVALIDPARAMS, "Setting the pixel format returned %#x.\n", hr); + ok(hr == DDERR_INVALIDPARAMS, "Setting the pixel format returned %#lx.\n", hr);
ddsd.dwFlags = DDSD_PIXELFORMAT | DDSD_LPSURFACE; hr = IDirectDrawSurface3_SetSurfaceDesc(surface3, &ddsd, 0); - ok(SUCCEEDED(hr), "Failed to set surface desc, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set surface desc, hr %#lx.\n", hr);
/* Can't set color keys. */ reset_ddsd(&ddsd); @@ -6176,12 +6176,12 @@ static void test_set_surface_desc(void) ddsd.ddckCKSrcBlt.dwColorSpaceLowValue = 0x00ff0000; ddsd.ddckCKSrcBlt.dwColorSpaceHighValue = 0x00ff0000; hr = IDirectDrawSurface3_SetSurfaceDesc(surface3, &ddsd, 0); - ok(hr == DDERR_INVALIDPARAMS, "Setting ddckCKSrcBlt returned %#x.\n", hr); + ok(hr == DDERR_INVALIDPARAMS, "Setting ddckCKSrcBlt returned %#lx.\n", hr);
ddsd.dwFlags = DDSD_CKSRCBLT | DDSD_LPSURFACE; ddsd.lpSurface = data; hr = IDirectDrawSurface3_SetSurfaceDesc(surface3, &ddsd, 0); - ok(hr == DDERR_INVALIDPARAMS, "Setting ddckCKSrcBlt returned %#x.\n", hr); + ok(hr == DDERR_INVALIDPARAMS, "Setting ddckCKSrcBlt returned %#lx.\n", hr);
IDirectDrawSurface3_Release(surface3);
@@ -6193,7 +6193,7 @@ static void test_set_surface_desc(void) U2(ddsd).dwMipMapCount = 3; ddsd.ddsCaps.dwCaps = DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_COMPLEX | DDSCAPS_MIPMAP; hr = IDirectDraw2_CreateSurface(ddraw, &ddsd, &surface, NULL); - ok(hr == DD_OK || hr == DDERR_NODIRECTDRAWHW || hr == E_NOINTERFACE, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK || hr == DDERR_NODIRECTDRAWHW || hr == E_NOINTERFACE, "Got unexpected hr %#lx.\n", hr);
if (FAILED(hr)) { @@ -6202,19 +6202,19 @@ static void test_set_surface_desc(void) else { hr = IDirectDrawSurface_QueryInterface(surface, &IID_IDirectDrawSurface3, (void **)&surface3); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); IDirectDrawSurface_Release(surface);
/* Changing surface desc for mipmap fails even without changing any * parameters. */ hr = IDirectDrawSurface3_SetSurfaceDesc(surface3, &ddsd, 0); - ok(hr == DDERR_INVALIDSURFACETYPE, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_INVALIDSURFACETYPE, "Got unexpected hr %#lx.\n", hr);
reset_ddsd(&ddsd); ddsd.dwFlags = DDSD_LPSURFACE; ddsd.lpSurface = data; hr = IDirectDrawSurface3_SetSurfaceDesc(surface3, &ddsd, 0); - ok(hr == DDERR_INVALIDSURFACETYPE, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_INVALIDSURFACETYPE, "Got unexpected hr %#lx.\n", hr); IDirectDrawSurface3_Release(surface3); }
@@ -6227,7 +6227,7 @@ static void test_set_surface_desc(void) ddsd.ddsCaps.dwCaps = DDSCAPS_TEXTURE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_COMPLEX | DDSCAPS_MIPMAP;
hr = IDirectDraw2_CreateSurface(ddraw, &ddsd, &surface, NULL); - ok(hr == DD_OK || hr == DDERR_NODIRECTDRAWHW || hr == E_NOINTERFACE, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK || hr == DDERR_NODIRECTDRAWHW || hr == E_NOINTERFACE, "Got unexpected hr %#lx.\n", hr);
if (hr == DD_OK) { @@ -6235,15 +6235,15 @@ static void test_set_surface_desc(void) IDirectDrawSurface3 *surface2;
hr = IDirectDrawSurface_QueryInterface(surface, &IID_IDirectDrawSurface3, (void **)&surface3); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); IDirectDrawSurface_Release(surface);
hr = IDirectDrawSurface3_GetAttachedSurface(surface3, &caps, &surface2); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); reset_ddsd(&ddsd); hr = IDirectDrawSurface3_GetSurfaceDesc(surface2, &ddsd); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); - ok(ddsd.dwWidth == 4, "Got unexpected dwWidth %u.\n", ddsd.dwWidth); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); + ok(ddsd.dwWidth == 4, "Got unexpected dwWidth %lu.\n", ddsd.dwWidth);
reset_ddsd(&ddsd); ddsd.dwFlags = DDSD_WIDTH | DDSD_HEIGHT | DDSD_PITCH | DDSD_LPSURFACE; @@ -6252,7 +6252,7 @@ static void test_set_surface_desc(void) U1(ddsd).lPitch = 16 * 4; ddsd.lpSurface = data; hr = IDirectDrawSurface3_SetSurfaceDesc(surface3, &ddsd, 0); - todo_wine ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + todo_wine ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr);
reset_ddsd(&ddsd); ddsd.dwFlags = DDSD_WIDTH | DDSD_HEIGHT | DDSD_PITCH | DDSD_LPSURFACE; @@ -6261,13 +6261,13 @@ static void test_set_surface_desc(void) U1(ddsd).lPitch = 8 * 4; ddsd.lpSurface = data; hr = IDirectDrawSurface3_SetSurfaceDesc(surface3, &ddsd, 0); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); if (0) { /* _Lock causes access violation on Windows. */ reset_ddsd(&ddsd); hr = IDirectDrawSurface3_Lock(surface2, NULL, &ddsd, DDLOCK_WAIT, NULL); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); IDirectDrawSurface3_Unlock(surface2, NULL); }
@@ -6281,7 +6281,7 @@ static void test_set_surface_desc(void) U1(ddsd).lPitch = 4 * 4; ddsd.lpSurface = data; hr = IDirectDrawSurface3_SetSurfaceDesc(surface2, &ddsd, 0); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); } IDirectDrawSurface3_Release(surface2); IDirectDrawSurface3_Release(surface3); @@ -6296,7 +6296,7 @@ static void test_set_surface_desc(void) U1(ddsd).lPitch = 8 * 4; ddsd.ddsCaps.dwCaps = DDSCAPS_SYSTEMMEMORY | DDSCAPS_OFFSCREENPLAIN; hr = IDirectDraw2_CreateSurface(ddraw, &ddsd, &surface, NULL); - ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#lx.\n", hr);
/* SetSurfaceDesc needs systemmemory surfaces. * @@ -6320,7 +6320,7 @@ static void test_set_surface_desc(void) }
hr = IDirectDraw2_CreateSurface(ddraw, &ddsd, &surface, NULL); - ok(hr == DD_OK || hr == DDERR_NODIRECTDRAWHW, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK || hr == DDERR_NODIRECTDRAWHW, "Got unexpected hr %#lx.\n", hr); if (FAILED(hr)) { skip("Cannot create a %s surface, skipping vidmem SetSurfaceDesc test.\n", @@ -6328,7 +6328,7 @@ static void test_set_surface_desc(void) goto done; } hr = IDirectDrawSurface_QueryInterface(surface, &IID_IDirectDrawSurface3, (void **)&surface3); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); IDirectDrawSurface_Release(surface);
reset_ddsd(&ddsd); @@ -6337,17 +6337,17 @@ static void test_set_surface_desc(void) hr = IDirectDrawSurface3_SetSurfaceDesc(surface3, &ddsd, 0); if (invalid_caps_tests[i].supported) { - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); } else { - ok(hr == DDERR_INVALIDSURFACETYPE, "SetSurfaceDesc on a %s surface returned %#x.\n", + ok(hr == DDERR_INVALIDSURFACETYPE, "SetSurfaceDesc on a %s surface returned %#lx.\n", invalid_caps_tests[i].name, hr);
/* Check priority of error conditions. */ ddsd.dwFlags = DDSD_WIDTH; hr = IDirectDrawSurface3_SetSurfaceDesc(surface3, &ddsd, 0); - ok(hr == DDERR_INVALIDSURFACETYPE, "SetSurfaceDesc on a %s surface returned %#x.\n", + ok(hr == DDERR_INVALIDSURFACETYPE, "SetSurfaceDesc on a %s surface returned %#lx.\n", invalid_caps_tests[i].name, hr); }
@@ -6356,7 +6356,7 @@ static void test_set_surface_desc(void)
done: ref = IDirectDraw2_Release(ddraw); - ok(ref == 0, "Ddraw object not properly released, refcount %u.\n", ref); + ok(ref == 0, "Ddraw object not properly released, refcount %lu.\n", ref); DestroyWindow(window); }
@@ -6381,7 +6381,7 @@ static void test_user_memory_getdc(void) ok(!!ddraw, "Failed to create a ddraw object.\n");
hr = IDirectDraw2_SetCooperativeLevel(ddraw, window, DDSCL_NORMAL); - ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#lx.\n", hr);
reset_ddsd(&ddsd); ddsd.dwFlags = DDSD_WIDTH | DDSD_HEIGHT | DDSD_CAPS | DDSD_PIXELFORMAT; @@ -6395,10 +6395,10 @@ static void test_user_memory_getdc(void) U4(ddsd.ddpfPixelFormat).dwBBitMask = 0x000000ff; ddsd.ddsCaps.dwCaps = DDSCAPS_SYSTEMMEMORY | DDSCAPS_OFFSCREENPLAIN; hr = IDirectDraw2_CreateSurface(ddraw, &ddsd, &surface, NULL); - ok(SUCCEEDED(hr), "Failed to create surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create surface, hr %#lx.\n", hr);
hr = IDirectDrawSurface_QueryInterface(surface, &IID_IDirectDrawSurface3, (void **)&surface3); - ok(SUCCEEDED(hr), "Failed to get IDirectDrawSurface3 interface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get IDirectDrawSurface3 interface, hr %#lx.\n", hr); IDirectDrawSurface_Release(surface);
memset(data, 0xaa, sizeof(data)); @@ -6406,10 +6406,10 @@ static void test_user_memory_getdc(void) ddsd.dwFlags = DDSD_LPSURFACE; ddsd.lpSurface = data; hr = IDirectDrawSurface3_SetSurfaceDesc(surface3, &ddsd, 0); - ok(SUCCEEDED(hr), "Failed to set surface desc, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set surface desc, hr %#lx.\n", hr);
hr = IDirectDrawSurface3_GetDC(surface3, &dc); - ok(SUCCEEDED(hr), "Failed to get DC, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get DC, hr %#lx.\n", hr); bitmap = GetCurrentObject(dc, OBJ_BITMAP); ok(!!bitmap, "Failed to get bitmap.\n"); size = GetObjectA(bitmap, sizeof(dib), &dib); @@ -6418,10 +6418,10 @@ static void test_user_memory_getdc(void) BitBlt(dc, 0, 0, 16, 8, NULL, 0, 0, WHITENESS); BitBlt(dc, 0, 8, 16, 8, NULL, 0, 0, BLACKNESS); hr = IDirectDrawSurface3_ReleaseDC(surface3, dc); - ok(SUCCEEDED(hr), "Failed to release DC, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to release DC, hr %#lx.\n", hr);
- ok(data[0][0] == 0xffffffff, "Expected color 0xffffffff, got %#x.\n", data[0][0]); - ok(data[15][15] == 0x00000000, "Expected color 0x00000000, got %#x.\n", data[15][15]); + ok(data[0][0] == 0xffffffff, "Expected color 0xffffffff, got %#lx.\n", data[0][0]); + ok(data[15][15] == 0x00000000, "Expected color 0x00000000, got %#lx.\n", data[15][15]);
ddsd.dwFlags = DDSD_LPSURFACE | DDSD_HEIGHT | DDSD_WIDTH | DDSD_PITCH; ddsd.lpSurface = data; @@ -6429,40 +6429,40 @@ static void test_user_memory_getdc(void) ddsd.dwHeight = 8; U1(ddsd).lPitch = sizeof(*data); hr = IDirectDrawSurface3_SetSurfaceDesc(surface3, &ddsd, 0); - ok(SUCCEEDED(hr), "Failed to set surface desc, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set surface desc, hr %#lx.\n", hr);
memset(data, 0xaa, sizeof(data)); hr = IDirectDrawSurface3_GetDC(surface3, &dc); - ok(SUCCEEDED(hr), "Failed to get DC, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get DC, hr %#lx.\n", hr); BitBlt(dc, 0, 0, 4, 8, NULL, 0, 0, BLACKNESS); BitBlt(dc, 1, 1, 2, 2, NULL, 0, 0, WHITENESS); hr = IDirectDrawSurface3_ReleaseDC(surface3, dc); - ok(SUCCEEDED(hr), "Failed to release DC, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to release DC, hr %#lx.\n", hr);
for (y = 0; y < 4; y++) { for (x = 0; x < 4; x++) { if ((x == 1 || x == 2) && (y == 1 || y == 2)) - ok(data[y][x] == 0xffffffff, "Expected color 0xffffffff on position %ux%u, got %#x.\n", + ok(data[y][x] == 0xffffffff, "Expected color 0xffffffff on position %ux%u, got %#lx.\n", x, y, data[y][x]); else - ok(data[y][x] == 0x00000000, "Expected color 0xaaaaaaaa on position %ux%u, got %#x.\n", + ok(data[y][x] == 0x00000000, "Expected color 0xaaaaaaaa on position %ux%u, got %#lx.\n", x, y, data[y][x]); } } - ok(data[0][5] == 0xaaaaaaaa, "Expected color 0xaaaaaaaa on position 5x0, got %#x.\n", + ok(data[0][5] == 0xaaaaaaaa, "Expected color 0xaaaaaaaa on position 5x0, got %#lx.\n", data[0][5]); - ok(data[7][3] == 0x00000000, "Expected color 0x00000000 on position 3x7, got %#x.\n", + ok(data[7][3] == 0x00000000, "Expected color 0x00000000 on position 3x7, got %#lx.\n", data[7][3]); - ok(data[7][4] == 0xaaaaaaaa, "Expected color 0xaaaaaaaa on position 4x7, got %#x.\n", + ok(data[7][4] == 0xaaaaaaaa, "Expected color 0xaaaaaaaa on position 4x7, got %#lx.\n", data[7][4]); - ok(data[8][0] == 0xaaaaaaaa, "Expected color 0xaaaaaaaa on position 0x8, got %#x.\n", + ok(data[8][0] == 0xaaaaaaaa, "Expected color 0xaaaaaaaa on position 0x8, got %#lx.\n", data[8][0]);
IDirectDrawSurface3_Release(surface3); ref = IDirectDraw2_Release(ddraw); - ok(ref == 0, "Ddraw object not properly released, refcount %u.\n", ref); + ok(ref == 0, "Ddraw object not properly released, refcount %lu.\n", ref); DestroyWindow(window); }
@@ -6480,7 +6480,7 @@ static void test_sysmem_overlay(void) ok(!!ddraw, "Failed to create a ddraw object.\n");
hr = IDirectDraw2_SetCooperativeLevel(ddraw, window, DDSCL_NORMAL); - ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#lx.\n", hr);
reset_ddsd(&ddsd); ddsd.dwFlags = DDSD_CAPS | DDSD_PIXELFORMAT | DDSD_WIDTH | DDSD_HEIGHT; @@ -6494,10 +6494,10 @@ static void test_sysmem_overlay(void) U3(ddsd.ddpfPixelFormat).dwGBitMask = 0x0000ff00; U4(ddsd.ddpfPixelFormat).dwBBitMask = 0x000000ff; hr = IDirectDraw2_CreateSurface(ddraw, &ddsd, &surface, NULL); - ok(hr == DDERR_NOOVERLAYHW, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_NOOVERLAYHW, "Got unexpected hr %#lx.\n", hr);
ref = IDirectDraw2_Release(ddraw); - ok(ref == 0, "Ddraw object not properly released, refcount %u.\n", ref); + ok(ref == 0, "Ddraw object not properly released, refcount %lu.\n", ref); DestroyWindow(window); }
@@ -6525,7 +6525,7 @@ static void test_primary_palette(void) return; } hr = IDirectDraw2_SetCooperativeLevel(ddraw, window, DDSCL_EXCLUSIVE | DDSCL_FULLSCREEN); - ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#lx.\n", hr);
memset(&surface_desc, 0, sizeof(surface_desc)); surface_desc.dwSize = sizeof(surface_desc); @@ -6533,22 +6533,22 @@ static void test_primary_palette(void) surface_desc.ddsCaps.dwCaps = DDSCAPS_PRIMARYSURFACE | DDSCAPS_COMPLEX | DDSCAPS_FLIP; surface_desc.dwBackBufferCount = 1; hr = IDirectDraw2_CreateSurface(ddraw, &surface_desc, &primary, NULL); - ok(SUCCEEDED(hr), "Failed to create surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create surface, hr %#lx.\n", hr); hr = IDirectDrawSurface_GetAttachedSurface(primary, &surface_caps, &backbuffer); - ok(SUCCEEDED(hr), "Failed to get attached surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get attached surface, hr %#lx.\n", hr);
memset(palette_entries, 0, sizeof(palette_entries)); hr = IDirectDraw2_CreatePalette(ddraw, DDPCAPS_8BIT | DDPCAPS_ALLOW256, palette_entries, &palette, NULL); - ok(SUCCEEDED(hr), "Failed to create palette, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create palette, hr %#lx.\n", hr); refcount = get_refcount((IUnknown *)palette); - ok(refcount == 1, "Got unexpected refcount %u.\n", refcount); + ok(refcount == 1, "Got unexpected refcount %lu.\n", refcount);
hr = IDirectDrawPalette_GetCaps(palette, &palette_caps); - ok(SUCCEEDED(hr), "Failed to get palette caps, hr %#x.\n", hr); - ok(palette_caps == (DDPCAPS_8BIT | DDPCAPS_ALLOW256), "Got unexpected palette caps %#x.\n", palette_caps); + ok(SUCCEEDED(hr), "Failed to get palette caps, hr %#lx.\n", hr); + ok(palette_caps == (DDPCAPS_8BIT | DDPCAPS_ALLOW256), "Got unexpected palette caps %#lx.\n", palette_caps);
hr = IDirectDrawSurface_SetPalette(primary, palette); - ok(SUCCEEDED(hr), "Failed to set palette, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set palette, hr %#lx.\n", hr);
/* The Windows 8 testbot attaches the palette to the backbuffer as well, * and is generally somewhat broken with respect to 8 bpp / palette @@ -6561,99 +6561,99 @@ static void test_primary_palette(void) /* The Windows 8 testbot keeps extra references to the primary and * backbuffer while in 8 bpp mode. */ hr = IDirectDraw2_RestoreDisplayMode(ddraw); - ok(SUCCEEDED(hr), "Failed to restore display mode, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to restore display mode, hr %#lx.\n", hr); goto done; }
refcount = get_refcount((IUnknown *)palette); - ok(refcount == 2, "Got unexpected refcount %u.\n", refcount); + ok(refcount == 2, "Got unexpected refcount %lu.\n", refcount);
hr = IDirectDrawPalette_GetCaps(palette, &palette_caps); - ok(SUCCEEDED(hr), "Failed to get palette caps, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get palette caps, hr %#lx.\n", hr); ok(palette_caps == (DDPCAPS_8BIT | DDPCAPS_PRIMARYSURFACE | DDPCAPS_ALLOW256), - "Got unexpected palette caps %#x.\n", palette_caps); + "Got unexpected palette caps %#lx.\n", palette_caps);
hr = IDirectDrawSurface_SetPalette(primary, NULL); - ok(SUCCEEDED(hr), "Failed to set palette, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set palette, hr %#lx.\n", hr); refcount = get_refcount((IUnknown *)palette); - ok(refcount == 1, "Got unexpected refcount %u.\n", refcount); + ok(refcount == 1, "Got unexpected refcount %lu.\n", refcount);
hr = IDirectDrawPalette_GetCaps(palette, &palette_caps); - ok(SUCCEEDED(hr), "Failed to get palette caps, hr %#x.\n", hr); - ok(palette_caps == (DDPCAPS_8BIT | DDPCAPS_ALLOW256), "Got unexpected palette caps %#x.\n", palette_caps); + ok(SUCCEEDED(hr), "Failed to get palette caps, hr %#lx.\n", hr); + ok(palette_caps == (DDPCAPS_8BIT | DDPCAPS_ALLOW256), "Got unexpected palette caps %#lx.\n", palette_caps);
hr = IDirectDrawSurface_SetPalette(primary, palette); - ok(SUCCEEDED(hr), "Failed to set palette, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set palette, hr %#lx.\n", hr); refcount = get_refcount((IUnknown *)palette); - ok(refcount == 2, "Got unexpected refcount %u.\n", refcount); + ok(refcount == 2, "Got unexpected refcount %lu.\n", refcount);
hr = IDirectDrawSurface_GetPalette(primary, &tmp); - ok(SUCCEEDED(hr), "Failed to get palette, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get palette, hr %#lx.\n", hr); ok(tmp == palette, "Got unexpected palette %p, expected %p.\n", tmp, palette); IDirectDrawPalette_Release(tmp); hr = IDirectDrawSurface_GetPalette(backbuffer, &tmp); - ok(hr == DDERR_NOPALETTEATTACHED, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_NOPALETTEATTACHED, "Got unexpected hr %#lx.\n", hr);
refcount = IDirectDrawPalette_Release(palette); - ok(refcount == 1, "Got unexpected refcount %u.\n", refcount); + ok(refcount == 1, "Got unexpected refcount %lu.\n", refcount); refcount = IDirectDrawPalette_Release(palette); - ok(!refcount, "Got unexpected refcount %u.\n", refcount); + ok(!refcount, "Got unexpected refcount %lu.\n", refcount);
/* Note that this only seems to work when the palette is attached to the * primary surface. When attached to a regular surface, attempting to get * the palette here will cause an access violation. */ hr = IDirectDrawSurface_GetPalette(primary, &tmp); - ok(hr == DDERR_NOPALETTEATTACHED, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_NOPALETTEATTACHED, "Got unexpected hr %#lx.\n", hr);
hr = IDirectDrawSurface_IsLost(primary); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr);
memset(&surface_desc, 0, sizeof(surface_desc)); surface_desc.dwSize = sizeof(surface_desc); hr = IDirectDrawSurface_GetSurfaceDesc(primary, &surface_desc); - ok(SUCCEEDED(hr), "Failed to get surface desc, hr %#x.\n", hr); - ok(surface_desc.dwWidth == 640, "Got unexpected surface width %u.\n", surface_desc.dwWidth); - ok(surface_desc.dwHeight == 480, "Got unexpected surface height %u.\n", surface_desc.dwHeight); - ok(U1(surface_desc.ddpfPixelFormat).dwRGBBitCount == 8, "Got unexpected bit count %u.\n", + ok(SUCCEEDED(hr), "Failed to get surface desc, hr %#lx.\n", hr); + ok(surface_desc.dwWidth == 640, "Got unexpected surface width %lu.\n", surface_desc.dwWidth); + ok(surface_desc.dwHeight == 480, "Got unexpected surface height %lu.\n", surface_desc.dwHeight); + ok(U1(surface_desc.ddpfPixelFormat).dwRGBBitCount == 8, "Got unexpected bit count %lu.\n", U1(surface_desc.ddpfPixelFormat).dwRGBBitCount);
hr = set_display_mode(ddraw, 640, 480); - ok(SUCCEEDED(hr), "Failed to set display mode, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set display mode, hr %#lx.\n", hr);
memset(&surface_desc, 0, sizeof(surface_desc)); surface_desc.dwSize = sizeof(surface_desc); hr = IDirectDrawSurface_GetSurfaceDesc(primary, &surface_desc); - ok(SUCCEEDED(hr), "Failed to get surface desc, hr %#x.\n", hr); - ok(surface_desc.dwWidth == 640, "Got unexpected surface width %u.\n", surface_desc.dwWidth); - ok(surface_desc.dwHeight == 480, "Got unexpected surface height %u.\n", surface_desc.dwHeight); + ok(SUCCEEDED(hr), "Failed to get surface desc, hr %#lx.\n", hr); + ok(surface_desc.dwWidth == 640, "Got unexpected surface width %lu.\n", surface_desc.dwWidth); + ok(surface_desc.dwHeight == 480, "Got unexpected surface height %lu.\n", surface_desc.dwHeight); ok(U1(surface_desc.ddpfPixelFormat).dwRGBBitCount == 32 || U1(surface_desc.ddpfPixelFormat).dwRGBBitCount == 24, - "Got unexpected bit count %u.\n", U1(surface_desc.ddpfPixelFormat).dwRGBBitCount); + "Got unexpected bit count %lu.\n", U1(surface_desc.ddpfPixelFormat).dwRGBBitCount);
hr = IDirectDrawSurface_IsLost(primary); - ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface_Restore(primary); - ok(hr == DDERR_WRONGMODE, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_WRONGMODE, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface_IsLost(primary); - ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#lx.\n", hr);
memset(&surface_desc, 0, sizeof(surface_desc)); surface_desc.dwSize = sizeof(surface_desc); hr = IDirectDrawSurface_GetSurfaceDesc(primary, &surface_desc); - ok(SUCCEEDED(hr), "Failed to get surface desc, hr %#x.\n", hr); - ok(surface_desc.dwWidth == 640, "Got unexpected surface width %u.\n", surface_desc.dwWidth); - ok(surface_desc.dwHeight == 480, "Got unexpected surface height %u.\n", surface_desc.dwHeight); + ok(SUCCEEDED(hr), "Failed to get surface desc, hr %#lx.\n", hr); + ok(surface_desc.dwWidth == 640, "Got unexpected surface width %lu.\n", surface_desc.dwWidth); + ok(surface_desc.dwHeight == 480, "Got unexpected surface height %lu.\n", surface_desc.dwHeight); ok(U1(surface_desc.ddpfPixelFormat).dwRGBBitCount == 32 || U1(surface_desc.ddpfPixelFormat).dwRGBBitCount == 24, - "Got unexpected bit count %u.\n", U1(surface_desc.ddpfPixelFormat).dwRGBBitCount); + "Got unexpected bit count %lu.\n", U1(surface_desc.ddpfPixelFormat).dwRGBBitCount);
done: refcount = IDirectDrawSurface_Release(backbuffer); - ok(refcount == 1, "Got unexpected refcount %u.\n", refcount); + ok(refcount == 1, "Got unexpected refcount %lu.\n", refcount); refcount = IDirectDrawSurface_Release(primary); - ok(!refcount, "Got unexpected refcount %u.\n", refcount); + ok(!refcount, "Got unexpected refcount %lu.\n", refcount); refcount = IDirectDraw2_Release(ddraw); - ok(!refcount, "Got unexpected refcount %u.\n", refcount); + ok(!refcount, "Got unexpected refcount %lu.\n", refcount); DestroyWindow(window); }
@@ -6682,7 +6682,7 @@ static void test_surface_attachment(void) ddraw = create_ddraw(); ok(!!ddraw, "Failed to create a ddraw object.\n"); hr = IDirectDraw2_SetCooperativeLevel(ddraw, window, DDSCL_NORMAL); - ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#lx.\n", hr);
memset(&surface_desc, 0, sizeof(surface_desc)); surface_desc.dwSize = sizeof(surface_desc); @@ -6692,14 +6692,14 @@ static void test_surface_attachment(void) surface_desc.dwWidth = 128; surface_desc.dwHeight = 128; hr = IDirectDraw2_CreateSurface(ddraw, &surface_desc, &surface1, NULL); - ok(SUCCEEDED(hr), "Failed to create surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create surface, hr %#lx.\n", hr);
hr = IDirectDrawSurface_GetAttachedSurface(surface1, &caps, &surface2); - ok(SUCCEEDED(hr), "Failed to get mip level, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get mip level, hr %#lx.\n", hr); hr = IDirectDrawSurface_GetAttachedSurface(surface2, &caps, &surface3); - ok(SUCCEEDED(hr), "Failed to get mip level, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get mip level, hr %#lx.\n", hr); hr = IDirectDrawSurface_GetAttachedSurface(surface3, &caps, &surface4); - ok(hr == DDERR_NOTFOUND, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_NOTFOUND, "Got unexpected hr %#lx.\n", hr);
surface_count = 0; IDirectDrawSurface_EnumAttachedSurfaces(surface1, &surface_count, surface_counter); @@ -6718,20 +6718,20 @@ static void test_surface_attachment(void) surface_desc.dwWidth = 16; surface_desc.dwHeight = 16; hr = IDirectDraw2_CreateSurface(ddraw, &surface_desc, &surface4, NULL); - ok(SUCCEEDED(hr), "Failed to create surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create surface, hr %#lx.\n", hr);
hr = IDirectDrawSurface_AddAttachedSurface(surface1, surface4); - ok(hr == DDERR_CANNOTATTACHSURFACE, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_CANNOTATTACHSURFACE, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface_AddAttachedSurface(surface4, surface1); - ok(hr == DDERR_CANNOTATTACHSURFACE, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_CANNOTATTACHSURFACE, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface_AddAttachedSurface(surface3, surface4); - ok(hr == DDERR_CANNOTATTACHSURFACE, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_CANNOTATTACHSURFACE, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface_AddAttachedSurface(surface4, surface3); - ok(hr == DDERR_CANNOTATTACHSURFACE, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_CANNOTATTACHSURFACE, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface_AddAttachedSurface(surface2, surface4); - ok(hr == DDERR_CANNOTATTACHSURFACE, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_CANNOTATTACHSURFACE, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface_AddAttachedSurface(surface4, surface2); - ok(hr == DDERR_CANNOTATTACHSURFACE, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_CANNOTATTACHSURFACE, "Got unexpected hr %#lx.\n", hr);
IDirectDrawSurface_Release(surface4);
@@ -6742,27 +6742,27 @@ static void test_surface_attachment(void) surface_desc.dwWidth = 16; surface_desc.dwHeight = 16; hr = IDirectDraw2_CreateSurface(ddraw, &surface_desc, &surface4, NULL); - ok(SUCCEEDED(hr), "Failed to create surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create surface, hr %#lx.\n", hr);
if (SUCCEEDED(hr = IDirectDrawSurface_AddAttachedSurface(surface1, surface4))) { skip("Running on refrast, skipping some tests.\n"); hr = IDirectDrawSurface_DeleteAttachedSurface(surface1, 0, surface4); - ok(SUCCEEDED(hr), "Failed to detach surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to detach surface, hr %#lx.\n", hr); } else { - ok(hr == DDERR_CANNOTATTACHSURFACE, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_CANNOTATTACHSURFACE, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface_AddAttachedSurface(surface4, surface1); - ok(hr == DDERR_CANNOTATTACHSURFACE, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_CANNOTATTACHSURFACE, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface_AddAttachedSurface(surface3, surface4); - ok(hr == DDERR_CANNOTATTACHSURFACE, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_CANNOTATTACHSURFACE, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface_AddAttachedSurface(surface4, surface3); - ok(hr == DDERR_CANNOTATTACHSURFACE, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_CANNOTATTACHSURFACE, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface_AddAttachedSurface(surface2, surface4); - ok(hr == DDERR_CANNOTATTACHSURFACE, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_CANNOTATTACHSURFACE, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface_AddAttachedSurface(surface4, surface2); - ok(hr == DDERR_CANNOTATTACHSURFACE, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_CANNOTATTACHSURFACE, "Got unexpected hr %#lx.\n", hr); }
IDirectDrawSurface_Release(surface4); @@ -6771,7 +6771,7 @@ static void test_surface_attachment(void) IDirectDrawSurface_Release(surface1);
hr = IDirectDraw2_SetCooperativeLevel(ddraw, window, DDSCL_EXCLUSIVE | DDSCL_FULLSCREEN); - ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#lx.\n", hr);
/* Try a single primary and two offscreen plain surfaces. */ memset(&surface_desc, 0, sizeof(surface_desc)); @@ -6779,7 +6779,7 @@ static void test_surface_attachment(void) surface_desc.dwFlags = DDSD_CAPS; surface_desc.ddsCaps.dwCaps = DDSCAPS_PRIMARYSURFACE; hr = IDirectDraw2_CreateSurface(ddraw, &surface_desc, &surface1, NULL); - ok(SUCCEEDED(hr), "Failed to create surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create surface, hr %#lx.\n", hr);
memset(&surface_desc, 0, sizeof(surface_desc)); surface_desc.dwSize = sizeof(surface_desc); @@ -6788,7 +6788,7 @@ static void test_surface_attachment(void) surface_desc.dwWidth = registry_mode.dmPelsWidth; surface_desc.dwHeight = registry_mode.dmPelsHeight; hr = IDirectDraw2_CreateSurface(ddraw, &surface_desc, &surface2, NULL); - ok(SUCCEEDED(hr), "Failed to create surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create surface, hr %#lx.\n", hr);
memset(&surface_desc, 0, sizeof(surface_desc)); surface_desc.dwSize = sizeof(surface_desc); @@ -6797,7 +6797,7 @@ static void test_surface_attachment(void) surface_desc.dwWidth = registry_mode.dmPelsWidth; surface_desc.dwHeight = registry_mode.dmPelsHeight; hr = IDirectDraw2_CreateSurface(ddraw, &surface_desc, &surface3, NULL); - ok(SUCCEEDED(hr), "Failed to create surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create surface, hr %#lx.\n", hr);
/* This one has a different size. */ memset(&surface_desc, 0, sizeof(surface_desc)); @@ -6807,33 +6807,33 @@ static void test_surface_attachment(void) surface_desc.dwWidth = 128; surface_desc.dwHeight = 128; hr = IDirectDraw2_CreateSurface(ddraw, &surface_desc, &surface4, NULL); - ok(SUCCEEDED(hr), "Failed to create surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create surface, hr %#lx.\n", hr);
hr = IDirectDrawSurface_AddAttachedSurface(surface1, surface2); - ok(SUCCEEDED(hr), "Failed to attach surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to attach surface, hr %#lx.\n", hr); /* Try the reverse without detaching first. */ hr = IDirectDrawSurface_AddAttachedSurface(surface2, surface1); - ok(hr == DDERR_SURFACEALREADYATTACHED, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_SURFACEALREADYATTACHED, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface_DeleteAttachedSurface(surface1, 0, surface2); - ok(SUCCEEDED(hr), "Failed to detach surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to detach surface, hr %#lx.\n", hr);
hr = IDirectDrawSurface_AddAttachedSurface(surface2, surface1); - ok(SUCCEEDED(hr), "Failed to attach surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to attach surface, hr %#lx.\n", hr); /* Try to detach reversed. */ hr = IDirectDrawSurface_DeleteAttachedSurface(surface1, 0, surface2); - ok(hr == DDERR_CANNOTDETACHSURFACE, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_CANNOTDETACHSURFACE, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface_DeleteAttachedSurface(surface2, 0, surface1); - ok(SUCCEEDED(hr), "Failed to detach surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to detach surface, hr %#lx.\n", hr);
hr = IDirectDrawSurface_AddAttachedSurface(surface2, surface3); - ok(SUCCEEDED(hr), "Failed to attach surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to attach surface, hr %#lx.\n", hr); hr = IDirectDrawSurface_DeleteAttachedSurface(surface2, 0, surface3); - ok(SUCCEEDED(hr), "Failed to detach surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to detach surface, hr %#lx.\n", hr);
hr = IDirectDrawSurface_AddAttachedSurface(surface1, surface4); - ok(hr == DDERR_CANNOTATTACHSURFACE, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_CANNOTATTACHSURFACE, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface_AddAttachedSurface(surface4, surface1); - ok(hr == DDERR_CANNOTATTACHSURFACE, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_CANNOTATTACHSURFACE, "Got unexpected hr %#lx.\n", hr);
IDirectDrawSurface_Release(surface4); IDirectDrawSurface_Release(surface3); @@ -6848,7 +6848,7 @@ static void test_surface_attachment(void) surface_desc.dwWidth = 64; surface_desc.dwHeight = 64; hr = IDirectDraw2_CreateSurface(ddraw, &surface_desc, &surface1, NULL); - ok(hr == D3D_OK, "Failed to create surface, hr %#x.\n", hr); + ok(hr == D3D_OK, "Failed to create surface, hr %#lx.\n", hr);
memset(&surface_desc, 0, sizeof(surface_desc)); surface_desc.dwSize = sizeof(surface_desc); @@ -6861,26 +6861,26 @@ static void test_surface_attachment(void) surface_desc.dwWidth = 32; surface_desc.dwHeight = 32; hr = IDirectDraw2_CreateSurface(ddraw, &surface_desc, &surface2, NULL); - ok(hr == D3D_OK, "Failed to create surface, hr %#x.\n", hr); + ok(hr == D3D_OK, "Failed to create surface, hr %#lx.\n", hr); surface_desc.dwWidth = 64; surface_desc.dwHeight = 64; hr = IDirectDraw2_CreateSurface(ddraw, &surface_desc, &surface3, NULL); - ok(hr == D3D_OK, "Failed to create surface, hr %#x.\n", hr); + ok(hr == D3D_OK, "Failed to create surface, hr %#lx.\n", hr); surface_desc.dwWidth = 128; surface_desc.dwHeight = 128; hr = IDirectDraw2_CreateSurface(ddraw, &surface_desc, &surface4, NULL); - ok(hr == D3D_OK, "Failed to create surface, hr %#x.\n", hr); + ok(hr == D3D_OK, "Failed to create surface, hr %#lx.\n", hr);
hr = IDirectDrawSurface_AddAttachedSurface(surface1, surface2); - todo_wine ok(hr == DDERR_CANNOTATTACHSURFACE, "Got unexpected hr %#x.\n", hr); + todo_wine ok(hr == DDERR_CANNOTATTACHSURFACE, "Got unexpected hr %#lx.\n", hr); if (SUCCEEDED(hr)) IDirectDrawSurface2_DeleteAttachedSurface(surface1, 0, surface2); hr = IDirectDrawSurface_AddAttachedSurface(surface1, surface3); - ok(hr == D3D_OK, "Failed to attach depth buffer, hr %#x.\n", hr); + ok(hr == D3D_OK, "Failed to attach depth buffer, hr %#lx.\n", hr); hr = IDirectDrawSurface2_DeleteAttachedSurface(surface1, 0, surface3); - ok(hr == D3D_OK, "Failed to detach depth buffer, hr %#x.\n", hr); + ok(hr == D3D_OK, "Failed to detach depth buffer, hr %#lx.\n", hr); hr = IDirectDrawSurface_AddAttachedSurface(surface1, surface4); - todo_wine ok(hr == DDERR_CANNOTATTACHSURFACE, "Got unexpected hr %#x.\n", hr); + todo_wine ok(hr == DDERR_CANNOTATTACHSURFACE, "Got unexpected hr %#lx.\n", hr);
IDirectDrawSurface2_Release(surface4); IDirectDrawSurface2_Release(surface3); @@ -6901,47 +6901,47 @@ static void test_surface_attachment(void) U3(surface_desc.ddpfPixelFormat).dwGBitMask = 0x07e0; U4(surface_desc.ddpfPixelFormat).dwBBitMask = 0x001f; hr = IDirectDraw2_CreateSurface(ddraw, &surface_desc, &surface1, NULL); - ok(SUCCEEDED(hr), "Failed to create surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create surface, hr %#lx.\n", hr); hr = IDirectDraw2_CreateSurface(ddraw, &surface_desc, &surface3, NULL); - ok(SUCCEEDED(hr), "Failed to create surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create surface, hr %#lx.\n", hr);
surface_desc.ddsCaps.dwCaps = DDSCAPS_ZBUFFER; surface_desc.ddpfPixelFormat.dwFlags = DDPF_ZBUFFER; U1(surface_desc.ddpfPixelFormat).dwZBufferBitDepth = 16; U3(surface_desc.ddpfPixelFormat).dwZBitMask = 0x0000ffff; hr = IDirectDraw2_CreateSurface(ddraw, &surface_desc, &surface2, NULL); - ok(SUCCEEDED(hr), "Failed to create surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create surface, hr %#lx.\n", hr);
hr = IDirectDrawSurface_AddAttachedSurface(surface1, surface2); - ok(SUCCEEDED(hr), "Failed to attach surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to attach surface, hr %#lx.\n", hr); refcount = get_refcount((IUnknown *)surface2); - ok(refcount == 2, "Got unexpected refcount %u.\n", refcount); + ok(refcount == 2, "Got unexpected refcount %lu.\n", refcount); hr = IDirectDrawSurface_AddAttachedSurface(surface1, surface2); - ok(hr == DDERR_SURFACEALREADYATTACHED, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_SURFACEALREADYATTACHED, "Got unexpected hr %#lx.\n", hr);
/* Attaching while already attached to other surface. */ hr = IDirectDrawSurface_AddAttachedSurface(surface3, surface2); - todo_wine ok(SUCCEEDED(hr), "Failed to attach surface, hr %#x.\n", hr); + todo_wine ok(SUCCEEDED(hr), "Failed to attach surface, hr %#lx.\n", hr); hr = IDirectDrawSurface_DeleteAttachedSurface(surface3, 0, surface2); - todo_wine ok(SUCCEEDED(hr), "Failed to detach surface, hr %#x.\n", hr); + todo_wine ok(SUCCEEDED(hr), "Failed to detach surface, hr %#lx.\n", hr); IDirectDrawSurface_Release(surface3);
hr = IDirectDrawSurface_DeleteAttachedSurface(surface1, 0, surface2); - ok(SUCCEEDED(hr), "Failed to detach surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to detach surface, hr %#lx.\n", hr); refcount = get_refcount((IUnknown *)surface2); - ok(refcount == 1, "Got unexpected refcount %u.\n", refcount); + ok(refcount == 1, "Got unexpected refcount %lu.\n", refcount);
/* Automatic detachment on release. */ hr = IDirectDrawSurface_AddAttachedSurface(surface1, surface2); - ok(SUCCEEDED(hr), "Failed to attach surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to attach surface, hr %#lx.\n", hr); refcount = get_refcount((IUnknown *)surface2); - ok(refcount == 2, "Got unexpected refcount %u.\n", refcount); + ok(refcount == 2, "Got unexpected refcount %lu.\n", refcount); refcount = IDirectDrawSurface_Release(surface1); - ok(!refcount, "Got unexpected refcount %u.\n", refcount); + ok(!refcount, "Got unexpected refcount %lu.\n", refcount); refcount = IDirectDrawSurface_Release(surface2); - ok(!refcount, "Got unexpected refcount %u.\n", refcount); + ok(!refcount, "Got unexpected refcount %lu.\n", refcount); refcount = IDirectDraw2_Release(ddraw); - ok(!refcount, "Got unexpected refcount %u.\n", refcount); + ok(!refcount, "Got unexpected refcount %lu.\n", refcount); DestroyWindow(window); }
@@ -7024,7 +7024,7 @@ static void test_pixel_format(void) hr = IDirectDraw2_SetCooperativeLevel(ddraw, window, DDSCL_NORMAL); if (FAILED(hr)) { - skip("Failed to set cooperative level, hr %#x.\n", hr); + skip("Failed to set cooperative level, hr %#lx.\n", hr); goto cleanup; }
@@ -7034,9 +7034,9 @@ static void test_pixel_format(void) if (hdc2) { hr = IDirectDraw2_CreateClipper(ddraw, 0, &clipper, NULL); - ok(SUCCEEDED(hr), "Failed to create clipper, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create clipper, hr %#lx.\n", hr); hr = IDirectDrawClipper_SetHWnd(clipper, 0, window2); - ok(SUCCEEDED(hr), "Failed to set clipper window, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set clipper window, hr %#lx.\n", hr);
test_format = GetPixelFormat(hdc); ok(test_format == format, "window has pixel format %d, expected %d\n", test_format, format); @@ -7051,7 +7051,7 @@ static void test_pixel_format(void) ddsd.ddsCaps.dwCaps = DDSCAPS_PRIMARYSURFACE;
hr = IDirectDraw2_CreateSurface(ddraw, &ddsd, &primary, NULL); - ok(SUCCEEDED(hr), "Failed to create surface, hr %#x.\n",hr); + ok(SUCCEEDED(hr), "Failed to create surface, hr %#lx.\n",hr);
test_format = GetPixelFormat(hdc); ok(test_format == format, "window has pixel format %d, expected %d\n", test_format, format); @@ -7065,7 +7065,7 @@ static void test_pixel_format(void) if (clipper) { hr = IDirectDrawSurface_SetClipper(primary, clipper); - ok(SUCCEEDED(hr), "Failed to set clipper, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set clipper, hr %#lx.\n", hr);
test_format = GetPixelFormat(hdc); ok(test_format == format, "window has pixel format %d, expected %d\n", test_format, format); @@ -7080,18 +7080,18 @@ static void test_pixel_format(void) ddsd.ddsCaps.dwCaps = DDSCAPS_OFFSCREENPLAIN; ddsd.dwWidth = ddsd.dwHeight = 64; hr = IDirectDraw2_CreateSurface(ddraw, &ddsd, &offscreen, NULL); - ok(SUCCEEDED(hr), "Failed to create surface, hr %#x.\n",hr); + ok(SUCCEEDED(hr), "Failed to create surface, hr %#lx.\n",hr);
memset(&fx, 0, sizeof(fx)); fx.dwSize = sizeof(fx); hr = IDirectDrawSurface_Blt(offscreen, NULL, NULL, NULL, DDBLT_WAIT | DDBLT_COLORFILL, &fx); - ok(SUCCEEDED(hr), "Failed to clear source surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to clear source surface, hr %#lx.\n", hr);
test_format = GetPixelFormat(hdc); ok(test_format == format, "window has pixel format %d, expected %d\n", test_format, format);
hr = IDirectDrawSurface_Blt(primary, NULL, offscreen, NULL, DDBLT_WAIT, NULL); - ok(SUCCEEDED(hr), "Failed to blit to primary surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to blit to primary surface, hr %#lx.\n", hr);
test_format = GetPixelFormat(hdc); ok(test_format == format, "window has pixel format %d, expected %d\n", test_format, format); @@ -7197,7 +7197,7 @@ static void test_create_surface_pitch(void) ddraw = create_ddraw(); ok(!!ddraw, "Failed to create a ddraw object.\n"); hr = IDirectDraw2_SetCooperativeLevel(ddraw, window, DDSCL_NORMAL); - ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#lx.\n", hr);
mem = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, ((63 * 4) + 8) * 63);
@@ -7220,33 +7220,33 @@ static void test_create_surface_pitch(void) if (test_data[i].flags_in & DDSD_LPSURFACE) { HRESULT expected_hr = SUCCEEDED(test_data[i].hr) ? DDERR_INVALIDPARAMS : test_data[i].hr; - ok(hr == expected_hr, "Test %u: Got unexpected hr %#x, expected %#x.\n", i, hr, expected_hr); + ok(hr == expected_hr, "Test %u: Got unexpected hr %#lx, expected %#lx.\n", i, hr, expected_hr); surface_desc.lpSurface = mem; hr = IDirectDraw2_CreateSurface(ddraw, &surface_desc, &surface, NULL); } if ((test_data[i].caps & DDSCAPS_VIDEOMEMORY) && hr == DDERR_NODIRECTDRAWHW) continue; - ok(hr == test_data[i].hr, "Test %u: Got unexpected hr %#x, expected %#x.\n", i, hr, test_data[i].hr); + ok(hr == test_data[i].hr, "Test %u: Got unexpected hr %#lx, expected %#lx.\n", i, hr, test_data[i].hr); if (FAILED(hr)) continue;
memset(&surface_desc, 0, sizeof(surface_desc)); surface_desc.dwSize = sizeof(surface_desc); hr = IDirectDrawSurface_GetSurfaceDesc(surface, &surface_desc); - ok(SUCCEEDED(hr), "Test %u: Failed to get surface desc, hr %#x.\n", i, hr); + ok(SUCCEEDED(hr), "Test %u: Failed to get surface desc, hr %#lx.\n", i, hr); ok((surface_desc.dwFlags & flags_mask) == test_data[i].flags_out, - "Test %u: Got unexpected flags %#x, expected %#x.\n", + "Test %u: Got unexpected flags %#lx, expected %#lx.\n", i, surface_desc.dwFlags & flags_mask, test_data[i].flags_out); /* The pitch for textures seems to be implementation specific. */ if (!(test_data[i].caps & DDSCAPS_TEXTURE)) { if (is_ddraw64 && test_data[i].pitch_out32 != test_data[i].pitch_out64) todo_wine ok(U1(surface_desc).lPitch == test_data[i].pitch_out64, - "Test %u: Got unexpected pitch %u, expected %u.\n", + "Test %u: Got unexpected pitch %lu, expected %lu.\n", i, U1(surface_desc).lPitch, test_data[i].pitch_out64); else ok(U1(surface_desc).lPitch == test_data[i].pitch_out32, - "Test %u: Got unexpected pitch %u, expected %u.\n", + "Test %u: Got unexpected pitch %lu, expected %lu.\n", i, U1(surface_desc).lPitch, test_data[i].pitch_out32); } ok(!surface_desc.lpSurface, "Test %u: Got unexpected lpSurface %p.\n", i, surface_desc.lpSurface); @@ -7256,7 +7256,7 @@ static void test_create_surface_pitch(void)
HeapFree(GetProcessHeap(), 0, mem); refcount = IDirectDraw2_Release(ddraw); - ok(!refcount, "Got unexpected refcount %u.\n", refcount); + ok(!refcount, "Got unexpected refcount %lu.\n", refcount); DestroyWindow(window); }
@@ -7297,12 +7297,12 @@ static void test_mipmap(void) ddraw = create_ddraw(); ok(!!ddraw, "Failed to create a ddraw object.\n"); hr = IDirectDraw2_SetCooperativeLevel(ddraw, window, DDSCL_NORMAL); - ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#lx.\n", hr);
memset(&hal_caps, 0, sizeof(hal_caps)); hal_caps.dwSize = sizeof(hal_caps); hr = IDirectDraw2_GetCaps(ddraw, &hal_caps, NULL); - ok(SUCCEEDED(hr), "Failed to get caps, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get caps, hr %#lx.\n", hr); if ((hal_caps.ddsCaps.dwCaps & (DDSCAPS_TEXTURE | DDSCAPS_MIPMAP)) != (DDSCAPS_TEXTURE | DDSCAPS_MIPMAP)) { skip("Mipmapped textures not supported, skipping tests.\n"); @@ -7322,22 +7322,22 @@ static void test_mipmap(void) if (tests[i].flags & DDSD_MIPMAPCOUNT) U2(surface_desc).dwMipMapCount = tests[i].mipmap_count_in; hr = IDirectDraw2_CreateSurface(ddraw, &surface_desc, &surface1, NULL); - ok(hr == tests[i].hr, "Test %u: Got unexpected hr %#x.\n", i, hr); + ok(hr == tests[i].hr, "Test %u: Got unexpected hr %#lx.\n", i, hr); if (FAILED(hr)) continue;
hr = IDirectDrawSurface_QueryInterface(surface1, &IID_IDirectDrawSurface2, (void **)&surface); - ok(SUCCEEDED(hr), "Test %u: Failed to get IDirectDrawSurface2 interface, hr %#x.\n", i, hr); + ok(SUCCEEDED(hr), "Test %u: Failed to get IDirectDrawSurface2 interface, hr %#lx.\n", i, hr); IDirectDrawSurface_Release(surface1);
memset(&surface_desc, 0, sizeof(surface_desc)); surface_desc.dwSize = sizeof(surface_desc); hr = IDirectDrawSurface2_GetSurfaceDesc(surface, &surface_desc); - ok(SUCCEEDED(hr), "Test %u: Failed to get surface desc, hr %#x.\n", i, hr); + ok(SUCCEEDED(hr), "Test %u: Failed to get surface desc, hr %#lx.\n", i, hr); ok(surface_desc.dwFlags & DDSD_MIPMAPCOUNT, - "Test %u: Got unexpected flags %#x.\n", i, surface_desc.dwFlags); + "Test %u: Got unexpected flags %#lx.\n", i, surface_desc.dwFlags); ok(U2(surface_desc).dwMipMapCount == tests[i].mipmap_count_out, - "Test %u: Got unexpected mipmap count %u.\n", i, U2(surface_desc).dwMipMapCount); + "Test %u: Got unexpected mipmap count %lu.\n", i, U2(surface_desc).dwMipMapCount);
surface_base = surface; IDirectDrawSurface2_AddRef(surface_base); @@ -7345,31 +7345,31 @@ static void test_mipmap(void) while (mipmap_count > 1) { hr = IDirectDrawSurface2_GetAttachedSurface(surface_base, &caps, &surface_mip); - ok(SUCCEEDED(hr), "Test %u, %u: Failed to get attached surface, hr %#x.\n", i, mipmap_count, hr); + ok(SUCCEEDED(hr), "Test %u, %u: Failed to get attached surface, hr %#lx.\n", i, mipmap_count, hr);
memset(&surface_desc, 0, sizeof(surface_desc)); surface_desc.dwSize = sizeof(surface_desc); hr = IDirectDrawSurface2_GetSurfaceDesc(surface_base, &surface_desc); - ok(SUCCEEDED(hr), "Test %u, %u: Failed to get surface desc, hr %#x.\n", i, mipmap_count, hr); + ok(SUCCEEDED(hr), "Test %u, %u: Failed to get surface desc, hr %#lx.\n", i, mipmap_count, hr); ok(surface_desc.dwFlags & DDSD_MIPMAPCOUNT, - "Test %u, %u: Got unexpected flags %#x.\n", i, mipmap_count, surface_desc.dwFlags); + "Test %u, %u: Got unexpected flags %#lx.\n", i, mipmap_count, surface_desc.dwFlags); ok(U2(surface_desc).dwMipMapCount == mipmap_count, - "Test %u, %u: Got unexpected mipmap count %u.\n", + "Test %u, %u: Got unexpected mipmap count %lu.\n", i, mipmap_count, U2(surface_desc).dwMipMapCount);
memset(&surface_desc, 0, sizeof(surface_desc)); surface_desc.dwSize = sizeof(surface_desc); hr = IDirectDrawSurface2_Lock(surface_base, NULL, &surface_desc, 0, NULL); - ok(SUCCEEDED(hr), "Test %u, %u: Failed to lock surface, hr %#x.\n", i, mipmap_count, hr); + ok(SUCCEEDED(hr), "Test %u, %u: Failed to lock surface, hr %#lx.\n", i, mipmap_count, hr); ok(surface_desc.dwMipMapCount == mipmap_count, - "Test %u, %u: unexpected change of mipmap count %u.\n", + "Test %u, %u: unexpected change of mipmap count %lu.\n", i, mipmap_count, surface_desc.dwMipMapCount); memset(&surface_desc, 0, sizeof(surface_desc)); surface_desc.dwSize = sizeof(surface_desc); hr = IDirectDrawSurface2_Lock(surface_mip, NULL, &surface_desc, 0, NULL); - ok(SUCCEEDED(hr), "Test %u, %u: Failed to lock surface, hr %#x.\n", i, mipmap_count, hr); + ok(SUCCEEDED(hr), "Test %u, %u: Failed to lock surface, hr %#lx.\n", i, mipmap_count, hr); ok(surface_desc.dwMipMapCount == mipmap_count - 1, - "Test %u, %u: Child mipmap count unexpected %u\n", i, mipmap_count, surface_desc.dwMipMapCount); + "Test %u, %u: Child mipmap count unexpected %lu\n", i, mipmap_count, surface_desc.dwMipMapCount); IDirectDrawSurface2_Unlock(surface_mip, NULL); IDirectDrawSurface2_Unlock(surface_base, NULL);
@@ -7383,7 +7383,7 @@ static void test_mipmap(void) }
refcount = IDirectDraw2_Release(ddraw); - ok(!refcount, "Got unexpected refcount %u.\n", refcount); + ok(!refcount, "Got unexpected refcount %lu.\n", refcount); DestroyWindow(window); }
@@ -7409,12 +7409,12 @@ static void test_palette_complex(void) ddraw = create_ddraw(); ok(!!ddraw, "Failed to create a ddraw object.\n"); hr = IDirectDraw2_SetCooperativeLevel(ddraw, window, DDSCL_NORMAL); - ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#lx.\n", hr);
memset(&hal_caps, 0, sizeof(hal_caps)); hal_caps.dwSize = sizeof(hal_caps); hr = IDirectDraw2_GetCaps(ddraw, &hal_caps, NULL); - ok(SUCCEEDED(hr), "Failed to get caps, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get caps, hr %#lx.\n", hr); if ((hal_caps.ddsCaps.dwCaps & (DDSCAPS_TEXTURE | DDSCAPS_MIPMAP)) != (DDSCAPS_TEXTURE | DDSCAPS_MIPMAP)) { skip("Mipmapped textures not supported, skipping mipmap palette test.\n"); @@ -7433,31 +7433,31 @@ static void test_palette_complex(void) surface_desc.ddpfPixelFormat.dwFlags = DDPF_PALETTEINDEXED8 | DDPF_RGB; U1(surface_desc.ddpfPixelFormat).dwRGBBitCount = 8; hr = IDirectDraw2_CreateSurface(ddraw, &surface_desc, &surface1, NULL); - ok(SUCCEEDED(hr), "Failed to create surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create surface, hr %#lx.\n", hr); hr = IDirectDrawSurface_QueryInterface(surface1, &IID_IDirectDrawSurface2, (void **)&surface); - ok(SUCCEEDED(hr), "Failed to get IDirectDrawSurface2 interface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get IDirectDrawSurface2 interface, hr %#lx.\n", hr); IDirectDrawSurface_Release(surface1);
memset(palette_entries, 0, sizeof(palette_entries)); hr = IDirectDraw2_CreatePalette(ddraw, DDPCAPS_8BIT | DDPCAPS_ALLOW256, palette_entries, &palette, NULL); - ok(SUCCEEDED(hr), "Failed to create palette, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create palette, hr %#lx.\n", hr);
memset(palette_entries, 0, sizeof(palette_entries)); palette_entries[1].peRed = 0xff; palette_entries[1].peGreen = 0x80; hr = IDirectDraw2_CreatePalette(ddraw, DDPCAPS_8BIT | DDPCAPS_ALLOW256, palette_entries, &palette_mipmap, NULL); - ok(SUCCEEDED(hr), "Failed to create palette, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create palette, hr %#lx.\n", hr);
palette2 = (void *)0xdeadbeef; hr = IDirectDrawSurface2_GetPalette(surface, &palette2); - ok(hr == DDERR_NOPALETTEATTACHED, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_NOPALETTEATTACHED, "Got unexpected hr %#lx.\n", hr); ok(!palette2, "Got unexpected palette %p.\n", palette2); hr = IDirectDrawSurface2_SetPalette(surface, palette); - ok(SUCCEEDED(hr), "Failed to set palette, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set palette, hr %#lx.\n", hr); hr = IDirectDrawSurface2_GetPalette(surface, &palette2); - ok(SUCCEEDED(hr), "Failed to get palette, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get palette, hr %#lx.\n", hr); ok(palette == palette2, "Got unexpected palette %p.\n", palette2); IDirectDrawPalette_Release(palette2);
@@ -7466,46 +7466,46 @@ static void test_palette_complex(void) for (i = 0; i < 7; ++i) { hr = IDirectDrawSurface2_GetAttachedSurface(mipmap, &caps, &tmp); - ok(SUCCEEDED(hr), "Failed to get attached surface, i %u, hr %#x.\n", i, hr); + ok(SUCCEEDED(hr), "Failed to get attached surface, i %u, hr %#lx.\n", i, hr); palette2 = (void *)0xdeadbeef; hr = IDirectDrawSurface2_GetPalette(tmp, &palette2); - ok(hr == DDERR_NOPALETTEATTACHED, "Got unexpected hr %#x, i %u.\n", hr, i); + ok(hr == DDERR_NOPALETTEATTACHED, "Got unexpected hr %#lx, i %u.\n", hr, i); ok(!palette2, "Got unexpected palette %p, i %u.\n", palette2, i);
hr = IDirectDrawSurface2_SetPalette(tmp, palette_mipmap); - ok(SUCCEEDED(hr), "Failed to set palette, i %u, hr %#x.\n", i, hr); + ok(SUCCEEDED(hr), "Failed to set palette, i %u, hr %#lx.\n", i, hr);
hr = IDirectDrawSurface2_GetPalette(tmp, &palette2); - ok(SUCCEEDED(hr), "Failed to get palette, i %u, hr %#x.\n", i, hr); + ok(SUCCEEDED(hr), "Failed to get palette, i %u, hr %#lx.\n", i, hr); ok(palette_mipmap == palette2, "Got unexpected palette %p.\n", palette2); IDirectDrawPalette_Release(palette2);
hr = IDirectDrawSurface2_GetDC(tmp, &dc); - ok(SUCCEEDED(hr), "Failed to get DC, i %u, hr %#x.\n", i, hr); + ok(SUCCEEDED(hr), "Failed to get DC, i %u, hr %#lx.\n", i, hr); count = GetDIBColorTable(dc, 1, 1, &rgbquad); ok(count == 1, "Expected count 1, got %u.\n", count); ok(rgbquad.rgbRed == 0xff, "Expected rgbRed = 0xff, got %#x.\n", rgbquad.rgbRed); ok(rgbquad.rgbGreen == 0x80, "Expected rgbGreen = 0x80, got %#x.\n", rgbquad.rgbGreen); ok(rgbquad.rgbBlue == 0x0, "Expected rgbBlue = 0x0, got %#x.\n", rgbquad.rgbBlue); hr = IDirectDrawSurface2_ReleaseDC(tmp, dc); - ok(SUCCEEDED(hr), "Failed to release DC, i %u, hr %#x.\n", i, hr); + ok(SUCCEEDED(hr), "Failed to release DC, i %u, hr %#lx.\n", i, hr);
IDirectDrawSurface2_Release(mipmap); mipmap = tmp; }
hr = IDirectDrawSurface2_GetAttachedSurface(mipmap, &caps, &tmp); - ok(hr == DDERR_NOTFOUND, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_NOTFOUND, "Got unexpected hr %#lx.\n", hr); IDirectDrawSurface2_Release(mipmap); refcount = IDirectDrawSurface2_Release(surface); - ok(!refcount, "Got unexpected refcount %u.\n", refcount); + ok(!refcount, "Got unexpected refcount %lu.\n", refcount); refcount = IDirectDrawPalette_Release(palette_mipmap); - ok(!refcount, "Got unexpected refcount %u.\n", refcount); + ok(!refcount, "Got unexpected refcount %lu.\n", refcount); refcount = IDirectDrawPalette_Release(palette); - ok(!refcount, "Got unexpected refcount %u.\n", refcount); + ok(!refcount, "Got unexpected refcount %lu.\n", refcount);
refcount = IDirectDraw2_Release(ddraw); - ok(!refcount, "Got unexpected refcount %u.\n", refcount); + ok(!refcount, "Got unexpected refcount %lu.\n", refcount); DestroyWindow(window); }
@@ -7536,7 +7536,7 @@ static void test_p8_blit(void) ddraw = create_ddraw(); ok(!!ddraw, "Failed to create a ddraw object.\n"); hr = IDirectDraw2_SetCooperativeLevel(ddraw, window, DDSCL_NORMAL); - ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#lx.\n", hr); is_warp = ddraw_is_warp(ddraw);
memset(palette_entries, 0, sizeof(palette_entries)); @@ -7546,14 +7546,14 @@ static void test_p8_blit(void) palette_entries[4].peRed = 0xff; hr = IDirectDraw2_CreatePalette(ddraw, DDPCAPS_8BIT | DDPCAPS_ALLOW256, palette_entries, &palette, NULL); - ok(SUCCEEDED(hr), "Failed to create palette, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create palette, hr %#lx.\n", hr); palette_entries[1].peBlue = 0xff; palette_entries[2].peGreen = 0xff; palette_entries[3].peRed = 0xff; palette_entries[4].peFlags = 0x0; hr = IDirectDraw2_CreatePalette(ddraw, DDPCAPS_8BIT | DDPCAPS_ALLOW256, palette_entries, &palette2, NULL); - ok(SUCCEEDED(hr), "Failed to create palette, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create palette, hr %#lx.\n", hr);
memset(&surface_desc, 0, sizeof(surface_desc)); surface_desc.dwSize = sizeof(surface_desc); @@ -7565,11 +7565,11 @@ static void test_p8_blit(void) surface_desc.ddpfPixelFormat.dwFlags = DDPF_PALETTEINDEXED8 | DDPF_RGB; U1(surface_desc.ddpfPixelFormat).dwRGBBitCount = 8; hr = IDirectDraw2_CreateSurface(ddraw, &surface_desc, &src, NULL); - ok(SUCCEEDED(hr), "Failed to create surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create surface, hr %#lx.\n", hr); hr = IDirectDraw2_CreateSurface(ddraw, &surface_desc, &dst_p8, NULL); - ok(SUCCEEDED(hr), "Failed to create surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create surface, hr %#lx.\n", hr); hr = IDirectDrawSurface_SetPalette(dst_p8, palette2); - ok(SUCCEEDED(hr), "Failed to set palette, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set palette, hr %#lx.\n", hr);
memset(&surface_desc, 0, sizeof(surface_desc)); surface_desc.dwSize = sizeof(surface_desc); @@ -7585,34 +7585,34 @@ static void test_p8_blit(void) U4(surface_desc.ddpfPixelFormat).dwBBitMask = 0x000000ff; U5(surface_desc.ddpfPixelFormat).dwRGBAlphaBitMask = 0xff000000; hr = IDirectDraw2_CreateSurface(ddraw, &surface_desc, &dst, NULL); - ok(SUCCEEDED(hr), "Failed to create surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create surface, hr %#lx.\n", hr);
memset(&surface_desc, 0, sizeof(surface_desc)); surface_desc.dwSize = sizeof(surface_desc); hr = IDirectDrawSurface_Lock(src, NULL, &surface_desc, DDLOCK_WAIT, NULL); - ok(SUCCEEDED(hr), "Failed to lock source surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to lock source surface, hr %#lx.\n", hr); memcpy(surface_desc.lpSurface, src_data, sizeof(src_data)); hr = IDirectDrawSurface_Unlock(src, NULL); - ok(SUCCEEDED(hr), "Failed to unlock source surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to unlock source surface, hr %#lx.\n", hr);
hr = IDirectDrawSurface_Lock(dst_p8, NULL, &surface_desc, DDLOCK_WAIT, NULL); - ok(SUCCEEDED(hr), "Failed to lock destination surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to lock destination surface, hr %#lx.\n", hr); memcpy(surface_desc.lpSurface, src_data2, sizeof(src_data2)); hr = IDirectDrawSurface_Unlock(dst_p8, NULL); - ok(SUCCEEDED(hr), "Failed to unlock destination surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to unlock destination surface, hr %#lx.\n", hr);
fx.dwSize = sizeof(fx); fx.dwFillColor = 0xdeadbeef; hr = IDirectDrawSurface_Blt(dst, NULL, NULL, NULL, DDBLT_WAIT | DDBLT_COLORFILL, &fx); - ok(SUCCEEDED(hr), "Failed to color fill %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to color fill %#lx.\n", hr);
hr = IDirectDrawSurface_SetPalette(src, palette); - ok(SUCCEEDED(hr), "Failed to set palette, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set palette, hr %#lx.\n", hr); hr = IDirectDrawSurface_Blt(dst, NULL, src, NULL, DDBLT_WAIT, NULL); /* The r500 Windows 7 driver returns E_NOTIMPL. r200 on Windows XP works. * The Geforce 7 driver on Windows Vista returns E_FAIL. Newer Nvidia GPUs work. */ ok(SUCCEEDED(hr) || broken(hr == E_NOTIMPL) || broken(hr == E_FAIL), - "Failed to blit, hr %#x.\n", hr); + "Failed to blit, hr %#lx.\n", hr);
if (SUCCEEDED(hr)) { @@ -7623,7 +7623,7 @@ static void test_p8_blit(void) * blits see below. */ todo_wine ok(compare_color(color, expected[x], 0) || broken(is_warp && compare_color(color, 0x00000000, 0)), - "Pixel %u: Got color %#x, expected %#x.\n", + "Pixel %u: Got color %#lx, expected %#lx.\n", x, color, expected[x]); } } @@ -7631,10 +7631,10 @@ static void test_p8_blit(void) fx.ddckSrcColorkey.dwColorSpaceHighValue = 0x2; fx.ddckSrcColorkey.dwColorSpaceLowValue = 0x2; hr = IDirectDrawSurface7_Blt(dst_p8, NULL, src, NULL, DDBLT_WAIT | DDBLT_KEYSRCOVERRIDE, &fx); - ok(SUCCEEDED(hr), "Failed to blit, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to blit, hr %#lx.\n", hr);
hr = IDirectDrawSurface_Lock(dst_p8, NULL, &surface_desc, DDLOCK_READONLY | DDLOCK_WAIT, NULL); - ok(SUCCEEDED(hr), "Failed to lock destination surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to lock destination surface, hr %#lx.\n", hr); /* A color keyed P8 blit doesn't do anything on WARP - it just leaves the data in the destination * surface untouched. Error checking (DDBLT_KEYSRC without a key * for example) also works as expected. @@ -7645,7 +7645,7 @@ static void test_p8_blit(void) || broken(is_warp && !memcmp(surface_desc.lpSurface, src_data2, sizeof(src_data2))), "Got unexpected P8 color key blit result.\n"); hr = IDirectDrawSurface_Unlock(dst_p8, NULL); - ok(SUCCEEDED(hr), "Failed to unlock destination surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to unlock destination surface, hr %#lx.\n", hr);
IDirectDrawSurface_Release(src); IDirectDrawSurface_Release(dst); @@ -7654,7 +7654,7 @@ static void test_p8_blit(void) IDirectDrawPalette_Release(palette2);
refcount = IDirectDraw2_Release(ddraw); - ok(!refcount, "Got unexpected refcount %u.\n", refcount); + ok(!refcount, "Got unexpected refcount %lu.\n", refcount); DestroyWindow(window); }
@@ -7703,98 +7703,98 @@ static void test_material(void) }
hr = IDirect3DDevice2_GetRenderTarget(device, &rt); - ok(SUCCEEDED(hr), "Failed to get render target, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get render target, hr %#lx.\n", hr);
background = create_diffuse_material(device, 0.0f, 0.0f, 1.0f, 1.0f); viewport = create_viewport(device, 0, 0, 640, 480); viewport_set_background(device, viewport, background); hr = IDirect3DDevice2_SetCurrentViewport(device, viewport); - ok(SUCCEEDED(hr), "Failed to set current viewport, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set current viewport, hr %#lx.\n", hr);
material = create_emissive_material(device, 0.0f, 1.0f, 0.0f, 0.0f); hr = IDirect3DMaterial2_GetHandle(material, device, &mat_handle); - ok(SUCCEEDED(hr), "Failed to get material handle, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get material handle, hr %#lx.\n", hr);
hr = IDirect3DDevice2_GetLightState(device, D3DLIGHTSTATE_MATERIAL, &tmp); - ok(SUCCEEDED(hr), "Failed to get light state, hr %#x.\n", hr); - ok(!tmp, "Got unexpected material handle %#x.\n", tmp); + ok(SUCCEEDED(hr), "Failed to get light state, hr %#lx.\n", hr); + ok(!tmp, "Got unexpected material handle %#lx.\n", tmp); hr = IDirect3DDevice2_SetLightState(device, D3DLIGHTSTATE_MATERIAL, mat_handle); - ok(SUCCEEDED(hr), "Failed to set material state, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set material state, hr %#lx.\n", hr); hr = IDirect3DDevice2_GetLightState(device, D3DLIGHTSTATE_MATERIAL, &tmp); - ok(SUCCEEDED(hr), "Failed to get light state, hr %#x.\n", hr); - ok(tmp == mat_handle, "Got unexpected material handle %#x, expected %#x.\n", tmp, mat_handle); + ok(SUCCEEDED(hr), "Failed to get light state, hr %#lx.\n", hr); + ok(tmp == mat_handle, "Got unexpected material handle %#lx, expected %#lx.\n", tmp, mat_handle); hr = IDirect3DDevice2_SetLightState(device, D3DLIGHTSTATE_MATERIAL, 0); - ok(SUCCEEDED(hr), "Failed to set material state, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set material state, hr %#lx.\n", hr); hr = IDirect3DDevice2_GetLightState(device, D3DLIGHTSTATE_MATERIAL, &tmp); - ok(SUCCEEDED(hr), "Failed to get light state, hr %#x.\n", hr); - ok(!tmp, "Got unexpected material handle %#x.\n", tmp); + ok(SUCCEEDED(hr), "Failed to get light state, hr %#lx.\n", hr); + ok(!tmp, "Got unexpected material handle %#lx.\n", tmp);
for (i = 0; i < ARRAY_SIZE(test_data); ++i) { hr = IDirect3DViewport2_Clear(viewport, 1, &clear_rect, D3DCLEAR_TARGET | D3DCLEAR_ZBUFFER); - ok(SUCCEEDED(hr), "Failed to clear viewport, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to clear viewport, hr %#lx.\n", hr);
hr = IDirect3DDevice2_SetLightState(device, D3DLIGHTSTATE_MATERIAL, test_data[i].material ? mat_handle : 0); - ok(SUCCEEDED(hr), "Failed to set material state, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set material state, hr %#lx.\n", hr);
hr = IDirect3DDevice2_BeginScene(device); - ok(SUCCEEDED(hr), "Failed to begin scene, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to begin scene, hr %#lx.\n", hr); hr = IDirect3DDevice2_DrawPrimitive(device, D3DPT_TRIANGLESTRIP, D3DVT_VERTEX, quad, 4, 0); - ok(SUCCEEDED(hr), "Failed to draw, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to draw, hr %#lx.\n", hr); hr = IDirect3DDevice2_EndScene(device); - ok(SUCCEEDED(hr), "Failed to end scene, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to end scene, hr %#lx.\n", hr); color = get_surface_color(rt, 320, 240); ok(compare_color(color, test_data[i].expected_color, 1), - "Got unexpected color 0x%08x, test %u.\n", color, i); + "Got unexpected color 0x%08lx, test %u.\n", color, i); }
destroy_material(material); material = create_diffuse_material(device, 1.0f, 0.0f, 0.0f, 1.0f); hr = IDirect3DMaterial2_GetHandle(material, device, &mat_handle); - ok(SUCCEEDED(hr), "Failed to get material handle, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get material handle, hr %#lx.\n", hr);
hr = IDirect3DViewport2_SetBackground(viewport, mat_handle); - ok(SUCCEEDED(hr), "Failed to set viewport background, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set viewport background, hr %#lx.\n", hr); hr = IDirect3DViewport2_GetBackground(viewport, &tmp, &valid); - ok(SUCCEEDED(hr), "Failed to get viewport background, hr %#x.\n", hr); - ok(tmp == mat_handle, "Got unexpected material handle %#x, expected %#x.\n", tmp, mat_handle); + ok(SUCCEEDED(hr), "Failed to get viewport background, hr %#lx.\n", hr); + ok(tmp == mat_handle, "Got unexpected material handle %#lx, expected %#lx.\n", tmp, mat_handle); ok(valid, "Got unexpected valid %#x.\n", valid); hr = IDirect3DViewport2_Clear(viewport, 1, &clear_rect, D3DCLEAR_TARGET); - ok(SUCCEEDED(hr), "Failed to clear viewport, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to clear viewport, hr %#lx.\n", hr); color = get_surface_color(rt, 320, 240); - ok(compare_color(color, 0x00ff0000, 1), "Got unexpected color 0x%08x.\n", color); + ok(compare_color(color, 0x00ff0000, 1), "Got unexpected color 0x%08lx.\n", color);
hr = IDirect3DViewport2_SetBackground(viewport, 0); - ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#lx.\n", hr); hr = IDirect3DViewport2_GetBackground(viewport, &tmp, &valid); - ok(SUCCEEDED(hr), "Failed to get viewport background, hr %#x.\n", hr); - ok(tmp == mat_handle, "Got unexpected material handle %#x, expected %#x.\n", tmp, mat_handle); + ok(SUCCEEDED(hr), "Failed to get viewport background, hr %#lx.\n", hr); + ok(tmp == mat_handle, "Got unexpected material handle %#lx, expected %#lx.\n", tmp, mat_handle); ok(valid, "Got unexpected valid %#x.\n", valid); hr = IDirect3DViewport2_Clear(viewport, 1, &clear_rect, D3DCLEAR_TARGET); - ok(SUCCEEDED(hr), "Failed to clear viewport, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to clear viewport, hr %#lx.\n", hr); color = get_surface_color(rt, 320, 240); - ok(compare_color(color, 0x00ff0000, 1), "Got unexpected color 0x%08x.\n", color); + ok(compare_color(color, 0x00ff0000, 1), "Got unexpected color 0x%08lx.\n", color);
destroy_viewport(device, viewport); viewport = create_viewport(device, 0, 0, 640, 480);
hr = IDirect3DViewport2_GetBackground(viewport, &tmp, &valid); - ok(SUCCEEDED(hr), "Failed to get viewport background, hr %#x.\n", hr); - ok(!tmp, "Got unexpected material handle %#x.\n", tmp); + ok(SUCCEEDED(hr), "Failed to get viewport background, hr %#lx.\n", hr); + ok(!tmp, "Got unexpected material handle %#lx.\n", tmp); ok(!valid, "Got unexpected valid %#x.\n", valid); hr = IDirect3DViewport2_Clear(viewport, 1, &clear_rect, D3DCLEAR_TARGET); - ok(SUCCEEDED(hr), "Failed to clear viewport, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to clear viewport, hr %#lx.\n", hr); color = get_surface_color(rt, 320, 240); - ok(compare_color(color, 0x00000000, 1), "Got unexpected color 0x%08x.\n", color); + ok(compare_color(color, 0x00000000, 1), "Got unexpected color 0x%08lx.\n", color);
destroy_viewport(device, viewport); destroy_material(background); destroy_material(material); IDirectDrawSurface_Release(rt); refcount = IDirect3DDevice2_Release(device); - ok(!refcount, "Device has %u references left.\n", refcount); + ok(!refcount, "Device has %lu references left.\n", refcount); refcount = IDirectDraw2_Release(ddraw); - ok(!refcount, "Ddraw object has %u references left.\n", refcount); + ok(!refcount, "Ddraw object has %lu references left.\n", refcount); DestroyWindow(window); }
@@ -7920,83 +7920,83 @@ static void test_lighting(void) }
hr = IDirect3DDevice2_GetDirect3D(device, &d3d); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
hr = IDirect3DDevice2_GetRenderTarget(device, &rt); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
viewport = create_viewport(device, 0, 0, 640, 480); hr = IDirect3DDevice2_SetCurrentViewport(device, viewport); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
material = create_diffuse_and_ambient_material(device, 1.0f, 1.0f, 1.0f, 1.0f); viewport_set_background(device, viewport, material);
hr = IDirect3DViewport2_Clear(viewport, 1, &clear_rect, D3DCLEAR_TARGET); - ok(SUCCEEDED(hr), "Failed to clear viewport, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to clear viewport, hr %#lx.\n", hr);
hr = IDirect3DDevice2_SetTransform(device, D3DTRANSFORMSTATE_WORLD, &mat); - ok(SUCCEEDED(hr), "Failed to set world transform, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set world transform, hr %#lx.\n", hr); hr = IDirect3DDevice2_SetTransform(device, D3DTRANSFORMSTATE_VIEW, &mat); - ok(SUCCEEDED(hr), "Failed to set view transform, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set view transform, hr %#lx.\n", hr); hr = IDirect3DDevice2_SetTransform(device, D3DTRANSFORMSTATE_PROJECTION, &mat); - ok(SUCCEEDED(hr), "Failed to set projection transform, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set projection transform, hr %#lx.\n", hr); hr = IDirect3DDevice2_SetRenderState(device, D3DRENDERSTATE_ZENABLE, FALSE); - ok(SUCCEEDED(hr), "Failed to disable zbuffer, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to disable zbuffer, hr %#lx.\n", hr); hr = IDirect3DDevice2_SetRenderState(device, D3DRENDERSTATE_FOGENABLE, FALSE); - ok(SUCCEEDED(hr), "Failed to disable fog, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to disable fog, hr %#lx.\n", hr); hr = IDirect3DDevice2_SetRenderState(device, D3DRENDERSTATE_CULLMODE, D3DCULL_NONE); - ok(SUCCEEDED(hr), "Failed to disable culling, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to disable culling, hr %#lx.\n", hr);
hr = IDirect3DDevice2_BeginScene(device); - ok(SUCCEEDED(hr), "Failed to begin scene, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to begin scene, hr %#lx.\n", hr);
/* There is no D3DRENDERSTATE_LIGHTING on ddraw < 7. */ hr = IDirect3DDevice2_SetRenderState(device, D3DRENDERSTATE_LIGHTING, FALSE); - ok(SUCCEEDED(hr), "Failed to disable lighting, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to disable lighting, hr %#lx.\n", hr); hr = IDirect3DDevice2_DrawIndexedPrimitive(device, D3DPT_TRIANGLELIST, D3DVT_LVERTEX, unlitquad, 4, indices, 6, 0); - ok(SUCCEEDED(hr), "Failed to draw, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to draw, hr %#lx.\n", hr);
hr = IDirect3DDevice2_SetRenderState(device, D3DRENDERSTATE_LIGHTING, TRUE); - ok(SUCCEEDED(hr), "Failed to enable lighting, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to enable lighting, hr %#lx.\n", hr); hr = IDirect3DDevice2_DrawIndexedPrimitive(device, D3DPT_TRIANGLELIST, D3DVT_LVERTEX, litquad, 4, indices, 6, 0); - ok(SUCCEEDED(hr), "Failed to draw, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to draw, hr %#lx.\n", hr);
hr = IDirect3DDevice2_SetRenderState(device, D3DRENDERSTATE_LIGHTING, FALSE); - ok(SUCCEEDED(hr), "Failed to disable lighting, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to disable lighting, hr %#lx.\n", hr); hr = IDirect3DDevice2_DrawIndexedPrimitive(device, D3DPT_TRIANGLELIST, D3DVT_VERTEX, unlitnquad, 4, indices, 6, 0); - ok(SUCCEEDED(hr), "Failed to draw, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to draw, hr %#lx.\n", hr);
hr = IDirect3DDevice2_SetRenderState(device, D3DRENDERSTATE_LIGHTING, TRUE); - ok(SUCCEEDED(hr), "Failed to disable lighting, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to disable lighting, hr %#lx.\n", hr); hr = IDirect3DDevice2_DrawIndexedPrimitive(device, D3DPT_TRIANGLELIST, D3DVT_VERTEX, litnquad, 4, indices, 6, 0); - ok(SUCCEEDED(hr), "Failed to draw, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to draw, hr %#lx.\n", hr);
hr = IDirect3DDevice2_EndScene(device); - ok(SUCCEEDED(hr), "Failed to end scene, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to end scene, hr %#lx.\n", hr);
color = get_surface_color(rt, 160, 360); - ok(color == 0x00ff0000, "Unlit quad without normals has color 0x%08x.\n", color); + ok(color == 0x00ff0000, "Unlit quad without normals has color 0x%08lx.\n", color); color = get_surface_color(rt, 160, 120); - ok(color == 0x0000ff00, "Lit quad without normals has color 0x%08x.\n", color); + ok(color == 0x0000ff00, "Lit quad without normals has color 0x%08lx.\n", color); color = get_surface_color(rt, 480, 360); - ok(color == 0x00ffffff, "Unlit quad with normals has color 0x%08x.\n", color); + ok(color == 0x00ffffff, "Unlit quad with normals has color 0x%08lx.\n", color); color = get_surface_color(rt, 480, 120); - ok(color == 0x00ffffff, "Lit quad with normals has color 0x%08x.\n", color); + ok(color == 0x00ffffff, "Lit quad with normals has color 0x%08lx.\n", color);
hr = IDirect3DMaterial2_GetHandle(material, device, &mat_handle); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirect3DDevice2_SetLightState(device, D3DLIGHTSTATE_MATERIAL, mat_handle); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirect3DDevice2_SetLightState(device, D3DLIGHTSTATE_AMBIENT, 0xff002000); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
hr = IDirect3D2_CreateLight(d3d, &light, NULL); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); memset(&light_desc, 0, sizeof(light_desc)); light_desc.dwSize = sizeof(light_desc); light_desc.dltType = D3DLIGHT_DIRECTIONAL; @@ -8006,78 +8006,78 @@ static void test_lighting(void) U4(light_desc.dcvColor).a = 1.0f; U3(light_desc.dvDirection).z = 1.0f; hr = IDirect3DLight_SetLight(light, (D3DLIGHT *)&light_desc); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirect3DViewport2_AddLight(viewport, light); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirect3DViewport2_AddLight(viewport, light); - ok(hr == D3DERR_LIGHTHASVIEWPORT, "Got unexpected hr %#x.\n", hr); + ok(hr == D3DERR_LIGHTHASVIEWPORT, "Got unexpected hr %#lx.\n", hr);
viewport2 = create_viewport(device, 0, 0, 640, 480); hr = IDirect3DViewport2_AddLight(viewport2, light); - ok(hr == D3DERR_LIGHTHASVIEWPORT, "Got unexpected hr %#x.\n", hr); + ok(hr == D3DERR_LIGHTHASVIEWPORT, "Got unexpected hr %#lx.\n", hr); destroy_viewport(device, viewport2);
hr = IDirect3DViewport2_Clear(viewport, 1, &clear_rect, D3DCLEAR_TARGET); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
hr = IDirect3DDevice2_BeginScene(device); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
hr = IDirect3DDevice2_DrawIndexedPrimitive(device, D3DPT_TRIANGLELIST, D3DVT_VERTEX, nquad, 4, indices, 6, 0); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
hr = IDirect3DDevice2_EndScene(device); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
color = get_surface_color(rt, 320, 240); - ok(color == 0x00002000, "Lit quad with no light has color 0x%08x.\n", color); + ok(color == 0x00002000, "Lit quad with no light has color 0x%08lx.\n", color);
light_desc.dwFlags = D3DLIGHT_ACTIVE; hr = IDirect3DLight_SetLight(light, (D3DLIGHT *)&light_desc); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirect3DViewport2_DeleteLight(viewport, light); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); light_desc.dwFlags = 0; hr = IDirect3DLight_GetLight(light, (D3DLIGHT *)&light_desc); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); - ok(light_desc.dwFlags == D3DLIGHT_ACTIVE, "Got unexpected flags %#x.\n", light_desc.dwFlags); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); + ok(light_desc.dwFlags == D3DLIGHT_ACTIVE, "Got unexpected flags %#lx.\n", light_desc.dwFlags);
hr = IDirect3DViewport2_AddLight(viewport, light); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); for (i = 0; i < ARRAY_SIZE(tests); ++i) { hr = IDirect3DDevice2_SetTransform(device, D3DTRANSFORMSTATE_WORLD, tests[i].world_matrix); - ok(SUCCEEDED(hr), "Failed to set world transform, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set world transform, hr %#lx.\n", hr);
hr = IDirect3DViewport2_Clear(viewport, 1, &clear_rect, D3DCLEAR_TARGET); - ok(SUCCEEDED(hr), "Failed to clear viewport, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to clear viewport, hr %#lx.\n", hr);
hr = IDirect3DDevice2_BeginScene(device); - ok(SUCCEEDED(hr), "Failed to begin scene, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to begin scene, hr %#lx.\n", hr);
hr = IDirect3DDevice2_DrawIndexedPrimitive(device, D3DPT_TRIANGLELIST, D3DVT_VERTEX, tests[i].quad, 4, indices, 6, 0); - ok(SUCCEEDED(hr), "Failed to draw, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to draw, hr %#lx.\n", hr);
hr = IDirect3DDevice2_EndScene(device); - ok(SUCCEEDED(hr), "Failed to end scene, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to end scene, hr %#lx.\n", hr);
color = get_surface_color(rt, 320, 240); - ok(color == tests[i].expected, "%s has color 0x%08x.\n", tests[i].message, color); + ok(color == tests[i].expected, "%s has color 0x%08lx.\n", tests[i].message, color); }
hr = IDirect3DViewport2_DeleteLight(viewport, light); - ok(SUCCEEDED(hr), "Failed to remove a light from the viewport, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to remove a light from the viewport, hr %#lx.\n", hr); IDirect3DLight_Release(light); destroy_material(material); destroy_viewport(device, viewport); IDirectDrawSurface2_Release(rt); refcount = IDirect3DDevice2_Release(device); - ok(!refcount, "Device has %u references left.\n", refcount); + ok(!refcount, "Device has %lu references left.\n", refcount); IDirect3D2_Release(d3d); refcount = IDirectDraw2_Release(ddraw); - ok(!refcount, "Ddraw object has %u references left.\n", refcount); + ok(!refcount, "Ddraw object has %lu references left.\n", refcount); DestroyWindow(window); }
@@ -8308,67 +8308,67 @@ static void test_specular_lighting(void) }
hr = IDirect3DDevice2_GetDirect3D(device, &d3d); - ok(SUCCEEDED(hr), "Failed to get D3D interface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get D3D interface, hr %#lx.\n", hr);
hr = IDirect3DDevice2_GetRenderTarget(device, &rt); - ok(SUCCEEDED(hr), "Failed to get render target, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get render target, hr %#lx.\n", hr);
viewport = create_viewport(device, 0, 0, 640, 480); hr = IDirect3DDevice2_SetCurrentViewport(device, viewport); - ok(SUCCEEDED(hr), "Failed to set current viewport, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set current viewport, hr %#lx.\n", hr);
hr = IDirect3DDevice2_SetTransform(device, D3DTRANSFORMSTATE_WORLD, &mat); - ok(SUCCEEDED(hr), "Failed to set world transform, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set world transform, hr %#lx.\n", hr); hr = IDirect3DDevice2_SetTransform(device, D3DTRANSFORMSTATE_VIEW, &mat); - ok(SUCCEEDED(hr), "Failed to set view transform, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set view transform, hr %#lx.\n", hr); hr = IDirect3DDevice2_SetTransform(device, D3DTRANSFORMSTATE_PROJECTION, &mat); - ok(SUCCEEDED(hr), "Failed to set projection transform, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set projection transform, hr %#lx.\n", hr); hr = IDirect3DDevice2_SetRenderState(device, D3DRENDERSTATE_ZENABLE, FALSE); - ok(SUCCEEDED(hr), "Failed to disable z-buffering, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to disable z-buffering, hr %#lx.\n", hr); hr = IDirect3DDevice2_SetRenderState(device, D3DRENDERSTATE_FOGENABLE, FALSE); - ok(SUCCEEDED(hr), "Failed to disable fog, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to disable fog, hr %#lx.\n", hr);
background_material = create_diffuse_material(device, 1.0f, 1.0f, 1.0f, 1.0f); viewport_set_background(device, viewport, background_material);
hr = IDirect3D2_CreateLight(d3d, &light, NULL); - ok(SUCCEEDED(hr), "Failed to create a light object, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create a light object, hr %#lx.\n", hr); hr = IDirect3DViewport2_AddLight(viewport, light); - ok(SUCCEEDED(hr), "Failed to add a light to the viewport, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to add a light to the viewport, hr %#lx.\n", hr);
hr = IDirect3DDevice2_SetRenderState(device, D3DRENDERSTATE_SPECULARENABLE, TRUE); - ok(SUCCEEDED(hr), "Failed to enable specular lighting, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to enable specular lighting, hr %#lx.\n", hr);
for (i = 0; i < ARRAY_SIZE(tests); ++i) { tests[i].light->dwFlags = D3DLIGHT_ACTIVE; hr = IDirect3DLight_SetLight(light, (D3DLIGHT *)tests[i].light); - ok(SUCCEEDED(hr), "Failed to set light, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set light, hr %#lx.\n", hr);
material = create_specular_material(device, 1.0f, 1.0f, 1.0f, 1.0f, tests[i].specular_power); hr = IDirect3DMaterial2_GetHandle(material, device, &mat_handle); - ok(SUCCEEDED(hr), "Failed to get material handle, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get material handle, hr %#lx.\n", hr); hr = IDirect3DDevice2_SetLightState(device, D3DLIGHTSTATE_MATERIAL, mat_handle); - ok(SUCCEEDED(hr), "Failed to set material state, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set material state, hr %#lx.\n", hr);
hr = IDirect3DViewport2_Clear(viewport, 1, &clear_rect, D3DCLEAR_TARGET); - ok(SUCCEEDED(hr), "Failed to clear viewport, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to clear viewport, hr %#lx.\n", hr);
hr = IDirect3DDevice2_BeginScene(device); - ok(SUCCEEDED(hr), "Failed to begin scene, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to begin scene, hr %#lx.\n", hr);
hr = IDirect3DDevice2_DrawIndexedPrimitive(device, D3DPT_TRIANGLELIST, D3DVT_VERTEX, quad, vertices_side * vertices_side, indices, indices_count, 0); - ok(SUCCEEDED(hr), "Failed to draw, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to draw, hr %#lx.\n", hr);
hr = IDirect3DDevice2_EndScene(device); - ok(SUCCEEDED(hr), "Failed to end scene, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to end scene, hr %#lx.\n", hr);
for (j = 0; j < tests[i].expected_count; ++j) { color = get_surface_color(rt, tests[i].expected[j].x, tests[i].expected[j].y); ok(compare_color(color, tests[i].expected[j].color, 1), - "Expected color 0x%08x at location (%u, %u), got 0x%08x, case %u.\n", + "Expected color 0x%08lx at location (%u, %u), got 0x%08lx, case %u.\n", tests[i].expected[j].color, tests[i].expected[j].x, tests[i].expected[j].y, color, i); } @@ -8377,16 +8377,16 @@ static void test_specular_lighting(void) }
hr = IDirect3DViewport2_DeleteLight(viewport, light); - ok(SUCCEEDED(hr), "Failed to remove a light from the viewport, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to remove a light from the viewport, hr %#lx.\n", hr); IDirect3DLight_Release(light); destroy_material(background_material); destroy_viewport(device, viewport); IDirectDrawSurface2_Release(rt); refcount = IDirect3DDevice2_Release(device); - ok(!refcount, "Device has %u references left.\n", refcount); + ok(!refcount, "Device has %lu references left.\n", refcount); IDirect3D2_Release(d3d); refcount = IDirectDraw2_Release(ddraw); - ok(!refcount, "Ddraw object has %u references left.\n", refcount); + ok(!refcount, "Ddraw object has %lu references left.\n", refcount); DestroyWindow(window); HeapFree(GetProcessHeap(), 0, indices); HeapFree(GetProcessHeap(), 0, quad); @@ -8434,7 +8434,7 @@ static void test_palette_gdi(void) ddraw = create_ddraw(); ok(!!ddraw, "Failed to create a ddraw object.\n"); hr = IDirectDraw2_SetCooperativeLevel(ddraw, window, DDSCL_NORMAL); - ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#lx.\n", hr);
memset(&surface_desc, 0, sizeof(surface_desc)); surface_desc.dwSize = sizeof(surface_desc); @@ -8446,7 +8446,7 @@ static void test_palette_gdi(void) surface_desc.ddpfPixelFormat.dwFlags = DDPF_PALETTEINDEXED8 | DDPF_RGB; U1(surface_desc.ddpfPixelFormat).dwRGBBitCount = 8; hr = IDirectDraw2_CreateSurface(ddraw, &surface_desc, &surface, NULL); - ok(SUCCEEDED(hr), "Failed to create surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create surface, hr %#lx.\n", hr);
/* Avoid colors from the Windows default palette. */ memset(palette_entries, 0, sizeof(palette_entries)); @@ -8458,7 +8458,7 @@ static void test_palette_gdi(void) palette_entries[4].peBlue = 0x15; hr = IDirectDraw2_CreatePalette(ddraw, DDPCAPS_8BIT | DDPCAPS_ALLOW256, palette_entries, &palette, NULL); - ok(SUCCEEDED(hr), "Failed to create palette, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create palette, hr %#lx.\n", hr);
/* If there is no palette assigned and the display mode is not 8 bpp, some * drivers refuse to create a DC while others allow it. If a DC is created, @@ -8471,9 +8471,9 @@ static void test_palette_gdi(void) * contains uninitialized garbage. See comments below for the P8 case. */
hr = IDirectDrawSurface_SetPalette(surface, palette); - ok(SUCCEEDED(hr), "Failed to set palette, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set palette, hr %#lx.\n", hr); hr = IDirectDrawSurface_GetDC(surface, &dc); - ok(SUCCEEDED(hr), "Failed to get DC, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get DC, hr %#lx.\n", hr); ddraw_palette_handle = SelectPalette(dc, GetStockObject(DEFAULT_PALETTE), FALSE); ok(ddraw_palette_handle == GetStockObject(DEFAULT_PALETTE), "Got unexpected palette %p, expected %p.\n", @@ -8500,7 +8500,7 @@ static void test_palette_gdi(void) palette_entries[4].peGreen = 0x24; palette_entries[4].peBlue = 0x25; hr = IDirectDrawPalette_SetEntries(palette, 0, 4, 1, &palette_entries[4]); - ok(SUCCEEDED(hr), "Failed to set palette entries, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set palette entries, hr %#lx.\n", hr);
i = GetDIBColorTable(dc, 4, 1, &rgbquad[4]); ok(i == 1, "Expected count 1, got %u.\n", i); @@ -8511,9 +8511,9 @@ static void test_palette_gdi(void)
/* Neither does re-setting the palette. */ hr = IDirectDrawSurface_SetPalette(surface, NULL); - ok(SUCCEEDED(hr), "Failed to set palette, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set palette, hr %#lx.\n", hr); hr = IDirectDrawSurface_SetPalette(surface, palette); - ok(SUCCEEDED(hr), "Failed to set palette, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set palette, hr %#lx.\n", hr);
i = GetDIBColorTable(dc, 4, 1, &rgbquad[4]); ok(i == 1, "Expected count 1, got %u.\n", i); @@ -8523,11 +8523,11 @@ static void test_palette_gdi(void) expected1[4].rgbRed, expected1[4].rgbGreen, expected1[4].rgbBlue);
hr = IDirectDrawSurface_ReleaseDC(surface, dc); - ok(SUCCEEDED(hr), "Failed to release DC, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to release DC, hr %#lx.\n", hr);
/* Refresh the DC. This updates the palette. */ hr = IDirectDrawSurface_GetDC(surface, &dc); - ok(SUCCEEDED(hr), "Failed to get DC, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get DC, hr %#lx.\n", hr); i = GetDIBColorTable(dc, 0, ARRAY_SIZE(rgbquad), rgbquad); ok(i == ARRAY_SIZE(rgbquad), "Expected count 255, got %u.\n", i); for (i = 0; i < ARRAY_SIZE(expected2); i++) @@ -8544,13 +8544,13 @@ static void test_palette_gdi(void) i, rgbquad[i].rgbRed, rgbquad[i].rgbGreen, rgbquad[i].rgbBlue); } hr = IDirectDrawSurface_ReleaseDC(surface, dc); - ok(SUCCEEDED(hr), "Failed to release DC, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to release DC, hr %#lx.\n", hr);
refcount = IDirectDrawSurface_Release(surface); - ok(!refcount, "Got unexpected refcount %u.\n", refcount); + ok(!refcount, "Got unexpected refcount %lu.\n", refcount);
hr = IDirectDraw2_SetCooperativeLevel(ddraw, window, DDSCL_FULLSCREEN | DDSCL_EXCLUSIVE); - ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#lx.\n", hr); if (FAILED(IDirectDraw2_SetDisplayMode(ddraw, 640, 480, 8, 0, 0))) { win_skip("Failed to set 8 bpp display mode, skipping test.\n"); @@ -8559,35 +8559,35 @@ static void test_palette_gdi(void) DestroyWindow(window); return; } - ok(SUCCEEDED(hr), "Failed to set display mode, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set display mode, hr %#lx.\n", hr);
memset(&surface_desc, 0, sizeof(surface_desc)); surface_desc.dwSize = sizeof(surface_desc); surface_desc.dwFlags = DDSD_CAPS; surface_desc.ddsCaps.dwCaps = DDSCAPS_PRIMARYSURFACE; hr = IDirectDraw2_CreateSurface(ddraw, &surface_desc, &primary, NULL); - ok(SUCCEEDED(hr), "Failed to create surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create surface, hr %#lx.\n", hr);
memset(&fx, 0, sizeof(fx)); fx.dwSize = sizeof(fx); U5(fx).dwFillColor = 3; SetRect(&r, 0, 0, 319, 479); hr = IDirectDrawSurface_Blt(primary, &r, NULL, NULL, DDBLT_COLORFILL | DDBLT_WAIT, &fx); - ok(SUCCEEDED(hr), "Failed to clear surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to clear surface, hr %#lx.\n", hr); SetRect(&r, 320, 0, 639, 479); U5(fx).dwFillColor = 4; hr = IDirectDrawSurface_Blt(primary, &r, NULL, NULL, DDBLT_COLORFILL | DDBLT_WAIT, &fx); - ok(SUCCEEDED(hr), "Failed to clear surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to clear surface, hr %#lx.\n", hr);
hr = IDirectDrawSurface_SetPalette(primary, palette); - ok(SUCCEEDED(hr), "Failed to set palette, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set palette, hr %#lx.\n", hr); hr = IDirectDrawSurface_GetDC(primary, &dc); - ok(SUCCEEDED(hr), "Failed to get DC, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get DC, hr %#lx.\n", hr);
color = GetPixel(dc, 160, 240); - ok(color == 0x00030000, "Clear index 3: Got unexpected color 0x%08x.\n", color); + ok(color == 0x00030000, "Clear index 3: Got unexpected color 0x%08lx.\n", color); color = GetPixel(dc, 480, 240); - ok(color == 0x00252423, "Clear index 4: Got unexpected color 0x%08x.\n", color); + ok(color == 0x00252423, "Clear index 4: Got unexpected color 0x%08lx.\n", color);
ddraw_palette_handle = SelectPalette(dc, GetStockObject(DEFAULT_PALETTE), FALSE); ok(ddraw_palette_handle == GetStockObject(DEFAULT_PALETTE), @@ -8617,7 +8617,7 @@ static void test_palette_gdi(void) i, rgbquad[i].rgbRed, rgbquad[i].rgbGreen, rgbquad[i].rgbBlue); } hr = IDirectDrawSurface_ReleaseDC(primary, dc); - ok(SUCCEEDED(hr), "Failed to release DC, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to release DC, hr %#lx.\n", hr);
memset(&surface_desc, 0, sizeof(surface_desc)); surface_desc.dwSize = sizeof(surface_desc); @@ -8626,12 +8626,12 @@ static void test_palette_gdi(void) surface_desc.dwHeight = 16; surface_desc.ddsCaps.dwCaps = DDSCAPS_OFFSCREENPLAIN; hr = IDirectDraw2_CreateSurface(ddraw, &surface_desc, &surface, NULL); - ok(SUCCEEDED(hr), "Failed to create surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create surface, hr %#lx.\n", hr);
/* Here the offscreen surface appears to use the primary's palette, * but in all likelihood it is actually the system palette. */ hr = IDirectDrawSurface_GetDC(surface, &dc); - ok(SUCCEEDED(hr), "Failed to get DC, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get DC, hr %#lx.\n", hr); i = GetDIBColorTable(dc, 0, ARRAY_SIZE(rgbquad), rgbquad); ok(i == ARRAY_SIZE(rgbquad), "Expected count 255, got %u.\n", i); for (i = 0; i < ARRAY_SIZE(expected2); i++) @@ -8648,7 +8648,7 @@ static void test_palette_gdi(void) i, rgbquad[i].rgbRed, rgbquad[i].rgbGreen, rgbquad[i].rgbBlue); } hr = IDirectDrawSurface_ReleaseDC(surface, dc); - ok(SUCCEEDED(hr), "Failed to release DC, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to release DC, hr %#lx.\n", hr);
/* On real hardware a change to the primary surface's palette applies immediately, * even on device contexts from offscreen surfaces that do not have their own @@ -8664,14 +8664,14 @@ static void test_palette_gdi(void) palette_entries[4].peBlue = 0x56; hr = IDirectDraw2_CreatePalette(ddraw, DDPCAPS_8BIT | DDPCAPS_ALLOW256, palette_entries, &palette2, NULL); - ok(SUCCEEDED(hr), "Failed to create palette, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create palette, hr %#lx.\n", hr); hr = IDirectDrawSurface_SetPalette(surface, palette2); - ok(SUCCEEDED(hr), "Failed to set palette, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set palette, hr %#lx.\n", hr);
/* A palette assigned to the offscreen surface overrides the primary / system * palette. */ hr = IDirectDrawSurface_GetDC(surface, &dc); - ok(SUCCEEDED(hr), "Failed to get DC, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get DC, hr %#lx.\n", hr); i = GetDIBColorTable(dc, 0, ARRAY_SIZE(rgbquad), rgbquad); ok(i == ARRAY_SIZE(rgbquad), "Expected count 255, got %u.\n", i); for (i = 0; i < ARRAY_SIZE(expected3); i++) @@ -8688,24 +8688,24 @@ static void test_palette_gdi(void) i, rgbquad[i].rgbRed, rgbquad[i].rgbGreen, rgbquad[i].rgbBlue); } hr = IDirectDrawSurface_ReleaseDC(surface, dc); - ok(SUCCEEDED(hr), "Failed to release DC, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to release DC, hr %#lx.\n", hr);
refcount = IDirectDrawSurface_Release(surface); - ok(!refcount, "Got unexpected refcount %u.\n", refcount); + ok(!refcount, "Got unexpected refcount %lu.\n", refcount);
/* The Windows 8 testbot keeps extra references to the primary and * backbuffer while in 8 bpp mode. */ hr = IDirectDraw2_RestoreDisplayMode(ddraw); - ok(SUCCEEDED(hr), "Failed to restore display mode, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to restore display mode, hr %#lx.\n", hr);
refcount = IDirectDrawSurface_Release(primary); - ok(!refcount, "Got unexpected refcount %u.\n", refcount); + ok(!refcount, "Got unexpected refcount %lu.\n", refcount); refcount = IDirectDrawPalette_Release(palette2); - ok(!refcount, "Got unexpected refcount %u.\n", refcount); + ok(!refcount, "Got unexpected refcount %lu.\n", refcount); refcount = IDirectDrawPalette_Release(palette); - ok(!refcount, "Got unexpected refcount %u.\n", refcount); + ok(!refcount, "Got unexpected refcount %lu.\n", refcount); refcount = IDirectDraw2_Release(ddraw); - ok(!refcount, "Got unexpected refcount %u.\n", refcount); + ok(!refcount, "Got unexpected refcount %lu.\n", refcount); DestroyWindow(window); }
@@ -8745,18 +8745,18 @@ static void test_palette_alpha(void) return; } hr = IDirectDraw2_SetCooperativeLevel(ddraw, window, DDSCL_EXCLUSIVE | DDSCL_FULLSCREEN); - ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#lx.\n", hr);
memset(palette_entries, 0, sizeof(palette_entries)); palette_entries[1].peFlags = 0x42; palette_entries[2].peFlags = 0xff; palette_entries[3].peFlags = 0x80; hr = IDirectDraw2_CreatePalette(ddraw, DDPCAPS_ALLOW256 | DDPCAPS_8BIT, palette_entries, &palette, NULL); - ok(SUCCEEDED(hr), "Failed to create palette, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create palette, hr %#lx.\n", hr);
memset(palette_entries, 0x66, sizeof(palette_entries)); hr = IDirectDrawPalette_GetEntries(palette, 0, 1, 4, palette_entries); - ok(SUCCEEDED(hr), "Failed to get palette entries, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get palette entries, hr %#lx.\n", hr); ok(palette_entries[0].peFlags == 0x42, "Got unexpected peFlags 0x%02x, expected 0xff.\n", palette_entries[0].peFlags); ok(palette_entries[1].peFlags == 0xff, "Got unexpected peFlags 0x%02x, expected 0xff.\n", @@ -8775,11 +8775,11 @@ static void test_palette_alpha(void) palette_entries[3].peFlags = 0x80; hr = IDirectDraw2_CreatePalette(ddraw, DDPCAPS_ALLOW256 | DDPCAPS_8BIT | DDPCAPS_ALPHA, palette_entries, &palette, NULL); - ok(SUCCEEDED(hr), "Failed to create palette, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create palette, hr %#lx.\n", hr);
memset(palette_entries, 0x66, sizeof(palette_entries)); hr = IDirectDrawPalette_GetEntries(palette, 0, 1, 4, palette_entries); - ok(SUCCEEDED(hr), "Failed to get palette entries, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get palette entries, hr %#lx.\n", hr); ok(palette_entries[0].peFlags == 0x42, "Got unexpected peFlags 0x%02x, expected 0xff.\n", palette_entries[0].peFlags); ok(palette_entries[1].peFlags == 0xff, "Got unexpected peFlags 0x%02x, expected 0xff.\n", @@ -8798,16 +8798,16 @@ static void test_palette_alpha(void) surface_desc.dwHeight = 128; surface_desc.ddsCaps.dwCaps = test_data[i].caps; hr = IDirectDraw2_CreateSurface(ddraw, &surface_desc, &surface1, NULL); - ok(SUCCEEDED(hr), "Failed to create %s surface, hr %#x.\n", test_data[i].name, hr); + ok(SUCCEEDED(hr), "Failed to create %s surface, hr %#lx.\n", test_data[i].name, hr); hr = IDirectDrawSurface_QueryInterface(surface1, &IID_IDirectDrawSurface2, (void **)&surface); - ok(SUCCEEDED(hr), "Failed to get IDirectDrawSurface2 interface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get IDirectDrawSurface2 interface, hr %#lx.\n", hr); IDirectDrawSurface_Release(surface1);
hr = IDirectDrawSurface2_SetPalette(surface, palette); if (test_data[i].attach_allowed) - ok(SUCCEEDED(hr), "Failed to attach palette to %s surface, hr %#x.\n", test_data[i].name, hr); + ok(SUCCEEDED(hr), "Failed to attach palette to %s surface, hr %#lx.\n", test_data[i].name, hr); else - ok(hr == DDERR_INVALIDSURFACETYPE, "Got unexpected hr %#x, %s surface.\n", hr, test_data[i].name); + ok(hr == DDERR_INVALIDSURFACETYPE, "Got unexpected hr %#lx, %s surface.\n", hr, test_data[i].name);
if (SUCCEEDED(hr)) { @@ -8817,7 +8817,7 @@ static void test_palette_alpha(void)
hr = IDirectDrawSurface2_GetDC(surface, &dc); ok(SUCCEEDED(hr) || broken(hr == DDERR_CANTCREATEDC) /* Win2k testbot */, - "Failed to get DC, hr %#x, %s surface.\n", hr, test_data[i].name); + "Failed to get DC, hr %#lx, %s surface.\n", hr, test_data[i].name); if (SUCCEEDED(hr)) { retval = GetDIBColorTable(dc, 1, 1, &rgbquad); @@ -8831,7 +8831,7 @@ static void test_palette_alpha(void) ok(rgbquad.rgbReserved == 0, "Expected rgbReserved = 0, got %u, %s surface.\n", rgbquad.rgbReserved, test_data[i].name); hr = IDirectDrawSurface2_ReleaseDC(surface, dc); - ok(SUCCEEDED(hr), "Failed to release DC, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to release DC, hr %#lx.\n", hr); } } IDirectDrawSurface2_Release(surface); @@ -8851,24 +8851,24 @@ static void test_palette_alpha(void) U3(surface_desc.ddpfPixelFormat).dwGBitMask = 0x0000ff00; U4(surface_desc.ddpfPixelFormat).dwBBitMask = 0x000000ff; hr = IDirectDraw2_CreateSurface(ddraw, &surface_desc, &surface1, NULL); - ok(SUCCEEDED(hr), "Failed to create surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create surface, hr %#lx.\n", hr); hr = IDirectDrawSurface_QueryInterface(surface1, &IID_IDirectDrawSurface2, (void **)&surface); - ok(SUCCEEDED(hr), "Failed to get IDirectDrawSurface2 interface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get IDirectDrawSurface2 interface, hr %#lx.\n", hr); IDirectDrawSurface_Release(surface1);
hr = IDirectDrawSurface2_SetPalette(surface, palette); - ok(hr == DDERR_INVALIDSURFACETYPE, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_INVALIDSURFACETYPE, "Got unexpected hr %#lx.\n", hr); IDirectDrawSurface2_Release(surface);
/* The Windows 8 testbot keeps extra references to the primary * while in 8 bpp mode. */ hr = IDirectDraw2_RestoreDisplayMode(ddraw); - ok(SUCCEEDED(hr), "Failed to restore display mode, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to restore display mode, hr %#lx.\n", hr);
refcount = IDirectDrawPalette_Release(palette); - ok(!refcount, "Got unexpected refcount %u.\n", refcount); + ok(!refcount, "Got unexpected refcount %lu.\n", refcount); refcount = IDirectDraw2_Release(ddraw); - ok(!refcount, "Got unexpected refcount %u.\n", refcount); + ok(!refcount, "Got unexpected refcount %lu.\n", refcount); DestroyWindow(window); }
@@ -8891,7 +8891,7 @@ static void test_lost_device(void) ddraw = create_ddraw(); ok(!!ddraw, "Failed to create a ddraw object.\n"); hr = IDirectDraw2_SetCooperativeLevel(ddraw, window1, DDSCL_EXCLUSIVE | DDSCL_FULLSCREEN); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr);
memset(&surface_desc, 0, sizeof(surface_desc)); surface_desc.dwSize = sizeof(surface_desc); @@ -8899,7 +8899,7 @@ static void test_lost_device(void) surface_desc.ddsCaps.dwCaps = DDSCAPS_PRIMARYSURFACE | DDSCAPS_COMPLEX | DDSCAPS_FLIP; surface_desc.dwBackBufferCount = 1; hr = IDirectDraw2_CreateSurface(ddraw, &surface_desc, &surface, NULL); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr);
memset(&surface_desc, 0, sizeof(surface_desc)); surface_desc.dwSize = sizeof(surface_desc); @@ -8908,7 +8908,7 @@ static void test_lost_device(void) surface_desc.dwWidth = 100; surface_desc.dwHeight = 100; hr = IDirectDraw2_CreateSurface(ddraw, &surface_desc, &sysmem_surface, NULL); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr);
memset(&surface_desc, 0, sizeof(surface_desc)); surface_desc.dwSize = sizeof(surface_desc); @@ -8929,83 +8929,83 @@ static void test_lost_device(void) }
hr = IDirectDrawSurface_IsLost(surface); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface_Flip(surface, NULL, DDFLIP_WAIT); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface_IsLost(sysmem_surface); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); if (vidmem_surface) { hr = IDirectDrawSurface_IsLost(vidmem_surface); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); }
ret = SetForegroundWindow(GetDesktopWindow()); ok(ret, "Failed to set foreground window.\n"); hr = IDirectDrawSurface_IsLost(surface); - ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface_Flip(surface, NULL, DDFLIP_WAIT); - ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface_Restore(surface); - ok(hr == DDERR_WRONGMODE, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_WRONGMODE, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface_IsLost(surface); - ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface_IsLost(sysmem_surface); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface_Restore(sysmem_surface); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface_IsLost(sysmem_surface); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); if (vidmem_surface) { hr = IDirectDrawSurface_IsLost(vidmem_surface); - ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface_Restore(vidmem_surface); - ok(hr == DDERR_WRONGMODE, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_WRONGMODE, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface_IsLost(vidmem_surface); - ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#lx.\n", hr); }
ret = SetForegroundWindow(window1); ok(ret, "Failed to set foreground window.\n"); hr = IDirectDrawSurface_IsLost(surface); - ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface_Flip(surface, NULL, DDFLIP_WAIT); - ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface_IsLost(sysmem_surface); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); if (vidmem_surface) { hr = IDirectDrawSurface_IsLost(vidmem_surface); - ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#lx.\n", hr); }
hr = restore_surfaces(ddraw); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface_IsLost(surface); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface_Flip(surface, NULL, DDFLIP_WAIT); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface_IsLost(sysmem_surface); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); if (vidmem_surface) { hr = IDirectDrawSurface_IsLost(vidmem_surface); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); }
hr = IDirectDraw2_SetCooperativeLevel(ddraw, window1, DDSCL_NORMAL); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface_IsLost(surface); - todo_wine ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#x.\n", hr); + todo_wine ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface_Flip(surface, NULL, DDFLIP_WAIT); - todo_wine ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#x.\n", hr); + todo_wine ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface_IsLost(sysmem_surface); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); if (vidmem_surface) { hr = IDirectDrawSurface_IsLost(vidmem_surface); - todo_wine ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#x.\n", hr); + todo_wine ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#lx.\n", hr); }
/* Trying to restore the primary will crash, probably because flippable @@ -9016,59 +9016,59 @@ static void test_lost_device(void) surface_desc.dwFlags = DDSD_CAPS; surface_desc.ddsCaps.dwCaps = DDSCAPS_PRIMARYSURFACE; hr = IDirectDraw2_CreateSurface(ddraw, &surface_desc, &surface, NULL); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); hr = restore_surfaces(ddraw); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr);
hr = IDirectDrawSurface_IsLost(surface); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr);
ret = SetForegroundWindow(GetDesktopWindow()); ok(ret, "Failed to set foreground window.\n"); hr = IDirectDrawSurface_IsLost(surface); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface_IsLost(sysmem_surface); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); if (vidmem_surface) { hr = IDirectDrawSurface_IsLost(vidmem_surface); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); }
ret = SetForegroundWindow(window1); ok(ret, "Failed to set foreground window.\n"); hr = IDirectDrawSurface_IsLost(surface); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface_IsLost(sysmem_surface); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); if (vidmem_surface) { hr = IDirectDrawSurface_IsLost(vidmem_surface); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); }
hr = IDirectDraw2_SetCooperativeLevel(ddraw, window1, DDSCL_EXCLUSIVE | DDSCL_FULLSCREEN); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface_IsLost(surface); - ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface_IsLost(sysmem_surface); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); if (vidmem_surface) { hr = IDirectDrawSurface_IsLost(vidmem_surface); - ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#lx.\n", hr); }
hr = restore_surfaces(ddraw); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface_IsLost(surface); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface_IsLost(sysmem_surface); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); if (vidmem_surface) { hr = IDirectDrawSurface_IsLost(vidmem_surface); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); }
IDirectDrawSurface_Release(surface); @@ -9078,103 +9078,103 @@ static void test_lost_device(void) surface_desc.ddsCaps.dwCaps = DDSCAPS_PRIMARYSURFACE | DDSCAPS_COMPLEX | DDSCAPS_FLIP; surface_desc.dwBackBufferCount = 1; hr = IDirectDraw2_CreateSurface(ddraw, &surface_desc, &surface, NULL); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr);
hr = IDirectDraw2_SetCooperativeLevel(ddraw, window1, DDSCL_EXCLUSIVE | DDSCL_FULLSCREEN); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface_IsLost(surface); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface_Flip(surface, NULL, DDFLIP_WAIT); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface_IsLost(sysmem_surface); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); if (vidmem_surface) { hr = IDirectDrawSurface_IsLost(vidmem_surface); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); }
hr = IDirectDraw2_SetCooperativeLevel(ddraw, window1, DDSCL_NORMAL | DDSCL_FULLSCREEN); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface_IsLost(surface); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface_Flip(surface, NULL, DDFLIP_WAIT); - ok(hr == DDERR_NOEXCLUSIVEMODE, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_NOEXCLUSIVEMODE, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface_IsLost(sysmem_surface); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); if (vidmem_surface) { hr = IDirectDrawSurface_IsLost(vidmem_surface); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); }
hr = IDirectDraw2_SetCooperativeLevel(ddraw, window1, DDSCL_NORMAL); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface_IsLost(surface); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface_Flip(surface, NULL, DDFLIP_WAIT); - ok(hr == DDERR_NOEXCLUSIVEMODE, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_NOEXCLUSIVEMODE, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface_IsLost(sysmem_surface); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); if (vidmem_surface) { hr = IDirectDrawSurface_IsLost(vidmem_surface); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); }
hr = IDirectDraw2_SetCooperativeLevel(ddraw, window2, DDSCL_NORMAL); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface_IsLost(surface); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface_Flip(surface, NULL, DDFLIP_WAIT); - ok(hr == DDERR_NOEXCLUSIVEMODE, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_NOEXCLUSIVEMODE, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface_IsLost(sysmem_surface); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); if (vidmem_surface) { hr = IDirectDrawSurface_IsLost(vidmem_surface); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); }
hr = IDirectDraw2_SetCooperativeLevel(ddraw, window2, DDSCL_NORMAL | DDSCL_FULLSCREEN); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface_IsLost(surface); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface_Flip(surface, NULL, DDFLIP_WAIT); - ok(hr == DDERR_NOEXCLUSIVEMODE, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_NOEXCLUSIVEMODE, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface_IsLost(sysmem_surface); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); if (vidmem_surface) { hr = IDirectDrawSurface_IsLost(vidmem_surface); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); }
hr = IDirectDraw2_SetCooperativeLevel(ddraw, window2, DDSCL_EXCLUSIVE | DDSCL_FULLSCREEN); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface_IsLost(surface); - ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface_Flip(surface, NULL, DDFLIP_WAIT); - ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface_IsLost(sysmem_surface); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); if (vidmem_surface) { hr = IDirectDrawSurface_IsLost(vidmem_surface); - ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#lx.\n", hr); }
memset(&caps, 0, sizeof(caps)); caps.dwCaps = DDSCAPS_FLIP;
hr = IDirectDrawSurface_GetAttachedSurface(surface, &caps, &back_buffer); - ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface_Restore(surface); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface_GetAttachedSurface(surface, &caps, &back_buffer); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface_IsLost(back_buffer); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); IDirectDrawSurface_Release(back_buffer);
if (vidmem_surface) @@ -9182,7 +9182,7 @@ static void test_lost_device(void) IDirectDrawSurface_Release(sysmem_surface); IDirectDrawSurface_Release(surface); refcount = IDirectDraw2_Release(ddraw); - ok(!refcount, "Got unexpected refcount %u.\n", refcount); + ok(!refcount, "Got unexpected refcount %lu.\n", refcount); DestroyWindow(window2); DestroyWindow(window1); } @@ -9200,7 +9200,7 @@ static void test_surface_desc_lock(void) ddraw = create_ddraw(); ok(!!ddraw, "Failed to create a ddraw object.\n"); hr = IDirectDraw2_SetCooperativeLevel(ddraw, window, DDSCL_NORMAL); - ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#lx.\n", hr);
memset(&surface_desc, 0, sizeof(surface_desc)); surface_desc.dwSize = sizeof(surface_desc); @@ -9209,36 +9209,36 @@ static void test_surface_desc_lock(void) surface_desc.dwHeight = 16; surface_desc.ddsCaps.dwCaps = DDSCAPS_OFFSCREENPLAIN; hr = IDirectDraw2_CreateSurface(ddraw, &surface_desc, &surface, NULL); - ok(SUCCEEDED(hr), "Failed to create surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create surface, hr %#lx.\n", hr);
memset(&surface_desc, 0xaa, sizeof(surface_desc)); surface_desc.dwSize = sizeof(surface_desc); hr = IDirectDrawSurface_GetSurfaceDesc(surface, &surface_desc); - ok(SUCCEEDED(hr), "Failed to get surface desc, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get surface desc, hr %#lx.\n", hr); ok(!surface_desc.lpSurface, "Got unexpected lpSurface %p.\n", surface_desc.lpSurface);
memset(&surface_desc, 0xaa, sizeof(surface_desc)); surface_desc.dwSize = sizeof(surface_desc); hr = IDirectDrawSurface_Lock(surface, NULL, &surface_desc, 0, NULL); - ok(SUCCEEDED(hr), "Failed to lock surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to lock surface, hr %#lx.\n", hr); ok(surface_desc.lpSurface != NULL, "Got unexpected lpSurface %p.\n", surface_desc.lpSurface); memset(&surface_desc, 0xaa, sizeof(surface_desc)); surface_desc.dwSize = sizeof(surface_desc); hr = IDirectDrawSurface_GetSurfaceDesc(surface, &surface_desc); - ok(SUCCEEDED(hr), "Failed to get surface desc, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get surface desc, hr %#lx.\n", hr); ok(!surface_desc.lpSurface, "Got unexpected lpSurface %p.\n", surface_desc.lpSurface); hr = IDirectDrawSurface_Unlock(surface, NULL); - ok(SUCCEEDED(hr), "Failed to unlock surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to unlock surface, hr %#lx.\n", hr);
memset(&surface_desc, 0xaa, sizeof(surface_desc)); surface_desc.dwSize = sizeof(surface_desc); hr = IDirectDrawSurface_GetSurfaceDesc(surface, &surface_desc); - ok(SUCCEEDED(hr), "Failed to get surface desc, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get surface desc, hr %#lx.\n", hr); ok(!surface_desc.lpSurface, "Got unexpected lpSurface %p.\n", surface_desc.lpSurface);
IDirectDrawSurface_Release(surface); refcount = IDirectDraw2_Release(ddraw); - ok(!refcount, "Got unexpected refcount %u.\n", refcount); + ok(!refcount, "Got unexpected refcount %lu.\n", refcount); DestroyWindow(window); }
@@ -9296,13 +9296,13 @@ static void test_texturemapblend(void) }
hr = IDirect3DDevice2_GetRenderTarget(device, &rt); - ok(SUCCEEDED(hr), "Failed to get render target, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get render target, hr %#lx.\n", hr);
material = create_diffuse_material(device, 0.0f, 0.0f, 0.0f, 1.0f); viewport = create_viewport(device, 0, 0, 640, 480); viewport_set_background(device, viewport, material); hr = IDirect3DDevice2_SetCurrentViewport(device, viewport); - ok(SUCCEEDED(hr), "Failed to set current viewport, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set current viewport, hr %#lx.\n", hr);
/* Test alpha with DDPF_ALPHAPIXELS texture - should be taken from texture alpha channel. * @@ -9322,64 +9322,64 @@ static void test_texturemapblend(void) U4(ddsd.ddpfPixelFormat).dwBBitMask = 0x000000ff; U5(ddsd.ddpfPixelFormat).dwRGBAlphaBitMask = 0xff000000; hr = IDirectDraw2_CreateSurface(ddraw, &ddsd, &surface, NULL); - ok(SUCCEEDED(hr), "Failed to create surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create surface, hr %#lx.\n", hr);
hr = IDirectDrawSurface_QueryInterface(surface, &IID_IDirect3DTexture2, (void **)&texture); - ok(SUCCEEDED(hr), "Failed to get texture interface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get texture interface, hr %#lx.\n", hr); hr = IDirect3DTexture2_GetHandle(texture, device, &texture_handle); - ok(SUCCEEDED(hr), "Failed to get texture handle, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get texture handle, hr %#lx.\n", hr); hr = IDirect3DDevice2_SetRenderState(device, D3DRENDERSTATE_TEXTUREHANDLE, texture_handle); - ok(SUCCEEDED(hr), "Failed to set render state, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set render state, hr %#lx.\n", hr);
hr = IDirect3DViewport2_Clear(viewport, 1, &clear_rect, D3DCLEAR_TARGET); - ok(SUCCEEDED(hr), "Failed to clear render target, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to clear render target, hr %#lx.\n", hr);
memset(&fx, 0, sizeof(fx)); fx.dwSize = sizeof(fx); U5(fx).dwFillColor = 0xff0000ff; hr = IDirectDrawSurface_Blt(surface, NULL, NULL, NULL, DDBLT_COLORFILL | DDBLT_WAIT, &fx); - ok(SUCCEEDED(hr), "Failed to clear texture, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to clear texture, hr %#lx.\n", hr); U5(fx).dwFillColor = 0x800000ff; hr = IDirectDrawSurface_Blt(surface, &rect, NULL, NULL, DDBLT_COLORFILL | DDBLT_WAIT, &fx); - ok(SUCCEEDED(hr), "Failed to clear texture, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to clear texture, hr %#lx.\n", hr);
/* Note that the ddraw1 version of this test runs tests 1-3 with D3DRENDERSTATE_COLORKEYENABLE * enabled, whereas this version only runs test 4 with color keying on. Because no color key * is set on the texture this should not result in different behavior. */ hr = IDirect3DDevice2_SetRenderState(device, D3DRENDERSTATE_CULLMODE, D3DCULL_NONE); - ok(SUCCEEDED(hr), "Failed to set render state, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set render state, hr %#lx.\n", hr); hr = IDirect3DDevice2_SetRenderState(device, D3DRENDERSTATE_ZENABLE, D3DZB_FALSE); - ok(SUCCEEDED(hr), "Failed to set render state, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set render state, hr %#lx.\n", hr); hr = IDirect3DDevice2_SetRenderState(device, D3DRENDERSTATE_SRCBLEND, D3DBLEND_SRCALPHA); - ok(SUCCEEDED(hr), "Failed to set render state, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set render state, hr %#lx.\n", hr); hr = IDirect3DDevice2_SetRenderState(device, D3DRENDERSTATE_DESTBLEND, D3DBLEND_INVSRCALPHA); - ok(SUCCEEDED(hr), "Failed to set render state, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set render state, hr %#lx.\n", hr); hr = IDirect3DDevice2_SetRenderState(device, D3DRENDERSTATE_ALPHABLENDENABLE, TRUE); - ok(SUCCEEDED(hr), "Failed to set render state, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set render state, hr %#lx.\n", hr); hr = IDirect3DDevice2_SetRenderState(device, D3DRENDERSTATE_TEXTUREMAPBLEND, D3DTBLEND_MODULATE); - ok(SUCCEEDED(hr), "Failed to set render state, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set render state, hr %#lx.\n", hr);
hr = IDirect3DDevice2_BeginScene(device); - ok(SUCCEEDED(hr), "Failed to begin scene, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to begin scene, hr %#lx.\n", hr); hr = IDirect3DDevice2_DrawPrimitive(device, D3DPT_TRIANGLESTRIP, D3DVT_TLVERTEX, &test1_quads[0], 4, 0); - ok(SUCCEEDED(hr), "Failed to draw, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to draw, hr %#lx.\n", hr); hr = IDirect3DDevice2_DrawPrimitive(device, D3DPT_TRIANGLESTRIP, D3DVT_TLVERTEX, &test1_quads[4], 4, 0); - ok(SUCCEEDED(hr), "Failed to draw, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to draw, hr %#lx.\n", hr); hr = IDirect3DDevice2_EndScene(device); - ok(SUCCEEDED(hr), "Failed to end scene, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to end scene, hr %#lx.\n", hr);
color = get_surface_color(rt, 5, 5); - ok(compare_color(color, 0x00000080, 2), "Got unexpected color 0x%08x.\n", color); + ok(compare_color(color, 0x00000080, 2), "Got unexpected color 0x%08lx.\n", color); color = get_surface_color(rt, 400, 5); - ok(compare_color(color, 0x000000ff, 2), "Got unexpected color 0x%08x.\n", color); + ok(compare_color(color, 0x000000ff, 2), "Got unexpected color 0x%08lx.\n", color); color = get_surface_color(rt, 5, 245); - ok(compare_color(color, 0x00000080, 2), "Got unexpected color 0x%08x.\n", color); + ok(compare_color(color, 0x00000080, 2), "Got unexpected color 0x%08lx.\n", color); color = get_surface_color(rt, 400, 245); - ok(compare_color(color, 0x000000ff, 2), "Got unexpected color 0x%08x.\n", color); + ok(compare_color(color, 0x000000ff, 2), "Got unexpected color 0x%08lx.\n", color);
IDirect3DTexture2_Release(texture); ref = IDirectDrawSurface_Release(surface); - ok(ref == 0, "Surface not properly released, refcount %u.\n", ref); + ok(ref == 0, "Surface not properly released, refcount %lu.\n", ref);
/* Test alpha with texture that has no alpha channel - alpha should be taken from diffuse vertex color. */ memset(&ddsd, 0, sizeof(ddsd)); @@ -9396,46 +9396,46 @@ static void test_texturemapblend(void) U4(ddsd.ddpfPixelFormat).dwBBitMask = 0x000000ff;
hr = IDirectDraw2_CreateSurface(ddraw, &ddsd, &surface, NULL); - ok(SUCCEEDED(hr), "Failed to create surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create surface, hr %#lx.\n", hr);
hr = IDirectDrawSurface_QueryInterface(surface, &IID_IDirect3DTexture2, (void **)&texture); - ok(SUCCEEDED(hr), "Failed to get texture interface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get texture interface, hr %#lx.\n", hr); hr = IDirect3DTexture2_GetHandle(texture, device, &texture_handle); - ok(SUCCEEDED(hr), "Failed to get texture handle, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get texture handle, hr %#lx.\n", hr); hr = IDirect3DDevice2_SetRenderState(device, D3DRENDERSTATE_TEXTUREHANDLE, texture_handle); - ok(SUCCEEDED(hr), "Failed to set render state, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set render state, hr %#lx.\n", hr);
hr = IDirect3DViewport2_Clear(viewport, 1, &clear_rect, D3DCLEAR_TARGET); - ok(SUCCEEDED(hr), "Failed to clear render target, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to clear render target, hr %#lx.\n", hr);
U5(fx).dwFillColor = 0xff0000ff; hr = IDirectDrawSurface_Blt(surface, NULL, NULL, NULL, DDBLT_COLORFILL | DDBLT_WAIT, &fx); - ok(SUCCEEDED(hr), "Failed to clear texture, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to clear texture, hr %#lx.\n", hr); U5(fx).dwFillColor = 0x800000ff; hr = IDirectDrawSurface_Blt(surface, &rect, NULL, NULL, DDBLT_COLORFILL | DDBLT_WAIT, &fx); - ok(SUCCEEDED(hr), "Failed to clear texture, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to clear texture, hr %#lx.\n", hr);
hr = IDirect3DDevice2_BeginScene(device); - ok(SUCCEEDED(hr), "Failed to begin scene, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to begin scene, hr %#lx.\n", hr); hr = IDirect3DDevice2_DrawPrimitive(device, D3DPT_TRIANGLESTRIP, D3DVT_TLVERTEX, &test1_quads[0], 4, 0); - ok(SUCCEEDED(hr), "Failed to draw, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to draw, hr %#lx.\n", hr); hr = IDirect3DDevice2_DrawPrimitive(device, D3DPT_TRIANGLESTRIP, D3DVT_TLVERTEX, &test1_quads[4], 4, 0); - ok(SUCCEEDED(hr), "Failed to draw, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to draw, hr %#lx.\n", hr); hr = IDirect3DDevice2_EndScene(device); - ok(SUCCEEDED(hr), "Failed to end scene, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to end scene, hr %#lx.\n", hr);
color = get_surface_color(rt, 5, 5); - ok(compare_color(color, 0x000000ff, 2), "Got unexpected color 0x%08x.\n", color); + ok(compare_color(color, 0x000000ff, 2), "Got unexpected color 0x%08lx.\n", color); color = get_surface_color(rt, 400, 5); - ok(compare_color(color, 0x000000ff, 2), "Got unexpected color 0x%08x.\n", color); + ok(compare_color(color, 0x000000ff, 2), "Got unexpected color 0x%08lx.\n", color); color = get_surface_color(rt, 5, 245); - ok(compare_color(color, 0x00000080, 2), "Got unexpected color 0x%08x.\n", color); + ok(compare_color(color, 0x00000080, 2), "Got unexpected color 0x%08lx.\n", color); color = get_surface_color(rt, 400, 245); - ok(compare_color(color, 0x00000080, 2), "Got unexpected color 0x%08x.\n", color); + ok(compare_color(color, 0x00000080, 2), "Got unexpected color 0x%08lx.\n", color);
IDirect3DTexture2_Release(texture); ref = IDirectDrawSurface_Release(surface); - ok(ref == 0, "Surface not properly released, refcount %u.\n", ref); + ok(ref == 0, "Surface not properly released, refcount %lu.\n", ref);
/* Test RGB - should multiply color components from diffuse vertex color and texture. */ memset(&ddsd, 0, sizeof(ddsd)); @@ -9452,49 +9452,49 @@ static void test_texturemapblend(void) U4(ddsd.ddpfPixelFormat).dwBBitMask = 0x000000ff; U5(ddsd.ddpfPixelFormat).dwRGBAlphaBitMask = 0xff000000; hr = IDirectDraw2_CreateSurface(ddraw, &ddsd, &surface, NULL); - ok(SUCCEEDED(hr), "Failed to create surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create surface, hr %#lx.\n", hr);
hr = IDirectDrawSurface_QueryInterface(surface, &IID_IDirect3DTexture2, (void **)&texture); - ok(SUCCEEDED(hr), "Failed to get texture interface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get texture interface, hr %#lx.\n", hr); hr = IDirect3DTexture2_GetHandle(texture, device, &texture_handle); - ok(SUCCEEDED(hr), "Failed to get texture handle, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get texture handle, hr %#lx.\n", hr); hr = IDirect3DDevice2_SetRenderState(device, D3DRENDERSTATE_TEXTUREHANDLE, texture_handle); - ok(SUCCEEDED(hr), "Failed to set render state, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set render state, hr %#lx.\n", hr);
hr = IDirect3DViewport2_Clear(viewport, 1, &clear_rect, D3DCLEAR_TARGET); - ok(SUCCEEDED(hr), "Failed to clear render target, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to clear render target, hr %#lx.\n", hr);
U5(fx).dwFillColor = 0x00ffffff; hr = IDirectDrawSurface_Blt(surface, NULL, NULL, NULL, DDBLT_COLORFILL | DDBLT_WAIT, &fx); - ok(SUCCEEDED(hr), "Failed to clear texture, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to clear texture, hr %#lx.\n", hr); U5(fx).dwFillColor = 0x00ffff80; hr = IDirectDrawSurface_Blt(surface, &rect, NULL, NULL, DDBLT_COLORFILL | DDBLT_WAIT, &fx); - ok(SUCCEEDED(hr), "Failed to clear texture, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to clear texture, hr %#lx.\n", hr);
hr = IDirect3DDevice2_SetRenderState(device, D3DRENDERSTATE_ALPHABLENDENABLE, FALSE); - ok(SUCCEEDED(hr), "Failed to set render state, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set render state, hr %#lx.\n", hr);
hr = IDirect3DDevice2_BeginScene(device); - ok(SUCCEEDED(hr), "Failed to begin scene, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to begin scene, hr %#lx.\n", hr); hr = IDirect3DDevice2_DrawPrimitive(device, D3DPT_TRIANGLESTRIP, D3DVT_TLVERTEX, &test2_quads[0], 4, 0); - ok(SUCCEEDED(hr), "Failed to draw, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to draw, hr %#lx.\n", hr); hr = IDirect3DDevice2_DrawPrimitive(device, D3DPT_TRIANGLESTRIP, D3DVT_TLVERTEX, &test2_quads[4], 4, 0); - ok(SUCCEEDED(hr), "Failed to draw, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to draw, hr %#lx.\n", hr); hr = IDirect3DDevice2_EndScene(device); - ok(SUCCEEDED(hr), "Failed to end scene, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to end scene, hr %#lx.\n", hr);
color = get_surface_color(rt, 5, 5); - ok(compare_color(color, 0x00ff0040, 2), "Got unexpected color 0x%08x.\n", color); + ok(compare_color(color, 0x00ff0040, 2), "Got unexpected color 0x%08lx.\n", color); color = get_surface_color(rt, 400, 5); - ok(compare_color(color, 0x00ff0080, 2), "Got unexpected color 0x%08x.\n", color); + ok(compare_color(color, 0x00ff0080, 2), "Got unexpected color 0x%08lx.\n", color); color = get_surface_color(rt, 5, 245); - ok(compare_color(color, 0x00800080, 2), "Got unexpected color 0x%08x.\n", color); + ok(compare_color(color, 0x00800080, 2), "Got unexpected color 0x%08lx.\n", color); color = get_surface_color(rt, 400, 245); - ok(compare_color(color, 0x008000ff, 2), "Got unexpected color 0x%08x.\n", color); + ok(compare_color(color, 0x008000ff, 2), "Got unexpected color 0x%08lx.\n", color);
IDirect3DTexture2_Release(texture); ref = IDirectDrawSurface_Release(surface); - ok(ref == 0, "Surface not properly released, refcount %u.\n", ref); + ok(ref == 0, "Surface not properly released, refcount %lu.\n", ref);
/* Test alpha again, now with color keyed texture (colorkey emulation in wine can interfere). */ memset(&ddsd, 0, sizeof(ddsd)); @@ -9511,64 +9511,64 @@ static void test_texturemapblend(void) U4(ddsd.ddpfPixelFormat).dwBBitMask = 0x001f;
hr = IDirectDraw2_CreateSurface(ddraw, &ddsd, &surface, NULL); - ok(SUCCEEDED(hr), "Failed to create surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create surface, hr %#lx.\n", hr);
hr = IDirectDrawSurface_QueryInterface(surface, &IID_IDirect3DTexture2, (void **)&texture); - ok(SUCCEEDED(hr), "Failed to get texture interface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get texture interface, hr %#lx.\n", hr); hr = IDirect3DTexture2_GetHandle(texture, device, &texture_handle); - ok(SUCCEEDED(hr), "Failed to get texture handle, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get texture handle, hr %#lx.\n", hr); hr = IDirect3DDevice2_SetRenderState(device, D3DRENDERSTATE_TEXTUREHANDLE, texture_handle); - ok(SUCCEEDED(hr), "Failed to set render state, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set render state, hr %#lx.\n", hr);
hr = IDirect3DViewport2_Clear(viewport, 1, &clear_rect, D3DCLEAR_TARGET); - ok(SUCCEEDED(hr), "Failed to clear render target, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to clear render target, hr %#lx.\n", hr);
U5(fx).dwFillColor = 0xf800; hr = IDirectDrawSurface_Blt(surface, NULL, NULL, NULL, DDBLT_COLORFILL | DDBLT_WAIT, &fx); - ok(SUCCEEDED(hr), "Failed to clear texture, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to clear texture, hr %#lx.\n", hr); U5(fx).dwFillColor = 0x001f; hr = IDirectDrawSurface_Blt(surface, &rect, NULL, NULL, DDBLT_COLORFILL | DDBLT_WAIT, &fx); - ok(SUCCEEDED(hr), "Failed to clear texture, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to clear texture, hr %#lx.\n", hr);
ckey.dwColorSpaceLowValue = 0x001f; ckey.dwColorSpaceHighValue = 0x001f; hr = IDirectDrawSurface_SetColorKey(surface, DDCKEY_SRCBLT, &ckey); - ok(SUCCEEDED(hr), "Failed to set color key, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set color key, hr %#lx.\n", hr);
hr = IDirect3DDevice2_SetRenderState(device, D3DRENDERSTATE_ALPHABLENDENABLE, TRUE); - ok(SUCCEEDED(hr), "Failed to set render state, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set render state, hr %#lx.\n", hr); hr = IDirect3DDevice2_SetRenderState(device, D3DRENDERSTATE_COLORKEYENABLE, TRUE); - ok(SUCCEEDED(hr), "Failed to set render state, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set render state, hr %#lx.\n", hr);
hr = IDirect3DDevice2_BeginScene(device); - ok(SUCCEEDED(hr), "Failed to begin scene, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to begin scene, hr %#lx.\n", hr); hr = IDirect3DDevice2_DrawPrimitive(device, D3DPT_TRIANGLESTRIP, D3DVT_TLVERTEX, &test1_quads[0], 4, 0); - ok(SUCCEEDED(hr), "Failed to draw, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to draw, hr %#lx.\n", hr); hr = IDirect3DDevice2_DrawPrimitive(device, D3DPT_TRIANGLESTRIP, D3DVT_TLVERTEX, &test1_quads[4], 4, 0); - ok(SUCCEEDED(hr), "Failed to draw, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to draw, hr %#lx.\n", hr); hr = IDirect3DDevice2_EndScene(device); - ok(SUCCEEDED(hr), "Failed to end scene, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to end scene, hr %#lx.\n", hr);
color = get_surface_color(rt, 5, 5); - ok(compare_color(color, 0x00000000, 2), "Got unexpected color 0x%08x.\n", color); + ok(compare_color(color, 0x00000000, 2), "Got unexpected color 0x%08lx.\n", color); color = get_surface_color(rt, 400, 5); - ok(compare_color(color, 0x00ff0000, 2), "Got unexpected color 0x%08x.\n", color); + ok(compare_color(color, 0x00ff0000, 2), "Got unexpected color 0x%08lx.\n", color); color = get_surface_color(rt, 5, 245); - ok(compare_color(color, 0x00000000, 2), "Got unexpected color 0x%08x.\n", color); + ok(compare_color(color, 0x00000000, 2), "Got unexpected color 0x%08lx.\n", color); color = get_surface_color(rt, 400, 245); - ok(compare_color(color, 0x00800000, 2), "Got unexpected color 0x%08x.\n", color); + ok(compare_color(color, 0x00800000, 2), "Got unexpected color 0x%08lx.\n", color);
IDirect3DTexture2_Release(texture); ref = IDirectDrawSurface_Release(surface); - ok(ref == 0, "Surface not properly released, refcount %u.\n", ref); + ok(ref == 0, "Surface not properly released, refcount %lu.\n", ref);
destroy_viewport(device, viewport); ref = IDirect3DMaterial2_Release(material); - ok(ref == 0, "Material not properly released, refcount %u.\n", ref); + ok(ref == 0, "Material not properly released, refcount %lu.\n", ref); IDirectDrawSurface_Release(rt); IDirect3DDevice2_Release(device); ref = IDirectDraw2_Release(ddraw); - ok(ref == 0, "Ddraw object not properly released, refcount %u.\n", ref); + ok(ref == 0, "Ddraw object not properly released, refcount %lu.\n", ref); DestroyWindow(window); }
@@ -9598,32 +9598,32 @@ static void test_viewport_clear_rect(void) }
hr = IDirect3DDevice2_GetRenderTarget(device, &rt); - ok(SUCCEEDED(hr), "Failed to get render target, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get render target, hr %#lx.\n", hr);
red = create_diffuse_material(device, 1.0f, 0.0f, 0.0f, 1.0f); viewport = create_viewport(device, 0, 0, 640, 480); viewport_set_background(device, viewport, red); hr = IDirect3DViewport2_Clear(viewport, 1, &clear_rect, D3DCLEAR_TARGET); - ok(SUCCEEDED(hr), "Failed to clear viewport, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to clear viewport, hr %#lx.\n", hr);
green = create_diffuse_material(device, 0.0f, 1.0f, 0.0f, 1.0f); viewport2 = create_viewport(device, 100, 100, 20, 20); viewport_set_background(device, viewport2, green); hr = IDirect3DViewport2_Clear(viewport2, 1, &clear_rect2, D3DCLEAR_TARGET); - ok(SUCCEEDED(hr), "Failed to clear viewport, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to clear viewport, hr %#lx.\n", hr);
color = get_surface_color(rt, 85, 85); /* Outside both. */ - ok(compare_color(color, 0x00ff0000, 1), "Got unexpected color 0x%08x.\n", color); + ok(compare_color(color, 0x00ff0000, 1), "Got unexpected color 0x%08lx.\n", color); color = get_surface_color(rt, 95, 95); /* Outside vp, inside rect. */ /* AMD GPUs ignore the viewport dimensions and only care about the rectangle. */ ok(compare_color(color, 0x00ff0000, 1) || broken(compare_color(color, 0x0000ff00, 1)), - "Got unexpected color 0x%08x.\n", color); + "Got unexpected color 0x%08lx.\n", color); color = get_surface_color(rt, 105, 105); /* Inside both. */ - ok(compare_color(color, 0x0000ff00, 1), "Got unexpected color 0x%08x.\n", color); + ok(compare_color(color, 0x0000ff00, 1), "Got unexpected color 0x%08lx.\n", color); color = get_surface_color(rt, 115, 115); /* Inside vp, outside rect. */ - ok(compare_color(color, 0x00ff0000, 1), "Got unexpected color 0x%08x.\n", color); + ok(compare_color(color, 0x00ff0000, 1), "Got unexpected color 0x%08lx.\n", color); color = get_surface_color(rt, 125, 125); /* Outside both. */ - ok(compare_color(color, 0x00ff0000, 1), "Got unexpected color 0x%08x.\n", color); + ok(compare_color(color, 0x00ff0000, 1), "Got unexpected color 0x%08lx.\n", color);
destroy_viewport(device, viewport2); destroy_material(green); @@ -9632,7 +9632,7 @@ static void test_viewport_clear_rect(void) IDirectDrawSurface_Release(rt); IDirect3DDevice2_Release(device); ref = IDirectDraw2_Release(ddraw); - ok(ref == 0, "Ddraw object not properly released, refcount %u.\n", ref); + ok(ref == 0, "Ddraw object not properly released, refcount %lu.\n", ref); DestroyWindow(window); }
@@ -9814,13 +9814,13 @@ static void test_color_fill(void) }
hr = IDirectDraw2_GetFourCCCodes(ddraw, &num_fourcc_codes, NULL); - ok(SUCCEEDED(hr), "Failed to get fourcc codes %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get fourcc codes %#lx.\n", hr); fourcc_codes = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, num_fourcc_codes * sizeof(*fourcc_codes)); if (!fourcc_codes) goto done; hr = IDirectDraw2_GetFourCCCodes(ddraw, &num_fourcc_codes, fourcc_codes); - ok(SUCCEEDED(hr), "Failed to get fourcc codes %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get fourcc codes %#lx.\n", hr); for (i = 0; i < num_fourcc_codes; i++) { if (fourcc_codes[i] == MAKEFOURCC('Y', 'U', 'Y', '2')) @@ -9833,7 +9833,7 @@ static void test_color_fill(void) memset(&hal_caps, 0, sizeof(hal_caps)); hal_caps.dwSize = sizeof(hal_caps); hr = IDirectDraw2_GetCaps(ddraw, &hal_caps, NULL); - ok(SUCCEEDED(hr), "Failed to get caps, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get caps, hr %#lx.\n", hr);
if ((!support_yuy2 && !support_uyvy) || !(hal_caps.dwCaps & DDCAPS_OVERLAY)) skip("Overlays or some YUV formats not supported, skipping YUV colorfill tests.\n"); @@ -9860,7 +9860,7 @@ static void test_color_fill(void) { struct format_support_check check = {&tests[i].format, FALSE}; hr = IDirect3DDevice2_EnumTextureFormats(device, test_unsupported_formats_cb, &check); - ok(SUCCEEDED(hr), "Failed to enumerate texture formats %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to enumerate texture formats %#lx.\n", hr); if (!check.supported) continue; } @@ -9895,16 +9895,16 @@ static void test_color_fill(void) }
hr = IDirectDraw2_CreateSurface(ddraw, &surface_desc, &surface, NULL); - ok(SUCCEEDED(hr), "Failed to create surface, hr %#x, surface %s.\n", hr, tests[i].name); + ok(SUCCEEDED(hr), "Failed to create surface, hr %#lx, surface %s.\n", hr, tests[i].name);
hr = IDirectDrawSurface_Blt(surface, NULL, NULL, NULL, DDBLT_COLORFILL | DDBLT_WAIT, &fx); todo_wine_if (tests[i].format.dwFourCC) - ok(hr == tests[i].colorfill_hr, "Blt returned %#x, expected %#x, surface %s.\n", + ok(hr == tests[i].colorfill_hr, "Blt returned %#lx, expected %#lx, surface %s.\n", hr, tests[i].colorfill_hr, tests[i].name);
hr = IDirectDrawSurface_Blt(surface, &rect, NULL, NULL, DDBLT_COLORFILL | DDBLT_WAIT, &fx); todo_wine_if (tests[i].format.dwFourCC) - ok(hr == tests[i].colorfill_hr, "Blt returned %#x, expected %#x, surface %s.\n", + ok(hr == tests[i].colorfill_hr, "Blt returned %#lx, expected %#lx, surface %s.\n", hr, tests[i].colorfill_hr, tests[i].name);
if (SUCCEEDED(hr) && tests[i].check_result) @@ -9912,19 +9912,19 @@ static void test_color_fill(void) memset(&surface_desc, 0, sizeof(surface_desc)); surface_desc.dwSize = sizeof(surface_desc); hr = IDirectDrawSurface_Lock(surface, NULL, &surface_desc, DDLOCK_READONLY, 0); - ok(SUCCEEDED(hr), "Failed to lock surface, hr %#x, surface %s.\n", hr, tests[i].name); + ok(SUCCEEDED(hr), "Failed to lock surface, hr %#lx, surface %s.\n", hr, tests[i].name); color = surface_desc.lpSurface; - ok(*color == tests[i].result, "Got clear result 0x%08x, expected 0x%08x, surface %s.\n", + ok(*color == tests[i].result, "Got clear result 0x%08lx, expected 0x%08lx, surface %s.\n", *color, tests[i].result, tests[i].name); hr = IDirectDrawSurface_Unlock(surface, NULL); - ok(SUCCEEDED(hr), "Failed to unlock surface, hr %#x, surface %s.\n", hr, tests[i].name); + ok(SUCCEEDED(hr), "Failed to unlock surface, hr %#lx, surface %s.\n", hr, tests[i].name); }
hr = IDirectDrawSurface_Blt(surface, NULL, NULL, NULL, DDBLT_DEPTHFILL | DDBLT_WAIT, &fx); - ok(hr == tests[i].depthfill_hr, "Blt returned %#x, expected %#x, surface %s.\n", + ok(hr == tests[i].depthfill_hr, "Blt returned %#lx, expected %#lx, surface %s.\n", hr, tests[i].depthfill_hr, tests[i].name); hr = IDirectDrawSurface_Blt(surface, &rect, NULL, NULL, DDBLT_DEPTHFILL | DDBLT_WAIT, &fx); - ok(hr == tests[i].depthfill_hr, "Blt returned %#x, expected %#x, surface %s.\n", + ok(hr == tests[i].depthfill_hr, "Blt returned %#lx, expected %#lx, surface %s.\n", hr, tests[i].depthfill_hr, tests[i].name);
if (SUCCEEDED(hr) && tests[i].check_result) @@ -9932,23 +9932,23 @@ static void test_color_fill(void) memset(&surface_desc, 0, sizeof(surface_desc)); surface_desc.dwSize = sizeof(surface_desc); hr = IDirectDrawSurface_Lock(surface, NULL, &surface_desc, DDLOCK_READONLY, 0); - ok(SUCCEEDED(hr), "Failed to lock surface, hr %#x, surface %s.\n", hr, tests[i].name); + ok(SUCCEEDED(hr), "Failed to lock surface, hr %#lx, surface %s.\n", hr, tests[i].name); color = surface_desc.lpSurface; todo_wine_if(tests[i].caps & DDSCAPS_VIDEOMEMORY && U2(surface_desc).dwZBufferBitDepth != 16) ok((*color & mask) == (tests[i].result & mask) || broken((*color & mask) == (expected_broken & mask)) || broken(is_warp && (*color & mask) == (~0u & mask)) /* Windows 8+ testbot. */, - "Got clear result 0x%08x, expected 0x%08x, surface %s.\n", + "Got clear result 0x%08lx, expected 0x%08lx, surface %s.\n", *color & mask, tests[i].result & mask, tests[i].name); hr = IDirectDrawSurface_Unlock(surface, NULL); - ok(SUCCEEDED(hr), "Failed to unlock surface, hr %#x, surface %s.\n", hr, tests[i].name); + ok(SUCCEEDED(hr), "Failed to unlock surface, hr %#lx, surface %s.\n", hr, tests[i].name); }
U5(fx).dwFillColor = 0xdeadbeef; fx.dwROP = BLACKNESS; hr = IDirectDrawSurface_Blt(surface, NULL, NULL, NULL, DDBLT_ROP | DDBLT_WAIT, &fx); - ok(FAILED(hr) == !tests[i].rop_success, "Blt returned %#x, expected %s, surface %s.\n", + ok(FAILED(hr) == !tests[i].rop_success, "Blt returned %#lx, expected %s, surface %s.\n", hr, tests[i].rop_success ? "success" : "failure", tests[i].name); - ok(U5(fx).dwFillColor == 0xdeadbeef, "dwFillColor was set to 0x%08x, surface %s\n", + ok(U5(fx).dwFillColor == 0xdeadbeef, "dwFillColor was set to 0x%08lx, surface %s\n", U5(fx).dwFillColor, tests[i].name);
if (SUCCEEDED(hr) && tests[i].check_result) @@ -9956,19 +9956,19 @@ static void test_color_fill(void) memset(&surface_desc, 0, sizeof(surface_desc)); surface_desc.dwSize = sizeof(surface_desc); hr = IDirectDrawSurface_Lock(surface, NULL, &surface_desc, DDLOCK_READONLY, 0); - ok(SUCCEEDED(hr), "Failed to lock surface, hr %#x, surface %s.\n", hr, tests[i].name); + ok(SUCCEEDED(hr), "Failed to lock surface, hr %#lx, surface %s.\n", hr, tests[i].name); color = surface_desc.lpSurface; - ok(*color == 0, "Got clear result 0x%08x, expected 0x00000000, surface %s.\n", + ok(*color == 0, "Got clear result 0x%08lx, expected 0x00000000, surface %s.\n", *color, tests[i].name); hr = IDirectDrawSurface_Unlock(surface, NULL); - ok(SUCCEEDED(hr), "Failed to unlock surface, hr %#x, surface %s.\n", hr, tests[i].name); + ok(SUCCEEDED(hr), "Failed to unlock surface, hr %#lx, surface %s.\n", hr, tests[i].name); }
fx.dwROP = WHITENESS; hr = IDirectDrawSurface_Blt(surface, NULL, NULL, NULL, DDBLT_ROP | DDBLT_WAIT, &fx); - ok(FAILED(hr) == !tests[i].rop_success, "Blt returned %#x, expected %s, surface %s.\n", + ok(FAILED(hr) == !tests[i].rop_success, "Blt returned %#lx, expected %s, surface %s.\n", hr, tests[i].rop_success ? "success" : "failure", tests[i].name); - ok(U5(fx).dwFillColor == 0xdeadbeef, "dwFillColor was set to 0x%08x, surface %s\n", + ok(U5(fx).dwFillColor == 0xdeadbeef, "dwFillColor was set to 0x%08lx, surface %s\n", U5(fx).dwFillColor, tests[i].name);
if (SUCCEEDED(hr) && tests[i].check_result) @@ -9976,13 +9976,13 @@ static void test_color_fill(void) memset(&surface_desc, 0, sizeof(surface_desc)); surface_desc.dwSize = sizeof(surface_desc); hr = IDirectDrawSurface_Lock(surface, NULL, &surface_desc, DDLOCK_READONLY, 0); - ok(SUCCEEDED(hr), "Failed to lock surface, hr %#x, surface %s.\n", hr, tests[i].name); + ok(SUCCEEDED(hr), "Failed to lock surface, hr %#lx, surface %s.\n", hr, tests[i].name); color = surface_desc.lpSurface; /* WHITENESS sets the alpha channel to 0x00. Ignore this for now. */ - ok((*color & 0x00ffffff) == 0x00ffffff, "Got clear result 0x%08x, expected 0xffffffff, surface %s.\n", + ok((*color & 0x00ffffff) == 0x00ffffff, "Got clear result 0x%08lx, expected 0xffffffff, surface %s.\n", *color, tests[i].name); hr = IDirectDrawSurface_Unlock(surface, NULL); - ok(SUCCEEDED(hr), "Failed to unlock surface, hr %#x, surface %s.\n", hr, tests[i].name); + ok(SUCCEEDED(hr), "Failed to unlock surface, hr %#lx, surface %s.\n", hr, tests[i].name); }
IDirectDrawSurface_Release(surface); @@ -10006,78 +10006,78 @@ static void test_color_fill(void) U4(surface_desc.ddpfPixelFormat).dwBBitMask = 0x000000ff; surface_desc.ddsCaps.dwCaps = DDSCAPS_OFFSCREENPLAIN | DDSCAPS_SYSTEMMEMORY; hr = IDirectDraw2_CreateSurface(ddraw, &surface_desc, &surface, NULL); - ok(SUCCEEDED(hr), "Failed to create surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create surface, hr %#lx.\n", hr); hr = IDirectDraw2_CreateSurface(ddraw, &surface_desc, &surface2, NULL); - ok(SUCCEEDED(hr), "Failed to create surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create surface, hr %#lx.\n", hr);
/* No DDBLTFX. */ hr = IDirectDrawSurface_Blt(surface, NULL, NULL, &rect, DDBLT_COLORFILL | DDBLT_WAIT, NULL); - ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface_Blt(surface, NULL, NULL, &rect, DDBLT_ROP | DDBLT_WAIT, NULL); - ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#lx.\n", hr);
/* Unused source rectangle. */ hr = IDirectDrawSurface_Blt(surface, NULL, NULL, &rect, DDBLT_COLORFILL | DDBLT_WAIT, &fx); - ok(SUCCEEDED(hr), "Got unexpected hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface_Blt(surface, NULL, NULL, &rect, DDBLT_ROP | DDBLT_WAIT, &fx); - ok(SUCCEEDED(hr), "Got unexpected hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Got unexpected hr %#lx.\n", hr);
/* Unused source surface. */ hr = IDirectDrawSurface_Blt(surface, NULL, surface2, NULL, DDBLT_COLORFILL | DDBLT_WAIT, &fx); - ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface_Blt(surface, NULL, surface2, NULL, DDBLT_ROP | DDBLT_WAIT, &fx); - ok(SUCCEEDED(hr), "Got unexpected hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface_Blt(surface, NULL, surface2, &rect, DDBLT_COLORFILL | DDBLT_WAIT, &fx); - ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface_Blt(surface, NULL, surface2, &rect, DDBLT_ROP | DDBLT_WAIT, &fx); - ok(SUCCEEDED(hr), "Got unexpected hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Got unexpected hr %#lx.\n", hr);
/* Inverted destination or source rectangle. */ SetRect(&rect, 5, 7, 7, 5); hr = IDirectDrawSurface_Blt(surface, &rect, NULL, NULL, DDBLT_COLORFILL | DDBLT_WAIT, &fx); - ok(hr == DDERR_INVALIDRECT, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_INVALIDRECT, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface_Blt(surface, NULL, NULL, &rect, DDBLT_COLORFILL | DDBLT_WAIT, &fx); - ok(SUCCEEDED(hr), "Got unexpected hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface_Blt(surface, &rect, surface2, NULL, DDBLT_COLORFILL | DDBLT_WAIT, &fx); - ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface_Blt(surface, NULL, surface2, &rect, DDBLT_COLORFILL | DDBLT_WAIT, &fx); - ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface_Blt(surface, NULL, surface2, &rect, DDBLT_ROP | DDBLT_WAIT, &fx); - ok(hr == DDERR_INVALIDRECT, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_INVALIDRECT, "Got unexpected hr %#lx.\n", hr);
/* Negative rectangle. */ SetRect(&rect, -1, -1, 5, 5); hr = IDirectDrawSurface_Blt(surface, &rect, NULL, NULL, DDBLT_COLORFILL | DDBLT_WAIT, &fx); - ok(hr == DDERR_INVALIDRECT, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_INVALIDRECT, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface_Blt(surface, NULL, NULL, &rect, DDBLT_COLORFILL | DDBLT_WAIT, &fx); - ok(SUCCEEDED(hr), "Got unexpected hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface_Blt(surface, &rect, surface2, NULL, DDBLT_COLORFILL | DDBLT_WAIT, &fx); - ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface_Blt(surface, &rect, surface2, &rect, DDBLT_COLORFILL | DDBLT_WAIT, &fx); - ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface_Blt(surface, NULL, surface2, &rect, DDBLT_ROP | DDBLT_WAIT, &fx); - ok(hr == DDERR_INVALIDRECT, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_INVALIDRECT, "Got unexpected hr %#lx.\n", hr);
/* Out of bounds rectangle. */ SetRect(&rect, 0, 0, 65, 65); hr = IDirectDrawSurface_Blt(surface, &rect, NULL, NULL, DDBLT_COLORFILL | DDBLT_WAIT, &fx); - ok(hr == DDERR_INVALIDRECT, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_INVALIDRECT, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface_Blt(surface, NULL, surface2, &rect, DDBLT_ROP | DDBLT_WAIT, &fx); - ok(hr == DDERR_INVALIDRECT, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_INVALIDRECT, "Got unexpected hr %#lx.\n", hr);
/* Combine multiple flags. */ hr = IDirectDrawSurface_Blt(surface, NULL, NULL, NULL, DDBLT_COLORFILL | DDBLT_DEPTHFILL | DDBLT_WAIT, &fx); - ok(SUCCEEDED(hr), "Got unexpected hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface_Blt(surface, NULL, NULL, NULL, DDBLT_COLORFILL | DDBLT_ROP | DDBLT_WAIT, &fx); - ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface_Blt(surface, &rect, NULL, NULL, DDBLT_COLORFILL | DDBLT_ROP | DDBLT_WAIT, &fx); - ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#lx.\n", hr);
for (i = 0; i < ARRAY_SIZE(rops); i++) { fx.dwROP = rops[i].rop; hr = IDirectDrawSurface_Blt(surface, NULL, surface2, NULL, DDBLT_ROP | DDBLT_WAIT, &fx); - ok(hr == rops[i].hr, "Got unexpected hr %#x for rop %s.\n", hr, rops[i].name); + ok(hr == rops[i].hr, "Got unexpected hr %#lx for rop %s.\n", hr, rops[i].name); }
IDirectDrawSurface_Release(surface2); @@ -10091,54 +10091,54 @@ static void test_color_fill(void) U2(surface_desc).dwZBufferBitDepth = get_device_z_depth(device); surface_desc.ddsCaps.dwCaps = DDSCAPS_ZBUFFER; hr = IDirectDraw2_CreateSurface(ddraw, &surface_desc, &surface, NULL); - ok(SUCCEEDED(hr), "Failed to create surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create surface, hr %#lx.\n", hr); hr = IDirectDraw2_CreateSurface(ddraw, &surface_desc, &surface2, NULL); - ok(SUCCEEDED(hr), "Failed to create surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create surface, hr %#lx.\n", hr);
/* No DDBLTFX. */ hr = IDirectDrawSurface_Blt(surface, NULL, NULL, &rect, DDBLT_DEPTHFILL | DDBLT_WAIT, NULL); - ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#lx.\n", hr);
/* Unused source rectangle. */ hr = IDirectDrawSurface_Blt(surface, NULL, NULL, &rect, DDBLT_DEPTHFILL | DDBLT_WAIT, &fx); - ok(SUCCEEDED(hr), "Got unexpected hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Got unexpected hr %#lx.\n", hr);
/* Unused source surface. */ hr = IDirectDrawSurface_Blt(surface, NULL, surface2, NULL, DDBLT_DEPTHFILL | DDBLT_WAIT, &fx); - ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface_Blt(surface, NULL, surface2, &rect, DDBLT_DEPTHFILL | DDBLT_WAIT, &fx); - ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#lx.\n", hr);
/* Inverted destination or source rectangle. */ SetRect(&rect, 5, 7, 7, 5); hr = IDirectDrawSurface_Blt(surface, &rect, NULL, NULL, DDBLT_DEPTHFILL | DDBLT_WAIT, &fx); - ok(hr == DDERR_INVALIDRECT, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_INVALIDRECT, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface_Blt(surface, NULL, NULL, &rect, DDBLT_DEPTHFILL | DDBLT_WAIT, &fx); - ok(SUCCEEDED(hr), "Got unexpected hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface_Blt(surface, &rect, surface2, NULL, DDBLT_DEPTHFILL | DDBLT_WAIT, &fx); - ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface_Blt(surface, NULL, surface2, &rect, DDBLT_DEPTHFILL | DDBLT_WAIT, &fx); - ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#lx.\n", hr);
/* Negative rectangle. */ SetRect(&rect, -1, -1, 5, 5); hr = IDirectDrawSurface_Blt(surface, &rect, NULL, NULL, DDBLT_DEPTHFILL | DDBLT_WAIT, &fx); - ok(hr == DDERR_INVALIDRECT, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_INVALIDRECT, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface_Blt(surface, NULL, NULL, &rect, DDBLT_DEPTHFILL | DDBLT_WAIT, &fx); - ok(SUCCEEDED(hr), "Got unexpected hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface_Blt(surface, &rect, surface2, NULL, DDBLT_DEPTHFILL | DDBLT_WAIT, &fx); - ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface_Blt(surface, &rect, surface2, &rect, DDBLT_DEPTHFILL | DDBLT_WAIT, &fx); - ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#lx.\n", hr);
/* Out of bounds rectangle. */ SetRect(&rect, 0, 0, 65, 65); hr = IDirectDrawSurface_Blt(surface, &rect, NULL, NULL, DDBLT_DEPTHFILL | DDBLT_WAIT, &fx); - ok(hr == DDERR_INVALIDRECT, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_INVALIDRECT, "Got unexpected hr %#lx.\n", hr);
/* Combine multiple flags. */ hr = IDirectDrawSurface_Blt(surface, NULL, NULL, NULL, DDBLT_COLORFILL | DDBLT_DEPTHFILL | DDBLT_WAIT, &fx); - ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#lx.\n", hr);
IDirectDrawSurface_Release(surface2); IDirectDrawSurface_Release(surface); @@ -10146,7 +10146,7 @@ static void test_color_fill(void) done: IDirect3DDevice2_Release(device); refcount = IDirectDraw2_Release(ddraw); - ok(refcount == 0, "Ddraw object not properly released, refcount %u.\n", refcount); + ok(refcount == 0, "Ddraw object not properly released, refcount %lu.\n", refcount); DestroyWindow(window); }
@@ -10231,7 +10231,7 @@ static void test_colorkey_precision(void) return; } hr = IDirect3DDevice2_GetRenderTarget(device, &rt); - ok(SUCCEEDED(hr), "Failed to get render target, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get render target, hr %#lx.\n", hr);
is_nvidia = ddraw_is_nvidia(ddraw); /* The Windows 8 WARP driver has plenty of false negatives in X8R8G8B8 @@ -10246,16 +10246,16 @@ static void test_colorkey_precision(void) viewport = create_viewport(device, 0, 0, 640, 480); viewport_set_background(device, viewport, green); hr = IDirect3DDevice2_SetCurrentViewport(device, viewport); - ok(SUCCEEDED(hr), "Failed to activate the viewport, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to activate the viewport, hr %#lx.\n", hr);
hr = IDirect3DDevice2_SetRenderState(device, D3DRENDERSTATE_ZENABLE, D3DZB_FALSE); - ok(SUCCEEDED(hr), "Failed to disable z-buffering, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to disable z-buffering, hr %#lx.\n", hr); hr = IDirect3DDevice2_SetRenderState(device, D3DRENDERSTATE_COLORKEYENABLE, TRUE); - ok(SUCCEEDED(hr), "Failed to enable color keying, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to enable color keying, hr %#lx.\n", hr); /* There's no way to ignore the texture color in d3d2, so multiply the texture color * with a black vertex color. */ hr = IDirect3DDevice2_SetRenderState(device, D3DRENDERSTATE_TEXTUREMAPBLEND, D3DTBLEND_MODULATEALPHA); - ok(SUCCEEDED(hr), "Failed to set render state, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set render state, hr %#lx.\n", hr);
memset(&fx, 0, sizeof(fx)); fx.dwSize = sizeof(fx); @@ -10280,9 +10280,9 @@ static void test_colorkey_precision(void) /* Windows XP (at least with the r200 driver, other drivers untested) produces * garbage when doing color keyed texture->texture blits. */ hr = IDirectDraw2_CreateSurface(ddraw, &surface_desc, &src, NULL); - ok(SUCCEEDED(hr), "Failed to create surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create surface, hr %#lx.\n", hr); hr = IDirectDraw2_CreateSurface(ddraw, &surface_desc, &dst, NULL); - ok(SUCCEEDED(hr), "Failed to create surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create surface, hr %#lx.\n", hr);
U5(fx).dwFillColor = tests[t].clear; /* On the w8 testbot (WARP driver) the blit result has different values in the @@ -10300,21 +10300,21 @@ static void test_colorkey_precision(void) surface_desc.ddckCKSrcBlt.dwColorSpaceLowValue = c << tests[t].shift; surface_desc.ddckCKSrcBlt.dwColorSpaceHighValue = c << tests[t].shift; hr = IDirectDraw2_CreateSurface(ddraw, &surface_desc, &texture, NULL); - ok(SUCCEEDED(hr), "Failed to create surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create surface, hr %#lx.\n", hr);
hr = IDirectDrawSurface4_QueryInterface(texture, &IID_IDirect3DTexture2, (void **)&d3d_texture); - ok(SUCCEEDED(hr), "Failed to get texture interface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get texture interface, hr %#lx.\n", hr); hr = IDirect3DTexture2_GetHandle(d3d_texture, device, &handle); - ok(SUCCEEDED(hr), "Failed to get texture handle, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get texture handle, hr %#lx.\n", hr); hr = IDirect3DDevice2_SetRenderState(device, D3DRENDERSTATE_TEXTUREHANDLE, handle); - ok(SUCCEEDED(hr), "Failed to set texture handle, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set texture handle, hr %#lx.\n", hr); IDirect3DTexture2_Release(d3d_texture);
hr = IDirectDrawSurface_Blt(dst, NULL, NULL, NULL, DDBLT_COLORFILL | DDBLT_WAIT, &fx); - ok(SUCCEEDED(hr), "Failed to clear destination surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to clear destination surface, hr %#lx.\n", hr);
hr = IDirectDrawSurface_Lock(src, NULL, &lock_desc, DDLOCK_WAIT, NULL); - ok(SUCCEEDED(hr), "Failed to lock surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to lock surface, hr %#lx.\n", hr); switch (tests[t].bpp) { case 4: @@ -10332,21 +10332,21 @@ static void test_colorkey_precision(void) break; } hr = IDirectDrawSurface_Unlock(src, 0); - ok(SUCCEEDED(hr), "Failed to unlock surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to unlock surface, hr %#lx.\n", hr); hr = IDirectDrawSurface_Blt(texture, NULL, src, NULL, DDBLT_WAIT, NULL); - ok(SUCCEEDED(hr), "Failed to blit, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to blit, hr %#lx.\n", hr);
ckey.dwColorSpaceLowValue = c << tests[t].shift; ckey.dwColorSpaceHighValue = c << tests[t].shift; hr = IDirectDrawSurface_SetColorKey(src, DDCKEY_SRCBLT, &ckey); - ok(SUCCEEDED(hr), "Failed to set color key, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set color key, hr %#lx.\n", hr);
hr = IDirectDrawSurface_Blt(dst, NULL, src, NULL, DDBLT_KEYSRC | DDBLT_WAIT, NULL); - ok(SUCCEEDED(hr), "Failed to blit, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to blit, hr %#lx.\n", hr);
/* Don't make this read only, it somehow breaks the detection of the Nvidia bug below. */ hr = IDirectDrawSurface_Lock(dst, NULL, &lock_desc, DDLOCK_WAIT, NULL); - ok(SUCCEEDED(hr), "Failed to lock surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to lock surface, hr %#lx.\n", hr); switch (tests[t].bpp) { case 4: @@ -10364,11 +10364,11 @@ static void test_colorkey_precision(void) break; } hr = IDirectDrawSurface_Unlock(dst, 0); - ok(SUCCEEDED(hr), "Failed to unlock surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to unlock surface, hr %#lx.\n", hr);
if (!c) { - ok(data[0] == tests[t].clear, "Expected surface content %#x, got %#x, format %s, c=%u.\n", + ok(data[0] == tests[t].clear, "Expected surface content %#x, got %#lx, format %s, c=%u.\n", tests[t].clear, data[0], tests[t].name, c);
if (data[3] == tests[t].clear) @@ -10392,56 +10392,56 @@ static void test_colorkey_precision(void) } } else - ok(data[0] == (c - 1) << tests[t].shift, "Expected surface content %#x, got %#x, format %s, c=%u.\n", + ok(data[0] == (c - 1) << tests[t].shift, "Expected surface content %#x, got %#lx, format %s, c=%u.\n", (c - 1) << tests[t].shift, data[0], tests[t].name, c);
- ok(data[1] == tests[t].clear, "Expected surface content %#x, got %#x, format %s, c=%u.\n", + ok(data[1] == tests[t].clear, "Expected surface content %#x, got %#lx, format %s, c=%u.\n", tests[t].clear, data[1], tests[t].name, c);
if (c == tests[t].max) - ok(data[2] == tests[t].clear, "Expected surface content %#x, got %#x, format %s, c=%u.\n", + ok(data[2] == tests[t].clear, "Expected surface content %#x, got %#lx, format %s, c=%u.\n", tests[t].clear, data[2], tests[t].name, c); else - ok(data[2] == (c + 1) << tests[t].shift, "Expected surface content %#x, got %#x, format %s, c=%u.\n", + ok(data[2] == (c + 1) << tests[t].shift, "Expected surface content %#x, got %#lx, format %s, c=%u.\n", (c + 1) << tests[t].shift, data[2], tests[t].name, c);
hr = IDirect3DViewport2_Clear(viewport, 1, &clear_rect, D3DCLEAR_TARGET); - ok(SUCCEEDED(hr), "Failed to clear, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to clear, hr %#lx.\n", hr);
hr = IDirect3DDevice2_BeginScene(device); - ok(SUCCEEDED(hr), "Failed to begin scene, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to begin scene, hr %#lx.\n", hr); hr = IDirect3DDevice2_DrawPrimitive(device, D3DPT_TRIANGLESTRIP, D3DVT_LVERTEX, quad, 4, 0); - ok(SUCCEEDED(hr), "Failed to draw, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to draw, hr %#lx.\n", hr); hr = IDirect3DDevice2_EndScene(device); - ok(SUCCEEDED(hr), "Failed to end scene, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to end scene, hr %#lx.\n", hr);
color = get_surface_color(rt, 80, 240); if (!c) ok(compare_color(color, 0x0000ff00, 1) || broken(is_warp && compare_color(color, 0x00000000, 1)), - "Got unexpected color 0x%08x, format %s, c=%u.\n", + "Got unexpected color 0x%08lx, format %s, c=%u.\n", color, tests[t].name, c); else ok(compare_color(color, 0x00000000, 1) || broken(is_warp && compare_color(color, 0x0000ff00, 1)), - "Got unexpected color 0x%08x, format %s, c=%u.\n", + "Got unexpected color 0x%08lx, format %s, c=%u.\n", color, tests[t].name, c);
color = get_surface_color(rt, 240, 240); ok(compare_color(color, 0x0000ff00, 1) || broken(is_warp && compare_color(color, 0x00000000, 1)), - "Got unexpected color 0x%08x, format %s, c=%u.\n", + "Got unexpected color 0x%08lx, format %s, c=%u.\n", color, tests[t].name, c);
color = get_surface_color(rt, 400, 240); if (c == tests[t].max) ok(compare_color(color, 0x0000ff00, 1) || broken(is_warp && compare_color(color, 0x00000000, 1)), - "Got unexpected color 0x%08x, format %s, c=%u.\n", + "Got unexpected color 0x%08lx, format %s, c=%u.\n", color, tests[t].name, c); else ok(compare_color(color, 0x00000000, 1) || broken(is_warp && compare_color(color, 0x0000ff00, 1)), - "Got unexpected color 0x%08x, format %s, c=%u.\n", + "Got unexpected color 0x%08lx, format %s, c=%u.\n", color, tests[t].name, c);
hr = IDirect3DDevice2_SetRenderState(device, D3DRENDERSTATE_TEXTUREHANDLE, 0); - ok(SUCCEEDED(hr), "Failed to set texture handle, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set texture handle, hr %#lx.\n", hr); IDirectDrawSurface_Release(texture); } IDirectDrawSurface_Release(src); @@ -10454,7 +10454,7 @@ done: IDirectDrawSurface_Release(rt); IDirect3DDevice2_Release(device); refcount = IDirectDraw2_Release(ddraw); - ok(refcount == 0, "Ddraw object not properly released, refcount %u.\n", refcount); + ok(refcount == 0, "Ddraw object not properly released, refcount %lu.\n", refcount); DestroyWindow(window); }
@@ -10472,7 +10472,7 @@ static void test_range_colorkey(void) ddraw = create_ddraw(); ok(!!ddraw, "Failed to create a ddraw object.\n"); hr = IDirectDraw2_SetCooperativeLevel(ddraw, window, DDSCL_NORMAL); - ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#lx.\n", hr);
memset(&surface_desc, 0, sizeof(surface_desc)); surface_desc.dwSize = sizeof(surface_desc); @@ -10491,85 +10491,85 @@ static void test_range_colorkey(void) surface_desc.ddckCKSrcBlt.dwColorSpaceLowValue = 0x00000000; surface_desc.ddckCKSrcBlt.dwColorSpaceHighValue = 0x00000001; hr = IDirectDraw2_CreateSurface(ddraw, &surface_desc, &surface, NULL); - ok(hr == DDERR_NOCOLORKEYHW, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_NOCOLORKEYHW, "Got unexpected hr %#lx.\n", hr);
surface_desc.ddckCKSrcBlt.dwColorSpaceLowValue = 0x00000001; surface_desc.ddckCKSrcBlt.dwColorSpaceHighValue = 0x00000000; hr = IDirectDraw2_CreateSurface(ddraw, &surface_desc, &surface, NULL); - ok(hr == DDERR_NOCOLORKEYHW, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_NOCOLORKEYHW, "Got unexpected hr %#lx.\n", hr);
/* Same for DDSCAPS_OFFSCREENPLAIN. */ surface_desc.ddsCaps.dwCaps = DDSCAPS_OFFSCREENPLAIN; surface_desc.ddckCKSrcBlt.dwColorSpaceLowValue = 0x00000000; surface_desc.ddckCKSrcBlt.dwColorSpaceHighValue = 0x00000001; hr = IDirectDraw2_CreateSurface(ddraw, &surface_desc, &surface, NULL); - ok(hr == DDERR_NOCOLORKEYHW, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_NOCOLORKEYHW, "Got unexpected hr %#lx.\n", hr);
surface_desc.ddckCKSrcBlt.dwColorSpaceLowValue = 0x00000001; surface_desc.ddckCKSrcBlt.dwColorSpaceHighValue = 0x00000000; hr = IDirectDraw2_CreateSurface(ddraw, &surface_desc, &surface, NULL); - ok(hr == DDERR_NOCOLORKEYHW, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_NOCOLORKEYHW, "Got unexpected hr %#lx.\n", hr);
surface_desc.ddckCKSrcBlt.dwColorSpaceLowValue = 0x00000000; surface_desc.ddckCKSrcBlt.dwColorSpaceHighValue = 0x00000000; hr = IDirectDraw2_CreateSurface(ddraw, &surface_desc, &surface, NULL); - ok(SUCCEEDED(hr), "Failed to create surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create surface, hr %#lx.\n", hr);
/* Setting a range color key without DDCKEY_COLORSPACE collapses the key. */ ckey.dwColorSpaceLowValue = 0x00000000; ckey.dwColorSpaceHighValue = 0x00000001; hr = IDirectDrawSurface_SetColorKey(surface, DDCKEY_SRCBLT, &ckey); - ok(SUCCEEDED(hr), "Failed to set color key, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set color key, hr %#lx.\n", hr);
hr = IDirectDrawSurface_GetColorKey(surface, DDCKEY_SRCBLT, &ckey); - ok(SUCCEEDED(hr), "Failed to get color key, hr %#x.\n", hr); - ok(!ckey.dwColorSpaceLowValue, "Got unexpected value 0x%08x.\n", ckey.dwColorSpaceLowValue); - ok(!ckey.dwColorSpaceHighValue, "Got unexpected value 0x%08x.\n", ckey.dwColorSpaceHighValue); + ok(SUCCEEDED(hr), "Failed to get color key, hr %#lx.\n", hr); + ok(!ckey.dwColorSpaceLowValue, "Got unexpected value 0x%08lx.\n", ckey.dwColorSpaceLowValue); + ok(!ckey.dwColorSpaceHighValue, "Got unexpected value 0x%08lx.\n", ckey.dwColorSpaceHighValue);
ckey.dwColorSpaceLowValue = 0x00000001; ckey.dwColorSpaceHighValue = 0x00000000; hr = IDirectDrawSurface_SetColorKey(surface, DDCKEY_SRCBLT, &ckey); - ok(SUCCEEDED(hr), "Failed to set color key, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set color key, hr %#lx.\n", hr);
hr = IDirectDrawSurface_GetColorKey(surface, DDCKEY_SRCBLT, &ckey); - ok(SUCCEEDED(hr), "Failed to get color key, hr %#x.\n", hr); - ok(ckey.dwColorSpaceLowValue == 0x00000001, "Got unexpected value 0x%08x.\n", ckey.dwColorSpaceLowValue); - ok(ckey.dwColorSpaceHighValue == 0x00000001, "Got unexpected value 0x%08x.\n", ckey.dwColorSpaceHighValue); + ok(SUCCEEDED(hr), "Failed to get color key, hr %#lx.\n", hr); + ok(ckey.dwColorSpaceLowValue == 0x00000001, "Got unexpected value 0x%08lx.\n", ckey.dwColorSpaceLowValue); + ok(ckey.dwColorSpaceHighValue == 0x00000001, "Got unexpected value 0x%08lx.\n", ckey.dwColorSpaceHighValue);
/* DDCKEY_COLORSPACE is ignored if the key is a single value. */ ckey.dwColorSpaceLowValue = 0x00000000; ckey.dwColorSpaceHighValue = 0x00000000; hr = IDirectDrawSurface_SetColorKey(surface, DDCKEY_SRCBLT | DDCKEY_COLORSPACE, &ckey); - ok(SUCCEEDED(hr), "Failed to set color key, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set color key, hr %#lx.\n", hr);
/* Using it with a range key results in DDERR_NOCOLORKEYHW. */ ckey.dwColorSpaceLowValue = 0x00000001; ckey.dwColorSpaceHighValue = 0x00000000; hr = IDirectDrawSurface_SetColorKey(surface, DDCKEY_SRCBLT | DDCKEY_COLORSPACE, &ckey); - ok(hr == DDERR_NOCOLORKEYHW, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_NOCOLORKEYHW, "Got unexpected hr %#lx.\n", hr); ckey.dwColorSpaceLowValue = 0x00000000; ckey.dwColorSpaceHighValue = 0x00000001; hr = IDirectDrawSurface_SetColorKey(surface, DDCKEY_SRCBLT | DDCKEY_COLORSPACE, &ckey); - ok(hr == DDERR_NOCOLORKEYHW, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_NOCOLORKEYHW, "Got unexpected hr %#lx.\n", hr); /* Range destination keys don't work either. */ hr = IDirectDrawSurface_SetColorKey(surface, DDCKEY_DESTBLT | DDCKEY_COLORSPACE, &ckey); - ok(hr == DDERR_NOCOLORKEYHW, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_NOCOLORKEYHW, "Got unexpected hr %#lx.\n", hr);
/* Just to show it's not because of A, R, and G having equal values. */ ckey.dwColorSpaceLowValue = 0x00000000; ckey.dwColorSpaceHighValue = 0x01010101; hr = IDirectDrawSurface_SetColorKey(surface, DDCKEY_SRCBLT | DDCKEY_COLORSPACE, &ckey); - ok(hr == DDERR_NOCOLORKEYHW, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_NOCOLORKEYHW, "Got unexpected hr %#lx.\n", hr);
/* None of these operations modified the key. */ hr = IDirectDrawSurface_GetColorKey(surface, DDCKEY_SRCBLT, &ckey); - ok(SUCCEEDED(hr), "Failed to get color key, hr %#x.\n", hr); - ok(!ckey.dwColorSpaceLowValue, "Got unexpected value 0x%08x.\n", ckey.dwColorSpaceLowValue); - ok(!ckey.dwColorSpaceHighValue, "Got unexpected value 0x%08x.\n", ckey.dwColorSpaceHighValue); + ok(SUCCEEDED(hr), "Failed to get color key, hr %#lx.\n", hr); + ok(!ckey.dwColorSpaceLowValue, "Got unexpected value 0x%08lx.\n", ckey.dwColorSpaceLowValue); + ok(!ckey.dwColorSpaceHighValue, "Got unexpected value 0x%08lx.\n", ckey.dwColorSpaceHighValue);
IDirectDrawSurface_Release(surface); refcount = IDirectDraw2_Release(ddraw); - ok(!refcount, "Got unexpected refcount %u.\n", refcount); + ok(!refcount, "Got unexpected refcount %lu.\n", refcount); DestroyWindow(window); }
@@ -10632,16 +10632,16 @@ static void test_shademode(void) }
hr = IDirect3DDevice2_GetRenderTarget(device, &rt); - ok(SUCCEEDED(hr), "Failed to get render target, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get render target, hr %#lx.\n", hr);
background = create_diffuse_material(device, 1.0f, 1.0f, 1.0f, 1.0f); viewport = create_viewport(device, 0, 0, 640, 480); viewport_set_background(device, viewport, background); hr = IDirect3DDevice2_SetCurrentViewport(device, viewport); - ok(SUCCEEDED(hr), "Failed to activate the viewport, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to activate the viewport, hr %#lx.\n", hr);
hr = IDirect3DDevice2_SetRenderState(device, D3DRENDERSTATE_FOGENABLE, FALSE); - ok(SUCCEEDED(hr), "Failed to disable fog, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to disable fog, hr %#lx.\n", hr);
/* Try it first with a TRIANGLESTRIP. Do it with different geometry because * the color fixups we have to do for FLAT shading will be dependent on that. */ @@ -10649,19 +10649,19 @@ static void test_shademode(void) for (i = 0; i < ARRAY_SIZE(tests); ++i) { hr = IDirect3DViewport2_Clear(viewport, 1, &clear_rect, D3DCLEAR_TARGET); - ok(SUCCEEDED(hr), "Failed to clear viewport, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to clear viewport, hr %#lx.\n", hr);
hr = IDirect3DDevice2_SetRenderState(device, D3DRENDERSTATE_SHADEMODE, tests[i].shademode); - ok(hr == D3D_OK, "Failed to set shade mode, hr %#x.\n", hr); + ok(hr == D3D_OK, "Failed to set shade mode, hr %#lx.\n", hr);
hr = IDirect3DDevice2_BeginScene(device); - ok(SUCCEEDED(hr), "Failed to begin scene, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to begin scene, hr %#lx.\n", hr); quad = tests[i].primtype == D3DPT_TRIANGLESTRIP ? quad_strip : quad_list; count = tests[i].primtype == D3DPT_TRIANGLESTRIP ? 4 : 6; hr = IDirect3DDevice2_DrawPrimitive(device, tests[i].primtype, D3DVT_LVERTEX, quad, count, 0); - ok(SUCCEEDED(hr), "Failed to draw, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to draw, hr %#lx.\n", hr); hr = IDirect3DDevice2_EndScene(device); - ok(SUCCEEDED(hr), "Failed to end scene, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to end scene, hr %#lx.\n", hr);
color0 = get_surface_color(rt, 100, 100); /* Inside first triangle */ color1 = get_surface_color(rt, 500, 350); /* Inside second triangle */ @@ -10671,9 +10671,9 @@ static void test_shademode(void) * functionality being available. */ /* PHONG should be the same as GOURAUD, since no hardware implements * this. */ - ok(compare_color(color0, tests[i].color0, 1), "Test %u shading has color0 %08x, expected %08x.\n", + ok(compare_color(color0, tests[i].color0, 1), "Test %u shading has color0 %08lx, expected %08lx.\n", i, color0, tests[i].color0); - ok(compare_color(color1, tests[i].color1, 1), "Test %u shading has color1 %08x, expected %08x.\n", + ok(compare_color(color1, tests[i].color1, 1), "Test %u shading has color1 %08lx, expected %08lx.\n", i, color1, tests[i].color1); }
@@ -10681,7 +10681,7 @@ static void test_shademode(void) destroy_material(background); IDirectDrawSurface_Release(rt); refcount = IDirect3DDevice2_Release(device); - ok(!refcount, "Device has %u references left.\n", refcount); + ok(!refcount, "Device has %lu references left.\n", refcount); IDirectDraw2_Release(ddraw); DestroyWindow(window); } @@ -10736,12 +10736,12 @@ static void test_lockrect_invalid(void) ddraw = create_ddraw(); ok(!!ddraw, "Failed to create a ddraw object.\n"); hr = IDirectDraw2_SetCooperativeLevel(ddraw, window, DDSCL_NORMAL); - ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#lx.\n", hr);
memset(&hal_caps, 0, sizeof(hal_caps)); hal_caps.dwSize = sizeof(hal_caps); hr = IDirectDraw2_GetCaps(ddraw, &hal_caps, NULL); - ok(SUCCEEDED(hr), "Failed to get caps, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get caps, hr %#lx.\n", hr); if ((hal_caps.ddsCaps.dwCaps & needed_caps) != needed_caps) { skip("Required surface types not supported, skipping test.\n"); @@ -10764,13 +10764,13 @@ static void test_lockrect_invalid(void) U4(surface_desc.ddpfPixelFormat).dwBBitMask = 0x0000ff;
hr = IDirectDraw2_CreateSurface(ddraw, &surface_desc, &surface1, NULL); - ok(SUCCEEDED(hr), "Failed to create surface, hr %#x, type %s.\n", hr, resources[r].name); + ok(SUCCEEDED(hr), "Failed to create surface, hr %#lx, type %s.\n", hr, resources[r].name); hr = IDirectDrawSurface_QueryInterface(surface1, &IID_IDirectDrawSurface2, (void **)&surface); - ok(SUCCEEDED(hr), "Failed to QI IDirectDrawSurface2 interface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to QI IDirectDrawSurface2 interface, hr %#lx.\n", hr); IDirectDrawSurface_Release(surface1);
hr = IDirectDrawSurface2_Lock(surface, NULL, NULL, DDLOCK_WAIT, NULL); - ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#x, type %s.\n", hr, resources[r].name); + ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#lx, type %s.\n", hr, resources[r].name);
for (i = 0; i < ARRAY_SIZE(valid); ++i) { @@ -10780,11 +10780,11 @@ static void test_lockrect_invalid(void) surface_desc.dwSize = sizeof(surface_desc);
hr = IDirectDrawSurface2_Lock(surface, rect, &surface_desc, DDLOCK_WAIT, NULL); - ok(SUCCEEDED(hr), "Lock failed (%#x) for rect %s, type %s.\n", + ok(SUCCEEDED(hr), "Lock failed (%#lx) for rect %s, type %s.\n", hr, wine_dbgstr_rect(rect), resources[r].name);
hr = IDirectDrawSurface2_Unlock(surface, NULL); - ok(SUCCEEDED(hr), "Failed to unlock surface, hr %#x, type %s.\n", hr, resources[r].name); + ok(SUCCEEDED(hr), "Failed to unlock surface, hr %#lx, type %s.\n", hr, resources[r].name); }
for (i = 0; i < ARRAY_SIZE(invalid); ++i) @@ -10795,37 +10795,37 @@ static void test_lockrect_invalid(void) surface_desc.dwSize = sizeof(surface_desc);
hr = IDirectDrawSurface2_Lock(surface, rect, &surface_desc, DDLOCK_WAIT, NULL); - ok(hr == resources[r].hr, "Lock returned %#x for rect %s, type %s.\n", + ok(hr == resources[r].hr, "Lock returned %#lx for rect %s, type %s.\n", hr, wine_dbgstr_rect(rect), resources[r].name); if (SUCCEEDED(hr)) { hr = IDirectDrawSurface2_Unlock(surface, NULL); - ok(SUCCEEDED(hr), "Failed to unlock surface, hr %#x, type %s.\n", hr, resources[r].name); + ok(SUCCEEDED(hr), "Failed to unlock surface, hr %#lx, type %s.\n", hr, resources[r].name); } else ok(!surface_desc.lpSurface, "Got unexpected lpSurface %p.\n", surface_desc.lpSurface); }
hr = IDirectDrawSurface2_Lock(surface, NULL, &surface_desc, DDLOCK_WAIT, NULL); - ok(SUCCEEDED(hr), "Lock(rect = NULL) failed, hr %#x, type %s.\n", + ok(SUCCEEDED(hr), "Lock(rect = NULL) failed, hr %#lx, type %s.\n", hr, resources[r].name); hr = IDirectDrawSurface2_Lock(surface, NULL, &surface_desc, DDLOCK_WAIT, NULL); - ok(hr == DDERR_SURFACEBUSY, "Double lock(rect = NULL) returned %#x, type %s.\n", + ok(hr == DDERR_SURFACEBUSY, "Double lock(rect = NULL) returned %#lx, type %s.\n", hr, resources[r].name); hr = IDirectDrawSurface2_Unlock(surface, NULL); - ok(SUCCEEDED(hr), "Failed to unlock surface, hr %#x, type %s.\n", hr, resources[r].name); + ok(SUCCEEDED(hr), "Failed to unlock surface, hr %#lx, type %s.\n", hr, resources[r].name);
hr = IDirectDrawSurface2_Lock(surface, &valid[0], &surface_desc, DDLOCK_WAIT, NULL); - ok(SUCCEEDED(hr), "Lock(rect = %s) failed (%#x).\n", wine_dbgstr_rect(&valid[0]), hr); + ok(SUCCEEDED(hr), "Lock(rect = %s) failed (%#lx).\n", wine_dbgstr_rect(&valid[0]), hr); hr = IDirectDrawSurface2_Lock(surface, &valid[0], &surface_desc, DDLOCK_WAIT, NULL); - ok(hr == DDERR_SURFACEBUSY, "Double lock(rect = %s) failed (%#x).\n", + ok(hr == DDERR_SURFACEBUSY, "Double lock(rect = %s) failed (%#lx).\n", wine_dbgstr_rect(&valid[0]), hr);
/* Locking a different rectangle returns DD_OK, but it seems to break the surface. * Afterwards unlocking the surface fails(NULL rectangle or both locked rectangles) */
hr = IDirectDrawSurface2_Unlock(surface, NULL); - ok(SUCCEEDED(hr), "Failed to unlock surface, hr %#x, type %s.\n", hr, resources[r].name); + ok(SUCCEEDED(hr), "Failed to unlock surface, hr %#lx, type %s.\n", hr, resources[r].name);
IDirectDrawSurface2_Release(surface); } @@ -10850,7 +10850,7 @@ static void test_yv12_overlay(void) ddraw = create_ddraw(); ok(!!ddraw, "Failed to create a ddraw object.\n"); hr = IDirectDraw2_SetCooperativeLevel(ddraw, window, DDSCL_NORMAL); - ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#lx.\n", hr);
if (!(src_surface = create_overlay(ddraw, 256, 256, MAKEFOURCC('Y','V','1','2')))) { @@ -10861,17 +10861,17 @@ static void test_yv12_overlay(void) memset(&desc, 0, sizeof(desc)); desc.dwSize = sizeof(desc); hr = IDirectDrawSurface_Lock(src_surface, NULL, &desc, DDLOCK_WAIT, NULL); - ok(SUCCEEDED(hr), "Failed to lock surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to lock surface, hr %#lx.\n", hr);
ok(desc.dwFlags == (DDSD_WIDTH | DDSD_HEIGHT | DDSD_PIXELFORMAT | DDSD_CAPS | DDSD_PITCH), - "Got unexpected flags %#x.\n", desc.dwFlags); + "Got unexpected flags %#lx.\n", desc.dwFlags); ok(desc.ddsCaps.dwCaps == (DDSCAPS_OVERLAY | DDSCAPS_VIDEOMEMORY | DDSCAPS_LOCALVIDMEM | DDSCAPS_HWCODEC) || desc.ddsCaps.dwCaps == (DDSCAPS_OVERLAY | DDSCAPS_VIDEOMEMORY | DDSCAPS_LOCALVIDMEM), - "Got unexpected caps %#x.\n", desc.ddsCaps.dwCaps); - ok(desc.dwWidth == 256, "Got unexpected width %u.\n", desc.dwWidth); - ok(desc.dwHeight == 256, "Got unexpected height %u.\n", desc.dwHeight); + "Got unexpected caps %#lx.\n", desc.ddsCaps.dwCaps); + ok(desc.dwWidth == 256, "Got unexpected width %lu.\n", desc.dwWidth); + ok(desc.dwHeight == 256, "Got unexpected height %lu.\n", desc.dwHeight); /* The overlay pitch seems to have 256 byte alignment. */ - ok(!(U1(desc).lPitch & 0xff), "Got unexpected pitch %u.\n", U1(desc).lPitch); + ok(!(U1(desc).lPitch & 0xff), "Got unexpected pitch %lu.\n", U1(desc).lPitch);
/* Fill the surface with some data for the blit test. */ base = desc.lpSurface; @@ -10892,7 +10892,7 @@ static void test_yv12_overlay(void) }
hr = IDirectDrawSurface_Unlock(src_surface, NULL); - ok(SUCCEEDED(hr), "Failed to unlock surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to unlock surface, hr %#lx.\n", hr);
/* YV12 uses 2x2 blocks with 6 bytes per block (4*Y, 1*U, 1*V). Unlike * other block-based formats like DXT the entire Y channel is stored in @@ -10900,12 +10900,12 @@ static void test_yv12_overlay(void) * locks do not really make sense. Show that they are allowed nevertheless * and the offset points into the luminance data. */ hr = IDirectDrawSurface_Lock(src_surface, &rect, &desc, DDLOCK_WAIT, NULL); - ok(SUCCEEDED(hr), "Failed to lock surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to lock surface, hr %#lx.\n", hr); offset = ((const unsigned char *)desc.lpSurface - base); - ok(offset == rect.top * U1(desc).lPitch + rect.left, "Got unexpected offset %u, expected %u.\n", + ok(offset == rect.top * U1(desc).lPitch + rect.left, "Got unexpected offset %u, expected %lu.\n", offset, rect.top * U1(desc).lPitch + rect.left); hr = IDirectDrawSurface_Unlock(src_surface, NULL); - ok(SUCCEEDED(hr), "Failed to unlock surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to unlock surface, hr %#lx.\n", hr);
if (!(dst_surface = create_overlay(ddraw, 256, 256, MAKEFOURCC('Y','V','1','2')))) { @@ -10919,14 +10919,14 @@ static void test_yv12_overlay(void) hr = IDirectDrawSurface_Blt(dst_surface, NULL, src_surface, NULL, DDBLT_WAIT, NULL); /* VMware rejects YV12 blits. This behavior has not been seen on real * hardware yet, so mark it broken. */ - ok(SUCCEEDED(hr) || broken(hr == E_NOTIMPL), "Failed to blit, hr %#x.\n", hr); + ok(SUCCEEDED(hr) || broken(hr == E_NOTIMPL), "Failed to blit, hr %#lx.\n", hr);
if (SUCCEEDED(hr)) { memset(&desc, 0, sizeof(desc)); desc.dwSize = sizeof(desc); hr = IDirectDrawSurface_Lock(dst_surface, NULL, &desc, DDLOCK_WAIT, NULL); - ok(SUCCEEDED(hr), "Failed to lock surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to lock surface, hr %#lx.\n", hr);
base = desc.lpSurface; ok(base[0] == 0x10, "Got unexpected Y data 0x%02x.\n", base[0]); @@ -10936,7 +10936,7 @@ static void test_yv12_overlay(void) todo_wine ok(base[0] == 0x30, "Got unexpected U data 0x%02x.\n", base[0]);
hr = IDirectDrawSurface_Unlock(dst_surface, NULL); - ok(SUCCEEDED(hr), "Failed to unlock surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to unlock surface, hr %#lx.\n", hr); }
IDirectDrawSurface_Release(dst_surface); @@ -10972,7 +10972,7 @@ static void test_offscreen_overlay(void) ddraw = create_ddraw(); ok(!!ddraw, "Failed to create a ddraw object.\n"); hr = IDirectDraw2_SetCooperativeLevel(ddraw, window, DDSCL_NORMAL); - ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#lx.\n", hr);
if (!(overlay = create_overlay(ddraw, 64, 64, MAKEFOURCC('U','Y','V','Y')))) { @@ -10985,21 +10985,21 @@ static void test_offscreen_overlay(void) surface_desc.dwFlags = DDSD_CAPS; surface_desc.ddsCaps.dwCaps = DDSCAPS_PRIMARYSURFACE; hr = IDirectDraw2_CreateSurface(ddraw, &surface_desc, &primary, NULL); - ok(SUCCEEDED(hr), "Failed to create surface, hr %#x.\n",hr); + ok(SUCCEEDED(hr), "Failed to create surface, hr %#lx.\n",hr);
/* On Windows 7, and probably Vista, UpdateOverlay() will return * DDERR_OUTOFCAPS if the dwm is active. Calling GetDC() on the primary * surface prevents this by disabling the dwm. */ hr = IDirectDrawSurface_GetDC(primary, &dc); - ok(SUCCEEDED(hr), "Failed to get DC, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get DC, hr %#lx.\n", hr); hr = IDirectDrawSurface_ReleaseDC(primary, dc); - ok(SUCCEEDED(hr), "Failed to release DC, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to release DC, hr %#lx.\n", hr);
/* Try to overlay a NULL surface. */ hr = IDirectDrawSurface_UpdateOverlay(overlay, NULL, NULL, NULL, DDOVER_SHOW, NULL); - ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface_UpdateOverlay(overlay, NULL, NULL, NULL, DDOVER_HIDE, NULL); - ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#lx.\n", hr);
/* Try to overlay an offscreen surface. */ memset(&surface_desc, 0, sizeof(surface_desc)); @@ -11016,18 +11016,18 @@ static void test_offscreen_overlay(void) U3(surface_desc.ddpfPixelFormat).dwGBitMask = 0x07e0; U4(surface_desc.ddpfPixelFormat).dwBBitMask = 0x001f; hr = IDirectDraw2_CreateSurface(ddraw, &surface_desc, &offscreen, NULL); - ok(SUCCEEDED(hr), "Failed to create surface, hr %#x.\n",hr); + ok(SUCCEEDED(hr), "Failed to create surface, hr %#lx.\n",hr);
hr = IDirectDrawSurface_UpdateOverlay(overlay, NULL, offscreen, NULL, DDOVER_SHOW, NULL); ok(SUCCEEDED(hr) || broken(hr == DDERR_OUTOFCAPS && dwm_enabled()) || broken(hr == E_NOTIMPL && ddraw_is_vmware(ddraw)), - "Failed to update overlay, hr %#x.\n", hr); + "Failed to update overlay, hr %#lx.\n", hr);
/* Try to overlay the primary with a non-overlay surface. */ hr = IDirectDrawSurface_UpdateOverlay(offscreen, NULL, primary, NULL, DDOVER_SHOW, NULL); - ok(hr == DDERR_NOTAOVERLAYSURFACE, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_NOTAOVERLAYSURFACE, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface_UpdateOverlay(offscreen, NULL, primary, NULL, DDOVER_HIDE, NULL); - ok(hr == DDERR_NOTAOVERLAYSURFACE, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_NOTAOVERLAYSURFACE, "Got unexpected hr %#lx.\n", hr);
IDirectDrawSurface_Release(offscreen); IDirectDrawSurface_Release(primary); @@ -11052,7 +11052,7 @@ static void test_overlay_rect(void) ddraw = create_ddraw(); ok(!!ddraw, "Failed to create a ddraw object.\n"); hr = IDirectDraw2_SetCooperativeLevel(ddraw, window, DDSCL_NORMAL); - ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#lx.\n", hr);
if (!(overlay = create_overlay(ddraw, 64, 64, MAKEFOURCC('U','Y','V','Y')))) { @@ -11065,15 +11065,15 @@ static void test_overlay_rect(void) surface_desc.dwFlags = DDSD_CAPS; surface_desc.ddsCaps.dwCaps = DDSCAPS_PRIMARYSURFACE; hr = IDirectDraw2_CreateSurface(ddraw, &surface_desc, &primary, NULL); - ok(SUCCEEDED(hr), "Failed to create surface, hr %#x.\n",hr); + ok(SUCCEEDED(hr), "Failed to create surface, hr %#lx.\n",hr);
/* On Windows 7, and probably Vista, UpdateOverlay() will return * DDERR_OUTOFCAPS if the dwm is active. Calling GetDC() on the primary * surface prevents this by disabling the dwm. */ hr = IDirectDrawSurface_GetDC(primary, &dc); - ok(SUCCEEDED(hr), "Failed to get DC, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get DC, hr %#lx.\n", hr); hr = IDirectDrawSurface_ReleaseDC(primary, dc); - ok(SUCCEEDED(hr), "Failed to release DC, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to release DC, hr %#lx.\n", hr);
/* On Windows 8 and newer DWM can't be turned off, making overlays unusable. */ if (dwm_enabled()) @@ -11086,48 +11086,48 @@ static void test_overlay_rect(void) * used. This is not true in Windows Vista and earlier, but changed in * Windows 7. */ hr = IDirectDrawSurface_UpdateOverlay(overlay, NULL, primary, &rect, DDOVER_SHOW, NULL); - ok(SUCCEEDED(hr), "Failed to update overlay, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to update overlay, hr %#lx.\n", hr); hr = IDirectDrawSurface_UpdateOverlay(overlay, NULL, primary, NULL, DDOVER_HIDE, NULL); - ok(SUCCEEDED(hr), "Failed to update overlay, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to update overlay, hr %#lx.\n", hr); hr = IDirectDrawSurface_UpdateOverlay(overlay, NULL, primary, NULL, DDOVER_SHOW, NULL); - ok(hr == DD_OK || hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK || hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#lx.\n", hr);
/* Show that the overlay position is the (top, left) coordinate of the * destination rectangle. */ OffsetRect(&rect, 32, 16); hr = IDirectDrawSurface_UpdateOverlay(overlay, NULL, primary, &rect, DDOVER_SHOW, NULL); - ok(SUCCEEDED(hr), "Failed to update overlay, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to update overlay, hr %#lx.\n", hr); pos_x = -1; pos_y = -1; hr = IDirectDrawSurface_GetOverlayPosition(overlay, &pos_x, &pos_y); - ok(SUCCEEDED(hr), "Failed to get overlay position, hr %#x.\n", hr); - ok(pos_x == rect.left, "Got unexpected pos_x %d, expected %d.\n", pos_x, rect.left); - ok(pos_y == rect.top, "Got unexpected pos_y %d, expected %d.\n", pos_y, rect.top); + ok(SUCCEEDED(hr), "Failed to get overlay position, hr %#lx.\n", hr); + ok(pos_x == rect.left, "Got unexpected pos_x %ld, expected %ld.\n", pos_x, rect.left); + ok(pos_y == rect.top, "Got unexpected pos_y %ld, expected %ld.\n", pos_y, rect.top);
/* Passing a NULL dest rect sets the position to 0/0. Visually it can be * seen that the overlay overlays the whole primary(==screen). */ hr2 = IDirectDrawSurface_UpdateOverlay(overlay, NULL, primary, NULL, 0, NULL); - ok(hr2 == DD_OK || hr2 == DDERR_INVALIDPARAMS || hr2 == DDERR_OUTOFCAPS, "Got unexpected hr %#x.\n", hr2); + ok(hr2 == DD_OK || hr2 == DDERR_INVALIDPARAMS || hr2 == DDERR_OUTOFCAPS, "Got unexpected hr %#lx.\n", hr2); hr = IDirectDrawSurface_GetOverlayPosition(overlay, &pos_x, &pos_y); - ok(SUCCEEDED(hr), "Failed to get overlay position, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get overlay position, hr %#lx.\n", hr); if (SUCCEEDED(hr2)) { - ok(!pos_x, "Got unexpected pos_x %d.\n", pos_x); - ok(!pos_y, "Got unexpected pos_y %d.\n", pos_y); + ok(!pos_x, "Got unexpected pos_x %ld.\n", pos_x); + ok(!pos_y, "Got unexpected pos_y %ld.\n", pos_y); } else { - ok(pos_x == 32, "Got unexpected pos_x %d.\n", pos_x); - ok(pos_y == 16, "Got unexpected pos_y %d.\n", pos_y); + ok(pos_x == 32, "Got unexpected pos_x %ld.\n", pos_x); + ok(pos_y == 16, "Got unexpected pos_y %ld.\n", pos_y); }
/* The position cannot be retrieved when the overlay is not shown. */ hr = IDirectDrawSurface_UpdateOverlay(overlay, NULL, primary, &rect, DDOVER_HIDE, NULL); - ok(SUCCEEDED(hr), "Failed to update overlay, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to update overlay, hr %#lx.\n", hr); pos_x = -1; pos_y = -1; hr = IDirectDrawSurface_GetOverlayPosition(overlay, &pos_x, &pos_y); - ok(hr == DDERR_OVERLAYNOTVISIBLE, "Got unexpected hr %#x.\n", hr); - ok(!pos_x, "Got unexpected pos_x %d.\n", pos_x); - ok(!pos_y, "Got unexpected pos_y %d.\n", pos_y); + ok(hr == DDERR_OVERLAYNOTVISIBLE, "Got unexpected hr %#lx.\n", hr); + ok(!pos_x, "Got unexpected pos_x %ld.\n", pos_x); + ok(!pos_y, "Got unexpected pos_y %ld.\n", pos_y);
done: if (primary) @@ -11181,7 +11181,7 @@ static void test_blt(void) }
hr = IDirect3DDevice2_GetRenderTarget(device, &rt); - ok(SUCCEEDED(hr), "Failed to get render target, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get render target, hr %#lx.\n", hr);
memset(&surface_desc, 0, sizeof(surface_desc)); surface_desc.dwSize = sizeof(surface_desc); @@ -11190,36 +11190,36 @@ static void test_blt(void) surface_desc.dwHeight = 480; surface_desc.ddsCaps.dwCaps = DDSCAPS_OFFSCREENPLAIN; hr = IDirectDraw2_CreateSurface(ddraw, &surface_desc, &surface, NULL); - ok(SUCCEEDED(hr), "Failed to create surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create surface, hr %#lx.\n", hr);
hr = IDirectDrawSurface_Blt(surface, NULL, surface, NULL, 0, NULL); - ok(SUCCEEDED(hr), "Failed to blit, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to blit, hr %#lx.\n", hr);
hr = IDirectDrawSurface_Blt(surface, NULL, rt, NULL, 0, NULL); - ok(SUCCEEDED(hr), "Failed to blit, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to blit, hr %#lx.\n", hr);
for (i = 0; i < ARRAY_SIZE(test_data); ++i) { hr = IDirectDrawSurface_Blt(surface, &test_data[i].dst_rect, surface, &test_data[i].src_rect, DDBLT_WAIT, NULL); - ok(hr == test_data[i].hr, "Test %u: Got unexpected hr %#x, expected %#x.\n", i, hr, test_data[i].hr); + ok(hr == test_data[i].hr, "Test %u: Got unexpected hr %#lx, expected %#lx.\n", i, hr, test_data[i].hr);
hr = IDirectDrawSurface_Blt(surface, &test_data[i].dst_rect, rt, &test_data[i].src_rect, DDBLT_WAIT, NULL); - ok(hr == test_data[i].hr, "Test %u: Got unexpected hr %#x, expected %#x.\n", i, hr, test_data[i].hr); + ok(hr == test_data[i].hr, "Test %u: Got unexpected hr %#lx, expected %#lx.\n", i, hr, test_data[i].hr);
hr = IDirectDrawSurface_Blt(surface, &test_data[i].dst_rect, NULL, &test_data[i].src_rect, DDBLT_WAIT, NULL); - ok(hr == DDERR_INVALIDPARAMS, "Test %u: Got unexpected hr %#x.\n", i, hr); + ok(hr == DDERR_INVALIDPARAMS, "Test %u: Got unexpected hr %#lx.\n", i, hr);
hr = IDirectDrawSurface_Blt(surface, &test_data[i].dst_rect, NULL, NULL, DDBLT_WAIT, NULL); - ok(hr == DDERR_INVALIDPARAMS, "Test %u: Got unexpected hr %#x.\n", i, hr); + ok(hr == DDERR_INVALIDPARAMS, "Test %u: Got unexpected hr %#lx.\n", i, hr); }
IDirectDrawSurface_Release(surface); IDirectDrawSurface_Release(rt); refcount = IDirect3DDevice2_Release(device); - ok(!refcount, "Device has %u references left.\n", refcount); + ok(!refcount, "Device has %lu references left.\n", refcount); IDirectDraw2_Release(ddraw); DestroyWindow(window); } @@ -11261,7 +11261,7 @@ static void test_blt_z_alpha(void) ddraw = create_ddraw(); ok(!!ddraw, "Failed to create a ddraw object.\n"); hr = IDirectDraw2_SetCooperativeLevel(ddraw, window, DDSCL_NORMAL); - ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#lx.\n", hr);
memset(&pf, 0, sizeof(pf)); pf.dwSize = sizeof(pf); @@ -11281,9 +11281,9 @@ static void test_blt_z_alpha(void) surface_desc.ddsCaps.dwCaps = DDSCAPS_OFFSCREENPLAIN;
hr = IDirectDraw2_CreateSurface(ddraw, &surface_desc, &src_surface, NULL); - ok(SUCCEEDED(hr), "Failed to create source surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create source surface, hr %#lx.\n", hr); hr = IDirectDraw2_CreateSurface(ddraw, &surface_desc, &dst_surface, NULL); - ok(SUCCEEDED(hr), "Failed to create destination surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create destination surface, hr %#lx.\n", hr);
memset(&fx, 0, sizeof(fx)); fx.dwSize = sizeof(fx); @@ -11303,23 +11303,23 @@ static void test_blt_z_alpha(void) { U5(fx).dwFillColor = 0x3300ff00; hr = IDirectDrawSurface_Blt(src_surface, NULL, NULL, NULL, DDBLT_COLORFILL | DDBLT_WAIT, &fx); - ok(SUCCEEDED(hr), "Test %u: Got unexpected hr %#x.\n", i, hr); + ok(SUCCEEDED(hr), "Test %u: Got unexpected hr %#lx.\n", i, hr);
U5(fx).dwFillColor = 0xccff0000; hr = IDirectDrawSurface_Blt(dst_surface, NULL, NULL, NULL, DDBLT_COLORFILL | DDBLT_WAIT, &fx); - ok(SUCCEEDED(hr), "Test %u: Got unexpected hr %#x.\n", i, hr); + ok(SUCCEEDED(hr), "Test %u: Got unexpected hr %#lx.\n", i, hr);
hr = IDirectDrawSurface_Blt(dst_surface, NULL, src_surface, NULL, blt_flags[i] | DDBLT_WAIT, &fx); - ok(SUCCEEDED(hr), "Test %u: Got unexpected hr %#x.\n", i, hr); + ok(SUCCEEDED(hr), "Test %u: Got unexpected hr %#lx.\n", i, hr);
color = get_surface_color(dst_surface, 32, 32); - ok(compare_color(color, 0x0000ff00, 0), "Test %u: Got unexpected color 0x%08x.\n", i, color); + ok(compare_color(color, 0x0000ff00, 0), "Test %u: Got unexpected color 0x%08lx.\n", i, color); }
IDirectDrawSurface_Release(dst_surface); IDirectDrawSurface_Release(src_surface); refcount = IDirectDraw2_Release(ddraw); - ok(!refcount, "DirectDraw has %u references left.\n", refcount); + ok(!refcount, "DirectDraw has %lu references left.\n", refcount); DestroyWindow(window); }
@@ -11365,7 +11365,7 @@ static void test_cross_device_blt(void) surface_desc.dwHeight = 480; surface_desc.ddsCaps.dwCaps = DDSCAPS_OFFSCREENPLAIN | DDSCAPS_SYSTEMMEMORY; hr = IDirectDraw2_CreateSurface(ddraw, &surface_desc, &sysmem_surface, NULL); - ok(SUCCEEDED(hr), "Failed to create surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create surface, hr %#lx.\n", hr);
memset(&surface_desc, 0, sizeof(surface_desc)); surface_desc.dwSize = sizeof(surface_desc); @@ -11373,7 +11373,7 @@ static void test_cross_device_blt(void) surface_desc.ddsCaps.dwCaps = DDSCAPS_PRIMARYSURFACE | DDSCAPS_COMPLEX | DDSCAPS_FLIP | DDSCAPS_VIDEOMEMORY; surface_desc.dwBackBufferCount = 2; hr = IDirectDraw2_CreateSurface(ddraw, &surface_desc, &surface, NULL); - ok(SUCCEEDED(hr), "Failed to create surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create surface, hr %#lx.\n", hr);
memset(&surface_desc, 0, sizeof(surface_desc)); surface_desc.dwSize = sizeof(surface_desc); @@ -11388,37 +11388,37 @@ static void test_cross_device_blt(void) U3(surface_desc.ddpfPixelFormat).dwGBitMask = 0x000003e0; U4(surface_desc.ddpfPixelFormat).dwBBitMask = 0x0000001f; hr = IDirectDraw2_CreateSurface(ddraw2, &surface_desc, &surface2, NULL); - ok(SUCCEEDED(hr), "Failed to create surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create surface, hr %#lx.\n", hr);
memset(&fx, 0, sizeof(fx)); fx.dwSize = sizeof(fx); U5(fx).dwFillColor = 0xff0000ff; hr = IDirectDrawSurface_Blt(surface2, NULL, NULL, NULL, DDBLT_COLORFILL | DDBLT_WAIT, &fx); - ok(SUCCEEDED(hr), "Failed to fill surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to fill surface, hr %#lx.\n", hr);
hr = IDirectDrawSurface_Blt(surface, NULL, surface2, NULL, DDBLT_WAIT, NULL); - ok(hr == E_NOTIMPL, "Got unexpected hr %#x.\n", hr); + ok(hr == E_NOTIMPL, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface_Flip(surface, NULL, DDFLIP_WAIT); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface_Blt(surface, NULL, surface2, NULL, DDBLT_WAIT, NULL); - ok(hr == E_NOTIMPL, "Got unexpected hr %#x.\n", hr); + ok(hr == E_NOTIMPL, "Got unexpected hr %#lx.\n", hr); color = get_surface_color(surface, 320, 240); - ok(color == 0x00000000, "Got unexpected color 0x%08x.\n", color); + ok(color == 0x00000000, "Got unexpected color 0x%08lx.\n", color);
hr = IDirectDrawSurface_Blt(sysmem_surface, NULL, surface2, NULL, DDBLT_WAIT, NULL); - ok(hr == E_NOTIMPL, "Got unexpected hr %#x.\n", hr); + ok(hr == E_NOTIMPL, "Got unexpected hr %#lx.\n", hr); color = get_surface_color(sysmem_surface, 320, 240); - ok(color == 0x00000000, "Got unexpected color 0x%08x.\n", color); + ok(color == 0x00000000, "Got unexpected color 0x%08lx.\n", color);
hr = IDirectDraw2_SetCooperativeLevel(ddraw, window, DDSCL_NORMAL); - ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#lx.\n", hr); hr = IDirectDrawSurface_IsLost(sysmem_surface); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
hr = IDirectDrawSurface_Blt(sysmem_surface, NULL, surface2, NULL, DDBLT_WAIT, NULL); - ok(hr == E_NOTIMPL, "Got unexpected hr %#x.\n", hr); + ok(hr == E_NOTIMPL, "Got unexpected hr %#lx.\n", hr); color = get_surface_color(sysmem_surface, 320, 240); - ok(color == 0x00000000, "Got unexpected color 0x%08x.\n", color); + ok(color == 0x00000000, "Got unexpected color 0x%08lx.\n", color);
IDirectDrawSurface_Release(surface2); memset(&surface_desc, 0, sizeof(surface_desc)); @@ -11428,22 +11428,22 @@ static void test_cross_device_blt(void) surface_desc.dwHeight = 480; surface_desc.ddsCaps.dwCaps = DDSCAPS_OFFSCREENPLAIN | DDSCAPS_SYSTEMMEMORY; hr = IDirectDraw2_CreateSurface(ddraw2, &surface_desc, &surface2, NULL); - ok(SUCCEEDED(hr), "Failed to create surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create surface, hr %#lx.\n", hr); hr = IDirectDrawSurface_Blt(surface2, NULL, NULL, NULL, DDBLT_COLORFILL | DDBLT_WAIT, &fx); - ok(SUCCEEDED(hr), "Failed to fill surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to fill surface, hr %#lx.\n", hr);
hr = IDirectDrawSurface_Blt(sysmem_surface, NULL, surface2, NULL, DDBLT_WAIT, NULL); - todo_wine ok(hr == D3D_OK, "Failed to blit, hr %#x.\n", hr); + todo_wine ok(hr == D3D_OK, "Failed to blit, hr %#lx.\n", hr); color = get_surface_color(sysmem_surface, 320, 240); - todo_wine ok(compare_color(color, 0x000000ff, 1), "Got unexpected color 0x%08x.\n", color); + todo_wine ok(compare_color(color, 0x000000ff, 1), "Got unexpected color 0x%08lx.\n", color);
IDirectDrawSurface_Release(surface); IDirectDrawSurface_Release(surface2); IDirectDrawSurface_Release(sysmem_surface); refcount = IDirect3DDevice2_Release(device); - ok(!refcount, "Device has %u references left.\n", refcount); + ok(!refcount, "Device has %lu references left.\n", refcount); refcount = IDirect3DDevice2_Release(device2); - ok(!refcount, "Device has %u references left.\n", refcount); + ok(!refcount, "Device has %lu references left.\n", refcount); IDirectDraw2_Release(ddraw); IDirectDraw2_Release(ddraw2); DestroyWindow(window); @@ -11518,11 +11518,11 @@ static void test_getdc(void) ddraw = create_ddraw(); ok(!!ddraw, "Failed to create a ddraw object.\n"); hr = IDirectDraw2_SetCooperativeLevel(ddraw, window, DDSCL_NORMAL); - ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#lx.\n", hr);
surface_desc.dwSize = sizeof(surface_desc); hr = IDirectDraw2_GetDisplayMode(ddraw, &surface_desc); - ok(SUCCEEDED(hr), "Failed to get display mode, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get display mode, hr %#lx.\n", hr); screen_bpp = U1(surface_desc.ddpfPixelFormat).dwRGBBitCount;
for (i = 0; i < ARRAY_SIZE(test_data); ++i) @@ -11540,7 +11540,7 @@ static void test_getdc(void) surface_desc.ddsCaps.dwCaps = DDSCAPS_TEXTURE; if (FAILED(hr = IDirectDraw2_CreateSurface(ddraw, &surface_desc, &surface, NULL))) { - skip("Failed to create surface for format %s (hr %#x), skipping tests.\n", test_data[i].name, hr); + skip("Failed to create surface for format %s (hr %#lx), skipping tests.\n", test_data[i].name, hr); continue; } } @@ -11549,9 +11549,9 @@ static void test_getdc(void) hr = IDirectDrawSurface_GetDC(surface, &dc); if (test_data[i].getdc_supported) ok(SUCCEEDED(hr) || broken(hr == test_data[i].alt_result || ddraw_is_vmware(ddraw)), - "Got unexpected hr %#x for format %s.\n", hr, test_data[i].name); + "Got unexpected hr %#lx for format %s.\n", hr, test_data[i].name); else - ok(FAILED(hr), "Got unexpected hr %#x for format %s.\n", hr, test_data[i].name); + ok(FAILED(hr), "Got unexpected hr %#lx for format %s.\n", hr, test_data[i].name);
if (SUCCEEDED(hr)) { @@ -11562,10 +11562,10 @@ static void test_getdc(void) int size;
type = GetObjectType(dc); - ok(type == OBJ_MEMDC, "Got unexpected object type %#x for format %s.\n", type, test_data[i].name); + ok(type == OBJ_MEMDC, "Got unexpected object type %#lx for format %s.\n", type, test_data[i].name); bitmap = GetCurrentObject(dc, OBJ_BITMAP); type = GetObjectType(bitmap); - ok(type == OBJ_BITMAP, "Got unexpected object type %#x for format %s.\n", type, test_data[i].name); + ok(type == OBJ_BITMAP, "Got unexpected object type %#lx for format %s.\n", type, test_data[i].name);
size = GetObjectA(bitmap, sizeof(dib), &dib); ok(size == sizeof(dib), "Got unexpected size %d for format %s.\n", size, test_data[i].name); @@ -11589,11 +11589,11 @@ static void test_getdc(void) ok(!!dib.dsBm.bmBits || broken(!pDwmIsCompositionEnabled && dib.dsBm.bmBitsPixel == screen_bpp), "Got unexpected bits %p for format %s.\n", dib.dsBm.bmBits, test_data[i].name);
- ok(dib.dsBmih.biSize == sizeof(dib.dsBmih), "Got unexpected size %u for format %s.\n", + ok(dib.dsBmih.biSize == sizeof(dib.dsBmih), "Got unexpected size %lu for format %s.\n", dib.dsBmih.biSize, test_data[i].name); - ok(dib.dsBmih.biWidth == surface_desc.dwWidth, "Got unexpected width %d for format %s.\n", + ok(dib.dsBmih.biWidth == surface_desc.dwWidth, "Got unexpected width %ld for format %s.\n", dib.dsBmih.biHeight, test_data[i].name); - ok(dib.dsBmih.biHeight == surface_desc.dwHeight, "Got unexpected height %d for format %s.\n", + ok(dib.dsBmih.biHeight == surface_desc.dwHeight, "Got unexpected height %ld for format %s.\n", dib.dsBmih.biHeight, test_data[i].name); ok(dib.dsBmih.biPlanes == 1, "Got unexpected plane count %u for format %s.\n", dib.dsBmih.biPlanes, test_data[i].name); @@ -11602,17 +11602,17 @@ static void test_getdc(void) dib.dsBmih.biBitCount, test_data[i].name); ok(dib.dsBmih.biCompression == (U1(test_data[i].format).dwRGBBitCount == 16 ? BI_BITFIELDS : BI_RGB) || broken(U1(test_data[i].format).dwRGBBitCount == 32 && dib.dsBmih.biCompression == BI_BITFIELDS), - "Got unexpected compression %#x for format %s.\n", + "Got unexpected compression %#lx for format %s.\n", dib.dsBmih.biCompression, test_data[i].name); - ok(!dib.dsBmih.biSizeImage, "Got unexpected image size %u for format %s.\n", + ok(!dib.dsBmih.biSizeImage, "Got unexpected image size %lu for format %s.\n", dib.dsBmih.biSizeImage, test_data[i].name); - ok(!dib.dsBmih.biXPelsPerMeter, "Got unexpected horizontal resolution %d for format %s.\n", + ok(!dib.dsBmih.biXPelsPerMeter, "Got unexpected horizontal resolution %ld for format %s.\n", dib.dsBmih.biXPelsPerMeter, test_data[i].name); - ok(!dib.dsBmih.biYPelsPerMeter, "Got unexpected vertical resolution %d for format %s.\n", + ok(!dib.dsBmih.biYPelsPerMeter, "Got unexpected vertical resolution %ld for format %s.\n", dib.dsBmih.biYPelsPerMeter, test_data[i].name); - ok(!dib.dsBmih.biClrUsed, "Got unexpected used colour count %u for format %s.\n", + ok(!dib.dsBmih.biClrUsed, "Got unexpected used colour count %lu for format %s.\n", dib.dsBmih.biClrUsed, test_data[i].name); - ok(!dib.dsBmih.biClrImportant, "Got unexpected important colour count %u for format %s.\n", + ok(!dib.dsBmih.biClrImportant, "Got unexpected important colour count %lu for format %s.\n", dib.dsBmih.biClrImportant, test_data[i].name);
if (dib.dsBmih.biCompression == BI_BITFIELDS) @@ -11621,20 +11621,20 @@ static void test_getdc(void) && dib.dsBitfields[1] == U3(test_data[i].format).dwGBitMask && dib.dsBitfields[2] == U4(test_data[i].format).dwBBitMask) || broken(!dib.dsBitfields[0] && !dib.dsBitfields[1] && !dib.dsBitfields[2]), - "Got unexpected colour masks 0x%08x 0x%08x 0x%08x for format %s.\n", + "Got unexpected colour masks 0x%08lx 0x%08lx 0x%08lx for format %s.\n", dib.dsBitfields[0], dib.dsBitfields[1], dib.dsBitfields[2], test_data[i].name); } else { ok(!dib.dsBitfields[0] && !dib.dsBitfields[1] && !dib.dsBitfields[2], - "Got unexpected colour masks 0x%08x 0x%08x 0x%08x for format %s.\n", + "Got unexpected colour masks 0x%08lx 0x%08lx 0x%08lx for format %s.\n", dib.dsBitfields[0], dib.dsBitfields[1], dib.dsBitfields[2], test_data[i].name); } ok(!dib.dshSection, "Got unexpected section %p for format %s.\n", dib.dshSection, test_data[i].name); - ok(!dib.dsOffset, "Got unexpected offset %u for format %s.\n", dib.dsOffset, test_data[i].name); + ok(!dib.dsOffset, "Got unexpected offset %lu for format %s.\n", dib.dsOffset, test_data[i].name);
hr = IDirectDrawSurface_ReleaseDC(surface, dc); - ok(hr == DD_OK, "Failed to release DC for format %s, hr %#x.\n", test_data[i].name, hr); + ok(hr == DD_OK, "Failed to release DC for format %s, hr %#lx.\n", test_data[i].name, hr); } else { @@ -11649,152 +11649,152 @@ static void test_getdc(void) surface_desc.ddsCaps.dwCaps = DDSCAPS_TEXTURE | DDSCAPS_COMPLEX | DDSCAPS_MIPMAP; if (FAILED(hr = IDirectDraw2_CreateSurface(ddraw, &surface_desc, &surface, NULL))) { - skip("Failed to create mip-mapped texture for format %s (hr %#x), skipping tests.\n", + skip("Failed to create mip-mapped texture for format %s (hr %#lx), skipping tests.\n", test_data[i].name, hr); continue; }
hr = IDirectDrawSurface_GetAttachedSurface(surface, &caps, &tmp); - ok(SUCCEEDED(hr), "Failed to get attached surface for format %s, hr %#x.\n", test_data[i].name, hr); + ok(SUCCEEDED(hr), "Failed to get attached surface for format %s, hr %#lx.\n", test_data[i].name, hr); hr = IDirectDrawSurface_GetAttachedSurface(tmp, &caps, &surface2); - ok(SUCCEEDED(hr), "Failed to get attached surface for format %s, hr %#x.\n", test_data[i].name, hr); + ok(SUCCEEDED(hr), "Failed to get attached surface for format %s, hr %#lx.\n", test_data[i].name, hr); IDirectDrawSurface_Release(tmp);
hr = IDirectDrawSurface_GetDC(surface, &dc); - ok(SUCCEEDED(hr), "Failed to get DC for format %s, hr %#x.\n", test_data[i].name, hr); + ok(SUCCEEDED(hr), "Failed to get DC for format %s, hr %#lx.\n", test_data[i].name, hr); hr = IDirectDrawSurface_ReleaseDC(surface, dc); - ok(SUCCEEDED(hr), "Failed to release DC for format %s, hr %#x.\n", test_data[i].name, hr); + ok(SUCCEEDED(hr), "Failed to release DC for format %s, hr %#lx.\n", test_data[i].name, hr); hr = IDirectDrawSurface_GetDC(surface2, &dc); - ok(SUCCEEDED(hr), "Failed to get DC for format %s, hr %#x.\n", test_data[i].name, hr); + ok(SUCCEEDED(hr), "Failed to get DC for format %s, hr %#lx.\n", test_data[i].name, hr); hr = IDirectDrawSurface_ReleaseDC(surface2, dc); - ok(SUCCEEDED(hr), "Failed to release DC for format %s, hr %#x.\n", test_data[i].name, hr); + ok(SUCCEEDED(hr), "Failed to release DC for format %s, hr %#lx.\n", test_data[i].name, hr);
hr = IDirectDrawSurface_GetDC(surface, &dc); - ok(SUCCEEDED(hr), "Failed to get DC for format %s, hr %#x.\n", test_data[i].name, hr); + ok(SUCCEEDED(hr), "Failed to get DC for format %s, hr %#lx.\n", test_data[i].name, hr); dc2 = (void *)0x1234; hr = IDirectDrawSurface_GetDC(surface, &dc2); - ok(hr == DDERR_DCALREADYCREATED, "Got unexpected hr %#x for format %s.\n", hr, test_data[i].name); + ok(hr == DDERR_DCALREADYCREATED, "Got unexpected hr %#lx for format %s.\n", hr, test_data[i].name); ok(dc2 == (void *)0x1234, "Got unexpected dc %p for format %s.\n", dc, test_data[i].name); hr = IDirectDrawSurface_ReleaseDC(surface, dc); - ok(SUCCEEDED(hr), "Failed to release DC for format %s, hr %#x.\n", test_data[i].name, hr); + ok(SUCCEEDED(hr), "Failed to release DC for format %s, hr %#lx.\n", test_data[i].name, hr); hr = IDirectDrawSurface_ReleaseDC(surface, dc); - ok(hr == DDERR_NODC, "Got unexpected hr %#x for format %s.\n", hr, test_data[i].name); + ok(hr == DDERR_NODC, "Got unexpected hr %#lx for format %s.\n", hr, test_data[i].name);
map_desc.dwSize = sizeof(map_desc); hr = IDirectDrawSurface_Lock(surface, NULL, &map_desc, DDLOCK_READONLY | DDLOCK_WAIT, NULL); - ok(SUCCEEDED(hr), "Failed to map surface for format %s, hr %#x.\n", test_data[i].name, hr); + ok(SUCCEEDED(hr), "Failed to map surface for format %s, hr %#lx.\n", test_data[i].name, hr); hr = IDirectDrawSurface_Lock(surface, NULL, &map_desc, DDLOCK_READONLY | DDLOCK_WAIT, NULL); - ok(hr == DDERR_SURFACEBUSY, "Got unexpected hr %#x for format %s.\n", hr, test_data[i].name); + ok(hr == DDERR_SURFACEBUSY, "Got unexpected hr %#lx for format %s.\n", hr, test_data[i].name); hr = IDirectDrawSurface_Unlock(surface, NULL); - ok(SUCCEEDED(hr), "Failed to unmap surface for format %s, hr %#x.\n", test_data[i].name, hr); + ok(SUCCEEDED(hr), "Failed to unmap surface for format %s, hr %#lx.\n", test_data[i].name, hr); hr = IDirectDrawSurface_Unlock(surface, NULL); - ok(hr == DDERR_NOTLOCKED, "Got unexpected hr %#x for format %s.\n", hr, test_data[i].name); + ok(hr == DDERR_NOTLOCKED, "Got unexpected hr %#lx for format %s.\n", hr, test_data[i].name);
hr = IDirectDrawSurface_GetDC(surface, &dc); - ok(SUCCEEDED(hr), "Failed to get DC for format %s, hr %#x.\n", test_data[i].name, hr); + ok(SUCCEEDED(hr), "Failed to get DC for format %s, hr %#lx.\n", test_data[i].name, hr); hr = IDirectDrawSurface_Lock(surface, NULL, &map_desc, DDLOCK_READONLY | DDLOCK_WAIT, NULL); - ok(hr == DDERR_SURFACEBUSY, "Got unexpected hr %#x for format %s.\n", hr, test_data[i].name); + ok(hr == DDERR_SURFACEBUSY, "Got unexpected hr %#lx for format %s.\n", hr, test_data[i].name); hr = IDirectDrawSurface_ReleaseDC(surface, dc); - ok(SUCCEEDED(hr), "Failed to release DC for format %s, hr %#x.\n", test_data[i].name, hr); + ok(SUCCEEDED(hr), "Failed to release DC for format %s, hr %#lx.\n", test_data[i].name, hr);
hr = IDirectDrawSurface_Lock(surface, NULL, &map_desc, DDLOCK_READONLY | DDLOCK_WAIT, NULL); - ok(SUCCEEDED(hr), "Failed to map surface for format %s, hr %#x.\n", test_data[i].name, hr); + ok(SUCCEEDED(hr), "Failed to map surface for format %s, hr %#lx.\n", test_data[i].name, hr); hr = IDirectDrawSurface_GetDC(surface, &dc); - ok(SUCCEEDED(hr), "Failed to get DC for format %s, hr %#x.\n", test_data[i].name, hr); + ok(SUCCEEDED(hr), "Failed to get DC for format %s, hr %#lx.\n", test_data[i].name, hr); hr = IDirectDrawSurface_ReleaseDC(surface, dc); - ok(SUCCEEDED(hr), "Failed to release DC for format %s, hr %#x.\n", test_data[i].name, hr); + ok(SUCCEEDED(hr), "Failed to release DC for format %s, hr %#lx.\n", test_data[i].name, hr); /* Geforce 9600, Windows 7 returns E_FAIL. The unlock still seems to work as intended, after- * wards the surface can be locked again. ReleaseDC() does not unlock the surface, trying to * Lock it after ReleaseDC returns DDERR_SURFACEBUSY. ddraw4 and 7 are unaffected. */ hr = IDirectDrawSurface_Unlock(surface, NULL); ok(SUCCEEDED(hr) || broken(ddraw_is_nvidia(ddraw) && hr == E_FAIL), - "Failed to unmap surface for format %s, hr %#x.\n", test_data[i].name, hr); + "Failed to unmap surface for format %s, hr %#lx.\n", test_data[i].name, hr);
hr = IDirectDrawSurface_GetDC(surface, &dc); - ok(SUCCEEDED(hr), "Failed to get DC for format %s, hr %#x.\n", test_data[i].name, hr); + ok(SUCCEEDED(hr), "Failed to get DC for format %s, hr %#lx.\n", test_data[i].name, hr); hr = IDirectDrawSurface_GetDC(surface2, &dc2); - ok(SUCCEEDED(hr), "Failed to get DC for format %s, hr %#x.\n", test_data[i].name, hr); + ok(SUCCEEDED(hr), "Failed to get DC for format %s, hr %#lx.\n", test_data[i].name, hr); hr = IDirectDrawSurface_ReleaseDC(surface2, dc2); - ok(SUCCEEDED(hr), "Failed to release DC for format %s, hr %#x.\n", test_data[i].name, hr); + ok(SUCCEEDED(hr), "Failed to release DC for format %s, hr %#lx.\n", test_data[i].name, hr); hr = IDirectDrawSurface_ReleaseDC(surface, dc); - ok(SUCCEEDED(hr), "Failed to release DC for format %s, hr %#x.\n", test_data[i].name, hr); + ok(SUCCEEDED(hr), "Failed to release DC for format %s, hr %#lx.\n", test_data[i].name, hr);
hr = IDirectDrawSurface_GetDC(surface2, &dc); - ok(SUCCEEDED(hr), "Failed to get DC for format %s, hr %#x.\n", test_data[i].name, hr); + ok(SUCCEEDED(hr), "Failed to get DC for format %s, hr %#lx.\n", test_data[i].name, hr); hr = IDirectDrawSurface_GetDC(surface, &dc2); - ok(SUCCEEDED(hr), "Failed to get DC for format %s, hr %#x.\n", test_data[i].name, hr); + ok(SUCCEEDED(hr), "Failed to get DC for format %s, hr %#lx.\n", test_data[i].name, hr); hr = IDirectDrawSurface_ReleaseDC(surface, dc2); - ok(SUCCEEDED(hr), "Failed to release DC for format %s, hr %#x.\n", test_data[i].name, hr); + ok(SUCCEEDED(hr), "Failed to release DC for format %s, hr %#lx.\n", test_data[i].name, hr); hr = IDirectDrawSurface_ReleaseDC(surface2, dc); - ok(SUCCEEDED(hr), "Failed to release DC for format %s, hr %#x.\n", test_data[i].name, hr); + ok(SUCCEEDED(hr), "Failed to release DC for format %s, hr %#lx.\n", test_data[i].name, hr);
hr = IDirectDrawSurface_Lock(surface, NULL, &map_desc, DDLOCK_READONLY | DDLOCK_WAIT, NULL); - ok(SUCCEEDED(hr), "Failed to map surface for format %s, hr %#x.\n", test_data[i].name, hr); + ok(SUCCEEDED(hr), "Failed to map surface for format %s, hr %#lx.\n", test_data[i].name, hr); hr = IDirectDrawSurface_Lock(surface2, NULL, &map_desc, DDLOCK_READONLY | DDLOCK_WAIT, NULL); - ok(SUCCEEDED(hr), "Failed to map surface for format %s, hr %#x.\n", test_data[i].name, hr); + ok(SUCCEEDED(hr), "Failed to map surface for format %s, hr %#lx.\n", test_data[i].name, hr); hr = IDirectDrawSurface_Unlock(surface2, NULL); - ok(SUCCEEDED(hr), "Failed to unmap surface for format %s, hr %#x.\n", test_data[i].name, hr); + ok(SUCCEEDED(hr), "Failed to unmap surface for format %s, hr %#lx.\n", test_data[i].name, hr); hr = IDirectDrawSurface_Unlock(surface, NULL); - ok(SUCCEEDED(hr), "Failed to unmap surface for format %s, hr %#x.\n", test_data[i].name, hr); + ok(SUCCEEDED(hr), "Failed to unmap surface for format %s, hr %#lx.\n", test_data[i].name, hr);
hr = IDirectDrawSurface_Lock(surface, NULL, &map_desc, DDLOCK_READONLY | DDLOCK_WAIT, NULL); - ok(SUCCEEDED(hr), "Failed to map surface for format %s, hr %#x.\n", test_data[i].name, hr); + ok(SUCCEEDED(hr), "Failed to map surface for format %s, hr %#lx.\n", test_data[i].name, hr); hr = IDirectDrawSurface_GetDC(surface, &dc); - ok(SUCCEEDED(hr), "Failed to get DC for format %s, hr %#x.\n", test_data[i].name, hr); + ok(SUCCEEDED(hr), "Failed to get DC for format %s, hr %#lx.\n", test_data[i].name, hr); hr = IDirectDrawSurface_ReleaseDC(surface, dc); - ok(SUCCEEDED(hr), "Failed to release DC for format %s, hr %#x.\n", test_data[i].name, hr); + ok(SUCCEEDED(hr), "Failed to release DC for format %s, hr %#lx.\n", test_data[i].name, hr); hr = IDirectDrawSurface_Unlock(surface, NULL); ok(SUCCEEDED(hr) || broken(ddraw_is_nvidia(ddraw) && hr == E_FAIL), - "Failed to unmap surface for format %s, hr %#x.\n", test_data[i].name, hr); + "Failed to unmap surface for format %s, hr %#lx.\n", test_data[i].name, hr);
hr = IDirectDrawSurface_Lock(surface2, NULL, &map_desc, DDLOCK_READONLY | DDLOCK_WAIT, NULL); - ok(SUCCEEDED(hr), "Failed to map surface for format %s, hr %#x.\n", test_data[i].name, hr); + ok(SUCCEEDED(hr), "Failed to map surface for format %s, hr %#lx.\n", test_data[i].name, hr); hr = IDirectDrawSurface_GetDC(surface, &dc); - ok(SUCCEEDED(hr), "Failed to get DC for format %s, hr %#x.\n", test_data[i].name, hr); + ok(SUCCEEDED(hr), "Failed to get DC for format %s, hr %#lx.\n", test_data[i].name, hr); hr = IDirectDrawSurface_ReleaseDC(surface, dc); - ok(SUCCEEDED(hr), "Failed to release DC for format %s, hr %#x.\n", test_data[i].name, hr); + ok(SUCCEEDED(hr), "Failed to release DC for format %s, hr %#lx.\n", test_data[i].name, hr); hr = IDirectDrawSurface_Unlock(surface2, NULL); - ok(SUCCEEDED(hr), "Failed to unmap surface for format %s, hr %#x.\n", test_data[i].name, hr); + ok(SUCCEEDED(hr), "Failed to unmap surface for format %s, hr %#lx.\n", test_data[i].name, hr);
hr = IDirectDrawSurface_GetDC(surface, &dc); - ok(SUCCEEDED(hr), "Failed to get DC for format %s, hr %#x.\n", test_data[i].name, hr); + ok(SUCCEEDED(hr), "Failed to get DC for format %s, hr %#lx.\n", test_data[i].name, hr); hr = IDirectDrawSurface_Lock(surface2, NULL, &map_desc, DDLOCK_READONLY | DDLOCK_WAIT, NULL); - ok(SUCCEEDED(hr), "Failed to map surface for format %s, hr %#x.\n", test_data[i].name, hr); + ok(SUCCEEDED(hr), "Failed to map surface for format %s, hr %#lx.\n", test_data[i].name, hr); hr = IDirectDrawSurface_Unlock(surface2, NULL); - ok(SUCCEEDED(hr), "Failed to unmap surface for format %s, hr %#x.\n", test_data[i].name, hr); + ok(SUCCEEDED(hr), "Failed to unmap surface for format %s, hr %#lx.\n", test_data[i].name, hr); hr = IDirectDrawSurface_ReleaseDC(surface, dc); - ok(SUCCEEDED(hr), "Failed to release DC for format %s, hr %#x.\n", test_data[i].name, hr); + ok(SUCCEEDED(hr), "Failed to release DC for format %s, hr %#lx.\n", test_data[i].name, hr);
hr = IDirectDrawSurface_GetDC(surface2, &dc); - ok(SUCCEEDED(hr), "Failed to get DC for format %s, hr %#x.\n", test_data[i].name, hr); + ok(SUCCEEDED(hr), "Failed to get DC for format %s, hr %#lx.\n", test_data[i].name, hr); hr = IDirectDrawSurface_Lock(surface, NULL, &map_desc, DDLOCK_READONLY | DDLOCK_WAIT, NULL); - ok(SUCCEEDED(hr), "Failed to map surface for format %s, hr %#x.\n", test_data[i].name, hr); + ok(SUCCEEDED(hr), "Failed to map surface for format %s, hr %#lx.\n", test_data[i].name, hr); hr = IDirectDrawSurface_Unlock(surface, NULL); - ok(SUCCEEDED(hr), "Failed to unmap surface for format %s, hr %#x.\n", test_data[i].name, hr); + ok(SUCCEEDED(hr), "Failed to unmap surface for format %s, hr %#lx.\n", test_data[i].name, hr); hr = IDirectDrawSurface_ReleaseDC(surface2, dc); - ok(SUCCEEDED(hr), "Failed to release DC for format %s, hr %#x.\n", test_data[i].name, hr); + ok(SUCCEEDED(hr), "Failed to release DC for format %s, hr %#lx.\n", test_data[i].name, hr);
hr = IDirectDrawSurface_Unlock(surface, NULL); - ok(hr == DDERR_NOTLOCKED, "Got unexpected hr %#x for format %s.\n", hr, test_data[i].name); + ok(hr == DDERR_NOTLOCKED, "Got unexpected hr %#lx for format %s.\n", hr, test_data[i].name); hr = IDirectDrawSurface_GetDC(surface2, &dc); - ok(SUCCEEDED(hr), "Failed to get DC for format %s, hr %#x.\n", test_data[i].name, hr); + ok(SUCCEEDED(hr), "Failed to get DC for format %s, hr %#lx.\n", test_data[i].name, hr); hr = IDirectDrawSurface_Unlock(surface, NULL); - ok(hr == DDERR_NOTLOCKED, "Got unexpected hr %#x for format %s.\n", hr, test_data[i].name); + ok(hr == DDERR_NOTLOCKED, "Got unexpected hr %#lx for format %s.\n", hr, test_data[i].name); hr = IDirectDrawSurface_ReleaseDC(surface2, dc); - ok(SUCCEEDED(hr), "Failed to release DC for format %s, hr %#x.\n", test_data[i].name, hr); + ok(SUCCEEDED(hr), "Failed to release DC for format %s, hr %#lx.\n", test_data[i].name, hr); hr = IDirectDrawSurface_Unlock(surface, NULL); - ok(hr == DDERR_NOTLOCKED, "Got unexpected hr %#x for format %s.\n", hr, test_data[i].name); + ok(hr == DDERR_NOTLOCKED, "Got unexpected hr %#lx for format %s.\n", hr, test_data[i].name);
hr = IDirectDrawSurface_Unlock(surface2, NULL); - ok(hr == DDERR_NOTLOCKED, "Got unexpected hr %#x for format %s.\n", hr, test_data[i].name); + ok(hr == DDERR_NOTLOCKED, "Got unexpected hr %#lx for format %s.\n", hr, test_data[i].name); hr = IDirectDrawSurface_GetDC(surface, &dc); - ok(SUCCEEDED(hr), "Failed to get DC for format %s, hr %#x.\n", test_data[i].name, hr); + ok(SUCCEEDED(hr), "Failed to get DC for format %s, hr %#lx.\n", test_data[i].name, hr); hr = IDirectDrawSurface_Unlock(surface2, NULL); - ok(hr == DDERR_NOTLOCKED, "Got unexpected hr %#x for format %s.\n", hr, test_data[i].name); + ok(hr == DDERR_NOTLOCKED, "Got unexpected hr %#lx for format %s.\n", hr, test_data[i].name); hr = IDirectDrawSurface_ReleaseDC(surface, dc); - ok(SUCCEEDED(hr), "Failed to release DC for format %s, hr %#x.\n", test_data[i].name, hr); + ok(SUCCEEDED(hr), "Failed to release DC for format %s, hr %#lx.\n", test_data[i].name, hr); hr = IDirectDrawSurface_Unlock(surface2, NULL); - ok(hr == DDERR_NOTLOCKED, "Got unexpected hr %#x for format %s.\n", hr, test_data[i].name); + ok(hr == DDERR_NOTLOCKED, "Got unexpected hr %#lx for format %s.\n", hr, test_data[i].name);
IDirectDrawSurface_Release(surface2); IDirectDrawSurface_Release(surface); @@ -11835,31 +11835,31 @@ static void test_draw_primitive(void)
viewport = create_viewport(device, 0, 0, 640, 480); hr = IDirect3DDevice2_SetCurrentViewport(device, viewport); - ok(SUCCEEDED(hr), "Failed to activate the viewport, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to activate the viewport, hr %#lx.\n", hr);
hr = IDirect3DDevice2_GetDirect3D(device, &d3d); - ok(SUCCEEDED(hr), "Failed to get D3D interface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get D3D interface, hr %#lx.\n", hr);
IDirect3D2_Release(d3d);
hr = IDirect3DDevice2_DrawIndexedPrimitive(device, D3DPT_TRIANGLESTRIP, D3DFVF_XYZ, NULL, 0, NULL, 0, 0); - ok(SUCCEEDED(hr), "Failed to draw, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to draw, hr %#lx.\n", hr); hr = IDirect3DDevice2_DrawPrimitive(device, D3DPT_TRIANGLESTRIP, D3DFVF_XYZ, NULL, 0, 0); - ok(SUCCEEDED(hr), "Failed to draw, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to draw, hr %#lx.\n", hr);
hr = IDirect3DDevice2_DrawIndexedPrimitive(device, D3DPT_TRIANGLESTRIP, D3DFVF_XYZ, NULL, 0, indices, 4, 0); - ok(SUCCEEDED(hr), "Failed to draw, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to draw, hr %#lx.\n", hr);
hr = IDirect3DDevice2_DrawIndexedPrimitive(device, D3DPT_TRIANGLESTRIP, D3DFVF_XYZ, quad, 4, NULL, 0, 0); - ok(SUCCEEDED(hr), "Failed to draw, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to draw, hr %#lx.\n", hr); hr = IDirect3DDevice2_DrawPrimitive(device, D3DPT_TRIANGLESTRIP, D3DFVF_XYZ, quad, 4, 0); - ok(SUCCEEDED(hr), "Failed to draw, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to draw, hr %#lx.\n", hr); hr = IDirect3DDevice2_DrawIndexedPrimitive(device, D3DPT_TRIANGLESTRIP, D3DFVF_XYZ, quad, 4, indices, 4, 0); - ok(SUCCEEDED(hr), "Failed to draw, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to draw, hr %#lx.\n", hr);
destroy_viewport(device, viewport); refcount = IDirect3DDevice2_Release(device); - ok(!refcount, "Device has %u references left.\n", refcount); + ok(!refcount, "Device has %lu references left.\n", refcount); IDirectDraw2_Release(ddraw); DestroyWindow(window); } @@ -11917,14 +11917,14 @@ static void test_edge_antialiasing_blending(void) memset(&hel_desc, 0, sizeof(hel_desc)); hel_desc.dwSize = sizeof(hel_desc); hr = IDirect3DDevice2_GetCaps(device, &hal_desc, &hel_desc); - ok(SUCCEEDED(hr), "Failed to get device caps, hr %#x.\n", hr); - trace("HAL line edge antialiasing support: %#x.\n", + ok(SUCCEEDED(hr), "Failed to get device caps, hr %#lx.\n", hr); + trace("HAL line edge antialiasing support: %#lx.\n", hal_desc.dpcLineCaps.dwRasterCaps & D3DPRASTERCAPS_ANTIALIASEDGES); - trace("HAL triangle edge antialiasing support: %#x.\n", + trace("HAL triangle edge antialiasing support: %#lx.\n", hal_desc.dpcTriCaps.dwRasterCaps & D3DPRASTERCAPS_ANTIALIASEDGES); - trace("HEL line edge antialiasing support: %#x.\n", + trace("HEL line edge antialiasing support: %#lx.\n", hel_desc.dpcLineCaps.dwRasterCaps & D3DPRASTERCAPS_ANTIALIASEDGES); - trace("HEL triangle edge antialiasing support: %#x.\n", + trace("HEL triangle edge antialiasing support: %#lx.\n", hel_desc.dpcTriCaps.dwRasterCaps & D3DPRASTERCAPS_ANTIALIASEDGES);
memset(&surface_desc, 0, sizeof(surface_desc)); @@ -11941,127 +11941,127 @@ static void test_edge_antialiasing_blending(void) U4(surface_desc.ddpfPixelFormat).dwBBitMask = 0x000000ff; U5(surface_desc.ddpfPixelFormat).dwRGBAlphaBitMask = 0xff000000; hr = IDirectDraw2_CreateSurface(ddraw, &surface_desc, &offscreen, NULL); - ok(hr == D3D_OK, "Creating the offscreen render target failed, hr %#x.\n", hr); + ok(hr == D3D_OK, "Creating the offscreen render target failed, hr %#lx.\n", hr);
ds = get_depth_stencil(device); hr = IDirectDrawSurface_AddAttachedSurface(offscreen, ds); - todo_wine ok(SUCCEEDED(hr), "Failed to attach depth buffer, hr %#x.\n", hr); + todo_wine ok(SUCCEEDED(hr), "Failed to attach depth buffer, hr %#lx.\n", hr); IDirectDrawSurface_Release(ds);
hr = IDirect3DDevice2_SetRenderTarget(device, offscreen, 0); - ok(SUCCEEDED(hr), "Failed to set render target, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set render target, hr %#lx.\n", hr);
red_background = create_diffuse_material(device, 1.0f, 0.0f, 0.0f, 0.8f); green_background = create_diffuse_material(device, 0.0f, 1.0f, 0.0f, 0.5f);
viewport = create_viewport(device, 0, 0, 640, 480); hr = IDirect3DDevice2_SetCurrentViewport(device, viewport); - ok(SUCCEEDED(hr), "Failed to activate the viewport, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to activate the viewport, hr %#lx.\n", hr);
hr = IDirect3DDevice2_SetTransform(device, D3DTRANSFORMSTATE_WORLD, &mat); - ok(SUCCEEDED(hr), "Failed to set world transform, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set world transform, hr %#lx.\n", hr); hr = IDirect3DDevice2_SetTransform(device, D3DTRANSFORMSTATE_VIEW, &mat); - ok(SUCCEEDED(hr), "Failed to set view transform, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set view transform, hr %#lx.\n", hr); hr = IDirect3DDevice2_SetTransform(device, D3DTRANSFORMSTATE_PROJECTION, &mat); - ok(SUCCEEDED(hr), "Failed to set projection transform, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set projection transform, hr %#lx.\n", hr); hr = IDirect3DDevice2_SetRenderState(device, D3DRENDERSTATE_ZENABLE, FALSE); - ok(SUCCEEDED(hr), "Failed to disable Z test, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to disable Z test, hr %#lx.\n", hr); hr = IDirect3DDevice2_SetRenderState(device, D3DRENDERSTATE_FOGENABLE, FALSE); - ok(SUCCEEDED(hr), "Failed to disable fog, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to disable fog, hr %#lx.\n", hr); hr = IDirect3DDevice2_SetRenderState(device, D3DRENDERSTATE_CULLMODE, D3DCULL_NONE); - ok(SUCCEEDED(hr), "Failed to disable culling, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to disable culling, hr %#lx.\n", hr);
hr = IDirect3DDevice2_SetRenderState(device, D3DRENDERSTATE_ALPHABLENDENABLE, TRUE); - ok(SUCCEEDED(hr), "Failed to enable blending, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to enable blending, hr %#lx.\n", hr); hr = IDirect3DDevice2_SetRenderState(device, D3DRENDERSTATE_SRCBLEND, D3DBLEND_SRCALPHA); - ok(SUCCEEDED(hr), "Failed to set src blend, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set src blend, hr %#lx.\n", hr); hr = IDirect3DDevice2_SetRenderState(device, D3DRENDERSTATE_DESTBLEND, D3DBLEND_DESTALPHA); - ok(SUCCEEDED(hr), "Failed to set dest blend, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set dest blend, hr %#lx.\n", hr);
viewport_set_background(device, viewport, red_background); hr = IDirect3DViewport2_Clear(viewport, 1, &clear_rect, D3DCLEAR_TARGET); - ok(SUCCEEDED(hr), "Failed to clear render target, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to clear render target, hr %#lx.\n", hr); hr = IDirect3DDevice2_BeginScene(device); - ok(SUCCEEDED(hr), "Failed to begin scene, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to begin scene, hr %#lx.\n", hr); hr = IDirect3DDevice2_DrawPrimitive(device, D3DPT_TRIANGLESTRIP, D3DVT_LVERTEX, green_quad, 4, 0); - ok(SUCCEEDED(hr), "Failed to draw, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to draw, hr %#lx.\n", hr); hr = IDirect3DDevice2_EndScene(device); - ok(SUCCEEDED(hr), "Failed to end scene, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to end scene, hr %#lx.\n", hr); color = get_surface_color(offscreen, 320, 240); - ok(compare_color(color, 0x00cc7f00, 1), "Got unexpected color 0x%08x.\n", color); + ok(compare_color(color, 0x00cc7f00, 1), "Got unexpected color 0x%08lx.\n", color);
viewport_set_background(device, viewport, green_background); hr = IDirect3DViewport2_Clear(viewport, 1, &clear_rect, D3DCLEAR_TARGET); - ok(SUCCEEDED(hr), "Failed to clear render target, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to clear render target, hr %#lx.\n", hr); hr = IDirect3DDevice2_BeginScene(device); - ok(SUCCEEDED(hr), "Failed to begin scene, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to begin scene, hr %#lx.\n", hr); hr = IDirect3DDevice2_DrawPrimitive(device, D3DPT_TRIANGLESTRIP, D3DVT_LVERTEX, red_quad, 4, 0); - ok(SUCCEEDED(hr), "Failed to draw, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to draw, hr %#lx.\n", hr); hr = IDirect3DDevice2_EndScene(device); - ok(SUCCEEDED(hr), "Failed to end scene, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to end scene, hr %#lx.\n", hr); color = get_surface_color(offscreen, 320, 240); - ok(compare_color(color, 0x00cc7f00, 1), "Got unexpected color 0x%08x.\n", color); + ok(compare_color(color, 0x00cc7f00, 1), "Got unexpected color 0x%08lx.\n", color);
hr = IDirect3DDevice2_SetRenderState(device, D3DRENDERSTATE_ALPHABLENDENABLE, FALSE); - ok(SUCCEEDED(hr), "Failed to disable blending, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to disable blending, hr %#lx.\n", hr);
viewport_set_background(device, viewport, red_background); hr = IDirect3DViewport2_Clear(viewport, 1, &clear_rect, D3DCLEAR_TARGET); - ok(SUCCEEDED(hr), "Failed to clear render target, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to clear render target, hr %#lx.\n", hr); hr = IDirect3DDevice2_BeginScene(device); - ok(SUCCEEDED(hr), "Failed to begin scene, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to begin scene, hr %#lx.\n", hr); hr = IDirect3DDevice2_DrawPrimitive(device, D3DPT_TRIANGLESTRIP, D3DVT_LVERTEX, green_quad, 4, 0); - ok(SUCCEEDED(hr), "Failed to draw, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to draw, hr %#lx.\n", hr); hr = IDirect3DDevice2_EndScene(device); - ok(SUCCEEDED(hr), "Failed to end scene, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to end scene, hr %#lx.\n", hr); color = get_surface_color(offscreen, 320, 240); - ok(compare_color(color, 0x0000ff00, 1), "Got unexpected color 0x%08x.\n", color); + ok(compare_color(color, 0x0000ff00, 1), "Got unexpected color 0x%08lx.\n", color);
viewport_set_background(device, viewport, green_background); hr = IDirect3DViewport2_Clear(viewport, 1, &clear_rect, D3DCLEAR_TARGET); - ok(SUCCEEDED(hr), "Failed to clear render target, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to clear render target, hr %#lx.\n", hr); hr = IDirect3DDevice2_BeginScene(device); - ok(SUCCEEDED(hr), "Failed to begin scene, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to begin scene, hr %#lx.\n", hr); hr = IDirect3DDevice2_DrawPrimitive(device, D3DPT_TRIANGLESTRIP, D3DVT_LVERTEX, red_quad, 4, 0); - ok(SUCCEEDED(hr), "Failed to draw, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to draw, hr %#lx.\n", hr); hr = IDirect3DDevice2_EndScene(device); - ok(SUCCEEDED(hr), "Failed to end scene, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to end scene, hr %#lx.\n", hr); color = get_surface_color(offscreen, 320, 240); - ok(compare_color(color, 0x00ff0000, 1), "Got unexpected color 0x%08x.\n", color); + ok(compare_color(color, 0x00ff0000, 1), "Got unexpected color 0x%08lx.\n", color);
hr = IDirect3DDevice2_SetRenderState(device, D3DRENDERSTATE_EDGEANTIALIAS, TRUE); - ok(SUCCEEDED(hr), "Failed to enable edge antialiasing, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to enable edge antialiasing, hr %#lx.\n", hr);
viewport_set_background(device, viewport, red_background); hr = IDirect3DViewport2_Clear(viewport, 1, &clear_rect, D3DCLEAR_TARGET); - ok(SUCCEEDED(hr), "Failed to clear render target, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to clear render target, hr %#lx.\n", hr); hr = IDirect3DDevice2_BeginScene(device); - ok(SUCCEEDED(hr), "Failed to begin scene, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to begin scene, hr %#lx.\n", hr); hr = IDirect3DDevice2_DrawPrimitive(device, D3DPT_TRIANGLESTRIP, D3DVT_LVERTEX, green_quad, 4, 0); - ok(SUCCEEDED(hr), "Failed to draw, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to draw, hr %#lx.\n", hr); hr = IDirect3DDevice2_EndScene(device); - ok(SUCCEEDED(hr), "Failed to end scene, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to end scene, hr %#lx.\n", hr); color = get_surface_color(offscreen, 320, 240); - ok(compare_color(color, 0x0000ff00, 1), "Got unexpected color 0x%08x.\n", color); + ok(compare_color(color, 0x0000ff00, 1), "Got unexpected color 0x%08lx.\n", color);
viewport_set_background(device, viewport, green_background); hr = IDirect3DViewport2_Clear(viewport, 1, &clear_rect, D3DCLEAR_TARGET); - ok(SUCCEEDED(hr), "Failed to clear render target, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to clear render target, hr %#lx.\n", hr); hr = IDirect3DDevice2_BeginScene(device); - ok(SUCCEEDED(hr), "Failed to begin scene, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to begin scene, hr %#lx.\n", hr); hr = IDirect3DDevice2_DrawPrimitive(device, D3DPT_TRIANGLESTRIP, D3DVT_LVERTEX, red_quad, 4, 0); - ok(SUCCEEDED(hr), "Failed to draw, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to draw, hr %#lx.\n", hr); hr = IDirect3DDevice2_EndScene(device); - ok(SUCCEEDED(hr), "Failed to end scene, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to end scene, hr %#lx.\n", hr); color = get_surface_color(offscreen, 320, 240); - ok(compare_color(color, 0x00ff0000, 1), "Got unexpected color 0x%08x.\n", color); + ok(compare_color(color, 0x00ff0000, 1), "Got unexpected color 0x%08lx.\n", color);
IDirectDrawSurface_Release(offscreen); destroy_viewport(device, viewport); destroy_material(red_background); destroy_material(green_background); refcount = IDirect3DDevice2_Release(device); - ok(!refcount, "Device has %u references left.\n", refcount); + ok(!refcount, "Device has %lu references left.\n", refcount); IDirectDraw2_Release(ddraw); DestroyWindow(window); } @@ -12191,11 +12191,11 @@ static void test_transform_vertices(void) return; } hr = IDirect3DDevice2_GetRenderTarget(device, &rt); - ok(SUCCEEDED(hr), "Failed to get render target, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get render target, hr %#lx.\n", hr);
viewport = create_viewport(device, 0, 0, 256, 256); hr = IDirect3DViewport2_SetViewport(viewport, &vp_data); - ok(SUCCEEDED(hr), "Failed to set viewport, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set viewport, hr %#lx.\n", hr);
memset(&transformdata, 0, sizeof(transformdata)); transformdata.dwSize = sizeof(transformdata); @@ -12207,8 +12207,8 @@ static void test_transform_vertices(void)
hr = IDirect3DViewport2_TransformVertices(viewport, ARRAY_SIZE(position_tests), &transformdata, D3DTRANSFORM_UNCLIPPED, &offscreen); - ok(SUCCEEDED(hr), "Failed to transform vertices, hr %#x.\n", hr); - ok(!offscreen, "Offscreen is %x.\n", offscreen); + ok(SUCCEEDED(hr), "Failed to transform vertices, hr %#lx.\n", hr); + ok(!offscreen, "Offscreen is %lx.\n", offscreen);
for (i = 0; i < ARRAY_SIZE(position_tests); ++i) { @@ -12223,19 +12223,19 @@ static void test_transform_vertices(void) out[i].x, out[i].y, out[i].z, out[i].w); ok(out[i].v1 == position_tests[i].v1 && out[i].v2 == position_tests[i].v2 && out[i].v3 == position_tests[i].v3 && out[i].v4 == position_tests[i].v4, - "Vertex %u payload is %u %u %u %u.\n", i, out[i].v1, out[i].v2, out[i].v3, out[i].v4); + "Vertex %u payload is %lu %lu %lu %lu.\n", i, out[i].v1, out[i].v2, out[i].v3, out[i].v4); ok(out[i].unused3 == 0xdeadbeef && out[i].unused4 == 0xcafecafe, - "Vertex %u unused data is %#x, %#x.\n", i, out[i].unused3, out[i].unused4); + "Vertex %u unused data is %#lx, %#lx.\n", i, out[i].unused3, out[i].unused4); }
vp_data = vp_template; hr = IDirect3DViewport2_SetViewport(viewport, &vp_data); - ok(SUCCEEDED(hr), "Failed to set viewport, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set viewport, hr %#lx.\n", hr); offscreen = 0xdeadbeef; hr = IDirect3DViewport2_TransformVertices(viewport, ARRAY_SIZE(position_tests), &transformdata, D3DTRANSFORM_UNCLIPPED, &offscreen); - ok(SUCCEEDED(hr), "Failed to transform vertices, hr %#x.\n", hr); - ok(!offscreen, "Offscreen is %x.\n", offscreen); + ok(SUCCEEDED(hr), "Failed to transform vertices, hr %#lx.\n", hr); + ok(!offscreen, "Offscreen is %lx.\n", offscreen);
for (i = 0; i < ARRAY_SIZE(position_tests); ++i) { @@ -12252,12 +12252,12 @@ static void test_transform_vertices(void) vp_data.dwX = 10; vp_data.dwY = 20; hr = IDirect3DViewport2_SetViewport(viewport, &vp_data); - ok(SUCCEEDED(hr), "Failed to set viewport, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set viewport, hr %#lx.\n", hr); offscreen = 0xdeadbeef; hr = IDirect3DViewport2_TransformVertices(viewport, ARRAY_SIZE(position_tests), &transformdata, D3DTRANSFORM_UNCLIPPED, &offscreen); - ok(SUCCEEDED(hr), "Failed to transform vertices, hr %#x.\n", hr); - ok(!offscreen, "Offscreen is %x.\n", offscreen); + ok(SUCCEEDED(hr), "Failed to transform vertices, hr %#lx.\n", hr); + ok(!offscreen, "Offscreen is %lx.\n", offscreen); for (i = 0; i < ARRAY_SIZE(position_tests); ++i) { static const struct vec4 cmp[] = @@ -12274,8 +12274,8 @@ static void test_transform_vertices(void) offscreen = 0xdeadbeef; hr = IDirect3DViewport2_TransformVertices(viewport, ARRAY_SIZE(position_tests), &transformdata, D3DTRANSFORM_CLIPPED, &offscreen); - ok(SUCCEEDED(hr), "Failed to transform vertices, hr %#x.\n", hr); - ok(!offscreen, "Offscreen is %x.\n", offscreen); + ok(SUCCEEDED(hr), "Failed to transform vertices, hr %#lx.\n", hr); + ok(!offscreen, "Offscreen is %lx.\n", offscreen); for (i = 0; i < ARRAY_SIZE(position_tests); ++i) { static const D3DHVERTEX cmp_h[] = @@ -12288,7 +12288,7 @@ static void test_transform_vertices(void) && compare_float(U2(cmp_h[i]).hy, U2(out_h[i]).hy, 4096) && compare_float(U3(cmp_h[i]).hz, U3(out_h[i]).hz, 4096) && cmp_h[i].dwFlags == out_h[i].dwFlags, - "HVertex %u differs. Got %#x %f %f %f.\n", i, + "HVertex %u differs. Got %#lx %f %f %f.\n", i, out_h[i].dwFlags, U1(out_h[i]).hx, U2(out_h[i]).hy, U3(out_h[i]).hz);
/* No scheme has been found behind those return values. It seems to be @@ -12313,8 +12313,8 @@ static void test_transform_vertices(void) offscreen = 0xdeadbeef; hr = IDirect3DViewport2_TransformVertices(viewport, ARRAY_SIZE(cliptest), &transformdata, D3DTRANSFORM_CLIPPED, &offscreen); - ok(SUCCEEDED(hr), "Failed to transform vertices, hr %#x.\n", hr); - ok(!offscreen, "Offscreen is %x.\n", offscreen); + ok(SUCCEEDED(hr), "Failed to transform vertices, hr %#lx.\n", hr); + ok(!offscreen, "Offscreen is %lx.\n", offscreen); for (i = 0; i < ARRAY_SIZE(cliptest); ++i) { static const DWORD flags[] = @@ -12324,19 +12324,19 @@ static void test_transform_vertices(void) 0, D3DCLIP_LEFT | D3DCLIP_BOTTOM | D3DCLIP_FRONT, }; - ok(flags[i] == out_h[i].dwFlags, "Cliptest %u returned %#x.\n", i, out_h[i].dwFlags); + ok(flags[i] == out_h[i].dwFlags, "Cliptest %u returned %#lx.\n", i, out_h[i].dwFlags); }
vp_data = vp_template; vp_data.dwWidth = 10; vp_data.dwHeight = 480; hr = IDirect3DViewport2_SetViewport(viewport, &vp_data); - ok(SUCCEEDED(hr), "Failed to set viewport, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set viewport, hr %#lx.\n", hr); offscreen = 0xdeadbeef; hr = IDirect3DViewport2_TransformVertices(viewport, ARRAY_SIZE(cliptest), &transformdata, D3DTRANSFORM_CLIPPED, &offscreen); - ok(SUCCEEDED(hr), "Failed to transform vertices, hr %#x.\n", hr); - ok(!offscreen, "Offscreen is %x.\n", offscreen); + ok(SUCCEEDED(hr), "Failed to transform vertices, hr %#lx.\n", hr); + ok(!offscreen, "Offscreen is %lx.\n", offscreen); for (i = 0; i < ARRAY_SIZE(cliptest); ++i) { static const DWORD flags[] = @@ -12346,7 +12346,7 @@ static void test_transform_vertices(void) D3DCLIP_LEFT, D3DCLIP_LEFT | D3DCLIP_FRONT, }; - ok(flags[i] == out_h[i].dwFlags, "Cliptest %u returned %#x.\n", i, out_h[i].dwFlags); + ok(flags[i] == out_h[i].dwFlags, "Cliptest %u returned %#lx.\n", i, out_h[i].dwFlags); }
vp_data = vp_template; @@ -12355,11 +12355,11 @@ static void test_transform_vertices(void) vp_data.dvScaleX = 1; vp_data.dvScaleY = 1; hr = IDirect3DViewport2_SetViewport(viewport, &vp_data); - ok(SUCCEEDED(hr), "Failed to set viewport, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set viewport, hr %#lx.\n", hr); hr = IDirect3DViewport2_TransformVertices(viewport, ARRAY_SIZE(cliptest), &transformdata, D3DTRANSFORM_CLIPPED, &offscreen); - ok(SUCCEEDED(hr), "Failed to transform vertices, hr %#x.\n", hr); - ok(!offscreen, "Offscreen is %x.\n", offscreen); + ok(SUCCEEDED(hr), "Failed to transform vertices, hr %#lx.\n", hr); + ok(!offscreen, "Offscreen is %lx.\n", offscreen); for (i = 0; i < ARRAY_SIZE(cliptest); ++i) { static const DWORD flags[] = @@ -12369,7 +12369,7 @@ static void test_transform_vertices(void) 0, D3DCLIP_FRONT, }; - ok(flags[i] == out_h[i].dwFlags, "Cliptest %u returned %#x.\n", i, out_h[i].dwFlags); + ok(flags[i] == out_h[i].dwFlags, "Cliptest %u returned %#lx.\n", i, out_h[i].dwFlags); }
/* Finally try to figure out how the DWORD dwOffscreen works. @@ -12380,51 +12380,51 @@ static void test_transform_vertices(void) vp_data.dvScaleX = 10000.0f; vp_data.dvScaleY = 10000.0f; hr = IDirect3DViewport2_SetViewport(viewport, &vp_data); - ok(SUCCEEDED(hr), "Failed to set viewport, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set viewport, hr %#lx.\n", hr); transformdata.lpIn = cliptest; offscreen = 0xdeadbeef; hr = IDirect3DViewport2_TransformVertices(viewport, 1, &transformdata, D3DTRANSFORM_UNCLIPPED, &offscreen); - ok(SUCCEEDED(hr), "Failed to transform vertices, hr %#x.\n", hr); - ok(!offscreen, "Offscreen is %x.\n", offscreen); + ok(SUCCEEDED(hr), "Failed to transform vertices, hr %#lx.\n", hr); + ok(!offscreen, "Offscreen is %lx.\n", offscreen);
offscreen = 0xdeadbeef; hr = IDirect3DViewport2_TransformVertices(viewport, 1, &transformdata, D3DTRANSFORM_CLIPPED, &offscreen); - ok(SUCCEEDED(hr), "Failed to transform vertices, hr %#x.\n", hr); - ok(offscreen == (D3DCLIP_RIGHT | D3DCLIP_TOP), "Offscreen is %x.\n", offscreen); + ok(SUCCEEDED(hr), "Failed to transform vertices, hr %#lx.\n", hr); + ok(offscreen == (D3DCLIP_RIGHT | D3DCLIP_TOP), "Offscreen is %lx.\n", offscreen); offscreen = 0xdeadbeef; hr = IDirect3DViewport2_TransformVertices(viewport, 2, &transformdata, D3DTRANSFORM_CLIPPED, &offscreen); - ok(SUCCEEDED(hr), "Failed to transform vertices, hr %#x.\n", hr); - ok(offscreen == (D3DCLIP_RIGHT | D3DCLIP_TOP), "Offscreen is %x.\n", offscreen); + ok(SUCCEEDED(hr), "Failed to transform vertices, hr %#lx.\n", hr); + ok(offscreen == (D3DCLIP_RIGHT | D3DCLIP_TOP), "Offscreen is %lx.\n", offscreen); hr = IDirect3DViewport2_TransformVertices(viewport, 3, &transformdata, D3DTRANSFORM_CLIPPED, &offscreen); - ok(SUCCEEDED(hr), "Failed to transform vertices, hr %#x.\n", hr); - ok(!offscreen, "Offscreen is %x.\n", offscreen); + ok(SUCCEEDED(hr), "Failed to transform vertices, hr %#lx.\n", hr); + ok(!offscreen, "Offscreen is %lx.\n", offscreen);
transformdata.lpIn = cliptest + 1; hr = IDirect3DViewport2_TransformVertices(viewport, 1, &transformdata, D3DTRANSFORM_CLIPPED, &offscreen); - ok(SUCCEEDED(hr), "Failed to transform vertices, hr %#x.\n", hr); - ok(offscreen == (D3DCLIP_BACK | D3DCLIP_RIGHT | D3DCLIP_TOP), "Offscreen is %x.\n", offscreen); + ok(SUCCEEDED(hr), "Failed to transform vertices, hr %#lx.\n", hr); + ok(offscreen == (D3DCLIP_BACK | D3DCLIP_RIGHT | D3DCLIP_TOP), "Offscreen is %lx.\n", offscreen);
transformdata.lpIn = cliptest + 2; hr = IDirect3DViewport2_TransformVertices(viewport, 1, &transformdata, D3DTRANSFORM_CLIPPED, &offscreen); - ok(SUCCEEDED(hr), "Failed to transform vertices, hr %#x.\n", hr); - ok(offscreen == (D3DCLIP_BOTTOM | D3DCLIP_LEFT), "Offscreen is %x.\n", offscreen); + ok(SUCCEEDED(hr), "Failed to transform vertices, hr %#lx.\n", hr); + ok(offscreen == (D3DCLIP_BOTTOM | D3DCLIP_LEFT), "Offscreen is %lx.\n", offscreen); offscreen = 0xdeadbeef; hr = IDirect3DViewport2_TransformVertices(viewport, 2, &transformdata, D3DTRANSFORM_CLIPPED, &offscreen); - ok(SUCCEEDED(hr), "Failed to transform vertices, hr %#x.\n", hr); - ok(offscreen == (D3DCLIP_BOTTOM | D3DCLIP_LEFT), "Offscreen is %x.\n", offscreen); + ok(SUCCEEDED(hr), "Failed to transform vertices, hr %#lx.\n", hr); + ok(offscreen == (D3DCLIP_BOTTOM | D3DCLIP_LEFT), "Offscreen is %lx.\n", offscreen);
transformdata.lpIn = cliptest + 3; hr = IDirect3DViewport2_TransformVertices(viewport, 1, &transformdata, D3DTRANSFORM_CLIPPED, &offscreen); - ok(SUCCEEDED(hr), "Failed to transform vertices, hr %#x.\n", hr); - ok(offscreen == (D3DCLIP_FRONT | D3DCLIP_BOTTOM | D3DCLIP_LEFT), "Offscreen is %x.\n", offscreen); + ok(SUCCEEDED(hr), "Failed to transform vertices, hr %#lx.\n", hr); + ok(offscreen == (D3DCLIP_FRONT | D3DCLIP_BOTTOM | D3DCLIP_LEFT), "Offscreen is %lx.\n", offscreen);
transformdata.lpIn = offscreentest; transformdata.dwInSize = sizeof(offscreentest[0]); @@ -12434,21 +12434,21 @@ static void test_transform_vertices(void) vp_data.dvScaleX = 1.0f; vp_data.dvScaleY = 1.0f; hr = IDirect3DViewport2_SetViewport(viewport, &vp_data); - ok(SUCCEEDED(hr), "Failed to set viewport, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set viewport, hr %#lx.\n", hr); offscreen = 0xdeadbeef; hr = IDirect3DViewport2_TransformVertices(viewport, 1, &transformdata, D3DTRANSFORM_CLIPPED, &offscreen); - ok(SUCCEEDED(hr), "Failed to transform vertices, hr %#x.\n", hr); - ok(!offscreen, "Offscreen is %x.\n", offscreen); + ok(SUCCEEDED(hr), "Failed to transform vertices, hr %#lx.\n", hr); + ok(!offscreen, "Offscreen is %lx.\n", offscreen);
vp_data.dwWidth = 256; vp_data.dwHeight = 256; hr = IDirect3DViewport2_SetViewport(viewport, &vp_data); - ok(SUCCEEDED(hr), "Failed to set viewport, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set viewport, hr %#lx.\n", hr); hr = IDirect3DViewport2_TransformVertices(viewport, 1, &transformdata, D3DTRANSFORM_CLIPPED, &offscreen); - ok(SUCCEEDED(hr), "Failed to transform vertices, hr %#x.\n", hr); - ok(offscreen == D3DCLIP_RIGHT, "Offscreen is %x.\n", offscreen); + ok(SUCCEEDED(hr), "Failed to transform vertices, hr %#lx.\n", hr); + ok(offscreen == D3DCLIP_RIGHT, "Offscreen is %lx.\n", offscreen);
/* Test the effect of Matrices. * @@ -12464,20 +12464,20 @@ static void test_transform_vertices(void) vp_data.dvMinZ = 0.0f; vp_data.dvMaxZ = 1.0f; hr = IDirect3DViewport2_SetViewport(viewport, &vp_data); - ok(SUCCEEDED(hr), "Failed to set viewport, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set viewport, hr %#lx.\n", hr);
hr = IDirect3DDevice2_SetTransform(device, D3DTRANSFORMSTATE_WORLD, &mat_translate1); - ok(SUCCEEDED(hr), "Failed to set world transform, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set world transform, hr %#lx.\n", hr); hr = IDirect3DDevice2_SetTransform(device, D3DTRANSFORMSTATE_VIEW, &mat_scale); - ok(SUCCEEDED(hr), "Failed to set world transform, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set world transform, hr %#lx.\n", hr); hr = IDirect3DDevice2_SetTransform(device, D3DTRANSFORMSTATE_PROJECTION, &mat_translate2); - ok(SUCCEEDED(hr), "Failed to set world transform, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set world transform, hr %#lx.\n", hr);
transformdata.lpIn = position_tests; transformdata.dwInSize = sizeof(position_tests[0]); hr = IDirect3DViewport2_TransformVertices(viewport, ARRAY_SIZE(position_tests), &transformdata, D3DTRANSFORM_UNCLIPPED, &offscreen); - ok(SUCCEEDED(hr), "Failed to transform vertices, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to transform vertices, hr %#lx.\n", hr);
for (i = 0; i < ARRAY_SIZE(position_tests); ++i) { @@ -12496,48 +12496,48 @@ static void test_transform_vertices(void) offscreen = 0xdeadbeef; hr = IDirect3DViewport2_TransformVertices(viewport, ARRAY_SIZE(position_tests), &transformdata, 0, &offscreen); - ok(hr == DDERR_INVALIDPARAMS, "TransformVertices returned %#x.\n", hr); - ok(offscreen == 0xdeadbeef, "Offscreen is %x.\n", offscreen); + ok(hr == DDERR_INVALIDPARAMS, "TransformVertices returned %#lx.\n", hr); + ok(offscreen == 0xdeadbeef, "Offscreen is %lx.\n", offscreen);
/* NULL transform data. */ hr = IDirect3DViewport2_TransformVertices(viewport, 1, NULL, D3DTRANSFORM_UNCLIPPED, &offscreen); - ok(hr == DDERR_INVALIDPARAMS, "TransformVertices returned %#x.\n", hr); - ok(offscreen == 0xdeadbeef, "Offscreen is %x.\n", offscreen); + ok(hr == DDERR_INVALIDPARAMS, "TransformVertices returned %#lx.\n", hr); + ok(offscreen == 0xdeadbeef, "Offscreen is %lx.\n", offscreen); hr = IDirect3DViewport2_TransformVertices(viewport, 0, NULL, D3DTRANSFORM_UNCLIPPED, &offscreen); - ok(hr == DDERR_INVALIDPARAMS, "TransformVertices returned %#x.\n", hr); - ok(offscreen == 0xdeadbeef, "Offscreen is %x.\n", offscreen); + ok(hr == DDERR_INVALIDPARAMS, "TransformVertices returned %#lx.\n", hr); + ok(offscreen == 0xdeadbeef, "Offscreen is %lx.\n", offscreen);
/* NULL transform data and NULL dwOffscreen. * * Valid transform data + NULL dwOffscreen -> crash. */ hr = IDirect3DViewport2_TransformVertices(viewport, 1, NULL, D3DTRANSFORM_UNCLIPPED, NULL); - ok(hr == DDERR_INVALIDPARAMS, "TransformVertices returned %#x.\n", hr); + ok(hr == DDERR_INVALIDPARAMS, "TransformVertices returned %#lx.\n", hr);
/* No vertices. */ hr = IDirect3DViewport2_TransformVertices(viewport, 0, &transformdata, D3DTRANSFORM_UNCLIPPED, &offscreen); - ok(SUCCEEDED(hr), "Failed to transform vertices, hr %#x.\n", hr); - ok(!offscreen, "Offscreen is %x.\n", offscreen); + ok(SUCCEEDED(hr), "Failed to transform vertices, hr %#lx.\n", hr); + ok(!offscreen, "Offscreen is %lx.\n", offscreen); hr = IDirect3DViewport2_TransformVertices(viewport, 0, &transformdata, D3DTRANSFORM_CLIPPED, &offscreen); - ok(SUCCEEDED(hr), "Failed to transform vertices, hr %#x.\n", hr); - ok(offscreen == ~0U, "Offscreen is %x.\n", offscreen); + ok(SUCCEEDED(hr), "Failed to transform vertices, hr %#lx.\n", hr); + ok(offscreen == ~0U, "Offscreen is %lx.\n", offscreen);
/* Invalid sizes. */ offscreen = 0xdeadbeef; transformdata.dwSize = sizeof(transformdata) - 1; hr = IDirect3DViewport2_TransformVertices(viewport, 1, &transformdata, D3DTRANSFORM_UNCLIPPED, &offscreen); - ok(hr == DDERR_INVALIDPARAMS, "TransformVertices returned %#x.\n", hr); - ok(offscreen == 0xdeadbeef, "Offscreen is %x.\n", offscreen); + ok(hr == DDERR_INVALIDPARAMS, "TransformVertices returned %#lx.\n", hr); + ok(offscreen == 0xdeadbeef, "Offscreen is %lx.\n", offscreen); transformdata.dwSize = sizeof(transformdata) + 1; hr = IDirect3DViewport2_TransformVertices(viewport, 1, &transformdata, D3DTRANSFORM_UNCLIPPED, &offscreen); - ok(hr == DDERR_INVALIDPARAMS, "TransformVertices returned %#x.\n", hr); - ok(offscreen == 0xdeadbeef, "Offscreen is %x.\n", offscreen); + ok(hr == DDERR_INVALIDPARAMS, "TransformVertices returned %#lx.\n", hr); + ok(offscreen == 0xdeadbeef, "Offscreen is %lx.\n", offscreen);
/* NULL lpIn or lpOut -> crash, except when transforming 0 vertices. */ transformdata.dwSize = sizeof(transformdata); @@ -12546,8 +12546,8 @@ static void test_transform_vertices(void) offscreen = 0xdeadbeef; hr = IDirect3DViewport2_TransformVertices(viewport, 0, &transformdata, D3DTRANSFORM_CLIPPED, &offscreen); - ok(SUCCEEDED(hr), "Failed to transform vertices, hr %#x.\n", hr); - ok(offscreen == ~0U, "Offscreen is %x.\n", offscreen); + ok(SUCCEEDED(hr), "Failed to transform vertices, hr %#lx.\n", hr); + ok(offscreen == ~0U, "Offscreen is %lx.\n", offscreen);
/* Test how vertices are transformed during draws. */ vp_data.dwX = 20; @@ -12559,40 +12559,40 @@ static void test_transform_vertices(void) vp_data.dvMinZ = 0.0f; vp_data.dvMaxZ = 1.0f; hr = IDirect3DViewport2_SetViewport(viewport, &vp_data); - ok(SUCCEEDED(hr), "Failed to set viewport, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set viewport, hr %#lx.\n", hr); hr = IDirect3DDevice2_SetCurrentViewport(device, viewport); - ok(SUCCEEDED(hr), "Failed to activate the viewport, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to activate the viewport, hr %#lx.\n", hr);
- ok(SUCCEEDED(hr), "Failed to clear the render target, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to clear the render target, hr %#lx.\n", hr); background = create_diffuse_material(device, 0.0f, 0.0f, 1.0f, 0.0f); viewport_set_background(device, viewport, background); hr = IDirect3DViewport2_Clear(viewport, 1, &clear_rect, D3DCLEAR_TARGET); - ok(SUCCEEDED(hr), "Failed to clear viewport, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to clear viewport, hr %#lx.\n", hr);
hr = IDirect3DDevice2_BeginScene(device); - ok(SUCCEEDED(hr), "Failed to begin scene, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to begin scene, hr %#lx.\n", hr); hr = IDirect3DDevice2_DrawPrimitive(device, D3DPT_TRIANGLESTRIP, D3DVT_LVERTEX, quad, 4, 0); - ok(SUCCEEDED(hr), "Failed to draw, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to draw, hr %#lx.\n", hr); hr = IDirect3DDevice2_EndScene(device); - ok(SUCCEEDED(hr), "Failed to end scene, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to end scene, hr %#lx.\n", hr);
color = get_surface_color(rt, 128, 143); - ok(compare_color(color, 0x000000ff, 1), "Got unexpected color 0x%08x.\n", color); + ok(compare_color(color, 0x000000ff, 1), "Got unexpected color 0x%08lx.\n", color); color = get_surface_color(rt, 132, 143); - ok(compare_color(color, 0x000000ff, 1), "Got unexpected color 0x%08x.\n", color); + ok(compare_color(color, 0x000000ff, 1), "Got unexpected color 0x%08lx.\n", color); color = get_surface_color(rt, 128, 147); - ok(compare_color(color, 0x000000ff, 1), "Got unexpected color 0x%08x.\n", color); + ok(compare_color(color, 0x000000ff, 1), "Got unexpected color 0x%08lx.\n", color); color = get_surface_color(rt, 132, 147); - ok(compare_color(color, 0x00ff0000, 1), "Got unexpected color 0x%08x.\n", color); + ok(compare_color(color, 0x00ff0000, 1), "Got unexpected color 0x%08lx.\n", color);
color = get_surface_color(rt, 177, 217); - ok(compare_color(color, 0x00ff0000, 1), "Got unexpected color 0x%08x.\n", color); + ok(compare_color(color, 0x00ff0000, 1), "Got unexpected color 0x%08lx.\n", color); color = get_surface_color(rt, 181, 217); - ok(compare_color(color, 0x000000ff, 1), "Got unexpected color 0x%08x.\n", color); + ok(compare_color(color, 0x000000ff, 1), "Got unexpected color 0x%08lx.\n", color); color = get_surface_color(rt, 177, 221); - ok(compare_color(color, 0x000000ff, 1), "Got unexpected color 0x%08x.\n", color); + ok(compare_color(color, 0x000000ff, 1), "Got unexpected color 0x%08lx.\n", color); color = get_surface_color(rt, 181, 221); - ok(compare_color(color, 0x000000ff, 1), "Got unexpected color 0x%08x.\n", color); + ok(compare_color(color, 0x000000ff, 1), "Got unexpected color 0x%08lx.\n", color);
/* Test D3DVIEWPORT2 behavior. */ vp2_data.dwSize = sizeof(vp2_data); @@ -12607,12 +12607,12 @@ static void test_transform_vertices(void) vp2_data.dvMinZ = 0.0f; vp2_data.dvMaxZ = 2.0f; hr = IDirect3DViewport2_SetViewport2(viewport, &vp2_data); - ok(SUCCEEDED(hr), "Failed to set viewport data, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set viewport data, hr %#lx.\n", hr); transformdata.lpIn = position_tests; transformdata.lpOut = out; hr = IDirect3DViewport2_TransformVertices(viewport, ARRAY_SIZE(position_tests), &transformdata, D3DTRANSFORM_UNCLIPPED, &offscreen); - ok(SUCCEEDED(hr), "Failed to transform vertices, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to transform vertices, hr %#lx.\n", hr); for (i = 0; i < ARRAY_SIZE(position_tests); ++i) { static const struct vec4 cmp[] = @@ -12633,41 +12633,41 @@ static void test_transform_vertices(void) U3(U(mat).diffuse).b = 0.0f; U4(U(mat).diffuse).a = 0.0f; hr = IDirect3DMaterial2_SetMaterial(background, &mat); - ok(SUCCEEDED(hr), "Failed to set material data, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set material data, hr %#lx.\n", hr); hr = IDirect3DViewport2_Clear(viewport, 1, &clear_rect, D3DCLEAR_TARGET); - ok(SUCCEEDED(hr), "Failed to clear viewport, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to clear viewport, hr %#lx.\n", hr);
hr = IDirect3DDevice2_BeginScene(device); - ok(SUCCEEDED(hr), "Failed to begin scene, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to begin scene, hr %#lx.\n", hr); hr = IDirect3DDevice2_DrawPrimitive(device, D3DPT_TRIANGLESTRIP, D3DVT_LVERTEX, quad, 4, 0); - ok(SUCCEEDED(hr), "Failed to draw, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to draw, hr %#lx.\n", hr); hr = IDirect3DDevice2_EndScene(device); - ok(SUCCEEDED(hr), "Failed to end scene, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to end scene, hr %#lx.\n", hr);
color = get_surface_color(rt, 58, 118); - ok(compare_color(color, 0x0000ff00, 1), "Got unexpected color 0x%08x.\n", color); + ok(compare_color(color, 0x0000ff00, 1), "Got unexpected color 0x%08lx.\n", color); color = get_surface_color(rt, 62, 118); - ok(compare_color(color, 0x0000ff00, 1), "Got unexpected color 0x%08x.\n", color); + ok(compare_color(color, 0x0000ff00, 1), "Got unexpected color 0x%08lx.\n", color); color = get_surface_color(rt, 58, 122); - ok(compare_color(color, 0x0000ff00, 1), "Got unexpected color 0x%08x.\n", color); + ok(compare_color(color, 0x0000ff00, 1), "Got unexpected color 0x%08lx.\n", color); color = get_surface_color(rt, 62, 122); - ok(compare_color(color, 0x00ff0000, 1), "Got unexpected color 0x%08x.\n", color); + ok(compare_color(color, 0x00ff0000, 1), "Got unexpected color 0x%08lx.\n", color);
color = get_surface_color(rt, 157, 177); - ok(compare_color(color, 0x00ff0000, 1), "Got unexpected color 0x%08x.\n", color); + ok(compare_color(color, 0x00ff0000, 1), "Got unexpected color 0x%08lx.\n", color); color = get_surface_color(rt, 161, 177); - ok(compare_color(color, 0x0000ff00, 1), "Got unexpected color 0x%08x.\n", color); + ok(compare_color(color, 0x0000ff00, 1), "Got unexpected color 0x%08lx.\n", color); color = get_surface_color(rt, 157, 181); - ok(compare_color(color, 0x0000ff00, 1), "Got unexpected color 0x%08x.\n", color); + ok(compare_color(color, 0x0000ff00, 1), "Got unexpected color 0x%08lx.\n", color); color = get_surface_color(rt, 161, 181); - ok(compare_color(color, 0x0000ff00, 1), "Got unexpected color 0x%08x.\n", color); + ok(compare_color(color, 0x0000ff00, 1), "Got unexpected color 0x%08lx.\n", color);
hr = IDirect3DDevice2_SetTransform(device, D3DTRANSFORMSTATE_WORLD, &mat_identity); - ok(SUCCEEDED(hr), "Failed to set world transform, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set world transform, hr %#lx.\n", hr); hr = IDirect3DDevice2_SetTransform(device, D3DTRANSFORMSTATE_VIEW, &mat_identity); - ok(SUCCEEDED(hr), "Failed to set world transform, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set world transform, hr %#lx.\n", hr); hr = IDirect3DDevice2_SetTransform(device, D3DTRANSFORMSTATE_PROJECTION, &mat_transform3); - ok(SUCCEEDED(hr), "Failed to set world transform, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set world transform, hr %#lx.\n", hr);
vp2_data.dwX = 0.0; vp2_data.dwY = 0.0; @@ -12680,14 +12680,14 @@ static void test_transform_vertices(void) vp2_data.dvMinZ = 0.0f; vp2_data.dvMaxZ = 0.5f; hr = IDirect3DViewport2_SetViewport2(viewport, &vp2_data); - ok(SUCCEEDED(hr), "Failed to set viewport data, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set viewport data, hr %#lx.\n", hr); transformdata.lpIn = cliptest; transformdata.dwInSize = sizeof(cliptest[0]); offscreen = 0xdeadbeef; hr = IDirect3DViewport2_TransformVertices(viewport, ARRAY_SIZE(cliptest), &transformdata, D3DTRANSFORM_CLIPPED, &offscreen); - ok(SUCCEEDED(hr), "Failed to transform vertices, hr %#x.\n", hr); - ok(!offscreen, "Offscreen is %x.\n", offscreen); + ok(SUCCEEDED(hr), "Failed to transform vertices, hr %#lx.\n", hr); + ok(!offscreen, "Offscreen is %lx.\n", offscreen); for (i = 0; i < ARRAY_SIZE(cliptest); ++i) { static const D3DHVERTEX cmp_h[] = @@ -12701,7 +12701,7 @@ static void test_transform_vertices(void) && compare_float(U2(cmp_h[i]).hy, U2(out_h[i]).hy, 4096) && compare_float(U3(cmp_h[i]).hz, U3(out_h[i]).hz, 4096) && cmp_h[i].dwFlags == out_h[i].dwFlags, - "HVertex %u differs. Got %#x %f %f %f.\n", i, + "HVertex %u differs. Got %#lx %f %f %f.\n", i, out_h[i].dwFlags, U1(out_h[i]).hx, U2(out_h[i]).hy, U3(out_h[i]).hz); }
@@ -12709,7 +12709,7 @@ static void test_transform_vertices(void) destroy_viewport(device, viewport); IDirect3DMaterial2_Release(background); refcount = IDirect3DDevice_Release(device); - ok(!refcount, "Device has %u references left.\n", refcount); + ok(!refcount, "Device has %lu references left.\n", refcount); IDirectDraw2_Release(ddraw); DestroyWindow(window); } @@ -12732,14 +12732,14 @@ static void test_display_mode_surface_pixel_format(void)
surface_desc.dwSize = sizeof(surface_desc); hr = IDirectDraw2_GetDisplayMode(ddraw, &surface_desc); - ok(SUCCEEDED(hr), "Failed to get display mode, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get display mode, hr %#lx.\n", hr); width = surface_desc.dwWidth; height = surface_desc.dwHeight;
window = CreateWindowA("static", "ddraw_test", WS_OVERLAPPEDWINDOW, 0, 0, width, height, NULL, NULL, NULL, NULL); hr = IDirectDraw2_SetCooperativeLevel(ddraw, window, DDSCL_EXCLUSIVE | DDSCL_FULLSCREEN); - ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#lx.\n", hr);
bpp = 0; if (SUCCEEDED(IDirectDraw2_SetDisplayMode(ddraw, width, height, 16, 0, 0))) @@ -12752,10 +12752,10 @@ static void test_display_mode_surface_pixel_format(void)
surface_desc.dwSize = sizeof(surface_desc); hr = IDirectDraw2_GetDisplayMode(ddraw, &surface_desc); - ok(SUCCEEDED(hr), "Failed to get display mode, hr %#x.\n", hr); - ok(surface_desc.dwWidth == width, "Got width %u, expected %u.\n", surface_desc.dwWidth, width); - ok(surface_desc.dwHeight == height, "Got height %u, expected %u.\n", surface_desc.dwHeight, height); - ok(U1(surface_desc.ddpfPixelFormat).dwRGBBitCount == bpp, "Got bpp %u, expected %u.\n", + ok(SUCCEEDED(hr), "Failed to get display mode, hr %#lx.\n", hr); + ok(surface_desc.dwWidth == width, "Got width %lu, expected %u.\n", surface_desc.dwWidth, width); + ok(surface_desc.dwHeight == height, "Got height %lu, expected %u.\n", surface_desc.dwHeight, height); + ok(U1(surface_desc.ddpfPixelFormat).dwRGBBitCount == bpp, "Got bpp %lu, expected %u.\n", U1(surface_desc.ddpfPixelFormat).dwRGBBitCount, bpp);
memset(&surface_desc, 0, sizeof(surface_desc)); @@ -12764,14 +12764,14 @@ static void test_display_mode_surface_pixel_format(void) surface_desc.dwBackBufferCount = 1; surface_desc.ddsCaps.dwCaps = DDSCAPS_COMPLEX | DDSCAPS_FLIP | DDSCAPS_PRIMARYSURFACE; hr = IDirectDraw2_CreateSurface(ddraw, &surface_desc, &surface, NULL); - ok(hr == D3D_OK, "Failed to create surface, hr %#x.\n", hr); + ok(hr == D3D_OK, "Failed to create surface, hr %#lx.\n", hr); hr = IDirectDrawSurface_GetSurfaceDesc(surface, &surface_desc); - ok(SUCCEEDED(hr), "Failed to get surface desc, hr %#x.\n", hr); - ok(surface_desc.dwWidth == width, "Got width %u, expected %u.\n", surface_desc.dwWidth, width); - ok(surface_desc.dwHeight == height, "Got height %u, expected %u.\n", surface_desc.dwHeight, height); - ok(surface_desc.ddpfPixelFormat.dwFlags == DDPF_RGB, "Got unexpected pixel format flags %#x.\n", + ok(SUCCEEDED(hr), "Failed to get surface desc, hr %#lx.\n", hr); + ok(surface_desc.dwWidth == width, "Got width %lu, expected %u.\n", surface_desc.dwWidth, width); + ok(surface_desc.dwHeight == height, "Got height %lu, expected %u.\n", surface_desc.dwHeight, height); + ok(surface_desc.ddpfPixelFormat.dwFlags == DDPF_RGB, "Got unexpected pixel format flags %#lx.\n", surface_desc.ddpfPixelFormat.dwFlags); - ok(U1(surface_desc.ddpfPixelFormat).dwRGBBitCount == bpp, "Got bpp %u, expected %u.\n", + ok(U1(surface_desc.ddpfPixelFormat).dwRGBBitCount == bpp, "Got bpp %lu, expected %u.\n", U1(surface_desc.ddpfPixelFormat).dwRGBBitCount, bpp); IDirectDrawSurface_Release(surface);
@@ -12782,17 +12782,17 @@ static void test_display_mode_surface_pixel_format(void) surface_desc.dwHeight = height; surface_desc.ddsCaps.dwCaps = DDSCAPS_OFFSCREENPLAIN; hr = IDirectDraw2_CreateSurface(ddraw, &surface_desc, &surface, NULL); - ok(hr == D3D_OK, "Failed to create surface, hr %#x.\n", hr); + ok(hr == D3D_OK, "Failed to create surface, hr %#lx.\n", hr); hr = IDirectDrawSurface_GetSurfaceDesc(surface, &surface_desc); - ok(SUCCEEDED(hr), "Failed to get surface desc, hr %#x.\n", hr); - ok(surface_desc.ddpfPixelFormat.dwFlags == DDPF_RGB, "Got unexpected pixel format flags %#x.\n", + ok(SUCCEEDED(hr), "Failed to get surface desc, hr %#lx.\n", hr); + ok(surface_desc.ddpfPixelFormat.dwFlags == DDPF_RGB, "Got unexpected pixel format flags %#lx.\n", surface_desc.ddpfPixelFormat.dwFlags); - ok(U1(surface_desc.ddpfPixelFormat).dwRGBBitCount == bpp, "Got bpp %u, expected %u.\n", + ok(U1(surface_desc.ddpfPixelFormat).dwRGBBitCount == bpp, "Got bpp %lu, expected %u.\n", U1(surface_desc.ddpfPixelFormat).dwRGBBitCount, bpp); IDirectDrawSurface_Release(surface);
refcount = IDirectDraw2_Release(ddraw); - ok(!refcount, "DirectDraw has %u references left.\n", refcount); + ok(!refcount, "DirectDraw has %lu references left.\n", refcount); DestroyWindow(window); }
@@ -12850,7 +12850,7 @@ static void test_surface_desc_size(void) return; } hr = IDirectDraw2_SetCooperativeLevel(ddraw, NULL, DDSCL_NORMAL); - ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#lx.\n", hr);
for (i = 0; i < ARRAY_SIZE(surface_caps); ++i) { @@ -12866,9 +12866,9 @@ static void test_surface_desc_size(void) continue; } hr = IDirectDrawSurface_QueryInterface(surface, &IID_IDirectDrawSurface2, (void **)&surface2); - ok(hr == DD_OK, "Failed to query IDirectDrawSurface2, hr %#x, type %s.\n", hr, surface_caps[i].name); + ok(hr == DD_OK, "Failed to query IDirectDrawSurface2, hr %#lx, type %s.\n", hr, surface_caps[i].name); hr = IDirectDrawSurface_QueryInterface(surface, &IID_IDirectDrawSurface7, (void **)&surface7); - ok(hr == DD_OK, "Failed to query IDirectDrawSurface7, hr %#x, type %s.\n", hr, surface_caps[i].name); + ok(hr == DD_OK, "Failed to query IDirectDrawSurface7, hr %#lx, type %s.\n", hr, surface_caps[i].name);
/* GetSurfaceDesc() */ for (j = 0; j < ARRAY_SIZE(desc_sizes); ++j) @@ -12877,21 +12877,21 @@ static void test_surface_desc_size(void) desc.dwSize = desc_sizes[j]; expected_hr = desc.dwSize == sizeof(DDSURFACEDESC) ? DD_OK : DDERR_INVALIDPARAMS; hr = IDirectDrawSurface_GetSurfaceDesc(surface, &desc.desc1); - ok(hr == expected_hr, "Got hr %#x, expected %#x, dwSize %u, type %s.\n", + ok(hr == expected_hr, "Got hr %#lx, expected %#lx, dwSize %u, type %s.\n", hr, expected_hr, desc_sizes[j], surface_caps[i].name);
memset(&desc, 0, sizeof(desc)); desc.dwSize = desc_sizes[j]; expected_hr = desc.dwSize == sizeof(DDSURFACEDESC) ? DD_OK : DDERR_INVALIDPARAMS; hr = IDirectDrawSurface2_GetSurfaceDesc(surface2, &desc.desc1); - ok(hr == expected_hr, "Got hr %#x, expected %#x, dwSize %u, type %s.\n", + ok(hr == expected_hr, "Got hr %#lx, expected %#lx, dwSize %u, type %s.\n", hr, expected_hr, desc_sizes[j], surface_caps[i].name);
memset(&desc, 0, sizeof(desc)); desc.dwSize = desc_sizes[j]; expected_hr = desc.dwSize == sizeof(DDSURFACEDESC2) ? DD_OK : DDERR_INVALIDPARAMS; hr = IDirectDrawSurface7_GetSurfaceDesc(surface7, &desc.desc2); - ok(hr == expected_hr, "Got hr %#x, expected %#x, dwSize %u, type %s.\n", + ok(hr == expected_hr, "Got hr %#lx, expected %#lx, dwSize %u, type %s.\n", hr, expected_hr, desc_sizes[j], surface_caps[i].name); }
@@ -12908,22 +12908,22 @@ static void test_surface_desc_size(void) desc.blob[sizeof(DDSURFACEDESC2)] = 0xef; hr = IDirectDrawSurface_Lock(surface, NULL, &desc.desc1, 0, 0); expected_hr = valid_size ? DD_OK : DDERR_INVALIDPARAMS; - ok(hr == expected_hr, "Got hr %#x, expected %#x, dwSize %u, type %s.\n", + ok(hr == expected_hr, "Got hr %#lx, expected %#lx, dwSize %u, type %s.\n", hr, expected_hr, desc_sizes[j], surface_caps[i].name); - ok(desc.dwSize == desc_sizes[j], "dwSize was changed from %u to %u, type %s.\n", + ok(desc.dwSize == desc_sizes[j], "dwSize was changed from %u to %lu, type %s.\n", desc_sizes[j], desc.dwSize, surface_caps[i].name); ok(desc.blob[sizeof(DDSURFACEDESC2)] == 0xef, "Got unexpected byte %02x, dwSize %u, type %s.\n", desc.blob[sizeof(DDSURFACEDESC2)], desc_sizes[j], surface_caps[i].name); if (SUCCEEDED(hr)) { - ok(desc.desc1.dwWidth == 128, "Got unexpected width %u, dwSize %u, type %s.\n", + ok(desc.desc1.dwWidth == 128, "Got unexpected width %lu, dwSize %u, type %s.\n", desc.desc1.dwWidth, desc_sizes[j], surface_caps[i].name); - ok(desc.desc1.dwHeight == 128, "Got unexpected height %u, dwSize %u, type %s.\n", + ok(desc.desc1.dwHeight == 128, "Got unexpected height %lu, dwSize %u, type %s.\n", desc.desc1.dwHeight, desc_sizes[j], surface_caps[i].name); expected_texture_stage = desc_sizes[j] >= sizeof(DDSURFACEDESC2) ? 0 : 0xdeadbeef; todo_wine_if(!expected_texture_stage) ok(desc.desc2.dwTextureStage == expected_texture_stage, - "Got unexpected texture stage %#x, dwSize %u, type %s.\n", + "Got unexpected texture stage %#lx, dwSize %u, type %s.\n", desc.desc2.dwTextureStage, desc_sizes[j], surface_caps[i].name); IDirectDrawSurface_Unlock(surface, NULL); } @@ -12934,22 +12934,22 @@ static void test_surface_desc_size(void) desc.blob[sizeof(DDSURFACEDESC2)] = 0xef; hr = IDirectDrawSurface2_Lock(surface2, NULL, &desc.desc1, 0, 0); expected_hr = valid_size ? DD_OK : DDERR_INVALIDPARAMS; - ok(hr == expected_hr, "Got hr %#x, expected %#x, dwSize %u, type %s.\n", + ok(hr == expected_hr, "Got hr %#lx, expected %#lx, dwSize %u, type %s.\n", hr, expected_hr, desc_sizes[j], surface_caps[i].name); - ok(desc.dwSize == desc_sizes[j], "dwSize was changed from %u to %u, type %s.\n", + ok(desc.dwSize == desc_sizes[j], "dwSize was changed from %u to %lu, type %s.\n", desc_sizes[j], desc.dwSize, surface_caps[i].name); ok(desc.blob[sizeof(DDSURFACEDESC2)] == 0xef, "Got unexpected byte %02x, dwSize %u, type %s.\n", desc.blob[sizeof(DDSURFACEDESC2)], desc_sizes[j], surface_caps[i].name); if (SUCCEEDED(hr)) { - ok(desc.desc2.dwWidth == 128, "Got unexpected width %u, dwSize %u, type %s.\n", + ok(desc.desc2.dwWidth == 128, "Got unexpected width %lu, dwSize %u, type %s.\n", desc.desc2.dwWidth, desc_sizes[j], surface_caps[i].name); - ok(desc.desc2.dwHeight == 128, "Got unexpected height %u, dwSize %u, type %s.\n", + ok(desc.desc2.dwHeight == 128, "Got unexpected height %lu, dwSize %u, type %s.\n", desc.desc2.dwHeight, desc_sizes[j], surface_caps[i].name); expected_texture_stage = desc_sizes[j] >= sizeof(DDSURFACEDESC2) ? 0 : 0xdeadbeef; todo_wine_if(!expected_texture_stage) ok(desc.desc2.dwTextureStage == expected_texture_stage, - "Got unexpected texture stage %#x, dwSize %u, type %s.\n", + "Got unexpected texture stage %#lx, dwSize %u, type %s.\n", desc.desc2.dwTextureStage, desc_sizes[j], surface_caps[i].name); IDirectDrawSurface2_Unlock(surface2, NULL); } @@ -12960,21 +12960,21 @@ static void test_surface_desc_size(void) desc.blob[sizeof(DDSURFACEDESC2)] = 0xef; hr = IDirectDrawSurface7_Lock(surface7, NULL, &desc.desc2, 0, 0); expected_hr = valid_size ? DD_OK : DDERR_INVALIDPARAMS; - ok(hr == expected_hr, "Got hr %#x, expected %#x, dwSize %u, type %s.\n", + ok(hr == expected_hr, "Got hr %#lx, expected %#lx, dwSize %u, type %s.\n", hr, expected_hr, desc_sizes[j], surface_caps[i].name); - ok(desc.dwSize == desc_sizes[j], "dwSize was changed from %u to %u, type %s.\n", + ok(desc.dwSize == desc_sizes[j], "dwSize was changed from %u to %lu, type %s.\n", desc_sizes[j], desc.dwSize, surface_caps[i].name); ok(desc.blob[sizeof(DDSURFACEDESC2)] == 0xef, "Got unexpected byte %02x, dwSize %u, type %s.\n", desc.blob[sizeof(DDSURFACEDESC2)], desc_sizes[j], surface_caps[i].name); if (SUCCEEDED(hr)) { - ok(desc.desc2.dwWidth == 128, "Got unexpected width %u, dwSize %u, type %s.\n", + ok(desc.desc2.dwWidth == 128, "Got unexpected width %lu, dwSize %u, type %s.\n", desc.desc2.dwWidth, desc_sizes[j], surface_caps[i].name); - ok(desc.desc2.dwHeight == 128, "Got unexpected height %u, dwSize %u, type %s.\n", + ok(desc.desc2.dwHeight == 128, "Got unexpected height %lu, dwSize %u, type %s.\n", desc.desc2.dwHeight, desc_sizes[j], surface_caps[i].name); expected_texture_stage = desc_sizes[j] >= sizeof(DDSURFACEDESC2) ? 0 : 0xdeadbeef; ok(desc.desc2.dwTextureStage == expected_texture_stage, - "Got unexpected texture stage %#x, dwSize %u, type %s.\n", + "Got unexpected texture stage %#lx, dwSize %u, type %s.\n", desc.desc2.dwTextureStage, desc_sizes[j], surface_caps[i].name); IDirectDrawSurface7_Unlock(surface7, NULL); } @@ -12993,17 +12993,17 @@ static void test_surface_desc_size(void) expected_hr = (desc.dwSize == sizeof(DDSURFACEDESC) || desc.dwSize == sizeof(DDSURFACEDESC2)) ? DD_OK : DDERR_INVALIDPARAMS; hr = IDirectDraw2_GetDisplayMode(ddraw, &desc.desc1); - ok(hr == expected_hr, "Got hr %#x, expected %#x, size %u.\n", hr, expected_hr, desc_sizes[j]); + ok(hr == expected_hr, "Got hr %#lx, expected %#lx, size %u.\n", hr, expected_hr, desc_sizes[j]); if (SUCCEEDED(hr)) { - ok(desc.dwSize == sizeof(DDSURFACEDESC), "Wrong size %u for %u.\n", desc.dwSize, desc_sizes[j]); + ok(desc.dwSize == sizeof(DDSURFACEDESC), "Wrong size %lu for %u.\n", desc.dwSize, desc_sizes[j]); ok(desc.blob[desc_sizes[j]] == 0xcc, "Overflow for size %u.\n", desc_sizes[j]); ok(desc.blob[desc_sizes[j] - 1] != 0xcc, "Struct not cleared for size %u.\n", desc_sizes[j]); } }
refcount = IDirectDraw2_Release(ddraw); - ok(!refcount, "DirectDraw has %u references left.\n", refcount); + ok(!refcount, "DirectDraw has %lu references left.\n", refcount); }
static void test_ck_operation(void) @@ -13025,7 +13025,7 @@ static void test_ck_operation(void) ddraw = create_ddraw(); ok(!!ddraw, "Failed to create a ddraw object.\n"); hr = IDirectDraw2_SetCooperativeLevel(ddraw, window, DDSCL_NORMAL); - ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#lx.\n", hr);
memset(&surface_desc, 0, sizeof(surface_desc)); surface_desc.dwSize = sizeof(surface_desc); @@ -13039,22 +13039,22 @@ static void test_ck_operation(void) U3(surface_desc.ddpfPixelFormat).dwGBitMask = 0x0000ff00; U4(surface_desc.ddpfPixelFormat).dwBBitMask = 0x000000ff; hr = IDirectDraw2_CreateSurface(ddraw, &surface_desc, &surface1, NULL); - ok(SUCCEEDED(hr), "Failed to create surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create surface, hr %#lx.\n", hr); hr = IDirectDrawSurface_QueryInterface(surface1, &IID_IDirectDrawSurface2, (void **)&dst); - ok(SUCCEEDED(hr), "Failed to query IDirectDrawSurface2, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to query IDirectDrawSurface2, hr %#lx.\n", hr); IDirectDrawSurface_Release(surface1);
surface_desc.dwFlags |= DDSD_CKSRCBLT; surface_desc.ddckCKSrcBlt.dwColorSpaceLowValue = 0x00ff00ff; surface_desc.ddckCKSrcBlt.dwColorSpaceHighValue = 0x00ff00ff; hr = IDirectDraw2_CreateSurface(ddraw, &surface_desc, &surface1, NULL); - ok(SUCCEEDED(hr), "Failed to create surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create surface, hr %#lx.\n", hr); hr = IDirectDrawSurface_QueryInterface(surface1, &IID_IDirectDrawSurface2, (void **)&src); - ok(SUCCEEDED(hr), "Failed to query IDirectDrawSurface2, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to query IDirectDrawSurface2, hr %#lx.\n", hr); IDirectDrawSurface_Release(surface1);
hr = IDirectDrawSurface2_Lock(src, NULL, &surface_desc, DDLOCK_WAIT, NULL); - ok(SUCCEEDED(hr), "Failed to lock surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to lock surface, hr %#lx.\n", hr); ok(!(surface_desc.dwFlags & DDSD_LPSURFACE), "Surface desc has LPSURFACE Flags set.\n"); color = surface_desc.lpSurface; color[0] = 0x77010203; @@ -13062,33 +13062,33 @@ static void test_ck_operation(void) color[2] = 0x77ff00ff; color[3] = 0x00ff00ff; hr = IDirectDrawSurface2_Unlock(src, NULL); - ok(SUCCEEDED(hr), "Failed to unlock surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to unlock surface, hr %#lx.\n", hr);
for (i = 0; i < 2; ++i) { hr = IDirectDrawSurface2_Lock(dst, NULL, &surface_desc, DDLOCK_WAIT, NULL); - ok(SUCCEEDED(hr), "Failed to lock surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to lock surface, hr %#lx.\n", hr); color = surface_desc.lpSurface; color[0] = 0xcccccccc; color[1] = 0xcccccccc; color[2] = 0xcccccccc; color[3] = 0xcccccccc; hr = IDirectDrawSurface2_Unlock(dst, NULL); - ok(SUCCEEDED(hr), "Failed to unlock surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to unlock surface, hr %#lx.\n", hr);
if (i) { hr = IDirectDrawSurface2_BltFast(dst, 0, 0, src, NULL, DDBLTFAST_SRCCOLORKEY); - ok(SUCCEEDED(hr), "Failed to blit, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to blit, hr %#lx.\n", hr); } else { hr = IDirectDrawSurface2_Blt(dst, NULL, src, NULL, DDBLT_KEYSRC, NULL); - ok(SUCCEEDED(hr), "Failed to blit, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to blit, hr %#lx.\n", hr); }
hr = IDirectDrawSurface2_Lock(dst, NULL, &surface_desc, DDLOCK_WAIT | DDLOCK_READONLY, NULL); - ok(SUCCEEDED(hr), "Failed to lock surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to lock surface, hr %#lx.\n", hr); ok(!(surface_desc.dwFlags & DDSD_LPSURFACE), "Surface desc has LPSURFACE Flags set.\n"); color = surface_desc.lpSurface; /* Different behavior on some drivers / windows versions. Some versions ignore the X channel when @@ -13103,69 +13103,69 @@ static void test_ck_operation(void) && color[2] == 0xcccccccc && color[3] == 0xcccccccc) /* Nvidia */ || broken(color[0] == 0xff010203 && color[1] == 0xff010203 && color[2] == 0xcccccccc && color[3] == 0xcccccccc) /* Testbot */, - "Destination data after blitting is %08x %08x %08x %08x, i=%u.\n", + "Destination data after blitting is %08lx %08lx %08lx %08lx, i=%u.\n", color[0], color[1], color[2], color[3], i); hr = IDirectDrawSurface2_Unlock(dst, NULL); - ok(SUCCEEDED(hr), "Failed to unlock surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to unlock surface, hr %#lx.\n", hr); }
hr = IDirectDrawSurface2_GetColorKey(src, DDCKEY_SRCBLT, &ckey); - ok(SUCCEEDED(hr), "Failed to get color key, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get color key, hr %#lx.\n", hr); ok(ckey.dwColorSpaceLowValue == 0x00ff00ff && ckey.dwColorSpaceHighValue == 0x00ff00ff, - "Got unexpected color key low=%08x high=%08x.\n", ckey.dwColorSpaceLowValue, ckey.dwColorSpaceHighValue); + "Got unexpected color key low=%08lx high=%08lx.\n", ckey.dwColorSpaceLowValue, ckey.dwColorSpaceHighValue);
ckey.dwColorSpaceLowValue = ckey.dwColorSpaceHighValue = 0x0000ff00; hr = IDirectDrawSurface2_SetColorKey(src, DDCKEY_SRCBLT, &ckey); - ok(SUCCEEDED(hr), "Failed to set color key, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set color key, hr %#lx.\n", hr);
ckey.dwColorSpaceLowValue = ckey.dwColorSpaceHighValue = 0; hr = IDirectDrawSurface2_GetColorKey(src, DDCKEY_SRCBLT, &ckey); - ok(SUCCEEDED(hr), "Failed to get color key, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get color key, hr %#lx.\n", hr); ok(ckey.dwColorSpaceLowValue == 0x0000ff00 && ckey.dwColorSpaceHighValue == 0x0000ff00, - "Got unexpected color key low=%08x high=%08x.\n", ckey.dwColorSpaceLowValue, ckey.dwColorSpaceHighValue); + "Got unexpected color key low=%08lx high=%08lx.\n", ckey.dwColorSpaceLowValue, ckey.dwColorSpaceHighValue);
surface_desc.ddckCKSrcBlt.dwColorSpaceLowValue = 0; surface_desc.ddckCKSrcBlt.dwColorSpaceHighValue = 0; hr = IDirectDrawSurface2_GetSurfaceDesc(src, &surface_desc); - ok(SUCCEEDED(hr), "Failed to get surface desc, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get surface desc, hr %#lx.\n", hr); ok(surface_desc.ddckCKSrcBlt.dwColorSpaceLowValue == 0x0000ff00 && surface_desc.ddckCKSrcBlt.dwColorSpaceHighValue == 0x0000ff00, - "Got unexpected color key low=%08x high=%08x.\n", surface_desc.ddckCKSrcBlt.dwColorSpaceLowValue, + "Got unexpected color key low=%08lx high=%08lx.\n", surface_desc.ddckCKSrcBlt.dwColorSpaceLowValue, surface_desc.ddckCKSrcBlt.dwColorSpaceHighValue);
/* Test SetColorKey with dwColorSpaceHighValue < dwColorSpaceLowValue */ ckey.dwColorSpaceLowValue = 0x000000ff; ckey.dwColorSpaceHighValue = 0x00000000; hr = IDirectDrawSurface2_SetColorKey(src, DDCKEY_SRCBLT, &ckey); - ok(SUCCEEDED(hr), "Failed to set color key, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set color key, hr %#lx.\n", hr);
ckey.dwColorSpaceLowValue = ckey.dwColorSpaceHighValue = 0; hr = IDirectDrawSurface2_GetColorKey(src, DDCKEY_SRCBLT, &ckey); - ok(SUCCEEDED(hr), "Failed to get color key, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get color key, hr %#lx.\n", hr); ok(ckey.dwColorSpaceLowValue == 0x000000ff && ckey.dwColorSpaceHighValue == 0x000000ff, - "Got unexpected color key low=%08x high=%08x.\n", ckey.dwColorSpaceLowValue, ckey.dwColorSpaceHighValue); + "Got unexpected color key low=%08lx high=%08lx.\n", ckey.dwColorSpaceLowValue, ckey.dwColorSpaceHighValue);
ckey.dwColorSpaceLowValue = 0x000000ff; ckey.dwColorSpaceHighValue = 0x00000001; hr = IDirectDrawSurface2_SetColorKey(src, DDCKEY_SRCBLT, &ckey); - ok(SUCCEEDED(hr), "Failed to set color key, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set color key, hr %#lx.\n", hr);
ckey.dwColorSpaceLowValue = ckey.dwColorSpaceHighValue = 0; hr = IDirectDrawSurface2_GetColorKey(src, DDCKEY_SRCBLT, &ckey); - ok(SUCCEEDED(hr), "Failed to get color key, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get color key, hr %#lx.\n", hr); ok(ckey.dwColorSpaceLowValue == 0x000000ff && ckey.dwColorSpaceHighValue == 0x000000ff, - "Got unexpected color key low=%08x high=%08x.\n", ckey.dwColorSpaceLowValue, ckey.dwColorSpaceHighValue); + "Got unexpected color key low=%08lx high=%08lx.\n", ckey.dwColorSpaceLowValue, ckey.dwColorSpaceHighValue);
ckey.dwColorSpaceLowValue = 0x000000fe; ckey.dwColorSpaceHighValue = 0x000000fd; hr = IDirectDrawSurface2_SetColorKey(src, DDCKEY_SRCBLT, &ckey); - ok(SUCCEEDED(hr), "Failed to set color key, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set color key, hr %#lx.\n", hr);
ckey.dwColorSpaceLowValue = ckey.dwColorSpaceHighValue = 0; hr = IDirectDrawSurface2_GetColorKey(src, DDCKEY_SRCBLT, &ckey); - ok(SUCCEEDED(hr), "Failed to get color key, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get color key, hr %#lx.\n", hr); ok(ckey.dwColorSpaceLowValue == 0x000000fe && ckey.dwColorSpaceHighValue == 0x000000fe, - "Got unexpected color key low=%08x high=%08x.\n", ckey.dwColorSpaceLowValue, ckey.dwColorSpaceHighValue); + "Got unexpected color key low=%08lx high=%08lx.\n", ckey.dwColorSpaceLowValue, ckey.dwColorSpaceHighValue);
IDirectDrawSurface2_Release(src); IDirectDrawSurface2_Release(dst); @@ -13185,25 +13185,25 @@ static void test_ck_operation(void) U4(surface_desc.ddpfPixelFormat).dwBBitMask = 0x000000ff; U5(surface_desc.ddpfPixelFormat).dwRGBAlphaBitMask = 0xff000000; hr = IDirectDraw2_CreateSurface(ddraw, &surface_desc, &surface1, NULL); - ok(SUCCEEDED(hr), "Failed to create surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create surface, hr %#lx.\n", hr); hr = IDirectDrawSurface_QueryInterface(surface1, &IID_IDirectDrawSurface2, (void **)&dst); - ok(SUCCEEDED(hr), "Failed to query IDirectDrawSurface2, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to query IDirectDrawSurface2, hr %#lx.\n", hr); IDirectDrawSurface_Release(surface1);
hr = IDirectDraw2_CreateSurface(ddraw, &surface_desc, &surface1, NULL); - ok(SUCCEEDED(hr), "Failed to create surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create surface, hr %#lx.\n", hr); hr = IDirectDrawSurface_QueryInterface(surface1, &IID_IDirectDrawSurface2, (void **)&src); - ok(SUCCEEDED(hr), "Failed to query IDirectDrawSurface2, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to query IDirectDrawSurface2, hr %#lx.\n", hr); IDirectDrawSurface_Release(surface1);
ckey.dwColorSpaceLowValue = 0x0000ff00; ckey.dwColorSpaceHighValue = 0x0000ff00; hr = IDirectDrawSurface2_SetColorKey(dst, DDCKEY_SRCBLT, &ckey); - ok(SUCCEEDED(hr), "Failed to set color key, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set color key, hr %#lx.\n", hr); ckey.dwColorSpaceLowValue = 0x00ff0000; ckey.dwColorSpaceHighValue = 0x00ff0000; hr = IDirectDrawSurface2_SetColorKey(dst, DDCKEY_DESTBLT, &ckey); - ok(SUCCEEDED(hr) || hr == DDERR_NOCOLORKEYHW, "Failed to set color key, hr %#x.\n", hr); + ok(SUCCEEDED(hr) || hr == DDERR_NOCOLORKEYHW, "Failed to set color key, hr %#lx.\n", hr); if (FAILED(hr)) { /* Nvidia reject dest keys, AMD allows them. This applies to vidmem and sysmem surfaces. */ @@ -13214,11 +13214,11 @@ static void test_ck_operation(void) ckey.dwColorSpaceLowValue = 0x000000ff; ckey.dwColorSpaceHighValue = 0x000000ff; hr = IDirectDrawSurface2_SetColorKey(src, DDCKEY_SRCBLT, &ckey); - ok(SUCCEEDED(hr), "Failed to set color key, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set color key, hr %#lx.\n", hr); ckey.dwColorSpaceLowValue = 0x000000aa; ckey.dwColorSpaceHighValue = 0x000000aa; hr = IDirectDrawSurface2_SetColorKey(src, DDCKEY_DESTBLT, &ckey); - ok(SUCCEEDED(hr), "Failed to set color key, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set color key, hr %#lx.\n", hr);
memset(&fx, 0, sizeof(fx)); fx.dwSize = sizeof(fx); @@ -13228,7 +13228,7 @@ static void test_ck_operation(void) fx.ddckDestColorkey.dwColorSpaceLowValue = 0x00001100;
hr = IDirectDrawSurface2_Lock(src, NULL, &surface_desc, DDLOCK_WAIT, NULL); - ok(SUCCEEDED(hr), "Failed to lock surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to lock surface, hr %#lx.\n", hr); color = surface_desc.lpSurface; color[0] = 0x000000ff; /* Applies to src blt key in src surface. */ color[1] = 0x000000aa; /* Applies to dst blt key in src surface. */ @@ -13237,77 +13237,77 @@ static void test_ck_operation(void) color[4] = 0x00001100; /* Src color key in ddbltfx. */ color[5] = 0x00110000; /* Dst color key in ddbltfx. */ hr = IDirectDrawSurface2_Unlock(src, NULL); - ok(SUCCEEDED(hr), "Failed to unlock surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to unlock surface, hr %#lx.\n", hr);
hr = IDirectDrawSurface2_Lock(dst, NULL, &surface_desc, DDLOCK_WAIT, NULL); - ok(SUCCEEDED(hr), "Failed to lock surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to lock surface, hr %#lx.\n", hr); color = surface_desc.lpSurface; color[0] = color[1] = color[2] = color[3] = color[4] = color[5] = 0x55555555; hr = IDirectDrawSurface2_Unlock(dst, NULL); - ok(SUCCEEDED(hr), "Failed to unlock surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to unlock surface, hr %#lx.\n", hr);
/* Test a blit without keying. */ hr = IDirectDrawSurface2_Blt(dst, NULL, src, NULL, 0, &fx); - ok(SUCCEEDED(hr), "Failed to blit, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to blit, hr %#lx.\n", hr);
hr = IDirectDrawSurface2_Lock(dst, NULL, &surface_desc, DDLOCK_WAIT, NULL); - ok(SUCCEEDED(hr), "Failed to lock surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to lock surface, hr %#lx.\n", hr); color = surface_desc.lpSurface; /* Should have copied src data unmodified to dst. */ ok(color[0] == 0x000000ff && color[1] == 0x000000aa && color[2] == 0x00ff0000 && color[3] == 0x0000ff00 && color[4] == 0x00001100 && color[5] == 0x00110000, - "Got unexpected content %08x %08x %08x %08x %08x %08x.\n", + "Got unexpected content %08lx %08lx %08lx %08lx %08lx %08lx.\n", color[0], color[1], color[2], color[3], color[4], color[5]);
color[0] = color[1] = color[2] = color[3] = color[4] = color[5] = 0x55555555; hr = IDirectDrawSurface2_Unlock(dst, NULL); - ok(SUCCEEDED(hr), "Failed to unlock surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to unlock surface, hr %#lx.\n", hr);
/* Src key. */ hr = IDirectDrawSurface2_Blt(dst, NULL, src, NULL, DDBLT_KEYSRC, &fx); - ok(SUCCEEDED(hr), "Failed to blit, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to blit, hr %#lx.\n", hr);
hr = IDirectDrawSurface2_Lock(dst, NULL, &surface_desc, DDLOCK_WAIT, NULL); - ok(SUCCEEDED(hr), "Failed to lock surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to lock surface, hr %#lx.\n", hr); color = surface_desc.lpSurface; /* Src key applied to color[0]. It is unmodified, the others are copied. */ ok(color[0] == 0x55555555 && color[1] == 0x000000aa && color[2] == 0x00ff0000 && color[3] == 0x0000ff00 && color[4] == 0x00001100 && color[5] == 0x00110000, - "Got unexpected content %08x %08x %08x %08x %08x %08x.\n", + "Got unexpected content %08lx %08lx %08lx %08lx %08lx %08lx.\n", color[0], color[1], color[2], color[3], color[4], color[5]);
color[0] = color[1] = color[2] = color[3] = color[4] = color[5] = 0x55555555; hr = IDirectDrawSurface2_Unlock(dst, NULL); - ok(SUCCEEDED(hr), "Failed to unlock surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to unlock surface, hr %#lx.\n", hr);
/* Src override. */ hr = IDirectDrawSurface2_Blt(dst, NULL, src, NULL, DDBLT_KEYSRCOVERRIDE, &fx); - ok(SUCCEEDED(hr), "Failed to blit, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to blit, hr %#lx.\n", hr);
hr = IDirectDrawSurface2_Lock(dst, NULL, &surface_desc, DDLOCK_WAIT, NULL); - ok(SUCCEEDED(hr), "Failed to lock surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to lock surface, hr %#lx.\n", hr); color = surface_desc.lpSurface; /* Override key applied to color[5]. It is unmodified, the others are copied. */ ok(color[0] == 0x000000ff && color[1] == 0x000000aa && color[2] == 0x00ff0000 && color[3] == 0x0000ff00 && color[4] == 0x00001100 && color[5] == 0x55555555, - "Got unexpected content %08x %08x %08x %08x %08x %08x.\n", + "Got unexpected content %08lx %08lx %08lx %08lx %08lx %08lx.\n", color[0], color[1], color[2], color[3], color[4], color[5]);
color[0] = color[1] = color[2] = color[3] = color[4] = color[5] = 0x55555555; hr = IDirectDrawSurface2_Unlock(dst, NULL); - ok(SUCCEEDED(hr), "Failed to unlock surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to unlock surface, hr %#lx.\n", hr);
/* Src override AND src key. That is not supposed to work. */ hr = IDirectDrawSurface2_Blt(dst, NULL, src, NULL, DDBLT_KEYSRC | DDBLT_KEYSRCOVERRIDE, &fx); - ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#lx.\n", hr);
hr = IDirectDrawSurface2_Lock(dst, NULL, &surface_desc, DDLOCK_WAIT, NULL); - ok(SUCCEEDED(hr), "Failed to lock surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to lock surface, hr %#lx.\n", hr); color = surface_desc.lpSurface; /* Ensure the destination was not changed. */ ok(color[0] == 0x55555555 && color[1] == 0x55555555 && color[2] == 0x55555555 && color[3] == 0x55555555 && color[4] == 0x55555555 && color[5] == 0x55555555, - "Got unexpected content %08x %08x %08x %08x %08x %08x.\n", + "Got unexpected content %08lx %08lx %08lx %08lx %08lx %08lx.\n", color[0], color[1], color[2], color[3], color[4], color[5]);
/* Use different dst colors for the dst key test. */ @@ -13318,19 +13318,19 @@ static void test_ck_operation(void) color[4] = 0x000000aa; /* Dest key in src surface. */ color[5] = 0x000000aa; /* Dest key in src surface. */ hr = IDirectDrawSurface2_Unlock(dst, NULL); - ok(SUCCEEDED(hr), "Failed to unlock surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to unlock surface, hr %#lx.\n", hr);
/* Dest key blit. The key is taken from the SOURCE surface in v2! */ hr = IDirectDrawSurface2_Blt(dst, NULL, src, NULL, DDBLT_KEYDEST, &fx); - ok(SUCCEEDED(hr), "Failed to blit, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to blit, hr %#lx.\n", hr);
hr = IDirectDrawSurface2_Lock(dst, NULL, &surface_desc, DDLOCK_WAIT, NULL); - ok(SUCCEEDED(hr), "Failed to lock surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to lock surface, hr %#lx.\n", hr); color = surface_desc.lpSurface; /* Dst key applied to color[4,5], they are the only changed pixels. */ ok(color[0] == 0x00ff0000 && color[1] == 0x00ff0000 && color[2] == 0x00001100 && color[3] == 0x00001100 && color[4] == 0x00001100 && color[5] == 0x00110000, - "Got unexpected content %08x %08x %08x %08x %08x %08x.\n", + "Got unexpected content %08lx %08lx %08lx %08lx %08lx %08lx.\n", color[0], color[1], color[2], color[3], color[4], color[5]);
color[0] = 0x00ff0000; /* Dest key in dst surface. */ @@ -13340,28 +13340,28 @@ static void test_ck_operation(void) color[4] = 0x000000aa; /* Dest key in src surface. */ color[5] = 0x000000aa; /* Dest key in src surface. */ hr = IDirectDrawSurface2_Unlock(dst, NULL); - ok(SUCCEEDED(hr), "Failed to unlock surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to unlock surface, hr %#lx.\n", hr);
/* What happens with a QI'd newer version of the interface? It takes the key * from the destination surface. */ hr = IDirectDrawSurface2_QueryInterface(src, &IID_IDirectDrawSurface7, (void **)&src7); - ok(SUCCEEDED(hr), "Failed to query IDirectDrawSurface interface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to query IDirectDrawSurface interface, hr %#lx.\n", hr); hr = IDirectDrawSurface2_QueryInterface(dst, &IID_IDirectDrawSurface7, (void **)&dst7); - ok(SUCCEEDED(hr), "Failed to query IDirectDrawSurface interface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to query IDirectDrawSurface interface, hr %#lx.\n", hr);
hr = IDirectDrawSurface7_Blt(dst7, NULL, src7, NULL, DDBLT_KEYDEST, &fx); - ok(SUCCEEDED(hr), "Failed to blit, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to blit, hr %#lx.\n", hr);
IDirectDrawSurface7_Release(dst7); IDirectDrawSurface7_Release(src7);
hr = IDirectDrawSurface2_Lock(dst, NULL, &surface_desc, DDLOCK_WAIT, NULL); - ok(SUCCEEDED(hr), "Failed to lock surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to lock surface, hr %#lx.\n", hr); color = surface_desc.lpSurface; /* Dst key applied to color[0,1], they are the only changed pixels. */ todo_wine ok(color[0] == 0x000000ff && color[1] == 0x000000aa && color[2] == 0x00001100 && color[3] == 0x00001100 && color[4] == 0x000000aa && color[5] == 0x000000aa, - "Got unexpected content %08x %08x %08x %08x %08x %08x.\n", + "Got unexpected content %08lx %08lx %08lx %08lx %08lx %08lx.\n", color[0], color[1], color[2], color[3], color[4], color[5]);
color[0] = 0x00ff0000; /* Dest key in dst surface. */ @@ -13371,19 +13371,19 @@ static void test_ck_operation(void) color[4] = 0x000000aa; /* Dest key in src surface. */ color[5] = 0x000000aa; /* Dest key in src surface. */ hr = IDirectDrawSurface2_Unlock(dst, NULL); - ok(SUCCEEDED(hr), "Failed to unlock surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to unlock surface, hr %#lx.\n", hr);
/* Dest override key blit. */ hr = IDirectDrawSurface2_Blt(dst, NULL, src, NULL, DDBLT_KEYDESTOVERRIDE, &fx); - ok(SUCCEEDED(hr), "Failed to blit, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to blit, hr %#lx.\n", hr);
hr = IDirectDrawSurface2_Lock(dst, NULL, &surface_desc, DDLOCK_WAIT, NULL); - ok(SUCCEEDED(hr), "Failed to lock surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to lock surface, hr %#lx.\n", hr); color = surface_desc.lpSurface; /* Dst key applied to color[2,3], they are the only changed pixels. */ ok(color[0] == 0x00ff0000 && color[1] == 0x00ff0000 && color[2] == 0x00ff0000 && color[3] == 0x0000ff00 && color[4] == 0x000000aa && color[5] == 0x000000aa, - "Got unexpected content %08x %08x %08x %08x %08x %08x.\n", + "Got unexpected content %08lx %08lx %08lx %08lx %08lx %08lx.\n", color[0], color[1], color[2], color[3], color[4], color[5]);
color[0] = 0x00ff0000; /* Dest key in dst surface. */ @@ -13393,38 +13393,38 @@ static void test_ck_operation(void) color[4] = 0x000000aa; /* Dest key in src surface. */ color[5] = 0x000000aa; /* Dest key in src surface. */ hr = IDirectDrawSurface2_Unlock(dst, NULL); - ok(SUCCEEDED(hr), "Failed to unlock surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to unlock surface, hr %#lx.\n", hr);
/* Dest override together with surface key. Supposed to fail. */ hr = IDirectDrawSurface2_Blt(dst, NULL, src, NULL, DDBLT_KEYDEST | DDBLT_KEYDESTOVERRIDE, &fx); - ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#lx.\n", hr);
hr = IDirectDrawSurface2_Lock(dst, NULL, &surface_desc, DDLOCK_WAIT, NULL); - ok(SUCCEEDED(hr), "Failed to lock surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to lock surface, hr %#lx.\n", hr); color = surface_desc.lpSurface; /* Destination is unchanged. */ ok(color[0] == 0x00ff0000 && color[1] == 0x00ff0000 && color[2] == 0x00001100 && color[3] == 0x00001100 && color[4] == 0x000000aa && color[5] == 0x000000aa, - "Got unexpected content %08x %08x %08x %08x %08x %08x.\n", + "Got unexpected content %08lx %08lx %08lx %08lx %08lx %08lx.\n", color[0], color[1], color[2], color[3], color[4], color[5]); hr = IDirectDrawSurface2_Unlock(dst, NULL); - ok(SUCCEEDED(hr), "Failed to unlock surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to unlock surface, hr %#lx.\n", hr);
/* Source and destination key. This is driver dependent. New HW treats it like * DDBLT_KEYSRC. Older HW and some software renderers apply both keys. */ if (0) { hr = IDirectDrawSurface2_Blt(dst, NULL, src, NULL, DDBLT_KEYDEST | DDBLT_KEYSRC, &fx); - ok(SUCCEEDED(hr), "Failed to blit, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to blit, hr %#lx.\n", hr);
hr = IDirectDrawSurface2_Lock(dst, NULL, &surface_desc, DDLOCK_WAIT, NULL); - ok(SUCCEEDED(hr), "Failed to lock surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to lock surface, hr %#lx.\n", hr); color = surface_desc.lpSurface; /* Color[0] is filtered by the src key, 2-5 are filtered by the dst key, if * the driver applies it. */ ok(color[0] == 0x00ff0000 && color[1] == 0x000000aa && color[2] == 0x00ff0000 && color[3] == 0x0000ff00 && color[4] == 0x00001100 && color[5] == 0x00110000, - "Got unexpected content %08x %08x %08x %08x %08x %08x.\n", + "Got unexpected content %08lx %08lx %08lx %08lx %08lx %08lx.\n", color[0], color[1], color[2], color[3], color[4], color[5]);
color[0] = 0x00ff0000; /* Dest key in dst surface. */ @@ -13434,69 +13434,69 @@ static void test_ck_operation(void) color[4] = 0x000000aa; /* Dest key in src surface. */ color[5] = 0x000000aa; /* Dest key in src surface. */ hr = IDirectDrawSurface2_Unlock(dst, NULL); - ok(SUCCEEDED(hr), "Failed to unlock surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to unlock surface, hr %#lx.\n", hr); }
/* Override keys without ddbltfx parameter fail */ hr = IDirectDrawSurface2_Blt(dst, NULL, src, NULL, DDBLT_KEYDESTOVERRIDE, NULL); - ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface2_Blt(dst, NULL, src, NULL, DDBLT_KEYSRCOVERRIDE, NULL); - ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#lx.\n", hr);
/* Try blitting without keys in the source surface. */ hr = IDirectDrawSurface2_SetColorKey(src, DDCKEY_SRCBLT, NULL); - ok(SUCCEEDED(hr), "Failed to set color key, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set color key, hr %#lx.\n", hr); hr = IDirectDrawSurface2_SetColorKey(src, DDCKEY_DESTBLT, NULL); - ok(SUCCEEDED(hr), "Failed to set color key, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set color key, hr %#lx.\n", hr);
/* That fails now. Do not bother to check that the data is unmodified. */ hr = IDirectDrawSurface2_Blt(dst, NULL, src, NULL, DDBLT_KEYSRC, &fx); - ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#lx.\n", hr);
/* Surprisingly this still works. It uses the old key from the src surface. */ hr = IDirectDrawSurface2_Blt(dst, NULL, src, NULL, DDBLT_KEYDEST, &fx); - ok(SUCCEEDED(hr), "Failed to blit, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to blit, hr %#lx.\n", hr);
hr = IDirectDrawSurface2_Lock(dst, NULL, &surface_desc, DDLOCK_WAIT, NULL); - ok(SUCCEEDED(hr), "Failed to lock surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to lock surface, hr %#lx.\n", hr); color = surface_desc.lpSurface; /* Dst key applied to color[4,5], they are the only changed pixels. */ ok(color[0] == 0x00ff0000 && color[1] == 0x00ff0000 && color[2] == 0x00001100 && color[3] == 0x00001100 && color[4] == 0x00001100 && color[5] == 0x00110000, - "Got unexpected content %08x %08x %08x %08x %08x %08x.\n", + "Got unexpected content %08lx %08lx %08lx %08lx %08lx %08lx.\n", color[0], color[1], color[2], color[3], color[4], color[5]); hr = IDirectDrawSurface2_Unlock(dst, NULL); - ok(SUCCEEDED(hr), "Failed to unlock surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to unlock surface, hr %#lx.\n", hr);
/* This returns DDERR_NOCOLORKEY as expected. */ hr = IDirectDrawSurface2_GetColorKey(src, DDCKEY_DESTBLT, &ckey); - ok(hr == DDERR_NOCOLORKEY, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_NOCOLORKEY, "Got unexpected hr %#lx.\n", hr);
/* GetSurfaceDesc returns a zeroed key as expected. */ surface_desc.ddckCKSrcBlt.dwColorSpaceLowValue = 0x12345678; surface_desc.ddckCKSrcBlt.dwColorSpaceHighValue = 0x12345678; hr = IDirectDrawSurface2_GetSurfaceDesc(src, &surface_desc); - ok(SUCCEEDED(hr), "Failed to get surface desc, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get surface desc, hr %#lx.\n", hr); ok(!surface_desc.ddckCKSrcBlt.dwColorSpaceLowValue && !surface_desc.ddckCKSrcBlt.dwColorSpaceHighValue, - "Got unexpected color key low=%08x high=%08x.\n", surface_desc.ddckCKSrcBlt.dwColorSpaceLowValue, + "Got unexpected color key low=%08lx high=%08lx.\n", surface_desc.ddckCKSrcBlt.dwColorSpaceLowValue, surface_desc.ddckCKSrcBlt.dwColorSpaceHighValue);
/* Try blitting without keys in the destination surface. */ hr = IDirectDrawSurface2_SetColorKey(dst, DDCKEY_SRCBLT, NULL); - ok(SUCCEEDED(hr), "Failed to set color key, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set color key, hr %#lx.\n", hr); hr = IDirectDrawSurface2_SetColorKey(dst, DDCKEY_DESTBLT, NULL); - ok(SUCCEEDED(hr), "Failed to set color key, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set color key, hr %#lx.\n", hr);
/* This fails, as sanity would dictate. */ hr = IDirectDrawSurface2_Blt(dst, NULL, src, NULL, DDBLT_KEYDEST, &fx); - ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#lx.\n", hr);
done: IDirectDrawSurface2_Release(src); IDirectDrawSurface2_Release(dst); refcount = IDirectDraw2_Release(ddraw); - ok(!refcount, "DirectDraw has %u references left.\n", refcount); + ok(!refcount, "DirectDraw has %lu references left.\n", refcount); DestroyWindow(window); }
@@ -13520,26 +13520,26 @@ static void test_set_render_state(void) }
hr = IDirect3DDevice2_SetRenderState(device, D3DRENDERSTATE_ZVISIBLE, TRUE); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirect3DDevice2_SetRenderState(device, D3DRENDERSTATE_ZVISIBLE, FALSE); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
hr = IDirect3DDevice2_SetRenderState(device, D3DRENDERSTATE_TEXTUREHANDLE, 0); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); state = 0xdeadbeef; hr = IDirect3DDevice2_GetRenderState(device, D3DRENDERSTATE_TEXTUREHANDLE, &state); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); - ok(!state, "Got unexpected render state %#x.\n", state); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); + ok(!state, "Got unexpected render state %#lx.\n", state); hr = IDirect3DDevice2_SetRenderState(device, D3DRENDERSTATE_TEXTUREMAPBLEND, D3DTBLEND_MODULATE); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirect3DDevice2_GetRenderState(device, D3DRENDERSTATE_TEXTUREMAPBLEND, &state); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); - ok(state == D3DTBLEND_MODULATE, "Got unexpected render state %#x.\n", state); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); + ok(state == D3DTBLEND_MODULATE, "Got unexpected render state %#lx.\n", state);
refcount = IDirect3DDevice2_Release(device); - ok(!refcount, "Device has %u references left.\n", refcount); + ok(!refcount, "Device has %lu references left.\n", refcount); refcount = IDirectDraw2_Release(ddraw); - ok(!refcount, "DirectDraw has %u references left.\n", refcount); + ok(!refcount, "DirectDraw has %lu references left.\n", refcount); DestroyWindow(window); }
@@ -13592,16 +13592,16 @@ static void test_depth_readback(void) }
hr = IDirect3DDevice2_GetRenderTarget(device, &rt); - ok(SUCCEEDED(hr), "Failed to get render target, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get render target, hr %#lx.\n", hr); blue_background = create_diffuse_material(device, 0.0f, 0.0f, 1.0f, 1.0f); viewport = create_viewport(device, 0, 0, 640, 480); viewport_set_background(device, viewport, blue_background); hr = IDirect3DDevice2_SetCurrentViewport(device, viewport); - ok(SUCCEEDED(hr), "Failed to set current viewport, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set current viewport, hr %#lx.\n", hr);
ds = get_depth_stencil(device); hr = IDirectDrawSurface_DeleteAttachedSurface(rt, 0, ds); - ok(SUCCEEDED(hr), "Failed to detach depth buffer, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to detach depth buffer, hr %#lx.\n", hr); IDirectDrawSurface_Release(ds);
for (i = 0; i < ARRAY_SIZE(tests); ++i) @@ -13621,23 +13621,23 @@ static void test_depth_readback(void) }
hr = IDirectDrawSurface_AddAttachedSurface(rt, ds); - ok(SUCCEEDED(hr), "Failed to attach depth buffer, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to attach depth buffer, hr %#lx.\n", hr); hr = IDirect3DDevice2_SetRenderTarget(device, rt, 0); - ok(SUCCEEDED(hr), "Failed to set render target, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set render target, hr %#lx.\n", hr);
hr = IDirect3DViewport2_Clear(viewport, 1, &clear_rect, D3DCLEAR_TARGET | D3DCLEAR_ZBUFFER); - ok(SUCCEEDED(hr), "Failed to clear, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to clear, hr %#lx.\n", hr); hr = IDirect3DDevice2_BeginScene(device); - ok(SUCCEEDED(hr), "Failed to begin scene, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to begin scene, hr %#lx.\n", hr); hr = IDirect3DDevice2_DrawPrimitive(device, D3DPT_TRIANGLESTRIP, D3DVT_LVERTEX, quad, 4, 0); - ok(SUCCEEDED(hr), "Failed to draw, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to draw, hr %#lx.\n", hr); hr = IDirect3DDevice2_EndScene(device); - ok(SUCCEEDED(hr), "Failed to end scene, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to end scene, hr %#lx.\n", hr);
memset(&surface_desc, 0, sizeof(surface_desc)); surface_desc.dwSize = sizeof(surface_desc); hr = IDirectDrawSurface_Lock(ds, NULL, &surface_desc, DDLOCK_READONLY | DDLOCK_WAIT, NULL); - ok(SUCCEEDED(hr), "Failed to lock surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to lock surface, hr %#lx.\n", hr);
all_pass = TRUE; for (y = 60; y < 480; y += 120) @@ -13655,7 +13655,7 @@ static void test_depth_readback(void) * Accept all nvidia GPUs as broken here, but still expect one of the formats to pass. */ ok(compare_uint(expected_depth, depth, max_diff) || ddraw_is_nvidia(ddraw) || (ddraw_is_amd(ddraw) && tests[i].z_depth == 24), - "Test %u: Got depth 0x%08x (diff %d), expected 0x%08x+/-%u, at %u, %u.\n", + "Test %u: Got depth 0x%08lx (diff %ld), expected 0x%08lx+/-%lu, at %u, %u.\n", i, depth, expected_depth - depth, expected_depth, max_diff, x, y); if (!compare_uint(expected_depth, depth, max_diff)) all_pass = FALSE; @@ -13663,13 +13663,13 @@ static void test_depth_readback(void) }
hr = IDirectDrawSurface_Unlock(ds, NULL); - ok(SUCCEEDED(hr), "Failed to unlock surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to unlock surface, hr %#lx.\n", hr);
if (all_pass) passed_fmts++;
hr = IDirectDrawSurface_DeleteAttachedSurface(rt, 0, ds); - ok(SUCCEEDED(hr), "Failed to detach depth buffer, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to detach depth buffer, hr %#lx.\n", hr); IDirectDrawSurface_Release(ds); }
@@ -13679,7 +13679,7 @@ static void test_depth_readback(void) destroy_material(blue_background); IDirectDrawSurface_Release(rt); refcount = IDirect3DDevice2_Release(device); - ok(!refcount, "Device has %u references left.\n", refcount); + ok(!refcount, "Device has %lu references left.\n", refcount); IDirectDraw2_Release(ddraw); DestroyWindow(window); } @@ -13709,11 +13709,11 @@ static void test_clear(void) return; } hr = IDirect3DDevice2_GetRenderTarget(device, &rt); - ok(SUCCEEDED(hr), "Failed to get render target, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get render target, hr %#lx.\n", hr);
viewport = create_viewport(device, 0, 0, 640, 480); hr = IDirect3DDevice2_SetCurrentViewport(device, viewport); - ok(SUCCEEDED(hr), "Failed to set current viewport, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set current viewport, hr %#lx.\n", hr);
white = create_diffuse_material(device, 1.0f, 1.0f, 1.0f, 1.0f); red = create_diffuse_material(device, 1.0f, 0.0f, 0.0f, 1.0f); @@ -13722,7 +13722,7 @@ static void test_clear(void)
viewport_set_background(device, viewport, white); hr = IDirect3DViewport2_Clear(viewport, 1, &rect_full, D3DCLEAR_TARGET); - ok(SUCCEEDED(hr), "Failed to clear, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to clear, hr %#lx.\n", hr);
/* Positive x, negative y. */ U1(rect[0]).x1 = 0; @@ -13740,20 +13740,20 @@ static void test_clear(void) * refuse negative rectangles, but it will not clear them either. */ viewport_set_background(device, viewport, red); hr = IDirect3DViewport2_Clear(viewport, 2, rect, D3DCLEAR_TARGET); - ok(SUCCEEDED(hr), "Failed to clear, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to clear, hr %#lx.\n", hr);
color = get_surface_color(rt, 160, 360); - ok(compare_color(color, 0x00ffffff, 0), "Clear rectangle 3 (pos, neg) has color 0x%08x.\n", color); + ok(compare_color(color, 0x00ffffff, 0), "Clear rectangle 3 (pos, neg) has color 0x%08lx.\n", color); color = get_surface_color(rt, 160, 120); - ok(compare_color(color, 0x00ff0000, 0), "Clear rectangle 1 (pos, pos) has color 0x%08x.\n", color); + ok(compare_color(color, 0x00ff0000, 0), "Clear rectangle 1 (pos, pos) has color 0x%08lx.\n", color); color = get_surface_color(rt, 480, 360); - ok(compare_color(color, 0x00ffffff, 0), "Clear rectangle 4 (NULL) has color 0x%08x.\n", color); + ok(compare_color(color, 0x00ffffff, 0), "Clear rectangle 4 (NULL) has color 0x%08lx.\n", color); color = get_surface_color(rt, 480, 120); - ok(compare_color(color, 0x00ffffff, 0), "Clear rectangle 4 (neg, neg) has color 0x%08x.\n", color); + ok(compare_color(color, 0x00ffffff, 0), "Clear rectangle 4 (neg, neg) has color 0x%08lx.\n", color);
viewport_set_background(device, viewport, white); hr = IDirect3DViewport2_Clear(viewport, 1, &rect_full, D3DCLEAR_TARGET); - ok(SUCCEEDED(hr), "Failed to clear, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to clear, hr %#lx.\n", hr);
/* negative x, negative y. * Also ignored, except on WARP, which clears the entire screen. */ @@ -13763,41 +13763,41 @@ static void test_clear(void) U4(rect_negneg).y2 = 0; viewport_set_background(device, viewport, green); hr = IDirect3DViewport2_Clear(viewport, 1, &rect_negneg, D3DCLEAR_TARGET); - ok(SUCCEEDED(hr), "Failed to clear, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to clear, hr %#lx.\n", hr);
color = get_surface_color(rt, 160, 360); ok(compare_color(color, 0x00ffffff, 0) || broken(ddraw_is_warp(ddraw) && compare_color(color, 0x0000ff00, 0)), - "Got unexpected color 0x%08x.\n", color); + "Got unexpected color 0x%08lx.\n", color); color = get_surface_color(rt, 160, 120); ok(compare_color(color, 0x00ffffff, 0) || broken(ddraw_is_warp(ddraw) && compare_color(color, 0x0000ff00, 0)), - "Got unexpected color 0x%08x.\n", color); + "Got unexpected color 0x%08lx.\n", color); color = get_surface_color(rt, 480, 360); ok(compare_color(color, 0x00ffffff, 0) || broken(ddraw_is_warp(ddraw) && compare_color(color, 0x0000ff00, 0)), - "Got unexpected color 0x%08x.\n", color); + "Got unexpected color 0x%08lx.\n", color); color = get_surface_color(rt, 480, 120); ok(compare_color(color, 0x00ffffff, 0) || broken(ddraw_is_warp(ddraw) && compare_color(color, 0x0000ff00, 0)), - "Got unexpected color 0x%08x.\n", color); + "Got unexpected color 0x%08lx.\n", color);
/* Test how the viewport affects clears. */ viewport_set_background(device, viewport, white); hr = IDirect3DViewport2_Clear(viewport, 1, &rect_full, D3DCLEAR_TARGET); - ok(SUCCEEDED(hr), "Failed to clear, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to clear, hr %#lx.\n", hr);
viewport2 = create_viewport(device, 160, 120, 160, 120); hr = IDirect3DDevice2_SetCurrentViewport(device, viewport2); - ok(SUCCEEDED(hr), "Failed to set current viewport, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set current viewport, hr %#lx.\n", hr);
viewport_set_background(device, viewport2, blue); hr = IDirect3DViewport2_Clear(viewport2, 1, &rect_full, D3DCLEAR_TARGET); - ok(SUCCEEDED(hr), "Failed to clear, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to clear, hr %#lx.\n", hr);
viewport3 = create_viewport(device, 320, 240, 320, 240); hr = IDirect3DDevice2_SetCurrentViewport(device, viewport3); - ok(SUCCEEDED(hr), "Failed to set current viewport, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set current viewport, hr %#lx.\n", hr);
U1(rect[0]).x1 = 160; U2(rect[0]).y1 = 120; @@ -13805,84 +13805,84 @@ static void test_clear(void) U4(rect[0]).y2 = 360; viewport_set_background(device, viewport3, green); hr = IDirect3DViewport2_Clear(viewport3, 1, &rect[0], D3DCLEAR_TARGET); - ok(SUCCEEDED(hr), "Failed to clear, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to clear, hr %#lx.\n", hr);
hr = IDirect3DDevice2_SetCurrentViewport(device, viewport); - ok(SUCCEEDED(hr), "Failed to set current viewport, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set current viewport, hr %#lx.\n", hr);
color = get_surface_color(rt, 158, 118); - ok(compare_color(color, 0x00ffffff, 0), "(158, 118) has color 0x%08x.\n", color); + ok(compare_color(color, 0x00ffffff, 0), "(158, 118) has color 0x%08lx.\n", color); color = get_surface_color(rt, 162, 118); - ok(compare_color(color, 0x00ffffff, 0), "(162, 118) has color 0x%08x.\n", color); + ok(compare_color(color, 0x00ffffff, 0), "(162, 118) has color 0x%08lx.\n", color); color = get_surface_color(rt, 158, 122); - ok(compare_color(color, 0x00ffffff, 0), "(158, 122) has color 0x%08x.\n", color); + ok(compare_color(color, 0x00ffffff, 0), "(158, 122) has color 0x%08lx.\n", color); color = get_surface_color(rt, 162, 122); - ok(compare_color(color, 0x000000ff, 0), "(162, 122) has color 0x%08x.\n", color); + ok(compare_color(color, 0x000000ff, 0), "(162, 122) has color 0x%08lx.\n", color);
color = get_surface_color(rt, 318, 238); - ok(compare_color(color, 0x000000ff, 0), "(318, 238) has color 0x%08x.\n", color); + ok(compare_color(color, 0x000000ff, 0), "(318, 238) has color 0x%08lx.\n", color); color = get_surface_color(rt, 322, 238); - ok(compare_color(color, 0x00ffffff, 0), "(322, 238) has color 0x%08x.\n", color); + ok(compare_color(color, 0x00ffffff, 0), "(322, 238) has color 0x%08lx.\n", color); color = get_surface_color(rt, 318, 242); - ok(compare_color(color, 0x00ffffff, 0), "(318, 242) has color 0x%08x.\n", color); + ok(compare_color(color, 0x00ffffff, 0), "(318, 242) has color 0x%08lx.\n", color); color = get_surface_color(rt, 322, 242); - ok(compare_color(color, 0x0000ff00, 0), "(322, 242) has color 0x%08x.\n", color); + ok(compare_color(color, 0x0000ff00, 0), "(322, 242) has color 0x%08lx.\n", color);
color = get_surface_color(rt, 478, 358); - ok(compare_color(color, 0x0000ff00, 0), "(478, 358) has color 0x%08x.\n", color); + ok(compare_color(color, 0x0000ff00, 0), "(478, 358) has color 0x%08lx.\n", color); color = get_surface_color(rt, 482, 358); - ok(compare_color(color, 0x00ffffff, 0), "(482, 358) has color 0x%08x.\n", color); + ok(compare_color(color, 0x00ffffff, 0), "(482, 358) has color 0x%08lx.\n", color); color = get_surface_color(rt, 478, 362); - ok(compare_color(color, 0x00ffffff, 0), "(478, 362) has color 0x%08x.\n", color); + ok(compare_color(color, 0x00ffffff, 0), "(478, 362) has color 0x%08lx.\n", color); color = get_surface_color(rt, 482, 362); - ok(compare_color(color, 0x00ffffff, 0), "(482, 362) has color 0x%08x.\n", color); + ok(compare_color(color, 0x00ffffff, 0), "(482, 362) has color 0x%08lx.\n", color);
/* The clear rectangle is rendertarget absolute, not relative to the * viewport. */ hr = IDirect3DViewport2_Clear(viewport, 1, &rect_full, D3DCLEAR_TARGET); - ok(SUCCEEDED(hr), "Failed to clear, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to clear, hr %#lx.\n", hr); U1(rect[0]).x1 = 330; U2(rect[0]).y1 = 250; U3(rect[0]).x2 = 340; U4(rect[0]).y2 = 260; hr = IDirect3DViewport2_Clear(viewport3, 1, &rect[0], D3DCLEAR_TARGET); - ok(SUCCEEDED(hr), "Failed to clear, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to clear, hr %#lx.\n", hr);
color = get_surface_color(rt, 328, 248); - ok(compare_color(color, 0x00ffffff, 0), "(328, 248) has color 0x%08x.\n", color); + ok(compare_color(color, 0x00ffffff, 0), "(328, 248) has color 0x%08lx.\n", color); color = get_surface_color(rt, 332, 248); - ok(compare_color(color, 0x00ffffff, 0), "(332, 248) has color 0x%08x.\n", color); + ok(compare_color(color, 0x00ffffff, 0), "(332, 248) has color 0x%08lx.\n", color); color = get_surface_color(rt, 328, 252); - ok(compare_color(color, 0x00ffffff, 0), "(328, 252) has color 0x%08x.\n", color); + ok(compare_color(color, 0x00ffffff, 0), "(328, 252) has color 0x%08lx.\n", color); color = get_surface_color(rt, 332, 252); - ok(compare_color(color, 0x0000ff00, 0), "(332, 252) has color 0x%08x.\n", color); + ok(compare_color(color, 0x0000ff00, 0), "(332, 252) has color 0x%08lx.\n", color);
color = get_surface_color(rt, 338, 248); - ok(compare_color(color, 0x00ffffff, 0), "(338, 248) has color 0x%08x.\n", color); + ok(compare_color(color, 0x00ffffff, 0), "(338, 248) has color 0x%08lx.\n", color); color = get_surface_color(rt, 342, 248); - ok(compare_color(color, 0x00ffffff, 0), "(342, 248) has color 0x%08x.\n", color); + ok(compare_color(color, 0x00ffffff, 0), "(342, 248) has color 0x%08lx.\n", color); color = get_surface_color(rt, 338, 252); - ok(compare_color(color, 0x0000ff00, 0), "(338, 252) has color 0x%08x.\n", color); + ok(compare_color(color, 0x0000ff00, 0), "(338, 252) has color 0x%08lx.\n", color); color = get_surface_color(rt, 342, 252); - ok(compare_color(color, 0x00ffffff, 0), "(342, 252) has color 0x%08x.\n", color); + ok(compare_color(color, 0x00ffffff, 0), "(342, 252) has color 0x%08lx.\n", color);
color = get_surface_color(rt, 328, 258); - ok(compare_color(color, 0x00ffffff, 0), "(328, 258) has color 0x%08x.\n", color); + ok(compare_color(color, 0x00ffffff, 0), "(328, 258) has color 0x%08lx.\n", color); color = get_surface_color(rt, 332, 258); - ok(compare_color(color, 0x0000ff00, 0), "(332, 258) has color 0x%08x.\n", color); + ok(compare_color(color, 0x0000ff00, 0), "(332, 258) has color 0x%08lx.\n", color); color = get_surface_color(rt, 328, 262); - ok(compare_color(color, 0x00ffffff, 0), "(328, 262) has color 0x%08x.\n", color); + ok(compare_color(color, 0x00ffffff, 0), "(328, 262) has color 0x%08lx.\n", color); color = get_surface_color(rt, 332, 262); - ok(compare_color(color, 0x00ffffff, 0), "(332, 262) has color 0x%08x.\n", color); + ok(compare_color(color, 0x00ffffff, 0), "(332, 262) has color 0x%08lx.\n", color);
color = get_surface_color(rt, 338, 258); - ok(compare_color(color, 0x0000ff00, 0), "(338, 258) has color 0x%08x.\n", color); + ok(compare_color(color, 0x0000ff00, 0), "(338, 258) has color 0x%08lx.\n", color); color = get_surface_color(rt, 342, 258); - ok(compare_color(color, 0x00ffffff, 0), "(342, 258) has color 0x%08x.\n", color); + ok(compare_color(color, 0x00ffffff, 0), "(342, 258) has color 0x%08lx.\n", color); color = get_surface_color(rt, 338, 262); - ok(compare_color(color, 0x00ffffff, 0), "(338, 262) has color 0x%08x.\n", color); + ok(compare_color(color, 0x00ffffff, 0), "(338, 262) has color 0x%08lx.\n", color); color = get_surface_color(rt, 342, 262); - ok(compare_color(color, 0x00ffffff, 0), "(342, 262) has color 0x%08x.\n", color); + ok(compare_color(color, 0x00ffffff, 0), "(342, 262) has color 0x%08lx.\n", color);
/* COLORWRITEENABLE, SRGBWRITEENABLE and scissor rectangles do not exist * in d3d2. */ @@ -13896,9 +13896,9 @@ static void test_clear(void) IDirect3DMaterial2_Release(blue); IDirectDrawSurface_Release(rt); refcount = IDirect3DDevice2_Release(device); - ok(!refcount, "Device has %u references left.\n", refcount); + ok(!refcount, "Device has %lu references left.\n", refcount); refcount = IDirectDraw2_Release(ddraw); - ok(!refcount, "Ddraw object has %u references left.\n", refcount); + ok(!refcount, "Ddraw object has %lu references left.\n", refcount); DestroyWindow(window); }
@@ -13956,12 +13956,12 @@ static HRESULT WINAPI enum_surfaces_create_cb(IDirectDrawSurface *surface, DDSUR struct enum_surfaces_param *param = context;
ok(!surface, "Unexpected surface %p.\n", surface); - ok((desc->dwFlags & expect_flags) == expect_flags, "Got unexpected flags %#x.\n", desc->dwFlags); + ok((desc->dwFlags & expect_flags) == expect_flags, "Got unexpected flags %#lx.\n", desc->dwFlags); if (param->count < ARRAY_SIZE(param->modes)) { const DDSURFACEDESC *expect = ¶m->modes[param->count]; - ok(desc->dwWidth == expect->dwWidth, "Expected width %u, got %u.\n", expect->dwWidth, desc->dwWidth); - ok(desc->dwHeight == expect->dwHeight, "Expected height %u, got %u.\n", expect->dwHeight, desc->dwHeight); + ok(desc->dwWidth == expect->dwWidth, "Expected width %lu, got %lu.\n", expect->dwWidth, desc->dwWidth); + ok(desc->dwHeight == expect->dwHeight, "Expected height %lu, got %lu.\n", expect->dwHeight, desc->dwHeight); ok(!memcmp(&U4(*desc).ddpfPixelFormat, &U4(*expect).ddpfPixelFormat, sizeof(U4(*desc).ddpfPixelFormat)), "Pixel formats didn't match.\n"); } @@ -13986,18 +13986,18 @@ static void test_enum_surfaces(void) memset(&desc, 0, sizeof(desc)); desc.dwSize = sizeof(desc); hr = IDirectDraw2_GetDisplayMode(ddraw, &desc); - ok(hr == DD_OK, "Failed to get display mode, hr %#x.\n", hr); + ok(hr == DD_OK, "Failed to get display mode, hr %#lx.\n", hr); current_format = desc.ddpfPixelFormat;
hr = IDirectDraw2_SetCooperativeLevel(ddraw, NULL, DDSCL_NORMAL); - ok(hr == DD_OK, "Failed to set cooperative level, hr %#x.\n", hr); + ok(hr == DD_OK, "Failed to set cooperative level, hr %#lx.\n", hr);
hr = IDirectDraw2_EnumSurfaces(ddraw, DDENUMSURFACES_ALL, NULL, NULL, enum_surfaces_cb); - ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#lx.\n", hr);
hr = IDirectDraw2_EnumSurfaces(ddraw, DDENUMSURFACES_CANBECREATED | DDENUMSURFACES_ALL, NULL, NULL, enum_surfaces_cb); - ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#lx.\n", hr);
memset(&desc, 0, sizeof(desc)); desc.dwSize = sizeof(desc); @@ -14007,52 +14007,52 @@ static void test_enum_surfaces(void) desc.dwWidth = 32; desc.dwHeight = 32; hr = IDirectDraw2_CreateSurface(ddraw, &desc, ¶m.surfaces[0], NULL); - ok(SUCCEEDED(hr), "Failed to create a surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create a surface, hr %#lx.\n", hr);
hr = IDirectDrawSurface_GetAttachedSurface(param.surfaces[0], &desc.ddsCaps, ¶m.surfaces[1]); - ok(SUCCEEDED(hr), "Failed to get attached surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get attached surface, hr %#lx.\n", hr); hr = IDirectDrawSurface_GetAttachedSurface(param.surfaces[1], &desc.ddsCaps, ¶m.surfaces[2]); - ok(SUCCEEDED(hr), "Failed to get attached surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get attached surface, hr %#lx.\n", hr); hr = IDirectDrawSurface_GetAttachedSurface(param.surfaces[2], &desc.ddsCaps, ¶m.surfaces[3]); - ok(hr == DDERR_NOTFOUND, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_NOTFOUND, "Got unexpected hr %#lx.\n", hr); ok(!param.surfaces[3], "Got unexpected pointer %p.\n", param.surfaces[3]);
param.count = 0; hr = IDirectDraw2_EnumSurfaces(ddraw, DDENUMSURFACES_DOESEXIST | DDENUMSURFACES_ALL, &desc, ¶m, enum_surfaces_cb); - ok(SUCCEEDED(hr), "Failed to enumerate surfaces, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to enumerate surfaces, hr %#lx.\n", hr); ok(param.count == 3, "Got unexpected number of enumerated surfaces %u.\n", param.count);
param.count = 0; hr = IDirectDraw2_EnumSurfaces(ddraw, DDENUMSURFACES_DOESEXIST | DDENUMSURFACES_ALL, NULL, ¶m, enum_surfaces_cb); - ok(SUCCEEDED(hr), "Failed to enumerate surfaces, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to enumerate surfaces, hr %#lx.\n", hr); ok(param.count == 3, "Got unexpected number of enumerated surfaces %u.\n", param.count);
desc.dwFlags = DDSD_WIDTH | DDSD_HEIGHT; param.count = 0; hr = IDirectDraw2_EnumSurfaces(ddraw, DDENUMSURFACES_DOESEXIST | DDENUMSURFACES_MATCH, &desc, ¶m, enum_surfaces_cb); - ok(hr == DD_OK, "Failed to enumerate surfaces, hr %#x.\n", hr); + ok(hr == DD_OK, "Failed to enumerate surfaces, hr %#lx.\n", hr); ok(param.count == 1, "Got unexpected number of enumerated surfaces %u.\n", param.count);
param.count = 0; hr = IDirectDraw2_EnumSurfaces(ddraw, DDENUMSURFACES_DOESEXIST | DDENUMSURFACES_NOMATCH, &desc, ¶m, enum_surfaces_cb); - ok(hr == DD_OK, "Failed to enumerate surfaces, hr %#x.\n", hr); + ok(hr == DD_OK, "Failed to enumerate surfaces, hr %#lx.\n", hr); ok(param.count == 2, "Got unexpected number of enumerated surfaces %u.\n", param.count);
desc.dwFlags = 0; param.count = 0; hr = IDirectDraw2_EnumSurfaces(ddraw, DDENUMSURFACES_DOESEXIST | DDENUMSURFACES_MATCH, &desc, ¶m, enum_surfaces_cb); - ok(hr == DD_OK, "Failed to enumerate surfaces, hr %#x.\n", hr); + ok(hr == DD_OK, "Failed to enumerate surfaces, hr %#lx.\n", hr); ok(param.count == 3, "Got unexpected number of enumerated surfaces %u.\n", param.count);
desc.dwFlags = 0; param.count = 0; hr = IDirectDraw2_EnumSurfaces(ddraw, DDENUMSURFACES_DOESEXIST, &desc, ¶m, enum_surfaces_cb); - ok(hr == DD_OK, "Failed to enumerate surfaces, hr %#x.\n", hr); + ok(hr == DD_OK, "Failed to enumerate surfaces, hr %#lx.\n", hr); ok(param.count == 3, "Got unexpected number of enumerated surfaces %u.\n", param.count);
IDirectDrawSurface_Release(param.surfaces[2]); @@ -14062,7 +14062,7 @@ static void test_enum_surfaces(void) param.count = 0; hr = IDirectDraw2_EnumSurfaces(ddraw, DDENUMSURFACES_DOESEXIST | DDENUMSURFACES_ALL, NULL, ¶m, enum_surfaces_cb); - ok(hr == DD_OK, "Failed to enumerate surfaces, hr %#x.\n", hr); + ok(hr == DD_OK, "Failed to enumerate surfaces, hr %#lx.\n", hr); ok(!param.count, "Got unexpected number of enumerated surfaces %u.\n", param.count);
memset(&desc, 0, sizeof(desc)); @@ -14072,15 +14072,15 @@ static void test_enum_surfaces(void)
hr = IDirectDraw2_EnumSurfaces(ddraw, DDENUMSURFACES_CANBECREATED | DDENUMSURFACES_ALL, &desc, ¶m, enum_surfaces_create_cb); - ok(hr == DDERR_INVALIDPARAMS, "Failed to enumerate surfaces, hr %#x.\n", hr); + ok(hr == DDERR_INVALIDPARAMS, "Failed to enumerate surfaces, hr %#lx.\n", hr);
hr = IDirectDraw2_EnumSurfaces(ddraw, DDENUMSURFACES_CANBECREATED | DDENUMSURFACES_NOMATCH, &desc, ¶m, enum_surfaces_create_cb); - ok(hr == DDERR_INVALIDPARAMS, "Failed to enumerate surfaces, hr %#x.\n", hr); + ok(hr == DDERR_INVALIDPARAMS, "Failed to enumerate surfaces, hr %#lx.\n", hr);
hr = IDirectDraw2_EnumSurfaces(ddraw, DDENUMSURFACES_CANBECREATED, &desc, ¶m, enum_surfaces_create_cb); - ok(hr == DDERR_INVALIDPARAMS, "Failed to enumerate surfaces, hr %#x.\n", hr); + ok(hr == DDERR_INVALIDPARAMS, "Failed to enumerate surfaces, hr %#lx.\n", hr);
/* When not passed width and height, the callback is called with every * available display resolution. */ @@ -14089,13 +14089,13 @@ static void test_enum_surfaces(void) desc.dwFlags |= DDSD_PIXELFORMAT; U4(desc).ddpfPixelFormat = current_format; hr = IDirectDraw2_EnumDisplayModes(ddraw, 0, &desc, ¶m, build_mode_list_cb); - ok(hr == DD_OK, "Failed to build mode list, hr %#x.\n", hr); + ok(hr == DD_OK, "Failed to build mode list, hr %#lx.\n", hr);
param.count = 0; desc.dwFlags &= ~DDSD_PIXELFORMAT; hr = IDirectDraw2_EnumSurfaces(ddraw, DDENUMSURFACES_CANBECREATED | DDENUMSURFACES_MATCH, &desc, ¶m, enum_surfaces_create_cb); - ok(hr == DD_OK, "Failed to enumerate surfaces, hr %#x.\n", hr); + ok(hr == DD_OK, "Failed to enumerate surfaces, hr %#lx.\n", hr); ok(param.count == param.mode_count, "Expected %u surfaces, got %u.\n", param.mode_count, param.count);
desc.dwFlags |= DDSD_WIDTH | DDSD_HEIGHT; @@ -14106,15 +14106,15 @@ static void test_enum_surfaces(void) param.count = 0; hr = IDirectDraw2_EnumSurfaces(ddraw, DDENUMSURFACES_CANBECREATED | DDENUMSURFACES_MATCH, &desc, ¶m, enum_surfaces_create_cb); - ok(hr == DD_OK, "Failed to enumerate surfaces, hr %#x.\n", hr); + ok(hr == DD_OK, "Failed to enumerate surfaces, hr %#lx.\n", hr); ok(param.count == 1, "Got unexpected number of enumerated surfaces %u.\n", param.count);
hr = IDirectDraw2_CreateSurface(ddraw, &desc, ¶m.surfaces[0], NULL); - ok(hr == DD_OK, "Failed to create surface, hr %#x.\n", hr); + ok(hr == DD_OK, "Failed to create surface, hr %#lx.\n", hr); param.count = 0; hr = IDirectDraw2_EnumSurfaces(ddraw, DDENUMSURFACES_CANBECREATED | DDENUMSURFACES_DOESEXIST | DDENUMSURFACES_MATCH, &desc, ¶m, enum_surfaces_create_cb); - ok(hr == DD_OK, "Failed to enumerate surfaces, hr %#x.\n", hr); + ok(hr == DD_OK, "Failed to enumerate surfaces, hr %#lx.\n", hr); ok(param.count == 1, "Got unexpected number of enumerated surfaces %u.\n", param.count); IDirectDrawSurface2_Release(param.surfaces[0]);
@@ -14126,7 +14126,7 @@ static void test_enum_surfaces(void) param.count = 0; hr = IDirectDraw2_EnumSurfaces(ddraw, DDENUMSURFACES_CANBECREATED | DDENUMSURFACES_MATCH, &desc, ¶m, enum_surfaces_create_cb); - ok(hr == DD_OK, "Failed to enumerate surfaces, hr %#x.\n", hr); + ok(hr == DD_OK, "Failed to enumerate surfaces, hr %#lx.\n", hr); ok(!param.count, "Got unexpected number of enumerated surfaces %u.\n", param.count);
IDirectDraw2_Release(ddraw); @@ -14196,19 +14196,19 @@ static void test_viewport(void) }
hr = IDirect3DDevice2_GetDirect3D(device, &d3d); - ok(SUCCEEDED(hr), "Failed to get Direct3D2 interface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get Direct3D2 interface, hr %#lx.\n", hr);
hr = IDirect3DDevice2_SetRenderState(device, D3DRENDERSTATE_ZENABLE, D3DZB_FALSE); - ok(SUCCEEDED(hr), "Failed to disable depth test, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to disable depth test, hr %#lx.\n", hr); hr = IDirect3DDevice2_SetRenderState(device, D3DRENDERSTATE_CULLMODE, D3DCULL_NONE); - ok(SUCCEEDED(hr), "Failed to disable culling, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to disable culling, hr %#lx.\n", hr);
hr = IDirect3DDevice2_SetTransform(device, D3DTRANSFORMSTATE_WORLD, &mat); - ok(SUCCEEDED(hr), "Failed to set world transform, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set world transform, hr %#lx.\n", hr); hr = IDirect3DDevice2_SetTransform(device, D3DTRANSFORMSTATE_VIEW, &mat); - ok(SUCCEEDED(hr), "Failed to set view transform, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set view transform, hr %#lx.\n", hr); hr = IDirect3DDevice2_SetTransform(device, D3DTRANSFORMSTATE_PROJECTION, &mat); - ok(SUCCEEDED(hr), "Failed to set projection transform, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set projection transform, hr %#lx.\n", hr);
black_background = create_diffuse_material(device, 0.0f, 0.0f, 0.0f, 0.0f);
@@ -14229,23 +14229,23 @@ static void test_viewport(void) surface_desc.dwHeight = rt_sizes[i].y; surface_desc.ddsCaps.dwCaps = DDSCAPS_OFFSCREENPLAIN | DDSCAPS_3DDEVICE; hr = IDirectDraw2_CreateSurface(ddraw, &surface_desc, &rt, NULL); - ok(SUCCEEDED(hr), "Failed to create render target, hr %#x (i %u).\n", hr, i); + ok(SUCCEEDED(hr), "Failed to create render target, hr %#lx (i %u).\n", hr, i);
surface_desc.dwFlags = DDSD_CAPS | DDSD_PIXELFORMAT | DDSD_WIDTH | DDSD_HEIGHT; surface_desc.ddsCaps.dwCaps = DDSCAPS_ZBUFFER; surface_desc.ddpfPixelFormat = z_fmt; hr = IDirectDraw2_CreateSurface(ddraw, &surface_desc, &ds, NULL); - ok(SUCCEEDED(hr), "Failed to create depth buffer, hr %#x (i %u).\n", hr, i); + ok(SUCCEEDED(hr), "Failed to create depth buffer, hr %#lx (i %u).\n", hr, i); hr = IDirectDrawSurface_AddAttachedSurface(rt, ds); - ok(SUCCEEDED(hr), "Failed to attach depth buffer, hr %#x (i %u).\n", hr, i); + ok(SUCCEEDED(hr), "Failed to attach depth buffer, hr %#lx (i %u).\n", hr, i);
hr = IDirect3DDevice2_SetRenderTarget(device, rt, 0); - ok(SUCCEEDED(hr), "Failed to set render target, hr %#x (i %u).\n", hr, i); + ok(SUCCEEDED(hr), "Failed to set render target, hr %#lx (i %u).\n", hr, i); } else { hr = IDirect3DDevice2_GetRenderTarget(device, &rt); - ok(SUCCEEDED(hr), "Failed to get render target, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get render target, hr %#lx.\n", hr); }
full_viewport = create_viewport(device, 0, 0, rt_sizes[i].x, rt_sizes[i].y); @@ -14261,12 +14261,12 @@ static void test_viewport(void) || tests[j].vp.dwY + tests[j].vp.dwHeight > rt_sizes[i].y;
hr = IDirect3DViewport2_Clear(full_viewport, 1, &clear_rect, D3DCLEAR_TARGET); - ok(SUCCEEDED(hr), "Failed to clear viewport, hr %#x (i %u, j %u).\n", hr, i, j); + ok(SUCCEEDED(hr), "Failed to clear viewport, hr %#lx (i %u, j %u).\n", hr, i, j);
hr = IDirect3D2_CreateViewport(d3d, &viewport, NULL); - ok(SUCCEEDED(hr), "Failed to create viewport, hr %#x (i %u, j %u).\n", hr, i, j); + ok(SUCCEEDED(hr), "Failed to create viewport, hr %#lx (i %u, j %u).\n", hr, i, j); hr = IDirect3DViewport2_SetViewport2(viewport, NULL); - ok(hr == E_INVALIDARG, "Setting NULL viewport data returned unexpected hr %#x (i %u, j %u).\n", + ok(hr == E_INVALIDARG, "Setting NULL viewport data returned unexpected hr %#lx (i %u, j %u).\n", hr, i, j); memset(&vp, 0, sizeof(vp)); vp.dwSize = sizeof(vp); @@ -14280,18 +14280,18 @@ static void test_viewport(void) vp.dvMaxZ = 1.0f; hr = IDirect3DViewport2_SetViewport(viewport, &vp); ok(hr == D3DERR_VIEWPORTHASNODEVICE, - "Setting viewport data returned unexpected hr %#x (i %u, j %u).\n", hr, i, j); + "Setting viewport data returned unexpected hr %#lx (i %u, j %u).\n", hr, i, j); hr = IDirect3DDevice2_AddViewport(device, viewport); - ok(SUCCEEDED(hr), "Failed to add viewport, hr %#x (i %u, j %u).\n", hr, i, j); + ok(SUCCEEDED(hr), "Failed to add viewport, hr %#lx (i %u, j %u).\n", hr, i, j); hr = IDirect3DViewport2_SetViewport(viewport, &vp); if (expected_failure) - ok(hr == E_INVALIDARG, "Setting viewport data returned unexpected hr %#x (i %u, j %u).\n", + ok(hr == E_INVALIDARG, "Setting viewport data returned unexpected hr %#lx (i %u, j %u).\n", hr, i, j); else - ok(SUCCEEDED(hr), "Failed to set viewport data, hr %#x (i %u, j %u).\n", hr, i, j); + ok(SUCCEEDED(hr), "Failed to set viewport data, hr %#lx (i %u, j %u).\n", hr, i, j);
hr = IDirect3DDevice2_SetCurrentViewport(device, viewport); - ok(SUCCEEDED(hr), "Failed to set the viewport, hr %#x (i %u, j %u).\n", hr, i, j); + ok(SUCCEEDED(hr), "Failed to set the viewport, hr %#lx (i %u, j %u).\n", hr, i, j); if (expected_failure) { destroy_viewport(device, viewport); @@ -14299,11 +14299,11 @@ static void test_viewport(void) }
hr = IDirect3DDevice2_BeginScene(device); - ok(SUCCEEDED(hr), "Failed to begin scene, hr %#x (i %u, j %u).\n", hr, i, j); + ok(SUCCEEDED(hr), "Failed to begin scene, hr %#lx (i %u, j %u).\n", hr, i, j); hr = IDirect3DDevice2_DrawPrimitive(device, D3DPT_TRIANGLESTRIP, D3DVT_LVERTEX, quad, 4, 0); - ok(SUCCEEDED(hr), "Got unexpected hr %#x (i %u, j %u).\n", hr, i, j); + ok(SUCCEEDED(hr), "Got unexpected hr %#lx (i %u, j %u).\n", hr, i, j); hr = IDirect3DDevice2_EndScene(device); - ok(SUCCEEDED(hr), "Failed to end scene, hr %#x (i %u, j %u).\n", hr, i, j); + ok(SUCCEEDED(hr), "Failed to end scene, hr %#lx (i %u, j %u).\n", hr, i, j);
check_rect(rt, tests[j].expected_rect, tests[j].message);
@@ -14313,7 +14313,7 @@ static void test_viewport(void) destroy_viewport(device, full_viewport);
hr = IDirectDrawSurface_DeleteAttachedSurface(rt, 0, ds); - ok(SUCCEEDED(hr), "Failed to detach surface, hr %#x (i %u).\n", hr, i); + ok(SUCCEEDED(hr), "Failed to detach surface, hr %#lx (i %u).\n", hr, i); IDirectDrawSurface_Release(ds);
IDirectDrawSurface_Release(rt); @@ -14321,7 +14321,7 @@ static void test_viewport(void)
destroy_material(black_background); refcount = IDirect3DDevice2_Release(device); - ok(!refcount, "Device has %u references left.\n", refcount); + ok(!refcount, "Device has %lu references left.\n", refcount); IDirect3D2_Release(d3d); IDirectDraw2_Release(ddraw); DestroyWindow(window); @@ -14383,48 +14383,48 @@ static void test_find_device(void) result.dwSize = sizeof(result); search.dwSize = sizeof(search); hr = IDirect3D2_FindDevice(d3d, NULL, NULL); - ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#lx.\n", hr); hr = IDirect3D2_FindDevice(d3d, NULL, &result); - ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#lx.\n", hr); hr = IDirect3D2_FindDevice(d3d, &search, NULL); - ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#lx.\n", hr); hr = IDirect3D2_FindDevice(d3d, &search, &result); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); - ok(result.dwSize == sizeof(result), "Got unexpected result size %u.\n", result.dwSize); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); + ok(result.dwSize == sizeof(result), "Got unexpected result size %lu.\n", result.dwSize); ok(result.ddHwDesc.dwSize == sizeof(result_v2.hw_desc), - "Got unexpected HW desc size %u.\n", result.ddHwDesc.dwSize); + "Got unexpected HW desc size %lu.\n", result.ddHwDesc.dwSize); ok(result.ddSwDesc.dwSize == sizeof(result_v2.sw_desc), - "Got unexpected SW desc size %u.\n", result.ddSwDesc.dwSize); + "Got unexpected SW desc size %lu.\n", result.ddSwDesc.dwSize);
memset(&search, 0, sizeof(search)); memset(&result, 0, sizeof(result)); hr = IDirect3D2_FindDevice(d3d, &search, &result); - ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#lx.\n", hr);
search.dwSize = sizeof(search) + 1; result.dwSize = sizeof(result) + 1; hr = IDirect3D2_FindDevice(d3d, &search, &result); - ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#lx.\n", hr);
search.dwSize = sizeof(search);
memset(&result_v1, 0, sizeof(result_v1)); result_v1.size = sizeof(result_v1); hr = IDirect3D2_FindDevice(d3d, &search, (D3DFINDDEVICERESULT *)&result_v1); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); ok(result_v1.hw_desc.dwSize == sizeof(result_v2.hw_desc), - "Got unexpected HW desc size %u.\n", result_v1.hw_desc.dwSize); + "Got unexpected HW desc size %lu.\n", result_v1.hw_desc.dwSize); ok(result_v1.sw_desc.dwSize == sizeof(result_v2.sw_desc), - "Got unexpected SW desc size %u.\n", result_v1.sw_desc.dwSize); + "Got unexpected SW desc size %lu.\n", result_v1.sw_desc.dwSize);
memset(&result_v2, 0, sizeof(result_v2)); result_v2.size = sizeof(result_v2); hr = IDirect3D2_FindDevice(d3d, &search, (D3DFINDDEVICERESULT *)&result_v2); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); ok(result_v2.hw_desc.dwSize == sizeof(result_v2.hw_desc), - "Got unexpected HW desc size %u.\n", result_v2.hw_desc.dwSize); + "Got unexpected HW desc size %lu.\n", result_v2.hw_desc.dwSize); ok(result_v2.sw_desc.dwSize == sizeof(result_v2.sw_desc), - "Got unexpected SW desc size %u.\n", result_v2.sw_desc.dwSize); + "Got unexpected SW desc size %lu.\n", result_v2.sw_desc.dwSize);
for (i = 0; i < ARRAY_SIZE(tests); ++i) { @@ -14437,21 +14437,21 @@ static void test_find_device(void) result.dwSize = sizeof(result);
hr = IDirect3D2_FindDevice(d3d, &search, &result); - ok(hr == tests[i].hr, "Test %u: Got unexpected hr %#x.\n", i, hr); - ok(result.dwSize == sizeof(result), "Test %u: Got unexpected result size %u.\n", i, result.dwSize); + ok(hr == tests[i].hr, "Test %u: Got unexpected hr %#lx.\n", i, hr); + ok(result.dwSize == sizeof(result), "Test %u: Got unexpected result size %lu.\n", i, result.dwSize); if (SUCCEEDED(hr)) { ok(result.ddHwDesc.dwSize == sizeof(result_v2.hw_desc), - "Test %u: Got unexpected HW desc size %u.\n", i, result.ddHwDesc.dwSize); + "Test %u: Got unexpected HW desc size %lu.\n", i, result.ddHwDesc.dwSize); ok(result.ddSwDesc.dwSize == sizeof(result_v2.sw_desc), - "Test %u: Got unexpected SW desc size %u.\n", i, result.ddSwDesc.dwSize); + "Test %u: Got unexpected SW desc size %lu.\n", i, result.ddSwDesc.dwSize); } else { ok(!result.ddHwDesc.dwSize, - "Test %u: Got unexpected HW desc size %u.\n", i, result.ddHwDesc.dwSize); + "Test %u: Got unexpected HW desc size %lu.\n", i, result.ddHwDesc.dwSize); ok(!result.ddSwDesc.dwSize, - "Test %u: Got unexpected SW desc size %u.\n", i, result.ddSwDesc.dwSize); + "Test %u: Got unexpected SW desc size %lu.\n", i, result.ddSwDesc.dwSize); } }
@@ -14478,7 +14478,7 @@ static void test_find_device(void) search.dcmColorModel = 0xdeadbeef; result.dwSize = sizeof(result); hr = IDirect3D2_FindDevice(d3d, &search, &result); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
IDirect3D2_Release(d3d); IDirectDraw2_Release(ddraw); @@ -14494,9 +14494,9 @@ static LRESULT CALLBACK killfocus_proc(HWND window, UINT message, WPARAM wparam, if (message == WM_KILLFOCUS) { ref = IDirectDrawSurface_Release(killfocus_surface); - ok(!ref, "Unexpected surface refcount %u.\n", ref); + ok(!ref, "Unexpected surface refcount %lu.\n", ref); ref = IDirectDraw2_Release(killfocus_ddraw); - ok(!ref, "Unexpected ddraw refcount %u.\n", ref); + ok(!ref, "Unexpected ddraw refcount %lu.\n", ref); killfocus_ddraw = NULL; }
@@ -14521,14 +14521,14 @@ static void test_killfocus(void) ok(!!killfocus_ddraw, "Failed to create a ddraw object.\n");
hr = IDirectDraw2_SetCooperativeLevel(killfocus_ddraw, window, DDSCL_FULLSCREEN | DDSCL_EXCLUSIVE); - ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#lx.\n", hr);
memset(&surface_desc, 0, sizeof(surface_desc)); surface_desc.dwSize = sizeof(surface_desc); surface_desc.dwFlags = DDSD_CAPS; surface_desc.ddsCaps.dwCaps = DDSCAPS_PRIMARYSURFACE; hr = IDirectDraw2_CreateSurface(killfocus_ddraw, &surface_desc, &killfocus_surface, NULL); - ok(SUCCEEDED(hr), "Failed to create surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create surface, hr %#lx.\n", hr);
SetForegroundWindow(GetDesktopWindow()); ok(!killfocus_ddraw, "WM_KILLFOCUS was not received.\n"); @@ -14551,38 +14551,38 @@ static void test_gdi_surface(void) ddraw = create_ddraw(); ok(!!ddraw, "Failed to create a ddraw object.\n"); hr = IDirectDraw2_SetCooperativeLevel(ddraw, window, DDSCL_NORMAL); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr);
/* Retrieving the GDI surface requires a primary surface to exist. */ gdi_surface = (void *)0xc0dec0de; hr = IDirectDraw2_GetGDISurface(ddraw, &gdi_surface); - ok(hr == DDERR_NOTFOUND, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_NOTFOUND, "Got unexpected hr %#lx.\n", hr); ok(!gdi_surface, "Got unexpected surface %p.\n", gdi_surface);
hr = IDirectDraw2_FlipToGDISurface(ddraw); - ok(hr == DDERR_NOTFOUND, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_NOTFOUND, "Got unexpected hr %#lx.\n", hr);
memset(&surface_desc, 0, sizeof(surface_desc)); surface_desc.dwSize = sizeof(surface_desc); surface_desc.dwFlags = DDSD_CAPS; surface_desc.ddsCaps.dwCaps = DDSCAPS_PRIMARYSURFACE; hr = IDirectDraw2_CreateSurface(ddraw, &surface_desc, &primary, NULL); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr);
hr = IDirectDraw2_GetGDISurface(ddraw, &gdi_surface); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); ok(gdi_surface == primary, "Got unexpected surface %p, expected %p.\n", gdi_surface, primary); IDirectDrawSurface_Release(gdi_surface);
/* Flipping to the GDI surface requires the primary surface to be * flippable. */ hr = IDirectDraw2_FlipToGDISurface(ddraw); - ok(hr == DDERR_NOTFLIPPABLE, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_NOTFLIPPABLE, "Got unexpected hr %#lx.\n", hr);
IDirectDrawSurface_Release(primary);
hr = IDirectDraw2_SetCooperativeLevel(ddraw, window, DDSCL_EXCLUSIVE | DDSCL_FULLSCREEN); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr);
memset(&surface_desc, 0, sizeof(surface_desc)); surface_desc.dwSize = sizeof(surface_desc); @@ -14590,40 +14590,40 @@ static void test_gdi_surface(void) surface_desc.ddsCaps.dwCaps = DDSCAPS_PRIMARYSURFACE | DDSCAPS_COMPLEX | DDSCAPS_FLIP; U5(surface_desc).dwBackBufferCount = 1; hr = IDirectDraw2_CreateSurface(ddraw, &surface_desc, &primary, NULL); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface_GetAttachedSurface(primary, &caps, &backbuffer); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); ok(backbuffer != primary, "Got unexpected backbuffer %p.\n", backbuffer);
hr = IDirectDraw2_GetGDISurface(ddraw, &gdi_surface); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); ok(gdi_surface == primary, "Got unexpected surface %p, expected %p.\n", gdi_surface, primary); IDirectDrawSurface_Release(gdi_surface);
hr = IDirectDrawSurface_Flip(primary, NULL, DDFLIP_WAIT); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirectDraw2_GetGDISurface(ddraw, &gdi_surface); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); ok(gdi_surface == backbuffer || broken(gdi_surface == primary), "Got unexpected surface %p, expected %p.\n", gdi_surface, backbuffer); IDirectDrawSurface_Release(gdi_surface);
hr = IDirectDraw2_FlipToGDISurface(ddraw); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr);
hr = IDirectDraw2_GetGDISurface(ddraw, &gdi_surface); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); ok(gdi_surface == primary, "Got unexpected surface %p, expected %p.\n", gdi_surface, primary); IDirectDrawSurface_Release(gdi_surface);
hr = IDirectDraw2_FlipToGDISurface(ddraw); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr);
IDirectDrawSurface_Release(backbuffer); IDirectDrawSurface_Release(primary);
refcount = IDirectDraw2_Release(ddraw); - ok(!refcount, "%u references left.\n", refcount); + ok(!refcount, "%lu references left.\n", refcount); DestroyWindow(window); }
@@ -14681,64 +14681,64 @@ static void test_alphatest(void) return; } hr = IDirect3DDevice2_GetRenderTarget(device, &rt); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
blue = create_diffuse_material(device, 0.0f, 0.0f, 1.0f, 1.0f); failed = create_diffuse_material(device, 1.0f, 0.0f, 0.0f, 1.0f);
viewport = create_viewport(device, 0, 0, 640, 480); hr = IDirect3DDevice2_SetCurrentViewport(device, viewport); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
viewport_set_background(device, viewport, blue); hr = IDirect3DViewport2_Clear(viewport, 1, &rect_full, D3DCLEAR_TARGET); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirect3DDevice2_SetRenderState(device, D3DRENDERSTATE_LIGHTING, FALSE); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirect3DDevice2_SetRenderState(device, D3DRENDERSTATE_ZENABLE, FALSE); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirect3DDevice2_SetRenderState(device, D3DRENDERSTATE_ALPHATESTENABLE, TRUE); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
viewport_set_background(device, viewport, failed); for (i = 0; i < ARRAY_SIZE(test_data); ++i) { hr = IDirect3DDevice2_SetRenderState(device, D3DRENDERSTATE_ALPHAFUNC, test_data[i].func); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
hr = IDirect3DViewport2_Clear(viewport, 1, &rect_full, D3DCLEAR_TARGET); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirect3DDevice2_SetRenderState(device, D3DRENDERSTATE_ALPHAREF, 0x70); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirect3DDevice2_BeginScene(device); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirect3DDevice2_DrawPrimitive(device, D3DPT_TRIANGLESTRIP, D3DVT_LVERTEX, quad, ARRAY_SIZE(quad), 0); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirect3DDevice2_EndScene(device); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); color = get_surface_color(rt, 320, 240); ok(compare_color(color, test_data[i].color_greater, 0), - "Alphatest failed, color 0x%08x, expected 0x%08x, alpha > ref, func %u.\n", + "Alphatest failed, color 0x%08lx, expected 0x%08lx, alpha > ref, func %u.\n", color, test_data[i].color_greater, test_data[i].func);
hr = IDirect3DViewport2_Clear(viewport, 1, &rect_full, D3DCLEAR_TARGET); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirect3DDevice2_SetRenderState(device, D3DRENDERSTATE_ALPHAREF, 0xff70); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirect3DDevice2_GetRenderState(device, D3DRENDERSTATE_ALPHAREF, &value); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); - ok(value == 0xff70, "Got unexpected value %#x.\n", value); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); + ok(value == 0xff70, "Got unexpected value %#lx.\n", value); hr = IDirect3DDevice2_BeginScene(device); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirect3DDevice2_DrawPrimitive(device, D3DPT_TRIANGLESTRIP, D3DVT_LVERTEX, quad, ARRAY_SIZE(quad), 0); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirect3DDevice2_EndScene(device); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); color = get_surface_color(rt, 320, 240); ok(compare_color(color, test_data[i].color_greater, 0), - "Alphatest failed, color 0x%08x, expected 0x%08x, alpha > ref, func %u.\n", + "Alphatest failed, color 0x%08lx, expected 0x%08lx, alpha > ref, func %u.\n", color, test_data[i].color_greater, test_data[i].func); }
@@ -14747,9 +14747,9 @@ static void test_alphatest(void) destroy_material(blue); IDirectDrawSurface_Release(rt); refcount = IDirect3DDevice2_Release(device); - ok(!refcount, "Device has %u references left.\n", refcount); + ok(!refcount, "Device has %lu references left.\n", refcount); refcount = IDirectDraw2_Release(ddraw); - ok(!refcount, "DirectDraw has %u references left.\n", refcount); + ok(!refcount, "DirectDraw has %lu references left.\n", refcount); DestroyWindow(window); }
@@ -14770,24 +14770,24 @@ static void test_clipper_refcount(void) ddraw = create_ddraw(); ok(!!ddraw, "Failed to create a ddraw object.\n"); hr = IDirectDraw2_SetCooperativeLevel(ddraw, window, DDSCL_NORMAL); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr);
memset(&surface_desc, 0, sizeof(surface_desc)); surface_desc.dwSize = sizeof(surface_desc); surface_desc.dwFlags = DDSD_CAPS; surface_desc.ddsCaps.dwCaps = DDSCAPS_PRIMARYSURFACE; hr = IDirectDraw2_CreateSurface(ddraw, &surface_desc, &surface, NULL); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr);
hr = IDirectDraw2_CreateClipper(ddraw, 0, &clipper, NULL); - ok(SUCCEEDED(hr), "Failed to create clipper, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create clipper, hr %#lx.\n", hr); refcount = get_refcount((IUnknown *)clipper); - ok(refcount == 1, "Got unexpected refcount %u.\n", refcount); + ok(refcount == 1, "Got unexpected refcount %lu.\n", refcount);
/* Show that clipper validation doesn't somehow happen through per-clipper vtable * pointers. */ hr = IDirectDraw2_CreateClipper(ddraw, 0, &clipper2, NULL); - ok(SUCCEEDED(hr), "Failed to create clipper, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create clipper, hr %#lx.\n", hr); ok(clipper->lpVtbl == clipper2->lpVtbl, "Got different clipper vtables %p and %p.\n", clipper->lpVtbl, clipper2->lpVtbl); orig_vtbl = clipper->lpVtbl; @@ -14795,50 +14795,50 @@ static void test_clipper_refcount(void)
/* Surfaces hold a reference to clippers. No surprises there. */ hr = IDirectDrawSurface_SetClipper(surface, clipper); - ok(SUCCEEDED(hr), "Failed to set clipper, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set clipper, hr %#lx.\n", hr); refcount = get_refcount((IUnknown *)clipper); - ok(refcount == 2, "Got unexpected refcount %u.\n", refcount); + ok(refcount == 2, "Got unexpected refcount %lu.\n", refcount);
hr = IDirectDrawSurface_GetClipper(surface, &clipper2); - ok(SUCCEEDED(hr), "Failed to get clipper, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get clipper, hr %#lx.\n", hr); ok(clipper == clipper2, "Got clipper %p, expected %p.\n", clipper2, clipper); refcount = IDirectDrawClipper_Release(clipper2); - ok(refcount == 2, "Got unexpected refcount %u.\n", refcount); + ok(refcount == 2, "Got unexpected refcount %lu.\n", refcount);
hr = IDirectDrawSurface_SetClipper(surface, NULL); - ok(SUCCEEDED(hr), "Failed to set clipper, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set clipper, hr %#lx.\n", hr); refcount = get_refcount((IUnknown *)clipper); - ok(refcount == 1, "Got unexpected refcount %u.\n", refcount); + ok(refcount == 1, "Got unexpected refcount %lu.\n", refcount);
hr = IDirectDrawSurface_SetClipper(surface, clipper); - ok(SUCCEEDED(hr), "Failed to set clipper, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set clipper, hr %#lx.\n", hr); refcount = get_refcount((IUnknown *)clipper); - ok(refcount == 2, "Got unexpected refcount %u.\n", refcount); + ok(refcount == 2, "Got unexpected refcount %lu.\n", refcount);
refcount = IDirectDrawSurface_Release(surface); - ok(!refcount, "%u references left.\n", refcount); + ok(!refcount, "%lu references left.\n", refcount); refcount = get_refcount((IUnknown *)clipper); - ok(refcount == 1, "Got unexpected refcount %u.\n", refcount); + ok(refcount == 1, "Got unexpected refcount %lu.\n", refcount);
/* SetClipper with an invalid pointer crashes. */
/* Clipper methods work with a broken vtable, with the exception of Release. */ clipper->lpVtbl = (void *)0xdeadbeef; refcount = orig_vtbl->AddRef(clipper); - todo_wine ok(refcount == 2, "Got unexpected refcount %u.\n", refcount); + todo_wine ok(refcount == 2, "Got unexpected refcount %lu.\n", refcount); refcount = orig_vtbl->Release(clipper); - ok(!refcount, "Got unexpected refcount %u.\n", refcount); + ok(!refcount, "Got unexpected refcount %lu.\n", refcount);
clipper->lpVtbl = orig_vtbl; refcount = orig_vtbl->Release(clipper); - todo_wine ok(refcount == 1, "Got unexpected refcount %u.\n", refcount); + todo_wine ok(refcount == 1, "Got unexpected refcount %lu.\n", refcount);
/* Fix the refcount difference because Wine did not increase the ref in the * AddRef call above. */ if (refcount) { refcount = IDirectDrawClipper_Release(clipper); - ok(!refcount, "Got unexpected refcount %u.\n", refcount); + ok(!refcount, "Got unexpected refcount %lu.\n", refcount); }
/* Steal the reference and see what happens - releasing the surface works fine. @@ -14846,11 +14846,11 @@ static void test_clipper_refcount(void) * release it after the GetClipper call is likely to crash, and certain to crash * if we allocate and zero as much heap memory as we can get. */ hr = IDirectDraw2_CreateSurface(ddraw, &surface_desc, &surface, NULL); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirectDraw2_CreateClipper(ddraw, 0, &clipper, NULL); - ok(SUCCEEDED(hr), "Failed to create clipper, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create clipper, hr %#lx.\n", hr); hr = IDirectDrawSurface_SetClipper(surface, clipper); - ok(SUCCEEDED(hr), "Failed to set clipper, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set clipper, hr %#lx.\n", hr);
IDirectDrawClipper_Release(clipper); IDirectDrawClipper_Release(clipper); @@ -14866,7 +14866,7 @@ static void test_clipper_refcount(void) * The same Windows and driver versions run the test without heap corruption on * a Geforce 1060 GTX card. I have not seen the problem on AMD GPUs either. */ hr = IDirectDrawSurface_GetClipper(surface, &clipper2); - ok(SUCCEEDED(hr), "Failed to get clipper, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get clipper, hr %#lx.\n", hr); ok(clipper == clipper2, "Got clipper %p, expected %p.\n", clipper2, clipper); }
@@ -14874,10 +14874,10 @@ static void test_clipper_refcount(void) * vtable through the clipper pointer because it is no longer pointing to * valid memory. */ refcount = orig_vtbl->Release(clipper); - ok(!refcount, "%u references left.\n", refcount); + ok(!refcount, "%lu references left.\n", refcount);
refcount = IDirectDrawSurface_Release(surface); - ok(!refcount, "%u references left.\n", refcount); + ok(!refcount, "%lu references left.\n", refcount);
/* It looks like the protection against invalid thispointers is part of * the IDirectDrawClipper method implementation, not IDirectDrawSurface. */ @@ -14890,33 +14890,33 @@ static void test_clipper_refcount(void) clipper->lpVtbl = orig_vtbl;
refcount = orig_vtbl->AddRef(clipper); - todo_wine ok(!refcount, "Got refcount %u.\n", refcount); + todo_wine ok(!refcount, "Got refcount %lu.\n", refcount); refcount = orig_vtbl->AddRef((IDirectDrawClipper *)(ULONG_PTR)0xdeadbeef); - ok(!refcount, "Got refcount %u.\n", refcount); + ok(!refcount, "Got refcount %lu.\n", refcount);
changed = 0x1234; hr = orig_vtbl->IsClipListChanged(clipper, &changed); - todo_wine ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#x.\n", hr); + todo_wine ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#lx.\n", hr); todo_wine ok(changed == 0x1234, "'changed' changed: %x.\n", changed);
changed = 0x1234; hr = orig_vtbl->IsClipListChanged((IDirectDrawClipper *)(ULONG_PTR)0xdeadbeef, &changed); - ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#lx.\n", hr); ok(changed == 0x1234, "'changed' changed: %x.\n", changed);
/* Nope, we can't initialize our fake clipper. */ hr = IDirectDraw2_QueryInterface(ddraw, &IID_IDirectDraw, (void **)&ddraw1); - ok(SUCCEEDED(hr), "Failed to get ddraw1 interface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get ddraw1 interface, hr %#lx.\n", hr);
hr = orig_vtbl->Initialize(clipper, ddraw1, 0); - todo_wine ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#x.\n", hr); + todo_wine ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#lx.\n", hr);
IDirectDraw_Release(ddraw1);
HeapFree(GetProcessHeap(), 0, clipper);
refcount = IDirectDraw2_Release(ddraw); - ok(!refcount, "%u references left.\n", refcount); + ok(!refcount, "%lu references left.\n", refcount); DestroyWindow(window); }
@@ -14969,35 +14969,35 @@ static void test_caps(void) hal_caps.dwSize = sizeof(hal_caps); hel_caps.dwSize = sizeof(hel_caps); hr = IDirectDraw2_GetCaps(ddraw, &hal_caps, &hel_caps); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); ok(hal_caps.ddsOldCaps.dwCaps == hal_caps.ddsCaps.dwCaps, - "Got unexpected caps %#x, expected %#x.\n", + "Got unexpected caps %#lx, expected %#lx.\n", hal_caps.ddsOldCaps.dwCaps, hal_caps.ddsCaps.dwCaps); ok(hel_caps.ddsOldCaps.dwCaps == hel_caps.ddsCaps.dwCaps, - "Got unexpected caps %#x, expected %#x.\n", + "Got unexpected caps %#lx, expected %#lx.\n", hel_caps.ddsOldCaps.dwCaps, hel_caps.ddsCaps.dwCaps);
no3d = !(hal_caps.ddsCaps.dwCaps & DDSCAPS_3DDEVICE); if (hal_caps.ddsCaps.dwCaps) { - ok(!(hal_caps.ddsCaps.dwCaps & caps_never), "Got unexpected caps %#x.\n", hal_caps.ddsCaps.dwCaps); - ok(!(~hal_caps.ddsCaps.dwCaps & caps_always), "Got unexpected caps %#x.\n", hal_caps.ddsCaps.dwCaps); + ok(!(hal_caps.ddsCaps.dwCaps & caps_never), "Got unexpected caps %#lx.\n", hal_caps.ddsCaps.dwCaps); + ok(!(~hal_caps.ddsCaps.dwCaps & caps_always), "Got unexpected caps %#lx.\n", hal_caps.ddsCaps.dwCaps); todo_wine_if(no3d) ok(!(~hal_caps.ddsCaps.dwCaps & caps_hal), - "Got unexpected caps %#x.\n", hal_caps.ddsCaps.dwCaps); + "Got unexpected caps %#lx.\n", hal_caps.ddsCaps.dwCaps); } - ok(!(hel_caps.ddsCaps.dwCaps & caps_never), "Got unexpected caps %#x.\n", hel_caps.ddsCaps.dwCaps); - ok(!(~hel_caps.ddsCaps.dwCaps & caps_always), "Got unexpected caps %#x.\n", hel_caps.ddsCaps.dwCaps); + ok(!(hel_caps.ddsCaps.dwCaps & caps_never), "Got unexpected caps %#lx.\n", hel_caps.ddsCaps.dwCaps); + ok(!(~hel_caps.ddsCaps.dwCaps & caps_always), "Got unexpected caps %#lx.\n", hel_caps.ddsCaps.dwCaps); todo_wine_if(!no3d) ok(!(hel_caps.ddsCaps.dwCaps & caps_hal), - "Got unexpected caps %#x.\n", hel_caps.ddsCaps.dwCaps); + "Got unexpected caps %#lx.\n", hel_caps.ddsCaps.dwCaps);
IDirectDraw2_Release(ddraw);
if (hal_caps.ddsCaps.dwCaps) { hr = DirectDrawCreate((GUID *)DDCREATE_HARDWAREONLY, &ddraw1, NULL); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirectDraw_QueryInterface(ddraw1, &IID_IDirectDraw2, (void **)&ddraw); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); IDirectDraw_Release(ddraw1);
memset(&hal_caps, 0, sizeof(hal_caps)); @@ -15005,39 +15005,39 @@ static void test_caps(void) hal_caps.dwSize = sizeof(hal_caps); hel_caps.dwSize = sizeof(hel_caps); hr = IDirectDraw2_GetCaps(ddraw, &hal_caps, &hel_caps); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); ok(hal_caps.ddsOldCaps.dwCaps == hal_caps.ddsCaps.dwCaps, - "Got unexpected caps %#x, expected %#x.\n", + "Got unexpected caps %#lx, expected %#lx.\n", hal_caps.ddsOldCaps.dwCaps, hal_caps.ddsCaps.dwCaps); ok(hel_caps.ddsOldCaps.dwCaps == hel_caps.ddsCaps.dwCaps, - "Got unexpected caps %#x, expected %#x.\n", + "Got unexpected caps %#lx, expected %#lx.\n", hel_caps.ddsOldCaps.dwCaps, hel_caps.ddsCaps.dwCaps);
- ok(!(hal_caps.ddsCaps.dwCaps & caps_never), "Got unexpected caps %#x.\n", hal_caps.ddsCaps.dwCaps); - ok(!(~hal_caps.ddsCaps.dwCaps & caps_always), "Got unexpected caps %#x.\n", hal_caps.ddsCaps.dwCaps); + ok(!(hal_caps.ddsCaps.dwCaps & caps_never), "Got unexpected caps %#lx.\n", hal_caps.ddsCaps.dwCaps); + ok(!(~hal_caps.ddsCaps.dwCaps & caps_always), "Got unexpected caps %#lx.\n", hal_caps.ddsCaps.dwCaps); todo_wine_if(no3d) ok(!(~hal_caps.ddsCaps.dwCaps & caps_hal), - "Got unexpected caps %#x.\n", hal_caps.ddsCaps.dwCaps); + "Got unexpected caps %#lx.\n", hal_caps.ddsCaps.dwCaps); if (is_ddraw64) { - ok(!(hel_caps.ddsCaps.dwCaps & caps_never), "Got unexpected caps %#x.\n", hel_caps.ddsCaps.dwCaps); - ok(!(~hel_caps.ddsCaps.dwCaps & caps_always), "Got unexpected caps %#x.\n", hel_caps.ddsCaps.dwCaps); + ok(!(hel_caps.ddsCaps.dwCaps & caps_never), "Got unexpected caps %#lx.\n", hel_caps.ddsCaps.dwCaps); + ok(!(~hel_caps.ddsCaps.dwCaps & caps_always), "Got unexpected caps %#lx.\n", hel_caps.ddsCaps.dwCaps); todo_wine_if(!no3d) ok(!(hel_caps.ddsCaps.dwCaps & caps_hal), - "Got unexpected caps %#x.\n", hel_caps.ddsCaps.dwCaps); + "Got unexpected caps %#lx.\n", hel_caps.ddsCaps.dwCaps); } else { - todo_wine ok(!hel_caps.ddsCaps.dwCaps, "Got unexpected caps %#x.\n", hel_caps.ddsCaps.dwCaps); + todo_wine ok(!hel_caps.ddsCaps.dwCaps, "Got unexpected caps %#lx.\n", hel_caps.ddsCaps.dwCaps); }
IDirectDraw2_Release(ddraw); }
hr = DirectDrawCreate((GUID *)DDCREATE_EMULATIONONLY, &ddraw1, NULL); - ok(hr == DD_OK || (is_ddraw64 && hr == E_FAIL), "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK || (is_ddraw64 && hr == E_FAIL), "Got unexpected hr %#lx.\n", hr); if (SUCCEEDED(hr)) { hr = IDirectDraw_QueryInterface(ddraw1, &IID_IDirectDraw2, (void **)&ddraw); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); IDirectDraw_Release(ddraw1);
memset(&hal_caps, 0, sizeof(hal_caps)); @@ -15045,19 +15045,19 @@ static void test_caps(void) hal_caps.dwSize = sizeof(hal_caps); hel_caps.dwSize = sizeof(hel_caps); hr = IDirectDraw2_GetCaps(ddraw, &hal_caps, &hel_caps); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); ok(hal_caps.ddsOldCaps.dwCaps == hal_caps.ddsCaps.dwCaps, - "Got unexpected caps %#x, expected %#x.\n", + "Got unexpected caps %#lx, expected %#lx.\n", hal_caps.ddsOldCaps.dwCaps, hal_caps.ddsCaps.dwCaps); ok(hel_caps.ddsOldCaps.dwCaps == hel_caps.ddsCaps.dwCaps, - "Got unexpected caps %#x, expected %#x.\n", + "Got unexpected caps %#lx, expected %#lx.\n", hel_caps.ddsOldCaps.dwCaps, hel_caps.ddsCaps.dwCaps);
- todo_wine ok(!hal_caps.ddsCaps.dwCaps, "Got unexpected caps %#x.\n", hal_caps.ddsCaps.dwCaps); - ok(!(hel_caps.ddsCaps.dwCaps & caps_never), "Got unexpected caps %#x.\n", hel_caps.ddsCaps.dwCaps); - ok(!(~hel_caps.ddsCaps.dwCaps & caps_always), "Got unexpected caps %#x.\n", hel_caps.ddsCaps.dwCaps); + todo_wine ok(!hal_caps.ddsCaps.dwCaps, "Got unexpected caps %#lx.\n", hal_caps.ddsCaps.dwCaps); + ok(!(hel_caps.ddsCaps.dwCaps & caps_never), "Got unexpected caps %#lx.\n", hel_caps.ddsCaps.dwCaps); + ok(!(~hel_caps.ddsCaps.dwCaps & caps_always), "Got unexpected caps %#lx.\n", hel_caps.ddsCaps.dwCaps); todo_wine_if(!no3d) ok(!(hel_caps.ddsCaps.dwCaps & caps_hal), - "Got unexpected caps %#x.\n", hel_caps.ddsCaps.dwCaps); + "Got unexpected caps %#lx.\n", hel_caps.ddsCaps.dwCaps);
IDirectDraw2_Release(ddraw); } @@ -15076,7 +15076,7 @@ static void test_d32_support(void) ddraw = create_ddraw(); ok(!!ddraw, "Failed to create a ddraw object.\n"); hr = IDirectDraw2_SetCooperativeLevel(ddraw, window, DDSCL_NORMAL); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr);
memset(&surface_desc, 0, sizeof(surface_desc)); surface_desc.dwSize = sizeof(surface_desc); @@ -15086,21 +15086,21 @@ static void test_d32_support(void) surface_desc.dwWidth = 64; surface_desc.dwHeight = 64; hr = IDirectDraw2_CreateSurface(ddraw, &surface_desc, &surface, NULL); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr);
memset(&surface_desc, 0, sizeof(surface_desc)); surface_desc.dwSize = sizeof(surface_desc); hr = IDirectDrawSurface_GetSurfaceDesc(surface, &surface_desc); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); - ok((surface_desc.dwFlags & DDSD_ZBUFFERBITDEPTH), "Got unexpected flags %#x.\n", surface_desc.dwFlags); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); + ok((surface_desc.dwFlags & DDSD_ZBUFFERBITDEPTH), "Got unexpected flags %#lx.\n", surface_desc.dwFlags); ok(U2(surface_desc).dwZBufferBitDepth == 32, - "Got unexpected dwZBufferBitDepth %u.\n", U2(surface_desc).dwZBufferBitDepth); + "Got unexpected dwZBufferBitDepth %lu.\n", U2(surface_desc).dwZBufferBitDepth); ok(!(surface_desc.ddsCaps.dwCaps & DDSCAPS_VIDEOMEMORY), - "Got unexpected surface caps %#x.\n", surface_desc.ddsCaps.dwCaps); + "Got unexpected surface caps %#lx.\n", surface_desc.ddsCaps.dwCaps); IDirectDrawSurface_Release(surface);
refcount = IDirectDraw2_Release(ddraw); - ok(!refcount, "%u references left.\n", refcount); + ok(!refcount, "%lu references left.\n", refcount); DestroyWindow(window); }
@@ -15154,13 +15154,13 @@ static void test_cursor_clipping(void) memset(&surface_desc, 0, sizeof(surface_desc)); surface_desc.dwSize = sizeof(surface_desc); hr = IDirectDraw2_GetDisplayMode(ddraw, &surface_desc); - ok(hr == DD_OK, "GetDisplayMode failed, hr %#x.\n", hr); + ok(hr == DD_OK, "GetDisplayMode failed, hr %#lx.\n", hr);
memset(¶m, 0, sizeof(param)); param.old_width = surface_desc.dwWidth; param.old_height = surface_desc.dwHeight; hr = IDirectDraw2_EnumDisplayModes(ddraw, 0, NULL, ¶m, find_different_mode_callback); - ok(hr == DD_OK, "EnumDisplayModes failed, hr %#x.\n", hr); + ok(hr == DD_OK, "EnumDisplayModes failed, hr %#lx.\n", hr); if (!(param.new_width && param.new_height)) { skip("Failed to find a different mode than %ux%u.\n", param.old_width, param.old_height); @@ -15168,87 +15168,87 @@ static void test_cursor_clipping(void) }
ret = ClipCursor(NULL); - ok(ret, "ClipCursor failed, error %#x.\n", GetLastError()); + ok(ret, "ClipCursor failed, error %#lx.\n", GetLastError()); get_virtual_rect(&rect); ret = GetClipCursor(&clip_rect); - ok(ret, "GetClipCursor failed, error %#x.\n", GetLastError()); + ok(ret, "GetClipCursor failed, error %#lx.\n", GetLastError()); ok(EqualRect(&clip_rect, &rect), "Expect clip rect %s, got %s.\n", wine_dbgstr_rect(&rect), wine_dbgstr_rect(&clip_rect));
/* Set cooperative level to normal */ hr = IDirectDraw2_SetCooperativeLevel(ddraw, window, DDSCL_NORMAL); - ok(hr == DD_OK, "SetCooperativeLevel failed, hr %#x.\n", hr); + ok(hr == DD_OK, "SetCooperativeLevel failed, hr %#lx.\n", hr); flush_events(); get_virtual_rect(&rect); ret = GetClipCursor(&clip_rect); - ok(ret, "GetClipCursor failed, error %#x.\n", GetLastError()); + ok(ret, "GetClipCursor failed, error %#lx.\n", GetLastError()); ok(EqualRect(&clip_rect, &rect), "Expect clip rect %s, got %s.\n", wine_dbgstr_rect(&rect), wine_dbgstr_rect(&clip_rect));
hr = set_display_mode(ddraw, param.new_width, param.new_height); - ok(hr == DD_OK || hr == DDERR_UNSUPPORTED, "SetDisplayMode failed, hr %#x.\n", hr); + ok(hr == DD_OK || hr == DDERR_UNSUPPORTED, "SetDisplayMode failed, hr %#lx.\n", hr); if (FAILED(hr)) { - win_skip("SetDisplayMode failed, hr %#x.\n", hr); + win_skip("SetDisplayMode failed, hr %#lx.\n", hr); goto done; } flush_events(); get_virtual_rect(&rect); ret = GetClipCursor(&clip_rect); - ok(ret, "GetClipCursor failed, error %#x.\n", GetLastError()); + ok(ret, "GetClipCursor failed, error %#lx.\n", GetLastError()); ok(EqualRect(&clip_rect, &rect), "Expect clip rect %s, got %s.\n", wine_dbgstr_rect(&rect), wine_dbgstr_rect(&clip_rect));
hr = IDirectDraw2_RestoreDisplayMode(ddraw); - ok(hr == DD_OK, "RestoreDisplayMode failed, hr %#x.\n", hr); + ok(hr == DD_OK, "RestoreDisplayMode failed, hr %#lx.\n", hr); flush_events(); get_virtual_rect(&rect); ret = GetClipCursor(&clip_rect); - ok(ret, "GetClipCursor failed, error %#x.\n", GetLastError()); + ok(ret, "GetClipCursor failed, error %#lx.\n", GetLastError()); ok(EqualRect(&clip_rect, &rect), "Expect clip rect %s, got %s.\n", wine_dbgstr_rect(&rect), wine_dbgstr_rect(&clip_rect));
/* Switch to full screen cooperative level */ hr = IDirectDraw2_SetCooperativeLevel(ddraw, window, DDSCL_EXCLUSIVE | DDSCL_FULLSCREEN); - ok(hr == DD_OK, "SetCooperativeLevel failed, hr %#x.\n", hr); + ok(hr == DD_OK, "SetCooperativeLevel failed, hr %#lx.\n", hr); flush_events(); SetRect(&rect, 0, 0, param.old_width, param.old_height); ret = GetClipCursor(&clip_rect); - ok(ret, "GetClipCursor failed, error %#x.\n", GetLastError()); + ok(ret, "GetClipCursor failed, error %#lx.\n", GetLastError()); ok(EqualRect(&clip_rect, &rect), "Expect clip rect %s, got %s.\n", wine_dbgstr_rect(&rect), wine_dbgstr_rect(&clip_rect));
hr = set_display_mode(ddraw, param.new_width, param.new_height); - ok(hr == DD_OK || hr == DDERR_UNSUPPORTED, "SetDisplayMode failed, hr %#x.\n", hr); + ok(hr == DD_OK || hr == DDERR_UNSUPPORTED, "SetDisplayMode failed, hr %#lx.\n", hr); if (FAILED(hr)) { - win_skip("SetDisplayMode failed, hr %#x.\n", hr); + win_skip("SetDisplayMode failed, hr %#lx.\n", hr); goto done; } flush_events(); SetRect(&rect, 0, 0, param.new_width, param.new_height); ret = GetClipCursor(&clip_rect); - ok(ret, "GetClipCursor failed, error %#x.\n", GetLastError()); + ok(ret, "GetClipCursor failed, error %#lx.\n", GetLastError()); ok(EqualRect(&clip_rect, &rect), "Expect clip rect %s, got %s.\n", wine_dbgstr_rect(&rect), wine_dbgstr_rect(&clip_rect));
/* Restore display mode */ hr = IDirectDraw2_RestoreDisplayMode(ddraw); - ok(hr == DD_OK, "RestoreDisplayMode failed, hr %#x.\n", hr); + ok(hr == DD_OK, "RestoreDisplayMode failed, hr %#lx.\n", hr); flush_events(); SetRect(&rect, 0, 0, param.old_width, param.old_height); ret = GetClipCursor(&clip_rect); - ok(ret, "GetClipCursor failed, error %#x.\n", GetLastError()); + ok(ret, "GetClipCursor failed, error %#lx.\n", GetLastError()); ok(EqualRect(&clip_rect, &rect), "Expect clip rect %s, got %s.\n", wine_dbgstr_rect(&rect), wine_dbgstr_rect(&clip_rect));
/* Switch to normal cooperative level */ hr = IDirectDraw2_SetCooperativeLevel(ddraw, window, DDSCL_NORMAL); - ok(hr == DD_OK, "SetCooperativeLevel failed, hr %#x.\n", hr); + ok(hr == DD_OK, "SetCooperativeLevel failed, hr %#lx.\n", hr); flush_events(); get_virtual_rect(&rect); ret = GetClipCursor(&clip_rect); - ok(ret, "GetClipCursor failed, error %#x.\n", GetLastError()); + ok(ret, "GetClipCursor failed, error %#lx.\n", GetLastError()); ok(EqualRect(&clip_rect, &rect), "Expect clip rect %s, got %s.\n", wine_dbgstr_rect(&rect), wine_dbgstr_rect(&clip_rect));
@@ -15275,10 +15275,10 @@ static BOOL CALLBACK test_window_position_cb(HMONITOR monitor, HDC hdc, RECT *mo flush_events();
hr = IDirectDraw2_SetCooperativeLevel(ddraw, window, DDSCL_EXCLUSIVE | DDSCL_FULLSCREEN); - ok(hr == DD_OK, "SetCooperativeLevel failed, hr %#x.\n", hr); + ok(hr == DD_OK, "SetCooperativeLevel failed, hr %#lx.\n", hr); flush_events(); ret = GetWindowRect(window, &window_rect); - ok(ret, "GetWindowRect failed, error %#x.\n", GetLastError()); + ok(ret, "GetWindowRect failed, error %#lx.\n", GetLastError()); SetRect(&primary_rect, 0, 0, GetSystemMetrics(SM_CXSCREEN), GetSystemMetrics(SM_CYSCREEN)); ok(EqualRect(&window_rect, &primary_rect), "Expect window rect %s, got %s.\n", wine_dbgstr_rect(&primary_rect), wine_dbgstr_rect(&window_rect)); @@ -15289,9 +15289,9 @@ static BOOL CALLBACK test_window_position_cb(HMONITOR monitor, HDC hdc, RECT *mo
ret = MoveWindow(window, new_rect.left, new_rect.top, new_rect.right - new_rect.left, new_rect.bottom - new_rect.top, TRUE); - ok(ret, "Got unexpected ret %#x, error %#x.\n", ret, GetLastError()); + ok(ret, "Got unexpected ret %#x, error %#lx.\n", ret, GetLastError()); ret = GetWindowRect(window, &window_rect); - ok(ret, "Got unexpected ret %#x, error %#x.\n", ret, GetLastError()); + ok(ret, "Got unexpected ret %#x, error %#lx.\n", ret, GetLastError()); ok(EqualRect(&window_rect, &new_rect), "Expected window rect %s, got %s.\n", wine_dbgstr_rect(monitor_rect), wine_dbgstr_rect(&window_rect)); @@ -15299,7 +15299,7 @@ static BOOL CALLBACK test_window_position_cb(HMONITOR monitor, HDC hdc, RECT *mo * on the second resize remains. */ flush_events(); ret = GetWindowRect(window, &window_rect); - ok(ret, "Got unexpected ret %#x, error %#x.\n", ret, GetLastError()); + ok(ret, "Got unexpected ret %#x, error %#lx.\n", ret, GetLastError()); /* Both Windows and Wine change the size of the window. On Windows it is exactly the new size but in Wine * it may get adjusted depending on window manager. */ ok(window_rect.right != monitor_rect->right && window_rect.bottom != monitor_rect->bottom, @@ -15308,15 +15308,15 @@ static BOOL CALLBACK test_window_position_cb(HMONITOR monitor, HDC hdc, RECT *mo
ret = MoveWindow(window, new_rect.left, new_rect.top, new_rect.right - new_rect.left, new_rect.bottom - new_rect.top, TRUE); - ok(ret, "Got unexpected ret %#x, error %#x.\n", ret, GetLastError()); + ok(ret, "Got unexpected ret %#x, error %#lx.\n", ret, GetLastError()); ret = GetWindowRect(window, &window_rect); - ok(ret, "Got unexpected ret %#x, error %#x.\n", ret, GetLastError()); + ok(ret, "Got unexpected ret %#x, error %#lx.\n", ret, GetLastError()); ok(EqualRect(&window_rect, &new_rect), "Expected window rect %s, got %s.\n", wine_dbgstr_rect(monitor_rect), wine_dbgstr_rect(&window_rect)); flush_events(); ret = GetWindowRect(window, &window_rect); - ok(ret, "Got unexpected ret %#x, error %#x.\n", ret, GetLastError()); + ok(ret, "Got unexpected ret %#x, error %#lx.\n", ret, GetLastError()); ok(window_rect.right != monitor_rect->right && window_rect.bottom != monitor_rect->bottom, "Expected window rect %s, got %s.\n", wine_dbgstr_rect(monitor_rect), wine_dbgstr_rect(&window_rect)); @@ -15324,25 +15324,25 @@ static BOOL CALLBACK test_window_position_cb(HMONITOR monitor, HDC hdc, RECT *mo /* Window activation should restore the window to fit the whole primary monitor */ ret = SetWindowPos(window, 0, monitor_rect->left, monitor_rect->top, 0, 0, SWP_NOZORDER | SWP_NOSIZE); - ok(ret, "SetWindowPos failed, error %#x.\n", GetLastError()); + ok(ret, "SetWindowPos failed, error %#lx.\n", GetLastError()); ret = SetForegroundWindow(GetDesktopWindow()); ok(ret, "Failed to set foreground window.\n"); flush_events(); ret = ShowWindow(window, SW_RESTORE); - ok(ret, "Failed to restore window, error %#x.\n", GetLastError()); + ok(ret, "Failed to restore window, error %#lx.\n", GetLastError()); flush_events(); ret = SetForegroundWindow(window); - ok(ret, "SetForegroundWindow failed, error %#x.\n", GetLastError()); + ok(ret, "SetForegroundWindow failed, error %#lx.\n", GetLastError()); flush_events(); ret = GetWindowRect(window, &window_rect); - ok(ret, "GetWindowRect failed, error %#x.\n", GetLastError()); + ok(ret, "GetWindowRect failed, error %#lx.\n", GetLastError()); ok(EqualRect(&window_rect, &primary_rect), "Expect window rect %s, got %s.\n", wine_dbgstr_rect(&primary_rect), wine_dbgstr_rect(&window_rect));
hr = IDirectDraw2_SetCooperativeLevel(ddraw, window, DDSCL_NORMAL); - ok(hr == DD_OK, "SetCooperativeLevel failed, hr %#x.\n", hr); + ok(hr == DD_OK, "SetCooperativeLevel failed, hr %#lx.\n", hr); ret = GetWindowRect(window, &window_rect); - ok(ret, "GetWindowRect failed, error %#x.\n", GetLastError()); + ok(ret, "GetWindowRect failed, error %#lx.\n", GetLastError()); ok(EqualRect(&window_rect, &primary_rect), "Expect window rect %s, got %s.\n", wine_dbgstr_rect(&primary_rect), wine_dbgstr_rect(&window_rect));
@@ -15373,14 +15373,14 @@ static BOOL CALLBACK test_get_display_mode_cb(HMONITOR monitor, HDC hdc, RECT *m /* Test that DirectDraw doesn't use the device window to determine which monitor to use */ ret = SetWindowPos(window, 0, monitor_rect->left, monitor_rect->top, 0, 0, SWP_NOZORDER | SWP_NOSIZE); - ok(ret, "SetWindowPos failed, error %#x.\n", GetLastError()); + ok(ret, "SetWindowPos failed, error %#lx.\n", GetLastError());
surface_desc.dwSize = sizeof(surface_desc); hr = IDirectDraw2_GetDisplayMode(ddraw, &surface_desc); - ok(hr == DD_OK, "GetDisplayMode failed, hr %#x.\n", hr); - ok(surface_desc.dwWidth == GetSystemMetrics(SM_CXSCREEN), "Expect width %d, got %d.\n", + ok(hr == DD_OK, "GetDisplayMode failed, hr %#lx.\n", hr); + ok(surface_desc.dwWidth == GetSystemMetrics(SM_CXSCREEN), "Expect width %d, got %ld.\n", GetSystemMetrics(SM_CXSCREEN), surface_desc.dwWidth); - ok(surface_desc.dwHeight == GetSystemMetrics(SM_CYSCREEN), "Expect height %d, got %d.\n", + ok(surface_desc.dwHeight == GetSystemMetrics(SM_CYSCREEN), "Expect height %d, got %ld.\n", GetSystemMetrics(SM_CYSCREEN), surface_desc.dwHeight);
DestroyWindow(window); @@ -15407,41 +15407,41 @@ static void test_get_display_mode(void) ok(!!window, "Failed to create a window.\n");
hr = IDirectDraw2_SetCooperativeLevel(ddraw, window, DDSCL_EXCLUSIVE | DDSCL_FULLSCREEN); - ok(hr == DD_OK, "SetCooperativeLevel failed, hr %#x.\n", hr); + ok(hr == DD_OK, "SetCooperativeLevel failed, hr %#lx.\n", hr);
memset(&devmode, 0, sizeof(devmode)); devmode.dmSize = sizeof(devmode); ret = EnumDisplaySettingsW(NULL, ENUM_CURRENT_SETTINGS, &devmode); - ok(ret, "EnumDisplaySettingsW failed, error %#x.\n", GetLastError()); + ok(ret, "EnumDisplaySettingsW failed, error %#lx.\n", GetLastError());
surface_desc.dwSize = sizeof(surface_desc); hr = IDirectDraw2_GetDisplayMode(ddraw, &surface_desc); - ok(hr == DD_OK, "GetDisplayMode failed, hr %#x.\n", hr); - ok(surface_desc.dwSize == sizeof(surface_desc), "Expected dwSize %u, got %u.\n", + ok(hr == DD_OK, "GetDisplayMode failed, hr %#lx.\n", hr); + ok(surface_desc.dwSize == sizeof(surface_desc), "Expected dwSize %Iu, got %lu.\n", sizeof(surface_desc), surface_desc.dwSize); - ok(surface_desc.dwFlags == flags, "Expected dwFlags %#x, got %#x.\n", flags, + ok(surface_desc.dwFlags == flags, "Expected dwFlags %#lx, got %#lx.\n", flags, surface_desc.dwFlags); - ok(surface_desc.dwWidth == devmode.dmPelsWidth, "Expected width %u, got %u.\n", + ok(surface_desc.dwWidth == devmode.dmPelsWidth, "Expected width %lu, got %lu.\n", devmode.dmPelsWidth, surface_desc.dwWidth); - ok(surface_desc.dwHeight == devmode.dmPelsHeight, "Expected height %u, got %u.\n", + ok(surface_desc.dwHeight == devmode.dmPelsHeight, "Expected height %lu, got %lu.\n", devmode.dmPelsHeight, surface_desc.dwHeight); - ok(surface_desc.dwRefreshRate == devmode.dmDisplayFrequency, "Expected frequency %u, got %u.\n", + ok(surface_desc.dwRefreshRate == devmode.dmDisplayFrequency, "Expected frequency %lu, got %lu.\n", devmode.dmDisplayFrequency, surface_desc.dwRefreshRate); ok(surface_desc.ddpfPixelFormat.dwSize == sizeof(surface_desc.ddpfPixelFormat), - "Expected ddpfPixelFormat.dwSize %u, got %u.\n", sizeof(surface_desc.ddpfPixelFormat), + "Expected ddpfPixelFormat.dwSize %Iu, got %lu.\n", sizeof(surface_desc.ddpfPixelFormat), surface_desc.ddpfPixelFormat.dwSize); ok(surface_desc.ddpfPixelFormat.dwRGBBitCount == devmode.dmBitsPerPel, - "Expected ddpfPixelFormat.dwRGBBitCount %u, got %u.\n", devmode.dmBitsPerPel, + "Expected ddpfPixelFormat.dwRGBBitCount %lu, got %lu.\n", devmode.dmBitsPerPel, surface_desc.ddpfPixelFormat.dwRGBBitCount); ok(surface_desc.lPitch == devmode.dmPelsWidth * devmode.dmBitsPerPel / 8, - "Expected pitch %u, got %u.\n", devmode.dmPelsWidth * devmode.dmBitsPerPel / 8, + "Expected pitch %lu, got %lu.\n", devmode.dmPelsWidth * devmode.dmBitsPerPel / 8, surface_desc.lPitch);
memset(¶m, 0, sizeof(param)); param.old_frequency = surface_desc.dwRefreshRate; hr = IDirectDraw2_EnumDisplayModes(ddraw, DDEDM_REFRESHRATES, NULL, ¶m, find_different_mode_callback); - ok(hr == DD_OK, "EnumDisplayModes failed, hr %#x.\n", hr); + ok(hr == DD_OK, "EnumDisplayModes failed, hr %#lx.\n", hr); if (!param.new_frequency) { skip("Failed to find a display mode with a different frequency.\n"); @@ -15450,17 +15450,17 @@ static void test_get_display_mode(void)
hr = IDirectDraw2_SetDisplayMode(ddraw, param.new_width, param.new_height, param.new_bpp, param.new_frequency, 0); - ok(hr == DD_OK, "SetDisplayMode failed, hr %#x.\n", hr); + ok(hr == DD_OK, "SetDisplayMode failed, hr %#lx.\n", hr); hr = IDirectDraw2_GetDisplayMode(ddraw, &surface_desc); - ok(hr == DD_OK, "GetDisplayMode failed, hr %#x.\n", hr); - ok(surface_desc.dwWidth == param.new_width, "Expected width %u, got %u.\n", param.new_width, + ok(hr == DD_OK, "GetDisplayMode failed, hr %#lx.\n", hr); + ok(surface_desc.dwWidth == param.new_width, "Expected width %u, got %lu.\n", param.new_width, surface_desc.dwWidth); - ok(surface_desc.dwHeight == param.new_height, "Expected height %u, got %u.\n", param.new_height, + ok(surface_desc.dwHeight == param.new_height, "Expected height %u, got %lu.\n", param.new_height, surface_desc.dwHeight); - ok(surface_desc.dwRefreshRate == param.new_frequency, "Expected frequency %u, got %u.\n", + ok(surface_desc.dwRefreshRate == param.new_frequency, "Expected frequency %u, got %lu.\n", param.new_frequency, surface_desc.dwRefreshRate); ok(surface_desc.ddpfPixelFormat.dwRGBBitCount == param.new_bpp, - "Expected ddpfPixelFormat.dwRGBBitCount %u, got %u.\n", devmode.dmBitsPerPel, + "Expected ddpfPixelFormat.dwRGBBitCount %lu, got %lu.\n", devmode.dmBitsPerPel, surface_desc.ddpfPixelFormat.dwRGBBitCount);
done: @@ -15506,11 +15506,11 @@ static void test_texture_wrong_caps(const GUID *device_guid) return; } hr = IDirect3DDevice2_GetRenderTarget(device, &rt); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
viewport = create_viewport(device, 0, 0, 640, 480); hr = IDirect3DDevice2_SetCurrentViewport(device, viewport); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
memset(&ddsd, 0, sizeof(ddsd)); ddsd.dwSize = sizeof(ddsd); @@ -15520,37 +15520,37 @@ static void test_texture_wrong_caps(const GUID *device_guid) ddsd.ddsCaps.dwCaps = DDSCAPS_OFFSCREENPLAIN; U4(ddsd).ddpfPixelFormat = fmt; hr = IDirectDraw2_CreateSurface(ddraw, &ddsd, &surface, NULL); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface_QueryInterface(surface, &IID_IDirect3DTexture2, (void **)&texture); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirect3DTexture2_GetHandle(texture, device, &texture_handle); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
fill_surface(surface, 0xff00ff00);
hr = IDirect3DDevice2_SetRenderState(device, D3DRENDERSTATE_ZENABLE, D3DZB_FALSE); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirect3DDevice2_SetRenderState(device, D3DRENDERSTATE_TEXTUREHANDLE, texture_handle); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
background = create_diffuse_material(device, 1.0f, 0.0f, 0.0f, 1.0f); viewport_set_background(device, viewport, background);
hr = IDirect3DViewport2_Clear(viewport, 1, &clear_rect, D3DCLEAR_TARGET); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); if (is_software_device_type(device_guid)) fill_surface(rt, 0xffff0000);
hr = IDirect3DDevice2_BeginScene(device); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirect3DDevice2_DrawPrimitive(device, D3DPT_TRIANGLESTRIP, D3DVT_LVERTEX, quad, ARRAY_SIZE(quad), 0); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirect3DDevice2_EndScene(device); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
expected_color = is_software_device_type(device_guid) ? 0x0000ff00 : 0x00ffffff; color = get_surface_color(rt, 320, 240); - ok(compare_color(color, expected_color, 1), "Got color 0x%08x, expected 0x%08x.\n", color, expected_color); + ok(compare_color(color, expected_color, 1), "Got color 0x%08lx, expected 0x%08lx.\n", color, expected_color);
IDirect3DTexture2_Release(texture); IDirectDrawSurface_Release(surface); @@ -15559,7 +15559,7 @@ static void test_texture_wrong_caps(const GUID *device_guid) destroy_material(background); IDirectDraw2_Release(ddraw); refcount = IDirect3DDevice2_Release(device); - ok(!refcount, "Device has %u references left.\n", refcount); + ok(!refcount, "Device has %lu references left.\n", refcount); DestroyWindow(window); }
@@ -15903,15 +15903,15 @@ static void test_filling_convention(void) }
hr = IDirect3DDevice2_GetDirect3D(device, &d3d); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirect3DDevice2_GetRenderTarget(device, &backbuffer); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr);
viewport = create_viewport(device, 0, 0, vp_size, vp_size); background = create_diffuse_material(device, 0.0f, 0.0f, 1.0f, 1.0f); viewport_set_background(device, viewport, background); hr = IDirect3DDevice2_SetCurrentViewport(device, viewport); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
memset(&desc, 0, sizeof(desc)); desc.dwSize = sizeof(desc); @@ -15926,7 +15926,7 @@ static void test_filling_convention(void) desc.ddpfPixelFormat.dwGBitMask = 0x0000ff00; desc.ddpfPixelFormat.dwBBitMask = 0x000000ff; hr = IDirectDraw2_CreateSurface(ddraw, &desc, &rt, NULL); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
/* Nvidia on Windows 10 refuses to set the offscreen RT * if it does not have an attached depth stencil. */ @@ -15935,7 +15935,7 @@ static void test_filling_convention(void) desc.dwSize = sizeof(desc); desc.ddpfPixelFormat.dwSize = sizeof(desc.ddpfPixelFormat); hr = IDirectDrawSurface_GetPixelFormat(ds, &desc.ddpfPixelFormat); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); IDirectDrawSurface4_Release(ds);
desc.dwFlags = DDSD_CAPS | DDSD_WIDTH | DDSD_HEIGHT | DDSD_PIXELFORMAT; @@ -15943,14 +15943,14 @@ static void test_filling_convention(void) desc.dwWidth = vp_size; desc.dwHeight = vp_size; hr = IDirectDraw2_CreateSurface(ddraw, &desc, &ds, NULL); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface_AddAttachedSurface(rt, ds); - ok(SUCCEEDED(hr), "Failed to attach depth buffer, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to attach depth buffer, hr %#lx.\n", hr);
hr = IDirect3DDevice2_SetRenderState(device, D3DRENDERSTATE_LIGHTING, FALSE); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirect3DDevice2_SetRenderState(device, D3DRENDERSTATE_ZENABLE, D3DZB_FALSE); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
for (i = 0; i < ARRAY_SIZE(tests); ++i) { @@ -15959,17 +15959,17 @@ static void test_filling_convention(void) cur = j ? rt : backbuffer;
hr = IDirect3DDevice2_SetRenderTarget(device, cur, 0); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirect3DViewport2_Clear(viewport, 1, &clear_rect, D3DCLEAR_TARGET); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
hr = IDirect3DDevice2_BeginScene(device); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirect3DDevice2_DrawPrimitive(device, D3DPT_TRIANGLELIST, tests[i].fvf, tests[i].geometry, 12, 0); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirect3DDevice2_EndScene(device); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
for (y = 0; y < 8; y++) { @@ -16007,7 +16007,7 @@ static void test_filling_convention(void) * convention, but because wined3d will nudge geometry to the left to * keep diagonals (the 'R' in test case 'edge_tris') intact. */ todo_wine_if(todo && !compare_color(colour, expected, 1)) - ok(compare_color(colour, expected, 1), "Got unexpected colour %08x, %ux%u, case %u, j %u.\n", + ok(compare_color(colour, expected, 1), "Got unexpected colour %08lx, %ux%u, case %u, j %u.\n", colour, x, y, i, j); } } @@ -16020,9 +16020,9 @@ static void test_filling_convention(void) IDirectDrawSurface_Release(ds); IDirect3D2_Release(d3d); refcount = IDirect3DDevice2_Release(device); - ok(!refcount, "Device has %u references left.\n", refcount); + ok(!refcount, "Device has %lu references left.\n", refcount); refcount = IDirectDraw2_Release(ddraw); - ok(!refcount, "Device has %u references left.\n", refcount); + ok(!refcount, "Device has %lu references left.\n", refcount); DestroyWindow(window); }
diff --git a/dlls/ddraw/tests/ddraw4.c b/dlls/ddraw/tests/ddraw4.c index 399ef157497..d56476c2864 100644 --- a/dlls/ddraw/tests/ddraw4.c +++ b/dlls/ddraw/tests/ddraw4.c @@ -126,7 +126,7 @@ static BOOL ddraw_get_identifier(IDirectDraw4 *ddraw, DDDEVICEIDENTIFIER *identi HRESULT hr;
hr = IDirectDraw4_GetDeviceIdentifier(ddraw, identifier, 0); - ok(SUCCEEDED(hr), "Failed to get device identifier, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get device identifier, hr %#lx.\n", hr);
return SUCCEEDED(hr); } @@ -213,7 +213,7 @@ static DWORD WINAPI create_window_thread_proc(void *param)
p->window = create_window(); ret = SetEvent(p->window_created); - ok(ret, "SetEvent failed, last error %#x.\n", GetLastError()); + ok(ret, "SetEvent failed, last error %#lx.\n", GetLastError());
for (;;) { @@ -226,7 +226,7 @@ static DWORD WINAPI create_window_thread_proc(void *param) break; if (res != WAIT_TIMEOUT) { - ok(0, "Wait failed (%#x), last error %#x.\n", res, GetLastError()); + ok(0, "Wait failed (%#lx), last error %#lx.\n", res, GetLastError()); break; } } @@ -241,13 +241,13 @@ static void create_window_thread(struct create_window_thread_param *p) DWORD res, tid;
p->window_created = CreateEventA(NULL, FALSE, FALSE, NULL); - ok(!!p->window_created, "CreateEvent failed, last error %#x.\n", GetLastError()); + ok(!!p->window_created, "CreateEvent failed, last error %#lx.\n", GetLastError()); p->destroy_window = CreateEventA(NULL, FALSE, FALSE, NULL); - ok(!!p->destroy_window, "CreateEvent failed, last error %#x.\n", GetLastError()); + ok(!!p->destroy_window, "CreateEvent failed, last error %#lx.\n", GetLastError()); p->thread = CreateThread(NULL, 0, create_window_thread_proc, p, 0, &tid); - ok(!!p->thread, "Failed to create thread, last error %#x.\n", GetLastError()); + ok(!!p->thread, "Failed to create thread, last error %#lx.\n", GetLastError()); res = WaitForSingleObject(p->window_created, INFINITE); - ok(res == WAIT_OBJECT_0, "Wait failed (%#x), last error %#x.\n", res, GetLastError()); + ok(res == WAIT_OBJECT_0, "Wait failed (%#lx), last error %#lx.\n", res, GetLastError()); }
static void destroy_window_thread(struct create_window_thread_param *p) @@ -266,9 +266,9 @@ static IDirectDrawSurface4 *get_depth_stencil(IDirect3DDevice3 *device) HRESULT hr;
hr = IDirect3DDevice3_GetRenderTarget(device, &rt); - ok(SUCCEEDED(hr), "Failed to get the render target, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get the render target, hr %#lx.\n", hr); hr = IDirectDrawSurface4_GetAttachedSurface(rt, &caps, &ret); - ok(SUCCEEDED(hr) || hr == DDERR_NOTFOUND, "Failed to get the z buffer, hr %#x.\n", hr); + ok(SUCCEEDED(hr) || hr == DDERR_NOTFOUND, "Failed to get the z buffer, hr %#lx.\n", hr); IDirectDrawSurface4_Release(rt); return ret; } @@ -354,14 +354,14 @@ static D3DCOLOR get_surface_color(IDirectDrawSurface4 *surface, UINT x, UINT y) surface_desc.dwSize = sizeof(surface_desc);
hr = IDirectDrawSurface4_Lock(surface, &rect, &surface_desc, DDLOCK_READONLY | DDLOCK_WAIT, NULL); - ok(SUCCEEDED(hr), "Failed to lock surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to lock surface, hr %#lx.\n", hr); if (FAILED(hr)) return 0xdeadbeef;
color = *((DWORD *)surface_desc.lpSurface) & 0x00ffffff;
hr = IDirectDrawSurface4_Unlock(surface, &rect); - ok(SUCCEEDED(hr), "Failed to unlock surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to unlock surface, hr %#lx.\n", hr);
return color; } @@ -374,7 +374,7 @@ static void fill_surface(IDirectDrawSurface4 *surface, D3DCOLOR color) DWORD *ptr;
hr = IDirectDrawSurface4_Lock(surface, NULL, &surface_desc, DDLOCK_WAIT, NULL); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr);
for (y = 0; y < surface_desc.dwHeight; ++y) { @@ -386,7 +386,7 @@ static void fill_surface(IDirectDrawSurface4 *surface, D3DCOLOR color) }
hr = IDirectDrawSurface4_Unlock(surface, NULL); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); }
static void check_rect(IDirectDrawSurface4 *surface, RECT r, const char *message) @@ -420,7 +420,7 @@ static void check_rect(IDirectDrawSurface4 *surface, RECT r, const char *message if (x < 0 || x >= 640 || y < 0 || y >= 480) continue; color = get_surface_color(surface, x, y); - ok(color == expected, "%s: Pixel (%d, %d) has color %08x, expected %08x\n", + ok(color == expected, "%s: Pixel (%ld, %ld) has color %08lx, expected %08lx\n", message, x, y, color, expected); } } @@ -469,7 +469,7 @@ static IDirect3DDevice3 *create_device_ex(HWND window, DWORD coop_level, const G return NULL;
hr = IDirectDraw4_SetCooperativeLevel(ddraw4, window, coop_level); - ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#lx.\n", hr);
memset(&surface_desc, 0, sizeof(surface_desc)); surface_desc.dwSize = sizeof(surface_desc); @@ -481,18 +481,18 @@ static IDirect3DDevice3 *create_device_ex(HWND window, DWORD coop_level, const G surface_desc.dwHeight = 480;
hr = IDirectDraw4_CreateSurface(ddraw4, &surface_desc, &surface, NULL); - ok(SUCCEEDED(hr), "Failed to create surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create surface, hr %#lx.\n", hr);
if (coop_level & DDSCL_NORMAL) { IDirectDrawClipper *clipper;
hr = IDirectDraw4_CreateClipper(ddraw4, 0, &clipper, NULL); - ok(SUCCEEDED(hr), "Failed to create clipper, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create clipper, hr %#lx.\n", hr); hr = IDirectDrawClipper_SetHWnd(clipper, 0, window); - ok(SUCCEEDED(hr), "Failed to set clipper window, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set clipper window, hr %#lx.\n", hr); hr = IDirectDrawSurface4_SetClipper(surface, clipper); - ok(SUCCEEDED(hr), "Failed to set surface clipper, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set surface clipper, hr %#lx.\n", hr); IDirectDrawClipper_Release(clipper); }
@@ -524,7 +524,7 @@ static IDirect3DDevice3 *create_device_ex(HWND window, DWORD coop_level, const G surface_desc.dwWidth = 640; surface_desc.dwHeight = 480; hr = IDirectDraw4_CreateSurface(ddraw4, &surface_desc, &ds, NULL); - ok(SUCCEEDED(hr), "Failed to create depth buffer, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create depth buffer, hr %#lx.\n", hr); if (FAILED(hr)) { IDirect3D3_Release(d3d3); @@ -533,7 +533,7 @@ static IDirect3DDevice3 *create_device_ex(HWND window, DWORD coop_level, const G }
hr = IDirectDrawSurface4_AddAttachedSurface(surface, ds); - ok(SUCCEEDED(hr), "Failed to attach depth buffer, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to attach depth buffer, hr %#lx.\n", hr); IDirectDrawSurface4_Release(ds); if (FAILED(hr)) { @@ -564,11 +564,11 @@ static IDirect3DViewport3 *create_viewport(IDirect3DDevice3 *device, UINT x, UIN HRESULT hr;
hr = IDirect3DDevice3_GetDirect3D(device, &d3d); - ok(SUCCEEDED(hr), "Failed to get d3d interface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get d3d interface, hr %#lx.\n", hr); hr = IDirect3D3_CreateViewport(d3d, &viewport, NULL); - ok(SUCCEEDED(hr), "Failed to create viewport, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create viewport, hr %#lx.\n", hr); hr = IDirect3DDevice3_AddViewport(device, viewport); - ok(SUCCEEDED(hr), "Failed to add viewport, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to add viewport, hr %#lx.\n", hr); memset(&vp, 0, sizeof(vp)); vp.dwSize = sizeof(vp); vp.dwX = x; @@ -582,7 +582,7 @@ static IDirect3DViewport3 *create_viewport(IDirect3DDevice3 *device, UINT x, UIN vp.dvMinZ = 0.0f; vp.dvMaxZ = 1.0f; hr = IDirect3DViewport3_SetViewport2(viewport, &vp); - ok(SUCCEEDED(hr), "Failed to set viewport data, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set viewport data, hr %#lx.\n", hr); IDirect3D3_Release(d3d);
return viewport; @@ -593,7 +593,7 @@ static void destroy_viewport(IDirect3DDevice3 *device, IDirect3DViewport3 *viewp HRESULT hr;
hr = IDirect3DDevice3_DeleteViewport(device, viewport); - ok(SUCCEEDED(hr), "Failed to delete viewport, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to delete viewport, hr %#lx.\n", hr); IDirect3DViewport3_Release(viewport); }
@@ -604,11 +604,11 @@ static IDirect3DMaterial3 *create_material(IDirect3DDevice3 *device, D3DMATERIAL HRESULT hr;
hr = IDirect3DDevice3_GetDirect3D(device, &d3d); - ok(SUCCEEDED(hr), "Failed to get d3d interface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get d3d interface, hr %#lx.\n", hr); hr = IDirect3D3_CreateMaterial(d3d, &material, NULL); - ok(SUCCEEDED(hr), "Failed to create material, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create material, hr %#lx.\n", hr); hr = IDirect3DMaterial3_SetMaterial(material, mat); - ok(SUCCEEDED(hr), "Failed to set material data, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set material data, hr %#lx.\n", hr); IDirect3D3_Release(d3d);
return material; @@ -702,13 +702,13 @@ static LRESULT CALLBACK test_proc(HWND hwnd, UINT message, WPARAM wparam, LPARAM { if (expect_messages->check_wparam) ok (wparam == expect_messages->expect_wparam, - "Got unexpected wparam %lx for message %x, expected %lx.\n", + "Got unexpected wparam %Ix for message %x, expected %Ix.\n", wparam, message, expect_messages->expect_wparam);
if (focus_test_ddraw) { hr = IDirectDraw4_TestCooperativeLevel(focus_test_ddraw); - ok(hr == expect_messages->ddraw_state, "Got ddraw state %#x on message %#x, expected %#x.\n", + ok(hr == expect_messages->ddraw_state, "Got ddraw state %#lx on message %#x, expected %#lx.\n", hr, message, expect_messages->ddraw_state); }
@@ -731,9 +731,9 @@ static void fix_wndproc(HWND window, LONG_PTR proc)
SetWindowLongPtrA(window, GWLP_WNDPROC, proc); hr = IDirectDraw4_SetCooperativeLevel(ddraw, window, DDSCL_EXCLUSIVE | DDSCL_FULLSCREEN); - ok(SUCCEEDED(hr), "SetCooperativeLevel failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "SetCooperativeLevel failed, hr %#lx.\n", hr); hr = IDirectDraw4_SetCooperativeLevel(ddraw, window, DDSCL_NORMAL); - ok(SUCCEEDED(hr), "SetCooperativeLevel failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "SetCooperativeLevel failed, hr %#lx.\n", hr);
IDirectDraw4_Release(ddraw); } @@ -776,17 +776,17 @@ static void test_process_vertices(void) }
hr = IDirect3DDevice3_GetDirect3D(device, &d3d3); - ok(SUCCEEDED(hr), "Failed to get Direct3D3 interface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get Direct3D3 interface, hr %#lx.\n", hr);
memset(&vb_desc, 0, sizeof(vb_desc)); vb_desc.dwSize = sizeof(vb_desc); vb_desc.dwFVF = D3DFVF_XYZ; vb_desc.dwNumVertices = 3; hr = IDirect3D3_CreateVertexBuffer(d3d3, &vb_desc, &src_vb, 0, NULL); - ok(SUCCEEDED(hr), "Failed to create source vertex buffer, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create source vertex buffer, hr %#lx.\n", hr);
hr = IDirect3DVertexBuffer_Lock(src_vb, DDLOCK_WRITEONLY, (void **)&src_data, NULL); - ok(SUCCEEDED(hr), "Failed to lock source vertex buffer, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to lock source vertex buffer, hr %#lx.\n", hr); src_data[0].x = -1.0f; src_data[0].y = -1.0f; src_data[0].z = -1.0f; @@ -797,19 +797,19 @@ static void test_process_vertices(void) src_data[2].y = 1.0f; src_data[2].z = 1.0f; hr = IDirect3DVertexBuffer_Unlock(src_vb); - ok(SUCCEEDED(hr), "Failed to unlock source vertex buffer, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to unlock source vertex buffer, hr %#lx.\n", hr);
memset(&vb_desc, 0, sizeof(vb_desc)); vb_desc.dwSize = sizeof(vb_desc); vb_desc.dwFVF = D3DFVF_XYZRHW; vb_desc.dwNumVertices = 3; hr = IDirect3D3_CreateVertexBuffer(d3d3, &vb_desc, &dst_vb, 0, NULL); - ok(SUCCEEDED(hr), "Failed to create destination vertex buffer, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create destination vertex buffer, hr %#lx.\n", hr);
hr = IDirect3D3_CreateViewport(d3d3, &viewport, NULL); - ok(SUCCEEDED(hr), "Failed to create viewport, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create viewport, hr %#lx.\n", hr); hr = IDirect3DDevice3_AddViewport(device, viewport); - ok(SUCCEEDED(hr), "Failed to add viewport, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to add viewport, hr %#lx.\n", hr); vp2.dwSize = sizeof(vp2); vp2.dwX = 10; vp2.dwY = 20; @@ -822,22 +822,22 @@ static void test_process_vertices(void) vp2.dvMinZ = -2.0f; vp2.dvMaxZ = 3.0f; hr = IDirect3DViewport3_SetViewport2(viewport, &vp2); - ok(SUCCEEDED(hr), "Failed to set viewport data, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set viewport data, hr %#lx.\n", hr); hr = IDirect3DDevice3_SetCurrentViewport(device, viewport); - ok(SUCCEEDED(hr), "Failed to set current viewport, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set current viewport, hr %#lx.\n", hr);
hr = IDirect3DDevice3_SetTransform(device, D3DTRANSFORMSTATE_WORLD, &identity); - ok(SUCCEEDED(hr), "Failed to set world transformation, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set world transformation, hr %#lx.\n", hr); hr = IDirect3DDevice3_SetTransform(device, D3DTRANSFORMSTATE_VIEW, &identity); - ok(SUCCEEDED(hr), "Failed to set view transformation, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set view transformation, hr %#lx.\n", hr); hr = IDirect3DDevice3_SetTransform(device, D3DTRANSFORMSTATE_PROJECTION, &identity); - ok(SUCCEEDED(hr), "Failed to set projection transformation, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set projection transformation, hr %#lx.\n", hr);
hr = IDirect3DVertexBuffer_ProcessVertices(dst_vb, D3DVOP_TRANSFORM, 0, 3, src_vb, 0, device, 0); - ok(SUCCEEDED(hr), "Failed to process vertices, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to process vertices, hr %#lx.\n", hr);
hr = IDirect3DVertexBuffer_Lock(dst_vb, DDLOCK_READONLY, (void **)&dst_data, NULL); - ok(SUCCEEDED(hr), "Failed to lock destination vertex buffer, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to lock destination vertex buffer, hr %#lx.\n", hr); ok(compare_vec4(&dst_data[0], -6.500e+1f, +1.800e+2f, +2.000e-1f, +1.000e+0f, 4096), "Got unexpected vertex 0 {%.8e, %.8e, %.8e, %.8e}.\n", dst_data[0].x, dst_data[0].y, dst_data[0].z, dst_data[0].w); @@ -848,16 +848,16 @@ static void test_process_vertices(void) "Got unexpected vertex 2 {%.8e, %.8e, %.8e, %.8e}.\n", dst_data[2].x, dst_data[2].y, dst_data[2].z, dst_data[2].w); hr = IDirect3DVertexBuffer_Unlock(dst_vb); - ok(SUCCEEDED(hr), "Failed to unlock destination vertex buffer, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to unlock destination vertex buffer, hr %#lx.\n", hr);
hr = IDirect3DDevice3_MultiplyTransform(device, D3DTRANSFORMSTATE_PROJECTION, &projection); - ok(SUCCEEDED(hr), "Failed to set projection transformation, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set projection transformation, hr %#lx.\n", hr);
hr = IDirect3DVertexBuffer_ProcessVertices(dst_vb, D3DVOP_TRANSFORM, 0, 3, src_vb, 0, device, 0); - ok(SUCCEEDED(hr), "Failed to process vertices, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to process vertices, hr %#lx.\n", hr);
hr = IDirect3DVertexBuffer_Lock(dst_vb, DDLOCK_READONLY, (void **)&dst_data, NULL); - ok(SUCCEEDED(hr), "Failed to lock destination vertex buffer, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to lock destination vertex buffer, hr %#lx.\n", hr); ok(compare_vec4(&dst_data[0], +8.500e+1f, -1.000e+2f, +1.800e+0f, +1.000e+0f, 4096), "Got unexpected vertex 0 {%.8e, %.8e, %.8e, %.8e}.\n", dst_data[0].x, dst_data[0].y, dst_data[0].z, dst_data[0].w); @@ -868,7 +868,7 @@ static void test_process_vertices(void) "Got unexpected vertex 2 {%.8e, %.8e, %.8e, %.8e}.\n", dst_data[2].x, dst_data[2].y, dst_data[2].z, dst_data[2].w); hr = IDirect3DVertexBuffer_Unlock(dst_vb); - ok(SUCCEEDED(hr), "Failed to unlock destination vertex buffer, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to unlock destination vertex buffer, hr %#lx.\n", hr);
vp2.dwSize = sizeof(vp2); vp2.dwX = 30; @@ -882,13 +882,13 @@ static void test_process_vertices(void) vp2.dvMinZ = 3.0f; vp2.dvMaxZ = -2.0f; hr = IDirect3DViewport3_SetViewport2(viewport, &vp2); - ok(SUCCEEDED(hr), "Failed to set viewport data, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set viewport data, hr %#lx.\n", hr);
hr = IDirect3DVertexBuffer_ProcessVertices(dst_vb, D3DVOP_TRANSFORM, 0, 3, src_vb, 0, device, 0); - ok(SUCCEEDED(hr), "Failed to process vertices, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to process vertices, hr %#lx.\n", hr);
hr = IDirect3DVertexBuffer_Lock(dst_vb, DDLOCK_READONLY, (void **)&dst_data, NULL); - ok(SUCCEEDED(hr), "Failed to lock destination vertex buffer, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to lock destination vertex buffer, hr %#lx.\n", hr); ok(compare_vec4(&dst_data[0], +7.500e+1f, +4.000e+1f, -8.000e-1f, +1.000e+0f, 4096), "Got unexpected vertex 0 {%.8e, %.8e, %.8e, %.8e}.\n", dst_data[0].x, dst_data[0].y, dst_data[0].z, dst_data[0].w); @@ -899,7 +899,7 @@ static void test_process_vertices(void) "Got unexpected vertex 2 {%.8e, %.8e, %.8e, %.8e}.\n", dst_data[2].x, dst_data[2].y, dst_data[2].z, dst_data[2].w); hr = IDirect3DVertexBuffer_Unlock(dst_vb); - ok(SUCCEEDED(hr), "Failed to unlock destination vertex buffer, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to unlock destination vertex buffer, hr %#lx.\n", hr);
vp1.dwSize = sizeof(vp1); vp1.dwX = 30; @@ -913,13 +913,13 @@ static void test_process_vertices(void) vp1.dvMinZ = -2.0f; vp1.dvMaxZ = 3.0f; hr = IDirect3DViewport3_SetViewport(viewport, &vp1); - ok(SUCCEEDED(hr), "Failed to set viewport data, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set viewport data, hr %#lx.\n", hr);
hr = IDirect3DVertexBuffer_ProcessVertices(dst_vb, D3DVOP_TRANSFORM, 0, 3, src_vb, 0, device, 0); - ok(SUCCEEDED(hr), "Failed to process vertices, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to process vertices, hr %#lx.\n", hr);
hr = IDirect3DVertexBuffer_Lock(dst_vb, DDLOCK_READONLY, (void **)&dst_data, NULL); - ok(SUCCEEDED(hr), "Failed to lock destination vertex buffer, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to lock destination vertex buffer, hr %#lx.\n", hr); ok(compare_vec4(&dst_data[0], +1.100e+2f, +6.800e+1f, +7.000e+0f, +1.000e+0f, 4096), "Got unexpected vertex 0 {%.8e, %.8e, %.8e, %.8e}.\n", dst_data[0].x, dst_data[0].y, dst_data[0].z, dst_data[0].w); @@ -930,10 +930,10 @@ static void test_process_vertices(void) "Got unexpected vertex 2 {%.8e, %.8e, %.8e, %.8e}.\n", dst_data[2].x, dst_data[2].y, dst_data[2].z, dst_data[2].w); hr = IDirect3DVertexBuffer_Unlock(dst_vb); - ok(SUCCEEDED(hr), "Failed to unlock destination vertex buffer, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to unlock destination vertex buffer, hr %#lx.\n", hr);
hr = IDirect3DDevice3_DeleteViewport(device, viewport); - ok(SUCCEEDED(hr), "Failed to delete viewport, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to delete viewport, hr %#lx.\n", hr);
IDirect3DVertexBuffer_Release(dst_vb); IDirect3DVertexBuffer_Release(src_vb); @@ -954,23 +954,23 @@ static void test_coop_level_create_device_window(void) ok(!!ddraw, "Failed to create a ddraw object.\n");
hr = IDirectDraw4_SetCooperativeLevel(ddraw, NULL, DDSCL_NORMAL); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); device_window = FindWindowA("DirectDrawDeviceWnd", "DirectDrawDeviceWnd"); ok(!device_window, "Unexpected device window found.\n"); hr = IDirectDraw4_SetCooperativeLevel(ddraw, NULL, DDSCL_CREATEDEVICEWINDOW); - ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#lx.\n", hr); device_window = FindWindowA("DirectDrawDeviceWnd", "DirectDrawDeviceWnd"); ok(!device_window, "Unexpected device window found.\n"); hr = IDirectDraw4_SetCooperativeLevel(ddraw, NULL, DDSCL_CREATEDEVICEWINDOW | DDSCL_NORMAL); - ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#lx.\n", hr); device_window = FindWindowA("DirectDrawDeviceWnd", "DirectDrawDeviceWnd"); ok(!device_window, "Unexpected device window found.\n"); hr = IDirectDraw4_SetCooperativeLevel(ddraw, NULL, DDSCL_CREATEDEVICEWINDOW | DDSCL_NORMAL | DDSCL_FULLSCREEN); - ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#lx.\n", hr); device_window = FindWindowA("DirectDrawDeviceWnd", "DirectDrawDeviceWnd"); ok(!device_window, "Unexpected device window found.\n"); hr = IDirectDraw4_SetCooperativeLevel(ddraw, NULL, DDSCL_CREATEDEVICEWINDOW | DDSCL_EXCLUSIVE | DDSCL_FULLSCREEN); - ok(hr == DDERR_NOFOCUSWINDOW || broken(hr == DDERR_INVALIDPARAMS), "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_NOFOCUSWINDOW || broken(hr == DDERR_INVALIDPARAMS), "Got unexpected hr %#lx.\n", hr); device_window = FindWindowA("DirectDrawDeviceWnd", "DirectDrawDeviceWnd"); ok(!device_window, "Unexpected device window found.\n");
@@ -984,48 +984,48 @@ static void test_coop_level_create_device_window(void) }
hr = IDirectDraw4_SetCooperativeLevel(ddraw, NULL, DDSCL_NORMAL); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); device_window = FindWindowA("DirectDrawDeviceWnd", "DirectDrawDeviceWnd"); ok(!device_window, "Unexpected device window found.\n"); hr = IDirectDraw4_SetCooperativeLevel(ddraw, focus_window, DDSCL_EXCLUSIVE | DDSCL_FULLSCREEN); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); device_window = FindWindowA("DirectDrawDeviceWnd", "DirectDrawDeviceWnd"); ok(!device_window, "Unexpected device window found.\n");
hr = IDirectDraw4_SetCooperativeLevel(ddraw, NULL, DDSCL_NORMAL); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); device_window = FindWindowA("DirectDrawDeviceWnd", "DirectDrawDeviceWnd"); ok(!device_window, "Unexpected device window found.\n"); hr = IDirectDraw4_SetCooperativeLevel(ddraw, NULL, DDSCL_SETFOCUSWINDOW | DDSCL_CREATEDEVICEWINDOW | DDSCL_EXCLUSIVE | DDSCL_FULLSCREEN); - ok(hr == DDERR_NOHWND, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_NOHWND, "Got unexpected hr %#lx.\n", hr); device_window = FindWindowA("DirectDrawDeviceWnd", "DirectDrawDeviceWnd"); ok(!!device_window, "Device window not found.\n");
hr = IDirectDraw4_SetCooperativeLevel(ddraw, NULL, DDSCL_NORMAL); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); device_window = FindWindowA("DirectDrawDeviceWnd", "DirectDrawDeviceWnd"); ok(!device_window, "Unexpected device window found.\n"); hr = IDirectDraw4_SetCooperativeLevel(ddraw, focus_window, DDSCL_SETFOCUSWINDOW | DDSCL_CREATEDEVICEWINDOW | DDSCL_EXCLUSIVE | DDSCL_FULLSCREEN); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); device_window = FindWindowA("DirectDrawDeviceWnd", "DirectDrawDeviceWnd"); ok(!!device_window, "Device window not found.\n");
hr = IDirectDraw4_SetCooperativeLevel(ddraw, NULL, DDSCL_NORMAL); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); device_window = FindWindowA("DirectDrawDeviceWnd", "DirectDrawDeviceWnd"); ok(!device_window, "Unexpected device window found.\n"); hr = IDirectDraw4_SetCooperativeLevel(ddraw, NULL, DDSCL_CREATEDEVICEWINDOW | DDSCL_EXCLUSIVE | DDSCL_FULLSCREEN); - ok(hr == DDERR_NOFOCUSWINDOW, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_NOFOCUSWINDOW, "Got unexpected hr %#lx.\n", hr); device_window = FindWindowA("DirectDrawDeviceWnd", "DirectDrawDeviceWnd"); ok(!device_window, "Unexpected device window found.\n"); hr = IDirectDraw4_SetCooperativeLevel(ddraw, focus_window, DDSCL_SETFOCUSWINDOW); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); device_window = FindWindowA("DirectDrawDeviceWnd", "DirectDrawDeviceWnd"); ok(!device_window, "Unexpected device window found.\n"); hr = IDirectDraw4_SetCooperativeLevel(ddraw, NULL, DDSCL_CREATEDEVICEWINDOW | DDSCL_EXCLUSIVE | DDSCL_FULLSCREEN); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); device_window = FindWindowA("DirectDrawDeviceWnd", "DirectDrawDeviceWnd"); ok(!!device_window, "Device window not found.\n");
@@ -1099,22 +1099,22 @@ static void test_clipper_blt(void) ok(ret, "Failed to map client rect.\n");
hr = IDirectDraw4_SetCooperativeLevel(ddraw, window, DDSCL_NORMAL); - ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#lx.\n", hr);
hr = IDirectDraw4_CreateClipper(ddraw, 0, &clipper, NULL); - ok(SUCCEEDED(hr), "Failed to create clipper, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create clipper, hr %#lx.\n", hr); hr = IDirectDrawClipper_GetClipList(clipper, NULL, NULL, &ret); - ok(hr == DDERR_NOCLIPLIST, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_NOCLIPLIST, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawClipper_SetHWnd(clipper, 0, window); - ok(SUCCEEDED(hr), "Failed to set clipper window, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set clipper window, hr %#lx.\n", hr); hr = IDirectDrawClipper_GetClipList(clipper, NULL, NULL, &ret); - ok(SUCCEEDED(hr), "Failed to get clip list size, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get clip list size, hr %#lx.\n", hr); rgn_data = HeapAlloc(GetProcessHeap(), 0, ret); hr = IDirectDrawClipper_GetClipList(clipper, NULL, rgn_data, &ret); - ok(SUCCEEDED(hr), "Failed to get clip list, hr %#x.\n", hr); - ok(rgn_data->rdh.dwSize == sizeof(rgn_data->rdh), "Got unexpected structure size %#x.\n", rgn_data->rdh.dwSize); - ok(rgn_data->rdh.iType == RDH_RECTANGLES, "Got unexpected type %#x.\n", rgn_data->rdh.iType); - ok(rgn_data->rdh.nCount >= 1, "Got unexpected count %u.\n", rgn_data->rdh.nCount); + ok(SUCCEEDED(hr), "Failed to get clip list, hr %#lx.\n", hr); + ok(rgn_data->rdh.dwSize == sizeof(rgn_data->rdh), "Got unexpected structure size %#lx.\n", rgn_data->rdh.dwSize); + ok(rgn_data->rdh.iType == RDH_RECTANGLES, "Got unexpected type %#lx.\n", rgn_data->rdh.iType); + ok(rgn_data->rdh.nCount >= 1, "Got unexpected count %lu.\n", rgn_data->rdh.nCount); ok(EqualRect(&rgn_data->rdh.rcBound, &client_rect), "Got unexpected bounding rect %s, expected %s.\n", wine_dbgstr_rect(&rgn_data->rdh.rcBound), wine_dbgstr_rect(&client_rect)); @@ -1134,11 +1134,11 @@ static void test_clipper_blt(void) DeleteObject(r1);
hr = IDirectDrawClipper_SetClipList(clipper, rgn_data, 0); - ok(hr == DDERR_CLIPPERISUSINGHWND, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_CLIPPERISUSINGHWND, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawClipper_SetHWnd(clipper, 0, NULL); - ok(SUCCEEDED(hr), "Failed to set clipper window, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set clipper window, hr %#lx.\n", hr); hr = IDirectDrawClipper_SetClipList(clipper, rgn_data, 0); - ok(SUCCEEDED(hr), "Failed to set clip list, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set clip list, hr %#lx.\n", hr);
HeapFree(GetProcessHeap(), 0, rgn_data);
@@ -1156,33 +1156,33 @@ static void test_clipper_blt(void) U4(U4(surface_desc).ddpfPixelFormat).dwBBitMask = 0x000000ff;
hr = IDirectDraw4_CreateSurface(ddraw, &surface_desc, &src_surface, NULL); - ok(SUCCEEDED(hr), "Failed to create source surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create source surface, hr %#lx.\n", hr); hr = IDirectDraw4_CreateSurface(ddraw, &surface_desc, &dst_surface, NULL); - ok(SUCCEEDED(hr), "Failed to create destination surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create destination surface, hr %#lx.\n", hr);
memset(&fx, 0, sizeof(fx)); fx.dwSize = sizeof(fx); hr = IDirectDrawSurface4_Blt(src_surface, NULL, NULL, NULL, DDBLT_COLORFILL | DDBLT_WAIT, &fx); - ok(SUCCEEDED(hr), "Failed to clear source surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to clear source surface, hr %#lx.\n", hr); hr = IDirectDrawSurface4_Blt(dst_surface, NULL, NULL, NULL, DDBLT_COLORFILL | DDBLT_WAIT, &fx); - ok(SUCCEEDED(hr), "Failed to clear destination surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to clear destination surface, hr %#lx.\n", hr);
hr = IDirectDrawSurface4_Lock(src_surface, NULL, &surface_desc, DDLOCK_WAIT, NULL); - ok(SUCCEEDED(hr), "Failed to lock source surface, hr %#x.\n", hr); - ok(U1(surface_desc).lPitch == 2560, "Got unexpected surface pitch %u.\n", U1(surface_desc).lPitch); + ok(SUCCEEDED(hr), "Failed to lock source surface, hr %#lx.\n", hr); + ok(U1(surface_desc).lPitch == 2560, "Got unexpected surface pitch %lu.\n", U1(surface_desc).lPitch); ptr = surface_desc.lpSurface; memcpy(&ptr[ 0], &src_data[ 0], 6 * sizeof(DWORD)); memcpy(&ptr[ 640], &src_data[ 6], 6 * sizeof(DWORD)); memcpy(&ptr[1280], &src_data[12], 6 * sizeof(DWORD)); hr = IDirectDrawSurface4_Unlock(src_surface, NULL); - ok(SUCCEEDED(hr), "Failed to unlock source surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to unlock source surface, hr %#lx.\n", hr);
hr = IDirectDrawSurface4_SetClipper(dst_surface, clipper); - ok(SUCCEEDED(hr), "Failed to set clipper, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set clipper, hr %#lx.\n", hr);
SetRect(&src_rect, 1, 1, 5, 2); hr = IDirectDrawSurface4_Blt(dst_surface, NULL, src_surface, &src_rect, DDBLT_WAIT, NULL); - ok(SUCCEEDED(hr), "Failed to blit, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to blit, hr %#lx.\n", hr); for (i = 0; i < 4; ++i) { for (j = 0; j < 4; ++j) @@ -1192,13 +1192,13 @@ static void test_clipper_blt(void) color = get_surface_color(dst_surface, x, y); ok(compare_color(color, expected1[i * 4 + j], 1) || broken(compare_color(color, expected1_broken[i * 4 + j], 1)), - "Expected color 0x%08x at %u,%u, got 0x%08x.\n", expected1[i * 4 + j], x, y, color); + "Expected color 0x%08lx at %u,%u, got 0x%08lx.\n", expected1[i * 4 + j], x, y, color); } }
U5(fx).dwFillColor = 0xff0000ff; hr = IDirectDrawSurface4_Blt(dst_surface, NULL, NULL, NULL, DDBLT_COLORFILL | DDBLT_WAIT, &fx); - ok(SUCCEEDED(hr), "Failed to clear destination surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to clear destination surface, hr %#lx.\n", hr); for (i = 0; i < 4; ++i) { for (j = 0; j < 4; ++j) @@ -1207,35 +1207,35 @@ static void test_clipper_blt(void) y = 60 * ((2 * i) + 1); color = get_surface_color(dst_surface, x, y); ok(compare_color(color, expected2[i * 4 + j], 1), - "Expected color 0x%08x at %u,%u, got 0x%08x.\n", expected2[i * 4 + j], x, y, color); + "Expected color 0x%08lx at %u,%u, got 0x%08lx.\n", expected2[i * 4 + j], x, y, color); } }
hr = IDirectDrawSurface4_BltFast(dst_surface, 0, 0, src_surface, NULL, DDBLTFAST_WAIT); - ok(hr == DDERR_BLTFASTCANTCLIP, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_BLTFASTCANTCLIP, "Got unexpected hr %#lx.\n", hr);
hr = IDirectDrawClipper_SetHWnd(clipper, 0, window); - ok(SUCCEEDED(hr), "Failed to set clipper window, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set clipper window, hr %#lx.\n", hr); hr = IDirectDrawClipper_GetClipList(clipper, NULL, NULL, &ret); - ok(SUCCEEDED(hr), "Failed to get clip list size, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get clip list size, hr %#lx.\n", hr); DestroyWindow(window); hr = IDirectDrawClipper_GetClipList(clipper, NULL, NULL, &ret); - ok(hr == E_FAIL, "Got unexpected hr %#x.\n", hr); + ok(hr == E_FAIL, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawClipper_SetHWnd(clipper, 0, NULL); - ok(SUCCEEDED(hr), "Failed to set clipper window, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set clipper window, hr %#lx.\n", hr); hr = IDirectDrawClipper_GetClipList(clipper, NULL, NULL, &ret); - ok(SUCCEEDED(hr), "Failed to get clip list size, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get clip list size, hr %#lx.\n", hr); hr = IDirectDrawClipper_SetClipList(clipper, NULL, 0); - ok(SUCCEEDED(hr), "Failed to set clip list, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set clip list, hr %#lx.\n", hr); hr = IDirectDrawClipper_GetClipList(clipper, NULL, NULL, &ret); - ok(hr == DDERR_NOCLIPLIST, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_NOCLIPLIST, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface4_Blt(dst_surface, NULL, NULL, NULL, DDBLT_COLORFILL | DDBLT_WAIT, &fx); - ok(hr == DDERR_NOCLIPLIST, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_NOCLIPLIST, "Got unexpected hr %#lx.\n", hr);
IDirectDrawSurface4_Release(dst_surface); IDirectDrawSurface4_Release(src_surface); refcount = IDirectDrawClipper_Release(clipper); - ok(!refcount, "Clipper has %u references left.\n", refcount); + ok(!refcount, "Clipper has %lu references left.\n", refcount); IDirectDraw4_Release(ddraw); }
@@ -1277,29 +1277,29 @@ static void test_coop_level_d3d_state(void) viewport = create_viewport(device, 0, 0, 640, 480);
hr = IDirect3DDevice3_SetRenderState(device, D3DRENDERSTATE_SRCBLEND, D3DBLEND_SRCALPHA); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirect3DDevice3_SetRenderState(device, D3DRENDERSTATE_DESTBLEND, D3DBLEND_DESTALPHA); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr);
hr = IDirect3DDevice3_GetRenderTarget(device, &rt); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirect3DDevice3_GetRenderState(device, D3DRENDERSTATE_ZENABLE, &value); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); - ok(!!value, "Got unexpected z-enable state %#x.\n", value); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); + ok(!!value, "Got unexpected z-enable state %#lx.\n", value); hr = IDirect3DDevice3_GetRenderState(device, D3DRENDERSTATE_ALPHABLENDENABLE, &value); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); - ok(!value, "Got unexpected alpha blend enable state %#x.\n", value); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); + ok(!value, "Got unexpected alpha blend enable state %#lx.\n", value); hr = IDirect3DDevice3_SetRenderState(device, D3DRENDERSTATE_ALPHABLENDENABLE, TRUE); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirect3DViewport3_Clear2(viewport, 1, &clear_rect, D3DCLEAR_TARGET, 0xffff0000, 0.0f, 0); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); color = get_surface_color(rt, 320, 240); - ok(compare_color(color, 0x00ff0000, 1), "Got unexpected color 0x%08x.\n", color); + ok(compare_color(color, 0x00ff0000, 1), "Got unexpected color 0x%08lx.\n", color);
hr = IDirect3DDevice3_GetDirect3D(device, &d3d); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirect3D3_QueryInterface(d3d, &IID_IDirectDraw4, (void **)&ddraw); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); IDirect3D3_Release(d3d);
if (ddraw_is_warp(ddraw)) @@ -1310,53 +1310,53 @@ static void test_coop_level_d3d_state(void) }
hr = IDirectDraw4_SetCooperativeLevel(ddraw, window, DDSCL_EXCLUSIVE | DDSCL_FULLSCREEN); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface4_IsLost(rt); - ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#lx.\n", hr);
memset(&lock, 0, sizeof(lock)); lock.dwSize = sizeof(lock); lock.lpSurface = (void *)0xdeadbeef; hr = IDirectDrawSurface4_Lock(rt, NULL, &lock, DDLOCK_READONLY, NULL); - ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#lx.\n", hr); ok(lock.lpSurface == (void *)0xdeadbeef, "Got unexpected lock.lpSurface %p.\n", lock.lpSurface);
hr = IDirectDraw4_RestoreAllSurfaces(ddraw); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr);
hr = IDirectDrawSurface4_Lock(rt, NULL, &lock, DDLOCK_READONLY, NULL); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface4_Unlock(rt, NULL); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr);
hr = IDirect3DDevice3_GetRenderTarget(device, &surface); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); ok(surface == rt, "Got unexpected surface %p.\n", surface); IDirectDrawSurface4_Release(surface); hr = IDirect3DDevice3_GetRenderState(device, D3DRENDERSTATE_ZENABLE, &value); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); - ok(!!value, "Got unexpected z-enable state %#x.\n", value); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); + ok(!!value, "Got unexpected z-enable state %#lx.\n", value); hr = IDirect3DDevice3_GetRenderState(device, D3DRENDERSTATE_ALPHABLENDENABLE, &value); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); - ok(!!value, "Got unexpected alpha blend enable state %#x.\n", value); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); + ok(!!value, "Got unexpected alpha blend enable state %#lx.\n", value); hr = IDirect3DViewport3_Clear2(viewport, 1, &clear_rect, D3DCLEAR_TARGET | D3DCLEAR_ZBUFFER, 0xff00ff00, 1.0f, 0); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); color = get_surface_color(rt, 320, 240); - ok(compare_color(color, 0x0000ff00, 1), "Got unexpected color 0x%08x.\n", color); + ok(compare_color(color, 0x0000ff00, 1), "Got unexpected color 0x%08lx.\n", color);
hr = IDirect3DDevice3_SetCurrentViewport(device, viewport); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirect3DDevice3_BeginScene(device); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirect3DDevice3_DrawPrimitive(device, D3DPT_TRIANGLESTRIP, D3DFVF_XYZ | D3DFVF_DIFFUSE, quad, ARRAY_SIZE(quad), 0); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirect3DDevice3_EndScene(device); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); color = get_surface_color(rt, 320, 240); ok(compare_color(color, 0x0000ff80, 1) || broken(ddraw_is_warp(ddraw) && compare_color(color, 0x0000ff00, 0)), - "Got unexpected color 0x%08x.\n", color); + "Got unexpected color 0x%08lx.\n", color);
done: destroy_viewport(device, viewport); @@ -1386,7 +1386,7 @@ static void test_surface_interface_mismatch(void) ddraw = create_ddraw(); ok(!!ddraw, "Failed to create a ddraw object.\n"); hr = IDirectDraw4_SetCooperativeLevel(ddraw, window, DDSCL_NORMAL); - ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#lx.\n", hr);
memset(&surface_desc, 0, sizeof(surface_desc)); surface_desc.dwSize = sizeof(surface_desc); @@ -1396,10 +1396,10 @@ static void test_surface_interface_mismatch(void) surface_desc.dwHeight = 480;
hr = IDirectDraw4_CreateSurface(ddraw, &surface_desc, &surface, NULL); - ok(SUCCEEDED(hr), "Failed to create surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create surface, hr %#lx.\n", hr);
hr = IDirectDrawSurface4_QueryInterface(surface, &IID_IDirectDrawSurface3, (void **)&surface3); - ok(SUCCEEDED(hr), "Failed to QI IDirectDrawSurface3, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to QI IDirectDrawSurface3, hr %#lx.\n", hr);
if (FAILED(IDirectDraw4_QueryInterface(ddraw, &IID_IDirect3D3, (void **)&d3d))) { @@ -1423,15 +1423,15 @@ static void test_surface_interface_mismatch(void) surface_desc.dwWidth = 640; surface_desc.dwHeight = 480; hr = IDirectDraw4_CreateSurface(ddraw, &surface_desc, &ds, NULL); - ok(SUCCEEDED(hr), "Failed to create depth buffer, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create depth buffer, hr %#lx.\n", hr); if (FAILED(hr)) goto cleanup;
/* Using a different surface interface version still works */ hr = IDirectDrawSurface3_AddAttachedSurface(surface3, (IDirectDrawSurface3 *)ds); - ok(SUCCEEDED(hr), "Failed to attach depth buffer, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to attach depth buffer, hr %#lx.\n", hr); refcount = IDirectDrawSurface4_Release(ds); - ok(refcount == 1, "Got unexpected refcount %u.\n", refcount); + ok(refcount == 1, "Got unexpected refcount %lu.\n", refcount); if (FAILED(hr)) goto cleanup;
@@ -1444,9 +1444,9 @@ static void test_surface_interface_mismatch(void) viewport = create_viewport(device, 0, 0, 640, 480);
hr = IDirect3DViewport3_Clear2(viewport, 1, &clear_rect, D3DCLEAR_TARGET, 0xffff0000, 0.0f, 0); - ok(SUCCEEDED(hr), "Failed to clear viewport, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to clear viewport, hr %#lx.\n", hr); color = get_surface_color(surface, 320, 240); - ok(compare_color(color, 0x00ff0000, 1), "Got unexpected color 0x%08x.\n", color); + ok(compare_color(color, 0x00ff0000, 1), "Got unexpected color 0x%08lx.\n", color);
cleanup: if (viewport) @@ -1470,7 +1470,7 @@ static void test_coop_level_threaded(void) create_window_thread(&p);
hr = IDirectDraw4_SetCooperativeLevel(ddraw, p.window, DDSCL_EXCLUSIVE | DDSCL_FULLSCREEN); - ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#lx.\n", hr);
destroy_window_thread(&p); IDirectDraw4_Release(ddraw); @@ -1521,9 +1521,9 @@ static void test_depth_blit(const GUID *device_guid) }
hr = IDirect3DDevice3_GetDirect3D(device, &d3d); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirect3D3_QueryInterface(d3d, &IID_IDirectDraw4, (void **)&ddraw); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); IDirect3D3_Release(d3d);
ds1 = get_depth_stencil(device); @@ -1533,7 +1533,7 @@ static void test_depth_blit(const GUID *device_guid) memset(&ddsd_existing, 0, sizeof(ddsd_existing)); ddsd_existing.dwSize = sizeof(ddsd_existing); hr = IDirectDrawSurface4_GetSurfaceDesc(ds1, &ddsd_existing); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); ddsd_new.dwFlags = DDSD_CAPS | DDSD_WIDTH | DDSD_HEIGHT | DDSD_PIXELFORMAT; ddsd_new.ddsCaps.dwCaps = DDSCAPS_ZBUFFER; if (is_software_device_type(device_guid)) @@ -1542,70 +1542,70 @@ static void test_depth_blit(const GUID *device_guid) ddsd_new.dwHeight = ddsd_existing.dwHeight; U4(ddsd_new).ddpfPixelFormat = U4(ddsd_existing).ddpfPixelFormat; hr = IDirectDraw4_CreateSurface(ddraw, &ddsd_new, &ds2, NULL); - ok(SUCCEEDED(hr), "Failed to create a surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create a surface, hr %#lx.\n", hr); hr = IDirectDraw4_CreateSurface(ddraw, &ddsd_new, &ds3, NULL); - ok(SUCCEEDED(hr), "Failed to create a surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create a surface, hr %#lx.\n", hr); IDirectDraw4_Release(ddraw);
viewport = create_viewport(device, 0, 0, ddsd_existing.dwWidth, ddsd_existing.dwHeight); hr = IDirect3DDevice3_SetCurrentViewport(device, viewport); - ok(SUCCEEDED(hr), "Failed to activate the viewport, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to activate the viewport, hr %#lx.\n", hr);
hr = IDirect3DDevice3_SetRenderState(device, D3DRENDERSTATE_ZENABLE, D3DZB_TRUE); - ok(SUCCEEDED(hr), "Failed to enable z testing, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to enable z testing, hr %#lx.\n", hr); hr = IDirect3DDevice3_SetRenderState(device, D3DRENDERSTATE_ZFUNC, D3DCMP_LESSEQUAL); - ok(SUCCEEDED(hr), "Failed to set the z function, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set the z function, hr %#lx.\n", hr);
U1(d3drect).x1 = U2(d3drect).y1 = 0; U3(d3drect).x2 = ddsd_existing.dwWidth; U4(d3drect).y2 = ddsd_existing.dwHeight; hr = IDirect3DViewport3_Clear2(viewport, 1, &d3drect, D3DCLEAR_ZBUFFER, 0, 0.0f, 0); - ok(SUCCEEDED(hr), "Failed to clear the z buffer, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to clear the z buffer, hr %#lx.\n", hr);
/* Partial blit. */ SetRect(&src_rect, 0, 0, 320, 240); SetRect(&dst_rect, 0, 0, 320, 240); hr = IDirectDrawSurface4_Blt(ds2, &dst_rect, ds1, &src_rect, DDBLT_WAIT, NULL); - ok(SUCCEEDED(hr), "Got unexpected hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Got unexpected hr %#lx.\n", hr); /* Different locations. */ SetRect(&src_rect, 0, 0, 320, 240); SetRect(&dst_rect, 320, 240, 640, 480); hr = IDirectDrawSurface4_Blt(ds2, &dst_rect, ds1, &src_rect, DDBLT_WAIT, NULL); - ok(SUCCEEDED(hr), "Got unexpected hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Got unexpected hr %#lx.\n", hr); /* Stretched. */ SetRect(&src_rect, 0, 0, 320, 240); SetRect(&dst_rect, 0, 0, 640, 480); hr = IDirectDrawSurface4_Blt(ds2, &dst_rect, ds1, &src_rect, DDBLT_WAIT, NULL); - ok(SUCCEEDED(hr), "Got unexpected hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Got unexpected hr %#lx.\n", hr); /* Flipped. */ SetRect(&src_rect, 0, 480, 640, 0); SetRect(&dst_rect, 0, 0, 640, 480); hr = IDirectDrawSurface4_Blt(ds2, &dst_rect, ds1, &src_rect, DDBLT_WAIT, NULL); - ok(hr == DDERR_INVALIDRECT, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_INVALIDRECT, "Got unexpected hr %#lx.\n", hr); SetRect(&src_rect, 0, 0, 640, 480); SetRect(&dst_rect, 0, 480, 640, 0); hr = IDirectDrawSurface4_Blt(ds2, &dst_rect, ds1, &src_rect, DDBLT_WAIT, NULL); - ok(hr == DDERR_INVALIDRECT, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_INVALIDRECT, "Got unexpected hr %#lx.\n", hr); /* Full, explicit. */ SetRect(&src_rect, 0, 0, 640, 480); SetRect(&dst_rect, 0, 0, 640, 480); hr = IDirectDrawSurface4_Blt(ds2, &dst_rect, ds1, &src_rect, DDBLT_WAIT, NULL); - ok(SUCCEEDED(hr), "Got unexpected hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Got unexpected hr %#lx.\n", hr); /* Depth -> color blit: Succeeds on Win7 + Radeon HD 5700, fails on WinXP + Radeon X1600 */
/* Depth blit inside a BeginScene / EndScene pair */ hr = IDirect3DDevice3_BeginScene(device); - ok(SUCCEEDED(hr), "Failed to start a scene, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to start a scene, hr %#lx.\n", hr); /* From the current depth stencil */ hr = IDirectDrawSurface4_Blt(ds2, NULL, ds1, NULL, DDBLT_WAIT, NULL); - ok(SUCCEEDED(hr), "Got unexpected hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Got unexpected hr %#lx.\n", hr); /* To the current depth stencil */ hr = IDirectDrawSurface4_Blt(ds1, NULL, ds2, NULL, DDBLT_WAIT, NULL); - ok(SUCCEEDED(hr), "Got unexpected hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Got unexpected hr %#lx.\n", hr); /* Between unbound surfaces */ hr = IDirectDrawSurface4_Blt(ds3, NULL, ds2, NULL, DDBLT_WAIT, NULL); - ok(SUCCEEDED(hr), "Got unexpected hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Got unexpected hr %#lx.\n", hr); hr = IDirect3DDevice3_EndScene(device); - ok(SUCCEEDED(hr), "Failed to end a scene, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to end a scene, hr %#lx.\n", hr);
/* Avoid changing the depth stencil, it doesn't work properly on Windows. * Instead use DDBLT_DEPTHFILL to clear the depth stencil. Unfortunately @@ -1614,40 +1614,40 @@ static void test_depth_blit(const GUID *device_guid) memset(&fx, 0, sizeof(fx)); fx.dwSize = sizeof(fx); hr = IDirectDrawSurface4_Blt(ds2, NULL, NULL, NULL, DDBLT_DEPTHFILL | DDBLT_WAIT, &fx); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
hr = IDirect3DDevice3_GetRenderTarget(device, &rt); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
hr = IDirect3DViewport3_Clear2(viewport, 1, &d3drect, D3DCLEAR_ZBUFFER | D3DCLEAR_TARGET, 0xffff0000, 1.0f, 0); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
color = get_surface_color(rt, 80, 60); /* For some reason clears and colour fill blits randomly fail with software render target. */ ok(color == 0x00ff0000 || broken(is_software_device_type(device_guid) && !color), - "Got unexpected colour 0x%08x.\n", color); + "Got unexpected colour 0x%08lx.\n", color); if (!color) { fill_surface(rt, 0xffff0000);
color = get_surface_color(rt, 80, 60); - ok(color == 0x00ff0000, "Got unexpected colour 0x%08x.\n", color); + ok(color == 0x00ff0000, "Got unexpected colour 0x%08lx.\n", color); }
SetRect(&dst_rect, 0, 0, 320, 240); hr = IDirectDrawSurface4_Blt(ds1, &dst_rect, ds2, NULL, DDBLT_WAIT, NULL); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); IDirectDrawSurface4_Release(ds3); IDirectDrawSurface4_Release(ds2); IDirectDrawSurface4_Release(ds1);
hr = IDirect3DDevice3_BeginScene(device); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirect3DDevice3_DrawPrimitive(device, D3DPT_TRIANGLESTRIP, D3DFVF_XYZ | D3DFVF_DIFFUSE, quad1, 4, 0); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirect3DDevice3_EndScene(device); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
for (i = 0; i < 4; ++i) { @@ -1657,7 +1657,7 @@ static void test_depth_blit(const GUID *device_guid) unsigned int y = 60 * ((2 * i) + 1); color = get_surface_color(rt, x, y); ok(compare_color(color, expected_colors[i][j], 1), - "Expected color 0x%08x at %u,%u, got 0x%08x.\n", expected_colors[i][j], x, y, color); + "Expected color 0x%08lx at %u,%u, got 0x%08lx.\n", expected_colors[i][j], x, y, color); } } IDirectDrawSurface4_Release(rt); @@ -1681,7 +1681,7 @@ static void test_texture_load_ckey(void) ddraw = create_ddraw(); ok(!!ddraw, "Failed to create a ddraw object.\n"); hr = IDirectDraw4_SetCooperativeLevel(ddraw, NULL, DDSCL_NORMAL); - ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#lx.\n", hr);
memset(&ddsd, 0, sizeof(ddsd)); ddsd.dwSize = sizeof(ddsd); @@ -1690,13 +1690,13 @@ static void test_texture_load_ckey(void) ddsd.dwWidth = 128; ddsd.ddsCaps.dwCaps = DDSCAPS_TEXTURE | DDSCAPS_SYSTEMMEMORY; hr = IDirectDraw4_CreateSurface(ddraw, &ddsd, &src, NULL); - ok(SUCCEEDED(hr), "Failed to create source texture, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create source texture, hr %#lx.\n", hr); ddsd.ddsCaps.dwCaps = DDSCAPS_TEXTURE; hr = IDirectDraw4_CreateSurface(ddraw, &ddsd, &dst, NULL); - ok(SUCCEEDED(hr), "Failed to create destination texture, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create destination texture, hr %#lx.\n", hr);
hr = IDirectDrawSurface4_QueryInterface(src, &IID_IDirect3DTexture2, (void **)&src_tex); - ok(SUCCEEDED(hr) || hr == E_NOINTERFACE, "Failed to get Direct3DTexture2 interface, hr %#x.\n", hr); + ok(SUCCEEDED(hr) || hr == E_NOINTERFACE, "Failed to get Direct3DTexture2 interface, hr %#lx.\n", hr); if (FAILED(hr)) { /* 64 bit ddraw does not support d3d */ @@ -1707,50 +1707,50 @@ static void test_texture_load_ckey(void) return; } hr = IDirectDrawSurface4_QueryInterface(dst, &IID_IDirect3DTexture2, (void **)&dst_tex); - ok(SUCCEEDED(hr), "Failed to get Direct3DTexture2 interface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get Direct3DTexture2 interface, hr %#lx.\n", hr);
/* No surface has a color key */ hr = IDirect3DTexture2_Load(dst_tex, src_tex); - ok(SUCCEEDED(hr), "Got unexpected hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Got unexpected hr %#lx.\n", hr); ckey.dwColorSpaceLowValue = ckey.dwColorSpaceHighValue = 0xdeadbeef; hr = IDirectDrawSurface4_GetColorKey(dst, DDCKEY_SRCBLT, &ckey); - ok(hr == DDERR_NOCOLORKEY, "Got unexpected hr %#x.\n", hr); - ok(ckey.dwColorSpaceLowValue == 0xdeadbeef, "dwColorSpaceLowValue is %#x.\n", ckey.dwColorSpaceLowValue); - ok(ckey.dwColorSpaceHighValue == 0xdeadbeef, "dwColorSpaceHighValue is %#x.\n", ckey.dwColorSpaceHighValue); + ok(hr == DDERR_NOCOLORKEY, "Got unexpected hr %#lx.\n", hr); + ok(ckey.dwColorSpaceLowValue == 0xdeadbeef, "dwColorSpaceLowValue is %#lx.\n", ckey.dwColorSpaceLowValue); + ok(ckey.dwColorSpaceHighValue == 0xdeadbeef, "dwColorSpaceHighValue is %#lx.\n", ckey.dwColorSpaceHighValue);
/* Source surface has a color key */ ckey.dwColorSpaceLowValue = ckey.dwColorSpaceHighValue = 0x0000ff00; hr = IDirectDrawSurface4_SetColorKey(src, DDCKEY_SRCBLT, &ckey); - ok(SUCCEEDED(hr), "Failed to set color key, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set color key, hr %#lx.\n", hr); hr = IDirect3DTexture2_Load(dst_tex, src_tex); - ok(SUCCEEDED(hr), "Got unexpected hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface4_GetColorKey(dst, DDCKEY_SRCBLT, &ckey); - ok(SUCCEEDED(hr), "Got unexpected hr %#x.\n", hr); - ok(ckey.dwColorSpaceLowValue == 0x0000ff00, "dwColorSpaceLowValue is %#x.\n", ckey.dwColorSpaceLowValue); - ok(ckey.dwColorSpaceHighValue == 0x0000ff00, "dwColorSpaceHighValue is %#x.\n", ckey.dwColorSpaceHighValue); + ok(SUCCEEDED(hr), "Got unexpected hr %#lx.\n", hr); + ok(ckey.dwColorSpaceLowValue == 0x0000ff00, "dwColorSpaceLowValue is %#lx.\n", ckey.dwColorSpaceLowValue); + ok(ckey.dwColorSpaceHighValue == 0x0000ff00, "dwColorSpaceHighValue is %#lx.\n", ckey.dwColorSpaceHighValue);
/* Both surfaces have a color key: Dest ckey is overwritten */ ckey.dwColorSpaceLowValue = ckey.dwColorSpaceHighValue = 0x000000ff; hr = IDirectDrawSurface4_SetColorKey(dst, DDCKEY_SRCBLT, &ckey); - ok(SUCCEEDED(hr), "Failed to set color key, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set color key, hr %#lx.\n", hr); hr = IDirect3DTexture2_Load(dst_tex, src_tex); - ok(SUCCEEDED(hr), "Got unexpected hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface4_GetColorKey(dst, DDCKEY_SRCBLT, &ckey); - ok(SUCCEEDED(hr), "Got unexpected hr %#x.\n", hr); - ok(ckey.dwColorSpaceLowValue == 0x0000ff00, "dwColorSpaceLowValue is %#x.\n", ckey.dwColorSpaceLowValue); - ok(ckey.dwColorSpaceHighValue == 0x0000ff00, "dwColorSpaceHighValue is %#x.\n", ckey.dwColorSpaceHighValue); + ok(SUCCEEDED(hr), "Got unexpected hr %#lx.\n", hr); + ok(ckey.dwColorSpaceLowValue == 0x0000ff00, "dwColorSpaceLowValue is %#lx.\n", ckey.dwColorSpaceLowValue); + ok(ckey.dwColorSpaceHighValue == 0x0000ff00, "dwColorSpaceHighValue is %#lx.\n", ckey.dwColorSpaceHighValue);
/* Only the destination has a color key: It is not deleted */ hr = IDirectDrawSurface4_SetColorKey(src, DDCKEY_SRCBLT, NULL); - ok(SUCCEEDED(hr), "Failed to set color key, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set color key, hr %#lx.\n", hr); hr = IDirectDrawSurface4_GetColorKey(src, DDCKEY_SRCBLT, &ckey); - ok(hr == DDERR_NOCOLORKEY, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_NOCOLORKEY, "Got unexpected hr %#lx.\n", hr); hr = IDirect3DTexture2_Load(dst_tex, src_tex); - ok(SUCCEEDED(hr), "Got unexpected hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface4_GetColorKey(dst, DDCKEY_SRCBLT, &ckey); - ok(SUCCEEDED(hr), "Got unexpected hr %#x.\n", hr); - ok(ckey.dwColorSpaceLowValue == 0x0000ff00, "dwColorSpaceLowValue is %#x.\n", ckey.dwColorSpaceLowValue); - ok(ckey.dwColorSpaceHighValue == 0x0000ff00, "dwColorSpaceHighValue is %#x.\n", ckey.dwColorSpaceHighValue); + ok(SUCCEEDED(hr), "Got unexpected hr %#lx.\n", hr); + ok(ckey.dwColorSpaceLowValue == 0x0000ff00, "dwColorSpaceLowValue is %#lx.\n", ckey.dwColorSpaceLowValue); + ok(ckey.dwColorSpaceHighValue == 0x0000ff00, "dwColorSpaceHighValue is %#lx.\n", ckey.dwColorSpaceHighValue);
IDirect3DTexture2_Release(dst_tex); IDirect3DTexture2_Release(src_tex); @@ -1803,109 +1803,109 @@ static void test_viewport_object(void) return; } hr = IDirect3DDevice3_GetDirect3D(device, &d3d); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirect3D3_QueryInterface(d3d, &IID_IDirectDraw4, (void **)&ddraw); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); old_d3d_ref = get_refcount((IUnknown *) d3d);
hr = IDirect3D3_CreateViewport(d3d, &viewport3, NULL); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); ref = get_refcount((IUnknown *)viewport3); - ok(ref == 1, "Got unexpected refcount %u.\n", ref); + ok(ref == 1, "Got unexpected refcount %lu.\n", ref); ref = get_refcount((IUnknown *)d3d); - ok(ref == old_d3d_ref, "Got unexpected refcount %u.\n", ref); + ok(ref == old_d3d_ref, "Got unexpected refcount %lu.\n", ref);
memset(&desc, 0, sizeof(desc)); hr = IDirect3DViewport3_GetViewport(viewport3, &desc.vp1); - todo_wine ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#x.\n", hr); + todo_wine ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#lx.\n", hr); desc.vp1.dwSize = sizeof(desc.vp1) + 1; hr = IDirect3DViewport3_GetViewport(viewport3, &desc.vp1); - todo_wine ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#x.\n", hr); + todo_wine ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#lx.\n", hr); desc.vp1.dwSize = sizeof(desc.vp1) - 1; hr = IDirect3DViewport3_GetViewport(viewport3, &desc.vp1); - todo_wine ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#x.\n", hr); + todo_wine ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#lx.\n", hr); desc.vp1.dwSize = sizeof(desc.vp1); hr = IDirect3DViewport3_GetViewport(viewport3, &desc.vp1); - ok(hr == D3DERR_VIEWPORTDATANOTSET, "Got unexpected hr %#x.\n", hr); - ok(desc.vp1.dwSize == sizeof(desc.vp1), "Got unexpected dwSize %u.\n", desc.vp1.dwSize); + ok(hr == D3DERR_VIEWPORTDATANOTSET, "Got unexpected hr %#lx.\n", hr); + ok(desc.vp1.dwSize == sizeof(desc.vp1), "Got unexpected dwSize %lu.\n", desc.vp1.dwSize); hr = IDirect3DViewport3_GetViewport2(viewport3, &desc.vp2); - ok(hr == D3DERR_VIEWPORTDATANOTSET, "Got unexpected hr %#x.\n", hr); - ok(desc.vp2.dwSize == sizeof(desc.vp2), "Got unexpected dwSize %u.\n", desc.vp2.dwSize); + ok(hr == D3DERR_VIEWPORTDATANOTSET, "Got unexpected hr %#lx.\n", hr); + ok(desc.vp2.dwSize == sizeof(desc.vp2), "Got unexpected dwSize %lu.\n", desc.vp2.dwSize); desc.vp2.dwSize = sizeof(desc.vp2) + 1; hr = IDirect3DViewport3_GetViewport2(viewport3, &desc.vp2); - todo_wine ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#x.\n", hr); + todo_wine ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#lx.\n", hr);
gamma = (IDirectDrawGammaControl *)0xdeadbeef; hr = IDirect3DViewport2_QueryInterface(viewport3, &IID_IDirectDrawGammaControl, (void **)&gamma); - ok(hr == E_NOINTERFACE, "Got unexpected hr %#x.\n", hr); + ok(hr == E_NOINTERFACE, "Got unexpected hr %#lx.\n", hr); ok(!gamma, "Interface not set to NULL by failed QI call: %p.\n", gamma); /* NULL iid: Segfaults */
hr = IDirect3DViewport3_QueryInterface(viewport3, &IID_IDirect3DViewport, (void **)&viewport); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); ref = get_refcount((IUnknown *)viewport); - ok(ref == 2, "Got unexpected refcount %u.\n", ref); + ok(ref == 2, "Got unexpected refcount %lu.\n", ref); ref = get_refcount((IUnknown *)viewport3); - ok(ref == 2, "Got unexpected refcount %u.\n", ref); + ok(ref == 2, "Got unexpected refcount %lu.\n", ref); IDirect3DViewport_Release(viewport); viewport = NULL;
hr = IDirect3DViewport3_QueryInterface(viewport3, &IID_IDirect3DViewport3, (void **)&viewport2); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); ref = get_refcount((IUnknown *)viewport2); - ok(ref == 2, "Got unexpected refcount %u.\n", ref); + ok(ref == 2, "Got unexpected refcount %lu.\n", ref); ref = get_refcount((IUnknown *)viewport3); - ok(ref == 2, "Got unexpected refcount %u.\n", ref); + ok(ref == 2, "Got unexpected refcount %lu.\n", ref); IDirect3DViewport3_Release(viewport2);
hr = IDirect3DViewport3_QueryInterface(viewport3, &IID_IUnknown, (void **)&unknown); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); ref = get_refcount((IUnknown *)viewport3); - ok(ref == 2, "Got unexpected refcount %u.\n", ref); + ok(ref == 2, "Got unexpected refcount %lu.\n", ref); ref = get_refcount(unknown); - ok(ref == 2, "Got unexpected refcount %u.\n", ref); + ok(ref == 2, "Got unexpected refcount %lu.\n", ref); IUnknown_Release(unknown);
hr = IDirect3DDevice3_DeleteViewport(device, NULL); - ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#lx.\n", hr); hr = IDirect3DDevice3_GetCurrentViewport(device, NULL); - ok(hr == D3DERR_NOCURRENTVIEWPORT, "Got unexpected hr %#x.\n", hr); + ok(hr == D3DERR_NOCURRENTVIEWPORT, "Got unexpected hr %#lx.\n", hr);
hr = IDirect3D3_CreateViewport(d3d, &another_vp, NULL); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr);
/* Setting a viewport not in the viewport list fails */ hr = IDirect3DDevice3_SetCurrentViewport(device, another_vp); - ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#lx.\n", hr);
/* AddViewport(NULL): Segfault */ hr = IDirect3DDevice3_AddViewport(device, viewport3); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); ref = get_refcount((IUnknown *) viewport3); - ok(ref == 2, "Got unexpected refcount %u.\n", ref); + ok(ref == 2, "Got unexpected refcount %lu.\n", ref); hr = IDirect3DDevice3_AddViewport(device, another_vp); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); ref = get_refcount((IUnknown *) another_vp); - ok(ref == 2, "Got unexpected refcount %u.\n", ref); + ok(ref == 2, "Got unexpected refcount %lu.\n", ref);
test_vp = (IDirect3DViewport3 *) 0xbaadc0de; hr = IDirect3DDevice3_GetCurrentViewport(device, &test_vp); - ok(hr == D3DERR_NOCURRENTVIEWPORT, "Got unexpected hr %#x.\n", hr); + ok(hr == D3DERR_NOCURRENTVIEWPORT, "Got unexpected hr %#lx.\n", hr); ok(test_vp == (IDirect3DViewport3 *) 0xbaadc0de, "Got unexpected pointer %p.\n", test_vp);
hr = IDirect3DDevice3_SetCurrentViewport(device, viewport3); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); ref = get_refcount((IUnknown *) viewport3); - ok(ref == 3, "Got unexpected refcount %u.\n", ref); + ok(ref == 3, "Got unexpected refcount %lu.\n", ref); ref = get_refcount((IUnknown *) device); - ok(ref == 1, "Got unexpected refcount %u.\n", ref); + ok(ref == 1, "Got unexpected refcount %lu.\n", ref);
test_vp = NULL; hr = IDirect3DDevice3_GetCurrentViewport(device, &test_vp); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); ok(test_vp == viewport3, "Got unexpected viewport %p.\n", test_vp); ref = get_refcount((IUnknown *) viewport3); - ok(ref == 4, "Got unexpected refcount %u.\n", ref); + ok(ref == 4, "Got unexpected refcount %lu.\n", ref); if (test_vp) IDirect3DViewport3_Release(test_vp);
@@ -1913,42 +1913,42 @@ static void test_viewport_object(void)
/* Cannot set the viewport to NULL */ hr = IDirect3DDevice3_SetCurrentViewport(device, NULL); - ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#lx.\n", hr); test_vp = NULL; hr = IDirect3DDevice3_GetCurrentViewport(device, &test_vp); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); ok(test_vp == viewport3, "Got unexpected viewport %p.\n", test_vp); if (test_vp) IDirect3DViewport3_Release(test_vp);
/* SetCurrentViewport properly releases the old viewport's reference */ hr = IDirect3DDevice3_SetCurrentViewport(device, another_vp); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); ref = get_refcount((IUnknown *) viewport3); - ok(ref == 2, "Got unexpected refcount %u.\n", ref); + ok(ref == 2, "Got unexpected refcount %lu.\n", ref); ref = get_refcount((IUnknown *) another_vp); - ok(ref == 3, "Got unexpected refcount %u.\n", ref); + ok(ref == 3, "Got unexpected refcount %lu.\n", ref);
/* Unlike device2::DeleteViewport, device3::DeleteViewport releases the * reference held by SetCurrentViewport */ hr = IDirect3DDevice3_DeleteViewport(device, another_vp); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); ref = get_refcount((IUnknown *) another_vp); - ok(ref == 1, "Got unexpected refcount %u.\n", ref); + ok(ref == 1, "Got unexpected refcount %lu.\n", ref);
/* GetCurrentViewport still fails */ test_vp = NULL; hr = IDirect3DDevice3_GetCurrentViewport(device, &test_vp); - ok(hr == D3DERR_NOCURRENTVIEWPORT, "Got unexpected hr %#x.\n", hr); + ok(hr == D3DERR_NOCURRENTVIEWPORT, "Got unexpected hr %#lx.\n", hr); ok(!test_vp, "Got unexpected viewport %p.\n", test_vp);
/* Setting a different viewport doesn't have any surprises now */ hr = IDirect3DDevice3_SetCurrentViewport(device, viewport3); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); ref = get_refcount((IUnknown *) viewport3); - ok(ref == 3, "Got unexpected refcount %u.\n", ref); + ok(ref == 3, "Got unexpected refcount %lu.\n", ref); ref = get_refcount((IUnknown *) another_vp); - ok(ref == 1, "Got unexpected refcount %u.\n", ref); + ok(ref == 1, "Got unexpected refcount %lu.\n", ref);
memset(&vp, 0, sizeof(vp)); memset(&vp, 0, sizeof(vp2)); @@ -1968,16 +1968,16 @@ static void test_viewport_object(void) vp2.dvClipWidth = 2.0f; vp2.dvClipHeight = 2.0f; hr = IDirect3DViewport3_SetViewport(viewport3, &vp); - ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#lx.\n", hr); hr = IDirect3DViewport3_SetViewport2(viewport3, &vp2); - ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#lx.\n", hr);
vp.dwSize = sizeof(vp); hr = IDirect3DViewport3_SetViewport(viewport3, &vp); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); vp2.dwSize = sizeof(vp2); hr = IDirect3DViewport3_SetViewport2(viewport3, &vp2); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr);
vp2.dwSize = sizeof(vp2); vp2.dwX = 160; @@ -1991,12 +1991,12 @@ static void test_viewport_object(void) vp2.dvMinZ = 0.5f; vp2.dvMaxZ = 2.0f; hr = IDirect3DViewport3_SetViewport2(viewport3, &vp2); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr);
memset(&vp, 0xff, sizeof(vp)); vp.dwSize = sizeof(vp); hr = IDirect3DViewport3_GetViewport(viewport3, &vp); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); ok(vp.dvMaxX == 4.5f && vp.dvMaxY == -1.75f && vp.dvScaleX == 192.0f && vp.dvScaleY == -240.0f && vp.dvMinZ == 0.0f && vp.dvMaxZ == 1.0f, "Got unexpected values %g, %g, %g, %g, %g, %g.\n", @@ -2010,12 +2010,12 @@ static void test_viewport_object(void) vp2.dvMaxZ = 0.5f;
hr = IDirect3DViewport3_SetViewport2(viewport3, &vp2); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr);
memset(&vp, 0xff, sizeof(vp)); vp.dwSize = sizeof(vp); hr = IDirect3DViewport3_GetViewport(viewport3, &vp); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); ok(vp.dvMaxX == -3.0f && vp.dvMaxY == 1.75f && vp.dvScaleX == -320.0f && vp.dvScaleY == 180.0f && vp.dvMinZ == 0.0f && vp.dvMaxZ == 1.0f, "Got unexpected values %g, %g, %g, %g, %g, %g.\n", @@ -2025,12 +2025,12 @@ static void test_viewport_object(void) vp.dvMinZ = 0.5f; vp.dvMaxZ = 2.0f; hr = IDirect3DViewport3_SetViewport(viewport3, &vp); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr);
memset(&vp2, 0xff, sizeof(vp2)); vp2.dwSize = sizeof(vp2); hr = IDirect3DViewport3_GetViewport2(viewport3, &vp2); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); ok(vp2.dvClipX == 0.75f && vp2.dvClipY == 1.0f && vp2.dvClipWidth == -1.5f && vp2.dvClipHeight == 2.0f && vp2.dvMinZ == 0.0f && vp2.dvMaxZ == 1.0f, "Got unexpected values %g, %g, %g, %g, %g, %g.\n", @@ -2044,12 +2044,12 @@ static void test_viewport_object(void) vp.dvMaxZ = 0.5f;
hr = IDirect3DViewport3_SetViewport(viewport3, &vp); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr);
memset(&vp2, 0xff, sizeof(vp2)); vp2.dwSize = sizeof(vp2); hr = IDirect3DViewport3_GetViewport2(viewport3, &vp2); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); ok(vp2.dvClipX == -1.25f && vp2.dvClipY == -0.75f && vp2.dvClipWidth == 2.5f && vp2.dvClipHeight == -1.5f && vp2.dvMinZ == 0.0f && vp2.dvMaxZ == 1.0f, "Got unexpected values %g, %g, %g, %g, %g, %g.\n", @@ -2058,12 +2058,12 @@ static void test_viewport_object(void) /* Destroying the device removes the viewport and releases the reference */ IDirect3DDevice3_Release(device); ref = get_refcount((IUnknown *) viewport3); - ok(ref == 1, "Got unexpected refcount %u.\n", ref); + ok(ref == 1, "Got unexpected refcount %lu.\n", ref);
memset(&vp2, 0xff, sizeof(vp2)); vp2.dwSize = sizeof(vp2); hr = IDirect3DViewport3_GetViewport2(viewport3, &vp2); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); ok(vp2.dvClipX == -1.25f && vp2.dvClipY == -0.75f && vp2.dvClipWidth == 2.5f && vp2.dvClipHeight == -1.5f && vp2.dvMinZ == 0.0f && vp2.dvMaxZ == 1.0f, "Got unexpected values %g, %g, %g, %g, %g, %g.\n", @@ -2071,15 +2071,15 @@ static void test_viewport_object(void)
vp.dwSize = sizeof(vp); hr = IDirect3DViewport3_SetViewport(viewport3, &vp); - ok(hr == D3DERR_VIEWPORTHASNODEVICE, "Got unexpected hr %#x.\n", hr); + ok(hr == D3DERR_VIEWPORTHASNODEVICE, "Got unexpected hr %#lx.\n", hr); vp2.dwSize = sizeof(vp2); hr = IDirect3DViewport3_SetViewport2(viewport3, &vp2); - ok(hr == D3DERR_VIEWPORTHASNODEVICE, "Got unexpected hr %#x.\n", hr); + ok(hr == D3DERR_VIEWPORTHASNODEVICE, "Got unexpected hr %#lx.\n", hr);
ref = IDirect3DViewport3_Release(another_vp); - ok(!ref, "Got unexpected refcount %u.\n", ref); + ok(!ref, "Got unexpected refcount %lu.\n", ref); ref = IDirect3DViewport3_Release(viewport3); - ok(!ref, "Got unexpected refcount %u.\n", ref); + ok(!ref, "Got unexpected refcount %lu.\n", ref); IDirect3D3_Release(d3d); DestroyWindow(window); IDirectDraw4_Release(ddraw); @@ -2119,35 +2119,35 @@ static void test_zenable(const GUID *device_guid)
viewport = create_viewport(device, 0, 0, 640, 480); hr = IDirect3DDevice3_SetCurrentViewport(device, viewport); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
hr = IDirect3DDevice3_SetRenderState(device, D3DRENDERSTATE_ZENABLE, D3DZB_FALSE); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
hr = IDirect3DViewport3_Clear2(viewport, 1, &clear_rect, D3DCLEAR_TARGET | D3DCLEAR_ZBUFFER, 0xffff0000, 0.0f, 0); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
hr = IDirect3DDevice3_GetRenderTarget(device, &rt); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
color = get_surface_color(rt, 80, 60); /* For some reason clears and colour fill blits randomly fail with software render target. */ ok(color == 0x00ff0000 || broken(is_software_device_type(device_guid) && !color), - "Got unexpected colour 0x%08x.\n", color); + "Got unexpected colour 0x%08lx.\n", color); if (!color) { fill_surface(rt, 0xffff0000);
color = get_surface_color(rt, 80, 60); - ok(color == 0x00ff0000, "Got unexpected colour 0x%08x.\n", color); + ok(color == 0x00ff0000, "Got unexpected colour 0x%08lx.\n", color); }
hr = IDirect3DDevice3_BeginScene(device); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirect3DDevice3_DrawPrimitive(device, D3DPT_TRIANGLESTRIP, D3DFVF_XYZRHW | D3DFVF_DIFFUSE, tquad, 4, 0); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirect3DDevice3_EndScene(device); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
for (i = 0; i < 4; ++i) { @@ -2157,7 +2157,7 @@ static void test_zenable(const GUID *device_guid) y = 60 * ((2 * i) + 1); color = get_surface_color(rt, x, y); ok(compare_color(color, 0x0000ff00, 1), - "Expected color 0x0000ff00 at %u, %u, got 0x%08x.\n", x, y, color); + "Expected color 0x0000ff00 at %u, %u, got 0x%08lx.\n", x, y, color); } } IDirectDrawSurface4_Release(rt); @@ -2232,12 +2232,12 @@ static void test_ck_rgba(const GUID *device_guid)
viewport = create_viewport(device, 0, 0, 640, 480); hr = IDirect3DDevice3_SetCurrentViewport(device, viewport); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
hr = IDirect3DDevice3_GetDirect3D(device, &d3d); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirect3D3_QueryInterface(d3d, &IID_IDirectDraw4, (void **)&ddraw); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); IDirect3D3_Release(d3d);
memset(&surface_desc, 0, sizeof(surface_desc)); @@ -2258,66 +2258,66 @@ static void test_ck_rgba(const GUID *device_guid) surface_desc.ddckCKSrcBlt.dwColorSpaceLowValue = 0xff00ff00; surface_desc.ddckCKSrcBlt.dwColorSpaceHighValue = 0xff00ff00; hr = IDirectDraw4_CreateSurface(ddraw, &surface_desc, &surface, NULL); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface4_QueryInterface(surface, &IID_IDirect3DTexture2, (void **)&texture); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr);
hr = IDirect3DDevice3_SetTexture(device, 0, texture); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirect3DDevice3_SetRenderState(device, D3DRENDERSTATE_SRCBLEND, D3DBLEND_SRCALPHA); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirect3DDevice3_SetRenderState(device, D3DRENDERSTATE_DESTBLEND, D3DBLEND_INVSRCALPHA); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
hr = IDirect3DDevice3_GetRenderTarget(device, &rt); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
for (i = 0; i < ARRAY_SIZE(tests); ++i) { hr = IDirect3DDevice3_SetRenderState(device, D3DRENDERSTATE_COLORKEYENABLE, tests[i].color_key); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirect3DDevice3_SetRenderState(device, D3DRENDERSTATE_ALPHABLENDENABLE, tests[i].blend); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
memset(&fx, 0, sizeof(fx)); fx.dwSize = sizeof(fx); U5(fx).dwFillColor = tests[i].fill_color; hr = IDirectDrawSurface4_Blt(surface, NULL, NULL, NULL, DDBLT_COLORFILL | DDBLT_WAIT, &fx); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr);
hr = IDirect3DViewport3_Clear2(viewport, 1, &clear_rect, D3DCLEAR_TARGET | D3DCLEAR_ZBUFFER, 0xffff0000, 1.0f, 0); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); if (is_software_device_type(device_guid)) fill_surface(rt, 0xffff0000); hr = IDirect3DDevice3_BeginScene(device); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirect3DDevice3_DrawPrimitive(device, D3DPT_TRIANGLESTRIP, D3DFVF_XYZRHW | D3DFVF_TEX1, &tquad[0], 4, 0); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirect3DDevice3_EndScene(device); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
color = get_surface_color(rt, 320, 240); ok(compare_color(color, tests[i].result1, 2) || compare_color(color, tests[i].result1_broken, 1), - "Expected color 0x%08x for test %u, got 0x%08x.\n", + "Expected color 0x%08lx for test %u, got 0x%08lx.\n", tests[i].result1, i, color);
U5(fx).dwFillColor = 0xff0000ff; hr = IDirectDrawSurface4_Blt(surface, NULL, NULL, NULL, DDBLT_COLORFILL | DDBLT_WAIT, &fx); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr);
hr = IDirect3DDevice3_BeginScene(device); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirect3DDevice3_DrawPrimitive(device, D3DPT_TRIANGLESTRIP, D3DFVF_XYZRHW | D3DFVF_TEX1, &tquad[4], 4, 0); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirect3DDevice3_EndScene(device); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
/* This tests that fragments that are masked out by the color key are * discarded, instead of just fully transparent. */ color = get_surface_color(rt, 320, 240); ok(compare_color(color, tests[i].result2, 2) || compare_color(color, tests[i].result2_broken, 1), - "Expected color 0x%08x for test %u, got 0x%08x.\n", + "Expected color 0x%08lx for test %u, got 0x%08lx.\n", tests[i].result2, i, color); }
@@ -2367,17 +2367,17 @@ static void test_ck_default(void) }
hr = IDirect3DDevice3_GetDirect3D(device, &d3d); - ok(SUCCEEDED(hr), "Failed to get d3d interface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get d3d interface, hr %#lx.\n", hr); hr = IDirect3D3_QueryInterface(d3d, &IID_IDirectDraw4, (void **)&ddraw); - ok(SUCCEEDED(hr), "Failed to get ddraw interface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get ddraw interface, hr %#lx.\n", hr); IDirect3D3_Release(d3d);
hr = IDirect3DDevice3_GetRenderTarget(device, &rt); - ok(SUCCEEDED(hr), "Failed to get render target, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get render target, hr %#lx.\n", hr);
viewport = create_viewport(device, 0, 0, 640, 480); hr = IDirect3DDevice3_SetCurrentViewport(device, viewport); - ok(SUCCEEDED(hr), "Failed to set current viewport, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set current viewport, hr %#lx.\n", hr);
memset(&surface_desc, 0, sizeof(surface_desc)); surface_desc.dwSize = sizeof(surface_desc); @@ -2394,47 +2394,47 @@ static void test_ck_default(void) surface_desc.ddckCKSrcBlt.dwColorSpaceLowValue = 0x000000ff; surface_desc.ddckCKSrcBlt.dwColorSpaceHighValue = 0x000000ff; hr = IDirectDraw4_CreateSurface(ddraw, &surface_desc, &surface, NULL); - ok(SUCCEEDED(hr), "Failed to create surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create surface, hr %#lx.\n", hr); hr = IDirectDrawSurface4_QueryInterface(surface, &IID_IDirect3DTexture2, (void **)&texture); - ok(SUCCEEDED(hr), "Failed to get texture interface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get texture interface, hr %#lx.\n", hr); hr = IDirect3DDevice3_SetTexture(device, 0, texture); - ok(SUCCEEDED(hr), "Failed to set texture, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set texture, hr %#lx.\n", hr);
memset(&fx, 0, sizeof(fx)); fx.dwSize = sizeof(fx); U5(fx).dwFillColor = 0x000000ff; hr = IDirectDrawSurface4_Blt(surface, NULL, NULL, NULL, DDBLT_COLORFILL | DDBLT_WAIT, &fx); - ok(SUCCEEDED(hr), "Failed to fill surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to fill surface, hr %#lx.\n", hr);
hr = IDirect3DViewport3_Clear2(viewport, 1, &clear_rect, D3DCLEAR_TARGET, 0xff00ff00, 1.0f, 0); - ok(SUCCEEDED(hr), "Failed to clear viewport, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to clear viewport, hr %#lx.\n", hr); hr = IDirect3DDevice3_BeginScene(device); - ok(SUCCEEDED(hr), "Failed to begin scene, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to begin scene, hr %#lx.\n", hr); hr = IDirect3DDevice3_GetRenderState(device, D3DRENDERSTATE_COLORKEYENABLE, &value); - ok(SUCCEEDED(hr), "Failed to get render state, hr %#x.\n", hr); - ok(!value, "Got unexpected color keying state %#x.\n", value); + ok(SUCCEEDED(hr), "Failed to get render state, hr %#lx.\n", hr); + ok(!value, "Got unexpected color keying state %#lx.\n", value); hr = IDirect3DDevice3_DrawPrimitive(device, D3DPT_TRIANGLESTRIP, D3DFVF_XYZRHW | D3DFVF_TEX1, &tquad[0], 4, 0); - ok(SUCCEEDED(hr), "Failed to draw, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to draw, hr %#lx.\n", hr); hr = IDirect3DDevice3_EndScene(device); - ok(SUCCEEDED(hr), "Failed to end scene, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to end scene, hr %#lx.\n", hr); color = get_surface_color(rt, 320, 240); - ok(compare_color(color, 0x000000ff, 1), "Got unexpected color 0x%08x.\n", color); + ok(compare_color(color, 0x000000ff, 1), "Got unexpected color 0x%08lx.\n", color);
hr = IDirect3DViewport3_Clear2(viewport, 1, &clear_rect, D3DCLEAR_TARGET, 0xff00ff00, 1.0f, 0); - ok(SUCCEEDED(hr), "Failed to clear viewport, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to clear viewport, hr %#lx.\n", hr); hr = IDirect3DDevice3_BeginScene(device); - ok(SUCCEEDED(hr), "Failed to begin scene, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to begin scene, hr %#lx.\n", hr); hr = IDirect3DDevice3_SetRenderState(device, D3DRENDERSTATE_COLORKEYENABLE, TRUE); - ok(SUCCEEDED(hr), "Failed to enable color keying, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to enable color keying, hr %#lx.\n", hr); hr = IDirect3DDevice3_DrawPrimitive(device, D3DPT_TRIANGLESTRIP, D3DFVF_XYZRHW | D3DFVF_TEX1, &tquad[0], 4, 0); - ok(SUCCEEDED(hr), "Failed to draw, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to draw, hr %#lx.\n", hr); hr = IDirect3DDevice3_GetRenderState(device, D3DRENDERSTATE_COLORKEYENABLE, &value); - ok(SUCCEEDED(hr), "Failed to get render state, hr %#x.\n", hr); - ok(!!value, "Got unexpected color keying state %#x.\n", value); + ok(SUCCEEDED(hr), "Failed to get render state, hr %#lx.\n", hr); + ok(!!value, "Got unexpected color keying state %#lx.\n", value); hr = IDirect3DDevice3_EndScene(device); - ok(SUCCEEDED(hr), "Failed to end scene, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to end scene, hr %#lx.\n", hr); color = get_surface_color(rt, 320, 240); - ok(compare_color(color, 0x0000ff00, 1), "Got unexpected color 0x%08x.\n", color); + ok(compare_color(color, 0x0000ff00, 1), "Got unexpected color 0x%08lx.\n", color);
IDirect3DTexture_Release(texture); IDirectDrawSurface4_Release(surface); @@ -2467,9 +2467,9 @@ static void test_ck_complex(void) return; } hr = IDirect3DDevice3_GetDirect3D(device, &d3d); - ok(SUCCEEDED(hr), "Failed to get d3d interface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get d3d interface, hr %#lx.\n", hr); hr = IDirect3D3_QueryInterface(d3d, &IID_IDirectDraw4, (void **)&ddraw); - ok(SUCCEEDED(hr), "Failed to get ddraw interface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get ddraw interface, hr %#lx.\n", hr); IDirect3D3_Release(d3d);
memset(&surface_desc, 0, sizeof(surface_desc)); @@ -2479,20 +2479,20 @@ static void test_ck_complex(void) surface_desc.dwWidth = 128; surface_desc.dwHeight = 128; hr = IDirectDraw4_CreateSurface(ddraw, &surface_desc, &surface, NULL); - ok(SUCCEEDED(hr), "Failed to create surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create surface, hr %#lx.\n", hr);
hr = IDirectDrawSurface4_GetColorKey(surface, DDCKEY_SRCBLT, &color_key); - ok(hr == DDERR_NOCOLORKEY, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_NOCOLORKEY, "Got unexpected hr %#lx.\n", hr); color_key.dwColorSpaceLowValue = 0x0000ff00; color_key.dwColorSpaceHighValue = 0x0000ff00; hr = IDirectDrawSurface4_SetColorKey(surface, DDCKEY_SRCBLT, &color_key); - ok(SUCCEEDED(hr), "Failed to set color key, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set color key, hr %#lx.\n", hr); memset(&color_key, 0, sizeof(color_key)); hr = IDirectDrawSurface4_GetColorKey(surface, DDCKEY_SRCBLT, &color_key); - ok(SUCCEEDED(hr), "Failed to get color key, hr %#x.\n", hr); - ok(color_key.dwColorSpaceLowValue == 0x0000ff00, "Got unexpected value 0x%08x.\n", + ok(SUCCEEDED(hr), "Failed to get color key, hr %#lx.\n", hr); + ok(color_key.dwColorSpaceLowValue == 0x0000ff00, "Got unexpected value 0x%08lx.\n", color_key.dwColorSpaceLowValue); - ok(color_key.dwColorSpaceHighValue == 0x0000ff00, "Got unexpected value 0x%08x.\n", + ok(color_key.dwColorSpaceHighValue == 0x0000ff00, "Got unexpected value 0x%08lx.\n", color_key.dwColorSpaceHighValue);
mipmap = surface; @@ -2500,20 +2500,20 @@ static void test_ck_complex(void) for (i = 0; i < 7; ++i) { hr = IDirectDrawSurface4_GetAttachedSurface(mipmap, &caps, &tmp); - ok(SUCCEEDED(hr), "Failed to get attached surface, i %u, hr %#x.\n", i, hr); + ok(SUCCEEDED(hr), "Failed to get attached surface, i %u, hr %#lx.\n", i, hr);
hr = IDirectDrawSurface4_GetColorKey(tmp, DDCKEY_SRCBLT, &color_key); - ok(hr == DDERR_NOCOLORKEY, "Got unexpected hr %#x, i %u.\n", hr, i); + ok(hr == DDERR_NOCOLORKEY, "Got unexpected hr %#lx, i %u.\n", hr, i); color_key.dwColorSpaceLowValue = 0x000000ff; color_key.dwColorSpaceHighValue = 0x000000ff; hr = IDirectDrawSurface4_SetColorKey(tmp, DDCKEY_SRCBLT, &color_key); - ok(SUCCEEDED(hr), "Failed to set color key, hr %#x, i %u.\n", hr, i); + ok(SUCCEEDED(hr), "Failed to set color key, hr %#lx, i %u.\n", hr, i); memset(&color_key, 0, sizeof(color_key)); hr = IDirectDrawSurface4_GetColorKey(tmp, DDCKEY_SRCBLT, &color_key); - ok(SUCCEEDED(hr), "Failed to get color key, hr %#x, i %u.\n", hr, i); - ok(color_key.dwColorSpaceLowValue == 0x000000ff, "Got unexpected value 0x%08x, i %u.\n", + ok(SUCCEEDED(hr), "Failed to get color key, hr %#lx, i %u.\n", hr, i); + ok(color_key.dwColorSpaceLowValue == 0x000000ff, "Got unexpected value 0x%08lx, i %u.\n", color_key.dwColorSpaceLowValue, i); - ok(color_key.dwColorSpaceHighValue == 0x000000ff, "Got unexpected value 0x%08x, i %u.\n", + ok(color_key.dwColorSpaceHighValue == 0x000000ff, "Got unexpected value 0x%08lx, i %u.\n", color_key.dwColorSpaceHighValue, i);
IDirectDrawSurface_Release(mipmap); @@ -2522,17 +2522,17 @@ static void test_ck_complex(void)
memset(&color_key, 0, sizeof(color_key)); hr = IDirectDrawSurface4_GetColorKey(surface, DDCKEY_SRCBLT, &color_key); - ok(SUCCEEDED(hr), "Failed to get color key, hr %#x.\n", hr); - ok(color_key.dwColorSpaceLowValue == 0x0000ff00, "Got unexpected value 0x%08x.\n", + ok(SUCCEEDED(hr), "Failed to get color key, hr %#lx.\n", hr); + ok(color_key.dwColorSpaceLowValue == 0x0000ff00, "Got unexpected value 0x%08lx.\n", color_key.dwColorSpaceLowValue); - ok(color_key.dwColorSpaceHighValue == 0x0000ff00, "Got unexpected value 0x%08x.\n", + ok(color_key.dwColorSpaceHighValue == 0x0000ff00, "Got unexpected value 0x%08lx.\n", color_key.dwColorSpaceHighValue);
hr = IDirectDrawSurface4_GetAttachedSurface(mipmap, &caps, &tmp); - ok(hr == DDERR_NOTFOUND, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_NOTFOUND, "Got unexpected hr %#lx.\n", hr); IDirectDrawSurface_Release(mipmap); refcount = IDirectDrawSurface4_Release(surface); - ok(!refcount, "Got unexpected refcount %u.\n", refcount); + ok(!refcount, "Got unexpected refcount %lu.\n", refcount);
memset(&surface_desc, 0, sizeof(surface_desc)); surface_desc.dwSize = sizeof(surface_desc); @@ -2540,46 +2540,46 @@ static void test_ck_complex(void) surface_desc.ddsCaps.dwCaps = DDSCAPS_PRIMARYSURFACE | DDSCAPS_COMPLEX | DDSCAPS_FLIP; U5(surface_desc).dwBackBufferCount = 1; hr = IDirectDraw4_CreateSurface(ddraw, &surface_desc, &surface, NULL); - ok(SUCCEEDED(hr), "Failed to create surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create surface, hr %#lx.\n", hr);
hr = IDirectDrawSurface4_GetColorKey(surface, DDCKEY_SRCBLT, &color_key); - ok(hr == DDERR_NOCOLORKEY, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_NOCOLORKEY, "Got unexpected hr %#lx.\n", hr); color_key.dwColorSpaceLowValue = 0x0000ff00; color_key.dwColorSpaceHighValue = 0x0000ff00; hr = IDirectDrawSurface4_SetColorKey(surface, DDCKEY_SRCBLT, &color_key); - ok(SUCCEEDED(hr), "Failed to set color key, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set color key, hr %#lx.\n", hr); memset(&color_key, 0, sizeof(color_key)); hr = IDirectDrawSurface4_GetColorKey(surface, DDCKEY_SRCBLT, &color_key); - ok(SUCCEEDED(hr), "Failed to get color key, hr %#x.\n", hr); - ok(color_key.dwColorSpaceLowValue == 0x0000ff00, "Got unexpected value 0x%08x.\n", + ok(SUCCEEDED(hr), "Failed to get color key, hr %#lx.\n", hr); + ok(color_key.dwColorSpaceLowValue == 0x0000ff00, "Got unexpected value 0x%08lx.\n", color_key.dwColorSpaceLowValue); - ok(color_key.dwColorSpaceHighValue == 0x0000ff00, "Got unexpected value 0x%08x.\n", + ok(color_key.dwColorSpaceHighValue == 0x0000ff00, "Got unexpected value 0x%08lx.\n", color_key.dwColorSpaceHighValue);
hr = IDirectDrawSurface4_GetAttachedSurface(surface, &caps, &tmp); - ok(SUCCEEDED(hr), "Failed to get attached surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get attached surface, hr %#lx.\n", hr);
hr = IDirectDrawSurface4_GetColorKey(tmp, DDCKEY_SRCBLT, &color_key); - ok(hr == DDERR_NOCOLORKEY, "Got unexpected hr %#x, i %u.\n", hr, i); + ok(hr == DDERR_NOCOLORKEY, "Got unexpected hr %#lx, i %u.\n", hr, i); color_key.dwColorSpaceLowValue = 0x0000ff00; color_key.dwColorSpaceHighValue = 0x0000ff00; hr = IDirectDrawSurface4_SetColorKey(tmp, DDCKEY_SRCBLT, &color_key); - ok(SUCCEEDED(hr), "Failed to set color key, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set color key, hr %#lx.\n", hr); memset(&color_key, 0, sizeof(color_key)); hr = IDirectDrawSurface4_GetColorKey(tmp, DDCKEY_SRCBLT, &color_key); - ok(SUCCEEDED(hr), "Failed to get color key, hr %#x.\n", hr); - ok(color_key.dwColorSpaceLowValue == 0x0000ff00, "Got unexpected value 0x%08x.\n", + ok(SUCCEEDED(hr), "Failed to get color key, hr %#lx.\n", hr); + ok(color_key.dwColorSpaceLowValue == 0x0000ff00, "Got unexpected value 0x%08lx.\n", color_key.dwColorSpaceLowValue); - ok(color_key.dwColorSpaceHighValue == 0x0000ff00, "Got unexpected value 0x%08x.\n", + ok(color_key.dwColorSpaceHighValue == 0x0000ff00, "Got unexpected value 0x%08lx.\n", color_key.dwColorSpaceHighValue);
IDirectDrawSurface_Release(tmp);
refcount = IDirectDrawSurface4_Release(surface); - ok(!refcount, "Got unexpected refcount %u.\n", refcount); + ok(!refcount, "Got unexpected refcount %lu.\n", refcount); IDirectDraw4_Release(ddraw); refcount = IDirect3DDevice3_Release(device); - ok(!refcount, "Got unexpected refcount %u.\n", refcount); + ok(!refcount, "Got unexpected refcount %lu.\n", refcount); DestroyWindow(window); }
@@ -2601,13 +2601,13 @@ static void test_qi(const char *test_name, IUnknown *base_iface, for (i = 0; i < entry_count; ++i) { hr = IUnknown_QueryInterface(base_iface, tests[i].iid, (void **)&iface1); - ok(hr == tests[i].hr, "Got hr %#x for test "%s" %u.\n", hr, test_name, i); + ok(hr == tests[i].hr, "Got hr %#lx for test "%s" %u.\n", hr, test_name, i); if (SUCCEEDED(hr)) { for (j = 0; j < entry_count; ++j) { hr = IUnknown_QueryInterface(iface1, tests[j].iid, (void **)&iface2); - ok(hr == tests[j].hr, "Got hr %#x for test "%s" %u, %u.\n", hr, test_name, i, j); + ok(hr == tests[j].hr, "Got hr %#lx for test "%s" %u, %u.\n", hr, test_name, i, j); if (SUCCEEDED(hr)) { expected_refcount = 0; @@ -2616,7 +2616,7 @@ static void test_qi(const char *test_name, IUnknown *base_iface, if (IsEqualGUID(tests[i].refcount_iid, tests[j].refcount_iid)) ++expected_refcount; refcount = IUnknown_Release(iface2); - ok(refcount == expected_refcount, "Got refcount %u for test "%s" %u, %u, expected %u.\n", + ok(refcount == expected_refcount, "Got refcount %lu for test "%s" %u, %u, expected %lu.\n", refcount, test_name, i, j, expected_refcount); } } @@ -2625,7 +2625,7 @@ static void test_qi(const char *test_name, IUnknown *base_iface, if (IsEqualGUID(refcount_iid, tests[i].refcount_iid)) ++expected_refcount; refcount = IUnknown_Release(iface1); - ok(refcount == expected_refcount, "Got refcount %u for test "%s" %u, expected %u.\n", + ok(refcount == expected_refcount, "Got refcount %lu for test "%s" %u, expected %lu.\n", refcount, test_name, i, expected_refcount); } } @@ -2700,7 +2700,7 @@ static void test_surface_qi(void) ddraw = create_ddraw(); ok(!!ddraw, "Failed to create a ddraw object.\n"); hr = IDirectDraw4_SetCooperativeLevel(ddraw, window, DDSCL_NORMAL); - ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#lx.\n", hr);
memset(&surface_desc, 0, sizeof(surface_desc)); surface_desc.dwSize = sizeof(surface_desc); @@ -2709,9 +2709,9 @@ static void test_surface_qi(void) surface_desc.dwWidth = 512; surface_desc.dwHeight = 512; hr = IDirectDraw4_CreateSurface(ddraw, &surface_desc, (IDirectDrawSurface4 **)0xdeadbeef, NULL); - ok(hr == E_INVALIDARG, "Got unexpected hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Got unexpected hr %#lx.\n", hr); hr = IDirectDraw4_CreateSurface(ddraw, &surface_desc, &surface, NULL); - ok(SUCCEEDED(hr), "Failed to create surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create surface, hr %#lx.\n", hr);
test_qi("surface_qi", (IUnknown *)surface, &IID_IDirectDrawSurface4, tests, ARRAY_SIZE(tests));
@@ -2817,36 +2817,36 @@ static void test_wndproc(void) WS_MAXIMIZE | WS_CAPTION , 0, 0, 640, 480, 0, 0, 0, 0);
proc = GetWindowLongPtrA(window, GWLP_WNDPROC); - ok(proc == (LONG_PTR)test_proc, "Expected wndproc %#lx, got %#lx.\n", + ok(proc == (LONG_PTR)test_proc, "Expected wndproc %#Ix, got %#Ix.\n", (LONG_PTR)test_proc, proc); expect_messages = messages; hr = IDirectDraw4_SetCooperativeLevel(ddraw, window, DDSCL_EXCLUSIVE | DDSCL_FULLSCREEN); - ok(SUCCEEDED(hr), "SetCooperativeLevel failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "SetCooperativeLevel failed, hr %#lx.\n", hr); ok(!expect_messages->message, "Expected message %#x, but didn't receive it.\n", expect_messages->message); expect_messages = NULL; proc = GetWindowLongPtrA(window, GWLP_WNDPROC); - ok(proc != (LONG_PTR)test_proc, "Expected wndproc != %#lx, got %#lx.\n", + ok(proc != (LONG_PTR)test_proc, "Expected wndproc != %#Ix, got %#Ix.\n", (LONG_PTR)test_proc, proc); ref = IDirectDraw4_Release(ddraw); - ok(ref == 0, "The ddraw object was not properly freed: refcount %u.\n", ref); + ok(ref == 0, "The ddraw object was not properly freed: refcount %lu.\n", ref); proc = GetWindowLongPtrA(window, GWLP_WNDPROC); - ok(proc == (LONG_PTR)test_proc, "Expected wndproc %#lx, got %#lx.\n", + ok(proc == (LONG_PTR)test_proc, "Expected wndproc %#Ix, got %#Ix.\n", (LONG_PTR)test_proc, proc);
/* DDSCL_NORMAL doesn't. */ ddraw = create_ddraw(); proc = GetWindowLongPtrA(window, GWLP_WNDPROC); - ok(proc == (LONG_PTR)test_proc, "Expected wndproc %#lx, got %#lx.\n", + ok(proc == (LONG_PTR)test_proc, "Expected wndproc %#Ix, got %#Ix.\n", (LONG_PTR)test_proc, proc); hr = IDirectDraw4_SetCooperativeLevel(ddraw, window, DDSCL_NORMAL | DDSCL_FULLSCREEN); - ok(SUCCEEDED(hr), "SetCooperativeLevel failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "SetCooperativeLevel failed, hr %#lx.\n", hr); proc = GetWindowLongPtrA(window, GWLP_WNDPROC); - ok(proc == (LONG_PTR)test_proc, "Expected wndproc %#lx, got %#lx.\n", + ok(proc == (LONG_PTR)test_proc, "Expected wndproc %#Ix, got %#Ix.\n", (LONG_PTR)test_proc, proc); ref = IDirectDraw4_Release(ddraw); - ok(ref == 0, "The ddraw object was not properly freed: refcount %u.\n", ref); + ok(ref == 0, "The ddraw object was not properly freed: refcount %lu.\n", ref); proc = GetWindowLongPtrA(window, GWLP_WNDPROC); - ok(proc == (LONG_PTR)test_proc, "Expected wndproc %#lx, got %#lx.\n", + ok(proc == (LONG_PTR)test_proc, "Expected wndproc %#Ix, got %#Ix.\n", (LONG_PTR)test_proc, proc);
/* The original window proc is only restored by ddraw if the current @@ -2854,53 +2854,53 @@ static void test_wndproc(void) * from DDSCL_NORMAL to DDSCL_EXCLUSIVE. */ ddraw = create_ddraw(); proc = GetWindowLongPtrA(window, GWLP_WNDPROC); - ok(proc == (LONG_PTR)test_proc, "Expected wndproc %#lx, got %#lx.\n", + ok(proc == (LONG_PTR)test_proc, "Expected wndproc %#Ix, got %#Ix.\n", (LONG_PTR)test_proc, proc); hr = IDirectDraw4_SetCooperativeLevel(ddraw, window, DDSCL_EXCLUSIVE | DDSCL_FULLSCREEN); - ok(SUCCEEDED(hr), "SetCooperativeLevel failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "SetCooperativeLevel failed, hr %#lx.\n", hr); proc = GetWindowLongPtrA(window, GWLP_WNDPROC); - ok(proc != (LONG_PTR)test_proc, "Expected wndproc != %#lx, got %#lx.\n", + ok(proc != (LONG_PTR)test_proc, "Expected wndproc != %#Ix, got %#Ix.\n", (LONG_PTR)test_proc, proc); ddraw_proc = proc; hr = IDirectDraw4_SetCooperativeLevel(ddraw, window, DDSCL_NORMAL); - ok(SUCCEEDED(hr), "SetCooperativeLevel failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "SetCooperativeLevel failed, hr %#lx.\n", hr); proc = GetWindowLongPtrA(window, GWLP_WNDPROC); - ok(proc == (LONG_PTR)test_proc, "Expected wndproc %#lx, got %#lx.\n", + ok(proc == (LONG_PTR)test_proc, "Expected wndproc %#Ix, got %#Ix.\n", (LONG_PTR)test_proc, proc); hr = IDirectDraw4_SetCooperativeLevel(ddraw, window, DDSCL_EXCLUSIVE | DDSCL_FULLSCREEN); - ok(SUCCEEDED(hr), "SetCooperativeLevel failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "SetCooperativeLevel failed, hr %#lx.\n", hr); proc = SetWindowLongPtrA(window, GWLP_WNDPROC, (LONG_PTR)DefWindowProcA); - ok(proc != (LONG_PTR)test_proc, "Expected wndproc != %#lx, got %#lx.\n", + ok(proc != (LONG_PTR)test_proc, "Expected wndproc != %#Ix, got %#Ix.\n", (LONG_PTR)test_proc, proc); hr = IDirectDraw4_SetCooperativeLevel(ddraw, window, DDSCL_NORMAL); - ok(SUCCEEDED(hr), "SetCooperativeLevel failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "SetCooperativeLevel failed, hr %#lx.\n", hr); proc = GetWindowLongPtrA(window, GWLP_WNDPROC); - ok(proc == (LONG_PTR)DefWindowProcA, "Expected wndproc %#lx, got %#lx.\n", + ok(proc == (LONG_PTR)DefWindowProcA, "Expected wndproc %#Ix, got %#Ix.\n", (LONG_PTR)DefWindowProcA, proc); hr = IDirectDraw4_SetCooperativeLevel(ddraw, window, DDSCL_EXCLUSIVE | DDSCL_FULLSCREEN); - ok(SUCCEEDED(hr), "SetCooperativeLevel failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "SetCooperativeLevel failed, hr %#lx.\n", hr); proc = SetWindowLongPtrA(window, GWLP_WNDPROC, ddraw_proc); - ok(proc == (LONG_PTR)DefWindowProcA, "Expected wndproc %#lx, got %#lx.\n", + ok(proc == (LONG_PTR)DefWindowProcA, "Expected wndproc %#Ix, got %#Ix.\n", (LONG_PTR)DefWindowProcA, proc); ref = IDirectDraw4_Release(ddraw); - ok(ref == 0, "The ddraw object was not properly freed: refcount %u.\n", ref); + ok(ref == 0, "The ddraw object was not properly freed: refcount %lu.\n", ref); proc = GetWindowLongPtrA(window, GWLP_WNDPROC); - ok(proc == (LONG_PTR)test_proc, "Expected wndproc %#lx, got %#lx.\n", + ok(proc == (LONG_PTR)test_proc, "Expected wndproc %#Ix, got %#Ix.\n", (LONG_PTR)test_proc, proc);
ddraw = create_ddraw(); proc = GetWindowLongPtrA(window, GWLP_WNDPROC); - ok(proc == (LONG_PTR)test_proc, "Expected wndproc %#lx, got %#lx.\n", + ok(proc == (LONG_PTR)test_proc, "Expected wndproc %#Ix, got %#Ix.\n", (LONG_PTR)test_proc, proc); hr = IDirectDraw4_SetCooperativeLevel(ddraw, window, DDSCL_EXCLUSIVE | DDSCL_FULLSCREEN); - ok(SUCCEEDED(hr), "SetCooperativeLevel failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "SetCooperativeLevel failed, hr %#lx.\n", hr); proc = SetWindowLongPtrA(window, GWLP_WNDPROC, (LONG_PTR)DefWindowProcA); - ok(proc != (LONG_PTR)test_proc, "Expected wndproc != %#lx, got %#lx.\n", + ok(proc != (LONG_PTR)test_proc, "Expected wndproc != %#Ix, got %#Ix.\n", (LONG_PTR)test_proc, proc); ref = IDirectDraw4_Release(ddraw); - ok(ref == 0, "The ddraw object was not properly freed: refcount %u.\n", ref); + ok(ref == 0, "The ddraw object was not properly freed: refcount %lu.\n", ref); proc = GetWindowLongPtrA(window, GWLP_WNDPROC); - ok(proc == (LONG_PTR)DefWindowProcA, "Expected wndproc %#lx, got %#lx.\n", + ok(proc == (LONG_PTR)DefWindowProcA, "Expected wndproc %#Ix, got %#Ix.\n", (LONG_PTR)DefWindowProcA, proc);
fix_wndproc(window, (LONG_PTR)test_proc); @@ -2931,12 +2931,12 @@ static void test_window_style(void) SetRect(&fullscreen_rect, 0, 0, registry_mode.dmPelsWidth, registry_mode.dmPelsHeight);
hr = IDirectDraw4_SetCooperativeLevel(ddraw, window, DDSCL_EXCLUSIVE | DDSCL_FULLSCREEN); - ok(SUCCEEDED(hr), "SetCooperativeLevel failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "SetCooperativeLevel failed, hr %#lx.\n", hr);
tmp = GetWindowLongA(window, GWL_STYLE); - todo_wine ok(tmp == style, "Expected window style %#x, got %#x.\n", style, tmp); + todo_wine ok(tmp == style, "Expected window style %#lx, got %#lx.\n", style, tmp); tmp = GetWindowLongA(window, GWL_EXSTYLE); - todo_wine ok(tmp == exstyle, "Expected window extended style %#x, got %#x.\n", exstyle, tmp); + todo_wine ok(tmp == exstyle, "Expected window extended style %#lx, got %#lx.\n", exstyle, tmp);
GetWindowRect(window, &r); ok(EqualRect(&r, &fullscreen_rect), "Expected %s, got %s.\n", @@ -2948,9 +2948,9 @@ static void test_window_style(void) ok(ret, "Failed to set foreground window.\n");
tmp = GetWindowLongA(window, GWL_STYLE); - todo_wine ok(tmp == style, "Expected window style %#x, got %#x.\n", style, tmp); + todo_wine ok(tmp == style, "Expected window style %#lx, got %#lx.\n", style, tmp); tmp = GetWindowLongA(window, GWL_EXSTYLE); - todo_wine ok(tmp == exstyle, "Expected window extended style %#x, got %#x.\n", exstyle, tmp); + todo_wine ok(tmp == exstyle, "Expected window extended style %#lx, got %#lx.\n", exstyle, tmp);
ret = SetForegroundWindow(window); ok(ret, "Failed to set foreground window.\n"); @@ -2959,77 +2959,77 @@ static void test_window_style(void) ShowWindow(window, SW_HIDE);
hr = IDirectDraw4_SetCooperativeLevel(ddraw, window, DDSCL_NORMAL); - ok(SUCCEEDED(hr), "SetCooperativeLevel failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "SetCooperativeLevel failed, hr %#lx.\n", hr);
tmp = GetWindowLongA(window, GWL_STYLE); - ok(tmp == style, "Expected window style %#x, got %#x.\n", style, tmp); + ok(tmp == style, "Expected window style %#lx, got %#lx.\n", style, tmp); tmp = GetWindowLongA(window, GWL_EXSTYLE); - ok(tmp == exstyle, "Expected window extended style %#x, got %#x.\n", exstyle, tmp); + ok(tmp == exstyle, "Expected window extended style %#lx, got %#lx.\n", exstyle, tmp);
hr = IDirectDraw4_SetCooperativeLevel(ddraw, window, DDSCL_EXCLUSIVE | DDSCL_FULLSCREEN | DDSCL_NOWINDOWCHANGES); - ok(SUCCEEDED(hr), "SetCooperativeLevel failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "SetCooperativeLevel failed, hr %#lx.\n", hr);
tmp = GetWindowLongA(window, GWL_STYLE); - todo_wine ok(tmp == style, "Expected window style %#x, got %#x.\n", style, tmp); + todo_wine ok(tmp == style, "Expected window style %#lx, got %#lx.\n", style, tmp); tmp = GetWindowLongA(window, GWL_EXSTYLE); - todo_wine ok(tmp == exstyle, "Expected window extended style %#x, got %#x.\n", exstyle, tmp); + todo_wine ok(tmp == exstyle, "Expected window extended style %#lx, got %#lx.\n", exstyle, tmp);
hr = IDirectDraw4_SetCooperativeLevel(ddraw, window, DDSCL_EXCLUSIVE | DDSCL_FULLSCREEN); - ok(SUCCEEDED(hr), "SetCooperativeLevel failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "SetCooperativeLevel failed, hr %#lx.\n", hr);
tmp = GetWindowLongA(window, GWL_STYLE); expected_style = style | WS_VISIBLE; - todo_wine ok(tmp == expected_style, "Expected window style %#x, got %#x.\n", expected_style, tmp); + todo_wine ok(tmp == expected_style, "Expected window style %#lx, got %#lx.\n", expected_style, tmp); tmp = GetWindowLongA(window, GWL_EXSTYLE); expected_style = exstyle | WS_EX_TOPMOST; - todo_wine ok(tmp == expected_style, "Expected window extended style %#x, got %#x.\n", expected_style, tmp); + todo_wine ok(tmp == expected_style, "Expected window extended style %#lx, got %#lx.\n", expected_style, tmp);
ShowWindow(window, SW_HIDE); tmp = GetWindowLongA(window, GWL_STYLE); - todo_wine ok(tmp == style, "Expected window style %#x, got %#x.\n", style, tmp); + todo_wine ok(tmp == style, "Expected window style %#lx, got %#lx.\n", style, tmp); tmp = GetWindowLongA(window, GWL_EXSTYLE); expected_style = exstyle | WS_EX_TOPMOST; - todo_wine ok(tmp == expected_style, "Expected window extended style %#x, got %#x.\n", expected_style, tmp); + todo_wine ok(tmp == expected_style, "Expected window extended style %#lx, got %#lx.\n", expected_style, tmp);
hr = IDirectDraw4_SetCooperativeLevel(ddraw, window, DDSCL_NORMAL | DDSCL_NOWINDOWCHANGES); - ok(SUCCEEDED(hr), "SetCooperativeLevel failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "SetCooperativeLevel failed, hr %#lx.\n", hr);
tmp = GetWindowLongA(window, GWL_STYLE); - ok(tmp == style, "Expected window style %#x, got %#x.\n", style, tmp); + ok(tmp == style, "Expected window style %#lx, got %#lx.\n", style, tmp); tmp = GetWindowLongA(window, GWL_EXSTYLE); expected_style = exstyle | WS_EX_TOPMOST; - ok(tmp == expected_style, "Expected window extended style %#x, got %#x.\n", expected_style, tmp); + ok(tmp == expected_style, "Expected window extended style %#lx, got %#lx.\n", expected_style, tmp);
hr = IDirectDraw4_SetCooperativeLevel(ddraw, window, DDSCL_NORMAL); - ok(SUCCEEDED(hr), "SetCooperativeLevel failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "SetCooperativeLevel failed, hr %#lx.\n", hr);
tmp = GetWindowLongA(window, GWL_STYLE); - ok(tmp == style, "Expected window style %#x, got %#x.\n", style, tmp); + ok(tmp == style, "Expected window style %#lx, got %#lx.\n", style, tmp); tmp = GetWindowLongA(window, GWL_EXSTYLE); expected_style = exstyle | WS_EX_TOPMOST; - ok(tmp == expected_style, "Expected window extended style %#x, got %#x.\n", expected_style, tmp); + ok(tmp == expected_style, "Expected window extended style %#lx, got %#lx.\n", expected_style, tmp);
ret = SetForegroundWindow(window); ok(ret, "Failed to set foreground window.\n");
hr = IDirectDraw4_SetCooperativeLevel(ddraw, window, DDSCL_EXCLUSIVE | DDSCL_FULLSCREEN); - ok(SUCCEEDED(hr), "SetCooperativeLevel failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "SetCooperativeLevel failed, hr %#lx.\n", hr);
tmp = GetWindowLongA(window, GWL_STYLE); expected_style = style | WS_VISIBLE; - todo_wine ok(tmp == expected_style, "Expected window style %#x, got %#x.\n", expected_style, tmp); + todo_wine ok(tmp == expected_style, "Expected window style %#lx, got %#lx.\n", expected_style, tmp); tmp = GetWindowLongA(window, GWL_EXSTYLE); expected_style = exstyle | WS_EX_TOPMOST; - todo_wine ok(tmp == expected_style, "Expected window extended style %#x, got %#x.\n", expected_style, tmp); + todo_wine ok(tmp == expected_style, "Expected window extended style %#lx, got %#lx.\n", expected_style, tmp);
ShowWindow(window, SW_HIDE); hr = IDirectDraw4_SetCooperativeLevel(ddraw, window, DDSCL_NORMAL); - ok(SUCCEEDED(hr), "SetCooperativeLevel failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "SetCooperativeLevel failed, hr %#lx.\n", hr);
tmp = GetWindowLongA(window, GWL_STYLE); - ok(tmp == style, "Expected window style %#x, got %#x.\n", style, tmp); + ok(tmp == style, "Expected window style %#lx, got %#lx.\n", style, tmp); tmp = GetWindowLongA(window, GWL_EXSTYLE); - ok(tmp == exstyle, "Expected window extended style %#x, got %#x.\n", exstyle, tmp); + ok(tmp == exstyle, "Expected window extended style %#lx, got %#lx.\n", exstyle, tmp);
ShowWindow(window, SW_SHOW); ret = SetForegroundWindow(GetDesktopWindow()); @@ -3037,20 +3037,20 @@ static void test_window_style(void) SetActiveWindow(window); ok(GetActiveWindow() == window, "Unexpected active window.\n"); hr = IDirectDraw4_SetCooperativeLevel(ddraw, window, DDSCL_EXCLUSIVE | DDSCL_FULLSCREEN); - ok(SUCCEEDED(hr), "SetCooperativeLevel failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "SetCooperativeLevel failed, hr %#lx.\n", hr);
tmp = GetWindowLongA(window, GWL_STYLE); expected_style = style | WS_VISIBLE; - todo_wine ok(tmp == expected_style, "Expected window style %#x, got %#x.\n", expected_style, tmp); + todo_wine ok(tmp == expected_style, "Expected window style %#lx, got %#lx.\n", expected_style, tmp); tmp = GetWindowLongA(window, GWL_EXSTYLE); - todo_wine ok(tmp == exstyle, "Expected window extended style %#x, got %#x.\n", exstyle, tmp); + todo_wine ok(tmp == exstyle, "Expected window extended style %#lx, got %#lx.\n", exstyle, tmp);
GetWindowRect(window, &r); ok(EqualRect(&r, &fullscreen_rect), "Expected %s, got %s.\n", wine_dbgstr_rect(&fullscreen_rect), wine_dbgstr_rect(&r));
hr = IDirectDraw4_SetCooperativeLevel(ddraw, window, DDSCL_NORMAL); - ok(SUCCEEDED(hr), "SetCooperativeLevel failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "SetCooperativeLevel failed, hr %#lx.\n", hr);
SetWindowPos(window, NULL, 0, 0, 100, 100, SWP_NOZORDER | SWP_NOACTIVATE); GetWindowRect(window, &r); @@ -3060,13 +3060,13 @@ static void test_window_style(void) ret = SetForegroundWindow(window2); ok(ret, "Failed to set foreground window.\n"); hr = IDirectDraw4_SetCooperativeLevel(ddraw, window, DDSCL_EXCLUSIVE | DDSCL_FULLSCREEN); - ok(SUCCEEDED(hr), "SetCooperativeLevel failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "SetCooperativeLevel failed, hr %#lx.\n", hr);
tmp = GetWindowLongA(window, GWL_STYLE); expected_style = style | WS_VISIBLE; - todo_wine ok(tmp == expected_style, "Expected window style %#x, got %#x.\n", expected_style, tmp); + todo_wine ok(tmp == expected_style, "Expected window style %#lx, got %#lx.\n", expected_style, tmp); tmp = GetWindowLongA(window, GWL_EXSTYLE); - todo_wine ok(tmp == exstyle, "Expected window extended style %#x, got %#x.\n", exstyle, tmp); + todo_wine ok(tmp == exstyle, "Expected window extended style %#lx, got %#lx.\n", exstyle, tmp);
GetWindowRect(window, &r); ok(EqualRect(&r, &fullscreen_rect), "Expected %s, got %s.\n", @@ -3075,46 +3075,46 @@ static void test_window_style(void) ret = SetForegroundWindow(window); ok(ret, "Failed to set foreground window.\n"); hr = IDirectDraw4_SetCooperativeLevel(ddraw, window, DDSCL_EXCLUSIVE | DDSCL_FULLSCREEN); - ok(SUCCEEDED(hr), "SetCooperativeLevel failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "SetCooperativeLevel failed, hr %#lx.\n", hr);
tmp = GetWindowLongA(window, GWL_STYLE); expected_style = style | WS_VISIBLE; - todo_wine ok(tmp == expected_style, "Expected window style %#x, got %#x.\n", expected_style, tmp); + todo_wine ok(tmp == expected_style, "Expected window style %#lx, got %#lx.\n", expected_style, tmp); tmp = GetWindowLongA(window, GWL_EXSTYLE); expected_style = exstyle | WS_EX_TOPMOST; - todo_wine ok(tmp == expected_style, "Expected window extended style %#x, got %#x.\n", expected_style, tmp); + todo_wine ok(tmp == expected_style, "Expected window extended style %#lx, got %#lx.\n", expected_style, tmp);
ShowWindow(window, SW_HIDE); hr = IDirectDraw4_SetCooperativeLevel(ddraw, window, DDSCL_NORMAL); - ok(SUCCEEDED(hr), "SetCooperativeLevel failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "SetCooperativeLevel failed, hr %#lx.\n", hr);
tmp = GetWindowLongA(window, GWL_STYLE); - ok(tmp == style, "Expected window style %#x, got %#x.\n", style, tmp); + ok(tmp == style, "Expected window style %#lx, got %#lx.\n", style, tmp); tmp = GetWindowLongA(window, GWL_EXSTYLE); - ok(tmp == exstyle, "Expected window extended style %#x, got %#x.\n", exstyle, tmp); + ok(tmp == exstyle, "Expected window extended style %#lx, got %#lx.\n", exstyle, tmp);
ShowWindow(window, SW_SHOW); hr = IDirectDraw4_SetCooperativeLevel(ddraw, window, DDSCL_EXCLUSIVE | DDSCL_FULLSCREEN); - ok(SUCCEEDED(hr), "SetCooperativeLevel failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "SetCooperativeLevel failed, hr %#lx.\n", hr);
tmp = GetWindowLongA(window, GWL_STYLE); expected_style = style | WS_VISIBLE; - todo_wine ok(tmp == expected_style, "Expected window style %#x, got %#x.\n", expected_style, tmp); + todo_wine ok(tmp == expected_style, "Expected window style %#lx, got %#lx.\n", expected_style, tmp); tmp = GetWindowLongA(window, GWL_EXSTYLE); expected_style = exstyle | WS_EX_TOPMOST; - todo_wine ok(tmp == expected_style, "Expected window extended style %#x, got %#x.\n", expected_style, tmp); + todo_wine ok(tmp == expected_style, "Expected window extended style %#lx, got %#lx.\n", expected_style, tmp);
ret = SetForegroundWindow(GetDesktopWindow()); ok(ret, "Failed to set foreground window.\n"); tmp = GetWindowLongA(window, GWL_STYLE); expected_style = style | WS_VISIBLE | WS_MINIMIZE; - todo_wine ok(tmp == expected_style, "Expected window style %#x, got %#x.\n", expected_style, tmp); + todo_wine ok(tmp == expected_style, "Expected window style %#lx, got %#lx.\n", expected_style, tmp); tmp = GetWindowLongA(window, GWL_EXSTYLE); expected_style = exstyle | WS_EX_TOPMOST; - todo_wine ok(tmp == expected_style, "Expected window extended style %#x, got %#x.\n", expected_style, tmp); + todo_wine ok(tmp == expected_style, "Expected window extended style %#lx, got %#lx.\n", expected_style, tmp);
ref = IDirectDraw4_Release(ddraw); - ok(ref == 0, "The ddraw object was not properly freed: refcount %u.\n", ref); + ok(ref == 0, "The ddraw object was not properly freed: refcount %lu.\n", ref);
DestroyWindow(window2); DestroyWindow(window); @@ -3135,15 +3135,15 @@ static void test_redundant_mode_set(void) ok(!!ddraw, "Failed to create a ddraw object.\n");
hr = IDirectDraw4_SetCooperativeLevel(ddraw, window, DDSCL_EXCLUSIVE | DDSCL_FULLSCREEN); - ok(SUCCEEDED(hr), "SetCooperativeLevel failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "SetCooperativeLevel failed, hr %#lx.\n", hr);
surface_desc.dwSize = sizeof(surface_desc); hr = IDirectDraw4_GetDisplayMode(ddraw, &surface_desc); - ok(SUCCEEDED(hr), "GetDisplayMode failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "GetDisplayMode failed, hr %#lx.\n", hr);
hr = IDirectDraw4_SetDisplayMode(ddraw, surface_desc.dwWidth, surface_desc.dwHeight, U1(U4(surface_desc).ddpfPixelFormat).dwRGBBitCount, 0, 0); - ok(SUCCEEDED(hr), "SetDisplayMode failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "SetDisplayMode failed, hr %#lx.\n", hr);
GetWindowRect(window, &q); r = q; @@ -3155,14 +3155,14 @@ static void test_redundant_mode_set(void)
hr = IDirectDraw4_SetDisplayMode(ddraw, surface_desc.dwWidth, surface_desc.dwHeight, U1(U4(surface_desc).ddpfPixelFormat).dwRGBBitCount, 0, 0); - ok(SUCCEEDED(hr), "SetDisplayMode failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "SetDisplayMode failed, hr %#lx.\n", hr);
GetWindowRect(window, &s); ok(EqualRect(&r, &s) || broken(EqualRect(&q, &s) /* Windows 10 */), "Expected %s, got %s.\n", wine_dbgstr_rect(&r), wine_dbgstr_rect(&s));
ref = IDirectDraw4_Release(ddraw); - ok(ref == 0, "The ddraw object was not properly freed: refcount %u.\n", ref); + ok(ref == 0, "The ddraw object was not properly freed: refcount %lu.\n", ref);
DestroyWindow(window); } @@ -3312,10 +3312,10 @@ static void test_coop_level_mode_set(void) memset(&devmode, 0, sizeof(devmode)); devmode.dmSize = sizeof(devmode); ret = EnumDisplaySettingsW(NULL, ENUM_CURRENT_SETTINGS, &devmode); - ok(ret, "EnumDisplaySettingsW failed, error %#x.\n", GetLastError()); + ok(ret, "EnumDisplaySettingsW failed, error %#lx.\n", GetLastError()); ok(compare_mode_rect(&devmode, ®istry_mode), "Got a different mode.\n"); ret = EnumDisplaySettingsW(NULL, ENUM_REGISTRY_SETTINGS, &devmode); - ok(ret, "EnumDisplaySettingsW failed, error %#x.\n", GetLastError()); + ok(ret, "EnumDisplaySettingsW failed, error %#lx.\n", GetLastError()); ok(compare_mode_rect(&devmode, ®istry_mode), "Got a different mode.\n");
ret = save_display_modes(&original_modes, &display_count); @@ -3326,9 +3326,9 @@ static void test_coop_level_mode_set(void)
memset(¶m, 0, sizeof(param)); hr = IDirectDraw4_EnumDisplayModes(ddraw, 0, NULL, ¶m, test_coop_level_mode_set_enum_cb); - ok(SUCCEEDED(hr), "Failed to enumerate display mode, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to enumerate display mode, hr %#lx.\n", hr); ref = IDirectDraw4_Release(ddraw); - ok(ref == 0, "The ddraw object was not properly freed: refcount %u.\n", ref); + ok(ref == 0, "The ddraw object was not properly freed: refcount %lu.\n", ref);
if (!param.user32_height) { @@ -3347,7 +3347,7 @@ static void test_coop_level_mode_set(void) devmode.dmPelsWidth = param.user32_width; devmode.dmPelsHeight = param.user32_height; change_ret = ChangeDisplaySettingsW(&devmode, CDS_FULLSCREEN); - ok(change_ret == DISP_CHANGE_SUCCESSFUL, "Failed to change display mode, ret %#x.\n", change_ret); + ok(change_ret == DISP_CHANGE_SUCCESSFUL, "Failed to change display mode, ret %#lx.\n", change_ret);
ddraw = create_ddraw(); ok(!!ddraw, "Failed to create a ddraw object.\n"); @@ -3365,7 +3365,7 @@ static void test_coop_level_mode_set(void) 0, 0, 100, 100, 0, 0, 0, 0);
hr = IDirectDraw4_SetCooperativeLevel(ddraw, window, DDSCL_EXCLUSIVE | DDSCL_FULLSCREEN); - ok(SUCCEEDED(hr), "SetCooperativeLevel failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "SetCooperativeLevel failed, hr %#lx.\n", hr);
GetWindowRect(window, &r); ok(EqualRect(&r, &user32_rect), "Expected %s, got %s.\n", wine_dbgstr_rect(&user32_rect), @@ -3377,12 +3377,12 @@ static void test_coop_level_mode_set(void) ddsd.ddsCaps.dwCaps = DDSCAPS_PRIMARYSURFACE;
hr = IDirectDraw4_CreateSurface(ddraw, &ddsd, &primary, NULL); - ok(SUCCEEDED(hr), "Failed to create surface, hr %#x.\n",hr); + ok(SUCCEEDED(hr), "Failed to create surface, hr %#lx.\n",hr); hr = IDirectDrawSurface4_GetSurfaceDesc(primary, &ddsd); - ok(SUCCEEDED(hr), "Failed to get surface desc, hr %#x.\n", hr); - ok(ddsd.dwWidth == param.user32_width, "Expected surface width %u, got %u.\n", + ok(SUCCEEDED(hr), "Failed to get surface desc, hr %#lx.\n", hr); + ok(ddsd.dwWidth == param.user32_width, "Expected surface width %lu, got %lu.\n", param.user32_width, ddsd.dwWidth); - ok(ddsd.dwHeight == param.user32_height, "Expected surface height %u, got %u.\n", + ok(ddsd.dwHeight == param.user32_height, "Expected surface height %lu, got %lu.\n", param.user32_height, ddsd.dwHeight);
GetWindowRect(window, &r); @@ -3395,16 +3395,16 @@ static void test_coop_level_mode_set(void) screen_size.cy = 0;
hr = IDirectDrawSurface4_IsLost(primary); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); hr = set_display_mode(ddraw, param.ddraw_width, param.ddraw_height); - ok(SUCCEEDED(hr), "Failed to set display mode, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set display mode, hr %#lx.\n", hr); hr = IDirectDrawSurface4_IsLost(primary); - ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#lx.\n", hr);
ok(!expect_messages->message, "Expected message %#x, but didn't receive it.\n", expect_messages->message); expect_messages = NULL; ok(screen_size.cx == param.ddraw_width && screen_size.cy == param.ddraw_height, - "Expected screen size %ux%u, got %ux%u.\n", + "Expected screen size %lux%lu, got %lux%lu.\n", param.ddraw_width, param.ddraw_height, screen_size.cx, screen_size.cy);
GetWindowRect(window, &r); @@ -3412,10 +3412,10 @@ static void test_coop_level_mode_set(void) wine_dbgstr_rect(&r));
hr = IDirectDrawSurface4_GetSurfaceDesc(primary, &ddsd); - ok(SUCCEEDED(hr), "Failed to get surface desc, hr %#x.\n", hr); - ok(ddsd.dwWidth == param.user32_width, "Expected surface width %u, got %u.\n", + ok(SUCCEEDED(hr), "Failed to get surface desc, hr %#lx.\n", hr); + ok(ddsd.dwWidth == param.user32_width, "Expected surface width %lu, got %lu.\n", param.user32_width, ddsd.dwWidth); - ok(ddsd.dwHeight == param.user32_height, "Expected surface height %u, got %u.\n", + ok(ddsd.dwHeight == param.user32_height, "Expected surface height %lu, got %lu.\n", param.user32_height, ddsd.dwHeight); IDirectDrawSurface4_Release(primary);
@@ -3425,12 +3425,12 @@ static void test_coop_level_mode_set(void) ddsd.ddsCaps.dwCaps = DDSCAPS_PRIMARYSURFACE;
hr = IDirectDraw4_CreateSurface(ddraw, &ddsd, &primary, NULL); - ok(SUCCEEDED(hr), "Failed to create surface, hr %#x.\n",hr); + ok(SUCCEEDED(hr), "Failed to create surface, hr %#lx.\n",hr); hr = IDirectDrawSurface4_GetSurfaceDesc(primary, &ddsd); - ok(SUCCEEDED(hr), "Failed to get surface desc, hr %#x.\n", hr); - ok(ddsd.dwWidth == param.ddraw_width, "Expected surface width %u, got %u.\n", + ok(SUCCEEDED(hr), "Failed to get surface desc, hr %#lx.\n", hr); + ok(ddsd.dwWidth == param.ddraw_width, "Expected surface width %lu, got %lu.\n", param.ddraw_width, ddsd.dwWidth); - ok(ddsd.dwHeight == param.ddraw_height, "Expected surface height %u, got %u.\n", + ok(ddsd.dwHeight == param.ddraw_height, "Expected surface height %lu, got %lu.\n", param.ddraw_height, ddsd.dwHeight);
GetWindowRect(window, &r); @@ -3443,16 +3443,16 @@ static void test_coop_level_mode_set(void) screen_size.cy = 0;
hr = IDirectDrawSurface4_IsLost(primary); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); change_ret = ChangeDisplaySettingsW(&devmode, CDS_FULLSCREEN); - ok(change_ret == DISP_CHANGE_SUCCESSFUL, "Failed to change display mode, ret %#x.\n", change_ret); + ok(change_ret == DISP_CHANGE_SUCCESSFUL, "Failed to change display mode, ret %#lx.\n", change_ret); hr = IDirectDrawSurface4_IsLost(primary); - ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#lx.\n", hr);
ok(!expect_messages->message, "Expected message %#x, but didn't receive it.\n", expect_messages->message); expect_messages = NULL; ok(screen_size.cx == param.user32_width && screen_size.cy == param.user32_height, - "Expected screen size %ux%u, got %ux%u.\n", + "Expected screen size %lux%lu, got %lux%lu.\n", param.user32_width, param.user32_height, screen_size.cx, screen_size.cy);
GetWindowRect(window, &r); @@ -3471,7 +3471,7 @@ static void test_coop_level_mode_set(void) ret = EnumDisplaySettingsW(NULL, ENUM_CURRENT_SETTINGS, &devmode); ok(ret, "Failed to get display mode.\n"); ok(devmode.dmPelsWidth == registry_mode.dmPelsWidth - && devmode.dmPelsHeight == registry_mode.dmPelsHeight, "Got unexpected screen size %ux%u.\n", + && devmode.dmPelsHeight == registry_mode.dmPelsHeight, "Got unexpected screen size %lux%lu.\n", devmode.dmPelsWidth, devmode.dmPelsHeight);
expect_messages = exclusive_focus_restore_messages; @@ -3484,11 +3484,11 @@ static void test_coop_level_mode_set(void) ret = EnumDisplaySettingsW(NULL, ENUM_CURRENT_SETTINGS, &devmode); ok(ret, "Failed to get display mode.\n"); ok(devmode.dmPelsWidth == param.ddraw_width - && devmode.dmPelsHeight == param.ddraw_height, "Got unexpected screen size %ux%u.\n", + && devmode.dmPelsHeight == param.ddraw_height, "Got unexpected screen size %lux%lu.\n", devmode.dmPelsWidth, devmode.dmPelsHeight);
hr = IDirectDraw4_SetCooperativeLevel(ddraw, window, DDSCL_EXCLUSIVE | DDSCL_FULLSCREEN); - ok(SUCCEEDED(hr), "SetCooperativeLevel failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "SetCooperativeLevel failed, hr %#lx.\n", hr); /* Normally the primary should be restored here. Unfortunately this causes the * GetSurfaceDesc call after the next display mode change to crash on the Windows 8 * testbot. Another Restore call would presumably avoid the crash, but it also moots @@ -3510,7 +3510,7 @@ static void test_coop_level_mode_set(void) expect_messages = NULL;
hr = IDirectDraw4_SetCooperativeLevel(ddraw, window, DDSCL_EXCLUSIVE | DDSCL_FULLSCREEN); - ok(SUCCEEDED(hr), "SetCooperativeLevel failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "SetCooperativeLevel failed, hr %#lx.\n", hr);
PeekMessageA(&msg, 0, 0, 0, PM_NOREMOVE); expect_messages = exclusive_messages; @@ -3518,17 +3518,17 @@ static void test_coop_level_mode_set(void) screen_size.cy = 0;
hr = IDirectDrawSurface4_IsLost(primary); - ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#lx.\n", hr); hr = IDirectDraw4_RestoreDisplayMode(ddraw); - ok(SUCCEEDED(hr), "RestoreDisplayMode failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "RestoreDisplayMode failed, hr %#lx.\n", hr); hr = IDirectDrawSurface4_IsLost(primary); - ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#lx.\n", hr);
ok(!expect_messages->message, "Expected message %#x, but didn't receive it.\n", expect_messages->message); expect_messages = NULL; ok(screen_size.cx == registry_mode.dmPelsWidth && screen_size.cy == registry_mode.dmPelsHeight, - "Expected screen size %ux%u, got %ux%u.\n", + "Expected screen size %lux%lu, got %lux%lu.\n", registry_mode.dmPelsWidth, registry_mode.dmPelsHeight, screen_size.cx, screen_size.cy);
GetWindowRect(window, &r); @@ -3536,16 +3536,16 @@ static void test_coop_level_mode_set(void) wine_dbgstr_rect(&r));
hr = IDirectDrawSurface4_GetSurfaceDesc(primary, &ddsd); - ok(SUCCEEDED(hr), "Failed to get surface desc, hr %#x.\n", hr); - ok(ddsd.dwWidth == param.ddraw_width, "Expected surface width %u, got %u.\n", + ok(SUCCEEDED(hr), "Failed to get surface desc, hr %#lx.\n", hr); + ok(ddsd.dwWidth == param.ddraw_width, "Expected surface width %lu, got %lu.\n", param.ddraw_width, ddsd.dwWidth); - ok(ddsd.dwHeight == param.ddraw_height, "Expected surface height %u, got %u.\n", + ok(ddsd.dwHeight == param.ddraw_height, "Expected surface height %lu, got %lu.\n", param.ddraw_height, ddsd.dwHeight); IDirectDrawSurface4_Release(primary);
/* For Wine. */ change_ret = ChangeDisplaySettingsW(NULL, CDS_FULLSCREEN); - ok(change_ret == DISP_CHANGE_SUCCESSFUL, "Failed to change display mode, ret %#x.\n", change_ret); + ok(change_ret == DISP_CHANGE_SUCCESSFUL, "Failed to change display mode, ret %#lx.\n", change_ret);
memset(&ddsd, 0, sizeof(ddsd)); ddsd.dwSize = sizeof(ddsd); @@ -3553,12 +3553,12 @@ static void test_coop_level_mode_set(void) ddsd.ddsCaps.dwCaps = DDSCAPS_PRIMARYSURFACE;
hr = IDirectDraw4_CreateSurface(ddraw, &ddsd, &primary, NULL); - ok(SUCCEEDED(hr), "Failed to create surface, hr %#x.\n",hr); + ok(SUCCEEDED(hr), "Failed to create surface, hr %#lx.\n",hr); hr = IDirectDrawSurface4_GetSurfaceDesc(primary, &ddsd); - ok(SUCCEEDED(hr), "Failed to get surface desc, hr %#x.\n", hr); - ok(ddsd.dwWidth == registry_mode.dmPelsWidth, "Expected surface width %u, got %u.\n", + ok(SUCCEEDED(hr), "Failed to get surface desc, hr %#lx.\n", hr); + ok(ddsd.dwWidth == registry_mode.dmPelsWidth, "Expected surface width %lu, got %lu.\n", registry_mode.dmPelsWidth, ddsd.dwWidth); - ok(ddsd.dwHeight == registry_mode.dmPelsHeight, "Expected surface height %u, got %u.\n", + ok(ddsd.dwHeight == registry_mode.dmPelsHeight, "Expected surface height %lu, got %lu.\n", registry_mode.dmPelsHeight, ddsd.dwHeight);
GetWindowRect(window, &r); @@ -3566,17 +3566,17 @@ static void test_coop_level_mode_set(void) wine_dbgstr_rect(&r));
hr = IDirectDraw4_SetCooperativeLevel(ddraw, window, DDSCL_NORMAL); - ok(SUCCEEDED(hr), "SetCooperativeLevel failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "SetCooperativeLevel failed, hr %#lx.\n", hr);
GetWindowRect(window, &r); ok(EqualRect(&r, ®istry_rect), "Expected %s, got %s.\n", wine_dbgstr_rect(®istry_rect), wine_dbgstr_rect(&r));
hr = IDirectDrawSurface4_GetSurfaceDesc(primary, &ddsd); - ok(SUCCEEDED(hr), "Failed to get surface desc, hr %#x.\n", hr); - ok(ddsd.dwWidth == registry_mode.dmPelsWidth, "Expected surface width %u, got %u.\n", + ok(SUCCEEDED(hr), "Failed to get surface desc, hr %#lx.\n", hr); + ok(ddsd.dwWidth == registry_mode.dmPelsWidth, "Expected surface width %lu, got %lu.\n", registry_mode.dmPelsWidth, ddsd.dwWidth); - ok(ddsd.dwHeight == registry_mode.dmPelsHeight, "Expected surface height %u, got %u.\n", + ok(ddsd.dwHeight == registry_mode.dmPelsHeight, "Expected surface height %lu, got %lu.\n", registry_mode.dmPelsHeight, ddsd.dwHeight); IDirectDrawSurface4_Release(primary);
@@ -3586,12 +3586,12 @@ static void test_coop_level_mode_set(void) ddsd.ddsCaps.dwCaps = DDSCAPS_PRIMARYSURFACE;
hr = IDirectDraw4_CreateSurface(ddraw, &ddsd, &primary, NULL); - ok(SUCCEEDED(hr), "Failed to create surface, hr %#x.\n",hr); + ok(SUCCEEDED(hr), "Failed to create surface, hr %#lx.\n",hr); hr = IDirectDrawSurface4_GetSurfaceDesc(primary, &ddsd); - ok(SUCCEEDED(hr), "Failed to get surface desc, hr %#x.\n", hr); - ok(ddsd.dwWidth == registry_mode.dmPelsWidth, "Expected surface width %u, got %u.\n", + ok(SUCCEEDED(hr), "Failed to get surface desc, hr %#lx.\n", hr); + ok(ddsd.dwWidth == registry_mode.dmPelsWidth, "Expected surface width %lu, got %lu.\n", registry_mode.dmPelsWidth, ddsd.dwWidth); - ok(ddsd.dwHeight == registry_mode.dmPelsHeight, "Expected surface height %u, got %u.\n", + ok(ddsd.dwHeight == registry_mode.dmPelsHeight, "Expected surface height %lu, got %lu.\n", registry_mode.dmPelsHeight, ddsd.dwHeight);
GetWindowRect(window, &r); @@ -3604,18 +3604,18 @@ static void test_coop_level_mode_set(void) screen_size.cy = 0;
hr = IDirectDrawSurface4_IsLost(primary); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); devmode.dmFields = DM_PELSWIDTH | DM_PELSHEIGHT; devmode.dmPelsWidth = param.user32_width; devmode.dmPelsHeight = param.user32_height; change_ret = ChangeDisplaySettingsW(&devmode, CDS_FULLSCREEN); - ok(change_ret == DISP_CHANGE_SUCCESSFUL, "Failed to change display mode, ret %#x.\n", change_ret); + ok(change_ret == DISP_CHANGE_SUCCESSFUL, "Failed to change display mode, ret %#lx.\n", change_ret); hr = IDirectDrawSurface4_IsLost(primary); - todo_wine ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#x.\n", hr); + todo_wine ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#lx.\n", hr);
ok(!expect_messages->message, "Expected message %#x, but didn't receive it.\n", expect_messages->message); expect_messages = NULL; - ok(!screen_size.cx && !screen_size.cy, "Got unexpected screen size %ux%u.\n", screen_size.cx, screen_size.cy); + ok(!screen_size.cx && !screen_size.cy, "Got unexpected screen size %lux%lu.\n", screen_size.cx, screen_size.cy);
GetWindowRect(window, &r); ok(EqualRect(&r, ®istry_rect), "Expected %s, got %s.\n", wine_dbgstr_rect(®istry_rect), @@ -3627,27 +3627,27 @@ static void test_coop_level_mode_set(void) screen_size.cy = 0;
hr = IDirectDrawSurface4_Restore(primary); - ok(hr == DDERR_WRONGMODE, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_WRONGMODE, "Got unexpected hr %#lx.\n", hr); hr = set_display_mode(ddraw, param.ddraw_width, param.ddraw_height); - ok(SUCCEEDED(hr), "Failed to set display mode, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set display mode, hr %#lx.\n", hr); hr = IDirectDrawSurface4_Restore(primary); - ok(hr == DDERR_WRONGMODE, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_WRONGMODE, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface4_IsLost(primary); - ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#lx.\n", hr);
ok(!expect_messages->message, "Expected message %#x, but didn't receive it.\n", expect_messages->message); expect_messages = NULL; - ok(!screen_size.cx && !screen_size.cy, "Got unexpected screen size %ux%u.\n", screen_size.cx, screen_size.cy); + ok(!screen_size.cx && !screen_size.cy, "Got unexpected screen size %lux%lu.\n", screen_size.cx, screen_size.cy);
GetWindowRect(window, &r); ok(EqualRect(&r, ®istry_rect), "Expected %s, got %s.\n", wine_dbgstr_rect(®istry_rect), wine_dbgstr_rect(&r));
hr = IDirectDrawSurface4_GetSurfaceDesc(primary, &ddsd); - ok(SUCCEEDED(hr), "Failed to get surface desc, hr %#x.\n", hr); - ok(ddsd.dwWidth == registry_mode.dmPelsWidth, "Expected surface width %u, got %u.\n", + ok(SUCCEEDED(hr), "Failed to get surface desc, hr %#lx.\n", hr); + ok(ddsd.dwWidth == registry_mode.dmPelsWidth, "Expected surface width %lu, got %lu.\n", registry_mode.dmPelsWidth, ddsd.dwWidth); - ok(ddsd.dwHeight == registry_mode.dmPelsHeight, "Expected surface height %u, got %u.\n", + ok(ddsd.dwHeight == registry_mode.dmPelsHeight, "Expected surface height %lu, got %lu.\n", registry_mode.dmPelsHeight, ddsd.dwHeight); IDirectDrawSurface4_Release(primary);
@@ -3657,12 +3657,12 @@ static void test_coop_level_mode_set(void) ddsd.ddsCaps.dwCaps = DDSCAPS_PRIMARYSURFACE;
hr = IDirectDraw4_CreateSurface(ddraw, &ddsd, &primary, NULL); - ok(SUCCEEDED(hr), "Failed to create surface, hr %#x.\n",hr); + ok(SUCCEEDED(hr), "Failed to create surface, hr %#lx.\n",hr); hr = IDirectDrawSurface4_GetSurfaceDesc(primary, &ddsd); - ok(SUCCEEDED(hr), "Failed to get surface desc, hr %#x.\n", hr); - ok(ddsd.dwWidth == param.ddraw_width, "Expected surface width %u, got %u.\n", + ok(SUCCEEDED(hr), "Failed to get surface desc, hr %#lx.\n", hr); + ok(ddsd.dwWidth == param.ddraw_width, "Expected surface width %lu, got %lu.\n", param.ddraw_width, ddsd.dwWidth); - ok(ddsd.dwHeight == param.ddraw_height, "Expected surface height %u, got %u.\n", + ok(ddsd.dwHeight == param.ddraw_height, "Expected surface height %lu, got %lu.\n", param.ddraw_height, ddsd.dwHeight);
GetWindowRect(window, &r); @@ -3675,25 +3675,25 @@ static void test_coop_level_mode_set(void) screen_size.cy = 0;
hr = IDirectDrawSurface4_IsLost(primary); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirectDraw4_RestoreDisplayMode(ddraw); - ok(SUCCEEDED(hr), "RestoreDisplayMode failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "RestoreDisplayMode failed, hr %#lx.\n", hr); hr = IDirectDrawSurface4_IsLost(primary); - ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#lx.\n", hr);
ok(!expect_messages->message, "Expected message %#x, but didn't receive it.\n", expect_messages->message); expect_messages = NULL; - ok(!screen_size.cx && !screen_size.cy, "Got unexpected screen size %ux%u.\n", screen_size.cx, screen_size.cy); + ok(!screen_size.cx && !screen_size.cy, "Got unexpected screen size %lux%lu.\n", screen_size.cx, screen_size.cy);
GetWindowRect(window, &r); ok(EqualRect(&r, ®istry_rect), "Expected %s, got %s.\n", wine_dbgstr_rect(®istry_rect), wine_dbgstr_rect(&r));
hr = IDirectDrawSurface4_GetSurfaceDesc(primary, &ddsd); - ok(SUCCEEDED(hr), "Failed to get surface desc, hr %#x.\n", hr); - ok(ddsd.dwWidth == param.ddraw_width, "Expected surface width %u, got %u.\n", + ok(SUCCEEDED(hr), "Failed to get surface desc, hr %#lx.\n", hr); + ok(ddsd.dwWidth == param.ddraw_width, "Expected surface width %lu, got %lu.\n", param.ddraw_width, ddsd.dwWidth); - ok(ddsd.dwHeight == param.ddraw_height, "Expected surface height %u, got %u.\n", + ok(ddsd.dwHeight == param.ddraw_height, "Expected surface height %lu, got %lu.\n", param.ddraw_height, ddsd.dwHeight); IDirectDrawSurface4_Release(primary);
@@ -3701,11 +3701,11 @@ static void test_coop_level_mode_set(void) ok(ret, "Failed to get display mode.\n"); ok(devmode.dmPelsWidth == registry_mode.dmPelsWidth && devmode.dmPelsHeight == registry_mode.dmPelsHeight, - "Expected resolution %ux%u, got %ux%u.\n", + "Expected resolution %lux%lu, got %lux%lu.\n", registry_mode.dmPelsWidth, registry_mode.dmPelsHeight, devmode.dmPelsWidth, devmode.dmPelsHeight); change_ret = ChangeDisplaySettingsW(NULL, CDS_FULLSCREEN); - ok(change_ret == DISP_CHANGE_SUCCESSFUL, "Failed to change display mode, ret %#x.\n", change_ret); + ok(change_ret == DISP_CHANGE_SUCCESSFUL, "Failed to change display mode, ret %#lx.\n", change_ret);
memset(&ddsd, 0, sizeof(ddsd)); ddsd.dwSize = sizeof(ddsd); @@ -3713,12 +3713,12 @@ static void test_coop_level_mode_set(void) ddsd.ddsCaps.dwCaps = DDSCAPS_PRIMARYSURFACE;
hr = IDirectDraw4_CreateSurface(ddraw, &ddsd, &primary, NULL); - ok(SUCCEEDED(hr), "Failed to create surface, hr %#x.\n",hr); + ok(SUCCEEDED(hr), "Failed to create surface, hr %#lx.\n",hr); hr = IDirectDrawSurface4_GetSurfaceDesc(primary, &ddsd); - ok(SUCCEEDED(hr), "Failed to get surface desc, hr %#x.\n", hr); - ok(ddsd.dwWidth == registry_mode.dmPelsWidth, "Expected surface width %u, got %u.\n", + ok(SUCCEEDED(hr), "Failed to get surface desc, hr %#lx.\n", hr); + ok(ddsd.dwWidth == registry_mode.dmPelsWidth, "Expected surface width %lu, got %lu.\n", registry_mode.dmPelsWidth, ddsd.dwWidth); - ok(ddsd.dwHeight == registry_mode.dmPelsHeight, "Expected surface height %u, got %u.\n", + ok(ddsd.dwHeight == registry_mode.dmPelsHeight, "Expected surface height %lu, got %lu.\n", registry_mode.dmPelsHeight, ddsd.dwHeight);
GetWindowRect(window, &r); @@ -3729,17 +3729,17 @@ static void test_coop_level_mode_set(void) * Resizing the window on mode changes is a property of DDSCL_EXCLUSIVE, * not DDSCL_FULLSCREEN. */ hr = IDirectDraw4_SetCooperativeLevel(ddraw, window, DDSCL_NORMAL | DDSCL_FULLSCREEN); - ok(SUCCEEDED(hr), "SetCooperativeLevel failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "SetCooperativeLevel failed, hr %#lx.\n", hr);
GetWindowRect(window, &r); ok(EqualRect(&r, ®istry_rect), "Expected %s, got %s.\n", wine_dbgstr_rect(®istry_rect), wine_dbgstr_rect(&r));
hr = IDirectDrawSurface4_GetSurfaceDesc(primary, &ddsd); - ok(SUCCEEDED(hr), "Failed to get surface desc, hr %#x.\n", hr); - ok(ddsd.dwWidth == registry_mode.dmPelsWidth, "Expected surface width %u, got %u.\n", + ok(SUCCEEDED(hr), "Failed to get surface desc, hr %#lx.\n", hr); + ok(ddsd.dwWidth == registry_mode.dmPelsWidth, "Expected surface width %lu, got %lu.\n", registry_mode.dmPelsWidth, ddsd.dwWidth); - ok(ddsd.dwHeight == registry_mode.dmPelsHeight, "Expected surface height %u, got %u.\n", + ok(ddsd.dwHeight == registry_mode.dmPelsHeight, "Expected surface height %lu, got %lu.\n", registry_mode.dmPelsHeight, ddsd.dwHeight); IDirectDrawSurface4_Release(primary);
@@ -3749,12 +3749,12 @@ static void test_coop_level_mode_set(void) ddsd.ddsCaps.dwCaps = DDSCAPS_PRIMARYSURFACE;
hr = IDirectDraw4_CreateSurface(ddraw, &ddsd, &primary, NULL); - ok(SUCCEEDED(hr), "Failed to create surface, hr %#x.\n",hr); + ok(SUCCEEDED(hr), "Failed to create surface, hr %#lx.\n",hr); hr = IDirectDrawSurface4_GetSurfaceDesc(primary, &ddsd); - ok(SUCCEEDED(hr), "Failed to get surface desc, hr %#x.\n", hr); - ok(ddsd.dwWidth == registry_mode.dmPelsWidth, "Expected surface width %u, got %u.\n", + ok(SUCCEEDED(hr), "Failed to get surface desc, hr %#lx.\n", hr); + ok(ddsd.dwWidth == registry_mode.dmPelsWidth, "Expected surface width %lu, got %lu.\n", registry_mode.dmPelsWidth, ddsd.dwWidth); - ok(ddsd.dwHeight == registry_mode.dmPelsHeight, "Expected surface height %u, got %u.\n", + ok(ddsd.dwHeight == registry_mode.dmPelsHeight, "Expected surface height %lu, got %lu.\n", registry_mode.dmPelsHeight, ddsd.dwHeight);
GetWindowRect(window, &r); @@ -3767,18 +3767,18 @@ static void test_coop_level_mode_set(void) screen_size.cy = 0;
hr = IDirectDrawSurface4_IsLost(primary); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); devmode.dmFields = DM_PELSWIDTH | DM_PELSHEIGHT; devmode.dmPelsWidth = param.user32_width; devmode.dmPelsHeight = param.user32_height; change_ret = ChangeDisplaySettingsW(&devmode, CDS_FULLSCREEN); - ok(change_ret == DISP_CHANGE_SUCCESSFUL, "Failed to change display mode, ret %#x.\n", change_ret); + ok(change_ret == DISP_CHANGE_SUCCESSFUL, "Failed to change display mode, ret %#lx.\n", change_ret); hr = IDirectDrawSurface4_IsLost(primary); - todo_wine ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#x.\n", hr); + todo_wine ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#lx.\n", hr);
ok(!expect_messages->message, "Expected message %#x, but didn't receive it.\n", expect_messages->message); expect_messages = NULL; - ok(!screen_size.cx && !screen_size.cy, "Got unexpected screen size %ux%u.\n", screen_size.cx, screen_size.cy); + ok(!screen_size.cx && !screen_size.cy, "Got unexpected screen size %lux%lu.\n", screen_size.cx, screen_size.cy);
GetWindowRect(window, &r); ok(EqualRect(&r, ®istry_rect), "Expected %s, got %s.\n", wine_dbgstr_rect(®istry_rect), @@ -3790,27 +3790,27 @@ static void test_coop_level_mode_set(void) screen_size.cy = 0;
hr = IDirectDrawSurface4_Restore(primary); - ok(hr == DDERR_WRONGMODE, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_WRONGMODE, "Got unexpected hr %#lx.\n", hr); hr = set_display_mode(ddraw, param.ddraw_width, param.ddraw_height); - ok(SUCCEEDED(hr), "Failed to set display mode, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set display mode, hr %#lx.\n", hr); hr = IDirectDrawSurface4_Restore(primary); - ok(hr == DDERR_WRONGMODE, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_WRONGMODE, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface4_IsLost(primary); - ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#lx.\n", hr);
ok(!expect_messages->message, "Expected message %#x, but didn't receive it.\n", expect_messages->message); expect_messages = NULL; - ok(!screen_size.cx && !screen_size.cy, "Got unexpected screen size %ux%u.\n", screen_size.cx, screen_size.cy); + ok(!screen_size.cx && !screen_size.cy, "Got unexpected screen size %lux%lu.\n", screen_size.cx, screen_size.cy);
GetWindowRect(window, &r); ok(EqualRect(&r, ®istry_rect), "Expected %s, got %s.\n", wine_dbgstr_rect(®istry_rect), wine_dbgstr_rect(&r));
hr = IDirectDrawSurface4_GetSurfaceDesc(primary, &ddsd); - ok(SUCCEEDED(hr), "Failed to get surface desc, hr %#x.\n", hr); - ok(ddsd.dwWidth == registry_mode.dmPelsWidth, "Expected surface width %u, got %u.\n", + ok(SUCCEEDED(hr), "Failed to get surface desc, hr %#lx.\n", hr); + ok(ddsd.dwWidth == registry_mode.dmPelsWidth, "Expected surface width %lu, got %lu.\n", registry_mode.dmPelsWidth, ddsd.dwWidth); - ok(ddsd.dwHeight == registry_mode.dmPelsHeight, "Expected surface height %u, got %u.\n", + ok(ddsd.dwHeight == registry_mode.dmPelsHeight, "Expected surface height %lu, got %lu.\n", registry_mode.dmPelsHeight, ddsd.dwHeight); IDirectDrawSurface4_Release(primary);
@@ -3820,12 +3820,12 @@ static void test_coop_level_mode_set(void) ddsd.ddsCaps.dwCaps = DDSCAPS_PRIMARYSURFACE;
hr = IDirectDraw4_CreateSurface(ddraw, &ddsd, &primary, NULL); - ok(SUCCEEDED(hr), "Failed to create surface, hr %#x.\n",hr); + ok(SUCCEEDED(hr), "Failed to create surface, hr %#lx.\n",hr); hr = IDirectDrawSurface4_GetSurfaceDesc(primary, &ddsd); - ok(SUCCEEDED(hr), "Failed to get surface desc, hr %#x.\n", hr); - ok(ddsd.dwWidth == param.ddraw_width, "Expected surface width %u, got %u.\n", + ok(SUCCEEDED(hr), "Failed to get surface desc, hr %#lx.\n", hr); + ok(ddsd.dwWidth == param.ddraw_width, "Expected surface width %lu, got %lu.\n", param.ddraw_width, ddsd.dwWidth); - ok(ddsd.dwHeight == param.ddraw_height, "Expected surface height %u, got %u.\n", + ok(ddsd.dwHeight == param.ddraw_height, "Expected surface height %lu, got %lu.\n", param.ddraw_height, ddsd.dwHeight);
GetWindowRect(window, &r); @@ -3838,25 +3838,25 @@ static void test_coop_level_mode_set(void) screen_size.cy = 0;
hr = IDirectDrawSurface4_IsLost(primary); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirectDraw4_RestoreDisplayMode(ddraw); - ok(SUCCEEDED(hr), "RestoreDisplayMode failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "RestoreDisplayMode failed, hr %#lx.\n", hr); hr = IDirectDrawSurface4_IsLost(primary); - ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#lx.\n", hr);
ok(!expect_messages->message, "Expected message %#x, but didn't receive it.\n", expect_messages->message); expect_messages = NULL; - ok(!screen_size.cx && !screen_size.cy, "Got unexpected screen size %ux%u.\n", screen_size.cx, screen_size.cy); + ok(!screen_size.cx && !screen_size.cy, "Got unexpected screen size %lux%lu.\n", screen_size.cx, screen_size.cy);
GetWindowRect(window, &r); ok(EqualRect(&r, ®istry_rect), "Expected %s, got %s.\n", wine_dbgstr_rect(®istry_rect), wine_dbgstr_rect(&r));
hr = IDirectDrawSurface4_GetSurfaceDesc(primary, &ddsd); - ok(SUCCEEDED(hr), "Failed to get surface desc, hr %#x.\n", hr); - ok(ddsd.dwWidth == param.ddraw_width, "Expected surface width %u, got %u.\n", + ok(SUCCEEDED(hr), "Failed to get surface desc, hr %#lx.\n", hr); + ok(ddsd.dwWidth == param.ddraw_width, "Expected surface width %lu, got %lu.\n", param.ddraw_width, ddsd.dwWidth); - ok(ddsd.dwHeight == param.ddraw_height, "Expected surface height %u, got %u.\n", + ok(ddsd.dwHeight == param.ddraw_height, "Expected surface height %lu, got %lu.\n", param.ddraw_height, ddsd.dwHeight); IDirectDrawSurface4_Release(primary);
@@ -3864,11 +3864,11 @@ static void test_coop_level_mode_set(void) ok(ret, "Failed to get display mode.\n"); ok(devmode.dmPelsWidth == registry_mode.dmPelsWidth && devmode.dmPelsHeight == registry_mode.dmPelsHeight, - "Expected resolution %ux%u, got %ux%u.\n", + "Expected resolution %lux%lu, got %lux%lu.\n", registry_mode.dmPelsWidth, registry_mode.dmPelsHeight, devmode.dmPelsWidth, devmode.dmPelsHeight); change_ret = ChangeDisplaySettingsW(NULL, CDS_FULLSCREEN); - ok(change_ret == DISP_CHANGE_SUCCESSFUL, "Failed to change display mode, ret %#x.\n", change_ret); + ok(change_ret == DISP_CHANGE_SUCCESSFUL, "Failed to change display mode, ret %#lx.\n", change_ret);
memset(&ddsd, 0, sizeof(ddsd)); ddsd.dwSize = sizeof(ddsd); @@ -3876,12 +3876,12 @@ static void test_coop_level_mode_set(void) ddsd.ddsCaps.dwCaps = DDSCAPS_PRIMARYSURFACE;
hr = IDirectDraw4_CreateSurface(ddraw, &ddsd, &primary, NULL); - ok(SUCCEEDED(hr), "Failed to create surface, hr %#x.\n",hr); + ok(SUCCEEDED(hr), "Failed to create surface, hr %#lx.\n",hr); hr = IDirectDrawSurface4_GetSurfaceDesc(primary, &ddsd); - ok(SUCCEEDED(hr), "Failed to get surface desc, hr %#x.\n", hr); - ok(ddsd.dwWidth == registry_mode.dmPelsWidth, "Expected surface width %u, got %u.\n", + ok(SUCCEEDED(hr), "Failed to get surface desc, hr %#lx.\n", hr); + ok(ddsd.dwWidth == registry_mode.dmPelsWidth, "Expected surface width %lu, got %lu.\n", registry_mode.dmPelsWidth, ddsd.dwWidth); - ok(ddsd.dwHeight == registry_mode.dmPelsHeight, "Expected surface height %u, got %u.\n", + ok(ddsd.dwHeight == registry_mode.dmPelsHeight, "Expected surface height %lu, got %lu.\n", registry_mode.dmPelsHeight, ddsd.dwHeight); IDirectDrawSurface4_Release(primary);
@@ -3891,9 +3891,9 @@ static void test_coop_level_mode_set(void)
/* Changing the coop level from EXCLUSIVE to NORMAL restores the screen resolution */ hr = IDirectDraw4_SetCooperativeLevel(ddraw, window, DDSCL_EXCLUSIVE | DDSCL_FULLSCREEN); - ok(SUCCEEDED(hr), "SetCooperativeLevel failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "SetCooperativeLevel failed, hr %#lx.\n", hr); hr = set_display_mode(ddraw, param.ddraw_width, param.ddraw_height); - ok(SUCCEEDED(hr), "Failed to set display mode, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set display mode, hr %#lx.\n", hr);
PeekMessageA(&msg, 0, 0, 0, PM_NOREMOVE); expect_messages = exclusive_messages; @@ -3901,13 +3901,13 @@ static void test_coop_level_mode_set(void) screen_size.cy = 0;
hr = IDirectDraw4_SetCooperativeLevel(ddraw, window, DDSCL_NORMAL); - ok(SUCCEEDED(hr), "SetCooperativeLevel failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "SetCooperativeLevel failed, hr %#lx.\n", hr);
ok(!expect_messages->message, "Expected message %#x, but didn't receive it.\n", expect_messages->message); expect_messages = NULL; ok(screen_size.cx == registry_mode.dmPelsWidth && screen_size.cy == registry_mode.dmPelsHeight, - "Expected screen size %ux%u, got %ux%u.\n", + "Expected screen size %lux%lu, got %lux%lu.\n", registry_mode.dmPelsWidth, registry_mode.dmPelsHeight, screen_size.cx, screen_size.cy);
@@ -3921,23 +3921,23 @@ static void test_coop_level_mode_set(void) ddsd.ddsCaps.dwCaps = DDSCAPS_PRIMARYSURFACE;
hr = IDirectDraw4_CreateSurface(ddraw, &ddsd, &primary, NULL); - ok(SUCCEEDED(hr), "Failed to create surface, hr %#x.\n",hr); + ok(SUCCEEDED(hr), "Failed to create surface, hr %#lx.\n",hr); hr = IDirectDrawSurface4_GetSurfaceDesc(primary, &ddsd); - ok(SUCCEEDED(hr), "Failed to get surface desc, hr %#x.\n", hr); - ok(ddsd.dwWidth == registry_mode.dmPelsWidth, "Expected surface width %u, got %u.\n", + ok(SUCCEEDED(hr), "Failed to get surface desc, hr %#lx.\n", hr); + ok(ddsd.dwWidth == registry_mode.dmPelsWidth, "Expected surface width %lu, got %lu.\n", registry_mode.dmPelsWidth, ddsd.dwWidth); - ok(ddsd.dwHeight == registry_mode.dmPelsHeight, "Expected surface height %u, got %u.\n", + ok(ddsd.dwHeight == registry_mode.dmPelsHeight, "Expected surface height %lu, got %lu.\n", registry_mode.dmPelsHeight, ddsd.dwHeight); IDirectDrawSurface4_Release(primary);
/* The screen restore is a property of DDSCL_EXCLUSIVE */ hr = IDirectDraw4_SetCooperativeLevel(ddraw, window, DDSCL_NORMAL | DDSCL_FULLSCREEN); - ok(SUCCEEDED(hr), "SetCooperativeLevel failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "SetCooperativeLevel failed, hr %#lx.\n", hr); hr = set_display_mode(ddraw, param.ddraw_width, param.ddraw_height); - ok(SUCCEEDED(hr), "Failed to set display mode, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set display mode, hr %#lx.\n", hr);
hr = IDirectDraw4_SetCooperativeLevel(ddraw, window, DDSCL_NORMAL); - ok(SUCCEEDED(hr), "SetCooperativeLevel failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "SetCooperativeLevel failed, hr %#lx.\n", hr);
memset(&ddsd, 0, sizeof(ddsd)); ddsd.dwSize = sizeof(ddsd); @@ -3945,23 +3945,23 @@ static void test_coop_level_mode_set(void) ddsd.ddsCaps.dwCaps = DDSCAPS_PRIMARYSURFACE;
hr = IDirectDraw4_CreateSurface(ddraw, &ddsd, &primary, NULL); - ok(SUCCEEDED(hr), "Failed to create surface, hr %#x.\n",hr); + ok(SUCCEEDED(hr), "Failed to create surface, hr %#lx.\n",hr); hr = IDirectDrawSurface4_GetSurfaceDesc(primary, &ddsd); - ok(SUCCEEDED(hr), "Failed to get surface desc, hr %#x.\n", hr); - ok(ddsd.dwWidth == param.ddraw_width, "Expected surface width %u, got %u.\n", + ok(SUCCEEDED(hr), "Failed to get surface desc, hr %#lx.\n", hr); + ok(ddsd.dwWidth == param.ddraw_width, "Expected surface width %lu, got %lu.\n", param.ddraw_width, ddsd.dwWidth); - ok(ddsd.dwHeight == param.ddraw_height, "Expected surface height %u, got %u.\n", + ok(ddsd.dwHeight == param.ddraw_height, "Expected surface height %lu, got %lu.\n", param.ddraw_height, ddsd.dwHeight); IDirectDrawSurface4_Release(primary);
hr = IDirectDraw4_RestoreDisplayMode(ddraw); - ok(SUCCEEDED(hr), "RestoreDisplayMode failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "RestoreDisplayMode failed, hr %#lx.\n", hr);
/* If the window is changed at the same time, messages are sent to the new window. */ hr = IDirectDraw4_SetCooperativeLevel(ddraw, window, DDSCL_EXCLUSIVE | DDSCL_FULLSCREEN); - ok(SUCCEEDED(hr), "SetCooperativeLevel failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "SetCooperativeLevel failed, hr %#lx.\n", hr); hr = set_display_mode(ddraw, param.ddraw_width, param.ddraw_height); - ok(SUCCEEDED(hr), "Failed to set display mode, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set display mode, hr %#lx.\n", hr);
PeekMessageA(&msg, 0, 0, 0, PM_NOREMOVE); expect_messages = exclusive_messages; @@ -3971,14 +3971,14 @@ static void test_coop_level_mode_set(void) screen_size2.cy = 0;
hr = IDirectDraw4_SetCooperativeLevel(ddraw, window2, DDSCL_NORMAL); - ok(SUCCEEDED(hr), "SetCooperativeLevel failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "SetCooperativeLevel failed, hr %#lx.\n", hr);
ok(!expect_messages->message, "Expected message %#x, but didn't receive it.\n", expect_messages->message); expect_messages = NULL; - ok(!screen_size.cx && !screen_size.cy, "Got unexpected screen size %ux%u.\n", + ok(!screen_size.cx && !screen_size.cy, "Got unexpected screen size %lux%lu.\n", screen_size.cx, screen_size.cy); ok(screen_size2.cx == registry_mode.dmPelsWidth && screen_size2.cy == registry_mode.dmPelsHeight, - "Expected screen size 2 %ux%u, got %ux%u.\n", + "Expected screen size 2 %lux%lu, got %lux%lu.\n", registry_mode.dmPelsWidth, registry_mode.dmPelsHeight, screen_size2.cx, screen_size2.cy);
GetWindowRect(window, &r); @@ -3994,17 +3994,17 @@ static void test_coop_level_mode_set(void) ddsd.ddsCaps.dwCaps = DDSCAPS_PRIMARYSURFACE;
hr = IDirectDraw4_CreateSurface(ddraw, &ddsd, &primary, NULL); - ok(SUCCEEDED(hr), "Failed to create surface, hr %#x.\n",hr); + ok(SUCCEEDED(hr), "Failed to create surface, hr %#lx.\n",hr); hr = IDirectDrawSurface4_GetSurfaceDesc(primary, &ddsd); - ok(SUCCEEDED(hr), "Failed to get surface desc, hr %#x.\n", hr); - ok(ddsd.dwWidth == registry_mode.dmPelsWidth, "Expected surface width %u, got %u.\n", + ok(SUCCEEDED(hr), "Failed to get surface desc, hr %#lx.\n", hr); + ok(ddsd.dwWidth == registry_mode.dmPelsWidth, "Expected surface width %lu, got %lu.\n", registry_mode.dmPelsWidth, ddsd.dwWidth); - ok(ddsd.dwHeight == registry_mode.dmPelsHeight, "Expected surface height %u, got %u.\n", + ok(ddsd.dwHeight == registry_mode.dmPelsHeight, "Expected surface height %lu, got %lu.\n", registry_mode.dmPelsHeight, ddsd.dwHeight); IDirectDrawSurface4_Release(primary);
ref = IDirectDraw4_Release(ddraw); - ok(ref == 0, "The ddraw object was not properly freed: refcount %u.\n", ref); + ok(ref == 0, "The ddraw object was not properly freed: refcount %lu.\n", ref);
GetWindowRect(window, &r); ok(EqualRect(&r, &ddraw_rect), "Expected %s, got %s.\n", wine_dbgstr_rect(&ddraw_rect), @@ -4018,36 +4018,36 @@ static void test_coop_level_mode_set(void) devmode.dmPelsWidth = param.user32_width; devmode.dmPelsHeight = param.user32_height; change_ret = ChangeDisplaySettingsW(&devmode, CDS_UPDATEREGISTRY | CDS_NORESET); - ok(change_ret == DISP_CHANGE_SUCCESSFUL, "ChangeDisplaySettingsW failed with %d.\n", change_ret); + ok(change_ret == DISP_CHANGE_SUCCESSFUL, "ChangeDisplaySettingsW failed with %ld.\n", change_ret);
ddraw = create_ddraw(); ok(!!ddraw, "Failed to create a ddraw object.\n"); ref = IDirectDraw4_Release(ddraw); - ok(ref == 0, "The ddraw object was not properly freed: refcount %u.\n", ref); + ok(ref == 0, "The ddraw object was not properly freed: refcount %lu.\n", ref);
memset(&devmode2, 0, sizeof(devmode2)); devmode2.dmSize = sizeof(devmode2); ret = EnumDisplaySettingsW(NULL, ENUM_CURRENT_SETTINGS, &devmode2); - ok(ret, "EnumDisplaySettingsW failed, error %#x.\n", GetLastError()); + ok(ret, "EnumDisplaySettingsW failed, error %#lx.\n", GetLastError()); ok(compare_mode_rect(&devmode2, ®istry_mode), "Got a different mode.\n"); ret = restore_display_modes(original_modes, display_count); ok(ret, "Failed to restore display modes.\n");
/* Test that no mode restorations if no mode changes happened with fullscreen ddraw objects */ change_ret = ChangeDisplaySettingsW(&devmode, CDS_UPDATEREGISTRY | CDS_NORESET); - ok(change_ret == DISP_CHANGE_SUCCESSFUL, "ChangeDisplaySettingsW failed with %d.\n", change_ret); + ok(change_ret == DISP_CHANGE_SUCCESSFUL, "ChangeDisplaySettingsW failed with %ld.\n", change_ret);
ddraw = create_ddraw(); ok(!!ddraw, "Failed to create a ddraw object.\n"); hr = IDirectDraw4_SetCooperativeLevel(ddraw, window, DDSCL_EXCLUSIVE | DDSCL_FULLSCREEN); - ok(hr == DD_OK, "SetCooperativeLevel failed, hr %#x.\n", hr); + ok(hr == DD_OK, "SetCooperativeLevel failed, hr %#lx.\n", hr); hr = IDirectDraw4_SetCooperativeLevel(ddraw, window, DDSCL_NORMAL); - ok(hr == DD_OK, "SetCooperativeLevel failed, hr %#x.\n", hr); + ok(hr == DD_OK, "SetCooperativeLevel failed, hr %#lx.\n", hr); ref = IDirectDraw4_Release(ddraw); - ok(ref == 0, "The ddraw object was not properly freed: refcount %u.\n", ref); + ok(ref == 0, "The ddraw object was not properly freed: refcount %lu.\n", ref);
ret = EnumDisplaySettingsW(NULL, ENUM_CURRENT_SETTINGS, &devmode2); - ok(ret, "EnumDisplaySettingsW failed, error %#x.\n", GetLastError()); + ok(ret, "EnumDisplaySettingsW failed, error %#lx.\n", GetLastError()); ok(compare_mode_rect(&devmode2, ®istry_mode), "Got a different mode.\n"); ret = restore_display_modes(original_modes, display_count); ok(ret, "Failed to restore display modes.\n"); @@ -4057,19 +4057,19 @@ static void test_coop_level_mode_set(void) ddraw = create_ddraw(); ok(!!ddraw, "Failed to create a ddraw object.\n"); hr = set_display_mode(ddraw, registry_mode.dmPelsWidth, registry_mode.dmPelsHeight); - ok(hr == DD_OK, "Failed to set display mode, hr %#x.\n", hr); + ok(hr == DD_OK, "Failed to set display mode, hr %#lx.\n", hr);
change_ret = ChangeDisplaySettingsW(&devmode, CDS_UPDATEREGISTRY | CDS_NORESET); - ok(change_ret == DISP_CHANGE_SUCCESSFUL, "ChangeDisplaySettingsW failed with %d.\n", change_ret); + ok(change_ret == DISP_CHANGE_SUCCESSFUL, "ChangeDisplaySettingsW failed with %ld.\n", change_ret);
ref = IDirectDraw4_Release(ddraw); - ok(ref == 0, "The ddraw object was not properly freed: refcount %u.\n", ref); + ok(ref == 0, "The ddraw object was not properly freed: refcount %lu.\n", ref);
ret = EnumDisplaySettingsW(NULL, ENUM_CURRENT_SETTINGS, &devmode2); - ok(ret, "EnumDisplaySettingsW failed, error %#x.\n", GetLastError()); + ok(ret, "EnumDisplaySettingsW failed, error %#lx.\n", GetLastError()); ok(compare_mode_rect(&devmode2, &devmode), "Got a different mode.\n"); ret = EnumDisplaySettingsW(NULL, ENUM_REGISTRY_SETTINGS, &devmode2); - ok(ret, "EnumDisplaySettingsW failed, error %#x.\n", GetLastError()); + ok(ret, "EnumDisplaySettingsW failed, error %#lx.\n", GetLastError()); ok(compare_mode_rect(&devmode2, &devmode), "Got a different mode.\n"); ret = restore_display_modes(original_modes, display_count); ok(ret, "Failed to restore display modes.\n"); @@ -4078,23 +4078,23 @@ static void test_coop_level_mode_set(void) ddraw = create_ddraw(); ok(!!ddraw, "Failed to create a ddraw object.\n"); hr = set_display_mode(ddraw, param.ddraw_width, param.ddraw_height); - ok(hr == DD_OK, "Failed to set display mode, hr %#x.\n", hr); + ok(hr == DD_OK, "Failed to set display mode, hr %#lx.\n", hr);
change_ret = ChangeDisplaySettingsW(&devmode, CDS_UPDATEREGISTRY | CDS_NORESET); - ok(change_ret == DISP_CHANGE_SUCCESSFUL, "ChangeDisplaySettingsW failed with %d.\n", change_ret); + ok(change_ret == DISP_CHANGE_SUCCESSFUL, "ChangeDisplaySettingsW failed with %ld.\n", change_ret);
hr = IDirectDraw4_RestoreDisplayMode(ddraw); - ok(hr == DD_OK, "RestoreDisplayMode failed, hr %#x.\n", hr); + ok(hr == DD_OK, "RestoreDisplayMode failed, hr %#lx.\n", hr);
ret = EnumDisplaySettingsW(NULL, ENUM_CURRENT_SETTINGS, &devmode2); - ok(ret, "EnumDisplaySettingsW failed, error %#x.\n", GetLastError()); + ok(ret, "EnumDisplaySettingsW failed, error %#lx.\n", GetLastError()); ok(compare_mode_rect(&devmode2, &devmode), "Got a different mode.\n"); ret = EnumDisplaySettingsW(NULL, ENUM_REGISTRY_SETTINGS, &devmode2); - ok(ret, "EnumDisplaySettingsW failed, error %#x.\n", GetLastError()); + ok(ret, "EnumDisplaySettingsW failed, error %#lx.\n", GetLastError()); ok(compare_mode_rect(&devmode2, &devmode), "Got a different mode.\n");
ref = IDirectDraw4_Release(ddraw); - ok(ref == 0, "The ddraw object was not properly freed: refcount %u.\n", ref); + ok(ref == 0, "The ddraw object was not properly freed: refcount %lu.\n", ref);
expect_messages = NULL; DestroyWindow(window); @@ -4122,10 +4122,10 @@ static void test_coop_level_mode_set_multi(void) memset(&devmode, 0, sizeof(devmode)); devmode.dmSize = sizeof(devmode); ret = EnumDisplaySettingsW(NULL, ENUM_CURRENT_SETTINGS, &devmode); - ok(ret, "EnumDisplaySettingsW failed, error %#x.\n", GetLastError()); + ok(ret, "EnumDisplaySettingsW failed, error %#lx.\n", GetLastError()); ok(compare_mode_rect(&devmode, ®istry_mode), "Got a different mode.\n"); ret = EnumDisplaySettingsW(NULL, ENUM_REGISTRY_SETTINGS, &devmode); - ok(ret, "EnumDisplaySettingsW failed, error %#x.\n", GetLastError()); + ok(ret, "EnumDisplaySettingsW failed, error %#lx.\n", GetLastError()); ok(compare_mode_rect(&devmode, ®istry_mode), "Got a different mode.\n");
ret = save_display_modes(&original_modes, &display_count); @@ -4139,14 +4139,14 @@ static void test_coop_level_mode_set_multi(void) /* With just a single ddraw object, the display mode is restored on * release. */ hr = set_display_mode(ddraw1, 800, 600); - ok(SUCCEEDED(hr), "Failed to set display mode, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set display mode, hr %#lx.\n", hr); w = GetSystemMetrics(SM_CXSCREEN); ok(w == 800, "Got unexpected screen width %u.\n", w); h = GetSystemMetrics(SM_CYSCREEN); ok(h == 600, "Got unexpected screen height %u.\n", h);
ref = IDirectDraw4_Release(ddraw1); - ok(ref == 0, "The ddraw object was not properly freed: refcount %u.\n", ref); + ok(ref == 0, "The ddraw object was not properly freed: refcount %lu.\n", ref); w = GetSystemMetrics(SM_CXSCREEN); ok(w == registry_mode.dmPelsWidth, "Got unexpected screen width %u.\n", w); h = GetSystemMetrics(SM_CYSCREEN); @@ -4156,7 +4156,7 @@ static void test_coop_level_mode_set_multi(void) * the initial mode, before the first SetDisplayMode() call. */ ddraw1 = create_ddraw(); hr = set_display_mode(ddraw1, 800, 600); - ok(SUCCEEDED(hr), "Failed to set display mode, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set display mode, hr %#lx.\n", hr); w = GetSystemMetrics(SM_CXSCREEN); ok(w == 800, "Got unexpected screen width %u.\n", w); h = GetSystemMetrics(SM_CYSCREEN); @@ -4164,21 +4164,21 @@ static void test_coop_level_mode_set_multi(void)
ddraw2 = create_ddraw(); hr = set_display_mode(ddraw2, 640, 480); - ok(SUCCEEDED(hr), "Failed to set display mode, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set display mode, hr %#lx.\n", hr); w = GetSystemMetrics(SM_CXSCREEN); ok(w == 640, "Got unexpected screen width %u.\n", w); h = GetSystemMetrics(SM_CYSCREEN); ok(h == 480, "Got unexpected screen height %u.\n", h);
ref = IDirectDraw4_Release(ddraw2); - ok(ref == 0, "The ddraw object was not properly freed: refcount %u.\n", ref); + ok(ref == 0, "The ddraw object was not properly freed: refcount %lu.\n", ref); w = GetSystemMetrics(SM_CXSCREEN); ok(w == registry_mode.dmPelsWidth, "Got unexpected screen width %u.\n", w); h = GetSystemMetrics(SM_CYSCREEN); ok(h == registry_mode.dmPelsHeight, "Got unexpected screen height %u.\n", h);
ref = IDirectDraw4_Release(ddraw1); - ok(ref == 0, "The ddraw object was not properly freed: refcount %u.\n", ref); + ok(ref == 0, "The ddraw object was not properly freed: refcount %lu.\n", ref); w = GetSystemMetrics(SM_CXSCREEN); ok(w == registry_mode.dmPelsWidth, "Got unexpected screen width %u.\n", w); h = GetSystemMetrics(SM_CYSCREEN); @@ -4187,7 +4187,7 @@ static void test_coop_level_mode_set_multi(void) /* Regardless of release ordering. */ ddraw1 = create_ddraw(); hr = set_display_mode(ddraw1, 800, 600); - ok(SUCCEEDED(hr), "Failed to set display mode, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set display mode, hr %#lx.\n", hr); w = GetSystemMetrics(SM_CXSCREEN); ok(w == 800, "Got unexpected screen width %u.\n", w); h = GetSystemMetrics(SM_CYSCREEN); @@ -4195,21 +4195,21 @@ static void test_coop_level_mode_set_multi(void)
ddraw2 = create_ddraw(); hr = set_display_mode(ddraw2, 640, 480); - ok(SUCCEEDED(hr), "Failed to set display mode, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set display mode, hr %#lx.\n", hr); w = GetSystemMetrics(SM_CXSCREEN); ok(w == 640, "Got unexpected screen width %u.\n", w); h = GetSystemMetrics(SM_CYSCREEN); ok(h == 480, "Got unexpected screen height %u.\n", h);
ref = IDirectDraw4_Release(ddraw1); - ok(ref == 0, "The ddraw object was not properly freed: refcount %u.\n", ref); + ok(ref == 0, "The ddraw object was not properly freed: refcount %lu.\n", ref); w = GetSystemMetrics(SM_CXSCREEN); ok(w == registry_mode.dmPelsWidth, "Got unexpected screen width %u.\n", w); h = GetSystemMetrics(SM_CYSCREEN); ok(h == registry_mode.dmPelsHeight, "Got unexpected screen height %u.\n", h);
ref = IDirectDraw4_Release(ddraw2); - ok(ref == 0, "The ddraw object was not properly freed: refcount %u.\n", ref); + ok(ref == 0, "The ddraw object was not properly freed: refcount %lu.\n", ref); w = GetSystemMetrics(SM_CXSCREEN); ok(w == registry_mode.dmPelsWidth, "Got unexpected screen width %u.\n", w); h = GetSystemMetrics(SM_CYSCREEN); @@ -4219,21 +4219,21 @@ static void test_coop_level_mode_set_multi(void) ddraw1 = create_ddraw(); ddraw2 = create_ddraw(); hr = set_display_mode(ddraw2, 640, 480); - ok(SUCCEEDED(hr), "Failed to set display mode, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set display mode, hr %#lx.\n", hr); w = GetSystemMetrics(SM_CXSCREEN); ok(w == 640, "Got unexpected screen width %u.\n", w); h = GetSystemMetrics(SM_CYSCREEN); ok(h == 480, "Got unexpected screen height %u.\n", h);
ref = IDirectDraw4_Release(ddraw1); - ok(ref == 0, "The ddraw object was not properly freed: refcount %u.\n", ref); + ok(ref == 0, "The ddraw object was not properly freed: refcount %lu.\n", ref); w = GetSystemMetrics(SM_CXSCREEN); ok(w == 640, "Got unexpected screen width %u.\n", w); h = GetSystemMetrics(SM_CYSCREEN); ok(h == 480, "Got unexpected screen height %u.\n", h);
ref = IDirectDraw4_Release(ddraw2); - ok(ref == 0, "The ddraw object was not properly freed: refcount %u.\n", ref); + ok(ref == 0, "The ddraw object was not properly freed: refcount %lu.\n", ref); w = GetSystemMetrics(SM_CXSCREEN); ok(w == registry_mode.dmPelsWidth, "Got unexpected screen width %u.\n", w); h = GetSystemMetrics(SM_CYSCREEN); @@ -4243,7 +4243,7 @@ static void test_coop_level_mode_set_multi(void) * restoring the display mode. */ ddraw1 = create_ddraw(); hr = set_display_mode(ddraw1, 800, 600); - ok(SUCCEEDED(hr), "Failed to set display mode, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set display mode, hr %#lx.\n", hr); w = GetSystemMetrics(SM_CXSCREEN); ok(w == 800, "Got unexpected screen width %u.\n", w); h = GetSystemMetrics(SM_CYSCREEN); @@ -4251,24 +4251,24 @@ static void test_coop_level_mode_set_multi(void)
ddraw2 = create_ddraw(); hr = set_display_mode(ddraw2, 640, 480); - ok(SUCCEEDED(hr), "Failed to set display mode, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set display mode, hr %#lx.\n", hr); w = GetSystemMetrics(SM_CXSCREEN); ok(w == 640, "Got unexpected screen width %u.\n", w); h = GetSystemMetrics(SM_CYSCREEN); ok(h == 480, "Got unexpected screen height %u.\n", h);
hr = IDirectDraw4_SetCooperativeLevel(ddraw2, window, DDSCL_EXCLUSIVE | DDSCL_FULLSCREEN); - ok(SUCCEEDED(hr), "SetCooperativeLevel failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "SetCooperativeLevel failed, hr %#lx.\n", hr);
ref = IDirectDraw4_Release(ddraw1); - ok(ref == 0, "The ddraw object was not properly freed: refcount %u.\n", ref); + ok(ref == 0, "The ddraw object was not properly freed: refcount %lu.\n", ref); w = GetSystemMetrics(SM_CXSCREEN); ok(w == 640, "Got unexpected screen width %u.\n", w); h = GetSystemMetrics(SM_CYSCREEN); ok(h == 480, "Got unexpected screen height %u.\n", h);
ref = IDirectDraw4_Release(ddraw2); - ok(ref == 0, "The ddraw object was not properly freed: refcount %u.\n", ref); + ok(ref == 0, "The ddraw object was not properly freed: refcount %lu.\n", ref); w = GetSystemMetrics(SM_CXSCREEN); ok(w == registry_mode.dmPelsWidth, "Got unexpected screen width %u.\n", w); h = GetSystemMetrics(SM_CYSCREEN); @@ -4277,28 +4277,28 @@ static void test_coop_level_mode_set_multi(void) /* Exclusive mode blocks mode setting on other ddraw objects in general. */ ddraw1 = create_ddraw(); hr = set_display_mode(ddraw1, 800, 600); - ok(SUCCEEDED(hr), "Failed to set display mode, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set display mode, hr %#lx.\n", hr); w = GetSystemMetrics(SM_CXSCREEN); ok(w == 800, "Got unexpected screen width %u.\n", w); h = GetSystemMetrics(SM_CYSCREEN); ok(h == 600, "Got unexpected screen height %u.\n", h);
hr = IDirectDraw4_SetCooperativeLevel(ddraw1, window, DDSCL_EXCLUSIVE | DDSCL_FULLSCREEN); - ok(SUCCEEDED(hr), "SetCooperativeLevel failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "SetCooperativeLevel failed, hr %#lx.\n", hr);
ddraw2 = create_ddraw(); hr = set_display_mode(ddraw2, 640, 480); - ok(hr == DDERR_NOEXCLUSIVEMODE, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_NOEXCLUSIVEMODE, "Got unexpected hr %#lx.\n", hr);
ref = IDirectDraw4_Release(ddraw1); - ok(ref == 0, "The ddraw object was not properly freed: refcount %u.\n", ref); + ok(ref == 0, "The ddraw object was not properly freed: refcount %lu.\n", ref); w = GetSystemMetrics(SM_CXSCREEN); ok(w == registry_mode.dmPelsWidth, "Got unexpected screen width %u.\n", w); h = GetSystemMetrics(SM_CYSCREEN); ok(h == registry_mode.dmPelsHeight, "Got unexpected screen height %u.\n", h);
ref = IDirectDraw4_Release(ddraw2); - ok(ref == 0, "The ddraw object was not properly freed: refcount %u.\n", ref); + ok(ref == 0, "The ddraw object was not properly freed: refcount %lu.\n", ref); w = GetSystemMetrics(SM_CXSCREEN); ok(w == registry_mode.dmPelsWidth, "Got unexpected screen width %u.\n", w); h = GetSystemMetrics(SM_CYSCREEN); @@ -4326,7 +4326,7 @@ static void test_coop_level_mode_set_multi(void) memset(&old_devmode, 0, sizeof(old_devmode)); old_devmode.dmSize = sizeof(old_devmode); ret = EnumDisplaySettingsW(second_monitor_name, ENUM_CURRENT_SETTINGS, &old_devmode); - ok(ret, "EnumDisplaySettingsW failed, error %#x.\n", GetLastError()); + ok(ret, "EnumDisplaySettingsW failed, error %#lx.\n", GetLastError());
devmode = old_devmode; while (EnumDisplaySettingsW(second_monitor_name, mode_idx++, &devmode)) @@ -4343,32 +4343,32 @@ static void test_coop_level_mode_set_multi(void) ddraw1 = create_ddraw(); ok(!!ddraw1, "Failed to create a ddraw object.\n"); hr = IDirectDraw4_SetCooperativeLevel(ddraw1, window, DDSCL_EXCLUSIVE | DDSCL_FULLSCREEN); - ok(hr == DD_OK, "SetCooperativeLevel failed, hr %#x.\n", hr); + ok(hr == DD_OK, "SetCooperativeLevel failed, hr %#lx.\n", hr);
change_ret = ChangeDisplaySettingsExW(second_monitor_name, &devmode, NULL, CDS_RESET, NULL); - ok(change_ret == DISP_CHANGE_SUCCESSFUL, "ChangeDisplaySettingsExW failed with %d.\n", change_ret); + ok(change_ret == DISP_CHANGE_SUCCESSFUL, "ChangeDisplaySettingsExW failed with %ld.\n", change_ret);
memset(&devmode2, 0, sizeof(devmode2)); devmode2.dmSize = sizeof(devmode2); ret = EnumDisplaySettingsW(second_monitor_name, ENUM_CURRENT_SETTINGS, &devmode2); - ok(ret, "EnumDisplaySettingsW failed, error %#x.\n", GetLastError()); + ok(ret, "EnumDisplaySettingsW failed, error %#lx.\n", GetLastError()); if (compare_mode_rect(&devmode2, &old_devmode)) { skip("Failed to change display settings of the second monitor.\n"); ref = IDirectDraw4_Release(ddraw1); - ok(ref == 0, "The ddraw object was not properly freed: refcount %u.\n", ref); + ok(ref == 0, "The ddraw object was not properly freed: refcount %lu.\n", ref); goto done; }
hr = IDirectDraw4_SetCooperativeLevel(ddraw1, window, DDSCL_NORMAL); - ok(hr == DD_OK, "SetCooperativeLevel failed, hr %#x.\n", hr); + ok(hr == DD_OK, "SetCooperativeLevel failed, hr %#lx.\n", hr); ref = IDirectDraw4_Release(ddraw1); - ok(ref == 0, "The ddraw object was not properly freed: refcount %u.\n", ref); + ok(ref == 0, "The ddraw object was not properly freed: refcount %lu.\n", ref);
memset(&devmode3, 0, sizeof(devmode3)); devmode3.dmSize = sizeof(devmode3); ret = EnumDisplaySettingsW(second_monitor_name, ENUM_CURRENT_SETTINGS, &devmode3); - ok(ret, "EnumDisplaySettingsW failed, error %#x.\n", GetLastError()); + ok(ret, "EnumDisplaySettingsW failed, error %#lx.\n", GetLastError()); ok(compare_mode_rect(&devmode3, &devmode2), "Got a different mode.\n"); ret = restore_display_modes(original_modes, display_count); ok(ret, "Failed to restore display modes.\n"); @@ -4378,19 +4378,19 @@ static void test_coop_level_mode_set_multi(void) ddraw1 = create_ddraw(); ok(!!ddraw1, "Failed to create a ddraw object.\n"); hr = set_display_mode(ddraw1, 800, 600); - ok(hr == DD_OK, "Failed to set display mode, hr %#x.\n", hr); + ok(hr == DD_OK, "Failed to set display mode, hr %#lx.\n", hr);
change_ret = ChangeDisplaySettingsExW(second_monitor_name, &devmode, NULL, CDS_RESET, NULL); - ok(change_ret == DISP_CHANGE_SUCCESSFUL, "ChangeDisplaySettingsExW failed with %d.\n", change_ret); + ok(change_ret == DISP_CHANGE_SUCCESSFUL, "ChangeDisplaySettingsExW failed with %ld.\n", change_ret);
ref = IDirectDraw4_Release(ddraw1); - ok(ref == 0, "The ddraw object was not properly freed: refcount %u.\n", ref); + ok(ref == 0, "The ddraw object was not properly freed: refcount %lu.\n", ref);
ret = EnumDisplaySettingsW(second_monitor_name, ENUM_CURRENT_SETTINGS, &devmode2); - ok(ret, "EnumDisplaySettingsW failed, error %#x.\n", GetLastError()); + ok(ret, "EnumDisplaySettingsW failed, error %#lx.\n", GetLastError()); ok(compare_mode_rect(&devmode2, &old_devmode), "Got a different mode.\n"); ret = EnumDisplaySettingsW(second_monitor_name, ENUM_REGISTRY_SETTINGS, &devmode2); - ok(ret, "EnumDisplaySettingsW failed, error %#x.\n", GetLastError()); + ok(ret, "EnumDisplaySettingsW failed, error %#lx.\n", GetLastError()); ok(compare_mode_rect(&devmode2, &old_devmode), "Got a different mode.\n"); ret = restore_display_modes(original_modes, display_count); ok(ret, "Failed to restore display modes.\n"); @@ -4399,23 +4399,23 @@ static void test_coop_level_mode_set_multi(void) ddraw1 = create_ddraw(); ok(!!ddraw1, "Failed to create a ddraw object.\n"); hr = set_display_mode(ddraw1, 800, 600); - ok(hr == DD_OK, "Failed to set display mode, hr %#x.\n", hr); + ok(hr == DD_OK, "Failed to set display mode, hr %#lx.\n", hr);
change_ret = ChangeDisplaySettingsExW(second_monitor_name, &devmode, NULL, CDS_RESET, NULL); - ok(change_ret == DISP_CHANGE_SUCCESSFUL, "ChangeDisplaySettingsExW failed with %d.\n", change_ret); + ok(change_ret == DISP_CHANGE_SUCCESSFUL, "ChangeDisplaySettingsExW failed with %ld.\n", change_ret);
hr = IDirectDraw4_RestoreDisplayMode(ddraw1); - ok(hr == DD_OK, "RestoreDisplayMode failed, hr %#x.\n", hr); + ok(hr == DD_OK, "RestoreDisplayMode failed, hr %#lx.\n", hr);
ret = EnumDisplaySettingsW(second_monitor_name, ENUM_CURRENT_SETTINGS, &devmode2); - ok(ret, "EnumDisplaySettingsW failed, error %#x.\n", GetLastError()); + ok(ret, "EnumDisplaySettingsW failed, error %#lx.\n", GetLastError()); ok(compare_mode_rect(&devmode2, &old_devmode), "Got a different mode.\n"); ret = EnumDisplaySettingsW(second_monitor_name, ENUM_REGISTRY_SETTINGS, &devmode2); - ok(ret, "EnumDisplaySettingsW failed, error %#x.\n", GetLastError()); + ok(ret, "EnumDisplaySettingsW failed, error %#lx.\n", GetLastError()); ok(compare_mode_rect(&devmode2, &old_devmode), "Got a different mode.\n");
ref = IDirectDraw4_Release(ddraw1); - ok(ref == 0, "The ddraw object was not properly freed: refcount %u.\n", ref); + ok(ref == 0, "The ddraw object was not properly freed: refcount %lu.\n", ref); ret = restore_display_modes(original_modes, display_count); ok(ret, "Failed to restore display modes.\n");
@@ -4423,24 +4423,24 @@ static void test_coop_level_mode_set_multi(void) ddraw1 = create_ddraw(); ok(!!ddraw1, "Failed to create a ddraw object.\n"); hr = set_display_mode(ddraw1, 800, 600); - ok(hr == DD_OK, "Failed to set display mode, hr %#x.\n", hr); + ok(hr == DD_OK, "Failed to set display mode, hr %#lx.\n", hr);
change_ret = ChangeDisplaySettingsExW(second_monitor_name, &devmode, NULL, CDS_UPDATEREGISTRY | CDS_NORESET, NULL); - ok(change_ret == DISP_CHANGE_SUCCESSFUL, "ChangeDisplaySettingsExW failed with %d.\n", change_ret); + ok(change_ret == DISP_CHANGE_SUCCESSFUL, "ChangeDisplaySettingsExW failed with %ld.\n", change_ret);
ref = IDirectDraw4_Release(ddraw1); - ok(ref == 0, "The ddraw object was not properly freed: refcount %u.\n", ref); + ok(ref == 0, "The ddraw object was not properly freed: refcount %lu.\n", ref);
ret = EnumDisplaySettingsW(second_monitor_name, ENUM_CURRENT_SETTINGS, &devmode2); - ok(ret, "EnumDisplaySettingsW failed, error %#x.\n", GetLastError()); + ok(ret, "EnumDisplaySettingsW failed, error %#lx.\n", GetLastError()); ok(devmode2.dmPelsWidth == devmode.dmPelsWidth && devmode2.dmPelsHeight == devmode.dmPelsHeight, - "Expected resolution %ux%u, got %ux%u.\n", devmode.dmPelsWidth, devmode.dmPelsHeight, + "Expected resolution %lux%lu, got %lux%lu.\n", devmode.dmPelsWidth, devmode.dmPelsHeight, devmode2.dmPelsWidth, devmode2.dmPelsHeight); ret = EnumDisplaySettingsW(second_monitor_name, ENUM_REGISTRY_SETTINGS, &devmode2); - ok(ret, "EnumDisplaySettingsW failed, error %#x.\n", GetLastError()); + ok(ret, "EnumDisplaySettingsW failed, error %#lx.\n", GetLastError()); ok(devmode2.dmPelsWidth == devmode.dmPelsWidth && devmode2.dmPelsHeight == devmode.dmPelsHeight, - "Expected resolution %ux%u, got %ux%u.\n", devmode.dmPelsWidth, devmode.dmPelsHeight, + "Expected resolution %lux%lu, got %lux%lu.\n", devmode.dmPelsWidth, devmode.dmPelsHeight, devmode2.dmPelsWidth, devmode2.dmPelsHeight); ret = restore_display_modes(original_modes, display_count); ok(ret, "Failed to restore display modes.\n"); @@ -4452,27 +4452,27 @@ static void test_coop_level_mode_set_multi(void) ddraw2 = create_ddraw(); ok(!!ddraw2, "Failed to create a ddraw object.\n"); hr = set_display_mode(ddraw1, 800, 600); - ok(hr == DD_OK, "Failed to set display mode, hr %#x.\n", hr); + ok(hr == DD_OK, "Failed to set display mode, hr %#lx.\n", hr); hr = set_display_mode(ddraw2, 640, 480); - ok(hr == DD_OK, "Failed to set display mode, hr %#x.\n", hr); + ok(hr == DD_OK, "Failed to set display mode, hr %#lx.\n", hr);
change_ret = ChangeDisplaySettingsExW(second_monitor_name, &devmode, NULL, CDS_RESET, NULL); - ok(change_ret == DISP_CHANGE_SUCCESSFUL, "ChangeDisplaySettingsExW failed with %d.\n", change_ret); + ok(change_ret == DISP_CHANGE_SUCCESSFUL, "ChangeDisplaySettingsExW failed with %ld.\n", change_ret);
hr = IDirectDraw4_RestoreDisplayMode(ddraw2); - ok(hr == DD_OK, "RestoreDisplayMode failed, hr %#x.\n", hr); + ok(hr == DD_OK, "RestoreDisplayMode failed, hr %#lx.\n", hr);
ret = EnumDisplaySettingsW(second_monitor_name, ENUM_CURRENT_SETTINGS, &devmode2); - ok(ret, "EnumDisplaySettingsW failed, error %#x.\n", GetLastError()); + ok(ret, "EnumDisplaySettingsW failed, error %#lx.\n", GetLastError()); ok(compare_mode_rect(&devmode2, &old_devmode), "Got a different mode.\n"); ret = EnumDisplaySettingsW(second_monitor_name, ENUM_REGISTRY_SETTINGS, &devmode2); - ok(ret, "EnumDisplaySettingsW failed, error %#x.\n", GetLastError()); + ok(ret, "EnumDisplaySettingsW failed, error %#lx.\n", GetLastError()); ok(compare_mode_rect(&devmode2, &old_devmode), "Got a different mode.\n");
ref = IDirectDraw4_Release(ddraw2); - ok(ref == 0, "The ddraw object was not properly freed: refcount %u.\n", ref); + ok(ref == 0, "The ddraw object was not properly freed: refcount %lu.\n", ref); ref = IDirectDraw4_Release(ddraw1); - ok(ref == 0, "The ddraw object was not properly freed: refcount %u.\n", ref); + ok(ref == 0, "The ddraw object was not properly freed: refcount %lu.\n", ref); ret = restore_display_modes(original_modes, display_count); ok(ret, "Failed to restore display modes.\n");
@@ -4483,25 +4483,25 @@ static void test_coop_level_mode_set_multi(void) ddraw2 = create_ddraw(); ok(!!ddraw2, "Failed to create a ddraw object.\n"); hr = set_display_mode(ddraw1, 800, 600); - ok(hr == DD_OK, "Failed to set display mode, hr %#x.\n", hr); + ok(hr == DD_OK, "Failed to set display mode, hr %#lx.\n", hr); hr = set_display_mode(ddraw2, 640, 480); - ok(hr == DD_OK, "Failed to set display mode, hr %#x.\n", hr); + ok(hr == DD_OK, "Failed to set display mode, hr %#lx.\n", hr);
change_ret = ChangeDisplaySettingsExW(second_monitor_name, &devmode, NULL, CDS_RESET, NULL); - ok(change_ret == DISP_CHANGE_SUCCESSFUL, "ChangeDisplaySettingsExW failed with %d.\n", change_ret); + ok(change_ret == DISP_CHANGE_SUCCESSFUL, "ChangeDisplaySettingsExW failed with %ld.\n", change_ret);
ref = IDirectDraw4_Release(ddraw2); - ok(ref == 0, "The ddraw object was not properly freed: refcount %u.\n", ref); + ok(ref == 0, "The ddraw object was not properly freed: refcount %lu.\n", ref);
ret = EnumDisplaySettingsW(second_monitor_name, ENUM_CURRENT_SETTINGS, &devmode2); - ok(ret, "EnumDisplaySettingsW failed, error %#x.\n", GetLastError()); + ok(ret, "EnumDisplaySettingsW failed, error %#lx.\n", GetLastError()); ok(compare_mode_rect(&devmode2, &old_devmode), "Got a different mode.\n"); ret = EnumDisplaySettingsW(second_monitor_name, ENUM_REGISTRY_SETTINGS, &devmode2); - ok(ret, "EnumDisplaySettingsW failed, error %#x.\n", GetLastError()); + ok(ret, "EnumDisplaySettingsW failed, error %#lx.\n", GetLastError()); ok(compare_mode_rect(&devmode2, &old_devmode), "Got a different mode.\n");
ref = IDirectDraw4_Release(ddraw1); - ok(ref == 0, "The ddraw object was not properly freed: refcount %u.\n", ref); + ok(ref == 0, "The ddraw object was not properly freed: refcount %lu.\n", ref);
done: DestroyWindow(window); @@ -4519,16 +4519,16 @@ static void test_initialize(void) ok(!!ddraw, "Failed to create a ddraw object.\n");
hr = IDirectDraw4_Initialize(ddraw, NULL); - ok(hr == DDERR_ALREADYINITIALIZED, "Initialize returned hr %#x.\n", hr); + ok(hr == DDERR_ALREADYINITIALIZED, "Initialize returned hr %#lx.\n", hr); IDirectDraw4_Release(ddraw);
CoInitialize(NULL); hr = CoCreateInstance(&CLSID_DirectDraw, NULL, CLSCTX_INPROC_SERVER, &IID_IDirectDraw4, (void **)&ddraw); - ok(SUCCEEDED(hr), "Failed to create IDirectDraw4 instance, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create IDirectDraw4 instance, hr %#lx.\n", hr); hr = IDirectDraw4_Initialize(ddraw, NULL); - ok(hr == DD_OK, "Initialize returned hr %#x, expected DD_OK.\n", hr); + ok(hr == DD_OK, "Initialize returned hr %#lx, expected DD_OK.\n", hr); hr = IDirectDraw4_Initialize(ddraw, NULL); - ok(hr == DDERR_ALREADYINITIALIZED, "Initialize returned hr %#x, expected DDERR_ALREADYINITIALIZED.\n", hr); + ok(hr == DDERR_ALREADYINITIALIZED, "Initialize returned hr %#lx, expected DDERR_ALREADYINITIALIZED.\n", hr); IDirectDraw4_Release(ddraw); CoUninitialize(); } @@ -4549,20 +4549,20 @@ static void test_coop_level_surf_create(void) ddsd.ddsCaps.dwCaps = DDSCAPS_PRIMARYSURFACE; surface = (void *)0xdeadbeef; hr = IDirectDraw4_CreateSurface(ddraw, &ddsd, &surface, NULL); - ok(hr == DDERR_NOCOOPERATIVELEVELSET, "Surface creation returned hr %#x.\n", hr); + ok(hr == DDERR_NOCOOPERATIVELEVELSET, "Surface creation returned hr %#lx.\n", hr); ok(surface == (void *)0xdeadbeef, "Got unexpected surface %p.\n", surface);
surface = (void *)0xdeadbeef; hr = IDirectDraw4_CreateSurface(ddraw, NULL, &surface, NULL); - ok(hr == DDERR_NOCOOPERATIVELEVELSET, "Surface creation returned hr %#x.\n", hr); + ok(hr == DDERR_NOCOOPERATIVELEVELSET, "Surface creation returned hr %#lx.\n", hr); ok(surface == (void *)0xdeadbeef, "Got unexpected surface %p.\n", surface);
hr = IDirectDraw4_SetCooperativeLevel(ddraw, NULL, DDSCL_NORMAL); - ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#lx.\n", hr);
surface = (void *)0xdeadbeef; hr = IDirectDraw4_CreateSurface(ddraw, NULL, &surface, NULL); - ok(hr == DDERR_INVALIDPARAMS, "Unexpected hr %#x.\n", hr); + ok(hr == DDERR_INVALIDPARAMS, "Unexpected hr %#lx.\n", hr); ok(surface == (void *)0xdeadbeef, "Got unexpected surface %p.\n", surface);
IDirectDraw4_Release(ddraw); @@ -4597,7 +4597,7 @@ static void test_vb_discard(void) }
hr = IDirect3DDevice3_GetDirect3D(device, &d3d); - ok(SUCCEEDED(hr), "Failed to get d3d interface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get d3d interface, hr %#lx.\n", hr);
memset(&desc, 0, sizeof(desc)); desc.dwSize = sizeof(desc); @@ -4605,29 +4605,29 @@ static void test_vb_discard(void) desc.dwFVF = D3DFVF_XYZRHW; desc.dwNumVertices = vbsize; hr = IDirect3D3_CreateVertexBuffer(d3d, &desc, &buffer, 0, NULL); - ok(SUCCEEDED(hr), "Failed to create vertex buffer, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create vertex buffer, hr %#lx.\n", hr);
hr = IDirect3DVertexBuffer_Lock(buffer, DDLOCK_DISCARDCONTENTS, (void **)&data, NULL); - ok(SUCCEEDED(hr), "Failed to lock vertex buffer, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to lock vertex buffer, hr %#lx.\n", hr); memcpy(data, quad, sizeof(quad)); hr = IDirect3DVertexBuffer_Unlock(buffer); - ok(SUCCEEDED(hr), "Failed to unlock vertex buffer, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to unlock vertex buffer, hr %#lx.\n", hr);
hr = IDirect3DDevice3_BeginScene(device); - ok(SUCCEEDED(hr), "Failed to begin scene, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to begin scene, hr %#lx.\n", hr); hr = IDirect3DDevice3_DrawPrimitiveVB(device, D3DPT_TRIANGLESTRIP, buffer, 0, 4, 0); - ok(SUCCEEDED(hr), "Failed to draw, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to draw, hr %#lx.\n", hr); hr = IDirect3DDevice3_EndScene(device); - ok(SUCCEEDED(hr), "Failed to end scene, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to end scene, hr %#lx.\n", hr);
hr = IDirect3DVertexBuffer_Lock(buffer, DDLOCK_DISCARDCONTENTS, (void **)&data, NULL); - ok(SUCCEEDED(hr), "Failed to lock vertex buffer, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to lock vertex buffer, hr %#lx.\n", hr); memset(data, 0xaa, sizeof(struct vec4) * vbsize); hr = IDirect3DVertexBuffer_Unlock(buffer); - ok(SUCCEEDED(hr), "Failed to unlock vertex buffer, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to unlock vertex buffer, hr %#lx.\n", hr);
hr = IDirect3DVertexBuffer_Lock(buffer, DDLOCK_DISCARDCONTENTS, (void **)&data, NULL); - ok(SUCCEEDED(hr), "Failed to lock vertex buffer, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to lock vertex buffer, hr %#lx.\n", hr); for (i = 0; i < sizeof(struct vec4) * vbsize; i++) { if (data[i] != 0xaa) @@ -4637,7 +4637,7 @@ static void test_vb_discard(void) } } hr = IDirect3DVertexBuffer_Unlock(buffer); - ok(SUCCEEDED(hr), "Failed to unlock vertex buffer, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to unlock vertex buffer, hr %#lx.\n", hr);
IDirect3DVertexBuffer_Release(buffer); IDirect3D3_Release(d3d); @@ -4657,9 +4657,9 @@ static void test_coop_level_multi_window(void) ok(!!ddraw, "Failed to create a ddraw object.\n");
hr = IDirectDraw4_SetCooperativeLevel(ddraw, window1, DDSCL_NORMAL); - ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#lx.\n", hr); hr = IDirectDraw4_SetCooperativeLevel(ddraw, window2, DDSCL_NORMAL); - ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#lx.\n", hr); ok(IsWindow(window1), "Window 1 was destroyed.\n"); ok(IsWindow(window2), "Window 2 was destroyed.\n");
@@ -4704,15 +4704,15 @@ static void test_draw_strided(void) }
hr = IDirect3DDevice3_GetRenderTarget(device, &rt); - ok(SUCCEEDED(hr), "Failed to get render target, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get render target, hr %#lx.\n", hr); viewport = create_viewport(device, 0, 0, 640, 480); hr = IDirect3DDevice3_SetCurrentViewport(device, viewport); - ok(SUCCEEDED(hr), "Failed to activate the viewport, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to activate the viewport, hr %#lx.\n", hr); hr = IDirect3DViewport3_Clear2(viewport, 1, &clear_rect, D3DCLEAR_TARGET, 0x00000000, 0.0f, 0); - ok(SUCCEEDED(hr), "Failed to clear the viewport, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to clear the viewport, hr %#lx.\n", hr);
hr = IDirect3DDevice3_BeginScene(device); - ok(SUCCEEDED(hr), "Failed to begin scene, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to begin scene, hr %#lx.\n", hr);
memset(&strided, 0x55, sizeof(strided)); strided.position.lpvData = position; @@ -4721,13 +4721,13 @@ static void test_draw_strided(void) strided.diffuse.dwStride = sizeof(*diffuse); hr = IDirect3DDevice3_DrawIndexedPrimitiveStrided(device, D3DPT_TRIANGLELIST, D3DFVF_XYZ | D3DFVF_DIFFUSE, &strided, 4, indices, 6, 0); - ok(SUCCEEDED(hr), "Failed to draw, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to draw, hr %#lx.\n", hr);
hr = IDirect3DDevice3_EndScene(device); - ok(SUCCEEDED(hr), "Failed to end scene, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to end scene, hr %#lx.\n", hr);
color = get_surface_color(rt, 320, 240); - ok(compare_color(color, 0x0000ff00, 1), "Got unexpected color 0x%08x.\n", color); + ok(compare_color(color, 0x0000ff00, 1), "Got unexpected color 0x%08lx.\n", color);
IDirect3DViewport3_Release(viewport); IDirectDrawSurface4_Release(rt); @@ -4877,153 +4877,153 @@ static void test_lighting(void) }
hr = IDirect3DDevice3_GetDirect3D(device, &d3d); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
hr = IDirect3DDevice3_GetRenderTarget(device, &rt); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
viewport = create_viewport(device, 0, 0, 640, 480); hr = IDirect3DDevice3_SetCurrentViewport(device, viewport); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
hr = IDirect3DViewport3_Clear2(viewport, 1, &clear_rect, D3DCLEAR_TARGET, 0xffffffff, 0.0f, 0); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
hr = IDirect3DDevice3_SetTransform(device, D3DTRANSFORMSTATE_WORLD, &mat); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirect3DDevice3_SetTransform(device, D3DTRANSFORMSTATE_VIEW, &mat); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirect3DDevice3_SetTransform(device, D3DTRANSFORMSTATE_PROJECTION, &mat); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirect3DDevice3_SetRenderState(device, D3DRENDERSTATE_ZENABLE, FALSE); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirect3DDevice3_SetRenderState(device, D3DRENDERSTATE_FOGENABLE, FALSE); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirect3DDevice3_SetRenderState(device, D3DRENDERSTATE_STENCILENABLE, FALSE); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirect3DDevice3_SetRenderState(device, D3DRENDERSTATE_CULLMODE, D3DCULL_NONE); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
hr = IDirect3DDevice3_BeginScene(device); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
memset(&vb_desc, 0, sizeof(vb_desc)); vb_desc.dwSize = sizeof(vb_desc); vb_desc.dwFVF = fvf; vb_desc.dwNumVertices = 2; hr = IDirect3D3_CreateVertexBuffer(d3d, &vb_desc, &src_vb1, 0, NULL); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); vb_desc.dwSize = sizeof(vb_desc); vb_desc.dwFVF = nfvf; vb_desc.dwNumVertices = 2; hr = IDirect3D3_CreateVertexBuffer(d3d, &vb_desc, &src_vb2, 0, NULL); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
memset(&vb_desc, 0, sizeof(vb_desc)); vb_desc.dwSize = sizeof(vb_desc); vb_desc.dwFVF = D3DFVF_XYZRHW | D3DFVF_DIFFUSE | D3DFVF_SPECULAR; vb_desc.dwNumVertices = 4; hr = IDirect3D3_CreateVertexBuffer(d3d, &vb_desc, &dst_vb, 0, NULL); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
hr = IDirect3DVertexBuffer_Lock(src_vb1, 0, (void **)&src_data1, NULL); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); memcpy(src_data1, unlitquad, sizeof(*src_data1)); memcpy(&src_data1[1], litquad, sizeof(*src_data1)); hr = IDirect3DVertexBuffer_Unlock(src_vb1); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
hr = IDirect3DVertexBuffer_Lock(src_vb2, 0, (void **)&src_data2, NULL); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); memcpy(src_data2, unlitnquad, sizeof(*src_data2)); memcpy(&src_data2[1], litnquad, sizeof(*src_data2)); hr = IDirect3DVertexBuffer_Unlock(src_vb2); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
/* There is no D3DRENDERSTATE_LIGHTING on ddraw < 7. */ hr = IDirect3DDevice3_SetRenderState(device, D3DRENDERSTATE_LIGHTING, FALSE); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirect3DVertexBuffer_ProcessVertices(dst_vb, D3DVOP_TRANSFORM, 0, 1, src_vb1, 0, device, 0); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirect3DDevice3_DrawIndexedPrimitive(device, D3DPT_TRIANGLELIST, fvf, unlitquad, 4, indices, 6, 0); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
hr = IDirect3DDevice3_SetRenderState(device, D3DRENDERSTATE_LIGHTING, TRUE); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirect3DVertexBuffer_ProcessVertices(dst_vb, D3DVOP_TRANSFORM | D3DVOP_LIGHT, 1, 1, src_vb1, 1, device, 0); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirect3DDevice3_DrawIndexedPrimitive(device, D3DPT_TRIANGLELIST, fvf, litquad, 4, indices, 6, 0); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
hr = IDirect3DDevice3_SetRenderState(device, D3DRENDERSTATE_LIGHTING, FALSE); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirect3DVertexBuffer_ProcessVertices(dst_vb, D3DVOP_TRANSFORM, 2, 1, src_vb2, 0, device, 0); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirect3DDevice3_DrawIndexedPrimitive(device, D3DPT_TRIANGLELIST, nfvf, unlitnquad, 4, indices, 6, 0); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
hr = IDirect3DDevice3_SetRenderState(device, D3DRENDERSTATE_LIGHTING, TRUE); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirect3DVertexBuffer_ProcessVertices(dst_vb, D3DVOP_TRANSFORM | D3DVOP_LIGHT, 3, 1, src_vb2, 1, device, 0); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirect3DDevice3_DrawIndexedPrimitive(device, D3DPT_TRIANGLELIST, nfvf, litnquad, 4, indices, 6, 0); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
hr = IDirect3DDevice3_EndScene(device); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
hr = IDirect3DVertexBuffer_Lock(dst_vb, 0, (void **)&dst_data, NULL); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
color = get_surface_color(rt, 160, 360); - ok(color == 0x00ff0000, "Unlit quad without normals has color 0x%08x.\n", color); + ok(color == 0x00ff0000, "Unlit quad without normals has color 0x%08lx.\n", color); ok(dst_data[0].diffuse == 0xffff0000, - "Unlit quad without normals has color 0x%08x, expected 0xffff0000.\n", dst_data[0].diffuse); + "Unlit quad without normals has color 0x%08lx, expected 0xffff0000.\n", dst_data[0].diffuse); ok(!dst_data[0].specular, - "Unexpected specular color 0x%08x.\n", dst_data[0].specular); + "Unexpected specular color 0x%08lx.\n", dst_data[0].specular);
color = get_surface_color(rt, 160, 120); - ok(color == 0x0000ff00, "Lit quad without normals has color 0x%08x.\n", color); + ok(color == 0x0000ff00, "Lit quad without normals has color 0x%08lx.\n", color); ok(dst_data[1].diffuse == 0xff00ff00, - "Lit quad without normals has color 0x%08x, expected 0xff000000.\n", dst_data[1].diffuse); + "Lit quad without normals has color 0x%08lx, expected 0xff000000.\n", dst_data[1].diffuse); ok(!dst_data[1].specular, - "Unexpected specular color 0x%08x.\n", dst_data[1].specular); + "Unexpected specular color 0x%08lx.\n", dst_data[1].specular);
color = get_surface_color(rt, 480, 360); - ok(color == 0x000000ff, "Unlit quad with normals has color 0x%08x.\n", color); + ok(color == 0x000000ff, "Unlit quad with normals has color 0x%08lx.\n", color); ok(dst_data[2].diffuse == 0xff0000ff, - "Unlit quad with normals has color 0x%08x, expected 0xff0000ff.\n", dst_data[2].diffuse); + "Unlit quad with normals has color 0x%08lx, expected 0xff0000ff.\n", dst_data[2].diffuse); ok(!dst_data[2].specular, - "Unexpected specular color 0x%08x.\n", dst_data[2].specular); + "Unexpected specular color 0x%08lx.\n", dst_data[2].specular);
color = get_surface_color(rt, 480, 120); - ok(color == 0x00ffff00, "Lit quad with normals has color 0x%08x.\n", color); + ok(color == 0x00ffff00, "Lit quad with normals has color 0x%08lx.\n", color); ok(dst_data[3].diffuse == 0xffffff00, - "Lit quad with normals has color 0x%08x, expected 0xff000000.\n", dst_data[3].diffuse); + "Lit quad with normals has color 0x%08lx, expected 0xff000000.\n", dst_data[3].diffuse); ok(!dst_data[3].specular, - "Unexpected specular color 0x%08x.\n", dst_data[3].specular); + "Unexpected specular color 0x%08lx.\n", dst_data[3].specular);
hr = IDirect3DVertexBuffer_Unlock(dst_vb); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
material = create_diffuse_and_ambient_material(device, 0.0f, 1.0f, 1.0f, 0.5f); hr = IDirect3DMaterial3_GetHandle(material, device, &mat_handle); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirect3DDevice3_SetLightState(device, D3DLIGHTSTATE_MATERIAL, mat_handle); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirect3DDevice3_SetLightState(device, D3DLIGHTSTATE_AMBIENT, 0xff008000); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
hr = IDirect3D3_CreateLight(d3d, &light, NULL); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); memset(&light_desc, 0, sizeof(light_desc)); light_desc.dwSize = sizeof(light_desc); light_desc.dltType = D3DLIGHT_DIRECTIONAL; @@ -5033,85 +5033,85 @@ static void test_lighting(void) U4(light_desc.dcvColor).a = 0.5f; U3(light_desc.dvDirection).z = 1.0f; hr = IDirect3DLight_SetLight(light, (D3DLIGHT *)&light_desc); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirect3DViewport3_AddLight(viewport, light); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirect3DViewport3_AddLight(viewport, light); - ok(hr == D3DERR_LIGHTHASVIEWPORT, "Got unexpected hr %#x.\n", hr); + ok(hr == D3DERR_LIGHTHASVIEWPORT, "Got unexpected hr %#lx.\n", hr);
viewport2 = create_viewport(device, 0, 0, 640, 480); hr = IDirect3DViewport3_AddLight(viewport2, light); - ok(hr == D3DERR_LIGHTHASVIEWPORT, "Got unexpected hr %#x.\n", hr); + ok(hr == D3DERR_LIGHTHASVIEWPORT, "Got unexpected hr %#lx.\n", hr); IDirect3DViewport3_Release(viewport2);
hr = IDirect3DViewport3_Clear2(viewport, 1, &clear_rect, D3DCLEAR_TARGET, 0xffffffff, 0.0f, 0); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
hr = IDirect3DDevice3_BeginScene(device); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
hr = IDirect3DDevice3_DrawIndexedPrimitive(device, D3DPT_TRIANGLELIST, nfvf, nquad, 4, indices, 6, 0); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
hr = IDirect3DDevice3_EndScene(device); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
color = get_surface_color(rt, 320, 240); - ok(color == 0x00008000, "Lit quad with no light has color 0x%08x.\n", color); + ok(color == 0x00008000, "Lit quad with no light has color 0x%08lx.\n", color);
light_desc.dwFlags = D3DLIGHT_ACTIVE; hr = IDirect3DLight_SetLight(light, (D3DLIGHT *)&light_desc); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirect3DViewport3_DeleteLight(viewport, light); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); light_desc.dwFlags = 0; hr = IDirect3DLight_GetLight(light, (D3DLIGHT *)&light_desc); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); - ok(light_desc.dwFlags == D3DLIGHT_ACTIVE, "Got unexpected flags %#x.\n", light_desc.dwFlags); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); + ok(light_desc.dwFlags == D3DLIGHT_ACTIVE, "Got unexpected flags %#lx.\n", light_desc.dwFlags);
hr = IDirect3DViewport3_AddLight(viewport, light); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
for (i = 0; i < ARRAY_SIZE(tests); ++i) { hr = IDirect3DVertexBuffer_Lock(src_vb2, 0, (void **)&src_data2, NULL); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); memcpy(src_data2, tests[i].quad, sizeof(*src_data2)); hr = IDirect3DVertexBuffer_Unlock(src_vb2); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
hr = IDirect3DDevice3_SetTransform(device, D3DTRANSFORMSTATE_WORLD, tests[i].world_matrix); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
hr = IDirect3DViewport3_Clear2(viewport, 1, &clear_rect, D3DCLEAR_TARGET, 0xffffffff, 0.0f, 0); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
hr = IDirect3DDevice3_BeginScene(device); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
hr = IDirect3DVertexBuffer_ProcessVertices(dst_vb, D3DVOP_TRANSFORM | D3DVOP_LIGHT, 0, 1, src_vb2, 0, device, 0); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirect3DDevice3_DrawIndexedPrimitive(device, D3DPT_TRIANGLELIST, nfvf, tests[i].quad, 4, indices, 6, 0); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
hr = IDirect3DDevice3_EndScene(device); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
hr = IDirect3DVertexBuffer_Lock(dst_vb, 0, (void **)&dst_data, NULL); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
color = get_surface_color(rt, 320, 240); - ok(color == tests[i].expected, "%s has color 0x%08x.\n", tests[i].message, color); + ok(color == tests[i].expected, "%s has color 0x%08lx.\n", tests[i].message, color); ok(dst_data[0].diffuse == (tests[i].expected | 0xff000000), - "%s has color 0x%08x.\n", tests[i].message, dst_data[0].diffuse); + "%s has color 0x%08lx.\n", tests[i].message, dst_data[0].diffuse); ok(!dst_data[0].specular, - "%s has specular color 0x%08x.\n", tests[i].message, dst_data[0].specular); + "%s has specular color 0x%08lx.\n", tests[i].message, dst_data[0].specular);
hr = IDirect3DVertexBuffer_Unlock(dst_vb); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); }
IDirect3DVertexBuffer_Release(src_vb1); @@ -5119,13 +5119,13 @@ static void test_lighting(void) IDirect3DVertexBuffer_Release(dst_vb);
hr = IDirect3DViewport3_DeleteLight(viewport, light); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); IDirect3DLight_Release(light); destroy_material(material); IDirect3DViewport3_Release(viewport); IDirectDrawSurface4_Release(rt); refcount = IDirect3DDevice3_Release(device); - ok(!refcount, "Device has %u references left.\n", refcount); + ok(!refcount, "Device has %lu references left.\n", refcount); IDirect3D3_Release(d3d); DestroyWindow(window); } @@ -5386,25 +5386,25 @@ static void test_specular_lighting(void) }
hr = IDirect3DDevice3_GetDirect3D(device, &d3d); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
hr = IDirect3DDevice3_GetRenderTarget(device, &rt); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
viewport = create_viewport(device, 0, 0, 640, 480); hr = IDirect3DDevice3_SetCurrentViewport(device, viewport); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
hr = IDirect3DDevice3_SetTransform(device, D3DTRANSFORMSTATE_WORLD, &mat); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirect3DDevice3_SetTransform(device, D3DTRANSFORMSTATE_VIEW, &mat); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirect3DDevice3_SetTransform(device, D3DTRANSFORMSTATE_PROJECTION, &mat); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirect3DDevice3_SetRenderState(device, D3DRENDERSTATE_ZENABLE, FALSE); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirect3DDevice3_SetRenderState(device, D3DRENDERSTATE_FOGENABLE, FALSE); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
memset(&light_desc, 0, sizeof(light_desc)); light_desc.dwSize = sizeof(light_desc); @@ -5415,95 +5415,95 @@ static void test_specular_lighting(void) for (i = 0; i < ARRAY_SIZE(dummy_lights); ++i) { hr = IDirect3D3_CreateLight(d3d, &dummy_lights[i], NULL); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirect3DViewport3_AddLight(viewport, dummy_lights[i]); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirect3DLight_SetLight(dummy_lights[i], (D3DLIGHT *)&light_desc); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); }
hr = IDirect3D3_CreateLight(d3d, &light, NULL); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirect3DViewport3_AddLight(viewport, light); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
hr = IDirect3DDevice3_SetRenderState(device, D3DRENDERSTATE_SPECULARENABLE, TRUE); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
memset(&vb_desc, 0, sizeof(vb_desc)); vb_desc.dwSize = sizeof(vb_desc); vb_desc.dwFVF = fvf; vb_desc.dwNumVertices = ARRAY_SIZE(vertices); hr = IDirect3D3_CreateVertexBuffer(d3d, &vb_desc, &src_vb, 0, NULL); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirect3DVertexBuffer_Lock(src_vb, 0, (void **)&src_data, NULL); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); memcpy(src_data, vertices, sizeof(vertices)); hr = IDirect3DVertexBuffer_Unlock(src_vb); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
memset(&vb_desc, 0, sizeof(vb_desc)); vb_desc.dwSize = sizeof(vb_desc); vb_desc.dwFVF = D3DFVF_XYZRHW | D3DFVF_DIFFUSE | D3DFVF_SPECULAR; vb_desc.dwNumVertices = ARRAY_SIZE(vertices); hr = IDirect3D3_CreateVertexBuffer(d3d, &vb_desc, &dst_vb, 0, NULL); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
for (i = 0; i < ARRAY_SIZE(tests); ++i) { tests[i].light->dwFlags = D3DLIGHT_ACTIVE; hr = IDirect3DLight_SetLight(light, (D3DLIGHT *)tests[i].light); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
hr = IDirect3DDevice3_SetRenderState(device, D3DRENDERSTATE_LOCALVIEWER, tests[i].local_viewer); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
material = create_specular_material(device, 1.0f, 1.0f, 1.0f, 0.5f, tests[i].specular_power); hr = IDirect3DMaterial3_GetHandle(material, device, &mat_handle); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirect3DDevice3_SetLightState(device, D3DLIGHTSTATE_MATERIAL, mat_handle); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
hr = IDirect3DViewport3_Clear2(viewport, 1, &clear_rect, D3DCLEAR_TARGET, 0xffffffff, 0.0f, 0); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
hr = IDirect3DDevice3_BeginScene(device); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
hr = IDirect3DVertexBuffer_Lock(dst_vb, 0, (void **)&dst_data, NULL); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); memset(dst_data, 0, sizeof(*dst_data) * ARRAY_SIZE(vertices)); hr = IDirect3DVertexBuffer_Unlock(dst_vb); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
hr = IDirect3DVertexBuffer_ProcessVertices(dst_vb, D3DVOP_TRANSFORM | D3DVOP_LIGHT, 0, ARRAY_SIZE(vertices), src_vb, 0, device, 0); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirect3DDevice3_DrawIndexedPrimitive(device, D3DPT_TRIANGLELIST, fvf, quad, vertices_side * vertices_side, indices, indices_count, 0); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
hr = IDirect3DDevice3_EndScene(device); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
hr = IDirect3DVertexBuffer_Lock(dst_vb, 0, (void **)&dst_data, NULL); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
for (j = 0; j < tests[i].expected_count; ++j) { color = get_surface_color(rt, tests[i].expected[j].x, tests[i].expected[j].y); ok(compare_color(color, tests[i].expected[j].color, 1), - "Expected color 0x%08x at location (%u, %u), got 0x%08x, case %u.\n", + "Expected color 0x%08lx at location (%u, %u), got 0x%08lx, case %u.\n", tests[i].expected[j].color, tests[i].expected[j].x, tests[i].expected[j].y, color, i); - ok(!dst_data[j].diffuse, "Expected color 0x00000000 for vertex %u, got 0x%08x, case %u.\n", + ok(!dst_data[j].diffuse, "Expected color 0x00000000 for vertex %u, got 0x%08lx, case %u.\n", j, dst_data[j].diffuse, i); ok(compare_color(dst_data[j].specular, tests[i].expected[j].color, 1), - "Expected color 0x%08x for vertex %u, got 0x%08x, case %u.\n", + "Expected color 0x%08lx for vertex %u, got 0x%08lx, case %u.\n", tests[i].expected[j].color, j, dst_data[j].specular, i); } hr = IDirect3DVertexBuffer_Unlock(dst_vb); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
destroy_material(material); } @@ -5515,12 +5515,12 @@ static void test_specular_lighting(void) IDirect3DVertexBuffer_Release(src_vb);
hr = IDirect3DViewport3_DeleteLight(viewport, light); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); IDirect3DLight_Release(light); IDirect3DViewport3_Release(viewport); IDirectDrawSurface4_Release(rt); refcount = IDirect3DDevice3_Release(device); - ok(!refcount, "Device has %u references left.\n", refcount); + ok(!refcount, "Device has %lu references left.\n", refcount); IDirect3D3_Release(d3d); DestroyWindow(window); heap_free(indices); @@ -5546,23 +5546,23 @@ static void test_clear_rect_count(void) }
hr = IDirect3DDevice3_GetRenderTarget(device, &rt); - ok(SUCCEEDED(hr), "Failed to get render target, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get render target, hr %#lx.\n", hr);
viewport = create_viewport(device, 0, 0, 640, 480); hr = IDirect3DDevice3_SetCurrentViewport(device, viewport); - ok(SUCCEEDED(hr), "Failed to activate the viewport, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to activate the viewport, hr %#lx.\n", hr); hr = IDirect3DViewport3_Clear2(viewport, 1, &clear_rect, D3DCLEAR_TARGET, 0x00ffffff, 0.0f, 0); - ok(SUCCEEDED(hr), "Failed to clear the viewport, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to clear the viewport, hr %#lx.\n", hr); hr = IDirect3DViewport3_Clear2(viewport, 0, &clear_rect, D3DCLEAR_TARGET, 0x00ff0000, 0.0f, 0); - ok(SUCCEEDED(hr), "Failed to clear the viewport, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to clear the viewport, hr %#lx.\n", hr); hr = IDirect3DViewport3_Clear2(viewport, 0, NULL, D3DCLEAR_TARGET, 0x0000ff00, 0.0f, 0); - ok(SUCCEEDED(hr), "Failed to clear the viewport, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to clear the viewport, hr %#lx.\n", hr); hr = IDirect3DViewport3_Clear2(viewport, 1, NULL, D3DCLEAR_TARGET, 0x000000ff, 0.0f, 0); - ok(SUCCEEDED(hr), "Failed to clear the viewport, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to clear the viewport, hr %#lx.\n", hr);
color = get_surface_color(rt, 320, 240); ok(compare_color(color, 0x00ffffff, 1) || broken(compare_color(color, 0x000000ff, 1)), - "Got unexpected color 0x%08x.\n", color); + "Got unexpected color 0x%08lx.\n", color);
IDirect3DViewport3_Release(viewport); IDirectDrawSurface4_Release(rt); @@ -5578,21 +5578,21 @@ static BOOL test_mode_restored(IDirectDraw4 *ddraw, HWND window) memset(&ddsd1, 0, sizeof(ddsd1)); ddsd1.dwSize = sizeof(ddsd1); hr = IDirectDraw4_GetDisplayMode(ddraw, &ddsd1); - ok(SUCCEEDED(hr), "GetDisplayMode failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "GetDisplayMode failed, hr %#lx.\n", hr);
hr = IDirectDraw4_SetCooperativeLevel(ddraw, window, DDSCL_EXCLUSIVE | DDSCL_FULLSCREEN); - ok(SUCCEEDED(hr), "SetCooperativeLevel failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "SetCooperativeLevel failed, hr %#lx.\n", hr); hr = set_display_mode(ddraw, 640, 480); - ok(SUCCEEDED(hr), "Failed to set display mode, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set display mode, hr %#lx.\n", hr); hr = IDirectDraw4_SetCooperativeLevel(ddraw, window, DDSCL_NORMAL); - ok(SUCCEEDED(hr), "SetCooperativeLevel failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "SetCooperativeLevel failed, hr %#lx.\n", hr);
memset(&ddsd2, 0, sizeof(ddsd2)); ddsd2.dwSize = sizeof(ddsd2); hr = IDirectDraw4_GetDisplayMode(ddraw, &ddsd2); - ok(SUCCEEDED(hr), "GetDisplayMode failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "GetDisplayMode failed, hr %#lx.\n", hr); hr = IDirectDraw4_RestoreDisplayMode(ddraw); - ok(SUCCEEDED(hr), "RestoreDisplayMode failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "RestoreDisplayMode failed, hr %#lx.\n", hr);
return ddsd1.dwWidth == ddsd2.dwWidth && ddsd1.dwHeight == ddsd2.dwHeight; } @@ -5616,16 +5616,16 @@ static void test_coop_level_versions(void)
/* A failing ddraw1::SetCooperativeLevel call does not have an effect */ hr = IDirectDraw4_QueryInterface(ddraw4, &IID_IDirectDraw, (void **)&ddraw); - ok(SUCCEEDED(hr), "QueryInterface failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "QueryInterface failed, hr %#lx.\n", hr);
hr = IDirectDraw_SetCooperativeLevel(ddraw, NULL, DDSCL_FULLSCREEN | DDSCL_EXCLUSIVE); - ok(FAILED(hr), "SetCooperativeLevel returned %#x, expected failure.\n", hr); + ok(FAILED(hr), "SetCooperativeLevel returned %#lx, expected failure.\n", hr); restored = test_mode_restored(ddraw4, window); ok(restored, "Display mode not restored after bad ddraw1::SetCooperativeLevel call\n");
/* A successful one does */ hr = IDirectDraw_SetCooperativeLevel(ddraw, NULL, DDSCL_NORMAL); - ok(SUCCEEDED(hr), "SetCooperativeLevel failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "SetCooperativeLevel failed, hr %#lx.\n", hr); restored = test_mode_restored(ddraw4, window); ok(!restored, "Display mode restored after good ddraw1::SetCooperativeLevel call\n");
@@ -5635,10 +5635,10 @@ static void test_coop_level_versions(void) ddraw4 = create_ddraw(); ok(!!ddraw4, "Failed to create a ddraw object.\n"); hr = IDirectDraw4_QueryInterface(ddraw4, &IID_IDirectDraw, (void **)&ddraw); - ok(SUCCEEDED(hr), "QueryInterface failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "QueryInterface failed, hr %#lx.\n", hr);
hr = IDirectDraw_SetCooperativeLevel(ddraw, window, DDSCL_SETFOCUSWINDOW); - ok(SUCCEEDED(hr), "SetCooperativeLevel failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "SetCooperativeLevel failed, hr %#lx.\n", hr); restored = test_mode_restored(ddraw4, window); ok(!restored, "Display mode restored after ddraw1::SetCooperativeLevel(SETFOCUSWINDOW) call\n");
@@ -5649,12 +5649,12 @@ static void test_coop_level_versions(void) ddraw4 = create_ddraw(); ok(!!ddraw4, "Failed to create a ddraw object.\n"); hr = IDirectDraw4_QueryInterface(ddraw4, &IID_IDirectDraw, (void **)&ddraw); - ok(SUCCEEDED(hr), "QueryInterface failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "QueryInterface failed, hr %#lx.\n", hr);
hr = IDirectDraw_SetCooperativeLevel(ddraw, NULL, DDSCL_NORMAL); - ok(SUCCEEDED(hr), "SetCooperativeLevel failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "SetCooperativeLevel failed, hr %#lx.\n", hr); hr = IDirectDraw_SetCooperativeLevel(ddraw, NULL, DDSCL_FULLSCREEN | DDSCL_EXCLUSIVE); - ok(FAILED(hr), "SetCooperativeLevel returned %#x, expected failure.\n", hr); + ok(FAILED(hr), "SetCooperativeLevel returned %#lx, expected failure.\n", hr); restored = test_mode_restored(ddraw4, window); ok(!restored, "Display mode restored after good-bad ddraw1::SetCooperativeLevel() call sequence\n");
@@ -5665,14 +5665,14 @@ static void test_coop_level_versions(void) ddraw4 = create_ddraw(); ok(!!ddraw4, "Failed to create a ddraw object.\n"); hr = IDirectDraw4_QueryInterface(ddraw4, &IID_IDirectDraw, (void **)&ddraw); - ok(SUCCEEDED(hr), "QueryInterface failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "QueryInterface failed, hr %#lx.\n", hr);
hr = IDirectDraw_SetCooperativeLevel(ddraw, NULL, DDSCL_NORMAL); - ok(SUCCEEDED(hr), "SetCooperativeLevel failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "SetCooperativeLevel failed, hr %#lx.\n", hr); hr = IDirectDraw4_SetCooperativeLevel(ddraw4, window, DDSCL_FULLSCREEN | DDSCL_EXCLUSIVE); - ok(SUCCEEDED(hr), "SetCooperativeLevel failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "SetCooperativeLevel failed, hr %#lx.\n", hr); hr = IDirectDraw4_SetCooperativeLevel(ddraw4, window, DDSCL_NORMAL); - ok(SUCCEEDED(hr), "SetCooperativeLevel failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "SetCooperativeLevel failed, hr %#lx.\n", hr);
restored = test_mode_restored(ddraw4, window); ok(!restored, "Display mode restored after ddraw1-ddraw4 SetCooperativeLevel() call sequence\n"); @@ -5683,10 +5683,10 @@ static void test_coop_level_versions(void) ddraw4 = create_ddraw(); ok(!!ddraw4, "Failed to create a ddraw object.\n"); hr = IDirectDraw4_QueryInterface(ddraw4, &IID_IDirectDraw, (void **)&ddraw); - ok(SUCCEEDED(hr), "QueryInterface failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "QueryInterface failed, hr %#lx.\n", hr);
hr = IDirectDraw4_SetCooperativeLevel(ddraw4, window, DDSCL_NORMAL); - ok(SUCCEEDED(hr), "SetCooperativeLevel failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "SetCooperativeLevel failed, hr %#lx.\n", hr);
memset(&ddsd, 0, sizeof(ddsd)); ddsd.dwSize = sizeof(ddsd); @@ -5694,7 +5694,7 @@ static void test_coop_level_versions(void) ddsd.ddsCaps.dwCaps = DDSCAPS_OFFSCREENPLAIN; ddsd.dwWidth = ddsd.dwHeight = 8; hr = IDirectDraw_CreateSurface(ddraw, &ddsd, &surface, NULL); - ok(SUCCEEDED(hr), "CreateSurface failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "CreateSurface failed, hr %#lx.\n", hr); IDirectDrawSurface_Release(surface); restored = test_mode_restored(ddraw4, window); ok(restored, "Display mode not restored after ddraw1::CreateSurface() call\n"); @@ -5852,46 +5852,46 @@ static void test_lighting_interface_versions(void) }
hr = IDirect3DDevice3_GetRenderTarget(device, &rt); - ok(SUCCEEDED(hr), "Failed to get render target, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get render target, hr %#lx.\n", hr);
viewport = create_viewport(device, 0, 0, 640, 480); hr = IDirect3DDevice3_SetCurrentViewport(device, viewport); - ok(SUCCEEDED(hr), "Failed to set current viewport, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set current viewport, hr %#lx.\n", hr);
emissive = create_emissive_material(device, 0.0f, 1.0f, 0.0f, 0.0f); hr = IDirect3DMaterial3_GetHandle(emissive, device, &mat_handle); - ok(SUCCEEDED(hr), "Failed to get material handle, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get material handle, hr %#lx.\n", hr); hr = IDirect3DDevice3_SetLightState(device, D3DLIGHTSTATE_MATERIAL, mat_handle); - ok(SUCCEEDED(hr), "Failed to set material state, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set material state, hr %#lx.\n", hr); hr = IDirect3DDevice3_SetRenderState(device, D3DRENDERSTATE_ZENABLE, D3DZB_FALSE); - ok(SUCCEEDED(hr), "Failed to disable z test, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to disable z test, hr %#lx.\n", hr);
hr = IDirect3DDevice3_GetRenderState(device, D3DRENDERSTATE_SPECULARENABLE, &rs); - ok(SUCCEEDED(hr), "Failed to get specularenable render state, hr %#x.\n", hr); - ok(rs == FALSE, "Initial D3DRENDERSTATE_SPECULARENABLE is %#x, expected FALSE.\n", rs); + ok(SUCCEEDED(hr), "Failed to get specularenable render state, hr %#lx.\n", hr); + ok(rs == FALSE, "Initial D3DRENDERSTATE_SPECULARENABLE is %#lx, expected FALSE.\n", rs);
for (i = 0; i < ARRAY_SIZE(tests); i++) { hr = IDirect3DViewport3_Clear2(viewport, 1, &clear_rect, D3DCLEAR_TARGET, 0xff202020, 0.0f, 0); - ok(SUCCEEDED(hr), "Failed to clear viewport, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to clear viewport, hr %#lx.\n", hr);
hr = IDirect3DDevice3_SetRenderState(device, D3DRENDERSTATE_LIGHTING, tests[i].d3drs_lighting); - ok(SUCCEEDED(hr), "Failed to set lighting render state, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set lighting render state, hr %#lx.\n", hr); hr = IDirect3DDevice3_SetRenderState(device, D3DRENDERSTATE_SPECULARENABLE, tests[i].d3drs_specular); - ok(SUCCEEDED(hr), "Failed to set specularenable render state, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set specularenable render state, hr %#lx.\n", hr);
hr = IDirect3DDevice3_BeginScene(device); - ok(SUCCEEDED(hr), "Failed to begin scene, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to begin scene, hr %#lx.\n", hr); hr = IDirect3DDevice2_DrawPrimitive(device, D3DPT_TRIANGLESTRIP, tests[i].vertextype, tests[i].data, 4, tests[i].draw_flags | D3DDP_WAIT); - ok(SUCCEEDED(hr), "Failed to draw, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to draw, hr %#lx.\n", hr); hr = IDirect3DDevice3_EndScene(device); - ok(SUCCEEDED(hr), "Failed to end scene, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to end scene, hr %#lx.\n", hr);
color = get_surface_color(rt, 320, 240); ok(compare_color(color, tests[i].color, 1), - "Got unexpected color 0x%08x, expected 0x%08x, test %u.\n", + "Got unexpected color 0x%08lx, expected 0x%08lx, test %u.\n", color, tests[i].color, i); }
@@ -5899,7 +5899,7 @@ static void test_lighting_interface_versions(void) destroy_viewport(device, viewport); IDirectDrawSurface4_Release(rt); ref = IDirect3DDevice3_Release(device); - ok(ref == 0, "Device not properly released, refcount %u.\n", ref); + ok(ref == 0, "Device not properly released, refcount %lu.\n", ref); DestroyWindow(window); }
@@ -5921,7 +5921,7 @@ static LRESULT CALLBACK activateapp_test_proc(HWND hwnd, UINT message, WPARAM wp activateapp_testdata.received = FALSE; hr = IDirectDraw4_SetCooperativeLevel(activateapp_testdata.ddraw, activateapp_testdata.window, activateapp_testdata.coop_level); - ok(SUCCEEDED(hr), "Recursive SetCooperativeLevel call failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Recursive SetCooperativeLevel call failed, hr %#lx.\n", hr); ok(!activateapp_testdata.received, "Received WM_ACTIVATEAPP during recursive SetCooperativeLevel call.\n"); } activateapp_testdata.received = TRUE; @@ -5953,31 +5953,31 @@ static void test_coop_level_activateapp(void) SetForegroundWindow(window); activateapp_testdata.received = FALSE; hr = IDirectDraw4_SetCooperativeLevel(ddraw, window, DDSCL_EXCLUSIVE | DDSCL_FULLSCREEN); - ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#lx.\n", hr); ok(!activateapp_testdata.received, "Received WM_ACTIVATEAPP although window was already active.\n"); hr = IDirectDraw4_SetCooperativeLevel(ddraw, NULL, DDSCL_NORMAL); - ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#lx.\n", hr);
/* Exclusive with window not active. */ SetForegroundWindow(GetDesktopWindow()); activateapp_testdata.received = FALSE; hr = IDirectDraw4_SetCooperativeLevel(ddraw, window, DDSCL_EXCLUSIVE | DDSCL_FULLSCREEN); - ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#lx.\n", hr); ok(activateapp_testdata.received, "Expected WM_ACTIVATEAPP, but did not receive it.\n"); hr = IDirectDraw4_SetCooperativeLevel(ddraw, NULL, DDSCL_NORMAL); - ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#lx.\n", hr);
/* Normal with window not active, then exclusive with the same window. */ SetForegroundWindow(GetDesktopWindow()); activateapp_testdata.received = FALSE; hr = IDirectDraw4_SetCooperativeLevel(ddraw, window, DDSCL_NORMAL); - ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#lx.\n", hr); ok(!activateapp_testdata.received, "Received WM_ACTIVATEAPP when setting DDSCL_NORMAL.\n"); hr = IDirectDraw4_SetCooperativeLevel(ddraw, window, DDSCL_EXCLUSIVE | DDSCL_FULLSCREEN); - ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#lx.\n", hr); ok(activateapp_testdata.received, "Expected WM_ACTIVATEAPP, but did not receive it.\n"); hr = IDirectDraw4_SetCooperativeLevel(ddraw, NULL, DDSCL_NORMAL); - ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#lx.\n", hr);
/* Recursive set of DDSCL_EXCLUSIVE | DDSCL_FULLSCREEN. */ SetForegroundWindow(GetDesktopWindow()); @@ -5986,10 +5986,10 @@ static void test_coop_level_activateapp(void) activateapp_testdata.window = window; activateapp_testdata.coop_level = DDSCL_EXCLUSIVE | DDSCL_FULLSCREEN; hr = IDirectDraw4_SetCooperativeLevel(ddraw, window, DDSCL_EXCLUSIVE | DDSCL_FULLSCREEN); - ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#lx.\n", hr); ok(activateapp_testdata.received, "Expected WM_ACTIVATEAPP, but did not receive it.\n"); hr = IDirectDraw4_SetCooperativeLevel(ddraw, NULL, DDSCL_NORMAL); - ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#lx.\n", hr);
/* The recursive call seems to have some bad effect on native ddraw, despite (apparently) * succeeding. Another switch to exclusive and back to normal is needed to release the @@ -5997,9 +5997,9 @@ static void test_coop_level_activateapp(void) * WM_ACTIVATEAPP messages. */ activateapp_testdata.ddraw = NULL; hr = IDirectDraw4_SetCooperativeLevel(ddraw, window, DDSCL_EXCLUSIVE | DDSCL_FULLSCREEN); - ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#lx.\n", hr); hr = IDirectDraw4_SetCooperativeLevel(ddraw, NULL, DDSCL_NORMAL); - ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#lx.\n", hr);
/* Setting DDSCL_NORMAL with recursive invocation. */ SetForegroundWindow(GetDesktopWindow()); @@ -6008,7 +6008,7 @@ static void test_coop_level_activateapp(void) activateapp_testdata.window = window; activateapp_testdata.coop_level = DDSCL_NORMAL; hr = IDirectDraw4_SetCooperativeLevel(ddraw, window, DDSCL_EXCLUSIVE | DDSCL_FULLSCREEN); - ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#lx.\n", hr); ok(activateapp_testdata.received, "Expected WM_ACTIVATEAPP, but did not receive it.\n");
/* DDraw is in exclusive mode now. */ @@ -6018,15 +6018,15 @@ static void test_coop_level_activateapp(void) U5(ddsd).dwBackBufferCount = 1; ddsd.ddsCaps.dwCaps = DDSCAPS_PRIMARYSURFACE | DDSCAPS_COMPLEX | DDSCAPS_FLIP; hr = IDirectDraw4_CreateSurface(ddraw, &ddsd, &surface, NULL); - ok(SUCCEEDED(hr), "Failed to create surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create surface, hr %#lx.\n", hr); IDirectDrawSurface4_Release(surface);
/* Recover again, just to be sure. */ activateapp_testdata.ddraw = NULL; hr = IDirectDraw4_SetCooperativeLevel(ddraw, window, DDSCL_EXCLUSIVE | DDSCL_FULLSCREEN); - ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#lx.\n", hr); hr = IDirectDraw4_SetCooperativeLevel(ddraw, NULL, DDSCL_NORMAL); - ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#lx.\n", hr);
DestroyWindow(window); UnregisterClassA("ddraw_test_wndproc_wc", GetModuleHandleA(NULL)); @@ -6088,14 +6088,14 @@ static void test_texturemanage(void) ddraw = create_ddraw(); ok(!!ddraw, "Failed to create a ddraw object.\n"); hr = IDirectDraw4_SetCooperativeLevel(ddraw, NULL, DDSCL_NORMAL); - ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#lx.\n", hr);
memset(&hal_caps, 0, sizeof(hal_caps)); hal_caps.dwSize = sizeof(hal_caps); memset(&hel_caps, 0, sizeof(hel_caps)); hel_caps.dwSize = sizeof(hel_caps); hr = IDirectDraw4_GetCaps(ddraw, &hal_caps, &hel_caps); - ok(SUCCEEDED(hr), "Failed to get caps, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get caps, hr %#lx.\n", hr); if ((hal_caps.ddsCaps.dwCaps & needed_caps) != needed_caps) { skip("Managed textures not supported, skipping managed texture test.\n"); @@ -6114,20 +6114,20 @@ static void test_texturemanage(void) ddsd.dwHeight = 4;
hr = IDirectDraw4_CreateSurface(ddraw, &ddsd, &surface, NULL); - ok(hr == tests[i].hr, "Got unexpected, hr %#x, case %u.\n", hr, i); + ok(hr == tests[i].hr, "Got unexpected, hr %#lx, case %u.\n", hr, i); if (FAILED(hr)) continue;
memset(&ddsd, 0, sizeof(ddsd)); ddsd.dwSize = sizeof(ddsd); hr = IDirectDrawSurface4_GetSurfaceDesc(surface, &ddsd); - ok(SUCCEEDED(hr), "Failed to get surface desc, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get surface desc, hr %#lx.\n", hr);
ok(ddsd.ddsCaps.dwCaps == tests[i].caps_out, - "Input caps %#x, %#x, expected output caps %#x, got %#x, case %u.\n", + "Input caps %#lx, %#lx, expected output caps %#lx, got %#lx, case %u.\n", tests[i].caps_in, tests[i].caps2_in, tests[i].caps_out, ddsd.ddsCaps.dwCaps, i); ok(ddsd.ddsCaps.dwCaps2 == tests[i].caps2_out, - "Input caps %#x, %#x, expected output caps %#x, got %#x, case %u.\n", + "Input caps %#lx, %#lx, expected output caps %#lx, got %#lx, case %u.\n", tests[i].caps_in, tests[i].caps2_in, tests[i].caps2_out, ddsd.ddsCaps.dwCaps2, i);
IDirectDrawSurface4_Release(surface); @@ -6287,23 +6287,23 @@ static void test_block_formats_creation(void) }
hr = IDirect3DDevice3_GetDirect3D(device, &d3d); - ok(SUCCEEDED(hr), "Failed to get d3d interface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get d3d interface, hr %#lx.\n", hr); hr = IDirect3D3_QueryInterface(d3d, &IID_IDirectDraw4, (void **) &ddraw); - ok(SUCCEEDED(hr), "Failed to get ddraw interface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get ddraw interface, hr %#lx.\n", hr); IDirect3D3_Release(d3d);
hr = IDirect3DDevice3_EnumTextureFormats(device, test_block_formats_creation_cb, &supported_fmts); - ok(SUCCEEDED(hr), "Failed to enumerate texture formats %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to enumerate texture formats %#lx.\n", hr);
hr = IDirectDraw4_GetFourCCCodes(ddraw, &num_fourcc_codes, NULL); - ok(SUCCEEDED(hr), "Failed to get fourcc codes %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get fourcc codes %#lx.\n", hr); fourcc_codes = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, num_fourcc_codes * sizeof(*fourcc_codes)); if (!fourcc_codes) goto cleanup; hr = IDirectDraw4_GetFourCCCodes(ddraw, &num_fourcc_codes, fourcc_codes); - ok(SUCCEEDED(hr), "Failed to get fourcc codes %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get fourcc codes %#lx.\n", hr); for (i = 0; i < num_fourcc_codes; i++) { for (j = 0; j < ARRAY_SIZE(formats); j++) @@ -6317,7 +6317,7 @@ static void test_block_formats_creation(void) memset(&hal_caps, 0, sizeof(hal_caps)); hal_caps.dwSize = sizeof(hal_caps); hr = IDirectDraw4_GetCaps(ddraw, &hal_caps, NULL); - ok(SUCCEEDED(hr), "Failed to get caps, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get caps, hr %#lx.\n", hr);
mem = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, 2 * 2 * 16 + 1);
@@ -6375,7 +6375,7 @@ static void test_block_formats_creation(void) hr = IDirectDraw4_CreateSurface(ddraw, &ddsd, &surface, NULL); todo_wine_if (todo) ok(hr == expect_hr, - "Got unexpected hr %#x for format %s, resource type %s, size %ux%u, expected %#x.\n", + "Got unexpected hr %#lx for format %s, resource type %s, size %ux%u, expected %#lx.\n", hr, formats[i].name, types[j].name, w, h, expect_hr);
if (SUCCEEDED(hr)) @@ -6418,7 +6418,7 @@ static void test_block_formats_creation(void) ddsd.dwHeight = 8;
hr = IDirectDraw4_CreateSurface(ddraw, &ddsd, &surface, NULL); - ok(hr == user_mem_tests[j].hr, "Test %u: Got unexpected hr %#x, format %s.\n", j, hr, formats[i].name); + ok(hr == user_mem_tests[j].hr, "Test %u: Got unexpected hr %#lx, format %s.\n", j, hr, formats[i].name);
if (FAILED(hr)) continue; @@ -6426,15 +6426,15 @@ static void test_block_formats_creation(void) memset(&ddsd, 0, sizeof(ddsd)); ddsd.dwSize = sizeof(ddsd); hr = IDirectDrawSurface4_GetSurfaceDesc(surface, &ddsd); - ok(SUCCEEDED(hr), "Test %u: Failed to get surface desc, hr %#x.\n", j, hr); + ok(SUCCEEDED(hr), "Test %u: Failed to get surface desc, hr %#lx.\n", j, hr); ok(ddsd.dwFlags == (DDSD_CAPS | DDSD_WIDTH | DDSD_HEIGHT | DDSD_PIXELFORMAT | DDSD_LINEARSIZE), - "Test %u: Got unexpected flags %#x.\n", j, ddsd.dwFlags); + "Test %u: Got unexpected flags %#lx.\n", j, ddsd.dwFlags); if (user_mem_tests[j].flags & DDSD_LPSURFACE) - ok(U1(ddsd).dwLinearSize == ~0u, "Test %u: Got unexpected linear size %#x.\n", + ok(U1(ddsd).dwLinearSize == ~0u, "Test %u: Got unexpected linear size %#lx.\n", j, U1(ddsd).dwLinearSize); else ok(U1(ddsd).dwLinearSize == 2 * 2 * formats[i].block_size, - "Test %u: Got unexpected linear size %#x, expected %#x.\n", + "Test %u: Got unexpected linear size %#lx, expected %#x.\n", j, U1(ddsd).dwLinearSize, 2 * 2 * formats[i].block_size); IDirectDrawSurface4_Release(surface); } @@ -6511,16 +6511,16 @@ static void test_unsupported_formats(void) }
hr = IDirect3DDevice3_GetDirect3D(device, &d3d); - ok(SUCCEEDED(hr), "Failed to get d3d interface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get d3d interface, hr %#lx.\n", hr); hr = IDirect3D3_QueryInterface(d3d, &IID_IDirectDraw4, (void **) &ddraw); - ok(SUCCEEDED(hr), "Failed to get ddraw interface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get ddraw interface, hr %#lx.\n", hr); IDirect3D3_Release(d3d);
for (i = 0; i < ARRAY_SIZE(formats); i++) { struct format_support_check check = {&formats[i].fmt, FALSE}; hr = IDirect3DDevice3_EnumTextureFormats(device, test_unsupported_formats_cb, &check); - ok(SUCCEEDED(hr), "Failed to enumerate texture formats %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to enumerate texture formats %#lx.\n", hr);
for (j = 0; j < ARRAY_SIZE(caps); j++) { @@ -6539,7 +6539,7 @@ static void test_unsupported_formats(void)
hr = IDirectDraw4_CreateSurface(ddraw, &ddsd, &surface, NULL); ok(SUCCEEDED(hr) == expect_success, - "Got unexpected hr %#x for format %s, caps %#x, expected %s.\n", + "Got unexpected hr %#lx for format %s, caps %#lx, expected %s.\n", hr, formats[i].name, caps[j], expect_success ? "success" : "failure"); if (FAILED(hr)) continue; @@ -6547,7 +6547,7 @@ static void test_unsupported_formats(void) memset(&ddsd, 0, sizeof(ddsd)); ddsd.dwSize = sizeof(ddsd); hr = IDirectDrawSurface4_GetSurfaceDesc(surface, &ddsd); - ok(SUCCEEDED(hr), "Failed to get surface desc, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get surface desc, hr %#lx.\n", hr);
if (caps[j] & DDSCAPS_VIDEOMEMORY) expected_caps = DDSCAPS_VIDEOMEMORY; @@ -6559,7 +6559,7 @@ static void test_unsupported_formats(void) expected_caps = DDSCAPS_SYSTEMMEMORY;
ok(ddsd.ddsCaps.dwCaps & expected_caps, - "Expected capability %#x, format %s, input cap %#x.\n", + "Expected capability %#lx, format %s, input cap %#lx.\n", expected_caps, formats[i].name, caps[j]);
IDirectDrawSurface4_Release(surface); @@ -6785,7 +6785,7 @@ static void test_rt_caps(const GUID *device_guid) ddraw = create_ddraw(); ok(!!ddraw, "Failed to create a ddraw object.\n"); hr = IDirectDraw4_SetCooperativeLevel(ddraw, window, DDSCL_NORMAL); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr);
if (FAILED(IDirectDraw4_QueryInterface(ddraw, &IID_IDirect3D3, (void **)&d3d))) { @@ -6804,12 +6804,12 @@ static void test_rt_caps(const GUID *device_guid)
memset(palette_entries, 0, sizeof(palette_entries)); hr = IDirectDraw4_CreatePalette(ddraw, DDPCAPS_ALLOW256 | DDPCAPS_8BIT, palette_entries, &palette, NULL); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr);
memset(&hal_caps, 0, sizeof(hal_caps)); hal_caps.dwSize = sizeof(hal_caps); hr = IDirectDraw4_GetCaps(ddraw, &hal_caps, NULL); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr);
for (i = 0; i < ARRAY_SIZE(test_data); ++i) { @@ -6841,14 +6841,14 @@ static void test_rt_caps(const GUID *device_guid) ok(hr == expected_hr || (software_device && (surface_desc.ddsCaps.dwCaps & (DDSCAPS_VIDEOMEMORY | DDSCAPS_ZBUFFER)) == (DDSCAPS_VIDEOMEMORY | DDSCAPS_ZBUFFER) && hr == DDERR_UNSUPPORTED) || broken(software_device && test_data[i].pf == &p8_fmt && hr == DDERR_INVALIDPIXELFORMAT), - "Got unexpected hr %#x, test %u, software_device %u.\n", hr, i, software_device); + "Got unexpected hr %#lx, test %u, software_device %u.\n", hr, i, software_device); if (FAILED(hr)) continue;
memset(&surface_desc, 0, sizeof(surface_desc)); surface_desc.dwSize = sizeof(surface_desc); hr = IDirectDrawSurface4_GetSurfaceDesc(surface, &surface_desc); - ok(hr == DD_OK, "Got unexpected hr %#x, test %u, software_device %u.\n", hr, i, software_device); + ok(hr == DD_OK, "Got unexpected hr %#lx, test %u, software_device %u.\n", hr, i, software_device);
if ((caps_in & DDSCAPS_SYSTEMMEMORY) || (test_data[i].caps2_in & (DDSCAPS2_D3DTEXTUREMANAGE | DDSCAPS2_TEXTUREMANAGE)) || !(hal_caps.ddsCaps.dwCaps & DDSCAPS_VIDEOMEMORY)) @@ -6860,11 +6860,11 @@ static void test_rt_caps(const GUID *device_guid) && surface_desc.ddsCaps.dwCaps == (caps_in | DDSCAPS_SYSTEMMEMORY)) || (software_device && test_data[i].pf == &z_fmt && surface_desc.ddsCaps.dwCaps == (caps_in | DDSCAPS_SYSTEMMEMORY)), - "Got unexpected caps %#x, expected %#x, test %u, software_device %u.\n", + "Got unexpected caps %#lx, expected %#lx, test %u, software_device %u.\n", surface_desc.ddsCaps.dwCaps, expected_caps, i, software_device);
ok(surface_desc.ddsCaps.dwCaps2 == test_data[i].caps2_in, - "Got unexpected caps2 %#x, expected %#x, test %u, software_device %u.\n", + "Got unexpected caps2 %#lx, expected %#lx, test %u, software_device %u.\n", surface_desc.ddsCaps.dwCaps2, test_data[i].caps2_in, i, software_device);
hr = IDirect3D3_CreateDevice(d3d, device_guid, surface, &device, NULL); @@ -6872,13 +6872,13 @@ static void test_rt_caps(const GUID *device_guid) ok((!software_device && hr == test_data[i].create_device_hr) || (software_device && (hr == (test_data[i].create_device_hr == D3DERR_SURFACENOTINVIDMEM ? DD_OK : test_data[i].create_device_hr))), - "Got unexpected hr %#x, test %u, software_device %u.\n", hr, i, software_device); + "Got unexpected hr %#lx, test %u, software_device %u.\n", hr, i, software_device); if (FAILED(hr)) { if (hr == DDERR_NOPALETTEATTACHED) { hr = IDirectDrawSurface4_SetPalette(surface, palette); - ok(hr == DD_OK, "Got unexpected hr %#x, test %u, software_device %u.\n", hr, i, software_device); + ok(hr == DD_OK, "Got unexpected hr %#lx, test %u, software_device %u.\n", hr, i, software_device); if (software_device) { /* _CreateDevice succeeds with software device, but the palette gets extra reference @@ -6889,10 +6889,10 @@ static void test_rt_caps(const GUID *device_guid) } hr = IDirect3D3_CreateDevice(d3d, device_guid, surface, &device, NULL); if (surface_desc.ddsCaps.dwCaps & DDSCAPS_VIDEOMEMORY) - ok(hr == DDERR_INVALIDPIXELFORMAT, "Got unexpected hr %#x, test %u, software_device %u.\n", + ok(hr == DDERR_INVALIDPIXELFORMAT, "Got unexpected hr %#lx, test %u, software_device %u.\n", hr, i, software_device); else - ok(hr == D3DERR_SURFACENOTINVIDMEM, "Got unexpected hr %#x, test %u, software_device %u.\n", + ok(hr == D3DERR_SURFACENOTINVIDMEM, "Got unexpected hr %#lx, test %u, software_device %u.\n", hr, i, software_device); } IDirectDrawSurface4_Release(surface); @@ -6904,10 +6904,10 @@ static void test_rt_caps(const GUID *device_guid) surface_desc.dwWidth = 640; surface_desc.dwHeight = 480; hr = IDirectDraw4_CreateSurface(ddraw, &surface_desc, &surface, NULL); - ok(hr == DD_OK, "Got unexpected hr %#x, test %u, software_device %u.\n", hr, i, software_device); + ok(hr == DD_OK, "Got unexpected hr %#lx, test %u, software_device %u.\n", hr, i, software_device);
hr = IDirect3D3_CreateDevice(d3d, device_guid, surface, &device, NULL); - ok(hr == DD_OK, "Got unexpected hr %#x, test %u, software_device %u.\n", hr, i, software_device); + ok(hr == DD_OK, "Got unexpected hr %#lx, test %u, software_device %u.\n", hr, i, software_device); }
memset(&surface_desc, 0, sizeof(surface_desc)); @@ -6923,12 +6923,12 @@ static void test_rt_caps(const GUID *device_guid) surface_desc.dwWidth = 640; surface_desc.dwHeight = 480; hr = IDirectDraw4_CreateSurface(ddraw, &surface_desc, &rt, NULL); - ok(hr == DD_OK, "Got unexpected hr %#x, test %u, software_device %u.\n", hr, i, software_device); + ok(hr == DD_OK, "Got unexpected hr %#lx, test %u, software_device %u.\n", hr, i, software_device);
hr = IDirect3DDevice3_SetRenderTarget(device, rt, 0); ok(hr == test_data[i].set_rt_hr || (software_device && hr == DDERR_NOPALETTEATTACHED) || broken(hr == test_data[i].alternative_set_rt_hr), - "Got unexpected hr %#x, test %u, software_device %u.\n", + "Got unexpected hr %#lx, test %u, software_device %u.\n", hr, i, software_device); if (SUCCEEDED(hr) || hr == DDERR_INVALIDPIXELFORMAT) expected_rt = rt; @@ -6936,24 +6936,24 @@ static void test_rt_caps(const GUID *device_guid) expected_rt = surface;
hr = IDirect3DDevice3_GetRenderTarget(device, &tmp); - ok(hr == DD_OK, "Got unexpected hr %#x, test %u, software_device %u.\n", hr, i, software_device); + ok(hr == DD_OK, "Got unexpected hr %#lx, test %u, software_device %u.\n", hr, i, software_device); ok(tmp == expected_rt, "Got unexpected rt %p, test %u, software_device %u.\n", tmp, i, software_device);
IDirectDrawSurface4_Release(tmp); IDirectDrawSurface4_Release(rt); refcount = IDirect3DDevice3_Release(device); - ok(refcount == 0, "Test %u: The device was not properly freed, refcount %u.\n", i, refcount); + ok(refcount == 0, "Test %u: The device was not properly freed, refcount %lu.\n", i, refcount); refcount = IDirectDrawSurface4_Release(surface); - ok(refcount == 0, "Test %u: The surface was not properly freed, refcount %u.\n", i, refcount); + ok(refcount == 0, "Test %u: The surface was not properly freed, refcount %lu.\n", i, refcount); }
refcount = IDirectDrawPalette_Release(palette); - ok(!refcount, "Got unexpected refcount %u.\n", refcount); + ok(!refcount, "Got unexpected refcount %lu.\n", refcount); IDirect3D3_Release(d3d);
done: refcount = IDirectDraw4_Release(ddraw); - ok(refcount == 0, "The ddraw object was not properly freed, refcount %u.\n", refcount); + ok(refcount == 0, "The ddraw object was not properly freed, refcount %lu.\n", refcount); DestroyWindow(window); }
@@ -7078,7 +7078,7 @@ static void test_primary_caps(void) for (i = 0; i < ARRAY_SIZE(test_data); ++i) { hr = IDirectDraw4_SetCooperativeLevel(ddraw, window, test_data[i].coop_level); - ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#lx.\n", hr);
memset(&surface_desc, 0, sizeof(surface_desc)); surface_desc.dwSize = sizeof(surface_desc); @@ -7088,23 +7088,23 @@ static void test_primary_caps(void) surface_desc.ddsCaps.dwCaps = test_data[i].caps_in; U5(surface_desc).dwBackBufferCount = test_data[i].back_buffer_count; hr = IDirectDraw4_CreateSurface(ddraw, &surface_desc, &surface, NULL); - ok(hr == test_data[i].hr, "Test %u: Got unexpected hr %#x, expected %#x.\n", i, hr, test_data[i].hr); + ok(hr == test_data[i].hr, "Test %u: Got unexpected hr %#lx, expected %#lx.\n", i, hr, test_data[i].hr); if (FAILED(hr)) continue;
memset(&surface_desc, 0, sizeof(surface_desc)); surface_desc.dwSize = sizeof(surface_desc); hr = IDirectDrawSurface4_GetSurfaceDesc(surface, &surface_desc); - ok(SUCCEEDED(hr), "Test %u: Failed to get surface desc, hr %#x.\n", i, hr); + ok(SUCCEEDED(hr), "Test %u: Failed to get surface desc, hr %#lx.\n", i, hr); ok((surface_desc.ddsCaps.dwCaps & ~placement) == test_data[i].caps_out, - "Test %u: Got unexpected caps %#x, expected %#x.\n", + "Test %u: Got unexpected caps %#lx, expected %#lx.\n", i, surface_desc.ddsCaps.dwCaps, test_data[i].caps_out);
IDirectDrawSurface4_Release(surface); }
refcount = IDirectDraw4_Release(ddraw); - ok(refcount == 0, "The ddraw object was not properly freed, refcount %u.\n", refcount); + ok(refcount == 0, "The ddraw object was not properly freed, refcount %lu.\n", refcount); DestroyWindow(window); }
@@ -7193,7 +7193,7 @@ static void test_surface_lock(void) ddraw = create_ddraw(); ok(!!ddraw, "Failed to create a ddraw object.\n"); hr = IDirectDraw4_SetCooperativeLevel(ddraw, window, DDSCL_NORMAL); - ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#lx.\n", hr);
if (FAILED(IDirectDraw4_QueryInterface(ddraw, &IID_IDirect3D3, (void **)&d3d))) { @@ -7229,21 +7229,21 @@ static void test_surface_lock(void) ddsd.ddsCaps.dwCaps2 = tests[i].caps2;
hr = IDirectDraw4_CreateSurface(ddraw, &ddsd, &surface, NULL); - ok(SUCCEEDED(hr), "Failed to create surface, type %s, hr %#x.\n", tests[i].name, hr); + ok(SUCCEEDED(hr), "Failed to create surface, type %s, hr %#lx.\n", tests[i].name, hr);
memset(&ddsd, 0, sizeof(ddsd)); ddsd.dwSize = sizeof(ddsd); hr = IDirectDrawSurface4_Lock(surface, NULL, &ddsd, DDLOCK_WAIT, NULL); - ok(SUCCEEDED(hr), "Failed to lock surface, type %s, hr %#x.\n", tests[i].name, hr); + ok(SUCCEEDED(hr), "Failed to lock surface, type %s, hr %#lx.\n", tests[i].name, hr); if (SUCCEEDED(hr)) { hr = IDirectDrawSurface4_Unlock(surface, NULL); - ok(SUCCEEDED(hr), "Failed to unlock surface, type %s, hr %#x.\n", tests[i].name, hr); + ok(SUCCEEDED(hr), "Failed to unlock surface, type %s, hr %#lx.\n", tests[i].name, hr); }
memset(&ddsd, 0, sizeof(ddsd)); hr = IDirectDrawSurface4_Lock(surface, NULL, &ddsd, DDLOCK_WAIT, NULL); - ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#x, type %s.\n", hr, tests[i].name); + ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#lx, type %s.\n", hr, tests[i].name);
IDirectDrawSurface4_Release(surface); } @@ -7252,7 +7252,7 @@ done: if (d3d) IDirect3D3_Release(d3d); refcount = IDirectDraw4_Release(ddraw); - ok(refcount == 0, "The ddraw object was not properly freed, refcount %u.\n", refcount); + ok(refcount == 0, "The ddraw object was not properly freed, refcount %lu.\n", refcount); DestroyWindow(window); }
@@ -7304,11 +7304,11 @@ static void test_surface_discard(void) return; } hr = IDirect3DDevice3_GetDirect3D(device, &d3d); - ok(SUCCEEDED(hr), "Failed to get d3d interface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get d3d interface, hr %#lx.\n", hr); hr = IDirect3D3_QueryInterface(d3d, &IID_IDirectDraw4, (void **)&ddraw); - ok(SUCCEEDED(hr), "Failed to get ddraw interface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get ddraw interface, hr %#lx.\n", hr); hr = IDirect3DDevice3_GetRenderTarget(device, &target); - ok(SUCCEEDED(hr), "Failed to get render target, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get render target, hr %#lx.\n", hr);
memset(&ddsd, 0, sizeof(ddsd)); ddsd.dwSize = sizeof(ddsd); @@ -7318,34 +7318,34 @@ static void test_surface_discard(void) ddsd.dwWidth = 64; ddsd.dwHeight = 64; hr = IDirectDraw4_CreateSurface(ddraw, &ddsd, &surface, NULL); - ok(SUCCEEDED(hr), "Failed to create offscreen surface, hr %#x, case %u.\n", hr, i); + ok(SUCCEEDED(hr), "Failed to create offscreen surface, hr %#lx, case %u.\n", hr, i);
memset(&ddsd, 0, sizeof(ddsd)); ddsd.dwSize = sizeof(ddsd); hr = IDirectDrawSurface4_Lock(surface, NULL, &ddsd, 0, NULL); - ok(SUCCEEDED(hr), "Failed to lock surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to lock surface, hr %#lx.\n", hr); addr = ddsd.lpSurface; hr = IDirectDrawSurface4_Unlock(surface, NULL); - ok(SUCCEEDED(hr), "Failed to unlock surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to unlock surface, hr %#lx.\n", hr);
memset(&ddsd, 0, sizeof(ddsd)); ddsd.dwSize = sizeof(ddsd); hr = IDirectDrawSurface4_Lock(surface, NULL, &ddsd, DDLOCK_DISCARDCONTENTS, NULL); - ok(SUCCEEDED(hr), "Failed to lock surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to lock surface, hr %#lx.\n", hr); discarded = ddsd.lpSurface != addr; hr = IDirectDrawSurface4_Unlock(surface, NULL); - ok(SUCCEEDED(hr), "Failed to unlock surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to unlock surface, hr %#lx.\n", hr);
hr = IDirectDrawSurface4_Blt(target, NULL, surface, NULL, DDBLT_WAIT, NULL); - ok(SUCCEEDED(hr), "Failed to blit, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to blit, hr %#lx.\n", hr);
memset(&ddsd, 0, sizeof(ddsd)); ddsd.dwSize = sizeof(ddsd); hr = IDirectDrawSurface4_Lock(surface, NULL, &ddsd, DDLOCK_DISCARDCONTENTS, NULL); - ok(SUCCEEDED(hr), "Failed to lock surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to lock surface, hr %#lx.\n", hr); discarded |= ddsd.lpSurface != addr; hr = IDirectDrawSurface4_Unlock(surface, NULL); - ok(SUCCEEDED(hr), "Failed to unlock surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to unlock surface, hr %#lx.\n", hr);
IDirectDrawSurface4_Release(surface);
@@ -7394,7 +7394,7 @@ static void test_flip(void) ok(!!ddraw, "Failed to create a ddraw object.\n");
hr = IDirectDraw4_SetCooperativeLevel(ddraw, window, DDSCL_EXCLUSIVE | DDSCL_FULLSCREEN); - ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#lx.\n", hr);
for (i = 0; i < ARRAY_SIZE(test_data); ++i) { @@ -7417,93 +7417,93 @@ static void test_flip(void) surface_desc.dwHeight = 512; U5(surface_desc).dwBackBufferCount = 3; hr = IDirectDraw4_CreateSurface(ddraw, &surface_desc, &frontbuffer, NULL); - ok(hr == DDERR_INVALIDCAPS, "%s: Got unexpected hr %#x.\n", test_data[i].name, hr); + ok(hr == DDERR_INVALIDCAPS, "%s: Got unexpected hr %#lx.\n", test_data[i].name, hr);
surface_desc.ddsCaps.dwCaps &= ~DDSCAPS_FLIP; surface_desc.dwFlags |= DDSD_BACKBUFFERCOUNT; hr = IDirectDraw4_CreateSurface(ddraw, &surface_desc, &frontbuffer, NULL); - ok(hr == DDERR_INVALIDCAPS, "%s: Got unexpected hr %#x.\n", test_data[i].name, hr); + ok(hr == DDERR_INVALIDCAPS, "%s: Got unexpected hr %#lx.\n", test_data[i].name, hr);
surface_desc.ddsCaps.dwCaps &= ~DDSCAPS_COMPLEX; surface_desc.ddsCaps.dwCaps |= DDSCAPS_FLIP; hr = IDirectDraw4_CreateSurface(ddraw, &surface_desc, &frontbuffer, NULL); - ok(hr == DDERR_INVALIDCAPS, "%s: Got unexpected hr %#x.\n", test_data[i].name, hr); + ok(hr == DDERR_INVALIDCAPS, "%s: Got unexpected hr %#lx.\n", test_data[i].name, hr);
surface_desc.ddsCaps.dwCaps |= DDSCAPS_COMPLEX; hr = IDirectDraw4_CreateSurface(ddraw, &surface_desc, &frontbuffer, NULL); todo_wine_if(test_data[i].caps & DDSCAPS_TEXTURE) - ok(SUCCEEDED(hr), "%s: Failed to create surface, hr %#x.\n", test_data[i].name, hr); + ok(SUCCEEDED(hr), "%s: Failed to create surface, hr %#lx.\n", test_data[i].name, hr); if (FAILED(hr)) continue;
memset(&surface_desc, 0, sizeof(surface_desc)); surface_desc.dwSize = sizeof(surface_desc); hr = IDirectDrawSurface4_GetSurfaceDesc(frontbuffer, &surface_desc); - ok(SUCCEEDED(hr), "%s: Failed to get surface desc, hr %#x.\n", test_data[i].name, hr); + ok(SUCCEEDED(hr), "%s: Failed to get surface desc, hr %#lx.\n", test_data[i].name, hr); expected_caps = DDSCAPS_FRONTBUFFER | DDSCAPS_COMPLEX | DDSCAPS_FLIP | test_data[i].caps; if (test_data[i].caps & DDSCAPS_PRIMARYSURFACE) expected_caps |= DDSCAPS_VISIBLE; ok((surface_desc.ddsCaps.dwCaps & ~placement) == expected_caps, - "%s: Got unexpected caps %#x.\n", test_data[i].name, surface_desc.ddsCaps.dwCaps); + "%s: Got unexpected caps %#lx.\n", test_data[i].name, surface_desc.ddsCaps.dwCaps); sysmem_primary = surface_desc.ddsCaps.dwCaps & DDSCAPS_SYSTEMMEMORY;
hr = IDirectDrawSurface4_GetAttachedSurface(frontbuffer, &caps, &backbuffer1); - ok(SUCCEEDED(hr), "%s: Failed to get attached surface, hr %#x.\n", test_data[i].name, hr); + ok(SUCCEEDED(hr), "%s: Failed to get attached surface, hr %#lx.\n", test_data[i].name, hr); memset(&surface_desc, 0, sizeof(surface_desc)); surface_desc.dwSize = sizeof(surface_desc); hr = IDirectDrawSurface4_GetSurfaceDesc(backbuffer1, &surface_desc); - ok(SUCCEEDED(hr), "%s: Failed to get surface desc, hr %#x.\n", test_data[i].name, hr); - ok(!U5(surface_desc).dwBackBufferCount, "%s: Got unexpected back buffer count %u.\n", + ok(SUCCEEDED(hr), "%s: Failed to get surface desc, hr %#lx.\n", test_data[i].name, hr); + ok(!U5(surface_desc).dwBackBufferCount, "%s: Got unexpected back buffer count %lu.\n", test_data[i].name, U5(surface_desc).dwBackBufferCount); expected_caps &= ~(DDSCAPS_VISIBLE | DDSCAPS_PRIMARYSURFACE | DDSCAPS_FRONTBUFFER); expected_caps |= DDSCAPS_BACKBUFFER; ok((surface_desc.ddsCaps.dwCaps & ~placement) == expected_caps, - "%s: Got unexpected caps %#x.\n", test_data[i].name, surface_desc.ddsCaps.dwCaps); + "%s: Got unexpected caps %#lx.\n", test_data[i].name, surface_desc.ddsCaps.dwCaps);
hr = IDirectDrawSurface4_GetAttachedSurface(backbuffer1, &caps, &backbuffer2); - ok(SUCCEEDED(hr), "%s: Failed to get attached surface, hr %#x.\n", test_data[i].name, hr); + ok(SUCCEEDED(hr), "%s: Failed to get attached surface, hr %#lx.\n", test_data[i].name, hr); memset(&surface_desc, 0, sizeof(surface_desc)); surface_desc.dwSize = sizeof(surface_desc); hr = IDirectDrawSurface4_GetSurfaceDesc(backbuffer2, &surface_desc); - ok(SUCCEEDED(hr), "%s: Failed to get surface desc, hr %#x.\n", test_data[i].name, hr); - ok(!U5(surface_desc).dwBackBufferCount, "%s: Got unexpected back buffer count %u.\n", + ok(SUCCEEDED(hr), "%s: Failed to get surface desc, hr %#lx.\n", test_data[i].name, hr); + ok(!U5(surface_desc).dwBackBufferCount, "%s: Got unexpected back buffer count %lu.\n", test_data[i].name, U5(surface_desc).dwBackBufferCount); expected_caps &= ~DDSCAPS_BACKBUFFER; ok((surface_desc.ddsCaps.dwCaps & ~placement) == expected_caps, - "%s: Got unexpected caps %#x.\n", test_data[i].name, surface_desc.ddsCaps.dwCaps); + "%s: Got unexpected caps %#lx.\n", test_data[i].name, surface_desc.ddsCaps.dwCaps);
hr = IDirectDrawSurface4_GetAttachedSurface(backbuffer2, &caps, &backbuffer3); - ok(SUCCEEDED(hr), "%s: Failed to get attached surface, hr %#x.\n", test_data[i].name, hr); + ok(SUCCEEDED(hr), "%s: Failed to get attached surface, hr %#lx.\n", test_data[i].name, hr); memset(&surface_desc, 0, sizeof(surface_desc)); surface_desc.dwSize = sizeof(surface_desc); hr = IDirectDrawSurface4_GetSurfaceDesc(backbuffer3, &surface_desc); - ok(SUCCEEDED(hr), "%s: Failed to get surface desc, hr %#x.\n", test_data[i].name, hr); - ok(!U5(surface_desc).dwBackBufferCount, "%s: Got unexpected back buffer count %u.\n", + ok(SUCCEEDED(hr), "%s: Failed to get surface desc, hr %#lx.\n", test_data[i].name, hr); + ok(!U5(surface_desc).dwBackBufferCount, "%s: Got unexpected back buffer count %lu.\n", test_data[i].name, U5(surface_desc).dwBackBufferCount); ok((surface_desc.ddsCaps.dwCaps & ~placement) == expected_caps, - "%s: Got unexpected caps %#x.\n", test_data[i].name, surface_desc.ddsCaps.dwCaps); + "%s: Got unexpected caps %#lx.\n", test_data[i].name, surface_desc.ddsCaps.dwCaps);
hr = IDirectDrawSurface4_GetAttachedSurface(backbuffer3, &caps, &surface); - ok(SUCCEEDED(hr), "%s: Failed to get attached surface, hr %#x.\n", test_data[i].name, hr); + ok(SUCCEEDED(hr), "%s: Failed to get attached surface, hr %#lx.\n", test_data[i].name, hr); ok(surface == frontbuffer, "%s: Got unexpected surface %p, expected %p.\n", test_data[i].name, surface, frontbuffer); IDirectDrawSurface4_Release(surface);
hr = IDirectDraw4_SetCooperativeLevel(ddraw, window, DDSCL_NORMAL | DDSCL_FULLSCREEN); - ok(SUCCEEDED(hr), "%s: Failed to set cooperative level, hr %#x.\n", test_data[i].name, hr); + ok(SUCCEEDED(hr), "%s: Failed to set cooperative level, hr %#lx.\n", test_data[i].name, hr); hr = IDirectDrawSurface4_IsLost(frontbuffer); - ok(hr == DD_OK, "%s: Got unexpected hr %#x.\n", test_data[i].name, hr); + ok(hr == DD_OK, "%s: Got unexpected hr %#lx.\n", test_data[i].name, hr); hr = IDirectDrawSurface4_Flip(frontbuffer, NULL, DDFLIP_WAIT); if (test_data[i].caps & DDSCAPS_PRIMARYSURFACE) - ok(hr == DDERR_NOEXCLUSIVEMODE, "%s: Got unexpected hr %#x.\n", test_data[i].name, hr); + ok(hr == DDERR_NOEXCLUSIVEMODE, "%s: Got unexpected hr %#lx.\n", test_data[i].name, hr); else - ok(SUCCEEDED(hr), "%s: Failed to flip, hr %#x.\n", test_data[i].name, hr); + ok(SUCCEEDED(hr), "%s: Failed to flip, hr %#lx.\n", test_data[i].name, hr); hr = IDirectDraw4_SetCooperativeLevel(ddraw, window, DDSCL_EXCLUSIVE | DDSCL_FULLSCREEN); - ok(SUCCEEDED(hr), "%s: Failed to set cooperative level, hr %#x.\n", test_data[i].name, hr); + ok(SUCCEEDED(hr), "%s: Failed to set cooperative level, hr %#lx.\n", test_data[i].name, hr); hr = IDirectDrawSurface4_IsLost(frontbuffer); - todo_wine ok(hr == DDERR_SURFACELOST, "%s: Got unexpected hr %#x.\n", test_data[i].name, hr); + todo_wine ok(hr == DDERR_SURFACELOST, "%s: Got unexpected hr %#lx.\n", test_data[i].name, hr); hr = IDirectDraw4_RestoreAllSurfaces(ddraw); - ok(SUCCEEDED(hr), "%s: Failed to restore surfaces, hr %#x.\n", test_data[i].name, hr); + ok(SUCCEEDED(hr), "%s: Failed to restore surfaces, hr %#lx.\n", test_data[i].name, hr);
memset(&surface_desc, 0, sizeof(surface_desc)); surface_desc.dwSize = sizeof(surface_desc); @@ -7512,19 +7512,19 @@ static void test_flip(void) surface_desc.dwWidth = 640; surface_desc.dwHeight = 480; hr = IDirectDraw4_CreateSurface(ddraw, &surface_desc, &surface, NULL); - ok(SUCCEEDED(hr), "%s: Failed to create surface, hr %#x.\n", test_data[i].name, hr); + ok(SUCCEEDED(hr), "%s: Failed to create surface, hr %#lx.\n", test_data[i].name, hr); hr = IDirectDrawSurface4_Flip(frontbuffer, surface, DDFLIP_WAIT); - ok(hr == DDERR_NOTFLIPPABLE, "%s: Got unexpected hr %#x.\n", test_data[i].name, hr); + ok(hr == DDERR_NOTFLIPPABLE, "%s: Got unexpected hr %#lx.\n", test_data[i].name, hr); IDirectDrawSurface4_Release(surface);
hr = IDirectDrawSurface4_Flip(frontbuffer, frontbuffer, DDFLIP_WAIT); - ok(hr == DDERR_NOTFLIPPABLE, "%s: Got unexpected hr %#x.\n", test_data[i].name, hr); + ok(hr == DDERR_NOTFLIPPABLE, "%s: Got unexpected hr %#lx.\n", test_data[i].name, hr); hr = IDirectDrawSurface4_Flip(backbuffer1, NULL, DDFLIP_WAIT); - ok(hr == DDERR_NOTFLIPPABLE, "%s: Got unexpected hr %#x.\n", test_data[i].name, hr); + ok(hr == DDERR_NOTFLIPPABLE, "%s: Got unexpected hr %#lx.\n", test_data[i].name, hr); hr = IDirectDrawSurface4_Flip(backbuffer2, NULL, DDFLIP_WAIT); - ok(hr == DDERR_NOTFLIPPABLE, "%s: Got unexpected hr %#x.\n", test_data[i].name, hr); + ok(hr == DDERR_NOTFLIPPABLE, "%s: Got unexpected hr %#lx.\n", test_data[i].name, hr); hr = IDirectDrawSurface4_Flip(backbuffer3, NULL, DDFLIP_WAIT); - ok(hr == DDERR_NOTFLIPPABLE, "%s: Got unexpected hr %#x.\n", test_data[i].name, hr); + ok(hr == DDERR_NOTFLIPPABLE, "%s: Got unexpected hr %#lx.\n", test_data[i].name, hr);
/* The Nvidia Geforce 7 driver cannot do a color fill on a texture backbuffer after * the backbuffer has been locked. Do it ourselves as a workaround. Unlike ddraw1 @@ -7534,59 +7534,59 @@ static void test_flip(void) fill_surface(backbuffer3, 0xff0000ff);
hr = IDirectDrawSurface4_Flip(frontbuffer, NULL, DDFLIP_WAIT); - ok(SUCCEEDED(hr), "%s: Failed to flip, hr %#x.\n", test_data[i].name, hr); + ok(SUCCEEDED(hr), "%s: Failed to flip, hr %#lx.\n", test_data[i].name, hr); color = get_surface_color(backbuffer1, 320, 240); /* The testbot seems to just copy the contents of one surface to all the * others, instead of properly flipping. */ ok(compare_color(color, 0x0000ff00, 1) || broken(sysmem_primary && compare_color(color, 0x000000ff, 1)), - "%s: Got unexpected color 0x%08x.\n", test_data[i].name, color); + "%s: Got unexpected color 0x%08lx.\n", test_data[i].name, color); color = get_surface_color(backbuffer2, 320, 240); - ok(compare_color(color, 0x000000ff, 1), "%s: Got unexpected color 0x%08x.\n", test_data[i].name, color); + ok(compare_color(color, 0x000000ff, 1), "%s: Got unexpected color 0x%08lx.\n", test_data[i].name, color); fill_surface(backbuffer3, 0xffff0000);
hr = IDirectDrawSurface4_Flip(frontbuffer, NULL, DDFLIP_WAIT); - ok(SUCCEEDED(hr), "%s: Failed to flip, hr %#x.\n", test_data[i].name, hr); + ok(SUCCEEDED(hr), "%s: Failed to flip, hr %#lx.\n", test_data[i].name, hr); color = get_surface_color(backbuffer1, 320, 240); ok(compare_color(color, 0x000000ff, 1) || broken(sysmem_primary && compare_color(color, 0x00ff0000, 1)), - "%s: Got unexpected color 0x%08x.\n", test_data[i].name, color); + "%s: Got unexpected color 0x%08lx.\n", test_data[i].name, color); color = get_surface_color(backbuffer2, 320, 240); - ok(compare_color(color, 0x00ff0000, 1), "%s: Got unexpected color 0x%08x.\n", test_data[i].name, color); + ok(compare_color(color, 0x00ff0000, 1), "%s: Got unexpected color 0x%08lx.\n", test_data[i].name, color); fill_surface(backbuffer3, 0xff00ff00);
hr = IDirectDrawSurface4_Flip(frontbuffer, NULL, DDFLIP_WAIT); - ok(SUCCEEDED(hr), "%s: Failed to flip, hr %#x.\n", test_data[i].name, hr); + ok(SUCCEEDED(hr), "%s: Failed to flip, hr %#lx.\n", test_data[i].name, hr); color = get_surface_color(backbuffer1, 320, 240); ok(compare_color(color, 0x00ff0000, 1) || broken(sysmem_primary && compare_color(color, 0x0000ff00, 1)), - "%s: Got unexpected color 0x%08x.\n", test_data[i].name, color); + "%s: Got unexpected color 0x%08lx.\n", test_data[i].name, color); color = get_surface_color(backbuffer2, 320, 240); - ok(compare_color(color, 0x0000ff00, 1), "%s: Got unexpected color 0x%08x.\n", test_data[i].name, color); + ok(compare_color(color, 0x0000ff00, 1), "%s: Got unexpected color 0x%08lx.\n", test_data[i].name, color); fill_surface(backbuffer3, 0xff0000ff);
hr = IDirectDrawSurface4_Flip(frontbuffer, backbuffer1, DDFLIP_WAIT); - ok(SUCCEEDED(hr), "%s: Failed to flip, hr %#x.\n", test_data[i].name, hr); + ok(SUCCEEDED(hr), "%s: Failed to flip, hr %#lx.\n", test_data[i].name, hr); color = get_surface_color(backbuffer2, 320, 240); ok(compare_color(color, 0x0000ff00, 1) || broken(sysmem_primary && compare_color(color, 0x000000ff, 1)), - "%s: Got unexpected color 0x%08x.\n", test_data[i].name, color); + "%s: Got unexpected color 0x%08lx.\n", test_data[i].name, color); color = get_surface_color(backbuffer3, 320, 240); - ok(compare_color(color, 0x000000ff, 1), "%s: Got unexpected color 0x%08x.\n", test_data[i].name, color); + ok(compare_color(color, 0x000000ff, 1), "%s: Got unexpected color 0x%08lx.\n", test_data[i].name, color); fill_surface(backbuffer1, 0xffff0000);
hr = IDirectDrawSurface4_Flip(frontbuffer, backbuffer2, DDFLIP_WAIT); - ok(SUCCEEDED(hr), "%s: Failed to flip, hr %#x.\n", test_data[i].name, hr); + ok(SUCCEEDED(hr), "%s: Failed to flip, hr %#lx.\n", test_data[i].name, hr); color = get_surface_color(backbuffer1, 320, 240); - ok(compare_color(color, 0x00ff0000, 1), "%s: Got unexpected color 0x%08x.\n", test_data[i].name, color); + ok(compare_color(color, 0x00ff0000, 1), "%s: Got unexpected color 0x%08lx.\n", test_data[i].name, color); color = get_surface_color(backbuffer3, 320, 240); ok(compare_color(color, 0x000000ff, 1) || broken(sysmem_primary && compare_color(color, 0x00ff0000, 1)), - "%s: Got unexpected color 0x%08x.\n", test_data[i].name, color); + "%s: Got unexpected color 0x%08lx.\n", test_data[i].name, color); fill_surface(backbuffer2, 0xff00ff00);
hr = IDirectDrawSurface4_Flip(frontbuffer, backbuffer3, DDFLIP_WAIT); - ok(SUCCEEDED(hr), "%s: Failed to flip, hr %#x.\n", test_data[i].name, hr); + ok(SUCCEEDED(hr), "%s: Failed to flip, hr %#lx.\n", test_data[i].name, hr); color = get_surface_color(backbuffer1, 320, 240); ok(compare_color(color, 0x00ff0000, 1) || broken(sysmem_primary && compare_color(color, 0x0000ff00, 1)), - "%s: Got unexpected color 0x%08x.\n", test_data[i].name, color); + "%s: Got unexpected color 0x%08lx.\n", test_data[i].name, color); color = get_surface_color(backbuffer2, 320, 240); - ok(compare_color(color, 0x0000ff00, 1), "%s: Got unexpected color 0x%08x.\n", test_data[i].name, color); + ok(compare_color(color, 0x0000ff00, 1), "%s: Got unexpected color 0x%08lx.\n", test_data[i].name, color);
IDirectDrawSurface4_Release(backbuffer3); IDirectDrawSurface4_Release(backbuffer2); @@ -7595,7 +7595,7 @@ static void test_flip(void) }
refcount = IDirectDraw4_Release(ddraw); - ok(refcount == 0, "The ddraw object was not properly freed, refcount %u.\n", refcount); + ok(refcount == 0, "The ddraw object was not properly freed, refcount %lu.\n", refcount); DestroyWindow(window); }
@@ -7634,7 +7634,7 @@ static void test_set_surface_desc(void) ddraw = create_ddraw(); ok(!!ddraw, "Failed to create a ddraw object.\n"); hr = IDirectDraw4_SetCooperativeLevel(ddraw, window, DDSCL_NORMAL); - ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#lx.\n", hr);
reset_ddsd(&ddsd); ddsd.dwFlags = DDSD_WIDTH | DDSD_HEIGHT | DDSD_CAPS | DDSD_PIXELFORMAT; @@ -7649,73 +7649,73 @@ static void test_set_surface_desc(void) ddsd.ddsCaps.dwCaps = DDSCAPS_SYSTEMMEMORY | DDSCAPS_OFFSCREENPLAIN;
hr = IDirectDraw4_CreateSurface(ddraw, &ddsd, &surface, NULL); - ok(SUCCEEDED(hr), "Failed to create surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create surface, hr %#lx.\n", hr);
reset_ddsd(&ddsd); ddsd.dwFlags = DDSD_LPSURFACE; ddsd.lpSurface = data; hr = IDirectDrawSurface4_SetSurfaceDesc(surface, &ddsd, 0); - ok(SUCCEEDED(hr), "Failed to set surface desc, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set surface desc, hr %#lx.\n", hr);
/* Redundantly setting the same lpSurface is not an error. */ hr = IDirectDrawSurface4_SetSurfaceDesc(surface, &ddsd, 0); - ok(SUCCEEDED(hr), "Failed to set surface desc, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set surface desc, hr %#lx.\n", hr); hr = IDirectDrawSurface4_GetSurfaceDesc(surface, &ddsd); - ok(SUCCEEDED(hr), "Failed to get surface desc, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get surface desc, hr %#lx.\n", hr); ok(!(ddsd.dwFlags & DDSD_LPSURFACE), "DDSD_LPSURFACE is set.\n"); ok(ddsd.lpSurface == NULL, "lpSurface is %p, expected NULL.\n", ddsd.lpSurface);
hr = IDirectDrawSurface4_Lock(surface, NULL, &ddsd, 0, NULL); - ok(SUCCEEDED(hr), "Failed to lock surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to lock surface, hr %#lx.\n", hr); ok(!(ddsd.dwFlags & DDSD_LPSURFACE), "DDSD_LPSURFACE is set.\n"); ok(ddsd.lpSurface == data, "lpSurface is %p, expected %p.\n", data, data); hr = IDirectDrawSurface4_Unlock(surface, NULL); - ok(SUCCEEDED(hr), "Failed to unlock surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to unlock surface, hr %#lx.\n", hr);
reset_ddsd(&ddsd); ddsd.dwFlags = DDSD_LPSURFACE; ddsd.lpSurface = data; hr = IDirectDrawSurface4_SetSurfaceDesc(surface, &ddsd, 1); - ok(hr == DDERR_INVALIDPARAMS, "SetSurfaceDesc with flags=1 returned %#x.\n", hr); + ok(hr == DDERR_INVALIDPARAMS, "SetSurfaceDesc with flags=1 returned %#lx.\n", hr);
ddsd.lpSurface = NULL; hr = IDirectDrawSurface4_SetSurfaceDesc(surface, &ddsd, 0); - ok(hr == DDERR_INVALIDPARAMS, "Setting lpSurface=NULL returned %#x.\n", hr); + ok(hr == DDERR_INVALIDPARAMS, "Setting lpSurface=NULL returned %#lx.\n", hr);
hr = IDirectDrawSurface4_SetSurfaceDesc(surface, NULL, 0); - ok(hr == DDERR_INVALIDPARAMS, "SetSurfaceDesc with NULL desc returned %#x.\n", hr); + ok(hr == DDERR_INVALIDPARAMS, "SetSurfaceDesc with NULL desc returned %#lx.\n", hr);
hr = IDirectDrawSurface4_GetSurfaceDesc(surface, &ddsd); - ok(SUCCEEDED(hr), "Failed to get surface desc, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get surface desc, hr %#lx.\n", hr); ok(ddsd.ddsCaps.dwCaps == (DDSCAPS_SYSTEMMEMORY | DDSCAPS_OFFSCREENPLAIN), - "Got unexpected caps %#x.\n", ddsd.ddsCaps.dwCaps); + "Got unexpected caps %#lx.\n", ddsd.ddsCaps.dwCaps); ok(ddsd.ddsCaps.dwCaps2 == 0, "Got unexpected caps2 %#x.\n", 0);
/* Setting the caps is an error. This also means the original description cannot be reapplied. */ hr = IDirectDrawSurface4_SetSurfaceDesc(surface, &ddsd, 0); - ok(hr == DDERR_INVALIDPARAMS, "Setting the original desc returned %#x.\n", hr); + ok(hr == DDERR_INVALIDPARAMS, "Setting the original desc returned %#lx.\n", hr);
ddsd.dwFlags = DDSD_CAPS; hr = IDirectDrawSurface4_SetSurfaceDesc(surface, &ddsd, 0); - ok(hr == DDERR_INVALIDPARAMS, "Setting DDSD_CAPS returned %#x.\n", hr); + ok(hr == DDERR_INVALIDPARAMS, "Setting DDSD_CAPS returned %#lx.\n", hr);
/* dwCaps = 0 is allowed, but ignored. Caps2 can be anything and is ignored too. */ ddsd.dwFlags = DDSD_CAPS | DDSD_LPSURFACE; ddsd.lpSurface = data; hr = IDirectDrawSurface4_SetSurfaceDesc(surface, &ddsd, 0); - ok(hr == DDERR_INVALIDCAPS, "Setting DDSD_CAPS returned %#x.\n", hr); + ok(hr == DDERR_INVALIDCAPS, "Setting DDSD_CAPS returned %#lx.\n", hr); ddsd.ddsCaps.dwCaps = DDSCAPS_SYSTEMMEMORY | DDSCAPS_OFFSCREENPLAIN; hr = IDirectDrawSurface4_SetSurfaceDesc(surface, &ddsd, 0); - ok(hr == DDERR_INVALIDCAPS, "Setting DDSD_CAPS returned %#x.\n", hr); + ok(hr == DDERR_INVALIDCAPS, "Setting DDSD_CAPS returned %#lx.\n", hr); ddsd.ddsCaps.dwCaps = 0; ddsd.ddsCaps.dwCaps2 = 0xdeadbeef; hr = IDirectDrawSurface4_SetSurfaceDesc(surface, &ddsd, 0); - ok(SUCCEEDED(hr), "Failed to set surface desc, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set surface desc, hr %#lx.\n", hr);
hr = IDirectDrawSurface4_GetSurfaceDesc(surface, &ddsd); - ok(SUCCEEDED(hr), "Failed to get surface desc, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get surface desc, hr %#lx.\n", hr); ok(ddsd.ddsCaps.dwCaps == (DDSCAPS_SYSTEMMEMORY | DDSCAPS_OFFSCREENPLAIN), - "Got unexpected caps %#x.\n", ddsd.ddsCaps.dwCaps); + "Got unexpected caps %#lx.\n", ddsd.ddsCaps.dwCaps); ok(ddsd.ddsCaps.dwCaps2 == 0, "Got unexpected caps2 %#x.\n", 0);
/* Setting the height is allowed, but it cannot be set to 0, and only if LPSURFACE is set too. */ @@ -7723,56 +7723,56 @@ static void test_set_surface_desc(void) ddsd.dwFlags = DDSD_HEIGHT; ddsd.dwHeight = 16; hr = IDirectDrawSurface4_SetSurfaceDesc(surface, &ddsd, 0); - ok(hr == DDERR_INVALIDPARAMS, "Setting height without lpSurface returned %#x.\n", hr); + ok(hr == DDERR_INVALIDPARAMS, "Setting height without lpSurface returned %#lx.\n", hr);
ddsd.lpSurface = data; ddsd.dwFlags = DDSD_HEIGHT | DDSD_LPSURFACE; hr = IDirectDrawSurface4_SetSurfaceDesc(surface, &ddsd, 0); - ok(SUCCEEDED(hr), "Failed to set surface desc, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set surface desc, hr %#lx.\n", hr);
ddsd.dwHeight = 0; hr = IDirectDrawSurface4_SetSurfaceDesc(surface, &ddsd, 0); - ok(hr == DDERR_INVALIDPARAMS, "Setting height=0 returned %#x.\n", hr); + ok(hr == DDERR_INVALIDPARAMS, "Setting height=0 returned %#lx.\n", hr);
reset_ddsd(&ddsd); hr = IDirectDrawSurface4_GetSurfaceDesc(surface, &ddsd); - ok(SUCCEEDED(hr), "GetSurfaceDesc failed, hr %#x.\n", hr); - ok(ddsd.dwWidth == 8, "SetSurfaceDesc: Expected width 8, got %u.\n", ddsd.dwWidth); - ok(ddsd.dwHeight == 16, "SetSurfaceDesc: Expected height 16, got %u.\n", ddsd.dwHeight); + ok(SUCCEEDED(hr), "GetSurfaceDesc failed, hr %#lx.\n", hr); + ok(ddsd.dwWidth == 8, "SetSurfaceDesc: Expected width 8, got %lu.\n", ddsd.dwWidth); + ok(ddsd.dwHeight == 16, "SetSurfaceDesc: Expected height 16, got %lu.\n", ddsd.dwHeight);
/* Pitch and width can be set, but only together, and only with LPSURFACE. They must not be 0 */ reset_ddsd(&ddsd); ddsd.dwFlags = DDSD_PITCH; U1(ddsd).lPitch = 8 * 4; hr = IDirectDrawSurface4_SetSurfaceDesc(surface, &ddsd, 0); - ok(hr == DDERR_INVALIDPARAMS, "Setting pitch without lpSurface or width returned %#x.\n", hr); + ok(hr == DDERR_INVALIDPARAMS, "Setting pitch without lpSurface or width returned %#lx.\n", hr);
ddsd.dwFlags = DDSD_WIDTH; ddsd.dwWidth = 16; hr = IDirectDrawSurface4_SetSurfaceDesc(surface, &ddsd, 0); - ok(hr == DDERR_INVALIDPARAMS, "Setting width without lpSurface or pitch returned %#x.\n", hr); + ok(hr == DDERR_INVALIDPARAMS, "Setting width without lpSurface or pitch returned %#lx.\n", hr);
ddsd.dwFlags = DDSD_PITCH | DDSD_LPSURFACE; ddsd.lpSurface = data; hr = IDirectDrawSurface4_SetSurfaceDesc(surface, &ddsd, 0); - ok(hr == DDERR_INVALIDPARAMS, "Setting pitch and lpSurface without width returned %#x.\n", hr); + ok(hr == DDERR_INVALIDPARAMS, "Setting pitch and lpSurface without width returned %#lx.\n", hr);
ddsd.dwFlags = DDSD_WIDTH | DDSD_LPSURFACE; hr = IDirectDrawSurface4_SetSurfaceDesc(surface, &ddsd, 0); - ok(hr == DDERR_INVALIDPARAMS, "Setting width and lpSurface without pitch returned %#x.\n", hr); + ok(hr == DDERR_INVALIDPARAMS, "Setting width and lpSurface without pitch returned %#lx.\n", hr);
ddsd.dwFlags = DDSD_WIDTH | DDSD_PITCH | DDSD_LPSURFACE; U1(ddsd).lPitch = 16 * 4; ddsd.dwWidth = 16; hr = IDirectDrawSurface4_SetSurfaceDesc(surface, &ddsd, 0); - ok(SUCCEEDED(hr), "Failed to set surface desc, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set surface desc, hr %#lx.\n", hr);
reset_ddsd(&ddsd); hr = IDirectDrawSurface4_GetSurfaceDesc(surface, &ddsd); - ok(SUCCEEDED(hr), "Failed to get surface desc, hr %#x.\n", hr); - ok(ddsd.dwWidth == 16, "SetSurfaceDesc: Expected width 8, got %u.\n", ddsd.dwWidth); - ok(ddsd.dwHeight == 16, "SetSurfaceDesc: Expected height 16, got %u.\n", ddsd.dwHeight); - ok(U1(ddsd).lPitch == 16 * 4, "SetSurfaceDesc: Expected pitch 64, got %u.\n", U1(ddsd).lPitch); + ok(SUCCEEDED(hr), "Failed to get surface desc, hr %#lx.\n", hr); + ok(ddsd.dwWidth == 16, "SetSurfaceDesc: Expected width 8, got %lu.\n", ddsd.dwWidth); + ok(ddsd.dwHeight == 16, "SetSurfaceDesc: Expected height 16, got %lu.\n", ddsd.dwHeight); + ok(U1(ddsd).lPitch == 16 * 4, "SetSurfaceDesc: Expected pitch 64, got %lu.\n", U1(ddsd).lPitch);
/* The pitch must be 32 bit aligned and > 0, but is not verified for sanity otherwise. * @@ -7781,27 +7781,27 @@ static void test_set_surface_desc(void) U1(ddsd).lPitch = 4 * 4; ddsd.lpSurface = data; hr = IDirectDrawSurface4_SetSurfaceDesc(surface, &ddsd, 0); - ok(SUCCEEDED(hr) || broken(hr == DDERR_INVALIDPARAMS), "Failed to set surface desc, hr %#x.\n", hr); + ok(SUCCEEDED(hr) || broken(hr == DDERR_INVALIDPARAMS), "Failed to set surface desc, hr %#lx.\n", hr);
U1(ddsd).lPitch = 4; hr = IDirectDrawSurface4_SetSurfaceDesc(surface, &ddsd, 0); - ok(SUCCEEDED(hr) || broken(hr == DDERR_INVALIDPARAMS), "Failed to set surface desc, hr %#x.\n", hr); + ok(SUCCEEDED(hr) || broken(hr == DDERR_INVALIDPARAMS), "Failed to set surface desc, hr %#lx.\n", hr);
U1(ddsd).lPitch = 16 * 4 + 1; hr = IDirectDrawSurface4_SetSurfaceDesc(surface, &ddsd, 0); - ok(hr == DDERR_INVALIDPARAMS, "Setting misaligned pitch returned %#x.\n", hr); + ok(hr == DDERR_INVALIDPARAMS, "Setting misaligned pitch returned %#lx.\n", hr);
U1(ddsd).lPitch = 16 * 4 + 3; hr = IDirectDrawSurface4_SetSurfaceDesc(surface, &ddsd, 0); - ok(hr == DDERR_INVALIDPARAMS, "Setting misaligned pitch returned %#x.\n", hr); + ok(hr == DDERR_INVALIDPARAMS, "Setting misaligned pitch returned %#lx.\n", hr);
U1(ddsd).lPitch = -4; hr = IDirectDrawSurface4_SetSurfaceDesc(surface, &ddsd, 0); - ok(hr == DDERR_INVALIDPARAMS, "Setting negative pitch returned %#x.\n", hr); + ok(hr == DDERR_INVALIDPARAMS, "Setting negative pitch returned %#lx.\n", hr);
U1(ddsd).lPitch = 16 * 4; hr = IDirectDrawSurface4_SetSurfaceDesc(surface, &ddsd, 0); - ok(SUCCEEDED(hr), "Failed to set surface desc, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set surface desc, hr %#lx.\n", hr);
reset_ddsd(&ddsd); ddsd.dwFlags = DDSD_WIDTH | DDSD_PITCH | DDSD_LPSURFACE; @@ -7809,13 +7809,13 @@ static void test_set_surface_desc(void) ddsd.dwWidth = 16; ddsd.lpSurface = data; hr = IDirectDrawSurface4_SetSurfaceDesc(surface, &ddsd, 0); - ok(hr == DDERR_INVALIDPARAMS, "Setting zero pitch returned %#x.\n", hr); + ok(hr == DDERR_INVALIDPARAMS, "Setting zero pitch returned %#lx.\n", hr);
ddsd.dwFlags = DDSD_WIDTH | DDSD_PITCH | DDSD_LPSURFACE; U1(ddsd).lPitch = 16 * 4; ddsd.dwWidth = 0; hr = IDirectDrawSurface4_SetSurfaceDesc(surface, &ddsd, 0); - ok(hr == DDERR_INVALIDPARAMS, "Setting zero width returned %#x.\n", hr); + ok(hr == DDERR_INVALIDPARAMS, "Setting zero width returned %#lx.\n", hr);
/* Setting the pixelformat without LPSURFACE is an error, but with LPSURFACE it works. */ ddsd.dwFlags = DDSD_PIXELFORMAT; @@ -7826,11 +7826,11 @@ static void test_set_surface_desc(void) U3(U4(ddsd).ddpfPixelFormat).dwGBitMask = 0x0000ff00; U4(U4(ddsd).ddpfPixelFormat).dwBBitMask = 0x000000ff; hr = IDirectDrawSurface4_SetSurfaceDesc(surface, &ddsd, 0); - ok(hr == DDERR_INVALIDPARAMS, "Setting the pixel format returned %#x.\n", hr); + ok(hr == DDERR_INVALIDPARAMS, "Setting the pixel format returned %#lx.\n", hr);
ddsd.dwFlags = DDSD_PIXELFORMAT | DDSD_LPSURFACE; hr = IDirectDrawSurface4_SetSurfaceDesc(surface, &ddsd, 0); - ok(SUCCEEDED(hr), "Failed to set surface desc, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set surface desc, hr %#lx.\n", hr);
/* Can't set color keys. */ reset_ddsd(&ddsd); @@ -7838,12 +7838,12 @@ static void test_set_surface_desc(void) ddsd.ddckCKSrcBlt.dwColorSpaceLowValue = 0x00ff0000; ddsd.ddckCKSrcBlt.dwColorSpaceHighValue = 0x00ff0000; hr = IDirectDrawSurface4_SetSurfaceDesc(surface, &ddsd, 0); - ok(hr == DDERR_INVALIDPARAMS, "Setting ddckCKSrcBlt returned %#x.\n", hr); + ok(hr == DDERR_INVALIDPARAMS, "Setting ddckCKSrcBlt returned %#lx.\n", hr);
ddsd.dwFlags = DDSD_CKSRCBLT | DDSD_LPSURFACE; ddsd.lpSurface = data; hr = IDirectDrawSurface4_SetSurfaceDesc(surface, &ddsd, 0); - ok(hr == DDERR_INVALIDPARAMS, "Setting ddckCKSrcBlt returned %#x.\n", hr); + ok(hr == DDERR_INVALIDPARAMS, "Setting ddckCKSrcBlt returned %#lx.\n", hr);
IDirectDrawSurface4_Release(surface);
@@ -7856,7 +7856,7 @@ static void test_set_surface_desc(void) ddsd.ddsCaps.dwCaps = DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_COMPLEX | DDSCAPS_MIPMAP;
hr = IDirectDraw4_CreateSurface(ddraw, &ddsd, &surface, NULL); - ok(hr == DD_OK || hr == DDERR_NODIRECTDRAWHW || hr == E_NOINTERFACE, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK || hr == DDERR_NODIRECTDRAWHW || hr == E_NOINTERFACE, "Got unexpected hr %#lx.\n", hr);
if (FAILED(hr)) { @@ -7867,13 +7867,13 @@ static void test_set_surface_desc(void) /* Changing surface desc for mipmap fails even without changing any * parameters. */ hr = IDirectDrawSurface4_SetSurfaceDesc(surface, &ddsd, 0); - ok(hr == DDERR_INVALIDSURFACETYPE, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_INVALIDSURFACETYPE, "Got unexpected hr %#lx.\n", hr);
reset_ddsd(&ddsd); ddsd.dwFlags = DDSD_LPSURFACE; ddsd.lpSurface = data; hr = IDirectDrawSurface4_SetSurfaceDesc(surface, &ddsd, 0); - ok(hr == DDERR_INVALIDSURFACETYPE, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_INVALIDSURFACETYPE, "Got unexpected hr %#lx.\n", hr); IDirectDrawSurface4_Release(surface); }
@@ -7886,7 +7886,7 @@ static void test_set_surface_desc(void) ddsd.ddsCaps.dwCaps = DDSCAPS_TEXTURE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_COMPLEX | DDSCAPS_MIPMAP;
hr = IDirectDraw4_CreateSurface(ddraw, &ddsd, &surface, NULL); - ok(hr == DD_OK || hr == DDERR_NODIRECTDRAWHW || hr == E_NOINTERFACE, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK || hr == DDERR_NODIRECTDRAWHW || hr == E_NOINTERFACE, "Got unexpected hr %#lx.\n", hr);
if (hr == DD_OK) { @@ -7894,11 +7894,11 @@ static void test_set_surface_desc(void) IDirectDrawSurface4 *surface2;
hr = IDirectDrawSurface4_GetAttachedSurface(surface, &caps, &surface2); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); reset_ddsd(&ddsd); hr = IDirectDrawSurface4_GetSurfaceDesc(surface2, &ddsd); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); - ok(ddsd.dwWidth == 4, "Got unexpected dwWidth %u.\n", ddsd.dwWidth); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); + ok(ddsd.dwWidth == 4, "Got unexpected dwWidth %lu.\n", ddsd.dwWidth);
reset_ddsd(&ddsd); ddsd.dwFlags = DDSD_WIDTH | DDSD_HEIGHT | DDSD_PITCH | DDSD_LPSURFACE; @@ -7907,7 +7907,7 @@ static void test_set_surface_desc(void) U1(ddsd).lPitch = 16 * 4; ddsd.lpSurface = data; hr = IDirectDrawSurface4_SetSurfaceDesc(surface, &ddsd, 0); - todo_wine ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + todo_wine ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr);
reset_ddsd(&ddsd); ddsd.dwFlags = DDSD_WIDTH | DDSD_HEIGHT | DDSD_PITCH | DDSD_LPSURFACE; @@ -7916,13 +7916,13 @@ static void test_set_surface_desc(void) U1(ddsd).lPitch = 8 * 4; ddsd.lpSurface = data; hr = IDirectDrawSurface4_SetSurfaceDesc(surface, &ddsd, 0); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); if (0) { /* _Lock causes access violation on Windows. */ reset_ddsd(&ddsd); hr = IDirectDrawSurface4_Lock(surface2, NULL, &ddsd, DDLOCK_WAIT, NULL); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); IDirectDrawSurface4_Unlock(surface2, NULL); }
@@ -7933,12 +7933,12 @@ static void test_set_surface_desc(void) U1(ddsd).lPitch = 4 * 4; ddsd.lpSurface = data; hr = IDirectDrawSurface4_SetSurfaceDesc(surface2, &ddsd, 0); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr);
reset_ddsd(&ddsd); /* Does not crash now after setting user memory for the level. */ hr = IDirectDrawSurface4_Lock(surface2, NULL, &ddsd, DDLOCK_WAIT, NULL); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); ok(ddsd.lpSurface == data, "Got unexpected lpSurface %p.\n", ddsd.lpSurface); IDirectDrawSurface4_Unlock(surface2, NULL);
@@ -7949,7 +7949,7 @@ static void test_set_surface_desc(void) U1(ddsd).lPitch = 16 * 4; ddsd.lpSurface = data; hr = IDirectDrawSurface4_SetSurfaceDesc(surface2, &ddsd, 0); - todo_wine ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + todo_wine ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr);
IDirectDrawSurface4_Release(surface2); IDirectDrawSurface4_Release(surface); @@ -7964,10 +7964,10 @@ static void test_set_surface_desc(void) U1(ddsd).lPitch = 8 * 4; ddsd.ddsCaps.dwCaps = DDSCAPS_SYSTEMMEMORY | DDSCAPS_OFFSCREENPLAIN; hr = IDirectDraw4_CreateSurface(ddraw, &ddsd, &surface, NULL); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr);
hr = IDirectDrawSurface4_SetSurfaceDesc(surface, &ddsd, 0); - ok(hr == DDERR_INVALIDCAPS, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_INVALIDCAPS, "Got unexpected hr %#lx.\n", hr);
reset_ddsd(&ddsd); ddsd.dwFlags = DDSD_WIDTH | DDSD_HEIGHT; @@ -7975,7 +7975,7 @@ static void test_set_surface_desc(void) ddsd.dwHeight = 8; /* Cannot reset lpSurface. */ hr = IDirectDrawSurface4_SetSurfaceDesc(surface, &ddsd, 0); - ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#lx.\n", hr);
reset_ddsd(&ddsd); ddsd.dwFlags = DDSD_WIDTH | DDSD_HEIGHT | DDSD_LPSURFACE | DDSD_PITCH; @@ -7985,7 +7985,7 @@ static void test_set_surface_desc(void) U1(ddsd).lPitch = 8 * 4; /* Can change the parameters of surface created with DDSD_LPSURFACE. */ hr = IDirectDrawSurface4_SetSurfaceDesc(surface, &ddsd, 0); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr);
IDirectDrawSurface4_Release(surface);
@@ -8012,7 +8012,7 @@ static void test_set_surface_desc(void) }
hr = IDirectDraw4_CreateSurface(ddraw, &ddsd, &surface, NULL); - ok(hr == DD_OK || hr == DDERR_NODIRECTDRAWHW, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK || hr == DDERR_NODIRECTDRAWHW, "Got unexpected hr %#lx.\n", hr); if (FAILED(hr)) { skip("Cannot create a %s surface, skipping vidmem SetSurfaceDesc test.\n", @@ -8026,17 +8026,17 @@ static void test_set_surface_desc(void) hr = IDirectDrawSurface4_SetSurfaceDesc(surface, &ddsd, 0); if (invalid_caps_tests[i].supported) { - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); } else { - ok(hr == DDERR_INVALIDSURFACETYPE, "SetSurfaceDesc on a %s surface returned %#x.\n", + ok(hr == DDERR_INVALIDSURFACETYPE, "SetSurfaceDesc on a %s surface returned %#lx.\n", invalid_caps_tests[i].name, hr);
/* Check priority of error conditions. */ ddsd.dwFlags = DDSD_WIDTH; hr = IDirectDrawSurface4_SetSurfaceDesc(surface, &ddsd, 0); - ok(hr == DDERR_INVALIDSURFACETYPE, "SetSurfaceDesc on a %s surface returned %#x.\n", + ok(hr == DDERR_INVALIDSURFACETYPE, "SetSurfaceDesc on a %s surface returned %#lx.\n", invalid_caps_tests[i].name, hr); }
@@ -8045,7 +8045,7 @@ static void test_set_surface_desc(void)
done: ref = IDirectDraw4_Release(ddraw); - ok(ref == 0, "Ddraw object not properly released, refcount %u.\n", ref); + ok(ref == 0, "Ddraw object not properly released, refcount %lu.\n", ref); DestroyWindow(window); }
@@ -8069,7 +8069,7 @@ static void test_user_memory_getdc(void) ok(!!ddraw, "Failed to create a ddraw object.\n");
hr = IDirectDraw4_SetCooperativeLevel(ddraw, window, DDSCL_NORMAL); - ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#lx.\n", hr);
reset_ddsd(&ddsd); ddsd.dwFlags = DDSD_WIDTH | DDSD_HEIGHT | DDSD_CAPS | DDSD_PIXELFORMAT; @@ -8083,17 +8083,17 @@ static void test_user_memory_getdc(void) U4(U4(ddsd).ddpfPixelFormat).dwBBitMask = 0x000000ff; ddsd.ddsCaps.dwCaps = DDSCAPS_SYSTEMMEMORY | DDSCAPS_OFFSCREENPLAIN; hr = IDirectDraw4_CreateSurface(ddraw, &ddsd, &surface, NULL); - ok(SUCCEEDED(hr), "Failed to create surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create surface, hr %#lx.\n", hr);
memset(data, 0xaa, sizeof(data)); reset_ddsd(&ddsd); ddsd.dwFlags = DDSD_LPSURFACE; ddsd.lpSurface = data; hr = IDirectDrawSurface4_SetSurfaceDesc(surface, &ddsd, 0); - ok(SUCCEEDED(hr), "Failed to set surface desc, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set surface desc, hr %#lx.\n", hr);
hr = IDirectDrawSurface4_GetDC(surface, &dc); - ok(SUCCEEDED(hr), "Failed to get DC, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get DC, hr %#lx.\n", hr); bitmap = GetCurrentObject(dc, OBJ_BITMAP); ok(!!bitmap, "Failed to get bitmap.\n"); size = GetObjectA(bitmap, sizeof(dib), &dib); @@ -8102,10 +8102,10 @@ static void test_user_memory_getdc(void) BitBlt(dc, 0, 0, 16, 8, NULL, 0, 0, WHITENESS); BitBlt(dc, 0, 8, 16, 8, NULL, 0, 0, BLACKNESS); hr = IDirectDrawSurface4_ReleaseDC(surface, dc); - ok(SUCCEEDED(hr), "Failed to release DC, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to release DC, hr %#lx.\n", hr);
- ok(data[0][0] == 0xffffffff, "Expected color 0xffffffff, got %#x.\n", data[0][0]); - ok(data[15][15] == 0x00000000, "Expected color 0x00000000, got %#x.\n", data[15][15]); + ok(data[0][0] == 0xffffffff, "Expected color 0xffffffff, got %#lx.\n", data[0][0]); + ok(data[15][15] == 0x00000000, "Expected color 0x00000000, got %#lx.\n", data[15][15]);
ddsd.dwFlags = DDSD_LPSURFACE | DDSD_HEIGHT | DDSD_WIDTH | DDSD_PITCH; ddsd.lpSurface = data; @@ -8113,40 +8113,40 @@ static void test_user_memory_getdc(void) ddsd.dwHeight = 8; U1(ddsd).lPitch = sizeof(*data); hr = IDirectDrawSurface4_SetSurfaceDesc(surface, &ddsd, 0); - ok(SUCCEEDED(hr), "Failed to set surface desc, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set surface desc, hr %#lx.\n", hr);
memset(data, 0xaa, sizeof(data)); hr = IDirectDrawSurface4_GetDC(surface, &dc); - ok(SUCCEEDED(hr), "Failed to get DC, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get DC, hr %#lx.\n", hr); BitBlt(dc, 0, 0, 4, 8, NULL, 0, 0, BLACKNESS); BitBlt(dc, 1, 1, 2, 2, NULL, 0, 0, WHITENESS); hr = IDirectDrawSurface4_ReleaseDC(surface, dc); - ok(SUCCEEDED(hr), "Failed to release DC, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to release DC, hr %#lx.\n", hr);
for (y = 0; y < 4; y++) { for (x = 0; x < 4; x++) { if ((x == 1 || x == 2) && (y == 1 || y == 2)) - ok(data[y][x] == 0xffffffff, "Expected color 0xffffffff on position %ux%u, got %#x.\n", + ok(data[y][x] == 0xffffffff, "Expected color 0xffffffff on position %ux%u, got %#lx.\n", x, y, data[y][x]); else - ok(data[y][x] == 0x00000000, "Expected color 0x00000000 on position %ux%u, got %#x.\n", + ok(data[y][x] == 0x00000000, "Expected color 0x00000000 on position %ux%u, got %#lx.\n", x, y, data[y][x]); } } - ok(data[0][5] == 0xaaaaaaaa, "Expected color 0xaaaaaaaa on position 5x0, got %#x.\n", + ok(data[0][5] == 0xaaaaaaaa, "Expected color 0xaaaaaaaa on position 5x0, got %#lx.\n", data[0][5]); - ok(data[7][3] == 0x00000000, "Expected color 0x00000000 on position 3x7, got %#x.\n", + ok(data[7][3] == 0x00000000, "Expected color 0x00000000 on position 3x7, got %#lx.\n", data[7][3]); - ok(data[7][4] == 0xaaaaaaaa, "Expected color 0xaaaaaaaa on position 4x7, got %#x.\n", + ok(data[7][4] == 0xaaaaaaaa, "Expected color 0xaaaaaaaa on position 4x7, got %#lx.\n", data[7][4]); - ok(data[8][0] == 0xaaaaaaaa, "Expected color 0xaaaaaaaa on position 0x8, got %#x.\n", + ok(data[8][0] == 0xaaaaaaaa, "Expected color 0xaaaaaaaa on position 0x8, got %#lx.\n", data[8][0]);
IDirectDrawSurface4_Release(surface); ref = IDirectDraw4_Release(ddraw); - ok(ref == 0, "Ddraw object not properly released, refcount %u.\n", ref); + ok(ref == 0, "Ddraw object not properly released, refcount %lu.\n", ref); DestroyWindow(window); }
@@ -8164,7 +8164,7 @@ static void test_sysmem_overlay(void) ok(!!ddraw, "Failed to create a ddraw object.\n");
hr = IDirectDraw4_SetCooperativeLevel(ddraw, window, DDSCL_NORMAL); - ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#lx.\n", hr);
reset_ddsd(&ddsd); ddsd.dwFlags = DDSD_CAPS | DDSD_PIXELFORMAT | DDSD_WIDTH | DDSD_HEIGHT; @@ -8178,10 +8178,10 @@ static void test_sysmem_overlay(void) U3(U4(ddsd).ddpfPixelFormat).dwGBitMask = 0x0000ff00; U4(U4(ddsd).ddpfPixelFormat).dwBBitMask = 0x000000ff; hr = IDirectDraw4_CreateSurface(ddraw, &ddsd, &surface, NULL); - ok(hr == DDERR_NOOVERLAYHW, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_NOOVERLAYHW, "Got unexpected hr %#lx.\n", hr);
ref = IDirectDraw4_Release(ddraw); - ok(ref == 0, "Ddraw object not properly released, refcount %u.\n", ref); + ok(ref == 0, "Ddraw object not properly released, refcount %lu.\n", ref); DestroyWindow(window); }
@@ -8209,7 +8209,7 @@ static void test_primary_palette(void) return; } hr = IDirectDraw4_SetCooperativeLevel(ddraw, window, DDSCL_EXCLUSIVE | DDSCL_FULLSCREEN); - ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#lx.\n", hr);
memset(&surface_desc, 0, sizeof(surface_desc)); surface_desc.dwSize = sizeof(surface_desc); @@ -8217,22 +8217,22 @@ static void test_primary_palette(void) surface_desc.ddsCaps.dwCaps = DDSCAPS_PRIMARYSURFACE | DDSCAPS_COMPLEX | DDSCAPS_FLIP; U5(surface_desc).dwBackBufferCount = 1; hr = IDirectDraw4_CreateSurface(ddraw, &surface_desc, &primary, NULL); - ok(SUCCEEDED(hr), "Failed to create surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create surface, hr %#lx.\n", hr); hr = IDirectDrawSurface4_GetAttachedSurface(primary, &surface_caps, &backbuffer); - ok(SUCCEEDED(hr), "Failed to get attached surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get attached surface, hr %#lx.\n", hr);
memset(palette_entries, 0, sizeof(palette_entries)); hr = IDirectDraw4_CreatePalette(ddraw, DDPCAPS_8BIT | DDPCAPS_ALLOW256, palette_entries, &palette, NULL); - ok(SUCCEEDED(hr), "Failed to create palette, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create palette, hr %#lx.\n", hr); refcount = get_refcount((IUnknown *)palette); - ok(refcount == 1, "Got unexpected refcount %u.\n", refcount); + ok(refcount == 1, "Got unexpected refcount %lu.\n", refcount);
hr = IDirectDrawPalette_GetCaps(palette, &palette_caps); - ok(SUCCEEDED(hr), "Failed to get palette caps, hr %#x.\n", hr); - ok(palette_caps == (DDPCAPS_8BIT | DDPCAPS_ALLOW256), "Got unexpected palette caps %#x.\n", palette_caps); + ok(SUCCEEDED(hr), "Failed to get palette caps, hr %#lx.\n", hr); + ok(palette_caps == (DDPCAPS_8BIT | DDPCAPS_ALLOW256), "Got unexpected palette caps %#lx.\n", palette_caps);
hr = IDirectDrawSurface4_SetPalette(primary, palette); - ok(SUCCEEDED(hr), "Failed to set palette, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set palette, hr %#lx.\n", hr);
/* The Windows 8 testbot attaches the palette to the backbuffer as well, * and is generally somewhat broken with respect to 8 bpp / palette @@ -8245,99 +8245,99 @@ static void test_primary_palette(void) /* The Windows 8 testbot keeps extra references to the primary and * backbuffer while in 8 bpp mode. */ hr = IDirectDraw4_RestoreDisplayMode(ddraw); - ok(SUCCEEDED(hr), "Failed to restore display mode, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to restore display mode, hr %#lx.\n", hr); goto done; }
refcount = get_refcount((IUnknown *)palette); - ok(refcount == 2, "Got unexpected refcount %u.\n", refcount); + ok(refcount == 2, "Got unexpected refcount %lu.\n", refcount);
hr = IDirectDrawPalette_GetCaps(palette, &palette_caps); - ok(SUCCEEDED(hr), "Failed to get palette caps, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get palette caps, hr %#lx.\n", hr); ok(palette_caps == (DDPCAPS_8BIT | DDPCAPS_PRIMARYSURFACE | DDPCAPS_ALLOW256), - "Got unexpected palette caps %#x.\n", palette_caps); + "Got unexpected palette caps %#lx.\n", palette_caps);
hr = IDirectDrawSurface4_SetPalette(primary, NULL); - ok(SUCCEEDED(hr), "Failed to set palette, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set palette, hr %#lx.\n", hr); refcount = get_refcount((IUnknown *)palette); - ok(refcount == 1, "Got unexpected refcount %u.\n", refcount); + ok(refcount == 1, "Got unexpected refcount %lu.\n", refcount);
hr = IDirectDrawPalette_GetCaps(palette, &palette_caps); - ok(SUCCEEDED(hr), "Failed to get palette caps, hr %#x.\n", hr); - ok(palette_caps == (DDPCAPS_8BIT | DDPCAPS_ALLOW256), "Got unexpected palette caps %#x.\n", palette_caps); + ok(SUCCEEDED(hr), "Failed to get palette caps, hr %#lx.\n", hr); + ok(palette_caps == (DDPCAPS_8BIT | DDPCAPS_ALLOW256), "Got unexpected palette caps %#lx.\n", palette_caps);
hr = IDirectDrawSurface4_SetPalette(primary, palette); - ok(SUCCEEDED(hr), "Failed to set palette, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set palette, hr %#lx.\n", hr); refcount = get_refcount((IUnknown *)palette); - ok(refcount == 2, "Got unexpected refcount %u.\n", refcount); + ok(refcount == 2, "Got unexpected refcount %lu.\n", refcount);
hr = IDirectDrawSurface4_GetPalette(primary, &tmp); - ok(SUCCEEDED(hr), "Failed to get palette, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get palette, hr %#lx.\n", hr); ok(tmp == palette, "Got unexpected palette %p, expected %p.\n", tmp, palette); IDirectDrawPalette_Release(tmp); hr = IDirectDrawSurface4_GetPalette(backbuffer, &tmp); - ok(hr == DDERR_NOPALETTEATTACHED, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_NOPALETTEATTACHED, "Got unexpected hr %#lx.\n", hr);
refcount = IDirectDrawPalette_Release(palette); - ok(refcount == 1, "Got unexpected refcount %u.\n", refcount); + ok(refcount == 1, "Got unexpected refcount %lu.\n", refcount); refcount = IDirectDrawPalette_Release(palette); - ok(!refcount, "Got unexpected refcount %u.\n", refcount); + ok(!refcount, "Got unexpected refcount %lu.\n", refcount);
/* Note that this only seems to work when the palette is attached to the * primary surface. When attached to a regular surface, attempting to get * the palette here will cause an access violation. */ hr = IDirectDrawSurface4_GetPalette(primary, &tmp); - ok(hr == DDERR_NOPALETTEATTACHED, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_NOPALETTEATTACHED, "Got unexpected hr %#lx.\n", hr);
hr = IDirectDrawSurface4_IsLost(primary); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr);
memset(&surface_desc, 0, sizeof(surface_desc)); surface_desc.dwSize = sizeof(surface_desc); hr = IDirectDrawSurface4_GetSurfaceDesc(primary, &surface_desc); - ok(SUCCEEDED(hr), "Failed to get surface desc, hr %#x.\n", hr); - ok(surface_desc.dwWidth == 640, "Got unexpected surface width %u.\n", surface_desc.dwWidth); - ok(surface_desc.dwHeight == 480, "Got unexpected surface height %u.\n", surface_desc.dwHeight); - ok(U1(U4(surface_desc).ddpfPixelFormat).dwRGBBitCount == 8, "Got unexpected bit count %u.\n", + ok(SUCCEEDED(hr), "Failed to get surface desc, hr %#lx.\n", hr); + ok(surface_desc.dwWidth == 640, "Got unexpected surface width %lu.\n", surface_desc.dwWidth); + ok(surface_desc.dwHeight == 480, "Got unexpected surface height %lu.\n", surface_desc.dwHeight); + ok(U1(U4(surface_desc).ddpfPixelFormat).dwRGBBitCount == 8, "Got unexpected bit count %lu.\n", U1(U4(surface_desc).ddpfPixelFormat).dwRGBBitCount);
hr = set_display_mode(ddraw, 640, 480); - ok(SUCCEEDED(hr), "Failed to set display mode, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set display mode, hr %#lx.\n", hr);
memset(&surface_desc, 0, sizeof(surface_desc)); surface_desc.dwSize = sizeof(surface_desc); hr = IDirectDrawSurface4_GetSurfaceDesc(primary, &surface_desc); - ok(SUCCEEDED(hr), "Failed to get surface desc, hr %#x.\n", hr); - ok(surface_desc.dwWidth == 640, "Got unexpected surface width %u.\n", surface_desc.dwWidth); - ok(surface_desc.dwHeight == 480, "Got unexpected surface height %u.\n", surface_desc.dwHeight); + ok(SUCCEEDED(hr), "Failed to get surface desc, hr %#lx.\n", hr); + ok(surface_desc.dwWidth == 640, "Got unexpected surface width %lu.\n", surface_desc.dwWidth); + ok(surface_desc.dwHeight == 480, "Got unexpected surface height %lu.\n", surface_desc.dwHeight); ok(U1(U4(surface_desc).ddpfPixelFormat).dwRGBBitCount == 32 || U1(U4(surface_desc).ddpfPixelFormat).dwRGBBitCount == 24, - "Got unexpected bit count %u.\n", U1(U4(surface_desc).ddpfPixelFormat).dwRGBBitCount); + "Got unexpected bit count %lu.\n", U1(U4(surface_desc).ddpfPixelFormat).dwRGBBitCount);
hr = IDirectDrawSurface4_IsLost(primary); - ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface4_Restore(primary); - ok(hr == DDERR_WRONGMODE, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_WRONGMODE, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface4_IsLost(primary); - ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#lx.\n", hr);
memset(&surface_desc, 0, sizeof(surface_desc)); surface_desc.dwSize = sizeof(surface_desc); hr = IDirectDrawSurface4_GetSurfaceDesc(primary, &surface_desc); - ok(SUCCEEDED(hr), "Failed to get surface desc, hr %#x.\n", hr); - ok(surface_desc.dwWidth == 640, "Got unexpected surface width %u.\n", surface_desc.dwWidth); - ok(surface_desc.dwHeight == 480, "Got unexpected surface height %u.\n", surface_desc.dwHeight); + ok(SUCCEEDED(hr), "Failed to get surface desc, hr %#lx.\n", hr); + ok(surface_desc.dwWidth == 640, "Got unexpected surface width %lu.\n", surface_desc.dwWidth); + ok(surface_desc.dwHeight == 480, "Got unexpected surface height %lu.\n", surface_desc.dwHeight); ok(U1(U4(surface_desc).ddpfPixelFormat).dwRGBBitCount == 32 || U1(U4(surface_desc).ddpfPixelFormat).dwRGBBitCount == 24, - "Got unexpected bit count %u.\n", U1(U4(surface_desc).ddpfPixelFormat).dwRGBBitCount); + "Got unexpected bit count %lu.\n", U1(U4(surface_desc).ddpfPixelFormat).dwRGBBitCount);
done: refcount = IDirectDrawSurface4_Release(backbuffer); - ok(refcount == 1, "Got unexpected refcount %u.\n", refcount); + ok(refcount == 1, "Got unexpected refcount %lu.\n", refcount); refcount = IDirectDrawSurface4_Release(primary); - ok(!refcount, "Got unexpected refcount %u.\n", refcount); + ok(!refcount, "Got unexpected refcount %lu.\n", refcount); refcount = IDirectDraw4_Release(ddraw); - ok(!refcount, "Got unexpected refcount %u.\n", refcount); + ok(!refcount, "Got unexpected refcount %lu.\n", refcount); DestroyWindow(window); }
@@ -8367,7 +8367,7 @@ static void test_surface_attachment(void) ddraw = create_ddraw(); ok(!!ddraw, "Failed to create a ddraw object.\n"); hr = IDirectDraw4_SetCooperativeLevel(ddraw, window, DDSCL_NORMAL); - ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#lx.\n", hr);
memset(&surface_desc, 0, sizeof(surface_desc)); surface_desc.dwSize = sizeof(surface_desc); @@ -8377,14 +8377,14 @@ static void test_surface_attachment(void) surface_desc.dwWidth = 128; surface_desc.dwHeight = 128; hr = IDirectDraw4_CreateSurface(ddraw, &surface_desc, &surface1, NULL); - ok(SUCCEEDED(hr), "Failed to create surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create surface, hr %#lx.\n", hr);
hr = IDirectDrawSurface4_GetAttachedSurface(surface1, &caps, &surface2); - ok(SUCCEEDED(hr), "Failed to get mip level, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get mip level, hr %#lx.\n", hr); hr = IDirectDrawSurface4_GetAttachedSurface(surface2, &caps, &surface3); - ok(SUCCEEDED(hr), "Failed to get mip level, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get mip level, hr %#lx.\n", hr); hr = IDirectDrawSurface4_GetAttachedSurface(surface3, &caps, &surface4); - ok(hr == DDERR_NOTFOUND, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_NOTFOUND, "Got unexpected hr %#lx.\n", hr);
surface_count = 0; IDirectDrawSurface4_EnumAttachedSurfaces(surface1, &surface_count, surface_counter); @@ -8403,20 +8403,20 @@ static void test_surface_attachment(void) surface_desc.dwWidth = 16; surface_desc.dwHeight = 16; hr = IDirectDraw4_CreateSurface(ddraw, &surface_desc, &surface4, NULL); - ok(SUCCEEDED(hr), "Failed to create surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create surface, hr %#lx.\n", hr);
hr = IDirectDrawSurface4_AddAttachedSurface(surface1, surface4); - ok(hr == DDERR_CANNOTATTACHSURFACE, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_CANNOTATTACHSURFACE, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface4_AddAttachedSurface(surface4, surface1); - ok(hr == DDERR_CANNOTATTACHSURFACE, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_CANNOTATTACHSURFACE, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface4_AddAttachedSurface(surface3, surface4); - ok(hr == DDERR_CANNOTATTACHSURFACE, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_CANNOTATTACHSURFACE, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface4_AddAttachedSurface(surface4, surface3); - ok(hr == DDERR_CANNOTATTACHSURFACE, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_CANNOTATTACHSURFACE, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface4_AddAttachedSurface(surface2, surface4); - ok(hr == DDERR_CANNOTATTACHSURFACE, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_CANNOTATTACHSURFACE, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface4_AddAttachedSurface(surface4, surface2); - ok(hr == DDERR_CANNOTATTACHSURFACE, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_CANNOTATTACHSURFACE, "Got unexpected hr %#lx.\n", hr);
IDirectDrawSurface4_Release(surface4);
@@ -8427,27 +8427,27 @@ static void test_surface_attachment(void) surface_desc.dwWidth = 16; surface_desc.dwHeight = 16; hr = IDirectDraw4_CreateSurface(ddraw, &surface_desc, &surface4, NULL); - ok(SUCCEEDED(hr), "Failed to create surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create surface, hr %#lx.\n", hr);
if (SUCCEEDED(hr = IDirectDrawSurface4_AddAttachedSurface(surface1, surface4))) { skip("Running on refrast, skipping some tests.\n"); hr = IDirectDrawSurface4_DeleteAttachedSurface(surface1, 0, surface4); - ok(SUCCEEDED(hr), "Failed to detach surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to detach surface, hr %#lx.\n", hr); } else { - ok(hr == DDERR_CANNOTATTACHSURFACE, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_CANNOTATTACHSURFACE, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface4_AddAttachedSurface(surface4, surface1); - ok(hr == DDERR_CANNOTATTACHSURFACE, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_CANNOTATTACHSURFACE, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface4_AddAttachedSurface(surface3, surface4); - ok(hr == DDERR_CANNOTATTACHSURFACE, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_CANNOTATTACHSURFACE, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface4_AddAttachedSurface(surface4, surface3); - ok(hr == DDERR_CANNOTATTACHSURFACE, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_CANNOTATTACHSURFACE, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface4_AddAttachedSurface(surface2, surface4); - ok(hr == DDERR_CANNOTATTACHSURFACE, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_CANNOTATTACHSURFACE, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface4_AddAttachedSurface(surface4, surface2); - ok(hr == DDERR_CANNOTATTACHSURFACE, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_CANNOTATTACHSURFACE, "Got unexpected hr %#lx.\n", hr); }
IDirectDrawSurface4_Release(surface4); @@ -8456,7 +8456,7 @@ static void test_surface_attachment(void) IDirectDrawSurface4_Release(surface1);
hr = IDirectDraw4_SetCooperativeLevel(ddraw, window, DDSCL_EXCLUSIVE | DDSCL_FULLSCREEN); - ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#lx.\n", hr);
/* Try a single primary and two offscreen plain surfaces. */ memset(&surface_desc, 0, sizeof(surface_desc)); @@ -8464,7 +8464,7 @@ static void test_surface_attachment(void) surface_desc.dwFlags = DDSD_CAPS; surface_desc.ddsCaps.dwCaps = DDSCAPS_PRIMARYSURFACE; hr = IDirectDraw4_CreateSurface(ddraw, &surface_desc, &surface1, NULL); - ok(SUCCEEDED(hr), "Failed to create surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create surface, hr %#lx.\n", hr);
memset(&surface_desc, 0, sizeof(surface_desc)); surface_desc.dwSize = sizeof(surface_desc); @@ -8473,7 +8473,7 @@ static void test_surface_attachment(void) surface_desc.dwWidth = registry_mode.dmPelsWidth; surface_desc.dwHeight = registry_mode.dmPelsHeight; hr = IDirectDraw4_CreateSurface(ddraw, &surface_desc, &surface2, NULL); - ok(SUCCEEDED(hr), "Failed to create surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create surface, hr %#lx.\n", hr);
memset(&surface_desc, 0, sizeof(surface_desc)); surface_desc.dwSize = sizeof(surface_desc); @@ -8482,7 +8482,7 @@ static void test_surface_attachment(void) surface_desc.dwWidth = registry_mode.dmPelsWidth; surface_desc.dwHeight = registry_mode.dmPelsHeight; hr = IDirectDraw4_CreateSurface(ddraw, &surface_desc, &surface3, NULL); - ok(SUCCEEDED(hr), "Failed to create surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create surface, hr %#lx.\n", hr);
/* This one has a different size. */ memset(&surface_desc, 0, sizeof(surface_desc)); @@ -8492,33 +8492,33 @@ static void test_surface_attachment(void) surface_desc.dwWidth = 128; surface_desc.dwHeight = 128; hr = IDirectDraw4_CreateSurface(ddraw, &surface_desc, &surface4, NULL); - ok(SUCCEEDED(hr), "Failed to create surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create surface, hr %#lx.\n", hr);
hr = IDirectDrawSurface4_AddAttachedSurface(surface1, surface2); - ok(SUCCEEDED(hr), "Failed to attach surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to attach surface, hr %#lx.\n", hr); /* Try the reverse without detaching first. */ hr = IDirectDrawSurface4_AddAttachedSurface(surface2, surface1); - ok(hr == DDERR_SURFACEALREADYATTACHED, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_SURFACEALREADYATTACHED, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface4_DeleteAttachedSurface(surface1, 0, surface2); - ok(SUCCEEDED(hr), "Failed to detach surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to detach surface, hr %#lx.\n", hr);
hr = IDirectDrawSurface4_AddAttachedSurface(surface2, surface1); - ok(SUCCEEDED(hr), "Failed to attach surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to attach surface, hr %#lx.\n", hr); /* Try to detach reversed. */ hr = IDirectDrawSurface4_DeleteAttachedSurface(surface1, 0, surface2); - ok(hr == DDERR_CANNOTDETACHSURFACE, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_CANNOTDETACHSURFACE, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface4_DeleteAttachedSurface(surface2, 0, surface1); - ok(SUCCEEDED(hr), "Failed to detach surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to detach surface, hr %#lx.\n", hr);
hr = IDirectDrawSurface4_AddAttachedSurface(surface2, surface3); - ok(SUCCEEDED(hr), "Failed to attach surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to attach surface, hr %#lx.\n", hr); hr = IDirectDrawSurface4_DeleteAttachedSurface(surface2, 0, surface3); - ok(SUCCEEDED(hr), "Failed to detach surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to detach surface, hr %#lx.\n", hr);
hr = IDirectDrawSurface4_AddAttachedSurface(surface1, surface4); - ok(hr == DDERR_CANNOTATTACHSURFACE, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_CANNOTATTACHSURFACE, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface4_AddAttachedSurface(surface4, surface1); - ok(hr == DDERR_CANNOTATTACHSURFACE, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_CANNOTATTACHSURFACE, "Got unexpected hr %#lx.\n", hr);
IDirectDrawSurface4_Release(surface4); IDirectDrawSurface4_Release(surface3); @@ -8533,7 +8533,7 @@ static void test_surface_attachment(void) surface_desc.dwWidth = 64; surface_desc.dwHeight = 64; hr = IDirectDraw4_CreateSurface(ddraw, &surface_desc, &surface1, NULL); - ok(hr == D3D_OK, "Failed to create surface, hr %#x.\n", hr); + ok(hr == D3D_OK, "Failed to create surface, hr %#lx.\n", hr);
memset(&surface_desc, 0, sizeof(surface_desc)); surface_desc.dwSize = sizeof(surface_desc); @@ -8546,26 +8546,26 @@ static void test_surface_attachment(void) surface_desc.dwWidth = 32; surface_desc.dwHeight = 32; hr = IDirectDraw4_CreateSurface(ddraw, &surface_desc, &surface2, NULL); - ok(hr == D3D_OK, "Failed to create surface, hr %#x.\n", hr); + ok(hr == D3D_OK, "Failed to create surface, hr %#lx.\n", hr); surface_desc.dwWidth = 64; surface_desc.dwHeight = 64; hr = IDirectDraw4_CreateSurface(ddraw, &surface_desc, &surface3, NULL); - ok(hr == D3D_OK, "Failed to create surface, hr %#x.\n", hr); + ok(hr == D3D_OK, "Failed to create surface, hr %#lx.\n", hr); surface_desc.dwWidth = 128; surface_desc.dwHeight = 128; hr = IDirectDraw4_CreateSurface(ddraw, &surface_desc, &surface4, NULL); - ok(hr == D3D_OK, "Failed to create surface, hr %#x.\n", hr); + ok(hr == D3D_OK, "Failed to create surface, hr %#lx.\n", hr);
hr = IDirectDrawSurface_AddAttachedSurface(surface1, surface2); - todo_wine ok(hr == DDERR_CANNOTATTACHSURFACE, "Got unexpected hr %#x.\n", hr); + todo_wine ok(hr == DDERR_CANNOTATTACHSURFACE, "Got unexpected hr %#lx.\n", hr); if (SUCCEEDED(hr)) IDirectDrawSurface4_DeleteAttachedSurface(surface1, 0, surface2); hr = IDirectDrawSurface_AddAttachedSurface(surface1, surface3); - ok(hr == D3D_OK, "Failed to attach depth buffer, hr %#x.\n", hr); + ok(hr == D3D_OK, "Failed to attach depth buffer, hr %#lx.\n", hr); hr = IDirectDrawSurface4_DeleteAttachedSurface(surface1, 0, surface3); - ok(hr == D3D_OK, "Failed to detach depth buffer, hr %#x.\n", hr); + ok(hr == D3D_OK, "Failed to detach depth buffer, hr %#lx.\n", hr); hr = IDirectDrawSurface_AddAttachedSurface(surface1, surface4); - todo_wine ok(hr == DDERR_CANNOTATTACHSURFACE, "Got unexpected hr %#x.\n", hr); + todo_wine ok(hr == DDERR_CANNOTATTACHSURFACE, "Got unexpected hr %#lx.\n", hr);
IDirectDrawSurface4_Release(surface4); IDirectDrawSurface4_Release(surface3); @@ -8586,72 +8586,72 @@ static void test_surface_attachment(void) U3(U4(surface_desc).ddpfPixelFormat).dwGBitMask = 0x07e0; U4(U4(surface_desc).ddpfPixelFormat).dwBBitMask = 0x001f; hr = IDirectDraw4_CreateSurface(ddraw, &surface_desc, &surface1, NULL); - ok(SUCCEEDED(hr), "Failed to create surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create surface, hr %#lx.\n", hr); hr = IDirectDraw4_CreateSurface(ddraw, &surface_desc, &surface3, NULL); - ok(SUCCEEDED(hr), "Failed to create surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create surface, hr %#lx.\n", hr);
surface_desc.ddsCaps.dwCaps = DDSCAPS_ZBUFFER; U4(surface_desc).ddpfPixelFormat.dwFlags = DDPF_ZBUFFER; U1(U4(surface_desc).ddpfPixelFormat).dwZBufferBitDepth = 16; U3(U4(surface_desc).ddpfPixelFormat).dwZBitMask = 0x0000ffff; hr = IDirectDraw4_CreateSurface(ddraw, &surface_desc, &surface2, NULL); - ok(SUCCEEDED(hr), "Failed to create surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create surface, hr %#lx.\n", hr);
hr = IDirectDrawSurface4_QueryInterface(surface1, &IID_IDirectDrawSurface, (void **)&surface1v1); - ok(SUCCEEDED(hr), "Failed to get interface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get interface, hr %#lx.\n", hr); hr = IDirectDrawSurface4_QueryInterface(surface2, &IID_IDirectDrawSurface, (void **)&surface2v1); - ok(SUCCEEDED(hr), "Failed to get interface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get interface, hr %#lx.\n", hr);
hr = IDirectDrawSurface4_AddAttachedSurface(surface1, surface2); - ok(SUCCEEDED(hr), "Failed to attach surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to attach surface, hr %#lx.\n", hr); refcount = get_refcount((IUnknown *)surface2); - ok(refcount == 2, "Got unexpected refcount %u.\n", refcount); + ok(refcount == 2, "Got unexpected refcount %lu.\n", refcount); refcount = get_refcount((IUnknown *)surface2v1); - ok(refcount == 1, "Got unexpected refcount %u.\n", refcount); + ok(refcount == 1, "Got unexpected refcount %lu.\n", refcount); hr = IDirectDrawSurface4_AddAttachedSurface(surface1, surface2); - ok(hr == DDERR_SURFACEALREADYATTACHED, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_SURFACEALREADYATTACHED, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface_AddAttachedSurface(surface1v1, surface2v1); - todo_wine ok(hr == DDERR_CANNOTATTACHSURFACE, "Got unexpected hr %#x.\n", hr); + todo_wine ok(hr == DDERR_CANNOTATTACHSURFACE, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface_DeleteAttachedSurface(surface1v1, 0, surface2v1); - ok(hr == DDERR_SURFACENOTATTACHED, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_SURFACENOTATTACHED, "Got unexpected hr %#lx.\n", hr);
/* Attaching while already attached to other surface. */ hr = IDirectDrawSurface4_AddAttachedSurface(surface3, surface2); - todo_wine ok(SUCCEEDED(hr), "Failed to attach surface, hr %#x.\n", hr); + todo_wine ok(SUCCEEDED(hr), "Failed to attach surface, hr %#lx.\n", hr); hr = IDirectDrawSurface4_DeleteAttachedSurface(surface3, 0, surface2); - todo_wine ok(SUCCEEDED(hr), "Failed to detach surface, hr %#x.\n", hr); + todo_wine ok(SUCCEEDED(hr), "Failed to detach surface, hr %#lx.\n", hr); IDirectDrawSurface4_Release(surface3);
hr = IDirectDrawSurface4_DeleteAttachedSurface(surface1, 0, surface2); - ok(SUCCEEDED(hr), "Failed to detach surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to detach surface, hr %#lx.\n", hr); refcount = get_refcount((IUnknown *)surface2); - ok(refcount == 1, "Got unexpected refcount %u.\n", refcount); + ok(refcount == 1, "Got unexpected refcount %lu.\n", refcount); refcount = get_refcount((IUnknown *)surface2v1); - ok(refcount == 1, "Got unexpected refcount %u.\n", refcount); + ok(refcount == 1, "Got unexpected refcount %lu.\n", refcount);
/* DeleteAttachedSurface() when attaching via IDirectDrawSurface. */ hr = IDirectDrawSurface_AddAttachedSurface(surface1v1, surface2v1); - ok(SUCCEEDED(hr), "Failed to attach surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to attach surface, hr %#lx.\n", hr); hr = IDirectDrawSurface4_DeleteAttachedSurface(surface1, 0, surface2); - ok(hr == DDERR_SURFACENOTATTACHED, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_SURFACENOTATTACHED, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface_DeleteAttachedSurface(surface1v1, 0, surface2v1); - ok(SUCCEEDED(hr), "Failed to detach surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to detach surface, hr %#lx.\n", hr); refcount = IDirectDrawSurface4_Release(surface2); - ok(!refcount, "Got unexpected refcount %u.\n", refcount); + ok(!refcount, "Got unexpected refcount %lu.\n", refcount); refcount = IDirectDrawSurface4_Release(surface1); - ok(!refcount, "Got unexpected refcount %u.\n", refcount); + ok(!refcount, "Got unexpected refcount %lu.\n", refcount);
/* Automatic detachment on release. */ hr = IDirectDrawSurface_AddAttachedSurface(surface1v1, surface2v1); - ok(SUCCEEDED(hr), "Failed to attach surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to attach surface, hr %#lx.\n", hr); refcount = get_refcount((IUnknown *)surface2v1); - ok(refcount == 2, "Got unexpected refcount %u.\n", refcount); + ok(refcount == 2, "Got unexpected refcount %lu.\n", refcount); refcount = IDirectDrawSurface_Release(surface1v1); - ok(!refcount, "Got unexpected refcount %u.\n", refcount); + ok(!refcount, "Got unexpected refcount %lu.\n", refcount); refcount = IDirectDrawSurface_Release(surface2v1); - ok(!refcount, "Got unexpected refcount %u.\n", refcount); + ok(!refcount, "Got unexpected refcount %lu.\n", refcount); refcount = IDirectDraw4_Release(ddraw); - ok(!refcount, "Got unexpected refcount %u.\n", refcount); + ok(!refcount, "Got unexpected refcount %lu.\n", refcount); DestroyWindow(window); }
@@ -8687,7 +8687,7 @@ static void test_private_data(void) ddraw = create_ddraw(); ok(!!ddraw, "Failed to create a ddraw object.\n"); hr = IDirectDraw4_SetCooperativeLevel(ddraw, window, DDSCL_NORMAL); - ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#lx.\n", hr);
reset_ddsd(&surface_desc); surface_desc.dwFlags = DDSD_CAPS | DDSD_HEIGHT | DDSD_WIDTH; @@ -8695,27 +8695,27 @@ static void test_private_data(void) surface_desc.dwHeight = 4; surface_desc.dwWidth = 4; hr = IDirectDraw4_CreateSurface(ddraw, &surface_desc, &surface, NULL); - ok(SUCCEEDED(hr), "Failed to create surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create surface, hr %#lx.\n", hr);
/* NULL pointers are not valid, but don't cause a crash. */ hr = IDirectDrawSurface4_SetPrivateData(surface, &ddraw_private_data_test_guid, NULL, sizeof(IUnknown *), DDSPD_IUNKNOWNPOINTER); - ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface4_SetPrivateData(surface, &ddraw_private_data_test_guid, NULL, 0, 0); - ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface4_SetPrivateData(surface, &ddraw_private_data_test_guid, NULL, 1, 0); - ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#lx.\n", hr);
/* DDSPD_IUNKNOWNPOINTER needs sizeof(IUnknown *) bytes of data. */ hr = IDirectDrawSurface4_SetPrivateData(surface, &ddraw_private_data_test_guid, ddraw, 0, DDSPD_IUNKNOWNPOINTER); - ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface4_SetPrivateData(surface, &ddraw_private_data_test_guid, ddraw, 5, DDSPD_IUNKNOWNPOINTER); - ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface4_SetPrivateData(surface, &ddraw_private_data_test_guid, ddraw, sizeof(ddraw) * 2, DDSPD_IUNKNOWNPOINTER); - ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#lx.\n", hr);
/* Note that with a size != 0 and size != sizeof(IUnknown *) and * DDSPD_IUNKNOWNPOINTER set SetPrivateData in ddraw4 and ddraw7 @@ -8724,85 +8724,85 @@ static void test_private_data(void) * that depends on this we don't care about this behavior. */ hr = IDirectDrawSurface4_SetPrivateData(surface, &ddraw_private_data_test_guid, ddraw, sizeof(ddraw), DDSPD_IUNKNOWNPOINTER); - ok(SUCCEEDED(hr), "Failed to set private data, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set private data, hr %#lx.\n", hr); hr = IDirectDrawSurface4_SetPrivateData(surface, &ddraw_private_data_test_guid, ddraw, 0, DDSPD_IUNKNOWNPOINTER); - ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#lx.\n", hr); size = sizeof(ptr); hr = IDirectDrawSurface4_GetPrivateData(surface, &ddraw_private_data_test_guid, &ptr, &size); - ok(SUCCEEDED(hr), "Failed to get private data, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get private data, hr %#lx.\n", hr); hr = IDirectDrawSurface4_FreePrivateData(surface, &ddraw_private_data_test_guid); - ok(SUCCEEDED(hr), "Failed to free private data, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to free private data, hr %#lx.\n", hr);
refcount = get_refcount((IUnknown *)ddraw); hr = IDirectDrawSurface4_SetPrivateData(surface, &ddraw_private_data_test_guid, ddraw, sizeof(ddraw), DDSPD_IUNKNOWNPOINTER); - ok(SUCCEEDED(hr), "Failed to set private data, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set private data, hr %#lx.\n", hr); refcount2 = get_refcount((IUnknown *)ddraw); - ok(refcount2 == refcount + 1, "Got unexpected refcount %u.\n", refcount2); + ok(refcount2 == refcount + 1, "Got unexpected refcount %lu.\n", refcount2);
hr = IDirectDrawSurface4_FreePrivateData(surface, &ddraw_private_data_test_guid); - ok(SUCCEEDED(hr), "Failed to free private data, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to free private data, hr %#lx.\n", hr); refcount2 = get_refcount((IUnknown *)ddraw); - ok(refcount2 == refcount, "Got unexpected refcount %u.\n", refcount2); + ok(refcount2 == refcount, "Got unexpected refcount %lu.\n", refcount2);
hr = IDirectDrawSurface4_SetPrivateData(surface, &ddraw_private_data_test_guid, ddraw, sizeof(ddraw), DDSPD_IUNKNOWNPOINTER); - ok(SUCCEEDED(hr), "Failed to set private data, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set private data, hr %#lx.\n", hr); hr = IDirectDrawSurface4_SetPrivateData(surface, &ddraw_private_data_test_guid, surface, sizeof(surface), DDSPD_IUNKNOWNPOINTER); - ok(SUCCEEDED(hr), "Failed to set private data, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set private data, hr %#lx.\n", hr); refcount2 = get_refcount((IUnknown *)ddraw); - ok(refcount2 == refcount, "Got unexpected refcount %u.\n", refcount2); + ok(refcount2 == refcount, "Got unexpected refcount %lu.\n", refcount2);
hr = IDirectDrawSurface4_SetPrivateData(surface, &ddraw_private_data_test_guid, ddraw, sizeof(ddraw), DDSPD_IUNKNOWNPOINTER); - ok(SUCCEEDED(hr), "Failed to set private data, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set private data, hr %#lx.\n", hr); size = 2 * sizeof(ptr); hr = IDirectDrawSurface4_GetPrivateData(surface, &ddraw_private_data_test_guid, &ptr, &size); - ok(SUCCEEDED(hr), "Failed to get private data, hr %#x.\n", hr); - ok(size == sizeof(ddraw), "Got unexpected size %u.\n", size); + ok(SUCCEEDED(hr), "Failed to get private data, hr %#lx.\n", hr); + ok(size == sizeof(ddraw), "Got unexpected size %lu.\n", size); refcount2 = get_refcount(ptr); /* Object is NOT addref'ed by the getter. */ ok(ptr == (IUnknown *)ddraw, "Returned interface pointer is %p, expected %p.\n", ptr, ddraw); - ok(refcount2 == refcount + 1, "Got unexpected refcount %u.\n", refcount2); + ok(refcount2 == refcount + 1, "Got unexpected refcount %lu.\n", refcount2);
ptr = (IUnknown *)0xdeadbeef; size = 1; hr = IDirectDrawSurface4_GetPrivateData(surface, &ddraw_private_data_test_guid, NULL, &size); - ok(hr == DDERR_MOREDATA, "Got unexpected hr %#x.\n", hr); - ok(size == sizeof(ddraw), "Got unexpected size %u.\n", size); + ok(hr == DDERR_MOREDATA, "Got unexpected hr %#lx.\n", hr); + ok(size == sizeof(ddraw), "Got unexpected size %lu.\n", size); size = 2 * sizeof(ptr); hr = IDirectDrawSurface4_GetPrivateData(surface, &ddraw_private_data_test_guid, NULL, &size); - ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#x.\n", hr); - ok(size == 2 * sizeof(ptr), "Got unexpected size %u.\n", size); + ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#lx.\n", hr); + ok(size == 2 * sizeof(ptr), "Got unexpected size %lu.\n", size); size = 1; hr = IDirectDrawSurface4_GetPrivateData(surface, &ddraw_private_data_test_guid, &ptr, &size); - ok(hr == DDERR_MOREDATA, "Got unexpected hr %#x.\n", hr); - ok(size == sizeof(ddraw), "Got unexpected size %u.\n", size); + ok(hr == DDERR_MOREDATA, "Got unexpected hr %#lx.\n", hr); + ok(size == sizeof(ddraw), "Got unexpected size %lu.\n", size); ok(ptr == (IUnknown *)0xdeadbeef, "Got unexpected pointer %p.\n", ptr); hr = IDirectDrawSurface4_GetPrivateData(surface, &ddraw_private_data_test_guid2, NULL, NULL); - ok(hr == DDERR_NOTFOUND, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_NOTFOUND, "Got unexpected hr %#lx.\n", hr); size = 0xdeadbabe; hr = IDirectDrawSurface4_GetPrivateData(surface, &ddraw_private_data_test_guid2, &ptr, &size); - ok(hr == DDERR_NOTFOUND, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_NOTFOUND, "Got unexpected hr %#lx.\n", hr); ok(ptr == (IUnknown *)0xdeadbeef, "Got unexpected pointer %p.\n", ptr); - ok(size == 0xdeadbabe, "Got unexpected size %u.\n", size); + ok(size == 0xdeadbabe, "Got unexpected size %lu.\n", size); hr = IDirectDrawSurface4_GetPrivateData(surface, &ddraw_private_data_test_guid, NULL, NULL); - ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#lx.\n", hr);
refcount3 = IDirectDrawSurface4_Release(surface); - ok(!refcount3, "Got unexpected refcount %u.\n", refcount3); + ok(!refcount3, "Got unexpected refcount %lu.\n", refcount3);
/* Destroying the surface frees the reference held on the private data. It also frees * the reference the surface is holding on its creating object. */ refcount2 = get_refcount((IUnknown *)ddraw); - ok(refcount2 == refcount - 1, "Got unexpected refcount %u.\n", refcount2); + ok(refcount2 == refcount - 1, "Got unexpected refcount %lu.\n", refcount2);
memset(&hal_caps, 0, sizeof(hal_caps)); hal_caps.dwSize = sizeof(hal_caps); hr = IDirectDraw4_GetCaps(ddraw, &hal_caps, NULL); - ok(SUCCEEDED(hr), "Failed to get caps, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get caps, hr %#lx.\n", hr); if ((hal_caps.ddsCaps.dwCaps & (DDSCAPS_TEXTURE | DDSCAPS_MIPMAP)) == (DDSCAPS_TEXTURE | DDSCAPS_MIPMAP)) { reset_ddsd(&surface_desc); @@ -8812,14 +8812,14 @@ static void test_private_data(void) surface_desc.dwWidth = 4; U2(surface_desc).dwMipMapCount = 2; hr = IDirectDraw4_CreateSurface(ddraw, &surface_desc, &surface, NULL); - ok(SUCCEEDED(hr), "Failed to create surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create surface, hr %#lx.\n", hr); hr = IDirectDrawSurface4_GetAttachedSurface(surface, &caps, &surface2); - ok(SUCCEEDED(hr), "Failed to get attached surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get attached surface, hr %#lx.\n", hr);
hr = IDirectDrawSurface4_SetPrivateData(surface, &ddraw_private_data_test_guid, data, sizeof(data), 0); - ok(SUCCEEDED(hr), "Failed to set private data, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set private data, hr %#lx.\n", hr); hr = IDirectDrawSurface4_GetPrivateData(surface2, &ddraw_private_data_test_guid, NULL, NULL); - ok(hr == DDERR_NOTFOUND, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_NOTFOUND, "Got unexpected hr %#lx.\n", hr);
IDirectDrawSurface4_Release(surface2); IDirectDrawSurface4_Release(surface); @@ -8828,7 +8828,7 @@ static void test_private_data(void) skip("Mipmapped textures not supported, skipping mipmap private data test.\n");
refcount = IDirectDraw4_Release(ddraw); - ok(!refcount, "Got unexpected refcount %u.\n", refcount); + ok(!refcount, "Got unexpected refcount %lu.\n", refcount); DestroyWindow(window); }
@@ -8911,7 +8911,7 @@ static void test_pixel_format(void) hr = IDirectDraw4_SetCooperativeLevel(ddraw, window, DDSCL_NORMAL); if (FAILED(hr)) { - skip("Failed to set cooperative level, hr %#x.\n", hr); + skip("Failed to set cooperative level, hr %#lx.\n", hr); goto cleanup; }
@@ -8921,9 +8921,9 @@ static void test_pixel_format(void) if (hdc2) { hr = IDirectDraw4_CreateClipper(ddraw, 0, &clipper, NULL); - ok(SUCCEEDED(hr), "Failed to create clipper, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create clipper, hr %#lx.\n", hr); hr = IDirectDrawClipper_SetHWnd(clipper, 0, window2); - ok(SUCCEEDED(hr), "Failed to set clipper window, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set clipper window, hr %#lx.\n", hr);
test_format = GetPixelFormat(hdc); ok(test_format == format, "window has pixel format %d, expected %d\n", test_format, format); @@ -8938,7 +8938,7 @@ static void test_pixel_format(void) ddsd.ddsCaps.dwCaps = DDSCAPS_PRIMARYSURFACE;
hr = IDirectDraw4_CreateSurface(ddraw, &ddsd, &primary, NULL); - ok(SUCCEEDED(hr), "Failed to create surface, hr %#x.\n",hr); + ok(SUCCEEDED(hr), "Failed to create surface, hr %#lx.\n",hr);
test_format = GetPixelFormat(hdc); ok(test_format == format, "window has pixel format %d, expected %d\n", test_format, format); @@ -8952,7 +8952,7 @@ static void test_pixel_format(void) if (clipper) { hr = IDirectDrawSurface4_SetClipper(primary, clipper); - ok(SUCCEEDED(hr), "Failed to set clipper, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set clipper, hr %#lx.\n", hr);
test_format = GetPixelFormat(hdc); ok(test_format == format, "window has pixel format %d, expected %d\n", test_format, format); @@ -8967,18 +8967,18 @@ static void test_pixel_format(void) ddsd.ddsCaps.dwCaps = DDSCAPS_OFFSCREENPLAIN; ddsd.dwWidth = ddsd.dwHeight = 64; hr = IDirectDraw4_CreateSurface(ddraw, &ddsd, &offscreen, NULL); - ok(SUCCEEDED(hr), "Failed to create surface, hr %#x.\n",hr); + ok(SUCCEEDED(hr), "Failed to create surface, hr %#lx.\n",hr);
memset(&fx, 0, sizeof(fx)); fx.dwSize = sizeof(fx); hr = IDirectDrawSurface4_Blt(offscreen, NULL, NULL, NULL, DDBLT_WAIT | DDBLT_COLORFILL, &fx); - ok(SUCCEEDED(hr), "Failed to clear source surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to clear source surface, hr %#lx.\n", hr);
test_format = GetPixelFormat(hdc); ok(test_format == format, "window has pixel format %d, expected %d\n", test_format, format);
hr = IDirectDrawSurface4_Blt(primary, NULL, offscreen, NULL, DDBLT_WAIT, NULL); - ok(SUCCEEDED(hr), "Failed to blit to primary surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to blit to primary surface, hr %#lx.\n", hr);
test_format = GetPixelFormat(hdc); ok(test_format == format, "window has pixel format %d, expected %d\n", test_format, format); @@ -9103,7 +9103,7 @@ static void test_create_surface_pitch(void) ddraw = create_ddraw(); ok(!!ddraw, "Failed to create a ddraw object.\n"); hr = IDirectDraw4_SetCooperativeLevel(ddraw, window, DDSCL_NORMAL); - ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#lx.\n", hr);
mem = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, ((63 * 4) + 8) * 63);
@@ -9126,33 +9126,33 @@ static void test_create_surface_pitch(void) if (test_data[i].flags_in & DDSD_LPSURFACE) { HRESULT expected_hr = SUCCEEDED(test_data[i].hr) ? DDERR_INVALIDPARAMS : test_data[i].hr; - ok(hr == expected_hr, "Test %u: Got unexpected hr %#x, expected %#x.\n", i, hr, expected_hr); + ok(hr == expected_hr, "Test %u: Got unexpected hr %#lx, expected %#lx.\n", i, hr, expected_hr); surface_desc.lpSurface = mem; hr = IDirectDraw4_CreateSurface(ddraw, &surface_desc, &surface, NULL); } if ((test_data[i].caps & DDSCAPS_VIDEOMEMORY) && hr == DDERR_NODIRECTDRAWHW) continue; - ok(hr == test_data[i].hr, "Test %u: Got unexpected hr %#x, expected %#x.\n", i, hr, test_data[i].hr); + ok(hr == test_data[i].hr, "Test %u: Got unexpected hr %#lx, expected %#lx.\n", i, hr, test_data[i].hr); if (FAILED(hr)) continue;
memset(&surface_desc, 0, sizeof(surface_desc)); surface_desc.dwSize = sizeof(surface_desc); hr = IDirectDrawSurface4_GetSurfaceDesc(surface, &surface_desc); - ok(SUCCEEDED(hr), "Test %u: Failed to get surface desc, hr %#x.\n", i, hr); + ok(SUCCEEDED(hr), "Test %u: Failed to get surface desc, hr %#lx.\n", i, hr); ok((surface_desc.dwFlags & flags_mask) == test_data[i].flags_out, - "Test %u: Got unexpected flags %#x, expected %#x.\n", + "Test %u: Got unexpected flags %#lx, expected %#lx.\n", i, surface_desc.dwFlags & flags_mask, test_data[i].flags_out); /* The pitch for textures seems to be implementation specific. */ if (!(test_data[i].caps & DDSCAPS_TEXTURE)) { if (is_ddraw64 && test_data[i].pitch_out32 != test_data[i].pitch_out64) todo_wine ok(U1(surface_desc).lPitch == test_data[i].pitch_out64, - "Test %u: Got unexpected pitch %u, expected %u.\n", + "Test %u: Got unexpected pitch %lu, expected %lu.\n", i, U1(surface_desc).lPitch, test_data[i].pitch_out64); else ok(U1(surface_desc).lPitch == test_data[i].pitch_out32, - "Test %u: Got unexpected pitch %u, expected %u.\n", + "Test %u: Got unexpected pitch %lu, expected %lu.\n", i, U1(surface_desc).lPitch, test_data[i].pitch_out32); } ok(!surface_desc.lpSurface, "Test %u: Got unexpected lpSurface %p.\n", i, surface_desc.lpSurface); @@ -9162,7 +9162,7 @@ static void test_create_surface_pitch(void)
HeapFree(GetProcessHeap(), 0, mem); refcount = IDirectDraw4_Release(ddraw); - ok(!refcount, "Got unexpected refcount %u.\n", refcount); + ok(!refcount, "Got unexpected refcount %lu.\n", refcount); DestroyWindow(window); }
@@ -9202,12 +9202,12 @@ static void test_mipmap(void) ddraw = create_ddraw(); ok(!!ddraw, "Failed to create a ddraw object.\n"); hr = IDirectDraw4_SetCooperativeLevel(ddraw, window, DDSCL_NORMAL); - ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#lx.\n", hr);
memset(&hal_caps, 0, sizeof(hal_caps)); hal_caps.dwSize = sizeof(hal_caps); hr = IDirectDraw4_GetCaps(ddraw, &hal_caps, NULL); - ok(SUCCEEDED(hr), "Failed to get caps, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get caps, hr %#lx.\n", hr); if ((hal_caps.ddsCaps.dwCaps & (DDSCAPS_TEXTURE | DDSCAPS_MIPMAP)) != (DDSCAPS_TEXTURE | DDSCAPS_MIPMAP)) { skip("Mipmapped textures not supported, skipping tests.\n"); @@ -9227,18 +9227,18 @@ static void test_mipmap(void) if (tests[i].flags & DDSD_MIPMAPCOUNT) U2(surface_desc).dwMipMapCount = tests[i].mipmap_count_in; hr = IDirectDraw4_CreateSurface(ddraw, &surface_desc, &surface, NULL); - ok(hr == tests[i].hr, "Test %u: Got unexpected hr %#x.\n", i, hr); + ok(hr == tests[i].hr, "Test %u: Got unexpected hr %#lx.\n", i, hr); if (FAILED(hr)) continue;
memset(&surface_desc, 0, sizeof(surface_desc)); surface_desc.dwSize = sizeof(surface_desc); hr = IDirectDrawSurface4_GetSurfaceDesc(surface, &surface_desc); - ok(SUCCEEDED(hr), "Test %u: Failed to get surface desc, hr %#x.\n", i, hr); + ok(SUCCEEDED(hr), "Test %u: Failed to get surface desc, hr %#lx.\n", i, hr); ok(surface_desc.dwFlags & DDSD_MIPMAPCOUNT, - "Test %u: Got unexpected flags %#x.\n", i, surface_desc.dwFlags); + "Test %u: Got unexpected flags %#lx.\n", i, surface_desc.dwFlags); ok(U2(surface_desc).dwMipMapCount == tests[i].mipmap_count_out, - "Test %u: Got unexpected mipmap count %u.\n", i, U2(surface_desc).dwMipMapCount); + "Test %u: Got unexpected mipmap count %lu.\n", i, U2(surface_desc).dwMipMapCount);
surface_base = surface; IDirectDrawSurface4_AddRef(surface_base); @@ -9246,31 +9246,31 @@ static void test_mipmap(void) while (mipmap_count > 1) { hr = IDirectDrawSurface4_GetAttachedSurface(surface_base, &caps, &surface_mip); - ok(SUCCEEDED(hr), "Test %u, %u: Failed to get attached surface, hr %#x.\n", i, mipmap_count, hr); + ok(SUCCEEDED(hr), "Test %u, %u: Failed to get attached surface, hr %#lx.\n", i, mipmap_count, hr);
memset(&surface_desc, 0, sizeof(surface_desc)); surface_desc.dwSize = sizeof(surface_desc); hr = IDirectDrawSurface4_GetSurfaceDesc(surface_base, &surface_desc); - ok(SUCCEEDED(hr), "Test %u, %u: Failed to get surface desc, hr %#x.\n", i, mipmap_count, hr); + ok(SUCCEEDED(hr), "Test %u, %u: Failed to get surface desc, hr %#lx.\n", i, mipmap_count, hr); ok(surface_desc.dwFlags & DDSD_MIPMAPCOUNT, - "Test %u, %u: Got unexpected flags %#x.\n", i, mipmap_count, surface_desc.dwFlags); + "Test %u, %u: Got unexpected flags %#lx.\n", i, mipmap_count, surface_desc.dwFlags); ok(U2(surface_desc).dwMipMapCount == mipmap_count, - "Test %u, %u: Got unexpected mipmap count %u.\n", + "Test %u, %u: Got unexpected mipmap count %lu.\n", i, mipmap_count, U2(surface_desc).dwMipMapCount);
memset(&surface_desc, 0, sizeof(surface_desc)); surface_desc.dwSize = sizeof(surface_desc); hr = IDirectDrawSurface4_Lock(surface_base, NULL, &surface_desc, 0, NULL); - ok(SUCCEEDED(hr), "Test %u, %u: Failed to lock surface, hr %#x.\n", i, mipmap_count, hr); + ok(SUCCEEDED(hr), "Test %u, %u: Failed to lock surface, hr %#lx.\n", i, mipmap_count, hr); ok(surface_desc.dwMipMapCount == mipmap_count, - "Test %u, %u: unexpected change of mipmap count %u.\n", + "Test %u, %u: unexpected change of mipmap count %lu.\n", i, mipmap_count, surface_desc.dwMipMapCount); memset(&surface_desc, 0, sizeof(surface_desc)); surface_desc.dwSize = sizeof(surface_desc); hr = IDirectDrawSurface4_Lock(surface_mip, NULL, &surface_desc, 0, NULL); - ok(SUCCEEDED(hr), "Test %u, %u: Failed to lock surface, hr %#x.\n", i, mipmap_count, hr); + ok(SUCCEEDED(hr), "Test %u, %u: Failed to lock surface, hr %#lx.\n", i, mipmap_count, hr); ok(surface_desc.dwMipMapCount == mipmap_count - 1, - "Test %u, %u: Child mipmap count unexpected %u\n", i, mipmap_count, surface_desc.dwMipMapCount); + "Test %u, %u: Child mipmap count unexpected %lu\n", i, mipmap_count, surface_desc.dwMipMapCount); IDirectDrawSurface4_Unlock(surface_mip, NULL); IDirectDrawSurface4_Unlock(surface_base, NULL);
@@ -9284,7 +9284,7 @@ static void test_mipmap(void) }
refcount = IDirectDraw4_Release(ddraw); - ok(!refcount, "Got unexpected refcount %u.\n", refcount); + ok(!refcount, "Got unexpected refcount %lu.\n", refcount); DestroyWindow(window); }
@@ -9309,12 +9309,12 @@ static void test_palette_complex(void) ddraw = create_ddraw(); ok(!!ddraw, "Failed to create a ddraw object.\n"); hr = IDirectDraw4_SetCooperativeLevel(ddraw, window, DDSCL_NORMAL); - ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#lx.\n", hr);
memset(&hal_caps, 0, sizeof(hal_caps)); hal_caps.dwSize = sizeof(hal_caps); hr = IDirectDraw4_GetCaps(ddraw, &hal_caps, NULL); - ok(SUCCEEDED(hr), "Failed to get caps, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get caps, hr %#lx.\n", hr); if ((hal_caps.ddsCaps.dwCaps & (DDSCAPS_TEXTURE | DDSCAPS_MIPMAP)) != (DDSCAPS_TEXTURE | DDSCAPS_MIPMAP)) { skip("Mipmapped textures not supported, skipping mipmap palette test.\n"); @@ -9333,28 +9333,28 @@ static void test_palette_complex(void) U4(surface_desc).ddpfPixelFormat.dwFlags = DDPF_PALETTEINDEXED8 | DDPF_RGB; U1(U4(surface_desc).ddpfPixelFormat).dwRGBBitCount = 8; hr = IDirectDraw4_CreateSurface(ddraw, &surface_desc, &surface, NULL); - ok(SUCCEEDED(hr), "Failed to create surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create surface, hr %#lx.\n", hr);
memset(palette_entries, 0, sizeof(palette_entries)); hr = IDirectDraw4_CreatePalette(ddraw, DDPCAPS_8BIT | DDPCAPS_ALLOW256, palette_entries, &palette, NULL); - ok(SUCCEEDED(hr), "Failed to create palette, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create palette, hr %#lx.\n", hr);
memset(palette_entries, 0, sizeof(palette_entries)); palette_entries[1].peRed = 0xff; palette_entries[1].peGreen = 0x80; hr = IDirectDraw4_CreatePalette(ddraw, DDPCAPS_8BIT | DDPCAPS_ALLOW256, palette_entries, &palette_mipmap, NULL); - ok(SUCCEEDED(hr), "Failed to create palette, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create palette, hr %#lx.\n", hr);
palette2 = (void *)0xdeadbeef; hr = IDirectDrawSurface4_GetPalette(surface, &palette2); - ok(hr == DDERR_NOPALETTEATTACHED, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_NOPALETTEATTACHED, "Got unexpected hr %#lx.\n", hr); ok(!palette2, "Got unexpected palette %p.\n", palette2); hr = IDirectDrawSurface4_SetPalette(surface, palette); - ok(SUCCEEDED(hr), "Failed to set palette, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set palette, hr %#lx.\n", hr); hr = IDirectDrawSurface4_GetPalette(surface, &palette2); - ok(SUCCEEDED(hr), "Failed to get palette, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get palette, hr %#lx.\n", hr); ok(palette == palette2, "Got unexpected palette %p.\n", palette2); IDirectDrawPalette_Release(palette2);
@@ -9363,46 +9363,46 @@ static void test_palette_complex(void) for (i = 0; i < 7; ++i) { hr = IDirectDrawSurface4_GetAttachedSurface(mipmap, &caps, &tmp); - ok(SUCCEEDED(hr), "Failed to get attached surface, i %u, hr %#x.\n", i, hr); + ok(SUCCEEDED(hr), "Failed to get attached surface, i %u, hr %#lx.\n", i, hr); palette2 = (void *)0xdeadbeef; hr = IDirectDrawSurface4_GetPalette(tmp, &palette2); - ok(hr == DDERR_NOPALETTEATTACHED, "Got unexpected hr %#x, i %u.\n", hr, i); + ok(hr == DDERR_NOPALETTEATTACHED, "Got unexpected hr %#lx, i %u.\n", hr, i); ok(!palette2, "Got unexpected palette %p, i %u.\n", palette2, i);
hr = IDirectDrawSurface4_SetPalette(tmp, palette_mipmap); - ok(SUCCEEDED(hr), "Failed to set palette, i %u, hr %#x.\n", i, hr); + ok(SUCCEEDED(hr), "Failed to set palette, i %u, hr %#lx.\n", i, hr);
hr = IDirectDrawSurface4_GetPalette(tmp, &palette2); - ok(SUCCEEDED(hr), "Failed to get palette, i %u, hr %#x.\n", i, hr); + ok(SUCCEEDED(hr), "Failed to get palette, i %u, hr %#lx.\n", i, hr); ok(palette_mipmap == palette2, "Got unexpected palette %p.\n", palette2); IDirectDrawPalette_Release(palette2);
hr = IDirectDrawSurface4_GetDC(tmp, &dc); - ok(SUCCEEDED(hr), "Failed to get DC, i %u, hr %#x.\n", i, hr); + ok(SUCCEEDED(hr), "Failed to get DC, i %u, hr %#lx.\n", i, hr); count = GetDIBColorTable(dc, 1, 1, &rgbquad); ok(count == 1, "Expected count 1, got %u.\n", count); ok(rgbquad.rgbRed == 0xff, "Expected rgbRed = 0xff, got %#x.\n", rgbquad.rgbRed); ok(rgbquad.rgbGreen == 0x80, "Expected rgbGreen = 0x80, got %#x.\n", rgbquad.rgbGreen); ok(rgbquad.rgbBlue == 0x0, "Expected rgbBlue = 0x0, got %#x.\n", rgbquad.rgbBlue); hr = IDirectDrawSurface4_ReleaseDC(tmp, dc); - ok(SUCCEEDED(hr), "Failed to release DC, i %u, hr %#x.\n", i, hr); + ok(SUCCEEDED(hr), "Failed to release DC, i %u, hr %#lx.\n", i, hr);
IDirectDrawSurface4_Release(mipmap); mipmap = tmp; }
hr = IDirectDrawSurface4_GetAttachedSurface(mipmap, &caps, &tmp); - ok(hr == DDERR_NOTFOUND, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_NOTFOUND, "Got unexpected hr %#lx.\n", hr); IDirectDrawSurface4_Release(mipmap); refcount = IDirectDrawSurface4_Release(surface); - ok(!refcount, "Got unexpected refcount %u.\n", refcount); + ok(!refcount, "Got unexpected refcount %lu.\n", refcount); refcount = IDirectDrawPalette_Release(palette_mipmap); - ok(!refcount, "Got unexpected refcount %u.\n", refcount); + ok(!refcount, "Got unexpected refcount %lu.\n", refcount); refcount = IDirectDrawPalette_Release(palette); - ok(!refcount, "Got unexpected refcount %u.\n", refcount); + ok(!refcount, "Got unexpected refcount %lu.\n", refcount);
refcount = IDirectDraw4_Release(ddraw); - ok(!refcount, "Got unexpected refcount %u.\n", refcount); + ok(!refcount, "Got unexpected refcount %lu.\n", refcount); DestroyWindow(window); }
@@ -9433,7 +9433,7 @@ static void test_p8_blit(void) ddraw = create_ddraw(); ok(!!ddraw, "Failed to create a ddraw object.\n"); hr = IDirectDraw4_SetCooperativeLevel(ddraw, window, DDSCL_NORMAL); - ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#lx.\n", hr); is_warp = ddraw_is_warp(ddraw);
memset(palette_entries, 0, sizeof(palette_entries)); @@ -9443,14 +9443,14 @@ static void test_p8_blit(void) palette_entries[4].peRed = 0xff; hr = IDirectDraw4_CreatePalette(ddraw, DDPCAPS_8BIT | DDPCAPS_ALLOW256, palette_entries, &palette, NULL); - ok(SUCCEEDED(hr), "Failed to create palette, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create palette, hr %#lx.\n", hr); palette_entries[1].peBlue = 0xff; palette_entries[2].peGreen = 0xff; palette_entries[3].peRed = 0xff; palette_entries[4].peFlags = 0x0; hr = IDirectDraw4_CreatePalette(ddraw, DDPCAPS_8BIT | DDPCAPS_ALLOW256, palette_entries, &palette2, NULL); - ok(SUCCEEDED(hr), "Failed to create palette, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create palette, hr %#lx.\n", hr);
memset(&surface_desc, 0, sizeof(surface_desc)); surface_desc.dwSize = sizeof(surface_desc); @@ -9462,11 +9462,11 @@ static void test_p8_blit(void) U4(surface_desc).ddpfPixelFormat.dwFlags = DDPF_PALETTEINDEXED8 | DDPF_RGB; U1(U4(surface_desc).ddpfPixelFormat).dwRGBBitCount = 8; hr = IDirectDraw4_CreateSurface(ddraw, &surface_desc, &src, NULL); - ok(SUCCEEDED(hr), "Failed to create surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create surface, hr %#lx.\n", hr); hr = IDirectDraw4_CreateSurface(ddraw, &surface_desc, &dst_p8, NULL); - ok(SUCCEEDED(hr), "Failed to create surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create surface, hr %#lx.\n", hr); hr = IDirectDrawSurface4_SetPalette(dst_p8, palette2); - ok(SUCCEEDED(hr), "Failed to set palette, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set palette, hr %#lx.\n", hr);
memset(&surface_desc, 0, sizeof(surface_desc)); surface_desc.dwSize = sizeof(surface_desc); @@ -9482,34 +9482,34 @@ static void test_p8_blit(void) U4(U4(surface_desc).ddpfPixelFormat).dwBBitMask = 0x000000ff; U5(U4(surface_desc).ddpfPixelFormat).dwRGBAlphaBitMask = 0xff000000; hr = IDirectDraw4_CreateSurface(ddraw, &surface_desc, &dst, NULL); - ok(SUCCEEDED(hr), "Failed to create surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create surface, hr %#lx.\n", hr);
memset(&surface_desc, 0, sizeof(surface_desc)); surface_desc.dwSize = sizeof(surface_desc); hr = IDirectDrawSurface4_Lock(src, NULL, &surface_desc, DDLOCK_WAIT, NULL); - ok(SUCCEEDED(hr), "Failed to lock source surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to lock source surface, hr %#lx.\n", hr); memcpy(surface_desc.lpSurface, src_data, sizeof(src_data)); hr = IDirectDrawSurface4_Unlock(src, NULL); - ok(SUCCEEDED(hr), "Failed to unlock source surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to unlock source surface, hr %#lx.\n", hr);
hr = IDirectDrawSurface4_Lock(dst_p8, NULL, &surface_desc, DDLOCK_WAIT, NULL); - ok(SUCCEEDED(hr), "Failed to lock destination surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to lock destination surface, hr %#lx.\n", hr); memcpy(surface_desc.lpSurface, src_data2, sizeof(src_data2)); hr = IDirectDrawSurface4_Unlock(dst_p8, NULL); - ok(SUCCEEDED(hr), "Failed to unlock destination surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to unlock destination surface, hr %#lx.\n", hr);
fx.dwSize = sizeof(fx); fx.dwFillColor = 0xdeadbeef; hr = IDirectDrawSurface4_Blt(dst, NULL, NULL, NULL, DDBLT_WAIT | DDBLT_COLORFILL, &fx); - ok(SUCCEEDED(hr), "Failed to color fill %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to color fill %#lx.\n", hr);
hr = IDirectDrawSurface4_SetPalette(src, palette); - ok(SUCCEEDED(hr), "Failed to set palette, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set palette, hr %#lx.\n", hr); hr = IDirectDrawSurface4_Blt(dst, NULL, src, NULL, DDBLT_WAIT, NULL); /* The r500 Windows 7 driver returns E_NOTIMPL. r200 on Windows XP works. * The Geforce 7 driver on Windows Vista returns E_FAIL. Newer Nvidia GPUs work. */ ok(SUCCEEDED(hr) || broken(hr == E_NOTIMPL) || broken(hr == E_FAIL), - "Failed to blit, hr %#x.\n", hr); + "Failed to blit, hr %#lx.\n", hr);
if (SUCCEEDED(hr)) { @@ -9520,7 +9520,7 @@ static void test_p8_blit(void) * blits see below. */ todo_wine ok(compare_color(color, expected[x], 0) || broken(is_warp && compare_color(color, 0x00000000, 0)), - "Pixel %u: Got color %#x, expected %#x.\n", + "Pixel %u: Got color %#lx, expected %#lx.\n", x, color, expected[x]); } } @@ -9528,10 +9528,10 @@ static void test_p8_blit(void) fx.ddckSrcColorkey.dwColorSpaceHighValue = 0x2; fx.ddckSrcColorkey.dwColorSpaceLowValue = 0x2; hr = IDirectDrawSurface4_Blt(dst_p8, NULL, src, NULL, DDBLT_WAIT | DDBLT_KEYSRCOVERRIDE, &fx); - ok(SUCCEEDED(hr), "Failed to blit, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to blit, hr %#lx.\n", hr);
hr = IDirectDrawSurface4_Lock(dst_p8, NULL, &surface_desc, DDLOCK_READONLY | DDLOCK_WAIT, NULL); - ok(SUCCEEDED(hr), "Failed to lock destination surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to lock destination surface, hr %#lx.\n", hr); /* A color keyed P8 blit doesn't do anything on WARP - it just leaves the data in the destination * surface untouched. Error checking (DDBLT_KEYSRC without a key * for example) also works as expected. @@ -9542,7 +9542,7 @@ static void test_p8_blit(void) || broken(is_warp && !memcmp(surface_desc.lpSurface, src_data2, sizeof(src_data2))), "Got unexpected P8 color key blit result.\n"); hr = IDirectDrawSurface4_Unlock(dst_p8, NULL); - ok(SUCCEEDED(hr), "Failed to unlock destination surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to unlock destination surface, hr %#lx.\n", hr);
IDirectDrawSurface4_Release(src); IDirectDrawSurface4_Release(dst); @@ -9551,7 +9551,7 @@ static void test_p8_blit(void) IDirectDrawPalette_Release(palette2);
refcount = IDirectDraw4_Release(ddraw); - ok(!refcount, "Got unexpected refcount %u.\n", refcount); + ok(!refcount, "Got unexpected refcount %lu.\n", refcount); DestroyWindow(window); }
@@ -9613,95 +9613,95 @@ static void test_material(void) }
hr = IDirect3DDevice3_GetRenderTarget(device, &rt); - ok(SUCCEEDED(hr), "Failed to get render target, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get render target, hr %#lx.\n", hr);
viewport = create_viewport(device, 0, 0, 640, 480); hr = IDirect3DDevice3_SetCurrentViewport(device, viewport); - ok(SUCCEEDED(hr), "Failed to set current viewport, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set current viewport, hr %#lx.\n", hr);
material = create_emissive_material(device, 0.0f, 1.0f, 0.0f, 0.0f); hr = IDirect3DMaterial3_GetHandle(material, device, &mat_handle); - ok(SUCCEEDED(hr), "Failed to get material handle, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get material handle, hr %#lx.\n", hr);
hr = IDirect3DDevice3_GetLightState(device, D3DLIGHTSTATE_MATERIAL, &tmp); - ok(SUCCEEDED(hr), "Failed to get light state, hr %#x.\n", hr); - ok(!tmp, "Got unexpected material handle %#x.\n", tmp); + ok(SUCCEEDED(hr), "Failed to get light state, hr %#lx.\n", hr); + ok(!tmp, "Got unexpected material handle %#lx.\n", tmp); hr = IDirect3DDevice3_SetLightState(device, D3DLIGHTSTATE_MATERIAL, mat_handle); - ok(SUCCEEDED(hr), "Failed to set material state, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set material state, hr %#lx.\n", hr); hr = IDirect3DDevice3_GetLightState(device, D3DLIGHTSTATE_MATERIAL, &tmp); - ok(SUCCEEDED(hr), "Failed to get light state, hr %#x.\n", hr); - ok(tmp == mat_handle, "Got unexpected material handle %#x, expected %#x.\n", tmp, mat_handle); + ok(SUCCEEDED(hr), "Failed to get light state, hr %#lx.\n", hr); + ok(tmp == mat_handle, "Got unexpected material handle %#lx, expected %#lx.\n", tmp, mat_handle); hr = IDirect3DDevice3_SetLightState(device, D3DLIGHTSTATE_MATERIAL, 0); - ok(SUCCEEDED(hr), "Failed to set material state, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set material state, hr %#lx.\n", hr); hr = IDirect3DDevice3_GetLightState(device, D3DLIGHTSTATE_MATERIAL, &tmp); - ok(SUCCEEDED(hr), "Failed to get light state, hr %#x.\n", hr); - ok(!tmp, "Got unexpected material handle %#x.\n", tmp); + ok(SUCCEEDED(hr), "Failed to get light state, hr %#lx.\n", hr); + ok(!tmp, "Got unexpected material handle %#lx.\n", tmp);
for (i = 0; i < ARRAY_SIZE(test_data); ++i) { hr = IDirect3DViewport3_Clear2(viewport, 1, &clear_rect, D3DCLEAR_TARGET | D3DCLEAR_ZBUFFER, 0xff0000ff, 1.0f, 0); - ok(SUCCEEDED(hr), "Failed to clear viewport, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to clear viewport, hr %#lx.\n", hr);
hr = IDirect3DDevice3_SetLightState(device, D3DLIGHTSTATE_MATERIAL, test_data[i].material ? mat_handle : 0); - ok(SUCCEEDED(hr), "Failed to set material state, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set material state, hr %#lx.\n", hr);
hr = IDirect3DDevice3_BeginScene(device); - ok(SUCCEEDED(hr), "Failed to begin scene, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to begin scene, hr %#lx.\n", hr); hr = IDirect3DDevice2_DrawPrimitive(device, D3DPT_TRIANGLESTRIP, D3DFVF_XYZ | D3DFVF_NORMAL | D3DFVF_DIFFUSE, test_data[i].data, 4, 0); - ok(SUCCEEDED(hr), "Failed to draw, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to draw, hr %#lx.\n", hr); hr = IDirect3DDevice3_EndScene(device); - ok(SUCCEEDED(hr), "Failed to end scene, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to end scene, hr %#lx.\n", hr); color = get_surface_color(rt, 320, 240); ok(compare_color(color, test_data[i].expected_color, 1), - "Got unexpected color 0x%08x, test %u.\n", color, i); + "Got unexpected color 0x%08lx, test %u.\n", color, i); }
destroy_material(material); material = create_diffuse_material(device, 1.0f, 0.0f, 0.0f, 1.0f); hr = IDirect3DMaterial3_GetHandle(material, device, &mat_handle); - ok(SUCCEEDED(hr), "Failed to get material handle, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get material handle, hr %#lx.\n", hr);
hr = IDirect3DViewport3_SetBackground(viewport, mat_handle); - ok(SUCCEEDED(hr), "Failed to set viewport background, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set viewport background, hr %#lx.\n", hr); hr = IDirect3DViewport3_GetBackground(viewport, &tmp, &valid); - ok(SUCCEEDED(hr), "Failed to get viewport background, hr %#x.\n", hr); - ok(tmp == mat_handle, "Got unexpected material handle %#x, expected %#x.\n", tmp, mat_handle); + ok(SUCCEEDED(hr), "Failed to get viewport background, hr %#lx.\n", hr); + ok(tmp == mat_handle, "Got unexpected material handle %#lx, expected %#lx.\n", tmp, mat_handle); ok(valid, "Got unexpected valid %#x.\n", valid); hr = IDirect3DViewport3_Clear(viewport, 1, &clear_rect, D3DCLEAR_TARGET); - ok(SUCCEEDED(hr), "Failed to clear viewport, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to clear viewport, hr %#lx.\n", hr); color = get_surface_color(rt, 320, 240); - ok(compare_color(color, 0x00ff0000, 1), "Got unexpected color 0x%08x.\n", color); + ok(compare_color(color, 0x00ff0000, 1), "Got unexpected color 0x%08lx.\n", color);
hr = IDirect3DViewport3_SetBackground(viewport, 0); - ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#lx.\n", hr); hr = IDirect3DViewport3_GetBackground(viewport, &tmp, &valid); - ok(SUCCEEDED(hr), "Failed to get viewport background, hr %#x.\n", hr); - ok(tmp == mat_handle, "Got unexpected material handle %#x, expected %#x.\n", tmp, mat_handle); + ok(SUCCEEDED(hr), "Failed to get viewport background, hr %#lx.\n", hr); + ok(tmp == mat_handle, "Got unexpected material handle %#lx, expected %#lx.\n", tmp, mat_handle); ok(valid, "Got unexpected valid %#x.\n", valid); hr = IDirect3DViewport3_Clear(viewport, 1, &clear_rect, D3DCLEAR_TARGET); - ok(SUCCEEDED(hr), "Failed to clear viewport, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to clear viewport, hr %#lx.\n", hr); color = get_surface_color(rt, 320, 240); - ok(compare_color(color, 0x00ff0000, 1), "Got unexpected color 0x%08x.\n", color); + ok(compare_color(color, 0x00ff0000, 1), "Got unexpected color 0x%08lx.\n", color);
destroy_viewport(device, viewport); viewport = create_viewport(device, 0, 0, 640, 480);
hr = IDirect3DViewport3_GetBackground(viewport, &tmp, &valid); - ok(SUCCEEDED(hr), "Failed to get viewport background, hr %#x.\n", hr); - ok(!tmp, "Got unexpected material handle %#x.\n", tmp); + ok(SUCCEEDED(hr), "Failed to get viewport background, hr %#lx.\n", hr); + ok(!tmp, "Got unexpected material handle %#lx.\n", tmp); ok(!valid, "Got unexpected valid %#x.\n", valid); hr = IDirect3DViewport3_Clear(viewport, 1, &clear_rect, D3DCLEAR_TARGET); - ok(SUCCEEDED(hr), "Failed to clear viewport, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to clear viewport, hr %#lx.\n", hr); color = get_surface_color(rt, 320, 240); - ok(compare_color(color, 0x00000000, 1), "Got unexpected color 0x%08x.\n", color); + ok(compare_color(color, 0x00000000, 1), "Got unexpected color 0x%08lx.\n", color);
destroy_viewport(device, viewport); destroy_material(material); IDirectDrawSurface4_Release(rt); refcount = IDirect3DDevice3_Release(device); - ok(!refcount, "Device has %u references left.\n", refcount); + ok(!refcount, "Device has %lu references left.\n", refcount); DestroyWindow(window); }
@@ -9747,7 +9747,7 @@ static void test_palette_gdi(void) ddraw = create_ddraw(); ok(!!ddraw, "Failed to create a ddraw object.\n"); hr = IDirectDraw4_SetCooperativeLevel(ddraw, window, DDSCL_NORMAL); - ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#lx.\n", hr);
memset(&surface_desc, 0, sizeof(surface_desc)); surface_desc.dwSize = sizeof(surface_desc); @@ -9759,7 +9759,7 @@ static void test_palette_gdi(void) U4(surface_desc).ddpfPixelFormat.dwFlags = DDPF_PALETTEINDEXED8 | DDPF_RGB; U1(U4(surface_desc).ddpfPixelFormat).dwRGBBitCount = 8; hr = IDirectDraw4_CreateSurface(ddraw, &surface_desc, &surface, NULL); - ok(SUCCEEDED(hr), "Failed to create surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create surface, hr %#lx.\n", hr);
/* Avoid colors from the Windows default palette. */ memset(palette_entries, 0, sizeof(palette_entries)); @@ -9771,7 +9771,7 @@ static void test_palette_gdi(void) palette_entries[4].peBlue = 0x15; hr = IDirectDraw4_CreatePalette(ddraw, DDPCAPS_8BIT | DDPCAPS_ALLOW256, palette_entries, &palette, NULL); - ok(SUCCEEDED(hr), "Failed to create palette, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create palette, hr %#lx.\n", hr);
/* If there is no palette assigned and the display mode is not 8 bpp, some * drivers refuse to create a DC while others allow it. If a DC is created, @@ -9784,9 +9784,9 @@ static void test_palette_gdi(void) * contains uninitialized garbage. See comments below for the P8 case. */
hr = IDirectDrawSurface4_SetPalette(surface, palette); - ok(SUCCEEDED(hr), "Failed to set palette, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set palette, hr %#lx.\n", hr); hr = IDirectDrawSurface4_GetDC(surface, &dc); - ok(SUCCEEDED(hr), "Failed to get DC, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get DC, hr %#lx.\n", hr); ddraw_palette_handle = SelectPalette(dc, GetStockObject(DEFAULT_PALETTE), FALSE); ok(ddraw_palette_handle == GetStockObject(DEFAULT_PALETTE), "Got unexpected palette %p, expected %p.\n", @@ -9813,7 +9813,7 @@ static void test_palette_gdi(void) palette_entries[4].peGreen = 0x24; palette_entries[4].peBlue = 0x25; hr = IDirectDrawPalette_SetEntries(palette, 0, 4, 1, &palette_entries[4]); - ok(SUCCEEDED(hr), "Failed to set palette entries, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set palette entries, hr %#lx.\n", hr);
i = GetDIBColorTable(dc, 4, 1, &rgbquad[4]); ok(i == 1, "Expected count 1, got %u.\n", i); @@ -9824,9 +9824,9 @@ static void test_palette_gdi(void)
/* Neither does re-setting the palette. */ hr = IDirectDrawSurface4_SetPalette(surface, NULL); - ok(SUCCEEDED(hr), "Failed to set palette, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set palette, hr %#lx.\n", hr); hr = IDirectDrawSurface4_SetPalette(surface, palette); - ok(SUCCEEDED(hr), "Failed to set palette, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set palette, hr %#lx.\n", hr);
i = GetDIBColorTable(dc, 4, 1, &rgbquad[4]); ok(i == 1, "Expected count 1, got %u.\n", i); @@ -9836,11 +9836,11 @@ static void test_palette_gdi(void) expected1[4].rgbRed, expected1[4].rgbGreen, expected1[4].rgbBlue);
hr = IDirectDrawSurface4_ReleaseDC(surface, dc); - ok(SUCCEEDED(hr), "Failed to release DC, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to release DC, hr %#lx.\n", hr);
/* Refresh the DC. This updates the palette. */ hr = IDirectDrawSurface4_GetDC(surface, &dc); - ok(SUCCEEDED(hr), "Failed to get DC, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get DC, hr %#lx.\n", hr); i = GetDIBColorTable(dc, 0, ARRAY_SIZE(rgbquad), rgbquad); ok(i == ARRAY_SIZE(rgbquad), "Expected count 255, got %u.\n", i); for (i = 0; i < ARRAY_SIZE(expected2); i++) @@ -9857,13 +9857,13 @@ static void test_palette_gdi(void) i, rgbquad[i].rgbRed, rgbquad[i].rgbGreen, rgbquad[i].rgbBlue); } hr = IDirectDrawSurface4_ReleaseDC(surface, dc); - ok(SUCCEEDED(hr), "Failed to release DC, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to release DC, hr %#lx.\n", hr);
refcount = IDirectDrawSurface4_Release(surface); - ok(!refcount, "Got unexpected refcount %u.\n", refcount); + ok(!refcount, "Got unexpected refcount %lu.\n", refcount);
hr = IDirectDraw4_SetCooperativeLevel(ddraw, window, DDSCL_FULLSCREEN | DDSCL_EXCLUSIVE); - ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#lx.\n", hr); if (FAILED(IDirectDraw4_SetDisplayMode(ddraw, 640, 480, 8, 0, 0))) { win_skip("Failed to set 8 bpp display mode, skipping test.\n"); @@ -9872,35 +9872,35 @@ static void test_palette_gdi(void) DestroyWindow(window); return; } - ok(SUCCEEDED(hr), "Failed to set display mode, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set display mode, hr %#lx.\n", hr);
memset(&surface_desc, 0, sizeof(surface_desc)); surface_desc.dwSize = sizeof(surface_desc); surface_desc.dwFlags = DDSD_CAPS; surface_desc.ddsCaps.dwCaps = DDSCAPS_PRIMARYSURFACE; hr = IDirectDraw4_CreateSurface(ddraw, &surface_desc, &primary, NULL); - ok(SUCCEEDED(hr), "Failed to create surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create surface, hr %#lx.\n", hr);
memset(&fx, 0, sizeof(fx)); fx.dwSize = sizeof(fx); U5(fx).dwFillColor = 3; SetRect(&r, 0, 0, 319, 479); hr = IDirectDrawSurface4_Blt(primary, &r, NULL, NULL, DDBLT_COLORFILL | DDBLT_WAIT, &fx); - ok(SUCCEEDED(hr), "Failed to clear surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to clear surface, hr %#lx.\n", hr); SetRect(&r, 320, 0, 639, 479); U5(fx).dwFillColor = 4; hr = IDirectDrawSurface4_Blt(primary, &r, NULL, NULL, DDBLT_COLORFILL | DDBLT_WAIT, &fx); - ok(SUCCEEDED(hr), "Failed to clear surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to clear surface, hr %#lx.\n", hr);
hr = IDirectDrawSurface4_SetPalette(primary, palette); - ok(SUCCEEDED(hr), "Failed to set palette, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set palette, hr %#lx.\n", hr); hr = IDirectDrawSurface4_GetDC(primary, &dc); - ok(SUCCEEDED(hr), "Failed to get DC, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get DC, hr %#lx.\n", hr);
color = GetPixel(dc, 160, 240); - ok(color == 0x00030000, "Clear index 3: Got unexpected color 0x%08x.\n", color); + ok(color == 0x00030000, "Clear index 3: Got unexpected color 0x%08lx.\n", color); color = GetPixel(dc, 480, 240); - ok(color == 0x00252423, "Clear index 4: Got unexpected color 0x%08x.\n", color); + ok(color == 0x00252423, "Clear index 4: Got unexpected color 0x%08lx.\n", color);
ddraw_palette_handle = SelectPalette(dc, GetStockObject(DEFAULT_PALETTE), FALSE); ok(ddraw_palette_handle == GetStockObject(DEFAULT_PALETTE), @@ -9930,7 +9930,7 @@ static void test_palette_gdi(void) i, rgbquad[i].rgbRed, rgbquad[i].rgbGreen, rgbquad[i].rgbBlue); } hr = IDirectDrawSurface4_ReleaseDC(primary, dc); - ok(SUCCEEDED(hr), "Failed to release DC, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to release DC, hr %#lx.\n", hr);
memset(&surface_desc, 0, sizeof(surface_desc)); surface_desc.dwSize = sizeof(surface_desc); @@ -9939,12 +9939,12 @@ static void test_palette_gdi(void) surface_desc.dwHeight = 16; surface_desc.ddsCaps.dwCaps = DDSCAPS_OFFSCREENPLAIN; hr = IDirectDraw4_CreateSurface(ddraw, &surface_desc, &surface, NULL); - ok(SUCCEEDED(hr), "Failed to create surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create surface, hr %#lx.\n", hr);
/* Here the offscreen surface appears to use the primary's palette, * but in all likelihood it is actually the system palette. */ hr = IDirectDrawSurface4_GetDC(surface, &dc); - ok(SUCCEEDED(hr), "Failed to get DC, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get DC, hr %#lx.\n", hr); i = GetDIBColorTable(dc, 0, ARRAY_SIZE(rgbquad), rgbquad); ok(i == ARRAY_SIZE(rgbquad), "Expected count 255, got %u.\n", i); for (i = 0; i < ARRAY_SIZE(expected2); i++) @@ -9961,7 +9961,7 @@ static void test_palette_gdi(void) i, rgbquad[i].rgbRed, rgbquad[i].rgbGreen, rgbquad[i].rgbBlue); } hr = IDirectDrawSurface4_ReleaseDC(surface, dc); - ok(SUCCEEDED(hr), "Failed to release DC, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to release DC, hr %#lx.\n", hr);
/* On real hardware a change to the primary surface's palette applies immediately, * even on device contexts from offscreen surfaces that do not have their own @@ -9977,14 +9977,14 @@ static void test_palette_gdi(void) palette_entries[4].peBlue = 0x56; hr = IDirectDraw4_CreatePalette(ddraw, DDPCAPS_8BIT | DDPCAPS_ALLOW256, palette_entries, &palette2, NULL); - ok(SUCCEEDED(hr), "Failed to create palette, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create palette, hr %#lx.\n", hr); hr = IDirectDrawSurface4_SetPalette(surface, palette2); - ok(SUCCEEDED(hr), "Failed to set palette, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set palette, hr %#lx.\n", hr);
/* A palette assigned to the offscreen surface overrides the primary / system * palette. */ hr = IDirectDrawSurface4_GetDC(surface, &dc); - ok(SUCCEEDED(hr), "Failed to get DC, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get DC, hr %#lx.\n", hr); i = GetDIBColorTable(dc, 0, ARRAY_SIZE(rgbquad), rgbquad); ok(i == ARRAY_SIZE(rgbquad), "Expected count 255, got %u.\n", i); for (i = 0; i < ARRAY_SIZE(expected3); i++) @@ -10001,24 +10001,24 @@ static void test_palette_gdi(void) i, rgbquad[i].rgbRed, rgbquad[i].rgbGreen, rgbquad[i].rgbBlue); } hr = IDirectDrawSurface4_ReleaseDC(surface, dc); - ok(SUCCEEDED(hr), "Failed to release DC, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to release DC, hr %#lx.\n", hr);
refcount = IDirectDrawSurface4_Release(surface); - ok(!refcount, "Got unexpected refcount %u.\n", refcount); + ok(!refcount, "Got unexpected refcount %lu.\n", refcount);
/* The Windows 8 testbot keeps extra references to the primary and * backbuffer while in 8 bpp mode. */ hr = IDirectDraw4_RestoreDisplayMode(ddraw); - ok(SUCCEEDED(hr), "Failed to restore display mode, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to restore display mode, hr %#lx.\n", hr);
refcount = IDirectDrawSurface4_Release(primary); - ok(!refcount, "Got unexpected refcount %u.\n", refcount); + ok(!refcount, "Got unexpected refcount %lu.\n", refcount); refcount = IDirectDrawPalette_Release(palette2); - ok(!refcount, "Got unexpected refcount %u.\n", refcount); + ok(!refcount, "Got unexpected refcount %lu.\n", refcount); refcount = IDirectDrawPalette_Release(palette); - ok(!refcount, "Got unexpected refcount %u.\n", refcount); + ok(!refcount, "Got unexpected refcount %lu.\n", refcount); refcount = IDirectDraw4_Release(ddraw); - ok(!refcount, "Got unexpected refcount %u.\n", refcount); + ok(!refcount, "Got unexpected refcount %lu.\n", refcount); DestroyWindow(window); }
@@ -10057,18 +10057,18 @@ static void test_palette_alpha(void) return; } hr = IDirectDraw4_SetCooperativeLevel(ddraw, window, DDSCL_EXCLUSIVE | DDSCL_FULLSCREEN); - ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#lx.\n", hr);
memset(palette_entries, 0, sizeof(palette_entries)); palette_entries[1].peFlags = 0x42; palette_entries[2].peFlags = 0xff; palette_entries[3].peFlags = 0x80; hr = IDirectDraw4_CreatePalette(ddraw, DDPCAPS_ALLOW256 | DDPCAPS_8BIT, palette_entries, &palette, NULL); - ok(SUCCEEDED(hr), "Failed to create palette, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create palette, hr %#lx.\n", hr);
memset(palette_entries, 0x66, sizeof(palette_entries)); hr = IDirectDrawPalette_GetEntries(palette, 0, 1, 4, palette_entries); - ok(SUCCEEDED(hr), "Failed to get palette entries, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get palette entries, hr %#lx.\n", hr); ok(palette_entries[0].peFlags == 0x42, "Got unexpected peFlags 0x%02x, expected 0xff.\n", palette_entries[0].peFlags); ok(palette_entries[1].peFlags == 0xff, "Got unexpected peFlags 0x%02x, expected 0xff.\n", @@ -10087,11 +10087,11 @@ static void test_palette_alpha(void) palette_entries[3].peFlags = 0x80; hr = IDirectDraw4_CreatePalette(ddraw, DDPCAPS_ALLOW256 | DDPCAPS_8BIT | DDPCAPS_ALPHA, palette_entries, &palette, NULL); - ok(SUCCEEDED(hr), "Failed to create palette, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create palette, hr %#lx.\n", hr);
memset(palette_entries, 0x66, sizeof(palette_entries)); hr = IDirectDrawPalette_GetEntries(palette, 0, 1, 4, palette_entries); - ok(SUCCEEDED(hr), "Failed to get palette entries, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get palette entries, hr %#lx.\n", hr); ok(palette_entries[0].peFlags == 0x42, "Got unexpected peFlags 0x%02x, expected 0xff.\n", palette_entries[0].peFlags); ok(palette_entries[1].peFlags == 0xff, "Got unexpected peFlags 0x%02x, expected 0xff.\n", @@ -10110,13 +10110,13 @@ static void test_palette_alpha(void) surface_desc.dwHeight = 128; surface_desc.ddsCaps.dwCaps = test_data[i].caps; hr = IDirectDraw4_CreateSurface(ddraw, &surface_desc, &surface, NULL); - ok(SUCCEEDED(hr), "Failed to create %s surface, hr %#x.\n", test_data[i].name, hr); + ok(SUCCEEDED(hr), "Failed to create %s surface, hr %#lx.\n", test_data[i].name, hr);
hr = IDirectDrawSurface4_SetPalette(surface, palette); if (test_data[i].attach_allowed) - ok(SUCCEEDED(hr), "Failed to attach palette to %s surface, hr %#x.\n", test_data[i].name, hr); + ok(SUCCEEDED(hr), "Failed to attach palette to %s surface, hr %#lx.\n", test_data[i].name, hr); else - ok(hr == DDERR_INVALIDSURFACETYPE, "Got unexpected hr %#x, %s surface.\n", hr, test_data[i].name); + ok(hr == DDERR_INVALIDSURFACETYPE, "Got unexpected hr %#lx, %s surface.\n", hr, test_data[i].name);
if (SUCCEEDED(hr)) { @@ -10125,7 +10125,7 @@ static void test_palette_alpha(void) UINT retval;
hr = IDirectDrawSurface4_GetDC(surface, &dc); - ok(SUCCEEDED(hr), "Failed to get DC, hr %#x, %s surface.\n", hr, test_data[i].name); + ok(SUCCEEDED(hr), "Failed to get DC, hr %#lx, %s surface.\n", hr, test_data[i].name); retval = GetDIBColorTable(dc, 1, 1, &rgbquad); ok(retval == 1, "GetDIBColorTable returned unexpected result %u.\n", retval); ok(rgbquad.rgbRed == 0xff, "Expected rgbRed = 0xff, got %#x, %s surface.\n", @@ -10137,7 +10137,7 @@ static void test_palette_alpha(void) ok(rgbquad.rgbReserved == 0, "Expected rgbReserved = 0, got %u, %s surface.\n", rgbquad.rgbReserved, test_data[i].name); hr = IDirectDrawSurface4_ReleaseDC(surface, dc); - ok(SUCCEEDED(hr), "Failed to release DC, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to release DC, hr %#lx.\n", hr); } IDirectDrawSurface4_Release(surface); } @@ -10156,20 +10156,20 @@ static void test_palette_alpha(void) U3(U4(surface_desc).ddpfPixelFormat).dwGBitMask = 0x0000ff00; U4(U4(surface_desc).ddpfPixelFormat).dwBBitMask = 0x000000ff; hr = IDirectDraw4_CreateSurface(ddraw, &surface_desc, &surface, NULL); - ok(SUCCEEDED(hr), "Failed to create surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create surface, hr %#lx.\n", hr); hr = IDirectDrawSurface4_SetPalette(surface, palette); - ok(hr == DDERR_INVALIDSURFACETYPE, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_INVALIDSURFACETYPE, "Got unexpected hr %#lx.\n", hr); IDirectDrawSurface4_Release(surface);
/* The Windows 8 testbot keeps extra references to the primary * while in 8 bpp mode. */ hr = IDirectDraw4_RestoreDisplayMode(ddraw); - ok(SUCCEEDED(hr), "Failed to restore display mode, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to restore display mode, hr %#lx.\n", hr);
refcount = IDirectDrawPalette_Release(palette); - ok(!refcount, "Got unexpected refcount %u.\n", refcount); + ok(!refcount, "Got unexpected refcount %lu.\n", refcount); refcount = IDirectDraw4_Release(ddraw); - ok(!refcount, "Got unexpected refcount %u.\n", refcount); + ok(!refcount, "Got unexpected refcount %lu.\n", refcount); DestroyWindow(window); }
@@ -10199,7 +10199,7 @@ static void test_vb_writeonly(void) }
hr = IDirect3DDevice3_GetDirect3D(device, &d3d); - ok(SUCCEEDED(hr), "Failed to get d3d interface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get d3d interface, hr %#lx.\n", hr);
memset(&desc, 0, sizeof(desc)); desc.dwSize = sizeof(desc); @@ -10207,32 +10207,32 @@ static void test_vb_writeonly(void) desc.dwFVF = D3DFVF_XYZRHW; desc.dwNumVertices = ARRAY_SIZE(quad); hr = IDirect3D3_CreateVertexBuffer(d3d, &desc, &buffer, 0, NULL); - ok(SUCCEEDED(hr), "Failed to create vertex buffer, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create vertex buffer, hr %#lx.\n", hr);
hr = IDirect3DVertexBuffer_Lock(buffer, DDLOCK_DISCARDCONTENTS, &ptr, NULL); - ok(SUCCEEDED(hr), "Failed to lock vertex buffer, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to lock vertex buffer, hr %#lx.\n", hr); memcpy(ptr, quad, sizeof(quad)); hr = IDirect3DVertexBuffer_Unlock(buffer); - ok(SUCCEEDED(hr), "Failed to unlock vertex buffer, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to unlock vertex buffer, hr %#lx.\n", hr);
hr = IDirect3DDevice3_BeginScene(device); - ok(SUCCEEDED(hr), "Failed to begin scene, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to begin scene, hr %#lx.\n", hr); hr = IDirect3DDevice3_DrawPrimitiveVB(device, D3DPT_TRIANGLESTRIP, buffer, 0, 4, 0); - ok(SUCCEEDED(hr), "Failed to draw, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to draw, hr %#lx.\n", hr); hr = IDirect3DDevice3_EndScene(device); - ok(SUCCEEDED(hr), "Failed to end scene, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to end scene, hr %#lx.\n", hr);
hr = IDirect3DVertexBuffer_Lock(buffer, 0, &ptr, NULL); - ok(SUCCEEDED(hr), "Failed to lock vertex buffer, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to lock vertex buffer, hr %#lx.\n", hr); ok (!memcmp(ptr, quad, sizeof(quad)), "Got unexpected vertex buffer data.\n"); hr = IDirect3DVertexBuffer_Unlock(buffer); - ok(SUCCEEDED(hr), "Failed to unlock vertex buffer, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to unlock vertex buffer, hr %#lx.\n", hr);
hr = IDirect3DVertexBuffer_Lock(buffer, DDLOCK_READONLY, &ptr, NULL); - ok(SUCCEEDED(hr), "Failed to lock vertex buffer, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to lock vertex buffer, hr %#lx.\n", hr); ok (!memcmp(ptr, quad, sizeof(quad)), "Got unexpected vertex buffer data.\n"); hr = IDirect3DVertexBuffer_Unlock(buffer); - ok(SUCCEEDED(hr), "Failed to unlock vertex buffer, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to unlock vertex buffer, hr %#lx.\n", hr);
IDirect3DVertexBuffer_Release(buffer); IDirect3D3_Release(d3d); @@ -10259,7 +10259,7 @@ static void test_lost_device(void) ddraw = create_ddraw(); ok(!!ddraw, "Failed to create a ddraw object.\n"); hr = IDirectDraw4_SetCooperativeLevel(ddraw, window1, DDSCL_EXCLUSIVE | DDSCL_FULLSCREEN); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr);
memset(&surface_desc, 0, sizeof(surface_desc)); surface_desc.dwSize = sizeof(surface_desc); @@ -10267,7 +10267,7 @@ static void test_lost_device(void) surface_desc.ddsCaps.dwCaps = DDSCAPS_PRIMARYSURFACE | DDSCAPS_COMPLEX | DDSCAPS_FLIP; U5(surface_desc).dwBackBufferCount = 1; hr = IDirectDraw4_CreateSurface(ddraw, &surface_desc, &surface, NULL); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr);
memset(&surface_desc, 0, sizeof(surface_desc)); surface_desc.dwSize = sizeof(surface_desc); @@ -10276,7 +10276,7 @@ static void test_lost_device(void) surface_desc.dwWidth = 100; surface_desc.dwHeight = 100; hr = IDirectDraw4_CreateSurface(ddraw, &surface_desc, &sysmem_surface, NULL); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr);
memset(&surface_desc, 0, sizeof(surface_desc)); surface_desc.dwSize = sizeof(surface_desc); @@ -10297,93 +10297,93 @@ static void test_lost_device(void) }
hr = IDirectDraw4_TestCooperativeLevel(ddraw); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface4_IsLost(surface); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface4_Flip(surface, NULL, DDFLIP_WAIT); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface4_IsLost(sysmem_surface); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); if (vidmem_surface) { hr = IDirectDrawSurface4_IsLost(vidmem_surface); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); }
ret = SetForegroundWindow(GetDesktopWindow()); ok(ret, "Failed to set foreground window.\n"); hr = IDirectDraw4_TestCooperativeLevel(ddraw); - ok(hr == DDERR_NOEXCLUSIVEMODE, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_NOEXCLUSIVEMODE, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface4_IsLost(surface); - ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface4_Flip(surface, NULL, DDFLIP_WAIT); - ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface4_Restore(surface); - ok(hr == DDERR_WRONGMODE, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_WRONGMODE, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface4_IsLost(surface); - ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface4_IsLost(sysmem_surface); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface4_Restore(sysmem_surface); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface4_IsLost(sysmem_surface); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); if (vidmem_surface) { hr = IDirectDrawSurface4_IsLost(vidmem_surface); - ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface4_Restore(vidmem_surface); - ok(hr == DDERR_WRONGMODE, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_WRONGMODE, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface4_IsLost(vidmem_surface); - ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#lx.\n", hr); }
ret = SetForegroundWindow(window1); ok(ret, "Failed to set foreground window.\n"); hr = IDirectDraw4_TestCooperativeLevel(ddraw); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface4_IsLost(surface); - ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface4_Flip(surface, NULL, DDFLIP_WAIT); - ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface4_IsLost(sysmem_surface); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); if (vidmem_surface) { hr = IDirectDrawSurface4_IsLost(vidmem_surface); - ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#lx.\n", hr); }
hr = IDirectDraw4_RestoreAllSurfaces(ddraw); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirectDraw4_TestCooperativeLevel(ddraw); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface4_IsLost(surface); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface4_Flip(surface, NULL, DDFLIP_WAIT); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface4_IsLost(sysmem_surface); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); if (vidmem_surface) { hr = IDirectDrawSurface4_IsLost(vidmem_surface); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); }
hr = IDirectDraw4_SetCooperativeLevel(ddraw, window1, DDSCL_NORMAL); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirectDraw4_TestCooperativeLevel(ddraw); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface4_IsLost(surface); - todo_wine ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#x.\n", hr); + todo_wine ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface4_Flip(surface, NULL, DDFLIP_WAIT); - todo_wine ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#x.\n", hr); + todo_wine ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface4_IsLost(sysmem_surface); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); if (vidmem_surface) { hr = IDirectDrawSurface4_IsLost(vidmem_surface); - todo_wine ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#x.\n", hr); + todo_wine ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#lx.\n", hr); }
/* Trying to restore the primary will crash, probably because flippable @@ -10394,76 +10394,76 @@ static void test_lost_device(void) surface_desc.dwFlags = DDSD_CAPS; surface_desc.ddsCaps.dwCaps = DDSCAPS_PRIMARYSURFACE; hr = IDirectDraw4_CreateSurface(ddraw, &surface_desc, &surface, NULL); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirectDraw4_RestoreAllSurfaces(ddraw); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr);
hr = IDirectDraw4_TestCooperativeLevel(ddraw); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface4_IsLost(surface); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface4_IsLost(sysmem_surface); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); if (vidmem_surface) { hr = IDirectDrawSurface4_IsLost(vidmem_surface); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); }
ret = SetForegroundWindow(GetDesktopWindow()); ok(ret, "Failed to set foreground window.\n"); hr = IDirectDraw4_TestCooperativeLevel(ddraw); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface4_IsLost(surface); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface4_IsLost(sysmem_surface); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); if (vidmem_surface) { hr = IDirectDrawSurface4_IsLost(vidmem_surface); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); }
ret = SetForegroundWindow(window1); ok(ret, "Failed to set foreground window.\n"); hr = IDirectDraw4_TestCooperativeLevel(ddraw); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface4_IsLost(surface); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface4_IsLost(sysmem_surface); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); if (vidmem_surface) { hr = IDirectDrawSurface4_IsLost(vidmem_surface); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); }
hr = IDirectDraw4_SetCooperativeLevel(ddraw, window1, DDSCL_EXCLUSIVE | DDSCL_FULLSCREEN); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirectDraw4_TestCooperativeLevel(ddraw); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface4_IsLost(surface); - ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface4_IsLost(sysmem_surface); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); if (vidmem_surface) { hr = IDirectDrawSurface4_IsLost(vidmem_surface); - ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#lx.\n", hr); }
hr = IDirectDraw4_RestoreAllSurfaces(ddraw); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirectDraw4_TestCooperativeLevel(ddraw); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface4_IsLost(surface); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface4_IsLost(sysmem_surface); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); if (vidmem_surface) { hr = IDirectDrawSurface4_IsLost(vidmem_surface); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); }
IDirectDrawSurface4_Release(surface); @@ -10473,116 +10473,116 @@ static void test_lost_device(void) surface_desc.ddsCaps.dwCaps = DDSCAPS_PRIMARYSURFACE | DDSCAPS_COMPLEX | DDSCAPS_FLIP; U5(surface_desc).dwBackBufferCount = 1; hr = IDirectDraw4_CreateSurface(ddraw, &surface_desc, &surface, NULL); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr);
hr = IDirectDraw4_SetCooperativeLevel(ddraw, window1, DDSCL_EXCLUSIVE | DDSCL_FULLSCREEN); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirectDraw4_TestCooperativeLevel(ddraw); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface4_IsLost(surface); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface4_Flip(surface, NULL, DDFLIP_WAIT); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface4_IsLost(sysmem_surface); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); if (vidmem_surface) { hr = IDirectDrawSurface4_IsLost(vidmem_surface); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); }
hr = IDirectDraw4_SetCooperativeLevel(ddraw, window1, DDSCL_NORMAL | DDSCL_FULLSCREEN); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirectDraw4_TestCooperativeLevel(ddraw); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface4_IsLost(surface); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface4_Flip(surface, NULL, DDFLIP_WAIT); - ok(hr == DDERR_NOEXCLUSIVEMODE, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_NOEXCLUSIVEMODE, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface4_IsLost(sysmem_surface); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); if (vidmem_surface) { hr = IDirectDrawSurface4_IsLost(vidmem_surface); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); }
hr = IDirectDraw4_SetCooperativeLevel(ddraw, window1, DDSCL_NORMAL); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirectDraw4_TestCooperativeLevel(ddraw); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface4_IsLost(surface); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface4_Flip(surface, NULL, DDFLIP_WAIT); - ok(hr == DDERR_NOEXCLUSIVEMODE, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_NOEXCLUSIVEMODE, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface4_IsLost(sysmem_surface); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); if (vidmem_surface) { hr = IDirectDrawSurface4_IsLost(vidmem_surface); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); }
hr = IDirectDraw4_SetCooperativeLevel(ddraw, window2, DDSCL_NORMAL); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirectDraw4_TestCooperativeLevel(ddraw); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface4_IsLost(surface); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface4_Flip(surface, NULL, DDFLIP_WAIT); - ok(hr == DDERR_NOEXCLUSIVEMODE, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_NOEXCLUSIVEMODE, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface4_IsLost(sysmem_surface); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); if (vidmem_surface) { hr = IDirectDrawSurface4_IsLost(vidmem_surface); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); }
hr = IDirectDraw4_SetCooperativeLevel(ddraw, window2, DDSCL_NORMAL | DDSCL_FULLSCREEN); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirectDraw4_TestCooperativeLevel(ddraw); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface4_IsLost(surface); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface4_Flip(surface, NULL, DDFLIP_WAIT); - ok(hr == DDERR_NOEXCLUSIVEMODE, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_NOEXCLUSIVEMODE, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface4_IsLost(sysmem_surface); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); if (vidmem_surface) { hr = IDirectDrawSurface4_IsLost(vidmem_surface); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); }
hr = IDirectDraw4_SetCooperativeLevel(ddraw, window2, DDSCL_EXCLUSIVE | DDSCL_FULLSCREEN); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirectDraw4_TestCooperativeLevel(ddraw); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface4_IsLost(surface); - ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface4_IsLost(sysmem_surface); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); if (vidmem_surface) { hr = IDirectDrawSurface4_IsLost(vidmem_surface); - ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#lx.\n", hr); }
hr = IDirectDrawSurface4_Flip(surface, NULL, DDFLIP_WAIT); - ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#lx.\n", hr);
memset(&caps, 0, sizeof(caps)); caps.dwCaps = DDSCAPS_FLIP;
hr = IDirectDrawSurface4_GetAttachedSurface(surface, &caps, &back_buffer); - ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface4_Restore(surface); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface4_GetAttachedSurface(surface, &caps, &back_buffer); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface4_IsLost(back_buffer); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); IDirectDrawSurface4_Release(back_buffer);
if (vidmem_surface) @@ -10590,7 +10590,7 @@ static void test_lost_device(void) IDirectDrawSurface4_Release(sysmem_surface); IDirectDrawSurface4_Release(surface); refcount = IDirectDraw4_Release(ddraw); - ok(!refcount, "Got unexpected refcount %u.\n", refcount); + ok(!refcount, "Got unexpected refcount %lu.\n", refcount); DestroyWindow(window2); DestroyWindow(window1); } @@ -10608,7 +10608,7 @@ static void test_surface_desc_lock(void) ddraw = create_ddraw(); ok(!!ddraw, "Failed to create a ddraw object.\n"); hr = IDirectDraw4_SetCooperativeLevel(ddraw, window, DDSCL_NORMAL); - ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#lx.\n", hr);
memset(&surface_desc, 0, sizeof(surface_desc)); surface_desc.dwSize = sizeof(surface_desc); @@ -10617,36 +10617,36 @@ static void test_surface_desc_lock(void) surface_desc.dwHeight = 16; surface_desc.ddsCaps.dwCaps = DDSCAPS_OFFSCREENPLAIN; hr = IDirectDraw4_CreateSurface(ddraw, &surface_desc, &surface, NULL); - ok(SUCCEEDED(hr), "Failed to create surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create surface, hr %#lx.\n", hr);
memset(&surface_desc, 0xaa, sizeof(surface_desc)); surface_desc.dwSize = sizeof(surface_desc); hr = IDirectDrawSurface4_GetSurfaceDesc(surface, &surface_desc); - ok(SUCCEEDED(hr), "Failed to get surface desc, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get surface desc, hr %#lx.\n", hr); ok(!surface_desc.lpSurface, "Got unexpected lpSurface %p.\n", surface_desc.lpSurface);
memset(&surface_desc, 0xaa, sizeof(surface_desc)); surface_desc.dwSize = sizeof(surface_desc); hr = IDirectDrawSurface4_Lock(surface, NULL, &surface_desc, 0, NULL); - ok(SUCCEEDED(hr), "Failed to lock surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to lock surface, hr %#lx.\n", hr); ok(surface_desc.lpSurface != NULL, "Got unexpected lpSurface %p.\n", surface_desc.lpSurface); memset(&surface_desc, 0xaa, sizeof(surface_desc)); surface_desc.dwSize = sizeof(surface_desc); hr = IDirectDrawSurface4_GetSurfaceDesc(surface, &surface_desc); - ok(SUCCEEDED(hr), "Failed to get surface desc, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get surface desc, hr %#lx.\n", hr); ok(!surface_desc.lpSurface, "Got unexpected lpSurface %p.\n", surface_desc.lpSurface); hr = IDirectDrawSurface4_Unlock(surface, NULL); - ok(SUCCEEDED(hr), "Failed to unlock surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to unlock surface, hr %#lx.\n", hr);
memset(&surface_desc, 0xaa, sizeof(surface_desc)); surface_desc.dwSize = sizeof(surface_desc); hr = IDirectDrawSurface4_GetSurfaceDesc(surface, &surface_desc); - ok(SUCCEEDED(hr), "Failed to get surface desc, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get surface desc, hr %#lx.\n", hr); ok(!surface_desc.lpSurface, "Got unexpected lpSurface %p.\n", surface_desc.lpSurface);
IDirectDrawSurface4_Release(surface); refcount = IDirectDraw4_Release(ddraw); - ok(!refcount, "Got unexpected refcount %u.\n", refcount); + ok(!refcount, "Got unexpected refcount %lu.\n", refcount); DestroyWindow(window); }
@@ -10708,23 +10708,23 @@ static void test_texturemapblend(void) }
hr = IDirect3DDevice3_GetDirect3D(device, &d3d); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirect3D3_QueryInterface(d3d, &IID_IDirectDraw4, (void **)&ddraw); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirect3DDevice3_GetRenderTarget(device, &rt); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
viewport = create_viewport(device, 0, 0, 640, 480); hr = IDirect3DDevice3_SetCurrentViewport(device, viewport); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
hr = IDirect3DDevice3_GetRenderState(device, D3DRENDERSTATE_TEXTUREMAPBLEND, &texturemapblend); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); - ok(texturemapblend == D3DTBLEND_MODULATE, "Got unexpected texture map blend %#x.\n", texturemapblend); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); + ok(texturemapblend == D3DTBLEND_MODULATE, "Got unexpected texture map blend %#lx.\n", texturemapblend);
hr = IDirect3DDevice3_GetTextureStageState(device, 0, D3DTSS_ALPHAOP, &value); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); - ok(value == D3DTOP_SELECTARG1, "Got unexpected D3DTSS_ALPHAOP value %#x.\n", value); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); + ok(value == D3DTOP_SELECTARG1, "Got unexpected D3DTSS_ALPHAOP value %#lx.\n", value);
/* Test alpha with DDPF_ALPHAPIXELS texture - should be taken from texture * alpha channel. @@ -10746,53 +10746,53 @@ static void test_texturemapblend(void) U4(U4(surface_desc).ddpfPixelFormat).dwBBitMask = 0x000000ff; U5(U4(surface_desc).ddpfPixelFormat).dwRGBAlphaBitMask = 0xff000000; hr = IDirectDraw4_CreateSurface(ddraw, &surface_desc, &surface, NULL); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
hr = IDirectDrawSurface4_QueryInterface(surface, &IID_IDirect3DTexture2, (void **)&texture); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirect3DDevice3_SetTexture(device, 0, texture); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
hr = IDirect3DDevice3_GetTextureStageState(device, 0, D3DTSS_ALPHAOP, &value); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); - ok(value == D3DTOP_SELECTARG1, "Got unexpected D3DTSS_ALPHAOP value %#x.\n", value); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); + ok(value == D3DTOP_SELECTARG1, "Got unexpected D3DTSS_ALPHAOP value %#lx.\n", value);
hr = IDirect3DDevice3_SetTexture(device, 0, NULL); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
hr = IDirect3DDevice3_GetTextureStageState(device, 0, D3DTSS_ALPHAOP, &value); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); - ok(value == D3DTOP_SELECTARG1, "Got unexpected D3DTSS_ALPHAOP value %#x.\n", value); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); + ok(value == D3DTOP_SELECTARG1, "Got unexpected D3DTSS_ALPHAOP value %#lx.\n", value);
hr = IDirect3DDevice3_SetTexture(device, 0, texture); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
hr = IDirect3DViewport3_Clear(viewport, 1, &clear_rect, D3DCLEAR_TARGET); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
memset(&fx, 0, sizeof(fx)); fx.dwSize = sizeof(fx); U5(fx).dwFillColor = 0xff0000ff; hr = IDirectDrawSurface4_Blt(surface, NULL, NULL, NULL, DDBLT_COLORFILL | DDBLT_WAIT, &fx); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); U5(fx).dwFillColor = 0x800000ff; hr = IDirectDrawSurface4_Blt(surface, &rect, NULL, NULL, DDBLT_COLORFILL | DDBLT_WAIT, &fx); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
/* Note that the ddraw1 version of this test runs tests 1-3 with * D3DRENDERSTATE_COLORKEYENABLE enabled, whereas this version only runs * test 4 with color keying on. Because no color key is set on the texture * this should not result in different behavior. */ hr = IDirect3DDevice3_SetRenderState(device, D3DRENDERSTATE_CULLMODE, D3DCULL_NONE); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirect3DDevice3_SetRenderState(device, D3DRENDERSTATE_ZENABLE, D3DZB_FALSE); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirect3DDevice3_SetRenderState(device, D3DRENDERSTATE_SRCBLEND, D3DBLEND_SRCALPHA); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirect3DDevice3_SetRenderState(device, D3DRENDERSTATE_DESTBLEND, D3DBLEND_INVSRCALPHA); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirect3DDevice3_SetRenderState(device, D3DRENDERSTATE_ALPHABLENDENABLE, TRUE); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
#if 0 /* Disable the call to test that the device has this state by default. */ @@ -10802,117 +10802,117 @@ static void test_texturemapblend(void)
/* Texture stage state does not change so legacy texture blending stays enabled. */ hr = IDirect3DDevice3_SetTextureStageState(device, 0, D3DTSS_COLOROP, D3DTOP_MODULATE); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
hr = IDirect3DDevice3_BeginScene(device); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirect3DDevice3_DrawPrimitive(device, D3DPT_TRIANGLESTRIP, D3DFVF_XYZRHW | D3DFVF_DIFFUSE | D3DFVF_TEX1, &test1_quads[0], 4, 0); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirect3DDevice3_DrawPrimitive(device, D3DPT_TRIANGLESTRIP, D3DFVF_XYZRHW | D3DFVF_DIFFUSE | D3DFVF_TEX1, &test1_quads[4], 4, 0); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirect3DDevice3_EndScene(device); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
color = get_surface_color(rt, 5, 5); - ok(compare_color(color, 0x00000080, 2), "Got unexpected color 0x%08x.\n", color); + ok(compare_color(color, 0x00000080, 2), "Got unexpected color 0x%08lx.\n", color); color = get_surface_color(rt, 400, 5); - ok(compare_color(color, 0x000000ff, 2), "Got unexpected color 0x%08x.\n", color); + ok(compare_color(color, 0x000000ff, 2), "Got unexpected color 0x%08lx.\n", color); color = get_surface_color(rt, 5, 245); - ok(compare_color(color, 0x00000080, 2), "Got unexpected color 0x%08x.\n", color); + ok(compare_color(color, 0x00000080, 2), "Got unexpected color 0x%08lx.\n", color); color = get_surface_color(rt, 400, 245); - ok(compare_color(color, 0x000000ff, 2), "Got unexpected color 0x%08x.\n", color); + ok(compare_color(color, 0x000000ff, 2), "Got unexpected color 0x%08lx.\n", color);
/* Turn legacy texture blending off. */ hr = IDirect3DDevice3_SetTextureStageState(device, 0, D3DTSS_ALPHAOP, D3DTOP_SELECTARG2); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirect3DDevice3_SetTexture(device, 0, texture); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirect3DViewport3_Clear(viewport, 1, &clear_rect, D3DCLEAR_TARGET); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirect3DDevice3_BeginScene(device); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirect3DDevice3_DrawPrimitive(device, D3DPT_TRIANGLESTRIP, D3DFVF_XYZRHW | D3DFVF_DIFFUSE | D3DFVF_TEX1, &test1_quads[0], 4, 0); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirect3DDevice3_DrawPrimitive(device, D3DPT_TRIANGLESTRIP, D3DFVF_XYZRHW | D3DFVF_DIFFUSE | D3DFVF_TEX1, &test1_quads[4], 4, 0); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirect3DDevice3_EndScene(device); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
color = get_surface_color(rt, 5, 5); - ok(compare_color(color, 0x000000ff, 2), "Got unexpected color 0x%08x.\n", color); + ok(compare_color(color, 0x000000ff, 2), "Got unexpected color 0x%08lx.\n", color); color = get_surface_color(rt, 400, 5); - ok(compare_color(color, 0x000000ff, 2), "Got unexpected color 0x%08x.\n", color); + ok(compare_color(color, 0x000000ff, 2), "Got unexpected color 0x%08lx.\n", color); color = get_surface_color(rt, 5, 245); - ok(compare_color(color, 0x00000080, 2), "Got unexpected color 0x%08x.\n", color); + ok(compare_color(color, 0x00000080, 2), "Got unexpected color 0x%08lx.\n", color); color = get_surface_color(rt, 400, 245); - ok(compare_color(color, 0x00000080, 2), "Got unexpected color 0x%08x.\n", color); + ok(compare_color(color, 0x00000080, 2), "Got unexpected color 0x%08lx.\n", color);
/* This doesn't turn legacy texture blending on again, as setting the same * _TEXTUREMAPBLEND value. */ hr = IDirect3DDevice3_SetRenderState(device, D3DRENDERSTATE_TEXTUREMAPBLEND, D3DTBLEND_MODULATE); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirect3DDevice3_SetTexture(device, 0, texture); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirect3DViewport3_Clear(viewport, 1, &clear_rect, D3DCLEAR_TARGET); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirect3DDevice3_BeginScene(device); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirect3DDevice3_DrawPrimitive(device, D3DPT_TRIANGLESTRIP, D3DFVF_XYZRHW | D3DFVF_DIFFUSE | D3DFVF_TEX1, &test1_quads[0], 4, 0); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirect3DDevice3_DrawPrimitive(device, D3DPT_TRIANGLESTRIP, D3DFVF_XYZRHW | D3DFVF_DIFFUSE | D3DFVF_TEX1, &test1_quads[4], 4, 0); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirect3DDevice3_EndScene(device); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
color = get_surface_color(rt, 5, 5); - ok(compare_color(color, 0x000000ff, 2), "Got unexpected color 0x%08x.\n", color); + ok(compare_color(color, 0x000000ff, 2), "Got unexpected color 0x%08lx.\n", color); color = get_surface_color(rt, 400, 5); - ok(compare_color(color, 0x000000ff, 2), "Got unexpected color 0x%08x.\n", color); + ok(compare_color(color, 0x000000ff, 2), "Got unexpected color 0x%08lx.\n", color); color = get_surface_color(rt, 5, 245); - ok(compare_color(color, 0x00000080, 2), "Got unexpected color 0x%08x.\n", color); + ok(compare_color(color, 0x00000080, 2), "Got unexpected color 0x%08lx.\n", color); color = get_surface_color(rt, 400, 245); - ok(compare_color(color, 0x00000080, 2), "Got unexpected color 0x%08x.\n", color); + ok(compare_color(color, 0x00000080, 2), "Got unexpected color 0x%08lx.\n", color);
/* Turn legacy texture blending on again. */ hr = IDirect3DDevice3_SetRenderState(device, D3DRENDERSTATE_TEXTUREMAPBLEND, D3DTBLEND_ADD); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirect3DDevice3_SetRenderState(device, D3DRENDERSTATE_TEXTUREMAPBLEND, D3DTBLEND_MODULATE); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirect3DDevice3_SetTexture(device, 0, texture); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirect3DViewport3_Clear(viewport, 1, &clear_rect, D3DCLEAR_TARGET); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirect3DDevice3_BeginScene(device); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirect3DDevice3_DrawPrimitive(device, D3DPT_TRIANGLESTRIP, D3DFVF_XYZRHW | D3DFVF_DIFFUSE | D3DFVF_TEX1, &test1_quads[0], 4, 0); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirect3DDevice3_DrawPrimitive(device, D3DPT_TRIANGLESTRIP, D3DFVF_XYZRHW | D3DFVF_DIFFUSE | D3DFVF_TEX1, &test1_quads[4], 4, 0); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirect3DDevice3_EndScene(device); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
color = get_surface_color(rt, 5, 5); - ok(compare_color(color, 0x00000080, 2), "Got unexpected color 0x%08x.\n", color); + ok(compare_color(color, 0x00000080, 2), "Got unexpected color 0x%08lx.\n", color); color = get_surface_color(rt, 400, 5); - ok(compare_color(color, 0x000000ff, 2), "Got unexpected color 0x%08x.\n", color); + ok(compare_color(color, 0x000000ff, 2), "Got unexpected color 0x%08lx.\n", color); color = get_surface_color(rt, 5, 245); - ok(compare_color(color, 0x00000080, 2), "Got unexpected color 0x%08x.\n", color); + ok(compare_color(color, 0x00000080, 2), "Got unexpected color 0x%08lx.\n", color); color = get_surface_color(rt, 400, 245); - ok(compare_color(color, 0x000000ff, 2), "Got unexpected color 0x%08x.\n", color); + ok(compare_color(color, 0x000000ff, 2), "Got unexpected color 0x%08lx.\n", color);
hr = IDirect3DDevice3_SetTexture(device, 0, NULL); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); IDirect3DTexture2_Release(texture); refcount = IDirectDrawSurface4_Release(surface); - ok(!refcount, "Surface not properly released, refcount %u.\n", refcount); + ok(!refcount, "Surface not properly released, refcount %lu.\n", refcount);
/* Test alpha with texture that has no alpha channel - alpha should be * taken from diffuse vertex color. */ @@ -10930,52 +10930,52 @@ static void test_texturemapblend(void) U4(U4(surface_desc).ddpfPixelFormat).dwBBitMask = 0x000000ff;
hr = IDirectDraw4_CreateSurface(ddraw, &surface_desc, &surface, NULL); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
hr = IDirectDrawSurface4_QueryInterface(surface, &IID_IDirect3DTexture2, (void **)&texture); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirect3DDevice3_SetTexture(device, 0, texture); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
hr = IDirect3DDevice3_GetTextureStageState(device, 0, D3DTSS_ALPHAOP, &value); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); - ok(value == D3DTOP_SELECTARG2, "Got unexpected D3DTSS_ALPHAOP value %#x.\n", value); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); + ok(value == D3DTOP_SELECTARG2, "Got unexpected D3DTSS_ALPHAOP value %#lx.\n", value);
hr = IDirect3DViewport3_Clear(viewport, 1, &clear_rect, D3DCLEAR_TARGET); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
U5(fx).dwFillColor = 0xff0000ff; hr = IDirectDrawSurface4_Blt(surface, NULL, NULL, NULL, DDBLT_COLORFILL | DDBLT_WAIT, &fx); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); U5(fx).dwFillColor = 0x800000ff; hr = IDirectDrawSurface4_Blt(surface, &rect, NULL, NULL, DDBLT_COLORFILL | DDBLT_WAIT, &fx); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
hr = IDirect3DDevice3_BeginScene(device); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirect3DDevice3_DrawPrimitive(device, D3DPT_TRIANGLESTRIP, D3DFVF_XYZRHW | D3DFVF_DIFFUSE | D3DFVF_TEX1, &test1_quads[0], 4, 0); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirect3DDevice3_DrawPrimitive(device, D3DPT_TRIANGLESTRIP, D3DFVF_XYZRHW | D3DFVF_DIFFUSE | D3DFVF_TEX1, &test1_quads[4], 4, 0); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirect3DDevice3_EndScene(device); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
color = get_surface_color(rt, 5, 5); - ok(compare_color(color, 0x000000ff, 2), "Got unexpected color 0x%08x.\n", color); + ok(compare_color(color, 0x000000ff, 2), "Got unexpected color 0x%08lx.\n", color); color = get_surface_color(rt, 400, 5); - ok(compare_color(color, 0x000000ff, 2), "Got unexpected color 0x%08x.\n", color); + ok(compare_color(color, 0x000000ff, 2), "Got unexpected color 0x%08lx.\n", color); color = get_surface_color(rt, 5, 245); - ok(compare_color(color, 0x00000080, 2), "Got unexpected color 0x%08x.\n", color); + ok(compare_color(color, 0x00000080, 2), "Got unexpected color 0x%08lx.\n", color); color = get_surface_color(rt, 400, 245); - ok(compare_color(color, 0x00000080, 2), "Got unexpected color 0x%08x.\n", color); + ok(compare_color(color, 0x00000080, 2), "Got unexpected color 0x%08lx.\n", color);
hr = IDirect3DDevice3_SetTexture(device, 0, NULL); - ok(SUCCEEDED(hr), "Failed to set texture, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set texture, hr %#lx.\n", hr); IDirect3DTexture2_Release(texture); refcount = IDirectDrawSurface4_Release(surface); - ok(!refcount, "Surface not properly released, refcount %u.\n", refcount); + ok(!refcount, "Surface not properly released, refcount %lu.\n", refcount);
/* Test RGB - should multiply color components from diffuse vertex color * and texture. */ @@ -10993,51 +10993,51 @@ static void test_texturemapblend(void) U4(U4(surface_desc).ddpfPixelFormat).dwBBitMask = 0x000000ff; U5(U4(surface_desc).ddpfPixelFormat).dwRGBAlphaBitMask = 0xff000000; hr = IDirectDraw4_CreateSurface(ddraw, &surface_desc, &surface, NULL); - ok(SUCCEEDED(hr), "Failed to create surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create surface, hr %#lx.\n", hr);
hr = IDirectDrawSurface4_QueryInterface(surface, &IID_IDirect3DTexture2, (void **)&texture); - ok(SUCCEEDED(hr), "Failed to get texture interface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get texture interface, hr %#lx.\n", hr); hr = IDirect3DDevice3_SetTexture(device, 0, texture); - ok(SUCCEEDED(hr), "Failed to set texture, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set texture, hr %#lx.\n", hr);
hr = IDirect3DViewport3_Clear(viewport, 1, &clear_rect, D3DCLEAR_TARGET); - ok(SUCCEEDED(hr), "Failed to clear render target, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to clear render target, hr %#lx.\n", hr);
U5(fx).dwFillColor = 0x00ffffff; hr = IDirectDrawSurface4_Blt(surface, NULL, NULL, NULL, DDBLT_COLORFILL | DDBLT_WAIT, &fx); - ok(SUCCEEDED(hr), "Failed to clear texture, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to clear texture, hr %#lx.\n", hr); U5(fx).dwFillColor = 0x00ffff80; hr = IDirectDrawSurface4_Blt(surface, &rect, NULL, NULL, DDBLT_COLORFILL | DDBLT_WAIT, &fx); - ok(SUCCEEDED(hr), "Failed to clear texture, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to clear texture, hr %#lx.\n", hr);
hr = IDirect3DDevice3_SetRenderState(device, D3DRENDERSTATE_ALPHABLENDENABLE, FALSE); - ok(SUCCEEDED(hr), "Failed to set render state, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set render state, hr %#lx.\n", hr);
hr = IDirect3DDevice3_BeginScene(device); - ok(SUCCEEDED(hr), "Failed to begin scene, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to begin scene, hr %#lx.\n", hr); hr = IDirect3DDevice3_DrawPrimitive(device, D3DPT_TRIANGLESTRIP, D3DFVF_XYZRHW | D3DFVF_DIFFUSE | D3DFVF_TEX1, &test2_quads[0], 4, 0); - ok(SUCCEEDED(hr), "Failed to draw, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to draw, hr %#lx.\n", hr); hr = IDirect3DDevice3_DrawPrimitive(device, D3DPT_TRIANGLESTRIP, D3DFVF_XYZRHW | D3DFVF_DIFFUSE | D3DFVF_TEX1, &test2_quads[4], 4, 0); - ok(SUCCEEDED(hr), "Failed to draw, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to draw, hr %#lx.\n", hr); hr = IDirect3DDevice3_EndScene(device); - ok(SUCCEEDED(hr), "Failed to end scene, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to end scene, hr %#lx.\n", hr);
color = get_surface_color(rt, 5, 5); - ok(compare_color(color, 0x00ff0040, 2), "Got unexpected color 0x%08x.\n", color); + ok(compare_color(color, 0x00ff0040, 2), "Got unexpected color 0x%08lx.\n", color); color = get_surface_color(rt, 400, 5); - ok(compare_color(color, 0x00ff0080, 2), "Got unexpected color 0x%08x.\n", color); + ok(compare_color(color, 0x00ff0080, 2), "Got unexpected color 0x%08lx.\n", color); color = get_surface_color(rt, 5, 245); - ok(compare_color(color, 0x00800080, 2), "Got unexpected color 0x%08x.\n", color); + ok(compare_color(color, 0x00800080, 2), "Got unexpected color 0x%08lx.\n", color); color = get_surface_color(rt, 400, 245); - ok(compare_color(color, 0x008000ff, 2), "Got unexpected color 0x%08x.\n", color); + ok(compare_color(color, 0x008000ff, 2), "Got unexpected color 0x%08lx.\n", color);
hr = IDirect3DDevice3_SetTexture(device, 0, NULL); - ok(SUCCEEDED(hr), "Failed to set texture, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set texture, hr %#lx.\n", hr); IDirect3DTexture2_Release(texture); refcount = IDirectDrawSurface4_Release(surface); - ok(!refcount, "Surface not properly released, refcount %u.\n", refcount); + ok(!refcount, "Surface not properly released, refcount %lu.\n", refcount);
/* Test alpha again, now with color keyed texture (colorkey emulation in * wine can interfere). */ @@ -11055,65 +11055,65 @@ static void test_texturemapblend(void) U4(U4(surface_desc).ddpfPixelFormat).dwBBitMask = 0x001f;
hr = IDirectDraw4_CreateSurface(ddraw, &surface_desc, &surface, NULL); - ok(SUCCEEDED(hr), "Failed to create surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create surface, hr %#lx.\n", hr);
hr = IDirectDrawSurface4_QueryInterface(surface, &IID_IDirect3DTexture2, (void **)&texture); - ok(SUCCEEDED(hr), "Failed to get texture interface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get texture interface, hr %#lx.\n", hr); hr = IDirect3DDevice3_SetTexture(device, 0, texture); - ok(SUCCEEDED(hr), "Failed to set texture, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set texture, hr %#lx.\n", hr);
hr = IDirect3DViewport3_Clear(viewport, 1, &clear_rect, D3DCLEAR_TARGET); - ok(SUCCEEDED(hr), "Failed to clear render target, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to clear render target, hr %#lx.\n", hr);
U5(fx).dwFillColor = 0xf800; hr = IDirectDrawSurface4_Blt(surface, NULL, NULL, NULL, DDBLT_COLORFILL | DDBLT_WAIT, &fx); - ok(SUCCEEDED(hr), "Failed to clear texture, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to clear texture, hr %#lx.\n", hr); U5(fx).dwFillColor = 0x001f; hr = IDirectDrawSurface4_Blt(surface, &rect, NULL, NULL, DDBLT_COLORFILL | DDBLT_WAIT, &fx); - ok(SUCCEEDED(hr), "Failed to clear texture, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to clear texture, hr %#lx.\n", hr);
ckey.dwColorSpaceLowValue = 0x001f; ckey.dwColorSpaceHighValue = 0x001f; hr = IDirectDrawSurface4_SetColorKey(surface, DDCKEY_SRCBLT, &ckey); - ok(SUCCEEDED(hr), "Failed to set color key, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set color key, hr %#lx.\n", hr);
hr = IDirect3DDevice3_SetRenderState(device, D3DRENDERSTATE_ALPHABLENDENABLE, TRUE); - ok(SUCCEEDED(hr), "Failed to set render state, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set render state, hr %#lx.\n", hr); hr = IDirect3DDevice3_SetRenderState(device, D3DRENDERSTATE_COLORKEYENABLE, TRUE); - ok(SUCCEEDED(hr), "Failed to set render state, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set render state, hr %#lx.\n", hr);
hr = IDirect3DDevice3_BeginScene(device); - ok(SUCCEEDED(hr), "Failed to begin scene, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to begin scene, hr %#lx.\n", hr); hr = IDirect3DDevice3_DrawPrimitive(device, D3DPT_TRIANGLESTRIP, D3DFVF_XYZRHW | D3DFVF_DIFFUSE | D3DFVF_TEX1, &test1_quads[0], 4, 0); - ok(SUCCEEDED(hr), "Failed to draw, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to draw, hr %#lx.\n", hr); hr = IDirect3DDevice3_DrawPrimitive(device, D3DPT_TRIANGLESTRIP, D3DFVF_XYZRHW | D3DFVF_DIFFUSE | D3DFVF_TEX1, &test1_quads[4], 4, 0); - ok(SUCCEEDED(hr), "Failed to draw, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to draw, hr %#lx.\n", hr); hr = IDirect3DDevice3_EndScene(device); - ok(SUCCEEDED(hr), "Failed to end scene, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to end scene, hr %#lx.\n", hr);
color = get_surface_color(rt, 5, 5); - ok(compare_color(color, 0x00000000, 2), "Got unexpected color 0x%08x.\n", color); + ok(compare_color(color, 0x00000000, 2), "Got unexpected color 0x%08lx.\n", color); color = get_surface_color(rt, 400, 5); - ok(compare_color(color, 0x00ff0000, 2), "Got unexpected color 0x%08x.\n", color); + ok(compare_color(color, 0x00ff0000, 2), "Got unexpected color 0x%08lx.\n", color); color = get_surface_color(rt, 5, 245); - ok(compare_color(color, 0x00000000, 2), "Got unexpected color 0x%08x.\n", color); + ok(compare_color(color, 0x00000000, 2), "Got unexpected color 0x%08lx.\n", color); color = get_surface_color(rt, 400, 245); - ok(compare_color(color, 0x00800000, 2), "Got unexpected color 0x%08x.\n", color); + ok(compare_color(color, 0x00800000, 2), "Got unexpected color 0x%08lx.\n", color);
hr = IDirect3DDevice3_SetTexture(device, 0, NULL); - ok(SUCCEEDED(hr), "Failed to set texture, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set texture, hr %#lx.\n", hr); IDirect3DTexture2_Release(texture); refcount = IDirectDrawSurface4_Release(surface); - ok(!refcount, "Surface not properly released, refcount %u.\n", refcount); + ok(!refcount, "Surface not properly released, refcount %lu.\n", refcount);
destroy_viewport(device, viewport); IDirectDrawSurface4_Release(rt); IDirect3DDevice3_Release(device); IDirect3D3_Release(d3d); refcount = IDirectDraw4_Release(ddraw); - ok(!refcount, "Ddraw object not properly released, refcount %u.\n", refcount); + ok(!refcount, "Ddraw object not properly released, refcount %lu.\n", refcount); DestroyWindow(window); }
@@ -11224,7 +11224,7 @@ static void test_signed_formats(void) memset(&hel_desc, 0, sizeof(hel_desc)); hel_desc.dwSize = sizeof(hel_desc); hr = IDirect3DDevice3_GetCaps(device, &device_desc, &hel_desc); - ok(SUCCEEDED(hr), "Failed to get device caps, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get device caps, hr %#lx.\n", hr); if (!(device_desc.dwTextureOpCaps & D3DTEXOPCAPS_BLENDFACTORALPHA)) { skip("D3DTOP_BLENDFACTORALPHA not supported, skipping bumpmap format tests.\n"); @@ -11232,43 +11232,43 @@ static void test_signed_formats(void) }
hr = IDirect3DDevice3_GetDirect3D(device, &d3d); - ok(SUCCEEDED(hr), "Failed to get d3d interface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get d3d interface, hr %#lx.\n", hr); hr = IDirect3D3_QueryInterface(d3d, &IID_IDirectDraw4, (void **)&ddraw); - ok(SUCCEEDED(hr), "Failed to get ddraw interface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get ddraw interface, hr %#lx.\n", hr); hr = IDirect3DDevice3_GetRenderTarget(device, &rt); - ok(SUCCEEDED(hr), "Failed to get render target, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get render target, hr %#lx.\n", hr);
memset(&surface_desc, 0, sizeof(surface_desc)); surface_desc.dwSize = sizeof(surface_desc); hr = IDirectDrawSurface4_GetSurfaceDesc(rt, &surface_desc); - ok(SUCCEEDED(hr), "Failed to get surface desc, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get surface desc, hr %#lx.\n", hr); viewport = create_viewport(device, 0, 0, surface_desc.dwWidth, surface_desc.dwHeight); hr = IDirect3DDevice3_SetCurrentViewport(device, viewport); - ok(SUCCEEDED(hr), "Failed to activate the viewport, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to activate the viewport, hr %#lx.\n", hr); U1(clear_rect).x1 = 0; U2(clear_rect).y1 = 0; U3(clear_rect).x2 = surface_desc.dwWidth; U4(clear_rect).y2 = surface_desc.dwHeight;
hr = IDirect3DDevice3_SetRenderState(device, D3DRENDERSTATE_ZENABLE, D3DZB_FALSE); - ok(SUCCEEDED(hr), "Failed to set render state, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set render state, hr %#lx.\n", hr);
/* dst = tex * 0.5 + 1.0 * (1.0 - 0.5) = tex * 0.5 + 0.5 */ hr = IDirect3DDevice3_SetRenderState(device, D3DRENDERSTATE_TEXTUREFACTOR, 0x80ffffff); - ok(SUCCEEDED(hr), "Failed to set render state, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set render state, hr %#lx.\n", hr); hr = IDirect3DDevice3_SetTextureStageState(device, 0, D3DTSS_COLOROP, D3DTOP_BLENDFACTORALPHA); - ok(SUCCEEDED(hr), "Failed to set texture stage state, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set texture stage state, hr %#lx.\n", hr); hr = IDirect3DDevice3_SetTextureStageState(device, 0, D3DTSS_COLORARG1, D3DTA_TEXTURE); - ok(SUCCEEDED(hr), "Failed to set texture stage state, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set texture stage state, hr %#lx.\n", hr); hr = IDirect3DDevice3_SetTextureStageState(device, 0, D3DTSS_COLORARG2, D3DTA_TFACTOR); - ok(SUCCEEDED(hr), "Failed to set texture stage state, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set texture stage state, hr %#lx.\n", hr);
for (i = 0; i < ARRAY_SIZE(formats); i++) { for (width = 1; width < 5; width += 3) { hr = IDirect3DViewport3_Clear2(viewport, 1, &clear_rect, D3DCLEAR_TARGET, 0x00000000, 0.0f, 0); - ok(SUCCEEDED(hr), "Failed to clear viewport, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to clear viewport, hr %#lx.\n", hr);
memset(&surface_desc, 0, sizeof(surface_desc)); surface_desc.dwSize = sizeof(surface_desc); @@ -11283,19 +11283,19 @@ static void test_signed_formats(void) skip("%s textures not supported, skipping.\n", formats[i].name); continue; } - ok(SUCCEEDED(hr), "Failed to create surface, hr %#x, format %s.\n", hr, formats[i].name); + ok(SUCCEEDED(hr), "Failed to create surface, hr %#lx, format %s.\n", hr, formats[i].name);
hr = IDirectDrawSurface4_QueryInterface(surface, &IID_IDirect3DTexture2, (void **)&texture); - ok(SUCCEEDED(hr), "Failed to get Direct3DTexture2 interface, hr %#x, format %s.\n", + ok(SUCCEEDED(hr), "Failed to get Direct3DTexture2 interface, hr %#lx, format %s.\n", hr, formats[i].name); hr = IDirect3DDevice3_SetTexture(device, 0, texture); - ok(SUCCEEDED(hr), "Failed to set texture, hr %#x, format %s.\n", hr, formats[i].name); + ok(SUCCEEDED(hr), "Failed to set texture, hr %#lx, format %s.\n", hr, formats[i].name); IDirect3DTexture2_Release(texture);
memset(&surface_desc, 0, sizeof(surface_desc)); surface_desc.dwSize = sizeof(surface_desc); hr = IDirectDrawSurface4_Lock(surface, NULL, &surface_desc, 0, NULL); - ok(SUCCEEDED(hr), "Failed to lock surface, hr %#x, format %s.\n", hr, formats[i].name); + ok(SUCCEEDED(hr), "Failed to lock surface, hr %#lx, format %s.\n", hr, formats[i].name); for (y = 0; y < 4; y++) { memcpy((char *)surface_desc.lpSurface + y * U1(surface_desc).lPitch, @@ -11303,15 +11303,15 @@ static void test_signed_formats(void) width * formats[i].pixel_size); } hr = IDirectDrawSurface4_Unlock(surface, NULL); - ok(SUCCEEDED(hr), "Failed to unlock surface, hr %#x, format %s.\n", hr, formats[i].name); + ok(SUCCEEDED(hr), "Failed to unlock surface, hr %#lx, format %s.\n", hr, formats[i].name);
hr = IDirect3DDevice3_BeginScene(device); - ok(SUCCEEDED(hr), "Failed to begin scene, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to begin scene, hr %#lx.\n", hr); hr = IDirect3DDevice3_DrawPrimitive(device, D3DPT_TRIANGLESTRIP, D3DFVF_XYZ | D3DFVF_TEX1, quad, 4, 0); - ok(SUCCEEDED(hr), "Failed to draw, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to draw, hr %#lx.\n", hr); hr = IDirect3DDevice3_EndScene(device); - ok(SUCCEEDED(hr), "Failed to end scene, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to end scene, hr %#lx.\n", hr);
for (y = 0; y < 4; y++) { @@ -11324,7 +11324,7 @@ static void test_signed_formats(void) color = get_surface_color(rt, 80 + 160 * x, 60 + 120 * y); ok(compare_color(color, expected_color, formats[i].slop) || broken(compare_color(color, expected_color, formats[i].slop_broken)), - "Expected color 0x%08x, got 0x%08x, format %s, location %ux%u.\n", + "Expected color 0x%08lx, got 0x%08lx, format %s, location %ux%u.\n", expected_color, color, formats[i].name, x, y); } } @@ -11340,7 +11340,7 @@ static void test_signed_formats(void)
done: refcount = IDirect3DDevice3_Release(device); - ok(!refcount, "Device has %u references left.\n", refcount); + ok(!refcount, "Device has %lu references left.\n", refcount); DestroyWindow(window); }
@@ -11531,9 +11531,9 @@ static void test_color_fill(void) }
hr = IDirect3DDevice3_GetDirect3D(device, &d3d); - ok(SUCCEEDED(hr), "Failed to get d3d interface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get d3d interface, hr %#lx.\n", hr); hr = IDirect3D3_QueryInterface(d3d, &IID_IDirectDraw4, (void **)&ddraw); - ok(SUCCEEDED(hr), "Failed to get ddraw interface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get ddraw interface, hr %#lx.\n", hr);
memset(&z_fmt, 0, sizeof(z_fmt)); IDirect3D3_EnumZBufferFormats(d3d, &IID_IDirect3DHALDevice, enum_z_fmt, &z_fmt); @@ -11547,13 +11547,13 @@ static void test_color_fill(void) IDirect3D3_Release(d3d);
hr = IDirectDraw4_GetFourCCCodes(ddraw, &num_fourcc_codes, NULL); - ok(SUCCEEDED(hr), "Failed to get fourcc codes %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get fourcc codes %#lx.\n", hr); fourcc_codes = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, num_fourcc_codes * sizeof(*fourcc_codes)); if (!fourcc_codes) goto done; hr = IDirectDraw4_GetFourCCCodes(ddraw, &num_fourcc_codes, fourcc_codes); - ok(SUCCEEDED(hr), "Failed to get fourcc codes %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get fourcc codes %#lx.\n", hr); for (i = 0; i < num_fourcc_codes; i++) { if (fourcc_codes[i] == MAKEFOURCC('Y', 'U', 'Y', '2')) @@ -11566,7 +11566,7 @@ static void test_color_fill(void) memset(&hal_caps, 0, sizeof(hal_caps)); hal_caps.dwSize = sizeof(hal_caps); hr = IDirectDraw4_GetCaps(ddraw, &hal_caps, NULL); - ok(SUCCEEDED(hr), "Failed to get caps, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get caps, hr %#lx.\n", hr);
if (!(supported_fmts & (SUPPORT_YUY2 | SUPPORT_UYVY)) || !(hal_caps.dwCaps & DDCAPS_OVERLAY)) skip("Overlays or some YUV formats not supported, skipping YUV colorfill tests.\n"); @@ -11621,16 +11621,16 @@ static void test_color_fill(void) }
hr = IDirectDraw4_CreateSurface(ddraw, &surface_desc, &surface, NULL); - ok(SUCCEEDED(hr), "Failed to create surface, hr %#x, surface %s.\n", hr, tests[i].name); + ok(SUCCEEDED(hr), "Failed to create surface, hr %#lx, surface %s.\n", hr, tests[i].name);
hr = IDirectDrawSurface4_Blt(surface, NULL, NULL, NULL, DDBLT_COLORFILL | DDBLT_WAIT, &fx); todo_wine_if (tests[i].format.dwFourCC) - ok(hr == tests[i].colorfill_hr, "Blt returned %#x, expected %#x, surface %s.\n", + ok(hr == tests[i].colorfill_hr, "Blt returned %#lx, expected %#lx, surface %s.\n", hr, tests[i].colorfill_hr, tests[i].name);
hr = IDirectDrawSurface4_Blt(surface, &rect, NULL, NULL, DDBLT_COLORFILL | DDBLT_WAIT, &fx); todo_wine_if (tests[i].format.dwFourCC) - ok(hr == tests[i].colorfill_hr, "Blt returned %#x, expected %#x, surface %s.\n", + ok(hr == tests[i].colorfill_hr, "Blt returned %#lx, expected %#lx, surface %s.\n", hr, tests[i].colorfill_hr, tests[i].name);
if (SUCCEEDED(hr) && tests[i].check_result) @@ -11638,19 +11638,19 @@ static void test_color_fill(void) memset(&surface_desc, 0, sizeof(surface_desc)); surface_desc.dwSize = sizeof(surface_desc); hr = IDirectDrawSurface4_Lock(surface, NULL, &surface_desc, DDLOCK_READONLY, 0); - ok(SUCCEEDED(hr), "Failed to lock surface, hr %#x, surface %s.\n", hr, tests[i].name); + ok(SUCCEEDED(hr), "Failed to lock surface, hr %#lx, surface %s.\n", hr, tests[i].name); color = surface_desc.lpSurface; - ok(*color == tests[i].result, "Got clear result 0x%08x, expected 0x%08x, surface %s.\n", + ok(*color == tests[i].result, "Got clear result 0x%08lx, expected 0x%08lx, surface %s.\n", *color, tests[i].result, tests[i].name); hr = IDirectDrawSurface4_Unlock(surface, NULL); - ok(SUCCEEDED(hr), "Failed to unlock surface, hr %#x, surface %s.\n", hr, tests[i].name); + ok(SUCCEEDED(hr), "Failed to unlock surface, hr %#lx, surface %s.\n", hr, tests[i].name); }
hr = IDirectDrawSurface4_Blt(surface, NULL, NULL, NULL, DDBLT_DEPTHFILL | DDBLT_WAIT, &fx); - ok(hr == tests[i].depthfill_hr, "Blt returned %#x, expected %#x, surface %s.\n", + ok(hr == tests[i].depthfill_hr, "Blt returned %#lx, expected %#lx, surface %s.\n", hr, tests[i].depthfill_hr, tests[i].name); hr = IDirectDrawSurface4_Blt(surface, &rect, NULL, NULL, DDBLT_DEPTHFILL | DDBLT_WAIT, &fx); - ok(hr == tests[i].depthfill_hr, "Blt returned %#x, expected %#x, surface %s.\n", + ok(hr == tests[i].depthfill_hr, "Blt returned %#lx, expected %#lx, surface %s.\n", hr, tests[i].depthfill_hr, tests[i].name);
if (SUCCEEDED(hr) && tests[i].check_result) @@ -11658,22 +11658,22 @@ static void test_color_fill(void) memset(&surface_desc, 0, sizeof(surface_desc)); surface_desc.dwSize = sizeof(surface_desc); hr = IDirectDrawSurface4_Lock(surface, NULL, &surface_desc, DDLOCK_READONLY, 0); - ok(SUCCEEDED(hr), "Failed to lock surface, hr %#x, surface %s.\n", hr, tests[i].name); + ok(SUCCEEDED(hr), "Failed to lock surface, hr %#lx, surface %s.\n", hr, tests[i].name); color = surface_desc.lpSurface; ok((*color & U3(z_fmt).dwZBitMask) == (tests[i].result & U3(z_fmt).dwZBitMask) || broken((*color & U3(z_fmt).dwZBitMask) == (expected_broken & U3(z_fmt).dwZBitMask)), - "Got clear result 0x%08x, expected 0x%08x, surface %s.\n", + "Got clear result 0x%08lx, expected 0x%08lx, surface %s.\n", *color & U3(z_fmt).dwZBitMask, tests[i].result & U3(z_fmt).dwZBitMask, tests[i].name); hr = IDirectDrawSurface4_Unlock(surface, NULL); - ok(SUCCEEDED(hr), "Failed to unlock surface, hr %#x, surface %s.\n", hr, tests[i].name); + ok(SUCCEEDED(hr), "Failed to unlock surface, hr %#lx, surface %s.\n", hr, tests[i].name); }
U5(fx).dwFillColor = 0xdeadbeef; fx.dwROP = BLACKNESS; hr = IDirectDrawSurface4_Blt(surface, NULL, NULL, NULL, DDBLT_ROP | DDBLT_WAIT, &fx); - ok(FAILED(hr) == !tests[i].rop_success, "Blt returned %#x, expected %s, surface %s.\n", + ok(FAILED(hr) == !tests[i].rop_success, "Blt returned %#lx, expected %s, surface %s.\n", hr, tests[i].rop_success ? "success" : "failure", tests[i].name); - ok(U5(fx).dwFillColor == 0xdeadbeef, "dwFillColor was set to 0x%08x, surface %s\n", + ok(U5(fx).dwFillColor == 0xdeadbeef, "dwFillColor was set to 0x%08lx, surface %s\n", U5(fx).dwFillColor, tests[i].name);
if (SUCCEEDED(hr) && tests[i].check_result) @@ -11681,19 +11681,19 @@ static void test_color_fill(void) memset(&surface_desc, 0, sizeof(surface_desc)); surface_desc.dwSize = sizeof(surface_desc); hr = IDirectDrawSurface4_Lock(surface, NULL, &surface_desc, DDLOCK_READONLY, 0); - ok(SUCCEEDED(hr), "Failed to lock surface, hr %#x, surface %s.\n", hr, tests[i].name); + ok(SUCCEEDED(hr), "Failed to lock surface, hr %#lx, surface %s.\n", hr, tests[i].name); color = surface_desc.lpSurface; - ok(*color == 0, "Got clear result 0x%08x, expected 0x00000000, surface %s.\n", + ok(*color == 0, "Got clear result 0x%08lx, expected 0x00000000, surface %s.\n", *color, tests[i].name); hr = IDirectDrawSurface4_Unlock(surface, NULL); - ok(SUCCEEDED(hr), "Failed to unlock surface, hr %#x, surface %s.\n", hr, tests[i].name); + ok(SUCCEEDED(hr), "Failed to unlock surface, hr %#lx, surface %s.\n", hr, tests[i].name); }
fx.dwROP = WHITENESS; hr = IDirectDrawSurface4_Blt(surface, NULL, NULL, NULL, DDBLT_ROP | DDBLT_WAIT, &fx); - ok(FAILED(hr) == !tests[i].rop_success, "Blt returned %#x, expected %s, surface %s.\n", + ok(FAILED(hr) == !tests[i].rop_success, "Blt returned %#lx, expected %s, surface %s.\n", hr, tests[i].rop_success ? "success" : "failure", tests[i].name); - ok(U5(fx).dwFillColor == 0xdeadbeef, "dwFillColor was set to 0x%08x, surface %s\n", + ok(U5(fx).dwFillColor == 0xdeadbeef, "dwFillColor was set to 0x%08lx, surface %s\n", U5(fx).dwFillColor, tests[i].name);
if (SUCCEEDED(hr) && tests[i].check_result) @@ -11701,13 +11701,13 @@ static void test_color_fill(void) memset(&surface_desc, 0, sizeof(surface_desc)); surface_desc.dwSize = sizeof(surface_desc); hr = IDirectDrawSurface4_Lock(surface, NULL, &surface_desc, DDLOCK_READONLY, 0); - ok(SUCCEEDED(hr), "Failed to lock surface, hr %#x, surface %s.\n", hr, tests[i].name); + ok(SUCCEEDED(hr), "Failed to lock surface, hr %#lx, surface %s.\n", hr, tests[i].name); color = surface_desc.lpSurface; /* WHITENESS sets the alpha channel to 0x00. Ignore this for now. */ - ok((*color & 0x00ffffff) == 0x00ffffff, "Got clear result 0x%08x, expected 0xffffffff, surface %s.\n", + ok((*color & 0x00ffffff) == 0x00ffffff, "Got clear result 0x%08lx, expected 0xffffffff, surface %s.\n", *color, tests[i].name); hr = IDirectDrawSurface4_Unlock(surface, NULL); - ok(SUCCEEDED(hr), "Failed to unlock surface, hr %#x, surface %s.\n", hr, tests[i].name); + ok(SUCCEEDED(hr), "Failed to unlock surface, hr %#lx, surface %s.\n", hr, tests[i].name); }
IDirectDrawSurface4_Release(surface); @@ -11731,78 +11731,78 @@ static void test_color_fill(void) U4(U4(surface_desc).ddpfPixelFormat).dwBBitMask = 0x000000ff; surface_desc.ddsCaps.dwCaps = DDSCAPS_OFFSCREENPLAIN | DDSCAPS_SYSTEMMEMORY; hr = IDirectDraw4_CreateSurface(ddraw, &surface_desc, &surface, NULL); - ok(SUCCEEDED(hr), "Failed to create surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create surface, hr %#lx.\n", hr); hr = IDirectDraw4_CreateSurface(ddraw, &surface_desc, &surface2, NULL); - ok(SUCCEEDED(hr), "Failed to create surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create surface, hr %#lx.\n", hr);
/* No DDBLTFX. */ hr = IDirectDrawSurface4_Blt(surface, NULL, NULL, &rect, DDBLT_COLORFILL | DDBLT_WAIT, NULL); - ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface4_Blt(surface, NULL, NULL, &rect, DDBLT_ROP | DDBLT_WAIT, NULL); - ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#lx.\n", hr);
/* Unused source rectangle. */ hr = IDirectDrawSurface4_Blt(surface, NULL, NULL, &rect, DDBLT_COLORFILL | DDBLT_WAIT, &fx); - ok(SUCCEEDED(hr), "Got unexpected hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface4_Blt(surface, NULL, NULL, &rect, DDBLT_ROP | DDBLT_WAIT, &fx); - ok(SUCCEEDED(hr), "Got unexpected hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Got unexpected hr %#lx.\n", hr);
/* Unused source surface. */ hr = IDirectDrawSurface4_Blt(surface, NULL, surface2, NULL, DDBLT_COLORFILL | DDBLT_WAIT, &fx); - ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface4_Blt(surface, NULL, surface2, NULL, DDBLT_ROP | DDBLT_WAIT, &fx); - ok(SUCCEEDED(hr), "Got unexpected hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface4_Blt(surface, NULL, surface2, &rect, DDBLT_COLORFILL | DDBLT_WAIT, &fx); - ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface4_Blt(surface, NULL, surface2, &rect, DDBLT_ROP | DDBLT_WAIT, &fx); - ok(SUCCEEDED(hr), "Got unexpected hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Got unexpected hr %#lx.\n", hr);
/* Inverted destination or source rectangle. */ SetRect(&rect, 5, 7, 7, 5); hr = IDirectDrawSurface4_Blt(surface, &rect, NULL, NULL, DDBLT_COLORFILL | DDBLT_WAIT, &fx); - ok(hr == DDERR_INVALIDRECT, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_INVALIDRECT, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface4_Blt(surface, NULL, NULL, &rect, DDBLT_COLORFILL | DDBLT_WAIT, &fx); - ok(SUCCEEDED(hr), "Got unexpected hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface4_Blt(surface, &rect, surface2, NULL, DDBLT_COLORFILL | DDBLT_WAIT, &fx); - ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface4_Blt(surface, NULL, surface2, &rect, DDBLT_COLORFILL | DDBLT_WAIT, &fx); - ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface4_Blt(surface, NULL, surface2, &rect, DDBLT_ROP | DDBLT_WAIT, &fx); - ok(hr == DDERR_INVALIDRECT, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_INVALIDRECT, "Got unexpected hr %#lx.\n", hr);
/* Negative rectangle. */ SetRect(&rect, -1, -1, 5, 5); hr = IDirectDrawSurface4_Blt(surface, &rect, NULL, NULL, DDBLT_COLORFILL | DDBLT_WAIT, &fx); - ok(hr == DDERR_INVALIDRECT, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_INVALIDRECT, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface4_Blt(surface, NULL, NULL, &rect, DDBLT_COLORFILL | DDBLT_WAIT, &fx); - ok(SUCCEEDED(hr), "Got unexpected hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface4_Blt(surface, &rect, surface2, NULL, DDBLT_COLORFILL | DDBLT_WAIT, &fx); - ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface4_Blt(surface, &rect, surface2, &rect, DDBLT_COLORFILL | DDBLT_WAIT, &fx); - ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface4_Blt(surface, NULL, surface2, &rect, DDBLT_ROP | DDBLT_WAIT, &fx); - ok(hr == DDERR_INVALIDRECT, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_INVALIDRECT, "Got unexpected hr %#lx.\n", hr);
/* Out of bounds rectangle. */ SetRect(&rect, 0, 0, 65, 65); hr = IDirectDrawSurface4_Blt(surface, &rect, NULL, NULL, DDBLT_COLORFILL | DDBLT_WAIT, &fx); - ok(hr == DDERR_INVALIDRECT, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_INVALIDRECT, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface4_Blt(surface, NULL, surface2, &rect, DDBLT_ROP | DDBLT_WAIT, &fx); - ok(hr == DDERR_INVALIDRECT, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_INVALIDRECT, "Got unexpected hr %#lx.\n", hr);
/* Combine multiple flags. */ hr = IDirectDrawSurface4_Blt(surface, NULL, NULL, NULL, DDBLT_COLORFILL | DDBLT_DEPTHFILL | DDBLT_WAIT, &fx); - ok(SUCCEEDED(hr), "Got unexpected hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface4_Blt(surface, NULL, NULL, NULL, DDBLT_COLORFILL | DDBLT_ROP | DDBLT_WAIT, &fx); - ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface4_Blt(surface, &rect, NULL, NULL, DDBLT_COLORFILL | DDBLT_ROP | DDBLT_WAIT, &fx); - ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#lx.\n", hr);
for (i = 0; i < ARRAY_SIZE(rops); i++) { fx.dwROP = rops[i].rop; hr = IDirectDrawSurface4_Blt(surface, NULL, surface2, NULL, DDBLT_ROP | DDBLT_WAIT, &fx); - ok(hr == rops[i].hr, "Got unexpected hr %#x for rop %s.\n", hr, rops[i].name); + ok(hr == rops[i].hr, "Got unexpected hr %#lx for rop %s.\n", hr, rops[i].name); }
IDirectDrawSurface4_Release(surface2); @@ -11819,54 +11819,54 @@ static void test_color_fill(void) U4(surface_desc).ddpfPixelFormat = z_fmt; surface_desc.ddsCaps.dwCaps = DDSCAPS_ZBUFFER; hr = IDirectDraw4_CreateSurface(ddraw, &surface_desc, &surface, NULL); - ok(SUCCEEDED(hr), "Failed to create surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create surface, hr %#lx.\n", hr); hr = IDirectDraw4_CreateSurface(ddraw, &surface_desc, &surface2, NULL); - ok(SUCCEEDED(hr), "Failed to create surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create surface, hr %#lx.\n", hr);
/* No DDBLTFX. */ hr = IDirectDrawSurface4_Blt(surface, NULL, NULL, &rect, DDBLT_DEPTHFILL | DDBLT_WAIT, NULL); - ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#lx.\n", hr);
/* Unused source rectangle. */ hr = IDirectDrawSurface4_Blt(surface, NULL, NULL, &rect, DDBLT_DEPTHFILL | DDBLT_WAIT, &fx); - ok(SUCCEEDED(hr), "Got unexpected hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Got unexpected hr %#lx.\n", hr);
/* Unused source surface. */ hr = IDirectDrawSurface4_Blt(surface, NULL, surface2, NULL, DDBLT_DEPTHFILL | DDBLT_WAIT, &fx); - ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface4_Blt(surface, NULL, surface2, &rect, DDBLT_DEPTHFILL | DDBLT_WAIT, &fx); - ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#lx.\n", hr);
/* Inverted destination or source rectangle. */ SetRect(&rect, 5, 7, 7, 5); hr = IDirectDrawSurface4_Blt(surface, &rect, NULL, NULL, DDBLT_DEPTHFILL | DDBLT_WAIT, &fx); - ok(hr == DDERR_INVALIDRECT, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_INVALIDRECT, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface4_Blt(surface, NULL, NULL, &rect, DDBLT_DEPTHFILL | DDBLT_WAIT, &fx); - ok(SUCCEEDED(hr), "Got unexpected hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface4_Blt(surface, &rect, surface2, NULL, DDBLT_DEPTHFILL | DDBLT_WAIT, &fx); - ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface4_Blt(surface, NULL, surface2, &rect, DDBLT_DEPTHFILL | DDBLT_WAIT, &fx); - ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#lx.\n", hr);
/* Negative rectangle. */ SetRect(&rect, -1, -1, 5, 5); hr = IDirectDrawSurface4_Blt(surface, &rect, NULL, NULL, DDBLT_DEPTHFILL | DDBLT_WAIT, &fx); - ok(hr == DDERR_INVALIDRECT, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_INVALIDRECT, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface4_Blt(surface, NULL, NULL, &rect, DDBLT_DEPTHFILL | DDBLT_WAIT, &fx); - ok(SUCCEEDED(hr), "Got unexpected hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface4_Blt(surface, &rect, surface2, NULL, DDBLT_DEPTHFILL | DDBLT_WAIT, &fx); - ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface4_Blt(surface, &rect, surface2, &rect, DDBLT_DEPTHFILL | DDBLT_WAIT, &fx); - ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#lx.\n", hr);
/* Out of bounds rectangle. */ SetRect(&rect, 0, 0, 65, 65); hr = IDirectDrawSurface4_Blt(surface, &rect, NULL, NULL, DDBLT_DEPTHFILL | DDBLT_WAIT, &fx); - ok(hr == DDERR_INVALIDRECT, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_INVALIDRECT, "Got unexpected hr %#lx.\n", hr);
/* Combine multiple flags. */ hr = IDirectDrawSurface4_Blt(surface, NULL, NULL, NULL, DDBLT_COLORFILL | DDBLT_DEPTHFILL | DDBLT_WAIT, &fx); - ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#lx.\n", hr);
IDirectDrawSurface4_Release(surface2); IDirectDrawSurface4_Release(surface); @@ -11874,7 +11874,7 @@ static void test_color_fill(void) done: IDirectDraw4_Release(ddraw); refcount = IDirect3DDevice3_Release(device); - ok(!refcount, "Device has %u references left.\n", refcount); + ok(!refcount, "Device has %lu references left.\n", refcount); DestroyWindow(window); }
@@ -11919,13 +11919,13 @@ static void test_texcoordindex(void) }
hr = IDirect3DDevice3_GetDirect3D(device, &d3d); - ok(SUCCEEDED(hr), "Failed to get Direct3D3 interface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get Direct3D3 interface, hr %#lx.\n", hr); hr = IDirect3D3_QueryInterface(d3d, &IID_IDirectDraw4, (void **)&ddraw); - ok(SUCCEEDED(hr), "Failed to get DirectDraw4 interface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get DirectDraw4 interface, hr %#lx.\n", hr); IDirect3D3_Release(d3d);
hr = IDirect3DDevice3_GetRenderTarget(device, &rt); - ok(SUCCEEDED(hr), "Failed to get render target, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get render target, hr %#lx.\n", hr);
memset(&surface_desc, 0, sizeof(surface_desc)); surface_desc.dwSize = sizeof(surface_desc); @@ -11941,14 +11941,14 @@ static void test_texcoordindex(void) U4(U4(surface_desc).ddpfPixelFormat).dwBBitMask = 0x000000ff; U5(U4(surface_desc).ddpfPixelFormat).dwRGBAlphaBitMask = 0xff000000; hr = IDirectDraw4_CreateSurface(ddraw, &surface_desc, &surface1, NULL); - ok(SUCCEEDED(hr), "Failed to create surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create surface, hr %#lx.\n", hr); hr = IDirectDraw4_CreateSurface(ddraw, &surface_desc, &surface2, NULL); - ok(SUCCEEDED(hr), "Failed to create surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create surface, hr %#lx.\n", hr);
memset(&surface_desc, 0, sizeof(surface_desc)); surface_desc.dwSize = sizeof(surface_desc); hr = IDirectDrawSurface4_Lock(surface1, 0, &surface_desc, 0, NULL); - ok(SUCCEEDED(hr), "Failed to lock surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to lock surface, hr %#lx.\n", hr); ptr = surface_desc.lpSurface; ptr[0] = 0xff000000; ptr[1] = 0xff00ff00; @@ -11956,12 +11956,12 @@ static void test_texcoordindex(void) ptr[0] = 0xff0000ff; ptr[1] = 0xff00ffff; hr = IDirectDrawSurface4_Unlock(surface1, NULL); - ok(SUCCEEDED(hr), "Failed to unlock surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to unlock surface, hr %#lx.\n", hr);
memset(&surface_desc, 0, sizeof(surface_desc)); surface_desc.dwSize = sizeof(surface_desc); hr = IDirectDrawSurface4_Lock(surface2, 0, &surface_desc, 0, NULL); - ok(SUCCEEDED(hr), "Failed to lock surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to lock surface, hr %#lx.\n", hr); ptr = surface_desc.lpSurface; ptr[0] = 0xff000000; ptr[1] = 0xff0000ff; @@ -11969,83 +11969,83 @@ static void test_texcoordindex(void) ptr[0] = 0xffff0000; ptr[1] = 0xffff00ff; hr = IDirectDrawSurface4_Unlock(surface2, 0); - ok(SUCCEEDED(hr), "Failed to unlock surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to unlock surface, hr %#lx.\n", hr);
viewport = create_viewport(device, 0, 0, 640, 480); hr = IDirect3DDevice3_SetCurrentViewport(device, viewport); - ok(SUCCEEDED(hr), "Failed to set current viewport, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set current viewport, hr %#lx.\n", hr);
hr = IDirectDrawSurface4_QueryInterface(surface1, &IID_IDirect3DTexture2, (void **)&texture1); - ok(SUCCEEDED(hr), "Failed to get texture interface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get texture interface, hr %#lx.\n", hr); hr = IDirectDrawSurface4_QueryInterface(surface2, &IID_IDirect3DTexture2, (void **)&texture2); - ok(SUCCEEDED(hr), "Failed to get texture interface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get texture interface, hr %#lx.\n", hr); hr = IDirect3DDevice3_SetTexture(device, 0, texture1); - ok(SUCCEEDED(hr), "Failed to set texture, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set texture, hr %#lx.\n", hr); hr = IDirect3DDevice3_SetTexture(device, 1, texture2); - ok(SUCCEEDED(hr), "Failed to set texture, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set texture, hr %#lx.\n", hr); hr = IDirect3DDevice3_SetTextureStageState(device, 0, D3DTSS_COLOROP, D3DTOP_SELECTARG1); - ok(SUCCEEDED(hr), "Failed to set color op, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set color op, hr %#lx.\n", hr); hr = IDirect3DDevice3_SetTextureStageState(device, 0, D3DTSS_COLORARG1, D3DTA_TEXTURE); - ok(SUCCEEDED(hr), "Failed to set color arg, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set color arg, hr %#lx.\n", hr); hr = IDirect3DDevice3_SetTextureStageState(device, 1, D3DTSS_COLOROP, D3DTOP_ADD); - ok(SUCCEEDED(hr), "Failed to set color op, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set color op, hr %#lx.\n", hr); hr = IDirect3DDevice3_SetTextureStageState(device, 1, D3DTSS_COLORARG1, D3DTA_TEXTURE); - ok(SUCCEEDED(hr), "Failed to set color arg, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set color arg, hr %#lx.\n", hr); hr = IDirect3DDevice3_SetTextureStageState(device, 1, D3DTSS_COLORARG2, D3DTA_CURRENT); - ok(SUCCEEDED(hr), "Failed to set color arg, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set color arg, hr %#lx.\n", hr); hr = IDirect3DDevice3_SetTextureStageState(device, 2, D3DTSS_COLOROP, D3DTOP_DISABLE); - ok(SUCCEEDED(hr), "Failed to set color op, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set color op, hr %#lx.\n", hr);
hr = IDirect3DDevice3_SetTextureStageState(device, 0, D3DTSS_TEXCOORDINDEX, 1); - ok(SUCCEEDED(hr), "Failed to set texcoord index, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set texcoord index, hr %#lx.\n", hr); hr = IDirect3DDevice3_SetTextureStageState(device, 1, D3DTSS_TEXCOORDINDEX, 0); - ok(SUCCEEDED(hr), "Failed to set texcoord index, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set texcoord index, hr %#lx.\n", hr);
hr = IDirect3DDevice3_SetRenderState(device, D3DRENDERSTATE_ZENABLE, FALSE); - ok(SUCCEEDED(hr), "Failed to disable z-buffering, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to disable z-buffering, hr %#lx.\n", hr);
hr = IDirect3DViewport3_Clear2(viewport, 1, &clear_rect, D3DCLEAR_TARGET, 0xffffff00, 1.0f, 0); - ok(SUCCEEDED(hr), "Failed to clear, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to clear, hr %#lx.\n", hr);
hr = IDirect3DDevice3_BeginScene(device); - ok(SUCCEEDED(hr), "Failed to begin scene, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to begin scene, hr %#lx.\n", hr); hr = IDirect3DDevice3_DrawPrimitive(device, D3DPT_TRIANGLESTRIP, fvf, quad, 4, 0); - ok(SUCCEEDED(hr), "Failed to draw, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to draw, hr %#lx.\n", hr); hr = IDirect3DDevice3_EndScene(device); - ok(SUCCEEDED(hr), "Failed to end scene, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to end scene, hr %#lx.\n", hr);
color = get_surface_color(rt, 160, 120); - ok(compare_color(color, 0x000000ff, 2), "Got unexpected color 0x%08x.\n", color); + ok(compare_color(color, 0x000000ff, 2), "Got unexpected color 0x%08lx.\n", color); color = get_surface_color(rt, 480, 120); - ok(compare_color(color, 0x0000ffff, 2), "Got unexpected color 0x%08x.\n", color); + ok(compare_color(color, 0x0000ffff, 2), "Got unexpected color 0x%08lx.\n", color); color = get_surface_color(rt, 160, 360); - ok(compare_color(color, 0x00ff0000, 2), "Got unexpected color 0x%08x.\n", color); + ok(compare_color(color, 0x00ff0000, 2), "Got unexpected color 0x%08lx.\n", color); color = get_surface_color(rt, 480, 360); - ok(compare_color(color, 0x00ffffff, 2), "Got unexpected color 0x%08x.\n", color); + ok(compare_color(color, 0x00ffffff, 2), "Got unexpected color 0x%08lx.\n", color);
/* D3DTSS_TEXTURETRANSFORMFLAGS was introduced in D3D7, can't test it here. */
hr = IDirect3DDevice3_SetTextureStageState(device, 1, D3DTSS_TEXCOORDINDEX, 2); - ok(SUCCEEDED(hr), "Failed to set texcoord index, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set texcoord index, hr %#lx.\n", hr);
hr = IDirect3DViewport3_Clear2(viewport, 1, &clear_rect, D3DCLEAR_TARGET, 0xffffff00, 1.0f, 0); - ok(SUCCEEDED(hr), "Failed to clear, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to clear, hr %#lx.\n", hr);
hr = IDirect3DDevice3_BeginScene(device); - ok(SUCCEEDED(hr), "Failed to begin scene, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to begin scene, hr %#lx.\n", hr); hr = IDirect3DDevice3_DrawPrimitive(device, D3DPT_TRIANGLESTRIP, fvf, quad, 4, 0); - ok(SUCCEEDED(hr), "Failed to draw, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to draw, hr %#lx.\n", hr); hr = IDirect3DDevice3_EndScene(device); - ok(SUCCEEDED(hr), "Failed to end scene, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to end scene, hr %#lx.\n", hr);
color = get_surface_color(rt, 160, 120); - ok(compare_color(color, 0x000000ff, 2), "Got unexpected color 0x%08x.\n", color); + ok(compare_color(color, 0x000000ff, 2), "Got unexpected color 0x%08lx.\n", color); color = get_surface_color(rt, 480, 120); - ok(compare_color(color, 0x0000ffff, 2), "Got unexpected color 0x%08x.\n", color); + ok(compare_color(color, 0x0000ffff, 2), "Got unexpected color 0x%08lx.\n", color); color = get_surface_color(rt, 160, 360); - ok(compare_color(color, 0x00ff00ff, 2), "Got unexpected color 0x%08x.\n", color); + ok(compare_color(color, 0x00ff00ff, 2), "Got unexpected color 0x%08lx.\n", color); color = get_surface_color(rt, 480, 360); - ok(compare_color(color, 0x00ffff00, 2), "Got unexpected color 0x%08x.\n", color); + ok(compare_color(color, 0x00ffff00, 2), "Got unexpected color 0x%08lx.\n", color);
IDirect3DTexture2_Release(texture2); IDirect3DTexture2_Release(texture1); @@ -12057,7 +12057,7 @@ static void test_texcoordindex(void) IDirectDrawSurface4_Release(rt); IDirectDraw4_Release(ddraw); refcount = IDirect3DDevice3_Release(device); - ok(!refcount, "Device has %u references left.\n", refcount); + ok(!refcount, "Device has %lu references left.\n", refcount); DestroyWindow(window); }
@@ -12144,12 +12144,12 @@ static void test_colorkey_precision(void) }
hr = IDirect3DDevice3_GetDirect3D(device, &d3d); - ok(SUCCEEDED(hr), "Failed to get Direct3D3 interface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get Direct3D3 interface, hr %#lx.\n", hr); hr = IDirect3D3_QueryInterface(d3d, &IID_IDirectDraw4, (void **)&ddraw); - ok(SUCCEEDED(hr), "Failed to get DirectDraw4 interface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get DirectDraw4 interface, hr %#lx.\n", hr); IDirect3D3_Release(d3d); hr = IDirect3DDevice3_GetRenderTarget(device, &rt); - ok(SUCCEEDED(hr), "Failed to get render target, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get render target, hr %#lx.\n", hr);
is_nvidia = ddraw_is_nvidia(ddraw); /* The Windows 8 WARP driver has plenty of false negatives in X8R8G8B8 @@ -12162,24 +12162,24 @@ static void test_colorkey_precision(void)
viewport = create_viewport(device, 0, 0, 640, 480); hr = IDirect3DDevice3_SetCurrentViewport(device, viewport); - ok(SUCCEEDED(hr), "Failed to set current viewport, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set current viewport, hr %#lx.\n", hr);
hr = IDirect3DDevice3_SetRenderState(device, D3DRENDERSTATE_ZENABLE, D3DZB_FALSE); - ok(SUCCEEDED(hr), "Failed to disable z-buffering, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to disable z-buffering, hr %#lx.\n", hr); hr = IDirect3DDevice3_SetRenderState(device, D3DRENDERSTATE_COLORKEYENABLE, TRUE); - ok(SUCCEEDED(hr), "Failed to enable color keying, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to enable color keying, hr %#lx.\n", hr); /* Multiply the texture read result with 0, that way the result color if the key doesn't * match is constant. In theory color keying works without reading the texture result * (meaning we could just op=arg1, arg1=tfactor), but the Geforce7 Windows driver begs * to differ. */ hr = IDirect3DDevice3_SetTextureStageState(device, 0, D3DTSS_COLOROP, D3DTOP_MODULATE); - ok(SUCCEEDED(hr), "Failed to set color op, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set color op, hr %#lx.\n", hr); hr = IDirect3DDevice3_SetTextureStageState(device, 0, D3DTSS_COLORARG1, D3DTA_TEXTURE); - ok(SUCCEEDED(hr), "Failed to set color arg, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set color arg, hr %#lx.\n", hr); hr = IDirect3DDevice3_SetTextureStageState(device, 0, D3DTSS_COLORARG2, D3DTA_TFACTOR); - ok(SUCCEEDED(hr), "Failed to set color arg, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set color arg, hr %#lx.\n", hr); hr = IDirect3DDevice3_SetRenderState(device, D3DRENDERSTATE_TEXTUREFACTOR, 0x00000000); - ok(SUCCEEDED(hr), "Failed to set render state, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set render state, hr %#lx.\n", hr);
memset(&fx, 0, sizeof(fx)); fx.dwSize = sizeof(fx); @@ -12204,9 +12204,9 @@ static void test_colorkey_precision(void) /* Windows XP (at least with the r200 driver, other drivers untested) produces * garbage when doing color keyed texture->texture blits. */ hr = IDirectDraw4_CreateSurface(ddraw, &surface_desc, &src, NULL); - ok(SUCCEEDED(hr), "Failed to create surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create surface, hr %#lx.\n", hr); hr = IDirectDraw4_CreateSurface(ddraw, &surface_desc, &dst, NULL); - ok(SUCCEEDED(hr), "Failed to create surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create surface, hr %#lx.\n", hr);
U5(fx).dwFillColor = tests[t].clear; /* On the w8 testbot (WARP driver) the blit result has different values in the @@ -12224,17 +12224,17 @@ static void test_colorkey_precision(void) surface_desc.ddckCKSrcBlt.dwColorSpaceLowValue = c << tests[t].shift; surface_desc.ddckCKSrcBlt.dwColorSpaceHighValue = c << tests[t].shift; hr = IDirectDraw4_CreateSurface(ddraw, &surface_desc, &texture, NULL); - ok(SUCCEEDED(hr), "Failed to create surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create surface, hr %#lx.\n", hr); hr = IDirectDrawSurface4_QueryInterface(texture, &IID_IDirect3DTexture2, (void **)&d3d_texture); - ok(SUCCEEDED(hr), "Failed to get texture interface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get texture interface, hr %#lx.\n", hr); hr = IDirect3DDevice3_SetTexture(device, 0, d3d_texture); - ok(SUCCEEDED(hr), "Failed to set texture, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set texture, hr %#lx.\n", hr);
hr = IDirectDrawSurface4_Blt(dst, NULL, NULL, NULL, DDBLT_COLORFILL | DDBLT_WAIT, &fx); - ok(SUCCEEDED(hr), "Failed to clear destination surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to clear destination surface, hr %#lx.\n", hr);
hr = IDirectDrawSurface4_Lock(src, NULL, &lock_desc, DDLOCK_WAIT, NULL); - ok(SUCCEEDED(hr), "Failed to lock surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to lock surface, hr %#lx.\n", hr); switch (tests[t].bpp) { case 4: @@ -12252,21 +12252,21 @@ static void test_colorkey_precision(void) break; } hr = IDirectDrawSurface4_Unlock(src, 0); - ok(SUCCEEDED(hr), "Failed to unlock surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to unlock surface, hr %#lx.\n", hr); hr = IDirectDrawSurface4_Blt(texture, NULL, src, NULL, DDBLT_WAIT, NULL); - ok(SUCCEEDED(hr), "Failed to blit, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to blit, hr %#lx.\n", hr);
ckey.dwColorSpaceLowValue = c << tests[t].shift; ckey.dwColorSpaceHighValue = c << tests[t].shift; hr = IDirectDrawSurface4_SetColorKey(src, DDCKEY_SRCBLT, &ckey); - ok(SUCCEEDED(hr), "Failed to set color key, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set color key, hr %#lx.\n", hr);
hr = IDirectDrawSurface4_Blt(dst, NULL, src, NULL, DDBLT_KEYSRC | DDBLT_WAIT, NULL); - ok(SUCCEEDED(hr), "Failed to blit, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to blit, hr %#lx.\n", hr);
/* Don't make this read only, it somehow breaks the detection of the Nvidia bug below. */ hr = IDirectDrawSurface4_Lock(dst, NULL, &lock_desc, DDLOCK_WAIT, NULL); - ok(SUCCEEDED(hr), "Failed to lock surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to lock surface, hr %#lx.\n", hr); switch (tests[t].bpp) { case 4: @@ -12284,11 +12284,11 @@ static void test_colorkey_precision(void) break; } hr = IDirectDrawSurface4_Unlock(dst, 0); - ok(SUCCEEDED(hr), "Failed to unlock surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to unlock surface, hr %#lx.\n", hr);
if (!c) { - ok(data[0] == tests[t].clear, "Expected surface content %#x, got %#x, format %s, c=%u.\n", + ok(data[0] == tests[t].clear, "Expected surface content %#x, got %#lx, format %s, c=%u.\n", tests[t].clear, data[0], tests[t].name, c);
if (data[3] == tests[t].clear) @@ -12313,52 +12313,52 @@ static void test_colorkey_precision(void) } } else - ok(data[0] == (c - 1) << tests[t].shift, "Expected surface content %#x, got %#x, format %s, c=%u.\n", + ok(data[0] == (c - 1) << tests[t].shift, "Expected surface content %#x, got %#lx, format %s, c=%u.\n", (c - 1) << tests[t].shift, data[0], tests[t].name, c);
- ok(data[1] == tests[t].clear, "Expected surface content %#x, got %#x, format %s, c=%u.\n", + ok(data[1] == tests[t].clear, "Expected surface content %#x, got %#lx, format %s, c=%u.\n", tests[t].clear, data[1], tests[t].name, c);
if (c == tests[t].max) - ok(data[2] == tests[t].clear, "Expected surface content %#x, got %#x, format %s, c=%u.\n", + ok(data[2] == tests[t].clear, "Expected surface content %#x, got %#lx, format %s, c=%u.\n", tests[t].clear, data[2], tests[t].name, c); else - ok(data[2] == (c + 1) << tests[t].shift, "Expected surface content %#x, got %#x, format %s, c=%u.\n", + ok(data[2] == (c + 1) << tests[t].shift, "Expected surface content %#x, got %#lx, format %s, c=%u.\n", (c + 1) << tests[t].shift, data[2], tests[t].name, c);
hr = IDirect3DViewport3_Clear2(viewport, 1, &clear_rect, D3DCLEAR_TARGET, 0x0000ff00, 1.0f, 0); - ok(SUCCEEDED(hr), "Failed to clear, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to clear, hr %#lx.\n", hr);
hr = IDirect3DDevice3_BeginScene(device); - ok(SUCCEEDED(hr), "Failed to begin scene, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to begin scene, hr %#lx.\n", hr); hr = IDirect3DDevice3_DrawPrimitive(device, D3DPT_TRIANGLESTRIP, D3DFVF_XYZ | D3DFVF_TEX1, quad, 4, 0); - ok(SUCCEEDED(hr), "Failed to draw, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to draw, hr %#lx.\n", hr); hr = IDirect3DDevice3_EndScene(device); - ok(SUCCEEDED(hr), "Failed to end scene, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to end scene, hr %#lx.\n", hr);
color = get_surface_color(rt, 80, 240); if (!c) ok(compare_color(color, 0x0000ff00, 1) || broken(is_warp && compare_color(color, 0x00000000, 1)), - "Got unexpected color 0x%08x, format %s, c=%u.\n", + "Got unexpected color 0x%08lx, format %s, c=%u.\n", color, tests[t].name, c); else ok(compare_color(color, 0x00000000, 1) || broken(is_warp && compare_color(color, 0x0000ff00, 1)), - "Got unexpected color 0x%08x, format %s, c=%u.\n", + "Got unexpected color 0x%08lx, format %s, c=%u.\n", color, tests[t].name, c);
color = get_surface_color(rt, 240, 240); ok(compare_color(color, 0x0000ff00, 1) || broken(is_warp && compare_color(color, 0x00000000, 1)), - "Got unexpected color 0x%08x, format %s, c=%u.\n", + "Got unexpected color 0x%08lx, format %s, c=%u.\n", color, tests[t].name, c);
color = get_surface_color(rt, 400, 240); if (c == tests[t].max) ok(compare_color(color, 0x0000ff00, 1) || broken(is_warp && compare_color(color, 0x00000000, 1)), - "Got unexpected color 0x%08x, format %s, c=%u.\n", + "Got unexpected color 0x%08lx, format %s, c=%u.\n", color, tests[t].name, c); else ok(compare_color(color, 0x00000000, 1) || broken(is_warp && compare_color(color, 0x0000ff00, 1)), - "Got unexpected color 0x%08x, format %s, c=%u.\n", + "Got unexpected color 0x%08lx, format %s, c=%u.\n", color, tests[t].name, c);
IDirect3DTexture2_Release(d3d_texture); @@ -12373,7 +12373,7 @@ static void test_colorkey_precision(void) IDirectDrawSurface4_Release(rt); IDirectDraw4_Release(ddraw); refcount = IDirect3DDevice3_Release(device); - ok(!refcount, "Device has %u references left.\n", refcount); + ok(!refcount, "Device has %lu references left.\n", refcount); DestroyWindow(window); }
@@ -12391,7 +12391,7 @@ static void test_range_colorkey(void) ddraw = create_ddraw(); ok(!!ddraw, "Failed to create a ddraw object.\n"); hr = IDirectDraw4_SetCooperativeLevel(ddraw, window, DDSCL_NORMAL); - ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#lx.\n", hr);
memset(&surface_desc, 0, sizeof(surface_desc)); surface_desc.dwSize = sizeof(surface_desc); @@ -12410,85 +12410,85 @@ static void test_range_colorkey(void) surface_desc.ddckCKSrcBlt.dwColorSpaceLowValue = 0x00000000; surface_desc.ddckCKSrcBlt.dwColorSpaceHighValue = 0x00000001; hr = IDirectDraw4_CreateSurface(ddraw, &surface_desc, &surface, NULL); - ok(hr == DDERR_NOCOLORKEYHW, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_NOCOLORKEYHW, "Got unexpected hr %#lx.\n", hr);
surface_desc.ddckCKSrcBlt.dwColorSpaceLowValue = 0x00000001; surface_desc.ddckCKSrcBlt.dwColorSpaceHighValue = 0x00000000; hr = IDirectDraw4_CreateSurface(ddraw, &surface_desc, &surface, NULL); - ok(hr == DDERR_NOCOLORKEYHW, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_NOCOLORKEYHW, "Got unexpected hr %#lx.\n", hr);
/* Same for DDSCAPS_OFFSCREENPLAIN. */ surface_desc.ddsCaps.dwCaps = DDSCAPS_OFFSCREENPLAIN; surface_desc.ddckCKSrcBlt.dwColorSpaceLowValue = 0x00000000; surface_desc.ddckCKSrcBlt.dwColorSpaceHighValue = 0x00000001; hr = IDirectDraw4_CreateSurface(ddraw, &surface_desc, &surface, NULL); - ok(hr == DDERR_NOCOLORKEYHW, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_NOCOLORKEYHW, "Got unexpected hr %#lx.\n", hr);
surface_desc.ddckCKSrcBlt.dwColorSpaceLowValue = 0x00000001; surface_desc.ddckCKSrcBlt.dwColorSpaceHighValue = 0x00000000; hr = IDirectDraw4_CreateSurface(ddraw, &surface_desc, &surface, NULL); - ok(hr == DDERR_NOCOLORKEYHW, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_NOCOLORKEYHW, "Got unexpected hr %#lx.\n", hr);
surface_desc.ddckCKSrcBlt.dwColorSpaceLowValue = 0x00000000; surface_desc.ddckCKSrcBlt.dwColorSpaceHighValue = 0x00000000; hr = IDirectDraw4_CreateSurface(ddraw, &surface_desc, &surface, NULL); - ok(SUCCEEDED(hr), "Failed to create surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create surface, hr %#lx.\n", hr);
/* Setting a range color key without DDCKEY_COLORSPACE collapses the key. */ ckey.dwColorSpaceLowValue = 0x00000000; ckey.dwColorSpaceHighValue = 0x00000001; hr = IDirectDrawSurface4_SetColorKey(surface, DDCKEY_SRCBLT, &ckey); - ok(SUCCEEDED(hr), "Failed to set color key, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set color key, hr %#lx.\n", hr);
hr = IDirectDrawSurface4_GetColorKey(surface, DDCKEY_SRCBLT, &ckey); - ok(SUCCEEDED(hr), "Failed to get color key, hr %#x.\n", hr); - ok(!ckey.dwColorSpaceLowValue, "Got unexpected value 0x%08x.\n", ckey.dwColorSpaceLowValue); - ok(!ckey.dwColorSpaceHighValue, "Got unexpected value 0x%08x.\n", ckey.dwColorSpaceHighValue); + ok(SUCCEEDED(hr), "Failed to get color key, hr %#lx.\n", hr); + ok(!ckey.dwColorSpaceLowValue, "Got unexpected value 0x%08lx.\n", ckey.dwColorSpaceLowValue); + ok(!ckey.dwColorSpaceHighValue, "Got unexpected value 0x%08lx.\n", ckey.dwColorSpaceHighValue);
ckey.dwColorSpaceLowValue = 0x00000001; ckey.dwColorSpaceHighValue = 0x00000000; hr = IDirectDrawSurface4_SetColorKey(surface, DDCKEY_SRCBLT, &ckey); - ok(SUCCEEDED(hr), "Failed to set color key, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set color key, hr %#lx.\n", hr);
hr = IDirectDrawSurface4_GetColorKey(surface, DDCKEY_SRCBLT, &ckey); - ok(SUCCEEDED(hr), "Failed to get color key, hr %#x.\n", hr); - ok(ckey.dwColorSpaceLowValue == 0x00000001, "Got unexpected value 0x%08x.\n", ckey.dwColorSpaceLowValue); - ok(ckey.dwColorSpaceHighValue == 0x00000001, "Got unexpected value 0x%08x.\n", ckey.dwColorSpaceHighValue); + ok(SUCCEEDED(hr), "Failed to get color key, hr %#lx.\n", hr); + ok(ckey.dwColorSpaceLowValue == 0x00000001, "Got unexpected value 0x%08lx.\n", ckey.dwColorSpaceLowValue); + ok(ckey.dwColorSpaceHighValue == 0x00000001, "Got unexpected value 0x%08lx.\n", ckey.dwColorSpaceHighValue);
/* DDCKEY_COLORSPACE is ignored if the key is a single value. */ ckey.dwColorSpaceLowValue = 0x00000000; ckey.dwColorSpaceHighValue = 0x00000000; hr = IDirectDrawSurface4_SetColorKey(surface, DDCKEY_SRCBLT | DDCKEY_COLORSPACE, &ckey); - ok(SUCCEEDED(hr), "Failed to set color key, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set color key, hr %#lx.\n", hr);
/* Using it with a range key results in DDERR_NOCOLORKEYHW. */ ckey.dwColorSpaceLowValue = 0x00000001; ckey.dwColorSpaceHighValue = 0x00000000; hr = IDirectDrawSurface4_SetColorKey(surface, DDCKEY_SRCBLT | DDCKEY_COLORSPACE, &ckey); - ok(hr == DDERR_NOCOLORKEYHW, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_NOCOLORKEYHW, "Got unexpected hr %#lx.\n", hr); ckey.dwColorSpaceLowValue = 0x00000000; ckey.dwColorSpaceHighValue = 0x00000001; hr = IDirectDrawSurface4_SetColorKey(surface, DDCKEY_SRCBLT | DDCKEY_COLORSPACE, &ckey); - ok(hr == DDERR_NOCOLORKEYHW, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_NOCOLORKEYHW, "Got unexpected hr %#lx.\n", hr); /* Range destination keys don't work either. */ hr = IDirectDrawSurface4_SetColorKey(surface, DDCKEY_DESTBLT | DDCKEY_COLORSPACE, &ckey); - ok(hr == DDERR_NOCOLORKEYHW, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_NOCOLORKEYHW, "Got unexpected hr %#lx.\n", hr);
/* Just to show it's not because of A, R, and G having equal values. */ ckey.dwColorSpaceLowValue = 0x00000000; ckey.dwColorSpaceHighValue = 0x01010101; hr = IDirectDrawSurface4_SetColorKey(surface, DDCKEY_SRCBLT | DDCKEY_COLORSPACE, &ckey); - ok(hr == DDERR_NOCOLORKEYHW, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_NOCOLORKEYHW, "Got unexpected hr %#lx.\n", hr);
/* None of these operations modified the key. */ hr = IDirectDrawSurface4_GetColorKey(surface, DDCKEY_SRCBLT, &ckey); - ok(SUCCEEDED(hr), "Failed to get color key, hr %#x.\n", hr); - ok(!ckey.dwColorSpaceLowValue, "Got unexpected value 0x%08x.\n", ckey.dwColorSpaceLowValue); - ok(!ckey.dwColorSpaceHighValue, "Got unexpected value 0x%08x.\n", ckey.dwColorSpaceHighValue); + ok(SUCCEEDED(hr), "Failed to get color key, hr %#lx.\n", hr); + ok(!ckey.dwColorSpaceLowValue, "Got unexpected value 0x%08lx.\n", ckey.dwColorSpaceLowValue); + ok(!ckey.dwColorSpaceHighValue, "Got unexpected value 0x%08lx.\n", ckey.dwColorSpaceHighValue);
IDirectDrawSurface4_Release(surface); refcount = IDirectDraw4_Release(ddraw); - ok(!refcount, "Got unexpected refcount %u.\n", refcount); + ok(!refcount, "Got unexpected refcount %lu.\n", refcount); DestroyWindow(window); }
@@ -12554,16 +12554,16 @@ static void test_shademode(void) }
hr = IDirect3DDevice3_GetDirect3D(device, &d3d); - ok(SUCCEEDED(hr), "Failed to get d3d interface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get d3d interface, hr %#lx.\n", hr); hr = IDirect3DDevice3_GetRenderTarget(device, &rt); - ok(SUCCEEDED(hr), "Failed to get render target, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get render target, hr %#lx.\n", hr);
viewport = create_viewport(device, 0, 0, 640, 480); hr = IDirect3DDevice3_SetCurrentViewport(device, viewport); - ok(SUCCEEDED(hr), "Failed to activate the viewport, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to activate the viewport, hr %#lx.\n", hr);
hr = IDirect3DDevice3_SetRenderState(device, D3DRENDERSTATE_FOGENABLE, FALSE); - ok(SUCCEEDED(hr), "Failed to disable fog, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to disable fog, hr %#lx.\n", hr);
memset(&desc, 0, sizeof(desc)); desc.dwSize = sizeof(desc); @@ -12571,21 +12571,21 @@ static void test_shademode(void) desc.dwFVF = D3DFVF_XYZ | D3DFVF_DIFFUSE; desc.dwNumVertices = ARRAY_SIZE(quad_strip); hr = IDirect3D3_CreateVertexBuffer(d3d, &desc, &vb_strip, 0, NULL); - ok(hr == D3D_OK, "Failed to create vertex buffer, hr %#x.\n", hr); + ok(hr == D3D_OK, "Failed to create vertex buffer, hr %#lx.\n", hr); hr = IDirect3DVertexBuffer_Lock(vb_strip, 0, &data, NULL); - ok(hr == D3D_OK, "Failed to lock vertex buffer, hr %#x.\n", hr); + ok(hr == D3D_OK, "Failed to lock vertex buffer, hr %#lx.\n", hr); memcpy(data, quad_strip, sizeof(quad_strip)); hr = IDirect3DVertexBuffer_Unlock(vb_strip); - ok(hr == D3D_OK, "Failed to unlock vertex buffer, hr %#x.\n", hr); + ok(hr == D3D_OK, "Failed to unlock vertex buffer, hr %#lx.\n", hr);
desc.dwNumVertices = ARRAY_SIZE(quad_list); hr = IDirect3D3_CreateVertexBuffer(d3d, &desc, &vb_list, 0, NULL); - ok(hr == D3D_OK, "Failed to create vertex buffer, hr %#x.\n", hr); + ok(hr == D3D_OK, "Failed to create vertex buffer, hr %#lx.\n", hr); hr = IDirect3DVertexBuffer_Lock(vb_list, 0, &data, NULL); - ok(hr == D3D_OK, "Failed to lock vertex buffer, hr %#x.\n", hr); + ok(hr == D3D_OK, "Failed to lock vertex buffer, hr %#lx.\n", hr); memcpy(data, quad_list, sizeof(quad_list)); hr = IDirect3DVertexBuffer_Unlock(vb_list); - ok(hr == D3D_OK, "Failed to unlock vertex buffer, hr %#x.\n", hr); + ok(hr == D3D_OK, "Failed to unlock vertex buffer, hr %#lx.\n", hr);
/* Try it first with a TRIANGLESTRIP. Do it with different geometry because * the color fixups we have to do for FLAT shading will be dependent on that. */ @@ -12593,19 +12593,19 @@ static void test_shademode(void) for (i = 0; i < ARRAY_SIZE(tests); ++i) { hr = IDirect3DViewport3_Clear2(viewport, 1, &clear_rect, D3DCLEAR_TARGET, 0xffffffff, 0.0f, 0); - ok(SUCCEEDED(hr), "Failed to clear viewport, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to clear viewport, hr %#lx.\n", hr);
hr = IDirect3DDevice3_SetRenderState(device, D3DRENDERSTATE_SHADEMODE, tests[i].shademode); - ok(hr == D3D_OK, "Failed to set shade mode, hr %#x.\n", hr); + ok(hr == D3D_OK, "Failed to set shade mode, hr %#lx.\n", hr);
hr = IDirect3DDevice3_BeginScene(device); - ok(SUCCEEDED(hr), "Failed to begin scene, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to begin scene, hr %#lx.\n", hr); buffer = tests[i].primtype == D3DPT_TRIANGLESTRIP ? vb_strip : vb_list; count = tests[i].primtype == D3DPT_TRIANGLESTRIP ? 4 : 6; hr = IDirect3DDevice3_DrawPrimitiveVB(device, tests[i].primtype, buffer, 0, count, 0); - ok(SUCCEEDED(hr), "Failed to draw, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to draw, hr %#lx.\n", hr); hr = IDirect3DDevice3_EndScene(device); - ok(SUCCEEDED(hr), "Failed to end scene, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to end scene, hr %#lx.\n", hr);
color0 = get_surface_color(rt, 100, 100); /* Inside first triangle */ color1 = get_surface_color(rt, 500, 350); /* Inside second triangle */ @@ -12615,9 +12615,9 @@ static void test_shademode(void) * functionality being available. */ /* PHONG should be the same as GOURAUD, since no hardware implements * this. */ - ok(compare_color(color0, tests[i].color0, 1), "Test %u shading has color0 %08x, expected %08x.\n", + ok(compare_color(color0, tests[i].color0, 1), "Test %u shading has color0 %08lx, expected %08lx.\n", i, color0, tests[i].color0); - ok(compare_color(color1, tests[i].color1, 1), "Test %u shading has color1 %08x, expected %08x.\n", + ok(compare_color(color1, tests[i].color1, 1), "Test %u shading has color1 %08lx, expected %08lx.\n", i, color1, tests[i].color1); }
@@ -12627,7 +12627,7 @@ static void test_shademode(void) IDirectDrawSurface4_Release(rt); IDirect3D3_Release(d3d); refcount = IDirect3DDevice3_Release(device); - ok(!refcount, "Device has %u references left.\n", refcount); + ok(!refcount, "Device has %lu references left.\n", refcount); DestroyWindow(window); }
@@ -12688,12 +12688,12 @@ static void test_lockrect_invalid(void) ddraw = create_ddraw(); ok(!!ddraw, "Failed to create a ddraw object.\n"); hr = IDirectDraw4_SetCooperativeLevel(ddraw, window, DDSCL_NORMAL); - ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#lx.\n", hr);
memset(&hal_caps, 0, sizeof(hal_caps)); hal_caps.dwSize = sizeof(hal_caps); hr = IDirectDraw4_GetCaps(ddraw, &hal_caps, NULL); - ok(SUCCEEDED(hr), "Failed to get caps, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get caps, hr %#lx.\n", hr); if ((hal_caps.ddsCaps.dwCaps & needed_caps) != needed_caps || !(hal_caps.ddsCaps.dwCaps & DDSCAPS2_TEXTUREMANAGE)) { @@ -12720,13 +12720,13 @@ static void test_lockrect_invalid(void) hr = IDirectDraw4_CreateSurface(ddraw, &surface_desc, &surface, NULL); if (!resources[r].allowed) { - ok(hr == DDERR_INVALIDCAPS, "Got unexpected hr %#x, type %s.\n", hr, resources[r].name); + ok(hr == DDERR_INVALIDCAPS, "Got unexpected hr %#lx, type %s.\n", hr, resources[r].name); continue; } - ok(SUCCEEDED(hr), "Failed to create surface, hr %#x, type %s.\n", hr, resources[r].name); + ok(SUCCEEDED(hr), "Failed to create surface, hr %#lx, type %s.\n", hr, resources[r].name);
hr = IDirectDrawSurface4_Lock(surface, NULL, NULL, DDLOCK_WAIT, NULL); - ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#x, type %s.\n", hr, resources[r].name); + ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#lx, type %s.\n", hr, resources[r].name);
for (i = 0; i < ARRAY_SIZE(valid); ++i) { @@ -12736,11 +12736,11 @@ static void test_lockrect_invalid(void) surface_desc.dwSize = sizeof(surface_desc);
hr = IDirectDrawSurface4_Lock(surface, rect, &surface_desc, DDLOCK_WAIT, NULL); - ok(SUCCEEDED(hr), "Lock failed (%#x) for rect %s, type %s.\n", + ok(SUCCEEDED(hr), "Lock failed (%#lx) for rect %s, type %s.\n", hr, wine_dbgstr_rect(rect), resources[r].name);
hr = IDirectDrawSurface4_Unlock(surface, NULL); - ok(SUCCEEDED(hr), "Failed to unlock surface, hr %#x, type %s.\n", hr, resources[r].name); + ok(SUCCEEDED(hr), "Failed to unlock surface, hr %#lx, type %s.\n", hr, resources[r].name); }
for (i = 0; i < ARRAY_SIZE(invalid); ++i) @@ -12751,37 +12751,37 @@ static void test_lockrect_invalid(void) surface_desc.dwSize = sizeof(surface_desc);
hr = IDirectDrawSurface4_Lock(surface, rect, &surface_desc, DDLOCK_WAIT, NULL); - ok(hr == resources[r].hr, "Lock returned %#x for rect %s, type %s.\n", + ok(hr == resources[r].hr, "Lock returned %#lx for rect %s, type %s.\n", hr, wine_dbgstr_rect(rect), resources[r].name); if (SUCCEEDED(hr)) { hr = IDirectDrawSurface4_Unlock(surface, NULL); - ok(SUCCEEDED(hr), "Failed to unlock surface, hr %#x, type %s.\n", hr, resources[r].name); + ok(SUCCEEDED(hr), "Failed to unlock surface, hr %#lx, type %s.\n", hr, resources[r].name); } else ok(!surface_desc.lpSurface, "Got unexpected lpSurface %p.\n", surface_desc.lpSurface); }
hr = IDirectDrawSurface4_Lock(surface, NULL, &surface_desc, DDLOCK_WAIT, NULL); - ok(SUCCEEDED(hr), "Lock(rect = NULL) failed, hr %#x, type %s.\n", + ok(SUCCEEDED(hr), "Lock(rect = NULL) failed, hr %#lx, type %s.\n", hr, resources[r].name); hr = IDirectDrawSurface4_Lock(surface, NULL, &surface_desc, DDLOCK_WAIT, NULL); - ok(hr == DDERR_SURFACEBUSY, "Double lock(rect = NULL) returned %#x, type %s.\n", + ok(hr == DDERR_SURFACEBUSY, "Double lock(rect = NULL) returned %#lx, type %s.\n", hr, resources[r].name); hr = IDirectDrawSurface4_Unlock(surface, NULL); - ok(SUCCEEDED(hr), "Failed to unlock surface, hr %#x, type %s.\n", hr, resources[r].name); + ok(SUCCEEDED(hr), "Failed to unlock surface, hr %#lx, type %s.\n", hr, resources[r].name);
hr = IDirectDrawSurface4_Lock(surface, &valid[0], &surface_desc, DDLOCK_WAIT, NULL); - ok(SUCCEEDED(hr), "Lock(rect = %s) failed (%#x).\n", wine_dbgstr_rect(&valid[0]), hr); + ok(SUCCEEDED(hr), "Lock(rect = %s) failed (%#lx).\n", wine_dbgstr_rect(&valid[0]), hr); hr = IDirectDrawSurface4_Lock(surface, &valid[0], &surface_desc, DDLOCK_WAIT, NULL); - ok(hr == DDERR_SURFACEBUSY, "Double lock(rect = %s) failed (%#x).\n", + ok(hr == DDERR_SURFACEBUSY, "Double lock(rect = %s) failed (%#lx).\n", wine_dbgstr_rect(&valid[0]), hr);
/* Locking a different rectangle returns DD_OK, but it seems to break the surface. * Afterwards unlocking the surface fails(NULL rectangle or both locked rectangles) */
hr = IDirectDrawSurface4_Unlock(surface, NULL); - ok(SUCCEEDED(hr), "Failed to unlock surface, hr %#x, type %s.\n", hr, resources[r].name); + ok(SUCCEEDED(hr), "Failed to unlock surface, hr %#lx, type %s.\n", hr, resources[r].name);
IDirectDrawSurface4_Release(surface); } @@ -12806,7 +12806,7 @@ static void test_yv12_overlay(void) ddraw = create_ddraw(); ok(!!ddraw, "Failed to create a ddraw object.\n"); hr = IDirectDraw4_SetCooperativeLevel(ddraw, window, DDSCL_NORMAL); - ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#lx.\n", hr);
if (!(src_surface = create_overlay(ddraw, 256, 256, MAKEFOURCC('Y','V','1','2')))) { @@ -12817,17 +12817,17 @@ static void test_yv12_overlay(void) memset(&desc, 0, sizeof(desc)); desc.dwSize = sizeof(desc); hr = IDirectDrawSurface4_Lock(src_surface, NULL, &desc, DDLOCK_WAIT, NULL); - ok(SUCCEEDED(hr), "Failed to lock surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to lock surface, hr %#lx.\n", hr);
ok(desc.dwFlags == (DDSD_WIDTH | DDSD_HEIGHT | DDSD_PIXELFORMAT | DDSD_CAPS | DDSD_PITCH), - "Got unexpected flags %#x.\n", desc.dwFlags); + "Got unexpected flags %#lx.\n", desc.dwFlags); ok(desc.ddsCaps.dwCaps == (DDSCAPS_OVERLAY | DDSCAPS_VIDEOMEMORY | DDSCAPS_LOCALVIDMEM | DDSCAPS_HWCODEC) || desc.ddsCaps.dwCaps == (DDSCAPS_OVERLAY | DDSCAPS_VIDEOMEMORY | DDSCAPS_LOCALVIDMEM), - "Got unexpected caps %#x.\n", desc.ddsCaps.dwCaps); - ok(desc.dwWidth == 256, "Got unexpected width %u.\n", desc.dwWidth); - ok(desc.dwHeight == 256, "Got unexpected height %u.\n", desc.dwHeight); + "Got unexpected caps %#lx.\n", desc.ddsCaps.dwCaps); + ok(desc.dwWidth == 256, "Got unexpected width %lu.\n", desc.dwWidth); + ok(desc.dwHeight == 256, "Got unexpected height %lu.\n", desc.dwHeight); /* The overlay pitch seems to have 256 byte alignment. */ - ok(!(U1(desc).lPitch & 0xff), "Got unexpected pitch %u.\n", U1(desc).lPitch); + ok(!(U1(desc).lPitch & 0xff), "Got unexpected pitch %lu.\n", U1(desc).lPitch);
/* Fill the surface with some data for the blit test. */ base = desc.lpSurface; @@ -12848,7 +12848,7 @@ static void test_yv12_overlay(void) }
hr = IDirectDrawSurface4_Unlock(src_surface, NULL); - ok(SUCCEEDED(hr), "Failed to unlock surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to unlock surface, hr %#lx.\n", hr);
/* YV12 uses 2x2 blocks with 6 bytes per block (4*Y, 1*U, 1*V). Unlike * other block-based formats like DXT the entire Y channel is stored in @@ -12856,12 +12856,12 @@ static void test_yv12_overlay(void) * locks do not really make sense. Show that they are allowed nevertheless * and the offset points into the luminance data. */ hr = IDirectDrawSurface4_Lock(src_surface, &rect, &desc, DDLOCK_WAIT, NULL); - ok(SUCCEEDED(hr), "Failed to lock surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to lock surface, hr %#lx.\n", hr); offset = ((const unsigned char *)desc.lpSurface - base); - ok(offset == rect.top * U1(desc).lPitch + rect.left, "Got unexpected offset %u, expected %u.\n", + ok(offset == rect.top * U1(desc).lPitch + rect.left, "Got unexpected offset %u, expected %lu.\n", offset, rect.top * U1(desc).lPitch + rect.left); hr = IDirectDrawSurface4_Unlock(src_surface, NULL); - ok(SUCCEEDED(hr), "Failed to unlock surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to unlock surface, hr %#lx.\n", hr);
if (!(dst_surface = create_overlay(ddraw, 256, 256, MAKEFOURCC('Y','V','1','2')))) { @@ -12875,14 +12875,14 @@ static void test_yv12_overlay(void) hr = IDirectDrawSurface4_Blt(dst_surface, NULL, src_surface, NULL, DDBLT_WAIT, NULL); /* VMware rejects YV12 blits. This behavior has not been seen on real * hardware yet, so mark it broken. */ - ok(SUCCEEDED(hr) || broken(hr == E_NOTIMPL), "Failed to blit, hr %#x.\n", hr); + ok(SUCCEEDED(hr) || broken(hr == E_NOTIMPL), "Failed to blit, hr %#lx.\n", hr);
if (SUCCEEDED(hr)) { memset(&desc, 0, sizeof(desc)); desc.dwSize = sizeof(desc); hr = IDirectDrawSurface4_Lock(dst_surface, NULL, &desc, DDLOCK_WAIT, NULL); - ok(SUCCEEDED(hr), "Failed to lock surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to lock surface, hr %#lx.\n", hr);
base = desc.lpSurface; ok(base[0] == 0x10, "Got unexpected Y data 0x%02x.\n", base[0]); @@ -12892,7 +12892,7 @@ static void test_yv12_overlay(void) todo_wine ok(base[0] == 0x30, "Got unexpected U data 0x%02x.\n", base[0]);
hr = IDirectDrawSurface4_Unlock(dst_surface, NULL); - ok(SUCCEEDED(hr), "Failed to unlock surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to unlock surface, hr %#lx.\n", hr); }
IDirectDrawSurface4_Release(dst_surface); @@ -12928,7 +12928,7 @@ static void test_offscreen_overlay(void) ddraw = create_ddraw(); ok(!!ddraw, "Failed to create a ddraw object.\n"); hr = IDirectDraw4_SetCooperativeLevel(ddraw, window, DDSCL_NORMAL); - ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#lx.\n", hr);
if (!(overlay = create_overlay(ddraw, 64, 64, MAKEFOURCC('U','Y','V','Y')))) { @@ -12941,21 +12941,21 @@ static void test_offscreen_overlay(void) surface_desc.dwFlags = DDSD_CAPS; surface_desc.ddsCaps.dwCaps = DDSCAPS_PRIMARYSURFACE; hr = IDirectDraw4_CreateSurface(ddraw, &surface_desc, &primary, NULL); - ok(SUCCEEDED(hr), "Failed to create surface, hr %#x.\n",hr); + ok(SUCCEEDED(hr), "Failed to create surface, hr %#lx.\n",hr);
/* On Windows 7, and probably Vista, UpdateOverlay() will return * DDERR_OUTOFCAPS if the dwm is active. Calling GetDC() on the primary * surface prevents this by disabling the dwm. */ hr = IDirectDrawSurface4_GetDC(primary, &dc); - ok(SUCCEEDED(hr), "Failed to get DC, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get DC, hr %#lx.\n", hr); hr = IDirectDrawSurface4_ReleaseDC(primary, dc); - ok(SUCCEEDED(hr), "Failed to release DC, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to release DC, hr %#lx.\n", hr);
/* Try to overlay a NULL surface. */ hr = IDirectDrawSurface4_UpdateOverlay(overlay, NULL, NULL, NULL, DDOVER_SHOW, NULL); - ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface4_UpdateOverlay(overlay, NULL, NULL, NULL, DDOVER_HIDE, NULL); - ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#lx.\n", hr);
/* Try to overlay an offscreen surface. */ memset(&surface_desc, 0, sizeof(surface_desc)); @@ -12972,18 +12972,18 @@ static void test_offscreen_overlay(void) U3(U4(surface_desc).ddpfPixelFormat).dwGBitMask = 0x07e0; U4(U4(surface_desc).ddpfPixelFormat).dwBBitMask = 0x001f; hr = IDirectDraw4_CreateSurface(ddraw, &surface_desc, &offscreen, NULL); - ok(SUCCEEDED(hr), "Failed to create surface, hr %#x.\n",hr); + ok(SUCCEEDED(hr), "Failed to create surface, hr %#lx.\n",hr);
hr = IDirectDrawSurface4_UpdateOverlay(overlay, NULL, offscreen, NULL, DDOVER_SHOW, NULL); ok(SUCCEEDED(hr) || broken(hr == DDERR_OUTOFCAPS && dwm_enabled()) || broken(hr == E_NOTIMPL && ddraw_is_vmware(ddraw)), - "Failed to update overlay, hr %#x.\n", hr); + "Failed to update overlay, hr %#lx.\n", hr);
/* Try to overlay the primary with a non-overlay surface. */ hr = IDirectDrawSurface4_UpdateOverlay(offscreen, NULL, primary, NULL, DDOVER_SHOW, NULL); - ok(hr == DDERR_NOTAOVERLAYSURFACE, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_NOTAOVERLAYSURFACE, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface4_UpdateOverlay(offscreen, NULL, primary, NULL, DDOVER_HIDE, NULL); - ok(hr == DDERR_NOTAOVERLAYSURFACE, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_NOTAOVERLAYSURFACE, "Got unexpected hr %#lx.\n", hr);
IDirectDrawSurface4_Release(offscreen); IDirectDrawSurface4_Release(primary); @@ -13008,7 +13008,7 @@ static void test_overlay_rect(void) ddraw = create_ddraw(); ok(!!ddraw, "Failed to create a ddraw object.\n"); hr = IDirectDraw4_SetCooperativeLevel(ddraw, window, DDSCL_NORMAL); - ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#lx.\n", hr);
if (!(overlay = create_overlay(ddraw, 64, 64, MAKEFOURCC('U','Y','V','Y')))) { @@ -13021,15 +13021,15 @@ static void test_overlay_rect(void) surface_desc.dwFlags = DDSD_CAPS; surface_desc.ddsCaps.dwCaps = DDSCAPS_PRIMARYSURFACE; hr = IDirectDraw4_CreateSurface(ddraw, &surface_desc, &primary, NULL); - ok(SUCCEEDED(hr), "Failed to create surface, hr %#x.\n",hr); + ok(SUCCEEDED(hr), "Failed to create surface, hr %#lx.\n",hr);
/* On Windows 7, and probably Vista, UpdateOverlay() will return * DDERR_OUTOFCAPS if the dwm is active. Calling GetDC() on the primary * surface prevents this by disabling the dwm. */ hr = IDirectDrawSurface4_GetDC(primary, &dc); - ok(SUCCEEDED(hr), "Failed to get DC, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get DC, hr %#lx.\n", hr); hr = IDirectDrawSurface4_ReleaseDC(primary, dc); - ok(SUCCEEDED(hr), "Failed to release DC, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to release DC, hr %#lx.\n", hr);
/* On Windows 8 and newer DWM can't be turned off, making overlays unusable. */ if (dwm_enabled()) @@ -13042,48 +13042,48 @@ static void test_overlay_rect(void) * used. This is not true in Windows Vista and earlier, but changed in * Windows 7. */ hr = IDirectDrawSurface4_UpdateOverlay(overlay, NULL, primary, &rect, DDOVER_SHOW, NULL); - ok(SUCCEEDED(hr), "Failed to update overlay, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to update overlay, hr %#lx.\n", hr); hr = IDirectDrawSurface4_UpdateOverlay(overlay, NULL, primary, NULL, DDOVER_HIDE, NULL); - ok(SUCCEEDED(hr), "Failed to update overlay, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to update overlay, hr %#lx.\n", hr); hr = IDirectDrawSurface4_UpdateOverlay(overlay, NULL, primary, NULL, DDOVER_SHOW, NULL); - ok(hr == DD_OK || hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK || hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#lx.\n", hr);
/* Show that the overlay position is the (top, left) coordinate of the * destination rectangle. */ OffsetRect(&rect, 32, 16); hr = IDirectDrawSurface4_UpdateOverlay(overlay, NULL, primary, &rect, DDOVER_SHOW, NULL); - ok(SUCCEEDED(hr), "Failed to update overlay, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to update overlay, hr %#lx.\n", hr); pos_x = -1; pos_y = -1; hr = IDirectDrawSurface4_GetOverlayPosition(overlay, &pos_x, &pos_y); - ok(SUCCEEDED(hr), "Failed to get overlay position, hr %#x.\n", hr); - ok(pos_x == rect.left, "Got unexpected pos_x %d, expected %d.\n", pos_x, rect.left); - ok(pos_y == rect.top, "Got unexpected pos_y %d, expected %d.\n", pos_y, rect.top); + ok(SUCCEEDED(hr), "Failed to get overlay position, hr %#lx.\n", hr); + ok(pos_x == rect.left, "Got unexpected pos_x %ld, expected %ld.\n", pos_x, rect.left); + ok(pos_y == rect.top, "Got unexpected pos_y %ld, expected %ld.\n", pos_y, rect.top);
/* Passing a NULL dest rect sets the position to 0/0. Visually it can be * seen that the overlay overlays the whole primary(==screen). */ hr2 = IDirectDrawSurface4_UpdateOverlay(overlay, NULL, primary, NULL, 0, NULL); - ok(hr2 == DD_OK || hr2 == DDERR_INVALIDPARAMS || hr2 == DDERR_OUTOFCAPS, "Got unexpected hr %#x.\n", hr2); + ok(hr2 == DD_OK || hr2 == DDERR_INVALIDPARAMS || hr2 == DDERR_OUTOFCAPS, "Got unexpected hr %#lx.\n", hr2); hr = IDirectDrawSurface4_GetOverlayPosition(overlay, &pos_x, &pos_y); - ok(SUCCEEDED(hr), "Failed to get overlay position, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get overlay position, hr %#lx.\n", hr); if (SUCCEEDED(hr2)) { - ok(!pos_x, "Got unexpected pos_x %d.\n", pos_x); - ok(!pos_y, "Got unexpected pos_y %d.\n", pos_y); + ok(!pos_x, "Got unexpected pos_x %ld.\n", pos_x); + ok(!pos_y, "Got unexpected pos_y %ld.\n", pos_y); } else { - ok(pos_x == 32, "Got unexpected pos_x %d.\n", pos_x); - ok(pos_y == 16, "Got unexpected pos_y %d.\n", pos_y); + ok(pos_x == 32, "Got unexpected pos_x %ld.\n", pos_x); + ok(pos_y == 16, "Got unexpected pos_y %ld.\n", pos_y); }
/* The position cannot be retrieved when the overlay is not shown. */ hr = IDirectDrawSurface4_UpdateOverlay(overlay, NULL, primary, &rect, DDOVER_HIDE, NULL); - ok(SUCCEEDED(hr), "Failed to update overlay, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to update overlay, hr %#lx.\n", hr); pos_x = -1; pos_y = -1; hr = IDirectDrawSurface4_GetOverlayPosition(overlay, &pos_x, &pos_y); - ok(hr == DDERR_OVERLAYNOTVISIBLE, "Got unexpected hr %#x.\n", hr); - ok(!pos_x, "Got unexpected pos_x %d.\n", pos_x); - ok(!pos_y, "Got unexpected pos_y %d.\n", pos_y); + ok(hr == DDERR_OVERLAYNOTVISIBLE, "Got unexpected hr %#lx.\n", hr); + ok(!pos_x, "Got unexpected pos_x %ld.\n", pos_x); + ok(!pos_y, "Got unexpected pos_y %ld.\n", pos_y);
done: if (primary) @@ -13135,12 +13135,12 @@ static void test_blt(void) }
hr = IDirect3DDevice3_GetDirect3D(device, &d3d); - ok(SUCCEEDED(hr), "Failed to get Direct3D3 interface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get Direct3D3 interface, hr %#lx.\n", hr); hr = IDirect3D3_QueryInterface(d3d, &IID_IDirectDraw4, (void **)&ddraw); - ok(SUCCEEDED(hr), "Failed to get DirectDraw4 interface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get DirectDraw4 interface, hr %#lx.\n", hr); IDirect3D3_Release(d3d); hr = IDirect3DDevice3_GetRenderTarget(device, &rt); - ok(SUCCEEDED(hr), "Failed to get render target, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get render target, hr %#lx.\n", hr);
memset(&surface_desc, 0, sizeof(surface_desc)); surface_desc.dwSize = sizeof(surface_desc); @@ -13149,37 +13149,37 @@ static void test_blt(void) surface_desc.dwHeight = 480; surface_desc.ddsCaps.dwCaps = DDSCAPS_OFFSCREENPLAIN; hr = IDirectDraw4_CreateSurface(ddraw, &surface_desc, &surface, NULL); - ok(SUCCEEDED(hr), "Failed to create surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create surface, hr %#lx.\n", hr);
hr = IDirectDrawSurface4_Blt(surface, NULL, surface, NULL, 0, NULL); - ok(SUCCEEDED(hr), "Failed to blit, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to blit, hr %#lx.\n", hr);
hr = IDirectDrawSurface4_Blt(surface, NULL, rt, NULL, 0, NULL); - ok(SUCCEEDED(hr), "Failed to blit, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to blit, hr %#lx.\n", hr);
for (i = 0; i < ARRAY_SIZE(test_data); ++i) { hr = IDirectDrawSurface4_Blt(surface, &test_data[i].dst_rect, surface, &test_data[i].src_rect, DDBLT_WAIT, NULL); - ok(hr == test_data[i].hr, "Test %u: Got unexpected hr %#x, expected %#x.\n", i, hr, test_data[i].hr); + ok(hr == test_data[i].hr, "Test %u: Got unexpected hr %#lx, expected %#lx.\n", i, hr, test_data[i].hr);
hr = IDirectDrawSurface4_Blt(surface, &test_data[i].dst_rect, rt, &test_data[i].src_rect, DDBLT_WAIT, NULL); - ok(hr == test_data[i].hr, "Test %u: Got unexpected hr %#x, expected %#x.\n", i, hr, test_data[i].hr); + ok(hr == test_data[i].hr, "Test %u: Got unexpected hr %#lx, expected %#lx.\n", i, hr, test_data[i].hr);
hr = IDirectDrawSurface4_Blt(surface, &test_data[i].dst_rect, NULL, &test_data[i].src_rect, DDBLT_WAIT, NULL); - ok(hr == DDERR_INVALIDPARAMS, "Test %u: Got unexpected hr %#x.\n", i, hr); + ok(hr == DDERR_INVALIDPARAMS, "Test %u: Got unexpected hr %#lx.\n", i, hr);
hr = IDirectDrawSurface4_Blt(surface, &test_data[i].dst_rect, NULL, NULL, DDBLT_WAIT, NULL); - ok(hr == DDERR_INVALIDPARAMS, "Test %u: Got unexpected hr %#x.\n", i, hr); + ok(hr == DDERR_INVALIDPARAMS, "Test %u: Got unexpected hr %#lx.\n", i, hr); }
IDirectDrawSurface4_Release(surface); IDirectDrawSurface4_Release(rt); IDirectDraw4_Release(ddraw); refcount = IDirect3DDevice3_Release(device); - ok(!refcount, "Device has %u references left.\n", refcount); + ok(!refcount, "Device has %lu references left.\n", refcount); DestroyWindow(window); }
@@ -13220,7 +13220,7 @@ static void test_blt_z_alpha(void) ddraw = create_ddraw(); ok(!!ddraw, "Failed to create a ddraw object.\n"); hr = IDirectDraw4_SetCooperativeLevel(ddraw, window, DDSCL_NORMAL); - ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#lx.\n", hr);
memset(&pf, 0, sizeof(pf)); pf.dwSize = sizeof(pf); @@ -13240,9 +13240,9 @@ static void test_blt_z_alpha(void) surface_desc.ddsCaps.dwCaps = DDSCAPS_OFFSCREENPLAIN;
hr = IDirectDraw4_CreateSurface(ddraw, &surface_desc, &src_surface, NULL); - ok(SUCCEEDED(hr), "Failed to create source surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create source surface, hr %#lx.\n", hr); hr = IDirectDraw4_CreateSurface(ddraw, &surface_desc, &dst_surface, NULL); - ok(SUCCEEDED(hr), "Failed to create destination surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create destination surface, hr %#lx.\n", hr);
memset(&fx, 0, sizeof(fx)); fx.dwSize = sizeof(fx); @@ -13262,23 +13262,23 @@ static void test_blt_z_alpha(void) { U5(fx).dwFillColor = 0x3300ff00; hr = IDirectDrawSurface4_Blt(src_surface, NULL, NULL, NULL, DDBLT_COLORFILL | DDBLT_WAIT, &fx); - ok(SUCCEEDED(hr), "Test %u: Got unexpected hr %#x.\n", i, hr); + ok(SUCCEEDED(hr), "Test %u: Got unexpected hr %#lx.\n", i, hr);
U5(fx).dwFillColor = 0xccff0000; hr = IDirectDrawSurface4_Blt(dst_surface, NULL, NULL, NULL, DDBLT_COLORFILL | DDBLT_WAIT, &fx); - ok(SUCCEEDED(hr), "Test %u: Got unexpected hr %#x.\n", i, hr); + ok(SUCCEEDED(hr), "Test %u: Got unexpected hr %#lx.\n", i, hr);
hr = IDirectDrawSurface4_Blt(dst_surface, NULL, src_surface, NULL, blt_flags[i] | DDBLT_WAIT, &fx); - ok(SUCCEEDED(hr), "Test %u: Got unexpected hr %#x.\n", i, hr); + ok(SUCCEEDED(hr), "Test %u: Got unexpected hr %#lx.\n", i, hr);
color = get_surface_color(dst_surface, 32, 32); - ok(compare_color(color, 0x0000ff00, 0), "Test %u: Got unexpected color 0x%08x.\n", i, color); + ok(compare_color(color, 0x0000ff00, 0), "Test %u: Got unexpected color 0x%08lx.\n", i, color); }
IDirectDrawSurface4_Release(dst_surface); IDirectDrawSurface4_Release(src_surface); refcount = IDirectDraw4_Release(ddraw); - ok(!refcount, "DirectDraw has %u references left.\n", refcount); + ok(!refcount, "DirectDraw has %lu references left.\n", refcount); DestroyWindow(window); }
@@ -13314,15 +13314,15 @@ static void test_cross_device_blt(void) }
hr = IDirect3DDevice3_GetDirect3D(device, &d3d); - ok(SUCCEEDED(hr), "Failed to get Direct3D3 interface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get Direct3D3 interface, hr %#lx.\n", hr); hr = IDirect3D3_QueryInterface(d3d, &IID_IDirectDraw4, (void **)&ddraw); - ok(SUCCEEDED(hr), "Failed to get DirectDraw4 interface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get DirectDraw4 interface, hr %#lx.\n", hr); IDirect3D3_Release(d3d);
hr = IDirect3DDevice3_GetDirect3D(device2, &d3d); - ok(SUCCEEDED(hr), "Failed to get Direct3D3 interface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get Direct3D3 interface, hr %#lx.\n", hr); hr = IDirect3D3_QueryInterface(d3d, &IID_IDirectDraw4, (void **)&ddraw2); - ok(SUCCEEDED(hr), "Failed to get DirectDraw4 interface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get DirectDraw4 interface, hr %#lx.\n", hr); IDirect3D3_Release(d3d);
memset(&surface_desc, 0, sizeof(surface_desc)); @@ -13332,7 +13332,7 @@ static void test_cross_device_blt(void) surface_desc.dwHeight = 480; surface_desc.ddsCaps.dwCaps = DDSCAPS_OFFSCREENPLAIN | DDSCAPS_SYSTEMMEMORY; hr = IDirectDraw4_CreateSurface(ddraw, &surface_desc, &sysmem_surface, NULL); - ok(SUCCEEDED(hr), "Failed to create surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create surface, hr %#lx.\n", hr);
memset(&surface_desc, 0, sizeof(surface_desc)); surface_desc.dwSize = sizeof(surface_desc); @@ -13340,7 +13340,7 @@ static void test_cross_device_blt(void) surface_desc.ddsCaps.dwCaps = DDSCAPS_PRIMARYSURFACE | DDSCAPS_COMPLEX | DDSCAPS_FLIP | DDSCAPS_VIDEOMEMORY; U5(surface_desc).dwBackBufferCount = 2; hr = IDirectDraw4_CreateSurface(ddraw, &surface_desc, &surface, NULL); - ok(SUCCEEDED(hr), "Failed to create surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create surface, hr %#lx.\n", hr);
memset(&surface_desc, 0, sizeof(surface_desc)); surface_desc.dwSize = sizeof(surface_desc); @@ -13355,37 +13355,37 @@ static void test_cross_device_blt(void) U3(U4(surface_desc).ddpfPixelFormat).dwGBitMask = 0x000003e0; U4(U4(surface_desc).ddpfPixelFormat).dwBBitMask = 0x0000001f; hr = IDirectDraw4_CreateSurface(ddraw2, &surface_desc, &surface2, NULL); - ok(SUCCEEDED(hr), "Failed to create surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create surface, hr %#lx.\n", hr);
memset(&fx, 0, sizeof(fx)); fx.dwSize = sizeof(fx); U5(fx).dwFillColor = 0xff0000ff; hr = IDirectDrawSurface4_Blt(surface2, NULL, NULL, NULL, DDBLT_COLORFILL | DDBLT_WAIT, &fx); - ok(SUCCEEDED(hr), "Failed to fill surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to fill surface, hr %#lx.\n", hr);
hr = IDirectDrawSurface4_Blt(surface, NULL, surface2, NULL, DDBLT_WAIT, NULL); - ok(hr == E_NOTIMPL, "Got unexpected hr %#x.\n", hr); + ok(hr == E_NOTIMPL, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface4_Flip(surface, NULL, DDFLIP_WAIT); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface4_Blt(surface, NULL, surface2, NULL, DDBLT_WAIT, NULL); - ok(hr == E_NOTIMPL, "Got unexpected hr %#x.\n", hr); + ok(hr == E_NOTIMPL, "Got unexpected hr %#lx.\n", hr); color = get_surface_color(surface, 320, 240); - ok(color == 0x00000000, "Got unexpected color 0x%08x.\n", color); + ok(color == 0x00000000, "Got unexpected color 0x%08lx.\n", color);
hr = IDirectDrawSurface4_Blt(sysmem_surface, NULL, surface2, NULL, DDBLT_WAIT, NULL); - ok(hr == E_NOTIMPL, "Got unexpected hr %#x.\n", hr); + ok(hr == E_NOTIMPL, "Got unexpected hr %#lx.\n", hr); color = get_surface_color(sysmem_surface, 320, 240); - ok(color == 0x00000000, "Got unexpected color 0x%08x.\n", color); + ok(color == 0x00000000, "Got unexpected color 0x%08lx.\n", color);
hr = IDirectDraw4_SetCooperativeLevel(ddraw, window, DDSCL_NORMAL); - ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#lx.\n", hr); hr = IDirectDrawSurface4_IsLost(sysmem_surface); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
hr = IDirectDrawSurface4_Blt(sysmem_surface, NULL, surface2, NULL, DDBLT_WAIT, NULL); - ok(hr == E_NOTIMPL, "Got unexpected hr %#x.\n", hr); + ok(hr == E_NOTIMPL, "Got unexpected hr %#lx.\n", hr); color = get_surface_color(sysmem_surface, 320, 240); - ok(color == 0x00000000, "Got unexpected color 0x%08x.\n", color); + ok(color == 0x00000000, "Got unexpected color 0x%08lx.\n", color);
IDirectDrawSurface4_Release(surface2); memset(&surface_desc, 0, sizeof(surface_desc)); @@ -13395,14 +13395,14 @@ static void test_cross_device_blt(void) surface_desc.dwHeight = 480; surface_desc.ddsCaps.dwCaps = DDSCAPS_OFFSCREENPLAIN | DDSCAPS_SYSTEMMEMORY; hr = IDirectDraw4_CreateSurface(ddraw2, &surface_desc, &surface2, NULL); - ok(SUCCEEDED(hr), "Failed to create surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create surface, hr %#lx.\n", hr); hr = IDirectDrawSurface4_Blt(surface2, NULL, NULL, NULL, DDBLT_COLORFILL | DDBLT_WAIT, &fx); - ok(SUCCEEDED(hr), "Failed to fill surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to fill surface, hr %#lx.\n", hr);
hr = IDirectDrawSurface4_Blt(sysmem_surface, NULL, surface2, NULL, DDBLT_WAIT, NULL); - todo_wine ok(hr == D3D_OK, "Failed to blit, hr %#x.\n", hr); + todo_wine ok(hr == D3D_OK, "Failed to blit, hr %#lx.\n", hr); color = get_surface_color(sysmem_surface, 320, 240); - todo_wine ok(compare_color(color, 0x000000ff, 1), "Got unexpected color 0x%08x.\n", color); + todo_wine ok(compare_color(color, 0x000000ff, 1), "Got unexpected color 0x%08lx.\n", color);
IDirectDrawSurface4_Release(surface); IDirectDrawSurface4_Release(surface2); @@ -13410,9 +13410,9 @@ static void test_cross_device_blt(void) IDirectDraw4_Release(ddraw); IDirectDraw4_Release(ddraw2); refcount = IDirect3DDevice3_Release(device); - ok(!refcount, "Device has %u references left.\n", refcount); + ok(!refcount, "Device has %lu references left.\n", refcount); refcount = IDirect3DDevice3_Release(device2); - ok(!refcount, "Device has %u references left.\n", refcount); + ok(!refcount, "Device has %lu references left.\n", refcount); DestroyWindow(window); DestroyWindow(window2); } @@ -13451,61 +13451,61 @@ static void test_color_clamping(void) }
hr = IDirect3DDevice3_GetRenderTarget(device, &rt); - ok(SUCCEEDED(hr), "Failed to get render target, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get render target, hr %#lx.\n", hr);
viewport = create_viewport(device, 0, 0, 640, 480); hr = IDirect3DDevice3_SetCurrentViewport(device, viewport); - ok(SUCCEEDED(hr), "Failed to activate the viewport, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to activate the viewport, hr %#lx.\n", hr);
hr = IDirect3DDevice3_SetTransform(device, D3DTRANSFORMSTATE_WORLD, &mat); - ok(SUCCEEDED(hr), "Failed to set world transform, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set world transform, hr %#lx.\n", hr); hr = IDirect3DDevice3_SetTransform(device, D3DTRANSFORMSTATE_VIEW, &mat); - ok(SUCCEEDED(hr), "Failed to set view transform, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set view transform, hr %#lx.\n", hr); hr = IDirect3DDevice3_SetTransform(device, D3DTRANSFORMSTATE_PROJECTION, &mat); - ok(SUCCEEDED(hr), "Failed to set projection transform, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set projection transform, hr %#lx.\n", hr); hr = IDirect3DDevice3_SetRenderState(device, D3DRENDERSTATE_ZENABLE, FALSE); - ok(SUCCEEDED(hr), "Failed to disable Z test, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to disable Z test, hr %#lx.\n", hr); hr = IDirect3DDevice3_SetRenderState(device, D3DRENDERSTATE_FOGENABLE, FALSE); - ok(SUCCEEDED(hr), "Failed to disable fog, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to disable fog, hr %#lx.\n", hr); hr = IDirect3DDevice3_SetRenderState(device, D3DRENDERSTATE_STENCILENABLE, FALSE); - ok(SUCCEEDED(hr), "Failed to disable stencil test, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to disable stencil test, hr %#lx.\n", hr); hr = IDirect3DDevice3_SetRenderState(device, D3DRENDERSTATE_CULLMODE, D3DCULL_NONE); - ok(SUCCEEDED(hr), "Failed to disable culling, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to disable culling, hr %#lx.\n", hr);
hr = IDirect3DDevice3_SetRenderState(device, D3DRENDERSTATE_TEXTUREFACTOR, 0xff404040); - ok(SUCCEEDED(hr), "Failed to set texture factor, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set texture factor, hr %#lx.\n", hr); hr = IDirect3DDevice3_SetTextureStageState(device, 0, D3DTSS_COLOROP, D3DTOP_ADD); - ok(SUCCEEDED(hr), "Failed to set color op, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set color op, hr %#lx.\n", hr); hr = IDirect3DDevice3_SetTextureStageState(device, 0, D3DTSS_COLORARG1, D3DTA_DIFFUSE); - ok(SUCCEEDED(hr), "Failed to set color arg, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set color arg, hr %#lx.\n", hr); hr = IDirect3DDevice3_SetTextureStageState(device, 0, D3DTSS_COLORARG2, D3DTA_SPECULAR); - ok(SUCCEEDED(hr), "Failed to set color arg, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set color arg, hr %#lx.\n", hr); hr = IDirect3DDevice3_SetTextureStageState(device, 1, D3DTSS_COLOROP, D3DTOP_MODULATE); - ok(SUCCEEDED(hr), "Failed to set color op, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set color op, hr %#lx.\n", hr); hr = IDirect3DDevice3_SetTextureStageState(device, 1, D3DTSS_COLORARG1, D3DTA_TFACTOR); - ok(SUCCEEDED(hr), "Failed to set color arg, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set color arg, hr %#lx.\n", hr); hr = IDirect3DDevice3_SetTextureStageState(device, 1, D3DTSS_COLORARG2, D3DTA_CURRENT); - ok(SUCCEEDED(hr), "Failed to set color arg, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set color arg, hr %#lx.\n", hr);
hr = IDirect3DViewport3_Clear2(viewport, 1, &clear_rect, D3DCLEAR_TARGET, 0xff00ff00, 0.0f, 0); - ok(SUCCEEDED(hr), "Failed to clear viewport, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to clear viewport, hr %#lx.\n", hr);
hr = IDirect3DDevice3_BeginScene(device); - ok(SUCCEEDED(hr), "Failed to begin scene, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to begin scene, hr %#lx.\n", hr);
hr = IDirect3DDevice3_DrawPrimitive(device, D3DPT_TRIANGLESTRIP, D3DFVF_XYZ, quad, 4, 0); - ok(SUCCEEDED(hr), "Failed to draw, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to draw, hr %#lx.\n", hr);
hr = IDirect3DDevice3_EndScene(device); - ok(SUCCEEDED(hr), "Failed to end scene, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to end scene, hr %#lx.\n", hr);
color = get_surface_color(rt, 320, 240); - ok(compare_color(color, 0x00404040, 1), "Got unexpected color 0x%08x.\n", color); + ok(compare_color(color, 0x00404040, 1), "Got unexpected color 0x%08lx.\n", color);
destroy_viewport(device, viewport); IDirectDrawSurface4_Release(rt); refcount = IDirect3DDevice3_Release(device); - ok(!refcount, "Device has %u references left.\n", refcount); + ok(!refcount, "Device has %lu references left.\n", refcount); DestroyWindow(window); }
@@ -13577,11 +13577,11 @@ static void test_getdc(void) ddraw = create_ddraw(); ok(!!ddraw, "Failed to create a ddraw object.\n"); hr = IDirectDraw4_SetCooperativeLevel(ddraw, window, DDSCL_NORMAL); - ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#lx.\n", hr);
surface_desc.dwSize = sizeof(surface_desc); hr = IDirectDraw4_GetDisplayMode(ddraw, &surface_desc); - ok(SUCCEEDED(hr), "Failed to get display mode, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get display mode, hr %#lx.\n", hr); screen_bpp = U1(U4(surface_desc).ddpfPixelFormat).dwRGBBitCount;
for (i = 0; i < ARRAY_SIZE(test_data); ++i) @@ -13600,7 +13600,7 @@ static void test_getdc(void) surface_desc.ddsCaps.dwCaps2 = DDSCAPS2_TEXTUREMANAGE; if (FAILED(hr = IDirectDraw4_CreateSurface(ddraw, &surface_desc, &surface, NULL))) { - skip("Failed to create surface for format %s (hr %#x), skipping tests.\n", test_data[i].name, hr); + skip("Failed to create surface for format %s (hr %#lx), skipping tests.\n", test_data[i].name, hr); continue; } } @@ -13609,9 +13609,9 @@ static void test_getdc(void) hr = IDirectDrawSurface4_GetDC(surface, &dc); if (test_data[i].getdc_supported) ok(SUCCEEDED(hr) || broken(hr == test_data[i].alt_result), - "Got unexpected hr %#x for format %s.\n", hr, test_data[i].name); + "Got unexpected hr %#lx for format %s.\n", hr, test_data[i].name); else - ok(FAILED(hr), "Got unexpected hr %#x for format %s.\n", hr, test_data[i].name); + ok(FAILED(hr), "Got unexpected hr %#lx for format %s.\n", hr, test_data[i].name);
if (SUCCEEDED(hr)) { @@ -13622,10 +13622,10 @@ static void test_getdc(void) int size;
type = GetObjectType(dc); - ok(type == OBJ_MEMDC, "Got unexpected object type %#x for format %s.\n", type, test_data[i].name); + ok(type == OBJ_MEMDC, "Got unexpected object type %#lx for format %s.\n", type, test_data[i].name); bitmap = GetCurrentObject(dc, OBJ_BITMAP); type = GetObjectType(bitmap); - ok(type == OBJ_BITMAP, "Got unexpected object type %#x for format %s.\n", type, test_data[i].name); + ok(type == OBJ_BITMAP, "Got unexpected object type %#lx for format %s.\n", type, test_data[i].name);
size = GetObjectA(bitmap, sizeof(dib), &dib); ok(size == sizeof(dib), "Got unexpected size %d for format %s.\n", size, test_data[i].name); @@ -13649,11 +13649,11 @@ static void test_getdc(void) ok(!!dib.dsBm.bmBits || broken(!pDwmIsCompositionEnabled && dib.dsBm.bmBitsPixel == screen_bpp), "Got unexpected bits %p for format %s.\n", dib.dsBm.bmBits, test_data[i].name);
- ok(dib.dsBmih.biSize == sizeof(dib.dsBmih), "Got unexpected size %u for format %s.\n", + ok(dib.dsBmih.biSize == sizeof(dib.dsBmih), "Got unexpected size %lu for format %s.\n", dib.dsBmih.biSize, test_data[i].name); - ok(dib.dsBmih.biWidth == surface_desc.dwWidth, "Got unexpected width %d for format %s.\n", + ok(dib.dsBmih.biWidth == surface_desc.dwWidth, "Got unexpected width %ld for format %s.\n", dib.dsBmih.biHeight, test_data[i].name); - ok(dib.dsBmih.biHeight == surface_desc.dwHeight, "Got unexpected height %d for format %s.\n", + ok(dib.dsBmih.biHeight == surface_desc.dwHeight, "Got unexpected height %ld for format %s.\n", dib.dsBmih.biHeight, test_data[i].name); ok(dib.dsBmih.biPlanes == 1, "Got unexpected plane count %u for format %s.\n", dib.dsBmih.biPlanes, test_data[i].name); @@ -13662,17 +13662,17 @@ static void test_getdc(void) dib.dsBmih.biBitCount, test_data[i].name); ok(dib.dsBmih.biCompression == (U1(test_data[i].format).dwRGBBitCount == 16 ? BI_BITFIELDS : BI_RGB) || broken(U1(test_data[i].format).dwRGBBitCount == 32 && dib.dsBmih.biCompression == BI_BITFIELDS), - "Got unexpected compression %#x for format %s.\n", + "Got unexpected compression %#lx for format %s.\n", dib.dsBmih.biCompression, test_data[i].name); - ok(!dib.dsBmih.biSizeImage, "Got unexpected image size %u for format %s.\n", + ok(!dib.dsBmih.biSizeImage, "Got unexpected image size %lu for format %s.\n", dib.dsBmih.biSizeImage, test_data[i].name); - ok(!dib.dsBmih.biXPelsPerMeter, "Got unexpected horizontal resolution %d for format %s.\n", + ok(!dib.dsBmih.biXPelsPerMeter, "Got unexpected horizontal resolution %ld for format %s.\n", dib.dsBmih.biXPelsPerMeter, test_data[i].name); - ok(!dib.dsBmih.biYPelsPerMeter, "Got unexpected vertical resolution %d for format %s.\n", + ok(!dib.dsBmih.biYPelsPerMeter, "Got unexpected vertical resolution %ld for format %s.\n", dib.dsBmih.biYPelsPerMeter, test_data[i].name); - ok(!dib.dsBmih.biClrUsed, "Got unexpected used colour count %u for format %s.\n", + ok(!dib.dsBmih.biClrUsed, "Got unexpected used colour count %lu for format %s.\n", dib.dsBmih.biClrUsed, test_data[i].name); - ok(!dib.dsBmih.biClrImportant, "Got unexpected important colour count %u for format %s.\n", + ok(!dib.dsBmih.biClrImportant, "Got unexpected important colour count %lu for format %s.\n", dib.dsBmih.biClrImportant, test_data[i].name);
if (dib.dsBmih.biCompression == BI_BITFIELDS) @@ -13681,20 +13681,20 @@ static void test_getdc(void) && dib.dsBitfields[1] == U3(test_data[i].format).dwGBitMask && dib.dsBitfields[2] == U4(test_data[i].format).dwBBitMask) || broken(!dib.dsBitfields[0] && !dib.dsBitfields[1] && !dib.dsBitfields[2]), - "Got unexpected colour masks 0x%08x 0x%08x 0x%08x for format %s.\n", + "Got unexpected colour masks 0x%08lx 0x%08lx 0x%08lx for format %s.\n", dib.dsBitfields[0], dib.dsBitfields[1], dib.dsBitfields[2], test_data[i].name); } else { ok(!dib.dsBitfields[0] && !dib.dsBitfields[1] && !dib.dsBitfields[2], - "Got unexpected colour masks 0x%08x 0x%08x 0x%08x for format %s.\n", + "Got unexpected colour masks 0x%08lx 0x%08lx 0x%08lx for format %s.\n", dib.dsBitfields[0], dib.dsBitfields[1], dib.dsBitfields[2], test_data[i].name); } ok(!dib.dshSection, "Got unexpected section %p for format %s.\n", dib.dshSection, test_data[i].name); - ok(!dib.dsOffset, "Got unexpected offset %u for format %s.\n", dib.dsOffset, test_data[i].name); + ok(!dib.dsOffset, "Got unexpected offset %lu for format %s.\n", dib.dsOffset, test_data[i].name);
hr = IDirectDrawSurface4_ReleaseDC(surface, dc); - ok(hr == DD_OK, "Failed to release DC for format %s, hr %#x.\n", test_data[i].name, hr); + ok(hr == DD_OK, "Failed to release DC for format %s, hr %#lx.\n", test_data[i].name, hr); } else { @@ -13710,147 +13710,147 @@ static void test_getdc(void) surface_desc.ddsCaps.dwCaps2 = DDSCAPS2_TEXTUREMANAGE; if (FAILED(hr = IDirectDraw4_CreateSurface(ddraw, &surface_desc, &surface, NULL))) { - skip("Failed to create mip-mapped texture for format %s (hr %#x), skipping tests.\n", + skip("Failed to create mip-mapped texture for format %s (hr %#lx), skipping tests.\n", test_data[i].name, hr); continue; }
hr = IDirectDrawSurface4_GetAttachedSurface(surface, &caps, &tmp); - ok(SUCCEEDED(hr), "Failed to get attached surface for format %s, hr %#x.\n", test_data[i].name, hr); + ok(SUCCEEDED(hr), "Failed to get attached surface for format %s, hr %#lx.\n", test_data[i].name, hr); hr = IDirectDrawSurface4_GetAttachedSurface(tmp, &caps, &surface2); - ok(SUCCEEDED(hr), "Failed to get attached surface for format %s, hr %#x.\n", test_data[i].name, hr); + ok(SUCCEEDED(hr), "Failed to get attached surface for format %s, hr %#lx.\n", test_data[i].name, hr); IDirectDrawSurface4_Release(tmp);
hr = IDirectDrawSurface4_GetDC(surface, &dc); - ok(SUCCEEDED(hr), "Failed to get DC for format %s, hr %#x.\n", test_data[i].name, hr); + ok(SUCCEEDED(hr), "Failed to get DC for format %s, hr %#lx.\n", test_data[i].name, hr); hr = IDirectDrawSurface4_ReleaseDC(surface, dc); - ok(SUCCEEDED(hr), "Failed to release DC for format %s, hr %#x.\n", test_data[i].name, hr); + ok(SUCCEEDED(hr), "Failed to release DC for format %s, hr %#lx.\n", test_data[i].name, hr); hr = IDirectDrawSurface4_GetDC(surface2, &dc); - ok(SUCCEEDED(hr), "Failed to get DC for format %s, hr %#x.\n", test_data[i].name, hr); + ok(SUCCEEDED(hr), "Failed to get DC for format %s, hr %#lx.\n", test_data[i].name, hr); hr = IDirectDrawSurface4_ReleaseDC(surface2, dc); - ok(SUCCEEDED(hr), "Failed to release DC for format %s, hr %#x.\n", test_data[i].name, hr); + ok(SUCCEEDED(hr), "Failed to release DC for format %s, hr %#lx.\n", test_data[i].name, hr);
hr = IDirectDrawSurface4_GetDC(surface, &dc); - ok(SUCCEEDED(hr), "Failed to get DC for format %s, hr %#x.\n", test_data[i].name, hr); + ok(SUCCEEDED(hr), "Failed to get DC for format %s, hr %#lx.\n", test_data[i].name, hr); dc2 = (void *)0x1234; hr = IDirectDrawSurface4_GetDC(surface, &dc2); - ok(hr == DDERR_DCALREADYCREATED, "Got unexpected hr %#x for format %s.\n", hr, test_data[i].name); + ok(hr == DDERR_DCALREADYCREATED, "Got unexpected hr %#lx for format %s.\n", hr, test_data[i].name); ok(dc2 == (void *)0x1234, "Got unexpected dc %p for format %s.\n", dc, test_data[i].name); hr = IDirectDrawSurface4_ReleaseDC(surface, dc); - ok(SUCCEEDED(hr), "Failed to release DC for format %s, hr %#x.\n", test_data[i].name, hr); + ok(SUCCEEDED(hr), "Failed to release DC for format %s, hr %#lx.\n", test_data[i].name, hr); hr = IDirectDrawSurface4_ReleaseDC(surface, dc); - ok(hr == DDERR_NODC, "Got unexpected hr %#x for format %s.\n", hr, test_data[i].name); + ok(hr == DDERR_NODC, "Got unexpected hr %#lx for format %s.\n", hr, test_data[i].name);
map_desc.dwSize = sizeof(map_desc); hr = IDirectDrawSurface4_Lock(surface, NULL, &map_desc, DDLOCK_READONLY | DDLOCK_WAIT, NULL); - ok(SUCCEEDED(hr), "Failed to map surface for format %s, hr %#x.\n", test_data[i].name, hr); + ok(SUCCEEDED(hr), "Failed to map surface for format %s, hr %#lx.\n", test_data[i].name, hr); hr = IDirectDrawSurface4_Lock(surface, NULL, &map_desc, DDLOCK_READONLY | DDLOCK_WAIT, NULL); - ok(hr == DDERR_SURFACEBUSY, "Got unexpected hr %#x for format %s.\n", hr, test_data[i].name); + ok(hr == DDERR_SURFACEBUSY, "Got unexpected hr %#lx for format %s.\n", hr, test_data[i].name); hr = IDirectDrawSurface4_Unlock(surface, NULL); - ok(SUCCEEDED(hr), "Failed to unmap surface for format %s, hr %#x.\n", test_data[i].name, hr); + ok(SUCCEEDED(hr), "Failed to unmap surface for format %s, hr %#lx.\n", test_data[i].name, hr); hr = IDirectDrawSurface4_Unlock(surface, NULL); - ok(hr == DDERR_NOTLOCKED, "Got unexpected hr %#x for format %s.\n", hr, test_data[i].name); + ok(hr == DDERR_NOTLOCKED, "Got unexpected hr %#lx for format %s.\n", hr, test_data[i].name);
hr = IDirectDrawSurface4_GetDC(surface, &dc); - ok(SUCCEEDED(hr), "Failed to get DC for format %s, hr %#x.\n", test_data[i].name, hr); + ok(SUCCEEDED(hr), "Failed to get DC for format %s, hr %#lx.\n", test_data[i].name, hr); hr = IDirectDrawSurface4_Lock(surface, NULL, &map_desc, DDLOCK_READONLY | DDLOCK_WAIT, NULL); - ok(hr == DDERR_SURFACEBUSY, "Got unexpected hr %#x for format %s.\n", hr, test_data[i].name); + ok(hr == DDERR_SURFACEBUSY, "Got unexpected hr %#lx for format %s.\n", hr, test_data[i].name); hr = IDirectDrawSurface4_ReleaseDC(surface, dc); - ok(SUCCEEDED(hr), "Failed to release DC for format %s, hr %#x.\n", test_data[i].name, hr); + ok(SUCCEEDED(hr), "Failed to release DC for format %s, hr %#lx.\n", test_data[i].name, hr);
hr = IDirectDrawSurface4_Lock(surface, NULL, &map_desc, DDLOCK_READONLY | DDLOCK_WAIT, NULL); - ok(SUCCEEDED(hr), "Failed to map surface for format %s, hr %#x.\n", test_data[i].name, hr); + ok(SUCCEEDED(hr), "Failed to map surface for format %s, hr %#lx.\n", test_data[i].name, hr); hr = IDirectDrawSurface4_GetDC(surface, &dc); - ok(SUCCEEDED(hr), "Failed to get DC for format %s, hr %#x.\n", test_data[i].name, hr); + ok(SUCCEEDED(hr), "Failed to get DC for format %s, hr %#lx.\n", test_data[i].name, hr); hr = IDirectDrawSurface4_ReleaseDC(surface, dc); - ok(SUCCEEDED(hr), "Failed to release DC for format %s, hr %#x.\n", test_data[i].name, hr); + ok(SUCCEEDED(hr), "Failed to release DC for format %s, hr %#lx.\n", test_data[i].name, hr); hr = IDirectDrawSurface4_Unlock(surface, NULL); - ok(SUCCEEDED(hr), "Failed to unmap surface for format %s, hr %#x.\n", test_data[i].name, hr); + ok(SUCCEEDED(hr), "Failed to unmap surface for format %s, hr %#lx.\n", test_data[i].name, hr);
hr = IDirectDrawSurface4_GetDC(surface, &dc); - ok(SUCCEEDED(hr), "Failed to get DC for format %s, hr %#x.\n", test_data[i].name, hr); + ok(SUCCEEDED(hr), "Failed to get DC for format %s, hr %#lx.\n", test_data[i].name, hr); hr = IDirectDrawSurface4_GetDC(surface2, &dc2); - ok(SUCCEEDED(hr), "Failed to get DC for format %s, hr %#x.\n", test_data[i].name, hr); + ok(SUCCEEDED(hr), "Failed to get DC for format %s, hr %#lx.\n", test_data[i].name, hr); hr = IDirectDrawSurface4_ReleaseDC(surface2, dc2); - ok(SUCCEEDED(hr), "Failed to release DC for format %s, hr %#x.\n", test_data[i].name, hr); + ok(SUCCEEDED(hr), "Failed to release DC for format %s, hr %#lx.\n", test_data[i].name, hr); hr = IDirectDrawSurface4_ReleaseDC(surface, dc); - ok(SUCCEEDED(hr), "Failed to release DC for format %s, hr %#x.\n", test_data[i].name, hr); + ok(SUCCEEDED(hr), "Failed to release DC for format %s, hr %#lx.\n", test_data[i].name, hr);
hr = IDirectDrawSurface4_GetDC(surface2, &dc); - ok(SUCCEEDED(hr), "Failed to get DC for format %s, hr %#x.\n", test_data[i].name, hr); + ok(SUCCEEDED(hr), "Failed to get DC for format %s, hr %#lx.\n", test_data[i].name, hr); hr = IDirectDrawSurface4_GetDC(surface, &dc2); - ok(SUCCEEDED(hr), "Failed to get DC for format %s, hr %#x.\n", test_data[i].name, hr); + ok(SUCCEEDED(hr), "Failed to get DC for format %s, hr %#lx.\n", test_data[i].name, hr); hr = IDirectDrawSurface4_ReleaseDC(surface, dc2); - ok(SUCCEEDED(hr), "Failed to release DC for format %s, hr %#x.\n", test_data[i].name, hr); + ok(SUCCEEDED(hr), "Failed to release DC for format %s, hr %#lx.\n", test_data[i].name, hr); hr = IDirectDrawSurface4_ReleaseDC(surface2, dc); - ok(SUCCEEDED(hr), "Failed to release DC for format %s, hr %#x.\n", test_data[i].name, hr); + ok(SUCCEEDED(hr), "Failed to release DC for format %s, hr %#lx.\n", test_data[i].name, hr);
hr = IDirectDrawSurface4_Lock(surface, NULL, &map_desc, DDLOCK_READONLY | DDLOCK_WAIT, NULL); - ok(SUCCEEDED(hr), "Failed to map surface for format %s, hr %#x.\n", test_data[i].name, hr); + ok(SUCCEEDED(hr), "Failed to map surface for format %s, hr %#lx.\n", test_data[i].name, hr); hr = IDirectDrawSurface4_Lock(surface2, NULL, &map_desc, DDLOCK_READONLY | DDLOCK_WAIT, NULL); - ok(SUCCEEDED(hr), "Failed to map surface for format %s, hr %#x.\n", test_data[i].name, hr); + ok(SUCCEEDED(hr), "Failed to map surface for format %s, hr %#lx.\n", test_data[i].name, hr); hr = IDirectDrawSurface4_Unlock(surface2, NULL); - ok(SUCCEEDED(hr), "Failed to unmap surface for format %s, hr %#x.\n", test_data[i].name, hr); + ok(SUCCEEDED(hr), "Failed to unmap surface for format %s, hr %#lx.\n", test_data[i].name, hr); hr = IDirectDrawSurface4_Unlock(surface, NULL); - ok(SUCCEEDED(hr), "Failed to unmap surface for format %s, hr %#x.\n", test_data[i].name, hr); + ok(SUCCEEDED(hr), "Failed to unmap surface for format %s, hr %#lx.\n", test_data[i].name, hr);
hr = IDirectDrawSurface4_Lock(surface, NULL, &map_desc, DDLOCK_READONLY | DDLOCK_WAIT, NULL); - ok(SUCCEEDED(hr), "Failed to map surface for format %s, hr %#x.\n", test_data[i].name, hr); + ok(SUCCEEDED(hr), "Failed to map surface for format %s, hr %#lx.\n", test_data[i].name, hr); hr = IDirectDrawSurface4_GetDC(surface, &dc); - ok(SUCCEEDED(hr), "Failed to get DC for format %s, hr %#x.\n", test_data[i].name, hr); + ok(SUCCEEDED(hr), "Failed to get DC for format %s, hr %#lx.\n", test_data[i].name, hr); hr = IDirectDrawSurface4_ReleaseDC(surface, dc); - ok(SUCCEEDED(hr), "Failed to release DC for format %s, hr %#x.\n", test_data[i].name, hr); + ok(SUCCEEDED(hr), "Failed to release DC for format %s, hr %#lx.\n", test_data[i].name, hr); hr = IDirectDrawSurface4_Unlock(surface, NULL); - ok(SUCCEEDED(hr), "Failed to unmap surface for format %s, hr %#x.\n", test_data[i].name, hr); + ok(SUCCEEDED(hr), "Failed to unmap surface for format %s, hr %#lx.\n", test_data[i].name, hr);
hr = IDirectDrawSurface4_Lock(surface2, NULL, &map_desc, DDLOCK_READONLY | DDLOCK_WAIT, NULL); - ok(SUCCEEDED(hr), "Failed to map surface for format %s, hr %#x.\n", test_data[i].name, hr); + ok(SUCCEEDED(hr), "Failed to map surface for format %s, hr %#lx.\n", test_data[i].name, hr); hr = IDirectDrawSurface4_GetDC(surface, &dc); - ok(SUCCEEDED(hr), "Failed to get DC for format %s, hr %#x.\n", test_data[i].name, hr); + ok(SUCCEEDED(hr), "Failed to get DC for format %s, hr %#lx.\n", test_data[i].name, hr); hr = IDirectDrawSurface4_ReleaseDC(surface, dc); - ok(SUCCEEDED(hr), "Failed to release DC for format %s, hr %#x.\n", test_data[i].name, hr); + ok(SUCCEEDED(hr), "Failed to release DC for format %s, hr %#lx.\n", test_data[i].name, hr); hr = IDirectDrawSurface4_Unlock(surface2, NULL); - ok(SUCCEEDED(hr), "Failed to unmap surface for format %s, hr %#x.\n", test_data[i].name, hr); + ok(SUCCEEDED(hr), "Failed to unmap surface for format %s, hr %#lx.\n", test_data[i].name, hr);
hr = IDirectDrawSurface4_GetDC(surface, &dc); - ok(SUCCEEDED(hr), "Failed to get DC for format %s, hr %#x.\n", test_data[i].name, hr); + ok(SUCCEEDED(hr), "Failed to get DC for format %s, hr %#lx.\n", test_data[i].name, hr); hr = IDirectDrawSurface4_Lock(surface2, NULL, &map_desc, DDLOCK_READONLY | DDLOCK_WAIT, NULL); - ok(SUCCEEDED(hr), "Failed to map surface for format %s, hr %#x.\n", test_data[i].name, hr); + ok(SUCCEEDED(hr), "Failed to map surface for format %s, hr %#lx.\n", test_data[i].name, hr); hr = IDirectDrawSurface4_Unlock(surface2, NULL); - ok(SUCCEEDED(hr), "Failed to unmap surface for format %s, hr %#x.\n", test_data[i].name, hr); + ok(SUCCEEDED(hr), "Failed to unmap surface for format %s, hr %#lx.\n", test_data[i].name, hr); hr = IDirectDrawSurface4_ReleaseDC(surface, dc); - ok(SUCCEEDED(hr), "Failed to release DC for format %s, hr %#x.\n", test_data[i].name, hr); + ok(SUCCEEDED(hr), "Failed to release DC for format %s, hr %#lx.\n", test_data[i].name, hr);
hr = IDirectDrawSurface4_GetDC(surface2, &dc); - ok(SUCCEEDED(hr), "Failed to get DC for format %s, hr %#x.\n", test_data[i].name, hr); + ok(SUCCEEDED(hr), "Failed to get DC for format %s, hr %#lx.\n", test_data[i].name, hr); hr = IDirectDrawSurface4_Lock(surface, NULL, &map_desc, DDLOCK_READONLY | DDLOCK_WAIT, NULL); - ok(SUCCEEDED(hr), "Failed to map surface for format %s, hr %#x.\n", test_data[i].name, hr); + ok(SUCCEEDED(hr), "Failed to map surface for format %s, hr %#lx.\n", test_data[i].name, hr); hr = IDirectDrawSurface4_Unlock(surface, NULL); - ok(SUCCEEDED(hr), "Failed to unmap surface for format %s, hr %#x.\n", test_data[i].name, hr); + ok(SUCCEEDED(hr), "Failed to unmap surface for format %s, hr %#lx.\n", test_data[i].name, hr); hr = IDirectDrawSurface4_ReleaseDC(surface2, dc); - ok(SUCCEEDED(hr), "Failed to release DC for format %s, hr %#x.\n", test_data[i].name, hr); + ok(SUCCEEDED(hr), "Failed to release DC for format %s, hr %#lx.\n", test_data[i].name, hr);
hr = IDirectDrawSurface4_Unlock(surface, NULL); - ok(hr == DDERR_NOTLOCKED, "Got unexpected hr %#x for format %s.\n", hr, test_data[i].name); + ok(hr == DDERR_NOTLOCKED, "Got unexpected hr %#lx for format %s.\n", hr, test_data[i].name); hr = IDirectDrawSurface4_GetDC(surface2, &dc); - ok(SUCCEEDED(hr), "Failed to get DC for format %s, hr %#x.\n", test_data[i].name, hr); + ok(SUCCEEDED(hr), "Failed to get DC for format %s, hr %#lx.\n", test_data[i].name, hr); hr = IDirectDrawSurface4_Unlock(surface, NULL); - ok(hr == DDERR_NOTLOCKED, "Got unexpected hr %#x for format %s.\n", hr, test_data[i].name); + ok(hr == DDERR_NOTLOCKED, "Got unexpected hr %#lx for format %s.\n", hr, test_data[i].name); hr = IDirectDrawSurface4_ReleaseDC(surface2, dc); - ok(SUCCEEDED(hr), "Failed to release DC for format %s, hr %#x.\n", test_data[i].name, hr); + ok(SUCCEEDED(hr), "Failed to release DC for format %s, hr %#lx.\n", test_data[i].name, hr); hr = IDirectDrawSurface4_Unlock(surface, NULL); - ok(hr == DDERR_NOTLOCKED, "Got unexpected hr %#x for format %s.\n", hr, test_data[i].name); + ok(hr == DDERR_NOTLOCKED, "Got unexpected hr %#lx for format %s.\n", hr, test_data[i].name);
hr = IDirectDrawSurface4_Unlock(surface2, NULL); - ok(hr == DDERR_NOTLOCKED, "Got unexpected hr %#x for format %s.\n", hr, test_data[i].name); + ok(hr == DDERR_NOTLOCKED, "Got unexpected hr %#lx for format %s.\n", hr, test_data[i].name); hr = IDirectDrawSurface4_GetDC(surface, &dc); - ok(SUCCEEDED(hr), "Failed to get DC for format %s, hr %#x.\n", test_data[i].name, hr); + ok(SUCCEEDED(hr), "Failed to get DC for format %s, hr %#lx.\n", test_data[i].name, hr); hr = IDirectDrawSurface4_Unlock(surface2, NULL); - ok(hr == DDERR_NOTLOCKED, "Got unexpected hr %#x for format %s.\n", hr, test_data[i].name); + ok(hr == DDERR_NOTLOCKED, "Got unexpected hr %#lx for format %s.\n", hr, test_data[i].name); hr = IDirectDrawSurface4_ReleaseDC(surface, dc); - ok(SUCCEEDED(hr), "Failed to release DC for format %s, hr %#x.\n", test_data[i].name, hr); + ok(SUCCEEDED(hr), "Failed to release DC for format %s, hr %#lx.\n", test_data[i].name, hr); hr = IDirectDrawSurface4_Unlock(surface2, NULL); - ok(hr == DDERR_NOTLOCKED, "Got unexpected hr %#x for format %s.\n", hr, test_data[i].name); + ok(hr == DDERR_NOTLOCKED, "Got unexpected hr %#lx for format %s.\n", hr, test_data[i].name);
IDirectDrawSurface4_Release(surface2); IDirectDrawSurface4_Release(surface); @@ -13891,77 +13891,77 @@ static void test_draw_primitive(void)
viewport = create_viewport(device, 0, 0, 640, 480); hr = IDirect3DDevice3_SetCurrentViewport(device, viewport); - ok(SUCCEEDED(hr), "Failed to activate the viewport, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to activate the viewport, hr %#lx.\n", hr);
hr = IDirect3DDevice3_GetDirect3D(device, &d3d); - ok(SUCCEEDED(hr), "Failed to get D3D interface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get D3D interface, hr %#lx.\n", hr);
memset(&vb_desc, 0, sizeof(vb_desc)); vb_desc.dwSize = sizeof(vb_desc); vb_desc.dwFVF = D3DFVF_XYZ; vb_desc.dwNumVertices = 4; hr = IDirect3D3_CreateVertexBuffer(d3d, &vb_desc, &vb, 0, NULL); - ok(SUCCEEDED(hr), "Failed to create vertex buffer, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create vertex buffer, hr %#lx.\n", hr);
IDirect3D3_Release(d3d);
memset(&strided, 0, sizeof(strided));
hr = IDirect3DDevice3_DrawIndexedPrimitive(device, D3DPT_TRIANGLESTRIP, D3DFVF_XYZ, NULL, 0, NULL, 0, 0); - ok(SUCCEEDED(hr), "Failed to draw, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to draw, hr %#lx.\n", hr); hr = IDirect3DDevice3_DrawIndexedPrimitiveStrided(device, D3DPT_TRIANGLESTRIP, D3DFVF_XYZ, &strided, 0, NULL, 0, 0); - ok(SUCCEEDED(hr), "Failed to draw, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to draw, hr %#lx.\n", hr); hr = IDirect3DDevice3_DrawIndexedPrimitiveVB(device, D3DPT_TRIANGLESTRIP, vb, NULL, 0, 0); - ok(SUCCEEDED(hr), "Failed to draw, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to draw, hr %#lx.\n", hr); hr = IDirect3DDevice3_DrawPrimitive(device, D3DPT_TRIANGLESTRIP, D3DFVF_XYZ, NULL, 0, 0); - ok(SUCCEEDED(hr), "Failed to draw, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to draw, hr %#lx.\n", hr); hr = IDirect3DDevice3_DrawPrimitiveStrided(device, D3DPT_TRIANGLESTRIP, D3DFVF_XYZ, &strided, 0, 0); - ok(SUCCEEDED(hr), "Failed to draw, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to draw, hr %#lx.\n", hr); hr = IDirect3DDevice3_DrawPrimitiveVB(device, D3DPT_TRIANGLESTRIP, vb, 0, 0, 0); - ok(SUCCEEDED(hr), "Failed to draw, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to draw, hr %#lx.\n", hr);
hr = IDirect3DDevice3_DrawIndexedPrimitive(device, D3DPT_TRIANGLESTRIP, D3DFVF_XYZ, NULL, 0, indices, 4, 0); - ok(SUCCEEDED(hr), "Failed to draw, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to draw, hr %#lx.\n", hr); hr = IDirect3DDevice3_DrawIndexedPrimitiveStrided(device, D3DPT_TRIANGLESTRIP, D3DFVF_XYZ, &strided, 0, indices, 4, 0); - ok(SUCCEEDED(hr), "Failed to draw, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to draw, hr %#lx.\n", hr); hr = IDirect3DDevice3_DrawIndexedPrimitiveVB(device, D3DPT_TRIANGLESTRIP, vb, indices, 4, 0); - ok(SUCCEEDED(hr), "Failed to draw, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to draw, hr %#lx.\n", hr);
strided.position.lpvData = quad; strided.position.dwStride = sizeof(*quad); hr = IDirect3DVertexBuffer_Lock(vb, 0, &data, NULL); - ok(SUCCEEDED(hr), "Failed to lock vertex buffer, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to lock vertex buffer, hr %#lx.\n", hr); memcpy(data, quad, sizeof(quad)); hr = IDirect3DVertexBuffer_Unlock(vb); - ok(SUCCEEDED(hr), "Failed to unlock vertex buffer, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to unlock vertex buffer, hr %#lx.\n", hr);
hr = IDirect3DDevice3_DrawIndexedPrimitive(device, D3DPT_TRIANGLESTRIP, D3DFVF_XYZ, quad, 4, NULL, 0, 0); - ok(SUCCEEDED(hr), "Failed to draw, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to draw, hr %#lx.\n", hr); hr = IDirect3DDevice3_DrawIndexedPrimitiveStrided(device, D3DPT_TRIANGLESTRIP, D3DFVF_XYZ, &strided, 4, NULL, 0, 0); - ok(SUCCEEDED(hr), "Failed to draw, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to draw, hr %#lx.\n", hr); hr = IDirect3DDevice3_DrawIndexedPrimitiveVB(device, D3DPT_TRIANGLESTRIP, vb, NULL, 0, 0); - ok(SUCCEEDED(hr), "Failed to draw, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to draw, hr %#lx.\n", hr); hr = IDirect3DDevice3_DrawPrimitive(device, D3DPT_TRIANGLESTRIP, D3DFVF_XYZ, quad, 4, 0); - ok(SUCCEEDED(hr), "Failed to draw, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to draw, hr %#lx.\n", hr); hr = IDirect3DDevice3_DrawPrimitiveStrided(device, D3DPT_TRIANGLESTRIP, D3DFVF_XYZ, &strided, 4, 0); - ok(SUCCEEDED(hr), "Failed to draw, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to draw, hr %#lx.\n", hr); hr = IDirect3DDevice3_DrawPrimitiveVB(device, D3DPT_TRIANGLESTRIP, vb, 0, 4, 0); - ok(SUCCEEDED(hr), "Failed to draw, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to draw, hr %#lx.\n", hr); hr = IDirect3DDevice3_DrawIndexedPrimitive(device, D3DPT_TRIANGLESTRIP, D3DFVF_XYZ, quad, 4, indices, 4, 0); - ok(SUCCEEDED(hr), "Failed to draw, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to draw, hr %#lx.\n", hr); hr = IDirect3DDevice3_DrawIndexedPrimitiveStrided(device, D3DPT_TRIANGLESTRIP, D3DFVF_XYZ, &strided, 4, indices, 4, 0); - ok(SUCCEEDED(hr), "Failed to draw, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to draw, hr %#lx.\n", hr); hr = IDirect3DDevice3_DrawIndexedPrimitiveVB(device, D3DPT_TRIANGLESTRIP, vb, indices, 4, 0); - ok(SUCCEEDED(hr), "Failed to draw, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to draw, hr %#lx.\n", hr);
IDirect3DVertexBuffer_Release(vb); destroy_viewport(device, viewport); refcount = IDirect3DDevice3_Release(device); - ok(!refcount, "Device has %u references left.\n", refcount); + ok(!refcount, "Device has %lu references left.\n", refcount); DestroyWindow(window); }
@@ -14025,20 +14025,20 @@ static void test_edge_antialiasing_blending(void) memset(&hel_desc, 0, sizeof(hel_desc)); hel_desc.dwSize = sizeof(hel_desc); hr = IDirect3DDevice3_GetCaps(device, &hal_desc, &hel_desc); - ok(SUCCEEDED(hr), "Failed to get device caps, hr %#x.\n", hr); - trace("HAL line edge antialiasing support: %#x.\n", + ok(SUCCEEDED(hr), "Failed to get device caps, hr %#lx.\n", hr); + trace("HAL line edge antialiasing support: %#lx.\n", hal_desc.dpcLineCaps.dwRasterCaps & D3DPRASTERCAPS_ANTIALIASEDGES); - trace("HAL triangle edge antialiasing support: %#x.\n", + trace("HAL triangle edge antialiasing support: %#lx.\n", hal_desc.dpcTriCaps.dwRasterCaps & D3DPRASTERCAPS_ANTIALIASEDGES); - trace("HEL line edge antialiasing support: %#x.\n", + trace("HEL line edge antialiasing support: %#lx.\n", hel_desc.dpcLineCaps.dwRasterCaps & D3DPRASTERCAPS_ANTIALIASEDGES); - trace("HEL triangle edge antialiasing support: %#x.\n", + trace("HEL triangle edge antialiasing support: %#lx.\n", hel_desc.dpcTriCaps.dwRasterCaps & D3DPRASTERCAPS_ANTIALIASEDGES);
hr = IDirect3DDevice3_GetDirect3D(device, &d3d); - ok(SUCCEEDED(hr), "Failed to get D3D interface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get D3D interface, hr %#lx.\n", hr); hr = IDirect3D3_QueryInterface(d3d, &IID_IDirectDraw4, (void **)&ddraw); - ok(SUCCEEDED(hr), "Failed to get DirectDraw4 interface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get DirectDraw4 interface, hr %#lx.\n", hr); IDirect3D3_Release(d3d);
memset(&surface_desc, 0, sizeof(surface_desc)); @@ -14054,134 +14054,134 @@ static void test_edge_antialiasing_blending(void) U4(U4(surface_desc).ddpfPixelFormat).dwBBitMask = 0x000000ff; U5(U4(surface_desc).ddpfPixelFormat).dwRGBAlphaBitMask = 0xff000000; hr = IDirectDraw4_CreateSurface(ddraw, &surface_desc, &offscreen, NULL); - ok(hr == D3D_OK, "Creating the offscreen render target failed, hr %#x.\n", hr); + ok(hr == D3D_OK, "Creating the offscreen render target failed, hr %#lx.\n", hr);
ds = get_depth_stencil(device); hr = IDirectDrawSurface4_AddAttachedSurface(offscreen, ds); - todo_wine ok(SUCCEEDED(hr), "Failed to attach depth buffer, hr %#x.\n", hr); + todo_wine ok(SUCCEEDED(hr), "Failed to attach depth buffer, hr %#lx.\n", hr); IDirectDrawSurface4_Release(ds);
hr = IDirect3DDevice3_SetRenderTarget(device, offscreen, 0); - ok(SUCCEEDED(hr), "Failed to set render target, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set render target, hr %#lx.\n", hr);
viewport = create_viewport(device, 0, 0, 640, 480); hr = IDirect3DDevice3_SetCurrentViewport(device, viewport); - ok(SUCCEEDED(hr), "Failed to set current viewport, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set current viewport, hr %#lx.\n", hr);
hr = IDirect3DDevice3_SetTransform(device, D3DTRANSFORMSTATE_WORLD, &mat); - ok(SUCCEEDED(hr), "Failed to set world transform, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set world transform, hr %#lx.\n", hr); hr = IDirect3DDevice3_SetTransform(device, D3DTRANSFORMSTATE_VIEW, &mat); - ok(SUCCEEDED(hr), "Failed to set view transform, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set view transform, hr %#lx.\n", hr); hr = IDirect3DDevice3_SetTransform(device, D3DTRANSFORMSTATE_PROJECTION, &mat); - ok(SUCCEEDED(hr), "Failed to set projection transform, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set projection transform, hr %#lx.\n", hr); hr = IDirect3DDevice3_SetRenderState(device, D3DRENDERSTATE_ZENABLE, FALSE); - ok(SUCCEEDED(hr), "Failed to disable Z test, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to disable Z test, hr %#lx.\n", hr); hr = IDirect3DDevice3_SetRenderState(device, D3DRENDERSTATE_FOGENABLE, FALSE); - ok(SUCCEEDED(hr), "Failed to disable fog, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to disable fog, hr %#lx.\n", hr); hr = IDirect3DDevice3_SetRenderState(device, D3DRENDERSTATE_STENCILENABLE, FALSE); - ok(SUCCEEDED(hr), "Failed to disable stencil test, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to disable stencil test, hr %#lx.\n", hr); hr = IDirect3DDevice3_SetRenderState(device, D3DRENDERSTATE_CULLMODE, D3DCULL_NONE); - ok(SUCCEEDED(hr), "Failed to disable culling, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to disable culling, hr %#lx.\n", hr);
hr = IDirect3DDevice3_SetRenderState(device, D3DRENDERSTATE_ALPHABLENDENABLE, TRUE); - ok(SUCCEEDED(hr), "Failed to enable blending, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to enable blending, hr %#lx.\n", hr); hr = IDirect3DDevice3_SetRenderState(device, D3DRENDERSTATE_SRCBLEND, D3DBLEND_SRCALPHA); - ok(SUCCEEDED(hr), "Failed to set src blend, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set src blend, hr %#lx.\n", hr); hr = IDirect3DDevice3_SetRenderState(device, D3DRENDERSTATE_DESTBLEND, D3DBLEND_DESTALPHA); - ok(SUCCEEDED(hr), "Failed to set dest blend, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set dest blend, hr %#lx.\n", hr);
hr = IDirect3DDevice3_SetTextureStageState(device, 0, D3DTSS_COLOROP, D3DTOP_SELECTARG1); - ok(SUCCEEDED(hr), "Failed to set color op, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set color op, hr %#lx.\n", hr); hr = IDirect3DDevice3_SetTextureStageState(device, 0, D3DTSS_COLORARG1, D3DTA_DIFFUSE); - ok(SUCCEEDED(hr), "Failed to set color arg, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set color arg, hr %#lx.\n", hr); hr = IDirect3DDevice3_SetTextureStageState(device, 0, D3DTSS_ALPHAOP, D3DTOP_SELECTARG1); - ok(SUCCEEDED(hr), "Failed to set alpha op, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set alpha op, hr %#lx.\n", hr); hr = IDirect3DDevice3_SetTextureStageState(device, 0, D3DTSS_ALPHAARG1, D3DTA_DIFFUSE); - ok(SUCCEEDED(hr), "Failed to set alpha arg, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set alpha arg, hr %#lx.\n", hr);
hr = IDirect3DViewport3_Clear2(viewport, 1, &clear_rect, D3DCLEAR_TARGET, 0xccff0000, 0.0f, 0); - ok(SUCCEEDED(hr), "Failed to clear viewport, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to clear viewport, hr %#lx.\n", hr); hr = IDirect3DDevice3_BeginScene(device); - ok(SUCCEEDED(hr), "Failed to begin scene, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to begin scene, hr %#lx.\n", hr); hr = IDirect3DDevice3_DrawPrimitive(device, D3DPT_TRIANGLESTRIP, D3DFVF_XYZ | D3DFVF_DIFFUSE, green_quad, 4, 0); - ok(SUCCEEDED(hr), "Failed to draw, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to draw, hr %#lx.\n", hr); hr = IDirect3DDevice3_EndScene(device); - ok(SUCCEEDED(hr), "Failed to end scene, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to end scene, hr %#lx.\n", hr); color = get_surface_color(offscreen, 320, 240); - ok(compare_color(color, 0x00cc7f00, 1), "Got unexpected color 0x%08x.\n", color); + ok(compare_color(color, 0x00cc7f00, 1), "Got unexpected color 0x%08lx.\n", color);
hr = IDirect3DViewport3_Clear2(viewport, 1, &clear_rect, D3DCLEAR_TARGET, 0x7f00ff00, 0.0f, 0); - ok(SUCCEEDED(hr), "Failed to clear viewport, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to clear viewport, hr %#lx.\n", hr); hr = IDirect3DDevice3_BeginScene(device); - ok(SUCCEEDED(hr), "Failed to begin scene, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to begin scene, hr %#lx.\n", hr); hr = IDirect3DDevice3_DrawPrimitive(device, D3DPT_TRIANGLESTRIP, D3DFVF_XYZ | D3DFVF_DIFFUSE, red_quad, 4, 0); - ok(SUCCEEDED(hr), "Failed to draw, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to draw, hr %#lx.\n", hr); hr = IDirect3DDevice3_EndScene(device); - ok(SUCCEEDED(hr), "Failed to end scene, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to end scene, hr %#lx.\n", hr); color = get_surface_color(offscreen, 320, 240); - ok(compare_color(color, 0x00cc7f00, 1), "Got unexpected color 0x%08x.\n", color); + ok(compare_color(color, 0x00cc7f00, 1), "Got unexpected color 0x%08lx.\n", color);
hr = IDirect3DDevice3_SetRenderState(device, D3DRENDERSTATE_ALPHABLENDENABLE, FALSE); - ok(SUCCEEDED(hr), "Failed to disable blending, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to disable blending, hr %#lx.\n", hr);
hr = IDirect3DViewport3_Clear2(viewport, 1, &clear_rect, D3DCLEAR_TARGET, 0xccff0000, 0.0f, 0); - ok(SUCCEEDED(hr), "Failed to clear viewport, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to clear viewport, hr %#lx.\n", hr); hr = IDirect3DDevice3_BeginScene(device); - ok(SUCCEEDED(hr), "Failed to begin scene, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to begin scene, hr %#lx.\n", hr); hr = IDirect3DDevice3_DrawPrimitive(device, D3DPT_TRIANGLESTRIP, D3DFVF_XYZ | D3DFVF_DIFFUSE, green_quad, 4, 0); - ok(SUCCEEDED(hr), "Failed to draw, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to draw, hr %#lx.\n", hr); hr = IDirect3DDevice3_EndScene(device); - ok(SUCCEEDED(hr), "Failed to end scene, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to end scene, hr %#lx.\n", hr); color = get_surface_color(offscreen, 320, 240); - ok(compare_color(color, 0x0000ff00, 1), "Got unexpected color 0x%08x.\n", color); + ok(compare_color(color, 0x0000ff00, 1), "Got unexpected color 0x%08lx.\n", color);
hr = IDirect3DViewport3_Clear2(viewport, 1, &clear_rect, D3DCLEAR_TARGET, 0x7f00ff00, 0.0f, 0); - ok(SUCCEEDED(hr), "Failed to clear viewport, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to clear viewport, hr %#lx.\n", hr); hr = IDirect3DDevice3_BeginScene(device); - ok(SUCCEEDED(hr), "Failed to begin scene, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to begin scene, hr %#lx.\n", hr); hr = IDirect3DDevice3_DrawPrimitive(device, D3DPT_TRIANGLESTRIP, D3DFVF_XYZ | D3DFVF_DIFFUSE, red_quad, 4, 0); - ok(SUCCEEDED(hr), "Failed to draw, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to draw, hr %#lx.\n", hr); hr = IDirect3DDevice3_EndScene(device); - ok(SUCCEEDED(hr), "Failed to end scene, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to end scene, hr %#lx.\n", hr); color = get_surface_color(offscreen, 320, 240); - ok(compare_color(color, 0x00ff0000, 1), "Got unexpected color 0x%08x.\n", color); + ok(compare_color(color, 0x00ff0000, 1), "Got unexpected color 0x%08lx.\n", color);
hr = IDirect3DDevice3_SetRenderState(device, D3DRENDERSTATE_EDGEANTIALIAS, TRUE); - ok(SUCCEEDED(hr), "Failed to enable edge antialiasing, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to enable edge antialiasing, hr %#lx.\n", hr);
hr = IDirect3DViewport3_Clear2(viewport, 1, &clear_rect, D3DCLEAR_TARGET, 0xccff0000, 0.0f, 0); - ok(SUCCEEDED(hr), "Failed to clear viewport, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to clear viewport, hr %#lx.\n", hr); hr = IDirect3DDevice3_BeginScene(device); - ok(SUCCEEDED(hr), "Failed to begin scene, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to begin scene, hr %#lx.\n", hr); hr = IDirect3DDevice3_DrawPrimitive(device, D3DPT_TRIANGLESTRIP, D3DFVF_XYZ | D3DFVF_DIFFUSE, green_quad, 4, 0); - ok(SUCCEEDED(hr), "Failed to draw, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to draw, hr %#lx.\n", hr); hr = IDirect3DDevice3_EndScene(device); - ok(SUCCEEDED(hr), "Failed to end scene, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to end scene, hr %#lx.\n", hr); color = get_surface_color(offscreen, 320, 240); - ok(compare_color(color, 0x0000ff00, 1), "Got unexpected color 0x%08x.\n", color); + ok(compare_color(color, 0x0000ff00, 1), "Got unexpected color 0x%08lx.\n", color);
hr = IDirect3DViewport3_Clear2(viewport, 1, &clear_rect, D3DCLEAR_TARGET, 0x7f00ff00, 0.0f, 0); - ok(SUCCEEDED(hr), "Failed to clear viewport, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to clear viewport, hr %#lx.\n", hr); hr = IDirect3DDevice3_BeginScene(device); - ok(SUCCEEDED(hr), "Failed to begin scene, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to begin scene, hr %#lx.\n", hr); hr = IDirect3DDevice3_DrawPrimitive(device, D3DPT_TRIANGLESTRIP, D3DFVF_XYZ | D3DFVF_DIFFUSE, red_quad, 4, 0); - ok(SUCCEEDED(hr), "Failed to draw, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to draw, hr %#lx.\n", hr); hr = IDirect3DDevice3_EndScene(device); - ok(SUCCEEDED(hr), "Failed to end scene, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to end scene, hr %#lx.\n", hr); color = get_surface_color(offscreen, 320, 240); - ok(compare_color(color, 0x00ff0000, 1), "Got unexpected color 0x%08x.\n", color); + ok(compare_color(color, 0x00ff0000, 1), "Got unexpected color 0x%08lx.\n", color);
IDirectDrawSurface4_Release(offscreen); IDirectDraw4_Release(ddraw); destroy_viewport(device, viewport); refcount = IDirect3DDevice3_Release(device); - ok(!refcount, "Device has %u references left.\n", refcount); + ok(!refcount, "Device has %lu references left.\n", refcount); DestroyWindow(window); }
@@ -14308,11 +14308,11 @@ static void test_transform_vertices(void) return; } hr = IDirect3DDevice3_GetRenderTarget(device, &rt); - ok(SUCCEEDED(hr), "Failed to get render target, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get render target, hr %#lx.\n", hr);
viewport = create_viewport(device, 0, 0, 256, 256); hr = IDirect3DViewport2_SetViewport(viewport, &vp_data); - ok(SUCCEEDED(hr), "Failed to set viewport, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set viewport, hr %#lx.\n", hr);
memset(&transformdata, 0, sizeof(transformdata)); transformdata.dwSize = sizeof(transformdata); @@ -14324,8 +14324,8 @@ static void test_transform_vertices(void)
hr = IDirect3DViewport2_TransformVertices(viewport, ARRAY_SIZE(position_tests), &transformdata, D3DTRANSFORM_UNCLIPPED, &offscreen); - ok(SUCCEEDED(hr), "Failed to transform vertices, hr %#x.\n", hr); - ok(!offscreen, "Offscreen is %x.\n", offscreen); + ok(SUCCEEDED(hr), "Failed to transform vertices, hr %#lx.\n", hr); + ok(!offscreen, "Offscreen is %lx.\n", offscreen);
for (i = 0; i < ARRAY_SIZE(position_tests); ++i) { @@ -14340,19 +14340,19 @@ static void test_transform_vertices(void) out[i].x, out[i].y, out[i].z, out[i].w); ok(out[i].v1 == position_tests[i].v1 && out[i].v2 == position_tests[i].v2 && out[i].v3 == position_tests[i].v3 && out[i].v4 == position_tests[i].v4, - "Vertex %u payload is %u %u %u %u.\n", i, out[i].v1, out[i].v2, out[i].v3, out[i].v4); + "Vertex %u payload is %lu %lu %lu %lu.\n", i, out[i].v1, out[i].v2, out[i].v3, out[i].v4); ok(out[i].unused3 == 0xdeadbeef && out[i].unused4 == 0xcafecafe, - "Vertex %u unused data is %#x, %#x.\n", i, out[i].unused3, out[i].unused4); + "Vertex %u unused data is %#lx, %#lx.\n", i, out[i].unused3, out[i].unused4); }
vp_data = vp_template; hr = IDirect3DViewport2_SetViewport(viewport, &vp_data); - ok(SUCCEEDED(hr), "Failed to set viewport, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set viewport, hr %#lx.\n", hr); offscreen = 0xdeadbeef; hr = IDirect3DViewport2_TransformVertices(viewport, ARRAY_SIZE(position_tests), &transformdata, D3DTRANSFORM_UNCLIPPED, &offscreen); - ok(SUCCEEDED(hr), "Failed to transform vertices, hr %#x.\n", hr); - ok(!offscreen, "Offscreen is %x.\n", offscreen); + ok(SUCCEEDED(hr), "Failed to transform vertices, hr %#lx.\n", hr); + ok(!offscreen, "Offscreen is %lx.\n", offscreen);
for (i = 0; i < ARRAY_SIZE(position_tests); ++i) { @@ -14369,12 +14369,12 @@ static void test_transform_vertices(void) vp_data.dwX = 10; vp_data.dwY = 20; hr = IDirect3DViewport2_SetViewport(viewport, &vp_data); - ok(SUCCEEDED(hr), "Failed to set viewport, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set viewport, hr %#lx.\n", hr); offscreen = 0xdeadbeef; hr = IDirect3DViewport2_TransformVertices(viewport, ARRAY_SIZE(position_tests), &transformdata, D3DTRANSFORM_UNCLIPPED, &offscreen); - ok(SUCCEEDED(hr), "Failed to transform vertices, hr %#x.\n", hr); - ok(!offscreen, "Offscreen is %x.\n", offscreen); + ok(SUCCEEDED(hr), "Failed to transform vertices, hr %#lx.\n", hr); + ok(!offscreen, "Offscreen is %lx.\n", offscreen); for (i = 0; i < ARRAY_SIZE(position_tests); ++i) { static const struct vec4 cmp[] = @@ -14391,8 +14391,8 @@ static void test_transform_vertices(void) offscreen = 0xdeadbeef; hr = IDirect3DViewport2_TransformVertices(viewport, ARRAY_SIZE(position_tests), &transformdata, D3DTRANSFORM_CLIPPED, &offscreen); - ok(SUCCEEDED(hr), "Failed to transform vertices, hr %#x.\n", hr); - ok(!offscreen, "Offscreen is %x.\n", offscreen); + ok(SUCCEEDED(hr), "Failed to transform vertices, hr %#lx.\n", hr); + ok(!offscreen, "Offscreen is %lx.\n", offscreen); for (i = 0; i < ARRAY_SIZE(position_tests); ++i) { static const D3DHVERTEX cmp_h[] = @@ -14405,7 +14405,7 @@ static void test_transform_vertices(void) && compare_float(U2(cmp_h[i]).hy, U2(out_h[i]).hy, 4096) && compare_float(U3(cmp_h[i]).hz, U3(out_h[i]).hz, 4096) && cmp_h[i].dwFlags == out_h[i].dwFlags, - "HVertex %u differs. Got %#x %f %f %f.\n", i, + "HVertex %u differs. Got %#lx %f %f %f.\n", i, out_h[i].dwFlags, U1(out_h[i]).hx, U2(out_h[i]).hy, U3(out_h[i]).hz);
/* No scheme has been found behind those return values. It seems to be @@ -14430,8 +14430,8 @@ static void test_transform_vertices(void) offscreen = 0xdeadbeef; hr = IDirect3DViewport2_TransformVertices(viewport, ARRAY_SIZE(cliptest), &transformdata, D3DTRANSFORM_CLIPPED, &offscreen); - ok(SUCCEEDED(hr), "Failed to transform vertices, hr %#x.\n", hr); - ok(!offscreen, "Offscreen is %x.\n", offscreen); + ok(SUCCEEDED(hr), "Failed to transform vertices, hr %#lx.\n", hr); + ok(!offscreen, "Offscreen is %lx.\n", offscreen); for (i = 0; i < ARRAY_SIZE(cliptest); ++i) { static const DWORD flags[] = @@ -14441,19 +14441,19 @@ static void test_transform_vertices(void) 0, D3DCLIP_LEFT | D3DCLIP_BOTTOM | D3DCLIP_FRONT, }; - ok(flags[i] == out_h[i].dwFlags, "Cliptest %u returned %#x.\n", i, out_h[i].dwFlags); + ok(flags[i] == out_h[i].dwFlags, "Cliptest %u returned %#lx.\n", i, out_h[i].dwFlags); }
vp_data = vp_template; vp_data.dwWidth = 10; vp_data.dwHeight = 480; hr = IDirect3DViewport2_SetViewport(viewport, &vp_data); - ok(SUCCEEDED(hr), "Failed to set viewport, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set viewport, hr %#lx.\n", hr); offscreen = 0xdeadbeef; hr = IDirect3DViewport2_TransformVertices(viewport, ARRAY_SIZE(cliptest), &transformdata, D3DTRANSFORM_CLIPPED, &offscreen); - ok(SUCCEEDED(hr), "Failed to transform vertices, hr %#x.\n", hr); - ok(!offscreen, "Offscreen is %x.\n", offscreen); + ok(SUCCEEDED(hr), "Failed to transform vertices, hr %#lx.\n", hr); + ok(!offscreen, "Offscreen is %lx.\n", offscreen); for (i = 0; i < ARRAY_SIZE(cliptest); ++i) { static const DWORD flags[] = @@ -14463,7 +14463,7 @@ static void test_transform_vertices(void) D3DCLIP_LEFT, D3DCLIP_LEFT | D3DCLIP_FRONT, }; - ok(flags[i] == out_h[i].dwFlags, "Cliptest %u returned %#x.\n", i, out_h[i].dwFlags); + ok(flags[i] == out_h[i].dwFlags, "Cliptest %u returned %#lx.\n", i, out_h[i].dwFlags); }
vp_data = vp_template; @@ -14472,11 +14472,11 @@ static void test_transform_vertices(void) vp_data.dvScaleX = 1; vp_data.dvScaleY = 1; hr = IDirect3DViewport2_SetViewport(viewport, &vp_data); - ok(SUCCEEDED(hr), "Failed to set viewport, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set viewport, hr %#lx.\n", hr); hr = IDirect3DViewport2_TransformVertices(viewport, ARRAY_SIZE(cliptest), &transformdata, D3DTRANSFORM_CLIPPED, &offscreen); - ok(SUCCEEDED(hr), "Failed to transform vertices, hr %#x.\n", hr); - ok(!offscreen, "Offscreen is %x.\n", offscreen); + ok(SUCCEEDED(hr), "Failed to transform vertices, hr %#lx.\n", hr); + ok(!offscreen, "Offscreen is %lx.\n", offscreen); for (i = 0; i < ARRAY_SIZE(cliptest); ++i) { static const DWORD flags[] = @@ -14486,7 +14486,7 @@ static void test_transform_vertices(void) 0, D3DCLIP_FRONT, }; - ok(flags[i] == out_h[i].dwFlags, "Cliptest %u returned %#x.\n", i, out_h[i].dwFlags); + ok(flags[i] == out_h[i].dwFlags, "Cliptest %u returned %#lx.\n", i, out_h[i].dwFlags); }
/* Finally try to figure out how the DWORD dwOffscreen works. @@ -14497,51 +14497,51 @@ static void test_transform_vertices(void) vp_data.dvScaleX = 10000.0f; vp_data.dvScaleY = 10000.0f; hr = IDirect3DViewport2_SetViewport(viewport, &vp_data); - ok(SUCCEEDED(hr), "Failed to set viewport, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set viewport, hr %#lx.\n", hr); transformdata.lpIn = cliptest; offscreen = 0xdeadbeef; hr = IDirect3DViewport2_TransformVertices(viewport, 1, &transformdata, D3DTRANSFORM_UNCLIPPED, &offscreen); - ok(SUCCEEDED(hr), "Failed to transform vertices, hr %#x.\n", hr); - ok(!offscreen, "Offscreen is %x.\n", offscreen); + ok(SUCCEEDED(hr), "Failed to transform vertices, hr %#lx.\n", hr); + ok(!offscreen, "Offscreen is %lx.\n", offscreen);
offscreen = 0xdeadbeef; hr = IDirect3DViewport2_TransformVertices(viewport, 1, &transformdata, D3DTRANSFORM_CLIPPED, &offscreen); - ok(SUCCEEDED(hr), "Failed to transform vertices, hr %#x.\n", hr); - ok(offscreen == (D3DCLIP_RIGHT | D3DCLIP_TOP), "Offscreen is %x.\n", offscreen); + ok(SUCCEEDED(hr), "Failed to transform vertices, hr %#lx.\n", hr); + ok(offscreen == (D3DCLIP_RIGHT | D3DCLIP_TOP), "Offscreen is %lx.\n", offscreen); offscreen = 0xdeadbeef; hr = IDirect3DViewport2_TransformVertices(viewport, 2, &transformdata, D3DTRANSFORM_CLIPPED, &offscreen); - ok(SUCCEEDED(hr), "Failed to transform vertices, hr %#x.\n", hr); - ok(offscreen == (D3DCLIP_RIGHT | D3DCLIP_TOP), "Offscreen is %x.\n", offscreen); + ok(SUCCEEDED(hr), "Failed to transform vertices, hr %#lx.\n", hr); + ok(offscreen == (D3DCLIP_RIGHT | D3DCLIP_TOP), "Offscreen is %lx.\n", offscreen); hr = IDirect3DViewport2_TransformVertices(viewport, 3, &transformdata, D3DTRANSFORM_CLIPPED, &offscreen); - ok(SUCCEEDED(hr), "Failed to transform vertices, hr %#x.\n", hr); - ok(!offscreen, "Offscreen is %x.\n", offscreen); + ok(SUCCEEDED(hr), "Failed to transform vertices, hr %#lx.\n", hr); + ok(!offscreen, "Offscreen is %lx.\n", offscreen);
transformdata.lpIn = cliptest + 1; hr = IDirect3DViewport2_TransformVertices(viewport, 1, &transformdata, D3DTRANSFORM_CLIPPED, &offscreen); - ok(SUCCEEDED(hr), "Failed to transform vertices, hr %#x.\n", hr); - ok(offscreen == (D3DCLIP_BACK | D3DCLIP_RIGHT | D3DCLIP_TOP), "Offscreen is %x.\n", offscreen); + ok(SUCCEEDED(hr), "Failed to transform vertices, hr %#lx.\n", hr); + ok(offscreen == (D3DCLIP_BACK | D3DCLIP_RIGHT | D3DCLIP_TOP), "Offscreen is %lx.\n", offscreen);
transformdata.lpIn = cliptest + 2; hr = IDirect3DViewport2_TransformVertices(viewport, 1, &transformdata, D3DTRANSFORM_CLIPPED, &offscreen); - ok(SUCCEEDED(hr), "Failed to transform vertices, hr %#x.\n", hr); - ok(offscreen == (D3DCLIP_BOTTOM | D3DCLIP_LEFT), "Offscreen is %x.\n", offscreen); + ok(SUCCEEDED(hr), "Failed to transform vertices, hr %#lx.\n", hr); + ok(offscreen == (D3DCLIP_BOTTOM | D3DCLIP_LEFT), "Offscreen is %lx.\n", offscreen); offscreen = 0xdeadbeef; hr = IDirect3DViewport2_TransformVertices(viewport, 2, &transformdata, D3DTRANSFORM_CLIPPED, &offscreen); - ok(SUCCEEDED(hr), "Failed to transform vertices, hr %#x.\n", hr); - ok(offscreen == (D3DCLIP_BOTTOM | D3DCLIP_LEFT), "Offscreen is %x.\n", offscreen); + ok(SUCCEEDED(hr), "Failed to transform vertices, hr %#lx.\n", hr); + ok(offscreen == (D3DCLIP_BOTTOM | D3DCLIP_LEFT), "Offscreen is %lx.\n", offscreen);
transformdata.lpIn = cliptest + 3; hr = IDirect3DViewport2_TransformVertices(viewport, 1, &transformdata, D3DTRANSFORM_CLIPPED, &offscreen); - ok(SUCCEEDED(hr), "Failed to transform vertices, hr %#x.\n", hr); - ok(offscreen == (D3DCLIP_FRONT | D3DCLIP_BOTTOM | D3DCLIP_LEFT), "Offscreen is %x.\n", offscreen); + ok(SUCCEEDED(hr), "Failed to transform vertices, hr %#lx.\n", hr); + ok(offscreen == (D3DCLIP_FRONT | D3DCLIP_BOTTOM | D3DCLIP_LEFT), "Offscreen is %lx.\n", offscreen);
transformdata.lpIn = offscreentest; transformdata.dwInSize = sizeof(offscreentest[0]); @@ -14551,21 +14551,21 @@ static void test_transform_vertices(void) vp_data.dvScaleX = 1.0f; vp_data.dvScaleY = 1.0f; hr = IDirect3DViewport2_SetViewport(viewport, &vp_data); - ok(SUCCEEDED(hr), "Failed to set viewport, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set viewport, hr %#lx.\n", hr); offscreen = 0xdeadbeef; hr = IDirect3DViewport2_TransformVertices(viewport, 1, &transformdata, D3DTRANSFORM_CLIPPED, &offscreen); - ok(SUCCEEDED(hr), "Failed to transform vertices, hr %#x.\n", hr); - ok(!offscreen, "Offscreen is %x.\n", offscreen); + ok(SUCCEEDED(hr), "Failed to transform vertices, hr %#lx.\n", hr); + ok(!offscreen, "Offscreen is %lx.\n", offscreen);
vp_data.dwWidth = 256; vp_data.dwHeight = 256; hr = IDirect3DViewport2_SetViewport(viewport, &vp_data); - ok(SUCCEEDED(hr), "Failed to set viewport, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set viewport, hr %#lx.\n", hr); hr = IDirect3DViewport2_TransformVertices(viewport, 1, &transformdata, D3DTRANSFORM_CLIPPED, &offscreen); - ok(SUCCEEDED(hr), "Failed to transform vertices, hr %#x.\n", hr); - ok(offscreen == D3DCLIP_RIGHT, "Offscreen is %x.\n", offscreen); + ok(SUCCEEDED(hr), "Failed to transform vertices, hr %#lx.\n", hr); + ok(offscreen == D3DCLIP_RIGHT, "Offscreen is %lx.\n", offscreen);
/* Test the effect of Matrices. * @@ -14581,20 +14581,20 @@ static void test_transform_vertices(void) vp_data.dvMinZ = 0.0f; vp_data.dvMaxZ = 1.0f; hr = IDirect3DViewport2_SetViewport(viewport, &vp_data); - ok(SUCCEEDED(hr), "Failed to set viewport, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set viewport, hr %#lx.\n", hr);
hr = IDirect3DDevice3_SetTransform(device, D3DTRANSFORMSTATE_WORLD, &mat_translate1); - ok(SUCCEEDED(hr), "Failed to set world transform, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set world transform, hr %#lx.\n", hr); hr = IDirect3DDevice3_SetTransform(device, D3DTRANSFORMSTATE_VIEW, &mat_scale); - ok(SUCCEEDED(hr), "Failed to set world transform, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set world transform, hr %#lx.\n", hr); hr = IDirect3DDevice3_SetTransform(device, D3DTRANSFORMSTATE_PROJECTION, &mat_translate2); - ok(SUCCEEDED(hr), "Failed to set world transform, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set world transform, hr %#lx.\n", hr);
transformdata.lpIn = position_tests; transformdata.dwInSize = sizeof(position_tests[0]); hr = IDirect3DViewport2_TransformVertices(viewport, ARRAY_SIZE(position_tests), &transformdata, D3DTRANSFORM_UNCLIPPED, &offscreen); - ok(SUCCEEDED(hr), "Failed to transform vertices, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to transform vertices, hr %#lx.\n", hr);
for (i = 0; i < ARRAY_SIZE(position_tests); ++i) { @@ -14613,48 +14613,48 @@ static void test_transform_vertices(void) offscreen = 0xdeadbeef; hr = IDirect3DViewport2_TransformVertices(viewport, ARRAY_SIZE(position_tests), &transformdata, 0, &offscreen); - ok(hr == DDERR_INVALIDPARAMS, "TransformVertices returned %#x.\n", hr); - ok(offscreen == 0xdeadbeef, "Offscreen is %x.\n", offscreen); + ok(hr == DDERR_INVALIDPARAMS, "TransformVertices returned %#lx.\n", hr); + ok(offscreen == 0xdeadbeef, "Offscreen is %lx.\n", offscreen);
/* NULL transform data. */ hr = IDirect3DViewport2_TransformVertices(viewport, 1, NULL, D3DTRANSFORM_UNCLIPPED, &offscreen); - ok(hr == DDERR_INVALIDPARAMS, "TransformVertices returned %#x.\n", hr); - ok(offscreen == 0xdeadbeef, "Offscreen is %x.\n", offscreen); + ok(hr == DDERR_INVALIDPARAMS, "TransformVertices returned %#lx.\n", hr); + ok(offscreen == 0xdeadbeef, "Offscreen is %lx.\n", offscreen); hr = IDirect3DViewport2_TransformVertices(viewport, 0, NULL, D3DTRANSFORM_UNCLIPPED, &offscreen); - ok(hr == DDERR_INVALIDPARAMS, "TransformVertices returned %#x.\n", hr); - ok(offscreen == 0xdeadbeef, "Offscreen is %x.\n", offscreen); + ok(hr == DDERR_INVALIDPARAMS, "TransformVertices returned %#lx.\n", hr); + ok(offscreen == 0xdeadbeef, "Offscreen is %lx.\n", offscreen);
/* NULL transform data and NULL dwOffscreen. * * Valid transform data + NULL dwOffscreen -> crash. */ hr = IDirect3DViewport2_TransformVertices(viewport, 1, NULL, D3DTRANSFORM_UNCLIPPED, NULL); - ok(hr == DDERR_INVALIDPARAMS, "TransformVertices returned %#x.\n", hr); + ok(hr == DDERR_INVALIDPARAMS, "TransformVertices returned %#lx.\n", hr);
/* No vertices. */ hr = IDirect3DViewport2_TransformVertices(viewport, 0, &transformdata, D3DTRANSFORM_UNCLIPPED, &offscreen); - ok(SUCCEEDED(hr), "Failed to transform vertices, hr %#x.\n", hr); - ok(!offscreen, "Offscreen is %x.\n", offscreen); + ok(SUCCEEDED(hr), "Failed to transform vertices, hr %#lx.\n", hr); + ok(!offscreen, "Offscreen is %lx.\n", offscreen); hr = IDirect3DViewport2_TransformVertices(viewport, 0, &transformdata, D3DTRANSFORM_CLIPPED, &offscreen); - ok(SUCCEEDED(hr), "Failed to transform vertices, hr %#x.\n", hr); - ok(offscreen == ~0U, "Offscreen is %x.\n", offscreen); + ok(SUCCEEDED(hr), "Failed to transform vertices, hr %#lx.\n", hr); + ok(offscreen == ~0U, "Offscreen is %lx.\n", offscreen);
/* Invalid sizes. */ offscreen = 0xdeadbeef; transformdata.dwSize = sizeof(transformdata) - 1; hr = IDirect3DViewport2_TransformVertices(viewport, 1, &transformdata, D3DTRANSFORM_UNCLIPPED, &offscreen); - ok(hr == DDERR_INVALIDPARAMS, "TransformVertices returned %#x.\n", hr); - ok(offscreen == 0xdeadbeef, "Offscreen is %x.\n", offscreen); + ok(hr == DDERR_INVALIDPARAMS, "TransformVertices returned %#lx.\n", hr); + ok(offscreen == 0xdeadbeef, "Offscreen is %lx.\n", offscreen); transformdata.dwSize = sizeof(transformdata) + 1; hr = IDirect3DViewport2_TransformVertices(viewport, 1, &transformdata, D3DTRANSFORM_UNCLIPPED, &offscreen); - ok(hr == DDERR_INVALIDPARAMS, "TransformVertices returned %#x.\n", hr); - ok(offscreen == 0xdeadbeef, "Offscreen is %x.\n", offscreen); + ok(hr == DDERR_INVALIDPARAMS, "TransformVertices returned %#lx.\n", hr); + ok(offscreen == 0xdeadbeef, "Offscreen is %lx.\n", offscreen);
/* NULL lpIn or lpOut -> crash, except when transforming 0 vertices. */ transformdata.dwSize = sizeof(transformdata); @@ -14663,8 +14663,8 @@ static void test_transform_vertices(void) offscreen = 0xdeadbeef; hr = IDirect3DViewport2_TransformVertices(viewport, 0, &transformdata, D3DTRANSFORM_CLIPPED, &offscreen); - ok(SUCCEEDED(hr), "Failed to transform vertices, hr %#x.\n", hr); - ok(offscreen == ~0U, "Offscreen is %x.\n", offscreen); + ok(SUCCEEDED(hr), "Failed to transform vertices, hr %#lx.\n", hr); + ok(offscreen == ~0U, "Offscreen is %lx.\n", offscreen);
/* Test how vertices are transformed during draws. */ vp_data.dwX = 20; @@ -14676,38 +14676,38 @@ static void test_transform_vertices(void) vp_data.dvMinZ = 0.0f; vp_data.dvMaxZ = 1.0f; hr = IDirect3DViewport3_SetViewport(viewport, &vp_data); - ok(SUCCEEDED(hr), "Failed to set viewport, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set viewport, hr %#lx.\n", hr); hr = IDirect3DDevice3_SetCurrentViewport(device, viewport); - ok(SUCCEEDED(hr), "Failed to activate the viewport, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to activate the viewport, hr %#lx.\n", hr);
hr = IDirect3DViewport3_Clear2(viewport, 1, &clear_rect, D3DCLEAR_TARGET, 0x000000ff, 0.0f, 0); - ok(SUCCEEDED(hr), "Failed to clear viewport, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to clear viewport, hr %#lx.\n", hr);
hr = IDirect3DDevice3_BeginScene(device); - ok(SUCCEEDED(hr), "Failed to begin scene, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to begin scene, hr %#lx.\n", hr); hr = IDirect3DDevice3_DrawPrimitive(device, D3DPT_TRIANGLESTRIP, D3DFVF_XYZ | D3DFVF_DIFFUSE, quad, 4, 0); - ok(SUCCEEDED(hr), "Failed to draw, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to draw, hr %#lx.\n", hr); hr = IDirect3DDevice3_EndScene(device); - ok(SUCCEEDED(hr), "Failed to end scene, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to end scene, hr %#lx.\n", hr);
color = get_surface_color(rt, 128, 143); - ok(compare_color(color, 0x000000ff, 1), "Got unexpected color 0x%08x.\n", color); + ok(compare_color(color, 0x000000ff, 1), "Got unexpected color 0x%08lx.\n", color); color = get_surface_color(rt, 132, 143); - ok(compare_color(color, 0x000000ff, 1), "Got unexpected color 0x%08x.\n", color); + ok(compare_color(color, 0x000000ff, 1), "Got unexpected color 0x%08lx.\n", color); color = get_surface_color(rt, 128, 147); - ok(compare_color(color, 0x000000ff, 1), "Got unexpected color 0x%08x.\n", color); + ok(compare_color(color, 0x000000ff, 1), "Got unexpected color 0x%08lx.\n", color); color = get_surface_color(rt, 132, 147); - ok(compare_color(color, 0x00ff0000, 1), "Got unexpected color 0x%08x.\n", color); + ok(compare_color(color, 0x00ff0000, 1), "Got unexpected color 0x%08lx.\n", color);
color = get_surface_color(rt, 177, 217); - ok(compare_color(color, 0x00ff0000, 1), "Got unexpected color 0x%08x.\n", color); + ok(compare_color(color, 0x00ff0000, 1), "Got unexpected color 0x%08lx.\n", color); color = get_surface_color(rt, 181, 217); - ok(compare_color(color, 0x000000ff, 1), "Got unexpected color 0x%08x.\n", color); + ok(compare_color(color, 0x000000ff, 1), "Got unexpected color 0x%08lx.\n", color); color = get_surface_color(rt, 177, 221); - ok(compare_color(color, 0x000000ff, 1), "Got unexpected color 0x%08x.\n", color); + ok(compare_color(color, 0x000000ff, 1), "Got unexpected color 0x%08lx.\n", color); color = get_surface_color(rt, 181, 221); - ok(compare_color(color, 0x000000ff, 1), "Got unexpected color 0x%08x.\n", color); + ok(compare_color(color, 0x000000ff, 1), "Got unexpected color 0x%08lx.\n", color);
/* Test D3DVIEWPORT2 behavior. */ vp2_data.dwSize = sizeof(vp2_data); @@ -14722,12 +14722,12 @@ static void test_transform_vertices(void) vp2_data.dvMinZ = 0.0f; vp2_data.dvMaxZ = 2.0f; hr = IDirect3DViewport3_SetViewport2(viewport, &vp2_data); - ok(SUCCEEDED(hr), "Failed to set viewport data, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set viewport data, hr %#lx.\n", hr); transformdata.lpIn = position_tests; transformdata.lpOut = out; hr = IDirect3DViewport3_TransformVertices(viewport, ARRAY_SIZE(position_tests), &transformdata, D3DTRANSFORM_UNCLIPPED, &offscreen); - ok(SUCCEEDED(hr), "Failed to transform vertices, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to transform vertices, hr %#lx.\n", hr); for (i = 0; i < ARRAY_SIZE(position_tests); ++i) { static const struct vec4 cmp[] = @@ -14742,40 +14742,40 @@ static void test_transform_vertices(void) }
hr = IDirect3DViewport3_Clear2(viewport, 1, &clear_rect, D3DCLEAR_TARGET, 0x0000ff00, 0.0f, 0); - ok(SUCCEEDED(hr), "Failed to clear viewport, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to clear viewport, hr %#lx.\n", hr);
hr = IDirect3DDevice3_BeginScene(device); - ok(SUCCEEDED(hr), "Failed to begin scene, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to begin scene, hr %#lx.\n", hr); hr = IDirect3DDevice3_DrawPrimitive(device, D3DPT_TRIANGLESTRIP, D3DFVF_XYZ | D3DFVF_DIFFUSE, quad, 4, 0); - ok(SUCCEEDED(hr), "Failed to draw, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to draw, hr %#lx.\n", hr); hr = IDirect3DDevice3_EndScene(device); - ok(SUCCEEDED(hr), "Failed to end scene, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to end scene, hr %#lx.\n", hr);
color = get_surface_color(rt, 58, 118); - ok(compare_color(color, 0x0000ff00, 1), "Got unexpected color 0x%08x.\n", color); + ok(compare_color(color, 0x0000ff00, 1), "Got unexpected color 0x%08lx.\n", color); color = get_surface_color(rt, 62, 118); - ok(compare_color(color, 0x0000ff00, 1), "Got unexpected color 0x%08x.\n", color); + ok(compare_color(color, 0x0000ff00, 1), "Got unexpected color 0x%08lx.\n", color); color = get_surface_color(rt, 58, 122); - ok(compare_color(color, 0x0000ff00, 1), "Got unexpected color 0x%08x.\n", color); + ok(compare_color(color, 0x0000ff00, 1), "Got unexpected color 0x%08lx.\n", color); color = get_surface_color(rt, 62, 122); - ok(compare_color(color, 0x00ff0000, 1), "Got unexpected color 0x%08x.\n", color); + ok(compare_color(color, 0x00ff0000, 1), "Got unexpected color 0x%08lx.\n", color);
color = get_surface_color(rt, 157, 177); - ok(compare_color(color, 0x00ff0000, 1), "Got unexpected color 0x%08x.\n", color); + ok(compare_color(color, 0x00ff0000, 1), "Got unexpected color 0x%08lx.\n", color); color = get_surface_color(rt, 161, 177); - ok(compare_color(color, 0x0000ff00, 1), "Got unexpected color 0x%08x.\n", color); + ok(compare_color(color, 0x0000ff00, 1), "Got unexpected color 0x%08lx.\n", color); color = get_surface_color(rt, 157, 181); - ok(compare_color(color, 0x0000ff00, 1), "Got unexpected color 0x%08x.\n", color); + ok(compare_color(color, 0x0000ff00, 1), "Got unexpected color 0x%08lx.\n", color); color = get_surface_color(rt, 161, 181); - ok(compare_color(color, 0x0000ff00, 1), "Got unexpected color 0x%08x.\n", color); + ok(compare_color(color, 0x0000ff00, 1), "Got unexpected color 0x%08lx.\n", color);
hr = IDirect3DDevice3_SetTransform(device, D3DTRANSFORMSTATE_WORLD, &mat_identity); - ok(SUCCEEDED(hr), "Failed to set world transform, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set world transform, hr %#lx.\n", hr); hr = IDirect3DDevice3_SetTransform(device, D3DTRANSFORMSTATE_VIEW, &mat_identity); - ok(SUCCEEDED(hr), "Failed to set world transform, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set world transform, hr %#lx.\n", hr); hr = IDirect3DDevice3_SetTransform(device, D3DTRANSFORMSTATE_PROJECTION, &mat_transform3); - ok(SUCCEEDED(hr), "Failed to set world transform, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set world transform, hr %#lx.\n", hr);
vp2_data.dwX = 0.0; vp2_data.dwY = 0.0; @@ -14788,14 +14788,14 @@ static void test_transform_vertices(void) vp2_data.dvMinZ = 0.0f; vp2_data.dvMaxZ = 0.5f; hr = IDirect3DViewport3_SetViewport2(viewport, &vp2_data); - ok(SUCCEEDED(hr), "Failed to set viewport data, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set viewport data, hr %#lx.\n", hr); transformdata.lpIn = cliptest; transformdata.dwInSize = sizeof(cliptest[0]); offscreen = 0xdeadbeef; hr = IDirect3DViewport3_TransformVertices(viewport, ARRAY_SIZE(cliptest), &transformdata, D3DTRANSFORM_CLIPPED, &offscreen); - ok(SUCCEEDED(hr), "Failed to transform vertices, hr %#x.\n", hr); - ok(!offscreen, "Offscreen is %x.\n", offscreen); + ok(SUCCEEDED(hr), "Failed to transform vertices, hr %#lx.\n", hr); + ok(!offscreen, "Offscreen is %lx.\n", offscreen); for (i = 0; i < ARRAY_SIZE(cliptest); ++i) { static const D3DHVERTEX cmp_h[] = @@ -14809,14 +14809,14 @@ static void test_transform_vertices(void) && compare_float(U2(cmp_h[i]).hy, U2(out_h[i]).hy, 4096) && compare_float(U3(cmp_h[i]).hz, U3(out_h[i]).hz, 4096) && cmp_h[i].dwFlags == out_h[i].dwFlags, - "HVertex %u differs. Got %#x %f %f %f.\n", i, + "HVertex %u differs. Got %#lx %f %f %f.\n", i, out_h[i].dwFlags, U1(out_h[i]).hx, U2(out_h[i]).hy, U3(out_h[i]).hz); }
destroy_viewport(device, viewport); IDirectDrawSurface4_Release(rt); refcount = IDirect3DDevice3_Release(device); - ok(!refcount, "Device has %u references left.\n", refcount); + ok(!refcount, "Device has %lu references left.\n", refcount); DestroyWindow(window); }
@@ -14838,14 +14838,14 @@ static void test_display_mode_surface_pixel_format(void)
surface_desc.dwSize = sizeof(surface_desc); hr = IDirectDraw4_GetDisplayMode(ddraw, &surface_desc); - ok(SUCCEEDED(hr), "Failed to get display mode, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get display mode, hr %#lx.\n", hr); width = surface_desc.dwWidth; height = surface_desc.dwHeight;
window = CreateWindowA("static", "ddraw_test", WS_OVERLAPPEDWINDOW, 0, 0, width, height, NULL, NULL, NULL, NULL); hr = IDirectDraw4_SetCooperativeLevel(ddraw, window, DDSCL_EXCLUSIVE | DDSCL_FULLSCREEN); - ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#lx.\n", hr);
bpp = 0; if (SUCCEEDED(IDirectDraw4_SetDisplayMode(ddraw, width, height, 16, 0, 0))) @@ -14858,10 +14858,10 @@ static void test_display_mode_surface_pixel_format(void)
surface_desc.dwSize = sizeof(surface_desc); hr = IDirectDraw4_GetDisplayMode(ddraw, &surface_desc); - ok(SUCCEEDED(hr), "Failed to get display mode, hr %#x.\n", hr); - ok(surface_desc.dwWidth == width, "Got width %u, expected %u.\n", surface_desc.dwWidth, width); - ok(surface_desc.dwHeight == height, "Got height %u, expected %u.\n", surface_desc.dwHeight, height); - ok(U1(U4(surface_desc).ddpfPixelFormat).dwRGBBitCount == bpp, "Got bpp %u, expected %u.\n", + ok(SUCCEEDED(hr), "Failed to get display mode, hr %#lx.\n", hr); + ok(surface_desc.dwWidth == width, "Got width %lu, expected %u.\n", surface_desc.dwWidth, width); + ok(surface_desc.dwHeight == height, "Got height %lu, expected %u.\n", surface_desc.dwHeight, height); + ok(U1(U4(surface_desc).ddpfPixelFormat).dwRGBBitCount == bpp, "Got bpp %lu, expected %u.\n", U1(U4(surface_desc).ddpfPixelFormat).dwRGBBitCount, bpp);
memset(&surface_desc, 0, sizeof(surface_desc)); @@ -14870,14 +14870,14 @@ static void test_display_mode_surface_pixel_format(void) U5(surface_desc).dwBackBufferCount = 1; surface_desc.ddsCaps.dwCaps = DDSCAPS_COMPLEX | DDSCAPS_FLIP | DDSCAPS_PRIMARYSURFACE; hr = IDirectDraw4_CreateSurface(ddraw, &surface_desc, &surface, NULL); - ok(hr == D3D_OK, "Failed to create surface, hr %#x.\n", hr); + ok(hr == D3D_OK, "Failed to create surface, hr %#lx.\n", hr); hr = IDirectDrawSurface4_GetSurfaceDesc(surface, &surface_desc); - ok(SUCCEEDED(hr), "Failed to get surface desc, hr %#x.\n", hr); - ok(surface_desc.dwWidth == width, "Got width %u, expected %u.\n", surface_desc.dwWidth, width); - ok(surface_desc.dwHeight == height, "Got height %u, expected %u.\n", surface_desc.dwHeight, height); - ok(U4(surface_desc).ddpfPixelFormat.dwFlags == DDPF_RGB, "Got unexpected pixel format flags %#x.\n", + ok(SUCCEEDED(hr), "Failed to get surface desc, hr %#lx.\n", hr); + ok(surface_desc.dwWidth == width, "Got width %lu, expected %u.\n", surface_desc.dwWidth, width); + ok(surface_desc.dwHeight == height, "Got height %lu, expected %u.\n", surface_desc.dwHeight, height); + ok(U4(surface_desc).ddpfPixelFormat.dwFlags == DDPF_RGB, "Got unexpected pixel format flags %#lx.\n", U4(surface_desc).ddpfPixelFormat.dwFlags); - ok(U1(U4(surface_desc).ddpfPixelFormat).dwRGBBitCount == bpp, "Got bpp %u, expected %u.\n", + ok(U1(U4(surface_desc).ddpfPixelFormat).dwRGBBitCount == bpp, "Got bpp %lu, expected %u.\n", U1(U4(surface_desc).ddpfPixelFormat).dwRGBBitCount, bpp); IDirectDrawSurface4_Release(surface);
@@ -14888,17 +14888,17 @@ static void test_display_mode_surface_pixel_format(void) surface_desc.dwHeight = height; surface_desc.ddsCaps.dwCaps = DDSCAPS_OFFSCREENPLAIN; hr = IDirectDraw4_CreateSurface(ddraw, &surface_desc, &surface, NULL); - ok(hr == D3D_OK, "Failed to create surface, hr %#x.\n", hr); + ok(hr == D3D_OK, "Failed to create surface, hr %#lx.\n", hr); hr = IDirectDrawSurface4_GetSurfaceDesc(surface, &surface_desc); - ok(SUCCEEDED(hr), "Failed to get surface desc, hr %#x.\n", hr); - ok(U4(surface_desc).ddpfPixelFormat.dwFlags == DDPF_RGB, "Got unexpected pixel format flags %#x.\n", + ok(SUCCEEDED(hr), "Failed to get surface desc, hr %#lx.\n", hr); + ok(U4(surface_desc).ddpfPixelFormat.dwFlags == DDPF_RGB, "Got unexpected pixel format flags %#lx.\n", U4(surface_desc).ddpfPixelFormat.dwFlags); - ok(U1(U4(surface_desc).ddpfPixelFormat).dwRGBBitCount == bpp, "Got bpp %u, expected %u.\n", + ok(U1(U4(surface_desc).ddpfPixelFormat).dwRGBBitCount == bpp, "Got bpp %lu, expected %u.\n", U1(U4(surface_desc).ddpfPixelFormat).dwRGBBitCount, bpp); IDirectDrawSurface4_Release(surface);
refcount = IDirectDraw4_Release(ddraw); - ok(!refcount, "DirectDraw has %u references left.\n", refcount); + ok(!refcount, "DirectDraw has %lu references left.\n", refcount); DestroyWindow(window); }
@@ -14956,7 +14956,7 @@ static void test_surface_desc_size(void) return; } hr = IDirectDraw4_SetCooperativeLevel(ddraw, NULL, DDSCL_NORMAL); - ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#lx.\n", hr);
for (i = 0; i < ARRAY_SIZE(surface_caps); ++i) { @@ -14972,9 +14972,9 @@ static void test_surface_desc_size(void) continue; } hr = IDirectDrawSurface_QueryInterface(surface4, &IID_IDirectDrawSurface, (void **)&surface); - ok(hr == DD_OK, "Failed to query IDirectDrawSurface, hr %#x, type %s.\n", hr, surface_caps[i].name); + ok(hr == DD_OK, "Failed to query IDirectDrawSurface, hr %#lx, type %s.\n", hr, surface_caps[i].name); hr = IDirectDrawSurface_QueryInterface(surface4, &IID_IDirectDrawSurface3, (void **)&surface3); - ok(hr == DD_OK, "Failed to query IDirectDrawSurface3, hr %#x, type %s.\n", hr, surface_caps[i].name); + ok(hr == DD_OK, "Failed to query IDirectDrawSurface3, hr %#lx, type %s.\n", hr, surface_caps[i].name);
/* GetSurfaceDesc() */ for (j = 0; j < ARRAY_SIZE(desc_sizes); ++j) @@ -14983,21 +14983,21 @@ static void test_surface_desc_size(void) desc.dwSize = desc_sizes[j]; expected_hr = desc.dwSize == sizeof(DDSURFACEDESC) ? DD_OK : DDERR_INVALIDPARAMS; hr = IDirectDrawSurface_GetSurfaceDesc(surface, &desc.desc1); - ok(hr == expected_hr, "Got hr %#x, expected %#x, dwSize %u, type %s.\n", + ok(hr == expected_hr, "Got hr %#lx, expected %#lx, dwSize %u, type %s.\n", hr, expected_hr, desc_sizes[j], surface_caps[i].name);
memset(&desc, 0, sizeof(desc)); desc.dwSize = desc_sizes[j]; expected_hr = desc.dwSize == sizeof(DDSURFACEDESC) ? DD_OK : DDERR_INVALIDPARAMS; hr = IDirectDrawSurface3_GetSurfaceDesc(surface3, &desc.desc1); - ok(hr == expected_hr, "Got hr %#x, expected %#x, dwSize %u, type %s.\n", + ok(hr == expected_hr, "Got hr %#lx, expected %#lx, dwSize %u, type %s.\n", hr, expected_hr, desc_sizes[j], surface_caps[i].name);
memset(&desc, 0, sizeof(desc)); desc.dwSize = desc_sizes[j]; expected_hr = desc.dwSize == sizeof(DDSURFACEDESC2) ? DD_OK : DDERR_INVALIDPARAMS; hr = IDirectDrawSurface4_GetSurfaceDesc(surface4, &desc.desc2); - ok(hr == expected_hr, "Got hr %#x, expected %#x, dwSize %u, type %s.\n", + ok(hr == expected_hr, "Got hr %#lx, expected %#lx, dwSize %u, type %s.\n", hr, expected_hr, desc_sizes[j], surface_caps[i].name); }
@@ -15014,22 +15014,22 @@ static void test_surface_desc_size(void) desc.blob[sizeof(DDSURFACEDESC2)] = 0xef; hr = IDirectDrawSurface_Lock(surface, NULL, &desc.desc1, 0, 0); expected_hr = valid_size ? DD_OK : DDERR_INVALIDPARAMS; - ok(hr == expected_hr, "Got hr %#x, expected %#x, dwSize %u, type %s.\n", + ok(hr == expected_hr, "Got hr %#lx, expected %#lx, dwSize %u, type %s.\n", hr, expected_hr, desc_sizes[j], surface_caps[i].name); - ok(desc.dwSize == desc_sizes[j], "dwSize was changed from %u to %u, type %s.\n", + ok(desc.dwSize == desc_sizes[j], "dwSize was changed from %u to %lu, type %s.\n", desc_sizes[j], desc.dwSize, surface_caps[i].name); ok(desc.blob[sizeof(DDSURFACEDESC2)] == 0xef, "Got unexpected byte %02x, dwSize %u, type %s.\n", desc.blob[sizeof(DDSURFACEDESC2)], desc_sizes[j], surface_caps[i].name); if (SUCCEEDED(hr)) { - ok(desc.desc1.dwWidth == 128, "Got unexpected width %u, dwSize %u, type %s.\n", + ok(desc.desc1.dwWidth == 128, "Got unexpected width %lu, dwSize %u, type %s.\n", desc.desc1.dwWidth, desc_sizes[j], surface_caps[i].name); - ok(desc.desc1.dwHeight == 128, "Got unexpected height %u, dwSize %u, type %s.\n", + ok(desc.desc1.dwHeight == 128, "Got unexpected height %lu, dwSize %u, type %s.\n", desc.desc1.dwHeight, desc_sizes[j], surface_caps[i].name); expected_texture_stage = desc_sizes[j] >= sizeof(DDSURFACEDESC2) ? 0 : 0xdeadbeef; todo_wine_if(!expected_texture_stage) ok(desc.desc2.dwTextureStage == expected_texture_stage, - "Got unexpected texture stage %#x, dwSize %u, type %s.\n", + "Got unexpected texture stage %#lx, dwSize %u, type %s.\n", desc.desc2.dwTextureStage, desc_sizes[j], surface_caps[i].name); IDirectDrawSurface_Unlock(surface, NULL); } @@ -15040,22 +15040,22 @@ static void test_surface_desc_size(void) desc.blob[sizeof(DDSURFACEDESC2)] = 0xef; hr = IDirectDrawSurface3_Lock(surface3, NULL, &desc.desc1, 0, 0); expected_hr = valid_size ? DD_OK : DDERR_INVALIDPARAMS; - ok(hr == expected_hr, "Got hr %#x, expected %#x, dwSize %u, type %s.\n", + ok(hr == expected_hr, "Got hr %#lx, expected %#lx, dwSize %u, type %s.\n", hr, expected_hr, desc_sizes[j], surface_caps[i].name); - ok(desc.dwSize == desc_sizes[j], "dwSize was changed from %u to %u, type %s.\n", + ok(desc.dwSize == desc_sizes[j], "dwSize was changed from %u to %lu, type %s.\n", desc_sizes[j], desc.dwSize, surface_caps[i].name); ok(desc.blob[sizeof(DDSURFACEDESC2)] == 0xef, "Got unexpected byte %02x, dwSize %u, type %s.\n", desc.blob[sizeof(DDSURFACEDESC2)], desc_sizes[j], surface_caps[i].name); if (SUCCEEDED(hr)) { - ok(desc.desc1.dwWidth == 128, "Got unexpected width %u, dwSize %u, type %s.\n", + ok(desc.desc1.dwWidth == 128, "Got unexpected width %lu, dwSize %u, type %s.\n", desc.desc1.dwWidth, desc_sizes[j], surface_caps[i].name); - ok(desc.desc1.dwHeight == 128, "Got unexpected height %u, dwSize %u, type %s.\n", + ok(desc.desc1.dwHeight == 128, "Got unexpected height %lu, dwSize %u, type %s.\n", desc.desc1.dwHeight, desc_sizes[j], surface_caps[i].name); expected_texture_stage = desc_sizes[j] >= sizeof(DDSURFACEDESC2) ? 0 : 0xdeadbeef; todo_wine_if(!expected_texture_stage) ok(desc.desc2.dwTextureStage == expected_texture_stage, - "Got unexpected texture stage %#x, dwSize %u, type %s.\n", + "Got unexpected texture stage %#lx, dwSize %u, type %s.\n", desc.desc2.dwTextureStage, desc_sizes[j], surface_caps[i].name); IDirectDrawSurface3_Unlock(surface3, NULL); } @@ -15066,21 +15066,21 @@ static void test_surface_desc_size(void) desc.blob[sizeof(DDSURFACEDESC2)] = 0xef; hr = IDirectDrawSurface4_Lock(surface4, NULL, &desc.desc2, 0, 0); expected_hr = valid_size ? DD_OK : DDERR_INVALIDPARAMS; - ok(hr == expected_hr, "Got hr %#x, expected %#x, dwSize %u, type %s.\n", + ok(hr == expected_hr, "Got hr %#lx, expected %#lx, dwSize %u, type %s.\n", hr, expected_hr, desc_sizes[j], surface_caps[i].name); - ok(desc.dwSize == desc_sizes[j], "dwSize was changed from %u to %u, type %s.\n", + ok(desc.dwSize == desc_sizes[j], "dwSize was changed from %u to %lu, type %s.\n", desc_sizes[j], desc.dwSize, surface_caps[i].name); ok(desc.blob[sizeof(DDSURFACEDESC2)] == 0xef, "Got unexpected byte %02x, dwSize %u, type %s.\n", desc.blob[sizeof(DDSURFACEDESC2)], desc_sizes[j], surface_caps[i].name); if (SUCCEEDED(hr)) { - ok(desc.desc2.dwWidth == 128, "Got unexpected width %u, dwSize %u, type %s.\n", + ok(desc.desc2.dwWidth == 128, "Got unexpected width %lu, dwSize %u, type %s.\n", desc.desc2.dwWidth, desc_sizes[j], surface_caps[i].name); - ok(desc.desc2.dwHeight == 128, "Got unexpected height %u, dwSize %u, type %s.\n", + ok(desc.desc2.dwHeight == 128, "Got unexpected height %lu, dwSize %u, type %s.\n", desc.desc2.dwHeight, desc_sizes[j], surface_caps[i].name); expected_texture_stage = desc_sizes[j] >= sizeof(DDSURFACEDESC2) ? 0 : 0xdeadbeef; ok(desc.desc2.dwTextureStage == expected_texture_stage, - "Got unexpected texture stage %#x, dwSize %u, type %s.\n", + "Got unexpected texture stage %#lx, dwSize %u, type %s.\n", desc.desc2.dwTextureStage, desc_sizes[j], surface_caps[i].name); IDirectDrawSurface4_Unlock(surface4, NULL); } @@ -15099,17 +15099,17 @@ static void test_surface_desc_size(void) expected_hr = (desc.dwSize == sizeof(DDSURFACEDESC) || desc.dwSize == sizeof(DDSURFACEDESC2)) ? DD_OK : DDERR_INVALIDPARAMS; hr = IDirectDraw4_GetDisplayMode(ddraw, &desc.desc2); - ok(hr == expected_hr, "Got hr %#x, expected %#x, size %u.\n", hr, expected_hr, desc_sizes[j]); + ok(hr == expected_hr, "Got hr %#lx, expected %#lx, size %u.\n", hr, expected_hr, desc_sizes[j]); if (SUCCEEDED(hr)) { - ok(desc.dwSize == sizeof(DDSURFACEDESC2), "Wrong size %u for %u.\n", desc.dwSize, desc_sizes[j]); + ok(desc.dwSize == sizeof(DDSURFACEDESC2), "Wrong size %lu for %u.\n", desc.dwSize, desc_sizes[j]); ok(desc.blob[desc_sizes[j]] == 0xcc, "Overflow for size %u.\n", desc_sizes[j]); ok(desc.blob[desc_sizes[j] - 1] != 0xcc, "Struct not cleared for size %u.\n", desc_sizes[j]); } }
refcount = IDirectDraw4_Release(ddraw); - ok(!refcount, "DirectDraw has %u references left.\n", refcount); + ok(!refcount, "DirectDraw has %lu references left.\n", refcount); }
static void test_get_surface_from_dc(void) @@ -15128,7 +15128,7 @@ static void test_get_surface_from_dc(void) ddraw = create_ddraw(); ok(!!ddraw, "Failed to create a ddraw object.\n"); hr = IDirectDraw4_SetCooperativeLevel(ddraw, window, DDSCL_NORMAL); - ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#lx.\n", hr);
memset(&surface_desc, 0, sizeof(surface_desc)); surface_desc.dwSize = sizeof(surface_desc); @@ -15138,59 +15138,59 @@ static void test_get_surface_from_dc(void) surface_desc.ddsCaps.dwCaps = DDSCAPS_OFFSCREENPLAIN;
hr = IDirectDraw4_CreateSurface(ddraw, &surface_desc, &surface, NULL); - ok(SUCCEEDED(hr), "Failed to create surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create surface, hr %#lx.\n", hr); hr = IDirectDrawSurface4_QueryInterface(surface, &IID_IDirectDrawSurface, (void **)&surface1); - ok(SUCCEEDED(hr), "Failed to query IDirectDrawSurface interface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to query IDirectDrawSurface interface, hr %#lx.\n", hr);
refcount = get_refcount((IUnknown *)surface1); - ok(refcount == 1, "Got unexpected refcount %u.\n", refcount); + ok(refcount == 1, "Got unexpected refcount %lu.\n", refcount); refcount = get_refcount((IUnknown *)surface); - ok(refcount == 1, "Got unexpected refcount %u.\n", refcount); + ok(refcount == 1, "Got unexpected refcount %lu.\n", refcount);
hr = IDirectDrawSurface4_GetDC(surface, &dc); - ok(SUCCEEDED(hr), "Failed to get DC, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get DC, hr %#lx.\n", hr);
tmp = (void *)0xdeadbeef; device_dc = (void *)0xdeadbeef; hr = GetSurfaceFromDC(NULL, &tmp, &device_dc); - ok(hr == DDERR_NOTFOUND, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_NOTFOUND, "Got unexpected hr %#lx.\n", hr); ok(!tmp, "Got unexpected surface %p.\n", tmp); ok(!device_dc, "Got unexpected device_dc %p.\n", device_dc);
device_dc = (void *)0xdeadbeef; hr = GetSurfaceFromDC(dc, NULL, &device_dc); - ok(hr == E_INVALIDARG, "Got unexpected hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Got unexpected hr %#lx.\n", hr); ok(device_dc == (void *)0xdeadbeef, "Got unexpected device_dc %p.\n", device_dc);
tmp = (void *)0xdeadbeef; hr = GetSurfaceFromDC(dc, &tmp, NULL); - ok(hr == E_INVALIDARG, "Got unexpected hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Got unexpected hr %#lx.\n", hr); ok(!tmp, "Got unexpected surface %p.\n", tmp);
hr = GetSurfaceFromDC(dc, &tmp, &device_dc); - ok(SUCCEEDED(hr), "GetSurfaceFromDC failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "GetSurfaceFromDC failed, hr %#lx.\n", hr); ok(tmp == surface1, "Got unexpected surface %p, expected %p.\n", tmp, surface1); IDirectDrawSurface_Release(tmp);
ret = GetObjectType(device_dc); - todo_wine ok(ret == OBJ_DC, "Got unexpected object type %#x.\n", ret); + todo_wine ok(ret == OBJ_DC, "Got unexpected object type %#lx.\n", ret); ret = GetDeviceCaps(device_dc, TECHNOLOGY); - todo_wine ok(ret == DT_RASDISPLAY, "Got unexpected technology %#x.\n", ret); + todo_wine ok(ret == DT_RASDISPLAY, "Got unexpected technology %#lx.\n", ret);
hr = IDirectDraw4_GetSurfaceFromDC(ddraw, dc, NULL); - ok(hr == E_INVALIDARG, "Got unexpected hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Got unexpected hr %#lx.\n", hr);
hr = IDirectDraw4_GetSurfaceFromDC(ddraw, dc, (IDirectDrawSurface4 **)&tmp); - ok(SUCCEEDED(hr), "GetSurfaceFromDC failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "GetSurfaceFromDC failed, hr %#lx.\n", hr); ok(tmp == surface1, "Got unexpected surface %p, expected %p.\n", tmp, surface1);
refcount = get_refcount((IUnknown *)surface1); - ok(refcount == 2, "Got unexpected refcount %u.\n", refcount); + ok(refcount == 2, "Got unexpected refcount %lu.\n", refcount); refcount = get_refcount((IUnknown *)surface); - ok(refcount == 1, "Got unexpected refcount %u.\n", refcount); + ok(refcount == 1, "Got unexpected refcount %lu.\n", refcount);
hr = IDirectDrawSurface4_ReleaseDC(surface, dc); - ok(SUCCEEDED(hr), "ReleaseDC failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "ReleaseDC failed, hr %#lx.\n", hr);
IDirectDrawSurface_Release(tmp);
@@ -15200,20 +15200,20 @@ static void test_get_surface_from_dc(void) tmp = (void *)0xdeadbeef; device_dc = (void *)0xdeadbeef; hr = GetSurfaceFromDC(dc, &tmp, &device_dc); - ok(hr == DDERR_NOTFOUND, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_NOTFOUND, "Got unexpected hr %#lx.\n", hr); ok(!tmp, "Got unexpected surface %p.\n", tmp); ok(!device_dc, "Got unexpected device_dc %p.\n", device_dc);
tmp = (void *)0xdeadbeef; hr = IDirectDraw4_GetSurfaceFromDC(ddraw, dc, (IDirectDrawSurface4 **)&tmp); - ok(hr == DDERR_NOTFOUND, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_NOTFOUND, "Got unexpected hr %#lx.\n", hr); ok(!tmp, "Got unexpected surface %p.\n", tmp);
ok(DeleteDC(dc), "DeleteDC failed.\n");
tmp = (void *)0xdeadbeef; hr = IDirectDraw4_GetSurfaceFromDC(ddraw, NULL, (IDirectDrawSurface4 **)&tmp); - ok(hr == DDERR_NOTFOUND, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_NOTFOUND, "Got unexpected hr %#lx.\n", hr); ok(!tmp, "Got unexpected surface %p.\n", tmp);
IDirectDrawSurface4_Release(surface); @@ -15240,7 +15240,7 @@ static void test_ck_operation(void) ddraw = create_ddraw(); ok(!!ddraw, "Failed to create a ddraw object.\n"); hr = IDirectDraw4_SetCooperativeLevel(ddraw, window, DDSCL_NORMAL); - ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#lx.\n", hr);
memset(&surface_desc, 0, sizeof(surface_desc)); surface_desc.dwSize = sizeof(surface_desc); @@ -15254,16 +15254,16 @@ static void test_ck_operation(void) U3(U4(surface_desc).ddpfPixelFormat).dwGBitMask = 0x0000ff00; U4(U4(surface_desc).ddpfPixelFormat).dwBBitMask = 0x000000ff; hr = IDirectDraw4_CreateSurface(ddraw, &surface_desc, &dst, NULL); - ok(SUCCEEDED(hr), "Failed to create surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create surface, hr %#lx.\n", hr);
surface_desc.dwFlags |= DDSD_CKSRCBLT; surface_desc.ddckCKSrcBlt.dwColorSpaceLowValue = 0x00ff00ff; surface_desc.ddckCKSrcBlt.dwColorSpaceHighValue = 0x00ff00ff; hr = IDirectDraw4_CreateSurface(ddraw, &surface_desc, &src, NULL); - ok(SUCCEEDED(hr), "Failed to create surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create surface, hr %#lx.\n", hr);
hr = IDirectDrawSurface4_Lock(src, NULL, &surface_desc, DDLOCK_WAIT, NULL); - ok(SUCCEEDED(hr), "Failed to lock surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to lock surface, hr %#lx.\n", hr); ok(!(surface_desc.dwFlags & DDSD_LPSURFACE), "Surface desc has LPSURFACE Flags set.\n"); color = surface_desc.lpSurface; color[0] = 0x77010203; @@ -15271,33 +15271,33 @@ static void test_ck_operation(void) color[2] = 0x77ff00ff; color[3] = 0x00ff00ff; hr = IDirectDrawSurface4_Unlock(src, NULL); - ok(SUCCEEDED(hr), "Failed to unlock surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to unlock surface, hr %#lx.\n", hr);
for (i = 0; i < 2; ++i) { hr = IDirectDrawSurface4_Lock(dst, NULL, &surface_desc, DDLOCK_WAIT, NULL); - ok(SUCCEEDED(hr), "Failed to lock surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to lock surface, hr %#lx.\n", hr); color = surface_desc.lpSurface; color[0] = 0xcccccccc; color[1] = 0xcccccccc; color[2] = 0xcccccccc; color[3] = 0xcccccccc; hr = IDirectDrawSurface4_Unlock(dst, NULL); - ok(SUCCEEDED(hr), "Failed to unlock surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to unlock surface, hr %#lx.\n", hr);
if (i) { hr = IDirectDrawSurface4_BltFast(dst, 0, 0, src, NULL, DDBLTFAST_SRCCOLORKEY); - ok(SUCCEEDED(hr), "Failed to blit, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to blit, hr %#lx.\n", hr); } else { hr = IDirectDrawSurface4_Blt(dst, NULL, src, NULL, DDBLT_KEYSRC, NULL); - ok(SUCCEEDED(hr), "Failed to blit, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to blit, hr %#lx.\n", hr); }
hr = IDirectDrawSurface4_Lock(dst, NULL, &surface_desc, DDLOCK_WAIT | DDLOCK_READONLY, NULL); - ok(SUCCEEDED(hr), "Failed to lock surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to lock surface, hr %#lx.\n", hr); ok(!(surface_desc.dwFlags & DDSD_LPSURFACE), "Surface desc has LPSURFACE Flags set.\n"); color = surface_desc.lpSurface; /* Different behavior on some drivers / windows versions. Some versions ignore the X channel when @@ -15312,69 +15312,69 @@ static void test_ck_operation(void) && color[2] == 0xcccccccc && color[3] == 0xcccccccc) /* Nvidia */ || broken(color[0] == 0xff010203 && color[1] == 0xff010203 && color[2] == 0xcccccccc && color[3] == 0xcccccccc) /* Testbot */, - "Destination data after blitting is %08x %08x %08x %08x, i=%u.\n", + "Destination data after blitting is %08lx %08lx %08lx %08lx, i=%u.\n", color[0], color[1], color[2], color[3], i); hr = IDirectDrawSurface4_Unlock(dst, NULL); - ok(SUCCEEDED(hr), "Failed to unlock surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to unlock surface, hr %#lx.\n", hr); }
hr = IDirectDrawSurface4_GetColorKey(src, DDCKEY_SRCBLT, &ckey); - ok(SUCCEEDED(hr), "Failed to get color key, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get color key, hr %#lx.\n", hr); ok(ckey.dwColorSpaceLowValue == 0x00ff00ff && ckey.dwColorSpaceHighValue == 0x00ff00ff, - "Got unexpected color key low=%08x high=%08x.\n", ckey.dwColorSpaceLowValue, ckey.dwColorSpaceHighValue); + "Got unexpected color key low=%08lx high=%08lx.\n", ckey.dwColorSpaceLowValue, ckey.dwColorSpaceHighValue);
ckey.dwColorSpaceLowValue = ckey.dwColorSpaceHighValue = 0x0000ff00; hr = IDirectDrawSurface4_SetColorKey(src, DDCKEY_SRCBLT, &ckey); - ok(SUCCEEDED(hr), "Failed to set color key, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set color key, hr %#lx.\n", hr);
ckey.dwColorSpaceLowValue = ckey.dwColorSpaceHighValue = 0; hr = IDirectDrawSurface4_GetColorKey(src, DDCKEY_SRCBLT, &ckey); - ok(SUCCEEDED(hr), "Failed to get color key, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get color key, hr %#lx.\n", hr); ok(ckey.dwColorSpaceLowValue == 0x0000ff00 && ckey.dwColorSpaceHighValue == 0x0000ff00, - "Got unexpected color key low=%08x high=%08x.\n", ckey.dwColorSpaceLowValue, ckey.dwColorSpaceHighValue); + "Got unexpected color key low=%08lx high=%08lx.\n", ckey.dwColorSpaceLowValue, ckey.dwColorSpaceHighValue);
surface_desc.ddckCKSrcBlt.dwColorSpaceLowValue = 0; surface_desc.ddckCKSrcBlt.dwColorSpaceHighValue = 0; hr = IDirectDrawSurface4_GetSurfaceDesc(src, &surface_desc); - ok(SUCCEEDED(hr), "Failed to get surface desc, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get surface desc, hr %#lx.\n", hr); ok(surface_desc.ddckCKSrcBlt.dwColorSpaceLowValue == 0x0000ff00 && surface_desc.ddckCKSrcBlt.dwColorSpaceHighValue == 0x0000ff00, - "Got unexpected color key low=%08x high=%08x.\n", surface_desc.ddckCKSrcBlt.dwColorSpaceLowValue, + "Got unexpected color key low=%08lx high=%08lx.\n", surface_desc.ddckCKSrcBlt.dwColorSpaceLowValue, surface_desc.ddckCKSrcBlt.dwColorSpaceHighValue);
/* Test SetColorKey with dwColorSpaceHighValue < dwColorSpaceLowValue */ ckey.dwColorSpaceLowValue = 0x000000ff; ckey.dwColorSpaceHighValue = 0x00000000; hr = IDirectDrawSurface4_SetColorKey(src, DDCKEY_SRCBLT, &ckey); - ok(SUCCEEDED(hr), "Failed to set color key, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set color key, hr %#lx.\n", hr);
ckey.dwColorSpaceLowValue = ckey.dwColorSpaceHighValue = 0; hr = IDirectDrawSurface4_GetColorKey(src, DDCKEY_SRCBLT, &ckey); - ok(SUCCEEDED(hr), "Failed to get color key, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get color key, hr %#lx.\n", hr); ok(ckey.dwColorSpaceLowValue == 0x000000ff && ckey.dwColorSpaceHighValue == 0x000000ff, - "Got unexpected color key low=%08x high=%08x.\n", ckey.dwColorSpaceLowValue, ckey.dwColorSpaceHighValue); + "Got unexpected color key low=%08lx high=%08lx.\n", ckey.dwColorSpaceLowValue, ckey.dwColorSpaceHighValue);
ckey.dwColorSpaceLowValue = 0x000000ff; ckey.dwColorSpaceHighValue = 0x00000001; hr = IDirectDrawSurface4_SetColorKey(src, DDCKEY_SRCBLT, &ckey); - ok(SUCCEEDED(hr), "Failed to set color key, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set color key, hr %#lx.\n", hr);
ckey.dwColorSpaceLowValue = ckey.dwColorSpaceHighValue = 0; hr = IDirectDrawSurface4_GetColorKey(src, DDCKEY_SRCBLT, &ckey); - ok(SUCCEEDED(hr), "Failed to get color key, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get color key, hr %#lx.\n", hr); ok(ckey.dwColorSpaceLowValue == 0x000000ff && ckey.dwColorSpaceHighValue == 0x000000ff, - "Got unexpected color key low=%08x high=%08x.\n", ckey.dwColorSpaceLowValue, ckey.dwColorSpaceHighValue); + "Got unexpected color key low=%08lx high=%08lx.\n", ckey.dwColorSpaceLowValue, ckey.dwColorSpaceHighValue);
ckey.dwColorSpaceLowValue = 0x000000fe; ckey.dwColorSpaceHighValue = 0x000000fd; hr = IDirectDrawSurface4_SetColorKey(src, DDCKEY_SRCBLT, &ckey); - ok(SUCCEEDED(hr), "Failed to set color key, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set color key, hr %#lx.\n", hr);
ckey.dwColorSpaceLowValue = ckey.dwColorSpaceHighValue = 0; hr = IDirectDrawSurface4_GetColorKey(src, DDCKEY_SRCBLT, &ckey); - ok(SUCCEEDED(hr), "Failed to get color key, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get color key, hr %#lx.\n", hr); ok(ckey.dwColorSpaceLowValue == 0x000000fe && ckey.dwColorSpaceHighValue == 0x000000fe, - "Got unexpected color key low=%08x high=%08x.\n", ckey.dwColorSpaceLowValue, ckey.dwColorSpaceHighValue); + "Got unexpected color key low=%08lx high=%08lx.\n", ckey.dwColorSpaceLowValue, ckey.dwColorSpaceHighValue);
IDirectDrawSurface4_Release(src); IDirectDrawSurface4_Release(dst); @@ -15394,18 +15394,18 @@ static void test_ck_operation(void) U4(U4(surface_desc).ddpfPixelFormat).dwBBitMask = 0x000000ff; U5(U4(surface_desc).ddpfPixelFormat).dwRGBAlphaBitMask = 0xff000000; hr = IDirectDraw4_CreateSurface(ddraw, &surface_desc, &dst, NULL); - ok(SUCCEEDED(hr), "Failed to create surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create surface, hr %#lx.\n", hr); hr = IDirectDraw4_CreateSurface(ddraw, &surface_desc, &src, NULL); - ok(SUCCEEDED(hr), "Failed to create surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create surface, hr %#lx.\n", hr);
ckey.dwColorSpaceLowValue = 0x0000ff00; ckey.dwColorSpaceHighValue = 0x0000ff00; hr = IDirectDrawSurface4_SetColorKey(dst, DDCKEY_SRCBLT, &ckey); - ok(SUCCEEDED(hr), "Failed to set color key, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set color key, hr %#lx.\n", hr); ckey.dwColorSpaceLowValue = 0x00ff0000; ckey.dwColorSpaceHighValue = 0x00ff0000; hr = IDirectDrawSurface4_SetColorKey(dst, DDCKEY_DESTBLT, &ckey); - ok(SUCCEEDED(hr) || hr == DDERR_NOCOLORKEYHW, "Failed to set color key, hr %#x.\n", hr); + ok(SUCCEEDED(hr) || hr == DDERR_NOCOLORKEYHW, "Failed to set color key, hr %#lx.\n", hr); if (FAILED(hr)) { /* Nvidia reject dest keys, AMD allows them. This applies to vidmem and sysmem surfaces. */ @@ -15416,11 +15416,11 @@ static void test_ck_operation(void) ckey.dwColorSpaceLowValue = 0x000000ff; ckey.dwColorSpaceHighValue = 0x000000ff; hr = IDirectDrawSurface4_SetColorKey(src, DDCKEY_SRCBLT, &ckey); - ok(SUCCEEDED(hr), "Failed to set color key, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set color key, hr %#lx.\n", hr); ckey.dwColorSpaceLowValue = 0x000000aa; ckey.dwColorSpaceHighValue = 0x000000aa; hr = IDirectDrawSurface4_SetColorKey(src, DDCKEY_DESTBLT, &ckey); - ok(SUCCEEDED(hr), "Failed to set color key, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set color key, hr %#lx.\n", hr);
memset(&fx, 0, sizeof(fx)); fx.dwSize = sizeof(fx); @@ -15430,7 +15430,7 @@ static void test_ck_operation(void) fx.ddckDestColorkey.dwColorSpaceLowValue = 0x00001100;
hr = IDirectDrawSurface4_Lock(src, NULL, &surface_desc, DDLOCK_WAIT, NULL); - ok(SUCCEEDED(hr), "Failed to lock surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to lock surface, hr %#lx.\n", hr); color = surface_desc.lpSurface; color[0] = 0x000000ff; /* Applies to src blt key in src surface. */ color[1] = 0x000000aa; /* Applies to dst blt key in src surface. */ @@ -15439,77 +15439,77 @@ static void test_ck_operation(void) color[4] = 0x00001100; /* Src color key in ddbltfx. */ color[5] = 0x00110000; /* Dst color key in ddbltfx. */ hr = IDirectDrawSurface4_Unlock(src, NULL); - ok(SUCCEEDED(hr), "Failed to unlock surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to unlock surface, hr %#lx.\n", hr);
hr = IDirectDrawSurface4_Lock(dst, NULL, &surface_desc, DDLOCK_WAIT, NULL); - ok(SUCCEEDED(hr), "Failed to lock surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to lock surface, hr %#lx.\n", hr); color = surface_desc.lpSurface; color[0] = color[1] = color[2] = color[3] = color[4] = color[5] = 0x55555555; hr = IDirectDrawSurface4_Unlock(dst, NULL); - ok(SUCCEEDED(hr), "Failed to unlock surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to unlock surface, hr %#lx.\n", hr);
/* Test a blit without keying. */ hr = IDirectDrawSurface4_Blt(dst, NULL, src, NULL, 0, &fx); - ok(SUCCEEDED(hr), "Failed to blit, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to blit, hr %#lx.\n", hr);
hr = IDirectDrawSurface4_Lock(dst, NULL, &surface_desc, DDLOCK_WAIT, NULL); - ok(SUCCEEDED(hr), "Failed to lock surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to lock surface, hr %#lx.\n", hr); color = surface_desc.lpSurface; /* Should have copied src data unmodified to dst. */ ok(color[0] == 0x000000ff && color[1] == 0x000000aa && color[2] == 0x00ff0000 && color[3] == 0x0000ff00 && color[4] == 0x00001100 && color[5] == 0x00110000, - "Got unexpected content %08x %08x %08x %08x %08x %08x.\n", + "Got unexpected content %08lx %08lx %08lx %08lx %08lx %08lx.\n", color[0], color[1], color[2], color[3], color[4], color[5]);
color[0] = color[1] = color[2] = color[3] = color[4] = color[5] = 0x55555555; hr = IDirectDrawSurface4_Unlock(dst, NULL); - ok(SUCCEEDED(hr), "Failed to unlock surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to unlock surface, hr %#lx.\n", hr);
/* Src key. */ hr = IDirectDrawSurface4_Blt(dst, NULL, src, NULL, DDBLT_KEYSRC, &fx); - ok(SUCCEEDED(hr), "Failed to blit, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to blit, hr %#lx.\n", hr);
hr = IDirectDrawSurface4_Lock(dst, NULL, &surface_desc, DDLOCK_WAIT, NULL); - ok(SUCCEEDED(hr), "Failed to lock surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to lock surface, hr %#lx.\n", hr); color = surface_desc.lpSurface; /* Src key applied to color[0]. It is unmodified, the others are copied. */ ok(color[0] == 0x55555555 && color[1] == 0x000000aa && color[2] == 0x00ff0000 && color[3] == 0x0000ff00 && color[4] == 0x00001100 && color[5] == 0x00110000, - "Got unexpected content %08x %08x %08x %08x %08x %08x.\n", + "Got unexpected content %08lx %08lx %08lx %08lx %08lx %08lx.\n", color[0], color[1], color[2], color[3], color[4], color[5]);
color[0] = color[1] = color[2] = color[3] = color[4] = color[5] = 0x55555555; hr = IDirectDrawSurface4_Unlock(dst, NULL); - ok(SUCCEEDED(hr), "Failed to unlock surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to unlock surface, hr %#lx.\n", hr);
/* Src override. */ hr = IDirectDrawSurface4_Blt(dst, NULL, src, NULL, DDBLT_KEYSRCOVERRIDE, &fx); - ok(SUCCEEDED(hr), "Failed to blit, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to blit, hr %#lx.\n", hr);
hr = IDirectDrawSurface4_Lock(dst, NULL, &surface_desc, DDLOCK_WAIT, NULL); - ok(SUCCEEDED(hr), "Failed to lock surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to lock surface, hr %#lx.\n", hr); color = surface_desc.lpSurface; /* Override key applied to color[5]. It is unmodified, the others are copied. */ ok(color[0] == 0x000000ff && color[1] == 0x000000aa && color[2] == 0x00ff0000 && color[3] == 0x0000ff00 && color[4] == 0x00001100 && color[5] == 0x55555555, - "Got unexpected content %08x %08x %08x %08x %08x %08x.\n", + "Got unexpected content %08lx %08lx %08lx %08lx %08lx %08lx.\n", color[0], color[1], color[2], color[3], color[4], color[5]);
color[0] = color[1] = color[2] = color[3] = color[4] = color[5] = 0x55555555; hr = IDirectDrawSurface4_Unlock(dst, NULL); - ok(SUCCEEDED(hr), "Failed to unlock surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to unlock surface, hr %#lx.\n", hr);
/* Src override AND src key. That is not supposed to work. */ hr = IDirectDrawSurface4_Blt(dst, NULL, src, NULL, DDBLT_KEYSRC | DDBLT_KEYSRCOVERRIDE, &fx); - ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#lx.\n", hr);
hr = IDirectDrawSurface4_Lock(dst, NULL, &surface_desc, DDLOCK_WAIT, NULL); - ok(SUCCEEDED(hr), "Failed to lock surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to lock surface, hr %#lx.\n", hr); color = surface_desc.lpSurface; /* Ensure the destination was not changed. */ ok(color[0] == 0x55555555 && color[1] == 0x55555555 && color[2] == 0x55555555 && color[3] == 0x55555555 && color[4] == 0x55555555 && color[5] == 0x55555555, - "Got unexpected content %08x %08x %08x %08x %08x %08x.\n", + "Got unexpected content %08lx %08lx %08lx %08lx %08lx %08lx.\n", color[0], color[1], color[2], color[3], color[4], color[5]);
/* Use different dst colors for the dst key test. */ @@ -15520,19 +15520,19 @@ static void test_ck_operation(void) color[4] = 0x000000aa; /* Dest key in src surface. */ color[5] = 0x000000aa; /* Dest key in src surface. */ hr = IDirectDrawSurface4_Unlock(dst, NULL); - ok(SUCCEEDED(hr), "Failed to unlock surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to unlock surface, hr %#lx.\n", hr);
/* Dest key blit. The key is taken from the DESTINATION surface in v4! */ hr = IDirectDrawSurface4_Blt(dst, NULL, src, NULL, DDBLT_KEYDEST, &fx); - ok(SUCCEEDED(hr), "Failed to blit, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to blit, hr %#lx.\n", hr);
hr = IDirectDrawSurface4_Lock(dst, NULL, &surface_desc, DDLOCK_WAIT, NULL); - ok(SUCCEEDED(hr), "Failed to lock surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to lock surface, hr %#lx.\n", hr); color = surface_desc.lpSurface; /* Dst key applied to color[0,1], they are the only changed pixels. */ todo_wine ok(color[0] == 0x000000ff && color[1] == 0x000000aa && color[2] == 0x00001100 && color[3] == 0x00001100 && color[4] == 0x000000aa && color[5] == 0x000000aa, - "Got unexpected content %08x %08x %08x %08x %08x %08x.\n", + "Got unexpected content %08lx %08lx %08lx %08lx %08lx %08lx.\n", color[0], color[1], color[2], color[3], color[4], color[5]);
color[0] = 0x00ff0000; /* Dest key in dst surface. */ @@ -15542,28 +15542,28 @@ static void test_ck_operation(void) color[4] = 0x000000aa; /* Dest key in src surface. */ color[5] = 0x000000aa; /* Dest key in src surface. */ hr = IDirectDrawSurface4_Unlock(dst, NULL); - ok(SUCCEEDED(hr), "Failed to unlock surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to unlock surface, hr %#lx.\n", hr);
/* What happens with a QI'd older version of the interface? It takes the key * from the source surface. */ hr = IDirectDrawSurface4_QueryInterface(src, &IID_IDirectDrawSurface, (void **)&src1); - ok(SUCCEEDED(hr), "Failed to query IDirectDrawSurface interface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to query IDirectDrawSurface interface, hr %#lx.\n", hr); hr = IDirectDrawSurface4_QueryInterface(dst, &IID_IDirectDrawSurface, (void **)&dst1); - ok(SUCCEEDED(hr), "Failed to query IDirectDrawSurface interface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to query IDirectDrawSurface interface, hr %#lx.\n", hr);
hr = IDirectDrawSurface_Blt(dst1, NULL, src1, NULL, DDBLT_KEYDEST, &fx); - ok(SUCCEEDED(hr), "Failed to blit, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to blit, hr %#lx.\n", hr);
IDirectDrawSurface_Release(dst1); IDirectDrawSurface_Release(src1);
hr = IDirectDrawSurface7_Lock(dst, NULL, &surface_desc, DDLOCK_WAIT, NULL); - ok(SUCCEEDED(hr), "Failed to lock surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to lock surface, hr %#lx.\n", hr); color = surface_desc.lpSurface; /* Dst key applied to color[4,5], they are the only changed pixels. */ ok(color[0] == 0x00ff0000 && color[1] == 0x00ff0000 && color[2] == 0x00001100 && color[3] == 0x00001100 && color[4] == 0x00001100 && color[5] == 0x00110000, - "Got unexpected content %08x %08x %08x %08x %08x %08x.\n", + "Got unexpected content %08lx %08lx %08lx %08lx %08lx %08lx.\n", color[0], color[1], color[2], color[3], color[4], color[5]);
color[0] = 0x00ff0000; /* Dest key in dst surface. */ @@ -15573,19 +15573,19 @@ static void test_ck_operation(void) color[4] = 0x000000aa; /* Dest key in src surface. */ color[5] = 0x000000aa; /* Dest key in src surface. */ hr = IDirectDrawSurface7_Unlock(dst, NULL); - ok(SUCCEEDED(hr), "Failed to unlock surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to unlock surface, hr %#lx.\n", hr);
/* Dest override key blit. */ hr = IDirectDrawSurface4_Blt(dst, NULL, src, NULL, DDBLT_KEYDESTOVERRIDE, &fx); - ok(SUCCEEDED(hr), "Failed to blit, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to blit, hr %#lx.\n", hr);
hr = IDirectDrawSurface4_Lock(dst, NULL, &surface_desc, DDLOCK_WAIT, NULL); - ok(SUCCEEDED(hr), "Failed to lock surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to lock surface, hr %#lx.\n", hr); color = surface_desc.lpSurface; /* Dst key applied to color[2,3], they are the only changed pixels. */ ok(color[0] == 0x00ff0000 && color[1] == 0x00ff0000 && color[2] == 0x00ff0000 && color[3] == 0x0000ff00 && color[4] == 0x000000aa && color[5] == 0x000000aa, - "Got unexpected content %08x %08x %08x %08x %08x %08x.\n", + "Got unexpected content %08lx %08lx %08lx %08lx %08lx %08lx.\n", color[0], color[1], color[2], color[3], color[4], color[5]);
color[0] = 0x00ff0000; /* Dest key in dst surface. */ @@ -15595,38 +15595,38 @@ static void test_ck_operation(void) color[4] = 0x000000aa; /* Dest key in src surface. */ color[5] = 0x000000aa; /* Dest key in src surface. */ hr = IDirectDrawSurface4_Unlock(dst, NULL); - ok(SUCCEEDED(hr), "Failed to unlock surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to unlock surface, hr %#lx.\n", hr);
/* Dest override together with surface key. Supposed to fail. */ hr = IDirectDrawSurface4_Blt(dst, NULL, src, NULL, DDBLT_KEYDEST | DDBLT_KEYDESTOVERRIDE, &fx); - ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#lx.\n", hr);
hr = IDirectDrawSurface4_Lock(dst, NULL, &surface_desc, DDLOCK_WAIT, NULL); - ok(SUCCEEDED(hr), "Failed to lock surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to lock surface, hr %#lx.\n", hr); color = surface_desc.lpSurface; /* Destination is unchanged. */ ok(color[0] == 0x00ff0000 && color[1] == 0x00ff0000 && color[2] == 0x00001100 && color[3] == 0x00001100 && color[4] == 0x000000aa && color[5] == 0x000000aa, - "Got unexpected content %08x %08x %08x %08x %08x %08x.\n", + "Got unexpected content %08lx %08lx %08lx %08lx %08lx %08lx.\n", color[0], color[1], color[2], color[3], color[4], color[5]); hr = IDirectDrawSurface4_Unlock(dst, NULL); - ok(SUCCEEDED(hr), "Failed to unlock surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to unlock surface, hr %#lx.\n", hr);
/* Source and destination key. This is driver dependent. New HW treats it like * DDBLT_KEYSRC. Older HW and some software renderers apply both keys. */ if (0) { hr = IDirectDrawSurface4_Blt(dst, NULL, src, NULL, DDBLT_KEYDEST | DDBLT_KEYSRC, &fx); - ok(SUCCEEDED(hr), "Failed to blit, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to blit, hr %#lx.\n", hr);
hr = IDirectDrawSurface4_Lock(dst, NULL, &surface_desc, DDLOCK_WAIT, NULL); - ok(SUCCEEDED(hr), "Failed to lock surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to lock surface, hr %#lx.\n", hr); color = surface_desc.lpSurface; /* Color[0] is filtered by the src key, 2-5 are filtered by the dst key, if * the driver applies it. */ ok(color[0] == 0x00ff0000 && color[1] == 0x000000aa && color[2] == 0x00ff0000 && color[3] == 0x0000ff00 && color[4] == 0x00001100 && color[5] == 0x00110000, - "Got unexpected content %08x %08x %08x %08x %08x %08x.\n", + "Got unexpected content %08lx %08lx %08lx %08lx %08lx %08lx.\n", color[0], color[1], color[2], color[3], color[4], color[5]);
color[0] = 0x00ff0000; /* Dest key in dst surface. */ @@ -15636,55 +15636,55 @@ static void test_ck_operation(void) color[4] = 0x000000aa; /* Dest key in src surface. */ color[5] = 0x000000aa; /* Dest key in src surface. */ hr = IDirectDrawSurface4_Unlock(dst, NULL); - ok(SUCCEEDED(hr), "Failed to unlock surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to unlock surface, hr %#lx.\n", hr); }
/* Override keys without ddbltfx parameter fail */ hr = IDirectDrawSurface4_Blt(dst, NULL, src, NULL, DDBLT_KEYDESTOVERRIDE, NULL); - ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface4_Blt(dst, NULL, src, NULL, DDBLT_KEYSRCOVERRIDE, NULL); - ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#lx.\n", hr);
/* Try blitting without keys in the source surface. */ hr = IDirectDrawSurface4_SetColorKey(src, DDCKEY_SRCBLT, NULL); - ok(SUCCEEDED(hr), "Failed to set color key, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set color key, hr %#lx.\n", hr); hr = IDirectDrawSurface4_SetColorKey(src, DDCKEY_DESTBLT, NULL); - ok(SUCCEEDED(hr), "Failed to set color key, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set color key, hr %#lx.\n", hr);
/* That fails now. Do not bother to check that the data is unmodified. */ hr = IDirectDrawSurface4_Blt(dst, NULL, src, NULL, DDBLT_KEYSRC, &fx); - ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#lx.\n", hr);
/* Dest key blit still works, the destination surface key is used in v4. */ hr = IDirectDrawSurface4_Blt(dst, NULL, src, NULL, DDBLT_KEYDEST, &fx); - ok(SUCCEEDED(hr), "Failed to blit, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to blit, hr %#lx.\n", hr);
hr = IDirectDrawSurface4_Lock(dst, NULL, &surface_desc, DDLOCK_WAIT, NULL); - ok(SUCCEEDED(hr), "Failed to lock surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to lock surface, hr %#lx.\n", hr); color = surface_desc.lpSurface; /* Dst key applied to color[0,1], they are the only changed pixels. */ todo_wine ok(color[0] == 0x000000ff && color[1] == 0x000000aa && color[2] == 0x00001100 && color[3] == 0x00001100 && color[4] == 0x000000aa && color[5] == 0x000000aa, - "Got unexpected content %08x %08x %08x %08x %08x %08x.\n", + "Got unexpected content %08lx %08lx %08lx %08lx %08lx %08lx.\n", color[0], color[1], color[2], color[3], color[4], color[5]); hr = IDirectDrawSurface4_Unlock(dst, NULL); - ok(SUCCEEDED(hr), "Failed to unlock surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to unlock surface, hr %#lx.\n", hr);
/* Try blitting without keys in the destination surface. */ hr = IDirectDrawSurface4_SetColorKey(dst, DDCKEY_SRCBLT, NULL); - ok(SUCCEEDED(hr), "Failed to set color key, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set color key, hr %#lx.\n", hr); hr = IDirectDrawSurface4_SetColorKey(dst, DDCKEY_DESTBLT, NULL); - ok(SUCCEEDED(hr), "Failed to set color key, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set color key, hr %#lx.\n", hr);
/* This fails, as sanity would dictate. */ hr = IDirectDrawSurface4_Blt(dst, NULL, src, NULL, DDBLT_KEYDEST, &fx); - ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#lx.\n", hr);
done: IDirectDrawSurface4_Release(src); IDirectDrawSurface4_Release(dst); refcount = IDirectDraw4_Release(ddraw); - ok(!refcount, "DirectDraw has %u references left.\n", refcount); + ok(!refcount, "DirectDraw has %lu references left.\n", refcount); DestroyWindow(window); }
@@ -15711,7 +15711,7 @@ static void test_vb_refcount(void) }
hr = IDirect3DDevice3_GetDirect3D(device, &d3d); - ok(SUCCEEDED(hr), "Failed to get Direct3D3 interface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get Direct3D3 interface, hr %#lx.\n", hr);
prev_d3d_refcount = get_refcount((IUnknown *)d3d); prev_device_refcount = get_refcount((IUnknown *)device); @@ -15721,33 +15721,33 @@ static void test_vb_refcount(void) vb_desc.dwFVF = D3DFVF_XYZ; vb_desc.dwNumVertices = 4; hr = IDirect3D3_CreateVertexBuffer(d3d, &vb_desc, &vb, 0, NULL); - ok(SUCCEEDED(hr), "Failed to create vertex buffer, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create vertex buffer, hr %#lx.\n", hr);
cur_d3d_refcount = get_refcount((IUnknown *)d3d); cur_device_refcount = get_refcount((IUnknown *)device); - ok(cur_d3d_refcount == prev_d3d_refcount, "D3D object refcount changed from %u to %u.\n", + ok(cur_d3d_refcount == prev_d3d_refcount, "D3D object refcount changed from %lu to %lu.\n", prev_d3d_refcount, cur_d3d_refcount); - ok(cur_device_refcount == prev_device_refcount, "Device refcount changed from %u to %u.\n", + ok(cur_device_refcount == prev_device_refcount, "Device refcount changed from %lu to %lu.\n", prev_device_refcount, cur_device_refcount);
hr = IDirect3DVertexBuffer_QueryInterface(vb, &IID_IDirect3DVertexBuffer, (void **)&vb1); - ok(hr == DD_OK, "Failed to query IDirect3DVertexBuffer, hr %#x.\n", hr); + ok(hr == DD_OK, "Failed to query IDirect3DVertexBuffer, hr %#lx.\n", hr); IDirect3DVertexBuffer_Release(vb1);
hr = IDirect3DVertexBuffer_QueryInterface(vb, &IID_IDirect3DVertexBuffer7, (void **)&vb7); - ok(hr == E_NOINTERFACE, "Querying IDirect3DVertexBuffer7 returned unexpected hr %#x.\n", hr); + ok(hr == E_NOINTERFACE, "Querying IDirect3DVertexBuffer7 returned unexpected hr %#lx.\n", hr);
hr = IDirect3DVertexBuffer_QueryInterface(vb, &IID_IUnknown, (void **)&unk); - ok(hr == DD_OK, "Failed to query IUnknown, hr %#x.\n", hr); + ok(hr == DD_OK, "Failed to query IUnknown, hr %#lx.\n", hr); ok((IUnknown *)vb == unk, "IDirect3DVertexBuffer and IUnknown interface pointers don't match, %p != %p.\n", vb, unk); IUnknown_Release(unk);
refcount = IDirect3DVertexBuffer_Release(vb); - ok(!refcount, "Vertex buffer has %u references left.\n", refcount); + ok(!refcount, "Vertex buffer has %lu references left.\n", refcount); IDirect3D3_Release(d3d); refcount = IDirect3DDevice3_Release(device); - ok(!refcount, "Device has %u references left.\n", refcount); + ok(!refcount, "Device has %lu references left.\n", refcount); DestroyWindow(window); }
@@ -15826,7 +15826,7 @@ static void test_compute_sphere_visibility(void)
viewport = create_viewport(device, 0, 0, 640, 480); hr = IDirect3DDevice3_SetCurrentViewport(device, viewport); - ok(SUCCEEDED(hr), "Failed to set current viewport, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set current viewport, hr %#lx.\n", hr);
IDirect3DDevice3_SetTransform(device, D3DTRANSFORMSTATE_WORLD, &identity);
@@ -15837,17 +15837,17 @@ static void test_compute_sphere_visibility(void)
hr = IDirect3DDevice3_ComputeSphereVisibility(device, tests[i].center, tests[i].radius, tests[i].sphere_count, 0, result); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
for (j = 0; j < tests[i].sphere_count; ++j) todo_wine_if(tests[i].todo) - ok(result[j] == tests[i].expected[j], "Test %u sphere %u: expected %#x, got %#x.\n", + ok(result[j] == tests[i].expected[j], "Test %u sphere %u: expected %#lx, got %#lx.\n", i, j, tests[i].expected[j], result[j]); }
destroy_viewport(device, viewport); refcount = IDirect3DDevice3_Release(device); - ok(!refcount, "Device has %u references left.\n", refcount); + ok(!refcount, "Device has %lu references left.\n", refcount); DestroyWindow(window); }
@@ -15872,9 +15872,9 @@ static void test_texture_stages_limits(void) return; } hr = IDirect3DDevice3_GetDirect3D(device, &d3d); - ok(SUCCEEDED(hr), "Failed to get Direct3D interface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get Direct3D interface, hr %#lx.\n", hr); hr = IDirect3D3_QueryInterface(d3d, &IID_IDirectDraw4, (void **)&ddraw); - ok(SUCCEEDED(hr), "Failed to get DirectDraw interface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get DirectDraw interface, hr %#lx.\n", hr); IDirect3D3_Release(d3d);
memset(&surface_desc, 0, sizeof(surface_desc)); @@ -15884,25 +15884,25 @@ static void test_texture_stages_limits(void) surface_desc.dwWidth = 16; surface_desc.dwHeight = 16; hr = IDirectDraw4_CreateSurface(ddraw, &surface_desc, &surface, NULL); - ok(hr == DD_OK, "Failed to create surface, hr %#x.\n", hr); + ok(hr == DD_OK, "Failed to create surface, hr %#lx.\n", hr); hr = IDirectDrawSurface4_QueryInterface(surface, &IID_IDirect3DTexture2, (void **)&texture); - ok(SUCCEEDED(hr), "Failed to get texture interface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get texture interface, hr %#lx.\n", hr); IDirectDrawSurface4_Release(surface);
for (i = 0; i < 8; ++i) { hr = IDirect3DDevice3_SetTexture(device, i, texture); - ok(hr == D3D_OK, "Failed to set texture %u, hr %#x.\n", i, hr); + ok(hr == D3D_OK, "Failed to set texture %u, hr %#lx.\n", i, hr); hr = IDirect3DDevice3_SetTexture(device, i, NULL); - ok(hr == D3D_OK, "Failed to set texture %u, hr %#x.\n", i, hr); + ok(hr == D3D_OK, "Failed to set texture %u, hr %#lx.\n", i, hr); hr = IDirect3DDevice3_SetTextureStageState(device, i, D3DTSS_COLOROP, D3DTOP_ADD); - ok(hr == D3D_OK, "Failed to set texture stage state %u, hr %#x.\n", i, hr); + ok(hr == D3D_OK, "Failed to set texture stage state %u, hr %#lx.\n", i, hr); }
IDirectDraw4_Release(ddraw); IDirect3DTexture2_Release(texture); refcount = IDirect3DDevice3_Release(device); - ok(!refcount, "Device has %u references left.\n", refcount); + ok(!refcount, "Device has %lu references left.\n", refcount); DestroyWindow(window); }
@@ -15923,24 +15923,24 @@ static void test_set_render_state(void) }
hr = IDirect3DDevice3_SetRenderState(device, D3DRENDERSTATE_ZVISIBLE, TRUE); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirect3DDevice3_SetRenderState(device, D3DRENDERSTATE_ZVISIBLE, FALSE); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
hr = IDirect3DDevice3_SetRenderState(device, D3DRENDERSTATE_TEXTUREHANDLE, 0); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); state = 0xdeadbeef; hr = IDirect3DDevice3_GetRenderState(device, D3DRENDERSTATE_TEXTUREHANDLE, &state); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); - ok(!state, "Got unexpected render state %#x.\n", state); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); + ok(!state, "Got unexpected render state %#lx.\n", state); hr = IDirect3DDevice3_SetRenderState(device, D3DRENDERSTATE_TEXTUREMAPBLEND, D3DTBLEND_MODULATE); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirect3DDevice3_GetRenderState(device, D3DRENDERSTATE_TEXTUREMAPBLEND, &state); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); - ok(state == D3DTBLEND_MODULATE, "Got unexpected render state %#x.\n", state); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); + ok(state == D3DTBLEND_MODULATE, "Got unexpected render state %#lx.\n", state);
refcount = IDirect3DDevice3_Release(device); - ok(!refcount, "Device has %u references left.\n", refcount); + ok(!refcount, "Device has %lu references left.\n", refcount); DestroyWindow(window); }
@@ -16016,13 +16016,13 @@ static void test_map_synchronisation(void) }
hr = IDirect3DDevice3_GetDirect3D(device, &d3d); - ok(SUCCEEDED(hr), "Failed to get Direct3D3 interface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get Direct3D3 interface, hr %#lx.\n", hr);
hr = IDirect3DDevice3_GetRenderTarget(device, &rt); - ok(SUCCEEDED(hr), "Failed to get render target, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get render target, hr %#lx.\n", hr); viewport = create_viewport(device, 0, 0, 640, 480); hr = IDirect3DDevice3_SetCurrentViewport(device, viewport); - ok(SUCCEEDED(hr), "Failed to set current viewport, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set current viewport, hr %#lx.\n", hr);
tri_count = 0x1000;
@@ -16034,25 +16034,25 @@ static void test_map_synchronisation(void) vb_desc.dwFVF = D3DFVF_XYZ | D3DFVF_DIFFUSE; vb_desc.dwNumVertices = tri_count + 2; hr = IDirect3D3_CreateVertexBuffer(d3d, &vb_desc, &buffer, 0, NULL); - ok(SUCCEEDED(hr), "Failed to create vertex buffer, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create vertex buffer, hr %#lx.\n", hr); hr = IDirect3DVertexBuffer_Lock(buffer, DDLOCK_DISCARDCONTENTS, (void **)&quads, NULL); - ok(SUCCEEDED(hr), "Failed to lock vertex buffer, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to lock vertex buffer, hr %#lx.\n", hr); for (j = 0; j < vb_desc.dwNumVertices / 4; ++j) { quads[j] = quad1; } hr = IDirect3DVertexBuffer_Unlock(buffer); - ok(SUCCEEDED(hr), "Failed to unlock vertex buffer, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to unlock vertex buffer, hr %#lx.\n", hr);
/* Initial draw to initialise states, compile shaders, etc. */ hr = IDirect3DViewport3_Clear2(viewport, 1, &clear_rect, D3DCLEAR_TARGET, 0xff0000ff, 0.0f, 0); - ok(SUCCEEDED(hr), "Failed to clear, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to clear, hr %#lx.\n", hr); hr = IDirect3DDevice3_BeginScene(device); - ok(SUCCEEDED(hr), "Failed to begin scene, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to begin scene, hr %#lx.\n", hr); hr = IDirect3DDevice3_DrawPrimitiveVB(device, D3DPT_TRIANGLESTRIP, buffer, 0, vb_desc.dwNumVertices, 0); - ok(SUCCEEDED(hr), "Failed to draw, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to draw, hr %#lx.\n", hr); hr = IDirect3DDevice3_EndScene(device); - ok(SUCCEEDED(hr), "Failed to end scene, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to end scene, hr %#lx.\n", hr); /* Read the result to ensure the GPU has finished drawing. */ colour = get_surface_color(rt, 320, 240);
@@ -16060,25 +16060,25 @@ static void test_map_synchronisation(void) ret = QueryPerformanceCounter(&ts[0]); ok(ret, "Failed to read performance counter.\n"); hr = IDirect3DViewport3_Clear2(viewport, 1, &clear_rect, D3DCLEAR_TARGET, 0xff0000ff, 0.0f, 0); - ok(SUCCEEDED(hr), "Failed to clear, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to clear, hr %#lx.\n", hr); hr = IDirect3DDevice3_BeginScene(device); - ok(SUCCEEDED(hr), "Failed to begin scene, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to begin scene, hr %#lx.\n", hr); hr = IDirect3DDevice3_DrawPrimitiveVB(device, D3DPT_TRIANGLESTRIP, buffer, 0, vb_desc.dwNumVertices, 0); - ok(SUCCEEDED(hr), "Failed to draw, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to draw, hr %#lx.\n", hr); hr = IDirect3DDevice3_EndScene(device); - ok(SUCCEEDED(hr), "Failed to end scene, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to end scene, hr %#lx.\n", hr); colour = get_surface_color(rt, 320, 240); /* Time drawing a single triangle. */ ret = QueryPerformanceCounter(&ts[1]); ok(ret, "Failed to read performance counter.\n"); hr = IDirect3DViewport3_Clear2(viewport, 1, &clear_rect, D3DCLEAR_TARGET, 0xff0000ff, 0.0f, 0); - ok(SUCCEEDED(hr), "Failed to clear, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to clear, hr %#lx.\n", hr); hr = IDirect3DDevice3_BeginScene(device); - ok(SUCCEEDED(hr), "Failed to begin scene, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to begin scene, hr %#lx.\n", hr); hr = IDirect3DDevice3_DrawPrimitiveVB(device, D3DPT_TRIANGLESTRIP, buffer, 0, 3, 0); - ok(SUCCEEDED(hr), "Failed to draw, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to draw, hr %#lx.\n", hr); hr = IDirect3DDevice3_EndScene(device); - ok(SUCCEEDED(hr), "Failed to end scene, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to end scene, hr %#lx.\n", hr); colour = get_surface_color(rt, 320, 240); ret = QueryPerformanceCounter(&ts[2]); ok(ret, "Failed to read performance counter.\n"); @@ -16094,32 +16094,32 @@ static void test_map_synchronisation(void) for (i = 0; i < ARRAY_SIZE(tests); ++i) { hr = IDirect3D3_CreateVertexBuffer(d3d, &vb_desc, &buffer, 0, NULL); - ok(SUCCEEDED(hr), "Failed to create vertex buffer, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create vertex buffer, hr %#lx.\n", hr); hr = IDirect3DVertexBuffer_Lock(buffer, DDLOCK_DISCARDCONTENTS, (void **)&quads, NULL); - ok(SUCCEEDED(hr), "Failed to lock vertex buffer, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to lock vertex buffer, hr %#lx.\n", hr); for (j = 0; j < vb_desc.dwNumVertices / 4; ++j) { quads[j] = quad1; } hr = IDirect3DVertexBuffer_Unlock(buffer); - ok(SUCCEEDED(hr), "Failed to unlock vertex buffer, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to unlock vertex buffer, hr %#lx.\n", hr);
/* Start a draw operation. */ hr = IDirect3DViewport3_Clear2(viewport, 1, &clear_rect, D3DCLEAR_TARGET, 0xff0000ff, 0.0f, 0); - ok(SUCCEEDED(hr), "Failed to clear, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to clear, hr %#lx.\n", hr); hr = IDirect3DDevice3_BeginScene(device); - ok(SUCCEEDED(hr), "Failed to begin scene, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to begin scene, hr %#lx.\n", hr); hr = IDirect3DDevice3_DrawPrimitiveVB(device, D3DPT_TRIANGLESTRIP, buffer, 0, vb_desc.dwNumVertices, 0); - ok(SUCCEEDED(hr), "Failed to draw, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to draw, hr %#lx.\n", hr); hr = IDirect3DDevice3_EndScene(device); - ok(SUCCEEDED(hr), "Failed to end scene, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to end scene, hr %#lx.\n", hr);
/* Map the last quad while the draw is in progress. */ hr = IDirect3DVertexBuffer_Lock(buffer, DDLOCK_WAIT | tests[i].flags, (void **)&quads, NULL); - ok(SUCCEEDED(hr), "Failed to lock vertex buffer, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to lock vertex buffer, hr %#lx.\n", hr); quads[(vb_desc.dwNumVertices / 4) - 1] = quad2; hr = IDirect3DVertexBuffer_Unlock(buffer); - ok(SUCCEEDED(hr), "Failed to unlock vertex buffer, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to unlock vertex buffer, hr %#lx.\n", hr);
colour = get_surface_color(rt, 320, 240); unsynchronised = compare_color(colour, 0x00ffff00, 1); @@ -16133,7 +16133,7 @@ static void test_map_synchronisation(void) IDirectDrawSurface4_Release(rt); IDirect3D3_Release(d3d); refcount = IDirect3DDevice3_Release(device); - ok(!refcount, "Device has %u references left.\n", refcount); + ok(!refcount, "Device has %lu references left.\n", refcount); DestroyWindow(window); }
@@ -16192,19 +16192,19 @@ static void test_depth_readback(void) }
hr = IDirect3DDevice3_GetDirect3D(device, &d3d); - ok(SUCCEEDED(hr), "Failed to get Direct3D3 interface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get Direct3D3 interface, hr %#lx.\n", hr); hr = IDirect3D3_QueryInterface(d3d, &IID_IDirectDraw4, (void **)&ddraw); - ok(SUCCEEDED(hr), "Failed to get ddraw interface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get ddraw interface, hr %#lx.\n", hr);
hr = IDirect3DDevice3_GetRenderTarget(device, &rt); - ok(SUCCEEDED(hr), "Failed to get render target, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get render target, hr %#lx.\n", hr); viewport = create_viewport(device, 0, 0, 640, 480); hr = IDirect3DDevice3_SetCurrentViewport(device, viewport); - ok(SUCCEEDED(hr), "Failed to set current viewport, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set current viewport, hr %#lx.\n", hr);
ds = get_depth_stencil(device); hr = IDirectDrawSurface4_DeleteAttachedSurface(rt, 0, ds); - ok(SUCCEEDED(hr), "Failed to detach depth buffer, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to detach depth buffer, hr %#lx.\n", hr); IDirectDrawSurface4_Release(ds);
for (i = 0; i < ARRAY_SIZE(tests); ++i) @@ -16231,19 +16231,19 @@ static void test_depth_readback(void) }
hr = IDirectDrawSurface_AddAttachedSurface(rt, ds); - ok(SUCCEEDED(hr), "Failed to attach depth buffer, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to attach depth buffer, hr %#lx.\n", hr); hr = IDirect3DDevice3_SetRenderTarget(device, rt, 0); - ok(SUCCEEDED(hr), "Failed to set render target, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set render target, hr %#lx.\n", hr);
hr = IDirect3DViewport3_Clear2(viewport, 1, &clear_rect, D3DCLEAR_TARGET | D3DCLEAR_ZBUFFER, 0xff0000ff, 1.0f, 0); - ok(SUCCEEDED(hr), "Failed to clear, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to clear, hr %#lx.\n", hr); hr = IDirect3DDevice3_BeginScene(device); - ok(SUCCEEDED(hr), "Failed to begin scene, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to begin scene, hr %#lx.\n", hr); hr = IDirect3DDevice3_DrawPrimitive(device, D3DPT_TRIANGLESTRIP, D3DFVF_XYZ | D3DFVF_DIFFUSE, quad, 4, 0); - ok(SUCCEEDED(hr), "Failed to draw, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to draw, hr %#lx.\n", hr); hr = IDirect3DDevice3_EndScene(device); - ok(SUCCEEDED(hr), "Failed to end scene, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to end scene, hr %#lx.\n", hr);
all_pass = TRUE; for (y = 60; y < 480; y += 120) @@ -16254,7 +16254,7 @@ static void test_depth_readback(void) memset(&surface_desc, 0, sizeof(surface_desc)); surface_desc.dwSize = sizeof(surface_desc); hr = IDirectDrawSurface4_Lock(ds, &r, &surface_desc, DDLOCK_READONLY | DDLOCK_WAIT, NULL); - ok(SUCCEEDED(hr), "Failed to lock surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to lock surface, hr %#lx.\n", hr);
depth = *((DWORD *)surface_desc.lpSurface) & tests[i].z_mask; expected_depth = (x * (0.9 / 640.0) + y * (0.1 / 480.0)) * tests[i].z_mask; @@ -16268,13 +16268,13 @@ static void test_depth_readback(void) todo_wine_if(tests[i].todo && !compare_uint(expected_depth, depth, max_diff)) ok(compare_uint(expected_depth, depth, max_diff) || ddraw_is_nvidia(ddraw) || (ddraw_is_amd(ddraw) && !tests[i].s_depth && tests[i].z_mask == 0x00ffffff), - "Test %u: Got depth 0x%08x (diff %d), expected 0x%08x+/-%u, at %u, %u.\n", + "Test %u: Got depth 0x%08lx (diff %ld), expected 0x%08lx+/-%lu, at %u, %u.\n", i, depth, expected_depth - depth, expected_depth, max_diff, x, y); if (!compare_uint(expected_depth, depth, max_diff)) all_pass = FALSE;
hr = IDirectDrawSurface4_Unlock(ds, &r); - ok(SUCCEEDED(hr), "Failed to unlock surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to unlock surface, hr %#lx.\n", hr); } }
@@ -16282,7 +16282,7 @@ static void test_depth_readback(void) passed_fmts++;
hr = IDirectDrawSurface4_DeleteAttachedSurface(rt, 0, ds); - ok(SUCCEEDED(hr), "Failed to detach depth buffer, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to detach depth buffer, hr %#lx.\n", hr); IDirectDrawSurface4_Release(ds); }
@@ -16293,7 +16293,7 @@ static void test_depth_readback(void) IDirectDraw4_Release(ddraw); IDirect3D3_Release(d3d); refcount = IDirect3DDevice3_Release(device); - ok(!refcount, "Device has %u references left.\n", refcount); + ok(!refcount, "Device has %lu references left.\n", refcount); DestroyWindow(window); }
@@ -16320,19 +16320,19 @@ static void test_clear(void) }
hr = IDirect3DDevice3_GetDirect3D(device, &d3d); - ok(SUCCEEDED(hr), "Failed to get Direct3D3 interface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get Direct3D3 interface, hr %#lx.\n", hr); hr = IDirect3D3_QueryInterface(d3d, &IID_IDirectDraw4, (void **)&ddraw); - ok(SUCCEEDED(hr), "Failed to get ddraw interface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get ddraw interface, hr %#lx.\n", hr);
hr = IDirect3DDevice3_GetRenderTarget(device, &rt); - ok(SUCCEEDED(hr), "Failed to get render target, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get render target, hr %#lx.\n", hr);
viewport = create_viewport(device, 0, 0, 640, 480); hr = IDirect3DDevice3_SetCurrentViewport(device, viewport); - ok(SUCCEEDED(hr), "Failed to set current viewport, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set current viewport, hr %#lx.\n", hr);
hr = IDirect3DViewport3_Clear2(viewport, 1, &rect_full, D3DCLEAR_TARGET, 0xffffffff, 0.0, 0); - ok(SUCCEEDED(hr), "Failed to clear, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to clear, hr %#lx.\n", hr);
/* Positive x, negative y. */ U1(rect[0]).x1 = 0; @@ -16349,19 +16349,19 @@ static void test_clear(void) /* Clear 2 rectangles with one call. Unlike d3d8/9, the refrast does not * refuse negative rectangles, but it will not clear them either. */ hr = IDirect3DViewport3_Clear2(viewport, 2, rect, D3DCLEAR_TARGET, 0xffff0000, 0.0f, 0); - ok(SUCCEEDED(hr), "Failed to clear, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to clear, hr %#lx.\n", hr);
color = get_surface_color(rt, 160, 360); - ok(compare_color(color, 0x00ffffff, 0), "Clear rectangle 3 (pos, neg) has color 0x%08x.\n", color); + ok(compare_color(color, 0x00ffffff, 0), "Clear rectangle 3 (pos, neg) has color 0x%08lx.\n", color); color = get_surface_color(rt, 160, 120); - ok(compare_color(color, 0x00ff0000, 0), "Clear rectangle 1 (pos, pos) has color 0x%08x.\n", color); + ok(compare_color(color, 0x00ff0000, 0), "Clear rectangle 1 (pos, pos) has color 0x%08lx.\n", color); color = get_surface_color(rt, 480, 360); - ok(compare_color(color, 0x00ffffff, 0), "Clear rectangle 4 (NULL) has color 0x%08x.\n", color); + ok(compare_color(color, 0x00ffffff, 0), "Clear rectangle 4 (NULL) has color 0x%08lx.\n", color); color = get_surface_color(rt, 480, 120); - ok(compare_color(color, 0x00ffffff, 0), "Clear rectangle 4 (neg, neg) has color 0x%08x.\n", color); + ok(compare_color(color, 0x00ffffff, 0), "Clear rectangle 4 (neg, neg) has color 0x%08lx.\n", color);
hr = IDirect3DViewport3_Clear2(viewport, 1, &rect_full, D3DCLEAR_TARGET, 0xffffffff, 0.0, 0); - ok(SUCCEEDED(hr), "Failed to clear, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to clear, hr %#lx.\n", hr); /* negative x, negative y. * Also ignored, except on WARP, which clears the entire screen. */ U1(rect_negneg).x1 = 640; @@ -16369,123 +16369,123 @@ static void test_clear(void) U3(rect_negneg).x2 = 320; U4(rect_negneg).y2 = 0; hr = IDirect3DViewport3_Clear2(viewport, 1, &rect_negneg, D3DCLEAR_TARGET, 0xff00ff00, 0.0f, 0); - ok(SUCCEEDED(hr), "Failed to clear, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to clear, hr %#lx.\n", hr);
color = get_surface_color(rt, 160, 360); ok(compare_color(color, 0x00ffffff, 0) || broken(ddraw_is_warp(ddraw) && compare_color(color, 0x0000ff00, 0)), - "Got unexpected color 0x%08x.\n", color); + "Got unexpected color 0x%08lx.\n", color); color = get_surface_color(rt, 160, 120); ok(compare_color(color, 0x00ffffff, 0) || broken(ddraw_is_warp(ddraw) && compare_color(color, 0x0000ff00, 0)), - "Got unexpected color 0x%08x.\n", color); + "Got unexpected color 0x%08lx.\n", color); color = get_surface_color(rt, 480, 360); ok(compare_color(color, 0x00ffffff, 0) || broken(ddraw_is_warp(ddraw) && compare_color(color, 0x0000ff00, 0)), - "Got unexpected color 0x%08x.\n", color); + "Got unexpected color 0x%08lx.\n", color); color = get_surface_color(rt, 480, 120); ok(compare_color(color, 0x00ffffff, 0) || broken(ddraw_is_warp(ddraw) && compare_color(color, 0x0000ff00, 0)), - "Got unexpected color 0x%08x.\n", color); + "Got unexpected color 0x%08lx.\n", color);
/* Test how the viewport affects clears. */ hr = IDirect3DViewport3_Clear2(viewport, 1, &rect_full, D3DCLEAR_TARGET, 0xffffffff, 0.0f, 0); - ok(SUCCEEDED(hr), "Failed to clear, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to clear, hr %#lx.\n", hr);
viewport2 = create_viewport(device, 160, 120, 160, 120); hr = IDirect3DDevice3_SetCurrentViewport(device, viewport2); - ok(SUCCEEDED(hr), "Failed to set current viewport, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set current viewport, hr %#lx.\n", hr);
hr = IDirect3DViewport3_Clear2(viewport2, 1, &rect_full, D3DCLEAR_TARGET, 0xff0000ff, 0.0f, 0); - ok(SUCCEEDED(hr), "Failed to clear, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to clear, hr %#lx.\n", hr);
viewport3 = create_viewport(device, 320, 240, 320, 240); hr = IDirect3DDevice3_SetCurrentViewport(device, viewport3); - ok(SUCCEEDED(hr), "Failed to set current viewport, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set current viewport, hr %#lx.\n", hr);
U1(rect[0]).x1 = 160; U2(rect[0]).y1 = 120; U3(rect[0]).x2 = 480; U4(rect[0]).y2 = 360; hr = IDirect3DViewport3_Clear2(viewport3, 1, &rect[0], D3DCLEAR_TARGET, 0xff00ff00, 0.0f, 0); - ok(SUCCEEDED(hr), "Failed to clear, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to clear, hr %#lx.\n", hr);
hr = IDirect3DDevice3_SetCurrentViewport(device, viewport); - ok(SUCCEEDED(hr), "Failed to set current viewport, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set current viewport, hr %#lx.\n", hr);
color = get_surface_color(rt, 158, 118); - ok(compare_color(color, 0x00ffffff, 0), "(158, 118) has color 0x%08x.\n", color); + ok(compare_color(color, 0x00ffffff, 0), "(158, 118) has color 0x%08lx.\n", color); color = get_surface_color(rt, 162, 118); - ok(compare_color(color, 0x00ffffff, 0), "(162, 118) has color 0x%08x.\n", color); + ok(compare_color(color, 0x00ffffff, 0), "(162, 118) has color 0x%08lx.\n", color); color = get_surface_color(rt, 158, 122); - ok(compare_color(color, 0x00ffffff, 0), "(158, 122) has color 0x%08x.\n", color); + ok(compare_color(color, 0x00ffffff, 0), "(158, 122) has color 0x%08lx.\n", color); color = get_surface_color(rt, 162, 122); - ok(compare_color(color, 0x000000ff, 0), "(162, 122) has color 0x%08x.\n", color); + ok(compare_color(color, 0x000000ff, 0), "(162, 122) has color 0x%08lx.\n", color);
color = get_surface_color(rt, 318, 238); - ok(compare_color(color, 0x000000ff, 0), "(318, 238) has color 0x%08x.\n", color); + ok(compare_color(color, 0x000000ff, 0), "(318, 238) has color 0x%08lx.\n", color); color = get_surface_color(rt, 322, 238); - ok(compare_color(color, 0x00ffffff, 0), "(322, 328) has color 0x%08x.\n", color); + ok(compare_color(color, 0x00ffffff, 0), "(322, 328) has color 0x%08lx.\n", color); color = get_surface_color(rt, 318, 242); - ok(compare_color(color, 0x00ffffff, 0), "(318, 242) has color 0x%08x.\n", color); + ok(compare_color(color, 0x00ffffff, 0), "(318, 242) has color 0x%08lx.\n", color); color = get_surface_color(rt, 322, 242); - ok(compare_color(color, 0x0000ff00, 0), "(322, 242) has color 0x%08x.\n", color); + ok(compare_color(color, 0x0000ff00, 0), "(322, 242) has color 0x%08lx.\n", color);
color = get_surface_color(rt, 478, 358); - ok(compare_color(color, 0x0000ff00, 0), "(478, 358) has color 0x%08x.\n", color); + ok(compare_color(color, 0x0000ff00, 0), "(478, 358) has color 0x%08lx.\n", color); color = get_surface_color(rt, 482, 358); - ok(compare_color(color, 0x00ffffff, 0), "(482, 358) has color 0x%08x.\n", color); + ok(compare_color(color, 0x00ffffff, 0), "(482, 358) has color 0x%08lx.\n", color); color = get_surface_color(rt, 478, 362); - ok(compare_color(color, 0x00ffffff, 0), "(478, 362) has color 0x%08x.\n", color); + ok(compare_color(color, 0x00ffffff, 0), "(478, 362) has color 0x%08lx.\n", color); color = get_surface_color(rt, 482, 362); - ok(compare_color(color, 0x00ffffff, 0), "(482, 362) has color 0x%08x.\n", color); + ok(compare_color(color, 0x00ffffff, 0), "(482, 362) has color 0x%08lx.\n", color);
/* The clear rectangle is rendertarget absolute, not relative to the * viewport. */ hr = IDirect3DViewport3_Clear2(viewport, 1, &rect_full, D3DCLEAR_TARGET, 0xffffffff, 0.0f, 0); - ok(SUCCEEDED(hr), "Failed to clear, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to clear, hr %#lx.\n", hr); U1(rect[0]).x1 = 330; U2(rect[0]).y1 = 250; U3(rect[0]).x2 = 340; U4(rect[0]).y2 = 260; hr = IDirect3DViewport3_Clear2(viewport3, 1, &rect[0], D3DCLEAR_TARGET, 0xff00ff00, 0.0f, 0); - ok(SUCCEEDED(hr), "Failed to clear, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to clear, hr %#lx.\n", hr);
color = get_surface_color(rt, 328, 248); - ok(compare_color(color, 0x00ffffff, 0), "(328, 248) has color 0x%08x.\n", color); + ok(compare_color(color, 0x00ffffff, 0), "(328, 248) has color 0x%08lx.\n", color); color = get_surface_color(rt, 332, 248); - ok(compare_color(color, 0x00ffffff, 0), "(332, 248) has color 0x%08x.\n", color); + ok(compare_color(color, 0x00ffffff, 0), "(332, 248) has color 0x%08lx.\n", color); color = get_surface_color(rt, 328, 252); - ok(compare_color(color, 0x00ffffff, 0), "(328, 252) has color 0x%08x.\n", color); + ok(compare_color(color, 0x00ffffff, 0), "(328, 252) has color 0x%08lx.\n", color); color = get_surface_color(rt, 332, 252); - ok(compare_color(color, 0x0000ff00, 0), "(332, 252) has color 0x%08x.\n", color); + ok(compare_color(color, 0x0000ff00, 0), "(332, 252) has color 0x%08lx.\n", color);
color = get_surface_color(rt, 338, 248); - ok(compare_color(color, 0x00ffffff, 0), "(338, 248) has color 0x%08x.\n", color); + ok(compare_color(color, 0x00ffffff, 0), "(338, 248) has color 0x%08lx.\n", color); color = get_surface_color(rt, 342, 248); - ok(compare_color(color, 0x00ffffff, 0), "(342, 248) has color 0x%08x.\n", color); + ok(compare_color(color, 0x00ffffff, 0), "(342, 248) has color 0x%08lx.\n", color); color = get_surface_color(rt, 338, 252); - ok(compare_color(color, 0x0000ff00, 0), "(338, 252) has color 0x%08x.\n", color); + ok(compare_color(color, 0x0000ff00, 0), "(338, 252) has color 0x%08lx.\n", color); color = get_surface_color(rt, 342, 252); - ok(compare_color(color, 0x00ffffff, 0), "(342, 252) has color 0x%08x.\n", color); + ok(compare_color(color, 0x00ffffff, 0), "(342, 252) has color 0x%08lx.\n", color);
color = get_surface_color(rt, 328, 258); - ok(compare_color(color, 0x00ffffff, 0), "(328, 258) has color 0x%08x.\n", color); + ok(compare_color(color, 0x00ffffff, 0), "(328, 258) has color 0x%08lx.\n", color); color = get_surface_color(rt, 332, 258); - ok(compare_color(color, 0x0000ff00, 0), "(332, 258) has color 0x%08x.\n", color); + ok(compare_color(color, 0x0000ff00, 0), "(332, 258) has color 0x%08lx.\n", color); color = get_surface_color(rt, 328, 262); - ok(compare_color(color, 0x00ffffff, 0), "(328, 262) has color 0x%08x.\n", color); + ok(compare_color(color, 0x00ffffff, 0), "(328, 262) has color 0x%08lx.\n", color); color = get_surface_color(rt, 332, 262); - ok(compare_color(color, 0x00ffffff, 0), "(332, 262) has color 0x%08x.\n", color); + ok(compare_color(color, 0x00ffffff, 0), "(332, 262) has color 0x%08lx.\n", color);
color = get_surface_color(rt, 338, 258); - ok(compare_color(color, 0x0000ff00, 0), "(338, 258) has color 0x%08x.\n", color); + ok(compare_color(color, 0x0000ff00, 0), "(338, 258) has color 0x%08lx.\n", color); color = get_surface_color(rt, 342, 258); - ok(compare_color(color, 0x00ffffff, 0), "(342, 258) has color 0x%08x.\n", color); + ok(compare_color(color, 0x00ffffff, 0), "(342, 258) has color 0x%08lx.\n", color); color = get_surface_color(rt, 338, 262); - ok(compare_color(color, 0x00ffffff, 0), "(338, 262) has color 0x%08x.\n", color); + ok(compare_color(color, 0x00ffffff, 0), "(338, 262) has color 0x%08lx.\n", color); color = get_surface_color(rt, 342, 262); - ok(compare_color(color, 0x00ffffff, 0), "(342, 262) has color 0x%08x.\n", color); + ok(compare_color(color, 0x00ffffff, 0), "(342, 262) has color 0x%08lx.\n", color);
/* COLORWRITEENABLE, SRGBWRITEENABLE and scissor rectangles do not exist * in d3d3. */ @@ -16497,7 +16497,7 @@ static void test_clear(void) IDirectDraw4_Release(ddraw); IDirect3D3_Release(d3d); refcount = IDirect3DDevice3_Release(device); - ok(!refcount, "Device has %u references left.\n", refcount); + ok(!refcount, "Device has %lu references left.\n", refcount); DestroyWindow(window); }
@@ -16555,12 +16555,12 @@ static HRESULT WINAPI enum_surfaces_create_cb(IDirectDrawSurface4 *surface, DDSU struct enum_surfaces_param *param = context;
ok(!surface, "Unexpected surface %p.\n", surface); - ok((desc->dwFlags & expect_flags) == expect_flags, "Got unexpected flags %#x.\n", desc->dwFlags); + ok((desc->dwFlags & expect_flags) == expect_flags, "Got unexpected flags %#lx.\n", desc->dwFlags); if (param->count < ARRAY_SIZE(param->modes)) { const DDSURFACEDESC2 *expect = ¶m->modes[param->count]; - ok(desc->dwWidth == expect->dwWidth, "Expected width %u, got %u.\n", expect->dwWidth, desc->dwWidth); - ok(desc->dwHeight == expect->dwHeight, "Expected height %u, got %u.\n", expect->dwHeight, desc->dwHeight); + ok(desc->dwWidth == expect->dwWidth, "Expected width %lu, got %lu.\n", expect->dwWidth, desc->dwWidth); + ok(desc->dwHeight == expect->dwHeight, "Expected height %lu, got %lu.\n", expect->dwHeight, desc->dwHeight); ok(!memcmp(&U4(*desc).ddpfPixelFormat, &U4(*expect).ddpfPixelFormat, sizeof(U4(*desc).ddpfPixelFormat)), "Pixel formats didn't match.\n"); } @@ -16585,18 +16585,18 @@ static void test_enum_surfaces(void) memset(&desc, 0, sizeof(desc)); desc.dwSize = sizeof(desc); hr = IDirectDraw4_GetDisplayMode(ddraw, &desc); - ok(hr == DD_OK, "Failed to get display mode, hr %#x.\n", hr); + ok(hr == DD_OK, "Failed to get display mode, hr %#lx.\n", hr); current_format = U4(desc).ddpfPixelFormat;
hr = IDirectDraw4_SetCooperativeLevel(ddraw, NULL, DDSCL_NORMAL); - ok(hr == DD_OK, "Failed to set cooperative level, hr %#x.\n", hr); + ok(hr == DD_OK, "Failed to set cooperative level, hr %#lx.\n", hr);
hr = IDirectDraw4_EnumSurfaces(ddraw, DDENUMSURFACES_ALL, NULL, NULL, enum_surfaces_cb); - ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#lx.\n", hr);
hr = IDirectDraw4_EnumSurfaces(ddraw, DDENUMSURFACES_CANBECREATED | DDENUMSURFACES_ALL, NULL, NULL, enum_surfaces_cb); - ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#lx.\n", hr);
memset(&desc, 0, sizeof(desc)); desc.dwSize = sizeof(desc); @@ -16606,52 +16606,52 @@ static void test_enum_surfaces(void) desc.dwWidth = 32; desc.dwHeight = 32; hr = IDirectDraw4_CreateSurface(ddraw, &desc, ¶m.surfaces[0], NULL); - ok(hr == DD_OK, "Failed to create a surface, hr %#x.\n", hr); + ok(hr == DD_OK, "Failed to create a surface, hr %#lx.\n", hr);
hr = IDirectDrawSurface4_GetAttachedSurface(param.surfaces[0], &desc.ddsCaps, ¶m.surfaces[1]); - ok(hr == DD_OK, "Failed to get attached surface, hr %#x.\n", hr); + ok(hr == DD_OK, "Failed to get attached surface, hr %#lx.\n", hr); hr = IDirectDrawSurface4_GetAttachedSurface(param.surfaces[1], &desc.ddsCaps, ¶m.surfaces[2]); - ok(hr == DD_OK, "Failed to get attached surface, hr %#x.\n", hr); + ok(hr == DD_OK, "Failed to get attached surface, hr %#lx.\n", hr); hr = IDirectDrawSurface4_GetAttachedSurface(param.surfaces[2], &desc.ddsCaps, ¶m.surfaces[3]); - ok(hr == DDERR_NOTFOUND, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_NOTFOUND, "Got unexpected hr %#lx.\n", hr); ok(!param.surfaces[3], "Got unexpected pointer %p.\n", param.surfaces[3]);
param.count = 0; hr = IDirectDraw4_EnumSurfaces(ddraw, DDENUMSURFACES_DOESEXIST | DDENUMSURFACES_ALL, &desc, ¶m, enum_surfaces_cb); - ok(hr == DD_OK, "Failed to enumerate surfaces, hr %#x.\n", hr); + ok(hr == DD_OK, "Failed to enumerate surfaces, hr %#lx.\n", hr); ok(param.count == 3, "Got unexpected number of enumerated surfaces %u.\n", param.count);
param.count = 0; hr = IDirectDraw4_EnumSurfaces(ddraw, DDENUMSURFACES_DOESEXIST | DDENUMSURFACES_ALL, NULL, ¶m, enum_surfaces_cb); - ok(hr == DD_OK, "Failed to enumerate surfaces, hr %#x.\n", hr); + ok(hr == DD_OK, "Failed to enumerate surfaces, hr %#lx.\n", hr); ok(param.count == 3, "Got unexpected number of enumerated surfaces %u.\n", param.count);
desc.dwFlags = DDSD_WIDTH | DDSD_HEIGHT; param.count = 0; hr = IDirectDraw4_EnumSurfaces(ddraw, DDENUMSURFACES_DOESEXIST | DDENUMSURFACES_MATCH, &desc, ¶m, enum_surfaces_cb); - ok(hr == DD_OK, "Failed to enumerate surfaces, hr %#x.\n", hr); + ok(hr == DD_OK, "Failed to enumerate surfaces, hr %#lx.\n", hr); ok(param.count == 1, "Got unexpected number of enumerated surfaces %u.\n", param.count);
param.count = 0; hr = IDirectDraw4_EnumSurfaces(ddraw, DDENUMSURFACES_DOESEXIST | DDENUMSURFACES_NOMATCH, &desc, ¶m, enum_surfaces_cb); - ok(hr == DD_OK, "Failed to enumerate surfaces, hr %#x.\n", hr); + ok(hr == DD_OK, "Failed to enumerate surfaces, hr %#lx.\n", hr); ok(param.count == 2, "Got unexpected number of enumerated surfaces %u.\n", param.count);
desc.dwFlags = 0; param.count = 0; hr = IDirectDraw4_EnumSurfaces(ddraw, DDENUMSURFACES_DOESEXIST | DDENUMSURFACES_MATCH, &desc, ¶m, enum_surfaces_cb); - ok(hr == DD_OK, "Failed to enumerate surfaces, hr %#x.\n", hr); + ok(hr == DD_OK, "Failed to enumerate surfaces, hr %#lx.\n", hr); ok(param.count == 3, "Got unexpected number of enumerated surfaces %u.\n", param.count);
desc.dwFlags = 0; param.count = 0; hr = IDirectDraw4_EnumSurfaces(ddraw, DDENUMSURFACES_DOESEXIST, &desc, ¶m, enum_surfaces_cb); - ok(hr == DD_OK, "Failed to enumerate surfaces, hr %#x.\n", hr); + ok(hr == DD_OK, "Failed to enumerate surfaces, hr %#lx.\n", hr); ok(param.count == 3, "Got unexpected number of enumerated surfaces %u.\n", param.count);
IDirectDrawSurface4_Release(param.surfaces[2]); @@ -16661,7 +16661,7 @@ static void test_enum_surfaces(void) param.count = 0; hr = IDirectDraw4_EnumSurfaces(ddraw, DDENUMSURFACES_DOESEXIST | DDENUMSURFACES_ALL, NULL, ¶m, enum_surfaces_cb); - ok(hr == DD_OK, "Failed to enumerate surfaces, hr %#x.\n", hr); + ok(hr == DD_OK, "Failed to enumerate surfaces, hr %#lx.\n", hr); ok(!param.count, "Got unexpected number of enumerated surfaces %u.\n", param.count);
memset(&desc, 0, sizeof(desc)); @@ -16671,15 +16671,15 @@ static void test_enum_surfaces(void)
hr = IDirectDraw4_EnumSurfaces(ddraw, DDENUMSURFACES_CANBECREATED | DDENUMSURFACES_ALL, &desc, ¶m, enum_surfaces_create_cb); - ok(hr == DDERR_INVALIDPARAMS, "Failed to enumerate surfaces, hr %#x.\n", hr); + ok(hr == DDERR_INVALIDPARAMS, "Failed to enumerate surfaces, hr %#lx.\n", hr);
hr = IDirectDraw4_EnumSurfaces(ddraw, DDENUMSURFACES_CANBECREATED | DDENUMSURFACES_NOMATCH, &desc, ¶m, enum_surfaces_create_cb); - ok(hr == DDERR_INVALIDPARAMS, "Failed to enumerate surfaces, hr %#x.\n", hr); + ok(hr == DDERR_INVALIDPARAMS, "Failed to enumerate surfaces, hr %#lx.\n", hr);
hr = IDirectDraw4_EnumSurfaces(ddraw, DDENUMSURFACES_CANBECREATED, &desc, ¶m, enum_surfaces_create_cb); - ok(hr == DDERR_INVALIDPARAMS, "Failed to enumerate surfaces, hr %#x.\n", hr); + ok(hr == DDERR_INVALIDPARAMS, "Failed to enumerate surfaces, hr %#lx.\n", hr);
/* When not passed width and height, the callback is called with every * available display resolution. */ @@ -16688,13 +16688,13 @@ static void test_enum_surfaces(void) desc.dwFlags |= DDSD_PIXELFORMAT; U4(desc).ddpfPixelFormat = current_format; hr = IDirectDraw4_EnumDisplayModes(ddraw, 0, &desc, ¶m, build_mode_list_cb); - ok(hr == DD_OK, "Failed to build mode list, hr %#x.\n", hr); + ok(hr == DD_OK, "Failed to build mode list, hr %#lx.\n", hr);
param.count = 0; desc.dwFlags &= ~DDSD_PIXELFORMAT; hr = IDirectDraw4_EnumSurfaces(ddraw, DDENUMSURFACES_CANBECREATED | DDENUMSURFACES_MATCH, &desc, ¶m, enum_surfaces_create_cb); - ok(hr == DD_OK, "Failed to enumerate surfaces, hr %#x.\n", hr); + ok(hr == DD_OK, "Failed to enumerate surfaces, hr %#lx.\n", hr); ok(param.count == param.mode_count, "Expected %u surfaces, got %u.\n", param.mode_count, param.count);
desc.dwFlags |= DDSD_WIDTH | DDSD_HEIGHT; @@ -16705,15 +16705,15 @@ static void test_enum_surfaces(void) param.count = 0; hr = IDirectDraw4_EnumSurfaces(ddraw, DDENUMSURFACES_CANBECREATED | DDENUMSURFACES_MATCH, &desc, ¶m, enum_surfaces_create_cb); - ok(hr == DD_OK, "Failed to enumerate surfaces, hr %#x.\n", hr); + ok(hr == DD_OK, "Failed to enumerate surfaces, hr %#lx.\n", hr); ok(param.count == 1, "Got unexpected number of enumerated surfaces %u.\n", param.count);
hr = IDirectDraw4_CreateSurface(ddraw, &desc, ¶m.surfaces[0], NULL); - ok(hr == DD_OK, "Failed to create surface, hr %#x.\n", hr); + ok(hr == DD_OK, "Failed to create surface, hr %#lx.\n", hr); param.count = 0; hr = IDirectDraw4_EnumSurfaces(ddraw, DDENUMSURFACES_CANBECREATED | DDENUMSURFACES_DOESEXIST | DDENUMSURFACES_MATCH, &desc, ¶m, enum_surfaces_create_cb); - ok(hr == DD_OK, "Failed to enumerate surfaces, hr %#x.\n", hr); + ok(hr == DD_OK, "Failed to enumerate surfaces, hr %#lx.\n", hr); ok(param.count == 1, "Got unexpected number of enumerated surfaces %u.\n", param.count); IDirectDrawSurface4_Release(param.surfaces[0]);
@@ -16725,7 +16725,7 @@ static void test_enum_surfaces(void) param.count = 0; hr = IDirectDraw4_EnumSurfaces(ddraw, DDENUMSURFACES_CANBECREATED | DDENUMSURFACES_MATCH, &desc, ¶m, enum_surfaces_create_cb); - ok(hr == DD_OK, "Failed to enumerate surfaces, hr %#x.\n", hr); + ok(hr == DD_OK, "Failed to enumerate surfaces, hr %#lx.\n", hr); ok(!param.count, "Got unexpected number of enumerated surfaces %u.\n", param.count);
IDirectDraw4_Release(ddraw); @@ -16791,21 +16791,21 @@ static void test_viewport(void) }
hr = IDirect3DDevice3_GetDirect3D(device, &d3d); - ok(SUCCEEDED(hr), "Failed to get Direct3D3 interface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get Direct3D3 interface, hr %#lx.\n", hr); hr = IDirect3D3_QueryInterface(d3d, &IID_IDirectDraw4, (void **)&ddraw); - ok(SUCCEEDED(hr), "Failed to get ddraw interface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get ddraw interface, hr %#lx.\n", hr);
hr = IDirect3DDevice3_SetRenderState(device, D3DRENDERSTATE_ZENABLE, D3DZB_FALSE); - ok(SUCCEEDED(hr), "Failed to disable depth test, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to disable depth test, hr %#lx.\n", hr); hr = IDirect3DDevice3_SetRenderState(device, D3DRENDERSTATE_CULLMODE, D3DCULL_NONE); - ok(SUCCEEDED(hr), "Failed to disable culling, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to disable culling, hr %#lx.\n", hr);
hr = IDirect3DDevice3_SetTransform(device, D3DTRANSFORMSTATE_WORLD, &mat); - ok(SUCCEEDED(hr), "Failed to set world transform, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set world transform, hr %#lx.\n", hr); hr = IDirect3DDevice3_SetTransform(device, D3DTRANSFORMSTATE_VIEW, &mat); - ok(SUCCEEDED(hr), "Failed to set view transform, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set view transform, hr %#lx.\n", hr); hr = IDirect3DDevice3_SetTransform(device, D3DTRANSFORMSTATE_PROJECTION, &mat); - ok(SUCCEEDED(hr), "Failed to set projection transform, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set projection transform, hr %#lx.\n", hr);
ds = get_depth_stencil(device); memset(&surface_desc, 0, sizeof(surface_desc)); @@ -16824,23 +16824,23 @@ static void test_viewport(void) surface_desc.dwHeight = rt_sizes[i].y; surface_desc.ddsCaps.dwCaps = DDSCAPS_OFFSCREENPLAIN | DDSCAPS_3DDEVICE; hr = IDirectDraw4_CreateSurface(ddraw, &surface_desc, &rt, NULL); - ok(SUCCEEDED(hr), "Failed to create render target, hr %#x (i %u).\n", hr, i); + ok(SUCCEEDED(hr), "Failed to create render target, hr %#lx (i %u).\n", hr, i);
surface_desc.dwFlags = DDSD_CAPS | DDSD_PIXELFORMAT | DDSD_WIDTH | DDSD_HEIGHT; surface_desc.ddsCaps.dwCaps = DDSCAPS_ZBUFFER; U4(surface_desc).ddpfPixelFormat = z_fmt; hr = IDirectDraw4_CreateSurface(ddraw, &surface_desc, &ds, NULL); - ok(SUCCEEDED(hr), "Failed to create depth buffer, hr %#x (i %u).\n", hr, i); + ok(SUCCEEDED(hr), "Failed to create depth buffer, hr %#lx (i %u).\n", hr, i); hr = IDirectDrawSurface4_AddAttachedSurface(rt, ds); - ok(SUCCEEDED(hr), "Failed to attach depth buffer, hr %#x (i %u).\n", hr, i); + ok(SUCCEEDED(hr), "Failed to attach depth buffer, hr %#lx (i %u).\n", hr, i);
hr = IDirect3DDevice3_SetRenderTarget(device, rt, 0); - ok(SUCCEEDED(hr), "Failed to set render target, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set render target, hr %#lx.\n", hr); } else { hr = IDirect3DDevice3_GetRenderTarget(device, &rt); - ok(SUCCEEDED(hr), "Failed to get render target, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get render target, hr %#lx.\n", hr); }
full_viewport = create_viewport(device, 0, 0, rt_sizes[i].x, rt_sizes[i].y); @@ -16855,12 +16855,12 @@ static void test_viewport(void) || tests[j].vp.dwY + tests[j].vp.dwHeight > rt_sizes[i].y;
hr = IDirect3DViewport3_Clear2(full_viewport, 1, &clear_rect, D3DCLEAR_TARGET, 0xff000000, 0.0f, 0); - ok(SUCCEEDED(hr), "Failed to clear viewport, hr %#x (i %u, j %u).\n", hr, i, j); + ok(SUCCEEDED(hr), "Failed to clear viewport, hr %#lx (i %u, j %u).\n", hr, i, j);
hr = IDirect3D3_CreateViewport(d3d, &viewport, NULL); - ok(SUCCEEDED(hr), "Failed to create viewport, hr %#x (i %u, j %u).\n", hr, i, j); + ok(SUCCEEDED(hr), "Failed to create viewport, hr %#lx (i %u, j %u).\n", hr, i, j); hr = IDirect3DViewport3_SetViewport2(viewport, NULL); - ok(hr == E_INVALIDARG, "Setting NULL viewport data returned unexpected hr %#x (i %u, j %u).\n", hr, i, j); + ok(hr == E_INVALIDARG, "Setting NULL viewport data returned unexpected hr %#lx (i %u, j %u).\n", hr, i, j); memset(&vp, 0, sizeof(vp)); vp.dwSize = sizeof(vp); vp.dwX = tests[j].vp.dwX; @@ -16875,18 +16875,18 @@ static void test_viewport(void) vp.dvMaxZ = 1.0f; hr = IDirect3DViewport3_SetViewport2(viewport, &vp); ok(hr == D3DERR_VIEWPORTHASNODEVICE, - "Setting viewport data returned unexpected hr %#x (i %u, j %u).\n", hr, i, j); + "Setting viewport data returned unexpected hr %#lx (i %u, j %u).\n", hr, i, j); hr = IDirect3DDevice3_AddViewport(device, viewport); - ok(SUCCEEDED(hr), "Failed to add viewport, hr %#x (i %u, j %u).\n", hr, i, j); + ok(SUCCEEDED(hr), "Failed to add viewport, hr %#lx (i %u, j %u).\n", hr, i, j); hr = IDirect3DViewport3_SetViewport2(viewport, &vp); if (expected_failure) ok(hr == E_INVALIDARG, - "Setting viewport data returned unexpected hr %#x (i %u, j %u).\n", hr, i, j); + "Setting viewport data returned unexpected hr %#lx (i %u, j %u).\n", hr, i, j); else - ok(SUCCEEDED(hr), "Failed to set viewport data, hr %#x (i %u, j %u).\n", hr, i, j); + ok(SUCCEEDED(hr), "Failed to set viewport data, hr %#lx (i %u, j %u).\n", hr, i, j);
hr = IDirect3DDevice3_SetCurrentViewport(device, viewport); - ok(SUCCEEDED(hr), "Failed to set the viewport, hr %#x (i %u, j %u).\n", hr, i, j); + ok(SUCCEEDED(hr), "Failed to set the viewport, hr %#lx (i %u, j %u).\n", hr, i, j); if (expected_failure) { destroy_viewport(device, viewport); @@ -16894,11 +16894,11 @@ static void test_viewport(void) }
hr = IDirect3DDevice3_BeginScene(device); - ok(SUCCEEDED(hr), "Failed to begin scene, hr %#x (i %u, j %u).\n", hr, i, j); + ok(SUCCEEDED(hr), "Failed to begin scene, hr %#lx (i %u, j %u).\n", hr, i, j); hr = IDirect3DDevice3_DrawPrimitive(device, D3DPT_TRIANGLESTRIP, D3DFVF_XYZ, quad, 4, 0); - ok(SUCCEEDED(hr), "Got unexpected hr %#x (i %u, j %u).\n", hr, i, j); + ok(SUCCEEDED(hr), "Got unexpected hr %#lx (i %u, j %u).\n", hr, i, j); hr = IDirect3DDevice3_EndScene(device); - ok(SUCCEEDED(hr), "Failed to end scene, hr %#x (i %u, j %u).\n", hr, i, j); + ok(SUCCEEDED(hr), "Failed to end scene, hr %#lx (i %u, j %u).\n", hr, i, j);
check_rect(rt, tests[j].expected_rect, tests[j].message);
@@ -16908,14 +16908,14 @@ static void test_viewport(void) destroy_viewport(device, full_viewport);
hr = IDirectDrawSurface4_DeleteAttachedSurface(rt, 0, ds); - ok(SUCCEEDED(hr), "Failed to detach surface, hr %#x (i %u).\n", hr, i); + ok(SUCCEEDED(hr), "Failed to detach surface, hr %#lx (i %u).\n", hr, i); IDirectDrawSurface4_Release(ds);
IDirectDrawSurface4_Release(rt); }
refcount = IDirect3DDevice3_Release(device); - ok(!refcount, "Device has %u references left.\n", refcount); + ok(!refcount, "Device has %lu references left.\n", refcount); IDirect3D3_Release(d3d); IDirectDraw4_Release(ddraw); DestroyWindow(window); @@ -16977,48 +16977,48 @@ static void test_find_device(void) result.dwSize = sizeof(result); search.dwSize = sizeof(search); hr = IDirect3D3_FindDevice(d3d, NULL, NULL); - ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#lx.\n", hr); hr = IDirect3D3_FindDevice(d3d, NULL, &result); - ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#lx.\n", hr); hr = IDirect3D3_FindDevice(d3d, &search, NULL); - ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#lx.\n", hr); hr = IDirect3D3_FindDevice(d3d, &search, &result); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); - ok(result.dwSize == sizeof(result), "Got unexpected result size %u.\n", result.dwSize); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); + ok(result.dwSize == sizeof(result), "Got unexpected result size %lu.\n", result.dwSize); ok(result.ddHwDesc.dwSize == sizeof(result.ddHwDesc), - "Got unexpected HW desc size %u.\n", result.ddHwDesc.dwSize); + "Got unexpected HW desc size %lu.\n", result.ddHwDesc.dwSize); ok(result.ddSwDesc.dwSize == sizeof(result.ddSwDesc), - "Got unexpected SW desc size %u.\n", result.ddSwDesc.dwSize); + "Got unexpected SW desc size %lu.\n", result.ddSwDesc.dwSize);
memset(&search, 0, sizeof(search)); memset(&result, 0, sizeof(result)); hr = IDirect3D3_FindDevice(d3d, &search, &result); - ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#lx.\n", hr);
search.dwSize = sizeof(search) + 1; result.dwSize = sizeof(result) + 1; hr = IDirect3D3_FindDevice(d3d, &search, &result); - ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#lx.\n", hr);
search.dwSize = sizeof(search);
memset(&result_v1, 0, sizeof(result_v1)); result_v1.size = sizeof(result_v1); hr = IDirect3D3_FindDevice(d3d, &search, (D3DFINDDEVICERESULT *)&result_v1); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); ok(result_v1.hw_desc.dwSize == sizeof(result.ddHwDesc), - "Got unexpected HW desc size %u.\n", result_v1.hw_desc.dwSize); + "Got unexpected HW desc size %lu.\n", result_v1.hw_desc.dwSize); ok(result_v1.sw_desc.dwSize == sizeof(result.ddSwDesc), - "Got unexpected SW desc size %u.\n", result_v1.sw_desc.dwSize); + "Got unexpected SW desc size %lu.\n", result_v1.sw_desc.dwSize);
memset(&result_v2, 0, sizeof(result_v2)); result_v2.size = sizeof(result_v2); hr = IDirect3D3_FindDevice(d3d, &search, (D3DFINDDEVICERESULT *)&result_v2); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); ok(result_v2.hw_desc.dwSize == sizeof(result.ddHwDesc), - "Got unexpected HW desc size %u.\n", result_v2.hw_desc.dwSize); + "Got unexpected HW desc size %lu.\n", result_v2.hw_desc.dwSize); ok(result_v2.sw_desc.dwSize == sizeof(result.ddSwDesc), - "Got unexpected SW desc size %u.\n", result_v2.sw_desc.dwSize); + "Got unexpected SW desc size %lu.\n", result_v2.sw_desc.dwSize);
for (i = 0; i < ARRAY_SIZE(tests); ++i) { @@ -17031,21 +17031,21 @@ static void test_find_device(void) result.dwSize = sizeof(result);
hr = IDirect3D3_FindDevice(d3d, &search, &result); - ok(hr == tests[i].hr, "Test %u: Got unexpected hr %#x.\n", i, hr); - ok(result.dwSize == sizeof(result), "Test %u: Got unexpected result size %u.\n", i, result.dwSize); + ok(hr == tests[i].hr, "Test %u: Got unexpected hr %#lx.\n", i, hr); + ok(result.dwSize == sizeof(result), "Test %u: Got unexpected result size %lu.\n", i, result.dwSize); if (SUCCEEDED(hr)) { ok(result.ddHwDesc.dwSize == sizeof(result.ddHwDesc), - "Test %u: Got unexpected HW desc size %u.\n", i, result.ddHwDesc.dwSize); + "Test %u: Got unexpected HW desc size %lu.\n", i, result.ddHwDesc.dwSize); ok(result.ddSwDesc.dwSize == sizeof(result.ddSwDesc), - "Test %u: Got unexpected SW desc size %u.\n", i, result.ddSwDesc.dwSize); + "Test %u: Got unexpected SW desc size %lu.\n", i, result.ddSwDesc.dwSize); } else { ok(!result.ddHwDesc.dwSize, - "Test %u: Got unexpected HW desc size %u.\n", i, result.ddHwDesc.dwSize); + "Test %u: Got unexpected HW desc size %lu.\n", i, result.ddHwDesc.dwSize); ok(!result.ddSwDesc.dwSize, - "Test %u: Got unexpected SW desc size %u.\n", i, result.ddSwDesc.dwSize); + "Test %u: Got unexpected SW desc size %lu.\n", i, result.ddSwDesc.dwSize); } }
@@ -17072,7 +17072,7 @@ static void test_find_device(void) search.dcmColorModel = 0xdeadbeef; result.dwSize = sizeof(result); hr = IDirect3D3_FindDevice(d3d, &search, &result); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
IDirect3D3_Release(d3d); IDirectDraw4_Release(ddraw); @@ -17088,9 +17088,9 @@ static LRESULT CALLBACK killfocus_proc(HWND window, UINT message, WPARAM wparam, if (message == WM_KILLFOCUS) { ref = IDirectDrawSurface4_Release(killfocus_surface); - ok(!ref, "Unexpected surface refcount %u.\n", ref); + ok(!ref, "Unexpected surface refcount %lu.\n", ref); ref = IDirectDraw4_Release(killfocus_ddraw); - ok(!ref, "Unexpected ddraw refcount %u.\n", ref); + ok(!ref, "Unexpected ddraw refcount %lu.\n", ref); killfocus_ddraw = NULL; }
@@ -17115,14 +17115,14 @@ static void test_killfocus(void) ok(!!killfocus_ddraw, "Failed to create a ddraw object.\n");
hr = IDirectDraw4_SetCooperativeLevel(killfocus_ddraw, window, DDSCL_FULLSCREEN | DDSCL_EXCLUSIVE); - ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#lx.\n", hr);
memset(&surface_desc, 0, sizeof(surface_desc)); surface_desc.dwSize = sizeof(surface_desc); surface_desc.dwFlags = DDSD_CAPS; surface_desc.ddsCaps.dwCaps = DDSCAPS_PRIMARYSURFACE; hr = IDirectDraw4_CreateSurface(killfocus_ddraw, &surface_desc, &killfocus_surface, NULL); - ok(SUCCEEDED(hr), "Failed to create surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create surface, hr %#lx.\n", hr);
SetForegroundWindow(GetDesktopWindow()); ok(!killfocus_ddraw, "WM_KILLFOCUS was not received.\n"); @@ -17178,57 +17178,57 @@ static void test_sysmem_draw(void) }
hr = IDirect3DDevice3_GetDirect3D(device, &d3d); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirect3D3_QueryInterface(d3d, &IID_IDirectDraw4, (void **)&ddraw); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirect3DDevice3_GetRenderTarget(device, &rt); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr);
viewport = create_viewport(device, 0, 0, 640, 480); hr = IDirect3DDevice3_SetCurrentViewport(device, viewport); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr);
hr = IDirect3DDevice3_SetRenderState(device, D3DRENDERSTATE_LIGHTING, FALSE); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr);
vb_desc.dwSize = sizeof(vb_desc); vb_desc.dwCaps = D3DVBCAPS_SYSTEMMEMORY; vb_desc.dwFVF = D3DFVF_XYZ | D3DFVF_DIFFUSE; vb_desc.dwNumVertices = ARRAY_SIZE(quad); hr = IDirect3D3_CreateVertexBuffer(d3d, &vb_desc, &vb, 0, NULL); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr);
hr = IDirect3DVertexBuffer_Lock(vb, 0, (void **)&data, NULL); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); memcpy(data, quad, sizeof(quad)); hr = IDirect3DVertexBuffer_Unlock(vb); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr);
hr = IDirect3DViewport3_Clear2(viewport, 1, &rect_full, D3DCLEAR_TARGET, 0xffffffff, 0.0f, 0); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr);
hr = IDirect3DDevice3_BeginScene(device); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirect3DDevice3_DrawPrimitiveVB(device, D3DPT_TRIANGLESTRIP, vb, 4, 4, 0); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirect3DDevice3_EndScene(device); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr);
color = get_surface_color(rt, 320, 240); - ok(compare_color(color, 0x00007f7f, 1), "Got unexpected color 0x%08x.\n", color); + ok(compare_color(color, 0x00007f7f, 1), "Got unexpected color 0x%08lx.\n", color);
hr = IDirect3DViewport3_Clear2(viewport, 1, &rect_full, D3DCLEAR_TARGET, 0xffffffff, 0.0f, 0); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr);
hr = IDirect3DDevice3_BeginScene(device); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirect3DDevice3_DrawIndexedPrimitiveVB(device, D3DPT_TRIANGLESTRIP, vb, indices, 4, 0); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirect3DDevice3_EndScene(device); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr);
color = get_surface_color(rt, 320, 240); - ok(compare_color(color, 0x00007f7f, 1), "Got unexpected color 0x%08x.\n", color); + ok(compare_color(color, 0x00007f7f, 1), "Got unexpected color 0x%08lx.\n", color);
memset(&surface_desc, 0, sizeof(surface_desc)); surface_desc.dwSize = sizeof(surface_desc); @@ -17244,22 +17244,22 @@ static void test_sysmem_draw(void) U4(U4(surface_desc).ddpfPixelFormat).dwBBitMask = 0x000000ff; U5(U4(surface_desc).ddpfPixelFormat).dwRGBAlphaBitMask = 0xff000000; hr = IDirectDraw4_CreateSurface(ddraw, &surface_desc, &surface, NULL); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface4_QueryInterface(surface, &IID_IDirect3DTexture2, (void **)&texture); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); IDirectDrawSurface4_Release(surface); hr = IDirect3DDevice3_SetTexture(device, 0, texture); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
hr = IDirect3DViewport3_Clear2(viewport, 1, &rect_full, D3DCLEAR_TARGET, 0xffffffff, 0.0f, 0); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
hr = IDirect3DDevice3_BeginScene(device); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirect3DDevice3_DrawPrimitiveVB(device, D3DPT_TRIANGLESTRIP, vb, 0, 4, 0); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirect3DDevice3_EndScene(device); - ok(hr == D3D_OK || hr == D3DERR_SCENE_END_FAILED, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK || hr == D3DERR_SCENE_END_FAILED, "Got unexpected hr %#lx.\n", hr);
IDirect3DTexture2_Release(texture); IDirect3DVertexBuffer_Release(vb); @@ -17268,7 +17268,7 @@ static void test_sysmem_draw(void) IDirectDraw4_Release(ddraw); IDirect3D3_Release(d3d); refcount = IDirect3DDevice3_Release(device); - ok(!refcount, "Device has %u references left.\n", refcount); + ok(!refcount, "Device has %lu references left.\n", refcount); DestroyWindow(window); }
@@ -17286,38 +17286,38 @@ static void test_gdi_surface(void) ddraw = create_ddraw(); ok(!!ddraw, "Failed to create a ddraw object.\n"); hr = IDirectDraw4_SetCooperativeLevel(ddraw, window, DDSCL_NORMAL); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr);
/* Retrieving the GDI surface requires a primary surface to exist. */ gdi_surface = (void *)0xc0dec0de; hr = IDirectDraw4_GetGDISurface(ddraw, &gdi_surface); - ok(hr == DDERR_NOTFOUND, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_NOTFOUND, "Got unexpected hr %#lx.\n", hr); ok(!gdi_surface, "Got unexpected surface %p.\n", gdi_surface);
hr = IDirectDraw4_FlipToGDISurface(ddraw); - ok(hr == DDERR_NOTFOUND, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_NOTFOUND, "Got unexpected hr %#lx.\n", hr);
memset(&surface_desc, 0, sizeof(surface_desc)); surface_desc.dwSize = sizeof(surface_desc); surface_desc.dwFlags = DDSD_CAPS; surface_desc.ddsCaps.dwCaps = DDSCAPS_PRIMARYSURFACE; hr = IDirectDraw4_CreateSurface(ddraw, &surface_desc, &primary, NULL); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr);
hr = IDirectDraw4_GetGDISurface(ddraw, &gdi_surface); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); ok(gdi_surface == primary, "Got unexpected surface %p, expected %p.\n", gdi_surface, primary); IDirectDrawSurface4_Release(gdi_surface);
/* Flipping to the GDI surface requires the primary surface to be * flippable. */ hr = IDirectDraw4_FlipToGDISurface(ddraw); - ok(hr == DDERR_NOTFLIPPABLE, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_NOTFLIPPABLE, "Got unexpected hr %#lx.\n", hr);
IDirectDrawSurface4_Release(primary);
hr = IDirectDraw4_SetCooperativeLevel(ddraw, window, DDSCL_EXCLUSIVE | DDSCL_FULLSCREEN); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr);
memset(&surface_desc, 0, sizeof(surface_desc)); surface_desc.dwSize = sizeof(surface_desc); @@ -17325,40 +17325,40 @@ static void test_gdi_surface(void) surface_desc.ddsCaps.dwCaps = DDSCAPS_PRIMARYSURFACE | DDSCAPS_COMPLEX | DDSCAPS_FLIP; U5(surface_desc).dwBackBufferCount = 1; hr = IDirectDraw4_CreateSurface(ddraw, &surface_desc, &primary, NULL); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface4_GetAttachedSurface(primary, &caps, &backbuffer); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); ok(backbuffer != primary, "Got unexpected backbuffer %p.\n", backbuffer);
hr = IDirectDraw4_GetGDISurface(ddraw, &gdi_surface); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); ok(gdi_surface == primary, "Got unexpected surface %p, expected %p.\n", gdi_surface, primary); IDirectDrawSurface4_Release(gdi_surface);
hr = IDirectDrawSurface4_Flip(primary, NULL, DDFLIP_WAIT); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirectDraw4_GetGDISurface(ddraw, &gdi_surface); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); ok(gdi_surface == backbuffer || broken(gdi_surface == primary), "Got unexpected surface %p, expected %p.\n", gdi_surface, backbuffer); IDirectDrawSurface4_Release(gdi_surface);
hr = IDirectDraw4_FlipToGDISurface(ddraw); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr);
hr = IDirectDraw4_GetGDISurface(ddraw, &gdi_surface); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); ok(gdi_surface == primary, "Got unexpected surface %p, expected %p.\n", gdi_surface, primary); IDirectDrawSurface4_Release(gdi_surface);
hr = IDirectDraw4_FlipToGDISurface(ddraw); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr);
IDirectDrawSurface4_Release(backbuffer); IDirectDrawSurface4_Release(primary);
refcount = IDirectDraw4_Release(ddraw); - ok(!refcount, "%u references left.\n", refcount); + ok(!refcount, "%lu references left.\n", refcount); DestroyWindow(window); }
@@ -17416,66 +17416,66 @@ static void test_alphatest(void) return; } hr = IDirect3DDevice3_GetRenderTarget(device, &rt); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
viewport = create_viewport(device, 0, 0, 640, 480); hr = IDirect3DDevice3_SetCurrentViewport(device, viewport); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
hr = IDirect3DViewport3_Clear2(viewport, 1, &rect_full, D3DCLEAR_TARGET, 0xff0000ff, 0.0f, 0); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirect3DDevice3_SetRenderState(device, D3DRENDERSTATE_LIGHTING, FALSE); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirect3DDevice3_SetRenderState(device, D3DRENDERSTATE_ZENABLE, FALSE); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirect3DDevice3_SetRenderState(device, D3DRENDERSTATE_ALPHATESTENABLE, TRUE); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
for (i = 0; i < ARRAY_SIZE(test_data); ++i) { hr = IDirect3DDevice3_SetRenderState(device, D3DRENDERSTATE_ALPHAFUNC, test_data[i].func); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
hr = IDirect3DViewport3_Clear2(viewport, 1, &rect_full, D3DCLEAR_TARGET, ALPHATEST_FAILED, 0.0f, 0); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirect3DDevice3_SetRenderState(device, D3DRENDERSTATE_ALPHAREF, 0x70); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirect3DDevice3_BeginScene(device); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirect3DDevice3_DrawPrimitive(device, D3DPT_TRIANGLESTRIP, D3DFVF_XYZ | D3DFVF_DIFFUSE, quad, ARRAY_SIZE(quad), 0); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirect3DDevice3_EndScene(device); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); color = get_surface_color(rt, 320, 240); ok(compare_color(color, test_data[i].color_greater, 0), - "Alphatest failed, color 0x%08x, expected 0x%08x, alpha > ref, func %u.\n", + "Alphatest failed, color 0x%08lx, expected 0x%08lx, alpha > ref, func %u.\n", color, test_data[i].color_greater, test_data[i].func);
hr = IDirect3DViewport3_Clear2(viewport, 1, &rect_full, D3DCLEAR_TARGET, ALPHATEST_FAILED, 0.0f, 0); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirect3DDevice3_SetRenderState(device, D3DRENDERSTATE_ALPHAREF, 0xff70); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirect3DDevice3_GetRenderState(device, D3DRENDERSTATE_ALPHAREF, &value); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); - ok(value == 0xff70, "Got unexpected value %#x.\n", value); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); + ok(value == 0xff70, "Got unexpected value %#lx.\n", value); hr = IDirect3DDevice3_BeginScene(device); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirect3DDevice3_DrawPrimitive(device, D3DPT_TRIANGLESTRIP, D3DFVF_XYZ | D3DFVF_DIFFUSE, quad, ARRAY_SIZE(quad), 0); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirect3DDevice3_EndScene(device); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); color = get_surface_color(rt, 320, 240); ok(compare_color(color, test_data[i].color_greater, 0), - "Alphatest failed, color 0x%08x, expected 0x%08x, alpha > ref, func %u.\n", + "Alphatest failed, color 0x%08lx, expected 0x%08lx, alpha > ref, func %u.\n", color, test_data[i].color_greater, test_data[i].func); }
destroy_viewport(device, viewport); IDirectDrawSurface4_Release(rt); refcount = IDirect3DDevice3_Release(device); - ok(!refcount, "Device has %u references left.\n", refcount); + ok(!refcount, "Device has %lu references left.\n", refcount); DestroyWindow(window); }
@@ -17496,24 +17496,24 @@ static void test_clipper_refcount(void) ddraw = create_ddraw(); ok(!!ddraw, "Failed to create a ddraw object.\n"); hr = IDirectDraw4_SetCooperativeLevel(ddraw, window, DDSCL_NORMAL); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr);
memset(&surface_desc, 0, sizeof(surface_desc)); surface_desc.dwSize = sizeof(surface_desc); surface_desc.dwFlags = DDSD_CAPS; surface_desc.ddsCaps.dwCaps = DDSCAPS_PRIMARYSURFACE; hr = IDirectDraw4_CreateSurface(ddraw, &surface_desc, &surface, NULL); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr);
hr = IDirectDraw4_CreateClipper(ddraw, 0, &clipper, NULL); - ok(SUCCEEDED(hr), "Failed to create clipper, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create clipper, hr %#lx.\n", hr); refcount = get_refcount((IUnknown *)clipper); - ok(refcount == 1, "Got unexpected refcount %u.\n", refcount); + ok(refcount == 1, "Got unexpected refcount %lu.\n", refcount);
/* Show that clipper validation doesn't somehow happen through per-clipper vtable * pointers. */ hr = IDirectDraw4_CreateClipper(ddraw, 0, &clipper2, NULL); - ok(SUCCEEDED(hr), "Failed to create clipper, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create clipper, hr %#lx.\n", hr); ok(clipper->lpVtbl == clipper2->lpVtbl, "Got different clipper vtables %p and %p.\n", clipper->lpVtbl, clipper2->lpVtbl); orig_vtbl = clipper->lpVtbl; @@ -17521,50 +17521,50 @@ static void test_clipper_refcount(void)
/* Surfaces hold a reference to clippers. No surprises there. */ hr = IDirectDrawSurface4_SetClipper(surface, clipper); - ok(SUCCEEDED(hr), "Failed to set clipper, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set clipper, hr %#lx.\n", hr); refcount = get_refcount((IUnknown *)clipper); - ok(refcount == 2, "Got unexpected refcount %u.\n", refcount); + ok(refcount == 2, "Got unexpected refcount %lu.\n", refcount);
hr = IDirectDrawSurface4_GetClipper(surface, &clipper2); - ok(SUCCEEDED(hr), "Failed to get clipper, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get clipper, hr %#lx.\n", hr); ok(clipper == clipper2, "Got clipper %p, expected %p.\n", clipper2, clipper); refcount = IDirectDrawClipper_Release(clipper2); - ok(refcount == 2, "Got unexpected refcount %u.\n", refcount); + ok(refcount == 2, "Got unexpected refcount %lu.\n", refcount);
hr = IDirectDrawSurface4_SetClipper(surface, NULL); - ok(SUCCEEDED(hr), "Failed to set clipper, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set clipper, hr %#lx.\n", hr); refcount = get_refcount((IUnknown *)clipper); - ok(refcount == 1, "Got unexpected refcount %u.\n", refcount); + ok(refcount == 1, "Got unexpected refcount %lu.\n", refcount);
hr = IDirectDrawSurface4_SetClipper(surface, clipper); - ok(SUCCEEDED(hr), "Failed to set clipper, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set clipper, hr %#lx.\n", hr); refcount = get_refcount((IUnknown *)clipper); - ok(refcount == 2, "Got unexpected refcount %u.\n", refcount); + ok(refcount == 2, "Got unexpected refcount %lu.\n", refcount);
refcount = IDirectDrawSurface4_Release(surface); - ok(!refcount, "%u references left.\n", refcount); + ok(!refcount, "%lu references left.\n", refcount); refcount = get_refcount((IUnknown *)clipper); - ok(refcount == 1, "Got unexpected refcount %u.\n", refcount); + ok(refcount == 1, "Got unexpected refcount %lu.\n", refcount);
/* SetClipper with an invalid pointer crashes. */
/* Clipper methods work with a broken vtable, with the exception of Release. */ clipper->lpVtbl = (void *)0xdeadbeef; refcount = orig_vtbl->AddRef(clipper); - todo_wine ok(refcount == 2, "Got unexpected refcount %u.\n", refcount); + todo_wine ok(refcount == 2, "Got unexpected refcount %lu.\n", refcount); refcount = orig_vtbl->Release(clipper); - ok(!refcount, "Got unexpected refcount %u.\n", refcount); + ok(!refcount, "Got unexpected refcount %lu.\n", refcount);
clipper->lpVtbl = orig_vtbl; refcount = orig_vtbl->Release(clipper); - todo_wine ok(refcount == 1, "Got unexpected refcount %u.\n", refcount); + todo_wine ok(refcount == 1, "Got unexpected refcount %lu.\n", refcount);
/* Fix the refcount difference because Wine did not increase the ref in the * AddRef call above. */ if (refcount) { refcount = IDirectDrawClipper_Release(clipper); - ok(!refcount, "Got unexpected refcount %u.\n", refcount); + ok(!refcount, "Got unexpected refcount %lu.\n", refcount); }
/* Steal the reference and see what happens - releasing the surface works fine. @@ -17572,11 +17572,11 @@ static void test_clipper_refcount(void) * release it after the GetClipper call is likely to crash, and certain to crash * if we allocate and zero as much heap memory as we can get. */ hr = IDirectDraw4_CreateSurface(ddraw, &surface_desc, &surface, NULL); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirectDraw4_CreateClipper(ddraw, 0, &clipper, NULL); - ok(SUCCEEDED(hr), "Failed to create clipper, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create clipper, hr %#lx.\n", hr); hr = IDirectDrawSurface4_SetClipper(surface, clipper); - ok(SUCCEEDED(hr), "Failed to set clipper, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set clipper, hr %#lx.\n", hr);
IDirectDrawClipper_Release(clipper); IDirectDrawClipper_Release(clipper); @@ -17592,7 +17592,7 @@ static void test_clipper_refcount(void) * The same Windows and driver versions run the test without heap corruption on * a Geforce 1060 GTX card. I have not seen the problem on AMD GPUs either. */ hr = IDirectDrawSurface4_GetClipper(surface, &clipper2); - ok(SUCCEEDED(hr), "Failed to get clipper, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get clipper, hr %#lx.\n", hr); ok(clipper == clipper2, "Got clipper %p, expected %p.\n", clipper2, clipper); }
@@ -17600,10 +17600,10 @@ static void test_clipper_refcount(void) * vtable through the clipper pointer because it is no longer pointing to * valid memory. */ refcount = orig_vtbl->Release(clipper); - ok(!refcount, "%u references left.\n", refcount); + ok(!refcount, "%lu references left.\n", refcount);
refcount = IDirectDrawSurface4_Release(surface); - ok(!refcount, "%u references left.\n", refcount); + ok(!refcount, "%lu references left.\n", refcount);
/* It looks like the protection against invalid thispointers is part of * the IDirectDrawClipper method implementation, not IDirectDrawSurface. */ @@ -17616,33 +17616,33 @@ static void test_clipper_refcount(void) clipper->lpVtbl = orig_vtbl;
refcount = orig_vtbl->AddRef(clipper); - todo_wine ok(!refcount, "Got refcount %u.\n", refcount); + todo_wine ok(!refcount, "Got refcount %lu.\n", refcount); refcount = orig_vtbl->AddRef((IDirectDrawClipper *)(ULONG_PTR)0xdeadbeef); - ok(!refcount, "Got refcount %u.\n", refcount); + ok(!refcount, "Got refcount %lu.\n", refcount);
changed = 0x1234; hr = orig_vtbl->IsClipListChanged(clipper, &changed); - todo_wine ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#x.\n", hr); + todo_wine ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#lx.\n", hr); todo_wine ok(changed == 0x1234, "'changed' changed: %x.\n", changed);
changed = 0x1234; hr = orig_vtbl->IsClipListChanged((IDirectDrawClipper *)(ULONG_PTR)0xdeadbeef, &changed); - ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#lx.\n", hr); ok(changed == 0x1234, "'changed' changed: %x.\n", changed);
/* Nope, we can't initialize our fake clipper. */ hr = IDirectDraw4_QueryInterface(ddraw, &IID_IDirectDraw, (void **)&ddraw1); - ok(SUCCEEDED(hr), "Failed to get ddraw1 interface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get ddraw1 interface, hr %#lx.\n", hr);
hr = orig_vtbl->Initialize(clipper, ddraw1, 0); - todo_wine ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#x.\n", hr); + todo_wine ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#lx.\n", hr);
IDirectDraw_Release(ddraw1);
HeapFree(GetProcessHeap(), 0, clipper);
refcount = IDirectDraw4_Release(ddraw); - ok(!refcount, "%u references left.\n", refcount); + ok(!refcount, "%lu references left.\n", refcount); DestroyWindow(window); }
@@ -17695,35 +17695,35 @@ static void test_caps(void) hal_caps.dwSize = sizeof(hal_caps); hel_caps.dwSize = sizeof(hel_caps); hr = IDirectDraw4_GetCaps(ddraw, &hal_caps, &hel_caps); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); ok(hal_caps.ddsOldCaps.dwCaps == hal_caps.ddsCaps.dwCaps, - "Got unexpected caps %#x, expected %#x.\n", + "Got unexpected caps %#lx, expected %#lx.\n", hal_caps.ddsOldCaps.dwCaps, hal_caps.ddsCaps.dwCaps); ok(hel_caps.ddsOldCaps.dwCaps == hel_caps.ddsCaps.dwCaps, - "Got unexpected caps %#x, expected %#x.\n", + "Got unexpected caps %#lx, expected %#lx.\n", hel_caps.ddsOldCaps.dwCaps, hel_caps.ddsCaps.dwCaps);
no3d = !(hal_caps.ddsCaps.dwCaps & DDSCAPS_3DDEVICE); if (hal_caps.ddsCaps.dwCaps) { - ok(!(hal_caps.ddsCaps.dwCaps & caps_never), "Got unexpected caps %#x.\n", hal_caps.ddsCaps.dwCaps); - ok(!(~hal_caps.ddsCaps.dwCaps & caps_always), "Got unexpected caps %#x.\n", hal_caps.ddsCaps.dwCaps); + ok(!(hal_caps.ddsCaps.dwCaps & caps_never), "Got unexpected caps %#lx.\n", hal_caps.ddsCaps.dwCaps); + ok(!(~hal_caps.ddsCaps.dwCaps & caps_always), "Got unexpected caps %#lx.\n", hal_caps.ddsCaps.dwCaps); todo_wine_if(no3d) ok(!(~hal_caps.ddsCaps.dwCaps & caps_hal), - "Got unexpected caps %#x.\n", hal_caps.ddsCaps.dwCaps); + "Got unexpected caps %#lx.\n", hal_caps.ddsCaps.dwCaps); } - ok(!(hel_caps.ddsCaps.dwCaps & caps_never), "Got unexpected caps %#x.\n", hel_caps.ddsCaps.dwCaps); - ok(!(~hel_caps.ddsCaps.dwCaps & caps_always), "Got unexpected caps %#x.\n", hel_caps.ddsCaps.dwCaps); + ok(!(hel_caps.ddsCaps.dwCaps & caps_never), "Got unexpected caps %#lx.\n", hel_caps.ddsCaps.dwCaps); + ok(!(~hel_caps.ddsCaps.dwCaps & caps_always), "Got unexpected caps %#lx.\n", hel_caps.ddsCaps.dwCaps); todo_wine_if(!no3d) ok(!(hel_caps.ddsCaps.dwCaps & caps_hal), - "Got unexpected caps %#x.\n", hel_caps.ddsCaps.dwCaps); + "Got unexpected caps %#lx.\n", hel_caps.ddsCaps.dwCaps);
IDirectDraw4_Release(ddraw);
if (hal_caps.ddsCaps.dwCaps) { hr = DirectDrawCreate((GUID *)DDCREATE_HARDWAREONLY, &ddraw1, NULL); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirectDraw_QueryInterface(ddraw1, &IID_IDirectDraw4, (void **)&ddraw); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); IDirectDraw_Release(ddraw1);
memset(&hal_caps, 0, sizeof(hal_caps)); @@ -17731,27 +17731,27 @@ static void test_caps(void) hal_caps.dwSize = sizeof(hal_caps); hel_caps.dwSize = sizeof(hel_caps); hr = IDirectDraw4_GetCaps(ddraw, &hal_caps, &hel_caps); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); ok(hal_caps.ddsOldCaps.dwCaps == hal_caps.ddsCaps.dwCaps, - "Got unexpected caps %#x, expected %#x.\n", + "Got unexpected caps %#lx, expected %#lx.\n", hal_caps.ddsOldCaps.dwCaps, hal_caps.ddsCaps.dwCaps); ok(hel_caps.ddsOldCaps.dwCaps == hel_caps.ddsCaps.dwCaps, - "Got unexpected caps %#x, expected %#x.\n", + "Got unexpected caps %#lx, expected %#lx.\n", hel_caps.ddsOldCaps.dwCaps, hel_caps.ddsCaps.dwCaps);
- ok(!(hal_caps.ddsCaps.dwCaps & caps_never), "Got unexpected caps %#x.\n", hal_caps.ddsCaps.dwCaps); - ok(!(~hal_caps.ddsCaps.dwCaps & caps_always), "Got unexpected caps %#x.\n", hal_caps.ddsCaps.dwCaps); + ok(!(hal_caps.ddsCaps.dwCaps & caps_never), "Got unexpected caps %#lx.\n", hal_caps.ddsCaps.dwCaps); + ok(!(~hal_caps.ddsCaps.dwCaps & caps_always), "Got unexpected caps %#lx.\n", hal_caps.ddsCaps.dwCaps); todo_wine_if(no3d) ok(!(~hal_caps.ddsCaps.dwCaps & caps_hal), - "Got unexpected caps %#x.\n", hal_caps.ddsCaps.dwCaps); - todo_wine ok(!hel_caps.ddsCaps.dwCaps, "Got unexpected caps %#x.\n", hel_caps.ddsCaps.dwCaps); + "Got unexpected caps %#lx.\n", hal_caps.ddsCaps.dwCaps); + todo_wine ok(!hel_caps.ddsCaps.dwCaps, "Got unexpected caps %#lx.\n", hel_caps.ddsCaps.dwCaps);
IDirectDraw4_Release(ddraw); }
hr = DirectDrawCreate((GUID *)DDCREATE_EMULATIONONLY, &ddraw1, NULL); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirectDraw_QueryInterface(ddraw1, &IID_IDirectDraw4, (void **)&ddraw); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); IDirectDraw_Release(ddraw1);
memset(&hal_caps, 0, sizeof(hal_caps)); @@ -17759,19 +17759,19 @@ static void test_caps(void) hal_caps.dwSize = sizeof(hal_caps); hel_caps.dwSize = sizeof(hel_caps); hr = IDirectDraw4_GetCaps(ddraw, &hal_caps, &hel_caps); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); ok(hal_caps.ddsOldCaps.dwCaps == hal_caps.ddsCaps.dwCaps, - "Got unexpected caps %#x, expected %#x.\n", + "Got unexpected caps %#lx, expected %#lx.\n", hal_caps.ddsOldCaps.dwCaps, hal_caps.ddsCaps.dwCaps); ok(hel_caps.ddsOldCaps.dwCaps == hel_caps.ddsCaps.dwCaps, - "Got unexpected caps %#x, expected %#x.\n", + "Got unexpected caps %#lx, expected %#lx.\n", hel_caps.ddsOldCaps.dwCaps, hel_caps.ddsCaps.dwCaps);
- todo_wine ok(!hal_caps.ddsCaps.dwCaps, "Got unexpected caps %#x.\n", hal_caps.ddsCaps.dwCaps); - ok(!(hel_caps.ddsCaps.dwCaps & caps_never), "Got unexpected caps %#x.\n", hel_caps.ddsCaps.dwCaps); - ok(!(~hel_caps.ddsCaps.dwCaps & caps_always), "Got unexpected caps %#x.\n", hel_caps.ddsCaps.dwCaps); + todo_wine ok(!hal_caps.ddsCaps.dwCaps, "Got unexpected caps %#lx.\n", hal_caps.ddsCaps.dwCaps); + ok(!(hel_caps.ddsCaps.dwCaps & caps_never), "Got unexpected caps %#lx.\n", hel_caps.ddsCaps.dwCaps); + ok(!(~hel_caps.ddsCaps.dwCaps & caps_always), "Got unexpected caps %#lx.\n", hel_caps.ddsCaps.dwCaps); todo_wine_if(!no3d) ok(!(hel_caps.ddsCaps.dwCaps & caps_hal), - "Got unexpected caps %#x.\n", hel_caps.ddsCaps.dwCaps); + "Got unexpected caps %#lx.\n", hel_caps.ddsCaps.dwCaps);
IDirectDraw4_Release(ddraw); } @@ -17789,7 +17789,7 @@ static void test_d32_support(void) ddraw = create_ddraw(); ok(!!ddraw, "Failed to create a ddraw object.\n"); hr = IDirectDraw4_SetCooperativeLevel(ddraw, window, DDSCL_NORMAL); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr);
memset(&surface_desc, 0, sizeof(surface_desc)); surface_desc.dwSize = sizeof(surface_desc); @@ -17802,25 +17802,25 @@ static void test_d32_support(void) surface_desc.dwWidth = 64; surface_desc.dwHeight = 64; hr = IDirectDraw4_CreateSurface(ddraw, &surface_desc, &surface, NULL); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr);
memset(&surface_desc, 0, sizeof(surface_desc)); surface_desc.dwSize = sizeof(surface_desc); hr = IDirectDrawSurface4_GetSurfaceDesc(surface, &surface_desc); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); - ok((surface_desc.dwFlags & DDSD_PIXELFORMAT), "Got unexpected flags %#x.\n", surface_desc.dwFlags); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); + ok((surface_desc.dwFlags & DDSD_PIXELFORMAT), "Got unexpected flags %#lx.\n", surface_desc.dwFlags); ok(U4(surface_desc).ddpfPixelFormat.dwFlags & DDPF_ZBUFFER, - "Got unexpected format flags %#x.\n", U4(surface_desc).ddpfPixelFormat.dwFlags); + "Got unexpected format flags %#lx.\n", U4(surface_desc).ddpfPixelFormat.dwFlags); ok(U1(U4(surface_desc).ddpfPixelFormat).dwZBufferBitDepth == 32, - "Got unexpected dwZBufferBitDepth %u.\n", U1(U4(surface_desc).ddpfPixelFormat).dwZBufferBitDepth); + "Got unexpected dwZBufferBitDepth %lu.\n", U1(U4(surface_desc).ddpfPixelFormat).dwZBufferBitDepth); ok(U3(U4(surface_desc).ddpfPixelFormat).dwZBitMask == 0xffffffff, - "Got unexpected Z mask 0x%08x.\n", U3(U4(surface_desc).ddpfPixelFormat).dwZBitMask); + "Got unexpected Z mask 0x%08lx.\n", U3(U4(surface_desc).ddpfPixelFormat).dwZBitMask); ok(!(surface_desc.ddsCaps.dwCaps & DDSCAPS_VIDEOMEMORY), - "Got unexpected surface caps %#x.\n", surface_desc.ddsCaps.dwCaps); + "Got unexpected surface caps %#lx.\n", surface_desc.ddsCaps.dwCaps); IDirectDrawSurface4_Release(surface);
refcount = IDirectDraw4_Release(ddraw); - ok(!refcount, "%u references left.\n", refcount); + ok(!refcount, "%lu references left.\n", refcount); DestroyWindow(window); }
@@ -18022,11 +18022,11 @@ static void test_surface_format_conversion_alpha(void) ddraw = create_ddraw(); ok(!!ddraw, "Failed to create a ddraw object.\n"); hr = IDirectDraw4_SetCooperativeLevel(ddraw, window, DDSCL_NORMAL); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr);
hr = IDirect3DDevice3_EnumTextureFormats(device, test_block_formats_creation_cb, &supported_fmts); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr);
is_wine = !strcmp(winetest_platform, "wine");
@@ -18064,17 +18064,17 @@ static void test_surface_format_conversion_alpha(void) U4(surface_desc).ddpfPixelFormat = src_format->fmt; surface_desc.ddsCaps.dwCaps = test_caps[j].src_caps; hr = IDirectDraw4_CreateSurface(ddraw, &surface_desc, &src_surf, NULL); - ok(hr == DD_OK, "Test (%u, %u), got unexpected hr %#x.\n", j, i, hr); + ok(hr == DD_OK, "Test (%u, %u), got unexpected hr %#lx.\n", j, i, hr);
U4(surface_desc).ddpfPixelFormat = dst_format->fmt; surface_desc.ddsCaps.dwCaps = test_caps[j].dst_caps; hr = IDirectDraw4_CreateSurface(ddraw, &surface_desc, &dst_surf, NULL); - ok(hr == DD_OK, "Test (%u, %u), got unexpected hr %#x.\n", j, i, hr); + ok(hr == DD_OK, "Test (%u, %u), got unexpected hr %#lx.\n", j, i, hr);
memset(&lock, 0, sizeof(lock)); lock.dwSize = sizeof(lock); hr = IDirectDrawSurface4_Lock(src_surf, NULL, &lock, 0, NULL); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); pitch = U1(lock).lPitch; for (y = 0; y < src_format->y_blocks; ++y) { @@ -18083,7 +18083,7 @@ static void test_surface_format_conversion_alpha(void) src_format->block_size * src_format->x_blocks); } hr = IDirectDrawSurface4_Unlock(src_surf, NULL); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr);
hr = IDirectDrawSurface4_Blt(dst_surf, NULL, src_surf, NULL, DDBLT_WAIT, NULL); if (!is_wine && FAILED(hr)) @@ -18091,17 +18091,17 @@ static void test_surface_format_conversion_alpha(void) /* Some software blits are rejected on Windows. */ IDirectDrawSurface4_Release(dst_surf); IDirectDrawSurface4_Release(src_surf); - skip("Skipping test (%u, %u), cannot blit %s -> %s, hr %#x.\n", j, i, + skip("Skipping test (%u, %u), cannot blit %s -> %s, hr %#lx.\n", j, i, src_format->name, dst_format->name, hr); continue; } - ok(hr == DD_OK, "Test (%u, %s -> %s), got unexpected hr %#x.\n", j, + ok(hr == DD_OK, "Test (%u, %s -> %s), got unexpected hr %#lx.\n", j, src_format->name, dst_format->name, hr);
memset(&lock, 0, sizeof(lock)); lock.dwSize = sizeof(lock); hr = IDirectDrawSurface4_Lock(dst_surf, NULL, &lock, 0, NULL); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); pitch = U1(lock).lPitch;
for (y = 0; y < dst_format->y_blocks; ++y) @@ -18129,7 +18129,7 @@ static void test_surface_format_conversion_alpha(void) break; } hr = IDirectDrawSurface4_Unlock(dst_surf, NULL); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr);
IDirectDrawSurface4_Release(dst_surf); IDirectDrawSurface4_Release(src_surf); @@ -18138,7 +18138,7 @@ static void test_surface_format_conversion_alpha(void)
IDirect3DDevice3_Release(device); refcount = IDirectDraw4_Release(ddraw); - ok(!refcount, "%u references left.\n", refcount); + ok(!refcount, "%lu references left.\n", refcount); DestroyWindow(window); }
@@ -18192,13 +18192,13 @@ static void test_cursor_clipping(void) memset(&surface_desc, 0, sizeof(surface_desc)); surface_desc.dwSize = sizeof(surface_desc); hr = IDirectDraw4_GetDisplayMode(ddraw, &surface_desc); - ok(hr == DD_OK, "GetDisplayMode failed, hr %#x.\n", hr); + ok(hr == DD_OK, "GetDisplayMode failed, hr %#lx.\n", hr);
memset(¶m, 0, sizeof(param)); param.old_width = surface_desc.dwWidth; param.old_height = surface_desc.dwHeight; hr = IDirectDraw4_EnumDisplayModes(ddraw, 0, NULL, ¶m, find_different_mode_callback); - ok(hr == DD_OK, "EnumDisplayModes failed, hr %#x.\n", hr); + ok(hr == DD_OK, "EnumDisplayModes failed, hr %#lx.\n", hr); if (!(param.new_width && param.new_height)) { skip("Failed to find a different mode than %ux%u.\n", param.old_width, param.old_height); @@ -18206,87 +18206,87 @@ static void test_cursor_clipping(void) }
ret = ClipCursor(NULL); - ok(ret, "ClipCursor failed, error %#x.\n", GetLastError()); + ok(ret, "ClipCursor failed, error %#lx.\n", GetLastError()); get_virtual_rect(&rect); ret = GetClipCursor(&clip_rect); - ok(ret, "GetClipCursor failed, error %#x.\n", GetLastError()); + ok(ret, "GetClipCursor failed, error %#lx.\n", GetLastError()); ok(EqualRect(&clip_rect, &rect), "Expect clip rect %s, got %s.\n", wine_dbgstr_rect(&rect), wine_dbgstr_rect(&clip_rect));
/* Set cooperative level to normal */ hr = IDirectDraw4_SetCooperativeLevel(ddraw, window, DDSCL_NORMAL); - ok(hr == DD_OK, "SetCooperativeLevel failed, hr %#x.\n", hr); + ok(hr == DD_OK, "SetCooperativeLevel failed, hr %#lx.\n", hr); flush_events(); get_virtual_rect(&rect); ret = GetClipCursor(&clip_rect); - ok(ret, "GetClipCursor failed, error %#x.\n", GetLastError()); + ok(ret, "GetClipCursor failed, error %#lx.\n", GetLastError()); ok(EqualRect(&clip_rect, &rect), "Expect clip rect %s, got %s.\n", wine_dbgstr_rect(&rect), wine_dbgstr_rect(&clip_rect));
hr = set_display_mode(ddraw, param.new_width, param.new_height); - ok(hr == DD_OK || hr == DDERR_UNSUPPORTED, "SetDisplayMode failed, hr %#x.\n", hr); + ok(hr == DD_OK || hr == DDERR_UNSUPPORTED, "SetDisplayMode failed, hr %#lx.\n", hr); if (FAILED(hr)) { - win_skip("SetDisplayMode failed, hr %#x.\n", hr); + win_skip("SetDisplayMode failed, hr %#lx.\n", hr); goto done; } flush_events(); get_virtual_rect(&rect); ret = GetClipCursor(&clip_rect); - ok(ret, "GetClipCursor failed, error %#x.\n", GetLastError()); + ok(ret, "GetClipCursor failed, error %#lx.\n", GetLastError()); ok(EqualRect(&clip_rect, &rect), "Expect clip rect %s, got %s.\n", wine_dbgstr_rect(&rect), wine_dbgstr_rect(&clip_rect));
hr = IDirectDraw4_RestoreDisplayMode(ddraw); - ok(hr == DD_OK, "RestoreDisplayMode failed, hr %#x.\n", hr); + ok(hr == DD_OK, "RestoreDisplayMode failed, hr %#lx.\n", hr); flush_events(); get_virtual_rect(&rect); ret = GetClipCursor(&clip_rect); - ok(ret, "GetClipCursor failed, error %#x.\n", GetLastError()); + ok(ret, "GetClipCursor failed, error %#lx.\n", GetLastError()); ok(EqualRect(&clip_rect, &rect), "Expect clip rect %s, got %s.\n", wine_dbgstr_rect(&rect), wine_dbgstr_rect(&clip_rect));
/* Switch to full screen cooperative level */ hr = IDirectDraw4_SetCooperativeLevel(ddraw, window, DDSCL_EXCLUSIVE | DDSCL_FULLSCREEN); - ok(hr == DD_OK, "SetCooperativeLevel failed, hr %#x.\n", hr); + ok(hr == DD_OK, "SetCooperativeLevel failed, hr %#lx.\n", hr); flush_events(); SetRect(&rect, 0, 0, param.old_width, param.old_height); ret = GetClipCursor(&clip_rect); - ok(ret, "GetClipCursor failed, error %#x.\n", GetLastError()); + ok(ret, "GetClipCursor failed, error %#lx.\n", GetLastError()); ok(EqualRect(&clip_rect, &rect), "Expect clip rect %s, got %s.\n", wine_dbgstr_rect(&rect), wine_dbgstr_rect(&clip_rect));
hr = set_display_mode(ddraw, param.new_width, param.new_height); - ok(hr == DD_OK || hr == DDERR_UNSUPPORTED, "SetDisplayMode failed, hr %#x.\n", hr); + ok(hr == DD_OK || hr == DDERR_UNSUPPORTED, "SetDisplayMode failed, hr %#lx.\n", hr); if (FAILED(hr)) { - win_skip("SetDisplayMode failed, hr %#x.\n", hr); + win_skip("SetDisplayMode failed, hr %#lx.\n", hr); goto done; } flush_events(); SetRect(&rect, 0, 0, param.new_width, param.new_height); ret = GetClipCursor(&clip_rect); - ok(ret, "GetClipCursor failed, error %#x.\n", GetLastError()); + ok(ret, "GetClipCursor failed, error %#lx.\n", GetLastError()); ok(EqualRect(&clip_rect, &rect), "Expect clip rect %s, got %s.\n", wine_dbgstr_rect(&rect), wine_dbgstr_rect(&clip_rect));
/* Restore display mode */ hr = IDirectDraw4_RestoreDisplayMode(ddraw); - ok(hr == DD_OK, "RestoreDisplayMode failed, hr %#x.\n", hr); + ok(hr == DD_OK, "RestoreDisplayMode failed, hr %#lx.\n", hr); flush_events(); SetRect(&rect, 0, 0, param.old_width, param.old_height); ret = GetClipCursor(&clip_rect); - ok(ret, "GetClipCursor failed, error %#x.\n", GetLastError()); + ok(ret, "GetClipCursor failed, error %#lx.\n", GetLastError()); ok(EqualRect(&clip_rect, &rect), "Expect clip rect %s, got %s.\n", wine_dbgstr_rect(&rect), wine_dbgstr_rect(&clip_rect));
/* Switch to normal cooperative level */ hr = IDirectDraw4_SetCooperativeLevel(ddraw, window, DDSCL_NORMAL); - ok(hr == DD_OK, "SetCooperativeLevel failed, hr %#x.\n", hr); + ok(hr == DD_OK, "SetCooperativeLevel failed, hr %#lx.\n", hr); flush_events(); get_virtual_rect(&rect); ret = GetClipCursor(&clip_rect); - ok(ret, "GetClipCursor failed, error %#x.\n", GetLastError()); + ok(ret, "GetClipCursor failed, error %#lx.\n", GetLastError()); ok(EqualRect(&clip_rect, &rect), "Expect clip rect %s, got %s.\n", wine_dbgstr_rect(&rect), wine_dbgstr_rect(&clip_rect));
@@ -18313,10 +18313,10 @@ static BOOL CALLBACK test_window_position_cb(HMONITOR monitor, HDC hdc, RECT *mo flush_events();
hr = IDirectDraw4_SetCooperativeLevel(ddraw, window, DDSCL_EXCLUSIVE | DDSCL_FULLSCREEN); - ok(hr == DD_OK, "SetCooperativeLevel failed, hr %#x.\n", hr); + ok(hr == DD_OK, "SetCooperativeLevel failed, hr %#lx.\n", hr); flush_events(); ret = GetWindowRect(window, &window_rect); - ok(ret, "GetWindowRect failed, error %#x.\n", GetLastError()); + ok(ret, "GetWindowRect failed, error %#lx.\n", GetLastError()); SetRect(&primary_rect, 0, 0, GetSystemMetrics(SM_CXSCREEN), GetSystemMetrics(SM_CYSCREEN)); ok(EqualRect(&window_rect, &primary_rect), "Expect window rect %s, got %s.\n", wine_dbgstr_rect(&primary_rect), wine_dbgstr_rect(&window_rect)); @@ -18327,9 +18327,9 @@ static BOOL CALLBACK test_window_position_cb(HMONITOR monitor, HDC hdc, RECT *mo
ret = MoveWindow(window, new_rect.left, new_rect.top, new_rect.right - new_rect.left, new_rect.bottom - new_rect.top, TRUE); - ok(ret, "Got unexpected ret %#x, error %#x.\n", ret, GetLastError()); + ok(ret, "Got unexpected ret %#x, error %#lx.\n", ret, GetLastError()); ret = GetWindowRect(window, &window_rect); - ok(ret, "Got unexpected ret %#x, error %#x.\n", ret, GetLastError()); + ok(ret, "Got unexpected ret %#x, error %#lx.\n", ret, GetLastError()); ok(EqualRect(&window_rect, &new_rect), "Expected window rect %s, got %s.\n", wine_dbgstr_rect(monitor_rect), wine_dbgstr_rect(&window_rect)); @@ -18337,7 +18337,7 @@ static BOOL CALLBACK test_window_position_cb(HMONITOR monitor, HDC hdc, RECT *mo * on the second resize remains. */ flush_events(); ret = GetWindowRect(window, &window_rect); - ok(ret, "Got unexpected ret %#x, error %#x.\n", ret, GetLastError()); + ok(ret, "Got unexpected ret %#x, error %#lx.\n", ret, GetLastError()); /* Both Windows and Wine change the size of the window. On Windows it is exactly the new size but in Wine * it may get adjusted depending on window manager. */ ok(window_rect.right != monitor_rect->right && window_rect.bottom != monitor_rect->bottom, @@ -18346,15 +18346,15 @@ static BOOL CALLBACK test_window_position_cb(HMONITOR monitor, HDC hdc, RECT *mo
ret = MoveWindow(window, new_rect.left, new_rect.top, new_rect.right - new_rect.left, new_rect.bottom - new_rect.top, TRUE); - ok(ret, "Got unexpected ret %#x, error %#x.\n", ret, GetLastError()); + ok(ret, "Got unexpected ret %#x, error %#lx.\n", ret, GetLastError()); ret = GetWindowRect(window, &window_rect); - ok(ret, "Got unexpected ret %#x, error %#x.\n", ret, GetLastError()); + ok(ret, "Got unexpected ret %#x, error %#lx.\n", ret, GetLastError()); ok(EqualRect(&window_rect, &new_rect), "Expected window rect %s, got %s.\n", wine_dbgstr_rect(monitor_rect), wine_dbgstr_rect(&window_rect)); flush_events(); ret = GetWindowRect(window, &window_rect); - ok(ret, "Got unexpected ret %#x, error %#x.\n", ret, GetLastError()); + ok(ret, "Got unexpected ret %#x, error %#lx.\n", ret, GetLastError()); ok(window_rect.right != monitor_rect->right && window_rect.bottom != monitor_rect->bottom, "Expected window rect %s, got %s.\n", wine_dbgstr_rect(monitor_rect), wine_dbgstr_rect(&window_rect)); @@ -18362,25 +18362,25 @@ static BOOL CALLBACK test_window_position_cb(HMONITOR monitor, HDC hdc, RECT *mo /* Window activation should restore the window to fit the whole primary monitor */ ret = SetWindowPos(window, 0, monitor_rect->left, monitor_rect->top, 0, 0, SWP_NOZORDER | SWP_NOSIZE); - ok(ret, "SetWindowPos failed, error %#x.\n", GetLastError()); + ok(ret, "SetWindowPos failed, error %#lx.\n", GetLastError()); ret = SetForegroundWindow(GetDesktopWindow()); ok(ret, "Failed to set foreground window.\n"); flush_events(); ret = ShowWindow(window, SW_RESTORE); - ok(ret, "Failed to restore window, error %#x.\n", GetLastError()); + ok(ret, "Failed to restore window, error %#lx.\n", GetLastError()); flush_events(); ret = SetForegroundWindow(window); - ok(ret, "SetForegroundWindow failed, error %#x.\n", GetLastError()); + ok(ret, "SetForegroundWindow failed, error %#lx.\n", GetLastError()); flush_events(); ret = GetWindowRect(window, &window_rect); - ok(ret, "GetWindowRect failed, error %#x.\n", GetLastError()); + ok(ret, "GetWindowRect failed, error %#lx.\n", GetLastError()); ok(EqualRect(&window_rect, &primary_rect), "Expect window rect %s, got %s.\n", wine_dbgstr_rect(&primary_rect), wine_dbgstr_rect(&window_rect));
hr = IDirectDraw4_SetCooperativeLevel(ddraw, window, DDSCL_NORMAL); - ok(hr == DD_OK, "SetCooperativeLevel failed, hr %#x.\n", hr); + ok(hr == DD_OK, "SetCooperativeLevel failed, hr %#lx.\n", hr); ret = GetWindowRect(window, &window_rect); - ok(ret, "GetWindowRect failed, error %#x.\n", GetLastError()); + ok(ret, "GetWindowRect failed, error %#lx.\n", GetLastError()); ok(EqualRect(&window_rect, &primary_rect), "Expect window rect %s, got %s.\n", wine_dbgstr_rect(&primary_rect), wine_dbgstr_rect(&window_rect));
@@ -18411,14 +18411,14 @@ static BOOL CALLBACK test_get_display_mode_cb(HMONITOR monitor, HDC hdc, RECT *m /* Test that DirectDraw doesn't use the device window to determine which monitor to use */ ret = SetWindowPos(window, 0, monitor_rect->left, monitor_rect->top, 0, 0, SWP_NOZORDER | SWP_NOSIZE); - ok(ret, "SetWindowPos failed, error %#x.\n", GetLastError()); + ok(ret, "SetWindowPos failed, error %#lx.\n", GetLastError());
surface_desc.dwSize = sizeof(surface_desc); hr = IDirectDraw4_GetDisplayMode(ddraw, &surface_desc); - ok(hr == DD_OK, "GetDisplayMode failed, hr %#x.\n", hr); - ok(surface_desc.dwWidth == GetSystemMetrics(SM_CXSCREEN), "Expect width %d, got %d.\n", + ok(hr == DD_OK, "GetDisplayMode failed, hr %#lx.\n", hr); + ok(surface_desc.dwWidth == GetSystemMetrics(SM_CXSCREEN), "Expect width %d, got %ld.\n", GetSystemMetrics(SM_CXSCREEN), surface_desc.dwWidth); - ok(surface_desc.dwHeight == GetSystemMetrics(SM_CYSCREEN), "Expect height %d, got %d.\n", + ok(surface_desc.dwHeight == GetSystemMetrics(SM_CYSCREEN), "Expect height %d, got %ld.\n", GetSystemMetrics(SM_CYSCREEN), surface_desc.dwHeight);
DestroyWindow(window); @@ -18445,41 +18445,41 @@ static void test_get_display_mode(void) ok(!!window, "Failed to create a window.\n");
hr = IDirectDraw4_SetCooperativeLevel(ddraw, window, DDSCL_EXCLUSIVE | DDSCL_FULLSCREEN); - ok(hr == DD_OK, "SetCooperativeLevel failed, hr %#x.\n", hr); + ok(hr == DD_OK, "SetCooperativeLevel failed, hr %#lx.\n", hr);
memset(&devmode, 0, sizeof(devmode)); devmode.dmSize = sizeof(devmode); ret = EnumDisplaySettingsW(NULL, ENUM_CURRENT_SETTINGS, &devmode); - ok(ret, "EnumDisplaySettingsW failed, error %#x.\n", GetLastError()); + ok(ret, "EnumDisplaySettingsW failed, error %#lx.\n", GetLastError());
surface_desc.dwSize = sizeof(surface_desc); hr = IDirectDraw4_GetDisplayMode(ddraw, &surface_desc); - ok(hr == DD_OK, "GetDisplayMode failed, hr %#x.\n", hr); - ok(surface_desc.dwSize == sizeof(surface_desc), "Expected dwSize %u, got %u.\n", + ok(hr == DD_OK, "GetDisplayMode failed, hr %#lx.\n", hr); + ok(surface_desc.dwSize == sizeof(surface_desc), "Expected dwSize %Iu, got %lu.\n", sizeof(surface_desc), surface_desc.dwSize); - ok(surface_desc.dwFlags == flags, "Expected dwFlags %#x, got %#x.\n", flags, + ok(surface_desc.dwFlags == flags, "Expected dwFlags %#lx, got %#lx.\n", flags, surface_desc.dwFlags); - ok(surface_desc.dwWidth == devmode.dmPelsWidth, "Expected width %u, got %u.\n", + ok(surface_desc.dwWidth == devmode.dmPelsWidth, "Expected width %lu, got %lu.\n", devmode.dmPelsWidth, surface_desc.dwWidth); - ok(surface_desc.dwHeight == devmode.dmPelsHeight, "Expected height %u, got %u.\n", + ok(surface_desc.dwHeight == devmode.dmPelsHeight, "Expected height %lu, got %lu.\n", devmode.dmPelsHeight, surface_desc.dwHeight); - ok(surface_desc.dwRefreshRate == devmode.dmDisplayFrequency, "Expected frequency %u, got %u.\n", + ok(surface_desc.dwRefreshRate == devmode.dmDisplayFrequency, "Expected frequency %lu, got %lu.\n", devmode.dmDisplayFrequency, surface_desc.dwRefreshRate); ok(surface_desc.ddpfPixelFormat.dwSize == sizeof(surface_desc.ddpfPixelFormat), - "Expected ddpfPixelFormat.dwSize %u, got %u.\n", sizeof(surface_desc.ddpfPixelFormat), + "Expected ddpfPixelFormat.dwSize %Iu, got %lu.\n", sizeof(surface_desc.ddpfPixelFormat), surface_desc.ddpfPixelFormat.dwSize); ok(surface_desc.ddpfPixelFormat.dwRGBBitCount == devmode.dmBitsPerPel, - "Expected ddpfPixelFormat.dwRGBBitCount %u, got %u.\n", devmode.dmBitsPerPel, + "Expected ddpfPixelFormat.dwRGBBitCount %lu, got %lu.\n", devmode.dmBitsPerPel, surface_desc.ddpfPixelFormat.dwRGBBitCount); ok(surface_desc.lPitch == devmode.dmPelsWidth * devmode.dmBitsPerPel / 8, - "Expected pitch %u, got %u.\n", devmode.dmPelsWidth * devmode.dmBitsPerPel / 8, + "Expected pitch %lu, got %lu.\n", devmode.dmPelsWidth * devmode.dmBitsPerPel / 8, surface_desc.lPitch);
memset(¶m, 0, sizeof(param)); param.old_frequency = surface_desc.dwRefreshRate; hr = IDirectDraw4_EnumDisplayModes(ddraw, DDEDM_REFRESHRATES, NULL, ¶m, find_different_mode_callback); - ok(hr == DD_OK, "EnumDisplayModes failed, hr %#x.\n", hr); + ok(hr == DD_OK, "EnumDisplayModes failed, hr %#lx.\n", hr); if (!param.new_frequency) { skip("Failed to find a display mode with a different frequency.\n"); @@ -18488,17 +18488,17 @@ static void test_get_display_mode(void)
hr = IDirectDraw4_SetDisplayMode(ddraw, param.new_width, param.new_height, param.new_bpp, param.new_frequency, 0); - ok(hr == DD_OK, "SetDisplayMode failed, hr %#x.\n", hr); + ok(hr == DD_OK, "SetDisplayMode failed, hr %#lx.\n", hr); hr = IDirectDraw4_GetDisplayMode(ddraw, &surface_desc); - ok(hr == DD_OK, "GetDisplayMode failed, hr %#x.\n", hr); - ok(surface_desc.dwWidth == param.new_width, "Expected width %u, got %u.\n", param.new_width, + ok(hr == DD_OK, "GetDisplayMode failed, hr %#lx.\n", hr); + ok(surface_desc.dwWidth == param.new_width, "Expected width %u, got %lu.\n", param.new_width, surface_desc.dwWidth); - ok(surface_desc.dwHeight == param.new_height, "Expected height %u, got %u.\n", param.new_height, + ok(surface_desc.dwHeight == param.new_height, "Expected height %u, got %lu.\n", param.new_height, surface_desc.dwHeight); - ok(surface_desc.dwRefreshRate == param.new_frequency, "Expected frequency %u, got %u.\n", + ok(surface_desc.dwRefreshRate == param.new_frequency, "Expected frequency %u, got %lu.\n", param.new_frequency, surface_desc.dwRefreshRate); ok(surface_desc.ddpfPixelFormat.dwRGBBitCount == param.new_bpp, - "Expected ddpfPixelFormat.dwRGBBitCount %u, got %u.\n", devmode.dmBitsPerPel, + "Expected ddpfPixelFormat.dwRGBBitCount %lu, got %lu.\n", devmode.dmBitsPerPel, surface_desc.ddpfPixelFormat.dwRGBBitCount);
done: @@ -18552,15 +18552,15 @@ static void test_texture_wrong_caps(const GUID *device_guid) return; } hr = IDirect3DDevice3_GetDirect3D(device, &d3d); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirect3D3_QueryInterface(d3d, &IID_IDirectDraw4, (void **)&ddraw); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirect3DDevice3_GetRenderTarget(device, &rt); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
viewport = create_viewport(device, 0, 0, 640, 480); hr = IDirect3DDevice3_SetCurrentViewport(device, viewport); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
memset(&ddsd, 0, sizeof(ddsd)); ddsd.dwSize = sizeof(ddsd); @@ -18570,39 +18570,39 @@ static void test_texture_wrong_caps(const GUID *device_guid) ddsd.ddsCaps.dwCaps = DDSCAPS_OFFSCREENPLAIN; U4(ddsd).ddpfPixelFormat = fmt; hr = IDirectDraw4_CreateSurface(ddraw, &ddsd, &surface, NULL); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface4_QueryInterface(surface, &IID_IDirect3DTexture2, (void **)&texture); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr);
fill_surface(surface, 0xff00ff00);
hr = IDirect3DDevice3_SetRenderState(device, D3DRENDERSTATE_ZENABLE, D3DZB_FALSE); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
hr = IDirect3DDevice3_SetTextureStageState(device, 0, D3DTSS_COLOROP, D3DTOP_SELECTARG1); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirect3DDevice3_SetTextureStageState(device, 0, D3DTSS_ALPHAOP, D3DTOP_SELECTARG1); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirect3DDevice3_SetTextureStageState(device, 0, D3DTSS_COLORARG1, D3DTA_TEXTURE); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirect3DDevice3_SetTextureStageState(device, 0, D3DTSS_ALPHAARG1, D3DTA_TEXTURE);
- ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirect3DDevice3_SetTexture(device, 0, texture); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirect3DViewport3_Clear2(viewport, 1, &clear_rect, D3DCLEAR_TARGET, 0x000000ff, 0.0f, 0); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirect3DDevice3_BeginScene(device); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirect3DDevice3_DrawPrimitive(device, D3DPT_TRIANGLESTRIP, D3DFVF_XYZ | D3DFVF_TEX1, quad, 4, 0); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirect3DDevice3_EndScene(device); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
expected_color = is_software_device_type(device_guid) ? 0x0000ff00 : 0x00ffffff; color = get_surface_color(rt, 320, 240); - ok(color == expected_color, "Got color 0x%08x, expected 0x%08x.\n", color, expected_color); + ok(color == expected_color, "Got color 0x%08lx, expected 0x%08lx.\n", color, expected_color);
IDirect3DTexture2_Release(texture); IDirectDrawSurface4_Release(surface); @@ -18611,7 +18611,7 @@ static void test_texture_wrong_caps(const GUID *device_guid) IDirectDraw4_Release(ddraw); IDirect3D3_Release(d3d); refcount = IDirect3DDevice3_Release(device); - ok(!refcount, "Device has %u references left.\n", refcount); + ok(!refcount, "Device has %lu references left.\n", refcount); DestroyWindow(window); }
@@ -18962,14 +18962,14 @@ static void test_filling_convention(void) }
hr = IDirect3DDevice3_GetDirect3D(device, &d3d); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirect3D3_QueryInterface(d3d, &IID_IDirectDraw4, (void **)&ddraw); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirect3DDevice3_GetRenderTarget(device, &backbuffer); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); viewport = create_viewport(device, 0, 0, vp_size, vp_size); hr = IDirect3DDevice3_SetCurrentViewport(device, viewport); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
memset(&desc, 0, sizeof(desc)); desc.dwSize = sizeof(desc); @@ -18984,7 +18984,7 @@ static void test_filling_convention(void) desc.ddpfPixelFormat.dwGBitMask = 0x0000ff00; desc.ddpfPixelFormat.dwBBitMask = 0x000000ff; hr = IDirectDraw4_CreateSurface(ddraw, &desc, &rt, NULL); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
/* Nvidia on Windows 10 refuses to set the offscreen RT * if it does not have an attached depth stencil. */ @@ -18993,7 +18993,7 @@ static void test_filling_convention(void) desc.dwSize = sizeof(desc); desc.ddpfPixelFormat.dwSize = sizeof(desc.ddpfPixelFormat); hr = IDirectDrawSurface4_GetPixelFormat(ds, &desc.ddpfPixelFormat); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); IDirectDrawSurface4_Release(ds);
desc.dwFlags = DDSD_CAPS | DDSD_WIDTH | DDSD_HEIGHT | DDSD_PIXELFORMAT; @@ -19001,14 +19001,14 @@ static void test_filling_convention(void) desc.dwWidth = vp_size; desc.dwHeight = vp_size; hr = IDirectDraw4_CreateSurface(ddraw, &desc, &ds, NULL); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface4_AddAttachedSurface(rt, ds); - ok(SUCCEEDED(hr), "Failed to attach depth buffer, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to attach depth buffer, hr %#lx.\n", hr);
hr = IDirect3DDevice3_SetRenderState(device, D3DRENDERSTATE_LIGHTING, FALSE); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirect3DDevice3_SetRenderState(device, D3DRENDERSTATE_ZENABLE, D3DZB_FALSE); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
for (i = 0; i < ARRAY_SIZE(tests); ++i) { @@ -19017,17 +19017,17 @@ static void test_filling_convention(void) cur = j ? rt : backbuffer;
hr = IDirect3DDevice3_SetRenderTarget(device, cur, 0); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirect3DViewport3_Clear2(viewport, 1, &clear_rect, D3DCLEAR_TARGET, colour_clear, 0.0f, 0); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
hr = IDirect3DDevice3_BeginScene(device); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirect3DDevice3_DrawPrimitive(device, D3DPT_TRIANGLELIST, tests[i].fvf, tests[i].geometry, 12, 0); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirect3DDevice3_EndScene(device); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
for (y = 0; y < 8; y++) { @@ -19065,7 +19065,7 @@ static void test_filling_convention(void) * convention, but because wined3d will nudge geometry to the left to * keep diagonals (the 'R' in test case 'edge_tris') intact. */ todo_wine_if(todo && !compare_color(colour, expected, 1)) - ok(compare_color(colour, expected, 1), "Got unexpected colour %08x, %ux%u, case %u, j %u.\n", + ok(compare_color(colour, expected, 1), "Got unexpected colour %08lx, %ux%u, case %u, j %u.\n", colour, x, y, i, j); } } @@ -19079,7 +19079,7 @@ static void test_filling_convention(void) IDirectDraw4_Release(ddraw); IDirect3D3_Release(d3d); refcount = IDirect3DDevice3_Release(device); - ok(!refcount, "Device has %u references left.\n", refcount); + ok(!refcount, "Device has %lu references left.\n", refcount); DestroyWindow(window); }
diff --git a/dlls/ddraw/tests/ddraw7.c b/dlls/ddraw/tests/ddraw7.c index 84789e8f177..17d20892b3c 100644 --- a/dlls/ddraw/tests/ddraw7.c +++ b/dlls/ddraw/tests/ddraw7.c @@ -148,7 +148,7 @@ static BOOL ddraw_get_identifier(IDirectDraw7 *ddraw, DDDEVICEIDENTIFIER2 *ident HRESULT hr;
hr = IDirectDraw7_GetDeviceIdentifier(ddraw, identifier, 0); - ok(SUCCEEDED(hr), "Failed to get device identifier, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get device identifier, hr %#lx.\n", hr);
return SUCCEEDED(hr); } @@ -235,7 +235,7 @@ static DWORD WINAPI create_window_thread_proc(void *param)
p->window = create_window(); ret = SetEvent(p->window_created); - ok(ret, "SetEvent failed, last error %#x.\n", GetLastError()); + ok(ret, "SetEvent failed, last error %#lx.\n", GetLastError());
for (;;) { @@ -248,7 +248,7 @@ static DWORD WINAPI create_window_thread_proc(void *param) break; if (res != WAIT_TIMEOUT) { - ok(0, "Wait failed (%#x), last error %#x.\n", res, GetLastError()); + ok(0, "Wait failed (%#lx), last error %#lx.\n", res, GetLastError()); break; } } @@ -263,13 +263,13 @@ static void create_window_thread(struct create_window_thread_param *p) DWORD res, tid;
p->window_created = CreateEventA(NULL, FALSE, FALSE, NULL); - ok(!!p->window_created, "CreateEvent failed, last error %#x.\n", GetLastError()); + ok(!!p->window_created, "CreateEvent failed, last error %#lx.\n", GetLastError()); p->destroy_window = CreateEventA(NULL, FALSE, FALSE, NULL); - ok(!!p->destroy_window, "CreateEvent failed, last error %#x.\n", GetLastError()); + ok(!!p->destroy_window, "CreateEvent failed, last error %#lx.\n", GetLastError()); p->thread = CreateThread(NULL, 0, create_window_thread_proc, p, 0, &tid); - ok(!!p->thread, "Failed to create thread, last error %#x.\n", GetLastError()); + ok(!!p->thread, "Failed to create thread, last error %#lx.\n", GetLastError()); res = WaitForSingleObject(p->window_created, INFINITE); - ok(res == WAIT_OBJECT_0, "Wait failed (%#x), last error %#x.\n", res, GetLastError()); + ok(res == WAIT_OBJECT_0, "Wait failed (%#lx), last error %#lx.\n", res, GetLastError()); }
static void destroy_window_thread(struct create_window_thread_param *p) @@ -288,9 +288,9 @@ static IDirectDrawSurface7 *get_depth_stencil(IDirect3DDevice7 *device) HRESULT hr;
hr = IDirect3DDevice7_GetRenderTarget(device, &rt); - ok(SUCCEEDED(hr), "Failed to get the render target, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get the render target, hr %#lx.\n", hr); hr = IDirectDrawSurface7_GetAttachedSurface(rt, &caps, &ret); - ok(SUCCEEDED(hr) || hr == DDERR_NOTFOUND, "Failed to get the z buffer, hr %#x.\n", hr); + ok(SUCCEEDED(hr) || hr == DDERR_NOTFOUND, "Failed to get the z buffer, hr %#lx.\n", hr); IDirectDrawSurface7_Release(rt); return ret; } @@ -376,14 +376,14 @@ static D3DCOLOR get_surface_color(IDirectDrawSurface7 *surface, UINT x, UINT y) surface_desc.dwSize = sizeof(surface_desc);
hr = IDirectDrawSurface7_Lock(surface, &rect, &surface_desc, DDLOCK_READONLY, NULL); - ok(SUCCEEDED(hr), "Failed to lock surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to lock surface, hr %#lx.\n", hr); if (FAILED(hr)) return 0xdeadbeef;
color = *((DWORD *)surface_desc.lpSurface) & 0x00ffffff;
hr = IDirectDrawSurface7_Unlock(surface, &rect); - ok(SUCCEEDED(hr), "Failed to unlock surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to unlock surface, hr %#lx.\n", hr);
return color; } @@ -396,7 +396,7 @@ static void fill_surface(IDirectDrawSurface7 *surface, D3DCOLOR color) DWORD *ptr;
hr = IDirectDrawSurface7_Lock(surface, NULL, &surface_desc, DDLOCK_WAIT, NULL); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr);
for (y = 0; y < surface_desc.dwHeight; ++y) { @@ -408,7 +408,7 @@ static void fill_surface(IDirectDrawSurface7 *surface, D3DCOLOR color) }
hr = IDirectDrawSurface7_Unlock(surface, NULL); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); }
#define check_rect(a, b, c) check_rect_(__LINE__, a, b, c) @@ -443,7 +443,7 @@ static void check_rect_(unsigned int line, IDirectDrawSurface7 *surface, RECT r, if (x < 0 || x >= 640 || y < 0 || y >= 480) continue; color = get_surface_color(surface, x, y); - ok_(__FILE__, line)(color == expected, "%s: Pixel (%d, %d) has color %08x, expected %08x.\n", + ok_(__FILE__, line)(color == expected, "%s: Pixel (%ld, %ld) has color %08lx, expected %08lx.\n", message, x, y, color, expected); } } @@ -496,7 +496,7 @@ static IDirect3DDevice7 *create_device_ex(HWND window, DWORD coop_level, const G return NULL;
hr = IDirectDraw7_SetCooperativeLevel(ddraw, window, coop_level); - ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#lx.\n", hr);
memset(&surface_desc, 0, sizeof(surface_desc)); surface_desc.dwSize = sizeof(surface_desc); @@ -508,18 +508,18 @@ static IDirect3DDevice7 *create_device_ex(HWND window, DWORD coop_level, const G surface_desc.dwHeight = 480;
hr = IDirectDraw7_CreateSurface(ddraw, &surface_desc, &surface, NULL); - ok(SUCCEEDED(hr), "Failed to create surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create surface, hr %#lx.\n", hr);
if (coop_level & DDSCL_NORMAL) { IDirectDrawClipper *clipper;
hr = IDirectDraw7_CreateClipper(ddraw, 0, &clipper, NULL); - ok(SUCCEEDED(hr), "Failed to create clipper, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create clipper, hr %#lx.\n", hr); hr = IDirectDrawClipper_SetHWnd(clipper, 0, window); - ok(SUCCEEDED(hr), "Failed to set clipper window, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set clipper window, hr %#lx.\n", hr); hr = IDirectDrawSurface7_SetClipper(surface, clipper); - ok(SUCCEEDED(hr), "Failed to set surface clipper, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set surface clipper, hr %#lx.\n", hr); IDirectDrawClipper_Release(clipper); }
@@ -550,7 +550,7 @@ static IDirect3DDevice7 *create_device_ex(HWND window, DWORD coop_level, const G surface_desc.dwWidth = 640; surface_desc.dwHeight = 480; hr = IDirectDraw7_CreateSurface(ddraw, &surface_desc, &ds, NULL); - ok(SUCCEEDED(hr), "Failed to create depth buffer, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create depth buffer, hr %#lx.\n", hr); if (FAILED(hr)) { IDirect3D7_Release(d3d7); @@ -559,7 +559,7 @@ static IDirect3DDevice7 *create_device_ex(HWND window, DWORD coop_level, const G }
hr = IDirectDrawSurface_AddAttachedSurface(surface, ds); - ok(SUCCEEDED(hr), "Failed to attach depth buffer, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to attach depth buffer, hr %#lx.\n", hr); IDirectDrawSurface7_Release(ds); if (FAILED(hr)) { @@ -593,7 +593,7 @@ static IDirect3DDevice7 *create_device(HWND window, DWORD coop_level) return NULL;
hr = IDirect3D7_EnumDevices(d3d7, enum_devtype_cb, &hal_ok); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); if (hal_ok) device_guid = &IID_IDirect3DTnLHalDevice;
@@ -621,13 +621,13 @@ static LRESULT CALLBACK test_proc(HWND hwnd, UINT message, WPARAM wparam, LPARAM { if (expect_messages->check_wparam) ok (wparam == expect_messages->expect_wparam, - "Got unexpected wparam %lx for message %x, expected %lx.\n", + "Got unexpected wparam %Ix for message %x, expected %Ix.\n", wparam, message, expect_messages->expect_wparam);
if (focus_test_ddraw) { hr = IDirectDraw7_TestCooperativeLevel(focus_test_ddraw); - ok(hr == expect_messages->ddraw_state, "Got ddraw state %#x on message %#x, expected %#x.\n", + ok(hr == expect_messages->ddraw_state, "Got ddraw state %#lx on message %#x, expected %#lx.\n", hr, message, expect_messages->ddraw_state); }
@@ -650,9 +650,9 @@ static void fix_wndproc(HWND window, LONG_PTR proc)
SetWindowLongPtrA(window, GWLP_WNDPROC, proc); hr = IDirectDraw7_SetCooperativeLevel(ddraw, window, DDSCL_EXCLUSIVE | DDSCL_FULLSCREEN); - ok(SUCCEEDED(hr), "SetCooperativeLevel failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "SetCooperativeLevel failed, hr %#lx.\n", hr); hr = IDirectDraw7_SetCooperativeLevel(ddraw, window, DDSCL_NORMAL); - ok(SUCCEEDED(hr), "SetCooperativeLevel failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "SetCooperativeLevel failed, hr %#lx.\n", hr);
IDirectDraw7_Release(ddraw); } @@ -701,17 +701,17 @@ static void test_process_vertices(void) }
hr = IDirect3DDevice7_GetDirect3D(device, &d3d7); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr);
memset(&vb_desc, 0, sizeof(vb_desc)); vb_desc.dwSize = sizeof(vb_desc); vb_desc.dwFVF = D3DFVF_XYZ; vb_desc.dwNumVertices = 4; hr = IDirect3D7_CreateVertexBuffer(d3d7, &vb_desc, &src_vb, 0); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr);
hr = IDirect3DVertexBuffer7_Lock(src_vb, 0, (void **)&src_data, NULL); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); src_data[0].x = 0.0f; src_data[0].y = 0.0f; src_data[0].z = 0.0f; @@ -725,7 +725,7 @@ static void test_process_vertices(void) src_data[3].y = -0.5f; src_data[3].z = 0.25f; hr = IDirect3DVertexBuffer7_Unlock(src_vb); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr);
memset(&vb_desc, 0, sizeof(vb_desc)); vb_desc.dwSize = sizeof(vb_desc); @@ -733,7 +733,7 @@ static void test_process_vertices(void) vb_desc.dwNumVertices = 4; /* MSDN says that the last parameter must be 0 - check that. */ hr = IDirect3D7_CreateVertexBuffer(d3d7, &vb_desc, &dst_vb1, 4); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr);
memset(&vb_desc, 0, sizeof(vb_desc)); vb_desc.dwSize = sizeof(vb_desc); @@ -741,7 +741,7 @@ static void test_process_vertices(void) vb_desc.dwNumVertices = 5; /* MSDN says that the last parameter must be 0 - check that. */ hr = IDirect3D7_CreateVertexBuffer(d3d7, &vb_desc, &dst_vb2, 12345678); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr);
memset(&vp, 0, sizeof(vp)); vp.dwX = 64; @@ -751,15 +751,15 @@ static void test_process_vertices(void) vp.dvMinZ = 0.0f; vp.dvMaxZ = 1.0f; hr = IDirect3DDevice7_SetViewport(device, &vp); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr);
hr = IDirect3DVertexBuffer7_ProcessVertices(dst_vb1, D3DVOP_TRANSFORM, 0, 4, src_vb, 0, device, 0); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirect3DVertexBuffer7_ProcessVertices(dst_vb2, D3DVOP_TRANSFORM, 0, 4, src_vb, 0, device, 0); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr);
hr = IDirect3DVertexBuffer7_Lock(dst_vb1, 0, (void **)&dst_data, NULL); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); ok(compare_vec4(&dst_data[0], +1.280e+2f, +1.280e+2f, +0.000e+0f, +1.000e+0f, 4096), "Got unexpected vertex 0 {%.8e, %.8e, %.8e, %.8e}.\n", dst_data[0].x, dst_data[0].y, dst_data[0].z, dst_data[0].w); @@ -773,10 +773,10 @@ static void test_process_vertices(void) "Got unexpected vertex 3 {%.8e, %.8e, %.8e, %.8e}.\n", dst_data[3].x, dst_data[3].y, dst_data[3].z, dst_data[3].w); hr = IDirect3DVertexBuffer7_Unlock(dst_vb1); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr);
hr = IDirect3DVertexBuffer7_Lock(dst_vb2, 0, (void **)&dst_data2, NULL); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); /* Small thing without much practical meaning, but I stumbled upon it, * so let's check for it: If the output vertex buffer has no RHW value, * the RHW value of the last vertex is written into the next vertex. */ @@ -784,21 +784,21 @@ static void test_process_vertices(void) "Got unexpected vertex 4 {%.8e, %.8e, %.8e}.\n", dst_data2[4].x, dst_data2[4].y, dst_data2[4].z); hr = IDirect3DVertexBuffer7_Unlock(dst_vb2); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr);
/* Test degenerate viewport z ranges. */ vp.dvMinZ = 0.0f; vp.dvMaxZ = 0.0f; hr = IDirect3DDevice7_SetViewport(device, &vp); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr);
hr = IDirect3DVertexBuffer7_ProcessVertices(dst_vb1, D3DVOP_TRANSFORM, 0, 4, src_vb, 0, device, 0); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirect3DVertexBuffer7_ProcessVertices(dst_vb2, D3DVOP_TRANSFORM, 0, 4, src_vb, 0, device, 0); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr);
hr = IDirect3DVertexBuffer7_Lock(dst_vb1, 0, (void **)&dst_data, NULL); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); ok(compare_vec4(&dst_data[0], +1.280e+2f, +1.280e+2f, +0.000e+0f, +1.000e+0f, 4096), "Got unexpected vertex 0 {%.8e, %.8e, %.8e, %.8e}.\n", dst_data[0].x, dst_data[0].y, dst_data[0].z, dst_data[0].w); @@ -812,20 +812,20 @@ static void test_process_vertices(void) "Got unexpected vertex 3 {%.8e, %.8e, %.8e, %.8e}.\n", dst_data[3].x, dst_data[3].y, dst_data[3].z, dst_data[3].w); hr = IDirect3DVertexBuffer7_Unlock(dst_vb1); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr);
vp.dvMinZ = 1.0f; vp.dvMaxZ = 0.0f; hr = IDirect3DDevice7_SetViewport(device, &vp); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr);
hr = IDirect3DVertexBuffer7_ProcessVertices(dst_vb1, D3DVOP_TRANSFORM, 0, 4, src_vb, 0, device, 0); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirect3DVertexBuffer7_ProcessVertices(dst_vb2, D3DVOP_TRANSFORM, 0, 4, src_vb, 0, device, 0); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr);
hr = IDirect3DVertexBuffer7_Lock(dst_vb1, 0, (void **)&dst_data, NULL); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); ok(compare_vec4(&dst_data[0], +1.280e+2f, +1.280e+2f, +1.000e+0f, +1.000e+0f, 4096), "Got unexpected vertex 0 {%.8e, %.8e, %.8e, %.8e}.\n", dst_data[0].x, dst_data[0].y, dst_data[0].z, dst_data[0].w); @@ -839,7 +839,7 @@ static void test_process_vertices(void) "Got unexpected vertex 3 {%.8e, %.8e, %.8e, %.8e}.\n", dst_data[3].x, dst_data[3].y, dst_data[3].z, dst_data[3].w); hr = IDirect3DVertexBuffer7_Unlock(dst_vb1); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr);
/* Try a more complicated viewport, same vertices. */ memset(&vp, 0, sizeof(vp)); @@ -850,13 +850,13 @@ static void test_process_vertices(void) vp.dvMinZ = -2.0f; vp.dvMaxZ = 4.0f; hr = IDirect3DDevice7_SetViewport(device, &vp); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr);
hr = IDirect3DVertexBuffer7_ProcessVertices(dst_vb1, D3DVOP_TRANSFORM, 0, 4, src_vb, 0, device, 0); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr);
hr = IDirect3DVertexBuffer7_Lock(dst_vb1, 0, (void **)&dst_data, NULL); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); ok(compare_vec4(&dst_data[0], +1.330e+2f, +7.000e+1f, -2.000e+0f, +1.000e+0f, 4096), "Got unexpected vertex 0 {%.8e, %.8e, %.8e, %.8e}.\n", dst_data[0].x, dst_data[0].y, dst_data[0].z, dst_data[0].w); @@ -870,20 +870,20 @@ static void test_process_vertices(void) "Got unexpected vertex 3 {%.8e, %.8e, %.8e, %.8e}.\n", dst_data[3].x, dst_data[3].y, dst_data[3].z, dst_data[3].w); hr = IDirect3DVertexBuffer7_Unlock(dst_vb1); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr);
hr = IDirect3DDevice7_SetTransform(device, D3DTRANSFORMSTATE_WORLD, &world); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirect3DDevice7_SetTransform(device, D3DTRANSFORMSTATE_VIEW, &view); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirect3DDevice7_SetTransform(device, D3DTRANSFORMSTATE_PROJECTION, &proj); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr);
hr = IDirect3DVertexBuffer7_ProcessVertices(dst_vb1, D3DVOP_TRANSFORM, 0, 4, src_vb, 0, device, 0); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr);
hr = IDirect3DVertexBuffer7_Lock(dst_vb1, 0, (void **)&dst_data, NULL); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); ok(compare_vec4(&dst_data[0], +2.560e+2f, +7.000e+1f, -2.000e+0f, +3.333e-1f, 4096), "Got unexpected vertex 0 {%.8e, %.8e, %.8e, %.8e}.\n", dst_data[0].x, dst_data[0].y, dst_data[0].z, dst_data[0].w); @@ -897,7 +897,7 @@ static void test_process_vertices(void) "Got unexpected vertex 3 {%.8e, %.8e, %.8e, %.8e}.\n", dst_data[3].x, dst_data[3].y, dst_data[3].z, dst_data[3].w); hr = IDirect3DVertexBuffer7_Unlock(dst_vb1); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr);
IDirect3DVertexBuffer7_Release(dst_vb2); IDirect3DVertexBuffer7_Release(dst_vb1); @@ -918,23 +918,23 @@ static void test_coop_level_create_device_window(void) ok(!!ddraw, "Failed to create a ddraw object.\n");
hr = IDirectDraw7_SetCooperativeLevel(ddraw, NULL, DDSCL_NORMAL); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); device_window = FindWindowA("DirectDrawDeviceWnd", "DirectDrawDeviceWnd"); ok(!device_window, "Unexpected device window found.\n"); hr = IDirectDraw7_SetCooperativeLevel(ddraw, NULL, DDSCL_CREATEDEVICEWINDOW); - ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#lx.\n", hr); device_window = FindWindowA("DirectDrawDeviceWnd", "DirectDrawDeviceWnd"); ok(!device_window, "Unexpected device window found.\n"); hr = IDirectDraw7_SetCooperativeLevel(ddraw, NULL, DDSCL_CREATEDEVICEWINDOW | DDSCL_NORMAL); - ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#lx.\n", hr); device_window = FindWindowA("DirectDrawDeviceWnd", "DirectDrawDeviceWnd"); ok(!device_window, "Unexpected device window found.\n"); hr = IDirectDraw7_SetCooperativeLevel(ddraw, NULL, DDSCL_CREATEDEVICEWINDOW | DDSCL_NORMAL | DDSCL_FULLSCREEN); - ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#lx.\n", hr); device_window = FindWindowA("DirectDrawDeviceWnd", "DirectDrawDeviceWnd"); ok(!device_window, "Unexpected device window found.\n"); hr = IDirectDraw7_SetCooperativeLevel(ddraw, NULL, DDSCL_CREATEDEVICEWINDOW | DDSCL_EXCLUSIVE | DDSCL_FULLSCREEN); - ok(hr == DDERR_NOFOCUSWINDOW || broken(hr == DDERR_INVALIDPARAMS), "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_NOFOCUSWINDOW || broken(hr == DDERR_INVALIDPARAMS), "Got unexpected hr %#lx.\n", hr); device_window = FindWindowA("DirectDrawDeviceWnd", "DirectDrawDeviceWnd"); ok(!device_window, "Unexpected device window found.\n");
@@ -948,48 +948,48 @@ static void test_coop_level_create_device_window(void) }
hr = IDirectDraw7_SetCooperativeLevel(ddraw, NULL, DDSCL_NORMAL); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); device_window = FindWindowA("DirectDrawDeviceWnd", "DirectDrawDeviceWnd"); ok(!device_window, "Unexpected device window found.\n"); hr = IDirectDraw7_SetCooperativeLevel(ddraw, focus_window, DDSCL_EXCLUSIVE | DDSCL_FULLSCREEN); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); device_window = FindWindowA("DirectDrawDeviceWnd", "DirectDrawDeviceWnd"); ok(!device_window, "Unexpected device window found.\n");
hr = IDirectDraw7_SetCooperativeLevel(ddraw, NULL, DDSCL_NORMAL); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); device_window = FindWindowA("DirectDrawDeviceWnd", "DirectDrawDeviceWnd"); ok(!device_window, "Unexpected device window found.\n"); hr = IDirectDraw7_SetCooperativeLevel(ddraw, NULL, DDSCL_SETFOCUSWINDOW | DDSCL_CREATEDEVICEWINDOW | DDSCL_EXCLUSIVE | DDSCL_FULLSCREEN); - ok(hr == DDERR_NOHWND, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_NOHWND, "Got unexpected hr %#lx.\n", hr); device_window = FindWindowA("DirectDrawDeviceWnd", "DirectDrawDeviceWnd"); ok(!!device_window, "Device window not found.\n");
hr = IDirectDraw7_SetCooperativeLevel(ddraw, NULL, DDSCL_NORMAL); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); device_window = FindWindowA("DirectDrawDeviceWnd", "DirectDrawDeviceWnd"); ok(!device_window, "Unexpected device window found.\n"); hr = IDirectDraw7_SetCooperativeLevel(ddraw, focus_window, DDSCL_SETFOCUSWINDOW | DDSCL_CREATEDEVICEWINDOW | DDSCL_EXCLUSIVE | DDSCL_FULLSCREEN); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); device_window = FindWindowA("DirectDrawDeviceWnd", "DirectDrawDeviceWnd"); ok(!!device_window, "Device window not found.\n");
hr = IDirectDraw7_SetCooperativeLevel(ddraw, NULL, DDSCL_NORMAL); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); device_window = FindWindowA("DirectDrawDeviceWnd", "DirectDrawDeviceWnd"); ok(!device_window, "Unexpected device window found.\n"); hr = IDirectDraw7_SetCooperativeLevel(ddraw, NULL, DDSCL_CREATEDEVICEWINDOW | DDSCL_EXCLUSIVE | DDSCL_FULLSCREEN); - ok(hr == DDERR_NOFOCUSWINDOW, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_NOFOCUSWINDOW, "Got unexpected hr %#lx.\n", hr); device_window = FindWindowA("DirectDrawDeviceWnd", "DirectDrawDeviceWnd"); ok(!device_window, "Unexpected device window found.\n"); hr = IDirectDraw7_SetCooperativeLevel(ddraw, focus_window, DDSCL_SETFOCUSWINDOW); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); device_window = FindWindowA("DirectDrawDeviceWnd", "DirectDrawDeviceWnd"); ok(!device_window, "Unexpected device window found.\n"); hr = IDirectDraw7_SetCooperativeLevel(ddraw, NULL, DDSCL_CREATEDEVICEWINDOW | DDSCL_EXCLUSIVE | DDSCL_FULLSCREEN); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); device_window = FindWindowA("DirectDrawDeviceWnd", "DirectDrawDeviceWnd"); ok(!!device_window, "Device window not found.\n");
@@ -1063,22 +1063,22 @@ static void test_clipper_blt(void) ok(ret, "Failed to map client rect.\n");
hr = IDirectDraw7_SetCooperativeLevel(ddraw, window, DDSCL_NORMAL); - ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#lx.\n", hr);
hr = IDirectDraw7_CreateClipper(ddraw, 0, &clipper, NULL); - ok(SUCCEEDED(hr), "Failed to create clipper, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create clipper, hr %#lx.\n", hr); hr = IDirectDrawClipper_GetClipList(clipper, NULL, NULL, &ret); - ok(hr == DDERR_NOCLIPLIST, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_NOCLIPLIST, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawClipper_SetHWnd(clipper, 0, window); - ok(SUCCEEDED(hr), "Failed to set clipper window, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set clipper window, hr %#lx.\n", hr); hr = IDirectDrawClipper_GetClipList(clipper, NULL, NULL, &ret); - ok(SUCCEEDED(hr), "Failed to get clip list size, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get clip list size, hr %#lx.\n", hr); rgn_data = HeapAlloc(GetProcessHeap(), 0, ret); hr = IDirectDrawClipper_GetClipList(clipper, NULL, rgn_data, &ret); - ok(SUCCEEDED(hr), "Failed to get clip list, hr %#x.\n", hr); - ok(rgn_data->rdh.dwSize == sizeof(rgn_data->rdh), "Got unexpected structure size %#x.\n", rgn_data->rdh.dwSize); - ok(rgn_data->rdh.iType == RDH_RECTANGLES, "Got unexpected type %#x.\n", rgn_data->rdh.iType); - ok(rgn_data->rdh.nCount >= 1, "Got unexpected count %u.\n", rgn_data->rdh.nCount); + ok(SUCCEEDED(hr), "Failed to get clip list, hr %#lx.\n", hr); + ok(rgn_data->rdh.dwSize == sizeof(rgn_data->rdh), "Got unexpected structure size %#lx.\n", rgn_data->rdh.dwSize); + ok(rgn_data->rdh.iType == RDH_RECTANGLES, "Got unexpected type %#lx.\n", rgn_data->rdh.iType); + ok(rgn_data->rdh.nCount >= 1, "Got unexpected count %lu.\n", rgn_data->rdh.nCount); ok(EqualRect(&rgn_data->rdh.rcBound, &client_rect), "Got unexpected bounding rect %s, expected %s.\n", wine_dbgstr_rect(&rgn_data->rdh.rcBound), wine_dbgstr_rect(&client_rect)); @@ -1098,11 +1098,11 @@ static void test_clipper_blt(void) DeleteObject(r1);
hr = IDirectDrawClipper_SetClipList(clipper, rgn_data, 0); - ok(hr == DDERR_CLIPPERISUSINGHWND, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_CLIPPERISUSINGHWND, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawClipper_SetHWnd(clipper, 0, NULL); - ok(SUCCEEDED(hr), "Failed to set clipper window, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set clipper window, hr %#lx.\n", hr); hr = IDirectDrawClipper_SetClipList(clipper, rgn_data, 0); - ok(SUCCEEDED(hr), "Failed to set clip list, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set clip list, hr %#lx.\n", hr);
HeapFree(GetProcessHeap(), 0, rgn_data);
@@ -1120,33 +1120,33 @@ static void test_clipper_blt(void) U4(U4(surface_desc).ddpfPixelFormat).dwBBitMask = 0x000000ff;
hr = IDirectDraw7_CreateSurface(ddraw, &surface_desc, &src_surface, NULL); - ok(SUCCEEDED(hr), "Failed to create source surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create source surface, hr %#lx.\n", hr); hr = IDirectDraw7_CreateSurface(ddraw, &surface_desc, &dst_surface, NULL); - ok(SUCCEEDED(hr), "Failed to create destination surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create destination surface, hr %#lx.\n", hr);
memset(&fx, 0, sizeof(fx)); fx.dwSize = sizeof(fx); hr = IDirectDrawSurface7_Blt(src_surface, NULL, NULL, NULL, DDBLT_COLORFILL | DDBLT_WAIT, &fx); - ok(SUCCEEDED(hr), "Failed to clear source surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to clear source surface, hr %#lx.\n", hr); hr = IDirectDrawSurface7_Blt(dst_surface, NULL, NULL, NULL, DDBLT_COLORFILL | DDBLT_WAIT, &fx); - ok(SUCCEEDED(hr), "Failed to clear destination surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to clear destination surface, hr %#lx.\n", hr);
hr = IDirectDrawSurface7_Lock(src_surface, NULL, &surface_desc, 0, NULL); - ok(SUCCEEDED(hr), "Failed to lock source surface, hr %#x.\n", hr); - ok(U1(surface_desc).lPitch == 2560, "Got unexpected surface pitch %u.\n", U1(surface_desc).lPitch); + ok(SUCCEEDED(hr), "Failed to lock source surface, hr %#lx.\n", hr); + ok(U1(surface_desc).lPitch == 2560, "Got unexpected surface pitch %lu.\n", U1(surface_desc).lPitch); ptr = surface_desc.lpSurface; memcpy(&ptr[ 0], &src_data[ 0], 6 * sizeof(DWORD)); memcpy(&ptr[ 640], &src_data[ 6], 6 * sizeof(DWORD)); memcpy(&ptr[1280], &src_data[12], 6 * sizeof(DWORD)); hr = IDirectDrawSurface7_Unlock(src_surface, NULL); - ok(SUCCEEDED(hr), "Failed to unlock source surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to unlock source surface, hr %#lx.\n", hr);
hr = IDirectDrawSurface7_SetClipper(dst_surface, clipper); - ok(SUCCEEDED(hr), "Failed to set clipper, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set clipper, hr %#lx.\n", hr);
SetRect(&src_rect, 1, 1, 5, 2); hr = IDirectDrawSurface7_Blt(dst_surface, NULL, src_surface, &src_rect, DDBLT_WAIT, NULL); - ok(SUCCEEDED(hr), "Failed to blit, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to blit, hr %#lx.\n", hr); for (i = 0; i < 4; ++i) { for (j = 0; j < 4; ++j) @@ -1156,13 +1156,13 @@ static void test_clipper_blt(void) color = get_surface_color(dst_surface, x, y); ok(compare_color(color, expected1[i * 4 + j], 1) || broken(compare_color(color, expected1_broken[i * 4 + j], 1)), - "Expected color 0x%08x at %u,%u, got 0x%08x.\n", expected1[i * 4 + j], x, y, color); + "Expected color 0x%08lx at %u,%u, got 0x%08lx.\n", expected1[i * 4 + j], x, y, color); } }
U5(fx).dwFillColor = 0xff0000ff; hr = IDirectDrawSurface7_Blt(dst_surface, NULL, NULL, NULL, DDBLT_COLORFILL | DDBLT_WAIT, &fx); - ok(SUCCEEDED(hr), "Failed to clear destination surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to clear destination surface, hr %#lx.\n", hr); for (i = 0; i < 4; ++i) { for (j = 0; j < 4; ++j) @@ -1171,35 +1171,35 @@ static void test_clipper_blt(void) y = 60 * ((2 * i) + 1); color = get_surface_color(dst_surface, x, y); ok(compare_color(color, expected2[i * 4 + j], 1), - "Expected color 0x%08x at %u,%u, got 0x%08x.\n", expected2[i * 4 + j], x, y, color); + "Expected color 0x%08lx at %u,%u, got 0x%08lx.\n", expected2[i * 4 + j], x, y, color); } }
hr = IDirectDrawSurface7_BltFast(dst_surface, 0, 0, src_surface, NULL, DDBLTFAST_WAIT); - ok(hr == DDERR_BLTFASTCANTCLIP, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_BLTFASTCANTCLIP, "Got unexpected hr %#lx.\n", hr);
hr = IDirectDrawClipper_SetHWnd(clipper, 0, window); - ok(SUCCEEDED(hr), "Failed to set clipper window, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set clipper window, hr %#lx.\n", hr); hr = IDirectDrawClipper_GetClipList(clipper, NULL, NULL, &ret); - ok(SUCCEEDED(hr), "Failed to get clip list size, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get clip list size, hr %#lx.\n", hr); DestroyWindow(window); hr = IDirectDrawClipper_GetClipList(clipper, NULL, NULL, &ret); - ok(hr == E_FAIL, "Got unexpected hr %#x.\n", hr); + ok(hr == E_FAIL, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawClipper_SetHWnd(clipper, 0, NULL); - ok(SUCCEEDED(hr), "Failed to set clipper window, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set clipper window, hr %#lx.\n", hr); hr = IDirectDrawClipper_GetClipList(clipper, NULL, NULL, &ret); - ok(SUCCEEDED(hr), "Failed to get clip list size, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get clip list size, hr %#lx.\n", hr); hr = IDirectDrawClipper_SetClipList(clipper, NULL, 0); - ok(SUCCEEDED(hr), "Failed to set clip list, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set clip list, hr %#lx.\n", hr); hr = IDirectDrawClipper_GetClipList(clipper, NULL, NULL, &ret); - ok(hr == DDERR_NOCLIPLIST, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_NOCLIPLIST, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface7_Blt(dst_surface, NULL, NULL, NULL, DDBLT_COLORFILL | DDBLT_WAIT, &fx); - ok(hr == DDERR_NOCLIPLIST, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_NOCLIPLIST, "Got unexpected hr %#lx.\n", hr);
IDirectDrawSurface7_Release(dst_surface); IDirectDrawSurface7_Release(src_surface); refcount = IDirectDrawClipper_Release(clipper); - ok(!refcount, "Clipper has %u references left.\n", refcount); + ok(!refcount, "Clipper has %lu references left.\n", refcount); IDirectDraw7_Release(ddraw); }
@@ -1238,94 +1238,94 @@ static void test_coop_level_d3d_state(void) }
hr = IDirect3DDevice7_SetRenderState(device, D3DRENDERSTATE_LIGHTING, FALSE); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirect3DDevice7_SetRenderState(device, D3DRENDERSTATE_SRCBLEND, D3DBLEND_SRCALPHA); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirect3DDevice7_SetRenderState(device, D3DRENDERSTATE_DESTBLEND, D3DBLEND_DESTALPHA); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr);
hr = IDirect3DDevice7_GetRenderTarget(device, &rt); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirect3DDevice7_GetRenderState(device, D3DRENDERSTATE_ZENABLE, &value); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); - ok(!!value, "Got unexpected z-enable state %#x.\n", value); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); + ok(!!value, "Got unexpected z-enable state %#lx.\n", value); hr = IDirect3DDevice7_GetRenderState(device, D3DRENDERSTATE_ALPHABLENDENABLE, &value); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); - ok(!value, "Got unexpected alpha blend enable state %#x.\n", value); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); + ok(!value, "Got unexpected alpha blend enable state %#lx.\n", value); hr = IDirect3DDevice7_SetRenderState(device, D3DRENDERSTATE_ALPHABLENDENABLE, TRUE); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirect3DDevice7_Clear(device, 0, NULL, D3DCLEAR_TARGET, 0xffff0000, 0.0f, 0); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); color = get_surface_color(rt, 320, 240); - ok(compare_color(color, 0x00ff0000, 1), "Got unexpected color 0x%08x.\n", color); + ok(compare_color(color, 0x00ff0000, 1), "Got unexpected color 0x%08lx.\n", color);
hr = IDirect3DDevice7_GetDirect3D(device, &d3d); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirect3D7_QueryInterface(d3d, &IID_IDirectDraw7, (void **)&ddraw); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); IDirect3D7_Release(d3d); hr = IDirectDraw7_SetCooperativeLevel(ddraw, window, DDSCL_EXCLUSIVE | DDSCL_FULLSCREEN); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface7_IsLost(rt); - ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#lx.\n", hr);
memset(&lock, 0, sizeof(lock)); lock.dwSize = sizeof(lock); lock.lpSurface = (void *)0xdeadbeef; hr = IDirectDrawSurface7_Lock(rt, NULL, &lock, DDLOCK_READONLY, NULL); - ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#lx.\n", hr); ok(lock.lpSurface == (void *)0xdeadbeef, "Got unexpected lock.lpSurface %p.\n", lock.lpSurface);
memset(&caps, 0, sizeof(caps)); caps.dwCaps = DDSCAPS_ZBUFFER; hr = IDirectDrawSurface7_GetAttachedSurface(rt, &caps, &surface); - ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#lx.\n", hr); caps.dwCaps = DDSCAPS_FLIP; hr = IDirectDrawSurface7_GetAttachedSurface(rt, &caps, &surface); - ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#lx.\n", hr);
hr = IDirectDraw7_RestoreAllSurfaces(ddraw); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr);
hr = IDirectDrawSurface7_Lock(rt, NULL, &lock, DDLOCK_READONLY, NULL); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface7_Unlock(rt, NULL); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr);
caps.dwCaps = DDSCAPS_ZBUFFER; hr = IDirectDrawSurface7_GetAttachedSurface(rt, &caps, &surface); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); IDirectDrawSurface7_Release(surface);
caps.dwCaps = DDSCAPS_FLIP; hr = IDirectDrawSurface7_GetAttachedSurface(rt, &caps, &surface); - ok(hr == DDERR_NOTFOUND, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_NOTFOUND, "Got unexpected hr %#lx.\n", hr);
IDirectDraw7_Release(ddraw);
hr = IDirect3DDevice7_GetRenderTarget(device, &surface); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); ok(surface == rt, "Got unexpected surface %p.\n", surface); hr = IDirect3DDevice7_GetRenderState(device, D3DRENDERSTATE_ZENABLE, &value); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); - ok(!!value, "Got unexpected z-enable state %#x.\n", value); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); + ok(!!value, "Got unexpected z-enable state %#lx.\n", value); hr = IDirect3DDevice7_GetRenderState(device, D3DRENDERSTATE_ALPHABLENDENABLE, &value); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); - ok(!!value, "Got unexpected alpha blend enable state %#x.\n", value); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); + ok(!!value, "Got unexpected alpha blend enable state %#lx.\n", value); hr = IDirect3DDevice7_Clear(device, 0, NULL, D3DCLEAR_TARGET | D3DCLEAR_ZBUFFER, 0xff00ff00, 1.0f, 0); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); color = get_surface_color(rt, 320, 240); - ok(compare_color(color, 0x0000ff00, 1), "Got unexpected color 0x%08x.\n", color); + ok(compare_color(color, 0x0000ff00, 1), "Got unexpected color 0x%08lx.\n", color);
hr = IDirect3DDevice7_BeginScene(device); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirect3DDevice7_DrawPrimitive(device, D3DPT_TRIANGLESTRIP, D3DFVF_XYZ | D3DFVF_DIFFUSE, quad, ARRAY_SIZE(quad), 0); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirect3DDevice7_EndScene(device); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); color = get_surface_color(rt, 320, 240); - ok(compare_color(color, 0x0000ff80, 1), "Got unexpected color 0x%08x.\n", color); + ok(compare_color(color, 0x0000ff80, 1), "Got unexpected color 0x%08lx.\n", color);
IDirectDrawSurface7_Release(surface); IDirectDrawSurface7_Release(rt); @@ -1351,7 +1351,7 @@ static void test_surface_interface_mismatch(void) ddraw = create_ddraw(); ok(!!ddraw, "Failed to create a ddraw object.\n"); hr = IDirectDraw7_SetCooperativeLevel(ddraw, window, DDSCL_NORMAL); - ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#lx.\n", hr);
memset(&surface_desc, 0, sizeof(surface_desc)); surface_desc.dwSize = sizeof(surface_desc); @@ -1361,10 +1361,10 @@ static void test_surface_interface_mismatch(void) surface_desc.dwHeight = 480;
hr = IDirectDraw7_CreateSurface(ddraw, &surface_desc, &surface, NULL); - ok(SUCCEEDED(hr), "Failed to create surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create surface, hr %#lx.\n", hr);
hr = IDirectDrawSurface7_QueryInterface(surface, &IID_IDirectDrawSurface3, (void **)&surface3); - ok(SUCCEEDED(hr), "Failed to QI IDirectDrawSurface3, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to QI IDirectDrawSurface3, hr %#lx.\n", hr);
if (FAILED(IDirectDraw7_QueryInterface(ddraw, &IID_IDirect3D7, (void **)&d3d))) { @@ -1388,15 +1388,15 @@ static void test_surface_interface_mismatch(void) surface_desc.dwWidth = 640; surface_desc.dwHeight = 480; hr = IDirectDraw7_CreateSurface(ddraw, &surface_desc, &ds, NULL); - ok(SUCCEEDED(hr), "Failed to create depth buffer, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create depth buffer, hr %#lx.\n", hr); if (FAILED(hr)) goto cleanup;
/* Using a different surface interface version still works */ hr = IDirectDrawSurface3_AddAttachedSurface(surface3, (IDirectDrawSurface3 *)ds); - ok(SUCCEEDED(hr), "Failed to attach depth buffer, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to attach depth buffer, hr %#lx.\n", hr); refcount = IDirectDrawSurface7_Release(ds); - ok(refcount == 1, "Got unexpected refcount %u.\n", refcount); + ok(refcount == 1, "Got unexpected refcount %lu.\n", refcount); if (FAILED(hr)) goto cleanup;
@@ -1407,9 +1407,9 @@ static void test_surface_interface_mismatch(void) goto cleanup;
hr = IDirect3DDevice7_Clear(device, 0, NULL, D3DCLEAR_TARGET, 0xffff0000, 0.0f, 0); - ok(SUCCEEDED(hr), "Failed to clear render target, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to clear render target, hr %#lx.\n", hr); color = get_surface_color(surface, 320, 240); - ok(compare_color(color, 0x00ff0000, 1), "Got unexpected color 0x%08x.\n", color); + ok(compare_color(color, 0x00ff0000, 1), "Got unexpected color 0x%08lx.\n", color);
cleanup: if (surface3) IDirectDrawSurface3_Release(surface3); @@ -1431,7 +1431,7 @@ static void test_coop_level_threaded(void) create_window_thread(&p);
hr = IDirectDraw7_SetCooperativeLevel(ddraw, p.window, DDSCL_EXCLUSIVE | DDSCL_FULLSCREEN); - ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#lx.\n", hr);
destroy_window_thread(&p); IDirectDraw7_Release(ddraw); @@ -1480,9 +1480,9 @@ static void test_depth_blit(const GUID *device_guid) }
hr = IDirect3DDevice7_GetDirect3D(device, &d3d); - ok(SUCCEEDED(hr), "Failed to get Direct3D7 interface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get Direct3D7 interface, hr %#lx.\n", hr); hr = IDirect3D7_QueryInterface(d3d, &IID_IDirectDraw7, (void **)&ddraw); - ok(SUCCEEDED(hr), "Failed to get DirectDraw7 interface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get DirectDraw7 interface, hr %#lx.\n", hr); IDirect3D7_Release(d3d);
ds1 = get_depth_stencil(device); @@ -1492,7 +1492,7 @@ static void test_depth_blit(const GUID *device_guid) memset(&ddsd_existing, 0, sizeof(ddsd_existing)); ddsd_existing.dwSize = sizeof(ddsd_existing); hr = IDirectDrawSurface7_GetSurfaceDesc(ds1, &ddsd_existing); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); ddsd_new.dwFlags = DDSD_CAPS | DDSD_WIDTH | DDSD_HEIGHT | DDSD_PIXELFORMAT; ddsd_new.ddsCaps.dwCaps = DDSCAPS_ZBUFFER; if (is_software_device_type(device_guid)) @@ -1501,66 +1501,66 @@ static void test_depth_blit(const GUID *device_guid) ddsd_new.dwHeight = ddsd_existing.dwHeight; U4(ddsd_new).ddpfPixelFormat = U4(ddsd_existing).ddpfPixelFormat; hr = IDirectDraw7_CreateSurface(ddraw, &ddsd_new, &ds2, NULL); - ok(SUCCEEDED(hr), "Failed to create a z buffer, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create a z buffer, hr %#lx.\n", hr); hr = IDirectDraw7_CreateSurface(ddraw, &ddsd_new, &ds3, NULL); - ok(SUCCEEDED(hr), "Failed to create a z buffer, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create a z buffer, hr %#lx.\n", hr); IDirectDraw7_Release(ddraw);
hr = IDirect3DDevice7_SetRenderState(device, D3DRENDERSTATE_ZENABLE, D3DZB_TRUE); - ok(SUCCEEDED(hr), "Failed to enable z testing, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to enable z testing, hr %#lx.\n", hr); hr = IDirect3DDevice7_SetRenderState(device, D3DRENDERSTATE_ZFUNC, D3DCMP_LESSEQUAL); - ok(SUCCEEDED(hr), "Failed to set the z function, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set the z function, hr %#lx.\n", hr); hr = IDirect3DDevice7_SetRenderState(device, D3DRENDERSTATE_LIGHTING, FALSE); - ok(SUCCEEDED(hr), "Failed to disable lighting, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to disable lighting, hr %#lx.\n", hr);
hr = IDirect3DDevice7_Clear(device, 0, NULL, D3DCLEAR_ZBUFFER, 0, 0.0f, 0); - ok(SUCCEEDED(hr), "Failed to clear the z buffer, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to clear the z buffer, hr %#lx.\n", hr);
/* Partial blit. */ SetRect(&src_rect, 0, 0, 320, 240); SetRect(&dst_rect, 0, 0, 320, 240); hr = IDirectDrawSurface7_Blt(ds2, &dst_rect, ds1, &src_rect, DDBLT_WAIT, NULL); - ok(SUCCEEDED(hr), "Got unexpected hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Got unexpected hr %#lx.\n", hr); /* Different locations. */ SetRect(&src_rect, 0, 0, 320, 240); SetRect(&dst_rect, 320, 240, 640, 480); hr = IDirectDrawSurface7_Blt(ds2, &dst_rect, ds1, &src_rect, DDBLT_WAIT, NULL); - ok(SUCCEEDED(hr), "Got unexpected hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Got unexpected hr %#lx.\n", hr); /* Stretched. */ SetRect(&src_rect, 0, 0, 320, 240); SetRect(&dst_rect, 0, 0, 640, 480); hr = IDirectDrawSurface7_Blt(ds2, &dst_rect, ds1, &src_rect, DDBLT_WAIT, NULL); - ok(SUCCEEDED(hr), "Got unexpected hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Got unexpected hr %#lx.\n", hr); /* Flipped. */ SetRect(&src_rect, 0, 480, 640, 0); SetRect(&dst_rect, 0, 0, 640, 480); hr = IDirectDrawSurface7_Blt(ds2, &dst_rect, ds1, &src_rect, DDBLT_WAIT, NULL); - ok(hr == DDERR_INVALIDRECT, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_INVALIDRECT, "Got unexpected hr %#lx.\n", hr); SetRect(&src_rect, 0, 0, 640, 480); SetRect(&dst_rect, 0, 480, 640, 0); hr = IDirectDrawSurface7_Blt(ds2, &dst_rect, ds1, &src_rect, DDBLT_WAIT, NULL); - ok(hr == DDERR_INVALIDRECT, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_INVALIDRECT, "Got unexpected hr %#lx.\n", hr); /* Full, explicit. */ SetRect(&src_rect, 0, 0, 640, 480); SetRect(&dst_rect, 0, 0, 640, 480); hr = IDirectDrawSurface7_Blt(ds2, &dst_rect, ds1, &src_rect, DDBLT_WAIT, NULL); - ok(SUCCEEDED(hr), "Got unexpected hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Got unexpected hr %#lx.\n", hr); /* Depth -> color blit: Succeeds on Win7 + Radeon HD 5700, fails on WinXP + Radeon X1600 */
/* Depth blit inside a BeginScene / EndScene pair */ hr = IDirect3DDevice7_BeginScene(device); - ok(SUCCEEDED(hr), "Failed to start scene, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to start scene, hr %#lx.\n", hr); /* From the current depth stencil */ hr = IDirectDrawSurface7_Blt(ds2, NULL, ds1, NULL, DDBLT_WAIT, NULL); - ok(SUCCEEDED(hr), "Got unexpected hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Got unexpected hr %#lx.\n", hr); /* To the current depth stencil */ hr = IDirectDrawSurface7_Blt(ds1, NULL, ds2, NULL, DDBLT_WAIT, NULL); - ok(SUCCEEDED(hr), "Got unexpected hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Got unexpected hr %#lx.\n", hr); /* Between unbound surfaces */ hr = IDirectDrawSurface7_Blt(ds3, NULL, ds2, NULL, DDBLT_WAIT, NULL); - ok(SUCCEEDED(hr), "Got unexpected hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Got unexpected hr %#lx.\n", hr); hr = IDirect3DDevice7_EndScene(device); - ok(SUCCEEDED(hr), "Failed to end scene, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to end scene, hr %#lx.\n", hr);
/* Avoid changing the depth stencil, it doesn't work properly on Windows. * Instead use DDBLT_DEPTHFILL to clear the depth stencil. Unfortunately @@ -1569,40 +1569,40 @@ static void test_depth_blit(const GUID *device_guid) memset(&fx, 0, sizeof(fx)); fx.dwSize = sizeof(fx); hr = IDirectDrawSurface7_Blt(ds2, NULL, NULL, NULL, DDBLT_DEPTHFILL | DDBLT_WAIT, &fx); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
hr = IDirect3DDevice7_Clear(device, 0, NULL, D3DCLEAR_ZBUFFER | D3DCLEAR_TARGET, 0xffff0000, 1.0f, 0); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
hr = IDirect3DDevice7_GetRenderTarget(device, &rt); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); color = get_surface_color(rt, 80, 60);
/* For some reason clears and colour fill blits randomly fail with software render target. */ ok(color == 0x00ff0000 || broken(is_software_device_type(device_guid) && !color), - "Got unexpected colour 0x%08x.\n", color); + "Got unexpected colour 0x%08lx.\n", color); if (!color) { fill_surface(rt, 0xffff0000);
color = get_surface_color(rt, 80, 60); - ok(color == 0x00ff0000, "Got unexpected colour 0x%08x.\n", color); + ok(color == 0x00ff0000, "Got unexpected colour 0x%08lx.\n", color); }
SetRect(&dst_rect, 0, 0, 320, 240); hr = IDirectDrawSurface7_Blt(ds1, &dst_rect, ds2, NULL, DDBLT_WAIT, NULL); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); IDirectDrawSurface7_Release(ds3); IDirectDrawSurface7_Release(ds2); IDirectDrawSurface7_Release(ds1);
hr = IDirect3DDevice7_BeginScene(device); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirect3DDevice7_DrawPrimitive(device, D3DPT_TRIANGLESTRIP, D3DFVF_XYZ | D3DFVF_DIFFUSE, quad1, 4, 0); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirect3DDevice7_EndScene(device); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
for (i = 0; i < 4; ++i) { @@ -1612,7 +1612,7 @@ static void test_depth_blit(const GUID *device_guid) unsigned int y = 60 * ((2 * i) + 1); color = get_surface_color(rt, x, y); ok(compare_color(color, expected_colors[i][j], 1), - "Expected color 0x%08x at %u,%u, got 0x%08x, software device %#x.\n", + "Expected color 0x%08lx at %u,%u, got 0x%08lx, software device %#x.\n", expected_colors[i][j], x, y, color, is_software_device_type(device_guid)); } } @@ -1643,9 +1643,9 @@ static void test_texture_load_ckey(void) }
hr = IDirect3DDevice7_GetDirect3D(device, &d3d); - ok(SUCCEEDED(hr), "Failed to get Direct3D7 interface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get Direct3D7 interface, hr %#lx.\n", hr); hr = IDirect3D7_QueryInterface(d3d, &IID_IDirectDraw7, (void **)&ddraw); - ok(SUCCEEDED(hr), "Failed to get DirectDraw7 interface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get DirectDraw7 interface, hr %#lx.\n", hr); IDirect3D7_Release(d3d);
memset(&ddsd, 0, sizeof(ddsd)); @@ -1655,52 +1655,52 @@ static void test_texture_load_ckey(void) ddsd.dwWidth = 128; ddsd.ddsCaps.dwCaps = DDSCAPS_TEXTURE | DDSCAPS_SYSTEMMEMORY; hr = IDirectDraw7_CreateSurface(ddraw, &ddsd, &src, NULL); - ok(SUCCEEDED(hr), "Failed to create source texture, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create source texture, hr %#lx.\n", hr); ddsd.ddsCaps.dwCaps = DDSCAPS_TEXTURE; hr = IDirectDraw7_CreateSurface(ddraw, &ddsd, &dst, NULL); - ok(SUCCEEDED(hr), "Failed to create destination texture, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create destination texture, hr %#lx.\n", hr);
/* No surface has a color key */ hr = IDirect3DDevice7_Load(device, dst, NULL, src, NULL, 0); - ok(SUCCEEDED(hr), "Got unexpected hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Got unexpected hr %#lx.\n", hr); ckey.dwColorSpaceLowValue = ckey.dwColorSpaceHighValue = 0xdeadbeef; hr = IDirectDrawSurface7_GetColorKey(dst, DDCKEY_SRCBLT, &ckey); - ok(hr == DDERR_NOCOLORKEY, "Got unexpected hr %#x.\n", hr); - ok(ckey.dwColorSpaceLowValue == 0xdeadbeef, "dwColorSpaceLowValue is %#x.\n", ckey.dwColorSpaceLowValue); - ok(ckey.dwColorSpaceHighValue == 0xdeadbeef, "dwColorSpaceHighValue is %#x.\n", ckey.dwColorSpaceHighValue); + ok(hr == DDERR_NOCOLORKEY, "Got unexpected hr %#lx.\n", hr); + ok(ckey.dwColorSpaceLowValue == 0xdeadbeef, "dwColorSpaceLowValue is %#lx.\n", ckey.dwColorSpaceLowValue); + ok(ckey.dwColorSpaceHighValue == 0xdeadbeef, "dwColorSpaceHighValue is %#lx.\n", ckey.dwColorSpaceHighValue);
/* Source surface has a color key */ ckey.dwColorSpaceLowValue = ckey.dwColorSpaceHighValue = 0x0000ff00; hr = IDirectDrawSurface7_SetColorKey(src, DDCKEY_SRCBLT, &ckey); - ok(SUCCEEDED(hr), "Failed to set color key, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set color key, hr %#lx.\n", hr); hr = IDirect3DDevice7_Load(device, dst, NULL, src, NULL, 0); - ok(SUCCEEDED(hr), "Got unexpected hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface7_GetColorKey(dst, DDCKEY_SRCBLT, &ckey); - ok(SUCCEEDED(hr), "Got unexpected hr %#x.\n", hr); - ok(ckey.dwColorSpaceLowValue == 0x0000ff00, "dwColorSpaceLowValue is %#x.\n", ckey.dwColorSpaceLowValue); - ok(ckey.dwColorSpaceHighValue == 0x0000ff00, "dwColorSpaceHighValue is %#x.\n", ckey.dwColorSpaceHighValue); + ok(SUCCEEDED(hr), "Got unexpected hr %#lx.\n", hr); + ok(ckey.dwColorSpaceLowValue == 0x0000ff00, "dwColorSpaceLowValue is %#lx.\n", ckey.dwColorSpaceLowValue); + ok(ckey.dwColorSpaceHighValue == 0x0000ff00, "dwColorSpaceHighValue is %#lx.\n", ckey.dwColorSpaceHighValue);
/* Both surfaces have a color key: Dest ckey is overwritten */ ckey.dwColorSpaceLowValue = ckey.dwColorSpaceHighValue = 0x000000ff; hr = IDirectDrawSurface7_SetColorKey(dst, DDCKEY_SRCBLT, &ckey); - ok(SUCCEEDED(hr), "Failed to set color key, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set color key, hr %#lx.\n", hr); hr = IDirect3DDevice7_Load(device, dst, NULL, src, NULL, 0); - ok(SUCCEEDED(hr), "Got unexpected hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface7_GetColorKey(dst, DDCKEY_SRCBLT, &ckey); - ok(SUCCEEDED(hr), "Got unexpected hr %#x.\n", hr); - ok(ckey.dwColorSpaceLowValue == 0x0000ff00, "dwColorSpaceLowValue is %#x.\n", ckey.dwColorSpaceLowValue); - ok(ckey.dwColorSpaceHighValue == 0x0000ff00, "dwColorSpaceHighValue is %#x.\n", ckey.dwColorSpaceHighValue); + ok(SUCCEEDED(hr), "Got unexpected hr %#lx.\n", hr); + ok(ckey.dwColorSpaceLowValue == 0x0000ff00, "dwColorSpaceLowValue is %#lx.\n", ckey.dwColorSpaceLowValue); + ok(ckey.dwColorSpaceHighValue == 0x0000ff00, "dwColorSpaceHighValue is %#lx.\n", ckey.dwColorSpaceHighValue);
/* Only the destination has a color key: It is deleted. This behavior differs from * IDirect3DTexture(2)::Load */ hr = IDirectDrawSurface7_SetColorKey(src, DDCKEY_SRCBLT, NULL); - ok(SUCCEEDED(hr), "Failed to set color key, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set color key, hr %#lx.\n", hr); hr = IDirectDrawSurface7_GetColorKey(src, DDCKEY_SRCBLT, &ckey); - ok(hr == DDERR_NOCOLORKEY, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_NOCOLORKEY, "Got unexpected hr %#lx.\n", hr); hr = IDirect3DDevice7_Load(device, dst, NULL, src, NULL, 0); - ok(SUCCEEDED(hr), "Got unexpected hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface7_GetColorKey(dst, DDCKEY_SRCBLT, &ckey); - todo_wine ok(hr == DDERR_NOCOLORKEY, "Got unexpected hr %#x.\n", hr); + todo_wine ok(hr == DDERR_NOCOLORKEY, "Got unexpected hr %#lx.\n", hr);
IDirectDrawSurface7_Release(dst); IDirectDrawSurface7_Release(src); @@ -1740,32 +1740,32 @@ static void test_zenable(const GUID *device_guid) }
hr = IDirect3DDevice7_SetRenderState(device, D3DRENDERSTATE_ZENABLE, D3DZB_FALSE); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
hr = IDirect3DDevice7_Clear(device, 0, NULL, D3DCLEAR_TARGET | D3DCLEAR_ZBUFFER, 0xffff0000, 0.0f, 0); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
hr = IDirect3DDevice7_GetRenderTarget(device, &rt); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
color = get_surface_color(rt, 80, 60); /* For some reason clears and colour fill blits randomly fail with software render target. */ ok(color == 0x00ff0000 || broken(is_software_device_type(device_guid) && !color), - "Got unexpected colour 0x%08x.\n", color); + "Got unexpected colour 0x%08lx.\n", color); if (!color) { fill_surface(rt, 0xffff0000);
color = get_surface_color(rt, 80, 60); - ok(color == 0x00ff0000, "Got unexpected colour 0x%08x.\n", color); + ok(color == 0x00ff0000, "Got unexpected colour 0x%08lx.\n", color); }
hr = IDirect3DDevice7_BeginScene(device); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirect3DDevice7_DrawPrimitive(device, D3DPT_TRIANGLESTRIP, D3DFVF_XYZRHW | D3DFVF_DIFFUSE, tquad, 4, 0); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirect3DDevice7_EndScene(device); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
for (i = 0; i < 4; ++i) { @@ -1775,7 +1775,7 @@ static void test_zenable(const GUID *device_guid) y = 60 * ((2 * i) + 1); color = get_surface_color(rt, x, y); ok(compare_color(color, 0x0000ff00, 1), - "Expected color 0x0000ff00 at %u, %u, got 0x%08x.\n", x, y, color); + "Expected color 0x0000ff00 at %u, %u, got 0x%08lx.\n", x, y, color); } } IDirectDrawSurface7_Release(rt); @@ -1845,9 +1845,9 @@ static void test_ck_rgba(const GUID *device_guid) }
hr = IDirect3DDevice7_GetDirect3D(device, &d3d); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirect3D7_QueryInterface(d3d, &IID_IDirectDraw7, (void **)&ddraw); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); IDirect3D7_Release(d3d);
memset(&surface_desc, 0, sizeof(surface_desc)); @@ -1868,65 +1868,65 @@ static void test_ck_rgba(const GUID *device_guid) surface_desc.ddckCKSrcBlt.dwColorSpaceLowValue = 0xff00ff00; surface_desc.ddckCKSrcBlt.dwColorSpaceHighValue = 0xff00ff00; hr = IDirectDraw7_CreateSurface(ddraw, &surface_desc, &texture, NULL); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr);
hr = IDirect3DDevice7_SetTexture(device, 0, texture); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirect3DDevice7_SetRenderState(device, D3DRENDERSTATE_SRCBLEND, D3DBLEND_SRCALPHA); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirect3DDevice7_SetRenderState(device, D3DRENDERSTATE_DESTBLEND, D3DBLEND_INVSRCALPHA); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
hr = IDirect3DDevice7_GetRenderTarget(device, &rt); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
for (i = 0; i < ARRAY_SIZE(tests); ++i) { hr = IDirect3DDevice7_SetRenderState(device, D3DRENDERSTATE_COLORKEYENABLE, tests[i].color_key); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirect3DDevice7_SetRenderState(device, D3DRENDERSTATE_ALPHABLENDENABLE, tests[i].blend); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
memset(&fx, 0, sizeof(fx)); fx.dwSize = sizeof(fx); U5(fx).dwFillColor = tests[i].fill_color; hr = IDirectDrawSurface7_Blt(texture, NULL, NULL, NULL, DDBLT_COLORFILL | DDBLT_WAIT, &fx); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr);
hr = IDirect3DDevice7_Clear(device, 0, NULL, D3DCLEAR_TARGET | D3DCLEAR_ZBUFFER, 0xffff0000, 1.0f, 0); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); /* RT clears are broken on Windows for software render target. */ if (is_software_device_type(device_guid)) fill_surface(rt, 0xffff0000);
hr = IDirect3DDevice7_BeginScene(device); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirect3DDevice7_DrawPrimitive(device, D3DPT_TRIANGLESTRIP, D3DFVF_XYZRHW | D3DFVF_TEX1, &tquad[0], 4, 0); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirect3DDevice7_EndScene(device); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
color = get_surface_color(rt, 320, 240); ok(compare_color(color, tests[i].result1, 2) || compare_color(color, tests[i].result1_broken, 1), - "Expected color 0x%08x for test %u, got 0x%08x.\n", + "Expected color 0x%08lx for test %u, got 0x%08lx.\n", tests[i].result1, i, color);
U5(fx).dwFillColor = 0xff0000ff; hr = IDirectDrawSurface7_Blt(texture, NULL, NULL, NULL, DDBLT_COLORFILL | DDBLT_WAIT, &fx); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr);
hr = IDirect3DDevice7_BeginScene(device); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirect3DDevice7_DrawPrimitive(device, D3DPT_TRIANGLESTRIP, D3DFVF_XYZRHW | D3DFVF_TEX1, &tquad[4], 4, 0); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirect3DDevice7_EndScene(device); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
/* This tests that fragments that are masked out by the color key are * discarded, instead of just fully transparent. */ color = get_surface_color(rt, 320, 240); ok(compare_color(color, tests[i].result2, 2) || compare_color(color, tests[i].result2_broken, 1), - "Expected color 0x%08x for test %u, got 0x%08x.\n", + "Expected color 0x%08lx for test %u, got 0x%08lx.\n", tests[i].result2, i, color); }
@@ -1971,13 +1971,13 @@ static void test_ck_default(void) }
hr = IDirect3DDevice7_GetDirect3D(device, &d3d); - ok(SUCCEEDED(hr), "Failed to get d3d interface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get d3d interface, hr %#lx.\n", hr); hr = IDirect3D7_QueryInterface(d3d, &IID_IDirectDraw7, (void **)&ddraw); - ok(SUCCEEDED(hr), "Failed to get ddraw interface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get ddraw interface, hr %#lx.\n", hr); IDirect3D7_Release(d3d);
hr = IDirect3DDevice7_GetRenderTarget(device, &rt); - ok(SUCCEEDED(hr), "Failed to get render target, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get render target, hr %#lx.\n", hr);
memset(&surface_desc, 0, sizeof(surface_desc)); surface_desc.dwSize = sizeof(surface_desc); @@ -1994,45 +1994,45 @@ static void test_ck_default(void) surface_desc.ddckCKSrcBlt.dwColorSpaceLowValue = 0x000000ff; surface_desc.ddckCKSrcBlt.dwColorSpaceHighValue = 0x000000ff; hr = IDirectDraw7_CreateSurface(ddraw, &surface_desc, &surface, NULL); - ok(SUCCEEDED(hr), "Failed to create surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create surface, hr %#lx.\n", hr); hr = IDirect3DDevice7_SetTexture(device, 0, surface); - ok(SUCCEEDED(hr), "Failed to set texture, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set texture, hr %#lx.\n", hr);
memset(&fx, 0, sizeof(fx)); fx.dwSize = sizeof(fx); U5(fx).dwFillColor = 0x000000ff; hr = IDirectDrawSurface7_Blt(surface, NULL, NULL, NULL, DDBLT_COLORFILL | DDBLT_WAIT, &fx); - ok(SUCCEEDED(hr), "Failed to fill surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to fill surface, hr %#lx.\n", hr);
hr = IDirect3DDevice7_Clear(device, 0, NULL, D3DCLEAR_TARGET, 0xff00ff00, 1.0f, 0); - ok(SUCCEEDED(hr), "Failed to clear render target, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to clear render target, hr %#lx.\n", hr); hr = IDirect3DDevice7_BeginScene(device); - ok(SUCCEEDED(hr), "Failed to begin scene, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to begin scene, hr %#lx.\n", hr); hr = IDirect3DDevice7_GetRenderState(device, D3DRENDERSTATE_COLORKEYENABLE, &value); - ok(SUCCEEDED(hr), "Failed to get render state, hr %#x.\n", hr); - ok(!value, "Got unexpected color keying state %#x.\n", value); + ok(SUCCEEDED(hr), "Failed to get render state, hr %#lx.\n", hr); + ok(!value, "Got unexpected color keying state %#lx.\n", value); hr = IDirect3DDevice7_DrawPrimitive(device, D3DPT_TRIANGLESTRIP, D3DFVF_XYZRHW | D3DFVF_TEX1, &tquad[0], 4, 0); - ok(SUCCEEDED(hr), "Failed to draw, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to draw, hr %#lx.\n", hr); hr = IDirect3DDevice7_EndScene(device); - ok(SUCCEEDED(hr), "Failed to end scene, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to end scene, hr %#lx.\n", hr); color = get_surface_color(rt, 320, 240); - ok(compare_color(color, 0x000000ff, 1), "Got unexpected color 0x%08x.\n", color); + ok(compare_color(color, 0x000000ff, 1), "Got unexpected color 0x%08lx.\n", color);
hr = IDirect3DDevice7_Clear(device, 0, NULL, D3DCLEAR_TARGET, 0xff00ff00, 1.0f, 0); - ok(SUCCEEDED(hr), "Failed to clear render target, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to clear render target, hr %#lx.\n", hr); hr = IDirect3DDevice7_BeginScene(device); - ok(SUCCEEDED(hr), "Failed to begin scene, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to begin scene, hr %#lx.\n", hr); hr = IDirect3DDevice7_SetRenderState(device, D3DRENDERSTATE_COLORKEYENABLE, TRUE); - ok(SUCCEEDED(hr), "Failed to enable color keying, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to enable color keying, hr %#lx.\n", hr); hr = IDirect3DDevice7_DrawPrimitive(device, D3DPT_TRIANGLESTRIP, D3DFVF_XYZRHW | D3DFVF_TEX1, &tquad[0], 4, 0); - ok(SUCCEEDED(hr), "Failed to draw, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to draw, hr %#lx.\n", hr); hr = IDirect3DDevice7_GetRenderState(device, D3DRENDERSTATE_COLORKEYENABLE, &value); - ok(SUCCEEDED(hr), "Failed to get render state, hr %#x.\n", hr); - ok(!!value, "Got unexpected color keying state %#x.\n", value); + ok(SUCCEEDED(hr), "Failed to get render state, hr %#lx.\n", hr); + ok(!!value, "Got unexpected color keying state %#lx.\n", value); hr = IDirect3DDevice7_EndScene(device); - ok(SUCCEEDED(hr), "Failed to end scene, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to end scene, hr %#lx.\n", hr); color = get_surface_color(rt, 320, 240); - ok(compare_color(color, 0x0000ff00, 1), "Got unexpected color 0x%08x.\n", color); + ok(compare_color(color, 0x0000ff00, 1), "Got unexpected color 0x%08lx.\n", color);
IDirectDrawSurface7_Release(surface); IDirectDrawSurface7_Release(rt); @@ -2064,11 +2064,11 @@ static void test_ck_complex(void) return; } hr = IDirect3DDevice7_GetCaps(device, &device_desc); - ok(SUCCEEDED(hr), "Failed to get device caps, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get device caps, hr %#lx.\n", hr); hr = IDirect3DDevice7_GetDirect3D(device, &d3d); - ok(SUCCEEDED(hr), "Failed to get d3d interface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get d3d interface, hr %#lx.\n", hr); hr = IDirect3D7_QueryInterface(d3d, &IID_IDirectDraw7, (void **)&ddraw); - ok(SUCCEEDED(hr), "Failed to get ddraw interface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get ddraw interface, hr %#lx.\n", hr); IDirect3D7_Release(d3d);
memset(&surface_desc, 0, sizeof(surface_desc)); @@ -2078,20 +2078,20 @@ static void test_ck_complex(void) surface_desc.dwWidth = 128; surface_desc.dwHeight = 128; hr = IDirectDraw7_CreateSurface(ddraw, &surface_desc, &surface, NULL); - ok(SUCCEEDED(hr), "Failed to create surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create surface, hr %#lx.\n", hr);
hr = IDirectDrawSurface7_GetColorKey(surface, DDCKEY_SRCBLT, &color_key); - ok(hr == DDERR_NOCOLORKEY, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_NOCOLORKEY, "Got unexpected hr %#lx.\n", hr); color_key.dwColorSpaceLowValue = 0x0000ff00; color_key.dwColorSpaceHighValue = 0x0000ff00; hr = IDirectDrawSurface7_SetColorKey(surface, DDCKEY_SRCBLT, &color_key); - ok(SUCCEEDED(hr), "Failed to set color key, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set color key, hr %#lx.\n", hr); memset(&color_key, 0, sizeof(color_key)); hr = IDirectDrawSurface7_GetColorKey(surface, DDCKEY_SRCBLT, &color_key); - ok(SUCCEEDED(hr), "Failed to get color key, hr %#x.\n", hr); - ok(color_key.dwColorSpaceLowValue == 0x0000ff00, "Got unexpected value 0x%08x.\n", + ok(SUCCEEDED(hr), "Failed to get color key, hr %#lx.\n", hr); + ok(color_key.dwColorSpaceLowValue == 0x0000ff00, "Got unexpected value 0x%08lx.\n", color_key.dwColorSpaceLowValue); - ok(color_key.dwColorSpaceHighValue == 0x0000ff00, "Got unexpected value 0x%08x.\n", + ok(color_key.dwColorSpaceHighValue == 0x0000ff00, "Got unexpected value 0x%08lx.\n", color_key.dwColorSpaceHighValue);
mipmap = surface; @@ -2099,24 +2099,24 @@ static void test_ck_complex(void) for (i = 0; i < 7; ++i) { hr = IDirectDrawSurface7_GetAttachedSurface(mipmap, &caps, &tmp); - ok(SUCCEEDED(hr), "Failed to get attached surface, i %u, hr %#x.\n", i, hr); + ok(SUCCEEDED(hr), "Failed to get attached surface, i %u, hr %#lx.\n", i, hr); hr = IDirectDrawSurface7_GetColorKey(tmp, DDCKEY_SRCBLT, &color_key); - ok(hr == DDERR_NOCOLORKEY, "Got unexpected hr %#x, i %u.\n", hr, i); + ok(hr == DDERR_NOCOLORKEY, "Got unexpected hr %#lx, i %u.\n", hr, i);
color_key.dwColorSpaceLowValue = 0x000000ff; color_key.dwColorSpaceHighValue = 0x000000ff; hr = IDirectDrawSurface7_SetColorKey(tmp, DDCKEY_SRCBLT, &color_key); - ok(hr == DDERR_NOTONMIPMAPSUBLEVEL, "Got unexpected hr %#x, i %u.\n", hr, i); + ok(hr == DDERR_NOTONMIPMAPSUBLEVEL, "Got unexpected hr %#lx, i %u.\n", hr, i);
IDirectDrawSurface_Release(mipmap); mipmap = tmp; }
hr = IDirectDrawSurface7_GetAttachedSurface(mipmap, &caps, &tmp); - ok(hr == DDERR_NOTFOUND, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_NOTFOUND, "Got unexpected hr %#lx.\n", hr); IDirectDrawSurface_Release(mipmap); refcount = IDirectDrawSurface7_Release(surface); - ok(!refcount, "Got unexpected refcount %u.\n", refcount); + ok(!refcount, "Got unexpected refcount %lu.\n", refcount);
memset(&surface_desc, 0, sizeof(surface_desc)); surface_desc.dwSize = sizeof(surface_desc); @@ -2124,43 +2124,43 @@ static void test_ck_complex(void) surface_desc.ddsCaps.dwCaps = DDSCAPS_PRIMARYSURFACE | DDSCAPS_COMPLEX | DDSCAPS_FLIP; U5(surface_desc).dwBackBufferCount = 1; hr = IDirectDraw7_CreateSurface(ddraw, &surface_desc, &surface, NULL); - ok(SUCCEEDED(hr), "Failed to create surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create surface, hr %#lx.\n", hr);
hr = IDirectDrawSurface7_GetColorKey(surface, DDCKEY_SRCBLT, &color_key); - ok(hr == DDERR_NOCOLORKEY, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_NOCOLORKEY, "Got unexpected hr %#lx.\n", hr); color_key.dwColorSpaceLowValue = 0x0000ff00; color_key.dwColorSpaceHighValue = 0x0000ff00; hr = IDirectDrawSurface7_SetColorKey(surface, DDCKEY_SRCBLT, &color_key); - ok(SUCCEEDED(hr), "Failed to set color key, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set color key, hr %#lx.\n", hr); memset(&color_key, 0, sizeof(color_key)); hr = IDirectDrawSurface7_GetColorKey(surface, DDCKEY_SRCBLT, &color_key); - ok(SUCCEEDED(hr), "Failed to get color key, hr %#x.\n", hr); - ok(color_key.dwColorSpaceLowValue == 0x0000ff00, "Got unexpected value 0x%08x.\n", + ok(SUCCEEDED(hr), "Failed to get color key, hr %#lx.\n", hr); + ok(color_key.dwColorSpaceLowValue == 0x0000ff00, "Got unexpected value 0x%08lx.\n", color_key.dwColorSpaceLowValue); - ok(color_key.dwColorSpaceHighValue == 0x0000ff00, "Got unexpected value 0x%08x.\n", + ok(color_key.dwColorSpaceHighValue == 0x0000ff00, "Got unexpected value 0x%08lx.\n", color_key.dwColorSpaceHighValue);
hr = IDirectDrawSurface7_GetAttachedSurface(surface, &caps, &tmp); - ok(SUCCEEDED(hr), "Failed to get attached surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get attached surface, hr %#lx.\n", hr);
hr = IDirectDrawSurface7_GetColorKey(tmp, DDCKEY_SRCBLT, &color_key); - ok(hr == DDERR_NOCOLORKEY, "Got unexpected hr %#x, i %u.\n", hr, i); + ok(hr == DDERR_NOCOLORKEY, "Got unexpected hr %#lx, i %u.\n", hr, i); color_key.dwColorSpaceLowValue = 0x0000ff00; color_key.dwColorSpaceHighValue = 0x0000ff00; hr = IDirectDrawSurface7_SetColorKey(tmp, DDCKEY_SRCBLT, &color_key); - ok(SUCCEEDED(hr), "Failed to set color key, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set color key, hr %#lx.\n", hr); memset(&color_key, 0, sizeof(color_key)); hr = IDirectDrawSurface7_GetColorKey(tmp, DDCKEY_SRCBLT, &color_key); - ok(SUCCEEDED(hr), "Failed to get color key, hr %#x.\n", hr); - ok(color_key.dwColorSpaceLowValue == 0x0000ff00, "Got unexpected value 0x%08x.\n", + ok(SUCCEEDED(hr), "Failed to get color key, hr %#lx.\n", hr); + ok(color_key.dwColorSpaceLowValue == 0x0000ff00, "Got unexpected value 0x%08lx.\n", color_key.dwColorSpaceLowValue); - ok(color_key.dwColorSpaceHighValue == 0x0000ff00, "Got unexpected value 0x%08x.\n", + ok(color_key.dwColorSpaceHighValue == 0x0000ff00, "Got unexpected value 0x%08lx.\n", color_key.dwColorSpaceHighValue);
IDirectDrawSurface_Release(tmp);
refcount = IDirectDrawSurface7_Release(surface); - ok(!refcount, "Got unexpected refcount %u.\n", refcount); + ok(!refcount, "Got unexpected refcount %lu.\n", refcount);
if (!(device_desc.dpcTriCaps.dwTextureCaps & D3DPTEXTURECAPS_CUBEMAP)) { @@ -2175,47 +2175,47 @@ static void test_ck_complex(void) surface_desc.dwWidth = 128; surface_desc.dwHeight = 128; hr = IDirectDraw7_CreateSurface(ddraw, &surface_desc, &surface, NULL); - ok(SUCCEEDED(hr), "Failed to create surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create surface, hr %#lx.\n", hr);
hr = IDirectDrawSurface7_GetColorKey(surface, DDCKEY_SRCBLT, &color_key); - ok(hr == DDERR_NOCOLORKEY, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_NOCOLORKEY, "Got unexpected hr %#lx.\n", hr); color_key.dwColorSpaceLowValue = 0x0000ff00; color_key.dwColorSpaceHighValue = 0x0000ff00; hr = IDirectDrawSurface7_SetColorKey(surface, DDCKEY_SRCBLT, &color_key); - ok(SUCCEEDED(hr), "Failed to set color key, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set color key, hr %#lx.\n", hr);
caps.dwCaps2 = DDSCAPS2_CUBEMAP_NEGATIVEZ; hr = IDirectDrawSurface7_GetAttachedSurface(surface, &caps, &mipmap); - ok(SUCCEEDED(hr), "Failed to get attached surface, i %u, hr %#x.\n", i, hr); + ok(SUCCEEDED(hr), "Failed to get attached surface, i %u, hr %#lx.\n", i, hr);
hr = IDirectDrawSurface7_GetColorKey(mipmap, DDCKEY_SRCBLT, &color_key); - ok(hr == DDERR_NOCOLORKEY, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_NOCOLORKEY, "Got unexpected hr %#lx.\n", hr); color_key.dwColorSpaceLowValue = 0x000000ff; color_key.dwColorSpaceHighValue = 0x000000ff; hr = IDirectDrawSurface7_SetColorKey(mipmap, DDCKEY_SRCBLT, &color_key); - ok(SUCCEEDED(hr), "Failed to set color key, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set color key, hr %#lx.\n", hr);
color_key.dwColorSpaceLowValue = 0; color_key.dwColorSpaceHighValue = 0; hr = IDirectDrawSurface7_GetColorKey(mipmap, DDCKEY_SRCBLT, &color_key); - ok(SUCCEEDED(hr), "Failed to get color key, hr %#x.\n", hr); - ok(color_key.dwColorSpaceLowValue == 0x000000ff, "Got unexpected value 0x%08x.\n", + ok(SUCCEEDED(hr), "Failed to get color key, hr %#lx.\n", hr); + ok(color_key.dwColorSpaceLowValue == 0x000000ff, "Got unexpected value 0x%08lx.\n", color_key.dwColorSpaceLowValue); - ok(color_key.dwColorSpaceHighValue == 0x000000ff, "Got unexpected value 0x%08x.\n", + ok(color_key.dwColorSpaceHighValue == 0x000000ff, "Got unexpected value 0x%08lx.\n", color_key.dwColorSpaceHighValue);
IDirectDrawSurface_AddRef(mipmap); for (i = 0; i < 7; ++i) { hr = IDirectDrawSurface7_GetAttachedSurface(mipmap, &caps, &tmp); - ok(SUCCEEDED(hr), "Failed to get attached surface, i %u, hr %#x.\n", i, hr); + ok(SUCCEEDED(hr), "Failed to get attached surface, i %u, hr %#lx.\n", i, hr); hr = IDirectDrawSurface7_GetColorKey(tmp, DDCKEY_SRCBLT, &color_key); - ok(hr == DDERR_NOCOLORKEY, "Got unexpected hr %#x, i %u.\n", hr, i); + ok(hr == DDERR_NOCOLORKEY, "Got unexpected hr %#lx, i %u.\n", hr, i);
color_key.dwColorSpaceLowValue = 0x000000ff; color_key.dwColorSpaceHighValue = 0x000000ff; hr = IDirectDrawSurface7_SetColorKey(tmp, DDCKEY_SRCBLT, &color_key); - ok(hr == DDERR_NOTONMIPMAPSUBLEVEL, "Got unexpected hr %#x, i %u.\n", hr, i); + ok(hr == DDERR_NOTONMIPMAPSUBLEVEL, "Got unexpected hr %#lx, i %u.\n", hr, i);
IDirectDrawSurface_Release(mipmap); mipmap = tmp; @@ -2224,12 +2224,12 @@ static void test_ck_complex(void) IDirectDrawSurface7_Release(mipmap);
refcount = IDirectDrawSurface7_Release(surface); - ok(!refcount, "Got unexpected refcount %u.\n", refcount); + ok(!refcount, "Got unexpected refcount %lu.\n", refcount);
cleanup: IDirectDraw7_Release(ddraw); refcount = IDirect3DDevice7_Release(device); - ok(!refcount, "Got unexpected refcount %u.\n", refcount); + ok(!refcount, "Got unexpected refcount %lu.\n", refcount); DestroyWindow(window); }
@@ -2251,13 +2251,13 @@ static void test_qi(const char *test_name, IUnknown *base_iface, for (i = 0; i < entry_count; ++i) { hr = IUnknown_QueryInterface(base_iface, tests[i].iid, (void **)&iface1); - ok(hr == tests[i].hr, "Got hr %#x for test "%s" %u.\n", hr, test_name, i); + ok(hr == tests[i].hr, "Got hr %#lx for test "%s" %u.\n", hr, test_name, i); if (SUCCEEDED(hr)) { for (j = 0; j < entry_count; ++j) { hr = IUnknown_QueryInterface(iface1, tests[j].iid, (void **)&iface2); - ok(hr == tests[j].hr, "Got hr %#x for test "%s" %u, %u.\n", hr, test_name, i, j); + ok(hr == tests[j].hr, "Got hr %#lx for test "%s" %u, %u.\n", hr, test_name, i, j); if (SUCCEEDED(hr)) { expected_refcount = 0; @@ -2266,7 +2266,7 @@ static void test_qi(const char *test_name, IUnknown *base_iface, if (IsEqualGUID(tests[i].refcount_iid, tests[j].refcount_iid)) ++expected_refcount; refcount = IUnknown_Release(iface2); - ok(refcount == expected_refcount, "Got refcount %u for test "%s" %u, %u, expected %u.\n", + ok(refcount == expected_refcount, "Got refcount %lu for test "%s" %u, %u, expected %lu.\n", refcount, test_name, i, j, expected_refcount); } } @@ -2275,7 +2275,7 @@ static void test_qi(const char *test_name, IUnknown *base_iface, if (IsEqualGUID(refcount_iid, tests[i].refcount_iid)) ++expected_refcount; refcount = IUnknown_Release(iface1); - ok(refcount == expected_refcount, "Got refcount %u for test "%s" %u, expected %u.\n", + ok(refcount == expected_refcount, "Got refcount %lu for test "%s" %u, expected %lu.\n", refcount, test_name, i, expected_refcount); } } @@ -2351,7 +2351,7 @@ static void test_surface_qi(void) ddraw = create_ddraw(); ok(!!ddraw, "Failed to create a ddraw object.\n"); hr = IDirectDraw7_SetCooperativeLevel(ddraw, window, DDSCL_NORMAL); - ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#lx.\n", hr);
memset(&surface_desc, 0, sizeof(surface_desc)); surface_desc.dwSize = sizeof(surface_desc); @@ -2360,9 +2360,9 @@ static void test_surface_qi(void) surface_desc.dwWidth = 512; surface_desc.dwHeight = 512; hr = IDirectDraw7_CreateSurface(ddraw, &surface_desc, (IDirectDrawSurface7 **)0xdeadbeef, NULL); - ok(hr == E_INVALIDARG, "Got unexpected hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Got unexpected hr %#lx.\n", hr); hr = IDirectDraw7_CreateSurface(ddraw, &surface_desc, &surface, NULL); - ok(SUCCEEDED(hr), "Failed to create surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create surface, hr %#lx.\n", hr);
test_qi("surface_qi", (IUnknown *)surface, &IID_IDirectDrawSurface7, tests, ARRAY_SIZE(tests));
@@ -2468,36 +2468,36 @@ static void test_wndproc(void) WS_MAXIMIZE | WS_CAPTION , 0, 0, 640, 480, 0, 0, 0, 0);
proc = GetWindowLongPtrA(window, GWLP_WNDPROC); - ok(proc == (LONG_PTR)test_proc, "Expected wndproc %#lx, got %#lx.\n", + ok(proc == (LONG_PTR)test_proc, "Expected wndproc %#Ix, got %#Ix.\n", (LONG_PTR)test_proc, proc); expect_messages = messages; hr = IDirectDraw7_SetCooperativeLevel(ddraw, window, DDSCL_EXCLUSIVE | DDSCL_FULLSCREEN); - ok(SUCCEEDED(hr), "SetCooperativeLevel failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "SetCooperativeLevel failed, hr %#lx.\n", hr); ok(!expect_messages->message, "Expected message %#x, but didn't receive it.\n", expect_messages->message); expect_messages = NULL; proc = GetWindowLongPtrA(window, GWLP_WNDPROC); - ok(proc != (LONG_PTR)test_proc, "Expected wndproc != %#lx, got %#lx.\n", + ok(proc != (LONG_PTR)test_proc, "Expected wndproc != %#Ix, got %#Ix.\n", (LONG_PTR)test_proc, proc); ref = IDirectDraw7_Release(ddraw); - ok(ref == 0, "The ddraw object was not properly freed: refcount %u.\n", ref); + ok(ref == 0, "The ddraw object was not properly freed: refcount %lu.\n", ref); proc = GetWindowLongPtrA(window, GWLP_WNDPROC); - ok(proc == (LONG_PTR)test_proc, "Expected wndproc %#lx, got %#lx.\n", + ok(proc == (LONG_PTR)test_proc, "Expected wndproc %#Ix, got %#Ix.\n", (LONG_PTR)test_proc, proc);
/* DDSCL_NORMAL doesn't. */ ddraw = create_ddraw(); proc = GetWindowLongPtrA(window, GWLP_WNDPROC); - ok(proc == (LONG_PTR)test_proc, "Expected wndproc %#lx, got %#lx.\n", + ok(proc == (LONG_PTR)test_proc, "Expected wndproc %#Ix, got %#Ix.\n", (LONG_PTR)test_proc, proc); hr = IDirectDraw7_SetCooperativeLevel(ddraw, window, DDSCL_NORMAL | DDSCL_FULLSCREEN); - ok(SUCCEEDED(hr), "SetCooperativeLevel failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "SetCooperativeLevel failed, hr %#lx.\n", hr); proc = GetWindowLongPtrA(window, GWLP_WNDPROC); - ok(proc == (LONG_PTR)test_proc, "Expected wndproc %#lx, got %#lx.\n", + ok(proc == (LONG_PTR)test_proc, "Expected wndproc %#Ix, got %#Ix.\n", (LONG_PTR)test_proc, proc); ref = IDirectDraw7_Release(ddraw); - ok(ref == 0, "The ddraw object was not properly freed: refcount %u.\n", ref); + ok(ref == 0, "The ddraw object was not properly freed: refcount %lu.\n", ref); proc = GetWindowLongPtrA(window, GWLP_WNDPROC); - ok(proc == (LONG_PTR)test_proc, "Expected wndproc %#lx, got %#lx.\n", + ok(proc == (LONG_PTR)test_proc, "Expected wndproc %#Ix, got %#Ix.\n", (LONG_PTR)test_proc, proc);
/* The original window proc is only restored by ddraw if the current @@ -2505,53 +2505,53 @@ static void test_wndproc(void) * from DDSCL_NORMAL to DDSCL_EXCLUSIVE. */ ddraw = create_ddraw(); proc = GetWindowLongPtrA(window, GWLP_WNDPROC); - ok(proc == (LONG_PTR)test_proc, "Expected wndproc %#lx, got %#lx.\n", + ok(proc == (LONG_PTR)test_proc, "Expected wndproc %#Ix, got %#Ix.\n", (LONG_PTR)test_proc, proc); hr = IDirectDraw7_SetCooperativeLevel(ddraw, window, DDSCL_EXCLUSIVE | DDSCL_FULLSCREEN); - ok(SUCCEEDED(hr), "SetCooperativeLevel failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "SetCooperativeLevel failed, hr %#lx.\n", hr); proc = GetWindowLongPtrA(window, GWLP_WNDPROC); - ok(proc != (LONG_PTR)test_proc, "Expected wndproc != %#lx, got %#lx.\n", + ok(proc != (LONG_PTR)test_proc, "Expected wndproc != %#Ix, got %#Ix.\n", (LONG_PTR)test_proc, proc); ddraw_proc = proc; hr = IDirectDraw7_SetCooperativeLevel(ddraw, window, DDSCL_NORMAL); - ok(SUCCEEDED(hr), "SetCooperativeLevel failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "SetCooperativeLevel failed, hr %#lx.\n", hr); proc = GetWindowLongPtrA(window, GWLP_WNDPROC); - ok(proc == (LONG_PTR)test_proc, "Expected wndproc %#lx, got %#lx.\n", + ok(proc == (LONG_PTR)test_proc, "Expected wndproc %#Ix, got %#Ix.\n", (LONG_PTR)test_proc, proc); hr = IDirectDraw7_SetCooperativeLevel(ddraw, window, DDSCL_EXCLUSIVE | DDSCL_FULLSCREEN); - ok(SUCCEEDED(hr), "SetCooperativeLevel failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "SetCooperativeLevel failed, hr %#lx.\n", hr); proc = SetWindowLongPtrA(window, GWLP_WNDPROC, (LONG_PTR)DefWindowProcA); - ok(proc != (LONG_PTR)test_proc, "Expected wndproc != %#lx, got %#lx.\n", + ok(proc != (LONG_PTR)test_proc, "Expected wndproc != %#Ix, got %#Ix.\n", (LONG_PTR)test_proc, proc); hr = IDirectDraw7_SetCooperativeLevel(ddraw, window, DDSCL_NORMAL); - ok(SUCCEEDED(hr), "SetCooperativeLevel failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "SetCooperativeLevel failed, hr %#lx.\n", hr); proc = GetWindowLongPtrA(window, GWLP_WNDPROC); - ok(proc == (LONG_PTR)DefWindowProcA, "Expected wndproc %#lx, got %#lx.\n", + ok(proc == (LONG_PTR)DefWindowProcA, "Expected wndproc %#Ix, got %#Ix.\n", (LONG_PTR)DefWindowProcA, proc); hr = IDirectDraw7_SetCooperativeLevel(ddraw, window, DDSCL_EXCLUSIVE | DDSCL_FULLSCREEN); - ok(SUCCEEDED(hr), "SetCooperativeLevel failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "SetCooperativeLevel failed, hr %#lx.\n", hr); proc = SetWindowLongPtrA(window, GWLP_WNDPROC, ddraw_proc); - ok(proc == (LONG_PTR)DefWindowProcA, "Expected wndproc %#lx, got %#lx.\n", + ok(proc == (LONG_PTR)DefWindowProcA, "Expected wndproc %#Ix, got %#Ix.\n", (LONG_PTR)DefWindowProcA, proc); ref = IDirectDraw7_Release(ddraw); - ok(ref == 0, "The ddraw object was not properly freed: refcount %u.\n", ref); + ok(ref == 0, "The ddraw object was not properly freed: refcount %lu.\n", ref); proc = GetWindowLongPtrA(window, GWLP_WNDPROC); - ok(proc == (LONG_PTR)test_proc, "Expected wndproc %#lx, got %#lx.\n", + ok(proc == (LONG_PTR)test_proc, "Expected wndproc %#Ix, got %#Ix.\n", (LONG_PTR)test_proc, proc);
ddraw = create_ddraw(); proc = GetWindowLongPtrA(window, GWLP_WNDPROC); - ok(proc == (LONG_PTR)test_proc, "Expected wndproc %#lx, got %#lx.\n", + ok(proc == (LONG_PTR)test_proc, "Expected wndproc %#Ix, got %#Ix.\n", (LONG_PTR)test_proc, proc); hr = IDirectDraw7_SetCooperativeLevel(ddraw, window, DDSCL_EXCLUSIVE | DDSCL_FULLSCREEN); - ok(SUCCEEDED(hr), "SetCooperativeLevel failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "SetCooperativeLevel failed, hr %#lx.\n", hr); proc = SetWindowLongPtrA(window, GWLP_WNDPROC, (LONG_PTR)DefWindowProcA); - ok(proc != (LONG_PTR)test_proc, "Expected wndproc != %#lx, got %#lx.\n", + ok(proc != (LONG_PTR)test_proc, "Expected wndproc != %#Ix, got %#Ix.\n", (LONG_PTR)test_proc, proc); ref = IDirectDraw7_Release(ddraw); - ok(ref == 0, "The ddraw object was not properly freed: refcount %u.\n", ref); + ok(ref == 0, "The ddraw object was not properly freed: refcount %lu.\n", ref); proc = GetWindowLongPtrA(window, GWLP_WNDPROC); - ok(proc == (LONG_PTR)DefWindowProcA, "Expected wndproc %#lx, got %#lx.\n", + ok(proc == (LONG_PTR)DefWindowProcA, "Expected wndproc %#Ix, got %#Ix.\n", (LONG_PTR)DefWindowProcA, proc);
fix_wndproc(window, (LONG_PTR)test_proc); @@ -2582,12 +2582,12 @@ static void test_window_style(void) SetRect(&fullscreen_rect, 0, 0, registry_mode.dmPelsWidth, registry_mode.dmPelsHeight);
hr = IDirectDraw7_SetCooperativeLevel(ddraw, window, DDSCL_EXCLUSIVE | DDSCL_FULLSCREEN); - ok(SUCCEEDED(hr), "SetCooperativeLevel failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "SetCooperativeLevel failed, hr %#lx.\n", hr);
tmp = GetWindowLongA(window, GWL_STYLE); - todo_wine ok(tmp == style, "Expected window style %#x, got %#x.\n", style, tmp); + todo_wine ok(tmp == style, "Expected window style %#lx, got %#lx.\n", style, tmp); tmp = GetWindowLongA(window, GWL_EXSTYLE); - todo_wine ok(tmp == exstyle, "Expected window extended style %#x, got %#x.\n", exstyle, tmp); + todo_wine ok(tmp == exstyle, "Expected window extended style %#lx, got %#lx.\n", exstyle, tmp);
GetWindowRect(window, &r); ok(EqualRect(&r, &fullscreen_rect), "Expected %s, got %s.\n", @@ -2599,9 +2599,9 @@ static void test_window_style(void) ok(ret, "Failed to set foreground window.\n");
tmp = GetWindowLongA(window, GWL_STYLE); - todo_wine ok(tmp == style, "Expected window style %#x, got %#x.\n", style, tmp); + todo_wine ok(tmp == style, "Expected window style %#lx, got %#lx.\n", style, tmp); tmp = GetWindowLongA(window, GWL_EXSTYLE); - todo_wine ok(tmp == exstyle, "Expected window extended style %#x, got %#x.\n", exstyle, tmp); + todo_wine ok(tmp == exstyle, "Expected window extended style %#lx, got %#lx.\n", exstyle, tmp);
ret = SetForegroundWindow(window); ok(ret, "Failed to set foreground window.\n"); @@ -2610,77 +2610,77 @@ static void test_window_style(void) ShowWindow(window, SW_HIDE);
hr = IDirectDraw7_SetCooperativeLevel(ddraw, window, DDSCL_NORMAL); - ok(SUCCEEDED(hr), "SetCooperativeLevel failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "SetCooperativeLevel failed, hr %#lx.\n", hr);
tmp = GetWindowLongA(window, GWL_STYLE); - ok(tmp == style, "Expected window style %#x, got %#x.\n", style, tmp); + ok(tmp == style, "Expected window style %#lx, got %#lx.\n", style, tmp); tmp = GetWindowLongA(window, GWL_EXSTYLE); - ok(tmp == exstyle, "Expected window extended style %#x, got %#x.\n", exstyle, tmp); + ok(tmp == exstyle, "Expected window extended style %#lx, got %#lx.\n", exstyle, tmp);
hr = IDirectDraw7_SetCooperativeLevel(ddraw, window, DDSCL_EXCLUSIVE | DDSCL_FULLSCREEN | DDSCL_NOWINDOWCHANGES); - ok(SUCCEEDED(hr), "SetCooperativeLevel failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "SetCooperativeLevel failed, hr %#lx.\n", hr);
tmp = GetWindowLongA(window, GWL_STYLE); - todo_wine ok(tmp == style, "Expected window style %#x, got %#x.\n", style, tmp); + todo_wine ok(tmp == style, "Expected window style %#lx, got %#lx.\n", style, tmp); tmp = GetWindowLongA(window, GWL_EXSTYLE); - todo_wine ok(tmp == exstyle, "Expected window extended style %#x, got %#x.\n", exstyle, tmp); + todo_wine ok(tmp == exstyle, "Expected window extended style %#lx, got %#lx.\n", exstyle, tmp);
hr = IDirectDraw7_SetCooperativeLevel(ddraw, window, DDSCL_EXCLUSIVE | DDSCL_FULLSCREEN); - ok(SUCCEEDED(hr), "SetCooperativeLevel failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "SetCooperativeLevel failed, hr %#lx.\n", hr);
tmp = GetWindowLongA(window, GWL_STYLE); expected_style = style | WS_VISIBLE; - todo_wine ok(tmp == expected_style, "Expected window style %#x, got %#x.\n", expected_style, tmp); + todo_wine ok(tmp == expected_style, "Expected window style %#lx, got %#lx.\n", expected_style, tmp); tmp = GetWindowLongA(window, GWL_EXSTYLE); expected_style = exstyle | WS_EX_TOPMOST; - todo_wine ok(tmp == expected_style, "Expected window extended style %#x, got %#x.\n", expected_style, tmp); + todo_wine ok(tmp == expected_style, "Expected window extended style %#lx, got %#lx.\n", expected_style, tmp);
ShowWindow(window, SW_HIDE); tmp = GetWindowLongA(window, GWL_STYLE); - todo_wine ok(tmp == style, "Expected window style %#x, got %#x.\n", style, tmp); + todo_wine ok(tmp == style, "Expected window style %#lx, got %#lx.\n", style, tmp); tmp = GetWindowLongA(window, GWL_EXSTYLE); expected_style = exstyle | WS_EX_TOPMOST; - todo_wine ok(tmp == expected_style, "Expected window extended style %#x, got %#x.\n", expected_style, tmp); + todo_wine ok(tmp == expected_style, "Expected window extended style %#lx, got %#lx.\n", expected_style, tmp);
hr = IDirectDraw7_SetCooperativeLevel(ddraw, window, DDSCL_NORMAL | DDSCL_NOWINDOWCHANGES); - ok(SUCCEEDED(hr), "SetCooperativeLevel failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "SetCooperativeLevel failed, hr %#lx.\n", hr);
tmp = GetWindowLongA(window, GWL_STYLE); - ok(tmp == style, "Expected window style %#x, got %#x.\n", style, tmp); + ok(tmp == style, "Expected window style %#lx, got %#lx.\n", style, tmp); tmp = GetWindowLongA(window, GWL_EXSTYLE); expected_style = exstyle | WS_EX_TOPMOST; - ok(tmp == expected_style, "Expected window extended style %#x, got %#x.\n", expected_style, tmp); + ok(tmp == expected_style, "Expected window extended style %#lx, got %#lx.\n", expected_style, tmp);
hr = IDirectDraw7_SetCooperativeLevel(ddraw, window, DDSCL_NORMAL); - ok(SUCCEEDED(hr), "SetCooperativeLevel failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "SetCooperativeLevel failed, hr %#lx.\n", hr);
tmp = GetWindowLongA(window, GWL_STYLE); - ok(tmp == style, "Expected window style %#x, got %#x.\n", style, tmp); + ok(tmp == style, "Expected window style %#lx, got %#lx.\n", style, tmp); tmp = GetWindowLongA(window, GWL_EXSTYLE); expected_style = exstyle | WS_EX_TOPMOST; - ok(tmp == expected_style, "Expected window extended style %#x, got %#x.\n", expected_style, tmp); + ok(tmp == expected_style, "Expected window extended style %#lx, got %#lx.\n", expected_style, tmp);
ret = SetForegroundWindow(window); ok(ret, "Failed to set foreground window.\n");
hr = IDirectDraw7_SetCooperativeLevel(ddraw, window, DDSCL_EXCLUSIVE | DDSCL_FULLSCREEN); - ok(SUCCEEDED(hr), "SetCooperativeLevel failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "SetCooperativeLevel failed, hr %#lx.\n", hr);
tmp = GetWindowLongA(window, GWL_STYLE); expected_style = style | WS_VISIBLE; - todo_wine ok(tmp == expected_style, "Expected window style %#x, got %#x.\n", expected_style, tmp); + todo_wine ok(tmp == expected_style, "Expected window style %#lx, got %#lx.\n", expected_style, tmp); tmp = GetWindowLongA(window, GWL_EXSTYLE); expected_style = exstyle | WS_EX_TOPMOST; - todo_wine ok(tmp == expected_style, "Expected window extended style %#x, got %#x.\n", expected_style, tmp); + todo_wine ok(tmp == expected_style, "Expected window extended style %#lx, got %#lx.\n", expected_style, tmp);
ShowWindow(window, SW_HIDE); hr = IDirectDraw7_SetCooperativeLevel(ddraw, window, DDSCL_NORMAL); - ok(SUCCEEDED(hr), "SetCooperativeLevel failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "SetCooperativeLevel failed, hr %#lx.\n", hr);
tmp = GetWindowLongA(window, GWL_STYLE); - ok(tmp == style, "Expected window style %#x, got %#x.\n", style, tmp); + ok(tmp == style, "Expected window style %#lx, got %#lx.\n", style, tmp); tmp = GetWindowLongA(window, GWL_EXSTYLE); - ok(tmp == exstyle, "Expected window extended style %#x, got %#x.\n", exstyle, tmp); + ok(tmp == exstyle, "Expected window extended style %#lx, got %#lx.\n", exstyle, tmp);
ShowWindow(window, SW_SHOW); ret = SetForegroundWindow(GetDesktopWindow()); @@ -2688,20 +2688,20 @@ static void test_window_style(void) SetActiveWindow(window); ok(GetActiveWindow() == window, "Unexpected active window.\n"); hr = IDirectDraw7_SetCooperativeLevel(ddraw, window, DDSCL_EXCLUSIVE | DDSCL_FULLSCREEN); - ok(SUCCEEDED(hr), "SetCooperativeLevel failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "SetCooperativeLevel failed, hr %#lx.\n", hr);
tmp = GetWindowLongA(window, GWL_STYLE); expected_style = style | WS_VISIBLE; - todo_wine ok(tmp == expected_style, "Expected window style %#x, got %#x.\n", expected_style, tmp); + todo_wine ok(tmp == expected_style, "Expected window style %#lx, got %#lx.\n", expected_style, tmp); tmp = GetWindowLongA(window, GWL_EXSTYLE); - todo_wine ok(tmp == exstyle, "Expected window extended style %#x, got %#x.\n", exstyle, tmp); + todo_wine ok(tmp == exstyle, "Expected window extended style %#lx, got %#lx.\n", exstyle, tmp);
GetWindowRect(window, &r); ok(EqualRect(&r, &fullscreen_rect), "Expected %s, got %s.\n", wine_dbgstr_rect(&fullscreen_rect), wine_dbgstr_rect(&r));
hr = IDirectDraw7_SetCooperativeLevel(ddraw, window, DDSCL_NORMAL); - ok(SUCCEEDED(hr), "SetCooperativeLevel failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "SetCooperativeLevel failed, hr %#lx.\n", hr);
SetWindowPos(window, NULL, 0, 0, 100, 100, SWP_NOZORDER | SWP_NOACTIVATE); GetWindowRect(window, &r); @@ -2711,13 +2711,13 @@ static void test_window_style(void) ret = SetForegroundWindow(window2); ok(ret, "Failed to set foreground window.\n"); hr = IDirectDraw7_SetCooperativeLevel(ddraw, window, DDSCL_EXCLUSIVE | DDSCL_FULLSCREEN); - ok(SUCCEEDED(hr), "SetCooperativeLevel failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "SetCooperativeLevel failed, hr %#lx.\n", hr);
tmp = GetWindowLongA(window, GWL_STYLE); expected_style = style | WS_VISIBLE; - todo_wine ok(tmp == expected_style, "Expected window style %#x, got %#x.\n", expected_style, tmp); + todo_wine ok(tmp == expected_style, "Expected window style %#lx, got %#lx.\n", expected_style, tmp); tmp = GetWindowLongA(window, GWL_EXSTYLE); - todo_wine ok(tmp == exstyle, "Expected window extended style %#x, got %#x.\n", exstyle, tmp); + todo_wine ok(tmp == exstyle, "Expected window extended style %#lx, got %#lx.\n", exstyle, tmp);
GetWindowRect(window, &r); ok(EqualRect(&r, &fullscreen_rect), "Expected %s, got %s.\n", @@ -2726,46 +2726,46 @@ static void test_window_style(void) ret = SetForegroundWindow(window); ok(ret, "Failed to set foreground window.\n"); hr = IDirectDraw7_SetCooperativeLevel(ddraw, window, DDSCL_EXCLUSIVE | DDSCL_FULLSCREEN); - ok(SUCCEEDED(hr), "SetCooperativeLevel failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "SetCooperativeLevel failed, hr %#lx.\n", hr);
tmp = GetWindowLongA(window, GWL_STYLE); expected_style = style | WS_VISIBLE; - todo_wine ok(tmp == expected_style, "Expected window style %#x, got %#x.\n", expected_style, tmp); + todo_wine ok(tmp == expected_style, "Expected window style %#lx, got %#lx.\n", expected_style, tmp); tmp = GetWindowLongA(window, GWL_EXSTYLE); expected_style = exstyle | WS_EX_TOPMOST; - todo_wine ok(tmp == expected_style, "Expected window extended style %#x, got %#x.\n", expected_style, tmp); + todo_wine ok(tmp == expected_style, "Expected window extended style %#lx, got %#lx.\n", expected_style, tmp);
ShowWindow(window, SW_HIDE); hr = IDirectDraw7_SetCooperativeLevel(ddraw, window, DDSCL_NORMAL); - ok(SUCCEEDED(hr), "SetCooperativeLevel failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "SetCooperativeLevel failed, hr %#lx.\n", hr);
tmp = GetWindowLongA(window, GWL_STYLE); - ok(tmp == style, "Expected window style %#x, got %#x.\n", style, tmp); + ok(tmp == style, "Expected window style %#lx, got %#lx.\n", style, tmp); tmp = GetWindowLongA(window, GWL_EXSTYLE); - ok(tmp == exstyle, "Expected window extended style %#x, got %#x.\n", exstyle, tmp); + ok(tmp == exstyle, "Expected window extended style %#lx, got %#lx.\n", exstyle, tmp);
ShowWindow(window, SW_SHOW); hr = IDirectDraw7_SetCooperativeLevel(ddraw, window, DDSCL_EXCLUSIVE | DDSCL_FULLSCREEN); - ok(SUCCEEDED(hr), "SetCooperativeLevel failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "SetCooperativeLevel failed, hr %#lx.\n", hr);
tmp = GetWindowLongA(window, GWL_STYLE); expected_style = style | WS_VISIBLE; - todo_wine ok(tmp == expected_style, "Expected window style %#x, got %#x.\n", expected_style, tmp); + todo_wine ok(tmp == expected_style, "Expected window style %#lx, got %#lx.\n", expected_style, tmp); tmp = GetWindowLongA(window, GWL_EXSTYLE); expected_style = exstyle | WS_EX_TOPMOST; - todo_wine ok(tmp == expected_style, "Expected window extended style %#x, got %#x.\n", expected_style, tmp); + todo_wine ok(tmp == expected_style, "Expected window extended style %#lx, got %#lx.\n", expected_style, tmp);
ret = SetForegroundWindow(GetDesktopWindow()); ok(ret, "Failed to set foreground window.\n"); tmp = GetWindowLongA(window, GWL_STYLE); expected_style = style | WS_VISIBLE | WS_MINIMIZE; - todo_wine ok(tmp == expected_style, "Expected window style %#x, got %#x.\n", expected_style, tmp); + todo_wine ok(tmp == expected_style, "Expected window style %#lx, got %#lx.\n", expected_style, tmp); tmp = GetWindowLongA(window, GWL_EXSTYLE); expected_style = exstyle | WS_EX_TOPMOST; - todo_wine ok(tmp == expected_style, "Expected window extended style %#x, got %#x.\n", expected_style, tmp); + todo_wine ok(tmp == expected_style, "Expected window extended style %#lx, got %#lx.\n", expected_style, tmp);
ref = IDirectDraw7_Release(ddraw); - ok(ref == 0, "The ddraw object was not properly freed: refcount %u.\n", ref); + ok(ref == 0, "The ddraw object was not properly freed: refcount %lu.\n", ref);
DestroyWindow(window2); DestroyWindow(window); @@ -2785,15 +2785,15 @@ static void test_redundant_mode_set(void) ddraw = create_ddraw(); ok(!!ddraw, "Failed to create a ddraw object.\n"); hr = IDirectDraw7_SetCooperativeLevel(ddraw, window, DDSCL_EXCLUSIVE | DDSCL_FULLSCREEN); - ok(SUCCEEDED(hr), "SetCooperativeLevel failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "SetCooperativeLevel failed, hr %#lx.\n", hr);
surface_desc.dwSize = sizeof(surface_desc); hr = IDirectDraw7_GetDisplayMode(ddraw, &surface_desc); - ok(SUCCEEDED(hr), "GetDisplayMode failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "GetDisplayMode failed, hr %#lx.\n", hr);
hr = IDirectDraw7_SetDisplayMode(ddraw, surface_desc.dwWidth, surface_desc.dwHeight, U1(U4(surface_desc).ddpfPixelFormat).dwRGBBitCount, 0, 0); - ok(SUCCEEDED(hr), "SetDisplayMode failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "SetDisplayMode failed, hr %#lx.\n", hr);
GetWindowRect(window, &q); r = q; @@ -2805,14 +2805,14 @@ static void test_redundant_mode_set(void)
hr = IDirectDraw7_SetDisplayMode(ddraw, surface_desc.dwWidth, surface_desc.dwHeight, U1(U4(surface_desc).ddpfPixelFormat).dwRGBBitCount, 0, 0); - ok(SUCCEEDED(hr), "SetDisplayMode failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "SetDisplayMode failed, hr %#lx.\n", hr);
GetWindowRect(window, &s); ok(EqualRect(&r, &s) || broken(EqualRect(&q, &s) /* Windows 10 */), "Expected %s, got %s.\n", wine_dbgstr_rect(&r), wine_dbgstr_rect(&s));
ref = IDirectDraw7_Release(ddraw); - ok(ref == 0, "The ddraw object was not properly freed: refcount %u.\n", ref); + ok(ref == 0, "The ddraw object was not properly freed: refcount %lu.\n", ref);
DestroyWindow(window); } @@ -2962,10 +2962,10 @@ static void test_coop_level_mode_set(void) memset(&devmode, 0, sizeof(devmode)); devmode.dmSize = sizeof(devmode); ret = EnumDisplaySettingsW(NULL, ENUM_CURRENT_SETTINGS, &devmode); - ok(ret, "EnumDisplaySettingsW failed, error %#x.\n", GetLastError()); + ok(ret, "EnumDisplaySettingsW failed, error %#lx.\n", GetLastError()); ok(compare_mode_rect(&devmode, ®istry_mode), "Got a different mode.\n"); ret = EnumDisplaySettingsW(NULL, ENUM_REGISTRY_SETTINGS, &devmode); - ok(ret, "EnumDisplaySettingsW failed, error %#x.\n", GetLastError()); + ok(ret, "EnumDisplaySettingsW failed, error %#lx.\n", GetLastError()); ok(compare_mode_rect(&devmode, ®istry_mode), "Got a different mode.\n");
ret = save_display_modes(&original_modes, &display_count); @@ -2976,9 +2976,9 @@ static void test_coop_level_mode_set(void)
memset(¶m, 0, sizeof(param)); hr = IDirectDraw7_EnumDisplayModes(ddraw, 0, NULL, ¶m, test_coop_level_mode_set_enum_cb); - ok(SUCCEEDED(hr), "Failed to enumerate display mode, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to enumerate display mode, hr %#lx.\n", hr); ref = IDirectDraw7_Release(ddraw); - ok(ref == 0, "The ddraw object was not properly freed: refcount %u.\n", ref); + ok(ref == 0, "The ddraw object was not properly freed: refcount %lu.\n", ref);
if (!param.user32_height) { @@ -2997,7 +2997,7 @@ static void test_coop_level_mode_set(void) devmode.dmPelsWidth = param.user32_width; devmode.dmPelsHeight = param.user32_height; change_ret = ChangeDisplaySettingsW(&devmode, CDS_FULLSCREEN); - ok(change_ret == DISP_CHANGE_SUCCESSFUL, "Failed to change display mode, ret %#x.\n", change_ret); + ok(change_ret == DISP_CHANGE_SUCCESSFUL, "Failed to change display mode, ret %#lx.\n", change_ret);
ddraw = create_ddraw(); ok(!!ddraw, "Failed to create a ddraw object.\n"); @@ -3015,7 +3015,7 @@ static void test_coop_level_mode_set(void) 0, 0, 100, 100, 0, 0, 0, 0);
hr = IDirectDraw7_SetCooperativeLevel(ddraw, window, DDSCL_EXCLUSIVE | DDSCL_FULLSCREEN); - ok(SUCCEEDED(hr), "SetCooperativeLevel failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "SetCooperativeLevel failed, hr %#lx.\n", hr);
GetWindowRect(window, &r); ok(EqualRect(&r, &user32_rect), "Expected %s, got %s.\n", wine_dbgstr_rect(&user32_rect), @@ -3027,12 +3027,12 @@ static void test_coop_level_mode_set(void) ddsd.ddsCaps.dwCaps = DDSCAPS_PRIMARYSURFACE;
hr = IDirectDraw7_CreateSurface(ddraw, &ddsd, &primary, NULL); - ok(SUCCEEDED(hr), "Failed to create surface, hr %#x.\n",hr); + ok(SUCCEEDED(hr), "Failed to create surface, hr %#lx.\n",hr); hr = IDirectDrawSurface7_GetSurfaceDesc(primary, &ddsd); - ok(SUCCEEDED(hr), "Failed to get surface desc, hr %#x.\n", hr); - ok(ddsd.dwWidth == param.user32_width, "Expected surface width %u, got %u.\n", + ok(SUCCEEDED(hr), "Failed to get surface desc, hr %#lx.\n", hr); + ok(ddsd.dwWidth == param.user32_width, "Expected surface width %lu, got %lu.\n", param.user32_width, ddsd.dwWidth); - ok(ddsd.dwHeight == param.user32_height, "Expected surface height %u, got %u.\n", + ok(ddsd.dwHeight == param.user32_height, "Expected surface height %lu, got %lu.\n", param.user32_height, ddsd.dwHeight);
GetWindowRect(window, &r); @@ -3045,16 +3045,16 @@ static void test_coop_level_mode_set(void) screen_size.cy = 0;
hr = IDirectDrawSurface7_IsLost(primary); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); hr = set_display_mode(ddraw, param.ddraw_width, param.ddraw_height); - ok(SUCCEEDED(hr), "Failed to set display mode, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set display mode, hr %#lx.\n", hr); hr = IDirectDrawSurface7_IsLost(primary); - ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#lx.\n", hr);
ok(!expect_messages->message, "Expected message %#x, but didn't receive it.\n", expect_messages->message); expect_messages = NULL; ok(screen_size.cx == param.ddraw_width && screen_size.cy == param.ddraw_height, - "Expected screen size %ux%u, got %ux%u.\n", + "Expected screen size %lux%lu, got %lux%lu.\n", param.ddraw_width, param.ddraw_height, screen_size.cx, screen_size.cy);
GetWindowRect(window, &r); @@ -3062,10 +3062,10 @@ static void test_coop_level_mode_set(void) wine_dbgstr_rect(&r));
hr = IDirectDrawSurface7_GetSurfaceDesc(primary, &ddsd); - ok(SUCCEEDED(hr), "Failed to get surface desc, hr %#x.\n", hr); - ok(ddsd.dwWidth == param.user32_width, "Expected surface width %u, got %u.\n", + ok(SUCCEEDED(hr), "Failed to get surface desc, hr %#lx.\n", hr); + ok(ddsd.dwWidth == param.user32_width, "Expected surface width %lu, got %lu.\n", param.user32_width, ddsd.dwWidth); - ok(ddsd.dwHeight == param.user32_height, "Expected surface height %u, got %u.\n", + ok(ddsd.dwHeight == param.user32_height, "Expected surface height %lu, got %lu.\n", param.user32_height, ddsd.dwHeight); IDirectDrawSurface7_Release(primary);
@@ -3075,12 +3075,12 @@ static void test_coop_level_mode_set(void) ddsd.ddsCaps.dwCaps = DDSCAPS_PRIMARYSURFACE;
hr = IDirectDraw7_CreateSurface(ddraw, &ddsd, &primary, NULL); - ok(SUCCEEDED(hr), "Failed to create surface, hr %#x.\n",hr); + ok(SUCCEEDED(hr), "Failed to create surface, hr %#lx.\n",hr); hr = IDirectDrawSurface7_GetSurfaceDesc(primary, &ddsd); - ok(SUCCEEDED(hr), "Failed to get surface desc, hr %#x.\n", hr); - ok(ddsd.dwWidth == param.ddraw_width, "Expected surface width %u, got %u.\n", + ok(SUCCEEDED(hr), "Failed to get surface desc, hr %#lx.\n", hr); + ok(ddsd.dwWidth == param.ddraw_width, "Expected surface width %lu, got %lu.\n", param.ddraw_width, ddsd.dwWidth); - ok(ddsd.dwHeight == param.ddraw_height, "Expected surface height %u, got %u.\n", + ok(ddsd.dwHeight == param.ddraw_height, "Expected surface height %lu, got %lu.\n", param.ddraw_height, ddsd.dwHeight);
GetWindowRect(window, &r); @@ -3093,16 +3093,16 @@ static void test_coop_level_mode_set(void) screen_size.cy = 0;
hr = IDirectDrawSurface7_IsLost(primary); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); change_ret = ChangeDisplaySettingsW(&devmode, CDS_FULLSCREEN); - ok(change_ret == DISP_CHANGE_SUCCESSFUL, "Failed to change display mode, ret %#x.\n", change_ret); + ok(change_ret == DISP_CHANGE_SUCCESSFUL, "Failed to change display mode, ret %#lx.\n", change_ret); hr = IDirectDrawSurface7_IsLost(primary); - ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#lx.\n", hr);
ok(!expect_messages->message, "Expected message %#x, but didn't receive it.\n", expect_messages->message); expect_messages = NULL; ok(screen_size.cx == param.user32_width && screen_size.cy == param.user32_height, - "Expected screen size %ux%u, got %ux%u.\n", + "Expected screen size %lux%lu, got %lux%lu.\n", param.user32_width, param.user32_height, screen_size.cx, screen_size.cy);
GetWindowRect(window, &r); @@ -3121,7 +3121,7 @@ static void test_coop_level_mode_set(void) ret = EnumDisplaySettingsW(NULL, ENUM_CURRENT_SETTINGS, &devmode); ok(ret, "Failed to get display mode.\n"); ok(devmode.dmPelsWidth == registry_mode.dmPelsWidth - && devmode.dmPelsHeight == registry_mode.dmPelsHeight, "Got unexpected screen size %ux%u.\n", + && devmode.dmPelsHeight == registry_mode.dmPelsHeight, "Got unexpected screen size %lux%lu.\n", devmode.dmPelsWidth, devmode.dmPelsHeight);
expect_messages = exclusive_focus_restore_messages; @@ -3134,11 +3134,11 @@ static void test_coop_level_mode_set(void) ret = EnumDisplaySettingsW(NULL, ENUM_CURRENT_SETTINGS, &devmode); ok(ret, "Failed to get display mode.\n"); ok(devmode.dmPelsWidth == param.ddraw_width - && devmode.dmPelsHeight == param.ddraw_height, "Got unexpected screen size %ux%u.\n", + && devmode.dmPelsHeight == param.ddraw_height, "Got unexpected screen size %lux%lu.\n", devmode.dmPelsWidth, devmode.dmPelsHeight);
hr = IDirectDraw7_SetCooperativeLevel(ddraw, window, DDSCL_EXCLUSIVE | DDSCL_FULLSCREEN); - ok(SUCCEEDED(hr), "SetCooperativeLevel failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "SetCooperativeLevel failed, hr %#lx.\n", hr); /* Normally the primary should be restored here. Unfortunately this causes the * GetSurfaceDesc call after the next display mode change to crash on the Windows 8 * testbot. Another Restore call would presumably avoid the crash, but it also moots @@ -3160,7 +3160,7 @@ static void test_coop_level_mode_set(void) expect_messages = NULL;
hr = IDirectDraw7_SetCooperativeLevel(ddraw, window, DDSCL_EXCLUSIVE | DDSCL_FULLSCREEN); - ok(SUCCEEDED(hr), "SetCooperativeLevel failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "SetCooperativeLevel failed, hr %#lx.\n", hr);
PeekMessageA(&msg, 0, 0, 0, PM_NOREMOVE); expect_messages = exclusive_messages; @@ -3168,17 +3168,17 @@ static void test_coop_level_mode_set(void) screen_size.cy = 0;
hr = IDirectDrawSurface7_IsLost(primary); - ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#lx.\n", hr); hr = IDirectDraw7_RestoreDisplayMode(ddraw); - ok(SUCCEEDED(hr), "RestoreDisplayMode failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "RestoreDisplayMode failed, hr %#lx.\n", hr); hr = IDirectDrawSurface7_IsLost(primary); - ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#lx.\n", hr);
ok(!expect_messages->message, "Expected message %#x, but didn't receive it.\n", expect_messages->message); expect_messages = NULL; ok(screen_size.cx == registry_mode.dmPelsWidth && screen_size.cy == registry_mode.dmPelsHeight, - "Expected screen size %ux%u, got %ux%u.\n", + "Expected screen size %lux%lu, got %lux%lu.\n", registry_mode.dmPelsWidth, registry_mode.dmPelsHeight, screen_size.cx, screen_size.cy);
GetWindowRect(window, &r); @@ -3186,16 +3186,16 @@ static void test_coop_level_mode_set(void) wine_dbgstr_rect(&r));
hr = IDirectDrawSurface7_GetSurfaceDesc(primary, &ddsd); - ok(SUCCEEDED(hr), "Failed to get surface desc, hr %#x.\n", hr); - ok(ddsd.dwWidth == param.ddraw_width, "Expected surface width %u, got %u.\n", + ok(SUCCEEDED(hr), "Failed to get surface desc, hr %#lx.\n", hr); + ok(ddsd.dwWidth == param.ddraw_width, "Expected surface width %lu, got %lu.\n", param.ddraw_width, ddsd.dwWidth); - ok(ddsd.dwHeight == param.ddraw_height, "Expected surface height %u, got %u.\n", + ok(ddsd.dwHeight == param.ddraw_height, "Expected surface height %lu, got %lu.\n", param.ddraw_height, ddsd.dwHeight); IDirectDrawSurface7_Release(primary);
/* For Wine. */ change_ret = ChangeDisplaySettingsW(NULL, CDS_FULLSCREEN); - ok(change_ret == DISP_CHANGE_SUCCESSFUL, "Failed to change display mode, ret %#x.\n", change_ret); + ok(change_ret == DISP_CHANGE_SUCCESSFUL, "Failed to change display mode, ret %#lx.\n", change_ret);
memset(&ddsd, 0, sizeof(ddsd)); ddsd.dwSize = sizeof(ddsd); @@ -3203,12 +3203,12 @@ static void test_coop_level_mode_set(void) ddsd.ddsCaps.dwCaps = DDSCAPS_PRIMARYSURFACE;
hr = IDirectDraw7_CreateSurface(ddraw, &ddsd, &primary, NULL); - ok(SUCCEEDED(hr), "Failed to create surface, hr %#x.\n",hr); + ok(SUCCEEDED(hr), "Failed to create surface, hr %#lx.\n",hr); hr = IDirectDrawSurface7_GetSurfaceDesc(primary, &ddsd); - ok(SUCCEEDED(hr), "Failed to get surface desc, hr %#x.\n", hr); - ok(ddsd.dwWidth == registry_mode.dmPelsWidth, "Expected surface width %u, got %u.\n", + ok(SUCCEEDED(hr), "Failed to get surface desc, hr %#lx.\n", hr); + ok(ddsd.dwWidth == registry_mode.dmPelsWidth, "Expected surface width %lu, got %lu.\n", registry_mode.dmPelsWidth, ddsd.dwWidth); - ok(ddsd.dwHeight == registry_mode.dmPelsHeight, "Expected surface height %u, got %u.\n", + ok(ddsd.dwHeight == registry_mode.dmPelsHeight, "Expected surface height %lu, got %lu.\n", registry_mode.dmPelsHeight, ddsd.dwHeight);
GetWindowRect(window, &r); @@ -3216,17 +3216,17 @@ static void test_coop_level_mode_set(void) wine_dbgstr_rect(&r));
hr = IDirectDraw7_SetCooperativeLevel(ddraw, window, DDSCL_NORMAL); - ok(SUCCEEDED(hr), "SetCooperativeLevel failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "SetCooperativeLevel failed, hr %#lx.\n", hr);
GetWindowRect(window, &r); ok(EqualRect(&r, ®istry_rect), "Expected %s, got %s.\n", wine_dbgstr_rect(®istry_rect), wine_dbgstr_rect(&r));
hr = IDirectDrawSurface7_GetSurfaceDesc(primary, &ddsd); - ok(SUCCEEDED(hr), "Failed to get surface desc, hr %#x.\n", hr); - ok(ddsd.dwWidth == registry_mode.dmPelsWidth, "Expected surface width %u, got %u.\n", + ok(SUCCEEDED(hr), "Failed to get surface desc, hr %#lx.\n", hr); + ok(ddsd.dwWidth == registry_mode.dmPelsWidth, "Expected surface width %lu, got %lu.\n", registry_mode.dmPelsWidth, ddsd.dwWidth); - ok(ddsd.dwHeight == registry_mode.dmPelsHeight, "Expected surface height %u, got %u.\n", + ok(ddsd.dwHeight == registry_mode.dmPelsHeight, "Expected surface height %lu, got %lu.\n", registry_mode.dmPelsHeight, ddsd.dwHeight); IDirectDrawSurface7_Release(primary);
@@ -3236,12 +3236,12 @@ static void test_coop_level_mode_set(void) ddsd.ddsCaps.dwCaps = DDSCAPS_PRIMARYSURFACE;
hr = IDirectDraw7_CreateSurface(ddraw, &ddsd, &primary, NULL); - ok(SUCCEEDED(hr), "Failed to create surface, hr %#x.\n",hr); + ok(SUCCEEDED(hr), "Failed to create surface, hr %#lx.\n",hr); hr = IDirectDrawSurface7_GetSurfaceDesc(primary, &ddsd); - ok(SUCCEEDED(hr), "Failed to get surface desc, hr %#x.\n", hr); - ok(ddsd.dwWidth == registry_mode.dmPelsWidth, "Expected surface width %u, got %u.\n", + ok(SUCCEEDED(hr), "Failed to get surface desc, hr %#lx.\n", hr); + ok(ddsd.dwWidth == registry_mode.dmPelsWidth, "Expected surface width %lu, got %lu.\n", registry_mode.dmPelsWidth, ddsd.dwWidth); - ok(ddsd.dwHeight == registry_mode.dmPelsHeight, "Expected surface height %u, got %u.\n", + ok(ddsd.dwHeight == registry_mode.dmPelsHeight, "Expected surface height %lu, got %lu.\n", registry_mode.dmPelsHeight, ddsd.dwHeight);
GetWindowRect(window, &r); @@ -3254,18 +3254,18 @@ static void test_coop_level_mode_set(void) screen_size.cy = 0;
hr = IDirectDrawSurface7_IsLost(primary); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); devmode.dmFields = DM_PELSWIDTH | DM_PELSHEIGHT; devmode.dmPelsWidth = param.user32_width; devmode.dmPelsHeight = param.user32_height; change_ret = ChangeDisplaySettingsW(&devmode, CDS_FULLSCREEN); - ok(change_ret == DISP_CHANGE_SUCCESSFUL, "Failed to change display mode, ret %#x.\n", change_ret); + ok(change_ret == DISP_CHANGE_SUCCESSFUL, "Failed to change display mode, ret %#lx.\n", change_ret); hr = IDirectDrawSurface7_IsLost(primary); - todo_wine ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#x.\n", hr); + todo_wine ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#lx.\n", hr);
ok(!expect_messages->message, "Expected message %#x, but didn't receive it.\n", expect_messages->message); expect_messages = NULL; - ok(!screen_size.cx && !screen_size.cy, "Got unexpected screen size %ux%u.\n", screen_size.cx, screen_size.cy); + ok(!screen_size.cx && !screen_size.cy, "Got unexpected screen size %lux%lu.\n", screen_size.cx, screen_size.cy);
GetWindowRect(window, &r); ok(EqualRect(&r, ®istry_rect), "Expected %s, got %s.\n", wine_dbgstr_rect(®istry_rect), @@ -3277,27 +3277,27 @@ static void test_coop_level_mode_set(void) screen_size.cy = 0;
hr = IDirectDrawSurface7_Restore(primary); - ok(hr == DDERR_WRONGMODE, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_WRONGMODE, "Got unexpected hr %#lx.\n", hr); hr = set_display_mode(ddraw, param.ddraw_width, param.ddraw_height); - ok(SUCCEEDED(hr), "Failed to set display mode, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set display mode, hr %#lx.\n", hr); hr = IDirectDrawSurface7_Restore(primary); - ok(hr == DDERR_WRONGMODE, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_WRONGMODE, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface7_IsLost(primary); - ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#lx.\n", hr);
ok(!expect_messages->message, "Expected message %#x, but didn't receive it.\n", expect_messages->message); expect_messages = NULL; - ok(!screen_size.cx && !screen_size.cy, "Got unexpected screen size %ux%u.\n", screen_size.cx, screen_size.cy); + ok(!screen_size.cx && !screen_size.cy, "Got unexpected screen size %lux%lu.\n", screen_size.cx, screen_size.cy);
GetWindowRect(window, &r); ok(EqualRect(&r, ®istry_rect), "Expected %s, got %s.\n", wine_dbgstr_rect(®istry_rect), wine_dbgstr_rect(&r));
hr = IDirectDrawSurface7_GetSurfaceDesc(primary, &ddsd); - ok(SUCCEEDED(hr), "Failed to get surface desc, hr %#x.\n", hr); - ok(ddsd.dwWidth == registry_mode.dmPelsWidth, "Expected surface width %u, got %u.\n", + ok(SUCCEEDED(hr), "Failed to get surface desc, hr %#lx.\n", hr); + ok(ddsd.dwWidth == registry_mode.dmPelsWidth, "Expected surface width %lu, got %lu.\n", registry_mode.dmPelsWidth, ddsd.dwWidth); - ok(ddsd.dwHeight == registry_mode.dmPelsHeight, "Expected surface height %u, got %u.\n", + ok(ddsd.dwHeight == registry_mode.dmPelsHeight, "Expected surface height %lu, got %lu.\n", registry_mode.dmPelsHeight, ddsd.dwHeight); IDirectDrawSurface7_Release(primary);
@@ -3307,12 +3307,12 @@ static void test_coop_level_mode_set(void) ddsd.ddsCaps.dwCaps = DDSCAPS_PRIMARYSURFACE;
hr = IDirectDraw7_CreateSurface(ddraw, &ddsd, &primary, NULL); - ok(SUCCEEDED(hr), "Failed to create surface, hr %#x.\n",hr); + ok(SUCCEEDED(hr), "Failed to create surface, hr %#lx.\n",hr); hr = IDirectDrawSurface7_GetSurfaceDesc(primary, &ddsd); - ok(SUCCEEDED(hr), "Failed to get surface desc, hr %#x.\n", hr); - ok(ddsd.dwWidth == param.ddraw_width, "Expected surface width %u, got %u.\n", + ok(SUCCEEDED(hr), "Failed to get surface desc, hr %#lx.\n", hr); + ok(ddsd.dwWidth == param.ddraw_width, "Expected surface width %lu, got %lu.\n", param.ddraw_width, ddsd.dwWidth); - ok(ddsd.dwHeight == param.ddraw_height, "Expected surface height %u, got %u.\n", + ok(ddsd.dwHeight == param.ddraw_height, "Expected surface height %lu, got %lu.\n", param.ddraw_height, ddsd.dwHeight);
GetWindowRect(window, &r); @@ -3325,25 +3325,25 @@ static void test_coop_level_mode_set(void) screen_size.cy = 0;
hr = IDirectDrawSurface7_IsLost(primary); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirectDraw7_RestoreDisplayMode(ddraw); - ok(SUCCEEDED(hr), "RestoreDisplayMode failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "RestoreDisplayMode failed, hr %#lx.\n", hr); hr = IDirectDrawSurface7_IsLost(primary); - ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#lx.\n", hr);
ok(!expect_messages->message, "Expected message %#x, but didn't receive it.\n", expect_messages->message); expect_messages = NULL; - ok(!screen_size.cx && !screen_size.cy, "Got unexpected screen size %ux%u.\n", screen_size.cx, screen_size.cy); + ok(!screen_size.cx && !screen_size.cy, "Got unexpected screen size %lux%lu.\n", screen_size.cx, screen_size.cy);
GetWindowRect(window, &r); ok(EqualRect(&r, ®istry_rect), "Expected %s, got %s.\n", wine_dbgstr_rect(®istry_rect), wine_dbgstr_rect(&r));
hr = IDirectDrawSurface7_GetSurfaceDesc(primary, &ddsd); - ok(SUCCEEDED(hr), "Failed to get surface desc, hr %#x.\n", hr); - ok(ddsd.dwWidth == param.ddraw_width, "Expected surface width %u, got %u.\n", + ok(SUCCEEDED(hr), "Failed to get surface desc, hr %#lx.\n", hr); + ok(ddsd.dwWidth == param.ddraw_width, "Expected surface width %lu, got %lu.\n", param.ddraw_width, ddsd.dwWidth); - ok(ddsd.dwHeight == param.ddraw_height, "Expected surface height %u, got %u.\n", + ok(ddsd.dwHeight == param.ddraw_height, "Expected surface height %lu, got %lu.\n", param.ddraw_height, ddsd.dwHeight); IDirectDrawSurface7_Release(primary);
@@ -3351,11 +3351,11 @@ static void test_coop_level_mode_set(void) ok(ret, "Failed to get display mode.\n"); ok(devmode.dmPelsWidth == registry_mode.dmPelsWidth && devmode.dmPelsHeight == registry_mode.dmPelsHeight, - "Expected resolution %ux%u, got %ux%u.\n", + "Expected resolution %lux%lu, got %lux%lu.\n", registry_mode.dmPelsWidth, registry_mode.dmPelsHeight, devmode.dmPelsWidth, devmode.dmPelsHeight); change_ret = ChangeDisplaySettingsW(NULL, CDS_FULLSCREEN); - ok(change_ret == DISP_CHANGE_SUCCESSFUL, "Failed to change display mode, ret %#x.\n", change_ret); + ok(change_ret == DISP_CHANGE_SUCCESSFUL, "Failed to change display mode, ret %#lx.\n", change_ret);
memset(&ddsd, 0, sizeof(ddsd)); ddsd.dwSize = sizeof(ddsd); @@ -3363,12 +3363,12 @@ static void test_coop_level_mode_set(void) ddsd.ddsCaps.dwCaps = DDSCAPS_PRIMARYSURFACE;
hr = IDirectDraw7_CreateSurface(ddraw, &ddsd, &primary, NULL); - ok(SUCCEEDED(hr), "Failed to create surface, hr %#x.\n",hr); + ok(SUCCEEDED(hr), "Failed to create surface, hr %#lx.\n",hr); hr = IDirectDrawSurface7_GetSurfaceDesc(primary, &ddsd); - ok(SUCCEEDED(hr), "Failed to get surface desc, hr %#x.\n", hr); - ok(ddsd.dwWidth == registry_mode.dmPelsWidth, "Expected surface width %u, got %u.\n", + ok(SUCCEEDED(hr), "Failed to get surface desc, hr %#lx.\n", hr); + ok(ddsd.dwWidth == registry_mode.dmPelsWidth, "Expected surface width %lu, got %lu.\n", registry_mode.dmPelsWidth, ddsd.dwWidth); - ok(ddsd.dwHeight == registry_mode.dmPelsHeight, "Expected surface height %u, got %u.\n", + ok(ddsd.dwHeight == registry_mode.dmPelsHeight, "Expected surface height %lu, got %lu.\n", registry_mode.dmPelsHeight, ddsd.dwHeight);
GetWindowRect(window, &r); @@ -3379,17 +3379,17 @@ static void test_coop_level_mode_set(void) * Resizing the window on mode changes is a property of DDSCL_EXCLUSIVE, * not DDSCL_FULLSCREEN. */ hr = IDirectDraw7_SetCooperativeLevel(ddraw, window, DDSCL_NORMAL | DDSCL_FULLSCREEN); - ok(SUCCEEDED(hr), "SetCooperativeLevel failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "SetCooperativeLevel failed, hr %#lx.\n", hr);
GetWindowRect(window, &r); ok(EqualRect(&r, ®istry_rect), "Expected %s, got %s.\n", wine_dbgstr_rect(®istry_rect), wine_dbgstr_rect(&r));
hr = IDirectDrawSurface7_GetSurfaceDesc(primary, &ddsd); - ok(SUCCEEDED(hr), "Failed to get surface desc, hr %#x.\n", hr); - ok(ddsd.dwWidth == registry_mode.dmPelsWidth, "Expected surface width %u, got %u.\n", + ok(SUCCEEDED(hr), "Failed to get surface desc, hr %#lx.\n", hr); + ok(ddsd.dwWidth == registry_mode.dmPelsWidth, "Expected surface width %lu, got %lu.\n", registry_mode.dmPelsWidth, ddsd.dwWidth); - ok(ddsd.dwHeight == registry_mode.dmPelsHeight, "Expected surface height %u, got %u.\n", + ok(ddsd.dwHeight == registry_mode.dmPelsHeight, "Expected surface height %lu, got %lu.\n", registry_mode.dmPelsHeight, ddsd.dwHeight); IDirectDrawSurface7_Release(primary);
@@ -3399,12 +3399,12 @@ static void test_coop_level_mode_set(void) ddsd.ddsCaps.dwCaps = DDSCAPS_PRIMARYSURFACE;
hr = IDirectDraw7_CreateSurface(ddraw, &ddsd, &primary, NULL); - ok(SUCCEEDED(hr), "Failed to create surface, hr %#x.\n",hr); + ok(SUCCEEDED(hr), "Failed to create surface, hr %#lx.\n",hr); hr = IDirectDrawSurface7_GetSurfaceDesc(primary, &ddsd); - ok(SUCCEEDED(hr), "Failed to get surface desc, hr %#x.\n", hr); - ok(ddsd.dwWidth == registry_mode.dmPelsWidth, "Expected surface width %u, got %u.\n", + ok(SUCCEEDED(hr), "Failed to get surface desc, hr %#lx.\n", hr); + ok(ddsd.dwWidth == registry_mode.dmPelsWidth, "Expected surface width %lu, got %lu.\n", registry_mode.dmPelsWidth, ddsd.dwWidth); - ok(ddsd.dwHeight == registry_mode.dmPelsHeight, "Expected surface height %u, got %u.\n", + ok(ddsd.dwHeight == registry_mode.dmPelsHeight, "Expected surface height %lu, got %lu.\n", registry_mode.dmPelsHeight, ddsd.dwHeight);
GetWindowRect(window, &r); @@ -3417,18 +3417,18 @@ static void test_coop_level_mode_set(void) screen_size.cy = 0;
hr = IDirectDrawSurface7_IsLost(primary); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); devmode.dmFields = DM_PELSWIDTH | DM_PELSHEIGHT; devmode.dmPelsWidth = param.user32_width; devmode.dmPelsHeight = param.user32_height; change_ret = ChangeDisplaySettingsW(&devmode, CDS_FULLSCREEN); - ok(change_ret == DISP_CHANGE_SUCCESSFUL, "Failed to change display mode, ret %#x.\n", change_ret); + ok(change_ret == DISP_CHANGE_SUCCESSFUL, "Failed to change display mode, ret %#lx.\n", change_ret); hr = IDirectDrawSurface7_IsLost(primary); - todo_wine ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#x.\n", hr); + todo_wine ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#lx.\n", hr);
ok(!expect_messages->message, "Expected message %#x, but didn't receive it.\n", expect_messages->message); expect_messages = NULL; - ok(!screen_size.cx && !screen_size.cy, "Got unexpected screen size %ux%u.\n", screen_size.cx, screen_size.cy); + ok(!screen_size.cx && !screen_size.cy, "Got unexpected screen size %lux%lu.\n", screen_size.cx, screen_size.cy);
GetWindowRect(window, &r); ok(EqualRect(&r, ®istry_rect), "Expected %s, got %s.\n", wine_dbgstr_rect(®istry_rect), @@ -3440,27 +3440,27 @@ static void test_coop_level_mode_set(void) screen_size.cy = 0;
hr = IDirectDrawSurface7_Restore(primary); - ok(hr == DDERR_WRONGMODE, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_WRONGMODE, "Got unexpected hr %#lx.\n", hr); hr = set_display_mode(ddraw, param.ddraw_width, param.ddraw_height); - ok(SUCCEEDED(hr), "Failed to set display mode, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set display mode, hr %#lx.\n", hr); hr = IDirectDrawSurface7_Restore(primary); - ok(hr == DDERR_WRONGMODE, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_WRONGMODE, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface7_IsLost(primary); - ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#lx.\n", hr);
ok(!expect_messages->message, "Expected message %#x, but didn't receive it.\n", expect_messages->message); expect_messages = NULL; - ok(!screen_size.cx && !screen_size.cy, "Got unexpected screen size %ux%u.\n", screen_size.cx, screen_size.cy); + ok(!screen_size.cx && !screen_size.cy, "Got unexpected screen size %lux%lu.\n", screen_size.cx, screen_size.cy);
GetWindowRect(window, &r); ok(EqualRect(&r, ®istry_rect), "Expected %s, got %s.\n", wine_dbgstr_rect(®istry_rect), wine_dbgstr_rect(&r));
hr = IDirectDrawSurface7_GetSurfaceDesc(primary, &ddsd); - ok(SUCCEEDED(hr), "Failed to get surface desc, hr %#x.\n", hr); - ok(ddsd.dwWidth == registry_mode.dmPelsWidth, "Expected surface width %u, got %u.\n", + ok(SUCCEEDED(hr), "Failed to get surface desc, hr %#lx.\n", hr); + ok(ddsd.dwWidth == registry_mode.dmPelsWidth, "Expected surface width %lu, got %lu.\n", registry_mode.dmPelsWidth, ddsd.dwWidth); - ok(ddsd.dwHeight == registry_mode.dmPelsHeight, "Expected surface height %u, got %u.\n", + ok(ddsd.dwHeight == registry_mode.dmPelsHeight, "Expected surface height %lu, got %lu.\n", registry_mode.dmPelsHeight, ddsd.dwHeight); IDirectDrawSurface7_Release(primary);
@@ -3470,12 +3470,12 @@ static void test_coop_level_mode_set(void) ddsd.ddsCaps.dwCaps = DDSCAPS_PRIMARYSURFACE;
hr = IDirectDraw7_CreateSurface(ddraw, &ddsd, &primary, NULL); - ok(SUCCEEDED(hr), "Failed to create surface, hr %#x.\n",hr); + ok(SUCCEEDED(hr), "Failed to create surface, hr %#lx.\n",hr); hr = IDirectDrawSurface7_GetSurfaceDesc(primary, &ddsd); - ok(SUCCEEDED(hr), "Failed to get surface desc, hr %#x.\n", hr); - ok(ddsd.dwWidth == param.ddraw_width, "Expected surface width %u, got %u.\n", + ok(SUCCEEDED(hr), "Failed to get surface desc, hr %#lx.\n", hr); + ok(ddsd.dwWidth == param.ddraw_width, "Expected surface width %lu, got %lu.\n", param.ddraw_width, ddsd.dwWidth); - ok(ddsd.dwHeight == param.ddraw_height, "Expected surface height %u, got %u.\n", + ok(ddsd.dwHeight == param.ddraw_height, "Expected surface height %lu, got %lu.\n", param.ddraw_height, ddsd.dwHeight);
GetWindowRect(window, &r); @@ -3488,25 +3488,25 @@ static void test_coop_level_mode_set(void) screen_size.cy = 0;
hr = IDirectDrawSurface7_IsLost(primary); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirectDraw7_RestoreDisplayMode(ddraw); - ok(SUCCEEDED(hr), "RestoreDisplayMode failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "RestoreDisplayMode failed, hr %#lx.\n", hr); hr = IDirectDrawSurface7_IsLost(primary); - ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#lx.\n", hr);
ok(!expect_messages->message, "Expected message %#x, but didn't receive it.\n", expect_messages->message); expect_messages = NULL; - ok(!screen_size.cx && !screen_size.cy, "Got unexpected screen size %ux%u.\n", screen_size.cx, screen_size.cy); + ok(!screen_size.cx && !screen_size.cy, "Got unexpected screen size %lux%lu.\n", screen_size.cx, screen_size.cy);
GetWindowRect(window, &r); ok(EqualRect(&r, ®istry_rect), "Expected %s, got %s.\n", wine_dbgstr_rect(®istry_rect), wine_dbgstr_rect(&r));
hr = IDirectDrawSurface7_GetSurfaceDesc(primary, &ddsd); - ok(SUCCEEDED(hr), "Failed to get surface desc, hr %#x.\n", hr); - ok(ddsd.dwWidth == param.ddraw_width, "Expected surface width %u, got %u.\n", + ok(SUCCEEDED(hr), "Failed to get surface desc, hr %#lx.\n", hr); + ok(ddsd.dwWidth == param.ddraw_width, "Expected surface width %lu, got %lu.\n", param.ddraw_width, ddsd.dwWidth); - ok(ddsd.dwHeight == param.ddraw_height, "Expected surface height %u, got %u.\n", + ok(ddsd.dwHeight == param.ddraw_height, "Expected surface height %lu, got %lu.\n", param.ddraw_height, ddsd.dwHeight); IDirectDrawSurface7_Release(primary);
@@ -3514,11 +3514,11 @@ static void test_coop_level_mode_set(void) ok(ret, "Failed to get display mode.\n"); ok(devmode.dmPelsWidth == registry_mode.dmPelsWidth && devmode.dmPelsHeight == registry_mode.dmPelsHeight, - "Expected resolution %ux%u, got %ux%u.\n", + "Expected resolution %lux%lu, got %lux%lu.\n", registry_mode.dmPelsWidth, registry_mode.dmPelsHeight, devmode.dmPelsWidth, devmode.dmPelsHeight); change_ret = ChangeDisplaySettingsW(NULL, CDS_FULLSCREEN); - ok(change_ret == DISP_CHANGE_SUCCESSFUL, "Failed to change display mode, ret %#x.\n", change_ret); + ok(change_ret == DISP_CHANGE_SUCCESSFUL, "Failed to change display mode, ret %#lx.\n", change_ret);
memset(&ddsd, 0, sizeof(ddsd)); ddsd.dwSize = sizeof(ddsd); @@ -3526,12 +3526,12 @@ static void test_coop_level_mode_set(void) ddsd.ddsCaps.dwCaps = DDSCAPS_PRIMARYSURFACE;
hr = IDirectDraw7_CreateSurface(ddraw, &ddsd, &primary, NULL); - ok(SUCCEEDED(hr), "Failed to create surface, hr %#x.\n",hr); + ok(SUCCEEDED(hr), "Failed to create surface, hr %#lx.\n",hr); hr = IDirectDrawSurface7_GetSurfaceDesc(primary, &ddsd); - ok(SUCCEEDED(hr), "Failed to get surface desc, hr %#x.\n", hr); - ok(ddsd.dwWidth == registry_mode.dmPelsWidth, "Expected surface width %u, got %u.\n", + ok(SUCCEEDED(hr), "Failed to get surface desc, hr %#lx.\n", hr); + ok(ddsd.dwWidth == registry_mode.dmPelsWidth, "Expected surface width %lu, got %lu.\n", registry_mode.dmPelsWidth, ddsd.dwWidth); - ok(ddsd.dwHeight == registry_mode.dmPelsHeight, "Expected surface height %u, got %u.\n", + ok(ddsd.dwHeight == registry_mode.dmPelsHeight, "Expected surface height %lu, got %lu.\n", registry_mode.dmPelsHeight, ddsd.dwHeight); IDirectDrawSurface7_Release(primary);
@@ -3541,9 +3541,9 @@ static void test_coop_level_mode_set(void)
/* Changing the coop level from EXCLUSIVE to NORMAL restores the screen resolution */ hr = IDirectDraw7_SetCooperativeLevel(ddraw, window, DDSCL_EXCLUSIVE | DDSCL_FULLSCREEN); - ok(SUCCEEDED(hr), "SetCooperativeLevel failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "SetCooperativeLevel failed, hr %#lx.\n", hr); hr = set_display_mode(ddraw, param.ddraw_width, param.ddraw_height); - ok(SUCCEEDED(hr), "Failed to set display mode, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set display mode, hr %#lx.\n", hr);
PeekMessageA(&msg, 0, 0, 0, PM_NOREMOVE); expect_messages = exclusive_messages; @@ -3551,13 +3551,13 @@ static void test_coop_level_mode_set(void) screen_size.cy = 0;
hr = IDirectDraw7_SetCooperativeLevel(ddraw, window, DDSCL_NORMAL); - ok(SUCCEEDED(hr), "SetCooperativeLevel failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "SetCooperativeLevel failed, hr %#lx.\n", hr);
ok(!expect_messages->message, "Expected message %#x, but didn't receive it.\n", expect_messages->message); expect_messages = NULL; ok(screen_size.cx == registry_mode.dmPelsWidth && screen_size.cy == registry_mode.dmPelsHeight, - "Expected screen size %ux%u, got %ux%u.\n", + "Expected screen size %lux%lu, got %lux%lu.\n", registry_mode.dmPelsWidth, registry_mode.dmPelsHeight, screen_size.cx, screen_size.cy);
@@ -3571,23 +3571,23 @@ static void test_coop_level_mode_set(void) ddsd.ddsCaps.dwCaps = DDSCAPS_PRIMARYSURFACE;
hr = IDirectDraw7_CreateSurface(ddraw, &ddsd, &primary, NULL); - ok(SUCCEEDED(hr), "Failed to create surface, hr %#x.\n",hr); + ok(SUCCEEDED(hr), "Failed to create surface, hr %#lx.\n",hr); hr = IDirectDrawSurface7_GetSurfaceDesc(primary, &ddsd); - ok(SUCCEEDED(hr), "Failed to get surface desc, hr %#x.\n", hr); - ok(ddsd.dwWidth == registry_mode.dmPelsWidth, "Expected surface width %u, got %u.\n", + ok(SUCCEEDED(hr), "Failed to get surface desc, hr %#lx.\n", hr); + ok(ddsd.dwWidth == registry_mode.dmPelsWidth, "Expected surface width %lu, got %lu.\n", registry_mode.dmPelsWidth, ddsd.dwWidth); - ok(ddsd.dwHeight == registry_mode.dmPelsHeight, "Expected surface height %u, got %u.\n", + ok(ddsd.dwHeight == registry_mode.dmPelsHeight, "Expected surface height %lu, got %lu.\n", registry_mode.dmPelsHeight, ddsd.dwHeight); IDirectDrawSurface7_Release(primary);
/* The screen restore is a property of DDSCL_EXCLUSIVE */ hr = IDirectDraw7_SetCooperativeLevel(ddraw, window, DDSCL_NORMAL | DDSCL_FULLSCREEN); - ok(SUCCEEDED(hr), "SetCooperativeLevel failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "SetCooperativeLevel failed, hr %#lx.\n", hr); hr = set_display_mode(ddraw, param.ddraw_width, param.ddraw_height); - ok(SUCCEEDED(hr), "Failed to set display mode, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set display mode, hr %#lx.\n", hr);
hr = IDirectDraw7_SetCooperativeLevel(ddraw, window, DDSCL_NORMAL); - ok(SUCCEEDED(hr), "SetCooperativeLevel failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "SetCooperativeLevel failed, hr %#lx.\n", hr);
memset(&ddsd, 0, sizeof(ddsd)); ddsd.dwSize = sizeof(ddsd); @@ -3595,23 +3595,23 @@ static void test_coop_level_mode_set(void) ddsd.ddsCaps.dwCaps = DDSCAPS_PRIMARYSURFACE;
hr = IDirectDraw7_CreateSurface(ddraw, &ddsd, &primary, NULL); - ok(SUCCEEDED(hr), "Failed to create surface, hr %#x.\n",hr); + ok(SUCCEEDED(hr), "Failed to create surface, hr %#lx.\n",hr); hr = IDirectDrawSurface7_GetSurfaceDesc(primary, &ddsd); - ok(SUCCEEDED(hr), "Failed to get surface desc, hr %#x.\n", hr); - ok(ddsd.dwWidth == param.ddraw_width, "Expected surface width %u, got %u.\n", + ok(SUCCEEDED(hr), "Failed to get surface desc, hr %#lx.\n", hr); + ok(ddsd.dwWidth == param.ddraw_width, "Expected surface width %lu, got %lu.\n", param.ddraw_width, ddsd.dwWidth); - ok(ddsd.dwHeight == param.ddraw_height, "Expected surface height %u, got %u.\n", + ok(ddsd.dwHeight == param.ddraw_height, "Expected surface height %lu, got %lu.\n", param.ddraw_height, ddsd.dwHeight); IDirectDrawSurface7_Release(primary);
hr = IDirectDraw7_RestoreDisplayMode(ddraw); - ok(SUCCEEDED(hr), "RestoreDisplayMode failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "RestoreDisplayMode failed, hr %#lx.\n", hr);
/* If the window is changed at the same time, messages are sent to the new window. */ hr = IDirectDraw7_SetCooperativeLevel(ddraw, window, DDSCL_EXCLUSIVE | DDSCL_FULLSCREEN); - ok(SUCCEEDED(hr), "SetCooperativeLevel failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "SetCooperativeLevel failed, hr %#lx.\n", hr); hr = set_display_mode(ddraw, param.ddraw_width, param.ddraw_height); - ok(SUCCEEDED(hr), "Failed to set display mode, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set display mode, hr %#lx.\n", hr);
PeekMessageA(&msg, 0, 0, 0, PM_NOREMOVE); expect_messages = exclusive_messages; @@ -3621,14 +3621,14 @@ static void test_coop_level_mode_set(void) screen_size2.cy = 0;
hr = IDirectDraw7_SetCooperativeLevel(ddraw, window2, DDSCL_NORMAL); - ok(SUCCEEDED(hr), "SetCooperativeLevel failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "SetCooperativeLevel failed, hr %#lx.\n", hr);
ok(!expect_messages->message, "Expected message %#x, but didn't receive it.\n", expect_messages->message); expect_messages = NULL; - ok(!screen_size.cx && !screen_size.cy, "Got unexpected screen size %ux%u.\n", + ok(!screen_size.cx && !screen_size.cy, "Got unexpected screen size %lux%lu.\n", screen_size.cx, screen_size.cy); ok(screen_size2.cx == registry_mode.dmPelsWidth && screen_size2.cy == registry_mode.dmPelsHeight, - "Expected screen size 2 %ux%u, got %ux%u.\n", + "Expected screen size 2 %lux%lu, got %lux%lu.\n", registry_mode.dmPelsWidth, registry_mode.dmPelsHeight, screen_size2.cx, screen_size2.cy);
GetWindowRect(window, &r); @@ -3644,17 +3644,17 @@ static void test_coop_level_mode_set(void) ddsd.ddsCaps.dwCaps = DDSCAPS_PRIMARYSURFACE;
hr = IDirectDraw7_CreateSurface(ddraw, &ddsd, &primary, NULL); - ok(SUCCEEDED(hr), "Failed to create surface, hr %#x.\n",hr); + ok(SUCCEEDED(hr), "Failed to create surface, hr %#lx.\n",hr); hr = IDirectDrawSurface7_GetSurfaceDesc(primary, &ddsd); - ok(SUCCEEDED(hr), "Failed to get surface desc, hr %#x.\n", hr); - ok(ddsd.dwWidth == registry_mode.dmPelsWidth, "Expected surface width %u, got %u.\n", + ok(SUCCEEDED(hr), "Failed to get surface desc, hr %#lx.\n", hr); + ok(ddsd.dwWidth == registry_mode.dmPelsWidth, "Expected surface width %lu, got %lu.\n", registry_mode.dmPelsWidth, ddsd.dwWidth); - ok(ddsd.dwHeight == registry_mode.dmPelsHeight, "Expected surface height %u, got %u.\n", + ok(ddsd.dwHeight == registry_mode.dmPelsHeight, "Expected surface height %lu, got %lu.\n", registry_mode.dmPelsHeight, ddsd.dwHeight); IDirectDrawSurface7_Release(primary);
ref = IDirectDraw7_Release(ddraw); - ok(ref == 0, "The ddraw object was not properly freed: refcount %u.\n", ref); + ok(ref == 0, "The ddraw object was not properly freed: refcount %lu.\n", ref);
GetWindowRect(window, &r); ok(EqualRect(&r, &ddraw_rect), "Expected %s, got %s.\n", wine_dbgstr_rect(&ddraw_rect), @@ -3668,36 +3668,36 @@ static void test_coop_level_mode_set(void) devmode.dmPelsWidth = param.user32_width; devmode.dmPelsHeight = param.user32_height; change_ret = ChangeDisplaySettingsW(&devmode, CDS_UPDATEREGISTRY | CDS_NORESET); - ok(change_ret == DISP_CHANGE_SUCCESSFUL, "ChangeDisplaySettingsW failed with %d.\n", change_ret); + ok(change_ret == DISP_CHANGE_SUCCESSFUL, "ChangeDisplaySettingsW failed with %ld.\n", change_ret);
ddraw = create_ddraw(); ok(!!ddraw, "Failed to create a ddraw object.\n"); ref = IDirectDraw7_Release(ddraw); - ok(ref == 0, "The ddraw object was not properly freed: refcount %u.\n", ref); + ok(ref == 0, "The ddraw object was not properly freed: refcount %lu.\n", ref);
memset(&devmode2, 0, sizeof(devmode2)); devmode2.dmSize = sizeof(devmode2); ret = EnumDisplaySettingsW(NULL, ENUM_CURRENT_SETTINGS, &devmode2); - ok(ret, "EnumDisplaySettingsW failed, error %#x.\n", GetLastError()); + ok(ret, "EnumDisplaySettingsW failed, error %#lx.\n", GetLastError()); ok(compare_mode_rect(&devmode2, ®istry_mode), "Got a different mode.\n"); ret = restore_display_modes(original_modes, display_count); ok(ret, "Failed to restore display modes.\n");
/* Test that no mode restorations if no mode changes happened with fullscreen ddraw objects */ change_ret = ChangeDisplaySettingsW(&devmode, CDS_UPDATEREGISTRY | CDS_NORESET); - ok(change_ret == DISP_CHANGE_SUCCESSFUL, "ChangeDisplaySettingsW failed with %d.\n", change_ret); + ok(change_ret == DISP_CHANGE_SUCCESSFUL, "ChangeDisplaySettingsW failed with %ld.\n", change_ret);
ddraw = create_ddraw(); ok(!!ddraw, "Failed to create a ddraw object.\n"); hr = IDirectDraw7_SetCooperativeLevel(ddraw, window, DDSCL_EXCLUSIVE | DDSCL_FULLSCREEN); - ok(hr == DD_OK, "SetCooperativeLevel failed, hr %#x.\n", hr); + ok(hr == DD_OK, "SetCooperativeLevel failed, hr %#lx.\n", hr); hr = IDirectDraw7_SetCooperativeLevel(ddraw, window, DDSCL_NORMAL); - ok(hr == DD_OK, "SetCooperativeLevel failed, hr %#x.\n", hr); + ok(hr == DD_OK, "SetCooperativeLevel failed, hr %#lx.\n", hr); ref = IDirectDraw7_Release(ddraw); - ok(ref == 0, "The ddraw object was not properly freed: refcount %u.\n", ref); + ok(ref == 0, "The ddraw object was not properly freed: refcount %lu.\n", ref);
ret = EnumDisplaySettingsW(NULL, ENUM_CURRENT_SETTINGS, &devmode2); - ok(ret, "EnumDisplaySettingsW failed, error %#x.\n", GetLastError()); + ok(ret, "EnumDisplaySettingsW failed, error %#lx.\n", GetLastError()); ok(compare_mode_rect(&devmode2, ®istry_mode), "Got a different mode.\n"); ret = restore_display_modes(original_modes, display_count); ok(ret, "Failed to restore display modes.\n"); @@ -3707,19 +3707,19 @@ static void test_coop_level_mode_set(void) ddraw = create_ddraw(); ok(!!ddraw, "Failed to create a ddraw object.\n"); hr = set_display_mode(ddraw, registry_mode.dmPelsWidth, registry_mode.dmPelsHeight); - ok(hr == DD_OK, "Failed to set display mode, hr %#x.\n", hr); + ok(hr == DD_OK, "Failed to set display mode, hr %#lx.\n", hr);
change_ret = ChangeDisplaySettingsW(&devmode, CDS_UPDATEREGISTRY | CDS_NORESET); - ok(change_ret == DISP_CHANGE_SUCCESSFUL, "ChangeDisplaySettingsW failed with %d.\n", change_ret); + ok(change_ret == DISP_CHANGE_SUCCESSFUL, "ChangeDisplaySettingsW failed with %ld.\n", change_ret);
ref = IDirectDraw7_Release(ddraw); - ok(ref == 0, "The ddraw object was not properly freed: refcount %u.\n", ref); + ok(ref == 0, "The ddraw object was not properly freed: refcount %lu.\n", ref);
ret = EnumDisplaySettingsW(NULL, ENUM_CURRENT_SETTINGS, &devmode2); - ok(ret, "EnumDisplaySettingsW failed, error %#x.\n", GetLastError()); + ok(ret, "EnumDisplaySettingsW failed, error %#lx.\n", GetLastError()); ok(compare_mode_rect(&devmode2, &devmode), "Got a different mode.\n"); ret = EnumDisplaySettingsW(NULL, ENUM_REGISTRY_SETTINGS, &devmode2); - ok(ret, "EnumDisplaySettingsW failed, error %#x.\n", GetLastError()); + ok(ret, "EnumDisplaySettingsW failed, error %#lx.\n", GetLastError()); ok(compare_mode_rect(&devmode2, &devmode), "Got a different mode.\n"); ret = restore_display_modes(original_modes, display_count); ok(ret, "Failed to restore display modes.\n"); @@ -3728,23 +3728,23 @@ static void test_coop_level_mode_set(void) ddraw = create_ddraw(); ok(!!ddraw, "Failed to create a ddraw object.\n"); hr = set_display_mode(ddraw, param.ddraw_width, param.ddraw_height); - ok(hr == DD_OK, "Failed to set display mode, hr %#x.\n", hr); + ok(hr == DD_OK, "Failed to set display mode, hr %#lx.\n", hr);
change_ret = ChangeDisplaySettingsW(&devmode, CDS_UPDATEREGISTRY | CDS_NORESET); - ok(change_ret == DISP_CHANGE_SUCCESSFUL, "ChangeDisplaySettingsW failed with %d.\n", change_ret); + ok(change_ret == DISP_CHANGE_SUCCESSFUL, "ChangeDisplaySettingsW failed with %ld.\n", change_ret);
hr = IDirectDraw7_RestoreDisplayMode(ddraw); - ok(hr == DD_OK, "RestoreDisplayMode failed, hr %#x.\n", hr); + ok(hr == DD_OK, "RestoreDisplayMode failed, hr %#lx.\n", hr);
ret = EnumDisplaySettingsW(NULL, ENUM_CURRENT_SETTINGS, &devmode2); - ok(ret, "EnumDisplaySettingsW failed, error %#x.\n", GetLastError()); + ok(ret, "EnumDisplaySettingsW failed, error %#lx.\n", GetLastError()); ok(compare_mode_rect(&devmode2, &devmode), "Got a different mode.\n"); ret = EnumDisplaySettingsW(NULL, ENUM_REGISTRY_SETTINGS, &devmode2); - ok(ret, "EnumDisplaySettingsW failed, error %#x.\n", GetLastError()); + ok(ret, "EnumDisplaySettingsW failed, error %#lx.\n", GetLastError()); ok(compare_mode_rect(&devmode2, &devmode), "Got a different mode.\n");
ref = IDirectDraw7_Release(ddraw); - ok(ref == 0, "The ddraw object was not properly freed: refcount %u.\n", ref); + ok(ref == 0, "The ddraw object was not properly freed: refcount %lu.\n", ref);
expect_messages = NULL; DestroyWindow(window); @@ -3772,10 +3772,10 @@ static void test_coop_level_mode_set_multi(void) memset(&devmode, 0, sizeof(devmode)); devmode.dmSize = sizeof(devmode); ret = EnumDisplaySettingsW(NULL, ENUM_CURRENT_SETTINGS, &devmode); - ok(ret, "EnumDisplaySettingsW failed, error %#x.\n", GetLastError()); + ok(ret, "EnumDisplaySettingsW failed, error %#lx.\n", GetLastError()); ok(compare_mode_rect(&devmode, ®istry_mode), "Got a different mode.\n"); ret = EnumDisplaySettingsW(NULL, ENUM_REGISTRY_SETTINGS, &devmode); - ok(ret, "EnumDisplaySettingsW failed, error %#x.\n", GetLastError()); + ok(ret, "EnumDisplaySettingsW failed, error %#lx.\n", GetLastError()); ok(compare_mode_rect(&devmode, ®istry_mode), "Got a different mode.\n");
ret = save_display_modes(&original_modes, &display_count); @@ -3789,14 +3789,14 @@ static void test_coop_level_mode_set_multi(void) /* With just a single ddraw object, the display mode is restored on * release. */ hr = set_display_mode(ddraw1, 800, 600); - ok(SUCCEEDED(hr), "Failed to set display mode, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set display mode, hr %#lx.\n", hr); w = GetSystemMetrics(SM_CXSCREEN); ok(w == 800, "Got unexpected screen width %u.\n", w); h = GetSystemMetrics(SM_CYSCREEN); ok(h == 600, "Got unexpected screen height %u.\n", h);
ref = IDirectDraw7_Release(ddraw1); - ok(ref == 0, "The ddraw object was not properly freed: refcount %u.\n", ref); + ok(ref == 0, "The ddraw object was not properly freed: refcount %lu.\n", ref); w = GetSystemMetrics(SM_CXSCREEN); ok(w == registry_mode.dmPelsWidth, "Got unexpected screen width %u.\n", w); h = GetSystemMetrics(SM_CYSCREEN); @@ -3806,7 +3806,7 @@ static void test_coop_level_mode_set_multi(void) * the initial mode, before the first SetDisplayMode() call. */ ddraw1 = create_ddraw(); hr = set_display_mode(ddraw1, 800, 600); - ok(SUCCEEDED(hr), "Failed to set display mode, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set display mode, hr %#lx.\n", hr); w = GetSystemMetrics(SM_CXSCREEN); ok(w == 800, "Got unexpected screen width %u.\n", w); h = GetSystemMetrics(SM_CYSCREEN); @@ -3814,21 +3814,21 @@ static void test_coop_level_mode_set_multi(void)
ddraw2 = create_ddraw(); hr = set_display_mode(ddraw2, 640, 480); - ok(SUCCEEDED(hr), "Failed to set display mode, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set display mode, hr %#lx.\n", hr); w = GetSystemMetrics(SM_CXSCREEN); ok(w == 640, "Got unexpected screen width %u.\n", w); h = GetSystemMetrics(SM_CYSCREEN); ok(h == 480, "Got unexpected screen height %u.\n", h);
ref = IDirectDraw7_Release(ddraw2); - ok(ref == 0, "The ddraw object was not properly freed: refcount %u.\n", ref); + ok(ref == 0, "The ddraw object was not properly freed: refcount %lu.\n", ref); w = GetSystemMetrics(SM_CXSCREEN); ok(w == registry_mode.dmPelsWidth, "Got unexpected screen width %u.\n", w); h = GetSystemMetrics(SM_CYSCREEN); ok(h == registry_mode.dmPelsHeight, "Got unexpected screen height %u.\n", h);
ref = IDirectDraw7_Release(ddraw1); - ok(ref == 0, "The ddraw object was not properly freed: refcount %u.\n", ref); + ok(ref == 0, "The ddraw object was not properly freed: refcount %lu.\n", ref); w = GetSystemMetrics(SM_CXSCREEN); ok(w == registry_mode.dmPelsWidth, "Got unexpected screen width %u.\n", w); h = GetSystemMetrics(SM_CYSCREEN); @@ -3837,7 +3837,7 @@ static void test_coop_level_mode_set_multi(void) /* Regardless of release ordering. */ ddraw1 = create_ddraw(); hr = set_display_mode(ddraw1, 800, 600); - ok(SUCCEEDED(hr), "Failed to set display mode, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set display mode, hr %#lx.\n", hr); w = GetSystemMetrics(SM_CXSCREEN); ok(w == 800, "Got unexpected screen width %u.\n", w); h = GetSystemMetrics(SM_CYSCREEN); @@ -3845,21 +3845,21 @@ static void test_coop_level_mode_set_multi(void)
ddraw2 = create_ddraw(); hr = set_display_mode(ddraw2, 640, 480); - ok(SUCCEEDED(hr), "Failed to set display mode, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set display mode, hr %#lx.\n", hr); w = GetSystemMetrics(SM_CXSCREEN); ok(w == 640, "Got unexpected screen width %u.\n", w); h = GetSystemMetrics(SM_CYSCREEN); ok(h == 480, "Got unexpected screen height %u.\n", h);
ref = IDirectDraw7_Release(ddraw1); - ok(ref == 0, "The ddraw object was not properly freed: refcount %u.\n", ref); + ok(ref == 0, "The ddraw object was not properly freed: refcount %lu.\n", ref); w = GetSystemMetrics(SM_CXSCREEN); ok(w == registry_mode.dmPelsWidth, "Got unexpected screen width %u.\n", w); h = GetSystemMetrics(SM_CYSCREEN); ok(h == registry_mode.dmPelsHeight, "Got unexpected screen height %u.\n", h);
ref = IDirectDraw7_Release(ddraw2); - ok(ref == 0, "The ddraw object was not properly freed: refcount %u.\n", ref); + ok(ref == 0, "The ddraw object was not properly freed: refcount %lu.\n", ref); w = GetSystemMetrics(SM_CXSCREEN); ok(w == registry_mode.dmPelsWidth, "Got unexpected screen width %u.\n", w); h = GetSystemMetrics(SM_CYSCREEN); @@ -3869,21 +3869,21 @@ static void test_coop_level_mode_set_multi(void) ddraw1 = create_ddraw(); ddraw2 = create_ddraw(); hr = set_display_mode(ddraw2, 640, 480); - ok(SUCCEEDED(hr), "Failed to set display mode, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set display mode, hr %#lx.\n", hr); w = GetSystemMetrics(SM_CXSCREEN); ok(w == 640, "Got unexpected screen width %u.\n", w); h = GetSystemMetrics(SM_CYSCREEN); ok(h == 480, "Got unexpected screen height %u.\n", h);
ref = IDirectDraw7_Release(ddraw1); - ok(ref == 0, "The ddraw object was not properly freed: refcount %u.\n", ref); + ok(ref == 0, "The ddraw object was not properly freed: refcount %lu.\n", ref); w = GetSystemMetrics(SM_CXSCREEN); ok(w == 640, "Got unexpected screen width %u.\n", w); h = GetSystemMetrics(SM_CYSCREEN); ok(h == 480, "Got unexpected screen height %u.\n", h);
ref = IDirectDraw7_Release(ddraw2); - ok(ref == 0, "The ddraw object was not properly freed: refcount %u.\n", ref); + ok(ref == 0, "The ddraw object was not properly freed: refcount %lu.\n", ref); w = GetSystemMetrics(SM_CXSCREEN); ok(w == registry_mode.dmPelsWidth, "Got unexpected screen width %u.\n", w); h = GetSystemMetrics(SM_CYSCREEN); @@ -3893,7 +3893,7 @@ static void test_coop_level_mode_set_multi(void) * restoring the display mode. */ ddraw1 = create_ddraw(); hr = set_display_mode(ddraw1, 800, 600); - ok(SUCCEEDED(hr), "Failed to set display mode, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set display mode, hr %#lx.\n", hr); w = GetSystemMetrics(SM_CXSCREEN); ok(w == 800, "Got unexpected screen width %u.\n", w); h = GetSystemMetrics(SM_CYSCREEN); @@ -3901,24 +3901,24 @@ static void test_coop_level_mode_set_multi(void)
ddraw2 = create_ddraw(); hr = set_display_mode(ddraw2, 640, 480); - ok(SUCCEEDED(hr), "Failed to set display mode, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set display mode, hr %#lx.\n", hr); w = GetSystemMetrics(SM_CXSCREEN); ok(w == 640, "Got unexpected screen width %u.\n", w); h = GetSystemMetrics(SM_CYSCREEN); ok(h == 480, "Got unexpected screen height %u.\n", h);
hr = IDirectDraw7_SetCooperativeLevel(ddraw2, window, DDSCL_EXCLUSIVE | DDSCL_FULLSCREEN); - ok(SUCCEEDED(hr), "SetCooperativeLevel failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "SetCooperativeLevel failed, hr %#lx.\n", hr);
ref = IDirectDraw7_Release(ddraw1); - ok(ref == 0, "The ddraw object was not properly freed: refcount %u.\n", ref); + ok(ref == 0, "The ddraw object was not properly freed: refcount %lu.\n", ref); w = GetSystemMetrics(SM_CXSCREEN); ok(w == 640, "Got unexpected screen width %u.\n", w); h = GetSystemMetrics(SM_CYSCREEN); ok(h == 480, "Got unexpected screen height %u.\n", h);
ref = IDirectDraw7_Release(ddraw2); - ok(ref == 0, "The ddraw object was not properly freed: refcount %u.\n", ref); + ok(ref == 0, "The ddraw object was not properly freed: refcount %lu.\n", ref); w = GetSystemMetrics(SM_CXSCREEN); ok(w == registry_mode.dmPelsWidth, "Got unexpected screen width %u.\n", w); h = GetSystemMetrics(SM_CYSCREEN); @@ -3927,28 +3927,28 @@ static void test_coop_level_mode_set_multi(void) /* Exclusive mode blocks mode setting on other ddraw objects in general. */ ddraw1 = create_ddraw(); hr = set_display_mode(ddraw1, 800, 600); - ok(SUCCEEDED(hr), "Failed to set display mode, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set display mode, hr %#lx.\n", hr); w = GetSystemMetrics(SM_CXSCREEN); ok(w == 800, "Got unexpected screen width %u.\n", w); h = GetSystemMetrics(SM_CYSCREEN); ok(h == 600, "Got unexpected screen height %u.\n", h);
hr = IDirectDraw7_SetCooperativeLevel(ddraw1, window, DDSCL_EXCLUSIVE | DDSCL_FULLSCREEN); - ok(SUCCEEDED(hr), "SetCooperativeLevel failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "SetCooperativeLevel failed, hr %#lx.\n", hr);
ddraw2 = create_ddraw(); hr = set_display_mode(ddraw2, 640, 480); - ok(hr == DDERR_NOEXCLUSIVEMODE, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_NOEXCLUSIVEMODE, "Got unexpected hr %#lx.\n", hr);
ref = IDirectDraw7_Release(ddraw1); - ok(ref == 0, "The ddraw object was not properly freed: refcount %u.\n", ref); + ok(ref == 0, "The ddraw object was not properly freed: refcount %lu.\n", ref); w = GetSystemMetrics(SM_CXSCREEN); ok(w == registry_mode.dmPelsWidth, "Got unexpected screen width %u.\n", w); h = GetSystemMetrics(SM_CYSCREEN); ok(h == registry_mode.dmPelsHeight, "Got unexpected screen height %u.\n", h);
ref = IDirectDraw7_Release(ddraw2); - ok(ref == 0, "The ddraw object was not properly freed: refcount %u.\n", ref); + ok(ref == 0, "The ddraw object was not properly freed: refcount %lu.\n", ref); w = GetSystemMetrics(SM_CXSCREEN); ok(w == registry_mode.dmPelsWidth, "Got unexpected screen width %u.\n", w); h = GetSystemMetrics(SM_CYSCREEN); @@ -3976,7 +3976,7 @@ static void test_coop_level_mode_set_multi(void) memset(&old_devmode, 0, sizeof(old_devmode)); old_devmode.dmSize = sizeof(old_devmode); ret = EnumDisplaySettingsW(second_monitor_name, ENUM_CURRENT_SETTINGS, &old_devmode); - ok(ret, "EnumDisplaySettingsW failed, error %#x.\n", GetLastError()); + ok(ret, "EnumDisplaySettingsW failed, error %#lx.\n", GetLastError());
devmode = old_devmode; while (EnumDisplaySettingsW(second_monitor_name, mode_idx++, &devmode)) @@ -3993,32 +3993,32 @@ static void test_coop_level_mode_set_multi(void) ddraw1 = create_ddraw(); ok(!!ddraw1, "Failed to create a ddraw object.\n"); hr = IDirectDraw7_SetCooperativeLevel(ddraw1, window, DDSCL_EXCLUSIVE | DDSCL_FULLSCREEN); - ok(hr == DD_OK, "SetCooperativeLevel failed, hr %#x.\n", hr); + ok(hr == DD_OK, "SetCooperativeLevel failed, hr %#lx.\n", hr);
change_ret = ChangeDisplaySettingsExW(second_monitor_name, &devmode, NULL, CDS_RESET, NULL); - ok(change_ret == DISP_CHANGE_SUCCESSFUL, "ChangeDisplaySettingsExW failed with %d.\n", change_ret); + ok(change_ret == DISP_CHANGE_SUCCESSFUL, "ChangeDisplaySettingsExW failed with %ld.\n", change_ret);
memset(&devmode2, 0, sizeof(devmode2)); devmode2.dmSize = sizeof(devmode2); ret = EnumDisplaySettingsW(second_monitor_name, ENUM_CURRENT_SETTINGS, &devmode2); - ok(ret, "EnumDisplaySettingsW failed, error %#x.\n", GetLastError()); + ok(ret, "EnumDisplaySettingsW failed, error %#lx.\n", GetLastError()); if (compare_mode_rect(&devmode2, &old_devmode)) { skip("Failed to change display settings of the second monitor.\n"); ref = IDirectDraw7_Release(ddraw1); - ok(ref == 0, "The ddraw object was not properly freed: refcount %u.\n", ref); + ok(ref == 0, "The ddraw object was not properly freed: refcount %lu.\n", ref); goto done; }
hr = IDirectDraw7_SetCooperativeLevel(ddraw1, window, DDSCL_NORMAL); - ok(hr == DD_OK, "SetCooperativeLevel failed, hr %#x.\n", hr); + ok(hr == DD_OK, "SetCooperativeLevel failed, hr %#lx.\n", hr); ref = IDirectDraw7_Release(ddraw1); - ok(ref == 0, "The ddraw object was not properly freed: refcount %u.\n", ref); + ok(ref == 0, "The ddraw object was not properly freed: refcount %lu.\n", ref);
memset(&devmode3, 0, sizeof(devmode3)); devmode3.dmSize = sizeof(devmode3); ret = EnumDisplaySettingsW(second_monitor_name, ENUM_CURRENT_SETTINGS, &devmode3); - ok(ret, "EnumDisplaySettingsW failed, error %#x.\n", GetLastError()); + ok(ret, "EnumDisplaySettingsW failed, error %#lx.\n", GetLastError()); ok(compare_mode_rect(&devmode3, &devmode2), "Got a different mode.\n"); ret = restore_display_modes(original_modes, display_count); ok(ret, "Failed to restore display modes.\n"); @@ -4028,19 +4028,19 @@ static void test_coop_level_mode_set_multi(void) ddraw1 = create_ddraw(); ok(!!ddraw1, "Failed to create a ddraw object.\n"); hr = set_display_mode(ddraw1, 800, 600); - ok(hr == DD_OK, "Failed to set display mode, hr %#x.\n", hr); + ok(hr == DD_OK, "Failed to set display mode, hr %#lx.\n", hr);
change_ret = ChangeDisplaySettingsExW(second_monitor_name, &devmode, NULL, CDS_RESET, NULL); - ok(change_ret == DISP_CHANGE_SUCCESSFUL, "ChangeDisplaySettingsExW failed with %d.\n", change_ret); + ok(change_ret == DISP_CHANGE_SUCCESSFUL, "ChangeDisplaySettingsExW failed with %ld.\n", change_ret);
ref = IDirectDraw7_Release(ddraw1); - ok(ref == 0, "The ddraw object was not properly freed: refcount %u.\n", ref); + ok(ref == 0, "The ddraw object was not properly freed: refcount %lu.\n", ref);
ret = EnumDisplaySettingsW(second_monitor_name, ENUM_CURRENT_SETTINGS, &devmode2); - ok(ret, "EnumDisplaySettingsW failed, error %#x.\n", GetLastError()); + ok(ret, "EnumDisplaySettingsW failed, error %#lx.\n", GetLastError()); ok(compare_mode_rect(&devmode2, &old_devmode), "Got a different mode.\n"); ret = EnumDisplaySettingsW(second_monitor_name, ENUM_REGISTRY_SETTINGS, &devmode2); - ok(ret, "EnumDisplaySettingsW failed, error %#x.\n", GetLastError()); + ok(ret, "EnumDisplaySettingsW failed, error %#lx.\n", GetLastError()); ok(compare_mode_rect(&devmode2, &old_devmode), "Got a different mode.\n"); ret = restore_display_modes(original_modes, display_count); ok(ret, "Failed to restore display modes.\n"); @@ -4049,23 +4049,23 @@ static void test_coop_level_mode_set_multi(void) ddraw1 = create_ddraw(); ok(!!ddraw1, "Failed to create a ddraw object.\n"); hr = set_display_mode(ddraw1, 800, 600); - ok(hr == DD_OK, "Failed to set display mode, hr %#x.\n", hr); + ok(hr == DD_OK, "Failed to set display mode, hr %#lx.\n", hr);
change_ret = ChangeDisplaySettingsExW(second_monitor_name, &devmode, NULL, CDS_RESET, NULL); - ok(change_ret == DISP_CHANGE_SUCCESSFUL, "ChangeDisplaySettingsExW failed with %d.\n", change_ret); + ok(change_ret == DISP_CHANGE_SUCCESSFUL, "ChangeDisplaySettingsExW failed with %ld.\n", change_ret);
hr = IDirectDraw7_RestoreDisplayMode(ddraw1); - ok(hr == DD_OK, "RestoreDisplayMode failed, hr %#x.\n", hr); + ok(hr == DD_OK, "RestoreDisplayMode failed, hr %#lx.\n", hr);
ret = EnumDisplaySettingsW(second_monitor_name, ENUM_CURRENT_SETTINGS, &devmode2); - ok(ret, "EnumDisplaySettingsW failed, error %#x.\n", GetLastError()); + ok(ret, "EnumDisplaySettingsW failed, error %#lx.\n", GetLastError()); ok(compare_mode_rect(&devmode2, &old_devmode), "Got a different mode.\n"); ret = EnumDisplaySettingsW(second_monitor_name, ENUM_REGISTRY_SETTINGS, &devmode2); - ok(ret, "EnumDisplaySettingsW failed, error %#x.\n", GetLastError()); + ok(ret, "EnumDisplaySettingsW failed, error %#lx.\n", GetLastError()); ok(compare_mode_rect(&devmode2, &old_devmode), "Got a different mode.\n");
ref = IDirectDraw7_Release(ddraw1); - ok(ref == 0, "The ddraw object was not properly freed: refcount %u.\n", ref); + ok(ref == 0, "The ddraw object was not properly freed: refcount %lu.\n", ref); ret = restore_display_modes(original_modes, display_count); ok(ret, "Failed to restore display modes.\n");
@@ -4073,24 +4073,24 @@ static void test_coop_level_mode_set_multi(void) ddraw1 = create_ddraw(); ok(!!ddraw1, "Failed to create a ddraw object.\n"); hr = set_display_mode(ddraw1, 800, 600); - ok(hr == DD_OK, "Failed to set display mode, hr %#x.\n", hr); + ok(hr == DD_OK, "Failed to set display mode, hr %#lx.\n", hr);
change_ret = ChangeDisplaySettingsExW(second_monitor_name, &devmode, NULL, CDS_UPDATEREGISTRY | CDS_NORESET, NULL); - ok(change_ret == DISP_CHANGE_SUCCESSFUL, "ChangeDisplaySettingsExW failed with %d.\n", change_ret); + ok(change_ret == DISP_CHANGE_SUCCESSFUL, "ChangeDisplaySettingsExW failed with %ld.\n", change_ret);
ref = IDirectDraw7_Release(ddraw1); - ok(ref == 0, "The ddraw object was not properly freed: refcount %u.\n", ref); + ok(ref == 0, "The ddraw object was not properly freed: refcount %lu.\n", ref);
ret = EnumDisplaySettingsW(second_monitor_name, ENUM_CURRENT_SETTINGS, &devmode2); - ok(ret, "EnumDisplaySettingsW failed, error %#x.\n", GetLastError()); + ok(ret, "EnumDisplaySettingsW failed, error %#lx.\n", GetLastError()); ok(devmode2.dmPelsWidth == devmode.dmPelsWidth && devmode2.dmPelsHeight == devmode.dmPelsHeight, - "Expected resolution %ux%u, got %ux%u.\n", devmode.dmPelsWidth, devmode.dmPelsHeight, + "Expected resolution %lux%lu, got %lux%lu.\n", devmode.dmPelsWidth, devmode.dmPelsHeight, devmode2.dmPelsWidth, devmode2.dmPelsHeight); ret = EnumDisplaySettingsW(second_monitor_name, ENUM_REGISTRY_SETTINGS, &devmode2); - ok(ret, "EnumDisplaySettingsW failed, error %#x.\n", GetLastError()); + ok(ret, "EnumDisplaySettingsW failed, error %#lx.\n", GetLastError()); ok(devmode2.dmPelsWidth == devmode.dmPelsWidth && devmode2.dmPelsHeight == devmode.dmPelsHeight, - "Expected resolution %ux%u, got %ux%u.\n", devmode.dmPelsWidth, devmode.dmPelsHeight, + "Expected resolution %lux%lu, got %lux%lu.\n", devmode.dmPelsWidth, devmode.dmPelsHeight, devmode2.dmPelsWidth, devmode2.dmPelsHeight); ret = restore_display_modes(original_modes, display_count); ok(ret, "Failed to restore display modes.\n"); @@ -4102,27 +4102,27 @@ static void test_coop_level_mode_set_multi(void) ddraw2 = create_ddraw(); ok(!!ddraw2, "Failed to create a ddraw object.\n"); hr = set_display_mode(ddraw1, 800, 600); - ok(hr == DD_OK, "Failed to set display mode, hr %#x.\n", hr); + ok(hr == DD_OK, "Failed to set display mode, hr %#lx.\n", hr); hr = set_display_mode(ddraw2, 640, 480); - ok(hr == DD_OK, "Failed to set display mode, hr %#x.\n", hr); + ok(hr == DD_OK, "Failed to set display mode, hr %#lx.\n", hr);
change_ret = ChangeDisplaySettingsExW(second_monitor_name, &devmode, NULL, CDS_RESET, NULL); - ok(change_ret == DISP_CHANGE_SUCCESSFUL, "ChangeDisplaySettingsExW failed with %d.\n", change_ret); + ok(change_ret == DISP_CHANGE_SUCCESSFUL, "ChangeDisplaySettingsExW failed with %ld.\n", change_ret);
hr = IDirectDraw7_RestoreDisplayMode(ddraw2); - ok(hr == DD_OK, "RestoreDisplayMode failed, hr %#x.\n", hr); + ok(hr == DD_OK, "RestoreDisplayMode failed, hr %#lx.\n", hr);
ret = EnumDisplaySettingsW(second_monitor_name, ENUM_CURRENT_SETTINGS, &devmode2); - ok(ret, "EnumDisplaySettingsW failed, error %#x.\n", GetLastError()); + ok(ret, "EnumDisplaySettingsW failed, error %#lx.\n", GetLastError()); ok(compare_mode_rect(&devmode2, &old_devmode), "Got a different mode.\n"); ret = EnumDisplaySettingsW(second_monitor_name, ENUM_REGISTRY_SETTINGS, &devmode2); - ok(ret, "EnumDisplaySettingsW failed, error %#x.\n", GetLastError()); + ok(ret, "EnumDisplaySettingsW failed, error %#lx.\n", GetLastError()); ok(compare_mode_rect(&devmode2, &old_devmode), "Got a different mode.\n");
ref = IDirectDraw7_Release(ddraw2); - ok(ref == 0, "The ddraw object was not properly freed: refcount %u.\n", ref); + ok(ref == 0, "The ddraw object was not properly freed: refcount %lu.\n", ref); ref = IDirectDraw7_Release(ddraw1); - ok(ref == 0, "The ddraw object was not properly freed: refcount %u.\n", ref); + ok(ref == 0, "The ddraw object was not properly freed: refcount %lu.\n", ref); ret = restore_display_modes(original_modes, display_count); ok(ret, "Failed to restore display modes.\n");
@@ -4133,25 +4133,25 @@ static void test_coop_level_mode_set_multi(void) ddraw2 = create_ddraw(); ok(!!ddraw2, "Failed to create a ddraw object.\n"); hr = set_display_mode(ddraw1, 800, 600); - ok(hr == DD_OK, "Failed to set display mode, hr %#x.\n", hr); + ok(hr == DD_OK, "Failed to set display mode, hr %#lx.\n", hr); hr = set_display_mode(ddraw2, 640, 480); - ok(hr == DD_OK, "Failed to set display mode, hr %#x.\n", hr); + ok(hr == DD_OK, "Failed to set display mode, hr %#lx.\n", hr);
change_ret = ChangeDisplaySettingsExW(second_monitor_name, &devmode, NULL, CDS_RESET, NULL); - ok(change_ret == DISP_CHANGE_SUCCESSFUL, "ChangeDisplaySettingsExW failed with %d.\n", change_ret); + ok(change_ret == DISP_CHANGE_SUCCESSFUL, "ChangeDisplaySettingsExW failed with %ld.\n", change_ret);
ref = IDirectDraw7_Release(ddraw2); - ok(ref == 0, "The ddraw object was not properly freed: refcount %u.\n", ref); + ok(ref == 0, "The ddraw object was not properly freed: refcount %lu.\n", ref);
ret = EnumDisplaySettingsW(second_monitor_name, ENUM_CURRENT_SETTINGS, &devmode2); - ok(ret, "EnumDisplaySettingsW failed, error %#x.\n", GetLastError()); + ok(ret, "EnumDisplaySettingsW failed, error %#lx.\n", GetLastError()); ok(compare_mode_rect(&devmode2, &old_devmode), "Got a different mode.\n"); ret = EnumDisplaySettingsW(second_monitor_name, ENUM_REGISTRY_SETTINGS, &devmode2); - ok(ret, "EnumDisplaySettingsW failed, error %#x.\n", GetLastError()); + ok(ret, "EnumDisplaySettingsW failed, error %#lx.\n", GetLastError()); ok(compare_mode_rect(&devmode2, &old_devmode), "Got a different mode.\n");
ref = IDirectDraw7_Release(ddraw1); - ok(ref == 0, "The ddraw object was not properly freed: refcount %u.\n", ref); + ok(ref == 0, "The ddraw object was not properly freed: refcount %lu.\n", ref);
done: DestroyWindow(window); @@ -4169,16 +4169,16 @@ static void test_initialize(void) ok(!!ddraw, "Failed to create a ddraw object.\n");
hr = IDirectDraw7_Initialize(ddraw, NULL); - ok(hr == DDERR_ALREADYINITIALIZED, "Initialize returned hr %#x.\n", hr); + ok(hr == DDERR_ALREADYINITIALIZED, "Initialize returned hr %#lx.\n", hr); IDirectDraw7_Release(ddraw);
CoInitialize(NULL); hr = CoCreateInstance(&CLSID_DirectDraw, NULL, CLSCTX_INPROC_SERVER, &IID_IDirectDraw7, (void **)&ddraw); - ok(SUCCEEDED(hr), "Failed to create IDirectDraw7 instance, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create IDirectDraw7 instance, hr %#lx.\n", hr); hr = IDirectDraw7_Initialize(ddraw, NULL); - ok(hr == DD_OK, "Initialize returned hr %#x, expected DD_OK.\n", hr); + ok(hr == DD_OK, "Initialize returned hr %#lx, expected DD_OK.\n", hr); hr = IDirectDraw7_Initialize(ddraw, NULL); - ok(hr == DDERR_ALREADYINITIALIZED, "Initialize returned hr %#x, expected DDERR_ALREADYINITIALIZED.\n", hr); + ok(hr == DDERR_ALREADYINITIALIZED, "Initialize returned hr %#lx, expected DDERR_ALREADYINITIALIZED.\n", hr); IDirectDraw7_Release(ddraw); CoUninitialize(); } @@ -4199,20 +4199,20 @@ static void test_coop_level_surf_create(void) ddsd.ddsCaps.dwCaps = DDSCAPS_PRIMARYSURFACE; surface = (void *)0xdeadbeef; hr = IDirectDraw7_CreateSurface(ddraw, &ddsd, &surface, NULL); - ok(hr == DDERR_NOCOOPERATIVELEVELSET, "Surface creation returned hr %#x.\n", hr); + ok(hr == DDERR_NOCOOPERATIVELEVELSET, "Surface creation returned hr %#lx.\n", hr); ok(surface == (void *)0xdeadbeef, "Got unexpected surface %p.\n", surface);
surface = (void *)0xdeadbeef; hr = IDirectDraw7_CreateSurface(ddraw, NULL, &surface, NULL); - ok(hr == DDERR_NOCOOPERATIVELEVELSET, "Surface creation returned hr %#x.\n", hr); + ok(hr == DDERR_NOCOOPERATIVELEVELSET, "Surface creation returned hr %#lx.\n", hr); ok(surface == (void *)0xdeadbeef, "Got unexpected surface %p.\n", surface);
hr = IDirectDraw7_SetCooperativeLevel(ddraw, NULL, DDSCL_NORMAL); - ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#lx.\n", hr);
surface = (void *)0xdeadbeef; hr = IDirectDraw7_CreateSurface(ddraw, NULL, &surface, NULL); - ok(hr == DDERR_INVALIDPARAMS, "Unexpected hr %#x.\n", hr); + ok(hr == DDERR_INVALIDPARAMS, "Unexpected hr %#lx.\n", hr); ok(surface == (void *)0xdeadbeef, "Got unexpected surface %p.\n", surface);
IDirectDraw7_Release(ddraw); @@ -4247,7 +4247,7 @@ static void test_vb_discard(void) }
hr = IDirect3DDevice7_GetDirect3D(device, &d3d); - ok(SUCCEEDED(hr), "Failed to get d3d interface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get d3d interface, hr %#lx.\n", hr);
memset(&desc, 0, sizeof(desc)); desc.dwSize = sizeof(desc); @@ -4255,29 +4255,29 @@ static void test_vb_discard(void) desc.dwFVF = D3DFVF_XYZRHW; desc.dwNumVertices = vbsize; hr = IDirect3D7_CreateVertexBuffer(d3d, &desc, &buffer, 0); - ok(SUCCEEDED(hr), "Failed to create vertex buffer, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create vertex buffer, hr %#lx.\n", hr);
hr = IDirect3DVertexBuffer7_Lock(buffer, DDLOCK_DISCARDCONTENTS, (void **)&data, NULL); - ok(SUCCEEDED(hr), "Failed to lock vertex buffer, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to lock vertex buffer, hr %#lx.\n", hr); memcpy(data, quad, sizeof(quad)); hr = IDirect3DVertexBuffer7_Unlock(buffer); - ok(SUCCEEDED(hr), "Failed to unlock vertex buffer, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to unlock vertex buffer, hr %#lx.\n", hr);
hr = IDirect3DDevice7_BeginScene(device); - ok(SUCCEEDED(hr), "Failed to begin scene, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to begin scene, hr %#lx.\n", hr); hr = IDirect3DDevice7_DrawPrimitiveVB(device, D3DPT_TRIANGLESTRIP, buffer, 0, 4, 0); - ok(SUCCEEDED(hr), "Failed to draw, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to draw, hr %#lx.\n", hr); hr = IDirect3DDevice7_EndScene(device); - ok(SUCCEEDED(hr), "Failed to end scene, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to end scene, hr %#lx.\n", hr);
hr = IDirect3DVertexBuffer7_Lock(buffer, DDLOCK_DISCARDCONTENTS, (void **)&data, NULL); - ok(SUCCEEDED(hr), "Failed to lock vertex buffer, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to lock vertex buffer, hr %#lx.\n", hr); memset(data, 0xaa, sizeof(struct vec4) * vbsize); hr = IDirect3DVertexBuffer7_Unlock(buffer); - ok(SUCCEEDED(hr), "Failed to unlock vertex buffer, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to unlock vertex buffer, hr %#lx.\n", hr);
hr = IDirect3DVertexBuffer7_Lock(buffer, DDLOCK_DISCARDCONTENTS, (void **)&data, NULL); - ok(SUCCEEDED(hr), "Failed to lock vertex buffer, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to lock vertex buffer, hr %#lx.\n", hr); for (i = 0; i < sizeof(struct vec4) * vbsize; i++) { if (data[i] != 0xaa) @@ -4287,7 +4287,7 @@ static void test_vb_discard(void) } } hr = IDirect3DVertexBuffer7_Unlock(buffer); - ok(SUCCEEDED(hr), "Failed to unlock vertex buffer, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to unlock vertex buffer, hr %#lx.\n", hr);
IDirect3DVertexBuffer7_Release(buffer); IDirect3D7_Release(d3d); @@ -4307,9 +4307,9 @@ static void test_coop_level_multi_window(void) ok(!!ddraw, "Failed to create a ddraw object.\n");
hr = IDirectDraw7_SetCooperativeLevel(ddraw, window1, DDSCL_NORMAL); - ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#lx.\n", hr); hr = IDirectDraw7_SetCooperativeLevel(ddraw, window2, DDSCL_NORMAL); - ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#lx.\n", hr); ok(IsWindow(window1), "Window 1 was destroyed.\n"); ok(IsWindow(window2), "Window 2 was destroyed.\n");
@@ -4352,14 +4352,14 @@ static void test_draw_strided(void) }
hr = IDirect3DDevice7_GetRenderTarget(device, &rt); - ok(SUCCEEDED(hr), "Failed to get render target, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get render target, hr %#lx.\n", hr);
hr = IDirect3DDevice7_SetRenderState(device, D3DRENDERSTATE_LIGHTING, FALSE); - ok(SUCCEEDED(hr), "Failed to disable lighting, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to disable lighting, hr %#lx.\n", hr); hr = IDirect3DDevice7_Clear(device, 0, NULL, D3DCLEAR_TARGET, 0x00000000, 1.0f, 0); - ok(SUCCEEDED(hr), "Failed to clear render target, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to clear render target, hr %#lx.\n", hr); hr = IDirect3DDevice7_BeginScene(device); - ok(SUCCEEDED(hr), "Failed to begin scene, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to begin scene, hr %#lx.\n", hr);
memset(&strided, 0x55, sizeof(strided)); strided.position.lpvData = position; @@ -4368,13 +4368,13 @@ static void test_draw_strided(void) strided.diffuse.dwStride = sizeof(*diffuse); hr = IDirect3DDevice7_DrawIndexedPrimitiveStrided(device, D3DPT_TRIANGLELIST, D3DFVF_XYZ | D3DFVF_DIFFUSE, &strided, 4, indices, 6, 0); - ok(SUCCEEDED(hr), "Failed to draw, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to draw, hr %#lx.\n", hr);
hr = IDirect3DDevice7_EndScene(device); - ok(SUCCEEDED(hr), "Failed to end scene, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to end scene, hr %#lx.\n", hr);
color = get_surface_color(rt, 320, 240); - ok(compare_color(color, 0x0000ff00, 1), "Got unexpected color 0x%08x.\n", color); + ok(compare_color(color, 0x0000ff00, 1), "Got unexpected color 0x%08lx.\n", color);
IDirectDrawSurface7_Release(rt); IDirect3DDevice7_Release(device); @@ -4520,190 +4520,190 @@ static void test_lighting(void) return; } hr = IDirect3DDevice7_GetDirect3D(device, &d3d); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirect3D7_QueryInterface(d3d, &IID_IDirectDraw7, (void **)&ddraw); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
is_warp = ddraw_is_warp(ddraw);
hr = IDirect3DDevice7_GetRenderTarget(device, &rt); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
hr = IDirect3DDevice7_Clear(device, 0, NULL, D3DCLEAR_TARGET, 0xffffffff, 0.0, 0); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
hr = IDirect3DDevice7_SetTransform(device, D3DTRANSFORMSTATE_WORLD, &mat); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirect3DDevice7_SetTransform(device, D3DTRANSFORMSTATE_VIEW, &mat); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirect3DDevice7_SetTransform(device, D3DTRANSFORMSTATE_PROJECTION, &mat); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirect3DDevice7_SetRenderState(device, D3DRENDERSTATE_CLIPPING, FALSE); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirect3DDevice7_SetRenderState(device, D3DRENDERSTATE_ZENABLE, FALSE); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirect3DDevice7_SetRenderState(device, D3DRENDERSTATE_FOGENABLE, FALSE); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirect3DDevice7_SetRenderState(device, D3DRENDERSTATE_STENCILENABLE, FALSE); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirect3DDevice7_SetRenderState(device, D3DRENDERSTATE_CULLMODE, D3DCULL_NONE); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
hr = IDirect3DDevice7_BeginScene(device); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
memset(&vb_desc, 0, sizeof(vb_desc)); vb_desc.dwSize = sizeof(vb_desc); vb_desc.dwFVF = fvf; vb_desc.dwNumVertices = 2; hr = IDirect3D7_CreateVertexBuffer(d3d, &vb_desc, &src_vb1, 0); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); vb_desc.dwSize = sizeof(vb_desc); vb_desc.dwFVF = nfvf; vb_desc.dwNumVertices = 2; hr = IDirect3D7_CreateVertexBuffer(d3d, &vb_desc, &src_vb2, 0); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
memset(&vb_desc, 0, sizeof(vb_desc)); vb_desc.dwSize = sizeof(vb_desc); vb_desc.dwFVF = D3DFVF_XYZRHW | D3DFVF_DIFFUSE | D3DFVF_SPECULAR; vb_desc.dwNumVertices = 4; hr = IDirect3D7_CreateVertexBuffer(d3d, &vb_desc, &dst_vb, 0); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
hr = IDirect3DVertexBuffer7_Lock(src_vb1, 0, (void **)&src_data1, NULL); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); memcpy(src_data1, unlitquad, sizeof(*src_data1)); memcpy(&src_data1[1], litquad, sizeof(*src_data1)); hr = IDirect3DVertexBuffer7_Unlock(src_vb1); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
hr = IDirect3DVertexBuffer7_Lock(src_vb2, 0, (void **)&src_data2, NULL); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); memcpy(src_data2, unlitnquad, sizeof(*src_data2)); memcpy(&src_data2[1], litnquad, sizeof(*src_data2)); hr = IDirect3DVertexBuffer7_Unlock(src_vb2); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
/* No lights are defined... That means, lit vertices should be entirely black. */ hr = IDirect3DDevice7_SetRenderState(device, D3DRENDERSTATE_LIGHTING, FALSE); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirect3DVertexBuffer7_ProcessVertices(dst_vb, D3DVOP_TRANSFORM, 0, 1, src_vb1, 0, device, 0); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirect3DDevice7_DrawIndexedPrimitive(device, D3DPT_TRIANGLELIST, fvf, unlitquad, 4, indices, 6, 0); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
hr = IDirect3DDevice7_SetRenderState(device, D3DRENDERSTATE_LIGHTING, TRUE); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirect3DVertexBuffer7_ProcessVertices(dst_vb, D3DVOP_TRANSFORM | D3DVOP_LIGHT, 1, 1, src_vb1, 1, device, 0); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirect3DDevice7_DrawIndexedPrimitive(device, D3DPT_TRIANGLELIST, fvf, litquad, 4, indices, 6, 0); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
hr = IDirect3DDevice7_SetRenderState(device, D3DRENDERSTATE_LIGHTING, FALSE); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirect3DVertexBuffer7_ProcessVertices(dst_vb, D3DVOP_TRANSFORM, 2, 1, src_vb2, 0, device, 0); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirect3DDevice7_DrawIndexedPrimitive(device, D3DPT_TRIANGLELIST, nfvf, unlitnquad, 4, indices, 6, 0); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
hr = IDirect3DDevice7_SetRenderState(device, D3DRENDERSTATE_LIGHTING, TRUE); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirect3DVertexBuffer7_ProcessVertices(dst_vb, D3DVOP_TRANSFORM | D3DVOP_LIGHT, 3, 1, src_vb2, 1, device, 0); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirect3DDevice7_DrawIndexedPrimitive(device, D3DPT_TRIANGLELIST, nfvf, litnquad, 4, indices, 6, 0); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
hr = IDirect3DDevice7_EndScene(device); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
hr = IDirect3DVertexBuffer7_Lock(dst_vb, 0, (void **)&dst_data, NULL); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
color = get_surface_color(rt, 160, 360); - ok(color == 0x00ff0000, "Unlit quad without normals has color 0x%08x, expected 0x00ff0000.\n", color); + ok(color == 0x00ff0000, "Unlit quad without normals has color 0x%08lx, expected 0x00ff0000.\n", color); ok(dst_data[0].diffuse == 0xffff0000, - "Unlit quad without normals has color 0x%08x, expected 0xffff0000.\n", dst_data[0].diffuse); + "Unlit quad without normals has color 0x%08lx, expected 0xffff0000.\n", dst_data[0].diffuse); ok(!dst_data[0].specular, - "Unexpected specular color 0x%08x.\n", dst_data[0].specular); + "Unexpected specular color 0x%08lx.\n", dst_data[0].specular); color = get_surface_color(rt, 160, 120); /* Broken on some of WARP drivers. */ ok(color == 0x00000000 || broken(is_warp && (color == 0x000000ff || color == 0x00ff00ff)), - "Lit quad without normals has color 0x%08x, expected 0x00000000.\n", color); + "Lit quad without normals has color 0x%08lx, expected 0x00000000.\n", color); ok(dst_data[1].diffuse == 0xff000000, - "Lit quad without normals has color 0x%08x, expected 0xff000000.\n", dst_data[1].diffuse); + "Lit quad without normals has color 0x%08lx, expected 0xff000000.\n", dst_data[1].diffuse); ok(!dst_data[1].specular, - "Unexpected specular color 0x%08x.\n", dst_data[1].specular); + "Unexpected specular color 0x%08lx.\n", dst_data[1].specular); color = get_surface_color(rt, 480, 360); - ok(color == 0x000000ff, "Unlit quad with normals has color 0x%08x, expected 0x000000ff.\n", color); + ok(color == 0x000000ff, "Unlit quad with normals has color 0x%08lx, expected 0x000000ff.\n", color); ok(dst_data[2].diffuse == 0xff0000ff, - "Unlit quad with normals has color 0x%08x, expected 0xff0000ff.\n", dst_data[2].diffuse); + "Unlit quad with normals has color 0x%08lx, expected 0xff0000ff.\n", dst_data[2].diffuse); ok(!dst_data[2].specular, - "Unexpected specular color 0x%08x.\n", dst_data[2].specular); + "Unexpected specular color 0x%08lx.\n", dst_data[2].specular); color = get_surface_color(rt, 480, 120); ok(color == 0x00000000 || broken(is_warp && (color == 0x000000ff || color == 0x00ff00ff)), - "Lit quad with normals has color 0x%08x, expected 0x00000000.\n", color); + "Lit quad with normals has color 0x%08lx, expected 0x00000000.\n", color); ok(dst_data[3].diffuse == 0xff000000, - "Lit quad with normals has color 0x%08x, expected 0xff000000.\n", dst_data[3].diffuse); + "Lit quad with normals has color 0x%08lx, expected 0xff000000.\n", dst_data[3].diffuse); ok(!dst_data[3].specular, - "Unexpected specular color 0x%08x.\n", dst_data[3].specular); + "Unexpected specular color 0x%08lx.\n", dst_data[3].specular);
hr = IDirect3DVertexBuffer7_Unlock(dst_vb); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
hr = IDirect3DDevice7_LightEnable(device, 0, TRUE); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
for (i = 0; i < ARRAY_SIZE(tests); ++i) { hr = IDirect3DVertexBuffer7_Lock(src_vb2, 0, (void **)&src_data2, NULL); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); memcpy(src_data2, tests[i].quad, sizeof(*src_data2)); hr = IDirect3DVertexBuffer7_Unlock(src_vb2); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
hr = IDirect3DDevice7_SetTransform(device, D3DTRANSFORMSTATE_WORLD, tests[i].world_matrix); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
hr = IDirect3DDevice7_Clear(device, 0, NULL, D3DCLEAR_TARGET, 0xffffffff, 0.0, 0); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
hr = IDirect3DDevice7_BeginScene(device); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
hr = IDirect3DVertexBuffer7_ProcessVertices(dst_vb, D3DVOP_TRANSFORM | D3DVOP_LIGHT, 0, 1, src_vb2, 0, device, 0); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
hr = IDirect3DDevice7_DrawIndexedPrimitive(device, D3DPT_TRIANGLELIST, nfvf, tests[i].quad, 4, indices, 6, 0); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
hr = IDirect3DDevice7_EndScene(device); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
hr = IDirect3DVertexBuffer7_Lock(dst_vb, 0, (void **)&dst_data, NULL); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
color = get_surface_color(rt, 320, 240); ok(color == tests[i].expected || broken(is_warp && (color == 0x000000ff || color == 0x00ff00ff)), - "%s has color 0x%08x.\n", tests[i].message, color); + "%s has color 0x%08lx.\n", tests[i].message, color); todo_wine_if(tests[i].process_vertices_todo) ok(dst_data[0].diffuse == tests[i].expected_process_vertices, - "%s has color 0x%08x.\n", tests[i].message, dst_data[0].diffuse); + "%s has color 0x%08lx.\n", tests[i].message, dst_data[0].diffuse); ok(!dst_data[0].specular, - "%s has specular color 0x%08x.\n", tests[i].message, dst_data[0].specular); + "%s has specular color 0x%08lx.\n", tests[i].message, dst_data[0].specular);
hr = IDirect3DVertexBuffer7_Unlock(dst_vb); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); }
IDirect3DVertexBuffer7_Release(src_vb1); @@ -4715,7 +4715,7 @@ static void test_lighting(void) IDirectDraw7_Release(ddraw); IDirect3D7_Release(d3d); refcount = IDirect3DDevice7_Release(device); - ok(!refcount, "Device has %u references left.\n", refcount); + ok(!refcount, "Device has %lu references left.\n", refcount); DestroyWindow(window); }
@@ -5022,7 +5022,7 @@ static void test_specular_lighting(void) return; } hr = IDirect3DDevice7_GetDirect3D(device, &d3d); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
quad = heap_alloc(vertices_side * vertices_side * sizeof(*quad)); indices = heap_alloc(indices_count * sizeof(*indices)); @@ -5052,52 +5052,52 @@ static void test_specular_lighting(void) }
hr = IDirect3DDevice7_GetRenderTarget(device, &rt); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
hr = IDirect3DDevice7_SetTransform(device, D3DTRANSFORMSTATE_WORLD, &mat); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirect3DDevice7_SetTransform(device, D3DTRANSFORMSTATE_VIEW, &mat); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirect3DDevice7_SetTransform(device, D3DTRANSFORMSTATE_PROJECTION, &mat); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirect3DDevice7_SetRenderState(device, D3DRENDERSTATE_CLIPPING, FALSE); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirect3DDevice7_SetRenderState(device, D3DRENDERSTATE_ZENABLE, FALSE); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirect3DDevice7_SetRenderState(device, D3DRENDERSTATE_FOGENABLE, FALSE); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
hr = IDirect3DDevice7_LightEnable(device, 0, TRUE); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirect3DDevice7_SetRenderState(device, D3DRENDERSTATE_SPECULARENABLE, TRUE); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
memset(&vb_desc, 0, sizeof(vb_desc)); vb_desc.dwSize = sizeof(vb_desc); vb_desc.dwFVF = fvf; vb_desc.dwNumVertices = ARRAY_SIZE(vertices); hr = IDirect3D7_CreateVertexBuffer(d3d, &vb_desc, &src_vb, 0); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirect3DVertexBuffer7_Lock(src_vb, 0, (void **)&src_data, NULL); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); memcpy(src_data, vertices, sizeof(vertices)); hr = IDirect3DVertexBuffer7_Unlock(src_vb); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
memset(&vb_desc, 0, sizeof(vb_desc)); vb_desc.dwSize = sizeof(vb_desc); vb_desc.dwFVF = D3DFVF_XYZRHW | D3DFVF_DIFFUSE | D3DFVF_SPECULAR; vb_desc.dwNumVertices = ARRAY_SIZE(vertices); hr = IDirect3D7_CreateVertexBuffer(d3d, &vb_desc, &dst_vb, 0); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
for (i = 0; i < ARRAY_SIZE(tests); ++i) { hr = IDirect3DDevice7_SetLight(device, 0, tests[i].light); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
hr = IDirect3DDevice7_SetRenderState(device, D3DRENDERSTATE_LOCALVIEWER, tests[i].local_viewer); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
memset(&material, 0, sizeof(material)); U1(U2(material).specular).r = 1.0f; @@ -5106,52 +5106,52 @@ static void test_specular_lighting(void) U4(U2(material).specular).a = 0.5f; U4(material).power = tests[i].specular_power; hr = IDirect3DDevice7_SetMaterial(device, &material); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
hr = IDirect3DDevice7_Clear(device, 0, NULL, D3DCLEAR_TARGET, 0xffffffff, 0.0, 0); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
hr = IDirect3DDevice7_BeginScene(device); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
hr = IDirect3DVertexBuffer7_Lock(dst_vb, 0, (void **)&dst_data, NULL); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); memset(dst_data, 0, sizeof(*dst_data) * ARRAY_SIZE(vertices)); hr = IDirect3DVertexBuffer7_Unlock(dst_vb); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
hr = IDirect3DVertexBuffer7_ProcessVertices(dst_vb, D3DVOP_TRANSFORM | D3DVOP_LIGHT, 0, ARRAY_SIZE(vertices), src_vb, 0, device, 0); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
hr = IDirect3DDevice7_DrawIndexedPrimitive(device, D3DPT_TRIANGLELIST, fvf, quad, vertices_side * vertices_side, indices, indices_count, 0); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
hr = IDirect3DDevice7_EndScene(device); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
hr = IDirect3DVertexBuffer7_Lock(dst_vb, 0, (void **)&dst_data, NULL); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
ok(tests[i].expected_count == ARRAY_SIZE(vertices), "Array size mismatch.\n"); for (j = 0; j < tests[i].expected_count; ++j) { color = get_surface_color(rt, tests[i].expected[j].x, tests[i].expected[j].y); ok(compare_color(color, tests[i].expected[j].color, 1), - "Expected color 0x%08x at location (%u, %u), got 0x%08x, case %u.\n", + "Expected color 0x%08lx at location (%u, %u), got 0x%08lx, case %u.\n", tests[i].expected[j].color, tests[i].expected[j].x, tests[i].expected[j].y, color, i); - ok(!dst_data[j].diffuse, "Expected color 0x00000000 for vertex %u, got 0x%08x, case %u.\n", + ok(!dst_data[j].diffuse, "Expected color 0x00000000 for vertex %u, got 0x%08lx, case %u.\n", j, dst_data[j].diffuse, i); expected_color = tests[i].expected_process_vertices[j].color | 0x80000000; todo_wine_if(tests[i].todo_process_vertices && dst_data[j].specular != expected_color) ok(compare_color(dst_data[j].specular, expected_color, 1), - "Expected color 0x%08x for vertex %u, got 0x%08x, case %u.\n", + "Expected color 0x%08lx for vertex %u, got 0x%08lx, case %u.\n", expected_color, j, dst_data[j].specular, i); } hr = IDirect3DVertexBuffer7_Unlock(dst_vb); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); }
IDirect3DVertexBuffer7_Release(dst_vb); @@ -5160,7 +5160,7 @@ static void test_specular_lighting(void)
IDirect3D7_Release(d3d); refcount = IDirect3DDevice7_Release(device); - ok(!refcount, "Device has %u references left.\n", refcount); + ok(!refcount, "Device has %lu references left.\n", refcount); DestroyWindow(window); heap_free(indices); heap_free(quad); @@ -5184,25 +5184,25 @@ static void test_clear_rect_count(void) }
hr = IDirect3DDevice7_GetRenderTarget(device, &rt); - ok(SUCCEEDED(hr), "Failed to get render target, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get render target, hr %#lx.\n", hr);
hr = IDirect3DDevice7_Clear(device, 0, NULL, D3DCLEAR_TARGET, 0x00ffffff, 1.0f, 0); - ok(SUCCEEDED(hr), "Failed to clear render target, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to clear render target, hr %#lx.\n", hr); hr = IDirect3DDevice7_Clear(device, 0, &rect, D3DCLEAR_TARGET, 0x00ff0000, 1.0f, 0); - ok(SUCCEEDED(hr), "Failed to clear render target, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to clear render target, hr %#lx.\n", hr);
color = get_surface_color(rt, 320, 240); ok(compare_color(color, 0x00ffffff, 1) || broken(compare_color(color, 0x00ff0000, 1)), - "Clear with count = 0, rect != NULL has color %#08x.\n", color); + "Clear with count = 0, rect != NULL has color %#08lx.\n", color);
hr = IDirect3DDevice7_Clear(device, 0, NULL, D3DCLEAR_TARGET, 0x00ffffff, 1.0f, 0); - ok(SUCCEEDED(hr), "Failed to clear render target, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to clear render target, hr %#lx.\n", hr); hr = IDirect3DDevice7_Clear(device, 1, NULL, D3DCLEAR_TARGET, 0x0000ff00, 1.0f, 0); - ok(SUCCEEDED(hr), "Failed to clear render target, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to clear render target, hr %#lx.\n", hr);
color = get_surface_color(rt, 320, 240); ok(compare_color(color, 0x0000ff00, 1), - "Clear with count = 1, rect = NULL has color %#08x.\n", color); + "Clear with count = 1, rect = NULL has color %#08lx.\n", color);
IDirectDrawSurface7_Release(rt); IDirect3DDevice7_Release(device); @@ -5217,21 +5217,21 @@ static BOOL test_mode_restored(IDirectDraw7 *ddraw, HWND window) memset(&ddsd1, 0, sizeof(ddsd1)); ddsd1.dwSize = sizeof(ddsd1); hr = IDirectDraw7_GetDisplayMode(ddraw, &ddsd1); - ok(SUCCEEDED(hr), "GetDisplayMode failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "GetDisplayMode failed, hr %#lx.\n", hr);
hr = IDirectDraw7_SetCooperativeLevel(ddraw, window, DDSCL_EXCLUSIVE | DDSCL_FULLSCREEN); - ok(SUCCEEDED(hr), "SetCooperativeLevel failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "SetCooperativeLevel failed, hr %#lx.\n", hr); hr = set_display_mode(ddraw, 640, 480); - ok(SUCCEEDED(hr), "Failed to set display mode, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set display mode, hr %#lx.\n", hr); hr = IDirectDraw7_SetCooperativeLevel(ddraw, window, DDSCL_NORMAL); - ok(SUCCEEDED(hr), "SetCooperativeLevel failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "SetCooperativeLevel failed, hr %#lx.\n", hr);
memset(&ddsd2, 0, sizeof(ddsd2)); ddsd2.dwSize = sizeof(ddsd2); hr = IDirectDraw7_GetDisplayMode(ddraw, &ddsd2); - ok(SUCCEEDED(hr), "GetDisplayMode failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "GetDisplayMode failed, hr %#lx.\n", hr); hr = IDirectDraw7_RestoreDisplayMode(ddraw); - ok(SUCCEEDED(hr), "RestoreDisplayMode failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "RestoreDisplayMode failed, hr %#lx.\n", hr);
return ddsd1.dwWidth == ddsd2.dwWidth && ddsd1.dwHeight == ddsd2.dwHeight; } @@ -5255,16 +5255,16 @@ static void test_coop_level_versions(void)
/* A failing ddraw1::SetCooperativeLevel call does not have an effect */ hr = IDirectDraw7_QueryInterface(ddraw7, &IID_IDirectDraw, (void **)&ddraw); - ok(SUCCEEDED(hr), "QueryInterface failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "QueryInterface failed, hr %#lx.\n", hr);
hr = IDirectDraw_SetCooperativeLevel(ddraw, NULL, DDSCL_FULLSCREEN | DDSCL_EXCLUSIVE); - ok(FAILED(hr), "SetCooperativeLevel returned %#x, expected failure.\n", hr); + ok(FAILED(hr), "SetCooperativeLevel returned %#lx, expected failure.\n", hr); restored = test_mode_restored(ddraw7, window); ok(restored, "Display mode not restored after bad ddraw1::SetCooperativeLevel call\n");
/* A successful one does */ hr = IDirectDraw_SetCooperativeLevel(ddraw, NULL, DDSCL_NORMAL); - ok(SUCCEEDED(hr), "SetCooperativeLevel failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "SetCooperativeLevel failed, hr %#lx.\n", hr); restored = test_mode_restored(ddraw7, window); ok(!restored, "Display mode restored after good ddraw1::SetCooperativeLevel call\n");
@@ -5274,10 +5274,10 @@ static void test_coop_level_versions(void) ddraw7 = create_ddraw(); ok(!!ddraw7, "Failed to create a ddraw object.\n"); hr = IDirectDraw7_QueryInterface(ddraw7, &IID_IDirectDraw, (void **)&ddraw); - ok(SUCCEEDED(hr), "QueryInterface failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "QueryInterface failed, hr %#lx.\n", hr);
hr = IDirectDraw_SetCooperativeLevel(ddraw, window, DDSCL_SETFOCUSWINDOW); - ok(SUCCEEDED(hr), "SetCooperativeLevel failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "SetCooperativeLevel failed, hr %#lx.\n", hr); restored = test_mode_restored(ddraw7, window); ok(!restored, "Display mode restored after ddraw1::SetCooperativeLevel(SETFOCUSWINDOW) call\n");
@@ -5288,12 +5288,12 @@ static void test_coop_level_versions(void) ddraw7 = create_ddraw(); ok(!!ddraw7, "Failed to create a ddraw object.\n"); hr = IDirectDraw7_QueryInterface(ddraw7, &IID_IDirectDraw, (void **)&ddraw); - ok(SUCCEEDED(hr), "QueryInterface failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "QueryInterface failed, hr %#lx.\n", hr);
hr = IDirectDraw_SetCooperativeLevel(ddraw, NULL, DDSCL_NORMAL); - ok(SUCCEEDED(hr), "SetCooperativeLevel failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "SetCooperativeLevel failed, hr %#lx.\n", hr); hr = IDirectDraw_SetCooperativeLevel(ddraw, NULL, DDSCL_FULLSCREEN | DDSCL_EXCLUSIVE); - ok(FAILED(hr), "SetCooperativeLevel returned %#x, expected failure.\n", hr); + ok(FAILED(hr), "SetCooperativeLevel returned %#lx, expected failure.\n", hr); restored = test_mode_restored(ddraw7, window); ok(!restored, "Display mode restored after good-bad ddraw1::SetCooperativeLevel() call sequence\n");
@@ -5304,14 +5304,14 @@ static void test_coop_level_versions(void) ddraw7 = create_ddraw(); ok(!!ddraw7, "Failed to create a ddraw object.\n"); hr = IDirectDraw7_QueryInterface(ddraw7, &IID_IDirectDraw, (void **)&ddraw); - ok(SUCCEEDED(hr), "QueryInterface failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "QueryInterface failed, hr %#lx.\n", hr);
hr = IDirectDraw_SetCooperativeLevel(ddraw, NULL, DDSCL_NORMAL); - ok(SUCCEEDED(hr), "SetCooperativeLevel failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "SetCooperativeLevel failed, hr %#lx.\n", hr); hr = IDirectDraw7_SetCooperativeLevel(ddraw7, window, DDSCL_FULLSCREEN | DDSCL_EXCLUSIVE); - ok(SUCCEEDED(hr), "SetCooperativeLevel failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "SetCooperativeLevel failed, hr %#lx.\n", hr); hr = IDirectDraw7_SetCooperativeLevel(ddraw7, window, DDSCL_NORMAL); - ok(SUCCEEDED(hr), "SetCooperativeLevel failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "SetCooperativeLevel failed, hr %#lx.\n", hr);
restored = test_mode_restored(ddraw7, window); ok(!restored, "Display mode restored after ddraw1-ddraw7 SetCooperativeLevel() call sequence\n"); @@ -5322,10 +5322,10 @@ static void test_coop_level_versions(void) ddraw7 = create_ddraw(); ok(!!ddraw7, "Failed to create a ddraw object.\n"); hr = IDirectDraw7_QueryInterface(ddraw7, &IID_IDirectDraw, (void **)&ddraw); - ok(SUCCEEDED(hr), "QueryInterface failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "QueryInterface failed, hr %#lx.\n", hr);
hr = IDirectDraw7_SetCooperativeLevel(ddraw7, window, DDSCL_NORMAL); - ok(SUCCEEDED(hr), "SetCooperativeLevel failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "SetCooperativeLevel failed, hr %#lx.\n", hr);
memset(&ddsd, 0, sizeof(ddsd)); ddsd.dwSize = sizeof(ddsd); @@ -5333,7 +5333,7 @@ static void test_coop_level_versions(void) ddsd.ddsCaps.dwCaps = DDSCAPS_OFFSCREENPLAIN; ddsd.dwWidth = ddsd.dwHeight = 8; hr = IDirectDraw_CreateSurface(ddraw, &ddsd, &surface, NULL); - ok(SUCCEEDED(hr), "CreateSurface failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "CreateSurface failed, hr %#lx.\n", hr); IDirectDrawSurface_Release(surface); restored = test_mode_restored(ddraw7, window); ok(restored, "Display mode not restored after ddraw1::CreateSurface() call\n"); @@ -5388,50 +5388,50 @@ static void test_fog_special(void) }
hr = IDirect3DDevice7_GetRenderTarget(device, &rt); - ok(SUCCEEDED(hr), "Failed to get render target, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get render target, hr %#lx.\n", hr);
hr = IDirect3DDevice7_SetRenderState(device, D3DRENDERSTATE_FOGENABLE, TRUE); - ok(SUCCEEDED(hr), "Failed to enable fog, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to enable fog, hr %#lx.\n", hr); hr = IDirect3DDevice7_SetRenderState(device, D3DRENDERSTATE_FOGCOLOR, 0xffff0000); - ok(SUCCEEDED(hr), "Failed to set fog color, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set fog color, hr %#lx.\n", hr); hr = IDirect3DDevice7_SetRenderState(device, D3DRENDERSTATE_LIGHTING, FALSE); - ok(SUCCEEDED(hr), "Failed to disable lighting, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to disable lighting, hr %#lx.\n", hr); hr = IDirect3DDevice7_SetRenderState(device, D3DRENDERSTATE_ZENABLE, D3DZB_FALSE); - ok(SUCCEEDED(hr), "Failed to disable lighting, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to disable lighting, hr %#lx.\n", hr);
conv.f = 0.5f; hr = IDirect3DDevice7_SetRenderState(device, D3DRENDERSTATE_FOGSTART, conv.d); - ok(SUCCEEDED(hr), "Failed to set fog start, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set fog start, hr %#lx.\n", hr); hr = IDirect3DDevice7_SetRenderState(device, D3DRENDERSTATE_FOGEND, conv.d); - ok(SUCCEEDED(hr), "Failed to set fog end, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set fog end, hr %#lx.\n", hr);
for (i = 0; i < ARRAY_SIZE(tests); ++i) { hr = IDirect3DDevice7_Clear(device, 0, NULL, D3DCLEAR_TARGET, 0x000000ff, 1.0f, 0); - ok(SUCCEEDED(hr), "Failed to clear render target, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to clear render target, hr %#lx.\n", hr);
hr = IDirect3DDevice7_SetRenderState(device, D3DRENDERSTATE_FOGVERTEXMODE, tests[i].vertexmode); - ok(SUCCEEDED(hr), "Failed to set fogvertexmode, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set fogvertexmode, hr %#lx.\n", hr); hr = IDirect3DDevice7_SetRenderState(device, D3DRENDERSTATE_FOGTABLEMODE, tests[i].tablemode); - ok(SUCCEEDED(hr), "Failed to set fogtablemode, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set fogtablemode, hr %#lx.\n", hr);
hr = IDirect3DDevice7_BeginScene(device); - ok(SUCCEEDED(hr), "Failed to begin scene, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to begin scene, hr %#lx.\n", hr); hr = IDirect3DDevice7_DrawPrimitive(device, D3DPT_TRIANGLESTRIP, D3DFVF_XYZ | D3DFVF_DIFFUSE, quad, 4, 0); - ok(SUCCEEDED(hr), "Failed to draw, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to draw, hr %#lx.\n", hr); hr = IDirect3DDevice7_EndScene(device); - ok(SUCCEEDED(hr), "Failed to end scene, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to end scene, hr %#lx.\n", hr);
color = get_surface_color(rt, 310, 240); ok(compare_color(color, tests[i].color_left, 1), - "Expected left color 0x%08x, got 0x%08x, case %u.\n", tests[i].color_left, color, i); + "Expected left color 0x%08lx, got 0x%08lx, case %u.\n", tests[i].color_left, color, i); color = get_surface_color(rt, 330, 240); ok(compare_color(color, tests[i].color_right, 1), - "Expected right color 0x%08x, got 0x%08x, case %u.\n", tests[i].color_right, color, i); + "Expected right color 0x%08lx, got 0x%08lx, case %u.\n", tests[i].color_right, color, i); }
hr = IDirect3DDevice7_SetRenderState(device, D3DRENDERSTATE_FOGENABLE, FALSE); - ok(SUCCEEDED(hr), "Failed to disable fog, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to disable fog, hr %#lx.\n", hr);
IDirectDrawSurface7_Release(rt); IDirect3DDevice7_Release(device); @@ -5581,55 +5581,55 @@ static void test_lighting_interface_versions(void) }
hr = IDirect3DDevice7_GetRenderTarget(device, &rt); - ok(SUCCEEDED(hr), "Failed to get render target, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get render target, hr %#lx.\n", hr);
memset(&material, 0, sizeof(material)); U2(U3(material).emissive).g = 1.0f; hr = IDirect3DDevice7_SetMaterial(device, &material); - ok(SUCCEEDED(hr), "Failed set material, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed set material, hr %#lx.\n", hr); hr = IDirect3DDevice7_SetRenderState(device, D3DRENDERSTATE_ZENABLE, D3DZB_FALSE); - ok(SUCCEEDED(hr), "Failed to disable z test, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to disable z test, hr %#lx.\n", hr);
hr = IDirect3DDevice7_GetRenderState(device, D3DRENDERSTATE_LIGHTING, &rs); - ok(SUCCEEDED(hr), "Failed to get lighting render state, hr %#x.\n", hr); - ok(rs == TRUE, "Initial D3DRENDERSTATE_LIGHTING is %#x, expected TRUE.\n", rs); + ok(SUCCEEDED(hr), "Failed to get lighting render state, hr %#lx.\n", hr); + ok(rs == TRUE, "Initial D3DRENDERSTATE_LIGHTING is %#lx, expected TRUE.\n", rs); hr = IDirect3DDevice7_GetRenderState(device, D3DRENDERSTATE_SPECULARENABLE, &rs); - ok(SUCCEEDED(hr), "Failed to get specularenable render state, hr %#x.\n", hr); - ok(rs == FALSE, "Initial D3DRENDERSTATE_SPECULARENABLE is %#x, expected FALSE.\n", rs); + ok(SUCCEEDED(hr), "Failed to get specularenable render state, hr %#lx.\n", hr); + ok(rs == FALSE, "Initial D3DRENDERSTATE_SPECULARENABLE is %#lx, expected FALSE.\n", rs);
for (i = 0; i < ARRAY_SIZE(tests); ++i) { hr = IDirect3DDevice7_Clear(device, 0, NULL, D3DCLEAR_TARGET, 0xff202020, 0.0f, 0); - ok(SUCCEEDED(hr), "Failed to clear viewport, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to clear viewport, hr %#lx.\n", hr);
hr = IDirect3DDevice7_SetRenderState(device, D3DRENDERSTATE_LIGHTING, tests[i].d3drs_lighting); - ok(SUCCEEDED(hr), "Failed to set lighting render state, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set lighting render state, hr %#lx.\n", hr); hr = IDirect3DDevice7_SetRenderState(device, D3DRENDERSTATE_SPECULARENABLE, tests[i].d3drs_specular); - ok(SUCCEEDED(hr), "Failed to set specularenable render state, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set specularenable render state, hr %#lx.\n", hr);
hr = IDirect3DDevice7_BeginScene(device); - ok(SUCCEEDED(hr), "Failed to begin scene, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to begin scene, hr %#lx.\n", hr); hr = IDirect3DDevice7_DrawPrimitive(device, D3DPT_TRIANGLESTRIP, tests[i].vertextype, tests[i].data, 4, tests[i].draw_flags | D3DDP_WAIT); - ok(SUCCEEDED(hr), "Failed to draw, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to draw, hr %#lx.\n", hr); hr = IDirect3DDevice7_EndScene(device); - ok(SUCCEEDED(hr), "Failed to end scene, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to end scene, hr %#lx.\n", hr);
hr = IDirect3DDevice7_GetRenderState(device, D3DRENDERSTATE_LIGHTING, &rs); - ok(SUCCEEDED(hr), "Failed to get lighting render state, hr %#x.\n", hr); - ok(rs == tests[i].d3drs_lighting, "D3DRENDERSTATE_LIGHTING is %#x, expected %#x.\n", + ok(SUCCEEDED(hr), "Failed to get lighting render state, hr %#lx.\n", hr); + ok(rs == tests[i].d3drs_lighting, "D3DRENDERSTATE_LIGHTING is %#lx, expected %#lx.\n", rs, tests[i].d3drs_lighting);
color = get_surface_color(rt, 320, 240); ok(compare_color(color, tests[i].color, 1), - "Got unexpected color 0x%08x, expected 0x%08x, test %u.\n", + "Got unexpected color 0x%08lx, expected 0x%08lx, test %u.\n", color, tests[i].color, i); }
IDirectDrawSurface7_Release(rt); ref = IDirect3DDevice7_Release(device); - ok(ref == 0, "Device not properly released, refcount %u.\n", ref); + ok(ref == 0, "Device not properly released, refcount %lu.\n", ref); DestroyWindow(window); }
@@ -5651,7 +5651,7 @@ static LRESULT CALLBACK activateapp_test_proc(HWND hwnd, UINT message, WPARAM wp activateapp_testdata.received = FALSE; hr = IDirectDraw7_SetCooperativeLevel(activateapp_testdata.ddraw, activateapp_testdata.window, activateapp_testdata.coop_level); - ok(SUCCEEDED(hr), "Recursive SetCooperativeLevel call failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Recursive SetCooperativeLevel call failed, hr %#lx.\n", hr); ok(!activateapp_testdata.received, "Received WM_ACTIVATEAPP during recursive SetCooperativeLevel call.\n"); } activateapp_testdata.received = TRUE; @@ -5683,31 +5683,31 @@ static void test_coop_level_activateapp(void) SetForegroundWindow(window); activateapp_testdata.received = FALSE; hr = IDirectDraw7_SetCooperativeLevel(ddraw, window, DDSCL_EXCLUSIVE | DDSCL_FULLSCREEN); - ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#lx.\n", hr); ok(!activateapp_testdata.received, "Received WM_ACTIVATEAPP although window was already active.\n"); hr = IDirectDraw7_SetCooperativeLevel(ddraw, NULL, DDSCL_NORMAL); - ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#lx.\n", hr);
/* Exclusive with window not active. */ SetForegroundWindow(GetDesktopWindow()); activateapp_testdata.received = FALSE; hr = IDirectDraw7_SetCooperativeLevel(ddraw, window, DDSCL_EXCLUSIVE | DDSCL_FULLSCREEN); - ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#lx.\n", hr); ok(activateapp_testdata.received, "Expected WM_ACTIVATEAPP, but did not receive it.\n"); hr = IDirectDraw7_SetCooperativeLevel(ddraw, NULL, DDSCL_NORMAL); - ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#lx.\n", hr);
/* Normal with window not active, then exclusive with the same window. */ SetForegroundWindow(GetDesktopWindow()); activateapp_testdata.received = FALSE; hr = IDirectDraw7_SetCooperativeLevel(ddraw, window, DDSCL_NORMAL); - ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#lx.\n", hr); ok(!activateapp_testdata.received, "Received WM_ACTIVATEAPP when setting DDSCL_NORMAL.\n"); hr = IDirectDraw7_SetCooperativeLevel(ddraw, window, DDSCL_EXCLUSIVE | DDSCL_FULLSCREEN); - ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#lx.\n", hr); ok(activateapp_testdata.received, "Expected WM_ACTIVATEAPP, but did not receive it.\n"); hr = IDirectDraw7_SetCooperativeLevel(ddraw, NULL, DDSCL_NORMAL); - ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#lx.\n", hr);
/* Recursive set of DDSCL_EXCLUSIVE | DDSCL_FULLSCREEN. */ SetForegroundWindow(GetDesktopWindow()); @@ -5716,10 +5716,10 @@ static void test_coop_level_activateapp(void) activateapp_testdata.window = window; activateapp_testdata.coop_level = DDSCL_EXCLUSIVE | DDSCL_FULLSCREEN; hr = IDirectDraw7_SetCooperativeLevel(ddraw, window, DDSCL_EXCLUSIVE | DDSCL_FULLSCREEN); - ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#lx.\n", hr); ok(activateapp_testdata.received, "Expected WM_ACTIVATEAPP, but did not receive it.\n"); hr = IDirectDraw7_SetCooperativeLevel(ddraw, NULL, DDSCL_NORMAL); - ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#lx.\n", hr);
/* The recursive call seems to have some bad effect on native ddraw, despite (apparently) * succeeding. Another switch to exclusive and back to normal is needed to release the @@ -5727,9 +5727,9 @@ static void test_coop_level_activateapp(void) * WM_ACTIVATEAPP messages. */ activateapp_testdata.ddraw = NULL; hr = IDirectDraw7_SetCooperativeLevel(ddraw, window, DDSCL_EXCLUSIVE | DDSCL_FULLSCREEN); - ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#lx.\n", hr); hr = IDirectDraw7_SetCooperativeLevel(ddraw, NULL, DDSCL_NORMAL); - ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#lx.\n", hr);
/* Setting DDSCL_NORMAL with recursive invocation. */ SetForegroundWindow(GetDesktopWindow()); @@ -5738,7 +5738,7 @@ static void test_coop_level_activateapp(void) activateapp_testdata.window = window; activateapp_testdata.coop_level = DDSCL_NORMAL; hr = IDirectDraw7_SetCooperativeLevel(ddraw, window, DDSCL_EXCLUSIVE | DDSCL_FULLSCREEN); - ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#lx.\n", hr); ok(activateapp_testdata.received, "Expected WM_ACTIVATEAPP, but did not receive it.\n");
/* DDraw is in exclusive mode now. */ @@ -5748,15 +5748,15 @@ static void test_coop_level_activateapp(void) U5(ddsd).dwBackBufferCount = 1; ddsd.ddsCaps.dwCaps = DDSCAPS_PRIMARYSURFACE | DDSCAPS_COMPLEX | DDSCAPS_FLIP; hr = IDirectDraw7_CreateSurface(ddraw, &ddsd, &surface, NULL); - ok(SUCCEEDED(hr), "Failed to create surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create surface, hr %#lx.\n", hr); IDirectDrawSurface7_Release(surface);
/* Recover again, just to be sure. */ activateapp_testdata.ddraw = NULL; hr = IDirectDraw7_SetCooperativeLevel(ddraw, window, DDSCL_EXCLUSIVE | DDSCL_FULLSCREEN); - ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#lx.\n", hr); hr = IDirectDraw7_SetCooperativeLevel(ddraw, NULL, DDSCL_NORMAL); - ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#lx.\n", hr);
DestroyWindow(window); UnregisterClassA("ddraw_test_wndproc_wc", GetModuleHandleA(NULL)); @@ -5818,14 +5818,14 @@ static void test_texturemanage(void) ddraw = create_ddraw(); ok(!!ddraw, "Failed to create a ddraw object.\n"); hr = IDirectDraw7_SetCooperativeLevel(ddraw, NULL, DDSCL_NORMAL); - ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#lx.\n", hr);
memset(&hal_caps, 0, sizeof(hal_caps)); hal_caps.dwSize = sizeof(hal_caps); memset(&hel_caps, 0, sizeof(hel_caps)); hel_caps.dwSize = sizeof(hel_caps); hr = IDirectDraw7_GetCaps(ddraw, &hal_caps, &hel_caps); - ok(SUCCEEDED(hr), "Failed to get caps, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get caps, hr %#lx.\n", hr); if ((hal_caps.ddsCaps.dwCaps & needed_caps) != needed_caps) { skip("Managed textures not supported, skipping managed texture test.\n"); @@ -5845,22 +5845,22 @@ static void test_texturemanage(void)
hr = IDirectDraw7_CreateSurface(ddraw, &ddsd, &surface, NULL); if (tests[i].hr == DD_OK && is_ddraw64 && (tests[i].caps_in & DDSCAPS_TEXTURE)) - todo_wine ok(hr == E_NOINTERFACE, "Test %u: Got unexpected hr %#x.\n", i, hr); + todo_wine ok(hr == E_NOINTERFACE, "Test %u: Got unexpected hr %#lx.\n", i, hr); else - ok(hr == tests[i].hr, "Test %u: Got unexpected hr %#x, expected %#x.\n", i, hr, tests[i].hr); + ok(hr == tests[i].hr, "Test %u: Got unexpected hr %#lx, expected %#lx.\n", i, hr, tests[i].hr); if (FAILED(hr)) continue;
memset(&ddsd, 0, sizeof(ddsd)); ddsd.dwSize = sizeof(ddsd); hr = IDirectDrawSurface7_GetSurfaceDesc(surface, &ddsd); - ok(SUCCEEDED(hr), "Failed to get surface desc, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get surface desc, hr %#lx.\n", hr);
ok(ddsd.ddsCaps.dwCaps == tests[i].caps_out, - "Input caps %#x, %#x, expected output caps %#x, got %#x, case %u.\n", + "Input caps %#lx, %#lx, expected output caps %#lx, got %#lx, case %u.\n", tests[i].caps_in, tests[i].caps2_in, tests[i].caps_out, ddsd.ddsCaps.dwCaps, i); ok(ddsd.ddsCaps.dwCaps2 == tests[i].caps2_out, - "Input caps %#x, %#x, expected output caps %#x, got %#x, case %u.\n", + "Input caps %#lx, %#lx, expected output caps %#lx, got %#lx, case %u.\n", tests[i].caps_in, tests[i].caps2_in, tests[i].caps2_out, ddsd.ddsCaps.dwCaps2, i);
IDirectDrawSurface7_Release(surface); @@ -6020,23 +6020,23 @@ static void test_block_formats_creation(void) }
hr = IDirect3DDevice7_GetDirect3D(device, &d3d); - ok(SUCCEEDED(hr), "Failed to get d3d interface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get d3d interface, hr %#lx.\n", hr); hr = IDirect3D7_QueryInterface(d3d, &IID_IDirectDraw7, (void **) &ddraw); - ok(SUCCEEDED(hr), "Failed to get ddraw interface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get ddraw interface, hr %#lx.\n", hr); IDirect3D7_Release(d3d);
hr = IDirect3DDevice7_EnumTextureFormats(device, test_block_formats_creation_cb, &supported_fmts); - ok(SUCCEEDED(hr), "Failed to enumerate texture formats %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to enumerate texture formats %#lx.\n", hr);
hr = IDirectDraw7_GetFourCCCodes(ddraw, &num_fourcc_codes, NULL); - ok(SUCCEEDED(hr), "Failed to get fourcc codes %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get fourcc codes %#lx.\n", hr); fourcc_codes = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, num_fourcc_codes * sizeof(*fourcc_codes)); if (!fourcc_codes) goto cleanup; hr = IDirectDraw7_GetFourCCCodes(ddraw, &num_fourcc_codes, fourcc_codes); - ok(SUCCEEDED(hr), "Failed to get fourcc codes %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get fourcc codes %#lx.\n", hr); for (i = 0; i < num_fourcc_codes; i++) { for (j = 0; j < ARRAY_SIZE(formats); ++j) @@ -6050,7 +6050,7 @@ static void test_block_formats_creation(void) memset(&hal_caps, 0, sizeof(hal_caps)); hal_caps.dwSize = sizeof(hal_caps); hr = IDirectDraw7_GetCaps(ddraw, &hal_caps, NULL); - ok(SUCCEEDED(hr), "Failed to get caps, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get caps, hr %#lx.\n", hr);
mem = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, 2 * 2 * 16 + 1);
@@ -6108,7 +6108,7 @@ static void test_block_formats_creation(void) hr = IDirectDraw7_CreateSurface(ddraw, &ddsd, &surface, NULL); todo_wine_if (todo) ok(hr == expect_hr, - "Got unexpected hr %#x for format %s, resource type %s, size %ux%u, expected %#x.\n", + "Got unexpected hr %#lx for format %s, resource type %s, size %ux%u, expected %#lx.\n", hr, formats[i].name, types[j].name, w, h, expect_hr);
if (SUCCEEDED(hr)) @@ -6151,7 +6151,7 @@ static void test_block_formats_creation(void) ddsd.dwHeight = 8;
hr = IDirectDraw7_CreateSurface(ddraw, &ddsd, &surface, NULL); - ok(hr == user_mem_tests[j].hr, "Test %u: Got unexpected hr %#x, format %s.\n", j, hr, formats[i].name); + ok(hr == user_mem_tests[j].hr, "Test %u: Got unexpected hr %#lx, format %s.\n", j, hr, formats[i].name);
if (FAILED(hr)) continue; @@ -6159,15 +6159,15 @@ static void test_block_formats_creation(void) memset(&ddsd, 0, sizeof(ddsd)); ddsd.dwSize = sizeof(ddsd); hr = IDirectDrawSurface7_GetSurfaceDesc(surface, &ddsd); - ok(SUCCEEDED(hr), "Test %u: Failed to get surface desc, hr %#x.\n", j, hr); + ok(SUCCEEDED(hr), "Test %u: Failed to get surface desc, hr %#lx.\n", j, hr); ok(ddsd.dwFlags == (DDSD_CAPS | DDSD_WIDTH | DDSD_HEIGHT | DDSD_PIXELFORMAT | DDSD_LINEARSIZE), - "Test %u: Got unexpected flags %#x.\n", j, ddsd.dwFlags); + "Test %u: Got unexpected flags %#lx.\n", j, ddsd.dwFlags); if (user_mem_tests[j].flags & DDSD_LPSURFACE) - ok(U1(ddsd).dwLinearSize == ~0u, "Test %u: Got unexpected linear size %#x.\n", + ok(U1(ddsd).dwLinearSize == ~0u, "Test %u: Got unexpected linear size %#lx.\n", j, U1(ddsd).dwLinearSize); else ok(U1(ddsd).dwLinearSize == 2 * 2 * formats[i].block_size, - "Test %u: Got unexpected linear size %#x, expected %#x.\n", + "Test %u: Got unexpected linear size %#lx, expected %#x.\n", j, U1(ddsd).dwLinearSize, 2 * 2 * formats[i].block_size); IDirectDrawSurface7_Release(surface); } @@ -6244,16 +6244,16 @@ static void test_unsupported_formats(void) }
hr = IDirect3DDevice7_GetDirect3D(device, &d3d); - ok(SUCCEEDED(hr), "Failed to get d3d interface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get d3d interface, hr %#lx.\n", hr); hr = IDirect3D7_QueryInterface(d3d, &IID_IDirectDraw7, (void **) &ddraw); - ok(SUCCEEDED(hr), "Failed to get ddraw interface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get ddraw interface, hr %#lx.\n", hr); IDirect3D7_Release(d3d);
for (i = 0; i < ARRAY_SIZE(formats); ++i) { struct format_support_check check = {&formats[i].fmt, FALSE}; hr = IDirect3DDevice7_EnumTextureFormats(device, test_unsupported_formats_cb, &check); - ok(SUCCEEDED(hr), "Failed to enumerate texture formats %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to enumerate texture formats %#lx.\n", hr);
for (j = 0; j < ARRAY_SIZE(caps); ++j) { @@ -6272,7 +6272,7 @@ static void test_unsupported_formats(void)
hr = IDirectDraw7_CreateSurface(ddraw, &ddsd, &surface, NULL); ok(SUCCEEDED(hr) == expect_success, - "Got unexpected hr %#x for format %s, caps %#x, expected %s.\n", + "Got unexpected hr %#lx for format %s, caps %#lx, expected %s.\n", hr, formats[i].name, caps[j], expect_success ? "success" : "failure"); if (FAILED(hr)) continue; @@ -6280,7 +6280,7 @@ static void test_unsupported_formats(void) memset(&ddsd, 0, sizeof(ddsd)); ddsd.dwSize = sizeof(ddsd); hr = IDirectDrawSurface7_GetSurfaceDesc(surface, &ddsd); - ok(SUCCEEDED(hr), "Failed to get surface desc, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get surface desc, hr %#lx.\n", hr);
if (caps[j] & DDSCAPS_VIDEOMEMORY) expected_caps = DDSCAPS_VIDEOMEMORY; @@ -6292,7 +6292,7 @@ static void test_unsupported_formats(void) expected_caps = DDSCAPS_SYSTEMMEMORY;
ok(ddsd.ddsCaps.dwCaps & expected_caps, - "Expected capability %#x, format %s, input cap %#x.\n", + "Expected capability %#lx, format %s, input cap %#lx.\n", expected_caps, formats[i].name, caps[j]);
IDirectDrawSurface7_Release(surface); @@ -6518,7 +6518,7 @@ static void test_rt_caps(const GUID *device_guid) ddraw = create_ddraw(); ok(!!ddraw, "Failed to create a ddraw object.\n"); hr = IDirectDraw7_SetCooperativeLevel(ddraw, window, DDSCL_NORMAL); - ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#lx.\n", hr);
if (FAILED(IDirectDraw7_QueryInterface(ddraw, &IID_IDirect3D7, (void **)&d3d))) { @@ -6537,12 +6537,12 @@ static void test_rt_caps(const GUID *device_guid)
memset(palette_entries, 0, sizeof(palette_entries)); hr = IDirectDraw7_CreatePalette(ddraw, DDPCAPS_ALLOW256 | DDPCAPS_8BIT, palette_entries, &palette, NULL); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr);
memset(&hal_caps, 0, sizeof(hal_caps)); hal_caps.dwSize = sizeof(hal_caps); hr = IDirectDraw7_GetCaps(ddraw, &hal_caps, NULL); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr);
for (i = 0; i < ARRAY_SIZE(test_data); ++i) { @@ -6574,14 +6574,14 @@ static void test_rt_caps(const GUID *device_guid) ok(hr == expected_hr || (software_device && (surface_desc.ddsCaps.dwCaps & (DDSCAPS_VIDEOMEMORY | DDSCAPS_ZBUFFER)) == (DDSCAPS_VIDEOMEMORY | DDSCAPS_ZBUFFER) && hr == DDERR_UNSUPPORTED) || broken(software_device && test_data[i].pf == &p8_fmt && hr == DDERR_INVALIDPIXELFORMAT), - "Got unexpected hr %#x, test %u, software_device %u.\n", hr, i, software_device); + "Got unexpected hr %#lx, test %u, software_device %u.\n", hr, i, software_device); if (FAILED(hr)) continue;
memset(&surface_desc, 0, sizeof(surface_desc)); surface_desc.dwSize = sizeof(surface_desc); hr = IDirectDrawSurface7_GetSurfaceDesc(surface, &surface_desc); - ok(hr == DD_OK, "Got unexpected hr %#x, test %u, software_device %u.\n", hr, i, software_device); + ok(hr == DD_OK, "Got unexpected hr %#lx, test %u, software_device %u.\n", hr, i, software_device);
if ((caps_in & DDSCAPS_SYSTEMMEMORY) || (test_data[i].caps2_in & (DDSCAPS2_D3DTEXTUREMANAGE | DDSCAPS2_TEXTUREMANAGE)) || !(hal_caps.ddsCaps.dwCaps & DDSCAPS_VIDEOMEMORY)) @@ -6593,34 +6593,34 @@ static void test_rt_caps(const GUID *device_guid) && surface_desc.ddsCaps.dwCaps == (caps_in | DDSCAPS_SYSTEMMEMORY)) || (software_device && test_data[i].pf == &z_fmt && surface_desc.ddsCaps.dwCaps == (caps_in | DDSCAPS_SYSTEMMEMORY)), - "Got unexpected caps %#x, expected %#x, test %u, software_device %u.\n", + "Got unexpected caps %#lx, expected %#lx, test %u, software_device %u.\n", surface_desc.ddsCaps.dwCaps, expected_caps, i, software_device);
ok(surface_desc.ddsCaps.dwCaps2 == test_data[i].caps2_in, - "Got unexpected caps2 %#x, expected %#x, test %u, software_device %u.\n", + "Got unexpected caps2 %#lx, expected %#lx, test %u, software_device %u.\n", surface_desc.ddsCaps.dwCaps2, test_data[i].caps2_in, i, software_device);
hr = IDirect3D7_CreateDevice(d3d, device_guid, surface, &device); ok((!software_device && hr == test_data[i].create_device_hr) || (software_device && (hr == (test_data[i].create_device_hr == D3DERR_SURFACENOTINVIDMEM ? DD_OK : test_data[i].create_device_hr))), - "Got unexpected hr %#x, test %u, software_device %u.\n", hr, i, software_device); + "Got unexpected hr %#lx, test %u, software_device %u.\n", hr, i, software_device); if (FAILED(hr)) { if (hr == DDERR_NOPALETTEATTACHED) { hr = IDirectDrawSurface7_SetPalette(surface, palette); - ok(hr == DD_OK, "Got unexpected hr %#x, test %u, software_device %u.\n", hr, i, software_device); + ok(hr == DD_OK, "Got unexpected hr %#lx, test %u, software_device %u.\n", hr, i, software_device); hr = IDirect3D7_CreateDevice(d3d, device_guid, surface, &device); if (surface_desc.ddsCaps.dwCaps & DDSCAPS_VIDEOMEMORY) - ok(hr == DDERR_INVALIDPIXELFORMAT, "Got unexpected hr %#x, test %u, software_device %u.\n", + ok(hr == DDERR_INVALIDPIXELFORMAT, "Got unexpected hr %#lx, test %u, software_device %u.\n", hr, i, software_device); else if (software_device) todo_wine - ok(hr == E_FAIL, "Got unexpected hr %#x, test %u, software_device %u.\n", + ok(hr == E_FAIL, "Got unexpected hr %#lx, test %u, software_device %u.\n", hr, i, software_device); else - ok(hr == D3DERR_SURFACENOTINVIDMEM, "Got unexpected hr %#x, test %u, software_device %u.\n", + ok(hr == D3DERR_SURFACENOTINVIDMEM, "Got unexpected hr %#lx, test %u, software_device %u.\n", hr, i, software_device); } IDirectDrawSurface7_Release(surface); @@ -6632,10 +6632,10 @@ static void test_rt_caps(const GUID *device_guid) surface_desc.dwWidth = 640; surface_desc.dwHeight = 480; hr = IDirectDraw7_CreateSurface(ddraw, &surface_desc, &surface, NULL); - ok(hr == DD_OK, "Got unexpected hr %#x, test %u, software_device %u.\n", hr, i, software_device); + ok(hr == DD_OK, "Got unexpected hr %#lx, test %u, software_device %u.\n", hr, i, software_device);
hr = IDirect3D7_CreateDevice(d3d, device_guid, surface, &device); - ok(hr == DD_OK, "Got unexpected hr %#x, test %u, software_device %u.\n", hr, i, software_device); + ok(hr == DD_OK, "Got unexpected hr %#lx, test %u, software_device %u.\n", hr, i, software_device); }
memset(&surface_desc, 0, sizeof(surface_desc)); @@ -6651,12 +6651,12 @@ static void test_rt_caps(const GUID *device_guid) surface_desc.dwWidth = 640; surface_desc.dwHeight = 480; hr = IDirectDraw7_CreateSurface(ddraw, &surface_desc, &rt, NULL); - ok(hr == DD_OK, "Got unexpected hr %#x, test %u, software_device %u.\n", hr, i, software_device); + ok(hr == DD_OK, "Got unexpected hr %#lx, test %u, software_device %u.\n", hr, i, software_device);
hr = IDirect3DDevice7_SetRenderTarget(device, rt, 0); ok(hr == test_data[i].set_rt_hr || (software_device && hr == DDERR_NOPALETTEATTACHED) || hr == test_data[i].alternative_set_rt_hr, - "Got unexpected hr %#x, test %u, software_device %u.\n", + "Got unexpected hr %#lx, test %u, software_device %u.\n", hr, i, software_device); if (SUCCEEDED(hr) || hr == DDERR_INVALIDPIXELFORMAT) expected_rt = rt; @@ -6664,24 +6664,24 @@ static void test_rt_caps(const GUID *device_guid) expected_rt = surface;
hr = IDirect3DDevice7_GetRenderTarget(device, &tmp); - ok(hr == DD_OK, "Got unexpected hr %#x, test %u, software_device %u.\n", hr, i, software_device); + ok(hr == DD_OK, "Got unexpected hr %#lx, test %u, software_device %u.\n", hr, i, software_device); ok(tmp == expected_rt, "Got unexpected rt %p, test %u, software_device %u.\n", tmp, i, software_device);
IDirectDrawSurface7_Release(tmp); IDirectDrawSurface7_Release(rt); refcount = IDirect3DDevice7_Release(device); - ok(refcount == 0, "Test %u: The device was not properly freed, refcount %u.\n", i, refcount); + ok(refcount == 0, "Test %u: The device was not properly freed, refcount %lu.\n", i, refcount); refcount = IDirectDrawSurface7_Release(surface); - ok(refcount == 0, "Test %u: The surface was not properly freed, refcount %u.\n", i, refcount); + ok(refcount == 0, "Test %u: The surface was not properly freed, refcount %lu.\n", i, refcount); }
refcount = IDirectDrawPalette_Release(palette); - ok(!refcount, "Got unexpected refcount %u.\n", refcount); + ok(!refcount, "Got unexpected refcount %lu.\n", refcount); IDirect3D7_Release(d3d);
done: refcount = IDirectDraw7_Release(ddraw); - ok(refcount == 0, "The ddraw object was not properly freed, refcount %u.\n", refcount); + ok(refcount == 0, "The ddraw object was not properly freed, refcount %lu.\n", refcount); DestroyWindow(window); }
@@ -6806,7 +6806,7 @@ static void test_primary_caps(void) for (i = 0; i < ARRAY_SIZE(test_data); ++i) { hr = IDirectDraw7_SetCooperativeLevel(ddraw, window, test_data[i].coop_level); - ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#lx.\n", hr);
memset(&surface_desc, 0, sizeof(surface_desc)); surface_desc.dwSize = sizeof(surface_desc); @@ -6816,23 +6816,23 @@ static void test_primary_caps(void) surface_desc.ddsCaps.dwCaps = test_data[i].caps_in; U5(surface_desc).dwBackBufferCount = test_data[i].back_buffer_count; hr = IDirectDraw7_CreateSurface(ddraw, &surface_desc, &surface, NULL); - ok(hr == test_data[i].hr, "Test %u: Got unexpected hr %#x, expected %#x.\n", i, hr, test_data[i].hr); + ok(hr == test_data[i].hr, "Test %u: Got unexpected hr %#lx, expected %#lx.\n", i, hr, test_data[i].hr); if (FAILED(hr)) continue;
memset(&surface_desc, 0, sizeof(surface_desc)); surface_desc.dwSize = sizeof(surface_desc); hr = IDirectDrawSurface7_GetSurfaceDesc(surface, &surface_desc); - ok(SUCCEEDED(hr), "Test %u: Failed to get surface desc, hr %#x.\n", i, hr); + ok(SUCCEEDED(hr), "Test %u: Failed to get surface desc, hr %#lx.\n", i, hr); ok((surface_desc.ddsCaps.dwCaps & ~placement) == test_data[i].caps_out, - "Test %u: Got unexpected caps %#x, expected %#x.\n", + "Test %u: Got unexpected caps %#lx, expected %#lx.\n", i, surface_desc.ddsCaps.dwCaps, test_data[i].caps_out);
IDirectDrawSurface7_Release(surface); }
refcount = IDirectDraw7_Release(ddraw); - ok(refcount == 0, "The ddraw object was not properly freed, refcount %u.\n", refcount); + ok(refcount == 0, "The ddraw object was not properly freed, refcount %lu.\n", refcount); DestroyWindow(window); }
@@ -6961,7 +6961,7 @@ static void test_surface_lock(void) ddraw = create_ddraw(); ok(!!ddraw, "Failed to create a ddraw object.\n"); hr = IDirectDraw7_SetCooperativeLevel(ddraw, window, DDSCL_NORMAL); - ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#lx.\n", hr);
if (FAILED(IDirectDraw7_QueryInterface(ddraw, &IID_IDirect3D7, (void **)&d3d))) { @@ -6970,7 +6970,7 @@ static void test_surface_lock(void) }
hr = IDirect3D7_EnumDevices(d3d, enum_devtype_cb, &hal_ok); - ok(SUCCEEDED(hr), "Failed to enumerate devices, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to enumerate devices, hr %#lx.\n", hr); if (hal_ok) devtype = &IID_IDirect3DTnLHalDevice;
@@ -6989,12 +6989,12 @@ static void test_surface_lock(void) ddsd.dwHeight = 64; ddsd.ddsCaps.dwCaps = DDSCAPS_OFFSCREENPLAIN | DDSCAPS_3DDEVICE; hr = IDirectDraw7_CreateSurface(ddraw, &ddsd, &surface, NULL); - ok(SUCCEEDED(hr), "Failed to create surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create surface, hr %#lx.\n", hr);
hr = IDirect3D7_CreateDevice(d3d, devtype, surface, &device); - ok(SUCCEEDED(hr), "Failed to create device, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create device, hr %#lx.\n", hr); hr = IDirect3DDevice7_GetCaps(device, &device_desc); - ok(SUCCEEDED(hr), "Failed to get device caps, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get device caps, hr %#lx.\n", hr); cubemap_supported = !!(device_desc.dpcTriCaps.dwTextureCaps & D3DPTEXTURECAPS_CUBEMAP); IDirect3DDevice7_Release(device);
@@ -7023,30 +7023,30 @@ static void test_surface_lock(void) ddsd.ddsCaps.dwCaps2 = tests[i].caps2;
hr = IDirectDraw7_CreateSurface(ddraw, &ddsd, &surface, NULL); - ok(SUCCEEDED(hr), "Failed to create surface, type %s, hr %#x.\n", tests[i].name, hr); + ok(SUCCEEDED(hr), "Failed to create surface, type %s, hr %#lx.\n", tests[i].name, hr);
memset(&ddsd, 0, sizeof(ddsd)); ddsd.dwSize = sizeof(ddsd); hr = IDirectDrawSurface7_Lock(surface, NULL, &ddsd, DDLOCK_WAIT, NULL); - ok(SUCCEEDED(hr), "Failed to lock surface, type %s, hr %#x.\n", tests[i].name, hr); + ok(SUCCEEDED(hr), "Failed to lock surface, type %s, hr %#lx.\n", tests[i].name, hr); if (SUCCEEDED(hr)) { - ok(ddsd.dwSize == sizeof(ddsd), "Got unexpected dwSize %u, type %s.\n", ddsd.dwSize, tests[i].name); + ok(ddsd.dwSize == sizeof(ddsd), "Got unexpected dwSize %lu, type %s.\n", ddsd.dwSize, tests[i].name); hr = IDirectDrawSurface7_Unlock(surface, NULL); - ok(SUCCEEDED(hr), "Failed to unlock surface, type %s, hr %#x.\n", tests[i].name, hr); + ok(SUCCEEDED(hr), "Failed to unlock surface, type %s, hr %#lx.\n", tests[i].name, hr); }
memset(&ddsd, 0, sizeof(ddsd)); expected_hr = tests[i].caps & DDSCAPS_TEXTURE && !(tests[i].caps & DDSCAPS_VIDEOMEMORY) ? DD_OK : DDERR_INVALIDPARAMS; hr = IDirectDrawSurface7_Lock(surface, NULL, &ddsd, DDLOCK_WAIT, NULL); - ok(hr == expected_hr, "Got hr %#x, expected %#x, type %s.\n", hr, expected_hr, tests[i].name); + ok(hr == expected_hr, "Got hr %#lx, expected %#lx, type %s.\n", hr, expected_hr, tests[i].name); if (SUCCEEDED(hr)) { - ok(!ddsd.dwSize, "Got unexpected dwSize %u, type %s.\n", ddsd.dwSize, tests[i].name); + ok(!ddsd.dwSize, "Got unexpected dwSize %lu, type %s.\n", ddsd.dwSize, tests[i].name); ok(!!ddsd.lpSurface, "Got NULL lpSurface, type %s.\n", tests[i].name); hr = IDirectDrawSurface7_Unlock(surface, NULL); - ok(SUCCEEDED(hr), "Failed to unlock surface, type %s, hr %#x.\n", tests[i].name, hr); + ok(SUCCEEDED(hr), "Failed to unlock surface, type %s, hr %#lx.\n", tests[i].name, hr); }
IDirectDrawSurface7_Release(surface); @@ -7056,7 +7056,7 @@ done: if (d3d) IDirect3D7_Release(d3d); refcount = IDirectDraw7_Release(ddraw); - ok(refcount == 0, "The ddraw object was not properly freed, refcount %u.\n", refcount); + ok(refcount == 0, "The ddraw object was not properly freed, refcount %lu.\n", refcount); DestroyWindow(window); }
@@ -7108,11 +7108,11 @@ static void test_surface_discard(void) return; } hr = IDirect3DDevice7_GetDirect3D(device, &d3d); - ok(SUCCEEDED(hr), "Failed to get d3d interface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get d3d interface, hr %#lx.\n", hr); hr = IDirect3D7_QueryInterface(d3d, &IID_IDirectDraw7, (void **)&ddraw); - ok(SUCCEEDED(hr), "Failed to get ddraw interface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get ddraw interface, hr %#lx.\n", hr); hr = IDirect3DDevice7_GetRenderTarget(device, &target); - ok(SUCCEEDED(hr), "Failed to get render target, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get render target, hr %#lx.\n", hr);
memset(&ddsd, 0, sizeof(ddsd)); ddsd.dwSize = sizeof(ddsd); @@ -7122,34 +7122,34 @@ static void test_surface_discard(void) ddsd.dwWidth = 64; ddsd.dwHeight = 64; hr = IDirectDraw7_CreateSurface(ddraw, &ddsd, &surface, NULL); - ok(SUCCEEDED(hr), "Failed to create offscreen surface, hr %#x, case %u.\n", hr, i); + ok(SUCCEEDED(hr), "Failed to create offscreen surface, hr %#lx, case %u.\n", hr, i);
memset(&ddsd, 0, sizeof(ddsd)); ddsd.dwSize = sizeof(ddsd); hr = IDirectDrawSurface7_Lock(surface, NULL, &ddsd, 0, NULL); - ok(SUCCEEDED(hr), "Failed to lock surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to lock surface, hr %#lx.\n", hr); addr = ddsd.lpSurface; hr = IDirectDrawSurface7_Unlock(surface, NULL); - ok(SUCCEEDED(hr), "Failed to unlock surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to unlock surface, hr %#lx.\n", hr);
memset(&ddsd, 0, sizeof(ddsd)); ddsd.dwSize = sizeof(ddsd); hr = IDirectDrawSurface7_Lock(surface, NULL, &ddsd, DDLOCK_DISCARDCONTENTS, NULL); - ok(SUCCEEDED(hr), "Failed to lock surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to lock surface, hr %#lx.\n", hr); discarded = ddsd.lpSurface != addr; hr = IDirectDrawSurface7_Unlock(surface, NULL); - ok(SUCCEEDED(hr), "Failed to unlock surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to unlock surface, hr %#lx.\n", hr);
hr = IDirectDrawSurface7_Blt(target, NULL, surface, NULL, DDBLT_WAIT, NULL); - ok(SUCCEEDED(hr), "Failed to blit, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to blit, hr %#lx.\n", hr);
memset(&ddsd, 0, sizeof(ddsd)); ddsd.dwSize = sizeof(ddsd); hr = IDirectDrawSurface7_Lock(surface, NULL, &ddsd, DDLOCK_DISCARDCONTENTS, NULL); - ok(SUCCEEDED(hr), "Failed to lock surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to lock surface, hr %#lx.\n", hr); discarded |= ddsd.lpSurface != addr; hr = IDirectDrawSurface7_Unlock(surface, NULL); - ok(SUCCEEDED(hr), "Failed to unlock surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to unlock surface, hr %#lx.\n", hr);
IDirectDrawSurface7_Release(surface);
@@ -7200,7 +7200,7 @@ static void test_flip(void) ok(!!ddraw, "Failed to create a ddraw object.\n");
hr = IDirectDraw7_SetCooperativeLevel(ddraw, window, DDSCL_EXCLUSIVE | DDSCL_FULLSCREEN); - ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#lx.\n", hr);
for (i = 0; i < ARRAY_SIZE(test_data); ++i) { @@ -7223,95 +7223,95 @@ static void test_flip(void) surface_desc.dwHeight = 512; U5(surface_desc).dwBackBufferCount = 3; hr = IDirectDraw7_CreateSurface(ddraw, &surface_desc, &frontbuffer, NULL); - ok(hr == DDERR_INVALIDCAPS, "%s: Got unexpected hr %#x.\n", test_data[i].name, hr); + ok(hr == DDERR_INVALIDCAPS, "%s: Got unexpected hr %#lx.\n", test_data[i].name, hr);
surface_desc.ddsCaps.dwCaps &= ~DDSCAPS_FLIP; surface_desc.dwFlags |= DDSD_BACKBUFFERCOUNT; hr = IDirectDraw7_CreateSurface(ddraw, &surface_desc, &frontbuffer, NULL); - ok(hr == DDERR_INVALIDCAPS, "%s: Got unexpected hr %#x.\n", test_data[i].name, hr); + ok(hr == DDERR_INVALIDCAPS, "%s: Got unexpected hr %#lx.\n", test_data[i].name, hr);
surface_desc.ddsCaps.dwCaps &= ~DDSCAPS_COMPLEX; surface_desc.ddsCaps.dwCaps |= DDSCAPS_FLIP; hr = IDirectDraw7_CreateSurface(ddraw, &surface_desc, &frontbuffer, NULL); - ok(hr == DDERR_INVALIDCAPS, "%s: Got unexpected hr %#x.\n", test_data[i].name, hr); + ok(hr == DDERR_INVALIDCAPS, "%s: Got unexpected hr %#lx.\n", test_data[i].name, hr);
surface_desc.ddsCaps.dwCaps |= DDSCAPS_COMPLEX; hr = IDirectDraw7_CreateSurface(ddraw, &surface_desc, &frontbuffer, NULL); if (is_ddraw64 && test_data[i].caps & DDSCAPS_TEXTURE) - todo_wine ok(hr == E_NOINTERFACE, "%s: Got unexpected hr %#x.\n", test_data[i].name, hr); + todo_wine ok(hr == E_NOINTERFACE, "%s: Got unexpected hr %#lx.\n", test_data[i].name, hr); else todo_wine_if(test_data[i].caps & DDSCAPS_TEXTURE) - ok(SUCCEEDED(hr), "%s: Failed to create surface, hr %#x.\n", test_data[i].name, hr); + ok(SUCCEEDED(hr), "%s: Failed to create surface, hr %#lx.\n", test_data[i].name, hr); if (FAILED(hr)) continue;
memset(&surface_desc, 0, sizeof(surface_desc)); surface_desc.dwSize = sizeof(surface_desc); hr = IDirectDrawSurface7_GetSurfaceDesc(frontbuffer, &surface_desc); - ok(SUCCEEDED(hr), "%s: Failed to get surface desc, hr %#x.\n", test_data[i].name, hr); + ok(SUCCEEDED(hr), "%s: Failed to get surface desc, hr %#lx.\n", test_data[i].name, hr); expected_caps = DDSCAPS_FRONTBUFFER | DDSCAPS_COMPLEX | DDSCAPS_FLIP | test_data[i].caps; if (test_data[i].caps & DDSCAPS_PRIMARYSURFACE) expected_caps |= DDSCAPS_VISIBLE; ok((surface_desc.ddsCaps.dwCaps & ~placement) == expected_caps, - "%s: Got unexpected caps %#x.\n", test_data[i].name, surface_desc.ddsCaps.dwCaps); + "%s: Got unexpected caps %#lx.\n", test_data[i].name, surface_desc.ddsCaps.dwCaps); sysmem_primary = surface_desc.ddsCaps.dwCaps & DDSCAPS_SYSTEMMEMORY;
hr = IDirectDrawSurface7_GetAttachedSurface(frontbuffer, &caps, &backbuffer1); - ok(SUCCEEDED(hr), "%s: Failed to get attached surface, hr %#x.\n", test_data[i].name, hr); + ok(SUCCEEDED(hr), "%s: Failed to get attached surface, hr %#lx.\n", test_data[i].name, hr); memset(&surface_desc, 0, sizeof(surface_desc)); surface_desc.dwSize = sizeof(surface_desc); hr = IDirectDrawSurface7_GetSurfaceDesc(backbuffer1, &surface_desc); - ok(SUCCEEDED(hr), "%s: Failed to get surface desc, hr %#x.\n", test_data[i].name, hr); - ok(!U5(surface_desc).dwBackBufferCount, "%s: Got unexpected back buffer count %u.\n", + ok(SUCCEEDED(hr), "%s: Failed to get surface desc, hr %#lx.\n", test_data[i].name, hr); + ok(!U5(surface_desc).dwBackBufferCount, "%s: Got unexpected back buffer count %lu.\n", test_data[i].name, U5(surface_desc).dwBackBufferCount); expected_caps &= ~(DDSCAPS_VISIBLE | DDSCAPS_PRIMARYSURFACE | DDSCAPS_FRONTBUFFER); expected_caps |= DDSCAPS_BACKBUFFER; ok((surface_desc.ddsCaps.dwCaps & ~placement) == expected_caps, - "%s: Got unexpected caps %#x.\n", test_data[i].name, surface_desc.ddsCaps.dwCaps); + "%s: Got unexpected caps %#lx.\n", test_data[i].name, surface_desc.ddsCaps.dwCaps);
hr = IDirectDrawSurface7_GetAttachedSurface(backbuffer1, &caps, &backbuffer2); - ok(SUCCEEDED(hr), "%s: Failed to get attached surface, hr %#x.\n", test_data[i].name, hr); + ok(SUCCEEDED(hr), "%s: Failed to get attached surface, hr %#lx.\n", test_data[i].name, hr); memset(&surface_desc, 0, sizeof(surface_desc)); surface_desc.dwSize = sizeof(surface_desc); hr = IDirectDrawSurface7_GetSurfaceDesc(backbuffer2, &surface_desc); - ok(SUCCEEDED(hr), "%s: Failed to get surface desc, hr %#x.\n", test_data[i].name, hr); - ok(!U5(surface_desc).dwBackBufferCount, "%s: Got unexpected back buffer count %u.\n", + ok(SUCCEEDED(hr), "%s: Failed to get surface desc, hr %#lx.\n", test_data[i].name, hr); + ok(!U5(surface_desc).dwBackBufferCount, "%s: Got unexpected back buffer count %lu.\n", test_data[i].name, U5(surface_desc).dwBackBufferCount); expected_caps &= ~DDSCAPS_BACKBUFFER; ok((surface_desc.ddsCaps.dwCaps & ~placement) == expected_caps, - "%s: Got unexpected caps %#x.\n", test_data[i].name, surface_desc.ddsCaps.dwCaps); + "%s: Got unexpected caps %#lx.\n", test_data[i].name, surface_desc.ddsCaps.dwCaps);
hr = IDirectDrawSurface7_GetAttachedSurface(backbuffer2, &caps, &backbuffer3); - ok(SUCCEEDED(hr), "%s: Failed to get attached surface, hr %#x.\n", test_data[i].name, hr); + ok(SUCCEEDED(hr), "%s: Failed to get attached surface, hr %#lx.\n", test_data[i].name, hr); memset(&surface_desc, 0, sizeof(surface_desc)); surface_desc.dwSize = sizeof(surface_desc); hr = IDirectDrawSurface7_GetSurfaceDesc(backbuffer3, &surface_desc); - ok(SUCCEEDED(hr), "%s: Failed to get surface desc, hr %#x.\n", test_data[i].name, hr); - ok(!U5(surface_desc).dwBackBufferCount, "%s: Got unexpected back buffer count %u.\n", + ok(SUCCEEDED(hr), "%s: Failed to get surface desc, hr %#lx.\n", test_data[i].name, hr); + ok(!U5(surface_desc).dwBackBufferCount, "%s: Got unexpected back buffer count %lu.\n", test_data[i].name, U5(surface_desc).dwBackBufferCount); ok((surface_desc.ddsCaps.dwCaps & ~placement) == expected_caps, - "%s: Got unexpected caps %#x.\n", test_data[i].name, surface_desc.ddsCaps.dwCaps); + "%s: Got unexpected caps %#lx.\n", test_data[i].name, surface_desc.ddsCaps.dwCaps);
hr = IDirectDrawSurface7_GetAttachedSurface(backbuffer3, &caps, &surface); - ok(SUCCEEDED(hr), "%s: Failed to get attached surface, hr %#x.\n", test_data[i].name, hr); + ok(SUCCEEDED(hr), "%s: Failed to get attached surface, hr %#lx.\n", test_data[i].name, hr); ok(surface == frontbuffer, "%s: Got unexpected surface %p, expected %p.\n", test_data[i].name, surface, frontbuffer); IDirectDrawSurface7_Release(surface);
hr = IDirectDraw7_SetCooperativeLevel(ddraw, window, DDSCL_NORMAL | DDSCL_FULLSCREEN); - ok(SUCCEEDED(hr), "%s: Failed to set cooperative level, hr %#x.\n", test_data[i].name, hr); + ok(SUCCEEDED(hr), "%s: Failed to set cooperative level, hr %#lx.\n", test_data[i].name, hr); hr = IDirectDrawSurface7_IsLost(frontbuffer); - ok(hr == DD_OK, "%s: Got unexpected hr %#x.\n", test_data[i].name, hr); + ok(hr == DD_OK, "%s: Got unexpected hr %#lx.\n", test_data[i].name, hr); hr = IDirectDrawSurface7_Flip(frontbuffer, NULL, DDFLIP_WAIT); if (test_data[i].caps & DDSCAPS_PRIMARYSURFACE) - ok(hr == DDERR_NOEXCLUSIVEMODE, "%s: Got unexpected hr %#x.\n", test_data[i].name, hr); + ok(hr == DDERR_NOEXCLUSIVEMODE, "%s: Got unexpected hr %#lx.\n", test_data[i].name, hr); else - ok(SUCCEEDED(hr), "%s: Failed to flip, hr %#x.\n", test_data[i].name, hr); + ok(SUCCEEDED(hr), "%s: Failed to flip, hr %#lx.\n", test_data[i].name, hr); hr = IDirectDraw7_SetCooperativeLevel(ddraw, window, DDSCL_EXCLUSIVE | DDSCL_FULLSCREEN); - ok(SUCCEEDED(hr), "%s: Failed to set cooperative level, hr %#x.\n", test_data[i].name, hr); + ok(SUCCEEDED(hr), "%s: Failed to set cooperative level, hr %#lx.\n", test_data[i].name, hr); hr = IDirectDrawSurface7_IsLost(frontbuffer); - todo_wine ok(hr == DDERR_SURFACELOST, "%s: Got unexpected hr %#x.\n", test_data[i].name, hr); + todo_wine ok(hr == DDERR_SURFACELOST, "%s: Got unexpected hr %#lx.\n", test_data[i].name, hr); hr = IDirectDraw7_RestoreAllSurfaces(ddraw); - ok(SUCCEEDED(hr), "%s: Failed to restore surfaces, hr %#x.\n", test_data[i].name, hr); + ok(SUCCEEDED(hr), "%s: Failed to restore surfaces, hr %#lx.\n", test_data[i].name, hr);
memset(&surface_desc, 0, sizeof(surface_desc)); surface_desc.dwSize = sizeof(surface_desc); @@ -7320,19 +7320,19 @@ static void test_flip(void) surface_desc.dwWidth = 640; surface_desc.dwHeight = 480; hr = IDirectDraw7_CreateSurface(ddraw, &surface_desc, &surface, NULL); - ok(SUCCEEDED(hr), "%s: Failed to create surface, hr %#x.\n", test_data[i].name, hr); + ok(SUCCEEDED(hr), "%s: Failed to create surface, hr %#lx.\n", test_data[i].name, hr); hr = IDirectDrawSurface7_Flip(frontbuffer, surface, DDFLIP_WAIT); - ok(hr == DDERR_NOTFLIPPABLE, "%s: Got unexpected hr %#x.\n", test_data[i].name, hr); + ok(hr == DDERR_NOTFLIPPABLE, "%s: Got unexpected hr %#lx.\n", test_data[i].name, hr); IDirectDrawSurface7_Release(surface);
hr = IDirectDrawSurface7_Flip(frontbuffer, frontbuffer, DDFLIP_WAIT); - ok(hr == DDERR_NOTFLIPPABLE, "%s: Got unexpected hr %#x.\n", test_data[i].name, hr); + ok(hr == DDERR_NOTFLIPPABLE, "%s: Got unexpected hr %#lx.\n", test_data[i].name, hr); hr = IDirectDrawSurface7_Flip(backbuffer1, NULL, DDFLIP_WAIT); - ok(hr == DDERR_NOTFLIPPABLE, "%s: Got unexpected hr %#x.\n", test_data[i].name, hr); + ok(hr == DDERR_NOTFLIPPABLE, "%s: Got unexpected hr %#lx.\n", test_data[i].name, hr); hr = IDirectDrawSurface7_Flip(backbuffer2, NULL, DDFLIP_WAIT); - ok(hr == DDERR_NOTFLIPPABLE, "%s: Got unexpected hr %#x.\n", test_data[i].name, hr); + ok(hr == DDERR_NOTFLIPPABLE, "%s: Got unexpected hr %#lx.\n", test_data[i].name, hr); hr = IDirectDrawSurface7_Flip(backbuffer3, NULL, DDFLIP_WAIT); - ok(hr == DDERR_NOTFLIPPABLE, "%s: Got unexpected hr %#x.\n", test_data[i].name, hr); + ok(hr == DDERR_NOTFLIPPABLE, "%s: Got unexpected hr %#lx.\n", test_data[i].name, hr);
/* The Nvidia Geforce 7 driver cannot do a color fill on a texture backbuffer after * the backbuffer has been locked. Do it ourselves as a workaround. Unlike ddraw1 @@ -7342,59 +7342,59 @@ static void test_flip(void) fill_surface(backbuffer3, 0xff0000ff);
hr = IDirectDrawSurface7_Flip(frontbuffer, NULL, DDFLIP_WAIT); - ok(SUCCEEDED(hr), "%s: Failed to flip, hr %#x.\n", test_data[i].name, hr); + ok(SUCCEEDED(hr), "%s: Failed to flip, hr %#lx.\n", test_data[i].name, hr); color = get_surface_color(backbuffer1, 320, 240); /* The testbot seems to just copy the contents of one surface to all the * others, instead of properly flipping. */ ok(compare_color(color, 0x0000ff00, 1) || broken(sysmem_primary && compare_color(color, 0x000000ff, 1)), - "%s: Got unexpected color 0x%08x.\n", test_data[i].name, color); + "%s: Got unexpected color 0x%08lx.\n", test_data[i].name, color); color = get_surface_color(backbuffer2, 320, 240); - ok(compare_color(color, 0x000000ff, 1), "%s: Got unexpected color 0x%08x.\n", test_data[i].name, color); + ok(compare_color(color, 0x000000ff, 1), "%s: Got unexpected color 0x%08lx.\n", test_data[i].name, color); fill_surface(backbuffer3, 0xffff0000);
hr = IDirectDrawSurface7_Flip(frontbuffer, NULL, DDFLIP_WAIT); - ok(SUCCEEDED(hr), "%s: Failed to flip, hr %#x.\n", test_data[i].name, hr); + ok(SUCCEEDED(hr), "%s: Failed to flip, hr %#lx.\n", test_data[i].name, hr); color = get_surface_color(backbuffer1, 320, 240); ok(compare_color(color, 0x000000ff, 1) || broken(sysmem_primary && compare_color(color, 0x00ff0000, 1)), - "%s: Got unexpected color 0x%08x.\n", test_data[i].name, color); + "%s: Got unexpected color 0x%08lx.\n", test_data[i].name, color); color = get_surface_color(backbuffer2, 320, 240); - ok(compare_color(color, 0x00ff0000, 1), "%s: Got unexpected color 0x%08x.\n", test_data[i].name, color); + ok(compare_color(color, 0x00ff0000, 1), "%s: Got unexpected color 0x%08lx.\n", test_data[i].name, color); fill_surface(backbuffer3, 0xff00ff00);
hr = IDirectDrawSurface7_Flip(frontbuffer, NULL, DDFLIP_WAIT); - ok(SUCCEEDED(hr), "%s: Failed to flip, hr %#x.\n", test_data[i].name, hr); + ok(SUCCEEDED(hr), "%s: Failed to flip, hr %#lx.\n", test_data[i].name, hr); color = get_surface_color(backbuffer1, 320, 240); ok(compare_color(color, 0x00ff0000, 1) || broken(sysmem_primary && compare_color(color, 0x0000ff00, 1)), - "%s: Got unexpected color 0x%08x.\n", test_data[i].name, color); + "%s: Got unexpected color 0x%08lx.\n", test_data[i].name, color); color = get_surface_color(backbuffer2, 320, 240); - ok(compare_color(color, 0x0000ff00, 1), "%s: Got unexpected color 0x%08x.\n", test_data[i].name, color); + ok(compare_color(color, 0x0000ff00, 1), "%s: Got unexpected color 0x%08lx.\n", test_data[i].name, color); fill_surface(backbuffer3, 0xff0000ff);
hr = IDirectDrawSurface7_Flip(frontbuffer, backbuffer1, DDFLIP_WAIT); - ok(SUCCEEDED(hr), "%s: Failed to flip, hr %#x.\n", test_data[i].name, hr); + ok(SUCCEEDED(hr), "%s: Failed to flip, hr %#lx.\n", test_data[i].name, hr); color = get_surface_color(backbuffer2, 320, 240); ok(compare_color(color, 0x0000ff00, 1) || broken(sysmem_primary && compare_color(color, 0x000000ff, 1)), - "%s: Got unexpected color 0x%08x.\n", test_data[i].name, color); + "%s: Got unexpected color 0x%08lx.\n", test_data[i].name, color); color = get_surface_color(backbuffer3, 320, 240); - ok(compare_color(color, 0x000000ff, 1), "%s: Got unexpected color 0x%08x.\n", test_data[i].name, color); + ok(compare_color(color, 0x000000ff, 1), "%s: Got unexpected color 0x%08lx.\n", test_data[i].name, color); fill_surface(backbuffer1, 0xffff0000);
hr = IDirectDrawSurface7_Flip(frontbuffer, backbuffer2, DDFLIP_WAIT); - ok(SUCCEEDED(hr), "%s: Failed to flip, hr %#x.\n", test_data[i].name, hr); + ok(SUCCEEDED(hr), "%s: Failed to flip, hr %#lx.\n", test_data[i].name, hr); color = get_surface_color(backbuffer1, 320, 240); - ok(compare_color(color, 0x00ff0000, 1), "%s: Got unexpected color 0x%08x.\n", test_data[i].name, color); + ok(compare_color(color, 0x00ff0000, 1), "%s: Got unexpected color 0x%08lx.\n", test_data[i].name, color); color = get_surface_color(backbuffer3, 320, 240); ok(compare_color(color, 0x000000ff, 1) || broken(sysmem_primary && compare_color(color, 0x00ff0000, 1)), - "%s: Got unexpected color 0x%08x.\n", test_data[i].name, color); + "%s: Got unexpected color 0x%08lx.\n", test_data[i].name, color); fill_surface(backbuffer2, 0xff00ff00);
hr = IDirectDrawSurface7_Flip(frontbuffer, backbuffer3, DDFLIP_WAIT); - ok(SUCCEEDED(hr), "%s: Failed to flip, hr %#x.\n", test_data[i].name, hr); + ok(SUCCEEDED(hr), "%s: Failed to flip, hr %#lx.\n", test_data[i].name, hr); color = get_surface_color(backbuffer1, 320, 240); ok(compare_color(color, 0x00ff0000, 1) || broken(sysmem_primary && compare_color(color, 0x0000ff00, 1)), - "%s: Got unexpected color 0x%08x.\n", test_data[i].name, color); + "%s: Got unexpected color 0x%08lx.\n", test_data[i].name, color); color = get_surface_color(backbuffer2, 320, 240); - ok(compare_color(color, 0x0000ff00, 1), "%s: Got unexpected color 0x%08x.\n", test_data[i].name, color); + ok(compare_color(color, 0x0000ff00, 1), "%s: Got unexpected color 0x%08lx.\n", test_data[i].name, color);
IDirectDrawSurface7_Release(backbuffer3); IDirectDrawSurface7_Release(backbuffer2); @@ -7408,7 +7408,7 @@ static void test_flip(void) goto done; } hr = IDirect3DDevice7_GetCaps(device, &device_desc); - ok(SUCCEEDED(hr), "Failed to get device caps, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get device caps, hr %#lx.\n", hr); IDirect3DDevice7_Release(device); if (!(device_desc.dpcTriCaps.dwTextureCaps & D3DPTEXTURECAPS_CUBEMAP)) { @@ -7425,33 +7425,33 @@ static void test_flip(void) surface_desc.dwHeight = 128; U5(surface_desc).dwBackBufferCount = 3; hr = IDirectDraw7_CreateSurface(ddraw, &surface_desc, &frontbuffer, NULL); - ok(hr == DDERR_INVALIDCAPS, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_INVALIDCAPS, "Got unexpected hr %#lx.\n", hr);
surface_desc.ddsCaps.dwCaps &= ~DDSCAPS_FLIP; surface_desc.dwFlags |= DDSD_BACKBUFFERCOUNT; hr = IDirectDraw7_CreateSurface(ddraw, &surface_desc, &frontbuffer, NULL); - ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#lx.\n", hr);
surface_desc.ddsCaps.dwCaps &= ~DDSCAPS_COMPLEX; surface_desc.ddsCaps.dwCaps |= DDSCAPS_FLIP; hr = IDirectDraw7_CreateSurface(ddraw, &surface_desc, &frontbuffer, NULL); - ok(hr == DDERR_INVALIDCAPS, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_INVALIDCAPS, "Got unexpected hr %#lx.\n", hr);
surface_desc.ddsCaps.dwCaps |= DDSCAPS_COMPLEX; hr = IDirectDraw7_CreateSurface(ddraw, &surface_desc, &frontbuffer, NULL); - ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#lx.\n", hr);
U5(surface_desc).dwBackBufferCount = 1; hr = IDirectDraw7_CreateSurface(ddraw, &surface_desc, &frontbuffer, NULL); - ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#lx.\n", hr);
U5(surface_desc).dwBackBufferCount = 0; hr = IDirectDraw7_CreateSurface(ddraw, &surface_desc, &frontbuffer, NULL); - ok(hr == DDERR_INVALIDCAPS, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_INVALIDCAPS, "Got unexpected hr %#lx.\n", hr);
done: refcount = IDirectDraw7_Release(ddraw); - ok(refcount == 0, "The ddraw object was not properly freed, refcount %u.\n", refcount); + ok(refcount == 0, "The ddraw object was not properly freed, refcount %lu.\n", refcount); DestroyWindow(window); }
@@ -7490,7 +7490,7 @@ static void test_set_surface_desc(void) ddraw = create_ddraw(); ok(!!ddraw, "Failed to create a ddraw object.\n"); hr = IDirectDraw7_SetCooperativeLevel(ddraw, window, DDSCL_NORMAL); - ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#lx.\n", hr);
reset_ddsd(&ddsd); ddsd.dwFlags = DDSD_WIDTH | DDSD_HEIGHT | DDSD_CAPS | DDSD_PIXELFORMAT; @@ -7505,74 +7505,74 @@ static void test_set_surface_desc(void) ddsd.ddsCaps.dwCaps = DDSCAPS_SYSTEMMEMORY | DDSCAPS_OFFSCREENPLAIN;
hr = IDirectDraw7_CreateSurface(ddraw, &ddsd, &surface, NULL); - ok(SUCCEEDED(hr), "Failed to create surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create surface, hr %#lx.\n", hr);
reset_ddsd(&ddsd); ddsd.dwFlags = DDSD_LPSURFACE; ddsd.lpSurface = data; hr = IDirectDrawSurface7_SetSurfaceDesc(surface, &ddsd, 0); - ok(SUCCEEDED(hr), "Failed to set surface desc, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set surface desc, hr %#lx.\n", hr);
/* Redundantly setting the same lpSurface is not an error. */ hr = IDirectDrawSurface7_SetSurfaceDesc(surface, &ddsd, 0); - ok(SUCCEEDED(hr), "Failed to set surface desc, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set surface desc, hr %#lx.\n", hr);
hr = IDirectDrawSurface7_GetSurfaceDesc(surface, &ddsd); - ok(SUCCEEDED(hr), "Failed to get surface desc, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get surface desc, hr %#lx.\n", hr); ok(!(ddsd.dwFlags & DDSD_LPSURFACE), "DDSD_LPSURFACE is set.\n"); ok(ddsd.lpSurface == NULL, "lpSurface is %p, expected NULL.\n", ddsd.lpSurface);
hr = IDirectDrawSurface7_Lock(surface, NULL, &ddsd, 0, NULL); - ok(SUCCEEDED(hr), "Failed to lock surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to lock surface, hr %#lx.\n", hr); ok(!(ddsd.dwFlags & DDSD_LPSURFACE), "DDSD_LPSURFACE is set.\n"); ok(ddsd.lpSurface == data, "lpSurface is %p, expected %p.\n", data, data); hr = IDirectDrawSurface7_Unlock(surface, NULL); - ok(SUCCEEDED(hr), "Failed to unlock surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to unlock surface, hr %#lx.\n", hr);
reset_ddsd(&ddsd); ddsd.dwFlags = DDSD_LPSURFACE; ddsd.lpSurface = data; hr = IDirectDrawSurface7_SetSurfaceDesc(surface, &ddsd, 1); - ok(hr == DDERR_INVALIDPARAMS, "SetSurfaceDesc with flags=1 returned %#x.\n", hr); + ok(hr == DDERR_INVALIDPARAMS, "SetSurfaceDesc with flags=1 returned %#lx.\n", hr);
ddsd.lpSurface = NULL; hr = IDirectDrawSurface7_SetSurfaceDesc(surface, &ddsd, 0); - ok(hr == DDERR_INVALIDPARAMS, "Setting lpSurface=NULL returned %#x.\n", hr); + ok(hr == DDERR_INVALIDPARAMS, "Setting lpSurface=NULL returned %#lx.\n", hr);
hr = IDirectDrawSurface7_SetSurfaceDesc(surface, NULL, 0); - ok(hr == DDERR_INVALIDPARAMS, "SetSurfaceDesc with NULL desc returned %#x.\n", hr); + ok(hr == DDERR_INVALIDPARAMS, "SetSurfaceDesc with NULL desc returned %#lx.\n", hr);
hr = IDirectDrawSurface7_GetSurfaceDesc(surface, &ddsd); - ok(SUCCEEDED(hr), "Failed to get surface desc, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get surface desc, hr %#lx.\n", hr); ok(ddsd.ddsCaps.dwCaps == (DDSCAPS_SYSTEMMEMORY | DDSCAPS_OFFSCREENPLAIN), - "Got unexpected caps %#x.\n", ddsd.ddsCaps.dwCaps); + "Got unexpected caps %#lx.\n", ddsd.ddsCaps.dwCaps); ok(ddsd.ddsCaps.dwCaps2 == 0, "Got unexpected caps2 %#x.\n", 0);
/* Setting the caps is an error. This also means the original description cannot be reapplied. */ hr = IDirectDrawSurface7_SetSurfaceDesc(surface, &ddsd, 0); - ok(hr == DDERR_INVALIDPARAMS, "Setting the original desc returned %#x.\n", hr); + ok(hr == DDERR_INVALIDPARAMS, "Setting the original desc returned %#lx.\n", hr);
ddsd.dwFlags = DDSD_CAPS; hr = IDirectDrawSurface7_SetSurfaceDesc(surface, &ddsd, 0); - ok(hr == DDERR_INVALIDPARAMS, "Setting DDSD_CAPS returned %#x.\n", hr); + ok(hr == DDERR_INVALIDPARAMS, "Setting DDSD_CAPS returned %#lx.\n", hr);
/* dwCaps = 0 is allowed, but ignored. Caps2 can be anything and is ignored too. */ ddsd.dwFlags = DDSD_CAPS | DDSD_LPSURFACE; ddsd.lpSurface = data; hr = IDirectDrawSurface7_SetSurfaceDesc(surface, &ddsd, 0); - ok(hr == DDERR_INVALIDCAPS, "Setting DDSD_CAPS returned %#x.\n", hr); + ok(hr == DDERR_INVALIDCAPS, "Setting DDSD_CAPS returned %#lx.\n", hr); ddsd.ddsCaps.dwCaps = DDSCAPS_SYSTEMMEMORY | DDSCAPS_OFFSCREENPLAIN; hr = IDirectDrawSurface7_SetSurfaceDesc(surface, &ddsd, 0); - ok(hr == DDERR_INVALIDCAPS, "Setting DDSD_CAPS returned %#x.\n", hr); + ok(hr == DDERR_INVALIDCAPS, "Setting DDSD_CAPS returned %#lx.\n", hr); ddsd.ddsCaps.dwCaps = 0; ddsd.ddsCaps.dwCaps2 = 0xdeadbeef; hr = IDirectDrawSurface7_SetSurfaceDesc(surface, &ddsd, 0); - ok(SUCCEEDED(hr), "Failed to set surface desc, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set surface desc, hr %#lx.\n", hr);
hr = IDirectDrawSurface7_GetSurfaceDesc(surface, &ddsd); - ok(SUCCEEDED(hr), "Failed to get surface desc, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get surface desc, hr %#lx.\n", hr); ok(ddsd.ddsCaps.dwCaps == (DDSCAPS_SYSTEMMEMORY | DDSCAPS_OFFSCREENPLAIN), - "Got unexpected caps %#x.\n", ddsd.ddsCaps.dwCaps); + "Got unexpected caps %#lx.\n", ddsd.ddsCaps.dwCaps); ok(ddsd.ddsCaps.dwCaps2 == 0, "Got unexpected caps2 %#x.\n", 0);
/* Setting the height is allowed, but it cannot be set to 0, and only if LPSURFACE is set too. */ @@ -7580,56 +7580,56 @@ static void test_set_surface_desc(void) ddsd.dwFlags = DDSD_HEIGHT; ddsd.dwHeight = 16; hr = IDirectDrawSurface7_SetSurfaceDesc(surface, &ddsd, 0); - ok(hr == DDERR_INVALIDPARAMS, "Setting height without lpSurface returned %#x.\n", hr); + ok(hr == DDERR_INVALIDPARAMS, "Setting height without lpSurface returned %#lx.\n", hr);
ddsd.lpSurface = data; ddsd.dwFlags = DDSD_HEIGHT | DDSD_LPSURFACE; hr = IDirectDrawSurface7_SetSurfaceDesc(surface, &ddsd, 0); - ok(SUCCEEDED(hr), "Failed to set surface desc, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set surface desc, hr %#lx.\n", hr);
ddsd.dwHeight = 0; hr = IDirectDrawSurface7_SetSurfaceDesc(surface, &ddsd, 0); - ok(hr == DDERR_INVALIDPARAMS, "Setting height=0 returned %#x.\n", hr); + ok(hr == DDERR_INVALIDPARAMS, "Setting height=0 returned %#lx.\n", hr);
reset_ddsd(&ddsd); hr = IDirectDrawSurface7_GetSurfaceDesc(surface, &ddsd); - ok(SUCCEEDED(hr), "GetSurfaceDesc failed, hr %#x.\n", hr); - ok(ddsd.dwWidth == 8, "SetSurfaceDesc: Expected width 8, got %u.\n", ddsd.dwWidth); - ok(ddsd.dwHeight == 16, "SetSurfaceDesc: Expected height 16, got %u.\n", ddsd.dwHeight); + ok(SUCCEEDED(hr), "GetSurfaceDesc failed, hr %#lx.\n", hr); + ok(ddsd.dwWidth == 8, "SetSurfaceDesc: Expected width 8, got %lu.\n", ddsd.dwWidth); + ok(ddsd.dwHeight == 16, "SetSurfaceDesc: Expected height 16, got %lu.\n", ddsd.dwHeight);
/* Pitch and width can be set, but only together, and only with LPSURFACE. They must not be 0. */ reset_ddsd(&ddsd); ddsd.dwFlags = DDSD_PITCH; U1(ddsd).lPitch = 8 * 4; hr = IDirectDrawSurface7_SetSurfaceDesc(surface, &ddsd, 0); - ok(hr == DDERR_INVALIDPARAMS, "Setting pitch without lpSurface or width returned %#x.\n", hr); + ok(hr == DDERR_INVALIDPARAMS, "Setting pitch without lpSurface or width returned %#lx.\n", hr);
ddsd.dwFlags = DDSD_WIDTH; ddsd.dwWidth = 16; hr = IDirectDrawSurface7_SetSurfaceDesc(surface, &ddsd, 0); - ok(hr == DDERR_INVALIDPARAMS, "Setting width without lpSurface or pitch returned %#x.\n", hr); + ok(hr == DDERR_INVALIDPARAMS, "Setting width without lpSurface or pitch returned %#lx.\n", hr);
ddsd.dwFlags = DDSD_PITCH | DDSD_LPSURFACE; ddsd.lpSurface = data; hr = IDirectDrawSurface7_SetSurfaceDesc(surface, &ddsd, 0); - ok(hr == DDERR_INVALIDPARAMS, "Setting pitch and lpSurface without width returned %#x.\n", hr); + ok(hr == DDERR_INVALIDPARAMS, "Setting pitch and lpSurface without width returned %#lx.\n", hr);
ddsd.dwFlags = DDSD_WIDTH | DDSD_LPSURFACE; hr = IDirectDrawSurface7_SetSurfaceDesc(surface, &ddsd, 0); - ok(hr == DDERR_INVALIDPARAMS, "Setting width and lpSurface without pitch returned %#x.\n", hr); + ok(hr == DDERR_INVALIDPARAMS, "Setting width and lpSurface without pitch returned %#lx.\n", hr);
ddsd.dwFlags = DDSD_WIDTH | DDSD_PITCH | DDSD_LPSURFACE; U1(ddsd).lPitch = 16 * 4; ddsd.dwWidth = 16; hr = IDirectDrawSurface7_SetSurfaceDesc(surface, &ddsd, 0); - ok(SUCCEEDED(hr), "Failed to set surface desc, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set surface desc, hr %#lx.\n", hr);
reset_ddsd(&ddsd); hr = IDirectDrawSurface7_GetSurfaceDesc(surface, &ddsd); - ok(SUCCEEDED(hr), "Failed to get surface desc, hr %#x.\n", hr); - ok(ddsd.dwWidth == 16, "SetSurfaceDesc: Expected width 8, got %u.\n", ddsd.dwWidth); - ok(ddsd.dwHeight == 16, "SetSurfaceDesc: Expected height 16, got %u.\n", ddsd.dwHeight); - ok(U1(ddsd).lPitch == 16 * 4, "SetSurfaceDesc: Expected pitch 64, got %u.\n", U1(ddsd).lPitch); + ok(SUCCEEDED(hr), "Failed to get surface desc, hr %#lx.\n", hr); + ok(ddsd.dwWidth == 16, "SetSurfaceDesc: Expected width 8, got %lu.\n", ddsd.dwWidth); + ok(ddsd.dwHeight == 16, "SetSurfaceDesc: Expected height 16, got %lu.\n", ddsd.dwHeight); + ok(U1(ddsd).lPitch == 16 * 4, "SetSurfaceDesc: Expected pitch 64, got %lu.\n", U1(ddsd).lPitch);
/* The pitch must be 32 bit aligned and > 0, but is not verified for sanity otherwise. * @@ -7638,27 +7638,27 @@ static void test_set_surface_desc(void) U1(ddsd).lPitch = 4 * 4; ddsd.lpSurface = data; hr = IDirectDrawSurface7_SetSurfaceDesc(surface, &ddsd, 0); - ok(SUCCEEDED(hr) || broken(hr == DDERR_INVALIDPARAMS), "Failed to set surface desc, hr %#x.\n", hr); + ok(SUCCEEDED(hr) || broken(hr == DDERR_INVALIDPARAMS), "Failed to set surface desc, hr %#lx.\n", hr);
U1(ddsd).lPitch = 4; hr = IDirectDrawSurface7_SetSurfaceDesc(surface, &ddsd, 0); - ok(SUCCEEDED(hr) || broken(hr == DDERR_INVALIDPARAMS), "Failed to set surface desc, hr %#x.\n", hr); + ok(SUCCEEDED(hr) || broken(hr == DDERR_INVALIDPARAMS), "Failed to set surface desc, hr %#lx.\n", hr);
U1(ddsd).lPitch = 16 * 4 + 1; hr = IDirectDrawSurface7_SetSurfaceDesc(surface, &ddsd, 0); - ok(hr == DDERR_INVALIDPARAMS, "Setting misaligned pitch returned %#x.\n", hr); + ok(hr == DDERR_INVALIDPARAMS, "Setting misaligned pitch returned %#lx.\n", hr);
U1(ddsd).lPitch = 16 * 4 + 3; hr = IDirectDrawSurface7_SetSurfaceDesc(surface, &ddsd, 0); - ok(hr == DDERR_INVALIDPARAMS, "Setting misaligned pitch returned %#x.\n", hr); + ok(hr == DDERR_INVALIDPARAMS, "Setting misaligned pitch returned %#lx.\n", hr);
U1(ddsd).lPitch = -4; hr = IDirectDrawSurface7_SetSurfaceDesc(surface, &ddsd, 0); - ok(hr == DDERR_INVALIDPARAMS, "Setting negative pitch returned %#x.\n", hr); + ok(hr == DDERR_INVALIDPARAMS, "Setting negative pitch returned %#lx.\n", hr);
U1(ddsd).lPitch = 16 * 4; hr = IDirectDrawSurface7_SetSurfaceDesc(surface, &ddsd, 0); - ok(SUCCEEDED(hr), "Failed to set surface desc, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set surface desc, hr %#lx.\n", hr);
reset_ddsd(&ddsd); ddsd.dwFlags = DDSD_WIDTH | DDSD_PITCH | DDSD_LPSURFACE; @@ -7666,13 +7666,13 @@ static void test_set_surface_desc(void) ddsd.dwWidth = 16; ddsd.lpSurface = data; hr = IDirectDrawSurface7_SetSurfaceDesc(surface, &ddsd, 0); - ok(hr == DDERR_INVALIDPARAMS, "Setting zero pitch returned %#x.\n", hr); + ok(hr == DDERR_INVALIDPARAMS, "Setting zero pitch returned %#lx.\n", hr);
ddsd.dwFlags = DDSD_WIDTH | DDSD_PITCH | DDSD_LPSURFACE; U1(ddsd).lPitch = 16 * 4; ddsd.dwWidth = 0; hr = IDirectDrawSurface7_SetSurfaceDesc(surface, &ddsd, 0); - ok(hr == DDERR_INVALIDPARAMS, "Setting zero width returned %#x.\n", hr); + ok(hr == DDERR_INVALIDPARAMS, "Setting zero width returned %#lx.\n", hr);
/* Setting the pixelformat without LPSURFACE is an error, but with LPSURFACE it works. */ ddsd.dwFlags = DDSD_PIXELFORMAT; @@ -7683,11 +7683,11 @@ static void test_set_surface_desc(void) U3(U4(ddsd).ddpfPixelFormat).dwGBitMask = 0x0000ff00; U4(U4(ddsd).ddpfPixelFormat).dwBBitMask = 0x000000ff; hr = IDirectDrawSurface7_SetSurfaceDesc(surface, &ddsd, 0); - ok(hr == DDERR_INVALIDPARAMS, "Setting the pixel format returned %#x.\n", hr); + ok(hr == DDERR_INVALIDPARAMS, "Setting the pixel format returned %#lx.\n", hr);
ddsd.dwFlags = DDSD_PIXELFORMAT | DDSD_LPSURFACE; hr = IDirectDrawSurface7_SetSurfaceDesc(surface, &ddsd, 0); - ok(SUCCEEDED(hr), "Failed to set surface desc, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set surface desc, hr %#lx.\n", hr);
/* Can't set color keys. */ reset_ddsd(&ddsd); @@ -7695,12 +7695,12 @@ static void test_set_surface_desc(void) ddsd.ddckCKSrcBlt.dwColorSpaceLowValue = 0x00ff0000; ddsd.ddckCKSrcBlt.dwColorSpaceHighValue = 0x00ff0000; hr = IDirectDrawSurface7_SetSurfaceDesc(surface, &ddsd, 0); - ok(hr == DDERR_INVALIDPARAMS, "Setting ddckCKSrcBlt returned %#x.\n", hr); + ok(hr == DDERR_INVALIDPARAMS, "Setting ddckCKSrcBlt returned %#lx.\n", hr);
ddsd.dwFlags = DDSD_CKSRCBLT | DDSD_LPSURFACE; ddsd.lpSurface = data; hr = IDirectDrawSurface7_SetSurfaceDesc(surface, &ddsd, 0); - ok(hr == DDERR_INVALIDPARAMS, "Setting ddckCKSrcBlt returned %#x.\n", hr); + ok(hr == DDERR_INVALIDPARAMS, "Setting ddckCKSrcBlt returned %#lx.\n", hr);
IDirectDrawSurface7_Release(surface);
@@ -7713,7 +7713,7 @@ static void test_set_surface_desc(void) ddsd.ddsCaps.dwCaps = DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_COMPLEX | DDSCAPS_MIPMAP;
hr = IDirectDraw7_CreateSurface(ddraw, &ddsd, &surface, NULL); - ok(hr == DD_OK || hr == DDERR_NODIRECTDRAWHW || hr == E_NOINTERFACE, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK || hr == DDERR_NODIRECTDRAWHW || hr == E_NOINTERFACE, "Got unexpected hr %#lx.\n", hr);
if (FAILED(hr)) { @@ -7724,13 +7724,13 @@ static void test_set_surface_desc(void) /* Changing surface desc for mipmap fails even without changing any * parameters. */ hr = IDirectDrawSurface7_SetSurfaceDesc(surface, &ddsd, 0); - ok(hr == DDERR_INVALIDSURFACETYPE, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_INVALIDSURFACETYPE, "Got unexpected hr %#lx.\n", hr);
reset_ddsd(&ddsd); ddsd.dwFlags = DDSD_LPSURFACE; ddsd.lpSurface = data; hr = IDirectDrawSurface7_SetSurfaceDesc(surface, &ddsd, 0); - ok(hr == DDERR_INVALIDSURFACETYPE, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_INVALIDSURFACETYPE, "Got unexpected hr %#lx.\n", hr); IDirectDrawSurface7_Release(surface); }
@@ -7743,7 +7743,7 @@ static void test_set_surface_desc(void) ddsd.ddsCaps.dwCaps = DDSCAPS_TEXTURE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_COMPLEX | DDSCAPS_MIPMAP;
hr = IDirectDraw7_CreateSurface(ddraw, &ddsd, &surface, NULL); - ok(hr == DD_OK || hr == DDERR_NODIRECTDRAWHW || hr == E_NOINTERFACE, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK || hr == DDERR_NODIRECTDRAWHW || hr == E_NOINTERFACE, "Got unexpected hr %#lx.\n", hr);
if (hr == DD_OK) { @@ -7752,14 +7752,14 @@ static void test_set_surface_desc(void) IDirectDrawSurface7 *surface2;
hr = IDirectDrawSurface7_GetAttachedSurface(surface, &caps, &surface2); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); reset_ddsd(&ddsd); hr = IDirectDrawSurface7_GetSurfaceDesc(surface2, &ddsd); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); - ok(ddsd.dwWidth == 4, "Got unexpected dwWidth %u.\n", ddsd.dwWidth); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); + ok(ddsd.dwWidth == 4, "Got unexpected dwWidth %lu.\n", ddsd.dwWidth);
hr = IDirectDrawSurface7_Lock(surface2, NULL, &ddsd, 0, NULL); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); surface2_system_mem = ddsd.lpSurface; IDirectDrawSurface7_Unlock(surface2, NULL);
@@ -7770,7 +7770,7 @@ static void test_set_surface_desc(void) U1(ddsd).lPitch = 16 * 4; ddsd.lpSurface = data; hr = IDirectDrawSurface7_SetSurfaceDesc(surface, &ddsd, 0); - todo_wine ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + todo_wine ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr);
reset_ddsd(&ddsd); ddsd.dwFlags = DDSD_WIDTH | DDSD_HEIGHT | DDSD_PITCH | DDSD_LPSURFACE; @@ -7779,11 +7779,11 @@ static void test_set_surface_desc(void) U1(ddsd).lPitch = 8 * 4; ddsd.lpSurface = data; hr = IDirectDrawSurface7_SetSurfaceDesc(surface, &ddsd, 0); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr);
reset_ddsd(&ddsd); hr = IDirectDrawSurface7_Lock(surface2, NULL, &ddsd, 0, NULL); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); ok(ddsd.lpSurface == surface2_system_mem, "Got unexpected lpSurface %p.\n", ddsd.lpSurface); IDirectDrawSurface7_Unlock(surface2, NULL);
@@ -7794,11 +7794,11 @@ static void test_set_surface_desc(void) U1(ddsd).lPitch = 4 * 4; ddsd.lpSurface = data; hr = IDirectDrawSurface7_SetSurfaceDesc(surface2, &ddsd, 0); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr);
reset_ddsd(&ddsd); hr = IDirectDrawSurface7_Lock(surface2, NULL, &ddsd, 0, NULL); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); ok(ddsd.lpSurface == data, "Got unexpected lpSurface %p.\n", ddsd.lpSurface); IDirectDrawSurface7_Unlock(surface2, NULL);
@@ -7809,7 +7809,7 @@ static void test_set_surface_desc(void) U1(ddsd).lPitch = 16 * 4; ddsd.lpSurface = data; hr = IDirectDrawSurface7_SetSurfaceDesc(surface2, &ddsd, 0); - todo_wine ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + todo_wine ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr);
IDirectDrawSurface7_Release(surface2); IDirectDrawSurface7_Release(surface); @@ -7824,10 +7824,10 @@ static void test_set_surface_desc(void) U1(ddsd).lPitch = 8 * 4; ddsd.ddsCaps.dwCaps = DDSCAPS_SYSTEMMEMORY | DDSCAPS_OFFSCREENPLAIN; hr = IDirectDraw7_CreateSurface(ddraw, &ddsd, &surface, NULL); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr);
hr = IDirectDrawSurface7_SetSurfaceDesc(surface, &ddsd, 0); - ok(hr == DDERR_INVALIDCAPS, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_INVALIDCAPS, "Got unexpected hr %#lx.\n", hr);
reset_ddsd(&ddsd); ddsd.dwFlags = DDSD_WIDTH | DDSD_HEIGHT; @@ -7835,7 +7835,7 @@ static void test_set_surface_desc(void) ddsd.dwHeight = 8; /* Cannot reset lpSurface. */ hr = IDirectDrawSurface7_SetSurfaceDesc(surface, &ddsd, 0); - ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#lx.\n", hr);
reset_ddsd(&ddsd); ddsd.dwFlags = DDSD_WIDTH | DDSD_HEIGHT | DDSD_LPSURFACE | DDSD_PITCH; @@ -7845,7 +7845,7 @@ static void test_set_surface_desc(void) U1(ddsd).lPitch = 8 * 4; /* Can change the parameters of surface created with DDSD_LPSURFACE. */ hr = IDirectDrawSurface7_SetSurfaceDesc(surface, &ddsd, 0); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr);
IDirectDrawSurface7_Release(surface);
@@ -7874,9 +7874,9 @@ static void test_set_surface_desc(void)
hr = IDirectDraw7_CreateSurface(ddraw, &ddsd, &surface, NULL); if (is_ddraw64 && (invalid_caps_tests[i].caps & DDSCAPS_TEXTURE)) - todo_wine ok(hr == E_NOINTERFACE, "Test %u: Got unexpected hr %#x.\n", i, hr); + todo_wine ok(hr == E_NOINTERFACE, "Test %u: Got unexpected hr %#lx.\n", i, hr); else - ok(hr == DD_OK || hr == DDERR_NODIRECTDRAWHW, "Test %u: Got unexpected hr %#x.\n", i, hr); + ok(hr == DD_OK || hr == DDERR_NODIRECTDRAWHW, "Test %u: Got unexpected hr %#lx.\n", i, hr); if (FAILED(hr)) continue;
@@ -7886,17 +7886,17 @@ static void test_set_surface_desc(void) hr = IDirectDrawSurface7_SetSurfaceDesc(surface, &ddsd, 0); if (invalid_caps_tests[i].supported) { - ok(SUCCEEDED(hr), "Failed to set surface desc, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set surface desc, hr %#lx.\n", hr); } else { - ok(hr == DDERR_INVALIDSURFACETYPE, "SetSurfaceDesc on a %s surface returned %#x.\n", + ok(hr == DDERR_INVALIDSURFACETYPE, "SetSurfaceDesc on a %s surface returned %#lx.\n", invalid_caps_tests[i].name, hr);
/* Check priority of error conditions. */ ddsd.dwFlags = DDSD_WIDTH; hr = IDirectDrawSurface7_SetSurfaceDesc(surface, &ddsd, 0); - ok(hr == DDERR_INVALIDSURFACETYPE, "SetSurfaceDesc on a %s surface returned %#x.\n", + ok(hr == DDERR_INVALIDSURFACETYPE, "SetSurfaceDesc on a %s surface returned %#lx.\n", invalid_caps_tests[i].name, hr); }
@@ -7904,7 +7904,7 @@ static void test_set_surface_desc(void) }
ref = IDirectDraw7_Release(ddraw); - ok(ref == 0, "Ddraw object not properly released, refcount %u.\n", ref); + ok(ref == 0, "Ddraw object not properly released, refcount %lu.\n", ref); DestroyWindow(window); }
@@ -7927,7 +7927,7 @@ static void test_user_memory_getdc(void) ddraw = create_ddraw(); ok(!!ddraw, "Failed to create a ddraw object.\n"); hr = IDirectDraw7_SetCooperativeLevel(ddraw, window, DDSCL_NORMAL); - ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#lx.\n", hr);
reset_ddsd(&ddsd); ddsd.dwFlags = DDSD_WIDTH | DDSD_HEIGHT | DDSD_CAPS | DDSD_PIXELFORMAT; @@ -7941,17 +7941,17 @@ static void test_user_memory_getdc(void) U4(U4(ddsd).ddpfPixelFormat).dwBBitMask = 0x000000ff; ddsd.ddsCaps.dwCaps = DDSCAPS_SYSTEMMEMORY | DDSCAPS_OFFSCREENPLAIN; hr = IDirectDraw7_CreateSurface(ddraw, &ddsd, &surface, NULL); - ok(SUCCEEDED(hr), "Failed to create surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create surface, hr %#lx.\n", hr);
memset(data, 0xaa, sizeof(data)); reset_ddsd(&ddsd); ddsd.dwFlags = DDSD_LPSURFACE; ddsd.lpSurface = data; hr = IDirectDrawSurface7_SetSurfaceDesc(surface, &ddsd, 0); - ok(SUCCEEDED(hr), "Failed to set surface desc, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set surface desc, hr %#lx.\n", hr);
hr = IDirectDrawSurface7_GetDC(surface, &dc); - ok(SUCCEEDED(hr), "Failed to get DC, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get DC, hr %#lx.\n", hr); bitmap = GetCurrentObject(dc, OBJ_BITMAP); ok(!!bitmap, "Failed to get bitmap.\n"); size = GetObjectA(bitmap, sizeof(dib), &dib); @@ -7960,10 +7960,10 @@ static void test_user_memory_getdc(void) BitBlt(dc, 0, 0, 16, 8, NULL, 0, 0, WHITENESS); BitBlt(dc, 0, 8, 16, 8, NULL, 0, 0, BLACKNESS); hr = IDirectDrawSurface7_ReleaseDC(surface, dc); - ok(SUCCEEDED(hr), "Failed to release DC, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to release DC, hr %#lx.\n", hr);
- ok(data[0][0] == 0xffffffff, "Expected color 0xffffffff, got %#x.\n", data[0][0]); - ok(data[15][15] == 0x00000000, "Expected color 0x00000000, got %#x.\n", data[15][15]); + ok(data[0][0] == 0xffffffff, "Expected color 0xffffffff, got %#lx.\n", data[0][0]); + ok(data[15][15] == 0x00000000, "Expected color 0x00000000, got %#lx.\n", data[15][15]);
ddsd.dwFlags = DDSD_LPSURFACE | DDSD_HEIGHT | DDSD_WIDTH | DDSD_PITCH; ddsd.lpSurface = data; @@ -7971,40 +7971,40 @@ static void test_user_memory_getdc(void) ddsd.dwHeight = 8; U1(ddsd).lPitch = sizeof(*data); hr = IDirectDrawSurface7_SetSurfaceDesc(surface, &ddsd, 0); - ok(SUCCEEDED(hr), "Failed to set surface desc, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set surface desc, hr %#lx.\n", hr);
memset(data, 0xaa, sizeof(data)); hr = IDirectDrawSurface7_GetDC(surface, &dc); - ok(SUCCEEDED(hr), "Failed to get DC, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get DC, hr %#lx.\n", hr); BitBlt(dc, 0, 0, 4, 8, NULL, 0, 0, BLACKNESS); BitBlt(dc, 1, 1, 2, 2, NULL, 0, 0, WHITENESS); hr = IDirectDrawSurface7_ReleaseDC(surface, dc); - ok(SUCCEEDED(hr), "Failed to release DC, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to release DC, hr %#lx.\n", hr);
for (y = 0; y < 4; y++) { for (x = 0; x < 4; x++) { if ((x == 1 || x == 2) && (y == 1 || y == 2)) - ok(data[y][x] == 0xffffffff, "Expected color 0xffffffff on position %ux%u, got %#x.\n", + ok(data[y][x] == 0xffffffff, "Expected color 0xffffffff on position %ux%u, got %#lx.\n", x, y, data[y][x]); else - ok(data[y][x] == 0x00000000, "Expected color 0x00000000 on position %ux%u, got %#x.\n", + ok(data[y][x] == 0x00000000, "Expected color 0x00000000 on position %ux%u, got %#lx.\n", x, y, data[y][x]); } } - ok(data[0][5] == 0xaaaaaaaa, "Expected color 0xaaaaaaaa on position 5x0, got %#x.\n", + ok(data[0][5] == 0xaaaaaaaa, "Expected color 0xaaaaaaaa on position 5x0, got %#lx.\n", data[0][5]); - ok(data[7][3] == 0x00000000, "Expected color 0x00000000 on position 3x7, got %#x.\n", + ok(data[7][3] == 0x00000000, "Expected color 0x00000000 on position 3x7, got %#lx.\n", data[7][3]); - ok(data[7][4] == 0xaaaaaaaa, "Expected color 0xaaaaaaaa on position 4x7, got %#x.\n", + ok(data[7][4] == 0xaaaaaaaa, "Expected color 0xaaaaaaaa on position 4x7, got %#lx.\n", data[7][4]); - ok(data[8][0] == 0xaaaaaaaa, "Expected color 0xaaaaaaaa on position 0x8, got %#x.\n", + ok(data[8][0] == 0xaaaaaaaa, "Expected color 0xaaaaaaaa on position 0x8, got %#lx.\n", data[8][0]);
IDirectDrawSurface7_Release(surface); ref = IDirectDraw7_Release(ddraw); - ok(ref == 0, "Ddraw object not properly released, refcount %u.\n", ref); + ok(ref == 0, "Ddraw object not properly released, refcount %lu.\n", ref); DestroyWindow(window); }
@@ -8021,7 +8021,7 @@ static void test_sysmem_overlay(void) ddraw = create_ddraw(); ok(!!ddraw, "Failed to create a ddraw object.\n"); hr = IDirectDraw7_SetCooperativeLevel(ddraw, window, DDSCL_NORMAL); - ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#lx.\n", hr);
reset_ddsd(&ddsd); ddsd.dwFlags = DDSD_CAPS | DDSD_PIXELFORMAT | DDSD_WIDTH | DDSD_HEIGHT; @@ -8035,10 +8035,10 @@ static void test_sysmem_overlay(void) U3(U4(ddsd).ddpfPixelFormat).dwGBitMask = 0x0000ff00; U4(U4(ddsd).ddpfPixelFormat).dwBBitMask = 0x000000ff; hr = IDirectDraw7_CreateSurface(ddraw, &ddsd, &surface, NULL); - ok(hr == DDERR_NOOVERLAYHW, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_NOOVERLAYHW, "Got unexpected hr %#lx.\n", hr);
ref = IDirectDraw7_Release(ddraw); - ok(ref == 0, "Ddraw object not properly released, refcount %u.\n", ref); + ok(ref == 0, "Ddraw object not properly released, refcount %lu.\n", ref); DestroyWindow(window); }
@@ -8066,7 +8066,7 @@ static void test_primary_palette(void) return; } hr = IDirectDraw7_SetCooperativeLevel(ddraw, window, DDSCL_EXCLUSIVE | DDSCL_FULLSCREEN); - ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#lx.\n", hr);
memset(&surface_desc, 0, sizeof(surface_desc)); surface_desc.dwSize = sizeof(surface_desc); @@ -8074,22 +8074,22 @@ static void test_primary_palette(void) surface_desc.ddsCaps.dwCaps = DDSCAPS_PRIMARYSURFACE | DDSCAPS_COMPLEX | DDSCAPS_FLIP; U5(surface_desc).dwBackBufferCount = 1; hr = IDirectDraw7_CreateSurface(ddraw, &surface_desc, &primary, NULL); - ok(SUCCEEDED(hr), "Failed to create surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create surface, hr %#lx.\n", hr); hr = IDirectDrawSurface7_GetAttachedSurface(primary, &surface_caps, &backbuffer); - ok(SUCCEEDED(hr), "Failed to get attached surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get attached surface, hr %#lx.\n", hr);
memset(palette_entries, 0, sizeof(palette_entries)); hr = IDirectDraw7_CreatePalette(ddraw, DDPCAPS_8BIT | DDPCAPS_ALLOW256, palette_entries, &palette, NULL); - ok(SUCCEEDED(hr), "Failed to create palette, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create palette, hr %#lx.\n", hr); refcount = get_refcount((IUnknown *)palette); - ok(refcount == 1, "Got unexpected refcount %u.\n", refcount); + ok(refcount == 1, "Got unexpected refcount %lu.\n", refcount);
hr = IDirectDrawPalette_GetCaps(palette, &palette_caps); - ok(SUCCEEDED(hr), "Failed to get palette caps, hr %#x.\n", hr); - ok(palette_caps == (DDPCAPS_8BIT | DDPCAPS_ALLOW256), "Got unexpected palette caps %#x.\n", palette_caps); + ok(SUCCEEDED(hr), "Failed to get palette caps, hr %#lx.\n", hr); + ok(palette_caps == (DDPCAPS_8BIT | DDPCAPS_ALLOW256), "Got unexpected palette caps %#lx.\n", palette_caps);
hr = IDirectDrawSurface7_SetPalette(primary, palette); - ok(SUCCEEDED(hr), "Failed to set palette, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set palette, hr %#lx.\n", hr);
/* The Windows 8 testbot attaches the palette to the backbuffer as well, * and is generally somewhat broken with respect to 8 bpp / palette @@ -8102,99 +8102,99 @@ static void test_primary_palette(void) /* The Windows 8 testbot keeps extra references to the primary and * backbuffer while in 8 bpp mode. */ hr = IDirectDraw7_RestoreDisplayMode(ddraw); - ok(SUCCEEDED(hr), "Failed to restore display mode, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to restore display mode, hr %#lx.\n", hr); goto done; }
refcount = get_refcount((IUnknown *)palette); - ok(refcount == 2, "Got unexpected refcount %u.\n", refcount); + ok(refcount == 2, "Got unexpected refcount %lu.\n", refcount);
hr = IDirectDrawPalette_GetCaps(palette, &palette_caps); - ok(SUCCEEDED(hr), "Failed to get palette caps, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get palette caps, hr %#lx.\n", hr); ok(palette_caps == (DDPCAPS_8BIT | DDPCAPS_PRIMARYSURFACE | DDPCAPS_ALLOW256), - "Got unexpected palette caps %#x.\n", palette_caps); + "Got unexpected palette caps %#lx.\n", palette_caps);
hr = IDirectDrawSurface7_SetPalette(primary, NULL); - ok(SUCCEEDED(hr), "Failed to set palette, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set palette, hr %#lx.\n", hr); refcount = get_refcount((IUnknown *)palette); - ok(refcount == 1, "Got unexpected refcount %u.\n", refcount); + ok(refcount == 1, "Got unexpected refcount %lu.\n", refcount);
hr = IDirectDrawPalette_GetCaps(palette, &palette_caps); - ok(SUCCEEDED(hr), "Failed to get palette caps, hr %#x.\n", hr); - ok(palette_caps == (DDPCAPS_8BIT | DDPCAPS_ALLOW256), "Got unexpected palette caps %#x.\n", palette_caps); + ok(SUCCEEDED(hr), "Failed to get palette caps, hr %#lx.\n", hr); + ok(palette_caps == (DDPCAPS_8BIT | DDPCAPS_ALLOW256), "Got unexpected palette caps %#lx.\n", palette_caps);
hr = IDirectDrawSurface7_SetPalette(primary, palette); - ok(SUCCEEDED(hr), "Failed to set palette, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set palette, hr %#lx.\n", hr); refcount = get_refcount((IUnknown *)palette); - ok(refcount == 2, "Got unexpected refcount %u.\n", refcount); + ok(refcount == 2, "Got unexpected refcount %lu.\n", refcount);
hr = IDirectDrawSurface7_GetPalette(primary, &tmp); - ok(SUCCEEDED(hr), "Failed to get palette, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get palette, hr %#lx.\n", hr); ok(tmp == palette, "Got unexpected palette %p, expected %p.\n", tmp, palette); IDirectDrawPalette_Release(tmp); hr = IDirectDrawSurface7_GetPalette(backbuffer, &tmp); - ok(hr == DDERR_NOPALETTEATTACHED, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_NOPALETTEATTACHED, "Got unexpected hr %#lx.\n", hr);
refcount = IDirectDrawPalette_Release(palette); - ok(refcount == 1, "Got unexpected refcount %u.\n", refcount); + ok(refcount == 1, "Got unexpected refcount %lu.\n", refcount); refcount = IDirectDrawPalette_Release(palette); - ok(!refcount, "Got unexpected refcount %u.\n", refcount); + ok(!refcount, "Got unexpected refcount %lu.\n", refcount);
/* Note that this only seems to work when the palette is attached to the * primary surface. When attached to a regular surface, attempting to get * the palette here will cause an access violation. */ hr = IDirectDrawSurface7_GetPalette(primary, &tmp); - ok(hr == DDERR_NOPALETTEATTACHED, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_NOPALETTEATTACHED, "Got unexpected hr %#lx.\n", hr);
hr = IDirectDrawSurface7_IsLost(primary); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr);
memset(&surface_desc, 0, sizeof(surface_desc)); surface_desc.dwSize = sizeof(surface_desc); hr = IDirectDrawSurface7_GetSurfaceDesc(primary, &surface_desc); - ok(SUCCEEDED(hr), "Failed to get surface desc, hr %#x.\n", hr); - ok(surface_desc.dwWidth == 640, "Got unexpected surface width %u.\n", surface_desc.dwWidth); - ok(surface_desc.dwHeight == 480, "Got unexpected surface height %u.\n", surface_desc.dwHeight); - ok(U1(U4(surface_desc).ddpfPixelFormat).dwRGBBitCount == 8, "Got unexpected bit count %u.\n", + ok(SUCCEEDED(hr), "Failed to get surface desc, hr %#lx.\n", hr); + ok(surface_desc.dwWidth == 640, "Got unexpected surface width %lu.\n", surface_desc.dwWidth); + ok(surface_desc.dwHeight == 480, "Got unexpected surface height %lu.\n", surface_desc.dwHeight); + ok(U1(U4(surface_desc).ddpfPixelFormat).dwRGBBitCount == 8, "Got unexpected bit count %lu.\n", U1(U4(surface_desc).ddpfPixelFormat).dwRGBBitCount);
hr = set_display_mode(ddraw, 640, 480); - ok(SUCCEEDED(hr), "Failed to set display mode, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set display mode, hr %#lx.\n", hr);
memset(&surface_desc, 0, sizeof(surface_desc)); surface_desc.dwSize = sizeof(surface_desc); hr = IDirectDrawSurface7_GetSurfaceDesc(primary, &surface_desc); - ok(SUCCEEDED(hr), "Failed to get surface desc, hr %#x.\n", hr); - ok(surface_desc.dwWidth == 640, "Got unexpected surface width %u.\n", surface_desc.dwWidth); - ok(surface_desc.dwHeight == 480, "Got unexpected surface height %u.\n", surface_desc.dwHeight); + ok(SUCCEEDED(hr), "Failed to get surface desc, hr %#lx.\n", hr); + ok(surface_desc.dwWidth == 640, "Got unexpected surface width %lu.\n", surface_desc.dwWidth); + ok(surface_desc.dwHeight == 480, "Got unexpected surface height %lu.\n", surface_desc.dwHeight); ok(U1(U4(surface_desc).ddpfPixelFormat).dwRGBBitCount == 32 || U1(U4(surface_desc).ddpfPixelFormat).dwRGBBitCount == 24, - "Got unexpected bit count %u.\n", U1(U4(surface_desc).ddpfPixelFormat).dwRGBBitCount); + "Got unexpected bit count %lu.\n", U1(U4(surface_desc).ddpfPixelFormat).dwRGBBitCount);
hr = IDirectDrawSurface7_IsLost(primary); - ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface7_Restore(primary); - ok(hr == DDERR_WRONGMODE, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_WRONGMODE, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface7_IsLost(primary); - ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#lx.\n", hr);
memset(&surface_desc, 0, sizeof(surface_desc)); surface_desc.dwSize = sizeof(surface_desc); hr = IDirectDrawSurface7_GetSurfaceDesc(primary, &surface_desc); - ok(SUCCEEDED(hr), "Failed to get surface desc, hr %#x.\n", hr); - ok(surface_desc.dwWidth == 640, "Got unexpected surface width %u.\n", surface_desc.dwWidth); - ok(surface_desc.dwHeight == 480, "Got unexpected surface height %u.\n", surface_desc.dwHeight); + ok(SUCCEEDED(hr), "Failed to get surface desc, hr %#lx.\n", hr); + ok(surface_desc.dwWidth == 640, "Got unexpected surface width %lu.\n", surface_desc.dwWidth); + ok(surface_desc.dwHeight == 480, "Got unexpected surface height %lu.\n", surface_desc.dwHeight); ok(U1(U4(surface_desc).ddpfPixelFormat).dwRGBBitCount == 32 || U1(U4(surface_desc).ddpfPixelFormat).dwRGBBitCount == 24, - "Got unexpected bit count %u.\n", U1(U4(surface_desc).ddpfPixelFormat).dwRGBBitCount); + "Got unexpected bit count %lu.\n", U1(U4(surface_desc).ddpfPixelFormat).dwRGBBitCount);
done: refcount = IDirectDrawSurface7_Release(backbuffer); - ok(refcount == 1, "Got unexpected refcount %u.\n", refcount); + ok(refcount == 1, "Got unexpected refcount %lu.\n", refcount); refcount = IDirectDrawSurface7_Release(primary); - ok(!refcount, "Got unexpected refcount %u.\n", refcount); + ok(!refcount, "Got unexpected refcount %lu.\n", refcount); refcount = IDirectDraw7_Release(ddraw); - ok(!refcount, "Got unexpected refcount %u.\n", refcount); + ok(!refcount, "Got unexpected refcount %lu.\n", refcount); DestroyWindow(window); }
@@ -8224,7 +8224,7 @@ static void test_surface_attachment(void) ddraw = create_ddraw(); ok(!!ddraw, "Failed to create a ddraw object.\n"); hr = IDirectDraw7_SetCooperativeLevel(ddraw, window, DDSCL_NORMAL); - ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#lx.\n", hr);
memset(&surface_desc, 0, sizeof(surface_desc)); surface_desc.dwSize = sizeof(surface_desc); @@ -8242,11 +8242,11 @@ static void test_surface_attachment(void) }
hr = IDirectDrawSurface7_GetAttachedSurface(surface1, &caps, &surface2); - ok(SUCCEEDED(hr), "Failed to get mip level, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get mip level, hr %#lx.\n", hr); hr = IDirectDrawSurface7_GetAttachedSurface(surface2, &caps, &surface3); - ok(SUCCEEDED(hr), "Failed to get mip level, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get mip level, hr %#lx.\n", hr); hr = IDirectDrawSurface7_GetAttachedSurface(surface3, &caps, &surface4); - ok(hr == DDERR_NOTFOUND, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_NOTFOUND, "Got unexpected hr %#lx.\n", hr);
surface_count = 0; IDirectDrawSurface7_EnumAttachedSurfaces(surface1, &surface_count, surface_counter); @@ -8265,20 +8265,20 @@ static void test_surface_attachment(void) surface_desc.dwWidth = 16; surface_desc.dwHeight = 16; hr = IDirectDraw7_CreateSurface(ddraw, &surface_desc, &surface4, NULL); - ok(SUCCEEDED(hr), "Failed to create surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create surface, hr %#lx.\n", hr);
hr = IDirectDrawSurface7_AddAttachedSurface(surface1, surface4); - ok(hr == DDERR_CANNOTATTACHSURFACE, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_CANNOTATTACHSURFACE, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface7_AddAttachedSurface(surface4, surface1); - ok(hr == DDERR_CANNOTATTACHSURFACE, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_CANNOTATTACHSURFACE, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface7_AddAttachedSurface(surface3, surface4); - ok(hr == DDERR_CANNOTATTACHSURFACE, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_CANNOTATTACHSURFACE, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface7_AddAttachedSurface(surface4, surface3); - ok(hr == DDERR_CANNOTATTACHSURFACE, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_CANNOTATTACHSURFACE, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface7_AddAttachedSurface(surface2, surface4); - ok(hr == DDERR_CANNOTATTACHSURFACE, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_CANNOTATTACHSURFACE, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface7_AddAttachedSurface(surface4, surface2); - ok(hr == DDERR_CANNOTATTACHSURFACE, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_CANNOTATTACHSURFACE, "Got unexpected hr %#lx.\n", hr);
IDirectDrawSurface7_Release(surface4);
@@ -8289,20 +8289,20 @@ static void test_surface_attachment(void) surface_desc.dwWidth = 16; surface_desc.dwHeight = 16; hr = IDirectDraw7_CreateSurface(ddraw, &surface_desc, &surface4, NULL); - ok(SUCCEEDED(hr), "Failed to create surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create surface, hr %#lx.\n", hr);
hr = IDirectDrawSurface7_AddAttachedSurface(surface1, surface4); - ok(hr == DDERR_CANNOTATTACHSURFACE, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_CANNOTATTACHSURFACE, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface7_AddAttachedSurface(surface4, surface1); - ok(hr == DDERR_CANNOTATTACHSURFACE, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_CANNOTATTACHSURFACE, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface7_AddAttachedSurface(surface3, surface4); - ok(hr == DDERR_CANNOTATTACHSURFACE, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_CANNOTATTACHSURFACE, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface7_AddAttachedSurface(surface4, surface3); - ok(hr == DDERR_CANNOTATTACHSURFACE, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_CANNOTATTACHSURFACE, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface7_AddAttachedSurface(surface2, surface4); - ok(hr == DDERR_CANNOTATTACHSURFACE, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_CANNOTATTACHSURFACE, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface7_AddAttachedSurface(surface4, surface2); - ok(hr == DDERR_CANNOTATTACHSURFACE, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_CANNOTATTACHSURFACE, "Got unexpected hr %#lx.\n", hr);
IDirectDrawSurface7_Release(surface4); IDirectDrawSurface7_Release(surface3); @@ -8310,7 +8310,7 @@ static void test_surface_attachment(void) IDirectDrawSurface7_Release(surface1);
hr = IDirectDraw7_SetCooperativeLevel(ddraw, window, DDSCL_EXCLUSIVE | DDSCL_FULLSCREEN); - ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#lx.\n", hr);
/* Try a single primary and two offscreen plain surfaces. */ memset(&surface_desc, 0, sizeof(surface_desc)); @@ -8318,7 +8318,7 @@ static void test_surface_attachment(void) surface_desc.dwFlags = DDSD_CAPS; surface_desc.ddsCaps.dwCaps = DDSCAPS_PRIMARYSURFACE; hr = IDirectDraw7_CreateSurface(ddraw, &surface_desc, &surface1, NULL); - ok(SUCCEEDED(hr), "Failed to create surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create surface, hr %#lx.\n", hr);
memset(&surface_desc, 0, sizeof(surface_desc)); surface_desc.dwSize = sizeof(surface_desc); @@ -8327,7 +8327,7 @@ static void test_surface_attachment(void) surface_desc.dwWidth = registry_mode.dmPelsWidth; surface_desc.dwHeight = registry_mode.dmPelsHeight; hr = IDirectDraw7_CreateSurface(ddraw, &surface_desc, &surface2, NULL); - ok(SUCCEEDED(hr), "Failed to create surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create surface, hr %#lx.\n", hr);
memset(&surface_desc, 0, sizeof(surface_desc)); surface_desc.dwSize = sizeof(surface_desc); @@ -8336,7 +8336,7 @@ static void test_surface_attachment(void) surface_desc.dwWidth = registry_mode.dmPelsWidth; surface_desc.dwHeight = registry_mode.dmPelsHeight; hr = IDirectDraw7_CreateSurface(ddraw, &surface_desc, &surface3, NULL); - ok(SUCCEEDED(hr), "Failed to create surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create surface, hr %#lx.\n", hr);
/* This one has a different size. */ memset(&surface_desc, 0, sizeof(surface_desc)); @@ -8346,18 +8346,18 @@ static void test_surface_attachment(void) surface_desc.dwWidth = 128; surface_desc.dwHeight = 128; hr = IDirectDraw7_CreateSurface(ddraw, &surface_desc, &surface4, NULL); - ok(SUCCEEDED(hr), "Failed to create surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create surface, hr %#lx.\n", hr);
hr = IDirectDrawSurface7_AddAttachedSurface(surface1, surface2); - ok(hr == DDERR_CANNOTATTACHSURFACE, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_CANNOTATTACHSURFACE, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface7_AddAttachedSurface(surface2, surface1); - ok(hr == DDERR_CANNOTATTACHSURFACE, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_CANNOTATTACHSURFACE, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface7_AddAttachedSurface(surface2, surface3); - ok(hr == DDERR_CANNOTATTACHSURFACE, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_CANNOTATTACHSURFACE, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface7_AddAttachedSurface(surface1, surface4); - ok(hr == DDERR_CANNOTATTACHSURFACE, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_CANNOTATTACHSURFACE, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface7_AddAttachedSurface(surface4, surface1); - ok(hr == DDERR_CANNOTATTACHSURFACE, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_CANNOTATTACHSURFACE, "Got unexpected hr %#lx.\n", hr);
IDirectDrawSurface7_Release(surface4); IDirectDrawSurface7_Release(surface3); @@ -8372,7 +8372,7 @@ static void test_surface_attachment(void) surface_desc.dwWidth = 64; surface_desc.dwHeight = 64; hr = IDirectDraw7_CreateSurface(ddraw, &surface_desc, &surface1, NULL); - ok(hr == D3D_OK, "Failed to create surface, hr %#x.\n", hr); + ok(hr == D3D_OK, "Failed to create surface, hr %#lx.\n", hr);
memset(&surface_desc, 0, sizeof(surface_desc)); surface_desc.dwSize = sizeof(surface_desc); @@ -8385,26 +8385,26 @@ static void test_surface_attachment(void) surface_desc.dwWidth = 32; surface_desc.dwHeight = 32; hr = IDirectDraw7_CreateSurface(ddraw, &surface_desc, &surface2, NULL); - ok(hr == D3D_OK, "Failed to create surface, hr %#x.\n", hr); + ok(hr == D3D_OK, "Failed to create surface, hr %#lx.\n", hr); surface_desc.dwWidth = 64; surface_desc.dwHeight = 64; hr = IDirectDraw7_CreateSurface(ddraw, &surface_desc, &surface3, NULL); - ok(hr == D3D_OK, "Failed to create surface, hr %#x.\n", hr); + ok(hr == D3D_OK, "Failed to create surface, hr %#lx.\n", hr); surface_desc.dwWidth = 128; surface_desc.dwHeight = 128; hr = IDirectDraw7_CreateSurface(ddraw, &surface_desc, &surface4, NULL); - ok(hr == D3D_OK, "Failed to create surface, hr %#x.\n", hr); + ok(hr == D3D_OK, "Failed to create surface, hr %#lx.\n", hr);
hr = IDirectDrawSurface_AddAttachedSurface(surface1, surface2); - todo_wine ok(hr == DDERR_CANNOTATTACHSURFACE, "Got unexpected hr %#x.\n", hr); + todo_wine ok(hr == DDERR_CANNOTATTACHSURFACE, "Got unexpected hr %#lx.\n", hr); if (SUCCEEDED(hr)) IDirectDrawSurface7_DeleteAttachedSurface(surface1, 0, surface2); hr = IDirectDrawSurface_AddAttachedSurface(surface1, surface3); - ok(hr == D3D_OK, "Failed to attach depth buffer, hr %#x.\n", hr); + ok(hr == D3D_OK, "Failed to attach depth buffer, hr %#lx.\n", hr); hr = IDirectDrawSurface7_DeleteAttachedSurface(surface1, 0, surface3); - ok(hr == D3D_OK, "Failed to detach depth buffer, hr %#x.\n", hr); + ok(hr == D3D_OK, "Failed to detach depth buffer, hr %#lx.\n", hr); hr = IDirectDrawSurface_AddAttachedSurface(surface1, surface4); - todo_wine ok(hr == DDERR_CANNOTATTACHSURFACE, "Got unexpected hr %#x.\n", hr); + todo_wine ok(hr == DDERR_CANNOTATTACHSURFACE, "Got unexpected hr %#lx.\n", hr);
IDirectDrawSurface7_Release(surface4); IDirectDrawSurface7_Release(surface3); @@ -8425,72 +8425,72 @@ static void test_surface_attachment(void) U3(U4(surface_desc).ddpfPixelFormat).dwGBitMask = 0x07e0; U4(U4(surface_desc).ddpfPixelFormat).dwBBitMask = 0x001f; hr = IDirectDraw7_CreateSurface(ddraw, &surface_desc, &surface1, NULL); - ok(SUCCEEDED(hr), "Failed to create surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create surface, hr %#lx.\n", hr); hr = IDirectDraw7_CreateSurface(ddraw, &surface_desc, &surface3, NULL); - ok(SUCCEEDED(hr), "Failed to create surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create surface, hr %#lx.\n", hr);
surface_desc.ddsCaps.dwCaps = DDSCAPS_ZBUFFER; U4(surface_desc).ddpfPixelFormat.dwFlags = DDPF_ZBUFFER; U1(U4(surface_desc).ddpfPixelFormat).dwZBufferBitDepth = 16; U3(U4(surface_desc).ddpfPixelFormat).dwZBitMask = 0x0000ffff; hr = IDirectDraw7_CreateSurface(ddraw, &surface_desc, &surface2, NULL); - ok(SUCCEEDED(hr), "Failed to create surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create surface, hr %#lx.\n", hr);
hr = IDirectDrawSurface7_QueryInterface(surface1, &IID_IDirectDrawSurface, (void **)&surface1v1); - ok(SUCCEEDED(hr), "Failed to get interface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get interface, hr %#lx.\n", hr); hr = IDirectDrawSurface7_QueryInterface(surface2, &IID_IDirectDrawSurface, (void **)&surface2v1); - ok(SUCCEEDED(hr), "Failed to get interface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get interface, hr %#lx.\n", hr);
hr = IDirectDrawSurface7_AddAttachedSurface(surface1, surface2); - ok(SUCCEEDED(hr), "Failed to attach surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to attach surface, hr %#lx.\n", hr); refcount = get_refcount((IUnknown *)surface2); - ok(refcount == 2, "Got unexpected refcount %u.\n", refcount); + ok(refcount == 2, "Got unexpected refcount %lu.\n", refcount); refcount = get_refcount((IUnknown *)surface2v1); - ok(refcount == 1, "Got unexpected refcount %u.\n", refcount); + ok(refcount == 1, "Got unexpected refcount %lu.\n", refcount); hr = IDirectDrawSurface7_AddAttachedSurface(surface1, surface2); - ok(hr == DDERR_SURFACEALREADYATTACHED, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_SURFACEALREADYATTACHED, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface_AddAttachedSurface(surface1v1, surface2v1); - todo_wine ok(hr == DDERR_CANNOTATTACHSURFACE, "Got unexpected hr %#x.\n", hr); + todo_wine ok(hr == DDERR_CANNOTATTACHSURFACE, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface_DeleteAttachedSurface(surface1v1, 0, surface2v1); - ok(hr == DDERR_SURFACENOTATTACHED, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_SURFACENOTATTACHED, "Got unexpected hr %#lx.\n", hr);
/* Attaching while already attached to other surface. */ hr = IDirectDrawSurface7_AddAttachedSurface(surface3, surface2); - todo_wine ok(SUCCEEDED(hr), "Failed to attach surface, hr %#x.\n", hr); + todo_wine ok(SUCCEEDED(hr), "Failed to attach surface, hr %#lx.\n", hr); hr = IDirectDrawSurface7_DeleteAttachedSurface(surface3, 0, surface2); - todo_wine ok(SUCCEEDED(hr), "Failed to detach surface, hr %#x.\n", hr); + todo_wine ok(SUCCEEDED(hr), "Failed to detach surface, hr %#lx.\n", hr); IDirectDrawSurface7_Release(surface3);
hr = IDirectDrawSurface7_DeleteAttachedSurface(surface1, 0, surface2); - ok(SUCCEEDED(hr), "Failed to detach surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to detach surface, hr %#lx.\n", hr); refcount = get_refcount((IUnknown *)surface2); - ok(refcount == 1, "Got unexpected refcount %u.\n", refcount); + ok(refcount == 1, "Got unexpected refcount %lu.\n", refcount); refcount = get_refcount((IUnknown *)surface2v1); - ok(refcount == 1, "Got unexpected refcount %u.\n", refcount); + ok(refcount == 1, "Got unexpected refcount %lu.\n", refcount);
/* DeleteAttachedSurface() when attaching via IDirectDrawSurface. */ hr = IDirectDrawSurface_AddAttachedSurface(surface1v1, surface2v1); - ok(SUCCEEDED(hr), "Failed to attach surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to attach surface, hr %#lx.\n", hr); hr = IDirectDrawSurface7_DeleteAttachedSurface(surface1, 0, surface2); - ok(hr == DDERR_SURFACENOTATTACHED, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_SURFACENOTATTACHED, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface_DeleteAttachedSurface(surface1v1, 0, surface2v1); - ok(SUCCEEDED(hr), "Failed to detach surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to detach surface, hr %#lx.\n", hr); refcount = IDirectDrawSurface7_Release(surface2); - ok(!refcount, "Got unexpected refcount %u.\n", refcount); + ok(!refcount, "Got unexpected refcount %lu.\n", refcount); refcount = IDirectDrawSurface7_Release(surface1); - ok(!refcount, "Got unexpected refcount %u.\n", refcount); + ok(!refcount, "Got unexpected refcount %lu.\n", refcount);
/* Automatic detachment on release. */ hr = IDirectDrawSurface_AddAttachedSurface(surface1v1, surface2v1); - ok(SUCCEEDED(hr), "Failed to attach surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to attach surface, hr %#lx.\n", hr); refcount = get_refcount((IUnknown *)surface2v1); - ok(refcount == 2, "Got unexpected refcount %u.\n", refcount); + ok(refcount == 2, "Got unexpected refcount %lu.\n", refcount); refcount = IDirectDrawSurface_Release(surface1v1); - ok(!refcount, "Got unexpected refcount %u.\n", refcount); + ok(!refcount, "Got unexpected refcount %lu.\n", refcount); refcount = IDirectDrawSurface_Release(surface2v1); - ok(!refcount, "Got unexpected refcount %u.\n", refcount); + ok(!refcount, "Got unexpected refcount %lu.\n", refcount); refcount = IDirectDraw7_Release(ddraw); - ok(!refcount, "Got unexpected refcount %u.\n", refcount); + ok(!refcount, "Got unexpected refcount %lu.\n", refcount); DestroyWindow(window); }
@@ -8526,7 +8526,7 @@ static void test_private_data(void) ddraw = create_ddraw(); ok(!!ddraw, "Failed to create a ddraw object.\n"); hr = IDirectDraw7_SetCooperativeLevel(ddraw, window, DDSCL_NORMAL); - ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#lx.\n", hr);
reset_ddsd(&surface_desc); surface_desc.dwFlags = DDSD_CAPS | DDSD_HEIGHT | DDSD_WIDTH; @@ -8534,27 +8534,27 @@ static void test_private_data(void) surface_desc.dwHeight = 4; surface_desc.dwWidth = 4; hr = IDirectDraw7_CreateSurface(ddraw, &surface_desc, &surface, NULL); - ok(SUCCEEDED(hr), "Failed to create surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create surface, hr %#lx.\n", hr);
/* NULL pointers are not valid, but don't cause a crash. */ hr = IDirectDrawSurface7_SetPrivateData(surface, &ddraw_private_data_test_guid, NULL, sizeof(IUnknown *), DDSPD_IUNKNOWNPOINTER); - ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface7_SetPrivateData(surface, &ddraw_private_data_test_guid, NULL, 0, 0); - ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface7_SetPrivateData(surface, &ddraw_private_data_test_guid, NULL, 1, 0); - ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#lx.\n", hr);
/* DDSPD_IUNKNOWNPOINTER needs sizeof(IUnknown *) bytes of data. */ hr = IDirectDrawSurface7_SetPrivateData(surface, &ddraw_private_data_test_guid, ddraw, 0, DDSPD_IUNKNOWNPOINTER); - ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface7_SetPrivateData(surface, &ddraw_private_data_test_guid, ddraw, 5, DDSPD_IUNKNOWNPOINTER); - ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface7_SetPrivateData(surface, &ddraw_private_data_test_guid, ddraw, sizeof(ddraw) * 2, DDSPD_IUNKNOWNPOINTER); - ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#lx.\n", hr);
/* Note that with a size != 0 and size != sizeof(IUnknown *) and * DDSPD_IUNKNOWNPOINTER set SetPrivateData in ddraw4 and ddraw7 @@ -8563,85 +8563,85 @@ static void test_private_data(void) * that depends on this we don't care about this behavior. */ hr = IDirectDrawSurface7_SetPrivateData(surface, &ddraw_private_data_test_guid, ddraw, sizeof(ddraw), DDSPD_IUNKNOWNPOINTER); - ok(SUCCEEDED(hr), "Failed to set private data, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set private data, hr %#lx.\n", hr); hr = IDirectDrawSurface7_SetPrivateData(surface, &ddraw_private_data_test_guid, ddraw, 0, DDSPD_IUNKNOWNPOINTER); - ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#lx.\n", hr); size = sizeof(ptr); hr = IDirectDrawSurface7_GetPrivateData(surface, &ddraw_private_data_test_guid, &ptr, &size); - ok(SUCCEEDED(hr), "Failed to get private data, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get private data, hr %#lx.\n", hr); hr = IDirectDrawSurface7_FreePrivateData(surface, &ddraw_private_data_test_guid); - ok(SUCCEEDED(hr), "Failed to free private data, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to free private data, hr %#lx.\n", hr);
refcount = get_refcount((IUnknown *)ddraw); hr = IDirectDrawSurface7_SetPrivateData(surface, &ddraw_private_data_test_guid, ddraw, sizeof(ddraw), DDSPD_IUNKNOWNPOINTER); - ok(SUCCEEDED(hr), "Failed to set private data, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set private data, hr %#lx.\n", hr); refcount2 = get_refcount((IUnknown *)ddraw); - ok(refcount2 == refcount + 1, "Got unexpected refcount %u.\n", refcount2); + ok(refcount2 == refcount + 1, "Got unexpected refcount %lu.\n", refcount2);
hr = IDirectDrawSurface7_FreePrivateData(surface, &ddraw_private_data_test_guid); - ok(SUCCEEDED(hr), "Failed to free private data, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to free private data, hr %#lx.\n", hr); refcount2 = get_refcount((IUnknown *)ddraw); - ok(refcount2 == refcount, "Got unexpected refcount %u.\n", refcount2); + ok(refcount2 == refcount, "Got unexpected refcount %lu.\n", refcount2);
hr = IDirectDrawSurface7_SetPrivateData(surface, &ddraw_private_data_test_guid, ddraw, sizeof(ddraw), DDSPD_IUNKNOWNPOINTER); - ok(SUCCEEDED(hr), "Failed to set private data, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set private data, hr %#lx.\n", hr); hr = IDirectDrawSurface7_SetPrivateData(surface, &ddraw_private_data_test_guid, surface, sizeof(surface), DDSPD_IUNKNOWNPOINTER); - ok(SUCCEEDED(hr), "Failed to set private data, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set private data, hr %#lx.\n", hr); refcount2 = get_refcount((IUnknown *)ddraw); - ok(refcount2 == refcount, "Got unexpected refcount %u.\n", refcount2); + ok(refcount2 == refcount, "Got unexpected refcount %lu.\n", refcount2);
hr = IDirectDrawSurface7_SetPrivateData(surface, &ddraw_private_data_test_guid, ddraw, sizeof(ddraw), DDSPD_IUNKNOWNPOINTER); - ok(SUCCEEDED(hr), "Failed to set private data, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set private data, hr %#lx.\n", hr); size = 2 * sizeof(ptr); hr = IDirectDrawSurface7_GetPrivateData(surface, &ddraw_private_data_test_guid, &ptr, &size); - ok(SUCCEEDED(hr), "Failed to get private data, hr %#x.\n", hr); - ok(size == sizeof(ddraw), "Got unexpected size %u.\n", size); + ok(SUCCEEDED(hr), "Failed to get private data, hr %#lx.\n", hr); + ok(size == sizeof(ddraw), "Got unexpected size %lu.\n", size); refcount2 = get_refcount(ptr); /* Object is NOT addref'ed by the getter. */ ok(ptr == (IUnknown *)ddraw, "Returned interface pointer is %p, expected %p.\n", ptr, ddraw); - ok(refcount2 == refcount + 1, "Got unexpected refcount %u.\n", refcount2); + ok(refcount2 == refcount + 1, "Got unexpected refcount %lu.\n", refcount2);
ptr = (IUnknown *)0xdeadbeef; size = 1; hr = IDirectDrawSurface7_GetPrivateData(surface, &ddraw_private_data_test_guid, NULL, &size); - ok(hr == DDERR_MOREDATA, "Got unexpected hr %#x.\n", hr); - ok(size == sizeof(ddraw), "Got unexpected size %u.\n", size); + ok(hr == DDERR_MOREDATA, "Got unexpected hr %#lx.\n", hr); + ok(size == sizeof(ddraw), "Got unexpected size %lu.\n", size); size = 2 * sizeof(ptr); hr = IDirectDrawSurface7_GetPrivateData(surface, &ddraw_private_data_test_guid, NULL, &size); - ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#x.\n", hr); - ok(size == 2 * sizeof(ptr), "Got unexpected size %u.\n", size); + ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#lx.\n", hr); + ok(size == 2 * sizeof(ptr), "Got unexpected size %lu.\n", size); size = 1; hr = IDirectDrawSurface7_GetPrivateData(surface, &ddraw_private_data_test_guid, &ptr, &size); - ok(hr == DDERR_MOREDATA, "Got unexpected hr %#x.\n", hr); - ok(size == sizeof(ddraw), "Got unexpected size %u.\n", size); + ok(hr == DDERR_MOREDATA, "Got unexpected hr %#lx.\n", hr); + ok(size == sizeof(ddraw), "Got unexpected size %lu.\n", size); ok(ptr == (IUnknown *)0xdeadbeef, "Got unexpected pointer %p.\n", ptr); hr = IDirectDrawSurface7_GetPrivateData(surface, &ddraw_private_data_test_guid2, NULL, NULL); - ok(hr == DDERR_NOTFOUND, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_NOTFOUND, "Got unexpected hr %#lx.\n", hr); size = 0xdeadbabe; hr = IDirectDrawSurface7_GetPrivateData(surface, &ddraw_private_data_test_guid2, &ptr, &size); - ok(hr == DDERR_NOTFOUND, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_NOTFOUND, "Got unexpected hr %#lx.\n", hr); ok(ptr == (IUnknown *)0xdeadbeef, "Got unexpected pointer %p.\n", ptr); - ok(size == 0xdeadbabe, "Got unexpected size %u.\n", size); + ok(size == 0xdeadbabe, "Got unexpected size %lu.\n", size); hr = IDirectDrawSurface7_GetPrivateData(surface, &ddraw_private_data_test_guid, NULL, NULL); - ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#lx.\n", hr);
refcount3 = IDirectDrawSurface7_Release(surface); - ok(!refcount3, "Got unexpected refcount %u.\n", refcount3); + ok(!refcount3, "Got unexpected refcount %lu.\n", refcount3);
/* Destroying the surface frees the reference held on the private data. It also frees * the reference the surface is holding on its creating object. */ refcount2 = get_refcount((IUnknown *)ddraw); - ok(refcount2 == refcount - 1, "Got unexpected refcount %u.\n", refcount2); + ok(refcount2 == refcount - 1, "Got unexpected refcount %lu.\n", refcount2);
memset(&hal_caps, 0, sizeof(hal_caps)); hal_caps.dwSize = sizeof(hal_caps); hr = IDirectDraw7_GetCaps(ddraw, &hal_caps, NULL); - ok(SUCCEEDED(hr), "Failed to get caps, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get caps, hr %#lx.\n", hr); if ((hal_caps.ddsCaps.dwCaps & (DDSCAPS_TEXTURE | DDSCAPS_MIPMAP)) == (DDSCAPS_TEXTURE | DDSCAPS_MIPMAP) && !is_ddraw64) { @@ -8652,14 +8652,14 @@ static void test_private_data(void) surface_desc.dwWidth = 4; U2(surface_desc).dwMipMapCount = 2; hr = IDirectDraw7_CreateSurface(ddraw, &surface_desc, &surface, NULL); - ok(SUCCEEDED(hr), "Failed to create surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create surface, hr %#lx.\n", hr); hr = IDirectDrawSurface7_GetAttachedSurface(surface, &caps, &surface2); - ok(SUCCEEDED(hr), "Failed to get attached surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get attached surface, hr %#lx.\n", hr);
hr = IDirectDrawSurface7_SetPrivateData(surface, &ddraw_private_data_test_guid, data, sizeof(data), 0); - ok(SUCCEEDED(hr), "Failed to set private data, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set private data, hr %#lx.\n", hr); hr = IDirectDrawSurface7_GetPrivateData(surface2, &ddraw_private_data_test_guid, NULL, NULL); - ok(hr == DDERR_NOTFOUND, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_NOTFOUND, "Got unexpected hr %#lx.\n", hr);
IDirectDrawSurface7_Release(surface2); IDirectDrawSurface7_Release(surface); @@ -8668,7 +8668,7 @@ static void test_private_data(void) skip("Mipmapped textures not supported, skipping mipmap private data test.\n");
refcount = IDirectDraw7_Release(ddraw); - ok(!refcount, "Got unexpected refcount %u.\n", refcount); + ok(!refcount, "Got unexpected refcount %lu.\n", refcount); DestroyWindow(window); }
@@ -8751,7 +8751,7 @@ static void test_pixel_format(void) hr = IDirectDraw7_SetCooperativeLevel(ddraw, window, DDSCL_NORMAL); if (FAILED(hr)) { - skip("Failed to set cooperative level, hr %#x.\n", hr); + skip("Failed to set cooperative level, hr %#lx.\n", hr); goto cleanup; }
@@ -8761,9 +8761,9 @@ static void test_pixel_format(void) if (hdc2) { hr = IDirectDraw7_CreateClipper(ddraw, 0, &clipper, NULL); - ok(SUCCEEDED(hr), "Failed to create clipper, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create clipper, hr %#lx.\n", hr); hr = IDirectDrawClipper_SetHWnd(clipper, 0, window2); - ok(SUCCEEDED(hr), "Failed to set clipper window, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set clipper window, hr %#lx.\n", hr);
test_format = GetPixelFormat(hdc); ok(test_format == format, "window has pixel format %d, expected %d\n", test_format, format); @@ -8778,7 +8778,7 @@ static void test_pixel_format(void) ddsd.ddsCaps.dwCaps = DDSCAPS_PRIMARYSURFACE;
hr = IDirectDraw7_CreateSurface(ddraw, &ddsd, &primary, NULL); - ok(SUCCEEDED(hr), "Failed to create surface, hr %#x.\n",hr); + ok(SUCCEEDED(hr), "Failed to create surface, hr %#lx.\n",hr);
test_format = GetPixelFormat(hdc); ok(test_format == format, "window has pixel format %d, expected %d\n", test_format, format); @@ -8792,7 +8792,7 @@ static void test_pixel_format(void) if (clipper) { hr = IDirectDrawSurface7_SetClipper(primary, clipper); - ok(SUCCEEDED(hr), "Failed to set clipper, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set clipper, hr %#lx.\n", hr);
test_format = GetPixelFormat(hdc); ok(test_format == format, "window has pixel format %d, expected %d\n", test_format, format); @@ -8807,18 +8807,18 @@ static void test_pixel_format(void) ddsd.ddsCaps.dwCaps = DDSCAPS_OFFSCREENPLAIN; ddsd.dwWidth = ddsd.dwHeight = 64; hr = IDirectDraw7_CreateSurface(ddraw, &ddsd, &offscreen, NULL); - ok(SUCCEEDED(hr), "Failed to create surface, hr %#x.\n",hr); + ok(SUCCEEDED(hr), "Failed to create surface, hr %#lx.\n",hr);
memset(&fx, 0, sizeof(fx)); fx.dwSize = sizeof(fx); hr = IDirectDrawSurface7_Blt(offscreen, NULL, NULL, NULL, DDBLT_WAIT | DDBLT_COLORFILL, &fx); - ok(SUCCEEDED(hr), "Failed to clear source surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to clear source surface, hr %#lx.\n", hr);
test_format = GetPixelFormat(hdc); ok(test_format == format, "window has pixel format %d, expected %d\n", test_format, format);
hr = IDirectDrawSurface7_Blt(primary, NULL, offscreen, NULL, DDBLT_WAIT, NULL); - ok(SUCCEEDED(hr), "Failed to blit to primary surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to blit to primary surface, hr %#lx.\n", hr);
test_format = GetPixelFormat(hdc); ok(test_format == format, "window has pixel format %d, expected %d\n", test_format, format); @@ -8943,7 +8943,7 @@ static void test_create_surface_pitch(void) ddraw = create_ddraw(); ok(!!ddraw, "Failed to create a ddraw object.\n"); hr = IDirectDraw7_SetCooperativeLevel(ddraw, window, DDSCL_NORMAL); - ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#lx.\n", hr);
mem = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, ((63 * 4) + 8) * 63);
@@ -8966,36 +8966,36 @@ static void test_create_surface_pitch(void) if (test_data[i].flags_in & DDSD_LPSURFACE) { HRESULT expected_hr = SUCCEEDED(test_data[i].hr) ? DDERR_INVALIDPARAMS : test_data[i].hr; - ok(hr == expected_hr, "Test %u: Got unexpected hr %#x, expected %#x.\n", i, hr, expected_hr); + ok(hr == expected_hr, "Test %u: Got unexpected hr %#lx, expected %#lx.\n", i, hr, expected_hr); surface_desc.lpSurface = mem; hr = IDirectDraw7_CreateSurface(ddraw, &surface_desc, &surface, NULL); } if ((test_data[i].caps & DDSCAPS_VIDEOMEMORY) && hr == DDERR_NODIRECTDRAWHW) continue; if (is_ddraw64 && (test_data[i].caps & DDSCAPS_TEXTURE) && SUCCEEDED(test_data[i].hr)) - todo_wine ok(hr == E_NOINTERFACE, "Test %u: Got unexpected hr %#x.\n", i, hr); + todo_wine ok(hr == E_NOINTERFACE, "Test %u: Got unexpected hr %#lx.\n", i, hr); else - ok(hr == test_data[i].hr, "Test %u: Got unexpected hr %#x, expected %#x.\n", i, hr, test_data[i].hr); + ok(hr == test_data[i].hr, "Test %u: Got unexpected hr %#lx, expected %#lx.\n", i, hr, test_data[i].hr); if (FAILED(hr)) continue;
memset(&surface_desc, 0, sizeof(surface_desc)); surface_desc.dwSize = sizeof(surface_desc); hr = IDirectDrawSurface7_GetSurfaceDesc(surface, &surface_desc); - ok(SUCCEEDED(hr), "Test %u: Failed to get surface desc, hr %#x.\n", i, hr); + ok(SUCCEEDED(hr), "Test %u: Failed to get surface desc, hr %#lx.\n", i, hr); ok((surface_desc.dwFlags & flags_mask) == test_data[i].flags_out, - "Test %u: Got unexpected flags %#x, expected %#x.\n", + "Test %u: Got unexpected flags %#lx, expected %#lx.\n", i, surface_desc.dwFlags & flags_mask, test_data[i].flags_out); /* The pitch for textures seems to be implementation specific. */ if (!(test_data[i].caps & DDSCAPS_TEXTURE)) { if (is_ddraw64 && test_data[i].pitch_out32 != test_data[i].pitch_out64) todo_wine ok(U1(surface_desc).lPitch == test_data[i].pitch_out64, - "Test %u: Got unexpected pitch %u, expected %u.\n", + "Test %u: Got unexpected pitch %lu, expected %lu.\n", i, U1(surface_desc).lPitch, test_data[i].pitch_out64); else ok(U1(surface_desc).lPitch == test_data[i].pitch_out32, - "Test %u: Got unexpected pitch %u, expected %u.\n", + "Test %u: Got unexpected pitch %lu, expected %lu.\n", i, U1(surface_desc).lPitch, test_data[i].pitch_out32); } ok(!surface_desc.lpSurface, "Test %u: Got unexpected lpSurface %p.\n", i, surface_desc.lpSurface); @@ -9005,7 +9005,7 @@ static void test_create_surface_pitch(void)
HeapFree(GetProcessHeap(), 0, mem); refcount = IDirectDraw7_Release(ddraw); - ok(!refcount, "Got unexpected refcount %u.\n", refcount); + ok(!refcount, "Got unexpected refcount %lu.\n", refcount); DestroyWindow(window); }
@@ -9045,12 +9045,12 @@ static void test_mipmap(void) ddraw = create_ddraw(); ok(!!ddraw, "Failed to create a ddraw object.\n"); hr = IDirectDraw7_SetCooperativeLevel(ddraw, window, DDSCL_NORMAL); - ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#lx.\n", hr);
memset(&hal_caps, 0, sizeof(hal_caps)); hal_caps.dwSize = sizeof(hal_caps); hr = IDirectDraw7_GetCaps(ddraw, &hal_caps, NULL); - ok(SUCCEEDED(hr), "Failed to get caps, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get caps, hr %#lx.\n", hr); if ((hal_caps.ddsCaps.dwCaps & (DDSCAPS_TEXTURE | DDSCAPS_MIPMAP)) != (DDSCAPS_TEXTURE | DDSCAPS_MIPMAP) || is_ddraw64) { @@ -9071,18 +9071,18 @@ static void test_mipmap(void) if (tests[i].flags & DDSD_MIPMAPCOUNT) U2(surface_desc).dwMipMapCount = tests[i].mipmap_count_in; hr = IDirectDraw7_CreateSurface(ddraw, &surface_desc, &surface, NULL); - ok(hr == tests[i].hr, "Test %u: Got unexpected hr %#x.\n", i, hr); + ok(hr == tests[i].hr, "Test %u: Got unexpected hr %#lx.\n", i, hr); if (FAILED(hr)) continue;
memset(&surface_desc, 0, sizeof(surface_desc)); surface_desc.dwSize = sizeof(surface_desc); hr = IDirectDrawSurface7_GetSurfaceDesc(surface, &surface_desc); - ok(SUCCEEDED(hr), "Test %u: Failed to get surface desc, hr %#x.\n", i, hr); + ok(SUCCEEDED(hr), "Test %u: Failed to get surface desc, hr %#lx.\n", i, hr); ok(surface_desc.dwFlags & DDSD_MIPMAPCOUNT, - "Test %u: Got unexpected flags %#x.\n", i, surface_desc.dwFlags); + "Test %u: Got unexpected flags %#lx.\n", i, surface_desc.dwFlags); ok(U2(surface_desc).dwMipMapCount == tests[i].mipmap_count_out, - "Test %u: Got unexpected mipmap count %u.\n", i, U2(surface_desc).dwMipMapCount); + "Test %u: Got unexpected mipmap count %lu.\n", i, U2(surface_desc).dwMipMapCount);
surface_base = surface; IDirectDrawSurface7_AddRef(surface_base); @@ -9090,31 +9090,31 @@ static void test_mipmap(void) while (mipmap_count > 1) { hr = IDirectDrawSurface7_GetAttachedSurface(surface_base, &caps, &surface_mip); - ok(SUCCEEDED(hr), "Test %u, %u: Failed to get attached surface, hr %#x.\n", i, mipmap_count, hr); + ok(SUCCEEDED(hr), "Test %u, %u: Failed to get attached surface, hr %#lx.\n", i, mipmap_count, hr);
memset(&surface_desc, 0, sizeof(surface_desc)); surface_desc.dwSize = sizeof(surface_desc); hr = IDirectDrawSurface7_GetSurfaceDesc(surface_base, &surface_desc); - ok(SUCCEEDED(hr), "Test %u, %u: Failed to get surface desc, hr %#x.\n", i, mipmap_count, hr); + ok(SUCCEEDED(hr), "Test %u, %u: Failed to get surface desc, hr %#lx.\n", i, mipmap_count, hr); ok(surface_desc.dwFlags & DDSD_MIPMAPCOUNT, - "Test %u, %u: Got unexpected flags %#x.\n", i, mipmap_count, surface_desc.dwFlags); + "Test %u, %u: Got unexpected flags %#lx.\n", i, mipmap_count, surface_desc.dwFlags); ok(U2(surface_desc).dwMipMapCount == mipmap_count, - "Test %u, %u: Got unexpected mipmap count %u.\n", + "Test %u, %u: Got unexpected mipmap count %lu.\n", i, mipmap_count, U2(surface_desc).dwMipMapCount);
memset(&surface_desc, 0, sizeof(surface_desc)); surface_desc.dwSize = sizeof(surface_desc); hr = IDirectDrawSurface7_Lock(surface_base, NULL, &surface_desc, 0, NULL); - ok(SUCCEEDED(hr), "Test %u, %u: Failed to lock surface, hr %#x.\n", i, mipmap_count, hr); + ok(SUCCEEDED(hr), "Test %u, %u: Failed to lock surface, hr %#lx.\n", i, mipmap_count, hr); ok(surface_desc.dwMipMapCount == mipmap_count, - "Test %u, %u: unexpected change of mipmap count %u.\n", + "Test %u, %u: unexpected change of mipmap count %lu.\n", i, mipmap_count, surface_desc.dwMipMapCount); memset(&surface_desc, 0, sizeof(surface_desc)); surface_desc.dwSize = sizeof(surface_desc); hr = IDirectDrawSurface7_Lock(surface_mip, NULL, &surface_desc, 0, NULL); - ok(SUCCEEDED(hr), "Test %u, %u: Failed to lock surface, hr %#x.\n", i, mipmap_count, hr); + ok(SUCCEEDED(hr), "Test %u, %u: Failed to lock surface, hr %#lx.\n", i, mipmap_count, hr); ok(surface_desc.dwMipMapCount == mipmap_count - 1, - "Test %u, %u: Child mipmap count unexpected %u\n", i, mipmap_count, surface_desc.dwMipMapCount); + "Test %u, %u: Child mipmap count unexpected %lu\n", i, mipmap_count, surface_desc.dwMipMapCount); IDirectDrawSurface7_Unlock(surface_mip, NULL); IDirectDrawSurface7_Unlock(surface_base, NULL);
@@ -9128,7 +9128,7 @@ static void test_mipmap(void) }
refcount = IDirectDraw7_Release(ddraw); - ok(!refcount, "Got unexpected refcount %u.\n", refcount); + ok(!refcount, "Got unexpected refcount %lu.\n", refcount); DestroyWindow(window); }
@@ -9150,12 +9150,12 @@ static void test_palette_complex(void) ddraw = create_ddraw(); ok(!!ddraw, "Failed to create a ddraw object.\n"); hr = IDirectDraw7_SetCooperativeLevel(ddraw, window, DDSCL_NORMAL); - ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#lx.\n", hr);
memset(&hal_caps, 0, sizeof(hal_caps)); hal_caps.dwSize = sizeof(hal_caps); hr = IDirectDraw7_GetCaps(ddraw, &hal_caps, NULL); - ok(SUCCEEDED(hr), "Failed to get caps, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get caps, hr %#lx.\n", hr); if ((hal_caps.ddsCaps.dwCaps & (DDSCAPS_TEXTURE | DDSCAPS_MIPMAP)) != (DDSCAPS_TEXTURE | DDSCAPS_MIPMAP) || is_ddraw64) { @@ -9175,21 +9175,21 @@ static void test_palette_complex(void) U4(surface_desc).ddpfPixelFormat.dwFlags = DDPF_PALETTEINDEXED8 | DDPF_RGB; U1(U4(surface_desc).ddpfPixelFormat).dwRGBBitCount = 8; hr = IDirectDraw7_CreateSurface(ddraw, &surface_desc, &surface, NULL); - ok(SUCCEEDED(hr), "Failed to create surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create surface, hr %#lx.\n", hr);
memset(palette_entries, 0, sizeof(palette_entries)); hr = IDirectDraw7_CreatePalette(ddraw, DDPCAPS_8BIT | DDPCAPS_ALLOW256, palette_entries, &palette, NULL); - ok(SUCCEEDED(hr), "Failed to create palette, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create palette, hr %#lx.\n", hr);
palette2 = (void *)0xdeadbeef; hr = IDirectDrawSurface7_GetPalette(surface, &palette2); - ok(hr == DDERR_NOPALETTEATTACHED, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_NOPALETTEATTACHED, "Got unexpected hr %#lx.\n", hr); ok(!palette2, "Got unexpected palette %p.\n", palette2); hr = IDirectDrawSurface7_SetPalette(surface, palette); - ok(SUCCEEDED(hr), "Failed to set palette, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set palette, hr %#lx.\n", hr); hr = IDirectDrawSurface7_GetPalette(surface, &palette2); - ok(SUCCEEDED(hr), "Failed to get palette, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get palette, hr %#lx.\n", hr); ok(palette == palette2, "Got unexpected palette %p.\n", palette2); IDirectDrawPalette_Release(palette2);
@@ -9198,17 +9198,17 @@ static void test_palette_complex(void) for (i = 0; i < 7; ++i) { hr = IDirectDrawSurface7_GetAttachedSurface(mipmap, &caps, &tmp); - ok(SUCCEEDED(hr), "Failed to get attached surface, i %u, hr %#x.\n", i, hr); + ok(SUCCEEDED(hr), "Failed to get attached surface, i %u, hr %#lx.\n", i, hr); palette2 = (void *)0xdeadbeef; hr = IDirectDrawSurface7_GetPalette(tmp, &palette2); - ok(hr == DDERR_NOPALETTEATTACHED, "Got unexpected hr %#x, i %u.\n", hr, i); + ok(hr == DDERR_NOPALETTEATTACHED, "Got unexpected hr %#lx, i %u.\n", hr, i); ok(!palette2, "Got unexpected palette %p, i %u.\n", palette2, i);
hr = IDirectDrawSurface7_SetPalette(tmp, palette); - ok(hr == DDERR_NOTONMIPMAPSUBLEVEL, "Got unexpected hr %#x, i %u.\n", hr, i); + ok(hr == DDERR_NOTONMIPMAPSUBLEVEL, "Got unexpected hr %#lx, i %u.\n", hr, i);
hr = IDirectDrawSurface7_GetPalette(tmp, &palette2); - ok(hr == DDERR_NOPALETTEATTACHED, "Got unexpected hr %#x, i %u.\n", hr, i); + ok(hr == DDERR_NOPALETTEATTACHED, "Got unexpected hr %#lx, i %u.\n", hr, i); ok(!palette2, "Got unexpected palette %p, i %u.\n", palette2, i);
/* Ddraw7 uses the palette of the mipmap for GetDC, just like previous @@ -9221,10 +9221,10 @@ static void test_palette_complex(void) }
hr = IDirectDrawSurface7_GetAttachedSurface(mipmap, &caps, &tmp); - ok(hr == DDERR_NOTFOUND, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_NOTFOUND, "Got unexpected hr %#lx.\n", hr); IDirectDrawSurface7_Release(mipmap); refcount = IDirectDrawSurface7_Release(surface); - ok(!refcount, "Got unexpected refcount %u.\n", refcount); + ok(!refcount, "Got unexpected refcount %lu.\n", refcount);
/* Test DDERR_INVALIDPIXELFORMAT vs DDERR_NOTONMIPMAPSUBLEVEL. */ memset(&surface_desc, 0, sizeof(surface_desc)); @@ -9240,21 +9240,21 @@ static void test_palette_complex(void) U3(U4(surface_desc).ddpfPixelFormat).dwGBitMask = 0x0000ff00; U4(U4(surface_desc).ddpfPixelFormat).dwBBitMask = 0x000000ff; hr = IDirectDraw7_CreateSurface(ddraw, &surface_desc, &surface, NULL); - ok(SUCCEEDED(hr), "Failed to create surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create surface, hr %#lx.\n", hr);
hr = IDirectDrawSurface7_GetAttachedSurface(surface, &caps, &mipmap); - ok(SUCCEEDED(hr), "Failed to get attached surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get attached surface, hr %#lx.\n", hr); hr = IDirectDrawSurface7_SetPalette(mipmap, palette); - ok(hr == DDERR_NOTONMIPMAPSUBLEVEL, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_NOTONMIPMAPSUBLEVEL, "Got unexpected hr %#lx.\n", hr);
IDirectDrawSurface7_Release(mipmap); refcount = IDirectDrawSurface7_Release(surface); - ok(!refcount, "Got unexpected refcount %u.\n", refcount); + ok(!refcount, "Got unexpected refcount %lu.\n", refcount); refcount = IDirectDrawPalette_Release(palette); - ok(!refcount, "Got unexpected refcount %u.\n", refcount); + ok(!refcount, "Got unexpected refcount %lu.\n", refcount);
refcount = IDirectDraw7_Release(ddraw); - ok(!refcount, "Got unexpected refcount %u.\n", refcount); + ok(!refcount, "Got unexpected refcount %lu.\n", refcount); DestroyWindow(window); }
@@ -9285,7 +9285,7 @@ static void test_p8_blit(void) ddraw = create_ddraw(); ok(!!ddraw, "Failed to create a ddraw object.\n"); hr = IDirectDraw7_SetCooperativeLevel(ddraw, window, DDSCL_NORMAL); - ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#lx.\n", hr); is_warp = ddraw_is_warp(ddraw);
memset(palette_entries, 0, sizeof(palette_entries)); @@ -9295,14 +9295,14 @@ static void test_p8_blit(void) palette_entries[4].peRed = 0xff; hr = IDirectDraw7_CreatePalette(ddraw, DDPCAPS_8BIT | DDPCAPS_ALLOW256, palette_entries, &palette, NULL); - ok(SUCCEEDED(hr), "Failed to create palette, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create palette, hr %#lx.\n", hr); palette_entries[1].peBlue = 0xff; palette_entries[2].peGreen = 0xff; palette_entries[3].peRed = 0xff; palette_entries[4].peFlags = 0x0; hr = IDirectDraw7_CreatePalette(ddraw, DDPCAPS_8BIT | DDPCAPS_ALLOW256, palette_entries, &palette2, NULL); - ok(SUCCEEDED(hr), "Failed to create palette, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create palette, hr %#lx.\n", hr);
memset(&surface_desc, 0, sizeof(surface_desc)); surface_desc.dwSize = sizeof(surface_desc); @@ -9314,11 +9314,11 @@ static void test_p8_blit(void) U4(surface_desc).ddpfPixelFormat.dwFlags = DDPF_PALETTEINDEXED8 | DDPF_RGB; U1(U4(surface_desc).ddpfPixelFormat).dwRGBBitCount = 8; hr = IDirectDraw7_CreateSurface(ddraw, &surface_desc, &src, NULL); - ok(SUCCEEDED(hr), "Failed to create surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create surface, hr %#lx.\n", hr); hr = IDirectDraw7_CreateSurface(ddraw, &surface_desc, &dst_p8, NULL); - ok(SUCCEEDED(hr), "Failed to create surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create surface, hr %#lx.\n", hr); hr = IDirectDrawSurface7_SetPalette(dst_p8, palette2); - ok(SUCCEEDED(hr), "Failed to set palette, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set palette, hr %#lx.\n", hr);
memset(&surface_desc, 0, sizeof(surface_desc)); surface_desc.dwSize = sizeof(surface_desc); @@ -9334,34 +9334,34 @@ static void test_p8_blit(void) U4(U4(surface_desc).ddpfPixelFormat).dwBBitMask = 0x000000ff; U5(U4(surface_desc).ddpfPixelFormat).dwRGBAlphaBitMask = 0xff000000; hr = IDirectDraw7_CreateSurface(ddraw, &surface_desc, &dst, NULL); - ok(SUCCEEDED(hr), "Failed to create surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create surface, hr %#lx.\n", hr);
memset(&surface_desc, 0, sizeof(surface_desc)); surface_desc.dwSize = sizeof(surface_desc); hr = IDirectDrawSurface7_Lock(src, NULL, &surface_desc, DDLOCK_WAIT, NULL); - ok(SUCCEEDED(hr), "Failed to lock source surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to lock source surface, hr %#lx.\n", hr); memcpy(surface_desc.lpSurface, src_data, sizeof(src_data)); hr = IDirectDrawSurface7_Unlock(src, NULL); - ok(SUCCEEDED(hr), "Failed to unlock source surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to unlock source surface, hr %#lx.\n", hr);
hr = IDirectDrawSurface7_Lock(dst_p8, NULL, &surface_desc, DDLOCK_WAIT, NULL); - ok(SUCCEEDED(hr), "Failed to lock destination surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to lock destination surface, hr %#lx.\n", hr); memcpy(surface_desc.lpSurface, src_data2, sizeof(src_data2)); hr = IDirectDrawSurface7_Unlock(dst_p8, NULL); - ok(SUCCEEDED(hr), "Failed to unlock destination surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to unlock destination surface, hr %#lx.\n", hr);
fx.dwSize = sizeof(fx); fx.dwFillColor = 0xdeadbeef; hr = IDirectDrawSurface7_Blt(dst, NULL, NULL, NULL, DDBLT_WAIT | DDBLT_COLORFILL, &fx); - ok(SUCCEEDED(hr), "Failed to color fill %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to color fill %#lx.\n", hr);
hr = IDirectDrawSurface7_SetPalette(src, palette); - ok(SUCCEEDED(hr), "Failed to set palette, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set palette, hr %#lx.\n", hr); hr = IDirectDrawSurface7_Blt(dst, NULL, src, NULL, DDBLT_WAIT, NULL); /* The r500 Windows 7 driver returns E_NOTIMPL. r200 on Windows XP works. * The Geforce 7 driver on Windows Vista returns E_FAIL. Newer Nvidia GPUs work. */ ok(SUCCEEDED(hr) || broken(hr == E_NOTIMPL) || broken(hr == E_FAIL), - "Failed to blit, hr %#x.\n", hr); + "Failed to blit, hr %#lx.\n", hr);
if (SUCCEEDED(hr)) { @@ -9372,7 +9372,7 @@ static void test_p8_blit(void) * blits see below. */ todo_wine ok(compare_color(color, expected[x], 0) || broken(is_warp && compare_color(color, 0x00000000, 0)), - "Pixel %u: Got color %#x, expected %#x.\n", + "Pixel %u: Got color %#lx, expected %#lx.\n", x, color, expected[x]); } } @@ -9380,10 +9380,10 @@ static void test_p8_blit(void) fx.ddckSrcColorkey.dwColorSpaceHighValue = 0x2; fx.ddckSrcColorkey.dwColorSpaceLowValue = 0x2; hr = IDirectDrawSurface7_Blt(dst_p8, NULL, src, NULL, DDBLT_WAIT | DDBLT_KEYSRCOVERRIDE, &fx); - ok(SUCCEEDED(hr), "Failed to blit, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to blit, hr %#lx.\n", hr);
hr = IDirectDrawSurface7_Lock(dst_p8, NULL, &surface_desc, DDLOCK_READONLY | DDLOCK_WAIT, NULL); - ok(SUCCEEDED(hr), "Failed to lock destination surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to lock destination surface, hr %#lx.\n", hr); /* A color keyed P8 blit doesn't do anything on WARP - it just leaves the data in the destination * surface untouched. Error checking (DDBLT_KEYSRC without a key * for example) also works as expected. @@ -9394,7 +9394,7 @@ static void test_p8_blit(void) || broken(is_warp && !memcmp(surface_desc.lpSurface, src_data2, sizeof(src_data2))), "Got unexpected P8 color key blit result.\n"); hr = IDirectDrawSurface7_Unlock(dst_p8, NULL); - ok(SUCCEEDED(hr), "Failed to unlock destination surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to unlock destination surface, hr %#lx.\n", hr);
IDirectDrawSurface7_Release(src); IDirectDrawSurface7_Release(dst); @@ -9403,7 +9403,7 @@ static void test_p8_blit(void) IDirectDrawPalette_Release(palette2);
refcount = IDirectDraw7_Release(ddraw); - ok(!refcount, "Got unexpected refcount %u.\n", refcount); + ok(!refcount, "Got unexpected refcount %lu.\n", refcount); DestroyWindow(window); }
@@ -9425,7 +9425,7 @@ static void test_material(void) }
hr = IDirect3DDevice7_GetMaterial(device, &material); - ok(SUCCEEDED(hr), "Failed to get material, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get material, hr %#lx.\n", hr); ok(!memcmp(&U(material).diffuse, &null_color, sizeof(null_color)), "Got unexpected diffuse color {%.8e, %.8e, %.8e, %.8e}.\n", U1(U(material).diffuse).r, U2(U(material).diffuse).g, @@ -9445,7 +9445,7 @@ static void test_material(void) ok(U4(material).power == 0.0f, "Got unexpected power %.8e.\n", U4(material).power);
refcount = IDirect3DDevice7_Release(device); - ok(!refcount, "Device has %u references left.\n", refcount); + ok(!refcount, "Device has %lu references left.\n", refcount); DestroyWindow(window); }
@@ -9491,7 +9491,7 @@ static void test_palette_gdi(void) ddraw = create_ddraw(); ok(!!ddraw, "Failed to create a ddraw object.\n"); hr = IDirectDraw7_SetCooperativeLevel(ddraw, window, DDSCL_NORMAL); - ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#lx.\n", hr);
memset(&surface_desc, 0, sizeof(surface_desc)); surface_desc.dwSize = sizeof(surface_desc); @@ -9503,7 +9503,7 @@ static void test_palette_gdi(void) U4(surface_desc).ddpfPixelFormat.dwFlags = DDPF_PALETTEINDEXED8 | DDPF_RGB; U1(U4(surface_desc).ddpfPixelFormat).dwRGBBitCount = 8; hr = IDirectDraw7_CreateSurface(ddraw, &surface_desc, &surface, NULL); - ok(SUCCEEDED(hr), "Failed to create surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create surface, hr %#lx.\n", hr);
/* Avoid colors from the Windows default palette. */ memset(palette_entries, 0, sizeof(palette_entries)); @@ -9515,7 +9515,7 @@ static void test_palette_gdi(void) palette_entries[4].peBlue = 0x15; hr = IDirectDraw7_CreatePalette(ddraw, DDPCAPS_8BIT | DDPCAPS_ALLOW256, palette_entries, &palette, NULL); - ok(SUCCEEDED(hr), "Failed to create palette, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create palette, hr %#lx.\n", hr);
/* If there is no palette assigned and the display mode is not 8 bpp, some * drivers refuse to create a DC while others allow it. If a DC is created, @@ -9528,9 +9528,9 @@ static void test_palette_gdi(void) * contains uninitialized garbage. See comments below for the P8 case. */
hr = IDirectDrawSurface7_SetPalette(surface, palette); - ok(SUCCEEDED(hr), "Failed to set palette, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set palette, hr %#lx.\n", hr); hr = IDirectDrawSurface7_GetDC(surface, &dc); - ok(SUCCEEDED(hr), "Failed to get DC, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get DC, hr %#lx.\n", hr); ddraw_palette_handle = SelectPalette(dc, GetStockObject(DEFAULT_PALETTE), FALSE); ok(ddraw_palette_handle == GetStockObject(DEFAULT_PALETTE), "Got unexpected palette %p, expected %p.\n", @@ -9557,7 +9557,7 @@ static void test_palette_gdi(void) palette_entries[4].peGreen = 0x24; palette_entries[4].peBlue = 0x25; hr = IDirectDrawPalette_SetEntries(palette, 0, 4, 1, &palette_entries[4]); - ok(SUCCEEDED(hr), "Failed to set palette entries, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set palette entries, hr %#lx.\n", hr);
i = GetDIBColorTable(dc, 4, 1, &rgbquad[4]); ok(i == 1, "Expected count 1, got %u.\n", i); @@ -9568,9 +9568,9 @@ static void test_palette_gdi(void)
/* Neither does re-setting the palette. */ hr = IDirectDrawSurface7_SetPalette(surface, NULL); - ok(SUCCEEDED(hr), "Failed to set palette, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set palette, hr %#lx.\n", hr); hr = IDirectDrawSurface7_SetPalette(surface, palette); - ok(SUCCEEDED(hr), "Failed to set palette, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set palette, hr %#lx.\n", hr);
i = GetDIBColorTable(dc, 4, 1, &rgbquad[4]); ok(i == 1, "Expected count 1, got %u.\n", i); @@ -9580,11 +9580,11 @@ static void test_palette_gdi(void) expected1[4].rgbRed, expected1[4].rgbGreen, expected1[4].rgbBlue);
hr = IDirectDrawSurface7_ReleaseDC(surface, dc); - ok(SUCCEEDED(hr), "Failed to release DC, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to release DC, hr %#lx.\n", hr);
/* Refresh the DC. This updates the palette. */ hr = IDirectDrawSurface7_GetDC(surface, &dc); - ok(SUCCEEDED(hr), "Failed to get DC, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get DC, hr %#lx.\n", hr); i = GetDIBColorTable(dc, 0, ARRAY_SIZE(rgbquad), rgbquad); ok(i == ARRAY_SIZE(rgbquad), "Expected count 255, got %u.\n", i); for (i = 0; i < ARRAY_SIZE(expected2); ++i) @@ -9601,13 +9601,13 @@ static void test_palette_gdi(void) i, rgbquad[i].rgbRed, rgbquad[i].rgbGreen, rgbquad[i].rgbBlue); } hr = IDirectDrawSurface7_ReleaseDC(surface, dc); - ok(SUCCEEDED(hr), "Failed to release DC, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to release DC, hr %#lx.\n", hr);
refcount = IDirectDrawSurface7_Release(surface); - ok(!refcount, "Got unexpected refcount %u.\n", refcount); + ok(!refcount, "Got unexpected refcount %lu.\n", refcount);
hr = IDirectDraw7_SetCooperativeLevel(ddraw, window, DDSCL_FULLSCREEN | DDSCL_EXCLUSIVE); - ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#lx.\n", hr); if (FAILED(IDirectDraw7_SetDisplayMode(ddraw, 640, 480, 8, 0, 0))) { win_skip("Failed to set 8 bpp display mode, skipping test.\n"); @@ -9616,35 +9616,35 @@ static void test_palette_gdi(void) DestroyWindow(window); return; } - ok(SUCCEEDED(hr), "Failed to set display mode, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set display mode, hr %#lx.\n", hr);
memset(&surface_desc, 0, sizeof(surface_desc)); surface_desc.dwSize = sizeof(surface_desc); surface_desc.dwFlags = DDSD_CAPS; surface_desc.ddsCaps.dwCaps = DDSCAPS_PRIMARYSURFACE; hr = IDirectDraw7_CreateSurface(ddraw, &surface_desc, &primary, NULL); - ok(SUCCEEDED(hr), "Failed to create surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create surface, hr %#lx.\n", hr);
memset(&fx, 0, sizeof(fx)); fx.dwSize = sizeof(fx); U5(fx).dwFillColor = 3; SetRect(&r, 0, 0, 319, 479); hr = IDirectDrawSurface7_Blt(primary, &r, NULL, NULL, DDBLT_COLORFILL | DDBLT_WAIT, &fx); - ok(SUCCEEDED(hr), "Failed to clear surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to clear surface, hr %#lx.\n", hr); SetRect(&r, 320, 0, 639, 479); U5(fx).dwFillColor = 4; hr = IDirectDrawSurface7_Blt(primary, &r, NULL, NULL, DDBLT_COLORFILL | DDBLT_WAIT, &fx); - ok(SUCCEEDED(hr), "Failed to clear surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to clear surface, hr %#lx.\n", hr);
hr = IDirectDrawSurface7_SetPalette(primary, palette); - ok(SUCCEEDED(hr), "Failed to set palette, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set palette, hr %#lx.\n", hr); hr = IDirectDrawSurface7_GetDC(primary, &dc); - ok(SUCCEEDED(hr), "Failed to get DC, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get DC, hr %#lx.\n", hr);
color = GetPixel(dc, 160, 240); - ok(color == 0x00030000, "Clear index 3: Got unexpected color 0x%08x.\n", color); + ok(color == 0x00030000, "Clear index 3: Got unexpected color 0x%08lx.\n", color); color = GetPixel(dc, 480, 240); - ok(color == 0x00252423, "Clear index 4: Got unexpected color 0x%08x.\n", color); + ok(color == 0x00252423, "Clear index 4: Got unexpected color 0x%08lx.\n", color);
ddraw_palette_handle = SelectPalette(dc, GetStockObject(DEFAULT_PALETTE), FALSE); ok(ddraw_palette_handle == GetStockObject(DEFAULT_PALETTE), @@ -9674,7 +9674,7 @@ static void test_palette_gdi(void) i, rgbquad[i].rgbRed, rgbquad[i].rgbGreen, rgbquad[i].rgbBlue); } hr = IDirectDrawSurface7_ReleaseDC(primary, dc); - ok(SUCCEEDED(hr), "Failed to release DC, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to release DC, hr %#lx.\n", hr);
memset(&surface_desc, 0, sizeof(surface_desc)); surface_desc.dwSize = sizeof(surface_desc); @@ -9683,12 +9683,12 @@ static void test_palette_gdi(void) surface_desc.dwHeight = 16; surface_desc.ddsCaps.dwCaps = DDSCAPS_OFFSCREENPLAIN; hr = IDirectDraw7_CreateSurface(ddraw, &surface_desc, &surface, NULL); - ok(SUCCEEDED(hr), "Failed to create surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create surface, hr %#lx.\n", hr);
/* Here the offscreen surface appears to use the primary's palette, * but in all likelihood it is actually the system palette. */ hr = IDirectDrawSurface7_GetDC(surface, &dc); - ok(SUCCEEDED(hr), "Failed to get DC, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get DC, hr %#lx.\n", hr); i = GetDIBColorTable(dc, 0, ARRAY_SIZE(rgbquad), rgbquad); ok(i == ARRAY_SIZE(rgbquad), "Expected count 255, got %u.\n", i); for (i = 0; i < ARRAY_SIZE(expected2); ++i) @@ -9705,7 +9705,7 @@ static void test_palette_gdi(void) i, rgbquad[i].rgbRed, rgbquad[i].rgbGreen, rgbquad[i].rgbBlue); } hr = IDirectDrawSurface7_ReleaseDC(surface, dc); - ok(SUCCEEDED(hr), "Failed to release DC, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to release DC, hr %#lx.\n", hr);
/* On real hardware a change to the primary surface's palette applies immediately, * even on device contexts from offscreen surfaces that do not have their own @@ -9721,14 +9721,14 @@ static void test_palette_gdi(void) palette_entries[4].peBlue = 0x56; hr = IDirectDraw7_CreatePalette(ddraw, DDPCAPS_8BIT | DDPCAPS_ALLOW256, palette_entries, &palette2, NULL); - ok(SUCCEEDED(hr), "Failed to create palette, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create palette, hr %#lx.\n", hr); hr = IDirectDrawSurface7_SetPalette(surface, palette2); - ok(SUCCEEDED(hr), "Failed to set palette, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set palette, hr %#lx.\n", hr);
/* A palette assigned to the offscreen surface overrides the primary / system * palette. */ hr = IDirectDrawSurface7_GetDC(surface, &dc); - ok(SUCCEEDED(hr), "Failed to get DC, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get DC, hr %#lx.\n", hr); i = GetDIBColorTable(dc, 0, ARRAY_SIZE(rgbquad), rgbquad); ok(i == ARRAY_SIZE(rgbquad), "Expected count 255, got %u.\n", i); for (i = 0; i < ARRAY_SIZE(expected3); ++i) @@ -9745,24 +9745,24 @@ static void test_palette_gdi(void) i, rgbquad[i].rgbRed, rgbquad[i].rgbGreen, rgbquad[i].rgbBlue); } hr = IDirectDrawSurface7_ReleaseDC(surface, dc); - ok(SUCCEEDED(hr), "Failed to release DC, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to release DC, hr %#lx.\n", hr);
refcount = IDirectDrawSurface7_Release(surface); - ok(!refcount, "Got unexpected refcount %u.\n", refcount); + ok(!refcount, "Got unexpected refcount %lu.\n", refcount);
/* The Windows 8 testbot keeps extra references to the primary and * backbuffer while in 8 bpp mode. */ hr = IDirectDraw7_RestoreDisplayMode(ddraw); - ok(SUCCEEDED(hr), "Failed to restore display mode, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to restore display mode, hr %#lx.\n", hr);
refcount = IDirectDrawSurface7_Release(primary); - ok(!refcount, "Got unexpected refcount %u.\n", refcount); + ok(!refcount, "Got unexpected refcount %lu.\n", refcount); refcount = IDirectDrawPalette_Release(palette2); - ok(!refcount, "Got unexpected refcount %u.\n", refcount); + ok(!refcount, "Got unexpected refcount %lu.\n", refcount); refcount = IDirectDrawPalette_Release(palette); - ok(!refcount, "Got unexpected refcount %u.\n", refcount); + ok(!refcount, "Got unexpected refcount %lu.\n", refcount); refcount = IDirectDraw7_Release(ddraw); - ok(!refcount, "Got unexpected refcount %u.\n", refcount); + ok(!refcount, "Got unexpected refcount %lu.\n", refcount); DestroyWindow(window); }
@@ -9801,18 +9801,18 @@ static void test_palette_alpha(void) return; } hr = IDirectDraw7_SetCooperativeLevel(ddraw, window, DDSCL_EXCLUSIVE | DDSCL_FULLSCREEN); - ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#lx.\n", hr);
memset(palette_entries, 0, sizeof(palette_entries)); palette_entries[1].peFlags = 0x42; palette_entries[2].peFlags = 0xff; palette_entries[3].peFlags = 0x80; hr = IDirectDraw7_CreatePalette(ddraw, DDPCAPS_ALLOW256 | DDPCAPS_8BIT, palette_entries, &palette, NULL); - ok(SUCCEEDED(hr), "Failed to create palette, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create palette, hr %#lx.\n", hr);
memset(palette_entries, 0x66, sizeof(palette_entries)); hr = IDirectDrawPalette_GetEntries(palette, 0, 1, 4, palette_entries); - ok(SUCCEEDED(hr), "Failed to get palette entries, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get palette entries, hr %#lx.\n", hr); ok(palette_entries[0].peFlags == 0x42, "Got unexpected peFlags 0x%02x, expected 0xff.\n", palette_entries[0].peFlags); ok(palette_entries[1].peFlags == 0xff, "Got unexpected peFlags 0x%02x, expected 0xff.\n", @@ -9831,11 +9831,11 @@ static void test_palette_alpha(void) palette_entries[3].peFlags = 0x80; hr = IDirectDraw7_CreatePalette(ddraw, DDPCAPS_ALLOW256 | DDPCAPS_8BIT | DDPCAPS_ALPHA, palette_entries, &palette, NULL); - ok(SUCCEEDED(hr), "Failed to create palette, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create palette, hr %#lx.\n", hr);
memset(palette_entries, 0x66, sizeof(palette_entries)); hr = IDirectDrawPalette_GetEntries(palette, 0, 1, 4, palette_entries); - ok(SUCCEEDED(hr), "Failed to get palette entries, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get palette entries, hr %#lx.\n", hr); ok(palette_entries[0].peFlags == 0x42, "Got unexpected peFlags 0x%02x, expected 0xff.\n", palette_entries[0].peFlags); ok(palette_entries[1].peFlags == 0xff, "Got unexpected peFlags 0x%02x, expected 0xff.\n", @@ -9855,17 +9855,17 @@ static void test_palette_alpha(void) surface_desc.ddsCaps.dwCaps = test_data[i].caps; hr = IDirectDraw7_CreateSurface(ddraw, &surface_desc, &surface, NULL); if (is_ddraw64 && test_data[i].caps & DDSCAPS_TEXTURE) - todo_wine ok(hr == E_NOINTERFACE, "%s: Got unexpected hr %#x.\n", test_data[i].name, hr); + todo_wine ok(hr == E_NOINTERFACE, "%s: Got unexpected hr %#lx.\n", test_data[i].name, hr); else - ok(hr == DD_OK, "%s: Got unexpected hr %#x.\n", test_data[i].name, hr); + ok(hr == DD_OK, "%s: Got unexpected hr %#lx.\n", test_data[i].name, hr); if (FAILED(hr)) continue;
hr = IDirectDrawSurface7_SetPalette(surface, palette); if (test_data[i].attach_allowed) - ok(SUCCEEDED(hr), "Failed to attach palette to %s surface, hr %#x.\n", test_data[i].name, hr); + ok(SUCCEEDED(hr), "Failed to attach palette to %s surface, hr %#lx.\n", test_data[i].name, hr); else - ok(hr == DDERR_INVALIDSURFACETYPE, "Got unexpected hr %#x, %s surface.\n", hr, test_data[i].name); + ok(hr == DDERR_INVALIDSURFACETYPE, "Got unexpected hr %#lx, %s surface.\n", hr, test_data[i].name);
if (SUCCEEDED(hr)) { @@ -9874,7 +9874,7 @@ static void test_palette_alpha(void) UINT retval;
hr = IDirectDrawSurface7_GetDC(surface, &dc); - ok(SUCCEEDED(hr), "Failed to get DC, hr %#x, %s surface.\n", hr, test_data[i].name); + ok(SUCCEEDED(hr), "Failed to get DC, hr %#lx, %s surface.\n", hr, test_data[i].name); retval = GetDIBColorTable(dc, 1, 1, &rgbquad); ok(retval == 1, "GetDIBColorTable returned unexpected result %u.\n", retval); ok(rgbquad.rgbRed == 0xff, "Expected rgbRed = 0xff, got %#x, %s surface.\n", @@ -9886,7 +9886,7 @@ static void test_palette_alpha(void) ok(rgbquad.rgbReserved == 0, "Expected rgbReserved = 0, got %u, %s surface.\n", rgbquad.rgbReserved, test_data[i].name); hr = IDirectDrawSurface7_ReleaseDC(surface, dc); - ok(SUCCEEDED(hr), "Failed to release DC, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to release DC, hr %#lx.\n", hr); } IDirectDrawSurface7_Release(surface); } @@ -9905,20 +9905,20 @@ static void test_palette_alpha(void) U3(U4(surface_desc).ddpfPixelFormat).dwGBitMask = 0x0000ff00; U4(U4(surface_desc).ddpfPixelFormat).dwBBitMask = 0x000000ff; hr = IDirectDraw7_CreateSurface(ddraw, &surface_desc, &surface, NULL); - ok(SUCCEEDED(hr), "Failed to create surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create surface, hr %#lx.\n", hr); hr = IDirectDrawSurface7_SetPalette(surface, palette); - ok(hr == DDERR_INVALIDSURFACETYPE, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_INVALIDSURFACETYPE, "Got unexpected hr %#lx.\n", hr); IDirectDrawSurface7_Release(surface);
/* The Windows 8 testbot keeps extra references to the primary * while in 8 bpp mode. */ hr = IDirectDraw7_RestoreDisplayMode(ddraw); - ok(SUCCEEDED(hr), "Failed to restore display mode, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to restore display mode, hr %#lx.\n", hr);
refcount = IDirectDrawPalette_Release(palette); - ok(!refcount, "Got unexpected refcount %u.\n", refcount); + ok(!refcount, "Got unexpected refcount %lu.\n", refcount); refcount = IDirectDraw7_Release(ddraw); - ok(!refcount, "Got unexpected refcount %u.\n", refcount); + ok(!refcount, "Got unexpected refcount %lu.\n", refcount); DestroyWindow(window); }
@@ -9948,7 +9948,7 @@ static void test_vb_writeonly(void) }
hr = IDirect3DDevice7_GetDirect3D(device, &d3d); - ok(SUCCEEDED(hr), "Failed to get d3d interface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get d3d interface, hr %#lx.\n", hr);
memset(&desc, 0, sizeof(desc)); desc.dwSize = sizeof(desc); @@ -9956,32 +9956,32 @@ static void test_vb_writeonly(void) desc.dwFVF = D3DFVF_XYZRHW; desc.dwNumVertices = ARRAY_SIZE(quad); hr = IDirect3D7_CreateVertexBuffer(d3d, &desc, &buffer, 0); - ok(SUCCEEDED(hr), "Failed to create vertex buffer, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create vertex buffer, hr %#lx.\n", hr);
hr = IDirect3DVertexBuffer7_Lock(buffer, DDLOCK_DISCARDCONTENTS, &ptr, NULL); - ok(SUCCEEDED(hr), "Failed to lock vertex buffer, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to lock vertex buffer, hr %#lx.\n", hr); memcpy(ptr, quad, sizeof(quad)); hr = IDirect3DVertexBuffer7_Unlock(buffer); - ok(SUCCEEDED(hr), "Failed to unlock vertex buffer, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to unlock vertex buffer, hr %#lx.\n", hr);
hr = IDirect3DDevice7_BeginScene(device); - ok(SUCCEEDED(hr), "Failed to begin scene, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to begin scene, hr %#lx.\n", hr); hr = IDirect3DDevice7_DrawPrimitiveVB(device, D3DPT_TRIANGLESTRIP, buffer, 0, 4, 0); - ok(SUCCEEDED(hr), "Failed to draw, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to draw, hr %#lx.\n", hr); hr = IDirect3DDevice7_EndScene(device); - ok(SUCCEEDED(hr), "Failed to end scene, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to end scene, hr %#lx.\n", hr);
hr = IDirect3DVertexBuffer7_Lock(buffer, 0, &ptr, NULL); - ok(SUCCEEDED(hr), "Failed to lock vertex buffer, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to lock vertex buffer, hr %#lx.\n", hr); ok (!memcmp(ptr, quad, sizeof(quad)), "Got unexpected vertex buffer data.\n"); hr = IDirect3DVertexBuffer7_Unlock(buffer); - ok(SUCCEEDED(hr), "Failed to unlock vertex buffer, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to unlock vertex buffer, hr %#lx.\n", hr);
hr = IDirect3DVertexBuffer7_Lock(buffer, DDLOCK_READONLY, &ptr, NULL); - ok(SUCCEEDED(hr), "Failed to lock vertex buffer, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to lock vertex buffer, hr %#lx.\n", hr); ok (!memcmp(ptr, quad, sizeof(quad)), "Got unexpected vertex buffer data.\n"); hr = IDirect3DVertexBuffer7_Unlock(buffer); - ok(SUCCEEDED(hr), "Failed to unlock vertex buffer, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to unlock vertex buffer, hr %#lx.\n", hr);
IDirect3DVertexBuffer7_Release(buffer); IDirect3D7_Release(d3d); @@ -10008,7 +10008,7 @@ static void test_lost_device(void) ddraw = create_ddraw(); ok(!!ddraw, "Failed to create a ddraw object.\n"); hr = IDirectDraw7_SetCooperativeLevel(ddraw, window1, DDSCL_EXCLUSIVE | DDSCL_FULLSCREEN); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr);
memset(&surface_desc, 0, sizeof(surface_desc)); surface_desc.dwSize = sizeof(surface_desc); @@ -10016,7 +10016,7 @@ static void test_lost_device(void) surface_desc.ddsCaps.dwCaps = DDSCAPS_PRIMARYSURFACE | DDSCAPS_COMPLEX | DDSCAPS_FLIP; U5(surface_desc).dwBackBufferCount = 1; hr = IDirectDraw7_CreateSurface(ddraw, &surface_desc, &surface, NULL); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr);
memset(&surface_desc, 0, sizeof(surface_desc)); surface_desc.dwSize = sizeof(surface_desc); @@ -10025,7 +10025,7 @@ static void test_lost_device(void) surface_desc.dwWidth = 100; surface_desc.dwHeight = 100; hr = IDirectDraw7_CreateSurface(ddraw, &surface_desc, &sysmem_surface, NULL); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr);
memset(&surface_desc, 0, sizeof(surface_desc)); surface_desc.dwSize = sizeof(surface_desc); @@ -10046,93 +10046,93 @@ static void test_lost_device(void) }
hr = IDirectDraw7_TestCooperativeLevel(ddraw); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface7_IsLost(surface); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface7_Flip(surface, NULL, DDFLIP_WAIT); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface7_IsLost(sysmem_surface); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); if (vidmem_surface) { hr = IDirectDrawSurface7_IsLost(vidmem_surface); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); }
ret = SetForegroundWindow(GetDesktopWindow()); ok(ret, "Failed to set foreground window.\n"); hr = IDirectDraw7_TestCooperativeLevel(ddraw); - ok(hr == DDERR_NOEXCLUSIVEMODE, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_NOEXCLUSIVEMODE, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface7_IsLost(surface); - ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface7_Flip(surface, NULL, DDFLIP_WAIT); - ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface7_Restore(surface); - ok(hr == DDERR_WRONGMODE, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_WRONGMODE, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface7_IsLost(surface); - ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface7_IsLost(sysmem_surface); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface7_Restore(sysmem_surface); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface7_IsLost(sysmem_surface); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); if (vidmem_surface) { hr = IDirectDrawSurface7_IsLost(vidmem_surface); - ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface7_Restore(vidmem_surface); - ok(hr == DDERR_WRONGMODE, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_WRONGMODE, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface7_IsLost(vidmem_surface); - ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#lx.\n", hr); }
ret = SetForegroundWindow(window1); ok(ret, "Failed to set foreground window.\n"); hr = IDirectDraw7_TestCooperativeLevel(ddraw); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface7_IsLost(surface); - ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface7_Flip(surface, NULL, DDFLIP_WAIT); - ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface7_IsLost(sysmem_surface); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); if (vidmem_surface) { hr = IDirectDrawSurface7_IsLost(vidmem_surface); - ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#lx.\n", hr); }
hr = IDirectDraw7_RestoreAllSurfaces(ddraw); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirectDraw7_TestCooperativeLevel(ddraw); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface7_IsLost(surface); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface7_Flip(surface, NULL, DDFLIP_WAIT); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface7_IsLost(sysmem_surface); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); if (vidmem_surface) { hr = IDirectDrawSurface7_IsLost(vidmem_surface); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); }
hr = IDirectDraw7_SetCooperativeLevel(ddraw, window1, DDSCL_NORMAL); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirectDraw7_TestCooperativeLevel(ddraw); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface7_IsLost(surface); - todo_wine ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#x.\n", hr); + todo_wine ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface7_Flip(surface, NULL, DDFLIP_WAIT); - todo_wine ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#x.\n", hr); + todo_wine ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface7_IsLost(sysmem_surface); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); if (vidmem_surface) { hr = IDirectDrawSurface7_IsLost(vidmem_surface); - todo_wine ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#x.\n", hr); + todo_wine ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#lx.\n", hr); }
/* Trying to restore the primary will crash, probably because flippable @@ -10143,78 +10143,78 @@ static void test_lost_device(void) surface_desc.dwFlags = DDSD_CAPS; surface_desc.ddsCaps.dwCaps = DDSCAPS_PRIMARYSURFACE; hr = IDirectDraw7_CreateSurface(ddraw, &surface_desc, &surface, NULL); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface7_IsLost(sysmem_surface); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirectDraw7_RestoreAllSurfaces(ddraw); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr);
hr = IDirectDraw7_TestCooperativeLevel(ddraw); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface7_IsLost(surface); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface7_IsLost(sysmem_surface); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); if (vidmem_surface) { hr = IDirectDrawSurface7_IsLost(vidmem_surface); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); }
ret = SetForegroundWindow(GetDesktopWindow()); ok(ret, "Failed to set foreground window.\n"); hr = IDirectDraw7_TestCooperativeLevel(ddraw); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface7_IsLost(surface); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface7_IsLost(sysmem_surface); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); if (vidmem_surface) { hr = IDirectDrawSurface7_IsLost(vidmem_surface); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); }
ret = SetForegroundWindow(window1); ok(ret, "Failed to set foreground window.\n"); hr = IDirectDraw7_TestCooperativeLevel(ddraw); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface7_IsLost(surface); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface7_IsLost(sysmem_surface); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); if (vidmem_surface) { hr = IDirectDrawSurface7_IsLost(vidmem_surface); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); }
hr = IDirectDraw7_SetCooperativeLevel(ddraw, window1, DDSCL_EXCLUSIVE | DDSCL_FULLSCREEN); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirectDraw7_TestCooperativeLevel(ddraw); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface7_IsLost(surface); - ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface7_IsLost(sysmem_surface); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); if (vidmem_surface) { hr = IDirectDrawSurface7_IsLost(vidmem_surface); - ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#lx.\n", hr); }
hr = IDirectDraw7_RestoreAllSurfaces(ddraw); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirectDraw7_TestCooperativeLevel(ddraw); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface7_IsLost(surface); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface7_IsLost(sysmem_surface); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); if (vidmem_surface) { hr = IDirectDrawSurface7_IsLost(vidmem_surface); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); }
IDirectDrawSurface7_Release(surface); @@ -10224,115 +10224,115 @@ static void test_lost_device(void) surface_desc.ddsCaps.dwCaps = DDSCAPS_PRIMARYSURFACE | DDSCAPS_COMPLEX | DDSCAPS_FLIP; U5(surface_desc).dwBackBufferCount = 1; hr = IDirectDraw7_CreateSurface(ddraw, &surface_desc, &surface, NULL); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr);
hr = IDirectDraw7_SetCooperativeLevel(ddraw, window1, DDSCL_EXCLUSIVE | DDSCL_FULLSCREEN); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirectDraw7_TestCooperativeLevel(ddraw); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface7_IsLost(surface); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface7_Flip(surface, NULL, DDFLIP_WAIT); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface7_IsLost(sysmem_surface); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); if (vidmem_surface) { hr = IDirectDrawSurface7_IsLost(vidmem_surface); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); }
hr = IDirectDraw7_SetCooperativeLevel(ddraw, window1, DDSCL_NORMAL | DDSCL_FULLSCREEN); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirectDraw7_TestCooperativeLevel(ddraw); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface7_IsLost(surface); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface7_Flip(surface, NULL, DDFLIP_WAIT); - ok(hr == DDERR_NOEXCLUSIVEMODE, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_NOEXCLUSIVEMODE, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface7_IsLost(sysmem_surface); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); if (vidmem_surface) { hr = IDirectDrawSurface7_IsLost(vidmem_surface); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); }
hr = IDirectDraw7_SetCooperativeLevel(ddraw, window1, DDSCL_NORMAL); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirectDraw7_TestCooperativeLevel(ddraw); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface7_IsLost(surface); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface7_Flip(surface, NULL, DDFLIP_WAIT); - ok(hr == DDERR_NOEXCLUSIVEMODE, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_NOEXCLUSIVEMODE, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface7_IsLost(sysmem_surface); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); if (vidmem_surface) { hr = IDirectDrawSurface7_IsLost(vidmem_surface); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); }
hr = IDirectDraw7_SetCooperativeLevel(ddraw, window2, DDSCL_NORMAL); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirectDraw7_TestCooperativeLevel(ddraw); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface7_IsLost(surface); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface7_Flip(surface, NULL, DDFLIP_WAIT); - ok(hr == DDERR_NOEXCLUSIVEMODE, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_NOEXCLUSIVEMODE, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface7_IsLost(sysmem_surface); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); if (vidmem_surface) { hr = IDirectDrawSurface7_IsLost(vidmem_surface); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); }
hr = IDirectDraw7_SetCooperativeLevel(ddraw, window2, DDSCL_NORMAL | DDSCL_FULLSCREEN); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirectDraw7_TestCooperativeLevel(ddraw); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface7_IsLost(surface); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface7_Flip(surface, NULL, DDFLIP_WAIT); - ok(hr == DDERR_NOEXCLUSIVEMODE, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_NOEXCLUSIVEMODE, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface7_IsLost(sysmem_surface); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); if (vidmem_surface) { hr = IDirectDrawSurface7_IsLost(vidmem_surface); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); }
hr = IDirectDraw7_SetCooperativeLevel(ddraw, window2, DDSCL_EXCLUSIVE | DDSCL_FULLSCREEN); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirectDraw7_TestCooperativeLevel(ddraw); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface7_IsLost(surface); - ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface7_Flip(surface, NULL, DDFLIP_WAIT); - ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface7_IsLost(sysmem_surface); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); if (vidmem_surface) { hr = IDirectDrawSurface7_IsLost(vidmem_surface); - ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#lx.\n", hr); }
memset(&caps, 0, sizeof(caps)); caps.dwCaps = DDSCAPS_FLIP;
hr = IDirectDrawSurface7_GetAttachedSurface(surface, &caps, &back_buffer); - ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface7_Restore(surface); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface7_GetAttachedSurface(surface, &caps, &back_buffer); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface7_IsLost(back_buffer); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr);
IDirectDrawSurface7_Release(back_buffer);
@@ -10341,7 +10341,7 @@ static void test_lost_device(void) IDirectDrawSurface7_Release(sysmem_surface); IDirectDrawSurface7_Release(surface); refcount = IDirectDraw7_Release(ddraw); - ok(!refcount, "Got unexpected refcount %u.\n", refcount); + ok(!refcount, "Got unexpected refcount %lu.\n", refcount); DestroyWindow(window2); DestroyWindow(window1); } @@ -10384,12 +10384,12 @@ static void test_resource_priority(void) ddraw = create_ddraw(); ok(!!ddraw, "Failed to create a ddraw object.\n"); hr = IDirectDraw7_SetCooperativeLevel(ddraw, window, DDSCL_NORMAL); - ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#lx.\n", hr);
memset(&hal_caps, 0, sizeof(hal_caps)); hal_caps.dwSize = sizeof(hal_caps); hr = IDirectDraw7_GetCaps(ddraw, &hal_caps, NULL); - ok(SUCCEEDED(hr), "Failed to get caps, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get caps, hr %#lx.\n", hr); if ((hal_caps.ddsCaps.dwCaps & needed_caps) != needed_caps || !(hal_caps.ddsCaps.dwCaps & DDSCAPS2_TEXTUREMANAGE)) { @@ -10409,48 +10409,48 @@ static void test_resource_priority(void) hr = IDirectDraw7_CreateSurface(ddraw, &surface_desc, &surface, NULL); if (is_ddraw64 && (test_data[i].caps & DDSCAPS_TEXTURE)) { - todo_wine ok(hr == E_NOINTERFACE, "Got unexpected hr %#x, type %s.\n", hr, test_data[i].name); + todo_wine ok(hr == E_NOINTERFACE, "Got unexpected hr %#lx, type %s.\n", hr, test_data[i].name); if (SUCCEEDED(hr)) IDirectDrawSurface7_Release(surface); continue; } - ok(SUCCEEDED(hr), "Failed to create surface, hr %#x, type %s.\n", hr, test_data[i].name); + ok(SUCCEEDED(hr), "Failed to create surface, hr %#lx, type %s.\n", hr, test_data[i].name);
/* Priority == NULL segfaults. */ priority = 0xdeadbeef; hr = IDirectDrawSurface7_GetPriority(surface, &priority); - ok(hr == test_data[i].hr, "Got unexpected hr %#x, type %s.\n", hr, test_data[i].name); + ok(hr == test_data[i].hr, "Got unexpected hr %#lx, type %s.\n", hr, test_data[i].name); if (SUCCEEDED(test_data[i].hr)) - ok(priority == 0, "Got unexpected priority %u, type %s.\n", priority, test_data[i].name); + ok(priority == 0, "Got unexpected priority %lu, type %s.\n", priority, test_data[i].name); else - ok(priority == 0xdeadbeef, "Got unexpected priority %u, type %s.\n", priority, test_data[i].name); + ok(priority == 0xdeadbeef, "Got unexpected priority %lu, type %s.\n", priority, test_data[i].name);
if (!test_data[i].crash) { hr = IDirectDrawSurface7_SetPriority(surface, 1); - ok(hr == test_data[i].hr, "Got unexpected hr %#x, type %s.\n", hr, test_data[i].name); + ok(hr == test_data[i].hr, "Got unexpected hr %#lx, type %s.\n", hr, test_data[i].name); hr = IDirectDrawSurface7_GetPriority(surface, &priority); - ok(hr == test_data[i].hr, "Got unexpected hr %#x, type %s.\n", hr, test_data[i].name); + ok(hr == test_data[i].hr, "Got unexpected hr %#lx, type %s.\n", hr, test_data[i].name); if (SUCCEEDED(test_data[i].hr)) { - ok(priority == 1, "Got unexpected priority %u, type %s.\n", priority, test_data[i].name); + ok(priority == 1, "Got unexpected priority %lu, type %s.\n", priority, test_data[i].name); hr = IDirectDrawSurface7_SetPriority(surface, 2); - ok(hr == test_data[i].hr, "Got unexpected hr %#x, type %s.\n", hr, test_data[i].name); + ok(hr == test_data[i].hr, "Got unexpected hr %#lx, type %s.\n", hr, test_data[i].name); } else - ok(priority == 0xdeadbeef, "Got unexpected priority %u, type %s.\n", priority, test_data[i].name); + ok(priority == 0xdeadbeef, "Got unexpected priority %lu, type %s.\n", priority, test_data[i].name); }
if (test_data[i].caps2 & DDSCAPS2_CUBEMAP) { caps.dwCaps2 = DDSCAPS2_CUBEMAP_NEGATIVEZ; hr = IDirectDrawSurface7_GetAttachedSurface(surface, &caps, &mipmap); - ok(SUCCEEDED(hr), "Failed to get attached surface, i %u, hr %#x.\n", i, hr); + ok(SUCCEEDED(hr), "Failed to get attached surface, i %u, hr %#lx.\n", i, hr); /* IDirectDrawSurface7_SetPriority crashes when called on non-positive X surfaces on Windows */ priority = 0xdeadbeef; hr = IDirectDrawSurface7_GetPriority(mipmap, &priority); - ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#x, type %s.\n", hr, test_data[i].name); - ok(priority == 0xdeadbeef, "Got unexpected priority %u, type %s.\n", priority, test_data[i].name); + ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#lx, type %s.\n", hr, test_data[i].name); + ok(priority == 0xdeadbeef, "Got unexpected priority %lu, type %s.\n", priority, test_data[i].name);
IDirectDrawSurface7_Release(mipmap); } @@ -10470,27 +10470,27 @@ static void test_resource_priority(void) surface_desc.ddsCaps.dwCaps2 = DDSCAPS2_TEXTUREMANAGE; U2(surface_desc).dwMipMapCount = 2; hr = IDirectDraw7_CreateSurface(ddraw, &surface_desc, &surface, NULL); - ok(SUCCEEDED(hr), "Failed to create surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create surface, hr %#lx.\n", hr); caps.dwCaps2 = 0; hr = IDirectDrawSurface7_GetAttachedSurface(surface, &caps, &mipmap); - ok(SUCCEEDED(hr), "Failed to get attached surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get attached surface, hr %#lx.\n", hr);
priority = 0xdeadbeef; hr = IDirectDrawSurface7_GetPriority(mipmap, &priority); - ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#x, type managed mipmap.\n", hr); - ok(priority == 0xdeadbeef, "Got unexpected priority %u, type managed mipmap.\n", priority); + ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#lx, type managed mipmap.\n", hr); + ok(priority == 0xdeadbeef, "Got unexpected priority %lu, type managed mipmap.\n", priority); /* SetPriority on the mipmap surface crashes. */ hr = IDirectDrawSurface7_GetPriority(surface, &priority); - ok(SUCCEEDED(hr), "Failed to get priority, hr %#x.\n", hr); - ok(priority == 0, "Got unexpected priority %u, type managed mipmap.\n", priority); + ok(SUCCEEDED(hr), "Failed to get priority, hr %#lx.\n", hr); + ok(priority == 0, "Got unexpected priority %lu, type managed mipmap.\n", priority);
IDirectDrawSurface7_Release(mipmap); refcount = IDirectDrawSurface7_Release(surface); - ok(!refcount, "Got unexpected refcount %u.\n", refcount); + ok(!refcount, "Got unexpected refcount %lu.\n", refcount);
done: refcount = IDirectDraw7_Release(ddraw); - ok(!refcount, "Got unexpected refcount %u.\n", refcount); + ok(!refcount, "Got unexpected refcount %lu.\n", refcount); DestroyWindow(window); }
@@ -10507,7 +10507,7 @@ static void test_surface_desc_lock(void) ddraw = create_ddraw(); ok(!!ddraw, "Failed to create a ddraw object.\n"); hr = IDirectDraw7_SetCooperativeLevel(ddraw, window, DDSCL_NORMAL); - ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#lx.\n", hr);
memset(&surface_desc, 0, sizeof(surface_desc)); surface_desc.dwSize = sizeof(surface_desc); @@ -10516,36 +10516,36 @@ static void test_surface_desc_lock(void) surface_desc.dwHeight = 16; surface_desc.ddsCaps.dwCaps = DDSCAPS_OFFSCREENPLAIN; hr = IDirectDraw7_CreateSurface(ddraw, &surface_desc, &surface, NULL); - ok(SUCCEEDED(hr), "Failed to create surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create surface, hr %#lx.\n", hr);
memset(&surface_desc, 0xaa, sizeof(surface_desc)); surface_desc.dwSize = sizeof(surface_desc); hr = IDirectDrawSurface7_GetSurfaceDesc(surface, &surface_desc); - ok(SUCCEEDED(hr), "Failed to get surface desc, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get surface desc, hr %#lx.\n", hr); ok(!surface_desc.lpSurface, "Got unexpected lpSurface %p.\n", surface_desc.lpSurface);
memset(&surface_desc, 0xaa, sizeof(surface_desc)); surface_desc.dwSize = sizeof(surface_desc); hr = IDirectDrawSurface7_Lock(surface, NULL, &surface_desc, 0, NULL); - ok(SUCCEEDED(hr), "Failed to lock surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to lock surface, hr %#lx.\n", hr); ok(surface_desc.lpSurface != NULL, "Got unexpected lpSurface %p.\n", surface_desc.lpSurface); memset(&surface_desc, 0xaa, sizeof(surface_desc)); surface_desc.dwSize = sizeof(surface_desc); hr = IDirectDrawSurface7_GetSurfaceDesc(surface, &surface_desc); - ok(SUCCEEDED(hr), "Failed to get surface desc, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get surface desc, hr %#lx.\n", hr); ok(!surface_desc.lpSurface, "Got unexpected lpSurface %p.\n", surface_desc.lpSurface); hr = IDirectDrawSurface7_Unlock(surface, NULL); - ok(SUCCEEDED(hr), "Failed to unlock surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to unlock surface, hr %#lx.\n", hr);
memset(&surface_desc, 0xaa, sizeof(surface_desc)); surface_desc.dwSize = sizeof(surface_desc); hr = IDirectDrawSurface7_GetSurfaceDesc(surface, &surface_desc); - ok(SUCCEEDED(hr), "Failed to get surface desc, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get surface desc, hr %#lx.\n", hr); ok(!surface_desc.lpSurface, "Got unexpected lpSurface %p.\n", surface_desc.lpSurface);
IDirectDrawSurface7_Release(surface); refcount = IDirectDraw7_Release(ddraw); - ok(!refcount, "Got unexpected refcount %u.\n", refcount); + ok(!refcount, "Got unexpected refcount %lu.\n", refcount); DestroyWindow(window); }
@@ -10605,30 +10605,30 @@ static void test_fog_interpolation(void) }
hr = IDirect3DDevice7_GetRenderTarget(device, &rt); - ok(SUCCEEDED(hr), "Failed to get render target, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get render target, hr %#lx.\n", hr); hr = IDirect3DDevice7_GetCaps(device, &caps); - ok(SUCCEEDED(hr), "Failed to get device caps, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get device caps, hr %#lx.\n", hr); if (!(caps.dpcTriCaps.dwRasterCaps & D3DPRASTERCAPS_FOGTABLE)) skip("D3DPRASTERCAPS_FOGTABLE not supported, skipping some fog tests\n");
hr = IDirect3DDevice7_SetRenderState(device, D3DRENDERSTATE_LIGHTING, FALSE); - ok(SUCCEEDED(hr), "Failed to set render state, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set render state, hr %#lx.\n", hr); hr = IDirect3DDevice7_SetRenderState(device, D3DRENDERSTATE_ZENABLE, FALSE); - ok(SUCCEEDED(hr), "Failed to set render state, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set render state, hr %#lx.\n", hr); hr = IDirect3DDevice7_SetRenderState(device, D3DRENDERSTATE_FOGENABLE, TRUE); - ok(SUCCEEDED(hr), "Failed to set render state, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set render state, hr %#lx.\n", hr); hr = IDirect3DDevice7_SetRenderState(device, D3DRENDERSTATE_FOGCOLOR, 0x0000ff00); - ok(SUCCEEDED(hr), "Failed to set render state, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set render state, hr %#lx.\n", hr); conv.f = 5.0; hr = IDirect3DDevice7_SetRenderState(device, D3DRENDERSTATE_FOGDENSITY, conv.d); - ok(SUCCEEDED(hr), "Failed to set render state, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set render state, hr %#lx.\n", hr);
hr = IDirect3DDevice7_SetTextureStageState(device, 0, D3DTSS_COLOROP, D3DTOP_SELECTARG1); - ok(SUCCEEDED(hr), "Failed to set texture stage state, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set texture stage state, hr %#lx.\n", hr); hr = IDirect3DDevice7_SetTextureStageState(device, 0, D3DTSS_COLORARG1, D3DTA_TFACTOR); - ok(SUCCEEDED(hr), "Failed to set texture stage state, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set texture stage state, hr %#lx.\n", hr); hr = IDirect3DDevice7_SetRenderState(device, D3DRENDERSTATE_TEXTUREFACTOR, 0x000000ff); - ok(SUCCEEDED(hr), "Failed to set render state, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set render state, hr %#lx.\n", hr);
for (i = 0; i < ARRAY_SIZE(tests); ++i) { @@ -10636,35 +10636,35 @@ static void test_fog_interpolation(void) continue;
hr = IDirect3DDevice7_Clear(device, 0, NULL, D3DCLEAR_TARGET, 0x00808080, 0.0f, 0); - ok(SUCCEEDED(hr), "Failed to clear, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to clear, hr %#lx.\n", hr);
hr = IDirect3DDevice7_SetRenderState(device, D3DRENDERSTATE_SHADEMODE, tests[i].shade); - ok(SUCCEEDED(hr), "Failed to set render state, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set render state, hr %#lx.\n", hr); hr = IDirect3DDevice7_SetRenderState(device, D3DRENDERSTATE_FOGVERTEXMODE, tests[i].vfog); - ok(SUCCEEDED(hr), "Failed to set render state, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set render state, hr %#lx.\n", hr); hr = IDirect3DDevice7_SetRenderState(device, D3DRENDERSTATE_FOGTABLEMODE, tests[i].tfog); - ok(SUCCEEDED(hr), "Failed to set render state, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set render state, hr %#lx.\n", hr); hr = IDirect3DDevice7_BeginScene(device); - ok(SUCCEEDED(hr), "Failed to begin scene, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to begin scene, hr %#lx.\n", hr); hr = IDirect3DDevice7_DrawPrimitive(device, D3DPT_TRIANGLESTRIP, D3DFVF_XYZ | D3DFVF_DIFFUSE | D3DFVF_SPECULAR, quad, 4, 0); - ok(SUCCEEDED(hr), "Failed to draw, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to draw, hr %#lx.\n", hr); hr = IDirect3DDevice7_EndScene(device); - ok(SUCCEEDED(hr), "Failed to end scene, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to end scene, hr %#lx.\n", hr);
color = get_surface_color(rt, 0, 240); - ok(compare_color(color, 0x000000ff, 2), "Got unexpected color 0x%08x, case %u.\n", color, i); + ok(compare_color(color, 0x000000ff, 2), "Got unexpected color 0x%08lx, case %u.\n", color, i); color = get_surface_color(rt, 320, 240); todo_wine_if (tests[i].todo) ok(compare_color(color, tests[i].middle_color, 2), - "Got unexpected color 0x%08x, case %u.\n", color, i); + "Got unexpected color 0x%08lx, case %u.\n", color, i); color = get_surface_color(rt, 639, 240); - ok(compare_color(color, 0x0000fd02, 2), "Got unexpected color 0x%08x, case %u.\n", color, i); + ok(compare_color(color, 0x0000fd02, 2), "Got unexpected color 0x%08lx, case %u.\n", color, i); }
IDirectDrawSurface7_Release(rt); refcount = IDirect3DDevice7_Release(device); - ok(!refcount, "Device has %u references left.\n", refcount); + ok(!refcount, "Device has %lu references left.\n", refcount); DestroyWindow(window); }
@@ -10759,42 +10759,42 @@ static void test_fog_process_vertices(void) return; } hr = IDirect3DDevice7_GetDirect3D(device, &d3d); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
hr = IDirect3DDevice7_SetTransform(device, D3DTRANSFORMSTATE_WORLD, &model_matrix); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirect3DDevice7_SetTransform(device, D3DTRANSFORMSTATE_VIEW, &view_matrix); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirect3DDevice7_SetTransform(device, D3DTRANSFORMSTATE_PROJECTION, &identity_matrix); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
memset(&vb_desc, 0, sizeof(vb_desc)); vb_desc.dwSize = sizeof(vb_desc); vb_desc.dwFVF = D3DFVF_XYZ | D3DFVF_NORMAL; vb_desc.dwNumVertices = 1; hr = IDirect3D7_CreateVertexBuffer(d3d, &vb_desc, &src_vb, 0); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
memset(&vb_desc, 0, sizeof(vb_desc)); vb_desc.dwSize = sizeof(vb_desc); vb_desc.dwFVF = D3DFVF_XYZRHW | D3DFVF_DIFFUSE | D3DFVF_SPECULAR; vb_desc.dwNumVertices = 1; hr = IDirect3D7_CreateVertexBuffer(d3d, &vb_desc, &dst_vb, 0); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
hr = IDirect3DDevice7_LightEnable(device, 0, TRUE); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirect3DDevice7_SetRenderState(device, D3DRENDERSTATE_SPECULARENABLE, TRUE); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirect3DDevice7_SetRenderState(device, D3DRENDERSTATE_LIGHTING, TRUE); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirect3DDevice7_SetRenderState(device, D3DRENDERSTATE_FOGENABLE, TRUE); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirect3DDevice7_SetRenderState(device, D3DRENDERSTATE_CLIPPING, FALSE); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
hr = IDirect3DDevice7_SetLight(device, 0, &directional_light); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
memset(&material, 0, sizeof(material)); U1(U2(material).specular).r = 0.0f; @@ -10803,7 +10803,7 @@ static void test_fog_process_vertices(void) U4(U2(material).specular).a = 0.5f; U4(material).power = 5.0f; hr = IDirect3DDevice7_SetMaterial(device, &material); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
for (i = 0; i < ARRAY_SIZE(tests); ++i) { @@ -10811,43 +10811,43 @@ static void test_fog_process_vertices(void) tests[i].fog_vertex_mode); hr = IDirect3DDevice7_SetRenderState(device, D3DRENDERSTATE_FOGTABLEMODE, tests[i].fog_table_mode); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirect3DDevice7_SetRenderState(device, D3DRENDERSTATE_RANGEFOGENABLE, tests[i].range_fog); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
hr = IDirect3DVertexBuffer7_Lock(src_vb, 0, (void **)&src_data, NULL); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); *src_data = tests[i].vertex; hr = IDirect3DVertexBuffer7_Unlock(src_vb); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
hr = IDirect3DVertexBuffer7_Lock(dst_vb, 0, (void **)&dst_data, NULL); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); memset(dst_data, 0, sizeof(*dst_data)); hr = IDirect3DVertexBuffer7_Unlock(dst_vb); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirect3DVertexBuffer7_ProcessVertices(dst_vb, D3DVOP_TRANSFORM | D3DVOP_LIGHT, 0, 1, src_vb, 0, device, 0); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
hr = IDirect3DVertexBuffer7_Lock(dst_vb, 0, (void **)&dst_data, NULL); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
ok(compare_color(dst_data->specular, tests[i].expected_color, 1) || broken(tests[i].expected_broken && compare_color(dst_data->specular, tests[i].expected_broken, 1)), - "Expected color 0x%08x, got 0x%08x, test %u.\n", + "Expected color 0x%08lx, got 0x%08lx, test %u.\n", tests[i].expected_color, dst_data->specular, i);
hr = IDirect3DVertexBuffer7_Unlock(dst_vb); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); }
IDirect3DVertexBuffer7_Release(dst_vb); IDirect3DVertexBuffer7_Release(src_vb); IDirect3D7_Release(d3d); refcount = IDirect3DDevice7_Release(device); - ok(!refcount, "Device has %u references left.\n", refcount); + ok(!refcount, "Device has %lu references left.\n", refcount); DestroyWindow(window); }
@@ -10945,22 +10945,22 @@ static void test_negative_fixedfunction_fog(void) }
hr = IDirect3DDevice7_GetRenderTarget(device, &rt); - ok(SUCCEEDED(hr), "Failed to get render target, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get render target, hr %#lx.\n", hr); hr = IDirect3DDevice7_GetCaps(device, &caps); - ok(SUCCEEDED(hr), "Failed to get device caps, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get device caps, hr %#lx.\n", hr); if (!(caps.dpcTriCaps.dwRasterCaps & D3DPRASTERCAPS_FOGTABLE)) skip("D3DPRASTERCAPS_FOGTABLE not supported, skipping some fog tests.\n");
hr = IDirect3DDevice7_SetRenderState(device, D3DRENDERSTATE_LIGHTING, FALSE); - ok(SUCCEEDED(hr), "Failed to set render state, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set render state, hr %#lx.\n", hr); hr = IDirect3DDevice7_SetRenderState(device, D3DRENDERSTATE_ZENABLE, D3DZB_FALSE); - ok(SUCCEEDED(hr), "Failed to set render state, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set render state, hr %#lx.\n", hr); hr = IDirect3DDevice7_SetRenderState(device, D3DRENDERSTATE_FOGENABLE, TRUE); - ok(SUCCEEDED(hr), "Failed to set render state, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set render state, hr %#lx.\n", hr); hr = IDirect3DDevice7_SetRenderState(device, D3DRENDERSTATE_FOGCOLOR, 0x0000ff00); - ok(SUCCEEDED(hr), "Failed to set render state, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set render state, hr %#lx.\n", hr); hr = IDirect3DDevice7_SetRenderState(device, D3DRENDERSTATE_CLIPPING, FALSE); - ok(SUCCEEDED(hr), "SetRenderState failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "SetRenderState failed, hr %#lx.\n", hr);
for (i = 0; i < ARRAY_SIZE(tests); ++i) { @@ -10968,36 +10968,36 @@ static void test_negative_fixedfunction_fog(void) continue;
hr = IDirect3DDevice7_Clear(device, 0, NULL, D3DCLEAR_TARGET, 0x000000ff, 0.0f, 0); - ok(SUCCEEDED(hr), "Failed to clear, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to clear, hr %#lx.\n", hr);
hr = IDirect3DDevice7_SetTransform(device, D3DTRANSFORMSTATE_PROJECTION, tests[i].matrix); - ok(SUCCEEDED(hr), "Failed to set projection transform, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set projection transform, hr %#lx.\n", hr); hr = IDirect3DDevice7_SetRenderState(device, D3DRENDERSTATE_FOGSTART, tests[i].start.d); - ok(SUCCEEDED(hr), "Failed to set render state, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set render state, hr %#lx.\n", hr); hr = IDirect3DDevice7_SetRenderState(device, D3DRENDERSTATE_FOGEND, tests[i].end.d); - ok(SUCCEEDED(hr), "Failed to set render state, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set render state, hr %#lx.\n", hr); hr = IDirect3DDevice7_SetRenderState(device, D3DRENDERSTATE_FOGVERTEXMODE, tests[i].vfog); - ok(SUCCEEDED(hr), "Failed to set render state, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set render state, hr %#lx.\n", hr); hr = IDirect3DDevice7_SetRenderState(device, D3DRENDERSTATE_FOGTABLEMODE, tests[i].tfog); - ok(SUCCEEDED(hr), "Failed to set render state, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set render state, hr %#lx.\n", hr);
hr = IDirect3DDevice7_BeginScene(device); - ok(SUCCEEDED(hr), "Failed to begin scene, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to begin scene, hr %#lx.\n", hr); hr = IDirect3DDevice7_DrawPrimitive(device, D3DPT_TRIANGLESTRIP, tests[i].pos_type | D3DFVF_DIFFUSE, tests[i].quad, 4, 0); - ok(SUCCEEDED(hr), "Failed to draw, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to draw, hr %#lx.\n", hr); hr = IDirect3DDevice7_EndScene(device); - ok(SUCCEEDED(hr), "Failed to end scene, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to end scene, hr %#lx.\n", hr);
color = get_surface_color(rt, 0, 240); ok(compare_color(color, tests[i].color, 2) || broken(compare_color(color, tests[i].color_broken, 2)) || broken(compare_color(color, tests[i].color_broken2, 2)), - "Got unexpected color 0x%08x, case %u.\n", color, i); + "Got unexpected color 0x%08lx, case %u.\n", color, i); }
IDirectDrawSurface7_Release(rt); refcount = IDirect3DDevice7_Release(device); - ok(!refcount, "Device has %u references left.\n", refcount); + ok(!refcount, "Device has %lu references left.\n", refcount); DestroyWindow(window); }
@@ -11057,33 +11057,33 @@ static void test_table_fog_zw(void) }
hr = IDirect3DDevice7_GetCaps(device, &caps); - ok(SUCCEEDED(hr), "Failed to get device caps, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get device caps, hr %#lx.\n", hr); if (!(caps.dpcTriCaps.dwRasterCaps & D3DPRASTERCAPS_FOGTABLE)) { skip("D3DPRASTERCAPS_FOGTABLE not supported, skipping POSITIONT table fog test.\n"); goto done; } hr = IDirect3DDevice7_GetRenderTarget(device, &rt); - ok(SUCCEEDED(hr), "Failed to get render target, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get render target, hr %#lx.\n", hr);
hr = IDirect3DDevice7_SetRenderState(device, D3DRENDERSTATE_LIGHTING, FALSE); - ok(SUCCEEDED(hr), "Failed to set render state, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set render state, hr %#lx.\n", hr); hr = IDirect3DDevice7_SetRenderState(device, D3DRENDERSTATE_FOGENABLE, TRUE); - ok(SUCCEEDED(hr), "Failed to set render state, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set render state, hr %#lx.\n", hr); hr = IDirect3DDevice7_SetRenderState(device, D3DRENDERSTATE_FOGCOLOR, 0x0000ff00); - ok(SUCCEEDED(hr), "Failed to set render state, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set render state, hr %#lx.\n", hr); hr = IDirect3DDevice7_SetRenderState(device, D3DRENDERSTATE_CLIPPING, FALSE); - ok(SUCCEEDED(hr), "SetRenderState failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "SetRenderState failed, hr %#lx.\n", hr); /* Work around an AMD Windows driver bug. Needs a proj matrix applied redundantly. */ hr = IDirect3DDevice7_SetTransform(device, D3DTRANSFORMSTATE_PROJECTION, &identity); - ok(SUCCEEDED(hr), "Failed to set projection transform, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set projection transform, hr %#lx.\n", hr); hr = IDirect3DDevice7_SetRenderState(device, D3DRENDERSTATE_FOGTABLEMODE, D3DFOG_LINEAR); - ok(SUCCEEDED(hr), "Failed to set render state, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set render state, hr %#lx.\n", hr);
for (i = 0; i < ARRAY_SIZE(tests); ++i) { hr = IDirect3DDevice7_Clear(device, 0, NULL, D3DCLEAR_TARGET | D3DCLEAR_ZBUFFER, 0x000000ff, 1.0f, 0); - ok(SUCCEEDED(hr), "Failed to clear, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to clear, hr %#lx.\n", hr);
quad[0].position.z = tests[i].z; quad[1].position.z = tests[i].z; @@ -11094,25 +11094,25 @@ static void test_table_fog_zw(void) quad[2].position.w = tests[i].w; quad[3].position.w = tests[i].w; hr = IDirect3DDevice7_SetRenderState(device, D3DRENDERSTATE_ZENABLE, tests[i].z_test); - ok(SUCCEEDED(hr), "Failed to set render state, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set render state, hr %#lx.\n", hr);
hr = IDirect3DDevice7_BeginScene(device); - ok(SUCCEEDED(hr), "Failed to begin scene, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to begin scene, hr %#lx.\n", hr); hr = IDirect3DDevice7_DrawPrimitive(device, D3DPT_TRIANGLESTRIP, D3DFVF_XYZRHW | D3DFVF_DIFFUSE, quad, 4, 0); - ok(SUCCEEDED(hr), "Failed to draw, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to draw, hr %#lx.\n", hr); hr = IDirect3DDevice7_EndScene(device); - ok(SUCCEEDED(hr), "Failed to end scene, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to end scene, hr %#lx.\n", hr);
color = get_surface_color(rt, 0, 240); ok(compare_color(color, tests[i].color, 2), - "Got unexpected color 0x%08x, expected 0x%8x, case %u.\n", color, tests[i].color, i); + "Got unexpected color 0x%08lx, expected 0x%8lx, case %u.\n", color, tests[i].color, i); }
IDirectDrawSurface7_Release(rt); done: refcount = IDirect3DDevice7_Release(device); - ok(!refcount, "Device has %u references left.\n", refcount); + ok(!refcount, "Device has %lu references left.\n", refcount); DestroyWindow(window); }
@@ -11216,7 +11216,7 @@ static void test_signed_formats(void) }
hr = IDirect3DDevice7_GetCaps(device, &device_desc); - ok(SUCCEEDED(hr), "Failed to get device caps, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get device caps, hr %#lx.\n", hr); if (!(device_desc.dwTextureOpCaps & D3DTEXOPCAPS_BLENDFACTORALPHA)) { skip("D3DTOP_BLENDFACTORALPHA not supported, skipping bumpmap format tests.\n"); @@ -11224,31 +11224,31 @@ static void test_signed_formats(void) }
hr = IDirect3DDevice7_GetDirect3D(device, &d3d); - ok(SUCCEEDED(hr), "Failed to get d3d interface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get d3d interface, hr %#lx.\n", hr); hr = IDirect3D7_QueryInterface(d3d, &IID_IDirectDraw7, (void **)&ddraw); - ok(SUCCEEDED(hr), "Failed to get ddraw interface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get ddraw interface, hr %#lx.\n", hr); hr = IDirect3DDevice7_GetRenderTarget(device, &rt); - ok(SUCCEEDED(hr), "Failed to get render target, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get render target, hr %#lx.\n", hr);
hr = IDirect3DDevice7_SetRenderState(device, D3DRENDERSTATE_ZENABLE, D3DZB_FALSE); - ok(SUCCEEDED(hr), "Failed to set render state, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set render state, hr %#lx.\n", hr);
/* dst = tex * 0.5 + 1.0 * (1.0 - 0.5) = tex * 0.5 + 0.5 */ hr = IDirect3DDevice7_SetRenderState(device, D3DRENDERSTATE_TEXTUREFACTOR, 0x80ffffff); - ok(SUCCEEDED(hr), "Failed to set render state, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set render state, hr %#lx.\n", hr); hr = IDirect3DDevice7_SetTextureStageState(device, 0, D3DTSS_COLOROP, D3DTOP_BLENDFACTORALPHA); - ok(SUCCEEDED(hr), "Failed to set texture stage state, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set texture stage state, hr %#lx.\n", hr); hr = IDirect3DDevice7_SetTextureStageState(device, 0, D3DTSS_COLORARG1, D3DTA_TEXTURE); - ok(SUCCEEDED(hr), "Failed to set texture stage state, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set texture stage state, hr %#lx.\n", hr); hr = IDirect3DDevice7_SetTextureStageState(device, 0, D3DTSS_COLORARG2, D3DTA_TFACTOR); - ok(SUCCEEDED(hr), "Failed to set texture stage state, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set texture stage state, hr %#lx.\n", hr);
for (i = 0; i < ARRAY_SIZE(formats); ++i) { for (width = 1; width < 5; width += 3) { hr = IDirect3DDevice7_Clear(device, 0, NULL, D3DCLEAR_TARGET, 0x00000000, 0.0f, 0); - ok(SUCCEEDED(hr), "Failed to clear render target, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to clear render target, hr %#lx.\n", hr);
memset(&surface_desc, 0, sizeof(surface_desc)); surface_desc.dwSize = sizeof(surface_desc); @@ -11263,14 +11263,14 @@ static void test_signed_formats(void) skip("%s textures not supported, skipping.\n", formats[i].name); continue; } - ok(SUCCEEDED(hr), "Failed to create surface, hr %#x, format %s.\n", hr, formats[i].name); + ok(SUCCEEDED(hr), "Failed to create surface, hr %#lx, format %s.\n", hr, formats[i].name); hr = IDirect3DDevice7_SetTexture(device, 0, surface); - ok(SUCCEEDED(hr), "Failed to set texture, hr %#x, format %s.\n", hr, formats[i].name); + ok(SUCCEEDED(hr), "Failed to set texture, hr %#lx, format %s.\n", hr, formats[i].name);
memset(&surface_desc, 0, sizeof(surface_desc)); surface_desc.dwSize = sizeof(surface_desc); hr = IDirectDrawSurface7_Lock(surface, NULL, &surface_desc, 0, NULL); - ok(SUCCEEDED(hr), "Failed to lock surface, hr %#x, format %s.\n", hr, formats[i].name); + ok(SUCCEEDED(hr), "Failed to lock surface, hr %#lx, format %s.\n", hr, formats[i].name); for (y = 0; y < 4; y++) { memcpy((char *)surface_desc.lpSurface + y * U1(surface_desc).lPitch, @@ -11278,15 +11278,15 @@ static void test_signed_formats(void) width * formats[i].pixel_size); } hr = IDirectDrawSurface7_Unlock(surface, NULL); - ok(SUCCEEDED(hr), "Failed to unlock surface, hr %#x, format %s.\n", hr, formats[i].name); + ok(SUCCEEDED(hr), "Failed to unlock surface, hr %#lx, format %s.\n", hr, formats[i].name);
hr = IDirect3DDevice7_BeginScene(device); - ok(SUCCEEDED(hr), "Failed to begin scene, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to begin scene, hr %#lx.\n", hr); hr = IDirect3DDevice7_DrawPrimitive(device, D3DPT_TRIANGLESTRIP, D3DFVF_XYZ | D3DFVF_TEX1, quad, 4, 0); - ok(SUCCEEDED(hr), "Failed to draw, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to draw, hr %#lx.\n", hr); hr = IDirect3DDevice7_EndScene(device); - ok(SUCCEEDED(hr), "Failed to end scene, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to end scene, hr %#lx.\n", hr);
for (y = 0; y < 4; y++) { @@ -11299,7 +11299,7 @@ static void test_signed_formats(void) color = get_surface_color(rt, 80 + 160 * x, 60 + 120 * y); ok(compare_color(color, expected_color, formats[i].slop) || broken(compare_color(color, expected_color, formats[i].slop_broken)), - "Expected color 0x%08x, got 0x%08x, format %s, location %ux%u.\n", + "Expected color 0x%08lx, got 0x%08lx, format %s, location %ux%u.\n", expected_color, color, formats[i].name, x, y); } } @@ -11315,7 +11315,7 @@ static void test_signed_formats(void)
done: refcount = IDirect3DDevice7_Release(device); - ok(!refcount, "Device has %u references left.\n", refcount); + ok(!refcount, "Device has %lu references left.\n", refcount); DestroyWindow(window); }
@@ -11506,9 +11506,9 @@ static void test_color_fill(void) }
hr = IDirect3DDevice7_GetDirect3D(device, &d3d); - ok(SUCCEEDED(hr), "Failed to get d3d interface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get d3d interface, hr %#lx.\n", hr); hr = IDirect3D7_QueryInterface(d3d, &IID_IDirectDraw7, (void **)&ddraw); - ok(SUCCEEDED(hr), "Failed to get ddraw interface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get ddraw interface, hr %#lx.\n", hr);
memset(&z_fmt, 0, sizeof(z_fmt)); IDirect3D7_EnumZBufferFormats(d3d, &IID_IDirect3DHALDevice, enum_z_fmt, &z_fmt); @@ -11522,13 +11522,13 @@ static void test_color_fill(void) IDirect3D7_Release(d3d);
hr = IDirectDraw7_GetFourCCCodes(ddraw, &num_fourcc_codes, NULL); - ok(SUCCEEDED(hr), "Failed to get fourcc codes %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get fourcc codes %#lx.\n", hr); fourcc_codes = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, num_fourcc_codes * sizeof(*fourcc_codes)); if (!fourcc_codes) goto done; hr = IDirectDraw7_GetFourCCCodes(ddraw, &num_fourcc_codes, fourcc_codes); - ok(SUCCEEDED(hr), "Failed to get fourcc codes %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get fourcc codes %#lx.\n", hr); for (i = 0; i < num_fourcc_codes; i++) { if (fourcc_codes[i] == MAKEFOURCC('Y', 'U', 'Y', '2')) @@ -11541,7 +11541,7 @@ static void test_color_fill(void) memset(&hal_caps, 0, sizeof(hal_caps)); hal_caps.dwSize = sizeof(hal_caps); hr = IDirectDraw7_GetCaps(ddraw, &hal_caps, NULL); - ok(SUCCEEDED(hr), "Failed to get caps, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get caps, hr %#lx.\n", hr);
if (!(supported_fmts & (SUPPORT_YUY2 | SUPPORT_UYVY)) || !(hal_caps.dwCaps & DDCAPS_OVERLAY)) skip("Overlays or some YUV formats not supported, skipping YUV colorfill tests.\n"); @@ -11596,16 +11596,16 @@ static void test_color_fill(void) }
hr = IDirectDraw7_CreateSurface(ddraw, &surface_desc, &surface, NULL); - ok(SUCCEEDED(hr), "Failed to create surface, hr %#x, surface %s.\n", hr, tests[i].name); + ok(SUCCEEDED(hr), "Failed to create surface, hr %#lx, surface %s.\n", hr, tests[i].name);
hr = IDirectDrawSurface7_Blt(surface, NULL, NULL, NULL, DDBLT_COLORFILL | DDBLT_WAIT, &fx); todo_wine_if (tests[i].format.dwFourCC) - ok(hr == tests[i].colorfill_hr, "Blt returned %#x, expected %#x, surface %s.\n", + ok(hr == tests[i].colorfill_hr, "Blt returned %#lx, expected %#lx, surface %s.\n", hr, tests[i].colorfill_hr, tests[i].name);
hr = IDirectDrawSurface7_Blt(surface, &rect, NULL, NULL, DDBLT_COLORFILL | DDBLT_WAIT, &fx); todo_wine_if (tests[i].format.dwFourCC) - ok(hr == tests[i].colorfill_hr, "Blt returned %#x, expected %#x, surface %s.\n", + ok(hr == tests[i].colorfill_hr, "Blt returned %#lx, expected %#lx, surface %s.\n", hr, tests[i].colorfill_hr, tests[i].name);
if (SUCCEEDED(hr) && tests[i].check_result) @@ -11613,19 +11613,19 @@ static void test_color_fill(void) memset(&surface_desc, 0, sizeof(surface_desc)); surface_desc.dwSize = sizeof(surface_desc); hr = IDirectDrawSurface7_Lock(surface, NULL, &surface_desc, DDLOCK_READONLY, 0); - ok(SUCCEEDED(hr), "Failed to lock surface, hr %#x, surface %s.\n", hr, tests[i].name); + ok(SUCCEEDED(hr), "Failed to lock surface, hr %#lx, surface %s.\n", hr, tests[i].name); color = surface_desc.lpSurface; - ok(*color == tests[i].result, "Got clear result 0x%08x, expected 0x%08x, surface %s.\n", + ok(*color == tests[i].result, "Got clear result 0x%08lx, expected 0x%08lx, surface %s.\n", *color, tests[i].result, tests[i].name); hr = IDirectDrawSurface7_Unlock(surface, NULL); - ok(SUCCEEDED(hr), "Failed to unlock surface, hr %#x, surface %s.\n", hr, tests[i].name); + ok(SUCCEEDED(hr), "Failed to unlock surface, hr %#lx, surface %s.\n", hr, tests[i].name); }
hr = IDirectDrawSurface7_Blt(surface, NULL, NULL, NULL, DDBLT_DEPTHFILL | DDBLT_WAIT, &fx); - ok(hr == tests[i].depthfill_hr, "Blt returned %#x, expected %#x, surface %s.\n", + ok(hr == tests[i].depthfill_hr, "Blt returned %#lx, expected %#lx, surface %s.\n", hr, tests[i].depthfill_hr, tests[i].name); hr = IDirectDrawSurface7_Blt(surface, &rect, NULL, NULL, DDBLT_DEPTHFILL | DDBLT_WAIT, &fx); - ok(hr == tests[i].depthfill_hr, "Blt returned %#x, expected %#x, surface %s.\n", + ok(hr == tests[i].depthfill_hr, "Blt returned %#lx, expected %#lx, surface %s.\n", hr, tests[i].depthfill_hr, tests[i].name);
if (SUCCEEDED(hr) && tests[i].check_result) @@ -11633,22 +11633,22 @@ static void test_color_fill(void) memset(&surface_desc, 0, sizeof(surface_desc)); surface_desc.dwSize = sizeof(surface_desc); hr = IDirectDrawSurface7_Lock(surface, NULL, &surface_desc, DDLOCK_READONLY, 0); - ok(SUCCEEDED(hr), "Failed to lock surface, hr %#x, surface %s.\n", hr, tests[i].name); + ok(SUCCEEDED(hr), "Failed to lock surface, hr %#lx, surface %s.\n", hr, tests[i].name); color = surface_desc.lpSurface; ok((*color & U3(z_fmt).dwZBitMask) == (tests[i].result & U3(z_fmt).dwZBitMask) || broken((*color & U3(z_fmt).dwZBitMask) == (expected_broken & U3(z_fmt).dwZBitMask)), - "Got clear result 0x%08x, expected 0x%08x, surface %s.\n", + "Got clear result 0x%08lx, expected 0x%08lx, surface %s.\n", *color & U3(z_fmt).dwZBitMask, tests[i].result & U3(z_fmt).dwZBitMask, tests[i].name); hr = IDirectDrawSurface7_Unlock(surface, NULL); - ok(SUCCEEDED(hr), "Failed to unlock surface, hr %#x, surface %s.\n", hr, tests[i].name); + ok(SUCCEEDED(hr), "Failed to unlock surface, hr %#lx, surface %s.\n", hr, tests[i].name); }
U5(fx).dwFillColor = 0xdeadbeef; fx.dwROP = BLACKNESS; hr = IDirectDrawSurface7_Blt(surface, NULL, NULL, NULL, DDBLT_ROP | DDBLT_WAIT, &fx); - ok(FAILED(hr) == !tests[i].rop_success, "Blt returned %#x, expected %s, surface %s.\n", + ok(FAILED(hr) == !tests[i].rop_success, "Blt returned %#lx, expected %s, surface %s.\n", hr, tests[i].rop_success ? "success" : "failure", tests[i].name); - ok(U5(fx).dwFillColor == 0xdeadbeef, "dwFillColor was set to 0x%08x, surface %s\n", + ok(U5(fx).dwFillColor == 0xdeadbeef, "dwFillColor was set to 0x%08lx, surface %s\n", U5(fx).dwFillColor, tests[i].name);
if (SUCCEEDED(hr) && tests[i].check_result) @@ -11656,19 +11656,19 @@ static void test_color_fill(void) memset(&surface_desc, 0, sizeof(surface_desc)); surface_desc.dwSize = sizeof(surface_desc); hr = IDirectDrawSurface7_Lock(surface, NULL, &surface_desc, DDLOCK_READONLY, 0); - ok(SUCCEEDED(hr), "Failed to lock surface, hr %#x, surface %s.\n", hr, tests[i].name); + ok(SUCCEEDED(hr), "Failed to lock surface, hr %#lx, surface %s.\n", hr, tests[i].name); color = surface_desc.lpSurface; - ok(*color == 0, "Got clear result 0x%08x, expected 0x00000000, surface %s.\n", + ok(*color == 0, "Got clear result 0x%08lx, expected 0x00000000, surface %s.\n", *color, tests[i].name); hr = IDirectDrawSurface7_Unlock(surface, NULL); - ok(SUCCEEDED(hr), "Failed to unlock surface, hr %#x, surface %s.\n", hr, tests[i].name); + ok(SUCCEEDED(hr), "Failed to unlock surface, hr %#lx, surface %s.\n", hr, tests[i].name); }
fx.dwROP = WHITENESS; hr = IDirectDrawSurface7_Blt(surface, NULL, NULL, NULL, DDBLT_ROP | DDBLT_WAIT, &fx); - ok(FAILED(hr) == !tests[i].rop_success, "Blt returned %#x, expected %s, surface %s.\n", + ok(FAILED(hr) == !tests[i].rop_success, "Blt returned %#lx, expected %s, surface %s.\n", hr, tests[i].rop_success ? "success" : "failure", tests[i].name); - ok(U5(fx).dwFillColor == 0xdeadbeef, "dwFillColor was set to 0x%08x, surface %s\n", + ok(U5(fx).dwFillColor == 0xdeadbeef, "dwFillColor was set to 0x%08lx, surface %s\n", U5(fx).dwFillColor, tests[i].name);
if (SUCCEEDED(hr) && tests[i].check_result) @@ -11676,13 +11676,13 @@ static void test_color_fill(void) memset(&surface_desc, 0, sizeof(surface_desc)); surface_desc.dwSize = sizeof(surface_desc); hr = IDirectDrawSurface7_Lock(surface, NULL, &surface_desc, DDLOCK_READONLY, 0); - ok(SUCCEEDED(hr), "Failed to lock surface, hr %#x, surface %s.\n", hr, tests[i].name); + ok(SUCCEEDED(hr), "Failed to lock surface, hr %#lx, surface %s.\n", hr, tests[i].name); color = surface_desc.lpSurface; /* WHITENESS sets the alpha channel to 0x00. Ignore this for now. */ - ok((*color & 0x00ffffff) == 0x00ffffff, "Got clear result 0x%08x, expected 0xffffffff, surface %s.\n", + ok((*color & 0x00ffffff) == 0x00ffffff, "Got clear result 0x%08lx, expected 0xffffffff, surface %s.\n", *color, tests[i].name); hr = IDirectDrawSurface7_Unlock(surface, NULL); - ok(SUCCEEDED(hr), "Failed to unlock surface, hr %#x, surface %s.\n", hr, tests[i].name); + ok(SUCCEEDED(hr), "Failed to unlock surface, hr %#lx, surface %s.\n", hr, tests[i].name); }
IDirectDrawSurface7_Release(surface); @@ -11706,78 +11706,78 @@ static void test_color_fill(void) U4(U4(surface_desc).ddpfPixelFormat).dwBBitMask = 0x000000ff; surface_desc.ddsCaps.dwCaps = DDSCAPS_OFFSCREENPLAIN | DDSCAPS_SYSTEMMEMORY; hr = IDirectDraw7_CreateSurface(ddraw, &surface_desc, &surface, NULL); - ok(SUCCEEDED(hr), "Failed to create surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create surface, hr %#lx.\n", hr); hr = IDirectDraw7_CreateSurface(ddraw, &surface_desc, &surface2, NULL); - ok(SUCCEEDED(hr), "Failed to create surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create surface, hr %#lx.\n", hr);
/* No DDBLTFX. */ hr = IDirectDrawSurface7_Blt(surface, NULL, NULL, &rect, DDBLT_COLORFILL | DDBLT_WAIT, NULL); - ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface7_Blt(surface, NULL, NULL, &rect, DDBLT_ROP | DDBLT_WAIT, NULL); - ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#lx.\n", hr);
/* Unused source rectangle. */ hr = IDirectDrawSurface7_Blt(surface, NULL, NULL, &rect, DDBLT_COLORFILL | DDBLT_WAIT, &fx); - ok(SUCCEEDED(hr), "Got unexpected hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface7_Blt(surface, NULL, NULL, &rect, DDBLT_ROP | DDBLT_WAIT, &fx); - ok(SUCCEEDED(hr), "Got unexpected hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Got unexpected hr %#lx.\n", hr);
/* Unused source surface. */ hr = IDirectDrawSurface7_Blt(surface, NULL, surface2, NULL, DDBLT_COLORFILL | DDBLT_WAIT, &fx); - ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface7_Blt(surface, NULL, surface2, NULL, DDBLT_ROP | DDBLT_WAIT, &fx); - ok(SUCCEEDED(hr), "Got unexpected hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface7_Blt(surface, NULL, surface2, &rect, DDBLT_COLORFILL | DDBLT_WAIT, &fx); - ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface7_Blt(surface, NULL, surface2, &rect, DDBLT_ROP | DDBLT_WAIT, &fx); - ok(SUCCEEDED(hr), "Got unexpected hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Got unexpected hr %#lx.\n", hr);
/* Inverted destination or source rectangle. */ SetRect(&rect, 5, 7, 7, 5); hr = IDirectDrawSurface7_Blt(surface, &rect, NULL, NULL, DDBLT_COLORFILL | DDBLT_WAIT, &fx); - ok(hr == DDERR_INVALIDRECT, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_INVALIDRECT, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface7_Blt(surface, NULL, NULL, &rect, DDBLT_COLORFILL | DDBLT_WAIT, &fx); - ok(SUCCEEDED(hr), "Got unexpected hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface7_Blt(surface, &rect, surface2, NULL, DDBLT_COLORFILL | DDBLT_WAIT, &fx); - ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface7_Blt(surface, NULL, surface2, &rect, DDBLT_COLORFILL | DDBLT_WAIT, &fx); - ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface7_Blt(surface, NULL, surface2, &rect, DDBLT_ROP | DDBLT_WAIT, &fx); - ok(hr == DDERR_INVALIDRECT, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_INVALIDRECT, "Got unexpected hr %#lx.\n", hr);
/* Negative rectangle. */ SetRect(&rect, -1, -1, 5, 5); hr = IDirectDrawSurface7_Blt(surface, &rect, NULL, NULL, DDBLT_COLORFILL | DDBLT_WAIT, &fx); - ok(hr == DDERR_INVALIDRECT, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_INVALIDRECT, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface7_Blt(surface, NULL, NULL, &rect, DDBLT_COLORFILL | DDBLT_WAIT, &fx); - ok(SUCCEEDED(hr), "Got unexpected hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface7_Blt(surface, &rect, surface2, NULL, DDBLT_COLORFILL | DDBLT_WAIT, &fx); - ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface7_Blt(surface, &rect, surface2, &rect, DDBLT_COLORFILL | DDBLT_WAIT, &fx); - ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface7_Blt(surface, NULL, surface2, &rect, DDBLT_ROP | DDBLT_WAIT, &fx); - ok(hr == DDERR_INVALIDRECT, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_INVALIDRECT, "Got unexpected hr %#lx.\n", hr);
/* Out of bounds rectangle. */ SetRect(&rect, 0, 0, 65, 65); hr = IDirectDrawSurface7_Blt(surface, &rect, NULL, NULL, DDBLT_COLORFILL | DDBLT_WAIT, &fx); - ok(hr == DDERR_INVALIDRECT, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_INVALIDRECT, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface7_Blt(surface, NULL, surface2, &rect, DDBLT_ROP | DDBLT_WAIT, &fx); - ok(hr == DDERR_INVALIDRECT, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_INVALIDRECT, "Got unexpected hr %#lx.\n", hr);
/* Combine multiple flags. */ hr = IDirectDrawSurface7_Blt(surface, NULL, NULL, NULL, DDBLT_COLORFILL | DDBLT_DEPTHFILL | DDBLT_WAIT, &fx); - ok(SUCCEEDED(hr), "Got unexpected hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface7_Blt(surface, NULL, NULL, NULL, DDBLT_COLORFILL | DDBLT_ROP | DDBLT_WAIT, &fx); - ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface7_Blt(surface, &rect, NULL, NULL, DDBLT_COLORFILL | DDBLT_ROP | DDBLT_WAIT, &fx); - ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#lx.\n", hr);
for (i = 0; i < ARRAY_SIZE(rops); ++i) { fx.dwROP = rops[i].rop; hr = IDirectDrawSurface7_Blt(surface, NULL, surface2, NULL, DDBLT_ROP | DDBLT_WAIT, &fx); - ok(hr == rops[i].hr, "Got unexpected hr %#x for rop %s.\n", hr, rops[i].name); + ok(hr == rops[i].hr, "Got unexpected hr %#lx for rop %s.\n", hr, rops[i].name); }
IDirectDrawSurface7_Release(surface2); @@ -11794,54 +11794,54 @@ static void test_color_fill(void) U4(surface_desc).ddpfPixelFormat = z_fmt; surface_desc.ddsCaps.dwCaps = DDSCAPS_ZBUFFER; hr = IDirectDraw7_CreateSurface(ddraw, &surface_desc, &surface, NULL); - ok(SUCCEEDED(hr), "Failed to create surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create surface, hr %#lx.\n", hr); hr = IDirectDraw7_CreateSurface(ddraw, &surface_desc, &surface2, NULL); - ok(SUCCEEDED(hr), "Failed to create surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create surface, hr %#lx.\n", hr);
/* No DDBLTFX. */ hr = IDirectDrawSurface7_Blt(surface, NULL, NULL, &rect, DDBLT_DEPTHFILL | DDBLT_WAIT, NULL); - ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#lx.\n", hr);
/* Unused source rectangle. */ hr = IDirectDrawSurface7_Blt(surface, NULL, NULL, &rect, DDBLT_DEPTHFILL | DDBLT_WAIT, &fx); - ok(SUCCEEDED(hr), "Got unexpected hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Got unexpected hr %#lx.\n", hr);
/* Unused source surface. */ hr = IDirectDrawSurface7_Blt(surface, NULL, surface2, NULL, DDBLT_DEPTHFILL | DDBLT_WAIT, &fx); - ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface7_Blt(surface, NULL, surface2, &rect, DDBLT_DEPTHFILL | DDBLT_WAIT, &fx); - ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#lx.\n", hr);
/* Inverted destination or source rectangle. */ SetRect(&rect, 5, 7, 7, 5); hr = IDirectDrawSurface7_Blt(surface, &rect, NULL, NULL, DDBLT_DEPTHFILL | DDBLT_WAIT, &fx); - ok(hr == DDERR_INVALIDRECT, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_INVALIDRECT, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface7_Blt(surface, NULL, NULL, &rect, DDBLT_DEPTHFILL | DDBLT_WAIT, &fx); - ok(SUCCEEDED(hr), "Got unexpected hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface7_Blt(surface, &rect, surface2, NULL, DDBLT_DEPTHFILL | DDBLT_WAIT, &fx); - ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface7_Blt(surface, NULL, surface2, &rect, DDBLT_DEPTHFILL | DDBLT_WAIT, &fx); - ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#lx.\n", hr);
/* Negative rectangle. */ SetRect(&rect, -1, -1, 5, 5); hr = IDirectDrawSurface7_Blt(surface, &rect, NULL, NULL, DDBLT_DEPTHFILL | DDBLT_WAIT, &fx); - ok(hr == DDERR_INVALIDRECT, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_INVALIDRECT, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface7_Blt(surface, NULL, NULL, &rect, DDBLT_DEPTHFILL | DDBLT_WAIT, &fx); - ok(SUCCEEDED(hr), "Got unexpected hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface7_Blt(surface, &rect, surface2, NULL, DDBLT_DEPTHFILL | DDBLT_WAIT, &fx); - ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface7_Blt(surface, &rect, surface2, &rect, DDBLT_DEPTHFILL | DDBLT_WAIT, &fx); - ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#lx.\n", hr);
/* Out of bounds rectangle. */ SetRect(&rect, 0, 0, 65, 65); hr = IDirectDrawSurface7_Blt(surface, &rect, NULL, NULL, DDBLT_DEPTHFILL | DDBLT_WAIT, &fx); - ok(hr == DDERR_INVALIDRECT, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_INVALIDRECT, "Got unexpected hr %#lx.\n", hr);
/* Combine multiple flags. */ hr = IDirectDrawSurface7_Blt(surface, NULL, NULL, NULL, DDBLT_COLORFILL | DDBLT_DEPTHFILL | DDBLT_WAIT, &fx); - ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#lx.\n", hr);
IDirectDrawSurface7_Release(surface2); IDirectDrawSurface7_Release(surface); @@ -11849,7 +11849,7 @@ static void test_color_fill(void) done: IDirectDraw7_Release(ddraw); refcount = IDirect3DDevice7_Release(device); - ok(!refcount, "Device has %u references left.\n", refcount); + ok(!refcount, "Device has %lu references left.\n", refcount); DestroyWindow(window); }
@@ -11898,13 +11898,13 @@ static void test_texcoordindex(void) }
hr = IDirect3DDevice7_GetDirect3D(device, &d3d); - ok(SUCCEEDED(hr), "Failed to get Direct3D7 interface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get Direct3D7 interface, hr %#lx.\n", hr); hr = IDirect3D7_QueryInterface(d3d, &IID_IDirectDraw7, (void **)&ddraw); - ok(SUCCEEDED(hr), "Failed to get DirectDraw7 interface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get DirectDraw7 interface, hr %#lx.\n", hr); IDirect3D7_Release(d3d);
hr = IDirect3DDevice7_GetRenderTarget(device, &rt); - ok(SUCCEEDED(hr), "Failed to get render target, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get render target, hr %#lx.\n", hr);
memset(&surface_desc, 0, sizeof(surface_desc)); surface_desc.dwSize = sizeof(surface_desc); @@ -11920,14 +11920,14 @@ static void test_texcoordindex(void) U4(U4(surface_desc).ddpfPixelFormat).dwBBitMask = 0x000000ff; U5(U4(surface_desc).ddpfPixelFormat).dwRGBAlphaBitMask = 0xff000000; hr = IDirectDraw7_CreateSurface(ddraw, &surface_desc, &texture1, NULL); - ok(SUCCEEDED(hr), "Failed to create surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create surface, hr %#lx.\n", hr); hr = IDirectDraw7_CreateSurface(ddraw, &surface_desc, &texture2, NULL); - ok(SUCCEEDED(hr), "Failed to create surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create surface, hr %#lx.\n", hr);
memset(&surface_desc, 0, sizeof(surface_desc)); surface_desc.dwSize = sizeof(surface_desc); hr = IDirectDrawSurface7_Lock(texture1, 0, &surface_desc, 0, NULL); - ok(SUCCEEDED(hr), "Failed to lock surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to lock surface, hr %#lx.\n", hr); ptr = surface_desc.lpSurface; ptr[0] = 0xff000000; ptr[1] = 0xff00ff00; @@ -11935,12 +11935,12 @@ static void test_texcoordindex(void) ptr[0] = 0xff0000ff; ptr[1] = 0xff00ffff; hr = IDirectDrawSurface7_Unlock(texture1, NULL); - ok(SUCCEEDED(hr), "Failed to unlock surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to unlock surface, hr %#lx.\n", hr);
memset(&surface_desc, 0, sizeof(surface_desc)); surface_desc.dwSize = sizeof(surface_desc); hr = IDirectDrawSurface7_Lock(texture2, 0, &surface_desc, 0, NULL); - ok(SUCCEEDED(hr), "Failed to lock surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to lock surface, hr %#lx.\n", hr); ptr = surface_desc.lpSurface; ptr[0] = 0xff000000; ptr[1] = 0xff0000ff; @@ -11948,101 +11948,101 @@ static void test_texcoordindex(void) ptr[0] = 0xffff0000; ptr[1] = 0xffff00ff; hr = IDirectDrawSurface7_Unlock(texture2, 0); - ok(SUCCEEDED(hr), "Failed to unlock surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to unlock surface, hr %#lx.\n", hr);
hr = IDirect3DDevice7_SetTexture(device, 0, texture1); - ok(SUCCEEDED(hr), "Failed to set texture, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set texture, hr %#lx.\n", hr); hr = IDirect3DDevice7_SetTexture(device, 1, texture2); - ok(SUCCEEDED(hr), "Failed to set texture, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set texture, hr %#lx.\n", hr); hr = IDirect3DDevice7_SetRenderState(device, D3DRENDERSTATE_LIGHTING, FALSE); - ok(SUCCEEDED(hr), "Failed to disable lighting, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to disable lighting, hr %#lx.\n", hr); hr = IDirect3DDevice7_SetTextureStageState(device, 0, D3DTSS_COLOROP, D3DTOP_SELECTARG1); - ok(SUCCEEDED(hr), "Failed to set color op, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set color op, hr %#lx.\n", hr); hr = IDirect3DDevice7_SetTextureStageState(device, 0, D3DTSS_COLORARG1, D3DTA_TEXTURE); - ok(SUCCEEDED(hr), "Failed to set color arg, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set color arg, hr %#lx.\n", hr); hr = IDirect3DDevice7_SetTextureStageState(device, 1, D3DTSS_COLOROP, D3DTOP_ADD); - ok(SUCCEEDED(hr), "Failed to set color op, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set color op, hr %#lx.\n", hr); hr = IDirect3DDevice7_SetTextureStageState(device, 1, D3DTSS_COLORARG1, D3DTA_TEXTURE); - ok(SUCCEEDED(hr), "Failed to set color arg, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set color arg, hr %#lx.\n", hr); hr = IDirect3DDevice7_SetTextureStageState(device, 1, D3DTSS_COLORARG2, D3DTA_CURRENT); - ok(SUCCEEDED(hr), "Failed to set color arg, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set color arg, hr %#lx.\n", hr); hr = IDirect3DDevice7_SetTextureStageState(device, 2, D3DTSS_COLOROP, D3DTOP_DISABLE); - ok(SUCCEEDED(hr), "Failed to set color op, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set color op, hr %#lx.\n", hr);
hr = IDirect3DDevice7_SetTextureStageState(device, 0, D3DTSS_TEXCOORDINDEX, 1); - ok(SUCCEEDED(hr), "Failed to set texcoord index, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set texcoord index, hr %#lx.\n", hr); hr = IDirect3DDevice7_SetTextureStageState(device, 1, D3DTSS_TEXCOORDINDEX, 0); - ok(SUCCEEDED(hr), "Failed to set texcoord index, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set texcoord index, hr %#lx.\n", hr);
hr = IDirect3DDevice7_SetRenderState(device, D3DRENDERSTATE_ZENABLE, FALSE); - ok(SUCCEEDED(hr), "Failed to disable z-buffering, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to disable z-buffering, hr %#lx.\n", hr);
hr = IDirect3DDevice7_Clear(device, 0, NULL, D3DCLEAR_TARGET, 0xffffff00, 1.0f, 0); - ok(SUCCEEDED(hr), "Failed to clear, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to clear, hr %#lx.\n", hr);
hr = IDirect3DDevice7_BeginScene(device); - ok(SUCCEEDED(hr), "Failed to begin scene, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to begin scene, hr %#lx.\n", hr); hr = IDirect3DDevice7_DrawPrimitive(device, D3DPT_TRIANGLESTRIP, fvf, quad, 4, 0); - ok(SUCCEEDED(hr), "Failed to draw, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to draw, hr %#lx.\n", hr); hr = IDirect3DDevice7_EndScene(device); - ok(SUCCEEDED(hr), "Failed to end scene, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to end scene, hr %#lx.\n", hr);
color = get_surface_color(rt, 160, 120); - ok(compare_color(color, 0x000000ff, 2), "Got unexpected color 0x%08x.\n", color); + ok(compare_color(color, 0x000000ff, 2), "Got unexpected color 0x%08lx.\n", color); color = get_surface_color(rt, 480, 120); - ok(compare_color(color, 0x0000ffff, 2), "Got unexpected color 0x%08x.\n", color); + ok(compare_color(color, 0x0000ffff, 2), "Got unexpected color 0x%08lx.\n", color); color = get_surface_color(rt, 160, 360); - ok(compare_color(color, 0x00ff0000, 2), "Got unexpected color 0x%08x.\n", color); + ok(compare_color(color, 0x00ff0000, 2), "Got unexpected color 0x%08lx.\n", color); color = get_surface_color(rt, 480, 360); - ok(compare_color(color, 0x00ffffff, 2), "Got unexpected color 0x%08x.\n", color); + ok(compare_color(color, 0x00ffffff, 2), "Got unexpected color 0x%08lx.\n", color);
hr = IDirect3DDevice7_SetTextureStageState(device, 1, D3DTSS_TEXTURETRANSFORMFLAGS, D3DTTFF_COUNT2); - ok(SUCCEEDED(hr), "Failed to set texture transform flags, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set texture transform flags, hr %#lx.\n", hr); hr = IDirect3DDevice7_SetTransform(device, D3DTRANSFORMSTATE_TEXTURE1, &mat); - ok(SUCCEEDED(hr), "Failed to set transformation matrix, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set transformation matrix, hr %#lx.\n", hr);
hr = IDirect3DDevice7_Clear(device, 0, NULL, D3DCLEAR_TARGET, 0xffffff00, 1.0f, 0); - ok(SUCCEEDED(hr), "Failed to clear, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to clear, hr %#lx.\n", hr);
hr = IDirect3DDevice7_BeginScene(device); - ok(SUCCEEDED(hr), "Failed to begin scene, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to begin scene, hr %#lx.\n", hr); hr = IDirect3DDevice7_DrawPrimitive(device, D3DPT_TRIANGLESTRIP, fvf, quad, 4, 0); - ok(SUCCEEDED(hr), "Failed to draw, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to draw, hr %#lx.\n", hr); hr = IDirect3DDevice7_EndScene(device); - ok(SUCCEEDED(hr), "Failed to end scene, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to end scene, hr %#lx.\n", hr);
color = get_surface_color(rt, 160, 120); - ok(compare_color(color, 0x000000ff, 2), "Got unexpected color 0x%08x.\n", color); + ok(compare_color(color, 0x000000ff, 2), "Got unexpected color 0x%08lx.\n", color); color = get_surface_color(rt, 480, 120); - ok(compare_color(color, 0x0000ffff, 2), "Got unexpected color 0x%08x.\n", color); + ok(compare_color(color, 0x0000ffff, 2), "Got unexpected color 0x%08lx.\n", color); color = get_surface_color(rt, 160, 360); - ok(compare_color(color, 0x00000000, 2), "Got unexpected color 0x%08x.\n", color); + ok(compare_color(color, 0x00000000, 2), "Got unexpected color 0x%08lx.\n", color); color = get_surface_color(rt, 480, 360); - ok(compare_color(color, 0x0000ffff, 2), "Got unexpected color 0x%08x.\n", color); + ok(compare_color(color, 0x0000ffff, 2), "Got unexpected color 0x%08lx.\n", color);
hr = IDirect3DDevice7_SetTextureStageState(device, 1, D3DTSS_TEXTURETRANSFORMFLAGS, D3DTTFF_DISABLE); - ok(SUCCEEDED(hr), "Failed to set texture transform flags, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set texture transform flags, hr %#lx.\n", hr); hr = IDirect3DDevice7_SetTextureStageState(device, 1, D3DTSS_TEXCOORDINDEX, 2); - ok(SUCCEEDED(hr), "Failed to set texcoord index, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set texcoord index, hr %#lx.\n", hr);
hr = IDirect3DDevice7_Clear(device, 0, NULL, D3DCLEAR_TARGET, 0xffffff00, 1.0f, 0); - ok(SUCCEEDED(hr), "Failed to clear, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to clear, hr %#lx.\n", hr);
hr = IDirect3DDevice7_BeginScene(device); - ok(SUCCEEDED(hr), "Failed to begin scene, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to begin scene, hr %#lx.\n", hr); hr = IDirect3DDevice7_DrawPrimitive(device, D3DPT_TRIANGLESTRIP, fvf, quad, 4, 0); - ok(SUCCEEDED(hr), "Failed to draw, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to draw, hr %#lx.\n", hr); hr = IDirect3DDevice7_EndScene(device); - ok(SUCCEEDED(hr), "Failed to end scene, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to end scene, hr %#lx.\n", hr);
color = get_surface_color(rt, 160, 120); - ok(compare_color(color, 0x000000ff, 2), "Got unexpected color 0x%08x.\n", color); + ok(compare_color(color, 0x000000ff, 2), "Got unexpected color 0x%08lx.\n", color); color = get_surface_color(rt, 480, 120); - ok(compare_color(color, 0x0000ffff, 2), "Got unexpected color 0x%08x.\n", color); + ok(compare_color(color, 0x0000ffff, 2), "Got unexpected color 0x%08lx.\n", color); color = get_surface_color(rt, 160, 360); - ok(compare_color(color, 0x00ff00ff, 2), "Got unexpected color 0x%08x.\n", color); + ok(compare_color(color, 0x00ff00ff, 2), "Got unexpected color 0x%08lx.\n", color); color = get_surface_color(rt, 480, 360); - ok(compare_color(color, 0x00ffff00, 2), "Got unexpected color 0x%08x.\n", color); + ok(compare_color(color, 0x00ffff00, 2), "Got unexpected color 0x%08lx.\n", color);
IDirectDrawSurface7_Release(texture1); IDirectDrawSurface7_Release(texture2); @@ -12050,7 +12050,7 @@ static void test_texcoordindex(void) IDirectDrawSurface7_Release(rt); IDirectDraw7_Release(ddraw); refcount = IDirect3DDevice7_Release(device); - ok(!refcount, "Device has %u references left.\n", refcount); + ok(!refcount, "Device has %lu references left.\n", refcount); DestroyWindow(window); }
@@ -12136,12 +12136,12 @@ static void test_colorkey_precision(void) }
hr = IDirect3DDevice7_GetDirect3D(device, &d3d); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirect3D7_QueryInterface(d3d, &IID_IDirectDraw7, (void **)&ddraw); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); IDirect3D7_Release(d3d); hr = IDirect3DDevice7_GetRenderTarget(device, &rt); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr);
is_nvidia = ddraw_is_nvidia(ddraw); /* The Windows 8 WARP driver has plenty of false negatives in X8R8G8B8 @@ -12156,23 +12156,23 @@ static void test_colorkey_precision(void) }
hr = IDirect3DDevice7_SetRenderState(device, D3DRENDERSTATE_LIGHTING, FALSE); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirect3DDevice7_SetRenderState(device, D3DRENDERSTATE_ZENABLE, D3DZB_FALSE); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirect3DDevice7_SetRenderState(device, D3DRENDERSTATE_COLORKEYENABLE, TRUE); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); /* Multiply the texture read result with 0, that way the result color if the key doesn't * match is constant. In theory color keying works without reading the texture result * (meaning we could just op=arg1, arg1=tfactor), but the Geforce7 Windows driver begs * to differ. */ hr = IDirect3DDevice7_SetTextureStageState(device, 0, D3DTSS_COLOROP, D3DTOP_MODULATE); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirect3DDevice7_SetTextureStageState(device, 0, D3DTSS_COLORARG1, D3DTA_TEXTURE); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirect3DDevice7_SetTextureStageState(device, 0, D3DTSS_COLORARG2, D3DTA_TFACTOR); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirect3DDevice7_SetRenderState(device, D3DRENDERSTATE_TEXTUREFACTOR, 0x00000000); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr);
memset(&fx, 0, sizeof(fx)); fx.dwSize = sizeof(fx); @@ -12197,9 +12197,9 @@ static void test_colorkey_precision(void) /* Windows XP (at least with the r200 driver, other drivers untested) produces * garbage when doing color keyed texture->texture blits. */ hr = IDirectDraw7_CreateSurface(ddraw, &surface_desc, &src, NULL); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirectDraw7_CreateSurface(ddraw, &surface_desc, &dst, NULL); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr);
U5(fx).dwFillColor = tests[t].clear; /* On the w8 testbot (WARP driver) the blit result has different values in the @@ -12217,15 +12217,15 @@ static void test_colorkey_precision(void) surface_desc.ddckCKSrcBlt.dwColorSpaceLowValue = c << tests[t].shift; surface_desc.ddckCKSrcBlt.dwColorSpaceHighValue = c << tests[t].shift; hr = IDirectDraw7_CreateSurface(ddraw, &surface_desc, &texture, NULL); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirect3DDevice7_SetTexture(device, 0, texture); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr);
hr = IDirectDrawSurface7_Blt(dst, NULL, NULL, NULL, DDBLT_COLORFILL | DDBLT_WAIT, &fx); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr);
hr = IDirectDrawSurface7_Lock(src, NULL, &lock_desc, DDLOCK_WAIT, NULL); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); switch (tests[t].bpp) { case 4: @@ -12243,21 +12243,21 @@ static void test_colorkey_precision(void) break; } hr = IDirectDrawSurface7_Unlock(src, 0); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface7_Blt(texture, NULL, src, NULL, DDBLT_WAIT, NULL); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr);
ckey.dwColorSpaceLowValue = c << tests[t].shift; ckey.dwColorSpaceHighValue = c << tests[t].shift; hr = IDirectDrawSurface7_SetColorKey(src, DDCKEY_SRCBLT, &ckey); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr);
hr = IDirectDrawSurface7_Blt(dst, NULL, src, NULL, DDBLT_KEYSRC | DDBLT_WAIT, NULL); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr);
/* Don't make this read only, it somehow breaks the detection of the Nvidia bug below. */ hr = IDirectDrawSurface7_Lock(dst, NULL, &lock_desc, DDLOCK_WAIT, NULL); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); switch (tests[t].bpp) { case 4: @@ -12275,11 +12275,11 @@ static void test_colorkey_precision(void) break; } hr = IDirectDrawSurface7_Unlock(dst, 0); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr);
if (!c) { - ok(data[0] == tests[t].clear, "Expected surface content %#x, got %#x, format %s, c=%u.\n", + ok(data[0] == tests[t].clear, "Expected surface content %#x, got %#lx, format %s, c=%u.\n", tests[t].clear, data[0], tests[t].name, c);
if (data[3] == tests[t].clear) @@ -12303,48 +12303,48 @@ static void test_colorkey_precision(void) } } else - ok(data[0] == (c - 1) << tests[t].shift, "Expected surface content %#x, got %#x, format %s, c=%u.\n", + ok(data[0] == (c - 1) << tests[t].shift, "Expected surface content %#x, got %#lx, format %s, c=%u.\n", (c - 1) << tests[t].shift, data[0], tests[t].name, c);
- ok(data[1] == tests[t].clear, "Expected surface content %#x, got %#x, format %s, c=%u.\n", + ok(data[1] == tests[t].clear, "Expected surface content %#x, got %#lx, format %s, c=%u.\n", tests[t].clear, data[1], tests[t].name, c);
if (c == tests[t].max) - ok(data[2] == tests[t].clear, "Expected surface content %#x, got %#x, format %s, c=%u.\n", + ok(data[2] == tests[t].clear, "Expected surface content %#x, got %#lx, format %s, c=%u.\n", tests[t].clear, data[2], tests[t].name, c); else - ok(data[2] == (c + 1) << tests[t].shift, "Expected surface content %#x, got %#x, format %s, c=%u.\n", + ok(data[2] == (c + 1) << tests[t].shift, "Expected surface content %#x, got %#lx, format %s, c=%u.\n", (c + 1) << tests[t].shift, data[2], tests[t].name, c);
hr = IDirect3DDevice7_Clear(device, 0, NULL, D3DCLEAR_TARGET, 0x0000ff00, 1.0f, 0); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr);
hr = IDirect3DDevice7_BeginScene(device); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirect3DDevice7_DrawPrimitive(device, D3DPT_TRIANGLESTRIP, D3DFVF_XYZ | D3DFVF_TEX1, quad, 4, 0); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirect3DDevice7_EndScene(device); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr);
color = get_surface_color(rt, 80, 240);
if (!c) - ok(compare_color(color, 0x0000ff00, 1), "Got unexpected color 0x%08x, format %s, c=%u.\n", + ok(compare_color(color, 0x0000ff00, 1), "Got unexpected color 0x%08lx, format %s, c=%u.\n", color, tests[t].name, c); else - ok(compare_color(color, 0x00000000, 1), "Got unexpected color 0x%08x, format %s, c=%u.\n", + ok(compare_color(color, 0x00000000, 1), "Got unexpected color 0x%08lx, format %s, c=%u.\n", color, tests[t].name, c);
color = get_surface_color(rt, 240, 240); - ok(compare_color(color, 0x0000ff00, 1), "Got unexpected color 0x%08x, format %s, c=%u.\n", + ok(compare_color(color, 0x0000ff00, 1), "Got unexpected color 0x%08lx, format %s, c=%u.\n", color, tests[t].name, c);
color = get_surface_color(rt, 400, 240); if (c == tests[t].max) - ok(compare_color(color, 0x0000ff00, 1), "Got unexpected color 0x%08x, format %s, c=%u.\n", + ok(compare_color(color, 0x0000ff00, 1), "Got unexpected color 0x%08lx, format %s, c=%u.\n", color, tests[t].name, c); else - ok(compare_color(color, 0x00000000, 1), "Got unexpected color 0x%08x, format %s, c=%u.\n", + ok(compare_color(color, 0x00000000, 1), "Got unexpected color 0x%08lx, format %s, c=%u.\n", color, tests[t].name, c);
IDirectDrawSurface7_Release(texture); @@ -12357,7 +12357,7 @@ done: IDirectDrawSurface7_Release(rt); IDirectDraw7_Release(ddraw); refcount = IDirect3DDevice7_Release(device); - ok(!refcount, "Device has %u references left.\n", refcount); + ok(!refcount, "Device has %lu references left.\n", refcount); DestroyWindow(window); }
@@ -12375,7 +12375,7 @@ static void test_range_colorkey(void) ddraw = create_ddraw(); ok(!!ddraw, "Failed to create a ddraw object.\n"); hr = IDirectDraw7_SetCooperativeLevel(ddraw, window, DDSCL_NORMAL); - ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#lx.\n", hr);
memset(&surface_desc, 0, sizeof(surface_desc)); surface_desc.dwSize = sizeof(surface_desc); @@ -12394,85 +12394,85 @@ static void test_range_colorkey(void) surface_desc.ddckCKSrcBlt.dwColorSpaceLowValue = 0x00000000; surface_desc.ddckCKSrcBlt.dwColorSpaceHighValue = 0x00000001; hr = IDirectDraw7_CreateSurface(ddraw, &surface_desc, &surface, NULL); - ok(hr == DDERR_NOCOLORKEYHW, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_NOCOLORKEYHW, "Got unexpected hr %#lx.\n", hr);
surface_desc.ddckCKSrcBlt.dwColorSpaceLowValue = 0x00000001; surface_desc.ddckCKSrcBlt.dwColorSpaceHighValue = 0x00000000; hr = IDirectDraw7_CreateSurface(ddraw, &surface_desc, &surface, NULL); - ok(hr == DDERR_NOCOLORKEYHW, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_NOCOLORKEYHW, "Got unexpected hr %#lx.\n", hr);
/* Same for DDSCAPS_OFFSCREENPLAIN. */ surface_desc.ddsCaps.dwCaps = DDSCAPS_OFFSCREENPLAIN; surface_desc.ddckCKSrcBlt.dwColorSpaceLowValue = 0x00000000; surface_desc.ddckCKSrcBlt.dwColorSpaceHighValue = 0x00000001; hr = IDirectDraw7_CreateSurface(ddraw, &surface_desc, &surface, NULL); - ok(hr == DDERR_NOCOLORKEYHW, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_NOCOLORKEYHW, "Got unexpected hr %#lx.\n", hr);
surface_desc.ddckCKSrcBlt.dwColorSpaceLowValue = 0x00000001; surface_desc.ddckCKSrcBlt.dwColorSpaceHighValue = 0x00000000; hr = IDirectDraw7_CreateSurface(ddraw, &surface_desc, &surface, NULL); - ok(hr == DDERR_NOCOLORKEYHW, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_NOCOLORKEYHW, "Got unexpected hr %#lx.\n", hr);
surface_desc.ddckCKSrcBlt.dwColorSpaceLowValue = 0x00000000; surface_desc.ddckCKSrcBlt.dwColorSpaceHighValue = 0x00000000; hr = IDirectDraw7_CreateSurface(ddraw, &surface_desc, &surface, NULL); - ok(SUCCEEDED(hr), "Failed to create surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create surface, hr %#lx.\n", hr);
/* Setting a range color key without DDCKEY_COLORSPACE collapses the key. */ ckey.dwColorSpaceLowValue = 0x00000000; ckey.dwColorSpaceHighValue = 0x00000001; hr = IDirectDrawSurface7_SetColorKey(surface, DDCKEY_SRCBLT, &ckey); - ok(SUCCEEDED(hr), "Failed to set color key, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set color key, hr %#lx.\n", hr);
hr = IDirectDrawSurface7_GetColorKey(surface, DDCKEY_SRCBLT, &ckey); - ok(SUCCEEDED(hr), "Failed to get color key, hr %#x.\n", hr); - ok(!ckey.dwColorSpaceLowValue, "Got unexpected value 0x%08x.\n", ckey.dwColorSpaceLowValue); - ok(!ckey.dwColorSpaceHighValue, "Got unexpected value 0x%08x.\n", ckey.dwColorSpaceHighValue); + ok(SUCCEEDED(hr), "Failed to get color key, hr %#lx.\n", hr); + ok(!ckey.dwColorSpaceLowValue, "Got unexpected value 0x%08lx.\n", ckey.dwColorSpaceLowValue); + ok(!ckey.dwColorSpaceHighValue, "Got unexpected value 0x%08lx.\n", ckey.dwColorSpaceHighValue);
ckey.dwColorSpaceLowValue = 0x00000001; ckey.dwColorSpaceHighValue = 0x00000000; hr = IDirectDrawSurface7_SetColorKey(surface, DDCKEY_SRCBLT, &ckey); - ok(SUCCEEDED(hr), "Failed to set color key, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set color key, hr %#lx.\n", hr);
hr = IDirectDrawSurface7_GetColorKey(surface, DDCKEY_SRCBLT, &ckey); - ok(SUCCEEDED(hr), "Failed to get color key, hr %#x.\n", hr); - ok(ckey.dwColorSpaceLowValue == 0x00000001, "Got unexpected value 0x%08x.\n", ckey.dwColorSpaceLowValue); - ok(ckey.dwColorSpaceHighValue == 0x00000001, "Got unexpected value 0x%08x.\n", ckey.dwColorSpaceHighValue); + ok(SUCCEEDED(hr), "Failed to get color key, hr %#lx.\n", hr); + ok(ckey.dwColorSpaceLowValue == 0x00000001, "Got unexpected value 0x%08lx.\n", ckey.dwColorSpaceLowValue); + ok(ckey.dwColorSpaceHighValue == 0x00000001, "Got unexpected value 0x%08lx.\n", ckey.dwColorSpaceHighValue);
/* DDCKEY_COLORSPACE is ignored if the key is a single value. */ ckey.dwColorSpaceLowValue = 0x00000000; ckey.dwColorSpaceHighValue = 0x00000000; hr = IDirectDrawSurface7_SetColorKey(surface, DDCKEY_SRCBLT | DDCKEY_COLORSPACE, &ckey); - ok(SUCCEEDED(hr), "Failed to set color key, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set color key, hr %#lx.\n", hr);
/* Using it with a range key results in DDERR_NOCOLORKEYHW. */ ckey.dwColorSpaceLowValue = 0x00000001; ckey.dwColorSpaceHighValue = 0x00000000; hr = IDirectDrawSurface7_SetColorKey(surface, DDCKEY_SRCBLT | DDCKEY_COLORSPACE, &ckey); - ok(hr == DDERR_NOCOLORKEYHW, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_NOCOLORKEYHW, "Got unexpected hr %#lx.\n", hr); ckey.dwColorSpaceLowValue = 0x00000000; ckey.dwColorSpaceHighValue = 0x00000001; hr = IDirectDrawSurface7_SetColorKey(surface, DDCKEY_SRCBLT | DDCKEY_COLORSPACE, &ckey); - ok(hr == DDERR_NOCOLORKEYHW, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_NOCOLORKEYHW, "Got unexpected hr %#lx.\n", hr); /* Range destination keys don't work either. */ hr = IDirectDrawSurface7_SetColorKey(surface, DDCKEY_DESTBLT | DDCKEY_COLORSPACE, &ckey); - ok(hr == DDERR_NOCOLORKEYHW, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_NOCOLORKEYHW, "Got unexpected hr %#lx.\n", hr);
/* Just to show it's not because of A, R, and G having equal values. */ ckey.dwColorSpaceLowValue = 0x00000000; ckey.dwColorSpaceHighValue = 0x01010101; hr = IDirectDrawSurface7_SetColorKey(surface, DDCKEY_SRCBLT | DDCKEY_COLORSPACE, &ckey); - ok(hr == DDERR_NOCOLORKEYHW, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_NOCOLORKEYHW, "Got unexpected hr %#lx.\n", hr);
/* None of these operations modified the key. */ hr = IDirectDrawSurface7_GetColorKey(surface, DDCKEY_SRCBLT, &ckey); - ok(SUCCEEDED(hr), "Failed to get color key, hr %#x.\n", hr); - ok(!ckey.dwColorSpaceLowValue, "Got unexpected value 0x%08x.\n", ckey.dwColorSpaceLowValue); - ok(!ckey.dwColorSpaceHighValue, "Got unexpected value 0x%08x.\n", ckey.dwColorSpaceHighValue); + ok(SUCCEEDED(hr), "Failed to get color key, hr %#lx.\n", hr); + ok(!ckey.dwColorSpaceLowValue, "Got unexpected value 0x%08lx.\n", ckey.dwColorSpaceLowValue); + ok(!ckey.dwColorSpaceHighValue, "Got unexpected value 0x%08lx.\n", ckey.dwColorSpaceHighValue);
IDirectDrawSurface7_Release(surface); refcount = IDirectDraw7_Release(ddraw); - ok(!refcount, "Got unexpected refcount %u.\n", refcount); + ok(!refcount, "Got unexpected refcount %lu.\n", refcount); DestroyWindow(window); }
@@ -12536,14 +12536,14 @@ static void test_shademode(void) }
hr = IDirect3DDevice7_GetDirect3D(device, &d3d); - ok(SUCCEEDED(hr), "Failed to get d3d interface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get d3d interface, hr %#lx.\n", hr); hr = IDirect3DDevice7_GetRenderTarget(device, &rt); - ok(SUCCEEDED(hr), "Failed to get render target, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get render target, hr %#lx.\n", hr);
hr = IDirect3DDevice7_SetRenderState(device, D3DRENDERSTATE_LIGHTING, FALSE); - ok(hr == D3D_OK, "Failed to disable lighting, hr %#x.\n", hr); + ok(hr == D3D_OK, "Failed to disable lighting, hr %#lx.\n", hr); hr = IDirect3DDevice7_SetRenderState(device, D3DRENDERSTATE_FOGENABLE, FALSE); - ok(SUCCEEDED(hr), "Failed to disable fog, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to disable fog, hr %#lx.\n", hr);
memset(&desc, 0, sizeof(desc)); desc.dwSize = sizeof(desc); @@ -12551,21 +12551,21 @@ static void test_shademode(void) desc.dwFVF = D3DFVF_XYZ | D3DFVF_DIFFUSE; desc.dwNumVertices = ARRAY_SIZE(quad_strip); hr = IDirect3D7_CreateVertexBuffer(d3d, &desc, &vb_strip, 0); - ok(hr == D3D_OK, "Failed to create vertex buffer, hr %#x.\n", hr); + ok(hr == D3D_OK, "Failed to create vertex buffer, hr %#lx.\n", hr); hr = IDirect3DVertexBuffer7_Lock(vb_strip, 0, &data, NULL); - ok(hr == D3D_OK, "Failed to lock vertex buffer, hr %#x.\n", hr); + ok(hr == D3D_OK, "Failed to lock vertex buffer, hr %#lx.\n", hr); memcpy(data, quad_strip, sizeof(quad_strip)); hr = IDirect3DVertexBuffer7_Unlock(vb_strip); - ok(hr == D3D_OK, "Failed to unlock vertex buffer, hr %#x.\n", hr); + ok(hr == D3D_OK, "Failed to unlock vertex buffer, hr %#lx.\n", hr);
desc.dwNumVertices = ARRAY_SIZE(quad_list); hr = IDirect3D7_CreateVertexBuffer(d3d, &desc, &vb_list, 0); - ok(hr == D3D_OK, "Failed to create vertex buffer, hr %#x.\n", hr); + ok(hr == D3D_OK, "Failed to create vertex buffer, hr %#lx.\n", hr); hr = IDirect3DVertexBuffer7_Lock(vb_list, 0, &data, NULL); - ok(hr == D3D_OK, "Failed to lock vertex buffer, hr %#x.\n", hr); + ok(hr == D3D_OK, "Failed to lock vertex buffer, hr %#lx.\n", hr); memcpy(data, quad_list, sizeof(quad_list)); hr = IDirect3DVertexBuffer7_Unlock(vb_list); - ok(hr == D3D_OK, "Failed to unlock vertex buffer, hr %#x.\n", hr); + ok(hr == D3D_OK, "Failed to unlock vertex buffer, hr %#lx.\n", hr);
/* Try it first with a TRIANGLESTRIP. Do it with different geometry because * the color fixups we have to do for FLAT shading will be dependent on that. */ @@ -12573,19 +12573,19 @@ static void test_shademode(void) for (i = 0; i < ARRAY_SIZE(tests); ++i) { hr = IDirect3DDevice7_Clear(device, 0, NULL, D3DCLEAR_TARGET, 0xffffffff, 0.0f, 0); - ok(hr == D3D_OK, "Failed to clear, hr %#x.\n", hr); + ok(hr == D3D_OK, "Failed to clear, hr %#lx.\n", hr);
hr = IDirect3DDevice7_SetRenderState(device, D3DRENDERSTATE_SHADEMODE, tests[i].shademode); - ok(hr == D3D_OK, "Failed to set shade mode, hr %#x.\n", hr); + ok(hr == D3D_OK, "Failed to set shade mode, hr %#lx.\n", hr);
hr = IDirect3DDevice7_BeginScene(device); - ok(SUCCEEDED(hr), "Failed to begin scene, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to begin scene, hr %#lx.\n", hr); buffer = tests[i].primtype == D3DPT_TRIANGLESTRIP ? vb_strip : vb_list; count = tests[i].primtype == D3DPT_TRIANGLESTRIP ? 4 : 6; hr = IDirect3DDevice7_DrawPrimitiveVB(device, tests[i].primtype, buffer, 0, count, 0); - ok(SUCCEEDED(hr), "Failed to draw, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to draw, hr %#lx.\n", hr); hr = IDirect3DDevice7_EndScene(device); - ok(SUCCEEDED(hr), "Failed to end scene, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to end scene, hr %#lx.\n", hr);
color0 = get_surface_color(rt, 100, 100); /* Inside first triangle */ color1 = get_surface_color(rt, 500, 350); /* Inside second triangle */ @@ -12595,9 +12595,9 @@ static void test_shademode(void) * functionality being available. */ /* PHONG should be the same as GOURAUD, since no hardware implements * this. */ - ok(compare_color(color0, tests[i].color0, 1), "Test %u shading has color0 %08x, expected %08x.\n", + ok(compare_color(color0, tests[i].color0, 1), "Test %u shading has color0 %08lx, expected %08lx.\n", i, color0, tests[i].color0); - ok(compare_color(color1, tests[i].color1, 1), "Test %u shading has color1 %08x, expected %08x.\n", + ok(compare_color(color1, tests[i].color1, 1), "Test %u shading has color1 %08lx, expected %08lx.\n", i, color1, tests[i].color1); }
@@ -12606,7 +12606,7 @@ static void test_shademode(void) IDirectDrawSurface7_Release(rt); IDirect3D7_Release(d3d); refcount = IDirect3DDevice7_Release(device); - ok(!refcount, "Device has %u references left.\n", refcount); + ok(!refcount, "Device has %lu references left.\n", refcount); DestroyWindow(window); }
@@ -12670,12 +12670,12 @@ static void test_lockrect_invalid(void) ddraw = create_ddraw(); ok(!!ddraw, "Failed to create a ddraw object.\n"); hr = IDirectDraw7_SetCooperativeLevel(ddraw, window, DDSCL_NORMAL); - ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#lx.\n", hr);
memset(&hal_caps, 0, sizeof(hal_caps)); hal_caps.dwSize = sizeof(hal_caps); hr = IDirectDraw7_GetCaps(ddraw, &hal_caps, NULL); - ok(SUCCEEDED(hr), "Failed to get caps, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get caps, hr %#lx.\n", hr); if ((hal_caps.ddsCaps.dwCaps & needed_caps) != needed_caps || !(hal_caps.ddsCaps.dwCaps & DDSCAPS2_TEXTUREMANAGE)) { @@ -12702,17 +12702,17 @@ static void test_lockrect_invalid(void) hr = IDirectDraw7_CreateSurface(ddraw, &surface_desc, &surface, NULL); if (!resources[r].allowed) { - ok(hr == DDERR_INVALIDCAPS, "Got unexpected hr %#x, type %s.\n", hr, resources[r].name); + ok(hr == DDERR_INVALIDCAPS, "Got unexpected hr %#lx, type %s.\n", hr, resources[r].name); continue; } if (is_ddraw64 && (resources[r].caps & DDSCAPS_TEXTURE)) { - todo_wine ok(hr == E_NOINTERFACE, "Got unexpected hr %#x, type %s.\n", hr, resources[r].name); + todo_wine ok(hr == E_NOINTERFACE, "Got unexpected hr %#lx, type %s.\n", hr, resources[r].name); if (SUCCEEDED(hr)) IDirectDrawSurface7_Release(surface); continue; } - ok(SUCCEEDED(hr), "Failed to create surface, hr %#x, type %s.\n", hr, resources[r].name); + ok(SUCCEEDED(hr), "Failed to create surface, hr %#lx, type %s.\n", hr, resources[r].name);
/* Crashes in ddraw7 hr = IDirectDrawSurface7_Lock(surface, NULL, NULL, DDLOCK_WAIT, NULL); @@ -12727,11 +12727,11 @@ static void test_lockrect_invalid(void) locked_desc.dwSize = sizeof(locked_desc);
hr = IDirectDrawSurface7_Lock(surface, rect, &locked_desc, DDLOCK_WAIT, NULL); - ok(SUCCEEDED(hr), "Lock failed (%#x) for rect %s, type %s.\n", + ok(SUCCEEDED(hr), "Lock failed (%#lx) for rect %s, type %s.\n", hr, wine_dbgstr_rect(rect), resources[r].name);
hr = IDirectDrawSurface7_Unlock(surface, NULL); - ok(SUCCEEDED(hr), "Failed to unlock surface, hr %#x, type %s.\n", hr, resources[r].name); + ok(SUCCEEDED(hr), "Failed to unlock surface, hr %#lx, type %s.\n", hr, resources[r].name); }
for (i = 0; i < ARRAY_SIZE(invalid); ++i) @@ -12743,37 +12743,37 @@ static void test_lockrect_invalid(void)
hr = IDirectDrawSurface7_Lock(surface, rect, &locked_desc, DDLOCK_WAIT, NULL); todo_wine_if (SUCCEEDED(resources[r].hr)) - ok(hr == resources[r].hr, "Lock returned %#x for rect %s, type %s.\n", + ok(hr == resources[r].hr, "Lock returned %#lx for rect %s, type %s.\n", hr, wine_dbgstr_rect(rect), resources[r].name); if (SUCCEEDED(hr)) { hr = IDirectDrawSurface7_Unlock(surface, NULL); - ok(SUCCEEDED(hr), "Failed to unlock surface, hr %#x, type %s.\n", hr, resources[r].name); + ok(SUCCEEDED(hr), "Failed to unlock surface, hr %#lx, type %s.\n", hr, resources[r].name); } else ok(!locked_desc.lpSurface, "Got unexpected lpSurface %p.\n", locked_desc.lpSurface); }
hr = IDirectDrawSurface7_Lock(surface, NULL, &locked_desc, DDLOCK_WAIT, NULL); - ok(SUCCEEDED(hr), "Lock(rect = NULL) failed, hr %#x, type %s.\n", + ok(SUCCEEDED(hr), "Lock(rect = NULL) failed, hr %#lx, type %s.\n", hr, resources[r].name); hr = IDirectDrawSurface7_Lock(surface, NULL, &locked_desc, DDLOCK_WAIT, NULL); - ok(hr == DDERR_SURFACEBUSY, "Double lock(rect = NULL) returned %#x, type %s.\n", + ok(hr == DDERR_SURFACEBUSY, "Double lock(rect = NULL) returned %#lx, type %s.\n", hr, resources[r].name); hr = IDirectDrawSurface7_Unlock(surface, NULL); - ok(SUCCEEDED(hr), "Failed to unlock surface, hr %#x, type %s.\n", hr, resources[r].name); + ok(SUCCEEDED(hr), "Failed to unlock surface, hr %#lx, type %s.\n", hr, resources[r].name);
hr = IDirectDrawSurface7_Lock(surface, &valid[0], &locked_desc, DDLOCK_WAIT, NULL); - ok(SUCCEEDED(hr), "Lock(rect = %s) failed (%#x).\n", wine_dbgstr_rect(&valid[0]), hr); + ok(SUCCEEDED(hr), "Lock(rect = %s) failed (%#lx).\n", wine_dbgstr_rect(&valid[0]), hr); hr = IDirectDrawSurface7_Lock(surface, &valid[0], &locked_desc, DDLOCK_WAIT, NULL); - ok(hr == DDERR_SURFACEBUSY, "Double lock(rect = %s) failed (%#x).\n", + ok(hr == DDERR_SURFACEBUSY, "Double lock(rect = %s) failed (%#lx).\n", wine_dbgstr_rect(&valid[0]), hr);
/* Locking a different rectangle returns DD_OK, but it seems to break the surface. * Afterwards unlocking the surface fails(NULL rectangle or both locked rectangles) */
hr = IDirectDrawSurface7_Unlock(surface, NULL); - ok(SUCCEEDED(hr), "Failed to unlock surface, hr %#x, type %s.\n", hr, resources[r].name); + ok(SUCCEEDED(hr), "Failed to unlock surface, hr %#lx, type %s.\n", hr, resources[r].name);
IDirectDrawSurface7_Release(surface); } @@ -12798,7 +12798,7 @@ static void test_yv12_overlay(void) ddraw = create_ddraw(); ok(!!ddraw, "Failed to create a ddraw object.\n"); hr = IDirectDraw7_SetCooperativeLevel(ddraw, window, DDSCL_NORMAL); - ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#lx.\n", hr);
if (!(src_surface = create_overlay(ddraw, 256, 256, MAKEFOURCC('Y','V','1','2')))) { @@ -12809,17 +12809,17 @@ static void test_yv12_overlay(void) memset(&desc, 0, sizeof(desc)); desc.dwSize = sizeof(desc); hr = IDirectDrawSurface7_Lock(src_surface, NULL, &desc, DDLOCK_WAIT, NULL); - ok(SUCCEEDED(hr), "Failed to lock surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to lock surface, hr %#lx.\n", hr);
ok(desc.dwFlags == (DDSD_WIDTH | DDSD_HEIGHT | DDSD_PIXELFORMAT | DDSD_CAPS | DDSD_PITCH), - "Got unexpected flags %#x.\n", desc.dwFlags); + "Got unexpected flags %#lx.\n", desc.dwFlags); ok(desc.ddsCaps.dwCaps == (DDSCAPS_OVERLAY | DDSCAPS_VIDEOMEMORY | DDSCAPS_LOCALVIDMEM | DDSCAPS_HWCODEC) || desc.ddsCaps.dwCaps == (DDSCAPS_OVERLAY | DDSCAPS_VIDEOMEMORY | DDSCAPS_LOCALVIDMEM), - "Got unexpected caps %#x.\n", desc.ddsCaps.dwCaps); - ok(desc.dwWidth == 256, "Got unexpected width %u.\n", desc.dwWidth); - ok(desc.dwHeight == 256, "Got unexpected height %u.\n", desc.dwHeight); + "Got unexpected caps %#lx.\n", desc.ddsCaps.dwCaps); + ok(desc.dwWidth == 256, "Got unexpected width %lu.\n", desc.dwWidth); + ok(desc.dwHeight == 256, "Got unexpected height %lu.\n", desc.dwHeight); /* The overlay pitch seems to have 256 byte alignment. */ - ok(!(U1(desc).lPitch & 0xff), "Got unexpected pitch %u.\n", U1(desc).lPitch); + ok(!(U1(desc).lPitch & 0xff), "Got unexpected pitch %lu.\n", U1(desc).lPitch);
/* Fill the surface with some data for the blit test. */ base = desc.lpSurface; @@ -12840,7 +12840,7 @@ static void test_yv12_overlay(void) }
hr = IDirectDrawSurface7_Unlock(src_surface, NULL); - ok(SUCCEEDED(hr), "Failed to unlock surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to unlock surface, hr %#lx.\n", hr);
/* YV12 uses 2x2 blocks with 6 bytes per block (4*Y, 1*U, 1*V). Unlike * other block-based formats like DXT the entire Y channel is stored in @@ -12848,12 +12848,12 @@ static void test_yv12_overlay(void) * locks do not really make sense. Show that they are allowed nevertheless * and the offset points into the luminance data. */ hr = IDirectDrawSurface7_Lock(src_surface, &rect, &desc, DDLOCK_WAIT, NULL); - ok(SUCCEEDED(hr), "Failed to lock surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to lock surface, hr %#lx.\n", hr); offset = ((const unsigned char *)desc.lpSurface - base); - ok(offset == rect.top * U1(desc).lPitch + rect.left, "Got unexpected offset %u, expected %u.\n", + ok(offset == rect.top * U1(desc).lPitch + rect.left, "Got unexpected offset %u, expected %lu.\n", offset, rect.top * U1(desc).lPitch + rect.left); hr = IDirectDrawSurface7_Unlock(src_surface, NULL); - ok(SUCCEEDED(hr), "Failed to unlock surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to unlock surface, hr %#lx.\n", hr);
if (!(dst_surface = create_overlay(ddraw, 256, 256, MAKEFOURCC('Y','V','1','2')))) { @@ -12867,14 +12867,14 @@ static void test_yv12_overlay(void) hr = IDirectDrawSurface7_Blt(dst_surface, NULL, src_surface, NULL, DDBLT_WAIT, NULL); /* VMware rejects YV12 blits. This behavior has not been seen on real * hardware yet, so mark it broken. */ - ok(SUCCEEDED(hr) || broken(hr == E_NOTIMPL), "Failed to blit, hr %#x.\n", hr); + ok(SUCCEEDED(hr) || broken(hr == E_NOTIMPL), "Failed to blit, hr %#lx.\n", hr);
if (SUCCEEDED(hr)) { memset(&desc, 0, sizeof(desc)); desc.dwSize = sizeof(desc); hr = IDirectDrawSurface7_Lock(dst_surface, NULL, &desc, DDLOCK_WAIT, NULL); - ok(SUCCEEDED(hr), "Failed to lock surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to lock surface, hr %#lx.\n", hr);
base = desc.lpSurface; ok(base[0] == 0x10, "Got unexpected Y data 0x%02x.\n", base[0]); @@ -12884,7 +12884,7 @@ static void test_yv12_overlay(void) todo_wine ok(base[0] == 0x30, "Got unexpected U data 0x%02x.\n", base[0]);
hr = IDirectDrawSurface7_Unlock(dst_surface, NULL); - ok(SUCCEEDED(hr), "Failed to unlock surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to unlock surface, hr %#lx.\n", hr); }
IDirectDrawSurface7_Release(dst_surface); @@ -12920,7 +12920,7 @@ static void test_offscreen_overlay(void) ddraw = create_ddraw(); ok(!!ddraw, "Failed to create a ddraw object.\n"); hr = IDirectDraw7_SetCooperativeLevel(ddraw, window, DDSCL_NORMAL); - ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#lx.\n", hr);
if (!(overlay = create_overlay(ddraw, 64, 64, MAKEFOURCC('U','Y','V','Y')))) { @@ -12933,21 +12933,21 @@ static void test_offscreen_overlay(void) surface_desc.dwFlags = DDSD_CAPS; surface_desc.ddsCaps.dwCaps = DDSCAPS_PRIMARYSURFACE; hr = IDirectDraw7_CreateSurface(ddraw, &surface_desc, &primary, NULL); - ok(SUCCEEDED(hr), "Failed to create surface, hr %#x.\n",hr); + ok(SUCCEEDED(hr), "Failed to create surface, hr %#lx.\n",hr);
/* On Windows 7, and probably Vista, UpdateOverlay() will return * DDERR_OUTOFCAPS if the dwm is active. Calling GetDC() on the primary * surface prevents this by disabling the dwm. */ hr = IDirectDrawSurface7_GetDC(primary, &dc); - ok(SUCCEEDED(hr), "Failed to get DC, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get DC, hr %#lx.\n", hr); hr = IDirectDrawSurface7_ReleaseDC(primary, dc); - ok(SUCCEEDED(hr), "Failed to release DC, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to release DC, hr %#lx.\n", hr);
/* Try to overlay a NULL surface. */ hr = IDirectDrawSurface7_UpdateOverlay(overlay, NULL, NULL, NULL, DDOVER_SHOW, NULL); - ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface7_UpdateOverlay(overlay, NULL, NULL, NULL, DDOVER_HIDE, NULL); - ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#lx.\n", hr);
/* Try to overlay an offscreen surface. */ memset(&surface_desc, 0, sizeof(surface_desc)); @@ -12964,18 +12964,18 @@ static void test_offscreen_overlay(void) U3(U4(surface_desc).ddpfPixelFormat).dwGBitMask = 0x07e0; U4(U4(surface_desc).ddpfPixelFormat).dwBBitMask = 0x001f; hr = IDirectDraw7_CreateSurface(ddraw, &surface_desc, &offscreen, NULL); - ok(SUCCEEDED(hr), "Failed to create surface, hr %#x.\n",hr); + ok(SUCCEEDED(hr), "Failed to create surface, hr %#lx.\n",hr);
hr = IDirectDrawSurface7_UpdateOverlay(overlay, NULL, offscreen, NULL, DDOVER_SHOW, NULL); ok(SUCCEEDED(hr) || broken(hr == DDERR_OUTOFCAPS && dwm_enabled()) || broken(hr == E_NOTIMPL && ddraw_is_vmware(ddraw)), - "Failed to update overlay, hr %#x.\n", hr); + "Failed to update overlay, hr %#lx.\n", hr);
/* Try to overlay the primary with a non-overlay surface. */ hr = IDirectDrawSurface7_UpdateOverlay(offscreen, NULL, primary, NULL, DDOVER_SHOW, NULL); - ok(hr == DDERR_NOTAOVERLAYSURFACE, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_NOTAOVERLAYSURFACE, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface7_UpdateOverlay(offscreen, NULL, primary, NULL, DDOVER_HIDE, NULL); - ok(hr == DDERR_NOTAOVERLAYSURFACE, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_NOTAOVERLAYSURFACE, "Got unexpected hr %#lx.\n", hr);
IDirectDrawSurface7_Release(offscreen); IDirectDrawSurface7_Release(primary); @@ -13000,7 +13000,7 @@ static void test_overlay_rect(void) ddraw = create_ddraw(); ok(!!ddraw, "Failed to create a ddraw object.\n"); hr = IDirectDraw7_SetCooperativeLevel(ddraw, window, DDSCL_NORMAL); - ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#lx.\n", hr);
if (!(overlay = create_overlay(ddraw, 64, 64, MAKEFOURCC('U','Y','V','Y')))) { @@ -13013,15 +13013,15 @@ static void test_overlay_rect(void) surface_desc.dwFlags = DDSD_CAPS; surface_desc.ddsCaps.dwCaps = DDSCAPS_PRIMARYSURFACE; hr = IDirectDraw7_CreateSurface(ddraw, &surface_desc, &primary, NULL); - ok(SUCCEEDED(hr), "Failed to create surface, hr %#x.\n",hr); + ok(SUCCEEDED(hr), "Failed to create surface, hr %#lx.\n",hr);
/* On Windows 7, and probably Vista, UpdateOverlay() will return * DDERR_OUTOFCAPS if the dwm is active. Calling GetDC() on the primary * surface prevents this by disabling the dwm. */ hr = IDirectDrawSurface7_GetDC(primary, &dc); - ok(SUCCEEDED(hr), "Failed to get DC, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get DC, hr %#lx.\n", hr); hr = IDirectDrawSurface7_ReleaseDC(primary, dc); - ok(SUCCEEDED(hr), "Failed to release DC, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to release DC, hr %#lx.\n", hr);
/* On Windows 8 and newer DWM can't be turned off, making overlays unusable. */ if (dwm_enabled()) @@ -13034,48 +13034,48 @@ static void test_overlay_rect(void) * used. This is not true in Windows Vista and earlier, but changed in * Windows 7. */ hr = IDirectDrawSurface7_UpdateOverlay(overlay, NULL, primary, &rect, DDOVER_SHOW, NULL); - ok(SUCCEEDED(hr), "Failed to update overlay, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to update overlay, hr %#lx.\n", hr); hr = IDirectDrawSurface7_UpdateOverlay(overlay, NULL, primary, NULL, DDOVER_HIDE, NULL); - ok(SUCCEEDED(hr), "Failed to update overlay, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to update overlay, hr %#lx.\n", hr); hr = IDirectDrawSurface7_UpdateOverlay(overlay, NULL, primary, NULL, DDOVER_SHOW, NULL); - ok(hr == DD_OK || hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK || hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#lx.\n", hr);
/* Show that the overlay position is the (top, left) coordinate of the * destination rectangle. */ OffsetRect(&rect, 32, 16); hr = IDirectDrawSurface7_UpdateOverlay(overlay, NULL, primary, &rect, DDOVER_SHOW, NULL); - ok(SUCCEEDED(hr), "Failed to update overlay, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to update overlay, hr %#lx.\n", hr); pos_x = -1; pos_y = -1; hr = IDirectDrawSurface7_GetOverlayPosition(overlay, &pos_x, &pos_y); - ok(SUCCEEDED(hr), "Failed to get overlay position, hr %#x.\n", hr); - ok(pos_x == rect.left, "Got unexpected pos_x %d, expected %d.\n", pos_x, rect.left); - ok(pos_y == rect.top, "Got unexpected pos_y %d, expected %d.\n", pos_y, rect.top); + ok(SUCCEEDED(hr), "Failed to get overlay position, hr %#lx.\n", hr); + ok(pos_x == rect.left, "Got unexpected pos_x %ld, expected %ld.\n", pos_x, rect.left); + ok(pos_y == rect.top, "Got unexpected pos_y %ld, expected %ld.\n", pos_y, rect.top);
/* Passing a NULL dest rect sets the position to 0/0. Visually it can be * seen that the overlay overlays the whole primary(==screen). */ hr2 = IDirectDrawSurface7_UpdateOverlay(overlay, NULL, primary, NULL, 0, NULL); - ok(hr2 == DD_OK || hr2 == DDERR_INVALIDPARAMS || hr2 == DDERR_OUTOFCAPS, "Got unexpected hr %#x.\n", hr2); + ok(hr2 == DD_OK || hr2 == DDERR_INVALIDPARAMS || hr2 == DDERR_OUTOFCAPS, "Got unexpected hr %#lx.\n", hr2); hr = IDirectDrawSurface7_GetOverlayPosition(overlay, &pos_x, &pos_y); - ok(SUCCEEDED(hr), "Failed to get overlay position, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get overlay position, hr %#lx.\n", hr); if (SUCCEEDED(hr2)) { - ok(!pos_x, "Got unexpected pos_x %d.\n", pos_x); - ok(!pos_y, "Got unexpected pos_y %d.\n", pos_y); + ok(!pos_x, "Got unexpected pos_x %ld.\n", pos_x); + ok(!pos_y, "Got unexpected pos_y %ld.\n", pos_y); } else { - ok(pos_x == 32, "Got unexpected pos_x %d.\n", pos_x); - ok(pos_y == 16, "Got unexpected pos_y %d.\n", pos_y); + ok(pos_x == 32, "Got unexpected pos_x %ld.\n", pos_x); + ok(pos_y == 16, "Got unexpected pos_y %ld.\n", pos_y); }
/* The position cannot be retrieved when the overlay is not shown. */ hr = IDirectDrawSurface7_UpdateOverlay(overlay, NULL, primary, &rect, DDOVER_HIDE, NULL); - ok(SUCCEEDED(hr), "Failed to update overlay, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to update overlay, hr %#lx.\n", hr); pos_x = -1; pos_y = -1; hr = IDirectDrawSurface7_GetOverlayPosition(overlay, &pos_x, &pos_y); - ok(hr == DDERR_OVERLAYNOTVISIBLE, "Got unexpected hr %#x.\n", hr); - ok(!pos_x, "Got unexpected pos_x %d.\n", pos_x); - ok(!pos_y, "Got unexpected pos_y %d.\n", pos_y); + ok(hr == DDERR_OVERLAYNOTVISIBLE, "Got unexpected hr %#lx.\n", hr); + ok(!pos_x, "Got unexpected pos_x %ld.\n", pos_x); + ok(!pos_y, "Got unexpected pos_y %ld.\n", pos_y);
done: if (primary) @@ -13127,12 +13127,12 @@ static void test_blt(void) }
hr = IDirect3DDevice7_GetDirect3D(device, &d3d); - ok(SUCCEEDED(hr), "Failed to get Direct3D7 interface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get Direct3D7 interface, hr %#lx.\n", hr); hr = IDirect3D7_QueryInterface(d3d, &IID_IDirectDraw7, (void **)&ddraw); - ok(SUCCEEDED(hr), "Failed to get DirectDraw7 interface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get DirectDraw7 interface, hr %#lx.\n", hr); IDirect3D7_Release(d3d); hr = IDirect3DDevice7_GetRenderTarget(device, &rt); - ok(SUCCEEDED(hr), "Failed to get render target, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get render target, hr %#lx.\n", hr);
memset(&surface_desc, 0, sizeof(surface_desc)); surface_desc.dwSize = sizeof(surface_desc); @@ -13141,37 +13141,37 @@ static void test_blt(void) surface_desc.dwHeight = 480; surface_desc.ddsCaps.dwCaps = DDSCAPS_OFFSCREENPLAIN; hr = IDirectDraw7_CreateSurface(ddraw, &surface_desc, &surface, NULL); - ok(SUCCEEDED(hr), "Failed to create surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create surface, hr %#lx.\n", hr);
hr = IDirectDrawSurface7_Blt(surface, NULL, surface, NULL, 0, NULL); - ok(SUCCEEDED(hr), "Failed to blit, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to blit, hr %#lx.\n", hr);
hr = IDirectDrawSurface7_Blt(surface, NULL, rt, NULL, 0, NULL); - ok(SUCCEEDED(hr), "Failed to blit, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to blit, hr %#lx.\n", hr);
for (i = 0; i < ARRAY_SIZE(test_data); ++i) { hr = IDirectDrawSurface7_Blt(surface, &test_data[i].dst_rect, surface, &test_data[i].src_rect, DDBLT_WAIT, NULL); - ok(hr == test_data[i].hr, "Test %u: Got unexpected hr %#x, expected %#x.\n", i, hr, test_data[i].hr); + ok(hr == test_data[i].hr, "Test %u: Got unexpected hr %#lx, expected %#lx.\n", i, hr, test_data[i].hr);
hr = IDirectDrawSurface7_Blt(surface, &test_data[i].dst_rect, rt, &test_data[i].src_rect, DDBLT_WAIT, NULL); - ok(hr == test_data[i].hr, "Test %u: Got unexpected hr %#x, expected %#x.\n", i, hr, test_data[i].hr); + ok(hr == test_data[i].hr, "Test %u: Got unexpected hr %#lx, expected %#lx.\n", i, hr, test_data[i].hr);
hr = IDirectDrawSurface7_Blt(surface, &test_data[i].dst_rect, NULL, &test_data[i].src_rect, DDBLT_WAIT, NULL); - ok(hr == DDERR_INVALIDPARAMS, "Test %u: Got unexpected hr %#x.\n", i, hr); + ok(hr == DDERR_INVALIDPARAMS, "Test %u: Got unexpected hr %#lx.\n", i, hr);
hr = IDirectDrawSurface7_Blt(surface, &test_data[i].dst_rect, NULL, NULL, DDBLT_WAIT, NULL); - ok(hr == DDERR_INVALIDPARAMS, "Test %u: Got unexpected hr %#x.\n", i, hr); + ok(hr == DDERR_INVALIDPARAMS, "Test %u: Got unexpected hr %#lx.\n", i, hr); }
IDirectDrawSurface7_Release(surface); IDirectDrawSurface7_Release(rt); IDirectDraw7_Release(ddraw); refcount = IDirect3DDevice7_Release(device); - ok(!refcount, "Device has %u references left.\n", refcount); + ok(!refcount, "Device has %lu references left.\n", refcount); DestroyWindow(window); }
@@ -13212,7 +13212,7 @@ static void test_blt_z_alpha(void) ddraw = create_ddraw(); ok(!!ddraw, "Failed to create a ddraw object.\n"); hr = IDirectDraw7_SetCooperativeLevel(ddraw, window, DDSCL_NORMAL); - ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#lx.\n", hr);
memset(&pf, 0, sizeof(pf)); pf.dwSize = sizeof(pf); @@ -13232,9 +13232,9 @@ static void test_blt_z_alpha(void) surface_desc.ddsCaps.dwCaps = DDSCAPS_OFFSCREENPLAIN;
hr = IDirectDraw7_CreateSurface(ddraw, &surface_desc, &src_surface, NULL); - ok(SUCCEEDED(hr), "Failed to create source surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create source surface, hr %#lx.\n", hr); hr = IDirectDraw7_CreateSurface(ddraw, &surface_desc, &dst_surface, NULL); - ok(SUCCEEDED(hr), "Failed to create destination surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create destination surface, hr %#lx.\n", hr);
memset(&fx, 0, sizeof(fx)); fx.dwSize = sizeof(fx); @@ -13254,23 +13254,23 @@ static void test_blt_z_alpha(void) { U5(fx).dwFillColor = 0x3300ff00; hr = IDirectDrawSurface7_Blt(src_surface, NULL, NULL, NULL, DDBLT_COLORFILL | DDBLT_WAIT, &fx); - ok(SUCCEEDED(hr), "Test %u: Got unexpected hr %#x.\n", i, hr); + ok(SUCCEEDED(hr), "Test %u: Got unexpected hr %#lx.\n", i, hr);
U5(fx).dwFillColor = 0xccff0000; hr = IDirectDrawSurface7_Blt(dst_surface, NULL, NULL, NULL, DDBLT_COLORFILL | DDBLT_WAIT, &fx); - ok(SUCCEEDED(hr), "Test %u: Got unexpected hr %#x.\n", i, hr); + ok(SUCCEEDED(hr), "Test %u: Got unexpected hr %#lx.\n", i, hr);
hr = IDirectDrawSurface7_Blt(dst_surface, NULL, src_surface, NULL, blt_flags[i] | DDBLT_WAIT, &fx); - ok(SUCCEEDED(hr), "Test %u: Got unexpected hr %#x.\n", i, hr); + ok(SUCCEEDED(hr), "Test %u: Got unexpected hr %#lx.\n", i, hr);
color = get_surface_color(dst_surface, 32, 32); - ok(compare_color(color, 0x0000ff00, 0), "Test %u: Got unexpected color 0x%08x.\n", i, color); + ok(compare_color(color, 0x0000ff00, 0), "Test %u: Got unexpected color 0x%08lx.\n", i, color); }
IDirectDrawSurface7_Release(dst_surface); IDirectDrawSurface7_Release(src_surface); refcount = IDirectDraw7_Release(ddraw); - ok(!refcount, "DirectDraw has %u references left.\n", refcount); + ok(!refcount, "DirectDraw has %lu references left.\n", refcount); DestroyWindow(window); }
@@ -13306,15 +13306,15 @@ static void test_cross_device_blt(void) }
hr = IDirect3DDevice7_GetDirect3D(device, &d3d); - ok(SUCCEEDED(hr), "Failed to get Direct3D7 interface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get Direct3D7 interface, hr %#lx.\n", hr); hr = IDirect3D7_QueryInterface(d3d, &IID_IDirectDraw7, (void **)&ddraw); - ok(SUCCEEDED(hr), "Failed to get DirectDraw7 interface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get DirectDraw7 interface, hr %#lx.\n", hr); IDirect3D7_Release(d3d);
hr = IDirect3DDevice7_GetDirect3D(device2, &d3d); - ok(SUCCEEDED(hr), "Failed to get Direct3D7 interface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get Direct3D7 interface, hr %#lx.\n", hr); hr = IDirect3D7_QueryInterface(d3d, &IID_IDirectDraw7, (void **)&ddraw2); - ok(SUCCEEDED(hr), "Failed to get DirectDraw7 interface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get DirectDraw7 interface, hr %#lx.\n", hr); IDirect3D7_Release(d3d);
memset(&surface_desc, 0, sizeof(surface_desc)); @@ -13324,7 +13324,7 @@ static void test_cross_device_blt(void) surface_desc.dwHeight = 480; surface_desc.ddsCaps.dwCaps = DDSCAPS_OFFSCREENPLAIN | DDSCAPS_SYSTEMMEMORY; hr = IDirectDraw7_CreateSurface(ddraw, &surface_desc, &sysmem_surface, NULL); - ok(SUCCEEDED(hr), "Failed to create surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create surface, hr %#lx.\n", hr);
memset(&surface_desc, 0, sizeof(surface_desc)); surface_desc.dwSize = sizeof(surface_desc); @@ -13332,7 +13332,7 @@ static void test_cross_device_blt(void) surface_desc.ddsCaps.dwCaps = DDSCAPS_PRIMARYSURFACE | DDSCAPS_COMPLEX | DDSCAPS_FLIP | DDSCAPS_VIDEOMEMORY; U5(surface_desc).dwBackBufferCount = 2; hr = IDirectDraw7_CreateSurface(ddraw, &surface_desc, &surface, NULL); - ok(SUCCEEDED(hr), "Failed to create surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create surface, hr %#lx.\n", hr);
memset(&surface_desc, 0, sizeof(surface_desc)); surface_desc.dwSize = sizeof(surface_desc); @@ -13347,37 +13347,37 @@ static void test_cross_device_blt(void) U3(U4(surface_desc).ddpfPixelFormat).dwGBitMask = 0x000003e0; U4(U4(surface_desc).ddpfPixelFormat).dwBBitMask = 0x0000001f; hr = IDirectDraw7_CreateSurface(ddraw2, &surface_desc, &surface2, NULL); - ok(SUCCEEDED(hr), "Failed to create surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create surface, hr %#lx.\n", hr);
memset(&fx, 0, sizeof(fx)); fx.dwSize = sizeof(fx); U5(fx).dwFillColor = 0xff0000ff; hr = IDirectDrawSurface7_Blt(surface2, NULL, NULL, NULL, DDBLT_COLORFILL | DDBLT_WAIT, &fx); - ok(SUCCEEDED(hr), "Failed to fill surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to fill surface, hr %#lx.\n", hr);
hr = IDirectDrawSurface7_Blt(surface, NULL, surface2, NULL, DDBLT_WAIT, NULL); - ok(hr == E_NOTIMPL, "Got unexpected hr %#x.\n", hr); + ok(hr == E_NOTIMPL, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface7_Flip(surface, NULL, DDFLIP_WAIT); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface7_Blt(surface, NULL, surface2, NULL, DDBLT_WAIT, NULL); - ok(hr == E_NOTIMPL, "Got unexpected hr %#x.\n", hr); + ok(hr == E_NOTIMPL, "Got unexpected hr %#lx.\n", hr); color = get_surface_color(surface, 320, 240); - ok(color == 0x00000000, "Got unexpected color 0x%08x.\n", color); + ok(color == 0x00000000, "Got unexpected color 0x%08lx.\n", color);
hr = IDirectDrawSurface7_Blt(sysmem_surface, NULL, surface2, NULL, DDBLT_WAIT, NULL); - ok(hr == E_NOTIMPL, "Got unexpected hr %#x.\n", hr); + ok(hr == E_NOTIMPL, "Got unexpected hr %#lx.\n", hr); color = get_surface_color(sysmem_surface, 320, 240); - ok(color == 0x00000000, "Got unexpected color 0x%08x.\n", color); + ok(color == 0x00000000, "Got unexpected color 0x%08lx.\n", color);
hr = IDirectDraw7_SetCooperativeLevel(ddraw, window, DDSCL_NORMAL); - ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#lx.\n", hr); hr = IDirectDrawSurface7_IsLost(sysmem_surface); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
hr = IDirectDrawSurface7_Blt(sysmem_surface, NULL, surface2, NULL, DDBLT_WAIT, NULL); - ok(hr == E_NOTIMPL, "Got unexpected hr %#x.\n", hr); + ok(hr == E_NOTIMPL, "Got unexpected hr %#lx.\n", hr); color = get_surface_color(sysmem_surface, 320, 240); - ok(color == 0x00000000, "Got unexpected color 0x%08x.\n", color); + ok(color == 0x00000000, "Got unexpected color 0x%08lx.\n", color);
IDirectDrawSurface7_Release(surface2); memset(&surface_desc, 0, sizeof(surface_desc)); @@ -13387,14 +13387,14 @@ static void test_cross_device_blt(void) surface_desc.dwHeight = 480; surface_desc.ddsCaps.dwCaps = DDSCAPS_OFFSCREENPLAIN | DDSCAPS_SYSTEMMEMORY; hr = IDirectDraw7_CreateSurface(ddraw2, &surface_desc, &surface2, NULL); - ok(SUCCEEDED(hr), "Failed to create surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create surface, hr %#lx.\n", hr); hr = IDirectDrawSurface7_Blt(surface2, NULL, NULL, NULL, DDBLT_COLORFILL | DDBLT_WAIT, &fx); - ok(SUCCEEDED(hr), "Failed to fill surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to fill surface, hr %#lx.\n", hr);
hr = IDirectDrawSurface7_Blt(sysmem_surface, NULL, surface2, NULL, DDBLT_WAIT, NULL); - todo_wine ok(hr == D3D_OK, "Failed to blit, hr %#x.\n", hr); + todo_wine ok(hr == D3D_OK, "Failed to blit, hr %#lx.\n", hr); color = get_surface_color(sysmem_surface, 320, 240); - todo_wine ok(compare_color(color, 0x000000ff, 1), "Got unexpected color 0x%08x.\n", color); + todo_wine ok(compare_color(color, 0x000000ff, 1), "Got unexpected color 0x%08lx.\n", color);
IDirectDrawSurface7_Release(surface); IDirectDrawSurface7_Release(surface2); @@ -13402,9 +13402,9 @@ static void test_cross_device_blt(void) IDirectDraw7_Release(ddraw); IDirectDraw7_Release(ddraw2); refcount = IDirect3DDevice7_Release(device); - ok(!refcount, "Device has %u references left.\n", refcount); + ok(!refcount, "Device has %lu references left.\n", refcount); refcount = IDirect3DDevice7_Release(device2); - ok(!refcount, "Device has %u references left.\n", refcount); + ok(!refcount, "Device has %lu references left.\n", refcount); DestroyWindow(window); DestroyWindow(window2); } @@ -13441,60 +13441,60 @@ static void test_color_clamping(void) }
hr = IDirect3DDevice7_GetRenderTarget(device, &rt); - ok(SUCCEEDED(hr), "Failed to get render target, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get render target, hr %#lx.\n", hr);
hr = IDirect3DDevice7_SetTransform(device, D3DTRANSFORMSTATE_WORLD, &mat); - ok(SUCCEEDED(hr), "Failed to set world transform, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set world transform, hr %#lx.\n", hr); hr = IDirect3DDevice7_SetTransform(device, D3DTRANSFORMSTATE_VIEW, &mat); - ok(SUCCEEDED(hr), "Failed to set view transform, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set view transform, hr %#lx.\n", hr); hr = IDirect3DDevice7_SetTransform(device, D3DTRANSFORMSTATE_PROJECTION, &mat); - ok(SUCCEEDED(hr), "Failed to set projection transform, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set projection transform, hr %#lx.\n", hr); hr = IDirect3DDevice7_SetRenderState(device, D3DRENDERSTATE_CLIPPING, FALSE); - ok(SUCCEEDED(hr), "Failed to disable clipping, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to disable clipping, hr %#lx.\n", hr); hr = IDirect3DDevice7_SetRenderState(device, D3DRENDERSTATE_ZENABLE, FALSE); - ok(SUCCEEDED(hr), "Failed to disable Z test, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to disable Z test, hr %#lx.\n", hr); hr = IDirect3DDevice7_SetRenderState(device, D3DRENDERSTATE_FOGENABLE, FALSE); - ok(SUCCEEDED(hr), "Failed to disable fog, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to disable fog, hr %#lx.\n", hr); hr = IDirect3DDevice7_SetRenderState(device, D3DRENDERSTATE_STENCILENABLE, FALSE); - ok(SUCCEEDED(hr), "Failed to disable stencil test, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to disable stencil test, hr %#lx.\n", hr); hr = IDirect3DDevice7_SetRenderState(device, D3DRENDERSTATE_CULLMODE, D3DCULL_NONE); - ok(SUCCEEDED(hr), "Failed to disable culling, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to disable culling, hr %#lx.\n", hr); hr = IDirect3DDevice7_SetRenderState(device, D3DRENDERSTATE_LIGHTING, FALSE); - ok(SUCCEEDED(hr), "Failed to disable lighting, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to disable lighting, hr %#lx.\n", hr);
hr = IDirect3DDevice7_SetRenderState(device, D3DRENDERSTATE_TEXTUREFACTOR, 0xff404040); - ok(SUCCEEDED(hr), "Failed to set texture factor, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set texture factor, hr %#lx.\n", hr); hr = IDirect3DDevice7_SetTextureStageState(device, 0, D3DTSS_COLOROP, D3DTOP_ADD); - ok(SUCCEEDED(hr), "Failed to set color op, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set color op, hr %#lx.\n", hr); hr = IDirect3DDevice7_SetTextureStageState(device, 0, D3DTSS_COLORARG1, D3DTA_DIFFUSE); - ok(SUCCEEDED(hr), "Failed to set color arg, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set color arg, hr %#lx.\n", hr); hr = IDirect3DDevice7_SetTextureStageState(device, 0, D3DTSS_COLORARG2, D3DTA_SPECULAR); - ok(SUCCEEDED(hr), "Failed to set color arg, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set color arg, hr %#lx.\n", hr); hr = IDirect3DDevice7_SetTextureStageState(device, 1, D3DTSS_COLOROP, D3DTOP_MODULATE); - ok(SUCCEEDED(hr), "Failed to set color op, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set color op, hr %#lx.\n", hr); hr = IDirect3DDevice7_SetTextureStageState(device, 1, D3DTSS_COLORARG1, D3DTA_TFACTOR); - ok(SUCCEEDED(hr), "Failed to set color arg, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set color arg, hr %#lx.\n", hr); hr = IDirect3DDevice7_SetTextureStageState(device, 1, D3DTSS_COLORARG2, D3DTA_CURRENT); - ok(SUCCEEDED(hr), "Failed to set color arg, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set color arg, hr %#lx.\n", hr);
hr = IDirect3DDevice7_Clear(device, 0, NULL, D3DCLEAR_TARGET, 0xff00ff00, 0.0f, 0); - ok(SUCCEEDED(hr), "Failed to clear, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to clear, hr %#lx.\n", hr);
hr = IDirect3DDevice7_BeginScene(device); - ok(SUCCEEDED(hr), "Failed to begin scene, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to begin scene, hr %#lx.\n", hr);
hr = IDirect3DDevice7_DrawPrimitive(device, D3DPT_TRIANGLESTRIP, D3DFVF_XYZ, quad, 4, 0); - ok(SUCCEEDED(hr), "Failed to draw, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to draw, hr %#lx.\n", hr);
hr = IDirect3DDevice7_EndScene(device); - ok(SUCCEEDED(hr), "Failed to end scene, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to end scene, hr %#lx.\n", hr);
color = get_surface_color(rt, 320, 240); - ok(compare_color(color, 0x00404040, 1), "Got unexpected color 0x%08x.\n", color); + ok(compare_color(color, 0x00404040, 1), "Got unexpected color 0x%08lx.\n", color);
IDirectDrawSurface7_Release(rt); refcount = IDirect3DDevice7_Release(device); - ok(!refcount, "Device has %u references left.\n", refcount); + ok(!refcount, "Device has %lu references left.\n", refcount); DestroyWindow(window); }
@@ -13566,11 +13566,11 @@ static void test_getdc(void) ddraw = create_ddraw(); ok(!!ddraw, "Failed to create a ddraw object.\n"); hr = IDirectDraw7_SetCooperativeLevel(ddraw, window, DDSCL_NORMAL); - ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#lx.\n", hr);
surface_desc.dwSize = sizeof(surface_desc); hr = IDirectDraw7_GetDisplayMode(ddraw, &surface_desc); - ok(SUCCEEDED(hr), "Failed to get display mode, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get display mode, hr %#lx.\n", hr); screen_bpp = U1(U4(surface_desc).ddpfPixelFormat).dwRGBBitCount;
for (i = 0; i < ARRAY_SIZE(test_data); ++i) @@ -13589,7 +13589,7 @@ static void test_getdc(void) surface_desc.ddsCaps.dwCaps2 = DDSCAPS2_TEXTUREMANAGE; if (FAILED(hr = IDirectDraw7_CreateSurface(ddraw, &surface_desc, &surface, NULL))) { - skip("Failed to create surface for format %s (hr %#x), skipping tests.\n", test_data[i].name, hr); + skip("Failed to create surface for format %s (hr %#lx), skipping tests.\n", test_data[i].name, hr); continue; } } @@ -13598,9 +13598,9 @@ static void test_getdc(void) hr = IDirectDrawSurface7_GetDC(surface, &dc); if (test_data[i].getdc_supported) ok(SUCCEEDED(hr) || broken(hr == test_data[i].alt_result), - "Got unexpected hr %#x for format %s.\n", hr, test_data[i].name); + "Got unexpected hr %#lx for format %s.\n", hr, test_data[i].name); else - ok(FAILED(hr), "Got unexpected hr %#x for format %s.\n", hr, test_data[i].name); + ok(FAILED(hr), "Got unexpected hr %#lx for format %s.\n", hr, test_data[i].name);
if (SUCCEEDED(hr)) { @@ -13611,10 +13611,10 @@ static void test_getdc(void) int size;
type = GetObjectType(dc); - ok(type == OBJ_MEMDC, "Got unexpected object type %#x for format %s.\n", type, test_data[i].name); + ok(type == OBJ_MEMDC, "Got unexpected object type %#lx for format %s.\n", type, test_data[i].name); bitmap = GetCurrentObject(dc, OBJ_BITMAP); type = GetObjectType(bitmap); - ok(type == OBJ_BITMAP, "Got unexpected object type %#x for format %s.\n", type, test_data[i].name); + ok(type == OBJ_BITMAP, "Got unexpected object type %#lx for format %s.\n", type, test_data[i].name);
size = GetObjectA(bitmap, sizeof(dib), &dib); ok(size == sizeof(dib), "Got unexpected size %d for format %s.\n", size, test_data[i].name); @@ -13638,11 +13638,11 @@ static void test_getdc(void) ok(!!dib.dsBm.bmBits || broken(!pDwmIsCompositionEnabled && dib.dsBm.bmBitsPixel == screen_bpp), "Got unexpected bits %p for format %s.\n", dib.dsBm.bmBits, test_data[i].name);
- ok(dib.dsBmih.biSize == sizeof(dib.dsBmih), "Got unexpected size %u for format %s.\n", + ok(dib.dsBmih.biSize == sizeof(dib.dsBmih), "Got unexpected size %lu for format %s.\n", dib.dsBmih.biSize, test_data[i].name); - ok(dib.dsBmih.biWidth == surface_desc.dwWidth, "Got unexpected width %d for format %s.\n", + ok(dib.dsBmih.biWidth == surface_desc.dwWidth, "Got unexpected width %ld for format %s.\n", dib.dsBmih.biHeight, test_data[i].name); - ok(dib.dsBmih.biHeight == surface_desc.dwHeight, "Got unexpected height %d for format %s.\n", + ok(dib.dsBmih.biHeight == surface_desc.dwHeight, "Got unexpected height %ld for format %s.\n", dib.dsBmih.biHeight, test_data[i].name); ok(dib.dsBmih.biPlanes == 1, "Got unexpected plane count %u for format %s.\n", dib.dsBmih.biPlanes, test_data[i].name); @@ -13651,17 +13651,17 @@ static void test_getdc(void) dib.dsBmih.biBitCount, test_data[i].name); ok(dib.dsBmih.biCompression == (U1(test_data[i].format).dwRGBBitCount == 16 ? BI_BITFIELDS : BI_RGB) || broken(U1(test_data[i].format).dwRGBBitCount == 32 && dib.dsBmih.biCompression == BI_BITFIELDS), - "Got unexpected compression %#x for format %s.\n", + "Got unexpected compression %#lx for format %s.\n", dib.dsBmih.biCompression, test_data[i].name); - ok(!dib.dsBmih.biSizeImage, "Got unexpected image size %u for format %s.\n", + ok(!dib.dsBmih.biSizeImage, "Got unexpected image size %lu for format %s.\n", dib.dsBmih.biSizeImage, test_data[i].name); - ok(!dib.dsBmih.biXPelsPerMeter, "Got unexpected horizontal resolution %d for format %s.\n", + ok(!dib.dsBmih.biXPelsPerMeter, "Got unexpected horizontal resolution %ld for format %s.\n", dib.dsBmih.biXPelsPerMeter, test_data[i].name); - ok(!dib.dsBmih.biYPelsPerMeter, "Got unexpected vertical resolution %d for format %s.\n", + ok(!dib.dsBmih.biYPelsPerMeter, "Got unexpected vertical resolution %ld for format %s.\n", dib.dsBmih.biYPelsPerMeter, test_data[i].name); - ok(!dib.dsBmih.biClrUsed, "Got unexpected used colour count %u for format %s.\n", + ok(!dib.dsBmih.biClrUsed, "Got unexpected used colour count %lu for format %s.\n", dib.dsBmih.biClrUsed, test_data[i].name); - ok(!dib.dsBmih.biClrImportant, "Got unexpected important colour count %u for format %s.\n", + ok(!dib.dsBmih.biClrImportant, "Got unexpected important colour count %lu for format %s.\n", dib.dsBmih.biClrImportant, test_data[i].name);
if (dib.dsBmih.biCompression == BI_BITFIELDS) @@ -13670,20 +13670,20 @@ static void test_getdc(void) && dib.dsBitfields[1] == U3(test_data[i].format).dwGBitMask && dib.dsBitfields[2] == U4(test_data[i].format).dwBBitMask) || broken(!dib.dsBitfields[0] && !dib.dsBitfields[1] && !dib.dsBitfields[2]), - "Got unexpected colour masks 0x%08x 0x%08x 0x%08x for format %s.\n", + "Got unexpected colour masks 0x%08lx 0x%08lx 0x%08lx for format %s.\n", dib.dsBitfields[0], dib.dsBitfields[1], dib.dsBitfields[2], test_data[i].name); } else { ok(!dib.dsBitfields[0] && !dib.dsBitfields[1] && !dib.dsBitfields[2], - "Got unexpected colour masks 0x%08x 0x%08x 0x%08x for format %s.\n", + "Got unexpected colour masks 0x%08lx 0x%08lx 0x%08lx for format %s.\n", dib.dsBitfields[0], dib.dsBitfields[1], dib.dsBitfields[2], test_data[i].name); } ok(!dib.dshSection, "Got unexpected section %p for format %s.\n", dib.dshSection, test_data[i].name); - ok(!dib.dsOffset, "Got unexpected offset %u for format %s.\n", dib.dsOffset, test_data[i].name); + ok(!dib.dsOffset, "Got unexpected offset %lu for format %s.\n", dib.dsOffset, test_data[i].name);
hr = IDirectDrawSurface7_ReleaseDC(surface, dc); - ok(hr == DD_OK, "Failed to release DC for format %s, hr %#x.\n", test_data[i].name, hr); + ok(hr == DD_OK, "Failed to release DC for format %s, hr %#lx.\n", test_data[i].name, hr); } else { @@ -13699,149 +13699,149 @@ static void test_getdc(void) surface_desc.ddsCaps.dwCaps2 = DDSCAPS2_CUBEMAP | DDSCAPS2_CUBEMAP_ALLFACES | DDSCAPS2_TEXTUREMANAGE; if (FAILED(hr = IDirectDraw7_CreateSurface(ddraw, &surface_desc, &surface, NULL))) { - skip("Failed to create cube texture for format %s (hr %#x), skipping tests.\n", test_data[i].name, hr); + skip("Failed to create cube texture for format %s (hr %#lx), skipping tests.\n", test_data[i].name, hr); continue; }
hr = IDirectDrawSurface7_GetAttachedSurface(surface, &caps, &surface2); - ok(SUCCEEDED(hr), "Failed to get attached surface for format %s, hr %#x.\n", test_data[i].name, hr); + ok(SUCCEEDED(hr), "Failed to get attached surface for format %s, hr %#lx.\n", test_data[i].name, hr); hr = IDirectDrawSurface7_GetAttachedSurface(surface2, &caps, &tmp); - ok(SUCCEEDED(hr), "Failed to get attached surface for format %s, hr %#x.\n", test_data[i].name, hr); + ok(SUCCEEDED(hr), "Failed to get attached surface for format %s, hr %#lx.\n", test_data[i].name, hr); IDirectDrawSurface7_Release(surface2); hr = IDirectDrawSurface7_GetAttachedSurface(tmp, &caps, &surface2); - ok(SUCCEEDED(hr), "Failed to get attached surface for format %s, hr %#x.\n", test_data[i].name, hr); + ok(SUCCEEDED(hr), "Failed to get attached surface for format %s, hr %#lx.\n", test_data[i].name, hr); IDirectDrawSurface7_Release(tmp);
hr = IDirectDrawSurface7_GetDC(surface, &dc); - ok(SUCCEEDED(hr), "Failed to get DC for format %s, hr %#x.\n", test_data[i].name, hr); + ok(SUCCEEDED(hr), "Failed to get DC for format %s, hr %#lx.\n", test_data[i].name, hr); hr = IDirectDrawSurface7_ReleaseDC(surface, dc); - ok(SUCCEEDED(hr), "Failed to release DC for format %s, hr %#x.\n", test_data[i].name, hr); + ok(SUCCEEDED(hr), "Failed to release DC for format %s, hr %#lx.\n", test_data[i].name, hr); hr = IDirectDrawSurface7_GetDC(surface2, &dc); - ok(SUCCEEDED(hr), "Failed to get DC for format %s, hr %#x.\n", test_data[i].name, hr); + ok(SUCCEEDED(hr), "Failed to get DC for format %s, hr %#lx.\n", test_data[i].name, hr); hr = IDirectDrawSurface7_ReleaseDC(surface2, dc); - ok(SUCCEEDED(hr), "Failed to release DC for format %s, hr %#x.\n", test_data[i].name, hr); + ok(SUCCEEDED(hr), "Failed to release DC for format %s, hr %#lx.\n", test_data[i].name, hr);
hr = IDirectDrawSurface7_GetDC(surface, &dc); - ok(SUCCEEDED(hr), "Failed to get DC for format %s, hr %#x.\n", test_data[i].name, hr); + ok(SUCCEEDED(hr), "Failed to get DC for format %s, hr %#lx.\n", test_data[i].name, hr); dc2 = (void *)0x1234; hr = IDirectDrawSurface7_GetDC(surface, &dc2); - ok(hr == DDERR_DCALREADYCREATED, "Got unexpected hr %#x for format %s.\n", hr, test_data[i].name); + ok(hr == DDERR_DCALREADYCREATED, "Got unexpected hr %#lx for format %s.\n", hr, test_data[i].name); ok(dc2 == (void *)0x1234, "Got unexpected dc %p for format %s.\n", dc, test_data[i].name); hr = IDirectDrawSurface7_ReleaseDC(surface, dc); - ok(SUCCEEDED(hr), "Failed to release DC for format %s, hr %#x.\n", test_data[i].name, hr); + ok(SUCCEEDED(hr), "Failed to release DC for format %s, hr %#lx.\n", test_data[i].name, hr); hr = IDirectDrawSurface7_ReleaseDC(surface, dc); - ok(hr == DDERR_NODC, "Got unexpected hr %#x for format %s.\n", hr, test_data[i].name); + ok(hr == DDERR_NODC, "Got unexpected hr %#lx for format %s.\n", hr, test_data[i].name);
map_desc.dwSize = sizeof(map_desc); hr = IDirectDrawSurface7_Lock(surface, NULL, &map_desc, DDLOCK_READONLY | DDLOCK_WAIT, NULL); - ok(SUCCEEDED(hr), "Failed to map surface for format %s, hr %#x.\n", test_data[i].name, hr); + ok(SUCCEEDED(hr), "Failed to map surface for format %s, hr %#lx.\n", test_data[i].name, hr); hr = IDirectDrawSurface7_Lock(surface, NULL, &map_desc, DDLOCK_READONLY | DDLOCK_WAIT, NULL); - ok(hr == DDERR_SURFACEBUSY, "Got unexpected hr %#x for format %s.\n", hr, test_data[i].name); + ok(hr == DDERR_SURFACEBUSY, "Got unexpected hr %#lx for format %s.\n", hr, test_data[i].name); hr = IDirectDrawSurface7_Unlock(surface, NULL); - ok(SUCCEEDED(hr), "Failed to unmap surface for format %s, hr %#x.\n", test_data[i].name, hr); + ok(SUCCEEDED(hr), "Failed to unmap surface for format %s, hr %#lx.\n", test_data[i].name, hr); hr = IDirectDrawSurface7_Unlock(surface, NULL); - ok(hr == DDERR_NOTLOCKED, "Got unexpected hr %#x for format %s.\n", hr, test_data[i].name); + ok(hr == DDERR_NOTLOCKED, "Got unexpected hr %#lx for format %s.\n", hr, test_data[i].name);
hr = IDirectDrawSurface7_GetDC(surface, &dc); - ok(SUCCEEDED(hr), "Failed to get DC for format %s, hr %#x.\n", test_data[i].name, hr); + ok(SUCCEEDED(hr), "Failed to get DC for format %s, hr %#lx.\n", test_data[i].name, hr); hr = IDirectDrawSurface7_Lock(surface, NULL, &map_desc, DDLOCK_READONLY | DDLOCK_WAIT, NULL); - ok(hr == DDERR_SURFACEBUSY, "Got unexpected hr %#x for format %s.\n", hr, test_data[i].name); + ok(hr == DDERR_SURFACEBUSY, "Got unexpected hr %#lx for format %s.\n", hr, test_data[i].name); hr = IDirectDrawSurface7_ReleaseDC(surface, dc); - ok(SUCCEEDED(hr), "Failed to release DC for format %s, hr %#x.\n", test_data[i].name, hr); + ok(SUCCEEDED(hr), "Failed to release DC for format %s, hr %#lx.\n", test_data[i].name, hr);
hr = IDirectDrawSurface7_Lock(surface, NULL, &map_desc, DDLOCK_READONLY | DDLOCK_WAIT, NULL); - ok(SUCCEEDED(hr), "Failed to map surface for format %s, hr %#x.\n", test_data[i].name, hr); + ok(SUCCEEDED(hr), "Failed to map surface for format %s, hr %#lx.\n", test_data[i].name, hr); hr = IDirectDrawSurface7_GetDC(surface, &dc); - ok(SUCCEEDED(hr), "Failed to get DC for format %s, hr %#x.\n", test_data[i].name, hr); + ok(SUCCEEDED(hr), "Failed to get DC for format %s, hr %#lx.\n", test_data[i].name, hr); hr = IDirectDrawSurface7_ReleaseDC(surface, dc); - ok(SUCCEEDED(hr), "Failed to release DC for format %s, hr %#x.\n", test_data[i].name, hr); + ok(SUCCEEDED(hr), "Failed to release DC for format %s, hr %#lx.\n", test_data[i].name, hr); hr = IDirectDrawSurface7_Unlock(surface, NULL); - ok(SUCCEEDED(hr), "Failed to unmap surface for format %s, hr %#x.\n", test_data[i].name, hr); + ok(SUCCEEDED(hr), "Failed to unmap surface for format %s, hr %#lx.\n", test_data[i].name, hr);
hr = IDirectDrawSurface7_GetDC(surface, &dc); - ok(SUCCEEDED(hr), "Failed to get DC for format %s, hr %#x.\n", test_data[i].name, hr); + ok(SUCCEEDED(hr), "Failed to get DC for format %s, hr %#lx.\n", test_data[i].name, hr); hr = IDirectDrawSurface7_GetDC(surface2, &dc2); - ok(SUCCEEDED(hr), "Failed to get DC for format %s, hr %#x.\n", test_data[i].name, hr); + ok(SUCCEEDED(hr), "Failed to get DC for format %s, hr %#lx.\n", test_data[i].name, hr); hr = IDirectDrawSurface7_ReleaseDC(surface2, dc2); - ok(SUCCEEDED(hr), "Failed to release DC for format %s, hr %#x.\n", test_data[i].name, hr); + ok(SUCCEEDED(hr), "Failed to release DC for format %s, hr %#lx.\n", test_data[i].name, hr); hr = IDirectDrawSurface7_ReleaseDC(surface, dc); - ok(SUCCEEDED(hr), "Failed to release DC for format %s, hr %#x.\n", test_data[i].name, hr); + ok(SUCCEEDED(hr), "Failed to release DC for format %s, hr %#lx.\n", test_data[i].name, hr);
hr = IDirectDrawSurface7_GetDC(surface2, &dc); - ok(SUCCEEDED(hr), "Failed to get DC for format %s, hr %#x.\n", test_data[i].name, hr); + ok(SUCCEEDED(hr), "Failed to get DC for format %s, hr %#lx.\n", test_data[i].name, hr); hr = IDirectDrawSurface7_GetDC(surface, &dc2); - ok(SUCCEEDED(hr), "Failed to get DC for format %s, hr %#x.\n", test_data[i].name, hr); + ok(SUCCEEDED(hr), "Failed to get DC for format %s, hr %#lx.\n", test_data[i].name, hr); hr = IDirectDrawSurface7_ReleaseDC(surface, dc2); - ok(SUCCEEDED(hr), "Failed to release DC for format %s, hr %#x.\n", test_data[i].name, hr); + ok(SUCCEEDED(hr), "Failed to release DC for format %s, hr %#lx.\n", test_data[i].name, hr); hr = IDirectDrawSurface7_ReleaseDC(surface2, dc); - ok(SUCCEEDED(hr), "Failed to release DC for format %s, hr %#x.\n", test_data[i].name, hr); + ok(SUCCEEDED(hr), "Failed to release DC for format %s, hr %#lx.\n", test_data[i].name, hr);
hr = IDirectDrawSurface7_Lock(surface, NULL, &map_desc, DDLOCK_READONLY | DDLOCK_WAIT, NULL); - ok(SUCCEEDED(hr), "Failed to map surface for format %s, hr %#x.\n", test_data[i].name, hr); + ok(SUCCEEDED(hr), "Failed to map surface for format %s, hr %#lx.\n", test_data[i].name, hr); hr = IDirectDrawSurface7_Lock(surface2, NULL, &map_desc, DDLOCK_READONLY | DDLOCK_WAIT, NULL); - ok(SUCCEEDED(hr), "Failed to map surface for format %s, hr %#x.\n", test_data[i].name, hr); + ok(SUCCEEDED(hr), "Failed to map surface for format %s, hr %#lx.\n", test_data[i].name, hr); hr = IDirectDrawSurface7_Unlock(surface2, NULL); - ok(SUCCEEDED(hr), "Failed to unmap surface for format %s, hr %#x.\n", test_data[i].name, hr); + ok(SUCCEEDED(hr), "Failed to unmap surface for format %s, hr %#lx.\n", test_data[i].name, hr); hr = IDirectDrawSurface7_Unlock(surface, NULL); - ok(SUCCEEDED(hr), "Failed to unmap surface for format %s, hr %#x.\n", test_data[i].name, hr); + ok(SUCCEEDED(hr), "Failed to unmap surface for format %s, hr %#lx.\n", test_data[i].name, hr);
hr = IDirectDrawSurface7_Lock(surface, NULL, &map_desc, DDLOCK_READONLY | DDLOCK_WAIT, NULL); - ok(SUCCEEDED(hr), "Failed to map surface for format %s, hr %#x.\n", test_data[i].name, hr); + ok(SUCCEEDED(hr), "Failed to map surface for format %s, hr %#lx.\n", test_data[i].name, hr); hr = IDirectDrawSurface7_GetDC(surface, &dc); - ok(SUCCEEDED(hr), "Failed to get DC for format %s, hr %#x.\n", test_data[i].name, hr); + ok(SUCCEEDED(hr), "Failed to get DC for format %s, hr %#lx.\n", test_data[i].name, hr); hr = IDirectDrawSurface7_ReleaseDC(surface, dc); - ok(SUCCEEDED(hr), "Failed to release DC for format %s, hr %#x.\n", test_data[i].name, hr); + ok(SUCCEEDED(hr), "Failed to release DC for format %s, hr %#lx.\n", test_data[i].name, hr); hr = IDirectDrawSurface7_Unlock(surface, NULL); - ok(SUCCEEDED(hr), "Failed to unmap surface for format %s, hr %#x.\n", test_data[i].name, hr); + ok(SUCCEEDED(hr), "Failed to unmap surface for format %s, hr %#lx.\n", test_data[i].name, hr);
hr = IDirectDrawSurface7_Lock(surface2, NULL, &map_desc, DDLOCK_READONLY | DDLOCK_WAIT, NULL); - ok(SUCCEEDED(hr), "Failed to map surface for format %s, hr %#x.\n", test_data[i].name, hr); + ok(SUCCEEDED(hr), "Failed to map surface for format %s, hr %#lx.\n", test_data[i].name, hr); hr = IDirectDrawSurface7_GetDC(surface, &dc); - ok(SUCCEEDED(hr), "Failed to get DC for format %s, hr %#x.\n", test_data[i].name, hr); + ok(SUCCEEDED(hr), "Failed to get DC for format %s, hr %#lx.\n", test_data[i].name, hr); hr = IDirectDrawSurface7_ReleaseDC(surface, dc); - ok(SUCCEEDED(hr), "Failed to release DC for format %s, hr %#x.\n", test_data[i].name, hr); + ok(SUCCEEDED(hr), "Failed to release DC for format %s, hr %#lx.\n", test_data[i].name, hr); hr = IDirectDrawSurface7_Unlock(surface2, NULL); - ok(SUCCEEDED(hr), "Failed to unmap surface for format %s, hr %#x.\n", test_data[i].name, hr); + ok(SUCCEEDED(hr), "Failed to unmap surface for format %s, hr %#lx.\n", test_data[i].name, hr);
hr = IDirectDrawSurface7_GetDC(surface, &dc); - ok(SUCCEEDED(hr), "Failed to get DC for format %s, hr %#x.\n", test_data[i].name, hr); + ok(SUCCEEDED(hr), "Failed to get DC for format %s, hr %#lx.\n", test_data[i].name, hr); hr = IDirectDrawSurface7_Lock(surface2, NULL, &map_desc, DDLOCK_READONLY | DDLOCK_WAIT, NULL); - ok(SUCCEEDED(hr), "Failed to map surface for format %s, hr %#x.\n", test_data[i].name, hr); + ok(SUCCEEDED(hr), "Failed to map surface for format %s, hr %#lx.\n", test_data[i].name, hr); hr = IDirectDrawSurface7_Unlock(surface2, NULL); - ok(SUCCEEDED(hr), "Failed to unmap surface for format %s, hr %#x.\n", test_data[i].name, hr); + ok(SUCCEEDED(hr), "Failed to unmap surface for format %s, hr %#lx.\n", test_data[i].name, hr); hr = IDirectDrawSurface7_ReleaseDC(surface, dc); - ok(SUCCEEDED(hr), "Failed to release DC for format %s, hr %#x.\n", test_data[i].name, hr); + ok(SUCCEEDED(hr), "Failed to release DC for format %s, hr %#lx.\n", test_data[i].name, hr);
hr = IDirectDrawSurface7_GetDC(surface2, &dc); - ok(SUCCEEDED(hr), "Failed to get DC for format %s, hr %#x.\n", test_data[i].name, hr); + ok(SUCCEEDED(hr), "Failed to get DC for format %s, hr %#lx.\n", test_data[i].name, hr); hr = IDirectDrawSurface7_Lock(surface, NULL, &map_desc, DDLOCK_READONLY | DDLOCK_WAIT, NULL); - ok(SUCCEEDED(hr), "Failed to map surface for format %s, hr %#x.\n", test_data[i].name, hr); + ok(SUCCEEDED(hr), "Failed to map surface for format %s, hr %#lx.\n", test_data[i].name, hr); hr = IDirectDrawSurface7_Unlock(surface, NULL); - ok(SUCCEEDED(hr), "Failed to unmap surface for format %s, hr %#x.\n", test_data[i].name, hr); + ok(SUCCEEDED(hr), "Failed to unmap surface for format %s, hr %#lx.\n", test_data[i].name, hr); hr = IDirectDrawSurface7_ReleaseDC(surface2, dc); - ok(SUCCEEDED(hr), "Failed to release DC for format %s, hr %#x.\n", test_data[i].name, hr); + ok(SUCCEEDED(hr), "Failed to release DC for format %s, hr %#lx.\n", test_data[i].name, hr);
hr = IDirectDrawSurface7_Unlock(surface, NULL); - ok(hr == DDERR_NOTLOCKED, "Got unexpected hr %#x for format %s.\n", hr, test_data[i].name); + ok(hr == DDERR_NOTLOCKED, "Got unexpected hr %#lx for format %s.\n", hr, test_data[i].name); hr = IDirectDrawSurface7_GetDC(surface2, &dc); - ok(SUCCEEDED(hr), "Failed to get DC for format %s, hr %#x.\n", test_data[i].name, hr); + ok(SUCCEEDED(hr), "Failed to get DC for format %s, hr %#lx.\n", test_data[i].name, hr); hr = IDirectDrawSurface7_Unlock(surface, NULL); - ok(hr == DDERR_NOTLOCKED, "Got unexpected hr %#x for format %s.\n", hr, test_data[i].name); + ok(hr == DDERR_NOTLOCKED, "Got unexpected hr %#lx for format %s.\n", hr, test_data[i].name); hr = IDirectDrawSurface7_ReleaseDC(surface2, dc); - ok(SUCCEEDED(hr), "Failed to release DC for format %s, hr %#x.\n", test_data[i].name, hr); + ok(SUCCEEDED(hr), "Failed to release DC for format %s, hr %#lx.\n", test_data[i].name, hr); hr = IDirectDrawSurface7_Unlock(surface, NULL); - ok(hr == DDERR_NOTLOCKED, "Got unexpected hr %#x for format %s.\n", hr, test_data[i].name); + ok(hr == DDERR_NOTLOCKED, "Got unexpected hr %#lx for format %s.\n", hr, test_data[i].name);
hr = IDirectDrawSurface7_Unlock(surface2, NULL); - ok(hr == DDERR_NOTLOCKED, "Got unexpected hr %#x for format %s.\n", hr, test_data[i].name); + ok(hr == DDERR_NOTLOCKED, "Got unexpected hr %#lx for format %s.\n", hr, test_data[i].name); hr = IDirectDrawSurface7_GetDC(surface, &dc); - ok(SUCCEEDED(hr), "Failed to get DC for format %s, hr %#x.\n", test_data[i].name, hr); + ok(SUCCEEDED(hr), "Failed to get DC for format %s, hr %#lx.\n", test_data[i].name, hr); hr = IDirectDrawSurface7_Unlock(surface2, NULL); - ok(hr == DDERR_NOTLOCKED, "Got unexpected hr %#x for format %s.\n", hr, test_data[i].name); + ok(hr == DDERR_NOTLOCKED, "Got unexpected hr %#lx for format %s.\n", hr, test_data[i].name); hr = IDirectDrawSurface7_ReleaseDC(surface, dc); - ok(SUCCEEDED(hr), "Failed to release DC for format %s, hr %#x.\n", test_data[i].name, hr); + ok(SUCCEEDED(hr), "Failed to release DC for format %s, hr %#lx.\n", test_data[i].name, hr); hr = IDirectDrawSurface7_Unlock(surface2, NULL); - ok(hr == DDERR_NOTLOCKED, "Got unexpected hr %#x for format %s.\n", hr, test_data[i].name); + ok(hr == DDERR_NOTLOCKED, "Got unexpected hr %#lx for format %s.\n", hr, test_data[i].name);
IDirectDrawSurface7_Release(surface2); IDirectDrawSurface7_Release(surface); @@ -13881,84 +13881,84 @@ static void test_draw_primitive(void) }
hr = IDirect3DDevice7_GetDirect3D(device, &d3d); - ok(SUCCEEDED(hr), "Failed to get D3D interface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get D3D interface, hr %#lx.\n", hr); hr = IDirect3D7_QueryInterface(d3d, &IID_IDirectDraw7, (void **)&ddraw); - ok(SUCCEEDED(hr), "Failed to get DirectDraw7 interface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get DirectDraw7 interface, hr %#lx.\n", hr);
memset(&vb_desc, 0, sizeof(vb_desc)); vb_desc.dwSize = sizeof(vb_desc); vb_desc.dwFVF = D3DFVF_XYZ; vb_desc.dwNumVertices = 4; hr = IDirect3D7_CreateVertexBuffer(d3d, &vb_desc, &vb, 0); - ok(SUCCEEDED(hr), "Failed to create vertex buffer, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create vertex buffer, hr %#lx.\n", hr);
IDirect3D7_Release(d3d);
memset(&strided, 0, sizeof(strided));
hr = IDirect3DDevice7_DrawIndexedPrimitive(device, D3DPT_TRIANGLESTRIP, D3DFVF_XYZ, NULL, 0, NULL, 0, 0); - ok(SUCCEEDED(hr), "Failed to draw, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to draw, hr %#lx.\n", hr); hr = IDirect3DDevice7_DrawIndexedPrimitiveStrided(device, D3DPT_TRIANGLESTRIP, D3DFVF_XYZ, &strided, 0, NULL, 0, 0); - ok(SUCCEEDED(hr), "Failed to draw, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to draw, hr %#lx.\n", hr); hr = IDirect3DDevice7_DrawIndexedPrimitiveVB(device, D3DPT_TRIANGLESTRIP, vb, 0, 0, NULL, 0, 0); - todo_wine ok(hr == E_FAIL, "Got unexpected hr %#x.\n", hr); + todo_wine ok(hr == E_FAIL, "Got unexpected hr %#lx.\n", hr); hr = IDirect3DDevice7_DrawIndexedPrimitiveVB(device, D3DPT_TRIANGLESTRIP, vb, 0, 0, NULL, 0, 0); - ok(SUCCEEDED(hr), "Failed to draw, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to draw, hr %#lx.\n", hr); hr = IDirect3DDevice7_DrawPrimitive(device, D3DPT_TRIANGLESTRIP, D3DFVF_XYZ, NULL, 0, 0); /* r200 rejects 0 vertices */ - ok(SUCCEEDED(hr) || broken(ddraw_is_amd(ddraw) && hr == E_FAIL), "Failed to draw, hr %#x.\n", hr); + ok(SUCCEEDED(hr) || broken(ddraw_is_amd(ddraw) && hr == E_FAIL), "Failed to draw, hr %#lx.\n", hr); hr = IDirect3DDevice7_DrawPrimitiveStrided(device, D3DPT_TRIANGLESTRIP, D3DFVF_XYZ, &strided, 0, 0); - ok(SUCCEEDED(hr), "Failed to draw, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to draw, hr %#lx.\n", hr); hr = IDirect3DDevice7_DrawPrimitiveVB(device, D3DPT_TRIANGLESTRIP, vb, 0, 0, 0); - ok(SUCCEEDED(hr) || broken(ddraw_is_amd(ddraw) && hr == E_FAIL), "Failed to draw, hr %#x.\n", hr); + ok(SUCCEEDED(hr) || broken(ddraw_is_amd(ddraw) && hr == E_FAIL), "Failed to draw, hr %#lx.\n", hr);
hr = IDirect3DDevice7_DrawIndexedPrimitive(device, D3DPT_TRIANGLESTRIP, D3DFVF_XYZ, NULL, 0, indices, 4, 0); - ok(SUCCEEDED(hr), "Failed to draw, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to draw, hr %#lx.\n", hr); hr = IDirect3DDevice7_DrawIndexedPrimitiveStrided(device, D3DPT_TRIANGLESTRIP, D3DFVF_XYZ, &strided, 0, indices, 4, 0); - ok(SUCCEEDED(hr), "Failed to draw, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to draw, hr %#lx.\n", hr); /* Interestingly r200 rejects this, but not the call with a NULL index buffer and 0 indices. */ hr = IDirect3DDevice7_DrawIndexedPrimitiveVB(device, D3DPT_TRIANGLESTRIP, vb, 0, 0, indices, 4, 0); - ok(SUCCEEDED(hr) || broken(ddraw_is_amd(ddraw) && hr == E_FAIL), "Failed to draw, hr %#x.\n", hr); + ok(SUCCEEDED(hr) || broken(ddraw_is_amd(ddraw) && hr == E_FAIL), "Failed to draw, hr %#lx.\n", hr);
strided.position.lpvData = quad; strided.position.dwStride = sizeof(*quad); hr = IDirect3DVertexBuffer7_Lock(vb, 0, &data, NULL); - ok(SUCCEEDED(hr), "Failed to lock vertex buffer, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to lock vertex buffer, hr %#lx.\n", hr); memcpy(data, quad, sizeof(quad)); hr = IDirect3DVertexBuffer7_Unlock(vb); - ok(SUCCEEDED(hr), "Failed to unlock vertex buffer, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to unlock vertex buffer, hr %#lx.\n", hr);
hr = IDirect3DDevice7_DrawIndexedPrimitive(device, D3DPT_TRIANGLESTRIP, D3DFVF_XYZ, quad, 4, NULL, 0, 0); - ok(SUCCEEDED(hr), "Failed to draw, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to draw, hr %#lx.\n", hr); hr = IDirect3DDevice7_DrawIndexedPrimitiveStrided(device, D3DPT_TRIANGLESTRIP, D3DFVF_XYZ, &strided, 4, NULL, 0, 0); /* r200 again fails this, this time with E_OUTOFMEMORY. */ - ok(SUCCEEDED(hr) || broken(ddraw_is_amd(ddraw) && hr == E_OUTOFMEMORY), "Failed to draw, hr %#x.\n", hr); + ok(SUCCEEDED(hr) || broken(ddraw_is_amd(ddraw) && hr == E_OUTOFMEMORY), "Failed to draw, hr %#lx.\n", hr); hr = IDirect3DDevice7_DrawIndexedPrimitiveVB(device, D3DPT_TRIANGLESTRIP, vb, 0, 4, NULL, 0, 0); - ok(SUCCEEDED(hr), "Failed to draw, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to draw, hr %#lx.\n", hr); /* Now this draw should work, but r200 rejects it too - presumably earlier tests broke * driver internal state. */ hr = IDirect3DDevice7_DrawPrimitive(device, D3DPT_TRIANGLESTRIP, D3DFVF_XYZ, quad, 4, 0); - ok(SUCCEEDED(hr) || broken(ddraw_is_amd(ddraw) && hr == E_FAIL), "Failed to draw, hr %#x.\n", hr); + ok(SUCCEEDED(hr) || broken(ddraw_is_amd(ddraw) && hr == E_FAIL), "Failed to draw, hr %#lx.\n", hr); hr = IDirect3DDevice7_DrawPrimitiveStrided(device, D3DPT_TRIANGLESTRIP, D3DFVF_XYZ, &strided, 4, 0); - ok(SUCCEEDED(hr), "Failed to draw, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to draw, hr %#lx.\n", hr); hr = IDirect3DDevice7_DrawPrimitiveVB(device, D3DPT_TRIANGLESTRIP, vb, 0, 4, 0); - ok(SUCCEEDED(hr), "Failed to draw, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to draw, hr %#lx.\n", hr);
hr = IDirect3DDevice7_DrawIndexedPrimitive(device, D3DPT_TRIANGLESTRIP, D3DFVF_XYZ, quad, 4, indices, 4, 0); - ok(SUCCEEDED(hr), "Failed to draw, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to draw, hr %#lx.\n", hr); hr = IDirect3DDevice7_DrawIndexedPrimitiveStrided(device, D3DPT_TRIANGLESTRIP, D3DFVF_XYZ, &strided, 4, indices, 4, 0); - ok(SUCCEEDED(hr), "Failed to draw, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to draw, hr %#lx.\n", hr); hr = IDirect3DDevice7_DrawIndexedPrimitiveVB(device, D3DPT_TRIANGLESTRIP, vb, 0, 4, indices, 4, 0); - ok(SUCCEEDED(hr), "Failed to draw, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to draw, hr %#lx.\n", hr);
IDirect3DVertexBuffer7_Release(vb); IDirectDraw7_Release(ddraw); refcount = IDirect3DDevice7_Release(device); - ok(!refcount, "Device has %u references left.\n", refcount); + ok(!refcount, "Device has %lu references left.\n", refcount); DestroyWindow(window); }
@@ -14016,16 +14016,16 @@ static void test_edge_antialiasing_blending(void) }
hr = IDirect3DDevice7_GetCaps(device, &device_desc); - ok(SUCCEEDED(hr), "Failed to get device caps, hr %#x.\n", hr); - trace("Line edge antialiasing support: %#x.\n", + ok(SUCCEEDED(hr), "Failed to get device caps, hr %#lx.\n", hr); + trace("Line edge antialiasing support: %#lx.\n", device_desc.dpcLineCaps.dwRasterCaps & D3DPRASTERCAPS_ANTIALIASEDGES); - trace("Triangle edge antialiasing support: %#x.\n", + trace("Triangle edge antialiasing support: %#lx.\n", device_desc.dpcTriCaps.dwRasterCaps & D3DPRASTERCAPS_ANTIALIASEDGES);
hr = IDirect3DDevice7_GetDirect3D(device, &d3d); - ok(SUCCEEDED(hr), "Failed to get D3D interface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get D3D interface, hr %#lx.\n", hr); hr = IDirect3D7_QueryInterface(d3d, &IID_IDirectDraw7, (void **)&ddraw); - ok(SUCCEEDED(hr), "Failed to get DirectDraw7 interface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get DirectDraw7 interface, hr %#lx.\n", hr); IDirect3D7_Release(d3d);
memset(&surface_desc, 0, sizeof(surface_desc)); @@ -14041,128 +14041,128 @@ static void test_edge_antialiasing_blending(void) U4(U4(surface_desc).ddpfPixelFormat).dwBBitMask = 0x000000ff; U5(U4(surface_desc).ddpfPixelFormat).dwRGBAlphaBitMask = 0xff000000; hr = IDirectDraw7_CreateSurface(ddraw, &surface_desc, &offscreen, NULL); - ok(hr == D3D_OK, "Creating the offscreen render target failed, hr %#x.\n", hr); + ok(hr == D3D_OK, "Creating the offscreen render target failed, hr %#lx.\n", hr);
hr = IDirect3DDevice7_SetRenderTarget(device, offscreen, 0); - ok(SUCCEEDED(hr), "Failed to set render target, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set render target, hr %#lx.\n", hr);
hr = IDirect3DDevice7_SetTransform(device, D3DTRANSFORMSTATE_WORLD, &mat); - ok(SUCCEEDED(hr), "Failed to set world transform, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set world transform, hr %#lx.\n", hr); hr = IDirect3DDevice7_SetTransform(device, D3DTRANSFORMSTATE_VIEW, &mat); - ok(SUCCEEDED(hr), "Failed to set view transform, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set view transform, hr %#lx.\n", hr); hr = IDirect3DDevice7_SetTransform(device, D3DTRANSFORMSTATE_PROJECTION, &mat); - ok(SUCCEEDED(hr), "Failed to set projection transform, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set projection transform, hr %#lx.\n", hr); hr = IDirect3DDevice7_SetRenderState(device, D3DRENDERSTATE_CLIPPING, FALSE); - ok(SUCCEEDED(hr), "Failed to disable clipping, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to disable clipping, hr %#lx.\n", hr); hr = IDirect3DDevice7_SetRenderState(device, D3DRENDERSTATE_ZENABLE, FALSE); - ok(SUCCEEDED(hr), "Failed to disable Z test, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to disable Z test, hr %#lx.\n", hr); hr = IDirect3DDevice7_SetRenderState(device, D3DRENDERSTATE_FOGENABLE, FALSE); - ok(SUCCEEDED(hr), "Failed to disable fog, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to disable fog, hr %#lx.\n", hr); hr = IDirect3DDevice7_SetRenderState(device, D3DRENDERSTATE_STENCILENABLE, FALSE); - ok(SUCCEEDED(hr), "Failed to disable stencil test, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to disable stencil test, hr %#lx.\n", hr); hr = IDirect3DDevice7_SetRenderState(device, D3DRENDERSTATE_CULLMODE, D3DCULL_NONE); - ok(SUCCEEDED(hr), "Failed to disable culling, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to disable culling, hr %#lx.\n", hr); hr = IDirect3DDevice7_SetRenderState(device, D3DRENDERSTATE_LIGHTING, FALSE); - ok(SUCCEEDED(hr), "Failed to disable lighting, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to disable lighting, hr %#lx.\n", hr);
hr = IDirect3DDevice7_SetRenderState(device, D3DRENDERSTATE_ALPHABLENDENABLE, TRUE); - ok(SUCCEEDED(hr), "Failed to enable blending, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to enable blending, hr %#lx.\n", hr); hr = IDirect3DDevice7_SetRenderState(device, D3DRENDERSTATE_SRCBLEND, D3DBLEND_SRCALPHA); - ok(SUCCEEDED(hr), "Failed to set src blend, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set src blend, hr %#lx.\n", hr); hr = IDirect3DDevice7_SetRenderState(device, D3DRENDERSTATE_DESTBLEND, D3DBLEND_DESTALPHA); - ok(SUCCEEDED(hr), "Failed to set dest blend, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set dest blend, hr %#lx.\n", hr);
hr = IDirect3DDevice7_SetTextureStageState(device, 0, D3DTSS_COLOROP, D3DTOP_SELECTARG1); - ok(SUCCEEDED(hr), "Failed to set color op, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set color op, hr %#lx.\n", hr); hr = IDirect3DDevice7_SetTextureStageState(device, 0, D3DTSS_COLORARG1, D3DTA_DIFFUSE); - ok(SUCCEEDED(hr), "Failed to set color arg, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set color arg, hr %#lx.\n", hr); hr = IDirect3DDevice7_SetTextureStageState(device, 0, D3DTSS_ALPHAOP, D3DTOP_SELECTARG1); - ok(SUCCEEDED(hr), "Failed to set alpha op, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set alpha op, hr %#lx.\n", hr); hr = IDirect3DDevice7_SetTextureStageState(device, 0, D3DTSS_ALPHAARG1, D3DTA_DIFFUSE); - ok(SUCCEEDED(hr), "Failed to set alpha arg, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set alpha arg, hr %#lx.\n", hr);
hr = IDirect3DDevice7_Clear(device, 0, NULL, D3DCLEAR_TARGET, 0xccff0000, 0.0f, 0); - ok(SUCCEEDED(hr), "Failed to clear, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to clear, hr %#lx.\n", hr); hr = IDirect3DDevice7_BeginScene(device); - ok(SUCCEEDED(hr), "Failed to begin scene, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to begin scene, hr %#lx.\n", hr); hr = IDirect3DDevice7_DrawPrimitive(device, D3DPT_TRIANGLESTRIP, D3DFVF_XYZ | D3DFVF_DIFFUSE, green_quad, 4, 0); - ok(SUCCEEDED(hr), "Failed to draw, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to draw, hr %#lx.\n", hr); hr = IDirect3DDevice7_EndScene(device); - ok(SUCCEEDED(hr), "Failed to end scene, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to end scene, hr %#lx.\n", hr); color = get_surface_color(offscreen, 320, 240); - ok(compare_color(color, 0x00cc7f00, 1), "Got unexpected color 0x%08x.\n", color); + ok(compare_color(color, 0x00cc7f00, 1), "Got unexpected color 0x%08lx.\n", color);
hr = IDirect3DDevice7_Clear(device, 0, NULL, D3DCLEAR_TARGET, 0x7f00ff00, 0.0f, 0); - ok(SUCCEEDED(hr), "Failed to clear, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to clear, hr %#lx.\n", hr); hr = IDirect3DDevice7_BeginScene(device); - ok(SUCCEEDED(hr), "Failed to begin scene, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to begin scene, hr %#lx.\n", hr); hr = IDirect3DDevice7_DrawPrimitive(device, D3DPT_TRIANGLESTRIP, D3DFVF_XYZ | D3DFVF_DIFFUSE, red_quad, 4, 0); - ok(SUCCEEDED(hr), "Failed to draw, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to draw, hr %#lx.\n", hr); hr = IDirect3DDevice7_EndScene(device); - ok(SUCCEEDED(hr), "Failed to end scene, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to end scene, hr %#lx.\n", hr); color = get_surface_color(offscreen, 320, 240); - ok(compare_color(color, 0x00cc7f00, 1), "Got unexpected color 0x%08x.\n", color); + ok(compare_color(color, 0x00cc7f00, 1), "Got unexpected color 0x%08lx.\n", color);
hr = IDirect3DDevice7_SetRenderState(device, D3DRENDERSTATE_ALPHABLENDENABLE, FALSE); - ok(SUCCEEDED(hr), "Failed to disable blending, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to disable blending, hr %#lx.\n", hr);
hr = IDirect3DDevice7_Clear(device, 0, NULL, D3DCLEAR_TARGET, 0xccff0000, 0.0f, 0); - ok(SUCCEEDED(hr), "Failed to clear, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to clear, hr %#lx.\n", hr); hr = IDirect3DDevice7_BeginScene(device); - ok(SUCCEEDED(hr), "Failed to begin scene, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to begin scene, hr %#lx.\n", hr); hr = IDirect3DDevice7_DrawPrimitive(device, D3DPT_TRIANGLESTRIP, D3DFVF_XYZ | D3DFVF_DIFFUSE, green_quad, 4, 0); - ok(SUCCEEDED(hr), "Failed to draw, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to draw, hr %#lx.\n", hr); hr = IDirect3DDevice7_EndScene(device); - ok(SUCCEEDED(hr), "Failed to end scene, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to end scene, hr %#lx.\n", hr); color = get_surface_color(offscreen, 320, 240); - ok(compare_color(color, 0x0000ff00, 1), "Got unexpected color 0x%08x.\n", color); + ok(compare_color(color, 0x0000ff00, 1), "Got unexpected color 0x%08lx.\n", color);
hr = IDirect3DDevice7_Clear(device, 0, NULL, D3DCLEAR_TARGET, 0x7f00ff00, 0.0f, 0); - ok(SUCCEEDED(hr), "Failed to clear, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to clear, hr %#lx.\n", hr); hr = IDirect3DDevice7_BeginScene(device); - ok(SUCCEEDED(hr), "Failed to begin scene, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to begin scene, hr %#lx.\n", hr); hr = IDirect3DDevice7_DrawPrimitive(device, D3DPT_TRIANGLESTRIP, D3DFVF_XYZ | D3DFVF_DIFFUSE, red_quad, 4, 0); - ok(SUCCEEDED(hr), "Failed to draw, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to draw, hr %#lx.\n", hr); hr = IDirect3DDevice7_EndScene(device); - ok(SUCCEEDED(hr), "Failed to end scene, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to end scene, hr %#lx.\n", hr); color = get_surface_color(offscreen, 320, 240); - ok(compare_color(color, 0x00ff0000, 1), "Got unexpected color 0x%08x.\n", color); + ok(compare_color(color, 0x00ff0000, 1), "Got unexpected color 0x%08lx.\n", color);
hr = IDirect3DDevice7_SetRenderState(device, D3DRENDERSTATE_EDGEANTIALIAS, TRUE); - ok(SUCCEEDED(hr), "Failed to enable edge antialiasing, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to enable edge antialiasing, hr %#lx.\n", hr);
hr = IDirect3DDevice7_Clear(device, 0, NULL, D3DCLEAR_TARGET, 0xccff0000, 0.0f, 0); - ok(SUCCEEDED(hr), "Failed to clear, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to clear, hr %#lx.\n", hr); hr = IDirect3DDevice7_BeginScene(device); - ok(SUCCEEDED(hr), "Failed to begin scene, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to begin scene, hr %#lx.\n", hr); hr = IDirect3DDevice7_DrawPrimitive(device, D3DPT_TRIANGLESTRIP, D3DFVF_XYZ | D3DFVF_DIFFUSE, green_quad, 4, 0); - ok(SUCCEEDED(hr), "Failed to draw, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to draw, hr %#lx.\n", hr); hr = IDirect3DDevice7_EndScene(device); - ok(SUCCEEDED(hr), "Failed to end scene, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to end scene, hr %#lx.\n", hr); color = get_surface_color(offscreen, 320, 240); - ok(compare_color(color, 0x0000ff00, 1), "Got unexpected color 0x%08x.\n", color); + ok(compare_color(color, 0x0000ff00, 1), "Got unexpected color 0x%08lx.\n", color);
hr = IDirect3DDevice7_Clear(device, 0, NULL, D3DCLEAR_TARGET, 0x7f00ff00, 0.0f, 0); - ok(SUCCEEDED(hr), "Failed to clear, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to clear, hr %#lx.\n", hr); hr = IDirect3DDevice7_BeginScene(device); - ok(SUCCEEDED(hr), "Failed to begin scene, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to begin scene, hr %#lx.\n", hr); hr = IDirect3DDevice7_DrawPrimitive(device, D3DPT_TRIANGLESTRIP, D3DFVF_XYZ | D3DFVF_DIFFUSE, red_quad, 4, 0); - ok(SUCCEEDED(hr), "Failed to draw, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to draw, hr %#lx.\n", hr); hr = IDirect3DDevice7_EndScene(device); - ok(SUCCEEDED(hr), "Failed to end scene, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to end scene, hr %#lx.\n", hr); color = get_surface_color(offscreen, 320, 240); - ok(compare_color(color, 0x00ff0000, 1), "Got unexpected color 0x%08x.\n", color); + ok(compare_color(color, 0x00ff0000, 1), "Got unexpected color 0x%08lx.\n", color);
IDirectDrawSurface7_Release(offscreen); IDirectDraw7_Release(ddraw); refcount = IDirect3DDevice7_Release(device); - ok(!refcount, "Device has %u references left.\n", refcount); + ok(!refcount, "Device has %lu references left.\n", refcount); DestroyWindow(window); }
@@ -14184,14 +14184,14 @@ static void test_display_mode_surface_pixel_format(void)
surface_desc.dwSize = sizeof(surface_desc); hr = IDirectDraw7_GetDisplayMode(ddraw, &surface_desc); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); width = surface_desc.dwWidth; height = surface_desc.dwHeight;
window = CreateWindowA("static", "ddraw_test", WS_OVERLAPPEDWINDOW, 0, 0, width, height, NULL, NULL, NULL, NULL); hr = IDirectDraw7_SetCooperativeLevel(ddraw, window, DDSCL_EXCLUSIVE | DDSCL_FULLSCREEN); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr);
bpp = 0; if (SUCCEEDED(IDirectDraw7_SetDisplayMode(ddraw, width, height, 16, 0, 0))) @@ -14204,10 +14204,10 @@ static void test_display_mode_surface_pixel_format(void)
surface_desc.dwSize = sizeof(surface_desc); hr = IDirectDraw7_GetDisplayMode(ddraw, &surface_desc); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); - ok(surface_desc.dwWidth == width, "Got width %u, expected %u.\n", surface_desc.dwWidth, width); - ok(surface_desc.dwHeight == height, "Got height %u, expected %u.\n", surface_desc.dwHeight, height); - ok(U1(U4(surface_desc).ddpfPixelFormat).dwRGBBitCount == bpp, "Got bpp %u, expected %u.\n", + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); + ok(surface_desc.dwWidth == width, "Got width %lu, expected %u.\n", surface_desc.dwWidth, width); + ok(surface_desc.dwHeight == height, "Got height %lu, expected %u.\n", surface_desc.dwHeight, height); + ok(U1(U4(surface_desc).ddpfPixelFormat).dwRGBBitCount == bpp, "Got bpp %lu, expected %u.\n", U1(U4(surface_desc).ddpfPixelFormat).dwRGBBitCount, bpp);
memset(&surface_desc, 0, sizeof(surface_desc)); @@ -14216,14 +14216,14 @@ static void test_display_mode_surface_pixel_format(void) U5(surface_desc).dwBackBufferCount = 1; surface_desc.ddsCaps.dwCaps = DDSCAPS_COMPLEX | DDSCAPS_FLIP | DDSCAPS_PRIMARYSURFACE; hr = IDirectDraw7_CreateSurface(ddraw, &surface_desc, &surface, NULL); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface7_GetSurfaceDesc(surface, &surface_desc); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); - ok(surface_desc.dwWidth == width, "Got width %u, expected %u.\n", surface_desc.dwWidth, width); - ok(surface_desc.dwHeight == height, "Got height %u, expected %u.\n", surface_desc.dwHeight, height); - ok(U4(surface_desc).ddpfPixelFormat.dwFlags == DDPF_RGB, "Got unexpected pixel format flags %#x.\n", + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); + ok(surface_desc.dwWidth == width, "Got width %lu, expected %u.\n", surface_desc.dwWidth, width); + ok(surface_desc.dwHeight == height, "Got height %lu, expected %u.\n", surface_desc.dwHeight, height); + ok(U4(surface_desc).ddpfPixelFormat.dwFlags == DDPF_RGB, "Got unexpected pixel format flags %#lx.\n", U4(surface_desc).ddpfPixelFormat.dwFlags); - ok(U1(U4(surface_desc).ddpfPixelFormat).dwRGBBitCount == bpp, "Got bpp %u, expected %u.\n", + ok(U1(U4(surface_desc).ddpfPixelFormat).dwRGBBitCount == bpp, "Got bpp %lu, expected %u.\n", U1(U4(surface_desc).ddpfPixelFormat).dwRGBBitCount, bpp); IDirectDrawSurface7_Release(surface);
@@ -14234,18 +14234,18 @@ static void test_display_mode_surface_pixel_format(void) surface_desc.dwHeight = height; surface_desc.ddsCaps.dwCaps = DDSCAPS_OFFSCREENPLAIN; hr = IDirectDraw7_CreateSurface(ddraw, &surface_desc, &surface, NULL); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface7_GetSurfaceDesc(surface, &surface_desc); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); - ok(U4(surface_desc).ddpfPixelFormat.dwFlags == DDPF_RGB, "Got unexpected pixel format flags %#x.\n", + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); + ok(U4(surface_desc).ddpfPixelFormat.dwFlags == DDPF_RGB, "Got unexpected pixel format flags %#lx.\n", U4(surface_desc).ddpfPixelFormat.dwFlags); - ok(U1(U4(surface_desc).ddpfPixelFormat).dwRGBBitCount == bpp, "Got bpp %u, expected %u.\n", + ok(U1(U4(surface_desc).ddpfPixelFormat).dwRGBBitCount == bpp, "Got bpp %lu, expected %u.\n", U1(U4(surface_desc).ddpfPixelFormat).dwRGBBitCount, bpp); IDirectDrawSurface7_Release(surface);
/* Test compatibility mode mipmap texture creation. */ hr = IDirectDraw7_SetDisplayMode(ddraw, width, height, 16, 0, 0); - ok(hr == DD_OK || hr == E_NOTIMPL, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK || hr == E_NOTIMPL, "Got unexpected hr %#lx.\n", hr); if (FAILED(hr)) { win_skip("SetDisplayMode failed, skipping test."); @@ -14262,13 +14262,13 @@ static void test_display_mode_surface_pixel_format(void) U1(surface_desc).lPitch = surface_desc.dwWidth * bpp / 8; surface_desc.ddsCaps.dwCaps = DDSCAPS_TEXTURE | DDSCAPS_COMPLEX | DDSCAPS_MIPMAP | DDSCAPS_VIDEOMEMORY; hr = IDirectDraw7_CreateSurface(ddraw, &surface_desc, &surface, NULL); - ok(hr == DD_OK || hr == DDERR_NODIRECTDRAWHW, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK || hr == DDERR_NODIRECTDRAWHW, "Got unexpected hr %#lx.\n", hr); if (surface) IDirectDrawSurface7_Release(surface);
done: refcount = IDirectDraw7_Release(ddraw); - ok(!refcount, "DirectDraw has %u references left.\n", refcount); + ok(!refcount, "DirectDraw has %lu references left.\n", refcount); DestroyWindow(window); }
@@ -14326,7 +14326,7 @@ static void test_surface_desc_size(void) return; } hr = IDirectDraw7_SetCooperativeLevel(ddraw, NULL, DDSCL_NORMAL); - ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#lx.\n", hr);
for (i = 0; i < ARRAY_SIZE(surface_caps); ++i) { @@ -14342,9 +14342,9 @@ static void test_surface_desc_size(void) continue; } hr = IDirectDrawSurface_QueryInterface(surface7, &IID_IDirectDrawSurface, (void **)&surface); - ok(hr == DD_OK, "Failed to query IDirectDrawSurface, hr %#x, type %s.\n", hr, surface_caps[i].name); + ok(hr == DD_OK, "Failed to query IDirectDrawSurface, hr %#lx, type %s.\n", hr, surface_caps[i].name); hr = IDirectDrawSurface_QueryInterface(surface7, &IID_IDirectDrawSurface3, (void **)&surface3); - ok(hr == DD_OK, "Failed to query IDirectDrawSurface3, hr %#x, type %s.\n", hr, surface_caps[i].name); + ok(hr == DD_OK, "Failed to query IDirectDrawSurface3, hr %#lx, type %s.\n", hr, surface_caps[i].name);
/* GetSurfaceDesc() */ for (j = 0; j < ARRAY_SIZE(desc_sizes); ++j) @@ -14353,21 +14353,21 @@ static void test_surface_desc_size(void) desc.dwSize = desc_sizes[j]; expected_hr = desc.dwSize == sizeof(DDSURFACEDESC) ? DD_OK : DDERR_INVALIDPARAMS; hr = IDirectDrawSurface_GetSurfaceDesc(surface, &desc.desc1); - ok(hr == expected_hr, "Got hr %#x, expected %#x, dwSize %u, type %s.\n", + ok(hr == expected_hr, "Got hr %#lx, expected %#lx, dwSize %u, type %s.\n", hr, expected_hr, desc_sizes[j], surface_caps[i].name);
memset(&desc, 0, sizeof(desc)); desc.dwSize = desc_sizes[j]; expected_hr = desc.dwSize == sizeof(DDSURFACEDESC) ? DD_OK : DDERR_INVALIDPARAMS; hr = IDirectDrawSurface3_GetSurfaceDesc(surface3, &desc.desc1); - ok(hr == expected_hr, "Got hr %#x, expected %#x, dwSize %u, type %s.\n", + ok(hr == expected_hr, "Got hr %#lx, expected %#lx, dwSize %u, type %s.\n", hr, expected_hr, desc_sizes[j], surface_caps[i].name);
memset(&desc, 0, sizeof(desc)); desc.dwSize = desc_sizes[j]; expected_hr = desc.dwSize == sizeof(DDSURFACEDESC2) ? DD_OK : DDERR_INVALIDPARAMS; hr = IDirectDrawSurface7_GetSurfaceDesc(surface7, &desc.desc2); - ok(hr == expected_hr, "Got hr %#x, expected %#x, dwSize %u, type %s.\n", + ok(hr == expected_hr, "Got hr %#lx, expected %#lx, dwSize %u, type %s.\n", hr, expected_hr, desc_sizes[j], surface_caps[i].name); }
@@ -14386,22 +14386,22 @@ static void test_surface_desc_size(void) desc.blob[sizeof(DDSURFACEDESC2)] = 0xef; hr = IDirectDrawSurface_Lock(surface, NULL, &desc.desc1, 0, 0); expected_hr = ignore_size || valid_size ? DD_OK : DDERR_INVALIDPARAMS; - ok(hr == expected_hr, "Got hr %#x, expected %#x, dwSize %u, type %s.\n", + ok(hr == expected_hr, "Got hr %#lx, expected %#lx, dwSize %u, type %s.\n", hr, expected_hr, desc_sizes[j], surface_caps[i].name); - ok(desc.dwSize == desc_sizes[j], "dwSize was changed from %u to %u, type %s.\n", + ok(desc.dwSize == desc_sizes[j], "dwSize was changed from %u to %lu, type %s.\n", desc_sizes[j], desc.dwSize, surface_caps[i].name); ok(desc.blob[sizeof(DDSURFACEDESC2)] == 0xef, "Got unexpected byte %02x, dwSize %u, type %s.\n", desc.blob[sizeof(DDSURFACEDESC2)], desc_sizes[j], surface_caps[i].name); if (SUCCEEDED(hr)) { - ok(desc.desc1.dwWidth == 128, "Got unexpected width %u, dwSize %u, type %s.\n", + ok(desc.desc1.dwWidth == 128, "Got unexpected width %lu, dwSize %u, type %s.\n", desc.desc1.dwWidth, desc_sizes[j], surface_caps[i].name); - ok(desc.desc1.dwHeight == 128, "Got unexpected height %u, dwSize %u, type %s.\n", + ok(desc.desc1.dwHeight == 128, "Got unexpected height %lu, dwSize %u, type %s.\n", desc.desc1.dwHeight, desc_sizes[j], surface_caps[i].name); expected_texture_stage = desc_sizes[j] >= sizeof(DDSURFACEDESC2) ? 0 : 0xdeadbeef; todo_wine_if(!expected_texture_stage) ok(desc.desc2.dwTextureStage == expected_texture_stage, - "Got unexpected texture stage %#x, dwSize %u, type %s.\n", + "Got unexpected texture stage %#lx, dwSize %u, type %s.\n", desc.desc2.dwTextureStage, desc_sizes[j], surface_caps[i].name); IDirectDrawSurface_Unlock(surface, NULL); } @@ -14412,22 +14412,22 @@ static void test_surface_desc_size(void) desc.blob[sizeof(DDSURFACEDESC2)] = 0xef; hr = IDirectDrawSurface3_Lock(surface3, NULL, &desc.desc1, 0, 0); expected_hr = ignore_size || valid_size ? DD_OK : DDERR_INVALIDPARAMS; - ok(hr == expected_hr, "Got hr %#x, expected %#x, dwSize %u, type %s.\n", + ok(hr == expected_hr, "Got hr %#lx, expected %#lx, dwSize %u, type %s.\n", hr, expected_hr, desc_sizes[j], surface_caps[i].name); - ok(desc.dwSize == desc_sizes[j], "dwSize was changed from %u to %u, type %s.\n", + ok(desc.dwSize == desc_sizes[j], "dwSize was changed from %u to %lu, type %s.\n", desc_sizes[j], desc.dwSize, surface_caps[i].name); ok(desc.blob[sizeof(DDSURFACEDESC2)] == 0xef, "Got unexpected byte %02x, dwSize %u, type %s.\n", desc.blob[sizeof(DDSURFACEDESC2)], desc_sizes[j], surface_caps[i].name); if (SUCCEEDED(hr)) { - ok(desc.desc1.dwWidth == 128, "Got unexpected width %u, dwSize %u, type %s.\n", + ok(desc.desc1.dwWidth == 128, "Got unexpected width %lu, dwSize %u, type %s.\n", desc.desc1.dwWidth, desc_sizes[j], surface_caps[i].name); - ok(desc.desc1.dwHeight == 128, "Got unexpected height %u, dwSize %u, type %s.\n", + ok(desc.desc1.dwHeight == 128, "Got unexpected height %lu, dwSize %u, type %s.\n", desc.desc1.dwHeight, desc_sizes[j], surface_caps[i].name); expected_texture_stage = desc_sizes[j] >= sizeof(DDSURFACEDESC2) ? 0 : 0xdeadbeef; todo_wine_if(!expected_texture_stage) ok(desc.desc2.dwTextureStage == expected_texture_stage, - "Got unexpected texture stage %#x, dwSize %u, type %s.\n", + "Got unexpected texture stage %#lx, dwSize %u, type %s.\n", desc.desc2.dwTextureStage, desc_sizes[j], surface_caps[i].name); IDirectDrawSurface3_Unlock(surface3, NULL); } @@ -14438,21 +14438,21 @@ static void test_surface_desc_size(void) desc.blob[sizeof(DDSURFACEDESC2)] = 0xef; hr = IDirectDrawSurface7_Lock(surface7, NULL, &desc.desc2, 0, 0); expected_hr = ignore_size || valid_size ? DD_OK : DDERR_INVALIDPARAMS; - ok(hr == expected_hr, "Got hr %#x, expected %#x, dwSize %u, type %s.\n", + ok(hr == expected_hr, "Got hr %#lx, expected %#lx, dwSize %u, type %s.\n", hr, expected_hr, desc_sizes[j], surface_caps[i].name); - ok(desc.dwSize == desc_sizes[j], "dwSize was changed from %u to %u, type %s.\n", + ok(desc.dwSize == desc_sizes[j], "dwSize was changed from %u to %lu, type %s.\n", desc_sizes[j], desc.dwSize, surface_caps[i].name); ok(desc.blob[sizeof(DDSURFACEDESC2)] == 0xef, "Got unexpected byte %02x, dwSize %u, type %s.\n", desc.blob[sizeof(DDSURFACEDESC2)], desc_sizes[j], surface_caps[i].name); if (SUCCEEDED(hr)) { - ok(desc.desc2.dwWidth == 128, "Got unexpected width %u, dwSize %u, type %s.\n", + ok(desc.desc2.dwWidth == 128, "Got unexpected width %lu, dwSize %u, type %s.\n", desc.desc2.dwWidth, desc_sizes[j], surface_caps[i].name); - ok(desc.desc2.dwHeight == 128, "Got unexpected height %u, dwSize %u, type %s.\n", + ok(desc.desc2.dwHeight == 128, "Got unexpected height %lu, dwSize %u, type %s.\n", desc.desc2.dwHeight, desc_sizes[j], surface_caps[i].name); expected_texture_stage = desc_sizes[j] >= sizeof(DDSURFACEDESC2) ? 0 : 0xdeadbeef; ok(desc.desc2.dwTextureStage == expected_texture_stage, - "Got unexpected texture stage %#x, dwSize %u, type %s.\n", + "Got unexpected texture stage %#lx, dwSize %u, type %s.\n", desc.desc2.dwTextureStage, desc_sizes[j], surface_caps[i].name); IDirectDrawSurface7_Unlock(surface7, NULL); } @@ -14471,17 +14471,17 @@ static void test_surface_desc_size(void) expected_hr = (desc.dwSize == sizeof(DDSURFACEDESC) || desc.dwSize == sizeof(DDSURFACEDESC2)) ? DD_OK : DDERR_INVALIDPARAMS; hr = IDirectDraw7_GetDisplayMode(ddraw, &desc.desc2); - ok(hr == expected_hr, "Got hr %#x, expected %#x, size %u.\n", hr, expected_hr, desc_sizes[j]); + ok(hr == expected_hr, "Got hr %#lx, expected %#lx, size %u.\n", hr, expected_hr, desc_sizes[j]); if (SUCCEEDED(hr)) { - ok(desc.dwSize == sizeof(DDSURFACEDESC2), "Wrong size %u for %u.\n", desc.dwSize, desc_sizes[j]); + ok(desc.dwSize == sizeof(DDSURFACEDESC2), "Wrong size %lu for %u.\n", desc.dwSize, desc_sizes[j]); ok(desc.blob[desc_sizes[j]] == 0xcc, "Overflow for size %u.\n", desc_sizes[j]); ok(desc.blob[desc_sizes[j] - 1] != 0xcc, "Struct not cleared for size %u.\n", desc_sizes[j]); } }
refcount = IDirectDraw7_Release(ddraw); - ok(!refcount, "DirectDraw has %u references left.\n", refcount); + ok(!refcount, "DirectDraw has %lu references left.\n", refcount); }
static void test_get_surface_from_dc(void) @@ -14500,7 +14500,7 @@ static void test_get_surface_from_dc(void) ddraw = create_ddraw(); ok(!!ddraw, "Failed to create a ddraw object.\n"); hr = IDirectDraw7_SetCooperativeLevel(ddraw, window, DDSCL_NORMAL); - ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#lx.\n", hr);
memset(&surface_desc, 0, sizeof(surface_desc)); surface_desc.dwSize = sizeof(surface_desc); @@ -14510,59 +14510,59 @@ static void test_get_surface_from_dc(void) surface_desc.ddsCaps.dwCaps = DDSCAPS_OFFSCREENPLAIN;
hr = IDirectDraw7_CreateSurface(ddraw, &surface_desc, &surface, NULL); - ok(SUCCEEDED(hr), "Failed to create surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create surface, hr %#lx.\n", hr); hr = IDirectDrawSurface7_QueryInterface(surface, &IID_IDirectDrawSurface, (void **)&surface1); - ok(SUCCEEDED(hr), "Failed to query IDirectDrawSurface interface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to query IDirectDrawSurface interface, hr %#lx.\n", hr);
refcount = get_refcount((IUnknown *)surface1); - ok(refcount == 1, "Got unexpected refcount %u.\n", refcount); + ok(refcount == 1, "Got unexpected refcount %lu.\n", refcount); refcount = get_refcount((IUnknown *)surface); - ok(refcount == 1, "Got unexpected refcount %u.\n", refcount); + ok(refcount == 1, "Got unexpected refcount %lu.\n", refcount);
hr = IDirectDrawSurface7_GetDC(surface, &dc); - ok(SUCCEEDED(hr), "Failed to get DC, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get DC, hr %#lx.\n", hr);
tmp1 = (void *)0xdeadbeef; device_dc = (void *)0xdeadbeef; hr = GetSurfaceFromDC(NULL, &tmp1, &device_dc); - ok(hr == DDERR_NOTFOUND, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_NOTFOUND, "Got unexpected hr %#lx.\n", hr); ok(!tmp1, "Got unexpected surface %p.\n", tmp1); ok(!device_dc, "Got unexpected device_dc %p.\n", device_dc);
device_dc = (void *)0xdeadbeef; hr = GetSurfaceFromDC(dc, NULL, &device_dc); - ok(hr == E_INVALIDARG, "Got unexpected hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Got unexpected hr %#lx.\n", hr); ok(device_dc == (void *)0xdeadbeef, "Got unexpected device_dc %p.\n", device_dc);
tmp1 = (void *)0xdeadbeef; hr = GetSurfaceFromDC(dc, &tmp1, NULL); - ok(hr == E_INVALIDARG, "Got unexpected hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Got unexpected hr %#lx.\n", hr); ok(!tmp1, "Got unexpected surface %p.\n", tmp1);
hr = GetSurfaceFromDC(dc, &tmp1, &device_dc); - ok(SUCCEEDED(hr), "GetSurfaceFromDC failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "GetSurfaceFromDC failed, hr %#lx.\n", hr); ok(tmp1 == surface1, "Got unexpected surface %p, expected %p.\n", tmp1, surface1); IDirectDrawSurface_Release(tmp1);
ret = GetObjectType(device_dc); - todo_wine ok(ret == OBJ_DC, "Got unexpected object type %#x.\n", ret); + todo_wine ok(ret == OBJ_DC, "Got unexpected object type %#lx.\n", ret); ret = GetDeviceCaps(device_dc, TECHNOLOGY); - todo_wine ok(ret == DT_RASDISPLAY, "Got unexpected technology %#x.\n", ret); + todo_wine ok(ret == DT_RASDISPLAY, "Got unexpected technology %#lx.\n", ret);
hr = IDirectDraw7_GetSurfaceFromDC(ddraw, dc, NULL); - ok(hr == E_INVALIDARG, "Got unexpected hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Got unexpected hr %#lx.\n", hr);
hr = IDirectDraw7_GetSurfaceFromDC(ddraw, dc, &tmp); - ok(SUCCEEDED(hr), "GetSurfaceFromDC failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "GetSurfaceFromDC failed, hr %#lx.\n", hr); ok(tmp == surface, "Got unexpected surface %p, expected %p.\n", tmp, surface);
refcount = get_refcount((IUnknown *)surface1); - ok(refcount == 1, "Got unexpected refcount %u.\n", refcount); + ok(refcount == 1, "Got unexpected refcount %lu.\n", refcount); refcount = get_refcount((IUnknown *)surface); - ok(refcount == 2, "Got unexpected refcount %u.\n", refcount); + ok(refcount == 2, "Got unexpected refcount %lu.\n", refcount);
hr = IDirectDrawSurface7_ReleaseDC(surface, dc); - ok(SUCCEEDED(hr), "ReleaseDC failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "ReleaseDC failed, hr %#lx.\n", hr);
IDirectDrawSurface_Release(tmp);
@@ -14572,20 +14572,20 @@ static void test_get_surface_from_dc(void) tmp1 = (void *)0xdeadbeef; device_dc = (void *)0xdeadbeef; hr = GetSurfaceFromDC(dc, &tmp1, &device_dc); - ok(hr == DDERR_NOTFOUND, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_NOTFOUND, "Got unexpected hr %#lx.\n", hr); ok(!tmp1, "Got unexpected surface %p.\n", tmp1); ok(!device_dc, "Got unexpected device_dc %p.\n", device_dc);
tmp = (void *)0xdeadbeef; hr = IDirectDraw7_GetSurfaceFromDC(ddraw, dc, &tmp); - ok(hr == DDERR_NOTFOUND, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_NOTFOUND, "Got unexpected hr %#lx.\n", hr); ok(!tmp, "Got unexpected surface %p.\n", tmp);
ok(DeleteDC(dc), "DeleteDC failed.\n");
tmp = (void *)0xdeadbeef; hr = IDirectDraw7_GetSurfaceFromDC(ddraw, NULL, &tmp); - ok(hr == DDERR_NOTFOUND, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_NOTFOUND, "Got unexpected hr %#lx.\n", hr); ok(!tmp, "Got unexpected surface %p.\n", tmp);
IDirectDrawSurface7_Release(surface); @@ -14612,7 +14612,7 @@ static void test_ck_operation(void) ddraw = create_ddraw(); ok(!!ddraw, "Failed to create a ddraw object.\n"); hr = IDirectDraw7_SetCooperativeLevel(ddraw, window, DDSCL_NORMAL); - ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#lx.\n", hr);
memset(&surface_desc, 0, sizeof(surface_desc)); surface_desc.dwSize = sizeof(surface_desc); @@ -14626,16 +14626,16 @@ static void test_ck_operation(void) U3(U4(surface_desc).ddpfPixelFormat).dwGBitMask = 0x0000ff00; U4(U4(surface_desc).ddpfPixelFormat).dwBBitMask = 0x000000ff; hr = IDirectDraw7_CreateSurface(ddraw, &surface_desc, &dst, NULL); - ok(SUCCEEDED(hr), "Failed to create surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create surface, hr %#lx.\n", hr);
surface_desc.dwFlags |= DDSD_CKSRCBLT; surface_desc.ddckCKSrcBlt.dwColorSpaceLowValue = 0x00ff00ff; surface_desc.ddckCKSrcBlt.dwColorSpaceHighValue = 0x00ff00ff; hr = IDirectDraw7_CreateSurface(ddraw, &surface_desc, &src, NULL); - ok(SUCCEEDED(hr), "Failed to create surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create surface, hr %#lx.\n", hr);
hr = IDirectDrawSurface7_Lock(src, NULL, &surface_desc, DDLOCK_WAIT, NULL); - ok(SUCCEEDED(hr), "Failed to lock surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to lock surface, hr %#lx.\n", hr); ok(!(surface_desc.dwFlags & DDSD_LPSURFACE), "Surface desc has LPSURFACE Flags set.\n"); color = surface_desc.lpSurface; color[0] = 0x77010203; @@ -14643,33 +14643,33 @@ static void test_ck_operation(void) color[2] = 0x77ff00ff; color[3] = 0x00ff00ff; hr = IDirectDrawSurface7_Unlock(src, NULL); - ok(SUCCEEDED(hr), "Failed to unlock surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to unlock surface, hr %#lx.\n", hr);
for (i = 0; i < 2; ++i) { hr = IDirectDrawSurface7_Lock(dst, NULL, &surface_desc, DDLOCK_WAIT, NULL); - ok(SUCCEEDED(hr), "Failed to lock surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to lock surface, hr %#lx.\n", hr); color = surface_desc.lpSurface; color[0] = 0xcccccccc; color[1] = 0xcccccccc; color[2] = 0xcccccccc; color[3] = 0xcccccccc; hr = IDirectDrawSurface7_Unlock(dst, NULL); - ok(SUCCEEDED(hr), "Failed to unlock surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to unlock surface, hr %#lx.\n", hr);
if (i) { hr = IDirectDrawSurface7_BltFast(dst, 0, 0, src, NULL, DDBLTFAST_SRCCOLORKEY); - ok(SUCCEEDED(hr), "Failed to blit, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to blit, hr %#lx.\n", hr); } else { hr = IDirectDrawSurface7_Blt(dst, NULL, src, NULL, DDBLT_KEYSRC, NULL); - ok(SUCCEEDED(hr), "Failed to blit, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to blit, hr %#lx.\n", hr); }
hr = IDirectDrawSurface7_Lock(dst, NULL, &surface_desc, DDLOCK_WAIT | DDLOCK_READONLY, NULL); - ok(SUCCEEDED(hr), "Failed to lock surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to lock surface, hr %#lx.\n", hr); ok(!(surface_desc.dwFlags & DDSD_LPSURFACE), "Surface desc has LPSURFACE Flags set.\n"); color = surface_desc.lpSurface; /* Different behavior on some drivers / windows versions. Some versions ignore the X channel when @@ -14684,69 +14684,69 @@ static void test_ck_operation(void) && color[2] == 0xcccccccc && color[3] == 0xcccccccc) /* Nvidia */ || broken(color[0] == 0xff010203 && color[1] == 0xff010203 && color[2] == 0xcccccccc && color[3] == 0xcccccccc) /* Testbot */, - "Destination data after blitting is %08x %08x %08x %08x, i=%u.\n", + "Destination data after blitting is %08lx %08lx %08lx %08lx, i=%u.\n", color[0], color[1], color[2], color[3], i); hr = IDirectDrawSurface7_Unlock(dst, NULL); - ok(SUCCEEDED(hr), "Failed to unlock surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to unlock surface, hr %#lx.\n", hr); }
hr = IDirectDrawSurface7_GetColorKey(src, DDCKEY_SRCBLT, &ckey); - ok(SUCCEEDED(hr), "Failed to get color key, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get color key, hr %#lx.\n", hr); ok(ckey.dwColorSpaceLowValue == 0x00ff00ff && ckey.dwColorSpaceHighValue == 0x00ff00ff, - "Got unexpected color key low=%08x high=%08x.\n", ckey.dwColorSpaceLowValue, ckey.dwColorSpaceHighValue); + "Got unexpected color key low=%08lx high=%08lx.\n", ckey.dwColorSpaceLowValue, ckey.dwColorSpaceHighValue);
ckey.dwColorSpaceLowValue = ckey.dwColorSpaceHighValue = 0x0000ff00; hr = IDirectDrawSurface7_SetColorKey(src, DDCKEY_SRCBLT, &ckey); - ok(SUCCEEDED(hr), "Failed to set color key, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set color key, hr %#lx.\n", hr);
ckey.dwColorSpaceLowValue = ckey.dwColorSpaceHighValue = 0; hr = IDirectDrawSurface7_GetColorKey(src, DDCKEY_SRCBLT, &ckey); - ok(SUCCEEDED(hr), "Failed to get color key, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get color key, hr %#lx.\n", hr); ok(ckey.dwColorSpaceLowValue == 0x0000ff00 && ckey.dwColorSpaceHighValue == 0x0000ff00, - "Got unexpected color key low=%08x high=%08x.\n", ckey.dwColorSpaceLowValue, ckey.dwColorSpaceHighValue); + "Got unexpected color key low=%08lx high=%08lx.\n", ckey.dwColorSpaceLowValue, ckey.dwColorSpaceHighValue);
surface_desc.ddckCKSrcBlt.dwColorSpaceLowValue = 0; surface_desc.ddckCKSrcBlt.dwColorSpaceHighValue = 0; hr = IDirectDrawSurface7_GetSurfaceDesc(src, &surface_desc); - ok(SUCCEEDED(hr), "Failed to get surface desc, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get surface desc, hr %#lx.\n", hr); ok(surface_desc.ddckCKSrcBlt.dwColorSpaceLowValue == 0x0000ff00 && surface_desc.ddckCKSrcBlt.dwColorSpaceHighValue == 0x0000ff00, - "Got unexpected color key low=%08x high=%08x.\n", surface_desc.ddckCKSrcBlt.dwColorSpaceLowValue, + "Got unexpected color key low=%08lx high=%08lx.\n", surface_desc.ddckCKSrcBlt.dwColorSpaceLowValue, surface_desc.ddckCKSrcBlt.dwColorSpaceHighValue);
/* Test SetColorKey with dwColorSpaceHighValue < dwColorSpaceLowValue */ ckey.dwColorSpaceLowValue = 0x000000ff; ckey.dwColorSpaceHighValue = 0x00000000; hr = IDirectDrawSurface7_SetColorKey(src, DDCKEY_SRCBLT, &ckey); - ok(SUCCEEDED(hr), "Failed to set color key, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set color key, hr %#lx.\n", hr);
ckey.dwColorSpaceLowValue = ckey.dwColorSpaceHighValue = 0; hr = IDirectDrawSurface7_GetColorKey(src, DDCKEY_SRCBLT, &ckey); - ok(SUCCEEDED(hr), "Failed to get color key, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get color key, hr %#lx.\n", hr); ok(ckey.dwColorSpaceLowValue == 0x000000ff && ckey.dwColorSpaceHighValue == 0x000000ff, - "Got unexpected color key low=%08x high=%08x.\n", ckey.dwColorSpaceLowValue, ckey.dwColorSpaceHighValue); + "Got unexpected color key low=%08lx high=%08lx.\n", ckey.dwColorSpaceLowValue, ckey.dwColorSpaceHighValue);
ckey.dwColorSpaceLowValue = 0x000000ff; ckey.dwColorSpaceHighValue = 0x00000001; hr = IDirectDrawSurface7_SetColorKey(src, DDCKEY_SRCBLT, &ckey); - ok(SUCCEEDED(hr), "Failed to set color key, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set color key, hr %#lx.\n", hr);
ckey.dwColorSpaceLowValue = ckey.dwColorSpaceHighValue = 0; hr = IDirectDrawSurface7_GetColorKey(src, DDCKEY_SRCBLT, &ckey); - ok(SUCCEEDED(hr), "Failed to get color key, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get color key, hr %#lx.\n", hr); ok(ckey.dwColorSpaceLowValue == 0x000000ff && ckey.dwColorSpaceHighValue == 0x000000ff, - "Got unexpected color key low=%08x high=%08x.\n", ckey.dwColorSpaceLowValue, ckey.dwColorSpaceHighValue); + "Got unexpected color key low=%08lx high=%08lx.\n", ckey.dwColorSpaceLowValue, ckey.dwColorSpaceHighValue);
ckey.dwColorSpaceLowValue = 0x000000fe; ckey.dwColorSpaceHighValue = 0x000000fd; hr = IDirectDrawSurface7_SetColorKey(src, DDCKEY_SRCBLT, &ckey); - ok(SUCCEEDED(hr), "Failed to set color key, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set color key, hr %#lx.\n", hr);
ckey.dwColorSpaceLowValue = ckey.dwColorSpaceHighValue = 0; hr = IDirectDrawSurface7_GetColorKey(src, DDCKEY_SRCBLT, &ckey); - ok(SUCCEEDED(hr), "Failed to get color key, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get color key, hr %#lx.\n", hr); ok(ckey.dwColorSpaceLowValue == 0x000000fe && ckey.dwColorSpaceHighValue == 0x000000fe, - "Got unexpected color key low=%08x high=%08x.\n", ckey.dwColorSpaceLowValue, ckey.dwColorSpaceHighValue); + "Got unexpected color key low=%08lx high=%08lx.\n", ckey.dwColorSpaceLowValue, ckey.dwColorSpaceHighValue);
IDirectDrawSurface7_Release(src); IDirectDrawSurface7_Release(dst); @@ -14766,18 +14766,18 @@ static void test_ck_operation(void) U4(U4(surface_desc).ddpfPixelFormat).dwBBitMask = 0x000000ff; U5(U4(surface_desc).ddpfPixelFormat).dwRGBAlphaBitMask = 0xff000000; hr = IDirectDraw7_CreateSurface(ddraw, &surface_desc, &dst, NULL); - ok(SUCCEEDED(hr), "Failed to create surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create surface, hr %#lx.\n", hr); hr = IDirectDraw7_CreateSurface(ddraw, &surface_desc, &src, NULL); - ok(SUCCEEDED(hr), "Failed to create surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create surface, hr %#lx.\n", hr);
ckey.dwColorSpaceLowValue = 0x0000ff00; ckey.dwColorSpaceHighValue = 0x0000ff00; hr = IDirectDrawSurface7_SetColorKey(dst, DDCKEY_SRCBLT, &ckey); - ok(SUCCEEDED(hr), "Failed to set color key, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set color key, hr %#lx.\n", hr); ckey.dwColorSpaceLowValue = 0x00ff0000; ckey.dwColorSpaceHighValue = 0x00ff0000; hr = IDirectDrawSurface7_SetColorKey(dst, DDCKEY_DESTBLT, &ckey); - ok(SUCCEEDED(hr) || hr == DDERR_NOCOLORKEYHW, "Failed to set color key, hr %#x.\n", hr); + ok(SUCCEEDED(hr) || hr == DDERR_NOCOLORKEYHW, "Failed to set color key, hr %#lx.\n", hr); if (FAILED(hr)) { /* Nvidia reject dest keys, AMD allows them. This applies to vidmem and sysmem surfaces. */ @@ -14788,11 +14788,11 @@ static void test_ck_operation(void) ckey.dwColorSpaceLowValue = 0x000000ff; ckey.dwColorSpaceHighValue = 0x000000ff; hr = IDirectDrawSurface7_SetColorKey(src, DDCKEY_SRCBLT, &ckey); - ok(SUCCEEDED(hr), "Failed to set color key, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set color key, hr %#lx.\n", hr); ckey.dwColorSpaceLowValue = 0x000000aa; ckey.dwColorSpaceHighValue = 0x000000aa; hr = IDirectDrawSurface7_SetColorKey(src, DDCKEY_DESTBLT, &ckey); - ok(SUCCEEDED(hr), "Failed to set color key, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set color key, hr %#lx.\n", hr);
memset(&fx, 0, sizeof(fx)); fx.dwSize = sizeof(fx); @@ -14802,7 +14802,7 @@ static void test_ck_operation(void) fx.ddckDestColorkey.dwColorSpaceLowValue = 0x00001100;
hr = IDirectDrawSurface7_Lock(src, NULL, &surface_desc, DDLOCK_WAIT, NULL); - ok(SUCCEEDED(hr), "Failed to lock surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to lock surface, hr %#lx.\n", hr); color = surface_desc.lpSurface; color[0] = 0x000000ff; /* Applies to src blt key in src surface. */ color[1] = 0x000000aa; /* Applies to dst blt key in src surface. */ @@ -14811,77 +14811,77 @@ static void test_ck_operation(void) color[4] = 0x00001100; /* Src color key in ddbltfx. */ color[5] = 0x00110000; /* Dst color key in ddbltfx. */ hr = IDirectDrawSurface7_Unlock(src, NULL); - ok(SUCCEEDED(hr), "Failed to unlock surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to unlock surface, hr %#lx.\n", hr);
hr = IDirectDrawSurface7_Lock(dst, NULL, &surface_desc, DDLOCK_WAIT, NULL); - ok(SUCCEEDED(hr), "Failed to lock surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to lock surface, hr %#lx.\n", hr); color = surface_desc.lpSurface; color[0] = color[1] = color[2] = color[3] = color[4] = color[5] = 0x55555555; hr = IDirectDrawSurface7_Unlock(dst, NULL); - ok(SUCCEEDED(hr), "Failed to unlock surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to unlock surface, hr %#lx.\n", hr);
/* Test a blit without keying. */ hr = IDirectDrawSurface7_Blt(dst, NULL, src, NULL, 0, &fx); - ok(SUCCEEDED(hr), "Failed to blit, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to blit, hr %#lx.\n", hr);
hr = IDirectDrawSurface7_Lock(dst, NULL, &surface_desc, DDLOCK_WAIT, NULL); - ok(SUCCEEDED(hr), "Failed to lock surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to lock surface, hr %#lx.\n", hr); color = surface_desc.lpSurface; /* Should have copied src data unmodified to dst. */ ok(color[0] == 0x000000ff && color[1] == 0x000000aa && color[2] == 0x00ff0000 && color[3] == 0x0000ff00 && color[4] == 0x00001100 && color[5] == 0x00110000, - "Got unexpected content %08x %08x %08x %08x %08x %08x.\n", + "Got unexpected content %08lx %08lx %08lx %08lx %08lx %08lx.\n", color[0], color[1], color[2], color[3], color[4], color[5]);
color[0] = color[1] = color[2] = color[3] = color[4] = color[5] = 0x55555555; hr = IDirectDrawSurface7_Unlock(dst, NULL); - ok(SUCCEEDED(hr), "Failed to unlock surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to unlock surface, hr %#lx.\n", hr);
/* Src key. */ hr = IDirectDrawSurface7_Blt(dst, NULL, src, NULL, DDBLT_KEYSRC, &fx); - ok(SUCCEEDED(hr), "Failed to blit, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to blit, hr %#lx.\n", hr);
hr = IDirectDrawSurface7_Lock(dst, NULL, &surface_desc, DDLOCK_WAIT, NULL); - ok(SUCCEEDED(hr), "Failed to lock surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to lock surface, hr %#lx.\n", hr); color = surface_desc.lpSurface; /* Src key applied to color[0]. It is unmodified, the others are copied. */ ok(color[0] == 0x55555555 && color[1] == 0x000000aa && color[2] == 0x00ff0000 && color[3] == 0x0000ff00 && color[4] == 0x00001100 && color[5] == 0x00110000, - "Got unexpected content %08x %08x %08x %08x %08x %08x.\n", + "Got unexpected content %08lx %08lx %08lx %08lx %08lx %08lx.\n", color[0], color[1], color[2], color[3], color[4], color[5]);
color[0] = color[1] = color[2] = color[3] = color[4] = color[5] = 0x55555555; hr = IDirectDrawSurface7_Unlock(dst, NULL); - ok(SUCCEEDED(hr), "Failed to unlock surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to unlock surface, hr %#lx.\n", hr);
/* Src override. */ hr = IDirectDrawSurface7_Blt(dst, NULL, src, NULL, DDBLT_KEYSRCOVERRIDE, &fx); - ok(SUCCEEDED(hr), "Failed to blit, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to blit, hr %#lx.\n", hr);
hr = IDirectDrawSurface7_Lock(dst, NULL, &surface_desc, DDLOCK_WAIT, NULL); - ok(SUCCEEDED(hr), "Failed to lock surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to lock surface, hr %#lx.\n", hr); color = surface_desc.lpSurface; /* Override key applied to color[5]. It is unmodified, the others are copied. */ ok(color[0] == 0x000000ff && color[1] == 0x000000aa && color[2] == 0x00ff0000 && color[3] == 0x0000ff00 && color[4] == 0x00001100 && color[5] == 0x55555555, - "Got unexpected content %08x %08x %08x %08x %08x %08x.\n", + "Got unexpected content %08lx %08lx %08lx %08lx %08lx %08lx.\n", color[0], color[1], color[2], color[3], color[4], color[5]);
color[0] = color[1] = color[2] = color[3] = color[4] = color[5] = 0x55555555; hr = IDirectDrawSurface7_Unlock(dst, NULL); - ok(SUCCEEDED(hr), "Failed to unlock surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to unlock surface, hr %#lx.\n", hr);
/* Src override AND src key. That is not supposed to work. */ hr = IDirectDrawSurface7_Blt(dst, NULL, src, NULL, DDBLT_KEYSRC | DDBLT_KEYSRCOVERRIDE, &fx); - ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#lx.\n", hr);
hr = IDirectDrawSurface7_Lock(dst, NULL, &surface_desc, DDLOCK_WAIT, NULL); - ok(SUCCEEDED(hr), "Failed to lock surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to lock surface, hr %#lx.\n", hr); color = surface_desc.lpSurface; /* Ensure the destination was not changed. */ ok(color[0] == 0x55555555 && color[1] == 0x55555555 && color[2] == 0x55555555 && color[3] == 0x55555555 && color[4] == 0x55555555 && color[5] == 0x55555555, - "Got unexpected content %08x %08x %08x %08x %08x %08x.\n", + "Got unexpected content %08lx %08lx %08lx %08lx %08lx %08lx.\n", color[0], color[1], color[2], color[3], color[4], color[5]);
/* Use different dst colors for the dst key test. */ @@ -14892,19 +14892,19 @@ static void test_ck_operation(void) color[4] = 0x000000aa; /* Dest key in src surface. */ color[5] = 0x000000aa; /* Dest key in src surface. */ hr = IDirectDrawSurface7_Unlock(dst, NULL); - ok(SUCCEEDED(hr), "Failed to unlock surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to unlock surface, hr %#lx.\n", hr);
/* Dest key blit. The key is taken from the DESTINATION surface in v7! */ hr = IDirectDrawSurface7_Blt(dst, NULL, src, NULL, DDBLT_KEYDEST, &fx); - ok(SUCCEEDED(hr), "Failed to blit, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to blit, hr %#lx.\n", hr);
hr = IDirectDrawSurface7_Lock(dst, NULL, &surface_desc, DDLOCK_WAIT, NULL); - ok(SUCCEEDED(hr), "Failed to lock surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to lock surface, hr %#lx.\n", hr); color = surface_desc.lpSurface; /* Dst key applied to color[0,1], they are the only changed pixels. */ todo_wine ok(color[0] == 0x000000ff && color[1] == 0x000000aa && color[2] == 0x00001100 && color[3] == 0x00001100 && color[4] == 0x000000aa && color[5] == 0x000000aa, - "Got unexpected content %08x %08x %08x %08x %08x %08x.\n", + "Got unexpected content %08lx %08lx %08lx %08lx %08lx %08lx.\n", color[0], color[1], color[2], color[3], color[4], color[5]);
color[0] = 0x00ff0000; /* Dest key in dst surface. */ @@ -14914,28 +14914,28 @@ static void test_ck_operation(void) color[4] = 0x000000aa; /* Dest key in src surface. */ color[5] = 0x000000aa; /* Dest key in src surface. */ hr = IDirectDrawSurface7_Unlock(dst, NULL); - ok(SUCCEEDED(hr), "Failed to unlock surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to unlock surface, hr %#lx.\n", hr);
/* What happens with a QI'd older version of the interface? It takes the key * from the source surface. */ hr = IDirectDrawSurface7_QueryInterface(src, &IID_IDirectDrawSurface, (void **)&src1); - ok(SUCCEEDED(hr), "Failed to query IDirectDrawSurface interface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to query IDirectDrawSurface interface, hr %#lx.\n", hr); hr = IDirectDrawSurface7_QueryInterface(dst, &IID_IDirectDrawSurface, (void **)&dst1); - ok(SUCCEEDED(hr), "Failed to query IDirectDrawSurface interface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to query IDirectDrawSurface interface, hr %#lx.\n", hr);
hr = IDirectDrawSurface_Blt(dst1, NULL, src1, NULL, DDBLT_KEYDEST, &fx); - ok(SUCCEEDED(hr), "Failed to blit, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to blit, hr %#lx.\n", hr);
IDirectDrawSurface_Release(dst1); IDirectDrawSurface_Release(src1);
hr = IDirectDrawSurface7_Lock(dst, NULL, &surface_desc, DDLOCK_WAIT, NULL); - ok(SUCCEEDED(hr), "Failed to lock surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to lock surface, hr %#lx.\n", hr); color = surface_desc.lpSurface; /* Dst key applied to color[4,5], they are the only changed pixels. */ ok(color[0] == 0x00ff0000 && color[1] == 0x00ff0000 && color[2] == 0x00001100 && color[3] == 0x00001100 && color[4] == 0x00001100 && color[5] == 0x00110000, - "Got unexpected content %08x %08x %08x %08x %08x %08x.\n", + "Got unexpected content %08lx %08lx %08lx %08lx %08lx %08lx.\n", color[0], color[1], color[2], color[3], color[4], color[5]);
color[0] = 0x00ff0000; /* Dest key in dst surface. */ @@ -14945,19 +14945,19 @@ static void test_ck_operation(void) color[4] = 0x000000aa; /* Dest key in src surface. */ color[5] = 0x000000aa; /* Dest key in src surface. */ hr = IDirectDrawSurface7_Unlock(dst, NULL); - ok(SUCCEEDED(hr), "Failed to unlock surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to unlock surface, hr %#lx.\n", hr);
/* Dest override key blit. */ hr = IDirectDrawSurface7_Blt(dst, NULL, src, NULL, DDBLT_KEYDESTOVERRIDE, &fx); - ok(SUCCEEDED(hr), "Failed to blit, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to blit, hr %#lx.\n", hr);
hr = IDirectDrawSurface7_Lock(dst, NULL, &surface_desc, DDLOCK_WAIT, NULL); - ok(SUCCEEDED(hr), "Failed to lock surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to lock surface, hr %#lx.\n", hr); color = surface_desc.lpSurface; /* Dst key applied to color[2,3], they are the only changed pixels. */ ok(color[0] == 0x00ff0000 && color[1] == 0x00ff0000 && color[2] == 0x00ff0000 && color[3] == 0x0000ff00 && color[4] == 0x000000aa && color[5] == 0x000000aa, - "Got unexpected content %08x %08x %08x %08x %08x %08x.\n", + "Got unexpected content %08lx %08lx %08lx %08lx %08lx %08lx.\n", color[0], color[1], color[2], color[3], color[4], color[5]);
color[0] = 0x00ff0000; /* Dest key in dst surface. */ @@ -14967,38 +14967,38 @@ static void test_ck_operation(void) color[4] = 0x000000aa; /* Dest key in src surface. */ color[5] = 0x000000aa; /* Dest key in src surface. */ hr = IDirectDrawSurface7_Unlock(dst, NULL); - ok(SUCCEEDED(hr), "Failed to unlock surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to unlock surface, hr %#lx.\n", hr);
/* Dest override together with surface key. Supposed to fail. */ hr = IDirectDrawSurface7_Blt(dst, NULL, src, NULL, DDBLT_KEYDEST | DDBLT_KEYDESTOVERRIDE, &fx); - ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#lx.\n", hr);
hr = IDirectDrawSurface7_Lock(dst, NULL, &surface_desc, DDLOCK_WAIT, NULL); - ok(SUCCEEDED(hr), "Failed to lock surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to lock surface, hr %#lx.\n", hr); color = surface_desc.lpSurface; /* Destination is unchanged. */ ok(color[0] == 0x00ff0000 && color[1] == 0x00ff0000 && color[2] == 0x00001100 && color[3] == 0x00001100 && color[4] == 0x000000aa && color[5] == 0x000000aa, - "Got unexpected content %08x %08x %08x %08x %08x %08x.\n", + "Got unexpected content %08lx %08lx %08lx %08lx %08lx %08lx.\n", color[0], color[1], color[2], color[3], color[4], color[5]); hr = IDirectDrawSurface7_Unlock(dst, NULL); - ok(SUCCEEDED(hr), "Failed to unlock surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to unlock surface, hr %#lx.\n", hr);
/* Source and destination key. This is driver dependent. New HW treats it like * DDBLT_KEYSRC. Older HW and some software renderers apply both keys. */ if (0) { hr = IDirectDrawSurface7_Blt(dst, NULL, src, NULL, DDBLT_KEYDEST | DDBLT_KEYSRC, &fx); - ok(SUCCEEDED(hr), "Failed to blit, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to blit, hr %#lx.\n", hr);
hr = IDirectDrawSurface7_Lock(dst, NULL, &surface_desc, DDLOCK_WAIT, NULL); - ok(SUCCEEDED(hr), "Failed to lock surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to lock surface, hr %#lx.\n", hr); color = surface_desc.lpSurface; /* Color[0] is filtered by the src key, 2-5 are filtered by the dst key, if * the driver applies it. */ ok(color[0] == 0x00ff0000 && color[1] == 0x000000aa && color[2] == 0x00ff0000 && color[3] == 0x0000ff00 && color[4] == 0x00001100 && color[5] == 0x00110000, - "Got unexpected content %08x %08x %08x %08x %08x %08x.\n", + "Got unexpected content %08lx %08lx %08lx %08lx %08lx %08lx.\n", color[0], color[1], color[2], color[3], color[4], color[5]);
color[0] = 0x00ff0000; /* Dest key in dst surface. */ @@ -15008,55 +15008,55 @@ static void test_ck_operation(void) color[4] = 0x000000aa; /* Dest key in src surface. */ color[5] = 0x000000aa; /* Dest key in src surface. */ hr = IDirectDrawSurface7_Unlock(dst, NULL); - ok(SUCCEEDED(hr), "Failed to unlock surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to unlock surface, hr %#lx.\n", hr); }
/* Override keys without ddbltfx parameter fail */ hr = IDirectDrawSurface7_Blt(dst, NULL, src, NULL, DDBLT_KEYDESTOVERRIDE, NULL); - ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface7_Blt(dst, NULL, src, NULL, DDBLT_KEYSRCOVERRIDE, NULL); - ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#lx.\n", hr);
/* Try blitting without keys in the source surface. */ hr = IDirectDrawSurface7_SetColorKey(src, DDCKEY_SRCBLT, NULL); - ok(SUCCEEDED(hr), "Failed to set color key, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set color key, hr %#lx.\n", hr); hr = IDirectDrawSurface7_SetColorKey(src, DDCKEY_DESTBLT, NULL); - ok(SUCCEEDED(hr), "Failed to set color key, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set color key, hr %#lx.\n", hr);
/* That fails now. Do not bother to check that the data is unmodified. */ hr = IDirectDrawSurface7_Blt(dst, NULL, src, NULL, DDBLT_KEYSRC, &fx); - ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#lx.\n", hr);
/* Dest key blit still works, the destination surface key is used in v7. */ hr = IDirectDrawSurface7_Blt(dst, NULL, src, NULL, DDBLT_KEYDEST, &fx); - ok(SUCCEEDED(hr), "Failed to blit, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to blit, hr %#lx.\n", hr);
hr = IDirectDrawSurface7_Lock(dst, NULL, &surface_desc, DDLOCK_WAIT, NULL); - ok(SUCCEEDED(hr), "Failed to lock surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to lock surface, hr %#lx.\n", hr); color = surface_desc.lpSurface; /* Dst key applied to color[0,1], they are the only changed pixels. */ todo_wine ok(color[0] == 0x000000ff && color[1] == 0x000000aa && color[2] == 0x00001100 && color[3] == 0x00001100 && color[4] == 0x000000aa && color[5] == 0x000000aa, - "Got unexpected content %08x %08x %08x %08x %08x %08x.\n", + "Got unexpected content %08lx %08lx %08lx %08lx %08lx %08lx.\n", color[0], color[1], color[2], color[3], color[4], color[5]); hr = IDirectDrawSurface7_Unlock(dst, NULL); - ok(SUCCEEDED(hr), "Failed to unlock surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to unlock surface, hr %#lx.\n", hr);
/* Try blitting without keys in the destination surface. */ hr = IDirectDrawSurface7_SetColorKey(dst, DDCKEY_SRCBLT, NULL); - ok(SUCCEEDED(hr), "Failed to set color key, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set color key, hr %#lx.\n", hr); hr = IDirectDrawSurface7_SetColorKey(dst, DDCKEY_DESTBLT, NULL); - ok(SUCCEEDED(hr), "Failed to set color key, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set color key, hr %#lx.\n", hr);
/* This fails, as sanity would dictate. */ hr = IDirectDrawSurface7_Blt(dst, NULL, src, NULL, DDBLT_KEYDEST, &fx); - ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#lx.\n", hr);
done: IDirectDrawSurface7_Release(src); IDirectDrawSurface7_Release(dst); refcount = IDirectDraw7_Release(ddraw); - ok(!refcount, "DirectDraw has %u references left.\n", refcount); + ok(!refcount, "DirectDraw has %lu references left.\n", refcount); DestroyWindow(window); }
@@ -15083,7 +15083,7 @@ static void test_vb_refcount(void) }
hr = IDirect3DDevice7_GetDirect3D(device, &d3d); - ok(SUCCEEDED(hr), "Failed to get Direct3D7 interface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get Direct3D7 interface, hr %#lx.\n", hr);
prev_d3d_refcount = get_refcount((IUnknown *)d3d); prev_device_refcount = get_refcount((IUnknown *)device); @@ -15093,37 +15093,37 @@ static void test_vb_refcount(void) vb_desc.dwFVF = D3DFVF_XYZ; vb_desc.dwNumVertices = 4; hr = IDirect3D7_CreateVertexBuffer(d3d, &vb_desc, &vb, 0); - ok(SUCCEEDED(hr), "Failed to create vertex buffer, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create vertex buffer, hr %#lx.\n", hr);
cur_d3d_refcount = get_refcount((IUnknown *)d3d); cur_device_refcount = get_refcount((IUnknown *)device); - ok(cur_d3d_refcount > prev_d3d_refcount, "D3D object refcount didn't change from %u.\n", prev_d3d_refcount); - ok(cur_device_refcount == prev_device_refcount, "Device refcount changed from %u to %u.\n", + ok(cur_d3d_refcount > prev_d3d_refcount, "D3D object refcount didn't change from %lu.\n", prev_d3d_refcount); + ok(cur_device_refcount == prev_device_refcount, "Device refcount changed from %lu to %lu.\n", prev_device_refcount, cur_device_refcount);
prev_d3d_refcount = cur_d3d_refcount; hr = IDirect3DVertexBuffer7_QueryInterface(vb, &IID_IDirect3DVertexBuffer7, (void **)&vb7); - ok(hr == DD_OK, "Failed to query IDirect3DVertexBuffer7, hr %#x.\n", hr); + ok(hr == DD_OK, "Failed to query IDirect3DVertexBuffer7, hr %#lx.\n", hr); cur_d3d_refcount = get_refcount((IUnknown *)d3d); - ok(cur_d3d_refcount == prev_d3d_refcount, "D3D object refcount changed from %u to %u.\n", + ok(cur_d3d_refcount == prev_d3d_refcount, "D3D object refcount changed from %lu to %lu.\n", prev_d3d_refcount, cur_d3d_refcount); IDirect3DVertexBuffer7_Release(vb7);
hr = IDirect3DVertexBuffer7_QueryInterface(vb, &IID_IDirect3DVertexBuffer, (void **)&vb1); - ok(hr == E_NOINTERFACE, "Querying IDirect3DVertexBuffer returned unexpected hr %#x.\n", hr); + ok(hr == E_NOINTERFACE, "Querying IDirect3DVertexBuffer returned unexpected hr %#lx.\n", hr);
hr = IDirect3DVertexBuffer_QueryInterface(vb, &IID_IUnknown, (void **)&unk); - ok(hr == DD_OK, "Failed to query IUnknown, hr %#x.\n", hr); + ok(hr == DD_OK, "Failed to query IUnknown, hr %#lx.\n", hr); ok((IUnknown *)vb == unk, "IDirect3DVertexBuffer7 and IUnknown interface pointers don't match, %p != %p.\n", vb, unk); IUnknown_Release(unk);
refcount = IDirect3DVertexBuffer7_Release(vb); - ok(!refcount, "Vertex buffer has %u references left.\n", refcount); + ok(!refcount, "Vertex buffer has %lu references left.\n", refcount);
IDirect3D7_Release(d3d); refcount = IDirect3DDevice7_Release(device); - ok(!refcount, "Device has %u references left.\n", refcount); + ok(!refcount, "Device has %lu references left.\n", refcount); DestroyWindow(window); }
@@ -15205,7 +15205,7 @@ static void test_compute_sphere_visibility(void) }
hr = IDirect3DDevice7_SetClipPlane(device, 0, clip_plane); - ok(SUCCEEDED(hr), "Failed to set user clip plane, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set user clip plane, hr %#lx.\n", hr);
IDirect3DDevice7_SetTransform(device, D3DTRANSFORMSTATE_WORLD, &identity);
@@ -15216,19 +15216,19 @@ static void test_compute_sphere_visibility(void)
hr = IDirect3DDevice7_SetRenderState(device, D3DRENDERSTATE_CLIPPLANEENABLE, tests[i].enable_planes); - ok(SUCCEEDED(hr), "Failed to enable / disable user clip planes, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to enable / disable user clip planes, hr %#lx.\n", hr);
hr = IDirect3DDevice7_ComputeSphereVisibility(device, tests[i].center, tests[i].radius, tests[i].sphere_count, 0, result); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
for (j = 0; j < tests[i].sphere_count; ++j) - ok(result[j] == tests[i].expected[j], "Test %u sphere %u: expected %#x, got %#x.\n", + ok(result[j] == tests[i].expected[j], "Test %u sphere %u: expected %#lx, got %#lx.\n", i, j, tests[i].expected[j], result[j]); }
refcount = IDirect3DDevice7_Release(device); - ok(!refcount, "Device has %u references left.\n", refcount); + ok(!refcount, "Device has %lu references left.\n", refcount); DestroyWindow(window); }
@@ -15253,7 +15253,7 @@ static void test_clip_planes_limits(void)
memset(&caps, 0, sizeof(caps)); hr = IDirect3DDevice7_GetCaps(device, &caps); - ok(SUCCEEDED(hr), "Failed to get device caps, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get device caps, hr %#lx.\n", hr);
trace("Max user clip planes: %u.\n", caps.wMaxUserClipPlanes);
@@ -15261,7 +15261,7 @@ static void test_clip_planes_limits(void) { memset(plane, 0xff, sizeof(plane)); hr = IDirect3DDevice7_GetClipPlane(device, i, plane); - ok(hr == D3D_OK, "Failed to get clip plane %u, hr %#x.\n", i, hr); + ok(hr == D3D_OK, "Failed to get clip plane %u, hr %#lx.\n", i, hr); ok(!plane[0] && !plane[1] && !plane[2] && !plane[3], "Got unexpected plane %u: %.8e, %.8e, %.8e, %.8e.\n", i, plane[0], plane[1], plane[2], plane[3]); @@ -15274,31 +15274,31 @@ static void test_clip_planes_limits(void) { plane[3] = i; hr = IDirect3DDevice7_SetClipPlane(device, i, plane); - ok(hr == D3D_OK, "Failed to set clip plane %u, hr %#x.\n", i, hr); + ok(hr == D3D_OK, "Failed to set clip plane %u, hr %#lx.\n", i, hr); } for (i = 0; i < caps.wMaxUserClipPlanes; ++i) { memset(plane, 0xff, sizeof(plane)); hr = IDirect3DDevice7_GetClipPlane(device, i, plane); - ok(hr == D3D_OK, "Failed to get clip plane %u, hr %#x.\n", i, hr); + ok(hr == D3D_OK, "Failed to get clip plane %u, hr %#lx.\n", i, hr); ok(plane[0] == 2.0f && plane[1] == 8.0f && plane[2] == 5.0f && plane[3] == i, "Got unexpected plane %u: %.8e, %.8e, %.8e, %.8e.\n", i, plane[0], plane[1], plane[2], plane[3]); }
hr = IDirect3DDevice7_SetRenderState(device, D3DRENDERSTATE_CLIPPLANEENABLE, 0xffffffff); - ok(SUCCEEDED(hr), "Failed to set render state, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set render state, hr %#lx.\n", hr); hr = IDirect3DDevice7_GetRenderState(device, D3DRENDERSTATE_CLIPPLANEENABLE, &state); - ok(SUCCEEDED(hr), "Failed to get render state, hr %#x.\n", hr); - ok(state == 0xffffffff, "Got unexpected state %#x.\n", state); + ok(SUCCEEDED(hr), "Failed to get render state, hr %#lx.\n", hr); + ok(state == 0xffffffff, "Got unexpected state %#lx.\n", state); hr = IDirect3DDevice7_SetRenderState(device, D3DRENDERSTATE_CLIPPLANEENABLE, 0x80000000); - ok(SUCCEEDED(hr), "Failed to set render state, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set render state, hr %#lx.\n", hr); hr = IDirect3DDevice7_GetRenderState(device, D3DRENDERSTATE_CLIPPLANEENABLE, &state); - ok(SUCCEEDED(hr), "Failed to get render state, hr %#x.\n", hr); - ok(state == 0x80000000, "Got unexpected state %#x.\n", state); + ok(SUCCEEDED(hr), "Failed to get render state, hr %#lx.\n", hr); + ok(state == 0x80000000, "Got unexpected state %#lx.\n", state);
refcount = IDirect3DDevice7_Release(device); - ok(!refcount, "Device has %u references left.\n", refcount); + ok(!refcount, "Device has %lu references left.\n", refcount); DestroyWindow(window); }
@@ -15322,9 +15322,9 @@ static void test_texture_stages_limits(void) return; } hr = IDirect3DDevice7_GetDirect3D(device, &d3d); - ok(SUCCEEDED(hr), "Failed to get Direct3D interface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get Direct3D interface, hr %#lx.\n", hr); hr = IDirect3D7_QueryInterface(d3d, &IID_IDirectDraw7, (void **)&ddraw); - ok(SUCCEEDED(hr), "Failed to get DirectDraw interface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get DirectDraw interface, hr %#lx.\n", hr); IDirect3D7_Release(d3d);
memset(&surface_desc, 0, sizeof(surface_desc)); @@ -15334,22 +15334,22 @@ static void test_texture_stages_limits(void) surface_desc.dwWidth = 16; surface_desc.dwHeight = 16; hr = IDirectDraw7_CreateSurface(ddraw, &surface_desc, &texture, NULL); - ok(hr == DD_OK, "Failed to create surface, hr %#x.\n", hr); + ok(hr == DD_OK, "Failed to create surface, hr %#lx.\n", hr);
for (i = 0; i < 8; ++i) { hr = IDirect3DDevice7_SetTexture(device, i, texture); - ok(hr == D3D_OK, "Failed to set texture %u, hr %#x.\n", i, hr); + ok(hr == D3D_OK, "Failed to set texture %u, hr %#lx.\n", i, hr); hr = IDirect3DDevice7_SetTexture(device, i, NULL); - ok(hr == D3D_OK, "Failed to set texture %u, hr %#x.\n", i, hr); + ok(hr == D3D_OK, "Failed to set texture %u, hr %#lx.\n", i, hr); hr = IDirect3DDevice7_SetTextureStageState(device, i, D3DTSS_COLOROP, D3DTOP_ADD); - ok(hr == D3D_OK, "Failed to set texture stage state %u, hr %#x.\n", i, hr); + ok(hr == D3D_OK, "Failed to set texture stage state %u, hr %#lx.\n", i, hr); }
IDirectDrawSurface7_Release(texture); IDirectDraw7_Release(ddraw); refcount = IDirect3DDevice7_Release(device); - ok(!refcount, "Device has %u references left.\n", refcount); + ok(!refcount, "Device has %lu references left.\n", refcount); DestroyWindow(window); }
@@ -15370,26 +15370,26 @@ static void test_set_render_state(void) }
hr = IDirect3DDevice7_SetRenderState(device, D3DRENDERSTATE_ZVISIBLE, TRUE); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirect3DDevice7_SetRenderState(device, D3DRENDERSTATE_ZVISIBLE, FALSE); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
/* States deprecated in D3D7 */ hr = IDirect3DDevice7_SetRenderState(device, D3DRENDERSTATE_TEXTUREHANDLE, 0); - ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#lx.\n", hr); state = 0xdeadbeef; hr = IDirect3DDevice7_GetRenderState(device, D3DRENDERSTATE_TEXTUREHANDLE, &state); - ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#x.\n", hr); - ok(state == 0xdeadbeef, "Got unexpected render state %#x.\n", state); + ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#lx.\n", hr); + ok(state == 0xdeadbeef, "Got unexpected render state %#lx.\n", state); hr = IDirect3DDevice7_SetRenderState(device, D3DRENDERSTATE_TEXTUREMAPBLEND, D3DTBLEND_MODULATE); - ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#lx.\n", hr); state = 0xdeadbeef; hr = IDirect3DDevice7_GetRenderState(device, D3DRENDERSTATE_TEXTUREMAPBLEND, &state); - ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#x.\n", hr); - ok(state == 0xdeadbeef, "Got unexpected render state %#x.\n", state); + ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#lx.\n", hr); + ok(state == 0xdeadbeef, "Got unexpected render state %#lx.\n", state);
refcount = IDirect3DDevice7_Release(device); - ok(!refcount, "Device has %u references left.\n", refcount); + ok(!refcount, "Device has %lu references left.\n", refcount); DestroyWindow(window); }
@@ -15461,9 +15461,9 @@ static void test_map_synchronisation(void) }
hr = IDirect3DDevice7_GetDirect3D(device, &d3d); - ok(SUCCEEDED(hr), "Failed to get Direct3D7 interface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get Direct3D7 interface, hr %#lx.\n", hr); hr = IDirect3D7_QueryInterface(d3d, &IID_IDirectDraw7, (void **)&ddraw); - ok(SUCCEEDED(hr), "Failed to get ddraw interface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get ddraw interface, hr %#lx.\n", hr); /* Maps are always synchronised on WARP. */ if (ddraw_is_warp(ddraw)) { @@ -15472,7 +15472,7 @@ static void test_map_synchronisation(void) }
hr = IDirect3DDevice7_GetRenderTarget(device, &rt); - ok(SUCCEEDED(hr), "Failed to get render target, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get render target, hr %#lx.\n", hr);
tri_count = 0x1000;
@@ -15484,28 +15484,28 @@ static void test_map_synchronisation(void) vb_desc.dwFVF = D3DFVF_XYZ | D3DFVF_DIFFUSE; vb_desc.dwNumVertices = tri_count + 2; hr = IDirect3D7_CreateVertexBuffer(d3d, &vb_desc, &buffer, 0); - ok(SUCCEEDED(hr), "Failed to create vertex buffer, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create vertex buffer, hr %#lx.\n", hr); hr = IDirect3DVertexBuffer7_Lock(buffer, DDLOCK_DISCARDCONTENTS, (void **)&quads, NULL); - ok(SUCCEEDED(hr), "Failed to lock vertex buffer, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to lock vertex buffer, hr %#lx.\n", hr); for (j = 0; j < vb_desc.dwNumVertices / 4; ++j) { quads[j] = quad1; } hr = IDirect3DVertexBuffer7_Unlock(buffer); - ok(SUCCEEDED(hr), "Failed to unlock vertex buffer, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to unlock vertex buffer, hr %#lx.\n", hr);
hr = IDirect3DDevice7_SetRenderState(device, D3DRENDERSTATE_LIGHTING, FALSE); - ok(SUCCEEDED(hr), "Failed to set render state, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set render state, hr %#lx.\n", hr);
/* Initial draw to initialise states, compile shaders, etc. */ hr = IDirect3DDevice7_Clear(device, 0, NULL, D3DCLEAR_TARGET, 0xff0000ff, 0.0f, 0); - ok(SUCCEEDED(hr), "Failed to clear, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to clear, hr %#lx.\n", hr); hr = IDirect3DDevice7_BeginScene(device); - ok(SUCCEEDED(hr), "Failed to begin scene, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to begin scene, hr %#lx.\n", hr); hr = IDirect3DDevice7_DrawPrimitiveVB(device, D3DPT_TRIANGLESTRIP, buffer, 0, vb_desc.dwNumVertices, 0); - ok(SUCCEEDED(hr), "Failed to draw, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to draw, hr %#lx.\n", hr); hr = IDirect3DDevice7_EndScene(device); - ok(SUCCEEDED(hr), "Failed to end scene, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to end scene, hr %#lx.\n", hr); /* Read the result to ensure the GPU has finished drawing. */ colour = get_surface_color(rt, 320, 240);
@@ -15513,25 +15513,25 @@ static void test_map_synchronisation(void) ret = QueryPerformanceCounter(&ts[0]); ok(ret, "Failed to read performance counter.\n"); hr = IDirect3DDevice7_Clear(device, 0, NULL, D3DCLEAR_TARGET, 0xff0000ff, 0.0f, 0); - ok(SUCCEEDED(hr), "Failed to clear, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to clear, hr %#lx.\n", hr); hr = IDirect3DDevice7_BeginScene(device); - ok(SUCCEEDED(hr), "Failed to begin scene, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to begin scene, hr %#lx.\n", hr); hr = IDirect3DDevice7_DrawPrimitiveVB(device, D3DPT_TRIANGLESTRIP, buffer, 0, vb_desc.dwNumVertices, 0); - ok(SUCCEEDED(hr), "Failed to draw, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to draw, hr %#lx.\n", hr); hr = IDirect3DDevice7_EndScene(device); - ok(SUCCEEDED(hr), "Failed to end scene, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to end scene, hr %#lx.\n", hr); colour = get_surface_color(rt, 320, 240); /* Time drawing a single triangle. */ ret = QueryPerformanceCounter(&ts[1]); ok(ret, "Failed to read performance counter.\n"); hr = IDirect3DDevice7_Clear(device, 0, NULL, D3DCLEAR_TARGET, 0xff0000ff, 0.0f, 0); - ok(SUCCEEDED(hr), "Failed to clear, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to clear, hr %#lx.\n", hr); hr = IDirect3DDevice7_BeginScene(device); - ok(SUCCEEDED(hr), "Failed to begin scene, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to begin scene, hr %#lx.\n", hr); hr = IDirect3DDevice7_DrawPrimitiveVB(device, D3DPT_TRIANGLESTRIP, buffer, 0, 3, 0); - ok(SUCCEEDED(hr), "Failed to draw, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to draw, hr %#lx.\n", hr); hr = IDirect3DDevice7_EndScene(device); - ok(SUCCEEDED(hr), "Failed to end scene, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to end scene, hr %#lx.\n", hr); colour = get_surface_color(rt, 320, 240); ret = QueryPerformanceCounter(&ts[2]); ok(ret, "Failed to read performance counter.\n"); @@ -15547,32 +15547,32 @@ static void test_map_synchronisation(void) for (i = 0; i < ARRAY_SIZE(tests); ++i) { hr = IDirect3D7_CreateVertexBuffer(d3d, &vb_desc, &buffer, 0); - ok(SUCCEEDED(hr), "Failed to create vertex buffer, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create vertex buffer, hr %#lx.\n", hr); hr = IDirect3DVertexBuffer7_Lock(buffer, DDLOCK_DISCARDCONTENTS, (void **)&quads, NULL); - ok(SUCCEEDED(hr), "Failed to lock vertex buffer, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to lock vertex buffer, hr %#lx.\n", hr); for (j = 0; j < vb_desc.dwNumVertices / 4; ++j) { quads[j] = quad1; } hr = IDirect3DVertexBuffer7_Unlock(buffer); - ok(SUCCEEDED(hr), "Failed to unlock vertex buffer, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to unlock vertex buffer, hr %#lx.\n", hr);
/* Start a draw operation. */ hr = IDirect3DDevice7_Clear(device, 0, NULL, D3DCLEAR_TARGET, 0xff0000ff, 0.0f, 0); - ok(SUCCEEDED(hr), "Failed to clear, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to clear, hr %#lx.\n", hr); hr = IDirect3DDevice7_BeginScene(device); - ok(SUCCEEDED(hr), "Failed to begin scene, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to begin scene, hr %#lx.\n", hr); hr = IDirect3DDevice7_DrawPrimitiveVB(device, D3DPT_TRIANGLESTRIP, buffer, 0, vb_desc.dwNumVertices, 0); - ok(SUCCEEDED(hr), "Failed to draw, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to draw, hr %#lx.\n", hr); hr = IDirect3DDevice7_EndScene(device); - ok(SUCCEEDED(hr), "Failed to end scene, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to end scene, hr %#lx.\n", hr);
/* Map the last quad while the draw is in progress. */ hr = IDirect3DVertexBuffer7_Lock(buffer, DDLOCK_WAIT | tests[i].flags, (void **)&quads, NULL); - ok(SUCCEEDED(hr), "Failed to lock vertex buffer, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to lock vertex buffer, hr %#lx.\n", hr); quads[(vb_desc.dwNumVertices / 4) - 1] = quad2; hr = IDirect3DVertexBuffer7_Unlock(buffer); - ok(SUCCEEDED(hr), "Failed to unlock vertex buffer, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to unlock vertex buffer, hr %#lx.\n", hr);
colour = get_surface_color(rt, 320, 240); unsynchronised = compare_color(colour, 0x00ffff00, 1); @@ -15587,7 +15587,7 @@ done: IDirectDraw7_Release(ddraw); IDirect3D7_Release(d3d); refcount = IDirect3DDevice7_Release(device); - ok(!refcount, "Device has %u references left.\n", refcount); + ok(!refcount, "Device has %lu references left.\n", refcount); DestroyWindow(window); }
@@ -15644,19 +15644,19 @@ static void test_depth_readback(void) }
hr = IDirect3DDevice7_GetDirect3D(device, &d3d); - ok(SUCCEEDED(hr), "Failed to get Direct3D7 interface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get Direct3D7 interface, hr %#lx.\n", hr); hr = IDirect3D7_QueryInterface(d3d, &IID_IDirectDraw7, (void **)&ddraw); - ok(SUCCEEDED(hr), "Failed to get ddraw interface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get ddraw interface, hr %#lx.\n", hr);
hr = IDirect3DDevice7_GetRenderTarget(device, &rt); - ok(SUCCEEDED(hr), "Failed to get render target, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get render target, hr %#lx.\n", hr);
hr = IDirect3DDevice7_SetRenderState(device, D3DRENDERSTATE_LIGHTING, FALSE); - ok(SUCCEEDED(hr), "Failed to set render state, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set render state, hr %#lx.\n", hr);
ds = get_depth_stencil(device); hr = IDirectDrawSurface7_DeleteAttachedSurface(rt, 0, ds); - ok(SUCCEEDED(hr), "Failed to detach depth buffer, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to detach depth buffer, hr %#lx.\n", hr); IDirectDrawSurface7_Release(ds);
for (i = 0; i < ARRAY_SIZE(tests); ++i) @@ -15683,18 +15683,18 @@ static void test_depth_readback(void) }
hr = IDirectDrawSurface_AddAttachedSurface(rt, ds); - ok(SUCCEEDED(hr), "Failed to attach depth buffer, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to attach depth buffer, hr %#lx.\n", hr); hr = IDirect3DDevice7_SetRenderTarget(device, rt, 0); - ok(SUCCEEDED(hr), "Failed to set render target, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set render target, hr %#lx.\n", hr);
hr = IDirect3DDevice7_Clear(device, 0, NULL, D3DCLEAR_TARGET | D3DCLEAR_ZBUFFER, 0xff0000ff, 1.0f, 0); - ok(SUCCEEDED(hr), "Failed to clear, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to clear, hr %#lx.\n", hr); hr = IDirect3DDevice7_BeginScene(device); - ok(SUCCEEDED(hr), "Failed to begin scene, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to begin scene, hr %#lx.\n", hr); hr = IDirect3DDevice7_DrawPrimitive(device, D3DPT_TRIANGLESTRIP, D3DFVF_XYZ | D3DFVF_DIFFUSE, quad, 4, 0); - ok(SUCCEEDED(hr), "Failed to draw, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to draw, hr %#lx.\n", hr); hr = IDirect3DDevice7_EndScene(device); - ok(SUCCEEDED(hr), "Failed to end scene, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to end scene, hr %#lx.\n", hr);
all_zero = all_one = all_pass = TRUE; for (y = 60; y < 480; y += 120) @@ -15705,7 +15705,7 @@ static void test_depth_readback(void) memset(&surface_desc, 0, sizeof(surface_desc)); surface_desc.dwSize = sizeof(surface_desc); hr = IDirectDrawSurface7_Lock(ds, &r, &surface_desc, DDLOCK_READONLY, NULL); - ok(SUCCEEDED(hr), "Failed to lock surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to lock surface, hr %#lx.\n", hr);
raw_value = *((DWORD *)surface_desc.lpSurface); if (raw_value) @@ -15738,20 +15738,20 @@ static void test_depth_readback(void) ok(compare_uint(expected_depth, depth, max_diff) || (ddraw_is_nvidia(ddraw) && (all_zero || all_one || !tests[i].s_depth)) || (ddraw_is_amd(ddraw) && !tests[i].s_depth && tests[i].z_mask == 0x00ffffff), - "Test %u: Got depth 0x%08x (diff %d), expected 0x%08x+/-%u, at %u, %u.\n", + "Test %u: Got depth 0x%08lx (diff %ld), expected 0x%08lx+/-%lu, at %u, %u.\n", i, depth, expected_depth - depth, expected_depth, max_diff, x, y); if (!compare_uint(expected_depth, depth, max_diff)) all_pass = FALSE;
hr = IDirectDrawSurface7_Unlock(ds, &r); - ok(SUCCEEDED(hr), "Failed to unlock surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to unlock surface, hr %#lx.\n", hr); } } if (all_pass) passed_fmts++;
hr = IDirectDrawSurface7_DeleteAttachedSurface(rt, 0, ds); - ok(SUCCEEDED(hr), "Failed to detach depth buffer, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to detach depth buffer, hr %#lx.\n", hr); IDirectDrawSurface7_Release(ds); }
@@ -15761,7 +15761,7 @@ static void test_depth_readback(void) IDirectDraw7_Release(ddraw); IDirect3D7_Release(d3d); refcount = IDirect3DDevice7_Release(device); - ok(!refcount, "Device has %u references left.\n", refcount); + ok(!refcount, "Device has %lu references left.\n", refcount); DestroyWindow(window); }
@@ -15788,15 +15788,15 @@ static void test_clear(void) }
hr = IDirect3DDevice7_GetDirect3D(device, &d3d); - ok(SUCCEEDED(hr), "Failed to get Direct3D7 interface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get Direct3D7 interface, hr %#lx.\n", hr); hr = IDirect3D7_QueryInterface(d3d, &IID_IDirectDraw7, (void **)&ddraw); - ok(SUCCEEDED(hr), "Failed to get ddraw interface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get ddraw interface, hr %#lx.\n", hr);
hr = IDirect3DDevice7_GetRenderTarget(device, &rt); - ok(SUCCEEDED(hr), "Failed to get render target, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get render target, hr %#lx.\n", hr);
hr = IDirect3DDevice7_Clear(device, 0, NULL, D3DCLEAR_TARGET, 0xffffffff, 0.0f, 0); - ok(SUCCEEDED(hr), "Failed to clear, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to clear, hr %#lx.\n", hr);
/* Positive x, negative y. */ U1(rect[0]).x1 = 0; @@ -15813,19 +15813,19 @@ static void test_clear(void) /* Clear 2 rectangles with one call. Unlike d3d8/9, the refrast does not * refuse negative rectangles, but it will not clear them either. */ hr = IDirect3DDevice7_Clear(device, 2, rect, D3DCLEAR_TARGET, 0xffff0000, 0.0f, 0); - ok(SUCCEEDED(hr), "Failed to clear, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to clear, hr %#lx.\n", hr);
color = get_surface_color(rt, 160, 360); - ok(compare_color(color, 0x00ffffff, 0), "Clear rectangle 3 (pos, neg) has color 0x%08x.\n", color); + ok(compare_color(color, 0x00ffffff, 0), "Clear rectangle 3 (pos, neg) has color 0x%08lx.\n", color); color = get_surface_color(rt, 160, 120); - ok(compare_color(color, 0x00ff0000, 0), "Clear rectangle 1 (pos, pos) has color 0x%08x.\n", color); + ok(compare_color(color, 0x00ff0000, 0), "Clear rectangle 1 (pos, pos) has color 0x%08lx.\n", color); color = get_surface_color(rt, 480, 360); - ok(compare_color(color, 0x00ffffff, 0), "Clear rectangle 4 (NULL) has color 0x%08x.\n", color); + ok(compare_color(color, 0x00ffffff, 0), "Clear rectangle 4 (NULL) has color 0x%08lx.\n", color); color = get_surface_color(rt, 480, 120); - ok(compare_color(color, 0x00ffffff, 0), "Clear rectangle 4 (neg, neg) has color 0x%08x.\n", color); + ok(compare_color(color, 0x00ffffff, 0), "Clear rectangle 4 (neg, neg) has color 0x%08lx.\n", color);
hr = IDirect3DDevice7_Clear(device, 0, NULL, D3DCLEAR_TARGET, 0xffffffff, 0.0, 0); - ok(SUCCEEDED(hr), "Failed to clear, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to clear, hr %#lx.\n", hr); /* negative x, negative y. * Also ignored, except on WARP, which clears the entire screen. */ U1(rect_negneg).x1 = 640; @@ -15833,30 +15833,30 @@ static void test_clear(void) U3(rect_negneg).x2 = 320; U4(rect_negneg).y2 = 0; hr = IDirect3DDevice7_Clear(device, 1, &rect_negneg, D3DCLEAR_TARGET, 0xff00ff00, 0.0f, 0); - ok(SUCCEEDED(hr), "Failed to clear, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to clear, hr %#lx.\n", hr);
color = get_surface_color(rt, 160, 360); ok(compare_color(color, 0x00ffffff, 0) || broken(ddraw_is_warp(ddraw) && compare_color(color, 0x0000ff00, 0)), - "Got unexpected color 0x%08x.\n", color); + "Got unexpected color 0x%08lx.\n", color); color = get_surface_color(rt, 160, 120); ok(compare_color(color, 0x00ffffff, 0) || broken(ddraw_is_warp(ddraw) && compare_color(color, 0x0000ff00, 0)), - "Got unexpected color 0x%08x.\n", color); + "Got unexpected color 0x%08lx.\n", color); color = get_surface_color(rt, 480, 360); ok(compare_color(color, 0x00ffffff, 0) || broken(ddraw_is_warp(ddraw) && compare_color(color, 0x0000ff00, 0)), - "Got unexpected color 0x%08x.\n", color); + "Got unexpected color 0x%08lx.\n", color); color = get_surface_color(rt, 480, 120); ok(compare_color(color, 0x00ffffff, 0) || broken(ddraw_is_warp(ddraw) && compare_color(color, 0x0000ff00, 0)), - "Got unexpected color 0x%08x.\n", color); + "Got unexpected color 0x%08lx.\n", color);
/* Test how the viewport affects clears. */ hr = IDirect3DDevice7_Clear(device, 0, NULL, D3DCLEAR_TARGET, 0xffffffff, 0.0f, 0); - ok(SUCCEEDED(hr), "Failed to clear, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to clear, hr %#lx.\n", hr); hr = IDirect3DDevice7_GetViewport(device, &old_vp); - ok(SUCCEEDED(hr), "Failed to get viewport, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get viewport, hr %#lx.\n", hr);
vp.dwX = 160; vp.dwY = 120; @@ -15865,9 +15865,9 @@ static void test_clear(void) vp.dvMinZ = 0.0f; vp.dvMaxZ = 1.0f; hr = IDirect3DDevice7_SetViewport(device, &vp); - ok(SUCCEEDED(hr), "Failed to set viewport, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set viewport, hr %#lx.\n", hr); hr = IDirect3DDevice7_Clear(device, 0, NULL, D3DCLEAR_TARGET, 0xff0000ff, 0.0f, 0); - ok(SUCCEEDED(hr), "Failed to clear, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to clear, hr %#lx.\n", hr);
vp.dwX = 320; vp.dwY = 240; @@ -15876,44 +15876,44 @@ static void test_clear(void) vp.dvMinZ = 0.0f; vp.dvMaxZ = 1.0f; hr = IDirect3DDevice7_SetViewport(device, &vp); - ok(SUCCEEDED(hr), "Failed to set viewport, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set viewport, hr %#lx.\n", hr);
U1(rect[0]).x1 = 160; U2(rect[0]).y1 = 120; U3(rect[0]).x2 = 480; U4(rect[0]).y2 = 360; hr = IDirect3DDevice7_Clear(device, 1, &rect[0], D3DCLEAR_TARGET, 0xff00ff00, 0.0f, 0); - ok(SUCCEEDED(hr), "Failed to clear, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to clear, hr %#lx.\n", hr);
hr = IDirect3DDevice7_SetViewport(device, &old_vp); - ok(SUCCEEDED(hr), "Failed to set viewport, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set viewport, hr %#lx.\n", hr);
color = get_surface_color(rt, 158, 118); - ok(compare_color(color, 0x00ffffff, 0), "(158, 118) has color 0x%08x.\n", color); + ok(compare_color(color, 0x00ffffff, 0), "(158, 118) has color 0x%08lx.\n", color); color = get_surface_color(rt, 162, 118); - ok(compare_color(color, 0x00ffffff, 0), "(162, 118) has color 0x%08x.\n", color); + ok(compare_color(color, 0x00ffffff, 0), "(162, 118) has color 0x%08lx.\n", color); color = get_surface_color(rt, 158, 122); - ok(compare_color(color, 0x00ffffff, 0), "(158, 122) has color 0x%08x.\n", color); + ok(compare_color(color, 0x00ffffff, 0), "(158, 122) has color 0x%08lx.\n", color); color = get_surface_color(rt, 162, 122); - ok(compare_color(color, 0x000000ff, 0), "(162, 122) has color 0x%08x.\n", color); + ok(compare_color(color, 0x000000ff, 0), "(162, 122) has color 0x%08lx.\n", color);
color = get_surface_color(rt, 318, 238); - ok(compare_color(color, 0x000000ff, 0), "(318, 238) has color 0x%08x.\n", color); + ok(compare_color(color, 0x000000ff, 0), "(318, 238) has color 0x%08lx.\n", color); color = get_surface_color(rt, 322, 238); - ok(compare_color(color, 0x00ffffff, 0), "(322, 328) has color 0x%08x.\n", color); + ok(compare_color(color, 0x00ffffff, 0), "(322, 328) has color 0x%08lx.\n", color); color = get_surface_color(rt, 318, 242); - ok(compare_color(color, 0x00ffffff, 0), "(318, 242) has color 0x%08x.\n", color); + ok(compare_color(color, 0x00ffffff, 0), "(318, 242) has color 0x%08lx.\n", color); color = get_surface_color(rt, 322, 242); - ok(compare_color(color, 0x0000ff00, 0), "(322, 242) has color 0x%08x.\n", color); + ok(compare_color(color, 0x0000ff00, 0), "(322, 242) has color 0x%08lx.\n", color);
color = get_surface_color(rt, 478, 358); - ok(compare_color(color, 0x0000ff00, 0), "(478, 358) has color 0x%08x.\n", color); + ok(compare_color(color, 0x0000ff00, 0), "(478, 358) has color 0x%08lx.\n", color); color = get_surface_color(rt, 482, 358); - ok(compare_color(color, 0x00ffffff, 0), "(482, 358) has color 0x%08x.\n", color); + ok(compare_color(color, 0x00ffffff, 0), "(482, 358) has color 0x%08lx.\n", color); color = get_surface_color(rt, 478, 362); - ok(compare_color(color, 0x00ffffff, 0), "(478, 362) has color 0x%08x.\n", color); + ok(compare_color(color, 0x00ffffff, 0), "(478, 362) has color 0x%08lx.\n", color); color = get_surface_color(rt, 482, 362); - ok(compare_color(color, 0x00ffffff, 0), "(482, 362) has color 0x%08x.\n", color); + ok(compare_color(color, 0x00ffffff, 0), "(482, 362) has color 0x%08lx.\n", color);
/* COLORWRITEENABLE, SRGBWRITEENABLE and scissor rectangles do not exist * in d3d7. */ @@ -15922,7 +15922,7 @@ static void test_clear(void) IDirectDraw7_Release(ddraw); IDirect3D7_Release(d3d); refcount = IDirect3DDevice7_Release(device); - ok(!refcount, "Device has %u references left.\n", refcount); + ok(!refcount, "Device has %lu references left.\n", refcount); DestroyWindow(window); }
@@ -15980,12 +15980,12 @@ static HRESULT WINAPI enum_surfaces_create_cb(IDirectDrawSurface7 *surface, DDSU struct enum_surfaces_param *param = context;
ok(!surface, "Unexpected surface %p.\n", surface); - ok((desc->dwFlags & expect_flags) == expect_flags, "Got unexpected flags %#x.\n", desc->dwFlags); + ok((desc->dwFlags & expect_flags) == expect_flags, "Got unexpected flags %#lx.\n", desc->dwFlags); if (param->count < ARRAY_SIZE(param->modes)) { const DDSURFACEDESC2 *expect = ¶m->modes[param->count]; - ok(desc->dwWidth == expect->dwWidth, "Expected width %u, got %u.\n", expect->dwWidth, desc->dwWidth); - ok(desc->dwHeight == expect->dwHeight, "Expected height %u, got %u.\n", expect->dwHeight, desc->dwHeight); + ok(desc->dwWidth == expect->dwWidth, "Expected width %lu, got %lu.\n", expect->dwWidth, desc->dwWidth); + ok(desc->dwHeight == expect->dwHeight, "Expected height %lu, got %lu.\n", expect->dwHeight, desc->dwHeight); ok(!memcmp(&U4(*desc).ddpfPixelFormat, &U4(*expect).ddpfPixelFormat, sizeof(U4(*desc).ddpfPixelFormat)), "Pixel formats didn't match.\n"); } @@ -16010,21 +16010,21 @@ static void test_enum_surfaces(void) memset(&desc, 0, sizeof(desc)); desc.dwSize = sizeof(desc); hr = IDirectDraw7_GetDisplayMode(ddraw, &desc); - ok(hr == DD_OK, "Failed to get display mode, hr %#x.\n", hr); + ok(hr == DD_OK, "Failed to get display mode, hr %#lx.\n", hr); current_format = U4(desc).ddpfPixelFormat;
hr = IDirectDraw7_SetCooperativeLevel(ddraw, NULL, DDSCL_NORMAL); - ok(hr == DD_OK, "Failed to set cooperative level, hr %#x.\n", hr); + ok(hr == DD_OK, "Failed to set cooperative level, hr %#lx.\n", hr);
hr = IDirectDraw7_EnumSurfaces(ddraw, DDENUMSURFACES_DOESEXIST | DDENUMSURFACES_ALL, NULL, NULL, NULL); - ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#lx.\n", hr);
hr = IDirectDraw7_EnumSurfaces(ddraw, DDENUMSURFACES_ALL, NULL, NULL, enum_surfaces_cb); - ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#lx.\n", hr);
hr = IDirectDraw7_EnumSurfaces(ddraw, DDENUMSURFACES_CANBECREATED | DDENUMSURFACES_ALL, NULL, NULL, enum_surfaces_cb); - ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#lx.\n", hr);
memset(&desc, 0, sizeof(desc)); desc.dwSize = sizeof(desc); @@ -16041,49 +16041,49 @@ static void test_enum_surfaces(void) }
hr = IDirectDrawSurface7_GetAttachedSurface(param.surfaces[0], &desc.ddsCaps, ¶m.surfaces[1]); - ok(hr == DD_OK, "Failed to get attached surface, hr %#x.\n", hr); + ok(hr == DD_OK, "Failed to get attached surface, hr %#lx.\n", hr); hr = IDirectDrawSurface7_GetAttachedSurface(param.surfaces[1], &desc.ddsCaps, ¶m.surfaces[2]); - ok(hr == DD_OK, "Failed to get attached surface, hr %#x.\n", hr); + ok(hr == DD_OK, "Failed to get attached surface, hr %#lx.\n", hr); hr = IDirectDrawSurface7_GetAttachedSurface(param.surfaces[2], &desc.ddsCaps, ¶m.surfaces[3]); - ok(hr == DDERR_NOTFOUND, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_NOTFOUND, "Got unexpected hr %#lx.\n", hr); ok(!param.surfaces[3], "Got unexpected pointer %p.\n", param.surfaces[3]);
param.count = 0; hr = IDirectDraw7_EnumSurfaces(ddraw, DDENUMSURFACES_DOESEXIST | DDENUMSURFACES_ALL, &desc, ¶m, enum_surfaces_cb); - ok(hr == DD_OK, "Failed to enumerate surfaces, hr %#x.\n", hr); + ok(hr == DD_OK, "Failed to enumerate surfaces, hr %#lx.\n", hr); ok(param.count == 3, "Got unexpected number of enumerated surfaces %u.\n", param.count);
param.count = 0; hr = IDirectDraw7_EnumSurfaces(ddraw, DDENUMSURFACES_DOESEXIST | DDENUMSURFACES_ALL, NULL, ¶m, enum_surfaces_cb); - ok(hr == DD_OK, "Failed to enumerate surfaces, hr %#x.\n", hr); + ok(hr == DD_OK, "Failed to enumerate surfaces, hr %#lx.\n", hr); ok(param.count == 3, "Got unexpected number of enumerated surfaces %u.\n", param.count);
desc.dwFlags = DDSD_WIDTH | DDSD_HEIGHT; param.count = 0; hr = IDirectDraw7_EnumSurfaces(ddraw, DDENUMSURFACES_DOESEXIST | DDENUMSURFACES_MATCH, &desc, ¶m, enum_surfaces_cb); - ok(hr == DD_OK, "Failed to enumerate surfaces, hr %#x.\n", hr); + ok(hr == DD_OK, "Failed to enumerate surfaces, hr %#lx.\n", hr); ok(param.count == 1, "Got unexpected number of enumerated surfaces %u.\n", param.count);
param.count = 0; hr = IDirectDraw7_EnumSurfaces(ddraw, DDENUMSURFACES_DOESEXIST | DDENUMSURFACES_NOMATCH, &desc, ¶m, enum_surfaces_cb); - ok(hr == DD_OK, "Failed to enumerate surfaces, hr %#x.\n", hr); + ok(hr == DD_OK, "Failed to enumerate surfaces, hr %#lx.\n", hr); ok(param.count == 2, "Got unexpected number of enumerated surfaces %u.\n", param.count);
desc.dwFlags = 0; param.count = 0; hr = IDirectDraw7_EnumSurfaces(ddraw, DDENUMSURFACES_DOESEXIST | DDENUMSURFACES_MATCH, &desc, ¶m, enum_surfaces_cb); - ok(hr == DD_OK, "Failed to enumerate surfaces, hr %#x.\n", hr); + ok(hr == DD_OK, "Failed to enumerate surfaces, hr %#lx.\n", hr); ok(param.count == 3, "Got unexpected number of enumerated surfaces %u.\n", param.count);
desc.dwFlags = 0; param.count = 0; hr = IDirectDraw7_EnumSurfaces(ddraw, DDENUMSURFACES_DOESEXIST, &desc, ¶m, enum_surfaces_cb); - ok(hr == DD_OK, "Failed to enumerate surfaces, hr %#x.\n", hr); + ok(hr == DD_OK, "Failed to enumerate surfaces, hr %#lx.\n", hr); ok(param.count == 3, "Got unexpected number of enumerated surfaces %u.\n", param.count);
IDirectDrawSurface7_Release(param.surfaces[2]); @@ -16093,7 +16093,7 @@ static void test_enum_surfaces(void) param.count = 0; hr = IDirectDraw7_EnumSurfaces(ddraw, DDENUMSURFACES_DOESEXIST | DDENUMSURFACES_ALL, NULL, ¶m, enum_surfaces_cb); - ok(hr == DD_OK, "Failed to enumerate surfaces, hr %#x.\n", hr); + ok(hr == DD_OK, "Failed to enumerate surfaces, hr %#lx.\n", hr); ok(!param.count, "Got unexpected number of enumerated surfaces %u.\n", param.count);
memset(&desc, 0, sizeof(desc)); @@ -16103,15 +16103,15 @@ static void test_enum_surfaces(void)
hr = IDirectDraw7_EnumSurfaces(ddraw, DDENUMSURFACES_CANBECREATED | DDENUMSURFACES_ALL, &desc, ¶m, enum_surfaces_create_cb); - ok(hr == DDERR_INVALIDPARAMS, "Failed to enumerate surfaces, hr %#x.\n", hr); + ok(hr == DDERR_INVALIDPARAMS, "Failed to enumerate surfaces, hr %#lx.\n", hr);
hr = IDirectDraw7_EnumSurfaces(ddraw, DDENUMSURFACES_CANBECREATED | DDENUMSURFACES_NOMATCH, &desc, ¶m, enum_surfaces_create_cb); - ok(hr == DDERR_INVALIDPARAMS, "Failed to enumerate surfaces, hr %#x.\n", hr); + ok(hr == DDERR_INVALIDPARAMS, "Failed to enumerate surfaces, hr %#lx.\n", hr);
hr = IDirectDraw7_EnumSurfaces(ddraw, DDENUMSURFACES_CANBECREATED, &desc, ¶m, enum_surfaces_create_cb); - ok(hr == DDERR_INVALIDPARAMS, "Failed to enumerate surfaces, hr %#x.\n", hr); + ok(hr == DDERR_INVALIDPARAMS, "Failed to enumerate surfaces, hr %#lx.\n", hr);
/* When not passed width and height, the callback is called with every * available display resolution. */ @@ -16120,13 +16120,13 @@ static void test_enum_surfaces(void) desc.dwFlags |= DDSD_PIXELFORMAT; U4(desc).ddpfPixelFormat = current_format; hr = IDirectDraw7_EnumDisplayModes(ddraw, 0, &desc, ¶m, build_mode_list_cb); - ok(hr == DD_OK, "Failed to build mode list, hr %#x.\n", hr); + ok(hr == DD_OK, "Failed to build mode list, hr %#lx.\n", hr);
param.count = 0; desc.dwFlags &= ~DDSD_PIXELFORMAT; hr = IDirectDraw7_EnumSurfaces(ddraw, DDENUMSURFACES_CANBECREATED | DDENUMSURFACES_MATCH, &desc, ¶m, enum_surfaces_create_cb); - ok(hr == DD_OK, "Failed to enumerate surfaces, hr %#x.\n", hr); + ok(hr == DD_OK, "Failed to enumerate surfaces, hr %#lx.\n", hr); ok(param.count == param.mode_count, "Expected %u surfaces, got %u.\n", param.mode_count, param.count);
desc.dwFlags |= DDSD_WIDTH | DDSD_HEIGHT; @@ -16137,15 +16137,15 @@ static void test_enum_surfaces(void) param.count = 0; hr = IDirectDraw7_EnumSurfaces(ddraw, DDENUMSURFACES_CANBECREATED | DDENUMSURFACES_MATCH, &desc, ¶m, enum_surfaces_create_cb); - ok(hr == DD_OK, "Failed to enumerate surfaces, hr %#x.\n", hr); + ok(hr == DD_OK, "Failed to enumerate surfaces, hr %#lx.\n", hr); ok(param.count == 1, "Got unexpected number of enumerated surfaces %u.\n", param.count);
hr = IDirectDraw7_CreateSurface(ddraw, &desc, ¶m.surfaces[0], NULL); - ok(hr == DD_OK, "Failed to create surface, hr %#x.\n", hr); + ok(hr == DD_OK, "Failed to create surface, hr %#lx.\n", hr); param.count = 0; hr = IDirectDraw7_EnumSurfaces(ddraw, DDENUMSURFACES_CANBECREATED | DDENUMSURFACES_DOESEXIST | DDENUMSURFACES_MATCH, &desc, ¶m, enum_surfaces_create_cb); - ok(hr == DD_OK, "Failed to enumerate surfaces, hr %#x.\n", hr); + ok(hr == DD_OK, "Failed to enumerate surfaces, hr %#lx.\n", hr); ok(param.count == 1, "Got unexpected number of enumerated surfaces %u.\n", param.count); IDirectDrawSurface7_Release(param.surfaces[0]);
@@ -16157,7 +16157,7 @@ static void test_enum_surfaces(void) param.count = 0; hr = IDirectDraw7_EnumSurfaces(ddraw, DDENUMSURFACES_CANBECREATED | DDENUMSURFACES_MATCH, &desc, ¶m, enum_surfaces_create_cb); - ok(hr == DD_OK, "Failed to enumerate surfaces, hr %#x.\n", hr); + ok(hr == DD_OK, "Failed to enumerate surfaces, hr %#lx.\n", hr); ok(!param.count, "Got unexpected number of enumerated surfaces %u.\n", param.count);
IDirectDraw7_Release(ddraw); @@ -16217,26 +16217,26 @@ static void test_viewport(void) }
hr = IDirect3DDevice7_GetDirect3D(device, &d3d); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirect3D7_QueryInterface(d3d, &IID_IDirectDraw7, (void **)&ddraw); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); IDirect3D7_Release(d3d);
hr = IDirect3DDevice7_SetRenderState(device, D3DRENDERSTATE_LIGHTING, FALSE); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr);
/* Well, by default the vertices without color info should be white, and without any texture * ops this should just show up in the output, but the r200 driver begs to differ and draws a * random color. */ hr = IDirect3DDevice7_SetTextureStageState(device, 0, D3DTSS_COLOROP, D3DTOP_SELECTARG1); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirect3DDevice7_SetTextureStageState(device, 0, D3DTSS_COLORARG1, D3DTA_TFACTOR); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirect3DDevice7_SetRenderState(device, D3DRENDERSTATE_TEXTUREFACTOR, 0x00ffffff); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr);
hr = IDirect3DDevice7_SetViewport(device, NULL); - ok(hr == E_INVALIDARG, "Got unexpected hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Got unexpected hr %#lx.\n", hr);
ds = get_depth_stencil(device); memset(&surface_desc, 0, sizeof(surface_desc)); @@ -16255,54 +16255,54 @@ static void test_viewport(void) surface_desc.dwHeight = rt_sizes[i].y; surface_desc.ddsCaps.dwCaps = DDSCAPS_OFFSCREENPLAIN | DDSCAPS_3DDEVICE; hr = IDirectDraw7_CreateSurface(ddraw, &surface_desc, &rt, NULL); - ok(hr == DD_OK, "Got unexpected hr %#x (i %u).\n", hr, i); + ok(hr == DD_OK, "Got unexpected hr %#lx (i %u).\n", hr, i);
surface_desc.dwFlags = DDSD_CAPS | DDSD_PIXELFORMAT | DDSD_WIDTH | DDSD_HEIGHT; surface_desc.ddsCaps.dwCaps = DDSCAPS_ZBUFFER; U4(surface_desc).ddpfPixelFormat = z_fmt; hr = IDirectDraw7_CreateSurface(ddraw, &surface_desc, &ds, NULL); - ok(hr == DD_OK, "Got unexpected hr %#x (i %u).\n", hr, i); + ok(hr == DD_OK, "Got unexpected hr %#lx (i %u).\n", hr, i); hr = IDirectDrawSurface7_AddAttachedSurface(rt, ds); - ok(hr == DD_OK, "Got unexpected hr %#x (i %u).\n", hr, i); + ok(hr == DD_OK, "Got unexpected hr %#lx (i %u).\n", hr, i);
hr = IDirect3DDevice7_SetRenderTarget(device, rt, 0); - ok(hr == DD_OK, "Got unexpected hr %#x (i %u).\n", hr, i); + ok(hr == DD_OK, "Got unexpected hr %#lx (i %u).\n", hr, i); } else { hr = IDirect3DDevice7_GetRenderTarget(device, &rt); - ok(hr == DD_OK, "Got unexpected hr %#x (i %u).\n", hr, i); + ok(hr == DD_OK, "Got unexpected hr %#lx (i %u).\n", hr, i); }
for (j = 0; j < ARRAY_SIZE(tests); ++j) { hr = IDirect3DDevice7_Clear(device, 0, NULL, D3DCLEAR_TARGET | D3DCLEAR_ZBUFFER, 0xff000000, tests[j].expected_z - z_eps, 0); - ok(hr == DD_OK, "Got unexpected hr %#x (i %u, j %u).\n", hr, i, j); + ok(hr == DD_OK, "Got unexpected hr %#lx (i %u, j %u).\n", hr, i, j); hr = IDirect3DDevice7_SetRenderState(device, D3DRENDERSTATE_ZFUNC, D3DCMP_GREATER); - ok(hr == DD_OK, "Got unexpected hr %#x (i %u, j %u).\n", hr, i, j); + ok(hr == DD_OK, "Got unexpected hr %#lx (i %u, j %u).\n", hr, i, j);
hr = IDirect3DDevice7_SetRenderState(device, D3DRENDERSTATE_ZENABLE, !i); - ok(hr == DD_OK, "Got unexpected hr %#x (i %u, j %u).\n", hr, i, j); + ok(hr == DD_OK, "Got unexpected hr %#lx (i %u, j %u).\n", hr, i, j);
hr = IDirect3DDevice7_SetViewport(device, &tests[j].vp); if (tests[j].vp.dwX + tests[j].vp.dwWidth > rt_sizes[i].x || tests[j].vp.dwY + tests[j].vp.dwHeight > rt_sizes[i].y) { - ok(hr == E_INVALIDARG, "Got unexpected hr %#x (i %u, j %u).\n", hr, i, j); + ok(hr == E_INVALIDARG, "Got unexpected hr %#lx (i %u, j %u).\n", hr, i, j); continue; } else { - ok(hr == DD_OK, "Got unexpected hr %#x (i %u, j %u).\n", hr, i, j); + ok(hr == DD_OK, "Got unexpected hr %#lx (i %u, j %u).\n", hr, i, j); }
hr = IDirect3DDevice7_BeginScene(device); - ok(hr == DD_OK, "Got unexpected hr %#x (i %u, j %u).\n", hr, i, j); + ok(hr == DD_OK, "Got unexpected hr %#lx (i %u, j %u).\n", hr, i, j); hr = IDirect3DDevice7_DrawPrimitive(device, D3DPT_TRIANGLESTRIP, D3DFVF_XYZ, quad, 4, 0); - ok(hr == DD_OK, "Got unexpected hr %#x (i %u, j %u).\n", hr, i, j); + ok(hr == DD_OK, "Got unexpected hr %#lx (i %u, j %u).\n", hr, i, j); hr = IDirect3DDevice7_EndScene(device); - ok(hr == DD_OK, "Got unexpected hr %#x (i %u, j %u).\n", hr, i, j); + ok(hr == DD_OK, "Got unexpected hr %#lx (i %u, j %u).\n", hr, i, j);
check_rect(rt, tests[j].expected_rect, tests[j].message);
@@ -16310,29 +16310,29 @@ static void test_viewport(void) { hr = IDirect3DDevice7_Clear(device, 0, NULL, D3DCLEAR_TARGET | D3DCLEAR_ZBUFFER, 0xff000000, tests[j].expected_z + z_eps, 0); - ok(hr == DD_OK, "Got unexpected hr %#x (i %u, j %u).\n", hr, i, j); + ok(hr == DD_OK, "Got unexpected hr %#lx (i %u, j %u).\n", hr, i, j); hr = IDirect3DDevice7_SetRenderState(device, D3DRENDERSTATE_ZFUNC, D3DCMP_LESS); - ok(hr == DD_OK, "Got unexpected hr %#x (i %u, j %u).\n", hr, i, j); + ok(hr == DD_OK, "Got unexpected hr %#lx (i %u, j %u).\n", hr, i, j);
hr = IDirect3DDevice7_BeginScene(device); - ok(hr == DD_OK, "Got unexpected hr %#x (i %u, j %u).\n", hr, i, j); + ok(hr == DD_OK, "Got unexpected hr %#lx (i %u, j %u).\n", hr, i, j); hr = IDirect3DDevice7_DrawPrimitive(device, D3DPT_TRIANGLESTRIP, D3DFVF_XYZ, quad, 4, 0); - ok(hr == DD_OK, "Got unexpected hr %#x (i %u, j %u).\n", hr, i, j); + ok(hr == DD_OK, "Got unexpected hr %#lx (i %u, j %u).\n", hr, i, j); hr = IDirect3DDevice7_EndScene(device); - ok(hr == DD_OK, "Got unexpected hr %#x (i %u, j %u).\n", hr, i, j); + ok(hr == DD_OK, "Got unexpected hr %#lx (i %u, j %u).\n", hr, i, j);
check_rect(rt, tests[j].expected_rect, tests[j].message); } }
hr = IDirectDrawSurface7_DeleteAttachedSurface(rt, 0, ds); - ok(hr == DD_OK, "Got unexpected hr %#x (i %u).\n", hr, i); + ok(hr == DD_OK, "Got unexpected hr %#lx (i %u).\n", hr, i); IDirectDrawSurface7_Release(ds); IDirectDrawSurface7_Release(rt); }
refcount = IDirect3DDevice7_Release(device); - ok(!refcount, "Device has %u references left.\n", refcount); + ok(!refcount, "Device has %lu references left.\n", refcount); IDirectDraw7_Release(ddraw); DestroyWindow(window); } @@ -16347,7 +16347,7 @@ static unsigned int validate_loaded_surface(IDirectDrawSurface7 *surface, unsign memset(&surface_desc, 0, sizeof(surface_desc)); surface_desc.dwSize = sizeof(surface_desc); hr = IDirectDrawSurface7_Lock(surface, NULL, &surface_desc, DDLOCK_WAIT, NULL); - ok(SUCCEEDED(hr), "Failed to map surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to map surface, hr %#lx.\n", hr);
for (y = 0, diff = 0; y < surface_desc.dwHeight; ++y) { @@ -16377,7 +16377,7 @@ static unsigned int validate_loaded_surface(IDirectDrawSurface7 *surface, unsign }
hr = IDirectDrawSurface7_Unlock(surface, NULL); - ok(SUCCEEDED(hr), "Failed to unmap surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to unmap surface, hr %#lx.\n", hr);
return diff; } @@ -16446,14 +16446,14 @@ static void test_device_load(void) }
hr = IDirect3DDevice7_GetDirect3D(device, &d3d); - ok(SUCCEEDED(hr), "Failed to get Direct3D7 interface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get Direct3D7 interface, hr %#lx.\n", hr); hr = IDirect3D7_QueryInterface(d3d, &IID_IDirectDraw7, (void **)&ddraw); - ok(SUCCEEDED(hr), "Failed to get ddraw interface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get ddraw interface, hr %#lx.\n", hr); IDirect3D7_Release(d3d);
memset(&d3d_caps, 0, sizeof(d3d_caps)); hr = IDirect3DDevice7_GetCaps(device, &d3d_caps); - ok(SUCCEEDED(hr), "Failed to get caps, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get caps, hr %#lx.\n", hr); cube_support = d3d_caps.dpcTriCaps.dwTextureCaps & D3DPTEXTURECAPS_CUBEMAP;
for (i = 0; i < ARRAY_SIZE(tests); ++i) @@ -16490,7 +16490,7 @@ static void test_device_load(void) U3(U4(surface_desc).ddpfPixelFormat).dwGBitMask = 0x0000ff00; U4(U4(surface_desc).ddpfPixelFormat).dwBBitMask = 0x000000ff; hr = IDirectDraw7_CreateSurface(ddraw, &surface_desc, &src_surface, NULL); - ok(SUCCEEDED(hr), "Test %u: Failed to create source surface, hr %#x.\n", i, hr); + ok(SUCCEEDED(hr), "Test %u: Failed to create source surface, hr %#lx.\n", i, hr);
surface_desc.dwFlags = DDSD_CAPS | DDSD_WIDTH | DDSD_HEIGHT | DDSD_PIXELFORMAT; if (tests[i].dst_mip_count) @@ -16507,7 +16507,7 @@ static void test_device_load(void) surface_desc.dwHeight = tests[i].dst_h; U2(surface_desc).dwMipMapCount = tests[i].dst_mip_count; hr = IDirectDraw7_CreateSurface(ddraw, &surface_desc, &dst_surface, NULL); - ok(SUCCEEDED(hr), "Test %u: Failed to create destination surface, hr %#x.\n", i, hr); + ok(SUCCEEDED(hr), "Test %u: Failed to create destination surface, hr %#lx.\n", i, hr);
src_count = dst_count = 1; if (tests[i].src_flags & TEX_MIP) @@ -16527,9 +16527,9 @@ static void test_device_load(void) memset(&surface_desc, 0, sizeof(surface_desc)); surface_desc.dwSize = sizeof(surface_desc); hr = IDirectDrawSurface7_GetSurfaceDesc(surface, &surface_desc); - ok(SUCCEEDED(hr), "Test %u: Failed to get surface description, hr %#x.\n", i, hr); + ok(SUCCEEDED(hr), "Test %u: Failed to get surface description, hr %#lx.\n", i, hr); ok(U2(surface_desc).dwMipMapCount == src_count, - "Test %u: Got unexpected mip count %u, expected %u.\n", + "Test %u: Got unexpected mip count %lu, expected %u.\n", i, U2(surface_desc).dwMipMapCount, src_count); }
@@ -16538,7 +16538,7 @@ static void test_device_load(void) memset(&surface_desc, 0, sizeof(surface_desc)); surface_desc.dwSize = sizeof(surface_desc); hr = IDirectDrawSurface7_Lock(surface, NULL, &surface_desc, DDLOCK_WAIT, NULL); - ok(SUCCEEDED(hr), "Test %u: Failed to map surface, hr %#x.\n", i, hr); + ok(SUCCEEDED(hr), "Test %u: Failed to map surface, hr %#lx.\n", i, hr);
for (y = 0; y < surface_desc.dwHeight; ++y) { @@ -16555,7 +16555,7 @@ static void test_device_load(void) }
hr = IDirectDrawSurface7_Unlock(surface, NULL); - ok(SUCCEEDED(hr), "Test %u: Failed to unmap surface, hr %#x.\n", i, hr); + ok(SUCCEEDED(hr), "Test %u: Failed to unmap surface, hr %#lx.\n", i, hr);
hr = IDirectDrawSurface7_GetAttachedSurface(surface, &mip_caps, &tmp); IDirectDrawSurface7_Release(surface); @@ -16584,9 +16584,9 @@ static void test_device_load(void) memset(&surface_desc, 0, sizeof(surface_desc)); surface_desc.dwSize = sizeof(surface_desc); hr = IDirectDrawSurface7_GetSurfaceDesc(surface, &surface_desc); - ok(SUCCEEDED(hr), "Test %u: Failed to get surface description, hr %#x.\n", i, hr); + ok(SUCCEEDED(hr), "Test %u: Failed to get surface description, hr %#lx.\n", i, hr); ok(U2(surface_desc).dwMipMapCount == dst_count, - "Test %u: Got unexpected mip count %u, expected %u.\n", + "Test %u: Got unexpected mip count %lu, expected %u.\n", i, U2(surface_desc).dwMipMapCount, dst_count); }
@@ -16596,7 +16596,7 @@ static void test_device_load(void) fx.dwSize = sizeof(fx); U5(fx).dwFillColor = 0x00000000; hr = IDirectDrawSurface7_Blt(surface, NULL, NULL, NULL, DDBLT_COLORFILL | DDBLT_WAIT, &fx); - ok(SUCCEEDED(hr), "Test %u: Failed to clear surface, hr %#x.\n", i, hr); + ok(SUCCEEDED(hr), "Test %u: Failed to clear surface, hr %#lx.\n", i, hr);
hr = IDirectDrawSurface7_GetAttachedSurface(surface, &mip_caps, &tmp); IDirectDrawSurface7_Release(surface); @@ -16619,7 +16619,7 @@ static void test_device_load(void) dst_surface, tests[i].dst_flags & NULL_COORDS ? NULL : &dst_point, src_surface, tests[i].src_flags & NULL_COORDS ? NULL : &src_rect, tests[i].dst_flags & TEX_CUBE ? DDSCAPS2_CUBEMAP_ALLFACES : 0); - ok(hr == tests[i].hr, "Test %u: Got unexpected hr %#x.\n", i, hr); + ok(hr == tests[i].hr, "Test %u: Got unexpected hr %#lx.\n", i, hr);
if (SUCCEEDED(hr)) { @@ -16743,46 +16743,46 @@ static void test_device_load(void) U4(surface_desc).ddpfPixelFormat.dwFlags = DDPF_RGB | DDPF_PALETTEINDEXED8; U1(U4(surface_desc).ddpfPixelFormat).dwRGBBitCount = 8; hr = IDirectDraw7_CreateSurface(ddraw, &surface_desc, &src_surface, NULL); - ok(SUCCEEDED(hr), "Failed to create source surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create source surface, hr %#lx.\n", hr); hr = IDirectDraw7_CreateSurface(ddraw, &surface_desc, &dst_surface, NULL); - ok(SUCCEEDED(hr), "Failed to create destination surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create destination surface, hr %#lx.\n", hr); hr = IDirectDrawSurface7_GetAttachedSurface(src_surface, &mip_caps, &surface); - ok(SUCCEEDED(hr), "Failed to get surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get surface, hr %#lx.\n", hr);
/* Test palette copying. */ memset(table1, 0, sizeof(table1)); table1[0].peBlue = 1; hr = IDirectDraw7_CreatePalette(ddraw, DDPCAPS_ALLOW256 | DDPCAPS_8BIT, table1, &src_palette, NULL); - ok(SUCCEEDED(hr), "Failed to create source palette, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create source palette, hr %#lx.\n", hr); table1[0].peBlue = 3; hr = IDirectDraw7_CreatePalette(ddraw, DDPCAPS_ALLOW256 | DDPCAPS_8BIT, table1, &dst_palette, NULL); - ok(SUCCEEDED(hr), "Failed to create destination palette, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create destination palette, hr %#lx.\n", hr);
hr = IDirectDrawSurface7_SetPalette(src_surface, src_palette); - ok(SUCCEEDED(hr), "Failed to set palette, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set palette, hr %#lx.\n", hr);
hr = IDirect3DDevice7_Load(device, dst_surface, NULL, src_surface, NULL, 0); - ok(SUCCEEDED(hr), "Failed to load texture, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to load texture, hr %#lx.\n", hr);
hr = IDirectDrawSurface7_GetPalette(surface, &palette); - ok(hr == DDERR_NOPALETTEATTACHED, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_NOPALETTEATTACHED, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface7_GetPalette(dst_surface, &palette); - ok(hr == DDERR_NOPALETTEATTACHED, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_NOPALETTEATTACHED, "Got unexpected hr %#lx.\n", hr);
hr = IDirectDrawSurface7_SetPalette(surface, src_palette); - ok(hr == DDERR_NOTONMIPMAPSUBLEVEL, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_NOTONMIPMAPSUBLEVEL, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface7_SetPalette(dst_surface, dst_palette); - ok(SUCCEEDED(hr), "Failed to set palette, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set palette, hr %#lx.\n", hr);
hr = IDirect3DDevice7_Load(device, dst_surface, NULL, src_surface, NULL, 0); - ok(SUCCEEDED(hr), "Failed to load texture, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to load texture, hr %#lx.\n", hr);
hr = IDirectDrawSurface7_GetPalette(dst_surface, &palette); - ok(SUCCEEDED(hr), "Failed to get palette, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get palette, hr %#lx.\n", hr); ok(palette == dst_palette, "Got unexpected palette %p, expected %p.\n", palette, dst_palette); memset(table1, 0, sizeof(table1)); hr = IDirectDrawPalette_GetEntries(palette, 0, 0, 256, table1); - ok(SUCCEEDED(hr), "Failed to retrieve palette entries, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to retrieve palette entries, hr %#lx.\n", hr); ok(table1[0].peBlue == 1, "Got unexpected palette colour %#x.\n", (unsigned int)table1[0].peBlue); IDirectDrawPalette_Release(palette);
@@ -16793,20 +16793,20 @@ static void test_device_load(void) colour_key.dwColorSpaceLowValue = 32; colour_key.dwColorSpaceHighValue = 64; hr = IDirectDrawSurface7_SetColorKey(src_surface, DDCKEY_SRCBLT, &colour_key); - ok(SUCCEEDED(hr), "Failed to set colour-key, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set colour-key, hr %#lx.\n", hr); hr = IDirectDrawSurface7_SetColorKey(surface, DDCKEY_SRCBLT, &colour_key); - ok(hr == DDERR_NOTONMIPMAPSUBLEVEL, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_NOTONMIPMAPSUBLEVEL, "Got unexpected hr %#lx.\n", hr);
hr = IDirectDrawSurface7_GetColorKey(dst_surface, DDCKEY_SRCBLT, &colour_key); - ok(hr == DDERR_NOCOLORKEY, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_NOCOLORKEY, "Got unexpected hr %#lx.\n", hr);
hr = IDirect3DDevice7_Load(device, dst_surface, NULL, src_surface, NULL, 0); - ok(SUCCEEDED(hr), "Failed to load texture, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to load texture, hr %#lx.\n", hr);
hr = IDirectDrawSurface7_GetColorKey(dst_surface, DDCKEY_SRCBLT, &colour_key); - ok(SUCCEEDED(hr), "Failed to get colour-key, hr %#x.\n", hr); - ok(colour_key.dwColorSpaceLowValue == 32, "Got unexpected value %u.\n", colour_key.dwColorSpaceLowValue); - ok(colour_key.dwColorSpaceHighValue == 32, "Got unexpected value %u.\n", colour_key.dwColorSpaceHighValue); + ok(SUCCEEDED(hr), "Failed to get colour-key, hr %#lx.\n", hr); + ok(colour_key.dwColorSpaceLowValue == 32, "Got unexpected value %lu.\n", colour_key.dwColorSpaceLowValue); + ok(colour_key.dwColorSpaceHighValue == 32, "Got unexpected value %lu.\n", colour_key.dwColorSpaceHighValue);
IDirectDrawSurface7_Release(surface); IDirectDrawSurface7_Release(dst_surface); @@ -16814,7 +16814,7 @@ static void test_device_load(void)
IDirectDraw7_Release(ddraw); refcount = IDirect3DDevice7_Release(device); - ok(!refcount, "Device has %u references left.\n", refcount); + ok(!refcount, "Device has %lu references left.\n", refcount); DestroyWindow(window); }
@@ -16904,50 +16904,50 @@ static void test_color_vertex(void) return; } hr = IDirect3DDevice7_GetRenderTarget(device, &rt); - ok(SUCCEEDED(hr), "Failed to get render target, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get render target, hr %#lx.\n", hr);
hr = IDirect3DDevice7_SetRenderState(device, D3DRENDERSTATE_LIGHTING, TRUE); - ok(SUCCEEDED(hr), "Failed to set render state, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set render state, hr %#lx.\n", hr); hr = IDirect3DDevice7_SetRenderState(device, D3DRENDERSTATE_AMBIENT, 0xffffffff); - ok(SUCCEEDED(hr), "Failed to set render state, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set render state, hr %#lx.\n", hr);
memset(&material, 0, sizeof(material)); U3(U1(material).ambient).b = 0.5f; U3(U3(material).emissive).b = 0.25f; hr = IDirect3DDevice7_SetMaterial(device, &material); - ok(SUCCEEDED(hr), "Failed to set material, hr %#x\n", hr); + ok(SUCCEEDED(hr), "Failed to set material, hr %#lx\n", hr);
for (i = 0; i < ARRAY_SIZE(tests); ++i) { hr = IDirect3DDevice7_SetRenderState(device, D3DRENDERSTATE_COLORVERTEX, tests[i].color_vertex); - ok(SUCCEEDED(hr), "Failed to set render state, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set render state, hr %#lx.\n", hr); hr = IDirect3DDevice7_SetRenderState(device, D3DRENDERSTATE_AMBIENTMATERIALSOURCE, tests[i].ambient); - ok(SUCCEEDED(hr), "Failed to set render state, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set render state, hr %#lx.\n", hr); hr = IDirect3DDevice7_SetRenderState(device, D3DRENDERSTATE_EMISSIVEMATERIALSOURCE, tests[i].emissive); - ok(SUCCEEDED(hr), "Failed to set render state, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set render state, hr %#lx.\n", hr); hr = IDirect3DDevice7_SetRenderState(device, D3DRENDERSTATE_ZENABLE, D3DZB_FALSE); - ok(SUCCEEDED(hr), "Failed to set render state, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set render state, hr %#lx.\n", hr);
hr = IDirect3DDevice7_Clear(device, 0, NULL, D3DCLEAR_TARGET, 0x77777777, 0.0f, 0); - ok(SUCCEEDED(hr), "Failed to clear depth/stencil, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to clear depth/stencil, hr %#lx.\n", hr);
hr = IDirect3DDevice7_BeginScene(device); - ok(SUCCEEDED(hr), "Failed to begin scene, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to begin scene, hr %#lx.\n", hr); hr = IDirect3DDevice7_DrawPrimitive(device, D3DPT_TRIANGLESTRIP, D3DFVF_XYZ | tests[i].fvf, tests[i].vtx, 4, 0); - ok(SUCCEEDED(hr), "Failed to draw, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to draw, hr %#lx.\n", hr); hr = IDirect3DDevice7_EndScene(device); - ok(SUCCEEDED(hr), "Failed to end scene, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to end scene, hr %#lx.\n", hr);
colour = get_surface_color(rt, 320, 240); ok(compare_color(colour, tests[i].result, 1), - "Expected colour 0x%08x for test %u, got 0x%08x.\n", + "Expected colour 0x%08lx for test %u, got 0x%08lx.\n", tests[i].result, i, colour); }
IDirectDrawSurface7_Release(rt); refcount = IDirect3DDevice7_Release(device); - ok(!refcount, "Device has %u references left.\n", refcount); + ok(!refcount, "Device has %lu references left.\n", refcount); DestroyWindow(window); }
@@ -16961,9 +16961,9 @@ static LRESULT CALLBACK killfocus_proc(HWND window, UINT message, WPARAM wparam, if (message == WM_KILLFOCUS) { ref = IDirectDrawSurface7_Release(killfocus_surface); - ok(!ref, "Unexpected surface refcount %u.\n", ref); + ok(!ref, "Unexpected surface refcount %lu.\n", ref); ref = IDirectDraw7_Release(killfocus_ddraw); - ok(!ref, "Unexpected ddraw refcount %u.\n", ref); + ok(!ref, "Unexpected ddraw refcount %lu.\n", ref); killfocus_ddraw = NULL; }
@@ -16988,14 +16988,14 @@ static void test_killfocus(void) ok(!!killfocus_ddraw, "Failed to create a ddraw object.\n");
hr = IDirectDraw7_SetCooperativeLevel(killfocus_ddraw, window, DDSCL_FULLSCREEN | DDSCL_EXCLUSIVE); - ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#lx.\n", hr);
memset(&surface_desc, 0, sizeof(surface_desc)); surface_desc.dwSize = sizeof(surface_desc); surface_desc.dwFlags = DDSD_CAPS; surface_desc.ddsCaps.dwCaps = DDSCAPS_PRIMARYSURFACE; hr = IDirectDraw7_CreateSurface(killfocus_ddraw, &surface_desc, &killfocus_surface, NULL); - ok(SUCCEEDED(hr), "Failed to create surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create surface, hr %#lx.\n", hr);
SetForegroundWindow(GetDesktopWindow()); ok(!killfocus_ddraw, "WM_KILLFOCUS was not received.\n"); @@ -17044,53 +17044,53 @@ static void test_sysmem_draw(void) }
hr = IDirect3DDevice7_GetDirect3D(device, &d3d); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirect3D7_QueryInterface(d3d, &IID_IDirectDraw7, (void **)&ddraw); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirect3DDevice7_GetRenderTarget(device, &rt); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr);
hr = IDirect3DDevice7_SetRenderState(device, D3DRENDERSTATE_LIGHTING, FALSE); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr);
vb_desc.dwSize = sizeof(vb_desc); vb_desc.dwCaps = D3DVBCAPS_SYSTEMMEMORY; vb_desc.dwFVF = D3DFVF_XYZ | D3DFVF_DIFFUSE; vb_desc.dwNumVertices = 4; hr = IDirect3D7_CreateVertexBuffer(d3d, &vb_desc, &vb, 0); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr);
hr = IDirect3DVertexBuffer7_Lock(vb, 0, (void **)&data, NULL); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); memcpy(data, quad, sizeof(quad)); hr = IDirect3DVertexBuffer7_Unlock(vb); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr);
hr = IDirect3DDevice7_Clear(device, 0, NULL, D3DCLEAR_TARGET, 0x77777777, 0.0f, 0); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr);
hr = IDirect3DDevice7_BeginScene(device); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirect3DDevice7_DrawPrimitiveVB(device, D3DPT_TRIANGLESTRIP, vb, 0, 4, 0); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirect3DDevice7_EndScene(device); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr);
colour = get_surface_color(rt, 320, 240); - ok(compare_color(colour, 0x00007f7f, 1), "Got unexpected colour 0x%08x.\n", colour); + ok(compare_color(colour, 0x00007f7f, 1), "Got unexpected colour 0x%08lx.\n", colour);
hr = IDirect3DDevice7_Clear(device, 0, NULL, D3DCLEAR_TARGET, 0x77777777, 0.0f, 0); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr);
hr = IDirect3DDevice7_BeginScene(device); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirect3DDevice7_DrawIndexedPrimitiveVB(device, D3DPT_TRIANGLESTRIP, vb, 0, 4, indices, 4, 0); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirect3DDevice7_EndScene(device); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr);
colour = get_surface_color(rt, 320, 240); - ok(compare_color(colour, 0x00007f7f, 1), "Got unexpected colour 0x%08x.\n", colour); + ok(compare_color(colour, 0x00007f7f, 1), "Got unexpected colour 0x%08lx.\n", colour);
memset(&surface_desc, 0, sizeof(surface_desc)); surface_desc.dwSize = sizeof(surface_desc); @@ -17106,19 +17106,19 @@ static void test_sysmem_draw(void) U4(U4(surface_desc).ddpfPixelFormat).dwBBitMask = 0x000000ff; U5(U4(surface_desc).ddpfPixelFormat).dwRGBAlphaBitMask = 0xff000000; hr = IDirectDraw7_CreateSurface(ddraw, &surface_desc, &texture, NULL); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirect3DDevice7_SetTexture(device, 0, texture); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
hr = IDirect3DDevice7_Clear(device, 0, NULL, D3DCLEAR_TARGET, 0x77777777, 0.0f, 0); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
hr = IDirect3DDevice7_BeginScene(device); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirect3DDevice7_DrawPrimitiveVB(device, D3DPT_TRIANGLESTRIP, vb, 0, 4, 0); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirect3DDevice7_EndScene(device); - ok(hr == D3D_OK || hr == D3DERR_SCENE_END_FAILED, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK || hr == D3DERR_SCENE_END_FAILED, "Got unexpected hr %#lx.\n", hr);
IDirectDrawSurface7_Release(texture); IDirect3DVertexBuffer7_Release(vb); @@ -17126,7 +17126,7 @@ static void test_sysmem_draw(void) IDirectDraw7_Release(ddraw); IDirect3D7_Release(d3d); refcount = IDirect3DDevice7_Release(device); - ok(!refcount, "Device has %u references left.\n", refcount); + ok(!refcount, "Device has %lu references left.\n", refcount); DestroyWindow(window); }
@@ -17144,38 +17144,38 @@ static void test_gdi_surface(void) ddraw = create_ddraw(); ok(!!ddraw, "Failed to create a ddraw object.\n"); hr = IDirectDraw7_SetCooperativeLevel(ddraw, window, DDSCL_NORMAL); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr);
/* Retrieving the GDI surface requires a primary surface to exist. */ gdi_surface = (void *)0xc0dec0de; hr = IDirectDraw7_GetGDISurface(ddraw, &gdi_surface); - ok(hr == DDERR_NOTFOUND, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_NOTFOUND, "Got unexpected hr %#lx.\n", hr); ok(!gdi_surface, "Got unexpected surface %p.\n", gdi_surface);
hr = IDirectDraw7_FlipToGDISurface(ddraw); - ok(hr == DDERR_NOTFOUND, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_NOTFOUND, "Got unexpected hr %#lx.\n", hr);
memset(&surface_desc, 0, sizeof(surface_desc)); surface_desc.dwSize = sizeof(surface_desc); surface_desc.dwFlags = DDSD_CAPS; surface_desc.ddsCaps.dwCaps = DDSCAPS_PRIMARYSURFACE; hr = IDirectDraw7_CreateSurface(ddraw, &surface_desc, &primary, NULL); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr);
hr = IDirectDraw7_GetGDISurface(ddraw, &gdi_surface); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); ok(gdi_surface == primary, "Got unexpected surface %p, expected %p.\n", gdi_surface, primary); IDirectDrawSurface7_Release(gdi_surface);
/* Flipping to the GDI surface requires the primary surface to be * flippable. */ hr = IDirectDraw7_FlipToGDISurface(ddraw); - ok(hr == DDERR_NOTFLIPPABLE, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_NOTFLIPPABLE, "Got unexpected hr %#lx.\n", hr);
IDirectDrawSurface7_Release(primary);
hr = IDirectDraw7_SetCooperativeLevel(ddraw, window, DDSCL_EXCLUSIVE | DDSCL_FULLSCREEN); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr);
memset(&surface_desc, 0, sizeof(surface_desc)); surface_desc.dwSize = sizeof(surface_desc); @@ -17183,40 +17183,40 @@ static void test_gdi_surface(void) surface_desc.ddsCaps.dwCaps = DDSCAPS_PRIMARYSURFACE | DDSCAPS_COMPLEX | DDSCAPS_FLIP; U5(surface_desc).dwBackBufferCount = 1; hr = IDirectDraw7_CreateSurface(ddraw, &surface_desc, &primary, NULL); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface7_GetAttachedSurface(primary, &caps, &backbuffer); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); ok(backbuffer != primary, "Got unexpected backbuffer %p.\n", backbuffer);
hr = IDirectDraw7_GetGDISurface(ddraw, &gdi_surface); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); ok(gdi_surface == primary, "Got unexpected surface %p, expected %p.\n", gdi_surface, primary); IDirectDrawSurface7_Release(gdi_surface);
hr = IDirectDrawSurface7_Flip(primary, NULL, DDFLIP_WAIT); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirectDraw7_GetGDISurface(ddraw, &gdi_surface); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); ok(gdi_surface == backbuffer || broken(gdi_surface == primary), "Got unexpected surface %p, expected %p.\n", gdi_surface, backbuffer); IDirectDrawSurface7_Release(gdi_surface);
hr = IDirectDraw7_FlipToGDISurface(ddraw); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr);
hr = IDirectDraw7_GetGDISurface(ddraw, &gdi_surface); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); ok(gdi_surface == primary, "Got unexpected surface %p, expected %p.\n", gdi_surface, primary); IDirectDrawSurface7_Release(gdi_surface);
hr = IDirectDraw7_FlipToGDISurface(ddraw); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr);
IDirectDrawSurface7_Release(backbuffer); IDirectDrawSurface7_Release(primary);
refcount = IDirectDraw7_Release(ddraw); - ok(!refcount, "%u references left.\n", refcount); + ok(!refcount, "%lu references left.\n", refcount); DestroyWindow(window); }
@@ -17274,52 +17274,52 @@ static void test_multiply_transform(void) for (i = 0; i < ARRAY_SIZE(tests); ++i) { hr = IDirect3DDevice7_GetTransform(device, tests[i], &ret_mat); - ok(hr == D3D_OK, "Test %u: Got unexpected hr %#x.\n", i, hr); + ok(hr == D3D_OK, "Test %u: Got unexpected hr %#lx.\n", i, hr); ok(!memcmp(&ret_mat, &mat1, sizeof(mat1)), "Test %u: Got unexpected transform matrix.\n", i);
hr = IDirect3DDevice7_MultiplyTransform(device, tests[i], &mat2); - ok(hr == D3D_OK, "Test %u: Got unexpected hr %#x.\n", i, hr); + ok(hr == D3D_OK, "Test %u: Got unexpected hr %#lx.\n", i, hr);
hr = IDirect3DDevice7_GetTransform(device, tests[i], &ret_mat); - ok(hr == D3D_OK, "Test %u: Got unexpected hr %#x.\n", i, hr); + ok(hr == D3D_OK, "Test %u: Got unexpected hr %#lx.\n", i, hr); ok(!memcmp(&ret_mat, &mat2, sizeof(mat2)), "Test %u: Got unexpected transform matrix.\n", i);
/* MultiplyTransform() goes directly into the primary stateblock. */
hr = IDirect3DDevice7_SetTransform(device, tests[i], &mat1); - ok(hr == D3D_OK, "Test %u: Got unexpected hr %#x.\n", i, hr); + ok(hr == D3D_OK, "Test %u: Got unexpected hr %#lx.\n", i, hr);
hr = IDirect3DDevice7_BeginStateBlock(device); - ok(hr == D3D_OK, "Test %u: Got unexpected hr %#x.\n", i, hr); + ok(hr == D3D_OK, "Test %u: Got unexpected hr %#lx.\n", i, hr);
hr = IDirect3DDevice7_MultiplyTransform(device, tests[i], &mat2); - ok(hr == D3D_OK, "Test %u: Got unexpected hr %#x.\n", i, hr); + ok(hr == D3D_OK, "Test %u: Got unexpected hr %#lx.\n", i, hr);
hr = IDirect3DDevice7_EndStateBlock(device, &stateblock); - ok(hr == D3D_OK, "Test %u: Got unexpected hr %#x.\n", i, hr); + ok(hr == D3D_OK, "Test %u: Got unexpected hr %#lx.\n", i, hr);
hr = IDirect3DDevice7_GetTransform(device, tests[i], &ret_mat); - ok(hr == D3D_OK, "Test %u: Got unexpected hr %#x.\n", i, hr); + ok(hr == D3D_OK, "Test %u: Got unexpected hr %#lx.\n", i, hr); ok(!memcmp(&ret_mat, &mat2, sizeof(mat2)), "Test %u: Got unexpected transform matrix.\n", i);
hr = IDirect3DDevice7_CaptureStateBlock(device, stateblock); - ok(hr == D3D_OK, "Test %u: Got unexpected hr %#x.\n", i, hr); + ok(hr == D3D_OK, "Test %u: Got unexpected hr %#lx.\n", i, hr);
hr = IDirect3DDevice7_SetTransform(device, tests[i], &mat1); - ok(hr == D3D_OK, "Test %u: Got unexpected hr %#x.\n", i, hr); + ok(hr == D3D_OK, "Test %u: Got unexpected hr %#lx.\n", i, hr);
hr = IDirect3DDevice7_ApplyStateBlock(device, stateblock); - ok(hr == D3D_OK, "Test %u: Got unexpected hr %#x.\n", i, hr); + ok(hr == D3D_OK, "Test %u: Got unexpected hr %#lx.\n", i, hr);
hr = IDirect3DDevice7_GetTransform(device, tests[i], &ret_mat); - ok(hr == D3D_OK, "Test %u: Got unexpected hr %#x.\n", i, hr); + ok(hr == D3D_OK, "Test %u: Got unexpected hr %#lx.\n", i, hr); ok(!memcmp(&ret_mat, &mat1, sizeof(mat1)), "Test %u: Got unexpected transform matrix.\n", i);
IDirect3DDevice7_DeleteStateBlock(device, stateblock); }
refcount = IDirect3DDevice7_Release(device); - ok(!refcount, "Device has %u references left.\n", refcount); + ok(!refcount, "Device has %lu references left.\n", refcount); DestroyWindow(window); }
@@ -17375,61 +17375,61 @@ static void test_alphatest(void) return; } hr = IDirect3DDevice7_GetRenderTarget(device, &rt); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
hr = IDirect3DDevice7_Clear(device, 0, NULL, D3DCLEAR_TARGET, 0xff0000ff, 0.0f, 0); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirect3DDevice7_SetRenderState(device, D3DRENDERSTATE_LIGHTING, FALSE); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirect3DDevice7_SetRenderState(device, D3DRENDERSTATE_ZENABLE, FALSE); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirect3DDevice7_SetRenderState(device, D3DRENDERSTATE_ALPHATESTENABLE, TRUE); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
for (i = 0; i < ARRAY_SIZE(test_data); ++i) { hr = IDirect3DDevice7_SetRenderState(device, D3DRENDERSTATE_ALPHAFUNC, test_data[i].func); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
hr = IDirect3DDevice7_Clear(device, 0, NULL, D3DCLEAR_TARGET, ALPHATEST_FAILED, 0.0f, 0); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirect3DDevice7_SetRenderState(device, D3DRENDERSTATE_ALPHAREF, 0x70); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirect3DDevice7_BeginScene(device); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirect3DDevice7_DrawPrimitive(device, D3DPT_TRIANGLESTRIP, D3DFVF_XYZ | D3DFVF_DIFFUSE, quad, ARRAY_SIZE(quad), 0); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirect3DDevice7_EndScene(device); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); color = get_surface_color(rt, 320, 240); ok(compare_color(color, test_data[i].color_greater, 0), - "Alphatest failed, color 0x%08x, expected 0x%08x, alpha > ref, func %u.\n", + "Alphatest failed, color 0x%08lx, expected 0x%08lx, alpha > ref, func %u.\n", color, test_data[i].color_greater, test_data[i].func);
hr = IDirect3DDevice7_Clear(device, 0, NULL, D3DCLEAR_TARGET, ALPHATEST_FAILED, 0.0f, 0); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirect3DDevice7_SetRenderState(device, D3DRENDERSTATE_ALPHAREF, 0xff70); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirect3DDevice7_GetRenderState(device, D3DRENDERSTATE_ALPHAREF, &value); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); - ok(value == 0xff70, "Got unexpected value %#x.\n", value); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); + ok(value == 0xff70, "Got unexpected value %#lx.\n", value); hr = IDirect3DDevice7_BeginScene(device); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirect3DDevice7_DrawPrimitive(device, D3DPT_TRIANGLESTRIP, D3DFVF_XYZ | D3DFVF_DIFFUSE, quad, ARRAY_SIZE(quad), 0); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirect3DDevice7_EndScene(device); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); color = get_surface_color(rt, 320, 240); ok(compare_color(color, test_data[i].color_greater, 0), - "Alphatest failed, color 0x%08x, expected 0x%08x, alpha > ref, func %u.\n", + "Alphatest failed, color 0x%08lx, expected 0x%08lx, alpha > ref, func %u.\n", color, test_data[i].color_greater, test_data[i].func); }
IDirectDrawSurface7_Release(rt); refcount = IDirect3DDevice7_Release(device); - ok(!refcount, "Device has %u references left.\n", refcount); + ok(!refcount, "Device has %lu references left.\n", refcount); DestroyWindow(window); }
@@ -17450,24 +17450,24 @@ static void test_clipper_refcount(void) ddraw = create_ddraw(); ok(!!ddraw, "Failed to create a ddraw object.\n"); hr = IDirectDraw7_SetCooperativeLevel(ddraw, window, DDSCL_NORMAL); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr);
memset(&surface_desc, 0, sizeof(surface_desc)); surface_desc.dwSize = sizeof(surface_desc); surface_desc.dwFlags = DDSD_CAPS; surface_desc.ddsCaps.dwCaps = DDSCAPS_PRIMARYSURFACE; hr = IDirectDraw7_CreateSurface(ddraw, &surface_desc, &surface, NULL); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr);
hr = IDirectDraw7_CreateClipper(ddraw, 0, &clipper, NULL); - ok(SUCCEEDED(hr), "Failed to create clipper, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create clipper, hr %#lx.\n", hr); refcount = get_refcount((IUnknown *)clipper); - ok(refcount == 1, "Got unexpected refcount %u.\n", refcount); + ok(refcount == 1, "Got unexpected refcount %lu.\n", refcount);
/* Show that clipper validation doesn't somehow happen through per-clipper vtable * pointers. */ hr = IDirectDraw7_CreateClipper(ddraw, 0, &clipper2, NULL); - ok(SUCCEEDED(hr), "Failed to create clipper, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create clipper, hr %#lx.\n", hr); ok(clipper->lpVtbl == clipper2->lpVtbl, "Got different clipper vtables %p and %p.\n", clipper->lpVtbl, clipper2->lpVtbl); orig_vtbl = clipper->lpVtbl; @@ -17475,50 +17475,50 @@ static void test_clipper_refcount(void)
/* Surfaces hold a reference to clippers. No surprises there. */ hr = IDirectDrawSurface7_SetClipper(surface, clipper); - ok(SUCCEEDED(hr), "Failed to set clipper, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set clipper, hr %#lx.\n", hr); refcount = get_refcount((IUnknown *)clipper); - ok(refcount == 2, "Got unexpected refcount %u.\n", refcount); + ok(refcount == 2, "Got unexpected refcount %lu.\n", refcount);
hr = IDirectDrawSurface7_GetClipper(surface, &clipper2); - ok(SUCCEEDED(hr), "Failed to get clipper, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get clipper, hr %#lx.\n", hr); ok(clipper == clipper2, "Got clipper %p, expected %p.\n", clipper2, clipper); refcount = IDirectDrawClipper_Release(clipper2); - ok(refcount == 2, "Got unexpected refcount %u.\n", refcount); + ok(refcount == 2, "Got unexpected refcount %lu.\n", refcount);
hr = IDirectDrawSurface7_SetClipper(surface, NULL); - ok(SUCCEEDED(hr), "Failed to set clipper, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set clipper, hr %#lx.\n", hr); refcount = get_refcount((IUnknown *)clipper); - ok(refcount == 1, "Got unexpected refcount %u.\n", refcount); + ok(refcount == 1, "Got unexpected refcount %lu.\n", refcount);
hr = IDirectDrawSurface7_SetClipper(surface, clipper); - ok(SUCCEEDED(hr), "Failed to set clipper, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set clipper, hr %#lx.\n", hr); refcount = get_refcount((IUnknown *)clipper); - ok(refcount == 2, "Got unexpected refcount %u.\n", refcount); + ok(refcount == 2, "Got unexpected refcount %lu.\n", refcount);
refcount = IDirectDrawSurface7_Release(surface); - ok(!refcount, "%u references left.\n", refcount); + ok(!refcount, "%lu references left.\n", refcount); refcount = get_refcount((IUnknown *)clipper); - ok(refcount == 1, "Got unexpected refcount %u.\n", refcount); + ok(refcount == 1, "Got unexpected refcount %lu.\n", refcount);
/* SetClipper with an invalid pointer crashes. */
/* Clipper methods work with a broken vtable, with the exception of Release. */ clipper->lpVtbl = (void *)0xdeadbeef; refcount = orig_vtbl->AddRef(clipper); - todo_wine ok(refcount == 2, "Got unexpected refcount %u.\n", refcount); + todo_wine ok(refcount == 2, "Got unexpected refcount %lu.\n", refcount); refcount = orig_vtbl->Release(clipper); - ok(!refcount, "Got unexpected refcount %u.\n", refcount); + ok(!refcount, "Got unexpected refcount %lu.\n", refcount);
clipper->lpVtbl = orig_vtbl; refcount = orig_vtbl->Release(clipper); - todo_wine ok(refcount == 1, "Got unexpected refcount %u.\n", refcount); + todo_wine ok(refcount == 1, "Got unexpected refcount %lu.\n", refcount);
/* Fix the refcount difference because Wine did not increase the ref in the * AddRef call above. */ if (refcount) { refcount = IDirectDrawClipper_Release(clipper); - ok(!refcount, "Got unexpected refcount %u.\n", refcount); + ok(!refcount, "Got unexpected refcount %lu.\n", refcount); }
/* Steal the reference and see what happens - releasing the surface works fine. @@ -17526,11 +17526,11 @@ static void test_clipper_refcount(void) * release it after the GetClipper call is likely to crash, and certain to crash * if we allocate and zero as much heap memory as we can get. */ hr = IDirectDraw7_CreateSurface(ddraw, &surface_desc, &surface, NULL); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirectDraw7_CreateClipper(ddraw, 0, &clipper, NULL); - ok(SUCCEEDED(hr), "Failed to create clipper, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create clipper, hr %#lx.\n", hr); hr = IDirectDrawSurface7_SetClipper(surface, clipper); - ok(SUCCEEDED(hr), "Failed to set clipper, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to set clipper, hr %#lx.\n", hr);
IDirectDrawClipper_Release(clipper); IDirectDrawClipper_Release(clipper); @@ -17546,7 +17546,7 @@ static void test_clipper_refcount(void) * The same Windows and driver versions run the test without heap corruption on * a Geforce 1060 GTX card. I have not seen the problem on AMD GPUs either. */ hr = IDirectDrawSurface7_GetClipper(surface, &clipper2); - ok(SUCCEEDED(hr), "Failed to get clipper, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get clipper, hr %#lx.\n", hr); ok(clipper == clipper2, "Got clipper %p, expected %p.\n", clipper2, clipper); }
@@ -17554,10 +17554,10 @@ static void test_clipper_refcount(void) * vtable through the clipper pointer because it is no longer pointing to * valid memory. */ refcount = orig_vtbl->Release(clipper); - ok(!refcount, "%u references left.\n", refcount); + ok(!refcount, "%lu references left.\n", refcount);
refcount = IDirectDrawSurface7_Release(surface); - ok(!refcount, "%u references left.\n", refcount); + ok(!refcount, "%lu references left.\n", refcount);
/* It looks like the protection against invalid thispointers is part of * the IDirectDrawClipper method implementation, not IDirectDrawSurface. */ @@ -17570,33 +17570,33 @@ static void test_clipper_refcount(void) clipper->lpVtbl = orig_vtbl;
refcount = orig_vtbl->AddRef(clipper); - todo_wine ok(!refcount, "Got refcount %u.\n", refcount); + todo_wine ok(!refcount, "Got refcount %lu.\n", refcount); refcount = orig_vtbl->AddRef((IDirectDrawClipper *)(ULONG_PTR)0xdeadbeef); - ok(!refcount, "Got refcount %u.\n", refcount); + ok(!refcount, "Got refcount %lu.\n", refcount);
changed = 0x1234; hr = orig_vtbl->IsClipListChanged(clipper, &changed); - todo_wine ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#x.\n", hr); + todo_wine ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#lx.\n", hr); todo_wine ok(changed == 0x1234, "'changed' changed: %x.\n", changed);
changed = 0x1234; hr = orig_vtbl->IsClipListChanged((IDirectDrawClipper *)(ULONG_PTR)0xdeadbeef, &changed); - ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#lx.\n", hr); ok(changed == 0x1234, "'changed' changed: %x.\n", changed);
/* Nope, we can't initialize our fake clipper. */ hr = IDirectDraw7_QueryInterface(ddraw, &IID_IDirectDraw, (void **)&ddraw1); - ok(SUCCEEDED(hr), "Failed to get ddraw1 interface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get ddraw1 interface, hr %#lx.\n", hr);
hr = orig_vtbl->Initialize(clipper, ddraw1, 0); - todo_wine ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#x.\n", hr); + todo_wine ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#lx.\n", hr);
IDirectDraw_Release(ddraw1);
HeapFree(GetProcessHeap(), 0, clipper);
refcount = IDirectDraw7_Release(ddraw); - ok(!refcount, "%u references left.\n", refcount); + ok(!refcount, "%lu references left.\n", refcount); DestroyWindow(window); }
@@ -17618,56 +17618,56 @@ static void test_begin_end_state_block(void) }
hr = IDirect3DDevice7_BeginStateBlock(device); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
hr = IDirect3DDevice7_SetRenderState(device, D3DRENDERSTATE_LIGHTING, FALSE); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
stateblock = 0xdeadbeef; hr = IDirect3DDevice7_EndStateBlock(device, &stateblock); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); - ok(!!stateblock && stateblock != 0xdeadbeef, "Got unexpected stateblock %#x.\n", stateblock); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); + ok(!!stateblock && stateblock != 0xdeadbeef, "Got unexpected stateblock %#lx.\n", stateblock);
stateblock2 = 0xdeadbeef; hr = IDirect3DDevice7_EndStateBlock(device, &stateblock2); - ok(hr == D3DERR_NOTINBEGINSTATEBLOCK, "Got unexpected hr %#x.\n", hr); - ok(stateblock2 == 0xdeadbeef, "Got unexpected stateblock %#x.\n", stateblock2); + ok(hr == D3DERR_NOTINBEGINSTATEBLOCK, "Got unexpected hr %#lx.\n", hr); + ok(stateblock2 == 0xdeadbeef, "Got unexpected stateblock %#lx.\n", stateblock2);
hr = IDirect3DDevice7_GetRenderState(device, D3DRENDERSTATE_LIGHTING, &value); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); - ok(value == TRUE, "Got unexpected value %#x.\n", value); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); + ok(value == TRUE, "Got unexpected value %#lx.\n", value);
hr = IDirect3DDevice7_BeginStateBlock(device); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
hr = IDirect3DDevice7_BeginStateBlock(device); - ok(hr == D3DERR_INBEGINSTATEBLOCK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3DERR_INBEGINSTATEBLOCK, "Got unexpected hr %#lx.\n", hr);
hr = IDirect3DDevice7_ApplyStateBlock(device, stateblock); - ok(hr == D3DERR_INBEGINSTATEBLOCK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3DERR_INBEGINSTATEBLOCK, "Got unexpected hr %#lx.\n", hr);
hr = IDirect3DDevice7_CaptureStateBlock(device, stateblock); - ok(hr == D3DERR_INBEGINSTATEBLOCK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3DERR_INBEGINSTATEBLOCK, "Got unexpected hr %#lx.\n", hr);
hr = IDirect3DDevice7_CreateStateBlock(device, D3DSBT_ALL, &stateblock2); - ok(hr == D3DERR_INBEGINSTATEBLOCK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3DERR_INBEGINSTATEBLOCK, "Got unexpected hr %#lx.\n", hr);
hr = IDirect3DDevice7_GetRenderState(device, D3DRENDERSTATE_LIGHTING, &value); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); - ok(value == TRUE, "Got unexpected value %#x.\n", value); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); + ok(value == TRUE, "Got unexpected value %#lx.\n", value);
hr = IDirect3DDevice7_EndStateBlock(device, &stateblock2); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
hr = IDirect3DDevice7_ApplyStateBlock(device, stateblock2); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
hr = IDirect3DDevice7_GetRenderState(device, D3DRENDERSTATE_LIGHTING, &value); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); - ok(value == TRUE, "Got unexpected value %#x.\n", value); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); + ok(value == TRUE, "Got unexpected value %#lx.\n", value);
refcount = IDirect3DDevice7_Release(device); - ok(!refcount, "Device has %u references left.\n", refcount); + ok(!refcount, "Device has %lu references left.\n", refcount); DestroyWindow(window); }
@@ -17719,77 +17719,77 @@ static void test_caps(void) hal_caps.dwSize = sizeof(hal_caps); hel_caps.dwSize = sizeof(hel_caps); hr = IDirectDraw7_GetCaps(ddraw, &hal_caps, &hel_caps); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); ok(hal_caps.ddsOldCaps.dwCaps == hal_caps.ddsCaps.dwCaps, - "Got unexpected caps %#x, expected %#x.\n", + "Got unexpected caps %#lx, expected %#lx.\n", hal_caps.ddsOldCaps.dwCaps, hal_caps.ddsCaps.dwCaps); ok(hel_caps.ddsOldCaps.dwCaps == hel_caps.ddsCaps.dwCaps, - "Got unexpected caps %#x, expected %#x.\n", + "Got unexpected caps %#lx, expected %#lx.\n", hel_caps.ddsOldCaps.dwCaps, hel_caps.ddsCaps.dwCaps);
no3d = !(hal_caps.ddsCaps.dwCaps & DDSCAPS_3DDEVICE); if (hal_caps.ddsCaps.dwCaps) { - ok(!(hal_caps.ddsCaps.dwCaps & caps_never), "Got unexpected caps %#x.\n", hal_caps.ddsCaps.dwCaps); - ok(!(~hal_caps.ddsCaps.dwCaps & caps_always), "Got unexpected caps %#x.\n", hal_caps.ddsCaps.dwCaps); + ok(!(hal_caps.ddsCaps.dwCaps & caps_never), "Got unexpected caps %#lx.\n", hal_caps.ddsCaps.dwCaps); + ok(!(~hal_caps.ddsCaps.dwCaps & caps_always), "Got unexpected caps %#lx.\n", hal_caps.ddsCaps.dwCaps); todo_wine_if(no3d) ok(!(~hal_caps.ddsCaps.dwCaps & caps_hal), - "Got unexpected caps %#x.\n", hal_caps.ddsCaps.dwCaps); + "Got unexpected caps %#lx.\n", hal_caps.ddsCaps.dwCaps); } - ok(!(hel_caps.ddsCaps.dwCaps & caps_never), "Got unexpected caps %#x.\n", hel_caps.ddsCaps.dwCaps); - ok(!(~hel_caps.ddsCaps.dwCaps & caps_always), "Got unexpected caps %#x.\n", hel_caps.ddsCaps.dwCaps); + ok(!(hel_caps.ddsCaps.dwCaps & caps_never), "Got unexpected caps %#lx.\n", hel_caps.ddsCaps.dwCaps); + ok(!(~hel_caps.ddsCaps.dwCaps & caps_always), "Got unexpected caps %#lx.\n", hel_caps.ddsCaps.dwCaps); todo_wine_if(!no3d) ok(!(hel_caps.ddsCaps.dwCaps & caps_hal), - "Got unexpected caps %#x.\n", hel_caps.ddsCaps.dwCaps); + "Got unexpected caps %#lx.\n", hel_caps.ddsCaps.dwCaps);
IDirectDraw7_Release(ddraw);
if (hal_caps.ddsCaps.dwCaps) { hr = pDirectDrawCreateEx((GUID *)DDCREATE_HARDWAREONLY, (void **)&ddraw, &IID_IDirectDraw7, NULL); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr);
memset(&hal_caps, 0, sizeof(hal_caps)); memset(&hel_caps, 0, sizeof(hel_caps)); hal_caps.dwSize = sizeof(hal_caps); hel_caps.dwSize = sizeof(hel_caps); hr = IDirectDraw7_GetCaps(ddraw, &hal_caps, &hel_caps); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); ok(hal_caps.ddsOldCaps.dwCaps == hal_caps.ddsCaps.dwCaps, - "Got unexpected caps %#x, expected %#x.\n", + "Got unexpected caps %#lx, expected %#lx.\n", hal_caps.ddsOldCaps.dwCaps, hal_caps.ddsCaps.dwCaps); ok(hel_caps.ddsOldCaps.dwCaps == hel_caps.ddsCaps.dwCaps, - "Got unexpected caps %#x, expected %#x.\n", + "Got unexpected caps %#lx, expected %#lx.\n", hel_caps.ddsOldCaps.dwCaps, hel_caps.ddsCaps.dwCaps);
- ok(!(hal_caps.ddsCaps.dwCaps & caps_never), "Got unexpected caps %#x.\n", hal_caps.ddsCaps.dwCaps); - ok(!(~hal_caps.ddsCaps.dwCaps & caps_always), "Got unexpected caps %#x.\n", hal_caps.ddsCaps.dwCaps); + ok(!(hal_caps.ddsCaps.dwCaps & caps_never), "Got unexpected caps %#lx.\n", hal_caps.ddsCaps.dwCaps); + ok(!(~hal_caps.ddsCaps.dwCaps & caps_always), "Got unexpected caps %#lx.\n", hal_caps.ddsCaps.dwCaps); todo_wine_if(no3d) ok(!(~hal_caps.ddsCaps.dwCaps & caps_hal), - "Got unexpected caps %#x.\n", hal_caps.ddsCaps.dwCaps); - todo_wine ok(!hel_caps.ddsCaps.dwCaps, "Got unexpected caps %#x.\n", hel_caps.ddsCaps.dwCaps); + "Got unexpected caps %#lx.\n", hal_caps.ddsCaps.dwCaps); + todo_wine ok(!hel_caps.ddsCaps.dwCaps, "Got unexpected caps %#lx.\n", hel_caps.ddsCaps.dwCaps);
IDirectDraw7_Release(ddraw); }
hr = pDirectDrawCreateEx((GUID *)DDCREATE_EMULATIONONLY, (void **)&ddraw, &IID_IDirectDraw7, NULL); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr);
memset(&hal_caps, 0, sizeof(hal_caps)); memset(&hel_caps, 0, sizeof(hel_caps)); hal_caps.dwSize = sizeof(hal_caps); hel_caps.dwSize = sizeof(hel_caps); hr = IDirectDraw7_GetCaps(ddraw, &hal_caps, &hel_caps); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); ok(hal_caps.ddsOldCaps.dwCaps == hal_caps.ddsCaps.dwCaps, - "Got unexpected caps %#x, expected %#x.\n", + "Got unexpected caps %#lx, expected %#lx.\n", hal_caps.ddsOldCaps.dwCaps, hal_caps.ddsCaps.dwCaps); ok(hel_caps.ddsOldCaps.dwCaps == hel_caps.ddsCaps.dwCaps, - "Got unexpected caps %#x, expected %#x.\n", + "Got unexpected caps %#lx, expected %#lx.\n", hel_caps.ddsOldCaps.dwCaps, hel_caps.ddsCaps.dwCaps);
- todo_wine ok(!hal_caps.ddsCaps.dwCaps, "Got unexpected caps %#x.\n", hal_caps.ddsCaps.dwCaps); - ok(!(hel_caps.ddsCaps.dwCaps & caps_never), "Got unexpected caps %#x.\n", hel_caps.ddsCaps.dwCaps); - ok(!(~hel_caps.ddsCaps.dwCaps & caps_always), "Got unexpected caps %#x.\n", hel_caps.ddsCaps.dwCaps); + todo_wine ok(!hal_caps.ddsCaps.dwCaps, "Got unexpected caps %#lx.\n", hal_caps.ddsCaps.dwCaps); + ok(!(hel_caps.ddsCaps.dwCaps & caps_never), "Got unexpected caps %#lx.\n", hel_caps.ddsCaps.dwCaps); + ok(!(~hel_caps.ddsCaps.dwCaps & caps_always), "Got unexpected caps %#lx.\n", hel_caps.ddsCaps.dwCaps); todo_wine_if(!no3d) ok(!(hel_caps.ddsCaps.dwCaps & caps_hal), - "Got unexpected caps %#x.\n", hel_caps.ddsCaps.dwCaps); + "Got unexpected caps %#lx.\n", hel_caps.ddsCaps.dwCaps);
IDirectDraw7_Release(ddraw); } @@ -17807,7 +17807,7 @@ static void test_d32_support(void) ddraw = create_ddraw(); ok(!!ddraw, "Failed to create a ddraw object.\n"); hr = IDirectDraw7_SetCooperativeLevel(ddraw, window, DDSCL_NORMAL); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr);
memset(&surface_desc, 0, sizeof(surface_desc)); surface_desc.dwSize = sizeof(surface_desc); @@ -17820,25 +17820,25 @@ static void test_d32_support(void) surface_desc.dwWidth = 64; surface_desc.dwHeight = 64; hr = IDirectDraw7_CreateSurface(ddraw, &surface_desc, &surface, NULL); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr);
memset(&surface_desc, 0, sizeof(surface_desc)); surface_desc.dwSize = sizeof(surface_desc); hr = IDirectDrawSurface7_GetSurfaceDesc(surface, &surface_desc); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); - ok((surface_desc.dwFlags & DDSD_PIXELFORMAT), "Got unexpected flags %#x.\n", surface_desc.dwFlags); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); + ok((surface_desc.dwFlags & DDSD_PIXELFORMAT), "Got unexpected flags %#lx.\n", surface_desc.dwFlags); ok(U4(surface_desc).ddpfPixelFormat.dwFlags & DDPF_ZBUFFER, - "Got unexpected format flags %#x.\n", U4(surface_desc).ddpfPixelFormat.dwFlags); + "Got unexpected format flags %#lx.\n", U4(surface_desc).ddpfPixelFormat.dwFlags); ok(U1(U4(surface_desc).ddpfPixelFormat).dwZBufferBitDepth == 32, - "Got unexpected dwZBufferBitDepth %u.\n", U1(U4(surface_desc).ddpfPixelFormat).dwZBufferBitDepth); + "Got unexpected dwZBufferBitDepth %lu.\n", U1(U4(surface_desc).ddpfPixelFormat).dwZBufferBitDepth); ok(U3(U4(surface_desc).ddpfPixelFormat).dwZBitMask == 0xffffffff, - "Got unexpected Z mask 0x%08x.\n", U3(U4(surface_desc).ddpfPixelFormat).dwZBitMask); + "Got unexpected Z mask 0x%08lx.\n", U3(U4(surface_desc).ddpfPixelFormat).dwZBitMask); ok(!(surface_desc.ddsCaps.dwCaps & DDSCAPS_VIDEOMEMORY), - "Got unexpected surface caps %#x.\n", surface_desc.ddsCaps.dwCaps); + "Got unexpected surface caps %#lx.\n", surface_desc.ddsCaps.dwCaps); IDirectDrawSurface7_Release(surface);
refcount = IDirectDraw7_Release(ddraw); - ok(!refcount, "%u references left.\n", refcount); + ok(!refcount, "%lu references left.\n", refcount); DestroyWindow(window); }
@@ -18040,11 +18040,11 @@ static void test_surface_format_conversion_alpha(void) ddraw = create_ddraw(); ok(!!ddraw, "Failed to create a ddraw object.\n"); hr = IDirectDraw7_SetCooperativeLevel(ddraw, window, DDSCL_NORMAL); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr);
hr = IDirect3DDevice7_EnumTextureFormats(device, test_block_formats_creation_cb, &supported_fmts); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr);
is_wine = !strcmp(winetest_platform, "wine");
@@ -18082,17 +18082,17 @@ static void test_surface_format_conversion_alpha(void) U4(surface_desc).ddpfPixelFormat = src_format->fmt; surface_desc.ddsCaps.dwCaps = test_caps[j].src_caps; hr = IDirectDraw7_CreateSurface(ddraw, &surface_desc, &src_surf, NULL); - ok(hr == DD_OK, "Test (%u, %u), got unexpected hr %#x.\n", j, i, hr); + ok(hr == DD_OK, "Test (%u, %u), got unexpected hr %#lx.\n", j, i, hr);
U4(surface_desc).ddpfPixelFormat = dst_format->fmt; surface_desc.ddsCaps.dwCaps = test_caps[j].dst_caps; hr = IDirectDraw7_CreateSurface(ddraw, &surface_desc, &dst_surf, NULL); - ok(hr == DD_OK, "Test (%u, %u), got unexpected hr %#x.\n", j, i, hr); + ok(hr == DD_OK, "Test (%u, %u), got unexpected hr %#lx.\n", j, i, hr);
memset(&lock, 0, sizeof(lock)); lock.dwSize = sizeof(lock); hr = IDirectDrawSurface7_Lock(src_surf, NULL, &lock, 0, NULL); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); pitch = U1(lock).lPitch; for (y = 0; y < src_format->y_blocks; ++y) { @@ -18101,7 +18101,7 @@ static void test_surface_format_conversion_alpha(void) src_format->block_size * src_format->x_blocks); } hr = IDirectDrawSurface7_Unlock(src_surf, NULL); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr);
hr = IDirectDrawSurface7_Blt(dst_surf, NULL, src_surf, NULL, DDBLT_WAIT, NULL); if (!is_wine && FAILED(hr)) @@ -18109,17 +18109,17 @@ static void test_surface_format_conversion_alpha(void) /* Some software blits are rejected on Windows. */ IDirectDrawSurface7_Release(dst_surf); IDirectDrawSurface7_Release(src_surf); - skip("Skipping test (%u, %u), cannot blit %s -> %s, hr %#x.\n", j, i, + skip("Skipping test (%u, %u), cannot blit %s -> %s, hr %#lx.\n", j, i, src_format->name, dst_format->name, hr); continue; } - ok(hr == DD_OK, "Test (%u, %s -> %s), got unexpected hr %#x.\n", j, + ok(hr == DD_OK, "Test (%u, %s -> %s), got unexpected hr %#lx.\n", j, src_format->name, dst_format->name, hr);
memset(&lock, 0, sizeof(lock)); lock.dwSize = sizeof(lock); hr = IDirectDrawSurface7_Lock(dst_surf, NULL, &lock, 0, NULL); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); pitch = U1(lock).lPitch;
for (y = 0; y < dst_format->y_blocks; ++y) @@ -18147,7 +18147,7 @@ static void test_surface_format_conversion_alpha(void) break; } hr = IDirectDrawSurface7_Unlock(dst_surf, NULL); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr);
IDirectDrawSurface7_Release(dst_surf); IDirectDrawSurface7_Release(src_surf); @@ -18156,7 +18156,7 @@ static void test_surface_format_conversion_alpha(void)
IDirect3DDevice7_Release(device); refcount = IDirectDraw7_Release(ddraw); - ok(!refcount, "%u references left.\n", refcount); + ok(!refcount, "%lu references left.\n", refcount); DestroyWindow(window); }
@@ -18250,11 +18250,11 @@ static void test_compressed_surface_stretch(void) ddraw = create_ddraw(); ok(!!ddraw, "Failed to create a ddraw object.\n"); hr = IDirectDraw7_SetCooperativeLevel(ddraw, window, DDSCL_NORMAL); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr);
hr = IDirect3DDevice7_EnumTextureFormats(device, test_block_formats_creation_cb, &supported_fmts); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr);
memset(&src_surface_desc, 0, sizeof(src_surface_desc)); src_surface_desc.dwSize = sizeof(src_surface_desc); @@ -18301,22 +18301,22 @@ static void test_compressed_surface_stretch(void) rb_surface_desc.dwHeight = max(src_surface_desc.dwHeight, dst_surface_desc.dwHeight);
hr = IDirectDraw7_CreateSurface(ddraw, &rb_surface_desc, &rb_surf, NULL); - ok(hr == DD_OK, "Test (%u, %u), got unexpected hr %#x.\n", i, j, hr); + ok(hr == DD_OK, "Test (%u, %u), got unexpected hr %#lx.\n", i, j, hr);
for (k = 0; k < ARRAY_SIZE(test_formats); ++k) { U4(src_surface_desc).ddpfPixelFormat = test_formats[k].fmt; hr = IDirectDraw7_CreateSurface(ddraw, &src_surface_desc, &src_surf, NULL); - ok(hr == DD_OK, "Test (%u, %u, %u), got unexpected hr %#x.\n", i, j, k, hr); + ok(hr == DD_OK, "Test (%u, %u, %u), got unexpected hr %#lx.\n", i, j, k, hr);
U5(fx).dwFillColor = 0x801f; hr = IDirectDrawSurface7_Blt(rb_surf, NULL, NULL, NULL, DDBLT_COLORFILL | DDBLT_WAIT, &fx); - ok(hr == DD_OK, "Test (%u, %u, %u), got unexpected hr %#x.\n", i, j, k, hr); + ok(hr == DD_OK, "Test (%u, %u, %u), got unexpected hr %#lx.\n", i, j, k, hr);
hr = IDirectDrawSurface7_Blt(src_surf, &src_rect, rb_surf, &src_rect, DDBLT_WAIT, NULL);
todo_wine_if(test_formats[k].fmt.dwFlags == DDPF_FOURCC && test_sizes[j].todo_src) - ok(hr == DD_OK, "Test (%u, %u, %u), got unexpected hr %#x.\n", i, j, k, hr); + ok(hr == DD_OK, "Test (%u, %u, %u), got unexpected hr %#lx.\n", i, j, k, hr); if (FAILED(hr)) { IDirectDrawSurface7_Release(src_surf); @@ -18334,7 +18334,7 @@ static void test_compressed_surface_stretch(void) U4(dst_surface_desc).ddpfPixelFormat = test_formats[l].fmt;
hr = IDirectDraw7_CreateSurface(ddraw, &dst_surface_desc, &dst_surf, NULL); - ok(hr == DD_OK, "Test (%u, %u, %u, %u), got unexpected hr %#x.\n", i, j, k, l, hr); + ok(hr == DD_OK, "Test (%u, %u, %u, %u), got unexpected hr %#lx.\n", i, j, k, l, hr);
memset(&lock, 0, sizeof(lock)); lock.dwSize = sizeof(lock); @@ -18347,15 +18347,15 @@ static void test_compressed_surface_stretch(void) if (test_formats[l].fmt.dwFourCC == MAKEFOURCC('D', 'X', 'T', '3')) { hr = IDirectDrawSurface7_Lock(dst_surf, NULL, &lock, 0, NULL); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); memset(lock.lpSurface, 0, U1(lock).dwLinearSize); hr = IDirectDrawSurface7_Unlock(dst_surf, NULL); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); }
hr = IDirectDrawSurface7_Blt(dst_surf, &dst_rect, src_surf, &src_rect, DDBLT_WAIT, NULL); todo_wine_if(test_formats[l].fmt.dwFlags == DDPF_FOURCC && test_sizes[j].todo_dst) - ok(hr == DD_OK, "Test (%u, %u, %u, %u), got unexpected hr %#x.\n", i, j, k, l, hr); + ok(hr == DD_OK, "Test (%u, %u, %u, %u), got unexpected hr %#lx.\n", i, j, k, l, hr); if (FAILED(hr)) { IDirectDrawSurface7_Release(dst_surf); @@ -18364,12 +18364,12 @@ static void test_compressed_surface_stretch(void)
U5(fx).dwFillColor = 0xffffffff; hr = IDirectDrawSurface7_Blt(rb_surf, NULL, NULL, NULL, DDBLT_COLORFILL | DDBLT_WAIT, &fx); - ok(hr == DD_OK, "Test (%u, %u, %u, %u), got unexpected hr %#x.\n", i, j, k, l, hr); + ok(hr == DD_OK, "Test (%u, %u, %u, %u), got unexpected hr %#lx.\n", i, j, k, l, hr);
hr = IDirectDrawSurface7_Blt(rb_surf, &dst_rect, dst_surf, &dst_rect, DDBLT_WAIT, NULL); - ok(hr == DD_OK, "Test (%u, %u, %u, %u), got unexpected hr %#x.\n", i, j, k, l, hr); + ok(hr == DD_OK, "Test (%u, %u, %u, %u), got unexpected hr %#lx.\n", i, j, k, l, hr); hr = IDirectDrawSurface7_Lock(rb_surf, NULL, &lock, 0, NULL); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); pitch = U1(lock).lPitch;
passed = TRUE; @@ -18395,7 +18395,7 @@ static void test_compressed_surface_stretch(void)
IDirect3DDevice7_Release(device); refcount = IDirectDraw7_Release(ddraw); - ok(!refcount, "%u references left.\n", refcount); + ok(!refcount, "%lu references left.\n", refcount); DestroyWindow(window); }
@@ -18457,13 +18457,13 @@ static void test_cursor_clipping(void) memset(&surface_desc, 0, sizeof(surface_desc)); surface_desc.dwSize = sizeof(surface_desc); hr = IDirectDraw7_GetDisplayMode(ddraw, &surface_desc); - ok(hr == DD_OK, "GetDisplayMode failed, hr %#x.\n", hr); + ok(hr == DD_OK, "GetDisplayMode failed, hr %#lx.\n", hr);
memset(¶m, 0, sizeof(param)); param.old_width = surface_desc.dwWidth; param.old_height = surface_desc.dwHeight; hr = IDirectDraw7_EnumDisplayModes(ddraw, 0, NULL, ¶m, find_different_mode_callback); - ok(hr == DD_OK, "EnumDisplayModes failed, hr %#x.\n", hr); + ok(hr == DD_OK, "EnumDisplayModes failed, hr %#lx.\n", hr); if (!(param.new_width && param.new_height)) { skip("Failed to find a different mode than %ux%u.\n", param.old_width, param.old_height); @@ -18471,87 +18471,87 @@ static void test_cursor_clipping(void) }
ret = ClipCursor(NULL); - ok(ret, "ClipCursor failed, error %#x.\n", GetLastError()); + ok(ret, "ClipCursor failed, error %#lx.\n", GetLastError()); get_virtual_rect(&rect); ret = GetClipCursor(&clip_rect); - ok(ret, "GetClipCursor failed, error %#x.\n", GetLastError()); + ok(ret, "GetClipCursor failed, error %#lx.\n", GetLastError()); ok(EqualRect(&clip_rect, &rect), "Expect clip rect %s, got %s.\n", wine_dbgstr_rect(&rect), wine_dbgstr_rect(&clip_rect));
/* Set cooperative level to normal */ hr = IDirectDraw7_SetCooperativeLevel(ddraw, window, DDSCL_NORMAL); - ok(hr == DD_OK, "SetCooperativeLevel failed, hr %#x.\n", hr); + ok(hr == DD_OK, "SetCooperativeLevel failed, hr %#lx.\n", hr); flush_events(); get_virtual_rect(&rect); ret = GetClipCursor(&clip_rect); - ok(ret, "GetClipCursor failed, error %#x.\n", GetLastError()); + ok(ret, "GetClipCursor failed, error %#lx.\n", GetLastError()); ok(EqualRect(&clip_rect, &rect), "Expect clip rect %s, got %s.\n", wine_dbgstr_rect(&rect), wine_dbgstr_rect(&clip_rect));
hr = set_display_mode(ddraw, param.new_width, param.new_height); - ok(hr == DD_OK || hr == DDERR_UNSUPPORTED, "SetDisplayMode failed, hr %#x.\n", hr); + ok(hr == DD_OK || hr == DDERR_UNSUPPORTED, "SetDisplayMode failed, hr %#lx.\n", hr); if (FAILED(hr)) { - win_skip("SetDisplayMode failed, hr %#x.\n", hr); + win_skip("SetDisplayMode failed, hr %#lx.\n", hr); goto done; } flush_events(); get_virtual_rect(&rect); ret = GetClipCursor(&clip_rect); - ok(ret, "GetClipCursor failed, error %#x.\n", GetLastError()); + ok(ret, "GetClipCursor failed, error %#lx.\n", GetLastError()); ok(EqualRect(&clip_rect, &rect), "Expect clip rect %s, got %s.\n", wine_dbgstr_rect(&rect), wine_dbgstr_rect(&clip_rect));
hr = IDirectDraw7_RestoreDisplayMode(ddraw); - ok(hr == DD_OK, "RestoreDisplayMode failed, hr %#x.\n", hr); + ok(hr == DD_OK, "RestoreDisplayMode failed, hr %#lx.\n", hr); flush_events(); get_virtual_rect(&rect); ret = GetClipCursor(&clip_rect); - ok(ret, "GetClipCursor failed, error %#x.\n", GetLastError()); + ok(ret, "GetClipCursor failed, error %#lx.\n", GetLastError()); ok(EqualRect(&clip_rect, &rect), "Expect clip rect %s, got %s.\n", wine_dbgstr_rect(&rect), wine_dbgstr_rect(&clip_rect));
/* Switch to full screen cooperative level */ hr = IDirectDraw7_SetCooperativeLevel(ddraw, window, DDSCL_EXCLUSIVE | DDSCL_FULLSCREEN); - ok(hr == DD_OK, "SetCooperativeLevel failed, hr %#x.\n", hr); + ok(hr == DD_OK, "SetCooperativeLevel failed, hr %#lx.\n", hr); flush_events(); SetRect(&rect, 0, 0, param.old_width, param.old_height); ret = GetClipCursor(&clip_rect); - ok(ret, "GetClipCursor failed, error %#x.\n", GetLastError()); + ok(ret, "GetClipCursor failed, error %#lx.\n", GetLastError()); ok(EqualRect(&clip_rect, &rect), "Expect clip rect %s, got %s.\n", wine_dbgstr_rect(&rect), wine_dbgstr_rect(&clip_rect));
hr = set_display_mode(ddraw, param.new_width, param.new_height); - ok(hr == DD_OK || hr == DDERR_UNSUPPORTED, "SetDisplayMode failed, hr %#x.\n", hr); + ok(hr == DD_OK || hr == DDERR_UNSUPPORTED, "SetDisplayMode failed, hr %#lx.\n", hr); if (FAILED(hr)) { - win_skip("SetDisplayMode failed, hr %#x.\n", hr); + win_skip("SetDisplayMode failed, hr %#lx.\n", hr); goto done; } flush_events(); SetRect(&rect, 0, 0, param.new_width, param.new_height); ret = GetClipCursor(&clip_rect); - ok(ret, "GetClipCursor failed, error %#x.\n", GetLastError()); + ok(ret, "GetClipCursor failed, error %#lx.\n", GetLastError()); ok(EqualRect(&clip_rect, &rect), "Expect clip rect %s, got %s.\n", wine_dbgstr_rect(&rect), wine_dbgstr_rect(&clip_rect));
/* Restore display mode */ hr = IDirectDraw7_RestoreDisplayMode(ddraw); - ok(hr == DD_OK, "RestoreDisplayMode failed, hr %#x.\n", hr); + ok(hr == DD_OK, "RestoreDisplayMode failed, hr %#lx.\n", hr); flush_events(); SetRect(&rect, 0, 0, param.old_width, param.old_height); ret = GetClipCursor(&clip_rect); - ok(ret, "GetClipCursor failed, error %#x.\n", GetLastError()); + ok(ret, "GetClipCursor failed, error %#lx.\n", GetLastError()); ok(EqualRect(&clip_rect, &rect), "Expect clip rect %s, got %s.\n", wine_dbgstr_rect(&rect), wine_dbgstr_rect(&clip_rect));
/* Switch to normal cooperative level */ hr = IDirectDraw7_SetCooperativeLevel(ddraw, window, DDSCL_NORMAL); - ok(hr == DD_OK, "SetCooperativeLevel failed, hr %#x.\n", hr); + ok(hr == DD_OK, "SetCooperativeLevel failed, hr %#lx.\n", hr); flush_events(); get_virtual_rect(&rect); ret = GetClipCursor(&clip_rect); - ok(ret, "GetClipCursor failed, error %#x.\n", GetLastError()); + ok(ret, "GetClipCursor failed, error %#lx.\n", GetLastError()); ok(EqualRect(&clip_rect, &rect), "Expect clip rect %s, got %s.\n", wine_dbgstr_rect(&rect), wine_dbgstr_rect(&clip_rect));
@@ -18578,10 +18578,10 @@ static BOOL CALLBACK test_window_position_cb(HMONITOR monitor, HDC hdc, RECT *mo flush_events();
hr = IDirectDraw7_SetCooperativeLevel(ddraw, window, DDSCL_EXCLUSIVE | DDSCL_FULLSCREEN); - ok(hr == DD_OK, "SetCooperativeLevel failed, hr %#x.\n", hr); + ok(hr == DD_OK, "SetCooperativeLevel failed, hr %#lx.\n", hr); flush_events(); ret = GetWindowRect(window, &window_rect); - ok(ret, "GetWindowRect failed, error %#x.\n", GetLastError()); + ok(ret, "GetWindowRect failed, error %#lx.\n", GetLastError()); SetRect(&primary_rect, 0, 0, GetSystemMetrics(SM_CXSCREEN), GetSystemMetrics(SM_CYSCREEN)); ok(EqualRect(&window_rect, &primary_rect), "Expect window rect %s, got %s.\n", wine_dbgstr_rect(&primary_rect), wine_dbgstr_rect(&window_rect)); @@ -18592,9 +18592,9 @@ static BOOL CALLBACK test_window_position_cb(HMONITOR monitor, HDC hdc, RECT *mo
ret = MoveWindow(window, new_rect.left, new_rect.top, new_rect.right - new_rect.left, new_rect.bottom - new_rect.top, TRUE); - ok(ret, "Got unexpected ret %#x, error %#x.\n", ret, GetLastError()); + ok(ret, "Got unexpected ret %#x, error %#lx.\n", ret, GetLastError()); ret = GetWindowRect(window, &window_rect); - ok(ret, "Got unexpected ret %#x, error %#x.\n", ret, GetLastError()); + ok(ret, "Got unexpected ret %#x, error %#lx.\n", ret, GetLastError()); ok(EqualRect(&window_rect, &new_rect), "Expected window rect %s, got %s.\n", wine_dbgstr_rect(monitor_rect), wine_dbgstr_rect(&window_rect)); @@ -18602,7 +18602,7 @@ static BOOL CALLBACK test_window_position_cb(HMONITOR monitor, HDC hdc, RECT *mo * on the second resize remains. */ flush_events(); ret = GetWindowRect(window, &window_rect); - ok(ret, "Got unexpected ret %#x, error %#x.\n", ret, GetLastError()); + ok(ret, "Got unexpected ret %#x, error %#lx.\n", ret, GetLastError()); /* Both Windows and Wine change the size of the window. On Windows it is exactly the new size but in Wine * it may get adjusted depending on window manager. */ ok(window_rect.right != monitor_rect->right && window_rect.bottom != monitor_rect->bottom, @@ -18611,15 +18611,15 @@ static BOOL CALLBACK test_window_position_cb(HMONITOR monitor, HDC hdc, RECT *mo
ret = MoveWindow(window, new_rect.left, new_rect.top, new_rect.right - new_rect.left, new_rect.bottom - new_rect.top, TRUE); - ok(ret, "Got unexpected ret %#x, error %#x.\n", ret, GetLastError()); + ok(ret, "Got unexpected ret %#x, error %#lx.\n", ret, GetLastError()); ret = GetWindowRect(window, &window_rect); - ok(ret, "Got unexpected ret %#x, error %#x.\n", ret, GetLastError()); + ok(ret, "Got unexpected ret %#x, error %#lx.\n", ret, GetLastError()); ok(EqualRect(&window_rect, &new_rect), "Expected window rect %s, got %s.\n", wine_dbgstr_rect(monitor_rect), wine_dbgstr_rect(&window_rect)); flush_events(); ret = GetWindowRect(window, &window_rect); - ok(ret, "Got unexpected ret %#x, error %#x.\n", ret, GetLastError()); + ok(ret, "Got unexpected ret %#x, error %#lx.\n", ret, GetLastError()); ok(window_rect.right != monitor_rect->right && window_rect.bottom != monitor_rect->bottom, "Expected window rect %s, got %s.\n", wine_dbgstr_rect(monitor_rect), wine_dbgstr_rect(&window_rect)); @@ -18627,25 +18627,25 @@ static BOOL CALLBACK test_window_position_cb(HMONITOR monitor, HDC hdc, RECT *mo /* Window activation should restore the window to fit the whole primary monitor */ ret = SetWindowPos(window, 0, monitor_rect->left, monitor_rect->top, 0, 0, SWP_NOZORDER | SWP_NOSIZE); - ok(ret, "SetWindowPos failed, error %#x.\n", GetLastError()); + ok(ret, "SetWindowPos failed, error %#lx.\n", GetLastError()); ret = SetForegroundWindow(GetDesktopWindow()); ok(ret, "Failed to set foreground window.\n"); flush_events(); ret = ShowWindow(window, SW_RESTORE); - ok(ret, "Failed to restore window, error %#x.\n", GetLastError()); + ok(ret, "Failed to restore window, error %#lx.\n", GetLastError()); flush_events(); ret = SetForegroundWindow(window); - ok(ret, "SetForegroundWindow failed, error %#x.\n", GetLastError()); + ok(ret, "SetForegroundWindow failed, error %#lx.\n", GetLastError()); flush_events(); ret = GetWindowRect(window, &window_rect); - ok(ret, "GetWindowRect failed, error %#x.\n", GetLastError()); + ok(ret, "GetWindowRect failed, error %#lx.\n", GetLastError()); ok(EqualRect(&window_rect, &primary_rect), "Expect window rect %s, got %s.\n", wine_dbgstr_rect(&primary_rect), wine_dbgstr_rect(&window_rect));
hr = IDirectDraw7_SetCooperativeLevel(ddraw, window, DDSCL_NORMAL); - ok(hr == DD_OK, "SetCooperativeLevel failed, hr %#x.\n", hr); + ok(hr == DD_OK, "SetCooperativeLevel failed, hr %#lx.\n", hr); ret = GetWindowRect(window, &window_rect); - ok(ret, "GetWindowRect failed, error %#x.\n", GetLastError()); + ok(ret, "GetWindowRect failed, error %#lx.\n", GetLastError()); ok(EqualRect(&window_rect, &primary_rect), "Expect window rect %s, got %s.\n", wine_dbgstr_rect(&primary_rect), wine_dbgstr_rect(&window_rect));
@@ -18676,14 +18676,14 @@ static BOOL CALLBACK test_get_display_mode_cb(HMONITOR monitor, HDC hdc, RECT *m /* Test that DirectDraw doesn't use the device window to determine which monitor to use */ ret = SetWindowPos(window, 0, monitor_rect->left, monitor_rect->top, 0, 0, SWP_NOZORDER | SWP_NOSIZE); - ok(ret, "SetWindowPos failed, error %#x.\n", GetLastError()); + ok(ret, "SetWindowPos failed, error %#lx.\n", GetLastError());
surface_desc.dwSize = sizeof(surface_desc); hr = IDirectDraw7_GetDisplayMode(ddraw, &surface_desc); - ok(hr == DD_OK, "GetDisplayMode failed, hr %#x.\n", hr); - ok(surface_desc.dwWidth == GetSystemMetrics(SM_CXSCREEN), "Expect width %d, got %d.\n", + ok(hr == DD_OK, "GetDisplayMode failed, hr %#lx.\n", hr); + ok(surface_desc.dwWidth == GetSystemMetrics(SM_CXSCREEN), "Expect width %d, got %ld.\n", GetSystemMetrics(SM_CXSCREEN), surface_desc.dwWidth); - ok(surface_desc.dwHeight == GetSystemMetrics(SM_CYSCREEN), "Expect height %d, got %d.\n", + ok(surface_desc.dwHeight == GetSystemMetrics(SM_CYSCREEN), "Expect height %d, got %ld.\n", GetSystemMetrics(SM_CYSCREEN), surface_desc.dwHeight);
DestroyWindow(window); @@ -18710,41 +18710,41 @@ static void test_get_display_mode(void) ok(!!window, "Failed to create a window.\n");
hr = IDirectDraw7_SetCooperativeLevel(ddraw, window, DDSCL_EXCLUSIVE | DDSCL_FULLSCREEN); - ok(hr == DD_OK, "SetCooperativeLevel failed, hr %#x.\n", hr); + ok(hr == DD_OK, "SetCooperativeLevel failed, hr %#lx.\n", hr);
memset(&devmode, 0, sizeof(devmode)); devmode.dmSize = sizeof(devmode); ret = EnumDisplaySettingsW(NULL, ENUM_CURRENT_SETTINGS, &devmode); - ok(ret, "EnumDisplaySettingsW failed, error %#x.\n", GetLastError()); + ok(ret, "EnumDisplaySettingsW failed, error %#lx.\n", GetLastError());
surface_desc.dwSize = sizeof(surface_desc); hr = IDirectDraw7_GetDisplayMode(ddraw, &surface_desc); - ok(hr == DD_OK, "GetDisplayMode failed, hr %#x.\n", hr); - ok(surface_desc.dwSize == sizeof(surface_desc), "Expected dwSize %u, got %u.\n", + ok(hr == DD_OK, "GetDisplayMode failed, hr %#lx.\n", hr); + ok(surface_desc.dwSize == sizeof(surface_desc), "Expected dwSize %Iu, got %lu.\n", sizeof(surface_desc), surface_desc.dwSize); - ok(surface_desc.dwFlags == flags, "Expected dwFlags %#x, got %#x.\n", flags, + ok(surface_desc.dwFlags == flags, "Expected dwFlags %#lx, got %#lx.\n", flags, surface_desc.dwFlags); - ok(surface_desc.dwWidth == devmode.dmPelsWidth, "Expected width %u, got %u.\n", + ok(surface_desc.dwWidth == devmode.dmPelsWidth, "Expected width %lu, got %lu.\n", devmode.dmPelsWidth, surface_desc.dwWidth); - ok(surface_desc.dwHeight == devmode.dmPelsHeight, "Expected height %u, got %u.\n", + ok(surface_desc.dwHeight == devmode.dmPelsHeight, "Expected height %lu, got %lu.\n", devmode.dmPelsHeight, surface_desc.dwHeight); - ok(surface_desc.dwRefreshRate == devmode.dmDisplayFrequency, "Expected frequency %u, got %u.\n", + ok(surface_desc.dwRefreshRate == devmode.dmDisplayFrequency, "Expected frequency %lu, got %lu.\n", devmode.dmDisplayFrequency, surface_desc.dwRefreshRate); ok(surface_desc.ddpfPixelFormat.dwSize == sizeof(surface_desc.ddpfPixelFormat), - "Expected ddpfPixelFormat.dwSize %u, got %u.\n", sizeof(surface_desc.ddpfPixelFormat), + "Expected ddpfPixelFormat.dwSize %Iu, got %lu.\n", sizeof(surface_desc.ddpfPixelFormat), surface_desc.ddpfPixelFormat.dwSize); ok(surface_desc.ddpfPixelFormat.dwRGBBitCount == devmode.dmBitsPerPel, - "Expected ddpfPixelFormat.dwRGBBitCount %u, got %u.\n", devmode.dmBitsPerPel, + "Expected ddpfPixelFormat.dwRGBBitCount %lu, got %lu.\n", devmode.dmBitsPerPel, surface_desc.ddpfPixelFormat.dwRGBBitCount); ok(surface_desc.lPitch == devmode.dmPelsWidth * devmode.dmBitsPerPel / 8, - "Expected pitch %u, got %u.\n", devmode.dmPelsWidth * devmode.dmBitsPerPel / 8, + "Expected pitch %lu, got %lu.\n", devmode.dmPelsWidth * devmode.dmBitsPerPel / 8, surface_desc.lPitch);
memset(¶m, 0, sizeof(param)); param.old_frequency = surface_desc.dwRefreshRate; hr = IDirectDraw7_EnumDisplayModes(ddraw, DDEDM_REFRESHRATES, NULL, ¶m, find_different_mode_callback); - ok(hr == DD_OK, "EnumDisplayModes failed, hr %#x.\n", hr); + ok(hr == DD_OK, "EnumDisplayModes failed, hr %#lx.\n", hr); if (!param.new_frequency) { skip("Failed to find a display mode with a different frequency.\n"); @@ -18753,17 +18753,17 @@ static void test_get_display_mode(void)
hr = IDirectDraw7_SetDisplayMode(ddraw, param.new_width, param.new_height, param.new_bpp, param.new_frequency, 0); - ok(hr == DD_OK, "SetDisplayMode failed, hr %#x.\n", hr); + ok(hr == DD_OK, "SetDisplayMode failed, hr %#lx.\n", hr); hr = IDirectDraw7_GetDisplayMode(ddraw, &surface_desc); - ok(hr == DD_OK, "GetDisplayMode failed, hr %#x.\n", hr); - ok(surface_desc.dwWidth == param.new_width, "Expected width %u, got %u.\n", param.new_width, + ok(hr == DD_OK, "GetDisplayMode failed, hr %#lx.\n", hr); + ok(surface_desc.dwWidth == param.new_width, "Expected width %u, got %lu.\n", param.new_width, surface_desc.dwWidth); - ok(surface_desc.dwHeight == param.new_height, "Expected height %u, got %u.\n", param.new_height, + ok(surface_desc.dwHeight == param.new_height, "Expected height %u, got %lu.\n", param.new_height, surface_desc.dwHeight); - ok(surface_desc.dwRefreshRate == param.new_frequency, "Expected frequency %u, got %u.\n", + ok(surface_desc.dwRefreshRate == param.new_frequency, "Expected frequency %u, got %lu.\n", param.new_frequency, surface_desc.dwRefreshRate); ok(surface_desc.ddpfPixelFormat.dwRGBBitCount == param.new_bpp, - "Expected ddpfPixelFormat.dwRGBBitCount %u, got %u.\n", devmode.dmBitsPerPel, + "Expected ddpfPixelFormat.dwRGBBitCount %lu, got %lu.\n", devmode.dmBitsPerPel, surface_desc.ddpfPixelFormat.dwRGBBitCount);
done: @@ -18808,11 +18808,11 @@ static void test_texture_wrong_caps(const GUID *device_guid) return; } hr = IDirect3DDevice3_GetDirect3D(device, &d3d); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirect3D3_QueryInterface(d3d, &IID_IDirectDraw4, (void **)&ddraw); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirect3DDevice3_GetRenderTarget(device, &rt); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
memset(&ddsd, 0, sizeof(ddsd)); ddsd.dwSize = sizeof(ddsd); @@ -18822,47 +18822,47 @@ static void test_texture_wrong_caps(const GUID *device_guid) ddsd.ddsCaps.dwCaps = DDSCAPS_OFFSCREENPLAIN; U4(ddsd).ddpfPixelFormat = fmt; hr = IDirectDraw7_CreateSurface(ddraw, &ddsd, &surface, NULL); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr);
fill_surface(surface, 0xff00ff00);
hr = IDirect3DDevice7_SetRenderState(device, D3DRENDERSTATE_ZENABLE, D3DZB_FALSE); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
hr = IDirect3DDevice7_SetTextureStageState(device, 0, D3DTSS_COLOROP, D3DTOP_SELECTARG1); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirect3DDevice7_SetTextureStageState(device, 0, D3DTSS_ALPHAOP, D3DTOP_SELECTARG1); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirect3DDevice7_SetTextureStageState(device, 0, D3DTSS_COLORARG1, D3DTA_TEXTURE); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirect3DDevice7_SetTextureStageState(device, 0, D3DTSS_ALPHAARG1, D3DTA_TEXTURE); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
hr = IDirect3DDevice7_SetTexture(device, 0, surface); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
hr = IDirect3DDevice7_Clear(device, 0, NULL, D3DCLEAR_TARGET, 0x000000ff, 0.0f, 0); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); if (is_software_device_type(device_guid)) fill_surface(rt, 0x000000ff);
hr = IDirect3DDevice7_BeginScene(device); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirect3DDevice7_DrawPrimitive(device, D3DPT_TRIANGLESTRIP, D3DFVF_XYZ | D3DFVF_TEX1, quad, 4, 0); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirect3DDevice7_EndScene(device); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
color = get_surface_color(rt, 320, 240); - ok(color == 0, "Got unexpected color 0x%08x.\n", color); + ok(color == 0, "Got unexpected color 0x%08lx.\n", color);
IDirectDrawSurface7_Release(surface); IDirectDrawSurface7_Release(rt); IDirectDraw7_Release(ddraw); IDirect3D7_Release(d3d); refcount = IDirect3DDevice3_Release(device); - ok(!refcount, "Device has %u references left.\n", refcount); + ok(!refcount, "Device has %lu references left.\n", refcount); DestroyWindow(window); }
@@ -19212,11 +19212,11 @@ static void test_filling_convention(void) }
hr = IDirect3DDevice7_GetDirect3D(device, &d3d); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirect3D7_QueryInterface(d3d, &IID_IDirectDraw7, (void **)&ddraw); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirect3DDevice7_GetRenderTarget(device, &backbuffer); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr);
memset(&desc, 0, sizeof(desc)); desc.dwSize = sizeof(desc); @@ -19231,12 +19231,12 @@ static void test_filling_convention(void) desc.ddpfPixelFormat.dwGBitMask = 0x0000ff00; desc.ddpfPixelFormat.dwBBitMask = 0x000000ff; hr = IDirectDraw7_CreateSurface(ddraw, &desc, &rt, NULL); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
hr = IDirect3DDevice7_SetRenderState(device, D3DRENDERSTATE_LIGHTING, FALSE); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirect3DDevice7_SetRenderState(device, D3DRENDERSTATE_ZENABLE, D3DZB_FALSE); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
for (i = 0; i < ARRAY_SIZE(tests); ++i) { @@ -19245,19 +19245,19 @@ static void test_filling_convention(void) cur = j ? rt : backbuffer;
hr = IDirect3DDevice7_SetRenderTarget(device, cur, 0); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirect3DDevice7_Clear(device, 0, NULL, D3DCLEAR_TARGET, colour_clear, 0.0f, 0); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirect3DDevice7_SetViewport(device, &vp); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
hr = IDirect3DDevice7_BeginScene(device); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirect3DDevice7_DrawPrimitive(device, D3DPT_TRIANGLELIST, tests[i].fvf, tests[i].geometry, 12, 0); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirect3DDevice7_EndScene(device); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
for (y = 0; y < 8; y++) { @@ -19295,7 +19295,7 @@ static void test_filling_convention(void) * convention, but because wined3d will nudge geometry to the left to * keep diagonals (the 'R' in test case 'edge_tris') intact. */ todo_wine_if(todo && !compare_color(colour, expected, 1)) - ok(compare_color(colour, expected, 1), "Got unexpected colour %08x, %ux%u, case %u, j %u.\n", + ok(compare_color(colour, expected, 1), "Got unexpected colour %08lx, %ux%u, case %u, j %u.\n", colour, x, y, i, j); } } @@ -19307,7 +19307,7 @@ static void test_filling_convention(void) IDirectDraw7_Release(ddraw); IDirect3D7_Release(d3d); refcount = IDirect3DDevice7_Release(device); - ok(!refcount, "Device has %u references left.\n", refcount); + ok(!refcount, "Device has %lu references left.\n", refcount); DestroyWindow(window); }
@@ -19352,7 +19352,7 @@ START_TEST(ddraw7) if (IDirectDraw7_QueryInterface(ddraw, &IID_IDirect3D7, (void **)&d3d) == DD_OK) { hr = IDirect3D7_EnumDevices(d3d, enum_devtype_cb, &hal_ok); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); if (hal_ok) hw_device_guid = &IID_IDirect3DTnLHalDevice; IDirectDraw7_Release(d3d); diff --git a/dlls/ddraw/tests/ddrawmodes.c b/dlls/ddraw/tests/ddrawmodes.c index 638ff374012..22d297dc03d 100644 --- a/dlls/ddraw/tests/ddrawmodes.c +++ b/dlls/ddraw/tests/ddrawmodes.c @@ -81,9 +81,9 @@ static BOOL createdirectdraw(void) SetRect(&rect_before_create, 0, 0, GetSystemMetrics(SM_CXSCREEN), GetSystemMetrics(SM_CYSCREEN));
rc = DirectDrawCreate(NULL, &lpDD, NULL); - ok(rc==DD_OK || rc==DDERR_NODIRECTDRAWSUPPORT, "DirectDrawCreateEx returned: %x\n", rc); + ok(rc==DD_OK || rc==DDERR_NODIRECTDRAWSUPPORT, "DirectDrawCreateEx returned: %lx\n", rc); if (!lpDD) { - trace("DirectDrawCreateEx() failed with an error %x\n", rc); + trace("DirectDrawCreateEx() failed with an error %lx\n", rc); return FALSE; } return TRUE; @@ -138,17 +138,17 @@ static void test_DirectDrawEnumerateA(void)
/* Test with NULL callback parameter. */ ret = pDirectDrawEnumerateA(NULL, NULL); - ok(ret == DDERR_INVALIDPARAMS, "Expected DDERR_INVALIDPARAMS, got %d\n", ret); + ok(ret == DDERR_INVALIDPARAMS, "Expected DDERR_INVALIDPARAMS, got %ld\n", ret);
/* Test with valid callback parameter and NULL context parameter. */ trace("Calling DirectDrawEnumerateA with test_nullcontext_callbackA callback and NULL context.\n"); ret = pDirectDrawEnumerateA(test_nullcontext_callbackA, NULL); - ok(ret == DD_OK, "Expected DD_OK, got %d\n", ret); + ok(ret == DD_OK, "Expected DD_OK, got %ld\n", ret);
/* Test with valid callback parameter and valid context parameter. */ trace("Calling DirectDrawEnumerateA with test_context_callbackA callback and non-NULL context.\n"); ret = pDirectDrawEnumerateA(test_context_callbackA, (void *)0xdeadbeef); - ok(ret == DD_OK, "Expected DD_OK, got %d\n", ret); + ok(ret == DD_OK, "Expected DD_OK, got %ld\n", ret); }
static BOOL WINAPI test_callbackW(GUID *lpGUID, WCHAR *lpDriverDescription, @@ -174,17 +174,17 @@ static void test_DirectDrawEnumerateW(void) ret = pDirectDrawEnumerateW(NULL, NULL); ok(ret == DDERR_INVALIDPARAMS || ret == DDERR_UNSUPPORTED, /* Older ddraw */ - "Expected DDERR_INVALIDPARAMS or DDERR_UNSUPPORTED, got %d\n", ret); + "Expected DDERR_INVALIDPARAMS or DDERR_UNSUPPORTED, got %ld\n", ret);
/* Test with invalid callback parameter. */ ret = pDirectDrawEnumerateW((LPDDENUMCALLBACKW)0xdeadbeef, NULL); ok(ret == DDERR_INVALIDPARAMS /* XP */ || ret == DDERR_UNSUPPORTED /* Win7 */, - "Expected DDERR_INVALIDPARAMS or DDERR_UNSUPPORTED, got %d\n", ret); + "Expected DDERR_INVALIDPARAMS or DDERR_UNSUPPORTED, got %ld\n", ret);
/* Test with valid callback parameter and NULL context parameter. */ ret = pDirectDrawEnumerateW(test_callbackW, NULL); - ok(ret == DDERR_UNSUPPORTED, "Expected DDERR_UNSUPPORTED, got %d\n", ret); + ok(ret == DDERR_UNSUPPORTED, "Expected DDERR_UNSUPPORTED, got %ld\n", ret); }
static BOOL WINAPI test_nullcontext_callbackExA(GUID *lpGUID, char *lpDriverDescription, @@ -235,36 +235,36 @@ static void test_DirectDrawEnumerateExA(void)
/* Test with NULL callback parameter. */ ret = pDirectDrawEnumerateExA(NULL, NULL, 0); - ok(ret == DDERR_INVALIDPARAMS, "Expected DDERR_INVALIDPARAMS, got %d\n", ret); + ok(ret == DDERR_INVALIDPARAMS, "Expected DDERR_INVALIDPARAMS, got %ld\n", ret);
/* Test with valid callback parameter and invalid flags */ ret = pDirectDrawEnumerateExA(test_nullcontext_callbackExA, NULL, ~0); - ok(ret == DDERR_INVALIDPARAMS, "Expected DDERR_INVALIDPARAMS, got %d\n", ret); + ok(ret == DDERR_INVALIDPARAMS, "Expected DDERR_INVALIDPARAMS, got %ld\n", ret);
/* Test with valid callback parameter and NULL context parameter. */ trace("Calling DirectDrawEnumerateExA with empty flags and NULL context.\n"); ret = pDirectDrawEnumerateExA(test_nullcontext_callbackExA, NULL, 0); - ok(ret == DD_OK, "Expected DD_OK, got %d\n", ret); + ok(ret == DD_OK, "Expected DD_OK, got %ld\n", ret);
/* Test with valid callback parameter and non-NULL context parameter. */ trace("Calling DirectDrawEnumerateExA with empty flags and non-NULL context.\n"); ret = pDirectDrawEnumerateExA(test_context_callbackExA, (void *)0xdeadbeef, 0); - ok(ret == DD_OK, "Expected DD_OK, got %d\n", ret); + ok(ret == DD_OK, "Expected DD_OK, got %ld\n", ret);
/* Test with valid callback parameter and count the number of primary devices */ callbackCount = 0; ret = pDirectDrawEnumerateExA(test_count_callbackExA, &callbackCount, 0); - ok(ret == DD_OK, "Expected DD_OK, got %d\n", ret); - ok(callbackCount == 1, "Expected 1 primary device, got %d\n", callbackCount); + ok(ret == DD_OK, "Expected DD_OK, got %ld\n", ret); + ok(callbackCount == 1, "Expected 1 primary device, got %ld\n", callbackCount);
/* Test with valid callback parameter and count the number of secondary devices */ callbackCount = 0; ret = pDirectDrawEnumerateExA(test_count_callbackExA, &callbackCount, DDENUM_ATTACHEDSECONDARYDEVICES); - ok(ret == DD_OK, "Expected DD_OK, got %d\n", ret); + ok(ret == DD_OK, "Expected DD_OK, got %ld\n", ret); /* Note: this list includes the primary devices as well and some systems (such as the TestBot) do not include any secondary devices */ - ok(callbackCount >= 1, "Expected at least one device, got %d\n", callbackCount); + ok(callbackCount >= 1, "Expected at least one device, got %ld\n", callbackCount);
/* Test with valid callback parameter, NULL context parameter, and all flags set. */ trace("Calling DirectDrawEnumerateExA with all flags set and NULL context.\n"); @@ -272,7 +272,7 @@ static void test_DirectDrawEnumerateExA(void) DDENUM_ATTACHEDSECONDARYDEVICES | DDENUM_DETACHEDSECONDARYDEVICES | DDENUM_NONDISPLAYDEVICES); - ok(ret == DD_OK, "Expected DD_OK, got %d\n", ret); + ok(ret == DD_OK, "Expected DD_OK, got %ld\n", ret); }
static BOOL WINAPI test_callbackExW(GUID *lpGUID, WCHAR *lpDriverDescription, @@ -296,26 +296,26 @@ static void test_DirectDrawEnumerateExW(void)
/* Test with NULL callback parameter. */ ret = pDirectDrawEnumerateExW(NULL, NULL, 0); - ok(ret == DDERR_UNSUPPORTED, "Expected DDERR_UNSUPPORTED, got %d\n", ret); + ok(ret == DDERR_UNSUPPORTED, "Expected DDERR_UNSUPPORTED, got %ld\n", ret);
/* Test with invalid callback parameter. */ ret = pDirectDrawEnumerateExW((LPDDENUMCALLBACKEXW)0xdeadbeef, NULL, 0); - ok(ret == DDERR_UNSUPPORTED, "Expected DDERR_UNSUPPORTED, got %d\n", ret); + ok(ret == DDERR_UNSUPPORTED, "Expected DDERR_UNSUPPORTED, got %ld\n", ret);
/* Test with valid callback parameter and invalid flags */ ret = pDirectDrawEnumerateExW(test_callbackExW, NULL, ~0); - ok(ret == DDERR_UNSUPPORTED, "Expected DDERR_UNSUPPORTED, got %d\n", ret); + ok(ret == DDERR_UNSUPPORTED, "Expected DDERR_UNSUPPORTED, got %ld\n", ret);
/* Test with valid callback parameter and NULL context parameter. */ ret = pDirectDrawEnumerateExW(test_callbackExW, NULL, 0); - ok(ret == DDERR_UNSUPPORTED, "Expected DDERR_UNSUPPORTED, got %d\n", ret); + ok(ret == DDERR_UNSUPPORTED, "Expected DDERR_UNSUPPORTED, got %ld\n", ret);
/* Test with valid callback parameter, NULL context parameter, and all flags set. */ ret = pDirectDrawEnumerateExW(test_callbackExW, NULL, DDENUM_ATTACHEDSECONDARYDEVICES | DDENUM_DETACHEDSECONDARYDEVICES | DDENUM_NONDISPLAYDEVICES); - ok(ret == DDERR_UNSUPPORTED, "Expected DDERR_UNSUPPORTED, got %d\n", ret); + ok(ret == DDERR_UNSUPPORTED, "Expected DDERR_UNSUPPORTED, got %ld\n", ret); }
static void adddisplaymode(DDSURFACEDESC *lpddsd) @@ -338,7 +338,7 @@ static void flushdisplaymodes(void) static HRESULT WINAPI enummodescallback(DDSURFACEDESC *lpddsd, void *lpContext) { if (winetest_debug > 1) - trace("Width = %i, Height = %i, bpp = %i, Refresh Rate = %i, Pitch = %i, flags =%02X\n", + trace("Width = %li, Height = %li, bpp = %li, Refresh Rate = %li, Pitch = %li, flags =%02lX\n", lpddsd->dwWidth, lpddsd->dwHeight, U1(lpddsd->ddpfPixelFormat).dwRGBBitCount, U2(*lpddsd).dwRefreshRate, U1(*lpddsd).lPitch, lpddsd->dwFlags);
@@ -368,15 +368,15 @@ static HRESULT WINAPI enummodescallback(DDSURFACEDESC *lpddsd, void *lpContext) static HRESULT WINAPI enummodescallback_16bit(DDSURFACEDESC *lpddsd, void *lpContext) { if (winetest_debug > 1) - trace("Width = %i, Height = %i, bpp = %i, Refresh Rate = %i, Pitch = %i, flags =%02X\n", + trace("Width = %li, Height = %li, bpp = %li, Refresh Rate = %li, Pitch = %li, flags =%02lX\n", lpddsd->dwWidth, lpddsd->dwHeight, U1(lpddsd->ddpfPixelFormat).dwRGBBitCount, U2(*lpddsd).dwRefreshRate, U1(*lpddsd).lPitch, lpddsd->dwFlags);
ok(lpddsd->dwFlags == (DDSD_HEIGHT|DDSD_WIDTH|DDSD_PIXELFORMAT|DDSD_PITCH|DDSD_REFRESHRATE), - "Wrong surface description flags %02X\n", lpddsd->dwFlags); - ok(lpddsd->ddpfPixelFormat.dwFlags == DDPF_RGB, "Wrong pixel format flag %02X\n", + "Wrong surface description flags %02lX\n", lpddsd->dwFlags); + ok(lpddsd->ddpfPixelFormat.dwFlags == DDPF_RGB, "Wrong pixel format flag %02lX\n", lpddsd->ddpfPixelFormat.dwFlags); - ok(U1(lpddsd->ddpfPixelFormat).dwRGBBitCount == 16, "Expected 16 bpp got %i\n", + ok(U1(lpddsd->ddpfPixelFormat).dwRGBBitCount == 16, "Expected 16 bpp got %li\n", U1(lpddsd->ddpfPixelFormat).dwRGBBitCount);
/* Check that the pitch is valid if applicable */ @@ -407,7 +407,7 @@ static HRESULT WINAPI enummodescallback_16bit(DDSURFACEDESC *lpddsd, void *lpCon static HRESULT WINAPI enummodescallback_count(DDSURFACEDESC *lpddsd, void *lpContext) { ok(lpddsd->dwFlags == (DDSD_HEIGHT|DDSD_WIDTH|DDSD_PIXELFORMAT|DDSD_PITCH|DDSD_REFRESHRATE), - "Wrong surface description flags %02X\n", lpddsd->dwFlags); + "Wrong surface description flags %02lX\n", lpddsd->dwFlags);
modes16bpp_cnt++;
@@ -427,7 +427,7 @@ static void enumdisplaymodes(void)
/* Flags parameter is reserved in very old ddraw versions (3 and older?) and must be 0 */ rc = IDirectDraw_EnumDisplayModes(lpDD, 0, &ddsd, 0, enummodescallback); - ok(rc==DD_OK, "EnumDisplayModes returned: %x\n",rc); + ok(rc==DD_OK, "EnumDisplayModes returned: %lx\n",rc);
count = modes16bpp_cnt;
@@ -440,7 +440,7 @@ static void enumdisplaymodes(void) U4(ddsd.ddpfPixelFormat).dwBBitMask = 0x001F;
rc = IDirectDraw_EnumDisplayModes(lpDD, 0, &ddsd, 0, enummodescallback_16bit); - ok(rc==DD_OK, "EnumDisplayModes returned: %x\n",rc); + ok(rc==DD_OK, "EnumDisplayModes returned: %lx\n",rc); ok(modes16bpp_cnt == count, "Expected %d modes got %d\n", count, modes16bpp_cnt);
modes16bpp_cnt = 0; @@ -449,7 +449,7 @@ static void enumdisplaymodes(void) U4(ddsd.ddpfPixelFormat).dwBBitMask = 0x0000;
rc = IDirectDraw_EnumDisplayModes(lpDD, 0, &ddsd, 0, enummodescallback_16bit); - ok(rc==DD_OK, "EnumDisplayModes returned: %x\n",rc); + ok(rc==DD_OK, "EnumDisplayModes returned: %lx\n",rc); ok(modes16bpp_cnt == count, "Expected %d modes got %d\n", count, modes16bpp_cnt);
modes16bpp_cnt = 0; @@ -458,7 +458,7 @@ static void enumdisplaymodes(void) U4(ddsd.ddpfPixelFormat).dwBBitMask = 0x000F;
rc = IDirectDraw_EnumDisplayModes(lpDD, 0, &ddsd, 0, enummodescallback_16bit); - ok(rc==DD_OK, "EnumDisplayModes returned: %x\n",rc); + ok(rc==DD_OK, "EnumDisplayModes returned: %lx\n",rc); ok(modes16bpp_cnt == count, "Expected %d modes got %d\n", count, modes16bpp_cnt);
@@ -466,14 +466,14 @@ static void enumdisplaymodes(void) ddsd.ddpfPixelFormat.dwFlags = DDPF_YUV;
rc = IDirectDraw_EnumDisplayModes(lpDD, 0, &ddsd, 0, enummodescallback_16bit); - ok(rc==DD_OK,"EnumDisplayModes returned: %x\n",rc); + ok(rc==DD_OK,"EnumDisplayModes returned: %lx\n",rc); ok(modes16bpp_cnt == count, "Expected %d modes got %d\n", count, modes16bpp_cnt);
modes16bpp_cnt = 0; ddsd.ddpfPixelFormat.dwFlags = DDPF_PALETTEINDEXED8;
rc = IDirectDraw_EnumDisplayModes(lpDD, 0, &ddsd, 0, enummodescallback_16bit); - ok(rc==DD_OK,"EnumDisplayModes returned: %x\n",rc); + ok(rc==DD_OK,"EnumDisplayModes returned: %lx\n",rc); ok(modes16bpp_cnt == count, "Expected %d modes got %d\n", count, modes16bpp_cnt);
modes16bpp_cnt = 0; @@ -481,14 +481,14 @@ static void enumdisplaymodes(void) ddsd.ddpfPixelFormat.dwFlags = 0;
rc = IDirectDraw_EnumDisplayModes(lpDD, 0, &ddsd, 0, enummodescallback_16bit); - ok(rc==DD_OK,"EnumDisplayModes returned: %x\n",rc); + ok(rc==DD_OK,"EnumDisplayModes returned: %lx\n",rc); ok(modes16bpp_cnt == count, "Expected %d modes got %d\n", count, modes16bpp_cnt);
modes16bpp_cnt = 0; ddsd.dwFlags = 0;
rc = IDirectDraw_EnumDisplayModes(lpDD, 0, &ddsd, 0, enummodescallback_count); - ok(rc==DD_OK,"EnumDisplayModes returned: %x\n",rc); + ok(rc==DD_OK,"EnumDisplayModes returned: %lx\n",rc); ok(modes16bpp_cnt == modes_cnt, "Expected %d modes got %d\n", modes_cnt, modes16bpp_cnt);
modes16bpp_cnt = 0; @@ -496,7 +496,7 @@ static void enumdisplaymodes(void) U1(ddsd).lPitch = 123;
rc = IDirectDraw_EnumDisplayModes(lpDD, 0, &ddsd, 0, enummodescallback_16bit); - ok(rc==DD_OK,"EnumDisplayModes returned: %x\n",rc); + ok(rc==DD_OK,"EnumDisplayModes returned: %lx\n",rc); ok(modes16bpp_cnt == count, "Expected %d modes got %d\n", count, modes16bpp_cnt);
modes16bpp_cnt = 0; @@ -507,7 +507,7 @@ static void enumdisplaymodes(void) U2(ddsd).dwRefreshRate = 2;
rc = IDirectDraw_EnumDisplayModes(lpDD, 0, &ddsd, 0, enummodescallback_16bit); - ok(rc==DD_OK,"EnumDisplayModes returned: %x\n",rc); + ok(rc==DD_OK,"EnumDisplayModes returned: %lx\n",rc); ok(modes16bpp_cnt == 0, "Expected 0 modes got %d\n", modes16bpp_cnt);
modes16bpp_cnt = 0; @@ -519,7 +519,7 @@ static void enumdisplaymodes(void) skip("Ddraw version too old. Skipping.\n"); return; } - ok(rc==DD_OK,"EnumDisplayModes returned: %x\n",rc); + ok(rc==DD_OK,"EnumDisplayModes returned: %lx\n",rc); refresh_count = refresh_rate_cnt;
if(refresh_rate) @@ -529,12 +529,12 @@ static void enumdisplaymodes(void) U2(ddsd).dwRefreshRate = refresh_rate;
rc = IDirectDraw_EnumDisplayModes(lpDD, 0, &ddsd, 0, enummodescallback_16bit); - ok(rc==DD_OK,"EnumDisplayModes returned: %x\n",rc); + ok(rc==DD_OK,"EnumDisplayModes returned: %lx\n",rc); ok(modes16bpp_cnt == refresh_count, "Expected %d modes got %d\n", refresh_count, modes16bpp_cnt); }
rc = IDirectDraw_EnumDisplayModes(lpDD, 0, NULL, 0, enummodescallback); - ok(rc==DD_OK, "EnumDisplayModes returned: %x\n",rc); + ok(rc==DD_OK, "EnumDisplayModes returned: %lx\n",rc); }
@@ -547,7 +547,7 @@ static void setdisplaymode(int i)
rc = IDirectDraw_SetCooperativeLevel(lpDD, hwnd, DDSCL_ALLOWMODEX | DDSCL_EXCLUSIVE | DDSCL_FULLSCREEN); - ok(rc==DD_OK,"SetCooperativeLevel returned: %x\n",rc); + ok(rc==DD_OK,"SetCooperativeLevel returned: %lx\n",rc); if (modes[i].dwFlags & DDSD_PIXELFORMAT) { if (modes[i].ddpfPixelFormat.dwFlags & DDPF_RGB) @@ -555,7 +555,7 @@ static void setdisplaymode(int i) rc = IDirectDraw_SetDisplayMode(lpDD, modes[i].dwWidth, modes[i].dwHeight, U1(modes[i].ddpfPixelFormat).dwRGBBitCount); - ok(DD_OK==rc || DDERR_UNSUPPORTED==rc,"SetDisplayMode returned: %x\n",rc); + ok(DD_OK==rc || DDERR_UNSUPPORTED==rc,"SetDisplayMode returned: %lx\n",rc); if (rc == DD_OK) { RECT scrn, test, virt; @@ -563,7 +563,7 @@ static void setdisplaymode(int i) SetRect(&virt, 0, 0, GetSystemMetrics(SM_CXVIRTUALSCREEN), GetSystemMetrics(SM_CYVIRTUALSCREEN)); OffsetRect(&virt, GetSystemMetrics(SM_XVIRTUALSCREEN), GetSystemMetrics(SM_YVIRTUALSCREEN)); SetRect(&scrn, 0, 0, GetSystemMetrics(SM_CXSCREEN), GetSystemMetrics(SM_CYSCREEN)); - trace("Mode (%dx%d) [%dx%d] (%d %d)x(%d %d)\n", modes[i].dwWidth, modes[i].dwHeight, + trace("Mode (%ldx%ld) [%ldx%ld] (%ld %ld)x(%ld %ld)\n", modes[i].dwWidth, modes[i].dwHeight, scrn.right, scrn.bottom, virt.left, virt.top, virt.right, virt.bottom); if (!EqualRect(&scrn, &orig_rect)) { @@ -578,7 +578,7 @@ static void setdisplaymode(int i) /* Check that switching to normal cooperative level does not restore the display mode */ rc = IDirectDraw_SetCooperativeLevel(lpDD, hwnd, DDSCL_NORMAL); - ok(rc==DD_OK, "SetCooperativeLevel returned %x\n", rc); + ok(rc==DD_OK, "SetCooperativeLevel returned %lx\n", rc); SetRect(&test, 0, 0, GetSystemMetrics(SM_CXSCREEN), GetSystemMetrics(SM_CYSCREEN)); rect_result = EqualRect(&scrn, &test); ok(rect_result!=0, "Setting cooperative level to DDSCL_NORMAL changed the display mode\n"); @@ -586,7 +586,7 @@ static void setdisplaymode(int i) /* Go back to fullscreen */ rc = IDirectDraw_SetCooperativeLevel(lpDD, hwnd, DDSCL_ALLOWMODEX | DDSCL_EXCLUSIVE | DDSCL_FULLSCREEN); - ok(rc==DD_OK, "SetCooperativeLevel returned: %x\n",rc); + ok(rc==DD_OK, "SetCooperativeLevel returned: %lx\n",rc);
/* If the display mode was changed, set the correct mode to avoid irrelevant failures */ @@ -595,11 +595,11 @@ static void setdisplaymode(int i) rc = IDirectDraw_SetDisplayMode(lpDD, modes[i].dwWidth, modes[i].dwHeight, U1(modes[i].ddpfPixelFormat).dwRGBBitCount); - ok(DD_OK==rc, "SetDisplayMode returned: %x\n",rc); + ok(DD_OK==rc, "SetDisplayMode returned: %lx\n",rc); } } rc = IDirectDraw_RestoreDisplayMode(lpDD); - ok(DD_OK==rc,"RestoreDisplayMode returned: %x\n",rc); + ok(DD_OK==rc,"RestoreDisplayMode returned: %lx\n",rc); } } } @@ -618,10 +618,10 @@ static void createsurface(void) DDSCAPS_COMPLEX; ddsd.dwBackBufferCount = 1; rc = IDirectDraw_CreateSurface(lpDD, &ddsd, &lpDDSPrimary, NULL ); - ok(rc==DD_OK,"CreateSurface returned: %x\n",rc); + ok(rc==DD_OK,"CreateSurface returned: %lx\n",rc); ddscaps.dwCaps = DDSCAPS_BACKBUFFER; rc = IDirectDrawSurface_GetAttachedSurface(lpDDSPrimary, &ddscaps, &lpDDSBack); - ok(rc==DD_OK,"GetAttachedSurface returned: %x\n",rc); + ok(rc==DD_OK,"GetAttachedSurface returned: %lx\n",rc); }
static void destroysurface(void) @@ -640,17 +640,17 @@ static void testsurface(void) HRESULT rc;
rc = IDirectDrawSurface_GetDC(lpDDSBack, &hdc); - ok(rc==DD_OK, "IDirectDrawSurface_GetDC returned: %x\n",rc); + ok(rc==DD_OK, "IDirectDrawSurface_GetDC returned: %lx\n",rc); SetBkColor(hdc, RGB(0, 0, 255)); SetTextColor(hdc, RGB(255, 255, 0)); TextOutA(hdc, 0, 0, testMsg, strlen(testMsg)); rc = IDirectDrawSurface_ReleaseDC(lpDDSBack, hdc); - ok(rc==DD_OK, "IDirectDrawSurface_ReleaseDC returned: %x\n",rc); + ok(rc==DD_OK, "IDirectDrawSurface_ReleaseDC returned: %lx\n",rc);
while (1) { rc = IDirectDrawSurface_Flip(lpDDSPrimary, NULL, DDFLIP_WAIT); - ok(rc==DD_OK || rc==DDERR_SURFACELOST, "IDirectDrawSurface_BltFast returned: %x\n",rc); + ok(rc==DD_OK || rc==DDERR_SURFACELOST, "IDirectDrawSurface_BltFast returned: %lx\n",rc);
if (rc == DD_OK) { @@ -659,7 +659,7 @@ static void testsurface(void) else if (rc == DDERR_SURFACELOST) { rc = IDirectDrawSurface_Restore(lpDDSPrimary); - ok(rc==DD_OK, "IDirectDrawSurface_Restore returned: %x\n",rc); + ok(rc==DD_OK, "IDirectDrawSurface_Restore returned: %lx\n",rc); } } } @@ -692,14 +692,14 @@ static void testcooperativelevels_normal(void) surfacedesc.ddsCaps.dwCaps = DDSCAPS_PRIMARYSURFACE | DDSCAPS_COMPLEX | DDSCAPS_FLIP;
rc = IDirectDraw_SetCooperativeLevel(lpDD, hwnd, DDSCL_SETFOCUSWINDOW | DDSCL_CREATEDEVICEWINDOW); - ok(rc==DDERR_INVALIDPARAMS,"SetCooperativeLevel(DDSCL_SETFOCUSWINDOW | DDSCL_CREATEDEVICEWINDOW) returned: %x\n",rc); + ok(rc==DDERR_INVALIDPARAMS,"SetCooperativeLevel(DDSCL_SETFOCUSWINDOW | DDSCL_CREATEDEVICEWINDOW) returned: %lx\n",rc);
/* Do some tests with DDSCL_NORMAL mode */
/* Fullscreen mode + normal mode + exclusive mode */
rc = IDirectDraw_SetCooperativeLevel(lpDD, NULL, DDSCL_FULLSCREEN | DDSCL_EXCLUSIVE | DDSCL_NORMAL); - ok(rc==DDERR_INVALIDPARAMS, "Expected DDERR_INVALIDPARAMS, received: %x\n", rc); + ok(rc==DDERR_INVALIDPARAMS, "Expected DDERR_INVALIDPARAMS, received: %lx\n", rc);
sfw=FALSE; if(hwnd2) @@ -708,7 +708,7 @@ static void testcooperativelevels_normal(void) skip("Failed to create the second window\n");
rc = IDirectDraw_SetCooperativeLevel(lpDD, hwnd, DDSCL_FULLSCREEN | DDSCL_EXCLUSIVE | DDSCL_NORMAL); - ok(rc==DD_OK,"SetCooperativeLevel(DDSCL_FULLSCREEN | DDSCL_EXCLUSIVE | DDSCL_NORMAL) returned: %x\n",rc); + ok(rc==DD_OK,"SetCooperativeLevel(DDSCL_FULLSCREEN | DDSCL_EXCLUSIVE | DDSCL_NORMAL) returned: %lx\n",rc);
if(sfw) ok(GetForegroundWindow()==hwnd,"Expected the main windows (%p) for foreground, received the second one (%p)\n",hwnd, hwnd2); @@ -720,14 +720,14 @@ static void testcooperativelevels_normal(void) skip("Unsupported mode\n"); else { - ok(rc == DD_OK, "IDirectDraw_CreateSurface returned %08x\n", rc); + ok(rc == DD_OK, "IDirectDraw_CreateSurface returned %08lx\n", rc); ok(surface!=NULL, "Returned NULL surface pointer\n"); } if(surface && surface != (IDirectDrawSurface *)0xdeadbeef) IDirectDrawSurface_Release(surface);
/* Exclusive mode + normal mode */ rc = IDirectDraw_SetCooperativeLevel(lpDD, hwnd, DDSCL_EXCLUSIVE | DDSCL_NORMAL); - ok(rc==DDERR_INVALIDPARAMS,"SetCooperativeLevel(DDSCL_EXCLUSIVE | DDSCL_NORMAL) returned: %x\n",rc); + ok(rc==DDERR_INVALIDPARAMS,"SetCooperativeLevel(DDSCL_EXCLUSIVE | DDSCL_NORMAL) returned: %lx\n",rc);
/* Fullscreen mode + normal mode */
@@ -735,13 +735,13 @@ static void testcooperativelevels_normal(void) if(hwnd2) sfw=SetForegroundWindow(hwnd2);
rc = IDirectDraw_SetCooperativeLevel(lpDD, hwnd, DDSCL_FULLSCREEN | DDSCL_NORMAL); - ok(rc==DD_OK,"SetCooperativeLevel(DDSCL_FULLSCREEN | DDSCL_NORMAL) returned: %x\n",rc); + ok(rc==DD_OK,"SetCooperativeLevel(DDSCL_FULLSCREEN | DDSCL_NORMAL) returned: %lx\n",rc);
if(sfw) ok(GetForegroundWindow()==hwnd2,"Expected the second windows (%p) for foreground, received the main one (%p)\n",hwnd2, hwnd);
rc = IDirectDraw_SetCooperativeLevel(lpDD, NULL, DDSCL_FULLSCREEN | DDSCL_NORMAL); - ok(rc==DD_OK, "Expected DD_OK, received %x\n", rc); + ok(rc==DD_OK, "Expected DD_OK, received %lx\n", rc);
/* Try creating a double buffered primary in fullscreen + normal mode */ rc = IDirectDraw_CreateSurface(lpDD, &surfacedesc, &surface, NULL); @@ -749,7 +749,7 @@ static void testcooperativelevels_normal(void) skip("Unsupported mode\n"); else { - ok(rc == DDERR_NOEXCLUSIVEMODE, "IDirectDraw_CreateSurface returned %08x\n", rc); + ok(rc == DDERR_NOEXCLUSIVEMODE, "IDirectDraw_CreateSurface returned %08lx\n", rc); ok(surface == NULL, "Returned surface pointer is %p\n", surface); }
@@ -762,13 +762,13 @@ static void testcooperativelevels_normal(void)
rc = IDirectDraw_SetCooperativeLevel(lpDD, hwnd, DDSCL_NORMAL); - ok(rc==DD_OK,"SetCooperativeLevel(DDSCL_NORMAL) returned: %x\n",rc); + ok(rc==DD_OK,"SetCooperativeLevel(DDSCL_NORMAL) returned: %lx\n",rc);
if(sfw) ok(GetForegroundWindow()==hwnd2,"Expected the second windows (%p) for foreground, received the main one (%p)\n",hwnd2, hwnd);
rc = IDirectDraw_SetCooperativeLevel(lpDD, NULL, DDSCL_NORMAL); - ok(rc==DD_OK, "Expected DD_OK, received %x\n", rc); + ok(rc==DD_OK, "Expected DD_OK, received %lx\n", rc);
/* Try creating a double buffered primary in normal mode */ rc = IDirectDraw_CreateSurface(lpDD, &surfacedesc, &surface, NULL); @@ -776,7 +776,7 @@ static void testcooperativelevels_normal(void) skip("Unsupported mode\n"); else { - ok(rc == DDERR_NOEXCLUSIVEMODE, "IDirectDraw_CreateSurface returned %08x\n", rc); + ok(rc == DDERR_NOEXCLUSIVEMODE, "IDirectDraw_CreateSurface returned %08lx\n", rc); ok(surface == NULL, "Returned surface pointer is %p\n", surface); } if(surface && surface != (IDirectDrawSurface *)0xdeadbeef) IDirectDrawSurface_Release(surface); @@ -788,18 +788,18 @@ static void testcooperativelevels_normal(void)
rc = IDirectDraw_SetCooperativeLevel(lpDD, hwnd, DDSCL_NORMAL | DDSCL_FULLSCREEN); - ok(rc==DD_OK,"SetCooperativeLevel(DDSCL_NORMAL | FULLSCREEN) returned: %x\n",rc); + ok(rc==DD_OK,"SetCooperativeLevel(DDSCL_NORMAL | FULLSCREEN) returned: %lx\n",rc);
if(sfw) ok(GetForegroundWindow()==hwnd2,"Expected the second windows (%p) for foreground, received the main one (%p)\n",hwnd2, hwnd);
rc = IDirectDraw_SetCooperativeLevel(lpDD, NULL, DDSCL_NORMAL | DDSCL_FULLSCREEN); - ok(rc==DD_OK, "Expected DD_OK, received %x\n", rc); + ok(rc==DD_OK, "Expected DD_OK, received %lx\n", rc);
/* Set the focus window */
rc = IDirectDraw_SetCooperativeLevel(lpDD, hwnd, DDSCL_SETFOCUSWINDOW | DDSCL_CREATEDEVICEWINDOW); - ok(rc==DDERR_INVALIDPARAMS,"SetCooperativeLevel(DDSCL_SETFOCUSWINDOW | DDSCL_CREATEDEVICEWINDOW) returned: %x\n",rc); + ok(rc==DDERR_INVALIDPARAMS,"SetCooperativeLevel(DDSCL_SETFOCUSWINDOW | DDSCL_CREATEDEVICEWINDOW) returned: %lx\n",rc);
rc = IDirectDraw_SetCooperativeLevel(lpDD, NULL, DDSCL_SETFOCUSWINDOW);
@@ -809,7 +809,7 @@ static void testcooperativelevels_normal(void) return; }
- ok(rc==DD_OK, "Expected DD_OK, received %x\n", rc); + ok(rc==DD_OK, "Expected DD_OK, received %lx\n", rc);
rc = IDirectDraw_SetCooperativeLevel(lpDD, hwnd, DDSCL_SETFOCUSWINDOW); @@ -820,61 +820,61 @@ static void testcooperativelevels_normal(void) return; }
- ok(rc==DD_OK,"SetCooperativeLevel(DDSCL_SETFOCUSWINDOW) returned: %x\n",rc); + ok(rc==DD_OK,"SetCooperativeLevel(DDSCL_SETFOCUSWINDOW) returned: %lx\n",rc);
/* Set the focus window a second time*/ rc = IDirectDraw_SetCooperativeLevel(lpDD, hwnd, DDSCL_SETFOCUSWINDOW); - ok(rc==DD_OK,"SetCooperativeLevel(DDSCL_SETFOCUSWINDOW) the second time returned: %x\n",rc); + ok(rc==DD_OK,"SetCooperativeLevel(DDSCL_SETFOCUSWINDOW) the second time returned: %lx\n",rc);
/* Test DDSCL_SETFOCUSWINDOW with the other flags. They should all fail, except of DDSCL_NOWINDOWCHANGES */ rc = IDirectDraw_SetCooperativeLevel(lpDD, hwnd, DDSCL_NORMAL | DDSCL_SETFOCUSWINDOW); - ok(rc==DDERR_INVALIDPARAMS,"SetCooperativeLevel(DDSCL_NORMAL | DDSCL_SETFOCUSWINDOW) returned: %x\n",rc); + ok(rc==DDERR_INVALIDPARAMS,"SetCooperativeLevel(DDSCL_NORMAL | DDSCL_SETFOCUSWINDOW) returned: %lx\n",rc);
rc = IDirectDraw_SetCooperativeLevel(lpDD, hwnd, DDSCL_EXCLUSIVE | DDSCL_FULLSCREEN | DDSCL_SETFOCUSWINDOW); - ok(rc==DDERR_INVALIDPARAMS,"SetCooperativeLevel(DDSCL_EXCLUSIVE | DDSCL_FULLSCREEN | DDSCL_SETFOCUSWINDOW) returned: %x\n",rc); + ok(rc==DDERR_INVALIDPARAMS,"SetCooperativeLevel(DDSCL_EXCLUSIVE | DDSCL_FULLSCREEN | DDSCL_SETFOCUSWINDOW) returned: %lx\n",rc);
/* This one succeeds */ rc = IDirectDraw_SetCooperativeLevel(lpDD, hwnd, DDSCL_NOWINDOWCHANGES | DDSCL_SETFOCUSWINDOW); - ok(rc==DD_OK,"SetCooperativeLevel(DDSCL_NOWINDOWCHANGES | DDSCL_SETFOCUSWINDOW) returned: %x\n",rc); + ok(rc==DD_OK,"SetCooperativeLevel(DDSCL_NOWINDOWCHANGES | DDSCL_SETFOCUSWINDOW) returned: %lx\n",rc);
rc = IDirectDraw_SetCooperativeLevel(lpDD, hwnd, DDSCL_MULTITHREADED | DDSCL_SETFOCUSWINDOW); - ok(rc==DDERR_INVALIDPARAMS,"SetCooperativeLevel(DDSCL_MULTITHREADED | DDSCL_SETFOCUSWINDOW) returned: %x\n",rc); + ok(rc==DDERR_INVALIDPARAMS,"SetCooperativeLevel(DDSCL_MULTITHREADED | DDSCL_SETFOCUSWINDOW) returned: %lx\n",rc);
rc = IDirectDraw_SetCooperativeLevel(lpDD, hwnd, DDSCL_FPUSETUP | DDSCL_SETFOCUSWINDOW); - ok(rc==DDERR_INVALIDPARAMS,"SetCooperativeLevel(DDSCL_FPUSETUP | DDSCL_SETFOCUSWINDOW) returned: %x\n",rc); + ok(rc==DDERR_INVALIDPARAMS,"SetCooperativeLevel(DDSCL_FPUSETUP | DDSCL_SETFOCUSWINDOW) returned: %lx\n",rc);
rc = IDirectDraw_SetCooperativeLevel(lpDD, hwnd, DDSCL_FPUPRESERVE | DDSCL_SETFOCUSWINDOW); - ok(rc==DDERR_INVALIDPARAMS,"SetCooperativeLevel(DDSCL_FPUPRESERVE | DDSCL_SETFOCUSWINDOW) returned: %x\n",rc); + ok(rc==DDERR_INVALIDPARAMS,"SetCooperativeLevel(DDSCL_FPUPRESERVE | DDSCL_SETFOCUSWINDOW) returned: %lx\n",rc);
rc = IDirectDraw_SetCooperativeLevel(lpDD, hwnd, DDSCL_ALLOWREBOOT | DDSCL_SETFOCUSWINDOW); - ok(rc==DDERR_INVALIDPARAMS,"SetCooperativeLevel(DDSCL_ALLOWREBOOT | DDSCL_SETFOCUSWINDOW) returned: %x\n",rc); + ok(rc==DDERR_INVALIDPARAMS,"SetCooperativeLevel(DDSCL_ALLOWREBOOT | DDSCL_SETFOCUSWINDOW) returned: %lx\n",rc);
rc = IDirectDraw_SetCooperativeLevel(lpDD, hwnd, DDSCL_ALLOWMODEX | DDSCL_SETFOCUSWINDOW); - ok(rc==DDERR_INVALIDPARAMS,"SetCooperativeLevel(DDSCL_ALLOWMODEX | DDSCL_SETFOCUSWINDOW) returned: %x\n",rc); + ok(rc==DDERR_INVALIDPARAMS,"SetCooperativeLevel(DDSCL_ALLOWMODEX | DDSCL_SETFOCUSWINDOW) returned: %lx\n",rc);
/* Set the device window without any other flags. Should give an error */ rc = IDirectDraw_SetCooperativeLevel(lpDD, hwnd, DDSCL_SETDEVICEWINDOW); - ok(rc==DDERR_INVALIDPARAMS,"SetCooperativeLevel(DDSCL_SETDEVICEWINDOW) returned: %x\n",rc); + ok(rc==DDERR_INVALIDPARAMS,"SetCooperativeLevel(DDSCL_SETDEVICEWINDOW) returned: %lx\n",rc);
/* Set device window with DDSCL_NORMAL */ rc = IDirectDraw_SetCooperativeLevel(lpDD, hwnd, DDSCL_NORMAL | DDSCL_SETDEVICEWINDOW); - ok(rc==DD_OK,"SetCooperativeLevel(DDSCL_NORMAL | DDSCL_SETDEVICEWINDOW) returned: %x\n",rc); + ok(rc==DD_OK,"SetCooperativeLevel(DDSCL_NORMAL | DDSCL_SETDEVICEWINDOW) returned: %lx\n",rc);
/* Also set the focus window. Should give an error */ rc = IDirectDraw_SetCooperativeLevel(lpDD, hwnd, DDSCL_ALLOWMODEX | DDSCL_EXCLUSIVE | DDSCL_FULLSCREEN | DDSCL_SETDEVICEWINDOW | DDSCL_SETFOCUSWINDOW); - ok(rc==DDERR_INVALIDPARAMS,"SetCooperativeLevel(DDSCL_NORMAL | DDSCL_SETDEVICEWINDOW | DDSCL_SETFOCUSWINDOW) returned: %x\n",rc); + ok(rc==DDERR_INVALIDPARAMS,"SetCooperativeLevel(DDSCL_NORMAL | DDSCL_SETDEVICEWINDOW | DDSCL_SETFOCUSWINDOW) returned: %lx\n",rc);
/* All done */ } @@ -894,17 +894,17 @@ static void testcooperativelevels_exclusive(void) /* Try to set exclusive mode only */ rc = IDirectDraw_SetCooperativeLevel(lpDD, hwnd, DDSCL_EXCLUSIVE); - ok(rc==DDERR_INVALIDPARAMS,"SetCooperativeLevel(DDSCL_EXCLUSIVE) returned: %x\n",rc); + ok(rc==DDERR_INVALIDPARAMS,"SetCooperativeLevel(DDSCL_EXCLUSIVE) returned: %lx\n",rc);
/* Full screen mode only */ rc = IDirectDraw_SetCooperativeLevel(lpDD, hwnd, DDSCL_FULLSCREEN); - ok(rc==DDERR_INVALIDPARAMS,"SetCooperativeLevel(DDSCL_FULLSCREEN) returned: %x\n",rc); + ok(rc==DDERR_INVALIDPARAMS,"SetCooperativeLevel(DDSCL_FULLSCREEN) returned: %lx\n",rc);
/* Full screen mode + exclusive mode */
rc = IDirectDraw_SetCooperativeLevel(lpDD, NULL, DDSCL_FULLSCREEN | DDSCL_EXCLUSIVE); - ok(rc==DDERR_INVALIDPARAMS, "Expected DDERR_INVALIDPARAMS, received %x\n", rc); + ok(rc==DDERR_INVALIDPARAMS, "Expected DDERR_INVALIDPARAMS, received %lx\n", rc);
sfw=FALSE; if(hwnd2) @@ -914,7 +914,7 @@ static void testcooperativelevels_exclusive(void)
rc = IDirectDraw_SetCooperativeLevel(lpDD, hwnd, DDSCL_FULLSCREEN | DDSCL_EXCLUSIVE); - ok(rc==DD_OK,"SetCooperativeLevel(DDSCL_EXCLUSIVE | DDSCL_FULLSCREEN) returned: %x\n",rc); + ok(rc==DD_OK,"SetCooperativeLevel(DDSCL_EXCLUSIVE | DDSCL_FULLSCREEN) returned: %lx\n",rc);
if(sfw) ok(GetForegroundWindow()==hwnd,"Expected the main windows (%p) for foreground, received the second one (%p)\n",hwnd, hwnd2); @@ -928,7 +928,7 @@ static void testcooperativelevels_exclusive(void) rc = IDirectDraw_SetCooperativeLevel(lpDD, hwnd, DDSCL_SETFOCUSWINDOW); ok(rc==DDERR_HWNDALREADYSET || - broken(rc==DDERR_INVALIDPARAMS) /* NT4/Win95 */,"SetCooperativeLevel(DDSCL_SETFOCUSWINDOW) returned: %x\n",rc); + broken(rc==DDERR_INVALIDPARAMS) /* NT4/Win95 */,"SetCooperativeLevel(DDSCL_SETFOCUSWINDOW) returned: %lx\n",rc);
/* All done */ @@ -945,7 +945,7 @@ static void testddraw3(void) IDirectDraw3 *dd3; HRESULT hr; hr = IDirectDraw_QueryInterface(lpDD, &My_IID_IDirectDraw3, (void **) &dd3); - ok(hr == E_NOINTERFACE, "QueryInterface for IID_IDirectDraw3 returned 0x%08x, expected E_NOINTERFACE\n", hr); + ok(hr == E_NOINTERFACE, "QueryInterface for IID_IDirectDraw3 returned 0x%08lx, expected E_NOINTERFACE\n", hr); if(SUCCEEDED(hr) && dd3) IDirectDraw3_Release(dd3); }
@@ -963,7 +963,7 @@ static void testddraw7(void) win_skip("DirectDraw7 is not supported\n"); return; } - ok(hr==DD_OK, "IDirectDraw7_QueryInterface returned %08x\n", hr); + ok(hr==DD_OK, "IDirectDraw7_QueryInterface returned %08lx\n", hr);
if (hr==DD_OK) { @@ -975,7 +975,7 @@ static void testddraw7(void) pend[1] = 0xdeadbeef;
hr = IDirectDraw7_GetDeviceIdentifier(dd7, pdddi2, 0); - ok(hr==DD_OK, "get device identifier failed with %08x\n", hr); + ok(hr==DD_OK, "get device identifier failed with %08lx\n", hr);
if (hr==DD_OK) { @@ -994,7 +994,7 @@ static void testddraw7(void) pend[0] = 0xdeadbeef; pend[1] = 0xdeadbeef; hr = IDirectDraw7_GetDeviceIdentifier(dd7, pdddi2, DDGDI_GETHOSTIDENTIFIER); - ok(hr==DD_OK, "get device identifier failed with %08x\n", hr); + ok(hr==DD_OK, "get device identifier failed with %08lx\n", hr); if (hr==DD_OK) { /* szDriver contains the name of the driver DLL */ diff --git a/dlls/ddraw/tests/dsurface.c b/dlls/ddraw/tests/dsurface.c index 59902b43761..5a3ad28452b 100644 --- a/dlls/ddraw/tests/dsurface.c +++ b/dlls/ddraw/tests/dsurface.c @@ -38,14 +38,14 @@ static BOOL CreateDirectDraw(void) HRESULT rc;
rc = DirectDrawCreate(NULL, &lpDD, NULL); - ok(rc==DD_OK || rc==DDERR_NODIRECTDRAWSUPPORT, "DirectDrawCreateEx returned: %x\n", rc); + ok(rc==DD_OK || rc==DDERR_NODIRECTDRAWSUPPORT, "DirectDrawCreateEx returned: %lx\n", rc); if (!lpDD) { - trace("DirectDrawCreateEx() failed with an error %x\n", rc); + trace("DirectDrawCreateEx() failed with an error %lx\n", rc); return FALSE; }
rc = IDirectDraw_SetCooperativeLevel(lpDD, NULL, DDSCL_NORMAL); - ok(rc==DD_OK,"SetCooperativeLevel returned: %x\n",rc); + ok(rc==DD_OK,"SetCooperativeLevel returned: %lx\n",rc);
return TRUE; } @@ -92,41 +92,41 @@ static void GetDDInterface_1(void) ret = IDirectDraw_CreateSurface(lpDD, &surface, &dsurface, NULL); if(ret != DD_OK) { - ok(FALSE, "IDirectDraw::CreateSurface failed with error %x\n", ret); + ok(FALSE, "IDirectDraw::CreateSurface failed with error %lx\n", ret); return; } ret = IDirectDrawSurface_QueryInterface(dsurface, &IID_IDirectDrawSurface2, (void **) &dsurface2); - ok(ret == DD_OK, "IDirectDrawSurface_QueryInterface returned %08x\n", ret); + ok(ret == DD_OK, "IDirectDrawSurface_QueryInterface returned %08lx\n", ret); ret = IDirectDraw_QueryInterface(lpDD, &IID_IDirectDraw2, (void **) &dd2); - ok(ret == DD_OK, "IDirectDraw_QueryInterface returned %08x\n", ret); + ok(ret == DD_OK, "IDirectDraw_QueryInterface returned %08lx\n", ret); ret = IDirectDraw_QueryInterface(lpDD, &IID_IDirectDraw4, (void **) &dd4); - ok(ret == DD_OK, "IDirectDraw_QueryInterface returned %08x\n", ret); + ok(ret == DD_OK, "IDirectDraw_QueryInterface returned %08lx\n", ret); ret = IDirectDraw_QueryInterface(lpDD, &IID_IDirectDraw7, (void **) &dd7); - ok(ret == DD_OK, "IDirectDraw_QueryInterface returned %08x\n", ret); + ok(ret == DD_OK, "IDirectDraw_QueryInterface returned %08lx\n", ret);
ref1 = getref((IUnknown *) lpDD); - ok(ref1 == 1, "IDirectDraw refcount is %d\n", ref1); + ok(ref1 == 1, "IDirectDraw refcount is %ld\n", ref1); ref2 = getref((IUnknown *) dd2); - ok(ref2 == 1, "IDirectDraw2 refcount is %d\n", ref2); + ok(ref2 == 1, "IDirectDraw2 refcount is %ld\n", ref2); ref4 = getref((IUnknown *) dd4); - ok(ref4 == 1, "IDirectDraw4 refcount is %d\n", ref4); + ok(ref4 == 1, "IDirectDraw4 refcount is %ld\n", ref4); ref7 = getref((IUnknown *) dd7); - ok(ref7 == 1, "IDirectDraw7 refcount is %d\n", ref7); + ok(ref7 == 1, "IDirectDraw7 refcount is %ld\n", ref7);
ret = IDirectDrawSurface2_GetDDInterface(dsurface2, &dd); - ok(ret == DD_OK, "IDirectDrawSurface7_GetDDInterface returned %08x\n", ret); - ok(getref((IUnknown *) lpDD) == ref1 + 1, "IDirectDraw refcount was increased by %d\n", getref((IUnknown *) lpDD) - ref1); - ok(getref((IUnknown *) dd2) == ref2 + 0, "IDirectDraw2 refcount was increased by %d\n", getref((IUnknown *) dd2) - ref2); - ok(getref((IUnknown *) dd4) == ref4 + 0, "IDirectDraw4 refcount was increased by %d\n", getref((IUnknown *) dd4) - ref4); - ok(getref((IUnknown *) dd7) == ref7 + 0, "IDirectDraw7 refcount was increased by %d\n", getref((IUnknown *) dd7) - ref7); + ok(ret == DD_OK, "IDirectDrawSurface7_GetDDInterface returned %08lx\n", ret); + ok(getref((IUnknown *) lpDD) == ref1 + 1, "IDirectDraw refcount was increased by %ld\n", getref((IUnknown *) lpDD) - ref1); + ok(getref((IUnknown *) dd2) == ref2 + 0, "IDirectDraw2 refcount was increased by %ld\n", getref((IUnknown *) dd2) - ref2); + ok(getref((IUnknown *) dd4) == ref4 + 0, "IDirectDraw4 refcount was increased by %ld\n", getref((IUnknown *) dd4) - ref4); + ok(getref((IUnknown *) dd7) == ref7 + 0, "IDirectDraw7 refcount was increased by %ld\n", getref((IUnknown *) dd7) - ref7);
ok(dd == lpDD, "Returned interface pointer is not equal to the creation interface\n"); IUnknown_Release((IUnknown *) dd);
/* try a NULL pointer */ ret = IDirectDrawSurface2_GetDDInterface(dsurface2, NULL); - ok(ret == DDERR_INVALIDPARAMS, "IDirectDrawSurface7_GetDDInterface returned %08x\n", ret); + ok(ret == DDERR_INVALIDPARAMS, "IDirectDrawSurface7_GetDDInterface returned %08lx\n", ret);
IDirectDraw2_Release(dd2); IDirectDraw4_Release(dd4); @@ -148,11 +148,11 @@ static void GetDDInterface_2(void) void *dd;
ret = IDirectDraw_QueryInterface(lpDD, &IID_IDirectDraw2, (void **) &dd2); - ok(ret == DD_OK, "IDirectDraw_QueryInterface returned %08x\n", ret); + ok(ret == DD_OK, "IDirectDraw_QueryInterface returned %08lx\n", ret); ret = IDirectDraw_QueryInterface(lpDD, &IID_IDirectDraw4, (void **) &dd4); - ok(ret == DD_OK, "IDirectDraw_QueryInterface returned %08x\n", ret); + ok(ret == DD_OK, "IDirectDraw_QueryInterface returned %08lx\n", ret); ret = IDirectDraw_QueryInterface(lpDD, &IID_IDirectDraw7, (void **) &dd7); - ok(ret == DD_OK, "IDirectDraw_QueryInterface returned %08x\n", ret); + ok(ret == DD_OK, "IDirectDraw_QueryInterface returned %08lx\n", ret);
/* Create a surface */ ZeroMemory(&surface, sizeof(surface)); @@ -163,31 +163,31 @@ static void GetDDInterface_2(void) ret = IDirectDraw2_CreateSurface(dd2, &surface, &dsurface, NULL); if(ret != DD_OK) { - ok(FALSE, "IDirectDraw::CreateSurface failed with error %x\n", ret); + ok(FALSE, "IDirectDraw::CreateSurface failed with error %lx\n", ret); IDirectDraw2_Release(dd2); IDirectDraw4_Release(dd4); IDirectDraw7_Release(dd7); return; } ret = IDirectDrawSurface_QueryInterface(dsurface, &IID_IDirectDrawSurface2, (void **) &dsurface2); - ok(ret == DD_OK, "IDirectDrawSurface_QueryInterface returned %08x\n", ret); + ok(ret == DD_OK, "IDirectDrawSurface_QueryInterface returned %08lx\n", ret);
ref1 = getref((IUnknown *) lpDD); - ok(ref1 == 1, "IDirectDraw refcount is %d\n", ref1); + ok(ref1 == 1, "IDirectDraw refcount is %ld\n", ref1); ref2 = getref((IUnknown *) dd2); - ok(ref2 == 1, "IDirectDraw2 refcount is %d\n", ref2); + ok(ref2 == 1, "IDirectDraw2 refcount is %ld\n", ref2); ref4 = getref((IUnknown *) dd4); - ok(ref4 == 1, "IDirectDraw4 refcount is %d\n", ref4); + ok(ref4 == 1, "IDirectDraw4 refcount is %ld\n", ref4); ref7 = getref((IUnknown *) dd7); - ok(ref7 == 1, "IDirectDraw7 refcount is %d\n", ref7); + ok(ref7 == 1, "IDirectDraw7 refcount is %ld\n", ref7);
ret = IDirectDrawSurface2_GetDDInterface(dsurface2, &dd); - ok(ret == DD_OK, "IDirectDrawSurface7_GetDDInterface returned %08x\n", ret); - ok(getref((IUnknown *) lpDD) == ref1 + 0, "IDirectDraw refcount was increased by %d\n", getref((IUnknown *) lpDD) - ref1); - ok(getref((IUnknown *) dd2) == ref2 + 1, "IDirectDraw2 refcount was increased by %d\n", getref((IUnknown *) dd2) - ref2); - ok(getref((IUnknown *) dd4) == ref4 + 0, "IDirectDraw4 refcount was increased by %d\n", getref((IUnknown *) dd4) - ref4); - ok(getref((IUnknown *) dd7) == ref7 + 0, "IDirectDraw7 refcount was increased by %d\n", getref((IUnknown *) dd7) - ref7); + ok(ret == DD_OK, "IDirectDrawSurface7_GetDDInterface returned %08lx\n", ret); + ok(getref((IUnknown *) lpDD) == ref1 + 0, "IDirectDraw refcount was increased by %ld\n", getref((IUnknown *) lpDD) - ref1); + ok(getref((IUnknown *) dd2) == ref2 + 1, "IDirectDraw2 refcount was increased by %ld\n", getref((IUnknown *) dd2) - ref2); + ok(getref((IUnknown *) dd4) == ref4 + 0, "IDirectDraw4 refcount was increased by %ld\n", getref((IUnknown *) dd4) - ref4); + ok(getref((IUnknown *) dd7) == ref7 + 0, "IDirectDraw7 refcount was increased by %ld\n", getref((IUnknown *) dd7) - ref7);
ok(dd == dd2, "Returned interface pointer is not equal to the creation interface\n"); IUnknown_Release((IUnknown *) dd); @@ -212,11 +212,11 @@ static void GetDDInterface_4(void) void *dd;
ret = IDirectDraw_QueryInterface(lpDD, &IID_IDirectDraw2, (void **) &dd2); - ok(ret == DD_OK, "IDirectDraw_QueryInterface returned %08x\n", ret); + ok(ret == DD_OK, "IDirectDraw_QueryInterface returned %08lx\n", ret); ret = IDirectDraw_QueryInterface(lpDD, &IID_IDirectDraw4, (void **) &dd4); - ok(ret == DD_OK, "IDirectDraw_QueryInterface returned %08x\n", ret); + ok(ret == DD_OK, "IDirectDraw_QueryInterface returned %08lx\n", ret); ret = IDirectDraw_QueryInterface(lpDD, &IID_IDirectDraw7, (void **) &dd7); - ok(ret == DD_OK, "IDirectDraw_QueryInterface returned %08x\n", ret); + ok(ret == DD_OK, "IDirectDraw_QueryInterface returned %08lx\n", ret);
/* Create a surface */ ZeroMemory(&surface, sizeof(surface)); @@ -227,41 +227,41 @@ static void GetDDInterface_4(void) ret = IDirectDraw4_CreateSurface(dd4, &surface, &dsurface4, NULL); if(ret != DD_OK) { - ok(FALSE, "IDirectDraw::CreateSurface failed with error %x\n", ret); + ok(FALSE, "IDirectDraw::CreateSurface failed with error %lx\n", ret); IDirectDraw2_Release(dd2); IDirectDraw4_Release(dd4); IDirectDraw7_Release(dd7); return; } ret = IDirectDrawSurface4_QueryInterface(dsurface4, &IID_IDirectDrawSurface2, (void **) &dsurface2); - ok(ret == DD_OK, "IDirectDrawSurface_QueryInterface returned %08x\n", ret); + ok(ret == DD_OK, "IDirectDrawSurface_QueryInterface returned %08lx\n", ret);
ref1 = getref((IUnknown *) lpDD); - ok(ref1 == 1, "IDirectDraw refcount is %d\n", ref1); + ok(ref1 == 1, "IDirectDraw refcount is %ld\n", ref1); ref2 = getref((IUnknown *) dd2); - ok(ref2 == 1, "IDirectDraw2 refcount is %d\n", ref2); + ok(ref2 == 1, "IDirectDraw2 refcount is %ld\n", ref2); ref4 = getref((IUnknown *) dd4); - ok(ref4 == 2, "IDirectDraw4 refcount is %d\n", ref4); + ok(ref4 == 2, "IDirectDraw4 refcount is %ld\n", ref4); ref7 = getref((IUnknown *) dd7); - ok(ref7 == 1, "IDirectDraw7 refcount is %d\n", ref7); + ok(ref7 == 1, "IDirectDraw7 refcount is %ld\n", ref7);
ret = IDirectDrawSurface4_GetDDInterface(dsurface4, &dd); - ok(ret == DD_OK, "IDirectDrawSurface7_GetDDInterface returned %08x\n", ret); - ok(getref((IUnknown *) lpDD) == ref1 + 0, "IDirectDraw refcount was increased by %d\n", getref((IUnknown *) lpDD) - ref1); - ok(getref((IUnknown *) dd2) == ref2 + 0, "IDirectDraw2 refcount was increased by %d\n", getref((IUnknown *) dd2) - ref2); - ok(getref((IUnknown *) dd4) == ref4 + 1, "IDirectDraw4 refcount was increased by %d\n", getref((IUnknown *) dd4) - ref4); - ok(getref((IUnknown *) dd7) == ref7 + 0, "IDirectDraw7 refcount was increased by %d\n", getref((IUnknown *) dd7) - ref7); + ok(ret == DD_OK, "IDirectDrawSurface7_GetDDInterface returned %08lx\n", ret); + ok(getref((IUnknown *) lpDD) == ref1 + 0, "IDirectDraw refcount was increased by %ld\n", getref((IUnknown *) lpDD) - ref1); + ok(getref((IUnknown *) dd2) == ref2 + 0, "IDirectDraw2 refcount was increased by %ld\n", getref((IUnknown *) dd2) - ref2); + ok(getref((IUnknown *) dd4) == ref4 + 1, "IDirectDraw4 refcount was increased by %ld\n", getref((IUnknown *) dd4) - ref4); + ok(getref((IUnknown *) dd7) == ref7 + 0, "IDirectDraw7 refcount was increased by %ld\n", getref((IUnknown *) dd7) - ref7);
ok(dd == dd4, "Returned interface pointer is not equal to the creation interface\n"); IUnknown_Release((IUnknown *) dd);
/* Now test what happens if we QI the surface for some other version - It should still return the creation interface */ ret = IDirectDrawSurface2_GetDDInterface(dsurface2, &dd); - ok(ret == DD_OK, "IDirectDrawSurface7_GetDDInterface returned %08x\n", ret); - ok(getref((IUnknown *) lpDD) == ref1 + 0, "IDirectDraw refcount was increased by %d\n", getref((IUnknown *) lpDD) - ref1); - ok(getref((IUnknown *) dd2) == ref2 + 0, "IDirectDraw2 refcount was increased by %d\n", getref((IUnknown *) dd2) - ref2); - ok(getref((IUnknown *) dd4) == ref4 + 1, "IDirectDraw4 refcount was increased by %d\n", getref((IUnknown *) dd4) - ref4); - ok(getref((IUnknown *) dd7) == ref7 + 0, "IDirectDraw7 refcount was increased by %d\n", getref((IUnknown *) dd7) - ref7); + ok(ret == DD_OK, "IDirectDrawSurface7_GetDDInterface returned %08lx\n", ret); + ok(getref((IUnknown *) lpDD) == ref1 + 0, "IDirectDraw refcount was increased by %ld\n", getref((IUnknown *) lpDD) - ref1); + ok(getref((IUnknown *) dd2) == ref2 + 0, "IDirectDraw2 refcount was increased by %ld\n", getref((IUnknown *) dd2) - ref2); + ok(getref((IUnknown *) dd4) == ref4 + 1, "IDirectDraw4 refcount was increased by %ld\n", getref((IUnknown *) dd4) - ref4); + ok(getref((IUnknown *) dd7) == ref7 + 0, "IDirectDraw7 refcount was increased by %ld\n", getref((IUnknown *) dd7) - ref7);
ok(dd == dd4, "Returned interface pointer is not equal to the creation interface\n"); IUnknown_Release((IUnknown *) dd); @@ -286,11 +286,11 @@ static void GetDDInterface_7(void) void *dd;
ret = IDirectDraw_QueryInterface(lpDD, &IID_IDirectDraw2, (void **) &dd2); - ok(ret == DD_OK, "IDirectDraw_QueryInterface returned %08x\n", ret); + ok(ret == DD_OK, "IDirectDraw_QueryInterface returned %08lx\n", ret); ret = IDirectDraw_QueryInterface(lpDD, &IID_IDirectDraw4, (void **) &dd4); - ok(ret == DD_OK, "IDirectDraw_QueryInterface returned %08x\n", ret); + ok(ret == DD_OK, "IDirectDraw_QueryInterface returned %08lx\n", ret); ret = IDirectDraw_QueryInterface(lpDD, &IID_IDirectDraw7, (void **) &dd7); - ok(ret == DD_OK, "IDirectDraw_QueryInterface returned %08x\n", ret); + ok(ret == DD_OK, "IDirectDraw_QueryInterface returned %08lx\n", ret);
/* Create a surface */ ZeroMemory(&surface, sizeof(surface)); @@ -301,41 +301,41 @@ static void GetDDInterface_7(void) ret = IDirectDraw7_CreateSurface(dd7, &surface, &dsurface7, NULL); if(ret != DD_OK) { - ok(FALSE, "IDirectDraw::CreateSurface failed with error %x\n", ret); + ok(FALSE, "IDirectDraw::CreateSurface failed with error %lx\n", ret); IDirectDraw2_Release(dd2); IDirectDraw4_Release(dd4); IDirectDraw7_Release(dd7); return; } ret = IDirectDrawSurface7_QueryInterface(dsurface7, &IID_IDirectDrawSurface4, (void **) &dsurface4); - ok(ret == DD_OK, "IDirectDrawSurface_QueryInterface returned %08x\n", ret); + ok(ret == DD_OK, "IDirectDrawSurface_QueryInterface returned %08lx\n", ret);
ref1 = getref((IUnknown *) lpDD); - ok(ref1 == 1, "IDirectDraw refcount is %d\n", ref1); + ok(ref1 == 1, "IDirectDraw refcount is %ld\n", ref1); ref2 = getref((IUnknown *) dd2); - ok(ref2 == 1, "IDirectDraw2 refcount is %d\n", ref2); + ok(ref2 == 1, "IDirectDraw2 refcount is %ld\n", ref2); ref4 = getref((IUnknown *) dd4); - ok(ref4 == 1, "IDirectDraw4 refcount is %d\n", ref4); + ok(ref4 == 1, "IDirectDraw4 refcount is %ld\n", ref4); ref7 = getref((IUnknown *) dd7); - ok(ref7 == 2, "IDirectDraw7 refcount is %d\n", ref7); + ok(ref7 == 2, "IDirectDraw7 refcount is %ld\n", ref7);
ret = IDirectDrawSurface7_GetDDInterface(dsurface7, &dd); - ok(ret == DD_OK, "IDirectDrawSurface7_GetDDInterface returned %08x\n", ret); - ok(getref((IUnknown *) lpDD) == ref1 + 0, "IDirectDraw refcount was increased by %d\n", getref((IUnknown *) lpDD) - ref1); - ok(getref((IUnknown *) dd2) == ref2 + 0, "IDirectDraw2 refcount was increased by %d\n", getref((IUnknown *) dd2) - ref2); - ok(getref((IUnknown *) dd4) == ref4 + 0, "IDirectDraw4 refcount was increased by %d\n", getref((IUnknown *) dd4) - ref4); - ok(getref((IUnknown *) dd7) == ref7 + 1, "IDirectDraw7 refcount was increased by %d\n", getref((IUnknown *) dd7) - ref7); + ok(ret == DD_OK, "IDirectDrawSurface7_GetDDInterface returned %08lx\n", ret); + ok(getref((IUnknown *) lpDD) == ref1 + 0, "IDirectDraw refcount was increased by %ld\n", getref((IUnknown *) lpDD) - ref1); + ok(getref((IUnknown *) dd2) == ref2 + 0, "IDirectDraw2 refcount was increased by %ld\n", getref((IUnknown *) dd2) - ref2); + ok(getref((IUnknown *) dd4) == ref4 + 0, "IDirectDraw4 refcount was increased by %ld\n", getref((IUnknown *) dd4) - ref4); + ok(getref((IUnknown *) dd7) == ref7 + 1, "IDirectDraw7 refcount was increased by %ld\n", getref((IUnknown *) dd7) - ref7);
ok(dd == dd7, "Returned interface pointer is not equal to the creation interface\n"); IUnknown_Release((IUnknown *) dd);
/* Now test what happens if we QI the surface for some other version - It should still return the creation interface */ ret = IDirectDrawSurface4_GetDDInterface(dsurface4, &dd); - ok(ret == DD_OK, "IDirectDrawSurface7_GetDDInterface returned %08x\n", ret); - ok(getref((IUnknown *) lpDD) == ref1 + 0, "IDirectDraw refcount was increased by %d\n", getref((IUnknown *) lpDD) - ref1); - ok(getref((IUnknown *) dd2) == ref2 + 0, "IDirectDraw2 refcount was increased by %d\n", getref((IUnknown *) dd2) - ref2); - ok(getref((IUnknown *) dd4) == ref4 + 0, "IDirectDraw4 refcount was increased by %d\n", getref((IUnknown *) dd4) - ref4); - ok(getref((IUnknown *) dd7) == ref7 + 1, "IDirectDraw7 refcount was increased by %d\n", getref((IUnknown *) dd7) - ref7); + ok(ret == DD_OK, "IDirectDrawSurface7_GetDDInterface returned %08lx\n", ret); + ok(getref((IUnknown *) lpDD) == ref1 + 0, "IDirectDraw refcount was increased by %ld\n", getref((IUnknown *) lpDD) - ref1); + ok(getref((IUnknown *) dd2) == ref2 + 0, "IDirectDraw2 refcount was increased by %ld\n", getref((IUnknown *) dd2) - ref2); + ok(getref((IUnknown *) dd4) == ref4 + 0, "IDirectDraw4 refcount was increased by %ld\n", getref((IUnknown *) dd4) - ref4); + ok(getref((IUnknown *) dd7) == ref7 + 1, "IDirectDraw7 refcount was increased by %ld\n", getref((IUnknown *) dd7) - ref7);
ok(dd == dd7, "Returned interface pointer is not equal to the creation interface\n"); IUnknown_Release((IUnknown *) dd); @@ -389,9 +389,9 @@ static HRESULT WINAPI CubeTestPaletteEnum(IDirectDrawSurface7 *surface, DDSURFAC
hr = IDirectDrawSurface7_SetPalette(surface, context); if (desc->dwWidth == 64) /* This is for first mimpmap */ - ok(hr == DDERR_NOTONMIPMAPSUBLEVEL, "SetPalette returned: %x\n",hr); + ok(hr == DDERR_NOTONMIPMAPSUBLEVEL, "SetPalette returned: %lx\n",hr); else - ok(hr == DD_OK, "SetPalette returned: %x\n",hr); + ok(hr == DD_OK, "SetPalette returned: %lx\n",hr);
IDirectDrawSurface7_Release(surface);
@@ -459,10 +459,10 @@ static HRESULT WINAPI CubeTestLvl1Enum(IDirectDrawSurface7 *surface, DDSURFACEDE &mipmaps, CubeTestLvl2Enum);
- ok(desc->dwWidth == expected[*num].width, "Surface width is %d expected %d\n", desc->dwWidth, expected[*num].width); - ok(desc->dwHeight == expected[*num].height, "Surface height is %d expected %d\n", desc->dwHeight, expected[*num].height); - ok(desc->ddsCaps.dwCaps == expected[*num].caps, "Surface caps are %08x expected %08x\n", desc->ddsCaps.dwCaps, expected[*num].caps); - ok(desc->ddsCaps.dwCaps2 == expected[*num].caps2, "Surface caps2 are %08x expected %08x\n", desc->ddsCaps.dwCaps2, expected[*num].caps2); + ok(desc->dwWidth == expected[*num].width, "Surface width is %ld expected %ld\n", desc->dwWidth, expected[*num].width); + ok(desc->dwHeight == expected[*num].height, "Surface height is %ld expected %ld\n", desc->dwHeight, expected[*num].height); + ok(desc->ddsCaps.dwCaps == expected[*num].caps, "Surface caps are %08lx expected %08lx\n", desc->ddsCaps.dwCaps, expected[*num].caps); + ok(desc->ddsCaps.dwCaps2 == expected[*num].caps2, "Surface caps2 are %08lx expected %08lx\n", desc->ddsCaps.dwCaps2, expected[*num].caps2); ok(mipmaps == expected[*num].mipmaps, "Surface has %d mipmaps, expected %d\n", mipmaps, expected[*num].mipmaps);
(*num)++; @@ -494,7 +494,7 @@ static void CubeMapTest(void) }
hr = IDirectDraw_QueryInterface(lpDD, &IID_IDirectDraw7, (void **) &dd7); - ok(hr == DD_OK, "IDirectDraw::QueryInterface returned %08x\n", hr); + ok(hr == DD_OK, "IDirectDraw::QueryInterface returned %08lx\n", hr); if (FAILED(hr)) goto err;
memset(&ddsd, 0, sizeof(ddsd)); @@ -521,11 +521,11 @@ static void CubeMapTest(void) }
hr = IDirectDrawSurface7_GetSurfaceDesc(cubemap, &ddsd); - ok(hr == DD_OK, "IDirectDrawSurface7_GetSurfaceDesc returned %08x\n", hr); + ok(hr == DD_OK, "IDirectDrawSurface7_GetSurfaceDesc returned %08lx\n", hr); ok(ddsd.ddsCaps.dwCaps == (DDSCAPS_MIPMAP | DDSCAPS_TEXTURE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_COMPLEX), - "Root Caps are %08x\n", ddsd.ddsCaps.dwCaps); + "Root Caps are %08lx\n", ddsd.ddsCaps.dwCaps); ok(ddsd.ddsCaps.dwCaps2 == (DDSCAPS2_CUBEMAP_POSITIVEX | DDSCAPS2_CUBEMAP), - "Root Caps2 are %08x\n", ddsd.ddsCaps.dwCaps2); + "Root Caps2 are %08lx\n", ddsd.ddsCaps.dwCaps2);
IDirectDrawSurface7_EnumAttachedSurfaces(cubemap, &num, @@ -551,7 +551,7 @@ static void CubeMapTest(void) U4(U4(ddsd).ddpfPixelFormat).dwBBitMask = 0x001F;
hr = IDirectDraw7_CreateSurface(dd7, &ddsd, &cubemap, NULL); - ok(hr == DDERR_INVALIDPARAMS, "IDirectDraw7::CreateSurface asking for a cube map without faces returned %08x\n", hr); + ok(hr == DDERR_INVALIDPARAMS, "IDirectDraw7::CreateSurface asking for a cube map without faces returned %08lx\n", hr);
/* Cube map faces without a cube map? */ memset(&ddsd, 0, sizeof(ddsd)); @@ -571,7 +571,7 @@ static void CubeMapTest(void) U4(U4(ddsd).ddpfPixelFormat).dwBBitMask = 0x001F;
hr = IDirectDraw7_CreateSurface(dd7, &ddsd, &cubemap, NULL); - ok(hr == DDERR_INVALIDCAPS, "IDirectDraw7::CreateSurface returned %08x\n", hr); + ok(hr == DDERR_INVALIDCAPS, "IDirectDraw7::CreateSurface returned %08lx\n", hr);
memset(&ddsd, 0, sizeof(ddsd)); ddsd.dwSize = sizeof(ddsd); @@ -590,7 +590,7 @@ static void CubeMapTest(void) U4(U4(ddsd).ddpfPixelFormat).dwBBitMask = 0x001F;
hr = IDirectDraw7_CreateSurface(dd7, &ddsd, &cubemap, NULL); - ok(hr == DDERR_INVALIDCAPS, "IDirectDraw7::CreateSurface returned %08x\n", hr); + ok(hr == DDERR_INVALIDCAPS, "IDirectDraw7::CreateSurface returned %08lx\n", hr);
memset(&ddsd, 0, sizeof(ddsd)); ddsd.dwSize = sizeof(ddsd); @@ -612,7 +612,7 @@ static void CubeMapTest(void) }
hr = IDirectDraw7_CreatePalette(dd7, DDPCAPS_ALLOW256 | DDPCAPS_8BIT, Table, &palette, NULL); - ok(hr == DD_OK, "CreatePalette failed with %08x\n", hr); + ok(hr == DD_OK, "CreatePalette failed with %08lx\n", hr);
hr = IDirectDrawSurface7_EnumAttachedSurfaces(cubemap, palette, CubeTestPaletteEnum); ok(hr == DD_OK, "EnumAttachedSurfaces failed\n"); @@ -632,7 +632,7 @@ static void CubeMapTest(void) memset(&ddsd, 0, sizeof(ddsd)); ddsd.dwSize = sizeof(DDSURFACEDESC); hr = IDirectDraw_EnumSurfaces(lpDD, DDENUMSURFACES_DOESEXIST | DDENUMSURFACES_ALL, (DDSURFACEDESC *) &ddsd, (void *) &ctx, enumCB); - ok(hr == DD_OK, "IDirectDraw_EnumSurfaces returned %08x\n", hr); + ok(hr == DD_OK, "IDirectDraw_EnumSurfaces returned %08lx\n", hr); ok(ctx.count == 0, "%d surfaces enumerated, expected 0\n", ctx.count);
err: @@ -649,7 +649,7 @@ static void CompressedTest(void) RECT r2 = { 32, 32, 64, 64 };
hr = IDirectDraw_QueryInterface(lpDD, &IID_IDirectDraw7, (void **) &dd7); - ok(hr == DD_OK, "IDirectDraw::QueryInterface returned %08x\n", hr); + ok(hr == DD_OK, "IDirectDraw::QueryInterface returned %08lx\n", hr);
memset(&ddsd, 0, sizeof(ddsd)); ddsd.dwSize = sizeof(ddsd); @@ -662,7 +662,7 @@ static void CompressedTest(void) U4(ddsd).ddpfPixelFormat.dwFourCC = MAKEFOURCC('D','X','T','1');
hr = IDirectDraw7_CreateSurface(dd7, &ddsd, &surface, NULL); - ok(hr == DD_OK, "CreateSurface returned %08x\n", hr); + ok(hr == DD_OK, "CreateSurface returned %08lx\n", hr); if (FAILED(hr)) { skip("failed to create surface\n"); @@ -673,21 +673,21 @@ static void CompressedTest(void) ddsd2.dwSize = sizeof(ddsd2); U4(ddsd2).ddpfPixelFormat.dwSize = sizeof(U4(ddsd2).ddpfPixelFormat); hr = IDirectDrawSurface7_GetSurfaceDesc(surface, &ddsd2); - ok(hr == DD_OK, "GetSurfaceDesc returned %08x\n", hr); + ok(hr == DD_OK, "GetSurfaceDesc returned %08lx\n", hr);
ok(ddsd2.dwFlags == (DDSD_PIXELFORMAT | DDSD_WIDTH | DDSD_HEIGHT | DDSD_CAPS | DDSD_LINEARSIZE), - "Surface desc flags: %08x\n", ddsd2.dwFlags); - ok(U4(ddsd2).ddpfPixelFormat.dwFlags == DDPF_FOURCC, "Pixel format flags: %08x\n", U4(ddsd2).ddpfPixelFormat.dwFlags); - ok(U1(U4(ddsd2).ddpfPixelFormat).dwRGBBitCount == 0, "RGB bitcount: %08x\n", U1(U4(ddsd2).ddpfPixelFormat).dwRGBBitCount); + "Surface desc flags: %08lx\n", ddsd2.dwFlags); + ok(U4(ddsd2).ddpfPixelFormat.dwFlags == DDPF_FOURCC, "Pixel format flags: %08lx\n", U4(ddsd2).ddpfPixelFormat.dwFlags); + ok(U1(U4(ddsd2).ddpfPixelFormat).dwRGBBitCount == 0, "RGB bitcount: %08lx\n", U1(U4(ddsd2).ddpfPixelFormat).dwRGBBitCount); ok(ddsd2.ddsCaps.dwCaps == (DDSCAPS_TEXTURE | DDSCAPS_SYSTEMMEMORY), - "Surface caps flags: %08x\n", ddsd2.ddsCaps.dwCaps); - ok(U1(ddsd2).dwLinearSize == 8192, "Linear size is %d\n", U1(ddsd2).dwLinearSize); - ok(ddsd2.ddsCaps.dwCaps2 == 0, "Caps2: %08x\n", ddsd2.ddsCaps.dwCaps2); + "Surface caps flags: %08lx\n", ddsd2.ddsCaps.dwCaps); + ok(U1(ddsd2).dwLinearSize == 8192, "Linear size is %ld\n", U1(ddsd2).dwLinearSize); + ok(ddsd2.ddsCaps.dwCaps2 == 0, "Caps2: %08lx\n", ddsd2.ddsCaps.dwCaps2); IDirectDrawSurface7_Release(surface);
U4(ddsd).ddpfPixelFormat.dwFourCC = MAKEFOURCC('D','X','T','3'); hr = IDirectDraw7_CreateSurface(dd7, &ddsd, &surface, NULL); - ok(hr == DD_OK, "CreateSurface returned %08x\n", hr); + ok(hr == DD_OK, "CreateSurface returned %08lx\n", hr); if (FAILED(hr)) { skip("failed to create surface\n"); @@ -698,20 +698,20 @@ static void CompressedTest(void) ddsd2.dwSize = sizeof(ddsd2); U4(ddsd2).ddpfPixelFormat.dwSize = sizeof(U4(ddsd2).ddpfPixelFormat); hr = IDirectDrawSurface7_GetSurfaceDesc(surface, &ddsd2); - ok(hr == DD_OK, "GetSurfaceDesc returned %08x\n", hr); + ok(hr == DD_OK, "GetSurfaceDesc returned %08lx\n", hr);
ok(ddsd2.dwFlags == (DDSD_PIXELFORMAT | DDSD_WIDTH | DDSD_HEIGHT | DDSD_CAPS | DDSD_LINEARSIZE), - "Surface desc flags: %08x\n", ddsd2.dwFlags); - ok(U4(ddsd2).ddpfPixelFormat.dwFlags == DDPF_FOURCC, "Pixel format flags: %08x\n", U4(ddsd2).ddpfPixelFormat.dwFlags); - ok(U1(U4(ddsd2).ddpfPixelFormat).dwRGBBitCount == 0, "RGB bitcount: %08x\n", U1(U4(ddsd2).ddpfPixelFormat).dwRGBBitCount); + "Surface desc flags: %08lx\n", ddsd2.dwFlags); + ok(U4(ddsd2).ddpfPixelFormat.dwFlags == DDPF_FOURCC, "Pixel format flags: %08lx\n", U4(ddsd2).ddpfPixelFormat.dwFlags); + ok(U1(U4(ddsd2).ddpfPixelFormat).dwRGBBitCount == 0, "RGB bitcount: %08lx\n", U1(U4(ddsd2).ddpfPixelFormat).dwRGBBitCount); ok(ddsd2.ddsCaps.dwCaps == (DDSCAPS_TEXTURE | DDSCAPS_SYSTEMMEMORY), - "Surface caps flags: %08x\n", ddsd2.ddsCaps.dwCaps); - ok(U1(ddsd2).dwLinearSize == 16384, "Linear size is %d\n", U1(ddsd2).dwLinearSize); + "Surface caps flags: %08lx\n", ddsd2.ddsCaps.dwCaps); + ok(U1(ddsd2).dwLinearSize == 16384, "Linear size is %ld\n", U1(ddsd2).dwLinearSize); IDirectDrawSurface7_Release(surface);
U4(ddsd).ddpfPixelFormat.dwFourCC = MAKEFOURCC('D','X','T','5'); hr = IDirectDraw7_CreateSurface(dd7, &ddsd, &surface, NULL); - ok(hr == DD_OK, "CreateSurface returned %08x\n", hr); + ok(hr == DD_OK, "CreateSurface returned %08lx\n", hr); if (FAILED(hr)) { skip("failed to create surface\n"); @@ -722,15 +722,15 @@ static void CompressedTest(void) ddsd2.dwSize = sizeof(ddsd2); U4(ddsd2).ddpfPixelFormat.dwSize = sizeof(U4(ddsd2).ddpfPixelFormat); hr = IDirectDrawSurface7_GetSurfaceDesc(surface, &ddsd2); - ok(hr == DD_OK, "GetSurfaceDesc returned %08x\n", hr); + ok(hr == DD_OK, "GetSurfaceDesc returned %08lx\n", hr);
ok(ddsd2.dwFlags == (DDSD_PIXELFORMAT | DDSD_WIDTH | DDSD_HEIGHT | DDSD_CAPS | DDSD_LINEARSIZE), - "Surface desc flags: %08x\n", ddsd2.dwFlags); - ok(U4(ddsd2).ddpfPixelFormat.dwFlags == DDPF_FOURCC, "Pixel format flags: %08x\n", U4(ddsd2).ddpfPixelFormat.dwFlags); - ok(U1(U4(ddsd2).ddpfPixelFormat).dwRGBBitCount == 0, "RGB bitcount: %08x\n", U1(U4(ddsd2).ddpfPixelFormat).dwRGBBitCount); + "Surface desc flags: %08lx\n", ddsd2.dwFlags); + ok(U4(ddsd2).ddpfPixelFormat.dwFlags == DDPF_FOURCC, "Pixel format flags: %08lx\n", U4(ddsd2).ddpfPixelFormat.dwFlags); + ok(U1(U4(ddsd2).ddpfPixelFormat).dwRGBBitCount == 0, "RGB bitcount: %08lx\n", U1(U4(ddsd2).ddpfPixelFormat).dwRGBBitCount); ok(ddsd2.ddsCaps.dwCaps == (DDSCAPS_TEXTURE | DDSCAPS_SYSTEMMEMORY), - "Surface caps flags: %08x\n", ddsd2.ddsCaps.dwCaps); - ok(U1(ddsd2).dwLinearSize == 16384, "Linear size is %d\n", U1(ddsd2).dwLinearSize); + "Surface caps flags: %08lx\n", ddsd2.ddsCaps.dwCaps); + ok(U1(ddsd2).dwLinearSize == 16384, "Linear size is %ld\n", U1(ddsd2).dwLinearSize); ok(ddsd2.lpSurface == 0, "Surface memory is at %p, expected NULL\n", ddsd2.lpSurface);
memset(&ddsd2, 0, sizeof(ddsd2)); @@ -741,51 +741,51 @@ static void CompressedTest(void) * about this is that DDSD_LPSURFACE isn't set. */ hr = IDirectDrawSurface7_Lock(surface, NULL, &ddsd2, DDLOCK_READONLY, 0); - ok(hr == DD_OK, "Lock returned %08x\n", hr); + ok(hr == DD_OK, "Lock returned %08lx\n", hr);
ok(ddsd2.dwFlags == (DDSD_PIXELFORMAT | DDSD_WIDTH | DDSD_HEIGHT | DDSD_CAPS | DDSD_LINEARSIZE), - "Surface desc flags: %08x\n", ddsd2.dwFlags); - ok(U4(ddsd2).ddpfPixelFormat.dwFlags == DDPF_FOURCC, "Pixel format flags: %08x\n", U4(ddsd2).ddpfPixelFormat.dwFlags); - ok(U1(U4(ddsd2).ddpfPixelFormat).dwRGBBitCount == 0, "RGB bitcount: %08x\n", U1(U4(ddsd2).ddpfPixelFormat).dwRGBBitCount); + "Surface desc flags: %08lx\n", ddsd2.dwFlags); + ok(U4(ddsd2).ddpfPixelFormat.dwFlags == DDPF_FOURCC, "Pixel format flags: %08lx\n", U4(ddsd2).ddpfPixelFormat.dwFlags); + ok(U1(U4(ddsd2).ddpfPixelFormat).dwRGBBitCount == 0, "RGB bitcount: %08lx\n", U1(U4(ddsd2).ddpfPixelFormat).dwRGBBitCount); ok(ddsd2.ddsCaps.dwCaps == (DDSCAPS_TEXTURE | DDSCAPS_SYSTEMMEMORY), - "Surface caps flags: %08x\n", ddsd2.ddsCaps.dwCaps); - ok(U1(ddsd2).dwLinearSize == 16384, "Linear size is %d\n", U1(ddsd2).dwLinearSize); + "Surface caps flags: %08lx\n", ddsd2.ddsCaps.dwCaps); + ok(U1(ddsd2).dwLinearSize == 16384, "Linear size is %ld\n", U1(ddsd2).dwLinearSize); ok(ddsd2.lpSurface != 0, "Surface memory is at NULL\n");
hr = IDirectDrawSurface7_Unlock(surface, NULL); - ok(hr == DD_OK, "Unlock returned %08x\n", hr); + ok(hr == DD_OK, "Unlock returned %08lx\n", hr);
/* Now what about a locking rect? */ hr = IDirectDrawSurface7_Lock(surface, &r, &ddsd2, DDLOCK_READONLY, 0); - ok(hr == DD_OK, "Lock returned %08x\n", hr); + ok(hr == DD_OK, "Lock returned %08lx\n", hr);
ok(ddsd2.dwFlags == (DDSD_PIXELFORMAT | DDSD_WIDTH | DDSD_HEIGHT | DDSD_CAPS | DDSD_LINEARSIZE), - "Surface desc flags: %08x\n", ddsd2.dwFlags); - ok(U4(ddsd2).ddpfPixelFormat.dwFlags == DDPF_FOURCC, "Pixel format flags: %08x\n", U4(ddsd2).ddpfPixelFormat.dwFlags); - ok(U1(U4(ddsd2).ddpfPixelFormat).dwRGBBitCount == 0, "RGB bitcount: %08x\n", U1(U4(ddsd2).ddpfPixelFormat).dwRGBBitCount); + "Surface desc flags: %08lx\n", ddsd2.dwFlags); + ok(U4(ddsd2).ddpfPixelFormat.dwFlags == DDPF_FOURCC, "Pixel format flags: %08lx\n", U4(ddsd2).ddpfPixelFormat.dwFlags); + ok(U1(U4(ddsd2).ddpfPixelFormat).dwRGBBitCount == 0, "RGB bitcount: %08lx\n", U1(U4(ddsd2).ddpfPixelFormat).dwRGBBitCount); ok(ddsd2.ddsCaps.dwCaps == (DDSCAPS_TEXTURE | DDSCAPS_SYSTEMMEMORY), - "Surface caps flags: %08x\n", ddsd2.ddsCaps.dwCaps); - ok(U1(ddsd2).dwLinearSize == 16384, "Linear size is %d\n", U1(ddsd2).dwLinearSize); + "Surface caps flags: %08lx\n", ddsd2.ddsCaps.dwCaps); + ok(U1(ddsd2).dwLinearSize == 16384, "Linear size is %ld\n", U1(ddsd2).dwLinearSize); ok(ddsd2.lpSurface != 0, "Surface memory is at NULL\n");
hr = IDirectDrawSurface7_Unlock(surface, &r); - ok(hr == DD_OK, "Unlock returned %08x\n", hr); + ok(hr == DD_OK, "Unlock returned %08lx\n", hr);
/* Now what about a different locking offset? */ hr = IDirectDrawSurface7_Lock(surface, &r2, &ddsd2, DDLOCK_READONLY, 0); - ok(hr == DD_OK, "Lock returned %08x\n", hr); + ok(hr == DD_OK, "Lock returned %08lx\n", hr);
ok(ddsd2.dwFlags == (DDSD_PIXELFORMAT | DDSD_WIDTH | DDSD_HEIGHT | DDSD_CAPS | DDSD_LINEARSIZE), - "Surface desc flags: %08x\n", ddsd2.dwFlags); - ok(U4(ddsd2).ddpfPixelFormat.dwFlags == DDPF_FOURCC, "Pixel format flags: %08x\n", U4(ddsd2).ddpfPixelFormat.dwFlags); - ok(U1(U4(ddsd2).ddpfPixelFormat).dwRGBBitCount == 0, "RGB bitcount: %08x\n", U1(U4(ddsd2).ddpfPixelFormat).dwRGBBitCount); + "Surface desc flags: %08lx\n", ddsd2.dwFlags); + ok(U4(ddsd2).ddpfPixelFormat.dwFlags == DDPF_FOURCC, "Pixel format flags: %08lx\n", U4(ddsd2).ddpfPixelFormat.dwFlags); + ok(U1(U4(ddsd2).ddpfPixelFormat).dwRGBBitCount == 0, "RGB bitcount: %08lx\n", U1(U4(ddsd2).ddpfPixelFormat).dwRGBBitCount); ok(ddsd2.ddsCaps.dwCaps == (DDSCAPS_TEXTURE | DDSCAPS_SYSTEMMEMORY), - "Surface caps flags: %08x\n", ddsd2.ddsCaps.dwCaps); - ok(U1(ddsd2).dwLinearSize == 16384, "Linear size is %d\n", U1(ddsd2).dwLinearSize); + "Surface caps flags: %08lx\n", ddsd2.ddsCaps.dwCaps); + ok(U1(ddsd2).dwLinearSize == 16384, "Linear size is %ld\n", U1(ddsd2).dwLinearSize); ok(ddsd2.lpSurface != 0, "Surface memory is at NULL\n");
hr = IDirectDrawSurface7_Unlock(surface, &r2); - ok(hr == DD_OK, "Unlock returned %08x\n", hr); + ok(hr == DD_OK, "Unlock returned %08lx\n", hr); IDirectDrawSurface7_Release(surface);
/* Try this with video memory. A kind of surprise. It still has the LINEARSIZE flag set, @@ -796,7 +796,7 @@ static void CompressedTest(void)
hr = IDirectDraw7_CreateSurface(dd7, &ddsd, &surface, NULL); ok(hr == DD_OK || hr == DDERR_NOTEXTUREHW || hr == DDERR_INVALIDPARAMS || - broken(hr == DDERR_NODIRECTDRAWHW), "CreateSurface returned %08x\n", hr); + broken(hr == DDERR_NODIRECTDRAWHW), "CreateSurface returned %08lx\n", hr);
/* Not supported everywhere */ if(SUCCEEDED(hr)) @@ -805,53 +805,53 @@ static void CompressedTest(void) ddsd2.dwSize = sizeof(ddsd2); U4(ddsd2).ddpfPixelFormat.dwSize = sizeof(U4(ddsd2).ddpfPixelFormat); hr = IDirectDrawSurface7_GetSurfaceDesc(surface, &ddsd2); - ok(hr == DD_OK, "GetSurfaceDesc returned %08x\n", hr); + ok(hr == DD_OK, "GetSurfaceDesc returned %08lx\n", hr);
ok(ddsd2.dwFlags == (DDSD_PIXELFORMAT | DDSD_WIDTH | DDSD_HEIGHT | DDSD_CAPS | DDSD_LINEARSIZE), - "Surface desc flags: %08x\n", ddsd2.dwFlags); - ok(U4(ddsd2).ddpfPixelFormat.dwFlags == DDPF_FOURCC, "Pixel format flags: %08x\n", U4(ddsd2).ddpfPixelFormat.dwFlags); - ok(U1(U4(ddsd2).ddpfPixelFormat).dwRGBBitCount == 0, "RGB bitcount: %08x\n", U1(U4(ddsd2).ddpfPixelFormat).dwRGBBitCount); + "Surface desc flags: %08lx\n", ddsd2.dwFlags); + ok(U4(ddsd2).ddpfPixelFormat.dwFlags == DDPF_FOURCC, "Pixel format flags: %08lx\n", U4(ddsd2).ddpfPixelFormat.dwFlags); + ok(U1(U4(ddsd2).ddpfPixelFormat).dwRGBBitCount == 0, "RGB bitcount: %08lx\n", U1(U4(ddsd2).ddpfPixelFormat).dwRGBBitCount); ok(ddsd2.ddsCaps.dwCaps == (DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_LOCALVIDMEM), - "Surface caps flags: %08x\n", ddsd2.ddsCaps.dwCaps); + "Surface caps flags: %08lx\n", ddsd2.ddsCaps.dwCaps); /* ATI drivers report a broken linear size, thus no need to clone the exact behaviour. nvidia reports the correct size */ - ok(ddsd2.ddsCaps.dwCaps2 == 0, "Caps2: %08x\n", ddsd2.ddsCaps.dwCaps2); + ok(ddsd2.ddsCaps.dwCaps2 == 0, "Caps2: %08lx\n", ddsd2.ddsCaps.dwCaps2); IDirectDrawSurface7_Release(surface);
U4(ddsd).ddpfPixelFormat.dwFourCC = MAKEFOURCC('D','X','T','3'); hr = IDirectDraw7_CreateSurface(dd7, &ddsd, &surface, NULL); - ok(hr == DD_OK, "CreateSurface returned %08x\n", hr); + ok(hr == DD_OK, "CreateSurface returned %08lx\n", hr);
memset(&ddsd2, 0, sizeof(ddsd2)); ddsd2.dwSize = sizeof(ddsd2); U4(ddsd2).ddpfPixelFormat.dwSize = sizeof(U4(ddsd2).ddpfPixelFormat); hr = IDirectDrawSurface7_GetSurfaceDesc(surface, &ddsd2); - ok(hr == DD_OK, "GetSurfaceDesc returned %08x\n", hr); + ok(hr == DD_OK, "GetSurfaceDesc returned %08lx\n", hr);
ok(ddsd2.dwFlags == (DDSD_PIXELFORMAT | DDSD_WIDTH | DDSD_HEIGHT | DDSD_CAPS | DDSD_LINEARSIZE), - "Surface desc flags: %08x\n", ddsd2.dwFlags); - ok(U4(ddsd2).ddpfPixelFormat.dwFlags == DDPF_FOURCC, "Pixel format flags: %08x\n", U4(ddsd2).ddpfPixelFormat.dwFlags); - ok(U1(U4(ddsd2).ddpfPixelFormat).dwRGBBitCount == 0, "RGB bitcount: %08x\n", U1(U4(ddsd2).ddpfPixelFormat).dwRGBBitCount); + "Surface desc flags: %08lx\n", ddsd2.dwFlags); + ok(U4(ddsd2).ddpfPixelFormat.dwFlags == DDPF_FOURCC, "Pixel format flags: %08lx\n", U4(ddsd2).ddpfPixelFormat.dwFlags); + ok(U1(U4(ddsd2).ddpfPixelFormat).dwRGBBitCount == 0, "RGB bitcount: %08lx\n", U1(U4(ddsd2).ddpfPixelFormat).dwRGBBitCount); ok(ddsd2.ddsCaps.dwCaps == (DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_LOCALVIDMEM), - "Surface caps flags: %08x\n", ddsd2.ddsCaps.dwCaps); + "Surface caps flags: %08lx\n", ddsd2.ddsCaps.dwCaps); /* ATI drivers report a broken linear size, thus no need to clone the exact behaviour. nvidia reports the correct size */ IDirectDrawSurface7_Release(surface);
U4(ddsd).ddpfPixelFormat.dwFourCC = MAKEFOURCC('D','X','T','5'); hr = IDirectDraw7_CreateSurface(dd7, &ddsd, &surface, NULL); - ok(hr == DD_OK, "CreateSurface returned %08x\n", hr); + ok(hr == DD_OK, "CreateSurface returned %08lx\n", hr);
memset(&ddsd2, 0, sizeof(ddsd2)); ddsd2.dwSize = sizeof(ddsd2); U4(ddsd2).ddpfPixelFormat.dwSize = sizeof(U4(ddsd2).ddpfPixelFormat); hr = IDirectDrawSurface7_GetSurfaceDesc(surface, &ddsd2); - ok(hr == DD_OK, "GetSurfaceDesc returned %08x\n", hr); + ok(hr == DD_OK, "GetSurfaceDesc returned %08lx\n", hr);
ok(ddsd2.dwFlags == (DDSD_PIXELFORMAT | DDSD_WIDTH | DDSD_HEIGHT | DDSD_CAPS | DDSD_LINEARSIZE), - "Surface desc flags: %08x\n", ddsd2.dwFlags); - ok(U4(ddsd2).ddpfPixelFormat.dwFlags == DDPF_FOURCC, "Pixel format flags: %08x\n", U4(ddsd2).ddpfPixelFormat.dwFlags); - ok(U1(U4(ddsd2).ddpfPixelFormat).dwRGBBitCount == 0, "RGB bitcount: %08x\n", U1(U4(ddsd2).ddpfPixelFormat).dwRGBBitCount); + "Surface desc flags: %08lx\n", ddsd2.dwFlags); + ok(U4(ddsd2).ddpfPixelFormat.dwFlags == DDPF_FOURCC, "Pixel format flags: %08lx\n", U4(ddsd2).ddpfPixelFormat.dwFlags); + ok(U1(U4(ddsd2).ddpfPixelFormat).dwRGBBitCount == 0, "RGB bitcount: %08lx\n", U1(U4(ddsd2).ddpfPixelFormat).dwRGBBitCount); ok(ddsd2.ddsCaps.dwCaps == (DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_LOCALVIDMEM), - "Surface caps flags: %08x\n", ddsd2.ddsCaps.dwCaps); + "Surface caps flags: %08lx\n", ddsd2.ddsCaps.dwCaps); /* ATI drivers report a broken linear size, thus no need to clone the exact behaviour. nvidia reports the correct size */ ok(ddsd2.lpSurface == 0, "Surface memory is at %p, expected NULL\n", ddsd2.lpSurface);
@@ -863,51 +863,51 @@ static void CompressedTest(void) * about this is that DDSD_LPSURFACE isn't set. */ hr = IDirectDrawSurface7_Lock(surface, NULL, &ddsd2, DDLOCK_READONLY, 0); - ok(hr == DD_OK, "Lock returned %08x\n", hr); + ok(hr == DD_OK, "Lock returned %08lx\n", hr);
ok(ddsd2.dwFlags == (DDSD_PIXELFORMAT | DDSD_WIDTH | DDSD_HEIGHT | DDSD_CAPS | DDSD_LINEARSIZE), - "Surface desc flags: %08x\n", ddsd2.dwFlags); - ok(U4(ddsd2).ddpfPixelFormat.dwFlags == DDPF_FOURCC, "Pixel format flags: %08x\n", U4(ddsd2).ddpfPixelFormat.dwFlags); - ok(U1(U4(ddsd2).ddpfPixelFormat).dwRGBBitCount == 0, "RGB bitcount: %08x\n", U1(U4(ddsd2).ddpfPixelFormat).dwRGBBitCount); + "Surface desc flags: %08lx\n", ddsd2.dwFlags); + ok(U4(ddsd2).ddpfPixelFormat.dwFlags == DDPF_FOURCC, "Pixel format flags: %08lx\n", U4(ddsd2).ddpfPixelFormat.dwFlags); + ok(U1(U4(ddsd2).ddpfPixelFormat).dwRGBBitCount == 0, "RGB bitcount: %08lx\n", U1(U4(ddsd2).ddpfPixelFormat).dwRGBBitCount); ok(ddsd2.ddsCaps.dwCaps == (DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_LOCALVIDMEM), - "Surface caps flags: %08x\n", ddsd2.ddsCaps.dwCaps); + "Surface caps flags: %08lx\n", ddsd2.ddsCaps.dwCaps); /* ATI drivers report a broken linear size, thus no need to clone the exact behaviour. nvidia reports the correct size */ ok(ddsd2.lpSurface != 0, "Surface memory is at NULL\n");
hr = IDirectDrawSurface7_Unlock(surface, NULL); - ok(hr == DD_OK, "Unlock returned %08x\n", hr); + ok(hr == DD_OK, "Unlock returned %08lx\n", hr);
/* Now what about a locking rect? */ hr = IDirectDrawSurface7_Lock(surface, &r, &ddsd2, DDLOCK_READONLY, 0); - ok(hr == DD_OK, "Lock returned %08x\n", hr); + ok(hr == DD_OK, "Lock returned %08lx\n", hr);
ok(ddsd2.dwFlags == (DDSD_PIXELFORMAT | DDSD_WIDTH | DDSD_HEIGHT | DDSD_CAPS | DDSD_LINEARSIZE), - "Surface desc flags: %08x\n", ddsd2.dwFlags); - ok(U4(ddsd2).ddpfPixelFormat.dwFlags == DDPF_FOURCC, "Pixel format flags: %08x\n", U4(ddsd2).ddpfPixelFormat.dwFlags); - ok(U1(U4(ddsd2).ddpfPixelFormat).dwRGBBitCount == 0, "RGB bitcount: %08x\n", U1(U4(ddsd2).ddpfPixelFormat).dwRGBBitCount); + "Surface desc flags: %08lx\n", ddsd2.dwFlags); + ok(U4(ddsd2).ddpfPixelFormat.dwFlags == DDPF_FOURCC, "Pixel format flags: %08lx\n", U4(ddsd2).ddpfPixelFormat.dwFlags); + ok(U1(U4(ddsd2).ddpfPixelFormat).dwRGBBitCount == 0, "RGB bitcount: %08lx\n", U1(U4(ddsd2).ddpfPixelFormat).dwRGBBitCount); ok(ddsd2.ddsCaps.dwCaps == (DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_LOCALVIDMEM), - "Surface caps flags: %08x\n", ddsd2.ddsCaps.dwCaps); + "Surface caps flags: %08lx\n", ddsd2.ddsCaps.dwCaps); /* ATI drivers report a broken linear size, thus no need to clone the exact behaviour. nvidia reports the correct size */ ok(ddsd2.lpSurface != 0, "Surface memory is at NULL\n");
hr = IDirectDrawSurface7_Unlock(surface, &r); - ok(hr == DD_OK, "Unlock returned %08x\n", hr); + ok(hr == DD_OK, "Unlock returned %08lx\n", hr);
/* Now what about a different locking offset? */ hr = IDirectDrawSurface7_Lock(surface, &r2, &ddsd2, DDLOCK_READONLY, 0); - ok(hr == DD_OK, "Lock returned %08x\n", hr); + ok(hr == DD_OK, "Lock returned %08lx\n", hr);
ok(ddsd2.dwFlags == (DDSD_PIXELFORMAT | DDSD_WIDTH | DDSD_HEIGHT | DDSD_CAPS | DDSD_LINEARSIZE), - "Surface desc flags: %08x\n", ddsd2.dwFlags); - ok(U4(ddsd2).ddpfPixelFormat.dwFlags == DDPF_FOURCC, "Pixel format flags: %08x\n", U4(ddsd2).ddpfPixelFormat.dwFlags); - ok(U1(U4(ddsd2).ddpfPixelFormat).dwRGBBitCount == 0, "RGB bitcount: %08x\n", U1(U4(ddsd2).ddpfPixelFormat).dwRGBBitCount); + "Surface desc flags: %08lx\n", ddsd2.dwFlags); + ok(U4(ddsd2).ddpfPixelFormat.dwFlags == DDPF_FOURCC, "Pixel format flags: %08lx\n", U4(ddsd2).ddpfPixelFormat.dwFlags); + ok(U1(U4(ddsd2).ddpfPixelFormat).dwRGBBitCount == 0, "RGB bitcount: %08lx\n", U1(U4(ddsd2).ddpfPixelFormat).dwRGBBitCount); ok(ddsd2.ddsCaps.dwCaps == (DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_LOCALVIDMEM), - "Surface caps flags: %08x\n", ddsd2.ddsCaps.dwCaps); + "Surface caps flags: %08lx\n", ddsd2.ddsCaps.dwCaps); /* ATI drivers report a broken linear size, thus no need to clone the exact behaviour. nvidia reports the correct size */ ok(ddsd2.lpSurface != 0, "Surface memory is at NULL\n");
hr = IDirectDrawSurface7_Unlock(surface, &r2); - ok(hr == DD_OK, "Unlock returned %08x\n", hr); + ok(hr == DD_OK, "Unlock returned %08lx\n", hr);
IDirectDrawSurface7_Release(surface); } @@ -924,7 +924,7 @@ static void CompressedTest(void) U4(ddsd).ddpfPixelFormat.dwFourCC = MAKEFOURCC('D','X','T','1');
hr = IDirectDraw7_CreateSurface(dd7, &ddsd, &surface, NULL); - ok(hr == DD_OK || hr == DDERR_NOTEXTUREHW, "CreateSurface returned %08x\n", hr); + ok(hr == DD_OK || hr == DDERR_NOTEXTUREHW, "CreateSurface returned %08lx\n", hr);
/* Not supported everywhere */ if(SUCCEEDED(hr)) @@ -933,54 +933,54 @@ static void CompressedTest(void) ddsd2.dwSize = sizeof(ddsd2); U4(ddsd2).ddpfPixelFormat.dwSize = sizeof(U4(ddsd2).ddpfPixelFormat); hr = IDirectDrawSurface7_GetSurfaceDesc(surface, &ddsd2); - ok(hr == DD_OK, "GetSurfaceDesc returned %08x\n", hr); + ok(hr == DD_OK, "GetSurfaceDesc returned %08lx\n", hr);
ok(ddsd2.dwFlags == (DDSD_PIXELFORMAT | DDSD_WIDTH | DDSD_HEIGHT | DDSD_CAPS | DDSD_LINEARSIZE), - "Surface desc flags: %08x\n", ddsd2.dwFlags); - ok(U4(ddsd2).ddpfPixelFormat.dwFlags == DDPF_FOURCC, "Pixel format flags: %08x\n", U4(ddsd2).ddpfPixelFormat.dwFlags); - ok(U1(U4(ddsd2).ddpfPixelFormat).dwRGBBitCount == 0, "RGB bitcount: %08x\n", U1(U4(ddsd2).ddpfPixelFormat).dwRGBBitCount); + "Surface desc flags: %08lx\n", ddsd2.dwFlags); + ok(U4(ddsd2).ddpfPixelFormat.dwFlags == DDPF_FOURCC, "Pixel format flags: %08lx\n", U4(ddsd2).ddpfPixelFormat.dwFlags); + ok(U1(U4(ddsd2).ddpfPixelFormat).dwRGBBitCount == 0, "RGB bitcount: %08lx\n", U1(U4(ddsd2).ddpfPixelFormat).dwRGBBitCount); ok(ddsd2.ddsCaps.dwCaps == (DDSCAPS_TEXTURE | DDSCAPS_SYSTEMMEMORY), - "Surface caps flags: %08x\n", ddsd2.ddsCaps.dwCaps); - ok(U1(ddsd2).dwLinearSize == 8192, "Linear size is %d\n", U1(ddsd2).dwLinearSize); - ok(ddsd2.ddsCaps.dwCaps2 == DDSCAPS2_TEXTUREMANAGE, "Caps2: %08x\n", ddsd2.ddsCaps.dwCaps2); + "Surface caps flags: %08lx\n", ddsd2.ddsCaps.dwCaps); + ok(U1(ddsd2).dwLinearSize == 8192, "Linear size is %ld\n", U1(ddsd2).dwLinearSize); + ok(ddsd2.ddsCaps.dwCaps2 == DDSCAPS2_TEXTUREMANAGE, "Caps2: %08lx\n", ddsd2.ddsCaps.dwCaps2); IDirectDrawSurface7_Release(surface);
U4(ddsd).ddpfPixelFormat.dwFourCC = MAKEFOURCC('D','X','T','3'); hr = IDirectDraw7_CreateSurface(dd7, &ddsd, &surface, NULL); - ok(hr == DD_OK, "CreateSurface returned %08x\n", hr); + ok(hr == DD_OK, "CreateSurface returned %08lx\n", hr);
memset(&ddsd2, 0, sizeof(ddsd2)); ddsd2.dwSize = sizeof(ddsd2); U4(ddsd2).ddpfPixelFormat.dwSize = sizeof(U4(ddsd2).ddpfPixelFormat); hr = IDirectDrawSurface7_GetSurfaceDesc(surface, &ddsd2); - ok(hr == DD_OK, "GetSurfaceDesc returned %08x\n", hr); + ok(hr == DD_OK, "GetSurfaceDesc returned %08lx\n", hr);
ok(ddsd2.dwFlags == (DDSD_PIXELFORMAT | DDSD_WIDTH | DDSD_HEIGHT | DDSD_CAPS | DDSD_LINEARSIZE), - "Surface desc flags: %08x\n", ddsd2.dwFlags); - ok(U4(ddsd2).ddpfPixelFormat.dwFlags == DDPF_FOURCC, "Pixel format flags: %08x\n", U4(ddsd2).ddpfPixelFormat.dwFlags); - ok(U1(U4(ddsd2).ddpfPixelFormat).dwRGBBitCount == 0, "RGB bitcount: %08x\n", U1(U4(ddsd2).ddpfPixelFormat).dwRGBBitCount); + "Surface desc flags: %08lx\n", ddsd2.dwFlags); + ok(U4(ddsd2).ddpfPixelFormat.dwFlags == DDPF_FOURCC, "Pixel format flags: %08lx\n", U4(ddsd2).ddpfPixelFormat.dwFlags); + ok(U1(U4(ddsd2).ddpfPixelFormat).dwRGBBitCount == 0, "RGB bitcount: %08lx\n", U1(U4(ddsd2).ddpfPixelFormat).dwRGBBitCount); ok(ddsd2.ddsCaps.dwCaps == (DDSCAPS_TEXTURE | DDSCAPS_SYSTEMMEMORY), - "Surface caps flags: %08x\n", ddsd2.ddsCaps.dwCaps); - ok(U1(ddsd2).dwLinearSize == 16384, "Linear size is %d\n", U1(ddsd2).dwLinearSize); + "Surface caps flags: %08lx\n", ddsd2.ddsCaps.dwCaps); + ok(U1(ddsd2).dwLinearSize == 16384, "Linear size is %ld\n", U1(ddsd2).dwLinearSize); IDirectDrawSurface7_Release(surface);
U4(ddsd).ddpfPixelFormat.dwFourCC = MAKEFOURCC('D','X','T','5'); hr = IDirectDraw7_CreateSurface(dd7, &ddsd, &surface, NULL); - ok(hr == DD_OK, "CreateSurface returned %08x\n", hr); + ok(hr == DD_OK, "CreateSurface returned %08lx\n", hr);
memset(&ddsd2, 0, sizeof(ddsd2)); ddsd2.dwSize = sizeof(ddsd2); U4(ddsd2).ddpfPixelFormat.dwSize = sizeof(U4(ddsd2).ddpfPixelFormat); hr = IDirectDrawSurface7_GetSurfaceDesc(surface, &ddsd2); - ok(hr == DD_OK, "GetSurfaceDesc returned %08x\n", hr); + ok(hr == DD_OK, "GetSurfaceDesc returned %08lx\n", hr);
ok(ddsd2.dwFlags == (DDSD_PIXELFORMAT | DDSD_WIDTH | DDSD_HEIGHT | DDSD_CAPS | DDSD_LINEARSIZE), - "Surface desc flags: %08x\n", ddsd2.dwFlags); - ok(U4(ddsd2).ddpfPixelFormat.dwFlags == DDPF_FOURCC, "Pixel format flags: %08x\n", U4(ddsd2).ddpfPixelFormat.dwFlags); - ok(U1(U4(ddsd2).ddpfPixelFormat).dwRGBBitCount == 0, "RGB bitcount: %08x\n", U1(U4(ddsd2).ddpfPixelFormat).dwRGBBitCount); + "Surface desc flags: %08lx\n", ddsd2.dwFlags); + ok(U4(ddsd2).ddpfPixelFormat.dwFlags == DDPF_FOURCC, "Pixel format flags: %08lx\n", U4(ddsd2).ddpfPixelFormat.dwFlags); + ok(U1(U4(ddsd2).ddpfPixelFormat).dwRGBBitCount == 0, "RGB bitcount: %08lx\n", U1(U4(ddsd2).ddpfPixelFormat).dwRGBBitCount); ok(ddsd2.ddsCaps.dwCaps == (DDSCAPS_TEXTURE | DDSCAPS_SYSTEMMEMORY), - "Surface caps flags: %08x\n", ddsd2.ddsCaps.dwCaps); - ok(U1(ddsd2).dwLinearSize == 16384, "Linear size is %d\n", U1(ddsd2).dwLinearSize); + "Surface caps flags: %08lx\n", ddsd2.ddsCaps.dwCaps); + ok(U1(ddsd2).dwLinearSize == 16384, "Linear size is %ld\n", U1(ddsd2).dwLinearSize); ok(ddsd2.lpSurface == 0, "Surface memory is at %p, expected NULL\n", ddsd2.lpSurface);
memset(&ddsd2, 0, sizeof(ddsd2)); @@ -991,51 +991,51 @@ static void CompressedTest(void) * about this is that DDSD_LPSURFACE isn't set. */ hr = IDirectDrawSurface7_Lock(surface, NULL, &ddsd2, DDLOCK_READONLY, 0); - ok(hr == DD_OK, "Lock returned %08x\n", hr); + ok(hr == DD_OK, "Lock returned %08lx\n", hr);
ok(ddsd2.dwFlags == (DDSD_PIXELFORMAT | DDSD_WIDTH | DDSD_HEIGHT | DDSD_CAPS | DDSD_LINEARSIZE), - "Surface desc flags: %08x\n", ddsd2.dwFlags); - ok(U4(ddsd2).ddpfPixelFormat.dwFlags == DDPF_FOURCC, "Pixel format flags: %08x\n", U4(ddsd2).ddpfPixelFormat.dwFlags); - ok(U1(U4(ddsd2).ddpfPixelFormat).dwRGBBitCount == 0, "RGB bitcount: %08x\n", U1(U4(ddsd2).ddpfPixelFormat).dwRGBBitCount); + "Surface desc flags: %08lx\n", ddsd2.dwFlags); + ok(U4(ddsd2).ddpfPixelFormat.dwFlags == DDPF_FOURCC, "Pixel format flags: %08lx\n", U4(ddsd2).ddpfPixelFormat.dwFlags); + ok(U1(U4(ddsd2).ddpfPixelFormat).dwRGBBitCount == 0, "RGB bitcount: %08lx\n", U1(U4(ddsd2).ddpfPixelFormat).dwRGBBitCount); ok(ddsd2.ddsCaps.dwCaps == (DDSCAPS_TEXTURE | DDSCAPS_SYSTEMMEMORY), - "Surface caps flags: %08x\n", ddsd2.ddsCaps.dwCaps); - ok(U1(ddsd2).dwLinearSize == 16384, "Linear size is %d\n", U1(ddsd2).dwLinearSize); + "Surface caps flags: %08lx\n", ddsd2.ddsCaps.dwCaps); + ok(U1(ddsd2).dwLinearSize == 16384, "Linear size is %ld\n", U1(ddsd2).dwLinearSize); ok(ddsd2.lpSurface != 0, "Surface memory is at NULL\n");
hr = IDirectDrawSurface7_Unlock(surface, NULL); - ok(hr == DD_OK, "Unlock returned %08x\n", hr); + ok(hr == DD_OK, "Unlock returned %08lx\n", hr);
/* Now what about a locking rect? */ hr = IDirectDrawSurface7_Lock(surface, &r, &ddsd2, DDLOCK_READONLY, 0); - ok(hr == DD_OK, "Lock returned %08x\n", hr); + ok(hr == DD_OK, "Lock returned %08lx\n", hr);
ok(ddsd2.dwFlags == (DDSD_PIXELFORMAT | DDSD_WIDTH | DDSD_HEIGHT | DDSD_CAPS | DDSD_LINEARSIZE), - "Surface desc flags: %08x\n", ddsd2.dwFlags); - ok(U4(ddsd2).ddpfPixelFormat.dwFlags == DDPF_FOURCC, "Pixel format flags: %08x\n", U4(ddsd2).ddpfPixelFormat.dwFlags); - ok(U1(U4(ddsd2).ddpfPixelFormat).dwRGBBitCount == 0, "RGB bitcount: %08x\n", U1(U4(ddsd2).ddpfPixelFormat).dwRGBBitCount); + "Surface desc flags: %08lx\n", ddsd2.dwFlags); + ok(U4(ddsd2).ddpfPixelFormat.dwFlags == DDPF_FOURCC, "Pixel format flags: %08lx\n", U4(ddsd2).ddpfPixelFormat.dwFlags); + ok(U1(U4(ddsd2).ddpfPixelFormat).dwRGBBitCount == 0, "RGB bitcount: %08lx\n", U1(U4(ddsd2).ddpfPixelFormat).dwRGBBitCount); ok(ddsd2.ddsCaps.dwCaps == (DDSCAPS_TEXTURE | DDSCAPS_SYSTEMMEMORY), - "Surface caps flags: %08x\n", ddsd2.ddsCaps.dwCaps); - ok(U1(ddsd2).dwLinearSize == 16384, ""Linear" size is %d\n", U1(ddsd2).dwLinearSize); + "Surface caps flags: %08lx\n", ddsd2.ddsCaps.dwCaps); + ok(U1(ddsd2).dwLinearSize == 16384, ""Linear" size is %ld\n", U1(ddsd2).dwLinearSize); ok(ddsd2.lpSurface != 0, "Surface memory is at NULL\n");
hr = IDirectDrawSurface7_Unlock(surface, &r); - ok(hr == DD_OK, "Unlock returned %08x\n", hr); + ok(hr == DD_OK, "Unlock returned %08lx\n", hr);
/* Now what about a different locking offset? */ hr = IDirectDrawSurface7_Lock(surface, &r2, &ddsd2, DDLOCK_READONLY, 0); - ok(hr == DD_OK, "Lock returned %08x\n", hr); + ok(hr == DD_OK, "Lock returned %08lx\n", hr);
ok(ddsd2.dwFlags == (DDSD_PIXELFORMAT | DDSD_WIDTH | DDSD_HEIGHT | DDSD_CAPS | DDSD_LINEARSIZE), - "Surface desc flags: %08x\n", ddsd2.dwFlags); - ok(U4(ddsd2).ddpfPixelFormat.dwFlags == DDPF_FOURCC, "Pixel format flags: %08x\n", U4(ddsd2).ddpfPixelFormat.dwFlags); - ok(U1(U4(ddsd2).ddpfPixelFormat).dwRGBBitCount == 0, "RGB bitcount: %08x\n", U1(U4(ddsd2).ddpfPixelFormat).dwRGBBitCount); + "Surface desc flags: %08lx\n", ddsd2.dwFlags); + ok(U4(ddsd2).ddpfPixelFormat.dwFlags == DDPF_FOURCC, "Pixel format flags: %08lx\n", U4(ddsd2).ddpfPixelFormat.dwFlags); + ok(U1(U4(ddsd2).ddpfPixelFormat).dwRGBBitCount == 0, "RGB bitcount: %08lx\n", U1(U4(ddsd2).ddpfPixelFormat).dwRGBBitCount); ok(ddsd2.ddsCaps.dwCaps == (DDSCAPS_TEXTURE | DDSCAPS_SYSTEMMEMORY), - "Surface caps flags: %08x\n", ddsd2.ddsCaps.dwCaps); - ok(U1(ddsd2).dwLinearSize == 16384, ""Linear" size is %d\n", U1(ddsd2).dwLinearSize); + "Surface caps flags: %08lx\n", ddsd2.ddsCaps.dwCaps); + ok(U1(ddsd2).dwLinearSize == 16384, ""Linear" size is %ld\n", U1(ddsd2).dwLinearSize); ok(ddsd2.lpSurface != 0, "Surface memory is at NULL\n");
hr = IDirectDrawSurface7_Unlock(surface, &r2); - ok(hr == DD_OK, "Unlock returned %08x\n", hr); + ok(hr == DD_OK, "Unlock returned %08lx\n", hr);
IDirectDrawSurface7_Release(surface); } @@ -1061,7 +1061,7 @@ static void SizeTest(void) desc.dwFlags = DDSD_CAPS; desc.ddsCaps.dwCaps |= DDSCAPS_OFFSCREENPLAIN; ret = IDirectDraw_CreateSurface(lpDD, &desc, &dsurface, NULL); - ok(ret == DDERR_INVALIDPARAMS, "Creating an offscreen plain surface without a size info returned %08x (dsurface=%p)\n", ret, dsurface); + ok(ret == DDERR_INVALIDPARAMS, "Creating an offscreen plain surface without a size info returned %08lx (dsurface=%p)\n", ret, dsurface); if(dsurface) { trace("Surface at %p\n", dsurface); @@ -1076,7 +1076,7 @@ static void SizeTest(void) desc.ddsCaps.dwCaps |= DDSCAPS_OFFSCREENPLAIN; desc.dwWidth = 128; ret = IDirectDraw_CreateSurface(lpDD, &desc, &dsurface, NULL); - ok(ret == DDERR_INVALIDPARAMS, "Creating an offscreen plain surface without height info returned %08x\n", ret); + ok(ret == DDERR_INVALIDPARAMS, "Creating an offscreen plain surface without height info returned %08lx\n", ret); if(dsurface) { IDirectDrawSurface_Release(dsurface); @@ -1090,7 +1090,7 @@ static void SizeTest(void) desc.ddsCaps.dwCaps |= DDSCAPS_OFFSCREENPLAIN; desc.dwHeight = 128; ret = IDirectDraw_CreateSurface(lpDD, &desc, &dsurface, NULL); - ok(ret == DDERR_INVALIDPARAMS, "Creating an offscreen plain surface without width info returned %08x\n", ret); + ok(ret == DDERR_INVALIDPARAMS, "Creating an offscreen plain surface without width info returned %08lx\n", ret); if(dsurface) { IDirectDrawSurface_Release(dsurface); @@ -1105,7 +1105,7 @@ static void SizeTest(void) desc.dwWidth = 1; desc.dwHeight = 0; ret = IDirectDraw_CreateSurface(lpDD, &desc, &dsurface, NULL); - ok(ret == DDERR_INVALIDPARAMS, "Creating a 0 height surface returned %#x, expected DDERR_INVALIDPARAMS.\n", ret); + ok(ret == DDERR_INVALIDPARAMS, "Creating a 0 height surface returned %#lx, expected DDERR_INVALIDPARAMS.\n", ret); if (SUCCEEDED(ret)) IDirectDrawSurface_Release(dsurface); dsurface = NULL;
@@ -1117,7 +1117,7 @@ static void SizeTest(void) desc.dwWidth = 0; desc.dwHeight = 1; ret = IDirectDraw_CreateSurface(lpDD, &desc, &dsurface, NULL); - ok(ret == DDERR_INVALIDPARAMS, "Creating a 0 width surface returned %#x, expected DDERR_INVALIDPARAMS.\n", ret); + ok(ret == DDERR_INVALIDPARAMS, "Creating a 0 width surface returned %#lx, expected DDERR_INVALIDPARAMS.\n", ret); if (SUCCEEDED(ret)) IDirectDrawSurface_Release(dsurface); dsurface = NULL;
@@ -1129,7 +1129,7 @@ static void SizeTest(void) desc.dwHeight = 128; desc.dwWidth = 128; ret = IDirectDraw_CreateSurface(lpDD, &desc, &dsurface, NULL); - ok(ret == DD_OK, "Creating an offscreen plain surface with width and height info returned %08x\n", ret); + ok(ret == DD_OK, "Creating an offscreen plain surface with width and height info returned %08lx\n", ret); if(dsurface) { IDirectDrawSurface_Release(dsurface); @@ -1138,7 +1138,7 @@ static void SizeTest(void)
/* Test a primary surface size */ ret = IDirectDraw_SetCooperativeLevel(lpDD, window, DDSCL_NORMAL); - ok(ret == DD_OK, "SetCooperativeLevel failed with %08x\n", ret); + ok(ret == DD_OK, "SetCooperativeLevel failed with %08lx\n", ret);
ZeroMemory(&desc, sizeof(desc)); desc.dwSize = sizeof(desc); @@ -1147,11 +1147,11 @@ static void SizeTest(void) desc.dwHeight = 128; /* Keep them set to check what happens */ desc.dwWidth = 128; /* Keep them set to check what happens */ ret = IDirectDraw_CreateSurface(lpDD, &desc, &dsurface, NULL); - ok(ret == DD_OK, "Creating a primary surface without width and height info returned %08x\n", ret); + ok(ret == DD_OK, "Creating a primary surface without width and height info returned %08lx\n", ret); if(dsurface) { ret = IDirectDrawSurface_GetSurfaceDesc(dsurface, &desc); - ok(ret == DD_OK, "GetSurfaceDesc returned %x\n", ret); + ok(ret == DD_OK, "GetSurfaceDesc returned %lx\n", ret);
IDirectDrawSurface_Release(dsurface); dsurface = NULL; @@ -1162,7 +1162,7 @@ static void SizeTest(void) ok(desc.dwHeight == GetSystemMetrics(SM_CYSCREEN), "Surface height differs from screen height\n"); } ret = IDirectDraw_SetCooperativeLevel(lpDD, NULL, DDSCL_NORMAL); - ok(ret == DD_OK, "SetCooperativeLevel failed with %08x\n", ret); + ok(ret == DD_OK, "SetCooperativeLevel failed with %08lx\n", ret); }
static void BltParamTest(void) @@ -1184,47 +1184,47 @@ static void BltParamTest(void) desc.dwHeight = 128; desc.dwWidth = 128; hr = IDirectDraw_CreateSurface(lpDD, &desc, &surface1, NULL); - ok(hr == DD_OK, "Creating an offscreen plain surface failed with %08x\n", hr); + ok(hr == DD_OK, "Creating an offscreen plain surface failed with %08lx\n", hr);
desc.dwHeight = 64; desc.dwWidth = 64; hr = IDirectDraw_CreateSurface(lpDD, &desc, &surface2, NULL); - ok(hr == DD_OK, "Creating an offscreen plain surface failed with %08x\n", hr); + ok(hr == DD_OK, "Creating an offscreen plain surface failed with %08lx\n", hr);
if(0) { /* This crashes */ hr = IDirectDrawSurface_BltFast(surface1, 0, 0, NULL, NULL, 0); - ok(hr == DD_OK, "BltFast from NULL surface returned %08x\n", hr); + ok(hr == DD_OK, "BltFast from NULL surface returned %08lx\n", hr); } hr = IDirectDrawSurface_BltFast(surface1, 0, 0, surface2, NULL, 0); - ok(hr == DD_OK, "BltFast from smaller to bigger surface returned %08x\n", hr); + ok(hr == DD_OK, "BltFast from smaller to bigger surface returned %08lx\n", hr); hr = IDirectDrawSurface_BltFast(surface2, 0, 0, surface1, NULL, 0); - ok(hr == DDERR_INVALIDRECT, "BltFast from bigger to smaller surface returned %08x\n", hr); + ok(hr == DDERR_INVALIDRECT, "BltFast from bigger to smaller surface returned %08lx\n", hr); hr = IDirectDrawSurface_BltFast(surface2, 0, 0, surface1, &valid, 0); - ok(hr == DD_OK, "BltFast from bigger to smaller surface using a valid rectangle returned %08x\n", hr); + ok(hr == DD_OK, "BltFast from bigger to smaller surface using a valid rectangle returned %08lx\n", hr); hr = IDirectDrawSurface_BltFast(surface2, 60, 60, surface1, &valid, 0); - ok(hr == DDERR_INVALIDRECT, "BltFast with a rectangle resulting in an off-surface write returned %08x\n", hr); + ok(hr == DDERR_INVALIDRECT, "BltFast with a rectangle resulting in an off-surface write returned %08lx\n", hr); hr = IDirectDrawSurface_BltFast(surface1, 90, 90, surface2, NULL, 0); - ok(hr == DDERR_INVALIDRECT, "BltFast with a rectangle resulting in an off-surface write returned %08x\n", hr); + ok(hr == DDERR_INVALIDRECT, "BltFast with a rectangle resulting in an off-surface write returned %08lx\n", hr);
hr = IDirectDrawSurface_BltFast(surface1, -10, 0, surface2, NULL, 0); - ok(hr == DDERR_INVALIDRECT, "BltFast with an offset resulting in an off-surface write returned %08x\n", hr); + ok(hr == DDERR_INVALIDRECT, "BltFast with an offset resulting in an off-surface write returned %08lx\n", hr); hr = IDirectDrawSurface_BltFast(surface1, 0, -10, surface2, NULL, 0); - ok(hr == DDERR_INVALIDRECT, "BltFast with an offset resulting in an off-surface write returned %08x\n", hr); + ok(hr == DDERR_INVALIDRECT, "BltFast with an offset resulting in an off-surface write returned %08lx\n", hr); hr = IDirectDrawSurface_BltFast(surface2, 20, 20, surface1, &valid, 0); - ok(hr == DD_OK, "BltFast from bigger to smaller surface using a valid rectangle and offset returned %08x\n", hr); + ok(hr == DD_OK, "BltFast from bigger to smaller surface using a valid rectangle and offset returned %08lx\n", hr);
hr = IDirectDrawSurface_BltFast(surface2, 0, 0, surface1, &invalid1, 0); - ok(hr == DDERR_INVALIDRECT, "BltFast with invalid rectangle 1 returned %08x\n", hr); + ok(hr == DDERR_INVALIDRECT, "BltFast with invalid rectangle 1 returned %08lx\n", hr); hr = IDirectDrawSurface_BltFast(surface2, 0, 0, surface1, &invalid2, 0); - ok(hr == DDERR_INVALIDRECT, "BltFast with invalid rectangle 2 returned %08x\n", hr); + ok(hr == DDERR_INVALIDRECT, "BltFast with invalid rectangle 2 returned %08lx\n", hr); hr = IDirectDrawSurface_BltFast(surface2, 0, 0, surface1, &invalid3, 0); - ok(hr == DDERR_INVALIDRECT, "BltFast with invalid rectangle 3 returned %08x\n", hr); + ok(hr == DDERR_INVALIDRECT, "BltFast with invalid rectangle 3 returned %08lx\n", hr); hr = IDirectDrawSurface_BltFast(surface1, 0, 0, surface2, &invalid4, 0); - ok(hr == DDERR_INVALIDRECT, "BltFast with invalid rectangle 3 returned %08x\n", hr); + ok(hr == DDERR_INVALIDRECT, "BltFast with invalid rectangle 3 returned %08lx\n", hr); hr = IDirectDrawSurface_BltFast(surface1, 0, 0, surface1, NULL, 0); - ok(hr == DD_OK, "BltFast blitting a surface onto itself returned %08x\n", hr); + ok(hr == DD_OK, "BltFast blitting a surface onto itself returned %08lx\n", hr);
/* Blt(non-fast) tests */ memset(&BltFx, 0, sizeof(BltFx)); @@ -1232,47 +1232,47 @@ static void BltParamTest(void) U5(BltFx).dwFillColor = 0xaabbccdd;
hr = IDirectDrawSurface_Blt(surface1, &valid, NULL, NULL, DDBLT_COLORFILL, &BltFx); - ok(hr == DD_OK, "IDirectDrawSurface_Blt with a valid rectangle for color fill returned %08x\n", hr); + ok(hr == DD_OK, "IDirectDrawSurface_Blt with a valid rectangle for color fill returned %08lx\n", hr); hr = IDirectDrawSurface_Blt(surface1, &valid, NULL, &invalid3, DDBLT_COLORFILL, &BltFx); - ok(hr == DD_OK, "IDirectDrawSurface_Blt with an invalid, unused rectangle returned %08x\n", hr); + ok(hr == DD_OK, "IDirectDrawSurface_Blt with an invalid, unused rectangle returned %08lx\n", hr); hr = IDirectDrawSurface_Blt(surface2, &invalid1, NULL, NULL, DDBLT_COLORFILL, &BltFx); - ok(hr == DDERR_INVALIDRECT, "IDirectDrawSurface_Blt with a with invalid rectangle 1 returned %08x\n", hr); + ok(hr == DDERR_INVALIDRECT, "IDirectDrawSurface_Blt with a with invalid rectangle 1 returned %08lx\n", hr); hr = IDirectDrawSurface_Blt(surface2, &invalid2, NULL, NULL, DDBLT_COLORFILL, &BltFx); - ok(hr == DDERR_INVALIDRECT, "IDirectDrawSurface_Blt with a with invalid rectangle 2 returned %08x\n", hr); + ok(hr == DDERR_INVALIDRECT, "IDirectDrawSurface_Blt with a with invalid rectangle 2 returned %08lx\n", hr); hr = IDirectDrawSurface_Blt(surface2, &invalid3, NULL, NULL, DDBLT_COLORFILL, &BltFx); - ok(hr == DDERR_INVALIDRECT, "IDirectDrawSurface_Blt with a with invalid rectangle 3 returned %08x\n", hr); + ok(hr == DDERR_INVALIDRECT, "IDirectDrawSurface_Blt with a with invalid rectangle 3 returned %08lx\n", hr); hr = IDirectDrawSurface_Blt(surface2, &invalid4, NULL, NULL, DDBLT_COLORFILL, &BltFx); - ok(hr == DDERR_INVALIDRECT, "IDirectDrawSurface_Blt with a with invalid rectangle 4 returned %08x\n", hr); + ok(hr == DDERR_INVALIDRECT, "IDirectDrawSurface_Blt with a with invalid rectangle 4 returned %08lx\n", hr);
/* Valid on surface 1 */ hr = IDirectDrawSurface_Blt(surface1, &invalid4, NULL, NULL, DDBLT_COLORFILL, &BltFx); - ok(hr == DD_OK, "IDirectDrawSurface_Blt with a subrectangle fill returned %08x\n", hr); + ok(hr == DD_OK, "IDirectDrawSurface_Blt with a subrectangle fill returned %08lx\n", hr);
/* Works - stretched blit */ hr = IDirectDrawSurface_Blt(surface1, NULL, surface2, NULL, 0, NULL); - ok(hr == DD_OK, "IDirectDrawSurface_Blt from a smaller to a bigger surface returned %08x\n", hr); + ok(hr == DD_OK, "IDirectDrawSurface_Blt from a smaller to a bigger surface returned %08lx\n", hr); hr = IDirectDrawSurface_Blt(surface2, NULL, surface1, NULL, 0, NULL); - ok(hr == DD_OK, "IDirectDrawSurface_Blt from a bigger to a smaller surface %08x\n", hr); + ok(hr == DD_OK, "IDirectDrawSurface_Blt from a bigger to a smaller surface %08lx\n", hr);
/* Invalid dest rects in sourced blits */ hr = IDirectDrawSurface_Blt(surface2, &invalid1, surface1, NULL, 0, NULL); - ok(hr == DDERR_INVALIDRECT, "IDirectDrawSurface_Blt with a with invalid rectangle 1 returned %08x\n", hr); + ok(hr == DDERR_INVALIDRECT, "IDirectDrawSurface_Blt with a with invalid rectangle 1 returned %08lx\n", hr); hr = IDirectDrawSurface_Blt(surface2, &invalid2, surface1, NULL, 0, NULL); - ok(hr == DDERR_INVALIDRECT, "IDirectDrawSurface_Blt with a with invalid rectangle 2 returned %08x\n", hr); + ok(hr == DDERR_INVALIDRECT, "IDirectDrawSurface_Blt with a with invalid rectangle 2 returned %08lx\n", hr); hr = IDirectDrawSurface_Blt(surface2, &invalid3, surface1, NULL, 0, NULL); - ok(hr == DDERR_INVALIDRECT, "IDirectDrawSurface_Blt with a with invalid rectangle 3 returned %08x\n", hr); + ok(hr == DDERR_INVALIDRECT, "IDirectDrawSurface_Blt with a with invalid rectangle 3 returned %08lx\n", hr); hr = IDirectDrawSurface_Blt(surface2, &invalid4, surface1, NULL, 0, NULL); - ok(hr == DDERR_INVALIDRECT, "IDirectDrawSurface_Blt with a with invalid rectangle 4 returned %08x\n", hr); + ok(hr == DDERR_INVALIDRECT, "IDirectDrawSurface_Blt with a with invalid rectangle 4 returned %08lx\n", hr);
/* Invalid src rects */ hr = IDirectDrawSurface_Blt(surface2, NULL, surface1, &invalid1, 0, NULL); - ok(hr == DDERR_INVALIDRECT, "IDirectDrawSurface_Blt with a with invalid rectangle 1 returned %08x\n", hr); + ok(hr == DDERR_INVALIDRECT, "IDirectDrawSurface_Blt with a with invalid rectangle 1 returned %08lx\n", hr); hr = IDirectDrawSurface_Blt(surface2, NULL, surface1, &invalid2, 0, NULL); - ok(hr == DDERR_INVALIDRECT, "IDirectDrawSurface_Blt with a with invalid rectangle 2 returned %08x\n", hr); + ok(hr == DDERR_INVALIDRECT, "IDirectDrawSurface_Blt with a with invalid rectangle 2 returned %08lx\n", hr); hr = IDirectDrawSurface_Blt(surface2, NULL, surface1, &invalid3, 0, NULL); - ok(hr == DDERR_INVALIDRECT, "IDirectDrawSurface_Blt with a with invalid rectangle 3 returned %08x\n", hr); + ok(hr == DDERR_INVALIDRECT, "IDirectDrawSurface_Blt with a with invalid rectangle 3 returned %08lx\n", hr); hr = IDirectDrawSurface_Blt(surface1, NULL, surface2, &invalid4, 0, NULL); - ok(hr == DDERR_INVALIDRECT, "IDirectDrawSurface_Blt with a with invalid rectangle 4 returned %08x\n", hr); + ok(hr == DDERR_INVALIDRECT, "IDirectDrawSurface_Blt with a with invalid rectangle 4 returned %08lx\n", hr);
IDirectDrawSurface_Release(surface1); IDirectDrawSurface_Release(surface2); @@ -1300,12 +1300,12 @@ static void PaletteTest(void)
/* Create a 8bit palette without DDPCAPS_ALLOW256 set */ hr = IDirectDraw_CreatePalette(lpDD, DDPCAPS_8BIT, Table, &palette, NULL); - ok(hr == DD_OK, "CreatePalette failed with %08x\n", hr); + ok(hr == DD_OK, "CreatePalette failed with %08lx\n", hr); if (FAILED(hr)) goto err; /* Read back the palette and verify the entries. Without DDPCAPS_ALLOW256 set / entry 0 and 255 should have been overwritten with black and white */ hr = IDirectDrawPalette_GetEntries(palette , 0, 0, 256, &palEntries[0]); - ok(hr == DD_OK, "GetEntries failed with %08x\n", hr); + ok(hr == DD_OK, "GetEntries failed with %08lx\n", hr); if(hr == DD_OK) { ok((palEntries[0].peRed == 0) && (palEntries[0].peGreen == 0) && (palEntries[0].peBlue == 0), @@ -1325,9 +1325,9 @@ static void PaletteTest(void) /* CreatePalette without DDPCAPS_ALLOW256 ignores entry 0 and 255, / now check we are able to update the entries afterwards. */ hr = IDirectDrawPalette_SetEntries(palette , 0, 0, 256, &Table[0]); - ok(hr == DD_OK, "SetEntries failed with %08x\n", hr); + ok(hr == DD_OK, "SetEntries failed with %08lx\n", hr); hr = IDirectDrawPalette_GetEntries(palette , 0, 0, 256, &palEntries[0]); - ok(hr == DD_OK, "GetEntries failed with %08x\n", hr); + ok(hr == DD_OK, "GetEntries failed with %08lx\n", hr); if(hr == DD_OK) { ok((palEntries[0].peRed == 0) && (palEntries[0].peGreen == 0) && (palEntries[0].peBlue == 0), @@ -1341,11 +1341,11 @@ static void PaletteTest(void)
/* Create a 8bit palette with DDPCAPS_ALLOW256 set */ hr = IDirectDraw_CreatePalette(lpDD, DDPCAPS_ALLOW256 | DDPCAPS_8BIT, Table, &palette, NULL); - ok(hr == DD_OK, "CreatePalette failed with %08x\n", hr); + ok(hr == DD_OK, "CreatePalette failed with %08lx\n", hr); if (FAILED(hr)) goto err;
hr = IDirectDrawPalette_GetEntries(palette , 0, 0, 256, &palEntries[0]); - ok(hr == DD_OK, "GetEntries failed with %08x\n", hr); + ok(hr == DD_OK, "GetEntries failed with %08lx\n", hr); if(hr == DD_OK) { /* All entries should contain red */ @@ -1368,7 +1368,7 @@ static void PaletteTest(void) U3(ddsd.ddpfPixelFormat).dwGBitMask = 0x00FF00; U4(ddsd.ddpfPixelFormat).dwBBitMask = 0x0000FF; hr = IDirectDraw_CreateSurface(lpDD, &ddsd, &lpSurf, NULL); - ok(hr==DD_OK, "CreateSurface returned: %x\n",hr); + ok(hr==DD_OK, "CreateSurface returned: %lx\n",hr); if (FAILED(hr)) { skip("failed to create surface\n"); @@ -1376,13 +1376,13 @@ static void PaletteTest(void) }
hr = IDirectDrawSurface_SetPalette(lpSurf, palette); - ok(hr == DDERR_INVALIDPIXELFORMAT, "CreateSurface returned: %x\n",hr); + ok(hr == DDERR_INVALIDPIXELFORMAT, "CreateSurface returned: %lx\n",hr);
IDirectDrawPalette_Release(palette); palette = NULL;
hr = IDirectDrawSurface_GetPalette(lpSurf, &palette); - ok(hr == DDERR_NOPALETTEATTACHED, "CreateSurface returned: %x\n",hr); + ok(hr == DDERR_NOPALETTEATTACHED, "CreateSurface returned: %lx\n",hr);
err:
@@ -1390,7 +1390,7 @@ static void PaletteTest(void) if (palette) IDirectDrawPalette_Release(palette);
hr = IDirectDraw_CreatePalette(lpDD, DDPCAPS_ALLOW256 | DDPCAPS_8BIT, Table, &palette, NULL); - ok(hr == DD_OK, "CreatePalette failed with %08x\n", hr); + ok(hr == DD_OK, "CreatePalette failed with %08lx\n", hr);
ddsd.dwSize = sizeof(ddsd); ddsd.ddpfPixelFormat.dwSize = sizeof(ddsd.ddpfPixelFormat); @@ -1403,7 +1403,7 @@ static void PaletteTest(void) U1(ddsd.ddpfPixelFormat).dwRGBBitCount = 8;
hr = IDirectDraw_CreateSurface(lpDD, &ddsd, &lpSurf, NULL); - ok(hr==DD_OK, "CreateSurface returned: %x\n",hr); + ok(hr==DD_OK, "CreateSurface returned: %lx\n",hr); if (FAILED(hr)) { skip("failed to create surface\n"); @@ -1412,16 +1412,16 @@ static void PaletteTest(void)
ddscaps.dwCaps = DDSCAPS_BACKBUFFER; hr = IDirectDrawSurface_GetAttachedSurface(lpSurf, &ddscaps, &backbuffer); - ok(hr == DD_OK, "GetAttachedSurface returned: %x\n",hr); + ok(hr == DD_OK, "GetAttachedSurface returned: %lx\n",hr);
hr = IDirectDrawSurface_SetPalette(backbuffer, palette); - ok(hr == DD_OK, "SetPalette returned: %x\n",hr); + ok(hr == DD_OK, "SetPalette returned: %lx\n",hr);
IDirectDrawPalette_Release(palette); palette = NULL;
hr = IDirectDrawSurface_GetPalette(backbuffer, &palette); - ok(hr == DD_OK, "CreateSurface returned: %x\n",hr); + ok(hr == DD_OK, "CreateSurface returned: %lx\n",hr); IDirectDrawPalette_Release(palette);
IDirectDrawSurface_Release(backbuffer); @@ -1497,17 +1497,17 @@ static void SurfaceCapsTest(void) }
hr = IDirectDraw_CreateSurface(lpDD, &create, &surface1, NULL); - ok(hr == DD_OK, "IDirectDraw_CreateSurface failed with %08x\n", hr); + ok(hr == DD_OK, "IDirectDraw_CreateSurface failed with %08lx\n", hr);
if (SUCCEEDED(hr)) { memset(&desc, 0, sizeof(desc)); desc.dwSize = sizeof(DDSURFACEDESC); hr = IDirectDrawSurface_GetSurfaceDesc(surface1, &desc); - ok(hr == DD_OK, "IDirectDrawSurface_GetSurfaceDesc failed with %08x\n", hr); + ok(hr == DD_OK, "IDirectDrawSurface_GetSurfaceDesc failed with %08lx\n", hr);
ok(desc.ddsCaps.dwCaps == expected_caps[i], - "GetSurfaceDesc test %d returned caps %x, expected %x\n", + "GetSurfaceDesc test %d returned caps %lx, expected %lx\n", i, desc.ddsCaps.dwCaps, expected_caps[i]);
IDirectDrawSurface_Release(surface1); @@ -1516,7 +1516,7 @@ static void SurfaceCapsTest(void)
/* Test for differences in ddraw 7 */ hr = IDirectDraw_QueryInterface(lpDD, &IID_IDirectDraw7, (void **) &dd7); - ok(hr == DD_OK, "IDirectDraw_QueryInterface returned %08x\n", hr); + ok(hr == DD_OK, "IDirectDraw_QueryInterface returned %08lx\n", hr); if (FAILED(hr)) { skip("Failed to get IDirectDraw7 interface, skipping tests\n"); @@ -1547,17 +1547,17 @@ static void SurfaceCapsTest(void) }
hr = IDirectDraw7_CreateSurface(dd7, &create2, &surface7, NULL); - ok(hr==DD_OK,"CreateSurface returned: %x\n",hr); + ok(hr==DD_OK,"CreateSurface returned: %lx\n",hr);
if (SUCCEEDED(hr)) { memset(&desc2, 0, sizeof(desc2)); desc2.dwSize = sizeof(DDSURFACEDESC2); hr = IDirectDrawSurface7_GetSurfaceDesc(surface7, &desc2); - ok(hr == DD_OK, "IDirectDrawSurface_GetSurfaceDesc failed with %08x\n", hr); + ok(hr == DD_OK, "IDirectDrawSurface_GetSurfaceDesc failed with %08lx\n", hr);
ok(desc2.ddsCaps.dwCaps == expected_caps[i], - "GetSurfaceDesc test %d returned caps %x, expected %x\n", + "GetSurfaceDesc test %d returned caps %lx, expected %lx\n", i, desc2.ddsCaps.dwCaps, expected_caps[i]);
IDirectDrawSurface7_Release(surface7); @@ -1574,7 +1574,7 @@ static void SurfaceCapsTest(void) create.dwWidth = 64; create.dwHeight = 64; hr = IDirectDraw_CreateSurface(lpDD, &create, &surface1, NULL); - ok(hr == DDERR_INVALIDCAPS, "Creating a SYSMEM | VIDMEM surface returned 0x%08x, expected DDERR_INVALIDCAPS\n", hr); + ok(hr == DDERR_INVALIDCAPS, "Creating a SYSMEM | VIDMEM surface returned 0x%08lx, expected DDERR_INVALIDCAPS\n", hr); if(surface1) IDirectDrawSurface_Release(surface1); }
@@ -1632,40 +1632,40 @@ static void BackBufferCreateSurfaceTest(void) created_ddsd.dwSize = sizeof(DDSURFACEDESC);
hr = IDirectDraw_CreateSurface(lpDD, &ddsd, &surf, NULL); - ok(SUCCEEDED(hr), "IDirectDraw_CreateSurface failed: 0x%08x\n", hr); + ok(SUCCEEDED(hr), "IDirectDraw_CreateSurface failed: 0x%08lx\n", hr); if (surf != NULL) { hr = IDirectDrawSurface_GetSurfaceDesc(surf, &created_ddsd); - ok(SUCCEEDED(hr), "IDirectDraw_GetSurfaceDesc failed: 0x%08x\n", hr); + ok(SUCCEEDED(hr), "IDirectDraw_GetSurfaceDesc failed: 0x%08lx\n", hr); ok(created_ddsd.ddsCaps.dwCaps == expected_caps, - "GetSurfaceDesc returned caps %x, expected %x\n", created_ddsd.ddsCaps.dwCaps, + "GetSurfaceDesc returned caps %lx, expected %lx\n", created_ddsd.ddsCaps.dwCaps, expected_caps); IDirectDrawSurface_Release(surf); }
hr = IDirectDraw_QueryInterface(lpDD, &IID_IDirectDraw2, (void **) &dd2); - ok(SUCCEEDED(hr), "IDirectDraw_QueryInterface failed: 0x%08x\n", hr); + ok(SUCCEEDED(hr), "IDirectDraw_QueryInterface failed: 0x%08lx\n", hr);
hr = IDirectDraw2_CreateSurface(dd2, &ddsd, &surf, NULL); - ok(hr == DDERR_INVALIDCAPS, "IDirectDraw2_CreateSurface didn't return %x08x, but %x08x\n", + ok(hr == DDERR_INVALIDCAPS, "IDirectDraw2_CreateSurface didn't return %lx08x, but %lx08x\n", DDERR_INVALIDCAPS, hr);
IDirectDraw2_Release(dd2);
hr = IDirectDraw_QueryInterface(lpDD, &IID_IDirectDraw4, (void **) &dd4); - ok(SUCCEEDED(hr), "IDirectDraw_QueryInterface failed: 0x%08x\n", hr); + ok(SUCCEEDED(hr), "IDirectDraw_QueryInterface failed: 0x%08lx\n", hr);
hr = IDirectDraw4_CreateSurface(dd4, &ddsd2, &surf4, NULL); - ok(hr == DDERR_INVALIDCAPS, "IDirectDraw4_CreateSurface didn't return %x08x, but %x08x\n", + ok(hr == DDERR_INVALIDCAPS, "IDirectDraw4_CreateSurface didn't return %lx08x, but %lx08x\n", DDERR_INVALIDCAPS, hr);
IDirectDraw4_Release(dd4);
hr = IDirectDraw_QueryInterface(lpDD, &IID_IDirectDraw7, (void **) &dd7); - ok(SUCCEEDED(hr), "IDirectDraw_QueryInterface failed: 0x%08x\n", hr); + ok(SUCCEEDED(hr), "IDirectDraw_QueryInterface failed: 0x%08lx\n", hr);
hr = IDirectDraw7_CreateSurface(dd7, &ddsd2, &surf7, NULL); - ok(hr == DDERR_INVALIDCAPS, "IDirectDraw7_CreateSurface didn't return %x08x, but %x08x\n", + ok(hr == DDERR_INVALIDCAPS, "IDirectDraw7_CreateSurface didn't return %lx08x, but %lx08x\n", DDERR_INVALIDCAPS, hr);
IDirectDraw7_Release(dd7); @@ -1680,7 +1680,7 @@ static void BackBufferAttachmentFlipTest(void) 100, 100, 160, 160, NULL, NULL, NULL, NULL);
hr = IDirectDraw_SetCooperativeLevel(lpDD, window, DDSCL_EXCLUSIVE | DDSCL_FULLSCREEN); - ok(hr == DD_OK, "SetCooperativeLevel returned %08x\n", hr); + ok(hr == DD_OK, "SetCooperativeLevel returned %08lx\n", hr);
/* Perform attachment tests on a back-buffer */ memset(&ddsd, 0, sizeof(ddsd)); @@ -1690,7 +1690,7 @@ static void BackBufferAttachmentFlipTest(void) ddsd.dwWidth = GetSystemMetrics(SM_CXSCREEN); ddsd.dwHeight = GetSystemMetrics(SM_CYSCREEN); hr = IDirectDraw_CreateSurface(lpDD, &ddsd, &surface2, NULL); - ok(SUCCEEDED(hr), "CreateSurface returned: %x\n",hr); + ok(SUCCEEDED(hr), "CreateSurface returned: %lx\n",hr);
if (surface2 != NULL) { @@ -1700,7 +1700,7 @@ static void BackBufferAttachmentFlipTest(void) ddsd.dwFlags = DDSD_CAPS; ddsd.ddsCaps.dwCaps = DDSCAPS_PRIMARYSURFACE; hr = IDirectDraw_CreateSurface(lpDD, &ddsd, &surface1, NULL); - ok(hr==DD_OK,"CreateSurface returned: %x\n",hr); + ok(hr==DD_OK,"CreateSurface returned: %lx\n",hr);
memset(&ddsd, 0, sizeof(ddsd)); ddsd.dwSize = sizeof(ddsd); @@ -1709,7 +1709,7 @@ static void BackBufferAttachmentFlipTest(void) ddsd.dwWidth = GetSystemMetrics(SM_CXSCREEN); ddsd.dwHeight = GetSystemMetrics(SM_CYSCREEN); hr = IDirectDraw_CreateSurface(lpDD, &ddsd, &surface3, NULL); - ok(hr==DD_OK,"CreateSurface returned: %x\n",hr); + ok(hr==DD_OK,"CreateSurface returned: %lx\n",hr);
/* This one has a different size */ memset(&ddsd, 0, sizeof(ddsd)); @@ -1719,63 +1719,63 @@ static void BackBufferAttachmentFlipTest(void) ddsd.dwWidth = 128; ddsd.dwHeight = 128; hr = IDirectDraw_CreateSurface(lpDD, &ddsd, &surface4, NULL); - ok(hr==DD_OK,"CreateSurface returned: %x\n",hr); + ok(hr==DD_OK,"CreateSurface returned: %lx\n",hr);
hr = IDirectDrawSurface_AddAttachedSurface(surface1, surface2); todo_wine ok(hr == DD_OK || broken(hr == DDERR_CANNOTATTACHSURFACE), - "Attaching a back buffer to a front buffer returned %08x\n", hr); + "Attaching a back buffer to a front buffer returned %08lx\n", hr); if(SUCCEEDED(hr)) { /* Try flipping the surfaces */ hr = IDirectDrawSurface_Flip(surface1, NULL, DDFLIP_WAIT); - todo_wine ok(hr == DD_OK, "IDirectDrawSurface_Flip returned 0x%08x\n", hr); + todo_wine ok(hr == DD_OK, "IDirectDrawSurface_Flip returned 0x%08lx\n", hr); hr = IDirectDrawSurface_Flip(surface2, NULL, DDFLIP_WAIT); - todo_wine ok(hr == DDERR_NOTFLIPPABLE, "IDirectDrawSurface_Flip returned 0x%08x\n", hr); + todo_wine ok(hr == DDERR_NOTFLIPPABLE, "IDirectDrawSurface_Flip returned 0x%08lx\n", hr);
/* Try the reverse without detaching first */ hr = IDirectDrawSurface_AddAttachedSurface(surface2, surface1); - ok(hr == DDERR_SURFACEALREADYATTACHED, "Attaching an attached surface to its attachee returned %08x\n", hr); + ok(hr == DDERR_SURFACEALREADYATTACHED, "Attaching an attached surface to its attachee returned %08lx\n", hr); hr = IDirectDrawSurface_DeleteAttachedSurface(surface1, 0, surface2); - ok(hr == DD_OK, "DeleteAttachedSurface failed with %08x\n", hr); + ok(hr == DD_OK, "DeleteAttachedSurface failed with %08lx\n", hr); } hr = IDirectDrawSurface_AddAttachedSurface(surface2, surface1); todo_wine ok(hr == DD_OK || broken(hr == DDERR_CANNOTATTACHSURFACE), - "Attaching a front buffer to a back buffer returned %08x\n", hr); + "Attaching a front buffer to a back buffer returned %08lx\n", hr); if(SUCCEEDED(hr)) { /* Try flipping the surfaces */ hr = IDirectDrawSurface_Flip(surface1, NULL, DDFLIP_WAIT); - todo_wine ok(hr == DD_OK, "IDirectDrawSurface_Flip returned 0x%08x\n", hr); + todo_wine ok(hr == DD_OK, "IDirectDrawSurface_Flip returned 0x%08lx\n", hr); hr = IDirectDrawSurface_Flip(surface2, NULL, DDFLIP_WAIT); - todo_wine ok(hr == DDERR_NOTFLIPPABLE, "IDirectDrawSurface_Flip returned 0x%08x\n", hr); + todo_wine ok(hr == DDERR_NOTFLIPPABLE, "IDirectDrawSurface_Flip returned 0x%08lx\n", hr);
/* Try to detach reversed */ hr = IDirectDrawSurface_DeleteAttachedSurface(surface1, 0, surface2); - ok(hr == DDERR_CANNOTDETACHSURFACE, "DeleteAttachedSurface returned %08x\n", hr); + ok(hr == DDERR_CANNOTDETACHSURFACE, "DeleteAttachedSurface returned %08lx\n", hr); /* Now the proper detach */ hr = IDirectDrawSurface_DeleteAttachedSurface(surface2, 0, surface1); - ok(hr == DD_OK, "DeleteAttachedSurface failed with %08x\n", hr); + ok(hr == DD_OK, "DeleteAttachedSurface failed with %08lx\n", hr); } hr = IDirectDrawSurface_AddAttachedSurface(surface2, surface3); todo_wine ok(hr == DD_OK || broken(hr == DDERR_CANNOTATTACHSURFACE), - "Attaching a back buffer to another back buffer returned %08x\n", hr); + "Attaching a back buffer to another back buffer returned %08lx\n", hr); if(SUCCEEDED(hr)) { /* Try flipping the surfaces */ hr = IDirectDrawSurface_Flip(surface3, NULL, DDFLIP_WAIT); - todo_wine ok(hr == DD_OK, "IDirectDrawSurface_Flip returned 0x%08x\n", hr); + todo_wine ok(hr == DD_OK, "IDirectDrawSurface_Flip returned 0x%08lx\n", hr); hr = IDirectDrawSurface_Flip(surface2, NULL, DDFLIP_WAIT); - todo_wine ok(hr == DDERR_NOTFLIPPABLE, "IDirectDrawSurface_Flip returned 0x%08x\n", hr); + todo_wine ok(hr == DDERR_NOTFLIPPABLE, "IDirectDrawSurface_Flip returned 0x%08lx\n", hr); hr = IDirectDrawSurface_Flip(surface1, NULL, DDFLIP_WAIT); - ok(hr == DDERR_NOTFLIPPABLE, "IDirectDrawSurface_Flip returned 0x%08x\n", hr); + ok(hr == DDERR_NOTFLIPPABLE, "IDirectDrawSurface_Flip returned 0x%08lx\n", hr);
hr = IDirectDrawSurface_DeleteAttachedSurface(surface2, 0, surface3); - ok(hr == DD_OK, "DeleteAttachedSurface failed with %08x\n", hr); + ok(hr == DD_OK, "DeleteAttachedSurface failed with %08lx\n", hr); } hr = IDirectDrawSurface_AddAttachedSurface(surface1, surface4); - ok(hr == DDERR_CANNOTATTACHSURFACE, "Attaching a back buffer to a front buffer of different size returned %08x\n", hr); + ok(hr == DDERR_CANNOTATTACHSURFACE, "Attaching a back buffer to a front buffer of different size returned %08lx\n", hr); hr = IDirectDrawSurface_AddAttachedSurface(surface4, surface1); - ok(hr == DDERR_CANNOTATTACHSURFACE, "Attaching a front buffer to a back buffer of different size returned %08x\n", hr); + ok(hr == DDERR_CANNOTATTACHSURFACE, "Attaching a front buffer to a back buffer of different size returned %08lx\n", hr);
IDirectDrawSurface_Release(surface4); IDirectDrawSurface_Release(surface3); @@ -1784,7 +1784,7 @@ static void BackBufferAttachmentFlipTest(void) }
hr =IDirectDraw_SetCooperativeLevel(lpDD, NULL, DDSCL_NORMAL); - ok(hr == DD_OK, "SetCooperativeLevel returned %08x\n", hr); + ok(hr == DD_OK, "SetCooperativeLevel returned %08lx\n", hr);
DestroyWindow(window); } @@ -1842,96 +1842,96 @@ static void CreateSurfaceBadCapsSizeTest(void) ddsd2_bad4.dwSize = sizeof(DDSURFACEDESC);
hr = IDirectDraw_CreateSurface(lpDD, &ddsd_ok, &surf, NULL); - ok(SUCCEEDED(hr), "IDirectDraw_CreateSurface failed: 0x%08x\n", hr); + ok(SUCCEEDED(hr), "IDirectDraw_CreateSurface failed: 0x%08lx\n", hr); IDirectDrawSurface_Release(surf);
hr = IDirectDraw_CreateSurface(lpDD, &ddsd_bad1, &surf, NULL); - ok(hr == DDERR_INVALIDPARAMS, "IDirectDraw_CreateSurface didn't return 0x%08x, but 0x%08x\n", + ok(hr == DDERR_INVALIDPARAMS, "IDirectDraw_CreateSurface didn't return 0x%08lx, but 0x%08lx\n", DDERR_INVALIDPARAMS, hr); hr = IDirectDraw_CreateSurface(lpDD, &ddsd_bad2, &surf, NULL); - ok(hr == DDERR_INVALIDPARAMS, "IDirectDraw_CreateSurface didn't return 0x%08x, but 0x%08x\n", + ok(hr == DDERR_INVALIDPARAMS, "IDirectDraw_CreateSurface didn't return 0x%08lx, but 0x%08lx\n", DDERR_INVALIDPARAMS, hr); hr = IDirectDraw_CreateSurface(lpDD, &ddsd_bad3, &surf, NULL); - ok(hr == DDERR_INVALIDPARAMS, "IDirectDraw_CreateSurface didn't return 0x%08x, but 0x%08x\n", + ok(hr == DDERR_INVALIDPARAMS, "IDirectDraw_CreateSurface didn't return 0x%08lx, but 0x%08lx\n", DDERR_INVALIDPARAMS, hr); hr = IDirectDraw_CreateSurface(lpDD, &ddsd_bad4, &surf, NULL); - ok(hr == DDERR_INVALIDPARAMS, "IDirectDraw_CreateSurface didn't return 0x%08x, but 0x%08x\n", + ok(hr == DDERR_INVALIDPARAMS, "IDirectDraw_CreateSurface didn't return 0x%08lx, but 0x%08lx\n", DDERR_INVALIDPARAMS, hr); hr = IDirectDraw_CreateSurface(lpDD, NULL, &surf, NULL); - ok(hr == DDERR_INVALIDPARAMS, "IDirectDraw_CreateSurface didn't return 0x%08x, but 0x%08x\n", + ok(hr == DDERR_INVALIDPARAMS, "IDirectDraw_CreateSurface didn't return 0x%08lx, but 0x%08lx\n", DDERR_INVALIDPARAMS, hr);
hr = IDirectDraw_QueryInterface(lpDD, &IID_IDirectDraw2, (void **) &dd2); - ok(SUCCEEDED(hr), "IDirectDraw_QueryInterface failed: 0x%08x\n", hr); + ok(SUCCEEDED(hr), "IDirectDraw_QueryInterface failed: 0x%08lx\n", hr);
hr = IDirectDraw2_CreateSurface(dd2, &ddsd_ok, &surf, NULL); - ok(SUCCEEDED(hr), "IDirectDraw2_CreateSurface failed: 0x%08x\n", hr); + ok(SUCCEEDED(hr), "IDirectDraw2_CreateSurface failed: 0x%08lx\n", hr); IDirectDrawSurface_Release(surf);
hr = IDirectDraw2_CreateSurface(dd2, &ddsd_bad1, &surf, NULL); - ok(hr == DDERR_INVALIDPARAMS, "IDirectDraw2_CreateSurface didn't return 0x%08x, but 0x%08x\n", + ok(hr == DDERR_INVALIDPARAMS, "IDirectDraw2_CreateSurface didn't return 0x%08lx, but 0x%08lx\n", DDERR_INVALIDPARAMS, hr); hr = IDirectDraw2_CreateSurface(dd2, &ddsd_bad2, &surf, NULL); - ok(hr == DDERR_INVALIDPARAMS, "IDirectDraw2_CreateSurface didn't return 0x%08x, but 0x%08x\n", + ok(hr == DDERR_INVALIDPARAMS, "IDirectDraw2_CreateSurface didn't return 0x%08lx, but 0x%08lx\n", DDERR_INVALIDPARAMS, hr); hr = IDirectDraw2_CreateSurface(dd2, &ddsd_bad3, &surf, NULL); - ok(hr == DDERR_INVALIDPARAMS, "IDirectDraw2_CreateSurface didn't return 0x%08x, but 0x%08x\n", + ok(hr == DDERR_INVALIDPARAMS, "IDirectDraw2_CreateSurface didn't return 0x%08lx, but 0x%08lx\n", DDERR_INVALIDPARAMS, hr); hr = IDirectDraw2_CreateSurface(dd2, &ddsd_bad4, &surf, NULL); - ok(hr == DDERR_INVALIDPARAMS, "IDirectDraw2_CreateSurface didn't return 0x%08x, but 0x%08x\n", + ok(hr == DDERR_INVALIDPARAMS, "IDirectDraw2_CreateSurface didn't return 0x%08lx, but 0x%08lx\n", DDERR_INVALIDPARAMS, hr); hr = IDirectDraw2_CreateSurface(dd2, NULL, &surf, NULL); - ok(hr == DDERR_INVALIDPARAMS, "IDirectDraw2_CreateSurface didn't return 0x%08x, but 0x%08x\n", + ok(hr == DDERR_INVALIDPARAMS, "IDirectDraw2_CreateSurface didn't return 0x%08lx, but 0x%08lx\n", DDERR_INVALIDPARAMS, hr);
IDirectDraw2_Release(dd2);
hr = IDirectDraw_QueryInterface(lpDD, &IID_IDirectDraw4, (void **) &dd4); - ok(SUCCEEDED(hr), "IDirectDraw_QueryInterface failed: 0x%08x\n", hr); + ok(SUCCEEDED(hr), "IDirectDraw_QueryInterface failed: 0x%08lx\n", hr);
hr = IDirectDraw4_CreateSurface(dd4, &ddsd2_ok, &surf4, NULL); - ok(SUCCEEDED(hr), "IDirectDraw4_CreateSurface failed: 0x%08x\n", hr); + ok(SUCCEEDED(hr), "IDirectDraw4_CreateSurface failed: 0x%08lx\n", hr); IDirectDrawSurface4_Release(surf4);
hr = IDirectDraw4_CreateSurface(dd4, &ddsd2_bad1, &surf4, NULL); - ok(hr == DDERR_INVALIDPARAMS, "IDirectDraw4_CreateSurface didn't return 0x%08x, but 0x%08x\n", + ok(hr == DDERR_INVALIDPARAMS, "IDirectDraw4_CreateSurface didn't return 0x%08lx, but 0x%08lx\n", DDERR_INVALIDPARAMS, hr); hr = IDirectDraw4_CreateSurface(dd4, &ddsd2_bad2, &surf4, NULL); - ok(hr == DDERR_INVALIDPARAMS, "IDirectDraw4_CreateSurface didn't return 0x%08x, but 0x%08x\n", + ok(hr == DDERR_INVALIDPARAMS, "IDirectDraw4_CreateSurface didn't return 0x%08lx, but 0x%08lx\n", DDERR_INVALIDPARAMS, hr); hr = IDirectDraw4_CreateSurface(dd4, &ddsd2_bad3, &surf4, NULL); - ok(hr == DDERR_INVALIDPARAMS, "IDirectDraw4_CreateSurface didn't return 0x%08x, but 0x%08x\n", + ok(hr == DDERR_INVALIDPARAMS, "IDirectDraw4_CreateSurface didn't return 0x%08lx, but 0x%08lx\n", DDERR_INVALIDPARAMS, hr); hr = IDirectDraw4_CreateSurface(dd4, &ddsd2_bad4, &surf4, NULL); - ok(hr == DDERR_INVALIDPARAMS, "IDirectDraw4_CreateSurface didn't return 0x%08x, but 0x%08x\n", + ok(hr == DDERR_INVALIDPARAMS, "IDirectDraw4_CreateSurface didn't return 0x%08lx, but 0x%08lx\n", DDERR_INVALIDPARAMS, hr); hr = IDirectDraw4_CreateSurface(dd4, NULL, &surf4, NULL); - ok(hr == DDERR_INVALIDPARAMS, "IDirectDraw4_CreateSurface didn't return 0x%08x, but 0x%08x\n", + ok(hr == DDERR_INVALIDPARAMS, "IDirectDraw4_CreateSurface didn't return 0x%08lx, but 0x%08lx\n", DDERR_INVALIDPARAMS, hr);
IDirectDraw4_Release(dd4);
hr = IDirectDraw_QueryInterface(lpDD, &IID_IDirectDraw7, (void **) &dd7); - ok(SUCCEEDED(hr), "IDirectDraw_QueryInterface failed: 0x%08x\n", hr); + ok(SUCCEEDED(hr), "IDirectDraw_QueryInterface failed: 0x%08lx\n", hr);
hr = IDirectDraw7_CreateSurface(dd7, &ddsd2_ok, &surf7, NULL); - ok(SUCCEEDED(hr), "IDirectDraw7_CreateSurface failed: 0x%08x\n", hr); + ok(SUCCEEDED(hr), "IDirectDraw7_CreateSurface failed: 0x%08lx\n", hr); IDirectDrawSurface7_Release(surf7);
hr = IDirectDraw7_CreateSurface(dd7, &ddsd2_bad1, &surf7, NULL); - ok(hr == DDERR_INVALIDPARAMS, "IDirectDraw7_CreateSurface didn't return 0x%08x, but 0x%08x\n", + ok(hr == DDERR_INVALIDPARAMS, "IDirectDraw7_CreateSurface didn't return 0x%08lx, but 0x%08lx\n", DDERR_INVALIDPARAMS, hr); hr = IDirectDraw7_CreateSurface(dd7, &ddsd2_bad2, &surf7, NULL); - ok(hr == DDERR_INVALIDPARAMS, "IDirectDraw7_CreateSurface didn't return 0x%08x, but 0x%08x\n", + ok(hr == DDERR_INVALIDPARAMS, "IDirectDraw7_CreateSurface didn't return 0x%08lx, but 0x%08lx\n", DDERR_INVALIDPARAMS, hr); hr = IDirectDraw7_CreateSurface(dd7, &ddsd2_bad3, &surf7, NULL); - ok(hr == DDERR_INVALIDPARAMS, "IDirectDraw7_CreateSurface didn't return 0x%08x, but 0x%08x\n", + ok(hr == DDERR_INVALIDPARAMS, "IDirectDraw7_CreateSurface didn't return 0x%08lx, but 0x%08lx\n", DDERR_INVALIDPARAMS, hr); hr = IDirectDraw7_CreateSurface(dd7, &ddsd2_bad4, &surf7, NULL); - ok(hr == DDERR_INVALIDPARAMS, "IDirectDraw7_CreateSurface didn't return 0x%08x, but 0x%08x\n", + ok(hr == DDERR_INVALIDPARAMS, "IDirectDraw7_CreateSurface didn't return 0x%08lx, but 0x%08lx\n", DDERR_INVALIDPARAMS, hr); hr = IDirectDraw7_CreateSurface(dd7, NULL, &surf7, NULL); - ok(hr == DDERR_INVALIDPARAMS, "IDirectDraw7_CreateSurface didn't return 0x%08x, but 0x%08x\n", + ok(hr == DDERR_INVALIDPARAMS, "IDirectDraw7_CreateSurface didn't return 0x%08lx, but 0x%08lx\n", DDERR_INVALIDPARAMS, hr);
IDirectDraw7_Release(dd7); @@ -1955,7 +1955,7 @@ static void no_ddsd_caps_test(void) ddsd.dwHeight = 128; ddsd.ddsCaps.dwCaps = DDSCAPS_OFFSCREENPLAIN; hr = IDirectDraw_CreateSurface(lpDD, &ddsd, &surface, NULL); - ok(SUCCEEDED(hr), "IDirectDraw_CreateSurface failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "IDirectDraw_CreateSurface failed, hr %#lx.\n", hr); reset_ddsd(&ddsd); hr = IDirectDrawSurface_GetSurfaceDesc(surface, &ddsd); IDirectDrawSurface_Release(surface); @@ -1965,7 +1965,7 @@ static void no_ddsd_caps_test(void) reset_ddsd(&ddsd); ddsd.ddsCaps.dwCaps = DDSCAPS_PRIMARYSURFACE; hr = IDirectDraw_CreateSurface(lpDD, &ddsd, &surface, NULL); - ok(SUCCEEDED(hr), "IDirectDraw_CreateSurface failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "IDirectDraw_CreateSurface failed, hr %#lx.\n", hr); reset_ddsd(&ddsd); hr = IDirectDrawSurface_GetSurfaceDesc(surface, &ddsd); IDirectDrawSurface_Release(surface); @@ -1978,14 +1978,14 @@ static void no_ddsd_caps_test(void) ddsd.dwHeight = 128; ddsd.ddsCaps.dwCaps = DDSCAPS_VIDEOMEMORY | DDSCAPS_SYSTEMMEMORY; hr = IDirectDraw_CreateSurface(lpDD, &ddsd, &surface, NULL); - ok(hr == DDERR_INVALIDCAPS, "IDirectDraw_CreateSurface returned %#x, expected DDERR_INVALIDCAPS.\n", hr); + ok(hr == DDERR_INVALIDCAPS, "IDirectDraw_CreateSurface returned %#lx, expected DDERR_INVALIDCAPS.\n", hr); }
static void dump_format(const DDPIXELFORMAT *fmt) { - trace("dwFlags %08x, FourCC %08x, dwZBufferBitDepth %u, stencil %u\n", fmt->dwFlags, fmt->dwFourCC, + trace("dwFlags %08lx, FourCC %08lx, dwZBufferBitDepth %lu, stencil %lu\n", fmt->dwFlags, fmt->dwFourCC, U1(*fmt).dwZBufferBitDepth, U2(*fmt).dwStencilBitDepth); - trace("dwZBitMask %08x, dwStencilBitMask %08x, dwRGBZBitMask %08x\n", U3(*fmt).dwZBitMask, + trace("dwZBitMask %08lx, dwStencilBitMask %08lx, dwRGBZBitMask %08lx\n", U3(*fmt).dwZBitMask, U4(*fmt).dwStencilBitMask, U5(*fmt).dwRGBZBitMask); }
@@ -2052,7 +2052,7 @@ static void zbufferbitdepth_test(void) memset(&caps, 0, sizeof(caps)); caps.dwSize = sizeof(caps); hr = IDirectDraw_GetCaps(lpDD, &caps, NULL); - ok(SUCCEEDED(hr), "IDirectDraw_GetCaps failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "IDirectDraw_GetCaps failed, hr %#lx.\n", hr); if (!(caps.ddsCaps.dwCaps & DDSCAPS_ZBUFFER)) { skip("Z buffers not supported, skipping DDSD_ZBUFFERBITDEPTH test\n"); @@ -2071,18 +2071,18 @@ static void zbufferbitdepth_test(void) hr = IDirectDraw_CreateSurface(lpDD, &ddsd, &surface, NULL); if (test_data[i].supported == ZFMT_SUPPORTED_ALWAYS) { - ok(SUCCEEDED(hr), "IDirectDraw_CreateSurface failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "IDirectDraw_CreateSurface failed, hr %#lx.\n", hr); } else if (test_data[i].supported == ZFMT_SUPPORTED_NEVER) { - ok(hr == DDERR_INVALIDPIXELFORMAT, "IDirectDraw_CreateSurface returned %#x, expected %x.\n", + ok(hr == DDERR_INVALIDPIXELFORMAT, "IDirectDraw_CreateSurface returned %#lx, expected %lx.\n", hr, DDERR_INVALIDPIXELFORMAT); } if (!surface) continue;
reset_ddsd(&ddsd); hr = IDirectDrawSurface_GetSurfaceDesc(surface, &ddsd); - ok(SUCCEEDED(hr), "IDirectDrawSurface_GetSurfaceDesc failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "IDirectDrawSurface_GetSurfaceDesc failed, hr %#lx.\n", hr); IDirectDrawSurface_Release(surface);
ok(ddsd.dwFlags & DDSD_ZBUFFERBITDEPTH, "DDSD_ZBUFFERBITDEPTH is not set\n"); @@ -2090,7 +2090,7 @@ static void zbufferbitdepth_test(void) /* Yet the ddpfPixelFormat member contains valid data */ if (memcmp(&ddsd.ddpfPixelFormat, &test_data[i].pf, ddsd.ddpfPixelFormat.dwSize)) { - ok(0, "Unexpected format for depth %u\n", test_data[i].depth); + ok(0, "Unexpected format for depth %lu\n", test_data[i].depth); dump_format(&ddsd.ddpfPixelFormat); } } @@ -2109,17 +2109,17 @@ static void zbufferbitdepth_test(void)
surface = NULL; hr = IDirectDraw_CreateSurface(lpDD, &ddsd, &surface, NULL); - ok(SUCCEEDED(hr), "IDirectDraw_CreateSurface failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "IDirectDraw_CreateSurface failed, hr %#lx.\n", hr); if (!surface) return; reset_ddsd(&ddsd); hr = IDirectDrawSurface_GetSurfaceDesc(surface, &ddsd); - ok(SUCCEEDED(hr), "IDirectDrawSurface_GetSurfaceDesc failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "IDirectDrawSurface_GetSurfaceDesc failed, hr %#lx.\n", hr); IDirectDrawSurface_Release(surface); - ok(U1(ddsd.ddpfPixelFormat).dwZBufferBitDepth == 16, "Expected a 16bpp depth buffer, got %ubpp\n", + ok(U1(ddsd.ddpfPixelFormat).dwZBufferBitDepth == 16, "Expected a 16bpp depth buffer, got %lubpp\n", U1(ddsd.ddpfPixelFormat).dwZBufferBitDepth); ok(ddsd.dwFlags & DDSD_ZBUFFERBITDEPTH, "DDSD_ZBUFFERBITDEPTH is not set\n"); ok(!(ddsd.dwFlags & DDSD_PIXELFORMAT), "DDSD_PIXELFORMAT is set\n"); - ok(U2(ddsd).dwZBufferBitDepth == 16, "Expected dwZBufferBitDepth=16, got %u\n", + ok(U2(ddsd).dwZBufferBitDepth == 16, "Expected dwZBufferBitDepth=16, got %lu\n", U2(ddsd).dwZBufferBitDepth);
/* DDSD_PIXELFORMAT vs invalid ZBUFFERBITDEPTH */ @@ -2135,7 +2135,7 @@ static void zbufferbitdepth_test(void) U3(ddsd.ddpfPixelFormat).dwZBitMask = 0x0000ffff; surface = NULL; hr = IDirectDraw_CreateSurface(lpDD, &ddsd, &surface, NULL); - ok(SUCCEEDED(hr), "IDirectDraw_CreateSurface failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "IDirectDraw_CreateSurface failed, hr %#lx.\n", hr); if (surface) IDirectDrawSurface_Release(surface);
/* Create a PIXELFORMAT-only surface, see if ZBUFFERBITDEPTH is set */ @@ -2150,16 +2150,16 @@ static void zbufferbitdepth_test(void) U3(ddsd.ddpfPixelFormat).dwZBitMask = 0x0000ffff; surface = NULL; hr = IDirectDraw_CreateSurface(lpDD, &ddsd, &surface, NULL); - ok(SUCCEEDED(hr), "IDirectDrawSurface_GetSurfaceDesc failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "IDirectDrawSurface_GetSurfaceDesc failed, hr %#lx.\n", hr); reset_ddsd(&ddsd); hr = IDirectDrawSurface_GetSurfaceDesc(surface, &ddsd); - ok(SUCCEEDED(hr), "IDirectDrawSurface_GetSurfaceDesc failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "IDirectDrawSurface_GetSurfaceDesc failed, hr %#lx.\n", hr); IDirectDrawSurface_Release(surface); - ok(U1(ddsd.ddpfPixelFormat).dwZBufferBitDepth == 16, "Expected a 16bpp depth buffer, got %ubpp\n", + ok(U1(ddsd.ddpfPixelFormat).dwZBufferBitDepth == 16, "Expected a 16bpp depth buffer, got %lubpp\n", U1(ddsd.ddpfPixelFormat).dwZBufferBitDepth); ok(ddsd.dwFlags & DDSD_ZBUFFERBITDEPTH, "DDSD_ZBUFFERBITDEPTH is not set\n"); ok(!(ddsd.dwFlags & DDSD_PIXELFORMAT), "DDSD_PIXELFORMAT is set\n"); - ok(U2(ddsd).dwZBufferBitDepth == 16, "Expected dwZBufferBitDepth=16, got %u\n", + ok(U2(ddsd).dwZBufferBitDepth == 16, "Expected dwZBufferBitDepth=16, got %lu\n", U2(ddsd).dwZBufferBitDepth); }
@@ -2177,17 +2177,17 @@ static void test_ddsd(DDSURFACEDESC *ddsd, BOOL expect_pf, BOOL expect_zd, const skip("Z buffers not supported, skipping Z flag test\n"); return; } - ok(SUCCEEDED(hr), "IDirectDraw_CreateSurface failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "IDirectDraw_CreateSurface failed, hr %#lx.\n", hr); hr = IDirectDrawSurface_QueryInterface(surface, &IID_IDirectDrawSurface7, (void **) &surface7); - ok(SUCCEEDED(hr), "IDirectDrawSurface_QueryInterface failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "IDirectDrawSurface_QueryInterface failed, hr %#lx.\n", hr);
reset_ddsd(&out); hr = IDirectDrawSurface_GetSurfaceDesc(surface, &out); - ok(SUCCEEDED(hr), "IDirectDrawSurface_GetSurfaceDesc failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "IDirectDrawSurface_GetSurfaceDesc failed, hr %#lx.\n", hr); memset(&out2, 0, sizeof(out2)); out2.dwSize = sizeof(out2); hr = IDirectDrawSurface7_GetSurfaceDesc(surface7, &out2); - ok(SUCCEEDED(hr), "IDirectDrawSurface_GetSurfaceDesc failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "IDirectDrawSurface_GetSurfaceDesc failed, hr %#lx.\n", hr);
if (expect_pf) { @@ -2204,20 +2204,20 @@ static void test_ddsd(DDSURFACEDESC *ddsd, BOOL expect_pf, BOOL expect_zd, const if (expect_zd) { ok(out.dwFlags & DDSD_ZBUFFERBITDEPTH, "%s surface: Expected DDSD_ZBUFFERBITDEPTH to be set\n", name); - ok(U2(out).dwZBufferBitDepth == z_bit_depth, "ZBufferBitDepth is %u, expected %u\n", + ok(U2(out).dwZBufferBitDepth == z_bit_depth, "ZBufferBitDepth is %lu, expected %lu\n", U2(out).dwZBufferBitDepth, z_bit_depth); ok(!(out2.dwFlags & DDSD_ZBUFFERBITDEPTH), "%s surface: Did not expect DDSD_ZBUFFERBITDEPTH to be set in DDSURFACEDESC2\n", name); /* dwMipMapCount and dwZBufferBitDepth share the same union */ - ok(U2(out2).dwMipMapCount == 0, "dwMipMapCount is %u, expected 0\n", U2(out2).dwMipMapCount); + ok(U2(out2).dwMipMapCount == 0, "dwMipMapCount is %lu, expected 0\n", U2(out2).dwMipMapCount); } else { ok(!(out.dwFlags & DDSD_ZBUFFERBITDEPTH), "%s surface: Expected DDSD_ZBUFFERBITDEPTH not to be set\n", name); - ok(U2(out).dwZBufferBitDepth == 0, "ZBufferBitDepth is %u, expected 0\n", U2(out).dwZBufferBitDepth); + ok(U2(out).dwZBufferBitDepth == 0, "ZBufferBitDepth is %lu, expected 0\n", U2(out).dwZBufferBitDepth); ok(!(out2.dwFlags & DDSD_ZBUFFERBITDEPTH), "%s surface: Did not expect DDSD_ZBUFFERBITDEPTH to be set in DDSURFACEDESC2\n", name); - ok(U2(out2).dwMipMapCount == 0, "dwMipMapCount is %u, expected 0\n", U2(out2).dwMipMapCount); + ok(U2(out2).dwMipMapCount == 0, "dwMipMapCount is %lu, expected 0\n", U2(out2).dwMipMapCount); }
reset_ddsd(&out); @@ -2225,7 +2225,7 @@ static void test_ddsd(DDSURFACEDESC *ddsd, BOOL expect_pf, BOOL expect_zd, const if (SUCCEEDED(hr)) { hr = IDirectDrawSurface_Unlock(surface, NULL); - ok(SUCCEEDED(hr), "IDirectDrawSurface_GetSurfaceDesc failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "IDirectDrawSurface_GetSurfaceDesc failed, hr %#lx.\n", hr);
/* DDSD_ZBUFFERBITDEPTH is never set on Nvidia, but follows GetSurfaceDesc rules on AMD */ if (!expect_zd) @@ -2245,24 +2245,24 @@ static void test_ddsd(DDSURFACEDESC *ddsd, BOOL expect_pf, BOOL expect_zd, const "Lock %s surface: Expected DDSD_PIXELFORMAT not to be set\n", name); } if (out.dwFlags & DDSD_ZBUFFERBITDEPTH) - ok(U2(out).dwZBufferBitDepth == z_bit_depth, "ZBufferBitDepth is %u, expected %u\n", + ok(U2(out).dwZBufferBitDepth == z_bit_depth, "ZBufferBitDepth is %lu, expected %lu\n", U2(out).dwZBufferBitDepth, z_bit_depth); else - ok(U2(out).dwZBufferBitDepth == 0, "ZBufferBitDepth is %u, expected 0\n", U2(out).dwZBufferBitDepth); + ok(U2(out).dwZBufferBitDepth == 0, "ZBufferBitDepth is %lu, expected 0\n", U2(out).dwZBufferBitDepth); }
hr = IDirectDrawSurface7_Lock(surface7, NULL, &out2, 0, NULL); - ok(SUCCEEDED(hr), "IDirectDrawSurface7_Lock failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "IDirectDrawSurface7_Lock failed, hr %#lx.\n", hr); if (SUCCEEDED(hr)) { hr = IDirectDrawSurface7_Unlock(surface7, NULL); - ok(SUCCEEDED(hr), "IDirectDrawSurface7_Unlock failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "IDirectDrawSurface7_Unlock failed, hr %#lx.\n", hr); /* DDSD_PIXELFORMAT is always set, DDSD_ZBUFFERBITDEPTH never */ ok(out2.dwFlags & DDSD_PIXELFORMAT, "Lock %s surface: Expected DDSD_PIXELFORMAT to be set in DDSURFACEDESC2\n", name); ok(!(out2.dwFlags & DDSD_ZBUFFERBITDEPTH), "Lock %s surface: Did not expect DDSD_ZBUFFERBITDEPTH to be set in DDSURFACEDESC2\n", name); - ok(U2(out2).dwMipMapCount == 0, "dwMipMapCount is %u, expected 0\n", U2(out2).dwMipMapCount); + ok(U2(out2).dwMipMapCount == 0, "dwMipMapCount is %lu, expected 0\n", U2(out2).dwMipMapCount); }
IDirectDrawSurface7_Release(surface7); @@ -2278,7 +2278,7 @@ static void pixelformat_flag_test(void) memset(&caps, 0, sizeof(caps)); caps.dwSize = sizeof(caps); hr = IDirectDraw_GetCaps(lpDD, &caps, NULL); - ok(SUCCEEDED(hr), "IDirectDraw_GetCaps failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "IDirectDraw_GetCaps failed, hr %#lx.\n", hr); if (!(caps.ddsCaps.dwCaps & DDSCAPS_ZBUFFER)) { skip("Z buffers not supported, skipping DDSD_PIXELFORMAT test\n"); @@ -2379,7 +2379,7 @@ static void partial_block_lock_test(void) RECT rect;
hr = IDirectDraw_QueryInterface(lpDD, &IID_IDirectDraw7, (void **) &dd7); - ok(SUCCEEDED(hr), "QueryInterface failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "QueryInterface failed, hr %#lx.\n", hr);
for (i = 0; i < sizeof(formats) / sizeof(formats[0]); i++) { @@ -2404,7 +2404,7 @@ static void partial_block_lock_test(void) U4(ddsd).ddpfPixelFormat.dwFlags = DDPF_FOURCC; U4(ddsd).ddpfPixelFormat.dwFourCC = formats[i].fourcc; hr = IDirectDraw7_CreateSurface(dd7, &ddsd, &surface, NULL); - ok(SUCCEEDED(hr), "CreateSurface failed, hr %#x, format %s, pool %s\n", + ok(SUCCEEDED(hr), "CreateSurface failed, hr %#lx, format %s, pool %s\n", hr, formats[i].name, pools[j].name);
/* All Windows versions allow partial block locks with DDSCAPS_SYSTEMMEMORY and @@ -2424,7 +2424,7 @@ static void partial_block_lock_test(void) if (SUCCEEDED(hr)) { hr = IDirectDrawSurface7_Unlock(surface, NULL); - ok(SUCCEEDED(hr), "Unlock failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Unlock failed, hr %#lx.\n", hr); }
SetRect(&rect, 0, 0, formats[i].block_width >> 1, formats[i].block_height); @@ -2436,7 +2436,7 @@ static void partial_block_lock_test(void) if (SUCCEEDED(hr)) { hr = IDirectDrawSurface7_Unlock(surface, NULL); - ok(SUCCEEDED(hr), "Unlock failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Unlock failed, hr %#lx.\n", hr); } }
@@ -2451,7 +2451,7 @@ static void partial_block_lock_test(void) if (SUCCEEDED(hr)) { hr = IDirectDrawSurface7_Unlock(surface, NULL); - ok(SUCCEEDED(hr), "Unlock failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Unlock failed, hr %#lx.\n", hr); }
SetRect(&rect, 0, 0, formats[i].block_width, formats[i].block_height >> 1); @@ -2463,18 +2463,18 @@ static void partial_block_lock_test(void) if (SUCCEEDED(hr)) { hr = IDirectDrawSurface7_Unlock(surface, NULL); - ok(SUCCEEDED(hr), "Unlock failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Unlock failed, hr %#lx.\n", hr); } }
SetRect(&rect, 0, 0, formats[i].block_width, formats[i].block_height); hr = IDirectDrawSurface7_Lock(surface, &rect, &ddsd, 0, NULL); - ok(SUCCEEDED(hr), "Full block lock returned %08x, expected %08x, format %s, pool %s\n", + ok(SUCCEEDED(hr), "Full block lock returned %08lx, expected %08lx, format %s, pool %s\n", hr, DD_OK, formats[i].name, pools[j].name); if (SUCCEEDED(hr)) { hr = IDirectDrawSurface7_Unlock(surface, NULL); - ok(SUCCEEDED(hr), "Unlock failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Unlock failed, hr %#lx.\n", hr); }
IDirectDrawSurface7_Release(surface); @@ -2514,7 +2514,7 @@ START_TEST(dsurface) ret = IDirectDraw_GetCaps(lpDD, &ddcaps, NULL); if (ret != DD_OK) { - skip("IDirectDraw_GetCaps failed with %08x\n", ret); + skip("IDirectDraw_GetCaps failed with %08lx\n", ret); return; }
diff --git a/dlls/ddraw/tests/refcount.c b/dlls/ddraw/tests/refcount.c index 07673ab66e9..ce04f406bf1 100644 --- a/dlls/ddraw/tests/refcount.c +++ b/dlls/ddraw/tests/refcount.c @@ -55,7 +55,7 @@ static void test_ddraw_objects(void) DDSURFACEDESC2 ddsd;
hr = pDirectDrawCreateEx(NULL, (void **) &DDraw7, &IID_IDirectDraw7, NULL); - ok(hr == DD_OK || hr==DDERR_NODIRECTDRAWSUPPORT, "DirectDrawCreateEx returned: %x\n", hr); + ok(hr == DD_OK || hr==DDERR_NODIRECTDRAWSUPPORT, "DirectDrawCreateEx returned: %lx\n", hr); if(!DDraw7) { trace("Couldn't create DDraw interface, skipping tests\n"); @@ -63,25 +63,25 @@ static void test_ddraw_objects(void) }
hr = IDirectDraw7_QueryInterface(DDraw7, &IID_IDirectDraw4, (void **) &DDraw4); - ok(hr == DD_OK, "IDirectDraw7_QueryInterface returned %08x\n", hr); + ok(hr == DD_OK, "IDirectDraw7_QueryInterface returned %08lx\n", hr); hr = IDirectDraw7_QueryInterface(DDraw7, &IID_IDirectDraw2, (void **) &DDraw2); - ok(hr == DD_OK, "IDirectDraw7_QueryInterface returned %08x\n", hr); + ok(hr == DD_OK, "IDirectDraw7_QueryInterface returned %08lx\n", hr); hr = IDirectDraw7_QueryInterface(DDraw7, &IID_IDirectDraw, (void **) &DDraw1); - ok(hr == DD_OK, "IDirectDraw7_QueryInterface returned %08x\n", hr); + ok(hr == DD_OK, "IDirectDraw7_QueryInterface returned %08lx\n", hr);
ref = getRefcount( (IUnknown *) DDraw7); - ok(ref == 1, "Got refcount %d, expected 1\n", ref); + ok(ref == 1, "Got refcount %ld, expected 1\n", ref);
/* Fails without a cooplevel */ hr = IDirectDraw7_CreatePalette(DDraw7, DDPCAPS_ALLOW256 | DDPCAPS_8BIT, Table, &palette, NULL); - ok(hr == DDERR_NOCOOPERATIVELEVELSET, "CreatePalette returned %08x\n", hr); + ok(hr == DDERR_NOCOOPERATIVELEVELSET, "CreatePalette returned %08lx\n", hr);
/* This check is before the cooplevel check */ hr = IDirectDraw7_CreatePalette(DDraw7, DDPCAPS_ALLOW256 | DDPCAPS_8BIT, Table, &palette, (void *) 0xdeadbeef); - ok(hr == CLASS_E_NOAGGREGATION, "CreatePalette returned %08x\n", hr); + ok(hr == CLASS_E_NOAGGREGATION, "CreatePalette returned %08lx\n", hr);
hr = IDirectDraw7_SetCooperativeLevel(DDraw7, 0, DDSCL_NORMAL); - ok(hr == DD_OK, "SetCooperativeLevel failed with %08x\n", hr); + ok(hr == DD_OK, "SetCooperativeLevel failed with %08lx\n", hr);
memset(&ddsd, 0, sizeof(ddsd)); ddsd.dwSize = sizeof(ddsd); @@ -96,98 +96,98 @@ static void test_ddraw_objects(void) hr = IDirectDraw7_CreateSurface(DDraw7, &ddsd, &surface, NULL); if (!surface) { - win_skip("Could not create surface : %08x\n", hr); + win_skip("Could not create surface : %08lx\n", hr); IDirectDraw_Release(DDraw1); IDirectDraw2_Release(DDraw2); IDirectDraw4_Release(DDraw4); IDirectDraw7_Release(DDraw7); return; } - ok(hr == DD_OK, "CreateSurface failed with %08x\n", hr); + ok(hr == DD_OK, "CreateSurface failed with %08lx\n", hr);
/* DDraw refcount increased by 1 */ ref = getRefcount( (IUnknown *) DDraw7); - ok(ref == 2, "Got refcount %d, expected 2\n", ref); + ok(ref == 2, "Got refcount %ld, expected 2\n", ref);
/* Surface refcount starts with 1 */ ref = getRefcount( (IUnknown *) surface); - ok(ref == 1, "Got refcount %d, expected 1\n", ref); + ok(ref == 1, "Got refcount %ld, expected 1\n", ref);
hr = IDirectDraw7_CreatePalette(DDraw7, DDPCAPS_ALLOW256 | DDPCAPS_8BIT, Table, &palette, NULL); - ok(hr == DD_OK, "CreatePalette returned %08x\n", hr); + ok(hr == DD_OK, "CreatePalette returned %08lx\n", hr);
/* DDraw refcount increased by 1 */ ref = getRefcount( (IUnknown *) DDraw7); - ok(ref == 3, "Got refcount %d, expected 3\n", ref); + ok(ref == 3, "Got refcount %ld, expected 3\n", ref);
/* Palette starts with 1 */ ref = getRefcount( (IUnknown *) palette); - ok(ref == 1, "Got refcount %d, expected 1\n", ref); + ok(ref == 1, "Got refcount %ld, expected 1\n", ref);
/* Test attaching a palette to a surface */ hr = IDirectDrawSurface7_SetPalette(surface, palette); - ok(hr == DD_OK, "IDirectDrawSurface_SetPalette failed with %08x\n", hr); + ok(hr == DD_OK, "IDirectDrawSurface_SetPalette failed with %08lx\n", hr);
/* Palette refcount increased, surface stays the same */ ref = getRefcount( (IUnknown *) palette); - ok(ref == 2, "Got refcount %d, expected 2\n", ref); + ok(ref == 2, "Got refcount %ld, expected 2\n", ref); ref = getRefcount( (IUnknown *) surface); - ok(ref == 1, "Got refcount %d, expected 1\n", ref); + ok(ref == 1, "Got refcount %ld, expected 1\n", ref);
IDirectDrawSurface7_Release(surface); /* Increased before - decrease now */ ref = getRefcount( (IUnknown *) DDraw7); - ok(ref == 2, "Got refcount %d, expected 2\n", ref); + ok(ref == 2, "Got refcount %ld, expected 2\n", ref);
/* Releasing the surface detaches the palette */ ref = getRefcount( (IUnknown *) palette); - ok(ref == 1, "Got refcount %d, expected 1\n", ref); + ok(ref == 1, "Got refcount %ld, expected 1\n", ref);
IDirectDrawPalette_Release(palette);
/* Increased before - decrease now */ ref = getRefcount( (IUnknown *) DDraw7); - ok(ref == 1, "Got refcount %d, expected 1\n", ref); + ok(ref == 1, "Got refcount %ld, expected 1\n", ref);
/* Not all interfaces are AddRefed when a palette is created */ hr = IDirectDraw4_CreatePalette(DDraw4, DDPCAPS_ALLOW256 | DDPCAPS_8BIT, Table, &palette, NULL); - ok(hr == DD_OK, "CreatePalette returned %08x\n", hr); + ok(hr == DD_OK, "CreatePalette returned %08lx\n", hr); ref = getRefcount( (IUnknown *) DDraw4); - ok(ref == 2, "Got refcount %d, expected 2\n", ref); + ok(ref == 2, "Got refcount %ld, expected 2\n", ref); IDirectDrawPalette_Release(palette);
/* No addref here */ hr = IDirectDraw2_CreatePalette(DDraw2, DDPCAPS_ALLOW256 | DDPCAPS_8BIT, Table, &palette, NULL); - ok(hr == DD_OK, "CreatePalette returned %08x\n", hr); + ok(hr == DD_OK, "CreatePalette returned %08lx\n", hr); ref = getRefcount( (IUnknown *) DDraw2); - ok(ref == 1, "Got refcount %d, expected 1\n", ref); + ok(ref == 1, "Got refcount %ld, expected 1\n", ref); IDirectDrawPalette_Release(palette);
/* No addref here */ hr = IDirectDraw_CreatePalette(DDraw1, DDPCAPS_ALLOW256 | DDPCAPS_8BIT, Table, &palette, NULL); - ok(hr == DD_OK, "CreatePalette returned %08x\n", hr); + ok(hr == DD_OK, "CreatePalette returned %08lx\n", hr); ref = getRefcount( (IUnknown *) DDraw1); - ok(ref == 1, "Got refcount %d, expected 1\n", ref); + ok(ref == 1, "Got refcount %ld, expected 1\n", ref); IDirectDrawPalette_Release(palette);
/* Similar for surfaces */ hr = IDirectDraw4_CreateSurface(DDraw4, &ddsd, &surface4, NULL); - ok(hr == DD_OK, "CreateSurface returned %08x\n", hr); + ok(hr == DD_OK, "CreateSurface returned %08lx\n", hr); ref = getRefcount( (IUnknown *) DDraw4); - ok(ref == 2, "Got refcount %d, expected 2\n", ref); + ok(ref == 2, "Got refcount %ld, expected 2\n", ref); IDirectDrawSurface4_Release(surface4);
ddsd.dwSize = sizeof(DDSURFACEDESC); hr = IDirectDraw2_CreateSurface(DDraw2, (DDSURFACEDESC *) &ddsd, &surface1, NULL); - ok(hr == DD_OK, "CreateSurface returned %08x\n", hr); + ok(hr == DD_OK, "CreateSurface returned %08lx\n", hr); ref = getRefcount( (IUnknown *) DDraw2); - ok(ref == 1, "Got refcount %d, expected 1\n", ref); + ok(ref == 1, "Got refcount %ld, expected 1\n", ref); IDirectDrawSurface_Release(surface1);
hr = IDirectDraw_CreateSurface(DDraw1, (DDSURFACEDESC *) &ddsd, &surface1, NULL); - ok(hr == DD_OK, "CreateSurface returned %08x\n", hr); + ok(hr == DD_OK, "CreateSurface returned %08lx\n", hr); ref = getRefcount( (IUnknown *) DDraw1); - ok(ref == 1, "Got refcount %d, expected 1\n", ref); + ok(ref == 1, "Got refcount %ld, expected 1\n", ref); IDirectDrawSurface_Release(surface1);
IDirectDraw7_Release(DDraw7); @@ -210,7 +210,7 @@ static void test_iface_refcnt(void) long ref;
hr = pDirectDrawCreateEx(NULL, (void **) &DDraw7, &IID_IDirectDraw7, NULL); - ok(hr == DD_OK || hr==DDERR_NODIRECTDRAWSUPPORT, "DirectDrawCreateEx returned: %x\n", hr); + ok(hr == DD_OK || hr==DDERR_NODIRECTDRAWSUPPORT, "DirectDrawCreateEx returned: %lx\n", hr); if(!DDraw7) { trace("Couldn't create DDraw interface, skipping tests\n"); @@ -221,11 +221,11 @@ static void test_iface_refcnt(void) ok(ref == 1, "Initial IDirectDraw7 reference count is %ld\n", ref);
hr = IDirectDraw7_QueryInterface(DDraw7, &IID_IDirectDraw4, (void **) &DDraw4); - ok(hr == DD_OK, "IDirectDraw7_QueryInterface returned %08x\n", hr); + ok(hr == DD_OK, "IDirectDraw7_QueryInterface returned %08lx\n", hr); hr = IDirectDraw7_QueryInterface(DDraw7, &IID_IDirectDraw2, (void **) &DDraw2); - ok(hr == DD_OK, "IDirectDraw7_QueryInterf&ace returned %08x\n", hr); + ok(hr == DD_OK, "IDirectDraw7_QueryInterf&ace returned %08lx\n", hr); hr = IDirectDraw7_QueryInterface(DDraw7, &IID_IDirectDraw, (void **) &DDraw1); - ok(hr == DD_OK, "IDirectDraw7_QueryInterface returned %08x\n", hr); + ok(hr == DD_OK, "IDirectDraw7_QueryInterface returned %08lx\n", hr);
/* All interfaces now have refcount 1! */ ref = getRefcount( (IUnknown *) DDraw7); @@ -241,7 +241,7 @@ static void test_iface_refcnt(void)
hr = IDirectDraw7_QueryInterface(DDraw7, &IID_IDirect3D7, (void **) &D3D7); ok(hr == DD_OK || hr == E_NOINTERFACE, /* win64 */ - "IDirectDraw7_QueryInterface returned %08x\n", hr); + "IDirectDraw7_QueryInterface returned %08lx\n", hr); if (FAILED(hr)) { IDirectDraw7_Release(DDraw7); @@ -272,31 +272,31 @@ static void test_iface_refcnt(void)
/* Can't get older d3d interfaces. WHY????? */ hr = IDirectDraw7_QueryInterface(DDraw7, &IID_IDirect3D3, (void **) &D3D3); - todo_wine ok(hr == E_NOINTERFACE, "IDirectDraw7_QueryInterface returned %08x\n", hr); + todo_wine ok(hr == E_NOINTERFACE, "IDirectDraw7_QueryInterface returned %08lx\n", hr); if(hr == DD_OK && D3D3) IDirect3D3_Release(D3D3);
hr = IDirectDraw4_QueryInterface(DDraw4, &IID_IDirect3D3, (void **) &D3D3); - todo_wine ok(hr == E_NOINTERFACE, "IDirectDraw4_QueryInterface returned %08x\n", hr); + todo_wine ok(hr == E_NOINTERFACE, "IDirectDraw4_QueryInterface returned %08lx\n", hr); if(hr == DD_OK && D3D3) IDirect3D3_Release(D3D3);
hr = IDirectDraw7_QueryInterface(DDraw7, &IID_IDirect3D2, (void **) &D3D2); - todo_wine ok(hr == E_NOINTERFACE, "IDirectDraw7_QueryInterface returned %08x\n", hr); + todo_wine ok(hr == E_NOINTERFACE, "IDirectDraw7_QueryInterface returned %08lx\n", hr); if(hr == DD_OK && D3D2) IDirect3D2_Release(D3D2);
hr = IDirectDraw2_QueryInterface(DDraw2, &IID_IDirect3D2, (void **) &D3D2); - todo_wine ok(hr == E_NOINTERFACE, "IDirectDraw2_QueryInterface returned %08x\n", hr); + todo_wine ok(hr == E_NOINTERFACE, "IDirectDraw2_QueryInterface returned %08lx\n", hr); if(hr == DD_OK && D3D2) IDirect3D2_Release(D3D2);
hr = IDirectDraw7_QueryInterface(DDraw7, &IID_IDirect3D, (void **) &D3D1); - todo_wine ok(hr == E_NOINTERFACE, "IDirectDraw7_QueryInterface returned %08x\n", hr); + todo_wine ok(hr == E_NOINTERFACE, "IDirectDraw7_QueryInterface returned %08lx\n", hr); if(hr == DD_OK && D3D1) IDirect3D_Release(D3D1);
hr = IDirectDraw_QueryInterface(DDraw1, &IID_IDirect3D, (void **) &D3D1); - todo_wine ok(hr == E_NOINTERFACE, "IDirectDraw_QueryInterface returned %08x\n", hr); + todo_wine ok(hr == E_NOINTERFACE, "IDirectDraw_QueryInterface returned %08lx\n", hr); if(hr == DD_OK && D3D1) IDirect3D_Release(D3D1);
hr = IDirect3D7_QueryInterface(D3D7, &IID_IDirect3D, (void **) &D3D1); - todo_wine ok(hr == E_NOINTERFACE, "IDirect3D7_QueryInterface returned %08x\n", hr); + todo_wine ok(hr == E_NOINTERFACE, "IDirect3D7_QueryInterface returned %08lx\n", hr); if(hr == DD_OK && D3D1) IDirect3D_Release(D3D1);
/* Try an AddRef, it only affects the AddRefed interface */ @@ -315,10 +315,10 @@ static void test_iface_refcnt(void)
/* Make sure that they are one object, not different ones */ hr = IDirectDraw4_SetCooperativeLevel(DDraw4, GetDesktopWindow(), DDSCL_EXCLUSIVE | DDSCL_FULLSCREEN); - ok(hr == DD_OK, "IDirectDraw4::SetCooperativeLevel returned %08x\n", hr); + ok(hr == DD_OK, "IDirectDraw4::SetCooperativeLevel returned %08lx\n", hr); /* After an window has been set, DDSCL_SETFOCUSWINDOW should return DDERR_HWNDALREADYSET, see the mode test */ hr = IDirectDraw7_SetCooperativeLevel(DDraw7, NULL, DDSCL_SETFOCUSWINDOW); - ok(hr == DDERR_HWNDALREADYSET, "IDirectDraw7::SetCooperativeLevel returned %08x\n", hr); + ok(hr == DDERR_HWNDALREADYSET, "IDirectDraw7::SetCooperativeLevel returned %08lx\n", hr);
/* All done, release all interfaces */ IDirectDraw7_Release(DDraw7); @@ -341,17 +341,17 @@ static void test_d3d_ifaces(void) long ref;
hr = DirectDrawCreate(NULL, &DDraw1, NULL); - ok(hr == DD_OK || hr==DDERR_NODIRECTDRAWSUPPORT, "DirectDrawCreateEx returned: %x\n", hr); + ok(hr == DD_OK || hr==DDERR_NODIRECTDRAWSUPPORT, "DirectDrawCreateEx returned: %lx\n", hr); if(!DDraw1) { - trace("DirectDrawCreate failed with %08x\n", hr); + trace("DirectDrawCreate failed with %08lx\n", hr); return; }
hr = IDirectDraw_QueryInterface(DDraw1, &IID_IDirectDraw2, (void **) &DDraw2); - ok(hr == DD_OK, "IDirectDraw_QueryInterface returned %08x\n", hr); + ok(hr == DD_OK, "IDirectDraw_QueryInterface returned %08lx\n", hr); hr = IDirectDraw_QueryInterface(DDraw1, &IID_IDirectDraw4, (void **) &DDraw4); - ok(hr == DD_OK, "IDirectDraw_QueryInterface returned %08x\n", hr); + ok(hr == DD_OK, "IDirectDraw_QueryInterface returned %08lx\n", hr);
ref = getRefcount( (IUnknown *) DDraw4); ok(ref == 1, "IDirectDraw4 reference count is %ld\n", ref); @@ -372,7 +372,7 @@ static void test_d3d_ifaces(void) skip( "no IDirect3D support\n" ); return; } - ok(hr == DD_OK, "IDirectDraw_QueryInterface returned %08x\n", hr); + ok(hr == DD_OK, "IDirectDraw_QueryInterface returned %08lx\n", hr); ref = getRefcount( (IUnknown *) DDraw4); ok(ref == 1, "IDirectDraw4 reference count is %ld\n", ref); ref = getRefcount( (IUnknown *) DDraw2); @@ -382,7 +382,7 @@ static void test_d3d_ifaces(void) IDirect3D_Release(D3D1);
hr = IDirectDraw2_QueryInterface(DDraw2, &IID_IDirect3D2, (void **) &D3D2); - ok(hr == DD_OK, "IDirectDraw2_QueryInterface returned %08x\n", hr); + ok(hr == DD_OK, "IDirectDraw2_QueryInterface returned %08lx\n", hr); ref = getRefcount( (IUnknown *) DDraw4); ok(ref == 1, "IDirectDraw4 reference count is %ld\n", ref); ref = getRefcount( (IUnknown *) DDraw2); @@ -392,7 +392,7 @@ static void test_d3d_ifaces(void) IDirect3D2_Release(D3D2);
hr = IDirectDraw4_QueryInterface(DDraw4, &IID_IDirect3D3, (void **) &D3D3); - ok(hr == DD_OK, "IDirectDraw4_QueryInterface returned %08x\n", hr); + ok(hr == DD_OK, "IDirectDraw4_QueryInterface returned %08lx\n", hr); ref = getRefcount( (IUnknown *) DDraw4); ok(ref == 1, "IDirectDraw4 reference count is %ld\n", ref); ref = getRefcount( (IUnknown *) DDraw2); @@ -422,35 +422,35 @@ static void test_d3d_ifaces(void) * Except IDirect3D7, it can only be returned by IDirectDraw7(which can't return older ifaces) */ hr = IDirectDraw2_QueryInterface(DDraw2, &IID_IDirect3D, (void **) &D3D1); - ok(hr == DD_OK, "IDirectDraw2_QueryInterface returned %08x\n", hr); + ok(hr == DD_OK, "IDirectDraw2_QueryInterface returned %08lx\n", hr); IDirect3D_Release(D3D1); hr = IDirectDraw4_QueryInterface(DDraw4, &IID_IDirect3D, (void **) &D3D1); - ok(hr == DD_OK, "IDirectDraw4_QueryInterface returned %08x\n", hr); + ok(hr == DD_OK, "IDirectDraw4_QueryInterface returned %08lx\n", hr); IDirect3D_Release(D3D1);
hr = IDirectDraw_QueryInterface(DDraw1, &IID_IDirect3D2, (void **) &D3D2); - ok(hr == DD_OK, "IDirectDraw_QueryInterface returned %08x\n", hr); + ok(hr == DD_OK, "IDirectDraw_QueryInterface returned %08lx\n", hr); IDirect3D_Release(D3D2); hr = IDirectDraw4_QueryInterface(DDraw4, &IID_IDirect3D2, (void **) &D3D2); - ok(hr == DD_OK, "IDirectDraw4_QueryInterface returned %08x\n", hr); + ok(hr == DD_OK, "IDirectDraw4_QueryInterface returned %08lx\n", hr); IDirect3D_Release(D3D2);
hr = IDirectDraw_QueryInterface(DDraw1, &IID_IDirect3D3, (void **) &D3D3); - ok(hr == DD_OK, "IDirectDraw_QueryInterface returned %08x\n", hr); + ok(hr == DD_OK, "IDirectDraw_QueryInterface returned %08lx\n", hr); IDirect3D_Release(D3D3); hr = IDirectDraw2_QueryInterface(DDraw2, &IID_IDirect3D3, (void **) &D3D3); - ok(hr == DD_OK, "IDirectDraw2_QueryInterface returned %08x\n", hr); + ok(hr == DD_OK, "IDirectDraw2_QueryInterface returned %08lx\n", hr); IDirect3D_Release(D3D3);
/* This does NOT work */ hr = IDirectDraw_QueryInterface(DDraw1, &IID_IDirect3D7, (void **) &D3D7); - todo_wine ok(hr == E_NOINTERFACE, "IDirectDraw_QueryInterface returned %08x\n", hr); + todo_wine ok(hr == E_NOINTERFACE, "IDirectDraw_QueryInterface returned %08lx\n", hr); if(D3D7) IDirect3D_Release(D3D7); hr = IDirectDraw2_QueryInterface(DDraw2, &IID_IDirect3D7, (void **) &D3D7); - todo_wine ok(hr == E_NOINTERFACE, "IDirectDraw2_QueryInterface returned %08x\n", hr); + todo_wine ok(hr == E_NOINTERFACE, "IDirectDraw2_QueryInterface returned %08lx\n", hr); if(D3D7) IDirect3D_Release(D3D7); hr = IDirectDraw4_QueryInterface(DDraw4, &IID_IDirect3D7, (void **) &D3D7); - todo_wine ok(hr == E_NOINTERFACE, "IDirectDraw4_QueryInterface returned %08x\n", hr); + todo_wine ok(hr == E_NOINTERFACE, "IDirectDraw4_QueryInterface returned %08lx\n", hr); if(D3D7) IDirect3D_Release(D3D7);
/* Release the interfaces */ diff --git a/dlls/ddraw/tests/visual.c b/dlls/ddraw/tests/visual.c index 4d6b198e323..9572cd45359 100644 --- a/dlls/ddraw/tests/visual.c +++ b/dlls/ddraw/tests/visual.c @@ -97,7 +97,7 @@ static BOOL createObjects(void) if(!pDirectDrawCreateEx) return FALSE;
hr = pDirectDrawCreateEx(NULL, (void **) &DirectDraw, &IID_IDirectDraw7, NULL); - ok(hr==DD_OK || hr==DDERR_NODIRECTDRAWSUPPORT, "DirectDrawCreateEx returned: %x\n", hr); + ok(hr==DD_OK || hr==DDERR_NODIRECTDRAWSUPPORT, "DirectDrawCreateEx returned: %lx\n", hr); if(!DirectDraw) goto err;
wc.lpfnWndProc = DefWindowProcA; @@ -107,7 +107,7 @@ static BOOL createObjects(void) 0, 0, 640, 480, 0, 0, 0, 0);
hr = IDirectDraw7_SetCooperativeLevel(DirectDraw, window, DDSCL_EXCLUSIVE | DDSCL_FULLSCREEN); - ok(hr == DD_OK, "IDirectDraw7_SetCooperativeLevel failed with %08x\n", hr); + ok(hr == DD_OK, "IDirectDraw7_SetCooperativeLevel failed with %08lx\n", hr); if(FAILED(hr)) goto err; hr = IDirectDraw7_SetDisplayMode(DirectDraw, 640, 480, 32, 0, 0); if(FAILED(hr)) { @@ -115,7 +115,7 @@ static BOOL createObjects(void) hr = IDirectDraw7_SetDisplayMode(DirectDraw, 640, 480, 24, 0, 0);
} - ok(hr == DD_OK || hr == DDERR_UNSUPPORTED, "IDirectDraw7_SetDisplayMode failed with %08x\n", hr); + ok(hr == DD_OK || hr == DDERR_UNSUPPORTED, "IDirectDraw7_SetDisplayMode failed with %08lx\n", hr); if(FAILED(hr)) { /* use trace, the caller calls skip() */ trace("SetDisplayMode failed\n"); @@ -124,7 +124,7 @@ static BOOL createObjects(void)
hr = IDirectDraw7_QueryInterface(DirectDraw, &IID_IDirect3D7, (void**) &Direct3D); if (hr == E_NOINTERFACE) goto err; - ok(hr==DD_OK, "QueryInterface returned: %08x\n", hr); + ok(hr==DD_OK, "QueryInterface returned: %08lx\n", hr);
/* DirectDraw Flipping behavior doesn't seem that well-defined. The reference rasterizer behaves differently * than hardware implementations. Request single buffering, that seems to work everywhere @@ -138,7 +138,7 @@ static BOOL createObjects(void) if(FAILED(hr)) goto err;
hr = IDirect3D7_EnumDevices(Direct3D, enum_devtype_cb, &hal_ok); - ok(SUCCEEDED(hr), "Failed to enumerate devices, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to enumerate devices, hr %#lx.\n", hr); if (hal_ok) devtype = &IID_IDirect3DTnLHalDevice;
memset(&zfmt, 0, sizeof(zfmt)); @@ -154,11 +154,11 @@ static BOOL createObjects(void) ddsd.dwWidth = 640; ddsd.dwHeight = 480; hr = IDirectDraw7_CreateSurface(DirectDraw, &ddsd, &depth_buffer, NULL); - ok(SUCCEEDED(hr), "CreateSurface failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "CreateSurface failed, hr %#lx.\n", hr); if (FAILED(hr)) goto err;
hr = IDirectDrawSurface_AddAttachedSurface(Surface, depth_buffer); - ok(SUCCEEDED(hr), "AddAttachedSurface failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "AddAttachedSurface failed, hr %#lx.\n", hr); if (FAILED(hr)) goto err;
hr = IDirect3D7_CreateDevice(Direct3D, devtype, Surface, &Direct3DDevice); @@ -204,7 +204,7 @@ static DWORD getPixelColor(IDirect3DDevice7 *device, UINT x, UINT y) ddsd.dwHeight = 480; ddsd.ddsCaps.dwCaps = DDSCAPS_OFFSCREENPLAIN | DDSCAPS_SYSTEMMEMORY; hr = IDirectDraw7_CreateSurface(DirectDraw, &ddsd, &surf, NULL); - ok(hr == DD_OK, "IDirectDraw7_CreateSurface failed with %08x\n", hr); + ok(hr == DD_OK, "IDirectDraw7_CreateSurface failed with %08lx\n", hr); if(!surf) { trace("cannot create helper surface\n"); @@ -216,7 +216,7 @@ static DWORD getPixelColor(IDirect3DDevice7 *device, UINT x, UINT y) U4(ddsd).ddpfPixelFormat.dwSize = sizeof(U4(ddsd).ddpfPixelFormat);
hr = IDirectDrawSurface_BltFast(surf, 0, 0, Surface, NULL, 0); - ok(hr == DD_OK, "IDirectDrawSurface7_BltFast returned %08x\n", hr); + ok(hr == DD_OK, "IDirectDrawSurface7_BltFast returned %08lx\n", hr); if(FAILED(hr)) { trace("Cannot blit\n"); @@ -227,7 +227,7 @@ static DWORD getPixelColor(IDirect3DDevice7 *device, UINT x, UINT y) hr = IDirectDrawSurface7_Lock(surf, &rectToLock, &ddsd, DDLOCK_READONLY | DDLOCK_WAIT, NULL); if(FAILED(hr)) { - trace("Can't lock the offscreen surface, hr=%08x\n", hr); + trace("Can't lock the offscreen surface, hr=%08lx\n", hr); ret = 0xdeadbeec; goto out; } @@ -239,7 +239,7 @@ static DWORD getPixelColor(IDirect3DDevice7 *device, UINT x, UINT y) hr = IDirectDrawSurface7_Unlock(surf, NULL); if(FAILED(hr)) { - trace("Can't unlock the offscreen surface, hr=%08x\n", hr); + trace("Can't unlock the offscreen surface, hr=%08lx\n", hr); }
out: @@ -255,18 +255,18 @@ static void set_viewport_size(IDirect3DDevice7 *device) IDirectDrawSurface7 *target;
hr = IDirect3DDevice7_GetRenderTarget(device, &target); - ok(hr == D3D_OK, "IDirect3DDevice7_GetRenderTarget returned %08x\n", hr); + ok(hr == D3D_OK, "IDirect3DDevice7_GetRenderTarget returned %08lx\n", hr);
memset(&ddsd, 0, sizeof(ddsd)); ddsd.dwSize = sizeof(ddsd); hr = IDirectDrawSurface7_GetSurfaceDesc(target, &ddsd); - ok(hr == D3D_OK, "IDirectDrawSurface7_GetSurfaceDesc returned %08x\n", hr); + ok(hr == D3D_OK, "IDirectDrawSurface7_GetSurfaceDesc returned %08lx\n", hr); IDirectDrawSurface7_Release(target);
vp.dwWidth = ddsd.dwWidth; vp.dwHeight = ddsd.dwHeight; hr = IDirect3DDevice7_SetViewport(device, &vp); - ok(hr == D3D_OK, "IDirect3DDevice7_SetViewport returned %08x\n", hr); + ok(hr == D3D_OK, "IDirect3DDevice7_SetViewport returned %08lx\n", hr); return; }
@@ -368,66 +368,66 @@ static void fog_test(IDirect3DDevice7 *device)
memset(&caps, 0, sizeof(caps)); hr = IDirect3DDevice7_GetCaps(device, &caps); - ok(hr == D3D_OK, "IDirect3DDevice7_GetCaps returned %08x\n", hr); + ok(hr == D3D_OK, "IDirect3DDevice7_GetCaps returned %08lx\n", hr); hr = IDirect3DDevice7_Clear(device, 0, NULL, D3DCLEAR_TARGET, 0xffff00ff, 0.0, 0); - ok(hr == D3D_OK, "IDirect3DDevice7_Clear returned %08x\n", hr); + ok(hr == D3D_OK, "IDirect3DDevice7_Clear returned %08lx\n", hr);
hr = IDirect3DDevice7_SetRenderState(device, D3DRENDERSTATE_ZENABLE, FALSE); - ok(SUCCEEDED(hr), "Failed to disable z test, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to disable z test, hr %#lx.\n", hr); hr = IDirect3DDevice7_SetRenderState(device, D3DRENDERSTATE_CULLMODE, D3DCULL_NONE); - ok(SUCCEEDED(hr), "Failed to disable culling, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to disable culling, hr %#lx.\n", hr); hr = IDirect3DDevice7_SetRenderState(device, D3DRENDERSTATE_LIGHTING, FALSE); - ok(hr == D3D_OK, "Turning off lighting returned %08x\n", hr); + ok(hr == D3D_OK, "Turning off lighting returned %08lx\n", hr); hr = IDirect3DDevice7_SetRenderState(device, D3DRENDERSTATE_FOGENABLE, TRUE); - ok(hr == D3D_OK, "Turning on fog calculations returned %08x\n", hr); + ok(hr == D3D_OK, "Turning on fog calculations returned %08lx\n", hr); hr = IDirect3DDevice7_SetRenderState(device, D3DRENDERSTATE_FOGCOLOR, 0xFF00FF00 /* A nice green */); - ok(hr == D3D_OK, "Setting fog color returned %08x\n", hr); + ok(hr == D3D_OK, "Setting fog color returned %08lx\n", hr);
/* First test: Both table fog and vertex fog off */ hr = IDirect3DDevice7_SetRenderState(device, D3DRENDERSTATE_FOGTABLEMODE, D3DFOG_NONE); - ok(hr == D3D_OK, "Turning off table fog returned %08x\n", hr); + ok(hr == D3D_OK, "Turning off table fog returned %08lx\n", hr); hr = IDirect3DDevice7_SetRenderState(device, D3DRENDERSTATE_FOGVERTEXMODE, D3DFOG_NONE); - ok(hr == D3D_OK, "Turning off vertex fog returned %08x\n", hr); + ok(hr == D3D_OK, "Turning off vertex fog returned %08lx\n", hr);
/* Start = 0, end = 1. Should be default, but set them */ hr = IDirect3DDevice7_SetRenderState(device, D3DRENDERSTATE_FOGSTART, *((DWORD *) &start)); - ok(hr == D3D_OK, "Setting fog start returned %08x\n", hr); + ok(hr == D3D_OK, "Setting fog start returned %08lx\n", hr); hr = IDirect3DDevice7_SetRenderState(device, D3DRENDERSTATE_FOGEND, *((DWORD *) &end)); - ok(hr == D3D_OK, "Setting fog end returned %08x\n", hr); + ok(hr == D3D_OK, "Setting fog end returned %08lx\n", hr);
if(IDirect3DDevice7_BeginScene(device) == D3D_OK) { /* Untransformed, vertex fog = NONE, table fog = NONE: Read the fog weighting from the specular color */ hr = IDirect3DDevice7_DrawIndexedPrimitive(device, D3DPT_TRIANGLELIST, D3DFVF_XYZ | D3DFVF_DIFFUSE | D3DFVF_SPECULAR, untransformed_1, 4, Indices, 6, 0); - ok(hr == D3D_OK, "DrawIndexedPrimitive returned %08x\n", hr); + ok(hr == D3D_OK, "DrawIndexedPrimitive returned %08lx\n", hr);
/* That makes it use the Z value */ hr = IDirect3DDevice7_SetRenderState(device, D3DRENDERSTATE_FOGVERTEXMODE, D3DFOG_LINEAR); - ok(hr == D3D_OK, "Setting fog vertex mode to D3DFOG_LINEAR returned %08x\n", hr); + ok(hr == D3D_OK, "Setting fog vertex mode to D3DFOG_LINEAR returned %08lx\n", hr); /* Untransformed, vertex fog != none (or table fog != none): * Use the Z value as input into the equation */ hr = IDirect3DDevice7_DrawIndexedPrimitive(device, D3DPT_TRIANGLELIST, D3DFVF_XYZ | D3DFVF_DIFFUSE | D3DFVF_SPECULAR, untransformed_2, 4, Indices, 6, 0); - ok(hr == D3D_OK, "DrawIndexedPrimitive returned %08x\n", hr); + ok(hr == D3D_OK, "DrawIndexedPrimitive returned %08lx\n", hr);
/* Transformed, vertex fog != NONE, pixel fog == NONE: Use specular color alpha component */ hr = IDirect3DDevice7_DrawIndexedPrimitive(device, D3DPT_TRIANGLELIST, D3DFVF_XYZRHW | D3DFVF_DIFFUSE | D3DFVF_SPECULAR, transformed_1, 4, Indices, 6, 0); - ok(hr == D3D_OK, "DrawIndexedPrimitive returned %08x\n", hr); + ok(hr == D3D_OK, "DrawIndexedPrimitive returned %08lx\n", hr);
hr = IDirect3DDevice7_SetRenderState(device, D3DRENDERSTATE_FOGTABLEMODE, D3DFOG_LINEAR); - ok( hr == D3D_OK, "Setting fog table mode to D3DFOG_LINEAR returned %08x\n", hr); + ok( hr == D3D_OK, "Setting fog table mode to D3DFOG_LINEAR returned %08lx\n", hr); /* Transformed, table fog != none, vertex anything: Use Z value as input to the fog * equation */ hr = IDirect3DDevice7_DrawIndexedPrimitive(device, D3DPT_TRIANGLELIST, D3DFVF_XYZRHW | D3DFVF_DIFFUSE | D3DFVF_SPECULAR, transformed_2, 4, Indices, 6, 0); - ok(hr == D3D_OK, "DrawIndexedPrimitive returned %08x\n", hr); + ok(hr == D3D_OK, "DrawIndexedPrimitive returned %08lx\n", hr);
hr = IDirect3DDevice7_EndScene(device); - ok(hr == D3D_OK, "EndScene returned %08x\n", hr); + ok(hr == D3D_OK, "EndScene returned %08lx\n", hr); } else { @@ -435,15 +435,15 @@ static void fog_test(IDirect3DDevice7 *device) }
color = getPixelColor(device, 160, 360); - ok(color_match(color, 0x00FF0000, 1), "Untransformed vertex with no table or vertex fog has color %08x\n", color); + ok(color_match(color, 0x00FF0000, 1), "Untransformed vertex with no table or vertex fog has color %08lx\n", color); color = getPixelColor(device, 160, 120); - ok(color_match(color, 0x0000FF00, 1), "Untransformed vertex with linear vertex fog has color %08x\n", color); + ok(color_match(color, 0x0000FF00, 1), "Untransformed vertex with linear vertex fog has color %08lx\n", color); color = getPixelColor(device, 480, 120); - ok(color_match(color, 0x00FFFF00, 1), "Transformed vertex with linear vertex fog has color %08x\n", color); + ok(color_match(color, 0x00FFFF00, 1), "Transformed vertex with linear vertex fog has color %08lx\n", color); if(caps.dpcTriCaps.dwRasterCaps & D3DPRASTERCAPS_FOGTABLE) { color = getPixelColor(device, 480, 360); - ok(color_match(color, 0x0000FF00, 1), "Transformed vertex with linear table fog has color %08x\n", color); + ok(color_match(color, 0x0000FF00, 1), "Transformed vertex with linear table fog has color %08lx\n", color); } else { @@ -451,7 +451,7 @@ static void fog_test(IDirect3DDevice7 *device) * The settings above result in no fogging with vertex fog */ color = getPixelColor(device, 480, 120); - ok(color == 0x00FFFF00, "Transformed vertex with linear vertex fog has color %08x\n", color); + ok(color == 0x00FFFF00, "Transformed vertex with linear vertex fog has color %08lx\n", color); trace("Info: Table fog not supported by this device\n"); }
@@ -459,28 +459,28 @@ static void fog_test(IDirect3DDevice7 *device) { /* A simple fog + non-identity world matrix test */ hr = IDirect3DDevice7_SetTransform(device, D3DTRANSFORMSTATE_WORLD, &world_mat1); - ok(hr == D3D_OK, "IDirect3DDevice7_SetTransform returned %#08x\n", hr); + ok(hr == D3D_OK, "IDirect3DDevice7_SetTransform returned %#08lx\n", hr);
hr = IDirect3DDevice7_SetRenderState(device, D3DRENDERSTATE_FOGTABLEMODE, D3DFOG_LINEAR); - ok(hr == D3D_OK, "Setting fog table mode to D3DFOG_LINEAR returned %#08x\n", hr); + ok(hr == D3D_OK, "Setting fog table mode to D3DFOG_LINEAR returned %#08lx\n", hr); hr = IDirect3DDevice7_SetRenderState(device, D3DRENDERSTATE_FOGVERTEXMODE, D3DFOG_NONE); - ok(hr == D3D_OK, "Turning off vertex fog returned %#08x\n", hr); + ok(hr == D3D_OK, "Turning off vertex fog returned %#08lx\n", hr);
hr = IDirect3DDevice7_Clear(device, 0, NULL, D3DCLEAR_TARGET, 0xffff00ff, 0.0, 0); - ok(hr == D3D_OK, "IDirect3DDevice7_Clear returned %#08x\n", hr); + ok(hr == D3D_OK, "IDirect3DDevice7_Clear returned %#08lx\n", hr);
if (IDirect3DDevice7_BeginScene(device) == D3D_OK) { hr = IDirect3DDevice7_DrawIndexedPrimitive(device, D3DPT_TRIANGLELIST, D3DFVF_XYZ | D3DFVF_DIFFUSE | D3DFVF_SPECULAR, far_quad1, 4, Indices, 6, 0); - ok(hr == D3D_OK, "DrawIndexedPrimitive returned %#08x\n", hr); + ok(hr == D3D_OK, "DrawIndexedPrimitive returned %#08lx\n", hr);
hr = IDirect3DDevice7_DrawIndexedPrimitive(device, D3DPT_TRIANGLELIST, D3DFVF_XYZ | D3DFVF_DIFFUSE | D3DFVF_SPECULAR, far_quad2, 4, Indices, 6, 0); - ok(hr == D3D_OK, "DrawIndexedPrimitive returned %#08x\n", hr); + ok(hr == D3D_OK, "DrawIndexedPrimitive returned %#08lx\n", hr);
hr = IDirect3DDevice7_EndScene(device); - ok(hr == D3D_OK, "EndScene returned %#08x\n", hr); + ok(hr == D3D_OK, "EndScene returned %#08lx\n", hr); } else { @@ -488,31 +488,31 @@ static void fog_test(IDirect3DDevice7 *device) }
color = getPixelColor(device, 160, 360); - ok(color_match(color, 0x00ff0000, 4), "Unfogged quad has color %08x\n", color); + ok(color_match(color, 0x00ff0000, 4), "Unfogged quad has color %08lx\n", color); color = getPixelColor(device, 160, 120); - ok(color_match(color, 0x0000ff00, 1), "Fogged out quad has color %08x\n", color); + ok(color_match(color, 0x0000ff00, 1), "Fogged out quad has color %08lx\n", color);
/* Test fog behavior with an orthogonal (but not identity) projection matrix */ hr = IDirect3DDevice7_SetTransform(device, D3DTRANSFORMSTATE_WORLD, &world_mat2); - ok(hr == D3D_OK, "SetTransform returned %#08x\n", hr); + ok(hr == D3D_OK, "SetTransform returned %#08lx\n", hr); hr = IDirect3DDevice7_SetTransform(device, D3DTRANSFORMSTATE_PROJECTION, &proj_mat); - ok(hr == D3D_OK, "SetTransform returned %#08x\n", hr); + ok(hr == D3D_OK, "SetTransform returned %#08lx\n", hr);
hr = IDirect3DDevice7_Clear(device, 0, NULL, D3DCLEAR_TARGET, 0xffff00ff, 0.0, 0); - ok(hr == D3D_OK, "Clear returned %#08x\n", hr); + ok(hr == D3D_OK, "Clear returned %#08lx\n", hr);
if (IDirect3DDevice7_BeginScene(device) == D3D_OK) { hr = IDirect3DDevice7_DrawIndexedPrimitive(device, D3DPT_TRIANGLELIST, D3DFVF_XYZ | D3DFVF_DIFFUSE | D3DFVF_SPECULAR, untransformed_1, 4, Indices, 6, 0); - ok(hr == D3D_OK, "DrawIndexedPrimitiveUP returned %#08x\n", hr); + ok(hr == D3D_OK, "DrawIndexedPrimitiveUP returned %#08lx\n", hr);
hr = IDirect3DDevice7_DrawIndexedPrimitive(device, D3DPT_TRIANGLELIST, D3DFVF_XYZ | D3DFVF_DIFFUSE | D3DFVF_SPECULAR, untransformed_2, 4, Indices, 6, 0); - ok(hr == D3D_OK, "DrawIndexedPrimitiveUP returned %#08x\n", hr); + ok(hr == D3D_OK, "DrawIndexedPrimitiveUP returned %#08lx\n", hr);
hr = IDirect3DDevice7_EndScene(device); - ok(hr == D3D_OK, "EndScene returned %#08x\n", hr); + ok(hr == D3D_OK, "EndScene returned %#08lx\n", hr); } else { @@ -520,14 +520,14 @@ static void fog_test(IDirect3DDevice7 *device) }
color = getPixelColor(device, 160, 360); - ok(color_match(color, 0x00e51900, 4), "Partially fogged quad has color %08x\n", color); + ok(color_match(color, 0x00e51900, 4), "Partially fogged quad has color %08lx\n", color); color = getPixelColor(device, 160, 120); - ok(color_match(color, 0x0000ff00, 1), "Fogged out quad has color %08x\n", color); + ok(color_match(color, 0x0000ff00, 1), "Fogged out quad has color %08lx\n", color);
hr = IDirect3DDevice7_SetTransform(device, D3DTRANSFORMSTATE_WORLD, &ident_mat); - ok(hr == D3D_OK, "SetTransform returned %#08x\n", hr); + ok(hr == D3D_OK, "SetTransform returned %#08lx\n", hr); hr = IDirect3DDevice7_SetTransform(device, D3DTRANSFORMSTATE_PROJECTION, &ident_mat); - ok(hr == D3D_OK, "SetTransform returned %#08x\n", hr); + ok(hr == D3D_OK, "SetTransform returned %#08lx\n", hr); } else { @@ -536,7 +536,7 @@ static void fog_test(IDirect3DDevice7 *device)
/* Turn off the fog master switch to avoid confusing other tests */ hr = IDirect3DDevice7_SetRenderState(device, D3DRENDERSTATE_FOGENABLE, FALSE); - ok(hr == D3D_OK, "Turning off fog calculations returned %08x\n", hr); + ok(hr == D3D_OK, "Turning off fog calculations returned %08lx\n", hr); }
static void offscreen_test(IDirect3DDevice7 *device) @@ -554,7 +554,7 @@ static void offscreen_test(IDirect3DDevice7 *device) };
hr = IDirect3DDevice7_Clear(device, 0, NULL, D3DCLEAR_TARGET, 0xffff0000, 0.0, 0); - ok(hr == D3D_OK, "Clear failed, hr = %08x\n", hr); + ok(hr == D3D_OK, "Clear failed, hr = %08lx\n", hr);
memset(&ddsd, 0, sizeof(ddsd)); ddsd.dwSize = sizeof(ddsd); @@ -564,27 +564,27 @@ static void offscreen_test(IDirect3DDevice7 *device) ddsd.dwHeight = 128; ddsd.ddsCaps.dwCaps = DDSCAPS_TEXTURE | DDSCAPS_3DDEVICE; hr = IDirectDraw7_CreateSurface(DirectDraw, &ddsd, &offscreen, NULL); - ok(hr == D3D_OK, "Creating the offscreen render target failed, hr = %08x\n", hr); + ok(hr == D3D_OK, "Creating the offscreen render target failed, hr = %08lx\n", hr); if(!offscreen) { goto out; }
hr = IDirect3DDevice7_GetRenderTarget(device, &backbuffer); - ok(hr == D3D_OK, "Can't get back buffer, hr = %08x\n", hr); + ok(hr == D3D_OK, "Can't get back buffer, hr = %08lx\n", hr); if(!backbuffer) { goto out; }
hr = IDirect3DDevice7_SetTextureStageState(device, 0, D3DTSS_COLOROP, D3DTOP_SELECTARG1); - ok(hr == D3D_OK, "SetTextureStageState failed, hr = %08x\n", hr); + ok(hr == D3D_OK, "SetTextureStageState failed, hr = %08lx\n", hr); hr = IDirect3DDevice7_SetTextureStageState(device, 0, D3DTSS_COLORARG1, D3DTA_TEXTURE); - ok(hr == D3D_OK, "SetTextureStageState failed, hr = %08x\n", hr); + ok(hr == D3D_OK, "SetTextureStageState failed, hr = %08lx\n", hr); hr = IDirect3DDevice7_SetTextureStageState(device, 0, D3DTSS_MINFILTER, D3DFILTER_NEAREST); - ok(SUCCEEDED(hr), "SetTextureStageState D3DSAMP_MINFILTER failed (0x%08x)\n", hr); + ok(SUCCEEDED(hr), "SetTextureStageState D3DSAMP_MINFILTER failed (0x%08lx)\n", hr); hr = IDirect3DDevice7_SetTextureStageState(device, 0, D3DTSS_MAGFILTER, D3DFILTER_NEAREST); - ok(SUCCEEDED(hr), "SetTextureStageState D3DSAMP_MAGFILTER failed (0x%08x)\n", hr); + ok(SUCCEEDED(hr), "SetTextureStageState D3DSAMP_MAGFILTER failed (0x%08lx)\n", hr); hr = IDirect3DDevice7_SetRenderState(device, D3DRENDERSTATE_LIGHTING, FALSE); - ok(hr == D3D_OK, "IDirect3DDevice7_SetRenderState returned hr = %08x\n", hr); + ok(hr == D3D_OK, "IDirect3DDevice7_SetRenderState returned hr = %08lx\n", hr);
if (refdevice) { win_skip("Tests would crash on W2K with a refdevice\n"); @@ -593,55 +593,55 @@ static void offscreen_test(IDirect3DDevice7 *device)
if(IDirect3DDevice7_BeginScene(device) == D3D_OK) { hr = IDirect3DDevice7_SetRenderTarget(device, offscreen, 0); - ok(hr == D3D_OK, "SetRenderTarget failed, hr = %08x\n", hr); + ok(hr == D3D_OK, "SetRenderTarget failed, hr = %08lx\n", hr); set_viewport_size(device); hr = IDirect3DDevice7_Clear(device, 0, NULL, D3DCLEAR_TARGET, 0xffff00ff, 0.0, 0); - ok(hr == D3D_OK, "Clear failed, hr = %08x\n", hr); + ok(hr == D3D_OK, "Clear failed, hr = %08lx\n", hr);
/* Draw without textures - Should result in a white quad */ hr = IDirect3DDevice7_DrawPrimitive(device, D3DPT_TRIANGLESTRIP, D3DFVF_XYZ | D3DFVF_TEX1, quad, 4, 0); - ok(hr == D3D_OK, "DrawPrimitive failed, hr = %08x\n", hr); + ok(hr == D3D_OK, "DrawPrimitive failed, hr = %08lx\n", hr);
hr = IDirect3DDevice7_SetRenderTarget(device, backbuffer, 0); - ok(hr == D3D_OK, "SetRenderTarget failed, hr = %08x\n", hr); + ok(hr == D3D_OK, "SetRenderTarget failed, hr = %08lx\n", hr); set_viewport_size(device);
hr = IDirect3DDevice7_SetTexture(device, 0, offscreen); - ok(hr == D3D_OK, "SetTexture failed, %08x\n", hr); + ok(hr == D3D_OK, "SetTexture failed, %08lx\n", hr);
/* This time with the texture */ hr = IDirect3DDevice7_DrawPrimitive(device, D3DPT_TRIANGLESTRIP, D3DFVF_XYZ | D3DFVF_TEX1, quad, 4, 0); - ok(hr == D3D_OK, "DrawPrimitive failed, hr = %08x\n", hr); + ok(hr == D3D_OK, "DrawPrimitive failed, hr = %08lx\n", hr);
IDirect3DDevice7_EndScene(device); }
/* Center quad - should be white */ color = getPixelColor(device, 320, 240); - ok(color == 0x00ffffff, "Offscreen failed: Got color 0x%08x, expected 0x00ffffff.\n", color); + ok(color == 0x00ffffff, "Offscreen failed: Got color 0x%08lx, expected 0x00ffffff.\n", color); /* Some quad in the cleared part of the texture */ color = getPixelColor(device, 170, 240); - ok(color == 0x00ff00ff, "Offscreen failed: Got color 0x%08x, expected 0x00ff00ff.\n", color); + ok(color == 0x00ff00ff, "Offscreen failed: Got color 0x%08lx, expected 0x00ff00ff.\n", color); /* Part of the originally cleared back buffer */ color = getPixelColor(device, 10, 10); - ok(color == 0x00ff0000, "Offscreen failed: Got color 0x%08x, expected 0x00ff0000.\n", color); + ok(color == 0x00ff0000, "Offscreen failed: Got color 0x%08lx, expected 0x00ff0000.\n", color); if(0) { /* Lower left corner of the screen, where back buffer offscreen rendering draws the offscreen texture. * It should be red, but the offscreen texture may leave some junk there. Not tested yet. Depending on * the offscreen rendering mode this test would succeed or fail */ color = getPixelColor(device, 10, 470); - ok(color == 0x00ff0000, "Offscreen failed: Got color 0x%08x, expected 0x00ff0000.\n", color); + ok(color == 0x00ff0000, "Offscreen failed: Got color 0x%08lx, expected 0x00ff0000.\n", color); }
out: hr = IDirect3DDevice7_SetTexture(device, 0, NULL); - ok(SUCCEEDED(hr), "IDirect3DDevice7_SetTexture returned %#x.\n", hr); + ok(SUCCEEDED(hr), "IDirect3DDevice7_SetTexture returned %#lx.\n", hr);
/* restore things */ if(backbuffer) { hr = IDirect3DDevice7_SetRenderTarget(device, backbuffer, 0); - ok(SUCCEEDED(hr), "IDirect3DDevice7_SetRenderTarget returned %#x.\n", hr); + ok(SUCCEEDED(hr), "IDirect3DDevice7_SetRenderTarget returned %#lx.\n", hr); IDirectDrawSurface7_Release(backbuffer); } if(offscreen) { @@ -684,7 +684,7 @@ static void test_blend(IDirect3DDevice7 *device)
/* Clear the render target with alpha = 0.5 */ hr = IDirect3DDevice7_Clear(device, 0, NULL, D3DCLEAR_TARGET, 0x80ff0000, 0.0, 0); - ok(hr == D3D_OK, "Clear failed, hr = %08x\n", hr); + ok(hr == D3D_OK, "Clear failed, hr = %08lx\n", hr);
memset(&ddsd, 0, sizeof(ddsd)); ddsd.dwSize = sizeof(ddsd); @@ -699,27 +699,27 @@ static void test_blend(IDirect3DDevice7 *device) U4(U4(ddsd).ddpfPixelFormat).dwBBitMask = 0x000000ff; U5(U4(ddsd).ddpfPixelFormat).dwRGBAlphaBitMask = 0xff000000; hr = IDirectDraw7_CreateSurface(DirectDraw, &ddsd, &offscreen, NULL); - ok(hr == D3D_OK, "Creating the offscreen render target failed, hr = %08x\n", hr); + ok(hr == D3D_OK, "Creating the offscreen render target failed, hr = %08lx\n", hr); if(!offscreen) { goto out; } hr = IDirect3DDevice7_GetRenderTarget(device, &backbuffer); - ok(hr == D3D_OK, "Can't get back buffer, hr = %08x\n", hr); + ok(hr == D3D_OK, "Can't get back buffer, hr = %08lx\n", hr); if(!backbuffer) { goto out; }
hr = IDirect3DDevice7_SetTextureStageState(device, 0, D3DTSS_COLOROP, D3DTOP_SELECTARG1); - ok(hr == D3D_OK, "SetTextureStageState failed, hr = %08x\n", hr); + ok(hr == D3D_OK, "SetTextureStageState failed, hr = %08lx\n", hr); hr = IDirect3DDevice7_SetTextureStageState(device, 0, D3DTSS_COLORARG1, D3DTA_TEXTURE); - ok(hr == D3D_OK, "SetTextureStageState failed, hr = %08x\n", hr); + ok(hr == D3D_OK, "SetTextureStageState failed, hr = %08lx\n", hr); hr = IDirect3DDevice7_SetTextureStageState(device, 0, D3DTSS_MINFILTER, D3DFILTER_NEAREST); - ok(SUCCEEDED(hr), "SetTextureStageState D3DSAMP_MINFILTER failed (0x%08x)\n", hr); + ok(SUCCEEDED(hr), "SetTextureStageState D3DSAMP_MINFILTER failed (0x%08lx)\n", hr); hr = IDirect3DDevice7_SetTextureStageState(device, 0, D3DTSS_MAGFILTER, D3DFILTER_NEAREST); - ok(SUCCEEDED(hr), "SetTextureStageState D3DSAMP_MAGFILTER failed (0x%08x)\n", hr); + ok(SUCCEEDED(hr), "SetTextureStageState D3DSAMP_MAGFILTER failed (0x%08lx)\n", hr);
hr = IDirect3DDevice7_SetRenderState(device, D3DRENDERSTATE_ALPHABLENDENABLE, TRUE); - ok(hr == D3D_OK, "IDirect3DDevice7_SetRenderState failed, hr = %08x\n", hr); + ok(hr == D3D_OK, "IDirect3DDevice7_SetRenderState failed, hr = %08lx\n", hr);
if (refdevice) { win_skip("Tests would crash on W2K with a refdevice\n"); @@ -736,18 +736,18 @@ static void test_blend(IDirect3DDevice7 *device) * They give essentially ZERO and ONE blend factors */ hr = IDirect3DDevice7_SetRenderState(device, D3DRENDERSTATE_SRCBLEND, D3DBLEND_SRCALPHA); - ok(hr == D3D_OK, "IDirect3DDevice7_SetRenderState failed, hr = %08x\n", hr); + ok(hr == D3D_OK, "IDirect3DDevice7_SetRenderState failed, hr = %08lx\n", hr); hr = IDirect3DDevice7_SetRenderState(device, D3DRENDERSTATE_DESTBLEND, D3DBLEND_INVSRCALPHA); - ok(hr == D3D_OK, "IDirect3DDevice7_SetRenderState failed, hr = %08x\n", hr); + ok(hr == D3D_OK, "IDirect3DDevice7_SetRenderState failed, hr = %08lx\n", hr); hr = IDirect3DDevice7_DrawPrimitive(device, D3DPT_TRIANGLESTRIP, D3DFVF_XYZ | D3DFVF_DIFFUSE, quad1, 4, 0); - ok(hr == D3D_OK, "DrawPrimitive failed, hr = %08x\n", hr); + ok(hr == D3D_OK, "DrawPrimitive failed, hr = %08lx\n", hr);
hr = IDirect3DDevice7_SetRenderState(device, D3DRENDERSTATE_SRCBLEND, D3DBLEND_DESTALPHA); - ok(hr == D3D_OK, "IDirect3DDevice7_SetRenderState failed, hr = %08x\n", hr); + ok(hr == D3D_OK, "IDirect3DDevice7_SetRenderState failed, hr = %08lx\n", hr); hr = IDirect3DDevice7_SetRenderState(device, D3DRENDERSTATE_DESTBLEND, D3DBLEND_INVDESTALPHA); - ok(hr == D3D_OK, "IDirect3DDevice7_SetRenderState failed, hr = %08x\n", hr); + ok(hr == D3D_OK, "IDirect3DDevice7_SetRenderState failed, hr = %08lx\n", hr); hr = IDirect3DDevice7_DrawPrimitive(device, D3DPT_TRIANGLESTRIP, D3DFVF_XYZ | D3DFVF_DIFFUSE, quad2, 4, 0); - ok(hr == D3D_OK, "DrawPrimitive failed, hr = %08x\n", hr); + ok(hr == D3D_OK, "DrawPrimitive failed, hr = %08lx\n", hr);
/* Switch to the offscreen buffer, and redo the testing. SRCALPHA and DESTALPHA. The offscreen buffer * has an alpha channel on its own. Clear the offscreen buffer with alpha = 0.5 again, then draw the @@ -756,44 +756,44 @@ static void test_blend(IDirect3DDevice7 *device) * vertices */ hr = IDirect3DDevice7_SetRenderTarget(device, offscreen, 0); - ok(hr == D3D_OK, "IDirect3DDevice7_SetRenderTarget failed, hr = %08x\n", hr); + ok(hr == D3D_OK, "IDirect3DDevice7_SetRenderTarget failed, hr = %08lx\n", hr); set_viewport_size(device); hr = IDirect3DDevice7_Clear(device, 0, NULL, D3DCLEAR_TARGET, 0x80ff0000, 0.0, 0); - ok(hr == D3D_OK, "Clear failed, hr = %08x\n", hr); + ok(hr == D3D_OK, "Clear failed, hr = %08lx\n", hr);
hr = IDirect3DDevice7_SetRenderState(device, D3DRENDERSTATE_SRCBLEND, D3DBLEND_SRCALPHA); - ok(hr == D3D_OK, "IDirect3DDevice7_SetRenderState failed, hr = %08x\n", hr); + ok(hr == D3D_OK, "IDirect3DDevice7_SetRenderState failed, hr = %08lx\n", hr); hr = IDirect3DDevice7_SetRenderState(device, D3DRENDERSTATE_DESTBLEND, D3DBLEND_INVSRCALPHA); - ok(hr == D3D_OK, "IDirect3DDevice7_SetRenderState failed, hr = %08x\n", hr); + ok(hr == D3D_OK, "IDirect3DDevice7_SetRenderState failed, hr = %08lx\n", hr); hr = IDirect3DDevice7_DrawPrimitive(device, D3DPT_TRIANGLESTRIP, D3DFVF_XYZ | D3DFVF_DIFFUSE, quad1, 4, 0); - ok(hr == D3D_OK, "DrawPrimitive failed, hr = %08x\n", hr); + ok(hr == D3D_OK, "DrawPrimitive failed, hr = %08lx\n", hr);
hr = IDirect3DDevice7_SetRenderState(device, D3DRENDERSTATE_SRCBLEND, D3DBLEND_DESTALPHA); - ok(hr == D3D_OK, "IDirect3DDevice7_SetRenderState failed, hr = %08x\n", hr); + ok(hr == D3D_OK, "IDirect3DDevice7_SetRenderState failed, hr = %08lx\n", hr); hr = IDirect3DDevice7_SetRenderState(device, D3DRENDERSTATE_DESTBLEND, D3DBLEND_INVDESTALPHA); - ok(hr == D3D_OK, "IDirect3DDevice7_SetRenderState failed, hr = %08x\n", hr); + ok(hr == D3D_OK, "IDirect3DDevice7_SetRenderState failed, hr = %08lx\n", hr); hr = IDirect3DDevice7_DrawPrimitive(device, D3DPT_TRIANGLESTRIP, D3DFVF_XYZ | D3DFVF_DIFFUSE, quad2, 4, 0); - ok(hr == D3D_OK, "DrawPrimitive failed, hr = %08x\n", hr); + ok(hr == D3D_OK, "DrawPrimitive failed, hr = %08lx\n", hr);
hr = IDirect3DDevice7_SetRenderTarget(device, backbuffer, 0); - ok(hr == D3D_OK, "IDirect3DDevice7_SetRenderTarget failed, hr = %08x\n", hr); + ok(hr == D3D_OK, "IDirect3DDevice7_SetRenderTarget failed, hr = %08lx\n", hr); set_viewport_size(device);
/* Render the offscreen texture onto the frame buffer to be able to compare it regularly. * Disable alpha blending for the final composition */ hr = IDirect3DDevice7_SetRenderState(device, D3DRENDERSTATE_ALPHABLENDENABLE, FALSE); - ok(hr == D3D_OK, "IDirect3DDevice7_SetRenderState failed, hr = %08x\n", hr); + ok(hr == D3D_OK, "IDirect3DDevice7_SetRenderState failed, hr = %08lx\n", hr);
hr = IDirect3DDevice7_SetTexture(device, 0, offscreen); - ok(hr == D3D_OK, "IDirect3DDevice7_SetTexture failed, hr = %08x\n", hr); + ok(hr == D3D_OK, "IDirect3DDevice7_SetTexture failed, hr = %08lx\n", hr); hr = IDirect3DDevice7_DrawPrimitive(device, D3DPT_TRIANGLESTRIP, D3DFVF_XYZ | D3DFVF_TEX1, composite_quad, 4, 0); - ok(hr == D3D_OK, "DrawPrimitive failed, hr = %08x\n", hr); + ok(hr == D3D_OK, "DrawPrimitive failed, hr = %08lx\n", hr); hr = IDirect3DDevice7_SetTexture(device, 0, NULL); - ok(hr == D3D_OK, "IDirect3DDevice7_SetTexture failed, hr = %08x\n", hr); + ok(hr == D3D_OK, "IDirect3DDevice7_SetTexture failed, hr = %08lx\n", hr);
hr = IDirect3DDevice7_EndScene(device); - ok(hr == D3D_OK, "IDirect3DDevice7_EndScene failed, hr = %08x\n", hr); + ok(hr == D3D_OK, "IDirect3DDevice7_EndScene failed, hr = %08lx\n", hr); }
color = getPixelColor(device, 160, 360); @@ -801,28 +801,28 @@ static void test_blend(IDirect3DDevice7 *device) green = (color & 0x0000ff00) >> 8; blue = (color & 0x000000ff); ok(red >= 0xbe && red <= 0xc0 && green >= 0x39 && green <= 0x41 && blue == 0x00, - "SRCALPHA on frame buffer returned color 0x%08x, expected 0x00bf4000\n", color); + "SRCALPHA on frame buffer returned color 0x%08lx, expected 0x00bf4000\n", color);
color = getPixelColor(device, 160, 120); red = (color & 0x00ff0000) >> 16; green = (color & 0x0000ff00) >> 8; blue = (color & 0x000000ff); ok(red == 0x00 && green == 0x00 && blue >= 0xfe && blue <= 0xff , - "DSTALPHA on frame buffer returned color 0x%08x, expected 0x000000ff\n", color); + "DSTALPHA on frame buffer returned color 0x%08lx, expected 0x000000ff\n", color);
color = getPixelColor(device, 480, 360); red = (color & 0x00ff0000) >> 16; green = (color & 0x0000ff00) >> 8; blue = (color & 0x000000ff); ok(red >= 0xbe && red <= 0xc0 && green >= 0x39 && green <= 0x41 && blue == 0x00, - "SRCALPHA on texture returned color 0x%08x, expected 0x00bf4000\n", color); + "SRCALPHA on texture returned color 0x%08lx, expected 0x00bf4000\n", color);
color = getPixelColor(device, 480, 120); red = (color & 0x00ff0000) >> 16; green = (color & 0x0000ff00) >> 8; blue = (color & 0x000000ff); ok(red >= 0x7e && red <= 0x81 && green == 0x00 && blue >= 0x7e && blue <= 0x81, - "DSTALPHA on texture returned color 0x%08x, expected 0x00800080\n", color); + "DSTALPHA on texture returned color 0x%08lx, expected 0x00800080\n", color);
out: if(offscreen) IDirectDrawSurface7_Release(offscreen); @@ -849,26 +849,26 @@ static void rhw_zero_test(IDirect3DDevice7 *device)
/* Clear to black */ hr = IDirect3DDevice7_Clear(device, 0, NULL, D3DCLEAR_TARGET, 0, 0.0, 0); - ok(hr == D3D_OK, "Clear failed, hr = %08x\n", hr); + ok(hr == D3D_OK, "Clear failed, hr = %08lx\n", hr);
hr = IDirect3DDevice7_BeginScene(device); - ok(hr == D3D_OK, "IDirect3DDevice7_BeginScene failed with %08x\n", hr); + ok(hr == D3D_OK, "IDirect3DDevice7_BeginScene failed with %08lx\n", hr);
if (SUCCEEDED(hr)) { hr = IDirect3DDevice7_DrawPrimitive(device, D3DPT_TRIANGLESTRIP, D3DFVF_XYZRHW | D3DFVF_DIFFUSE, quad1, 4, 0); - ok(hr == D3D_OK, "DrawPrimitive failed, hr = %08x\n", hr); + ok(hr == D3D_OK, "DrawPrimitive failed, hr = %08lx\n", hr);
hr = IDirect3DDevice7_EndScene(device); - ok(hr == D3D_OK, "IDirect3DDevice7_EndScene failed, hr = %08x\n", hr); + ok(hr == D3D_OK, "IDirect3DDevice7_EndScene failed, hr = %08lx\n", hr); }
color = getPixelColor(device, 5, 5); ok(color == 0xffffff || broken(color == 0), /* VMware */ - "Got color %08x, expected 00ffffff\n", color); + "Got color %08lx, expected 00ffffff\n", color);
color = getPixelColor(device, 105, 105); - ok(color == 0, "Got color %08x, expected 00000000\n", color); + ok(color == 0, "Got color %08lx, expected 00000000\n", color); }
static DWORD D3D3_getPixelColor(IDirectDraw4 *DirectDraw, IDirectDrawSurface4 *Surface, UINT x, UINT y) @@ -890,7 +890,7 @@ static DWORD D3D3_getPixelColor(IDirectDraw4 *DirectDraw, IDirectDrawSurface4 *S ddsd.dwHeight = 480; ddsd.ddsCaps.dwCaps = DDSCAPS_OFFSCREENPLAIN | DDSCAPS_SYSTEMMEMORY; hr = IDirectDraw4_CreateSurface(DirectDraw, &ddsd, &surf, NULL); - ok(hr == DD_OK, "IDirectDraw4_CreateSurface failed with %08x\n", hr); + ok(hr == DD_OK, "IDirectDraw4_CreateSurface failed with %08lx\n", hr); if(!surf) { trace("cannot create helper surface\n"); @@ -902,7 +902,7 @@ static DWORD D3D3_getPixelColor(IDirectDraw4 *DirectDraw, IDirectDrawSurface4 *S U4(ddsd).ddpfPixelFormat.dwSize = sizeof(U4(ddsd).ddpfPixelFormat);
hr = IDirectDrawSurface4_BltFast(surf, 0, 0, Surface, NULL, 0); - ok(hr == DD_OK, "IDirectDrawSurface_BltFast returned %08x\n", hr); + ok(hr == DD_OK, "IDirectDrawSurface_BltFast returned %08lx\n", hr); if(FAILED(hr)) { trace("Cannot blit\n"); @@ -913,7 +913,7 @@ static DWORD D3D3_getPixelColor(IDirectDraw4 *DirectDraw, IDirectDrawSurface4 *S hr = IDirectDrawSurface4_Lock(surf, &rectToLock, &ddsd, DDLOCK_READONLY | DDLOCK_WAIT, NULL); if(FAILED(hr)) { - trace("Can't lock the offscreen surface, hr=%08x\n", hr); + trace("Can't lock the offscreen surface, hr=%08lx\n", hr); ret = 0xdeadbeec; goto out; } @@ -925,7 +925,7 @@ static DWORD D3D3_getPixelColor(IDirectDraw4 *DirectDraw, IDirectDrawSurface4 *S hr = IDirectDrawSurface4_Unlock(surf, NULL); if(FAILED(hr)) { - trace("Can't unlock the offscreen surface, hr=%08x\n", hr); + trace("Can't unlock the offscreen surface, hr=%08lx\n", hr); }
out: @@ -978,11 +978,11 @@ static void D3D3_ViewportClearTest(void) WS_MAXIMIZE | WS_VISIBLE | WS_CAPTION, 0, 0, 640, 480, 0, 0, 0, 0);
hr = DirectDrawCreate( NULL, &DirectDraw1, NULL ); - ok(hr==DD_OK || hr==DDERR_NODIRECTDRAWSUPPORT, "DirectDrawCreate returned: %x\n", hr); + ok(hr==DD_OK || hr==DDERR_NODIRECTDRAWSUPPORT, "DirectDrawCreate returned: %lx\n", hr); if(FAILED(hr)) goto out;
hr = IDirectDraw_SetCooperativeLevel(DirectDraw1, window, DDSCL_EXCLUSIVE | DDSCL_FULLSCREEN); - ok(hr==DD_OK, "SetCooperativeLevel returned: %x\n", hr); + ok(hr==DD_OK, "SetCooperativeLevel returned: %lx\n", hr); if(FAILED(hr)) goto out;
hr = IDirectDraw_SetDisplayMode(DirectDraw1, 640, 480, 32); @@ -990,11 +990,11 @@ static void D3D3_ViewportClearTest(void) /* 24 bit is fine too */ hr = IDirectDraw_SetDisplayMode(DirectDraw1, 640, 480, 24); } - ok(hr==DD_OK || hr == DDERR_UNSUPPORTED, "SetDisplayMode returned: %x\n", hr); + ok(hr==DD_OK || hr == DDERR_UNSUPPORTED, "SetDisplayMode returned: %lx\n", hr); if (FAILED(hr)) goto out;
hr = IDirectDraw_QueryInterface(DirectDraw1, &IID_IDirectDraw4, (void**)&DirectDraw4); - ok(hr==DD_OK, "QueryInterface returned: %08x\n", hr); + ok(hr==DD_OK, "QueryInterface returned: %08lx\n", hr); if(FAILED(hr)) goto out;
memset(&ddsd, 0, sizeof(DDSURFACEDESC2)); @@ -1003,11 +1003,11 @@ static void D3D3_ViewportClearTest(void) ddsd.ddsCaps.dwCaps = DDSCAPS_PRIMARYSURFACE | DDSCAPS_3DDEVICE;
hr = IDirectDraw4_CreateSurface(DirectDraw4, &ddsd, &Primary, NULL); - ok(hr==DD_OK, "IDirectDraw4_CreateSurface returned: %08x\n", hr); + ok(hr==DD_OK, "IDirectDraw4_CreateSurface returned: %08lx\n", hr); if(FAILED(hr)) goto out;
hr = IDirectDraw4_QueryInterface(DirectDraw4, &IID_IDirect3D3, (void**)&Direct3D3); - ok(hr==DD_OK, "IDirectDraw4_QueryInterface returned: %08x\n", hr); + ok(hr==DD_OK, "IDirectDraw4_QueryInterface returned: %08lx\n", hr); if(FAILED(hr)) goto out;
hr = IDirect3D3_CreateDevice(Direct3D3, &IID_IDirect3DHALDevice, Primary, &Direct3DDevice3, NULL); @@ -1015,15 +1015,15 @@ static void D3D3_ViewportClearTest(void) trace("Creating a HAL device failed, trying Ref\n"); hr = IDirect3D3_CreateDevice(Direct3D3, &IID_IDirect3DRefDevice, Primary, &Direct3DDevice3, NULL); } - ok(hr==D3D_OK, "Creating 3D device returned: %x\n", hr); + ok(hr==D3D_OK, "Creating 3D device returned: %lx\n", hr); if(FAILED(hr)) goto out;
hr = IDirect3D3_CreateViewport(Direct3D3, &Viewport3, NULL); - ok(hr==DD_OK, "IDirect3D3_CreateViewport returned: %08x\n", hr); + ok(hr==DD_OK, "IDirect3D3_CreateViewport returned: %08lx\n", hr); if(FAILED(hr)) goto out;
hr = IDirect3DDevice3_AddViewport(Direct3DDevice3, Viewport3); - ok(hr==DD_OK, "IDirect3DDevice3_AddViewport returned: %08x\n", hr); + ok(hr==DD_OK, "IDirect3DDevice3_AddViewport returned: %08lx\n", hr);
memset(&vp_data, 0, sizeof(D3DVIEWPORT2)); vp_data.dwSize = sizeof(D3DVIEWPORT2); @@ -1035,14 +1035,14 @@ static void D3D3_ViewportClearTest(void) vp_data.dvClipHeight = 2.0f; vp_data.dvMaxZ = 1.0f; hr = IDirect3DViewport3_SetViewport2(Viewport3, &vp_data); - ok(hr==DD_OK, "IDirect3DViewport3_SetViewport2 returned: %08x\n", hr); + ok(hr==DD_OK, "IDirect3DViewport3_SetViewport2 returned: %08lx\n", hr);
hr = IDirect3D3_CreateViewport(Direct3D3, &SmallViewport3, NULL); - ok(hr==DD_OK, "IDirect3D3_CreateViewport returned: %08x\n", hr); + ok(hr==DD_OK, "IDirect3D3_CreateViewport returned: %08lx\n", hr); if(FAILED(hr)) goto out;
hr = IDirect3DDevice3_AddViewport(Direct3DDevice3, SmallViewport3); - ok(hr==DD_OK, "IDirect3DDevice3_AddViewport returned: %08x\n", hr); + ok(hr==DD_OK, "IDirect3DDevice3_AddViewport returned: %08lx\n", hr);
memset(&vp_data, 0, sizeof(D3DVIEWPORT2)); vp_data.dwSize = sizeof(D3DVIEWPORT2); @@ -1056,33 +1056,33 @@ static void D3D3_ViewportClearTest(void) vp_data.dvClipHeight = 2.0f; vp_data.dvMaxZ = 1.0f; hr = IDirect3DViewport3_SetViewport2(SmallViewport3, &vp_data); - ok(hr==DD_OK, "IDirect3DViewport3_SetViewport2 returned: %08x\n", hr); + ok(hr==DD_OK, "IDirect3DViewport3_SetViewport2 returned: %08lx\n", hr);
hr = IDirect3DDevice3_BeginScene(Direct3DDevice3); - ok(hr == D3D_OK, "IDirect3DDevice3_BeginScene failed with %08x\n", hr); + ok(hr == D3D_OK, "IDirect3DDevice3_BeginScene failed with %08lx\n", hr);
hr = IDirect3DDevice3_SetTransform(Direct3DDevice3, D3DTRANSFORMSTATE_WORLD, &mat); - ok(hr == D3D_OK, "IDirect3DDevice3_SetTransform returned %08x\n", hr); + ok(hr == D3D_OK, "IDirect3DDevice3_SetTransform returned %08lx\n", hr); hr = IDirect3DDevice3_SetTransform(Direct3DDevice3, D3DTRANSFORMSTATE_VIEW, &mat); - ok(hr == D3D_OK, "IDirect3DDevice3_SetTransform returned %08x\n", hr); + ok(hr == D3D_OK, "IDirect3DDevice3_SetTransform returned %08lx\n", hr); hr = IDirect3DDevice3_SetTransform(Direct3DDevice3, D3DTRANSFORMSTATE_PROJECTION, &mat); - ok(hr == D3D_OK, "IDirect3DDevice3_SetTransform returned %08x\n", hr); + ok(hr == D3D_OK, "IDirect3DDevice3_SetTransform returned %08lx\n", hr); hr = IDirect3DDevice3_SetRenderState(Direct3DDevice3, D3DRENDERSTATE_CLIPPING, FALSE); - ok(hr == D3D_OK, "IDirect3DDevice3_SetRenderState returned %08x\n", hr); + ok(hr == D3D_OK, "IDirect3DDevice3_SetRenderState returned %08lx\n", hr); hr = IDirect3DDevice3_SetRenderState(Direct3DDevice3, D3DRENDERSTATE_ZENABLE, FALSE); - ok(hr == D3D_OK, "IDirect3DDevice3_SetRenderState returned %08x\n", hr); + ok(hr == D3D_OK, "IDirect3DDevice3_SetRenderState returned %08lx\n", hr); hr = IDirect3DDevice3_SetRenderState(Direct3DDevice3, D3DRENDERSTATE_FOGENABLE, FALSE); - ok(hr == D3D_OK, "IDirect3DDevice3_SetRenderState returned %08x\n", hr); + ok(hr == D3D_OK, "IDirect3DDevice3_SetRenderState returned %08lx\n", hr); hr = IDirect3DDevice3_SetRenderState(Direct3DDevice3, D3DRENDERSTATE_STENCILENABLE, FALSE); - ok(hr == D3D_OK, "IDirect3DDevice3_SetRenderState returned %08x\n", hr); + ok(hr == D3D_OK, "IDirect3DDevice3_SetRenderState returned %08lx\n", hr); hr = IDirect3DDevice3_SetRenderState(Direct3DDevice3, D3DRENDERSTATE_ALPHATESTENABLE, FALSE); - ok(hr == D3D_OK, "IDirect3DDevice3_SetRenderState returned %08x\n", hr); + ok(hr == D3D_OK, "IDirect3DDevice3_SetRenderState returned %08lx\n", hr); hr = IDirect3DDevice3_SetRenderState(Direct3DDevice3, D3DRENDERSTATE_ALPHABLENDENABLE, FALSE); - ok(hr == D3D_OK, "IDirect3DDevice3_SetRenderState returned %08x\n", hr); + ok(hr == D3D_OK, "IDirect3DDevice3_SetRenderState returned %08lx\n", hr); hr = IDirect3DDevice3_SetRenderState(Direct3DDevice3, D3DRENDERSTATE_CULLMODE, D3DCULL_NONE); - ok(hr == D3D_OK, "IDirect3DDevice3_SetRenderState failed with %08x\n", hr); + ok(hr == D3D_OK, "IDirect3DDevice3_SetRenderState failed with %08lx\n", hr); hr = IDirect3DDevice3_SetRenderState(Direct3DDevice3, D3DRENDERSTATE_LIGHTING, FALSE); - ok(hr == D3D_OK, "IDirect3DDevice3_SetRenderState returned %08x\n", hr); + ok(hr == D3D_OK, "IDirect3DDevice3_SetRenderState returned %08lx\n", hr);
if (SUCCEEDED(hr)) { U1(rect).x1 = U2(rect).y1 = 0; @@ -1090,57 +1090,57 @@ static void D3D3_ViewportClearTest(void) U4(rect).y2 = 480;
hr = IDirect3DViewport3_Clear2(Viewport3, 1, &rect, D3DCLEAR_TARGET, 0x00ff00, 0.0f, 0); - ok(hr == D3D_OK, "IDirect3DViewport3_Clear2 failed, hr = %08x\n", hr); + ok(hr == D3D_OK, "IDirect3DViewport3_Clear2 failed, hr = %08lx\n", hr);
hr = IDirect3DViewport3_Clear2(SmallViewport3, 1, &rect, D3DCLEAR_TARGET, 0xff0000, 0.0f, 0); - ok(hr == D3D_OK, "IDirect3DViewport3_Clear2 failed, hr = %08x\n", hr); + ok(hr == D3D_OK, "IDirect3DViewport3_Clear2 failed, hr = %08lx\n", hr);
hr = IDirect3DDevice3_EndScene(Direct3DDevice3); - ok(hr == D3D_OK, "IDirect3DDevice3_EndScene failed, hr = %08x\n", hr); + ok(hr == D3D_OK, "IDirect3DDevice3_EndScene failed, hr = %08lx\n", hr); }
color = D3D3_getPixelColor(DirectDraw4, Primary, 5, 5); red = (color & 0x00ff0000) >> 16; green = (color & 0x0000ff00) >> 8; blue = (color & 0x000000ff); - ok(red == 0 && green == 0xff && blue == 0, "Got color %08x, expected 0000ff00\n", color); + ok(red == 0 && green == 0xff && blue == 0, "Got color %08lx, expected 0000ff00\n", color);
color = D3D3_getPixelColor(DirectDraw4, Primary, 405, 105); red = (color & 0x00ff0000) >> 16; green = (color & 0x0000ff00) >> 8; blue = (color & 0x000000ff); - ok(red == 0xff && green == 0 && blue == 0, "Got color %08x, expected 00ff0000\n", color); + ok(red == 0xff && green == 0 && blue == 0, "Got color %08lx, expected 00ff0000\n", color);
/* Test that clearing viewport doesn't interfere with rendering to previously active viewport. */ hr = IDirect3DDevice3_BeginScene(Direct3DDevice3); - ok(hr == D3D_OK, "IDirect3DDevice3_BeginScene failed with %08x\n", hr); + ok(hr == D3D_OK, "IDirect3DDevice3_BeginScene failed with %08lx\n", hr);
if (SUCCEEDED(hr)) { hr = IDirect3DDevice3_SetCurrentViewport(Direct3DDevice3, SmallViewport3); - ok(hr == D3D_OK, "IDirect3DDevice3_SetCurrentViewport failed with %08x\n", hr); + ok(hr == D3D_OK, "IDirect3DDevice3_SetCurrentViewport failed with %08lx\n", hr);
hr = IDirect3DViewport3_Clear2(Viewport3, 1, &rect, D3DCLEAR_TARGET, 0x000000, 0.0f, 0); - ok(hr == D3D_OK, "IDirect3DViewport3_Clear2 failed, hr = %08x\n", hr); + ok(hr == D3D_OK, "IDirect3DViewport3_Clear2 failed, hr = %08lx\n", hr);
hr = IDirect3DDevice3_DrawIndexedPrimitive(Direct3DDevice3, D3DPT_TRIANGLELIST, fvf, quad, 4 /* NumVerts */, Indices, 6 /* Indexcount */, 0 /* flags */); - ok(hr == D3D_OK, "IDirect3DDevice3_DrawIndexedPrimitive failed with %08x\n", hr); + ok(hr == D3D_OK, "IDirect3DDevice3_DrawIndexedPrimitive failed with %08lx\n", hr);
hr = IDirect3DDevice3_EndScene(Direct3DDevice3); - ok(hr == D3D_OK, "IDirect3DDevice3_EndScene failed, hr = %08x\n", hr); + ok(hr == D3D_OK, "IDirect3DDevice3_EndScene failed, hr = %08lx\n", hr); }
color = D3D3_getPixelColor(DirectDraw4, Primary, 5, 5); red = (color & 0x00ff0000) >> 16; green = (color & 0x0000ff00) >> 8; blue = (color & 0x000000ff); - ok(red == 0 && green == 0 && blue == 0, "Got color %08x, expected 00000000\n", color); + ok(red == 0 && green == 0 && blue == 0, "Got color %08lx, expected 00000000\n", color);
color = D3D3_getPixelColor(DirectDraw4, Primary, 405, 105); red = (color & 0x00ff0000) >> 16; green = (color & 0x0000ff00) >> 8; blue = (color & 0x000000ff); - ok(red == 0xff && green == 0xff && blue == 0xff, "Got color %08x, expected 00ffffff\n", color); + ok(red == 0xff && green == 0xff && blue == 0xff, "Got color %08lx, expected 00ffffff\n", color);
out:
@@ -1161,13 +1161,13 @@ static COLORREF getPixelColor_GDI(IDirectDrawSurface *Surface, UINT x, UINT y) HRESULT hr;
hr = IDirectDrawSurface_GetDC(Surface, &hdc); - ok(hr==DD_OK, "IDirectDrawSurface_GetDC returned: %x\n", hr); + ok(hr==DD_OK, "IDirectDrawSurface_GetDC returned: %lx\n", hr);
if (SUCCEEDED(hr)) { clr = GetPixel(hdc, x, y);
hr = IDirectDrawSurface_ReleaseDC(Surface, hdc); - ok(hr==DD_OK, "IDirectDrawSurface_ReleaseDC returned: %x\n", hr); + ok(hr==DD_OK, "IDirectDrawSurface_ReleaseDC returned: %lx\n", hr); }
return clr; @@ -1211,7 +1211,7 @@ static void cubemap_test(IDirect3DDevice7 *device)
memset(&d3dcaps, 0, sizeof(d3dcaps)); hr = IDirect3DDevice7_GetCaps(device, &d3dcaps); - ok(hr == D3D_OK, "IDirect3DDevice7_GetCaps returned %08x\n", hr); + ok(hr == D3D_OK, "IDirect3DDevice7_GetCaps returned %08lx\n", hr); if(!(d3dcaps.dpcTriCaps.dwTextureCaps & D3DPTEXTURECAPS_CUBEMAP)) { skip("No cubemap support\n"); @@ -1219,12 +1219,12 @@ static void cubemap_test(IDirect3DDevice7 *device) }
hr = IDirect3DDevice7_Clear(device, 0, NULL, D3DCLEAR_TARGET, 0xff000000, 0.0, 0); - ok(hr == D3D_OK, "IDirect3DDevice7_Clear failed with %08x\n", hr); + ok(hr == D3D_OK, "IDirect3DDevice7_Clear failed with %08lx\n", hr);
hr = IDirect3DDevice7_GetDirect3D(device, &d3d); - ok(hr == D3D_OK, "IDirect3DDevice7_GetDirect3D returned %08x\n", hr); + ok(hr == D3D_OK, "IDirect3DDevice7_GetDirect3D returned %08lx\n", hr); hr = IDirect3D7_QueryInterface(d3d, &IID_IDirectDraw7, (void **) &ddraw); - ok(hr == D3D_OK, "IDirect3D7_QueryInterface returned %08x\n", hr); + ok(hr == D3D_OK, "IDirect3D7_QueryInterface returned %08lx\n", hr); IDirect3D7_Release(d3d);
@@ -1243,60 +1243,60 @@ static void cubemap_test(IDirect3DDevice7 *device) U4(U4(ddsd).ddpfPixelFormat).dwBBitMask = 0x000000FF;
hr = IDirectDraw7_CreateSurface(ddraw, &ddsd, &cubemap, NULL); - ok(hr == DD_OK, "IDirectDraw7_CreateSurface returned %08x\n", hr); + ok(hr == DD_OK, "IDirectDraw7_CreateSurface returned %08lx\n", hr); IDirectDraw7_Release(ddraw);
/* Positive X */ U5(DDBltFx).dwFillColor = 0x00ff0000; hr = IDirectDrawSurface7_Blt(cubemap, NULL, NULL, NULL, DDBLT_COLORFILL, &DDBltFx); - ok(hr == DD_OK, "IDirectDrawSurface7_Blt returned %08x\n", hr); + ok(hr == DD_OK, "IDirectDrawSurface7_Blt returned %08lx\n", hr);
memset(&caps, 0, sizeof(caps)); caps.dwCaps = DDSCAPS_TEXTURE; caps.dwCaps2 = DDSCAPS2_CUBEMAP | DDSCAPS2_CUBEMAP_NEGATIVEX; hr = IDirectDrawSurface_GetAttachedSurface(cubemap, &caps, &surface); - ok(hr == DD_OK, "IDirectDrawSurface7_Lock returned %08x\n", hr); + ok(hr == DD_OK, "IDirectDrawSurface7_Lock returned %08lx\n", hr); U5(DDBltFx).dwFillColor = 0x0000ffff; hr = IDirectDrawSurface7_Blt(surface, NULL, NULL, NULL, DDBLT_COLORFILL, &DDBltFx); - ok(hr == DD_OK, "IDirectDrawSurface7_Blt returned %08x\n", hr); + ok(hr == DD_OK, "IDirectDrawSurface7_Blt returned %08lx\n", hr);
caps.dwCaps2 = DDSCAPS2_CUBEMAP | DDSCAPS2_CUBEMAP_NEGATIVEZ; hr = IDirectDrawSurface_GetAttachedSurface(cubemap, &caps, &surface); - ok(hr == DD_OK, "IDirectDrawSurface7_Lock returned %08x\n", hr); + ok(hr == DD_OK, "IDirectDrawSurface7_Lock returned %08lx\n", hr); U5(DDBltFx).dwFillColor = 0x0000ff00; hr = IDirectDrawSurface7_Blt(surface, NULL, NULL, NULL, DDBLT_COLORFILL, &DDBltFx); - ok(hr == DD_OK, "IDirectDrawSurface7_Blt returned %08x\n", hr); + ok(hr == DD_OK, "IDirectDrawSurface7_Blt returned %08lx\n", hr);
caps.dwCaps2 = DDSCAPS2_CUBEMAP | DDSCAPS2_CUBEMAP_POSITIVEZ; hr = IDirectDrawSurface_GetAttachedSurface(cubemap, &caps, &surface); - ok(hr == DD_OK, "IDirectDrawSurface7_Lock returned %08x\n", hr); + ok(hr == DD_OK, "IDirectDrawSurface7_Lock returned %08lx\n", hr); U5(DDBltFx).dwFillColor = 0x000000ff; hr = IDirectDrawSurface7_Blt(surface, NULL, NULL, NULL, DDBLT_COLORFILL, &DDBltFx); - ok(hr == DD_OK, "IDirectDrawSurface7_Blt returned %08x\n", hr); + ok(hr == DD_OK, "IDirectDrawSurface7_Blt returned %08lx\n", hr);
caps.dwCaps2 = DDSCAPS2_CUBEMAP | DDSCAPS2_CUBEMAP_NEGATIVEY; hr = IDirectDrawSurface_GetAttachedSurface(cubemap, &caps, &surface); - ok(hr == DD_OK, "IDirectDrawSurface7_Lock returned %08x\n", hr); + ok(hr == DD_OK, "IDirectDrawSurface7_Lock returned %08lx\n", hr); U5(DDBltFx).dwFillColor = 0x00ffff00; hr = IDirectDrawSurface7_Blt(surface, NULL, NULL, NULL, DDBLT_COLORFILL, &DDBltFx); - ok(hr == DD_OK, "IDirectDrawSurface7_Blt returned %08x\n", hr); + ok(hr == DD_OK, "IDirectDrawSurface7_Blt returned %08lx\n", hr);
caps.dwCaps2 = DDSCAPS2_CUBEMAP | DDSCAPS2_CUBEMAP_POSITIVEY; hr = IDirectDrawSurface_GetAttachedSurface(cubemap, &caps, &surface); - ok(hr == DD_OK, "IDirectDrawSurface7_Lock returned %08x\n", hr); + ok(hr == DD_OK, "IDirectDrawSurface7_Lock returned %08lx\n", hr); U5(DDBltFx).dwFillColor = 0x00ff00ff; hr = IDirectDrawSurface7_Blt(surface, NULL, NULL, NULL, DDBLT_COLORFILL, &DDBltFx); - ok(hr == DD_OK, "IDirectDrawSurface7_Blt returned %08x\n", hr); + ok(hr == DD_OK, "IDirectDrawSurface7_Blt returned %08lx\n", hr);
hr = IDirect3DDevice7_SetTexture(device, 0, cubemap); - ok(hr == DD_OK, "IDirect3DDevice7_SetTexture returned %08x\n", hr); + ok(hr == DD_OK, "IDirect3DDevice7_SetTexture returned %08lx\n", hr); hr = IDirect3DDevice7_SetTextureStageState(device, 0, D3DTSS_COLOROP, D3DTOP_SELECTARG1); - ok(hr == DD_OK, "IDirect3DDevice7_SetTextureStageState returned %08x\n", hr); + ok(hr == DD_OK, "IDirect3DDevice7_SetTextureStageState returned %08lx\n", hr); hr = IDirect3DDevice7_SetTextureStageState(device, 0, D3DTSS_COLORARG1, D3DTA_TEXTURE); - ok(hr == DD_OK, "IDirect3DDevice7_SetTextureStageState returned %08x\n", hr); + ok(hr == DD_OK, "IDirect3DDevice7_SetTextureStageState returned %08lx\n", hr);
hr = IDirect3DDevice7_BeginScene(device); - ok(hr == DD_OK, "IDirect3DDevice7_BeginScene returned %08x\n", hr); + ok(hr == DD_OK, "IDirect3DDevice7_BeginScene returned %08lx\n", hr); if(SUCCEEDED(hr)) { hr = IDirect3DDevice7_DrawPrimitive(device, D3DPT_TRIANGLESTRIP, D3DFVF_XYZ | D3DFVF_TEXCOORDSIZE3(0) | D3DFVF_TEX1, quad + 0 * 6, 4, 0); @@ -1305,35 +1305,35 @@ static void cubemap_test(IDirect3DDevice7 *device) /* VMware */ win_skip("IDirect3DDevice7_DrawPrimitive is not completely implemented, colors won't be tested\n"); hr = IDirect3DDevice7_EndScene(device); - ok(hr == DD_OK, "IDirect3DDevice7_EndScene returned %08x\n", hr); + ok(hr == DD_OK, "IDirect3DDevice7_EndScene returned %08lx\n", hr); goto out; } - ok(hr == DD_OK, "IDirect3DDevice7_DrawPrimitive returned %08x\n", hr); + ok(hr == DD_OK, "IDirect3DDevice7_DrawPrimitive returned %08lx\n", hr); hr = IDirect3DDevice7_DrawPrimitive(device, D3DPT_TRIANGLESTRIP, D3DFVF_XYZ | D3DFVF_TEXCOORDSIZE3(0) | D3DFVF_TEX1, quad + 4 * 6, 4, 0); - ok(hr == DD_OK, "IDirect3DDevice7_DrawPrimitive returned %08x\n", hr); + ok(hr == DD_OK, "IDirect3DDevice7_DrawPrimitive returned %08lx\n", hr); hr = IDirect3DDevice7_DrawPrimitive(device, D3DPT_TRIANGLESTRIP, D3DFVF_XYZ | D3DFVF_TEXCOORDSIZE3(0) | D3DFVF_TEX1, quad + 8 * 6, 4, 0); - ok(hr == DD_OK, "IDirect3DDevice7_DrawPrimitive returned %08x\n", hr); + ok(hr == DD_OK, "IDirect3DDevice7_DrawPrimitive returned %08lx\n", hr); hr = IDirect3DDevice7_DrawPrimitive(device, D3DPT_TRIANGLESTRIP, D3DFVF_XYZ | D3DFVF_TEXCOORDSIZE3(0) | D3DFVF_TEX1, quad + 12* 6, 4, 0); - ok(hr == DD_OK, "IDirect3DDevice7_DrawPrimitive returned %08x\n", hr); + ok(hr == DD_OK, "IDirect3DDevice7_DrawPrimitive returned %08lx\n", hr);
hr = IDirect3DDevice7_EndScene(device); - ok(hr == DD_OK, "IDirect3DDevice7_EndScene returned %08x\n", hr); + ok(hr == DD_OK, "IDirect3DDevice7_EndScene returned %08lx\n", hr); } hr = IDirect3DDevice7_SetTextureStageState(device, 0, D3DTSS_COLOROP, D3DTOP_DISABLE); - ok(hr == DD_OK, "IDirect3DDevice7_SetTextureStageState returned %08x\n", hr); + ok(hr == DD_OK, "IDirect3DDevice7_SetTextureStageState returned %08lx\n", hr);
color = getPixelColor(device, 160, 360); /* lower left quad - positivex */ - ok(color == 0x00ff0000, "DDSCAPS2_CUBEMAP_POSITIVEX has color 0x%08x, expected 0x00ff0000\n", color); + ok(color == 0x00ff0000, "DDSCAPS2_CUBEMAP_POSITIVEX has color 0x%08lx, expected 0x00ff0000\n", color); color = getPixelColor(device, 160, 120); /* upper left quad - negativex */ - ok(color == 0x0000ffff, "DDSCAPS2_CUBEMAP_NEGATIVEX has color 0x%08x, expected 0x0000ffff\n", color); + ok(color == 0x0000ffff, "DDSCAPS2_CUBEMAP_NEGATIVEX has color 0x%08lx, expected 0x0000ffff\n", color); color = getPixelColor(device, 480, 360); /* lower right quad - positivey */ - ok(color == 0x00ff00ff, "DDSCAPS2_CUBEMAP_POSITIVEY has color 0x%08x, expected 0x00ff00ff\n", color); + ok(color == 0x00ff00ff, "DDSCAPS2_CUBEMAP_POSITIVEY has color 0x%08lx, expected 0x00ff00ff\n", color); color = getPixelColor(device, 480, 120); /* upper right quad - positivez */ - ok(color == 0x000000ff, "DDSCAPS2_CUBEMAP_POSITIVEZ has color 0x%08x, expected 0x000000ff\n", color); + ok(color == 0x000000ff, "DDSCAPS2_CUBEMAP_POSITIVEZ has color 0x%08lx, expected 0x000000ff\n", color);
out: hr = IDirect3DDevice7_SetTexture(device, 0, NULL); - ok(hr == DD_OK, "IDirect3DDevice7_SetTexture returned %08x\n", hr); + ok(hr == DD_OK, "IDirect3DDevice7_SetTexture returned %08lx\n", hr); IDirectDrawSurface7_Release(cubemap); }
@@ -1414,66 +1414,66 @@ static void depth_clamp_test(IDirect3DDevice7 *device) vp.dvMaxZ = 7.5;
hr = IDirect3DDevice7_SetViewport(device, &vp); - ok(SUCCEEDED(hr), "SetViewport failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "SetViewport failed, hr %#lx.\n", hr);
hr = IDirect3DDevice7_Clear(device, 0, NULL, D3DCLEAR_TARGET | D3DCLEAR_ZBUFFER, 0xff00ff00, 1.0, 0); - ok(SUCCEEDED(hr), "Clear failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Clear failed, hr %#lx.\n", hr);
hr = IDirect3DDevice7_SetRenderState(device, D3DRENDERSTATE_CLIPPING, FALSE); - ok(SUCCEEDED(hr), "SetRenderState failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "SetRenderState failed, hr %#lx.\n", hr); hr = IDirect3DDevice7_SetRenderState(device, D3DRENDERSTATE_LIGHTING, FALSE); - ok(SUCCEEDED(hr), "SetRenderState failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "SetRenderState failed, hr %#lx.\n", hr); hr = IDirect3DDevice7_SetRenderState(device, D3DRENDERSTATE_ZWRITEENABLE, TRUE); - ok(SUCCEEDED(hr), "SetRenderState failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "SetRenderState failed, hr %#lx.\n", hr); hr = IDirect3DDevice7_SetRenderState(device, D3DRENDERSTATE_ZFUNC, D3DCMP_LESSEQUAL); - ok(SUCCEEDED(hr), "SetRenderState failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "SetRenderState failed, hr %#lx.\n", hr);
hr = IDirect3DDevice7_BeginScene(device); - ok(SUCCEEDED(hr), "BeginScene failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "BeginScene failed, hr %#lx.\n", hr);
hr = IDirect3DDevice7_DrawPrimitive(device, D3DPT_TRIANGLESTRIP, D3DFVF_XYZRHW | D3DFVF_DIFFUSE, quad1, 4, 0); - ok(SUCCEEDED(hr), "DrawPrimitive failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "DrawPrimitive failed, hr %#lx.\n", hr); hr = IDirect3DDevice7_DrawPrimitive(device, D3DPT_TRIANGLESTRIP, D3DFVF_XYZRHW | D3DFVF_DIFFUSE, quad2, 4, 0); - ok(SUCCEEDED(hr), "DrawPrimitive failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "DrawPrimitive failed, hr %#lx.\n", hr);
hr = IDirect3DDevice7_SetRenderState(device, D3DRENDERSTATE_CLIPPING, TRUE); - ok(SUCCEEDED(hr), "SetRenderState failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "SetRenderState failed, hr %#lx.\n", hr);
hr = IDirect3DDevice7_DrawPrimitive(device, D3DPT_TRIANGLESTRIP, D3DFVF_XYZRHW | D3DFVF_DIFFUSE, quad3, 4, 0); - ok(SUCCEEDED(hr), "DrawPrimitive failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "DrawPrimitive failed, hr %#lx.\n", hr); hr = IDirect3DDevice7_DrawPrimitive(device, D3DPT_TRIANGLESTRIP, D3DFVF_XYZRHW | D3DFVF_DIFFUSE, quad4, 4, 0); - ok(SUCCEEDED(hr), "DrawPrimitive failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "DrawPrimitive failed, hr %#lx.\n", hr);
hr = IDirect3DDevice7_SetRenderState(device, D3DRENDERSTATE_CLIPPING, FALSE); - ok(SUCCEEDED(hr), "SetRenderState failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "SetRenderState failed, hr %#lx.\n", hr);
hr = IDirect3DDevice7_DrawPrimitive(device, D3DPT_TRIANGLESTRIP, D3DFVF_XYZ | D3DFVF_DIFFUSE, quad5, 4, 0); - ok(SUCCEEDED(hr), "DrawPrimitive failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "DrawPrimitive failed, hr %#lx.\n", hr);
hr = IDirect3DDevice7_SetRenderState(device, D3DRENDERSTATE_CLIPPING, TRUE); - ok(SUCCEEDED(hr), "SetRenderState failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "SetRenderState failed, hr %#lx.\n", hr);
hr = IDirect3DDevice7_DrawPrimitive(device, D3DPT_TRIANGLESTRIP, D3DFVF_XYZ | D3DFVF_DIFFUSE, quad6, 4, 0); - ok(SUCCEEDED(hr), "DrawPrimitive failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "DrawPrimitive failed, hr %#lx.\n", hr);
hr = IDirect3DDevice7_EndScene(device); - ok(SUCCEEDED(hr), "EndScene failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "EndScene failed, hr %#lx.\n", hr);
color = getPixelColor(device, 75, 75); - ok(color_match(color, 0x00ffffff, 1) || color_match(color, 0x0000ff00, 1), "color 0x%08x.\n", color); + ok(color_match(color, 0x00ffffff, 1) || color_match(color, 0x0000ff00, 1), "color 0x%08lx.\n", color); color = getPixelColor(device, 150, 150); - ok(color_match(color, 0x00ffffff, 1) || color_match(color, 0x0000ff00, 1), "color 0x%08x.\n", color); + ok(color_match(color, 0x00ffffff, 1) || color_match(color, 0x0000ff00, 1), "color 0x%08lx.\n", color); color = getPixelColor(device, 320, 240); - ok(color_match(color, 0x00002b7f, 1) || color_match(color, 0x0000ff00, 1), "color 0x%08x.\n", color); + ok(color_match(color, 0x00002b7f, 1) || color_match(color, 0x0000ff00, 1), "color 0x%08lx.\n", color); color = getPixelColor(device, 320, 330); - ok(color_match(color, 0x00f9e814, 1) || color_match(color, 0x0000ff00, 1), "color 0x%08x.\n", color); + ok(color_match(color, 0x00f9e814, 1) || color_match(color, 0x0000ff00, 1), "color 0x%08lx.\n", color); color = getPixelColor(device, 320, 330); - ok(color_match(color, 0x00f9e814, 1) || color_match(color, 0x0000ff00, 1), "color 0x%08x.\n", color); + ok(color_match(color, 0x00f9e814, 1) || color_match(color, 0x0000ff00, 1), "color 0x%08lx.\n", color);
vp.dvMinZ = 0.0; vp.dvMaxZ = 1.0; hr = IDirect3DDevice7_SetViewport(device, &vp); - ok(SUCCEEDED(hr), "SetViewport failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "SetViewport failed, hr %#lx.\n", hr); }
static void DX1_BackBufferFlipTest(void) @@ -1497,11 +1497,11 @@ static void DX1_BackBufferFlipTest(void) WS_MAXIMIZE | WS_VISIBLE | WS_CAPTION, 0, 0, 640, 480, 0, 0, 0, 0);
hr = DirectDrawCreate( NULL, &DirectDraw1, NULL ); - ok(hr==DD_OK || hr==DDERR_NODIRECTDRAWSUPPORT, "DirectDrawCreate returned: %x\n", hr); + ok(hr==DD_OK || hr==DDERR_NODIRECTDRAWSUPPORT, "DirectDrawCreate returned: %lx\n", hr); if(FAILED(hr)) goto out;
hr = IDirectDraw_SetCooperativeLevel(DirectDraw1, window, DDSCL_EXCLUSIVE | DDSCL_FULLSCREEN); - ok(hr==DD_OK, "SetCooperativeLevel returned: %x\n", hr); + ok(hr==DD_OK, "SetCooperativeLevel returned: %lx\n", hr); if(FAILED(hr)) goto out;
hr = IDirectDraw_SetDisplayMode(DirectDraw1, 640, 480, 32); @@ -1509,7 +1509,7 @@ static void DX1_BackBufferFlipTest(void) /* 24 bit is fine too */ hr = IDirectDraw_SetDisplayMode(DirectDraw1, 640, 480, 24); } - ok(hr==DD_OK || hr == DDERR_UNSUPPORTED, "SetDisplayMode returned: %x\n", hr); + ok(hr==DD_OK || hr == DDERR_UNSUPPORTED, "SetDisplayMode returned: %lx\n", hr); if (FAILED(hr)) { goto out; } @@ -1520,7 +1520,7 @@ static void DX1_BackBufferFlipTest(void) ddsd.ddsCaps.dwCaps = DDSCAPS_PRIMARYSURFACE;
hr = IDirectDraw_CreateSurface(DirectDraw1, &ddsd, &Primary, NULL); - ok(hr==DD_OK, "IDirectDraw_CreateSurface returned: %08x\n", hr); + ok(hr==DD_OK, "IDirectDraw_CreateSurface returned: %08lx\n", hr);
memset(&ddsd, 0, sizeof(DDSURFACEDESC)); ddsd.dwSize = sizeof(DDSURFACEDESC); @@ -1536,12 +1536,12 @@ static void DX1_BackBufferFlipTest(void) U4(ddsd.ddpfPixelFormat).dwBBitMask = 0x000000ff;
hr = IDirectDraw_CreateSurface(DirectDraw1, &ddsd, &Backbuffer, NULL); - ok(hr==DD_OK, "IDirectDraw_CreateSurface returned: %08x\n", hr); + ok(hr==DD_OK, "IDirectDraw_CreateSurface returned: %08lx\n", hr); if(FAILED(hr)) goto out;
hr = IDirectDrawSurface_AddAttachedSurface(Primary, Backbuffer); todo_wine ok(hr == DD_OK || broken(hr == DDERR_CANNOTATTACHSURFACE), - "Attaching a back buffer to a front buffer returned %08x\n", hr); + "Attaching a back buffer to a front buffer returned %08lx\n", hr); if (FAILED(hr)) goto out;
attached = TRUE; @@ -1550,11 +1550,11 @@ static void DX1_BackBufferFlipTest(void) ddbltfx.dwSize = sizeof(ddbltfx); U5(ddbltfx).dwFillColor = red; hr = IDirectDrawSurface_Blt(Backbuffer, NULL, NULL, NULL, DDBLT_COLORFILL | DDBLT_WAIT, &ddbltfx); - ok(hr == DD_OK, "IDirectDrawSurface_Blt returned: %x\n", hr); + ok(hr == DD_OK, "IDirectDrawSurface_Blt returned: %lx\n", hr);
U5(ddbltfx).dwFillColor = white; hr = IDirectDrawSurface_Blt(Primary, NULL, NULL, NULL, DDBLT_COLORFILL | DDBLT_WAIT, &ddbltfx); - ok(hr == DD_OK, "IDirectDrawSurface_Blt returned: %x\n", hr); + ok(hr == DD_OK, "IDirectDrawSurface_Blt returned: %lx\n", hr);
/* Check it out */ color = getPixelColor_GDI(Primary, 5, 5); @@ -1568,7 +1568,7 @@ static void DX1_BackBufferFlipTest(void) GetRValue(color), GetGValue(color), GetBValue(color));
hr = IDirectDrawSurface_Flip(Primary, NULL, DDFLIP_WAIT); - todo_wine ok(hr == DD_OK, "IDirectDrawSurface_Flip returned 0x%08x\n", hr); + todo_wine ok(hr == DD_OK, "IDirectDrawSurface_Flip returned 0x%08lx\n", hr);
if (hr == DD_OK) { @@ -1618,7 +1618,7 @@ START_TEST(visual) color = getPixelColor(Direct3DDevice, 1, 1); if(color !=0x00ff0000) { - skip("Sanity check returned an incorrect color(%08x), can't assure the correctness of the tests, skipping\n", color); + skip("Sanity check returned an incorrect color(%08lx), can't assure the correctness of the tests, skipping\n", color); goto cleanup; }
@@ -1632,7 +1632,7 @@ START_TEST(visual) color = getPixelColor(Direct3DDevice, 639, 479); if(color != 0x0000ddee) { - skip("Sanity check returned an incorrect color(%08x), can't assure the correctness of the tests, skipping\n", color); + skip("Sanity check returned an incorrect color(%08lx), can't assure the correctness of the tests, skipping\n", color); goto cleanup; }
Signed-off-by: Eric Pouech eric.pouech@gmail.com
--- dlls/devenum/tests/Makefile.in | 1 dlls/devenum/tests/devenum.c | 266 ++++++++++++++++++++-------------------- 2 files changed, 133 insertions(+), 134 deletions(-)
diff --git a/dlls/devenum/tests/Makefile.in b/dlls/devenum/tests/Makefile.in index 762c007deee..2d6ec2d87ea 100644 --- a/dlls/devenum/tests/Makefile.in +++ b/dlls/devenum/tests/Makefile.in @@ -1,4 +1,3 @@ -EXTRADEFS = -DWINE_NO_LONG_TYPES TESTDLL = devenum.dll IMPORTS = advapi32 dsound msdmo msvfw32 oleaut32 ole32 winmm
diff --git a/dlls/devenum/tests/devenum.c b/dlls/devenum/tests/devenum.c index 3e0d6f57dc3..d91f8699985 100644 --- a/dlls/devenum/tests/devenum.c +++ b/dlls/devenum/tests/devenum.c @@ -48,26 +48,26 @@ static void test_devenum(void)
hr = CoCreateInstance(&CLSID_SystemDeviceEnum, NULL, CLSCTX_INPROC, &IID_ICreateDevEnum, (LPVOID*)&create_devenum); - ok(hr == S_OK, "Failed to create devenum: %#x\n", hr); + ok(hr == S_OK, "Failed to create devenum: %#lx\n", hr);
hr = ICreateDevEnum_CreateClassEnumerator(create_devenum, &CLSID_ActiveMovieCategories, &enum_cat, 0); - ok(hr == S_OK, "Failed to enum categories: %#x\n", hr); + ok(hr == S_OK, "Failed to enum categories: %#lx\n", hr);
while (IEnumMoniker_Next(enum_cat, 1, &moniker, NULL) == S_OK) { hr = IMoniker_BindToStorage(moniker, NULL, NULL, &IID_IPropertyBag, (void **)&prop_bag); - ok(hr == S_OK, "IMoniker_BindToStorage failed: %#x\n", hr); + ok(hr == S_OK, "IMoniker_BindToStorage failed: %#lx\n", hr);
VariantInit(&var); hr = IPropertyBag_Read(prop_bag, L"CLSID", &var, NULL); - ok(hr == S_OK, "Failed to read CLSID: %#x\n", hr); + ok(hr == S_OK, "Failed to read CLSID: %#lx\n", hr);
hr = CLSIDFromString(V_BSTR(&var), &cat_guid); - ok(hr == S_OK, "got %#x\n", hr); + ok(hr == S_OK, "got %#lx\n", hr);
VariantClear(&var); hr = IPropertyBag_Read(prop_bag, L"FriendlyName", &var, NULL); - ok(hr == S_OK, "Failed to read FriendlyName: %#x\n", hr); + ok(hr == S_OK, "Failed to read FriendlyName: %#lx\n", hr);
if (winetest_debug > 1) trace("%s %s:\n", wine_dbgstr_guid(&cat_guid), wine_dbgstr_w(V_BSTR(&var))); @@ -77,7 +77,7 @@ static void test_devenum(void) IMoniker_Release(moniker);
hr = ICreateDevEnum_CreateClassEnumerator(create_devenum, &cat_guid, &enum_moniker, 0); - ok(SUCCEEDED(hr), "Failed to enum devices: %#x\n", hr); + ok(SUCCEEDED(hr), "Failed to enum devices: %#lx\n", hr);
if (hr == S_OK) { @@ -86,29 +86,29 @@ static void test_devenum(void) while (IEnumMoniker_Next(enum_moniker, 1, &moniker, NULL) == S_OK) { hr = IMoniker_GetDisplayName(moniker, NULL, NULL, &displayname); - ok(hr == S_OK, "got %#x\n", hr); + ok(hr == S_OK, "got %#lx\n", hr);
hr = IMoniker_GetClassID(moniker, NULL); - ok(hr == E_INVALIDARG, "IMoniker_GetClassID should failed %x\n", hr); + ok(hr == E_INVALIDARG, "IMoniker_GetClassID should failed %lx\n", hr);
hr = IMoniker_GetClassID(moniker, &clsid); - ok(hr == S_OK, "IMoniker_GetClassID failed with error %x\n", hr); + ok(hr == S_OK, "IMoniker_GetClassID failed with error %lx\n", hr); ok(IsEqualGUID(&clsid, &CLSID_CDeviceMoniker), "Expected CLSID_CDeviceMoniker got %s\n", wine_dbgstr_guid(&clsid));
VariantInit(&var); hr = IMoniker_BindToStorage(moniker, NULL, NULL, &IID_IPropertyBag, (LPVOID*)&prop_bag); - ok(hr == S_OK, "IMoniker_BindToStorage failed with error %x\n", hr); + ok(hr == S_OK, "IMoniker_BindToStorage failed with error %lx\n", hr);
hr = IPropertyBag_Read(prop_bag, L"FriendlyName", &var, NULL); ok((hr == S_OK) | (hr == ERROR_KEY_DOES_NOT_EXIST), - "IPropertyBag_Read failed: %#x\n", hr); + "IPropertyBag_Read failed: %#lx\n", hr);
if (winetest_debug > 1) trace(" %s %s\n", wine_dbgstr_w(displayname), wine_dbgstr_w(V_BSTR(&var)));
hr = IMoniker_BindToObject(moniker, NULL, NULL, &IID_IUnknown, NULL); - ok(hr == E_POINTER, "got %#x\n", hr); + ok(hr == E_POINTER, "got %#lx\n", hr);
VariantClear(&var); hr = IPropertyBag_Read(prop_bag, L"CLSID", &var, NULL); @@ -122,13 +122,13 @@ static void test_devenum(void) &IID_IUnknown, (void **)&unk); if (hr2 == S_OK) IUnknown_Release(unk); - ok(hr2 == hr, "Expected hr %#x, got %#x.\n", hr, hr2); + ok(hr2 == hr, "Expected hr %#lx, got %#lx.\n", hr, hr2); }
hr = CreateBindCtx(0, &bindctx); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IMoniker_BindToStorage(moniker, bindctx, NULL, &IID_IPropertyBag, (LPVOID*)&prop_bag); - ok(hr == S_OK, "IMoniker_BindToStorage failed with error %x\n", hr); + ok(hr == S_OK, "IMoniker_BindToStorage failed with error %lx\n", hr); IPropertyBag_Release(prop_bag); IBindCtx_Release(bindctx);
@@ -159,22 +159,22 @@ static void test_moniker_isequal(void) &IID_ICreateDevEnum, (LPVOID*)&create_devenum); if (FAILED(res)) { - skip("Cannot create SystemDeviceEnum object (%x)\n", res); + skip("Cannot create SystemDeviceEnum object (%lx)\n", res); return; }
res = ICreateDevEnum_CreateClassEnumerator(create_devenum, &CLSID_LegacyAmFilterCategory, &enum_moniker0, 0); - ok(SUCCEEDED(res), "Cannot create enum moniker (res = %x)\n", res); + ok(SUCCEEDED(res), "Cannot create enum moniker (res = %lx)\n", res); if (SUCCEEDED(res)) { if (IEnumMoniker_Next(enum_moniker0, 1, &moniker0, NULL) == S_OK && IEnumMoniker_Next(enum_moniker0, 1, &moniker1, NULL) == S_OK) { res = IMoniker_IsEqual(moniker0, moniker1); - ok(res == S_FALSE, "IMoniker_IsEqual should fail (res = %x)\n", res); + ok(res == S_FALSE, "IMoniker_IsEqual should fail (res = %lx)\n", res);
res = IMoniker_IsEqual(moniker1, moniker0); - ok(res == S_FALSE, "IMoniker_IsEqual should fail (res = %x)\n", res); + ok(res == S_FALSE, "IMoniker_IsEqual should fail (res = %lx)\n", res);
IMoniker_Release(moniker0); IMoniker_Release(moniker1); @@ -185,19 +185,19 @@ static void test_moniker_isequal(void) IEnumMoniker_Release(enum_moniker0);
res = ICreateDevEnum_CreateClassEnumerator(create_devenum, &CLSID_LegacyAmFilterCategory, &enum_moniker0, 0); - ok(SUCCEEDED(res), "Cannot create enum moniker (res = %x)\n", res); + ok(SUCCEEDED(res), "Cannot create enum moniker (res = %lx)\n", res); res = ICreateDevEnum_CreateClassEnumerator(create_devenum, &CLSID_AudioRendererCategory, &enum_moniker1, 0); - ok(SUCCEEDED(res), "Cannot create enum moniker (res = %x)\n", res); + ok(SUCCEEDED(res), "Cannot create enum moniker (res = %lx)\n", res); if (SUCCEEDED(res)) { if (IEnumMoniker_Next(enum_moniker0, 1, &moniker0, NULL) == S_OK && IEnumMoniker_Next(enum_moniker1, 1, &moniker1, NULL) == S_OK) { res = IMoniker_IsEqual(moniker0, moniker1); - ok(res == S_FALSE, "IMoniker_IsEqual should failed (res = %x)\n", res); + ok(res == S_FALSE, "IMoniker_IsEqual should failed (res = %lx)\n", res);
res = IMoniker_IsEqual(moniker1, moniker0); - ok(res == S_FALSE, "IMoniker_IsEqual should failed (res = %x)\n", res); + ok(res == S_FALSE, "IMoniker_IsEqual should failed (res = %lx)\n", res);
IMoniker_Release(moniker0); IMoniker_Release(moniker1); @@ -209,19 +209,19 @@ static void test_moniker_isequal(void) IEnumMoniker_Release(enum_moniker1);
res = ICreateDevEnum_CreateClassEnumerator(create_devenum, &CLSID_LegacyAmFilterCategory, &enum_moniker0, 0); - ok(SUCCEEDED(res), "Cannot create enum moniker (res = %x)\n", res); + ok(SUCCEEDED(res), "Cannot create enum moniker (res = %lx)\n", res); res = ICreateDevEnum_CreateClassEnumerator(create_devenum, &CLSID_LegacyAmFilterCategory, &enum_moniker1, 0); - ok(SUCCEEDED(res), "Cannot create enum moniker (res = %x)\n", res); + ok(SUCCEEDED(res), "Cannot create enum moniker (res = %lx)\n", res); if (SUCCEEDED(res)) { if (IEnumMoniker_Next(enum_moniker0, 1, &moniker0, NULL) == S_OK && IEnumMoniker_Next(enum_moniker1, 1, &moniker1, NULL) == S_OK) { res = IMoniker_IsEqual(moniker0, moniker1); - ok(res == S_OK, "IMoniker_IsEqual failed (res = %x)\n", res); + ok(res == S_OK, "IMoniker_IsEqual failed (res = %lx)\n", res);
res = IMoniker_IsEqual(moniker1, moniker0); - ok(res == S_OK, "IMoniker_IsEqual failed (res = %x)\n", res); + ok(res == S_OK, "IMoniker_IsEqual failed (res = %lx)\n", res);
IMoniker_Release(moniker0); IMoniker_Release(moniker1); @@ -271,7 +271,7 @@ static void test_register_filter(void) HRESULT hr;
hr = CoCreateInstance(&CLSID_FilterMapper2, NULL, CLSCTX_INPROC, &IID_IFilterMapper2, (void **)&mapper2); - ok(hr == S_OK, "Failed to create FilterMapper2: %#x\n", hr); + ok(hr == S_OK, "Failed to create FilterMapper2: %#lx\n", hr);
rgf2.dwVersion = 2; rgf2.dwMerit = MERIT_UNLIKELY; @@ -284,24 +284,24 @@ static void test_register_filter(void) IFilterMapper2_Release(mapper2); return; } - ok(hr == S_OK, "RegisterFilter failed: %#x\n", hr); + ok(hr == S_OK, "RegisterFilter failed: %#lx\n", hr);
ok(find_moniker(&CLSID_LegacyAmFilterCategory, mon), "filter should be registered\n");
hr = IFilterMapper2_UnregisterFilter(mapper2, NULL, NULL, &CLSID_TestFilter); - ok(hr == S_OK, "UnregisterFilter failed: %#x\n", hr); + ok(hr == S_OK, "UnregisterFilter failed: %#lx\n", hr);
ok(!find_moniker(&CLSID_LegacyAmFilterCategory, mon), "filter should not be registered\n"); IMoniker_Release(mon);
mon = NULL; hr = IFilterMapper2_RegisterFilter(mapper2, &CLSID_TestFilter, L"devenum test", &mon, &CLSID_AudioRendererCategory, NULL, &rgf2); - ok(hr == S_OK, "RegisterFilter failed: %#x\n", hr); + ok(hr == S_OK, "RegisterFilter failed: %#lx\n", hr);
ok(find_moniker(&CLSID_AudioRendererCategory, mon), "filter should be registered\n");
hr = IFilterMapper2_UnregisterFilter(mapper2, &CLSID_AudioRendererCategory, NULL, &CLSID_TestFilter); - ok(hr == S_OK, "UnregisterFilter failed: %#x\n", hr); + ok(hr == S_OK, "UnregisterFilter failed: %#lx\n", hr);
ok(!find_moniker(&CLSID_AudioRendererCategory, mon), "filter should not be registered\n"); IMoniker_Release(mon); @@ -317,10 +317,10 @@ static IMoniker *check_display_name_(int line, IParseDisplayName *parser, WCHAR WCHAR *str;
hr = IParseDisplayName_ParseDisplayName(parser, NULL, buffer, &eaten, &mon); - ok_(__FILE__, line)(hr == S_OK, "ParseDisplayName failed: %#x\n", hr); + ok_(__FILE__, line)(hr == S_OK, "ParseDisplayName failed: %#lx\n", hr);
hr = IMoniker_GetDisplayName(mon, NULL, NULL, &str); - ok_(__FILE__, line)(hr == S_OK, "GetDisplayName failed: %#x\n", hr); + ok_(__FILE__, line)(hr == S_OK, "GetDisplayName failed: %#lx\n", hr); ok_(__FILE__, line)(!wcscmp(str, buffer), "got %s\n", wine_dbgstr_w(str));
CoTaskMemFree(str); @@ -343,7 +343,7 @@ static void test_directshow_filter(void)
/* Test ParseDisplayName and GetDisplayName */ hr = CoCreateInstance(&CLSID_CDeviceMoniker, NULL, CLSCTX_INPROC, &IID_IParseDisplayName, (void **)&parser); - ok(hr == S_OK, "Failed to create ParseDisplayName: %#x\n", hr); + ok(hr == S_OK, "Failed to create ParseDisplayName: %#lx\n", hr);
wcscpy(buffer, L"@device:sw:"); StringFromGUID2(&CLSID_AudioRendererCategory, buffer + wcslen(buffer), CHARS_IN_GUID); @@ -354,11 +354,11 @@ static void test_directshow_filter(void) ok(!find_moniker(&CLSID_AudioRendererCategory, mon), "filter should not be registered\n");
hr = IMoniker_BindToStorage(mon, NULL, NULL, &IID_IPropertyBag, (void **)&prop_bag); - ok(hr == S_OK, "BindToStorage failed: %#x\n", hr); + ok(hr == S_OK, "BindToStorage failed: %#lx\n", hr);
VariantInit(&var); hr = IPropertyBag_Read(prop_bag, L"FriendlyName", &var, NULL); - ok(hr == HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND), "got %#x\n", hr); + ok(hr == HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND), "got %#lx\n", hr);
/* writing causes the key to be created */ V_VT(&var) = VT_BSTR; @@ -366,60 +366,60 @@ static void test_directshow_filter(void) hr = IPropertyBag_Write(prop_bag, L"FriendlyName", &var); if (hr != E_ACCESSDENIED) { - ok(hr == S_OK, "Write failed: %#x\n", hr); + ok(hr == S_OK, "Write failed: %#lx\n", hr);
ok(find_moniker(&CLSID_AudioRendererCategory, mon), "filter should be registered\n");
VariantClear(&var); V_VT(&var) = VT_EMPTY; hr = IPropertyBag_Read(prop_bag, L"FriendlyName", &var, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(V_VT(&var) == VT_BSTR, "Got type %#x.\n", V_VT(&var)); ok(!wcscmp(V_BSTR(&var), L"test"), "Got name %s.\n", wine_dbgstr_w(V_BSTR(&var)));
VariantClear(&var); V_VT(&var) = VT_LPWSTR; hr = IPropertyBag_Read(prop_bag, L"FriendlyName", &var, NULL); - ok(hr == E_INVALIDARG, "Got hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Got hr %#lx.\n", hr);
V_VT(&var) = VT_BSTR; hr = IPropertyBag_Read(prop_bag, L"FriendlyName", &var, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(V_VT(&var) == VT_BSTR, "Got type %#x.\n", V_VT(&var)); ok(!wcscmp(V_BSTR(&var), L"test"), "Got name %s.\n", wine_dbgstr_w(V_BSTR(&var)));
V_VT(&var) = VT_LPWSTR; hr = IPropertyBag_Write(prop_bag, L"FriendlyName", &var); - ok(hr == E_INVALIDARG, "Got hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Got hr %#lx.\n", hr); VariantClear(&var);
V_VT(&var) = VT_I4; V_I4(&var) = 0xdeadbeef; hr = IPropertyBag_Write(prop_bag, L"foobar", &var); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
V_VT(&var) = VT_EMPTY; hr = IPropertyBag_Read(prop_bag, L"foobar", &var, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(V_VT(&var) == VT_I4, "Got type %#x.\n", V_VT(&var)); - ok(V_I4(&var) == 0xdeadbeef, "Got value %#x.\n", V_I4(&var)); + ok(V_I4(&var) == 0xdeadbeef, "Got value %#lx.\n", V_I4(&var));
V_VT(&var) = VT_UI4; hr = IPropertyBag_Read(prop_bag, L"foobar", &var, NULL); - ok(hr == E_INVALIDARG, "Got hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Got hr %#lx.\n", hr); V_VT(&var) = VT_BSTR; hr = IPropertyBag_Read(prop_bag, L"foobar", &var, NULL); - ok(hr == E_INVALIDARG, "Got hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Got hr %#lx.\n", hr);
V_VT(&var) = VT_I4; hr = IPropertyBag_Read(prop_bag, L"foobar", &var, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(V_VT(&var) == VT_I4, "Got type %#x.\n", V_VT(&var)); - ok(V_I4(&var) == 0xdeadbeef, "Got value %#x.\n", V_I4(&var)); + ok(V_I4(&var) == 0xdeadbeef, "Got value %#lx.\n", V_I4(&var));
V_VT(&var) = VT_UI4; hr = IPropertyBag_Write(prop_bag, L"foobar", &var); - ok(hr == E_INVALIDARG, "Got hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Got hr %#lx.\n", hr);
V_VT(&var) = VT_ARRAY | VT_UI1; V_ARRAY(&var) = SafeArrayCreate(VT_UI1, 1, &bound); @@ -427,12 +427,12 @@ static void test_directshow_filter(void) memcpy(array_data, "test data", 10); SafeArrayUnaccessData(V_ARRAY(&var)); hr = IPropertyBag_Write(prop_bag, L"foobar", &var); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
VariantClear(&var); V_VT(&var) = VT_EMPTY; hr = IPropertyBag_Read(prop_bag, L"foobar", &var, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(V_VT(&var) == (VT_ARRAY | VT_UI1), "Got type %#x.\n", V_VT(&var)); SafeArrayAccessData(V_ARRAY(&var), &array_data); ok(!memcmp(array_data, "test data", 10), "Got wrong data.\n"); @@ -445,7 +445,7 @@ static void test_directshow_filter(void) StringFromGUID2(&CLSID_AudioRendererCategory, buffer + wcslen(buffer), CHARS_IN_GUID); wcscat(buffer, L"\Instance\test"); res = RegDeleteKeyW(HKEY_CLASSES_ROOT, buffer); - ok(!res, "RegDeleteKey failed: %lu\n", res); + ok(!res, "RegDeleteKey failed: %Iu\n", res); }
VariantClear(&var); @@ -457,22 +457,22 @@ static void test_directshow_filter(void) mon = check_display_name(parser, buffer);
hr = IMoniker_BindToStorage(mon, NULL, NULL, &IID_IPropertyBag, (void **)&prop_bag); - ok(hr == S_OK, "BindToStorage failed: %#x\n", hr); + ok(hr == S_OK, "BindToStorage failed: %#lx\n", hr);
VariantClear(&var); hr = IPropertyBag_Read(prop_bag, L"FriendlyName", &var, NULL); - ok(hr == HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND), "got %#x\n", hr); + ok(hr == HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND), "got %#lx\n", hr);
V_VT(&var) = VT_BSTR; V_BSTR(&var) = SysAllocString(L"test"); hr = IPropertyBag_Write(prop_bag, L"FriendlyName", &var); if (hr != E_ACCESSDENIED) { - ok(hr == S_OK, "Write failed: %#x\n", hr); + ok(hr == S_OK, "Write failed: %#lx\n", hr);
VariantClear(&var); hr = IPropertyBag_Read(prop_bag, L"FriendlyName", &var, NULL); - ok(hr == S_OK, "Read failed: %#x\n", hr); + ok(hr == S_OK, "Read failed: %#lx\n", hr); ok(!wcscmp(V_BSTR(&var), L"test"), "got %s\n", wine_dbgstr_w(V_BSTR(&var)));
IMoniker_Release(mon); @@ -481,7 +481,7 @@ static void test_directshow_filter(void) RegDeleteKeyA(HKEY_CLASSES_ROOT, "CLSID\test\Instance");
res = RegDeleteKeyA(HKEY_CLASSES_ROOT, "CLSID\test"); - ok(!res, "RegDeleteKey failed: %lu\n", res); + ok(!res, "RegDeleteKey failed: %Iu\n", res); }
VariantClear(&var); @@ -502,7 +502,7 @@ static void test_codec(void)
/* Test ParseDisplayName and GetDisplayName */ hr = CoCreateInstance(&CLSID_CDeviceMoniker, NULL, CLSCTX_INPROC, &IID_IParseDisplayName, (void **)&parser); - ok(hr == S_OK, "Failed to create ParseDisplayName: %#x\n", hr); + ok(hr == S_OK, "Failed to create ParseDisplayName: %#lx\n", hr);
wcscpy(buffer, L"@device:cm:"); StringFromGUID2(&CLSID_AudioRendererCategory, buffer + wcslen(buffer), CHARS_IN_GUID); @@ -513,66 +513,66 @@ static void test_codec(void) ok(!find_moniker(&CLSID_AudioRendererCategory, mon), "codec should not be registered\n");
hr = IMoniker_BindToStorage(mon, NULL, NULL, &IID_IPropertyBag, (void **)&prop_bag); - ok(hr == S_OK, "BindToStorage failed: %#x\n", hr); + ok(hr == S_OK, "BindToStorage failed: %#lx\n", hr);
VariantInit(&var); hr = IPropertyBag_Read(prop_bag, L"FriendlyName", &var, NULL); - ok(hr == HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND), "got %#x\n", hr); + ok(hr == HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND), "got %#lx\n", hr);
V_VT(&var) = VT_BSTR; V_BSTR(&var) = SysAllocString(L"test"); hr = IPropertyBag_Write(prop_bag, L"FriendlyName", &var); - ok(hr == S_OK, "Write failed: %#x\n", hr); + ok(hr == S_OK, "Write failed: %#lx\n", hr);
V_VT(&var) = VT_LPWSTR; hr = IPropertyBag_Write(prop_bag, L"FriendlyName", &var); - ok(hr == E_INVALIDARG, "Got hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Got hr %#lx.\n", hr);
VariantClear(&var); V_VT(&var) = VT_EMPTY; hr = IPropertyBag_Read(prop_bag, L"FriendlyName", &var, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(V_VT(&var) == VT_BSTR, "Got type %#x.\n", V_VT(&var)); ok(!wcscmp(V_BSTR(&var), L"test"), "Got name %s.\n", wine_dbgstr_w(V_BSTR(&var)));
VariantClear(&var); V_VT(&var) = VT_LPWSTR; hr = IPropertyBag_Read(prop_bag, L"FriendlyName", &var, NULL); - ok(hr == E_INVALIDARG, "Got hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Got hr %#lx.\n", hr);
V_VT(&var) = VT_BSTR; hr = IPropertyBag_Read(prop_bag, L"FriendlyName", &var, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(V_VT(&var) == VT_BSTR, "Got type %#x.\n", V_VT(&var)); ok(!wcscmp(V_BSTR(&var), L"test"), "Got name %s.\n", wine_dbgstr_w(V_BSTR(&var)));
V_VT(&var) = VT_I4; V_I4(&var) = 0xdeadbeef; hr = IPropertyBag_Write(prop_bag, L"foobar", &var); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
V_VT(&var) = VT_EMPTY; hr = IPropertyBag_Read(prop_bag, L"foobar", &var, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(V_VT(&var) == VT_I4, "Got type %#x.\n", V_VT(&var)); - ok(V_I4(&var) == 0xdeadbeef, "Got value %#x.\n", V_I4(&var)); + ok(V_I4(&var) == 0xdeadbeef, "Got value %#lx.\n", V_I4(&var));
V_VT(&var) = VT_UI4; hr = IPropertyBag_Read(prop_bag, L"foobar", &var, NULL); - ok(hr == E_INVALIDARG, "Got hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Got hr %#lx.\n", hr); V_VT(&var) = VT_BSTR; hr = IPropertyBag_Read(prop_bag, L"foobar", &var, NULL); - ok(hr == E_INVALIDARG, "Got hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Got hr %#lx.\n", hr);
V_VT(&var) = VT_I4; hr = IPropertyBag_Read(prop_bag, L"foobar", &var, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(V_VT(&var) == VT_I4, "Got type %#x.\n", V_VT(&var)); - ok(V_I4(&var) == 0xdeadbeef, "Got value %#x.\n", V_I4(&var)); + ok(V_I4(&var) == 0xdeadbeef, "Got value %#lx.\n", V_I4(&var));
V_VT(&var) = VT_UI4; hr = IPropertyBag_Write(prop_bag, L"foobar", &var); - ok(hr == E_INVALIDARG, "Got hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Got hr %#lx.\n", hr);
V_VT(&var) = VT_ARRAY | VT_UI1; V_ARRAY(&var) = SafeArrayCreate(VT_UI1, 1, &bound); @@ -580,7 +580,7 @@ static void test_codec(void) memcpy(array_data, "test data", 10); SafeArrayUnaccessData(V_ARRAY(&var)); hr = IPropertyBag_Write(prop_bag, L"foobar", &var); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
/* unlike DirectShow filters, these are automatically generated, so * enumerating them will destroy the key */ @@ -588,7 +588,7 @@ static void test_codec(void)
VariantClear(&var); hr = IPropertyBag_Read(prop_bag, L"FriendlyName", &var, NULL); - ok(hr == HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND), "got %#x\n", hr); + ok(hr == HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND), "got %#lx\n", hr);
IPropertyBag_Release(prop_bag); IMoniker_Release(mon); @@ -611,7 +611,7 @@ static void test_dmo(const GUID *dmo_category, const GUID *enum_category) GUID clsid;
hr = CoCreateInstance(&CLSID_CDeviceMoniker, NULL, CLSCTX_INPROC, &IID_IParseDisplayName, (void **)&parser); - ok(hr == S_OK, "Failed to create ParseDisplayName: %#x\n", hr); + ok(hr == S_OK, "Failed to create ParseDisplayName: %#lx\n", hr);
wcscpy(buffer, L"@device:dmo:"); StringFromGUID2(&CLSID_TestFilter, buffer + wcslen(buffer), CHARS_IN_GUID); @@ -621,47 +621,47 @@ static void test_dmo(const GUID *dmo_category, const GUID *enum_category) ok(!find_moniker(enum_category, mon), "DMO should not be registered\n");
hr = IMoniker_BindToStorage(mon, NULL, NULL, &IID_IPropertyBag, (void **)&prop_bag); - ok(hr == S_OK, "got %#x\n", hr); + ok(hr == S_OK, "got %#lx\n", hr);
VariantInit(&var); hr = IPropertyBag_Read(prop_bag, L"FriendlyName", &var, NULL); - ok(hr == E_FAIL, "got %#x\n", hr); + ok(hr == E_FAIL, "got %#lx\n", hr);
V_VT(&var) = VT_BSTR; V_BSTR(&var) = SysAllocString(L"devenum test"); hr = IPropertyBag_Write(prop_bag, L"FriendlyName", &var); - ok(hr == E_ACCESSDENIED, "Write failed: %#x\n", hr); + ok(hr == E_ACCESSDENIED, "Write failed: %#lx\n", hr);
hr = DMORegister(L"devenum test", &CLSID_TestFilter, dmo_category, 0, 0, NULL, 0, NULL); if (hr != E_FAIL) { - ok(hr == S_OK, "got %#x\n", hr); + ok(hr == S_OK, "got %#lx\n", hr);
ok(find_moniker(enum_category, mon), "DMO should be registered\n");
VariantClear(&var); hr = IPropertyBag_Read(prop_bag, L"FriendlyName", &var, NULL); - ok(hr == S_OK, "got %#x\n", hr); + ok(hr == S_OK, "got %#lx\n", hr); ok(!wcscmp(V_BSTR(&var), L"devenum test"), "got %s\n", wine_dbgstr_w(V_BSTR(&var)));
VariantClear(&var); V_VT(&var) = VT_BSTR; V_BSTR(&var) = SysAllocString(L"devenum test"); hr = IPropertyBag_Write(prop_bag, L"FriendlyName", &var); - ok(hr == E_ACCESSDENIED, "Write failed: %#x\n", hr); + ok(hr == E_ACCESSDENIED, "Write failed: %#lx\n", hr);
VariantClear(&var); hr = IPropertyBag_Read(prop_bag, L"CLSID", &var, NULL); - ok(hr == HRESULT_FROM_WIN32(ERROR_NOT_FOUND), "got %#x\n", hr); + ok(hr == HRESULT_FROM_WIN32(ERROR_NOT_FOUND), "got %#lx\n", hr);
hr = DMOUnregister(&CLSID_TestFilter, dmo_category); - ok(hr == S_OK, "got %#x\n", hr); + ok(hr == S_OK, "got %#lx\n", hr); } IPropertyBag_Release(prop_bag); IMoniker_Release(mon);
hr = DMOEnum(&DMOCATEGORY_AUDIO_DECODER, 0, 0, NULL, 0, NULL, &enumdmo); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
while (IEnumDMO_Next(enumdmo, 1, &clsid, &name, NULL) == S_OK) { @@ -672,35 +672,35 @@ static void test_dmo(const GUID *dmo_category, const GUID *enum_category) ok(find_moniker(&DMOCATEGORY_AUDIO_DECODER, mon), "DMO was not found.\n");
hr = IMoniker_BindToStorage(mon, NULL, NULL, &IID_IPropertyBag, (void **)&prop_bag); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
VariantClear(&var); hr = IPropertyBag_Read(prop_bag, L"FriendlyName", &var, NULL); - ok(hr == S_OK, "got %#x\n", hr); + ok(hr == S_OK, "got %#lx\n", hr); ok(!wcscmp(V_BSTR(&var), name), "got %s\n", wine_dbgstr_w(V_BSTR(&var)));
VariantClear(&var); V_VT(&var) = VT_BSTR; V_BSTR(&var) = SysAllocString(L"devenum test"); hr = IPropertyBag_Write(prop_bag, L"FriendlyName", &var); - ok(hr == E_ACCESSDENIED, "Write failed: %#x\n", hr); + ok(hr == E_ACCESSDENIED, "Write failed: %#lx\n", hr);
VariantClear(&var); hr = IPropertyBag_Read(prop_bag, L"CLSID", &var, NULL); - ok(hr == HRESULT_FROM_WIN32(ERROR_NOT_FOUND), "got %#x\n", hr); + ok(hr == HRESULT_FROM_WIN32(ERROR_NOT_FOUND), "got %#lx\n", hr);
IPropertyBag_Release(prop_bag); CoTaskMemFree(name);
hr = IMoniker_BindToObject(mon, NULL, NULL, &IID_IBaseFilter, (void **)&filter); - ok(hr == S_OK, "got %#x\n", hr); + ok(hr == S_OK, "got %#lx\n", hr);
hr = IBaseFilter_GetClassID(filter, &clsid); - ok(hr == S_OK, "got %#x\n", hr); + ok(hr == S_OK, "got %#lx\n", hr); ok(IsEqualGUID(&clsid, &CLSID_DMOWrapperFilter), "Got CLSID %s.\n", debugstr_guid(&clsid));
hr = IBaseFilter_QueryInterface(filter, &IID_IMediaObject, (void **)&dmo); - ok(hr == S_OK, "got %#x\n", hr); + ok(hr == S_OK, "got %#lx\n", hr); IMediaObject_Release(dmo);
IBaseFilter_Release(filter); @@ -721,10 +721,10 @@ static void test_legacy_filter(void) HRESULT hr;
hr = CoCreateInstance(&CLSID_CDeviceMoniker, NULL, CLSCTX_INPROC, &IID_IParseDisplayName, (void **)&parser); - ok(hr == S_OK, "Failed to create ParseDisplayName: %#x\n", hr); + ok(hr == S_OK, "Failed to create ParseDisplayName: %#lx\n", hr);
hr = CoCreateInstance(&CLSID_FilterMapper2, NULL, CLSCTX_INPROC, &IID_IFilterMapper, (void **)&mapper); - ok(hr == S_OK, "Failed to create FilterMapper: %#x\n", hr); + ok(hr == S_OK, "Failed to create FilterMapper: %#lx\n", hr);
hr = IFilterMapper_RegisterFilter(mapper, CLSID_TestFilter, L"test", 0xdeadbeef); if (hr == VFW_E_BAD_KEY) @@ -732,7 +732,7 @@ static void test_legacy_filter(void) win_skip("not enough permissions to register filters\n"); goto end; } - ok(hr == S_OK, "RegisterFilter failed: %#x\n", hr); + ok(hr == S_OK, "RegisterFilter failed: %#lx\n", hr);
wcscpy(buffer, L"@device:cm:"); StringFromGUID2(&CLSID_LegacyAmFilterCategory, buffer + wcslen(buffer), CHARS_IN_GUID); @@ -743,11 +743,11 @@ static void test_legacy_filter(void) ok(find_moniker(&CLSID_LegacyAmFilterCategory, mon), "filter should be registered\n");
hr = IMoniker_BindToStorage(mon, NULL, NULL, &IID_IPropertyBag, (void **)&prop_bag); - ok(hr == S_OK, "BindToStorage failed: %#x\n", hr); + ok(hr == S_OK, "BindToStorage failed: %#lx\n", hr);
VariantInit(&var); hr = IPropertyBag_Read(prop_bag, L"FriendlyName", &var, NULL); - ok(hr == S_OK, "Read failed: %#x\n", hr); + ok(hr == S_OK, "Read failed: %#lx\n", hr);
StringFromGUID2(&CLSID_TestFilter, buffer, CHARS_IN_GUID); ok(!wcscmp(buffer, V_BSTR(&var)), "expected %s, got %s\n", @@ -755,7 +755,7 @@ static void test_legacy_filter(void)
VariantClear(&var); hr = IPropertyBag_Read(prop_bag, L"CLSID", &var, NULL); - ok(hr == S_OK, "Read failed: %#x\n", hr); + ok(hr == S_OK, "Read failed: %#lx\n", hr); ok(!wcscmp(buffer, V_BSTR(&var)), "expected %s, got %s\n", wine_dbgstr_w(buffer), wine_dbgstr_w(V_BSTR(&var)));
@@ -763,7 +763,7 @@ static void test_legacy_filter(void) IPropertyBag_Release(prop_bag);
hr = IFilterMapper_UnregisterFilter(mapper, CLSID_TestFilter); - ok(hr == S_OK, "UnregisterFilter failed: %#x\n", hr); + ok(hr == S_OK, "UnregisterFilter failed: %#lx\n", hr);
ok(!find_moniker(&CLSID_LegacyAmFilterCategory, mon), "filter should not be registered\n"); IMoniker_Release(mon); @@ -795,7 +795,7 @@ static BOOL CALLBACK test_dsound(GUID *guid, const WCHAR *desc, const WCHAR *mod }
hr = CoCreateInstance(&CLSID_CDeviceMoniker, NULL, CLSCTX_INPROC, &IID_IParseDisplayName, (void **)&parser); - ok(hr == S_OK, "Failed to create ParseDisplayName: %#x\n", hr); + ok(hr == S_OK, "Failed to create ParseDisplayName: %#lx\n", hr);
wcscpy(buffer, L"@device:cm:"); StringFromGUID2(&CLSID_AudioRendererCategory, buffer + wcslen(buffer), CHARS_IN_GUID); @@ -805,7 +805,7 @@ static BOOL CALLBACK test_dsound(GUID *guid, const WCHAR *desc, const WCHAR *mod mon = check_display_name(parser, buffer);
hr = IMoniker_BindToStorage(mon, NULL, NULL, &IID_IPropertyBag, (void **)&prop_bag); - ok(hr == S_OK, "BindToStorage failed: %#x\n", hr); + ok(hr == S_OK, "BindToStorage failed: %#lx\n", hr);
VariantInit(&var); hr = IPropertyBag_Read(prop_bag, L"FriendlyName", &var, NULL); @@ -823,19 +823,19 @@ static BOOL CALLBACK test_dsound(GUID *guid, const WCHAR *desc, const WCHAR *mod mon = check_display_name(parser, buffer);
hr = IMoniker_BindToStorage(mon, NULL, NULL, &IID_IPropertyBag, (void **)&prop_bag); - ok(hr == S_OK, "BindToStorage failed: %#x\n", hr); + ok(hr == S_OK, "BindToStorage failed: %#lx\n", hr);
VariantInit(&var); hr = IPropertyBag_Read(prop_bag, L"FriendlyName", &var, NULL); } - ok(hr == S_OK, "Read failed: %#x\n", hr); + ok(hr == S_OK, "Read failed: %#lx\n", hr);
ok(!wcscmp(name, V_BSTR(&var)), "expected %s, got %s\n", wine_dbgstr_w(name), wine_dbgstr_w(V_BSTR(&var)));
VariantClear(&var); hr = IPropertyBag_Read(prop_bag, L"CLSID", &var, NULL); - ok(hr == S_OK, "Read failed: %#x\n", hr); + ok(hr == S_OK, "Read failed: %#lx\n", hr);
StringFromGUID2(&CLSID_DSoundRender, buffer, CHARS_IN_GUID); ok(!wcscmp(buffer, V_BSTR(&var)), "expected %s, got %s\n", @@ -843,7 +843,7 @@ static BOOL CALLBACK test_dsound(GUID *guid, const WCHAR *desc, const WCHAR *mod
VariantClear(&var); hr = IPropertyBag_Read(prop_bag, L"DSGuid", &var, NULL); - ok(hr == S_OK, "Read failed: %#x\n", hr); + ok(hr == S_OK, "Read failed: %#lx\n", hr);
StringFromGUID2(guid, buffer, CHARS_IN_GUID); ok(!wcscmp(buffer, V_BSTR(&var)), "expected %s, got %s\n", @@ -871,7 +871,7 @@ static void test_waveout(void) HRESULT hr;
hr = CoCreateInstance(&CLSID_CDeviceMoniker, NULL, CLSCTX_INPROC, &IID_IParseDisplayName, (void **)&parser); - ok(hr == S_OK, "Failed to create ParseDisplayName: %#x\n", hr); + ok(hr == S_OK, "Failed to create ParseDisplayName: %#lx\n", hr);
count = waveOutGetNumDevs();
@@ -892,7 +892,7 @@ static void test_waveout(void) mon = check_display_name(parser, buffer);
hr = IMoniker_BindToStorage(mon, NULL, NULL, &IID_IPropertyBag, (void **)&prop_bag); - ok(hr == S_OK, "BindToStorage failed: %#x\n", hr); + ok(hr == S_OK, "BindToStorage failed: %#lx\n", hr);
VariantInit(&var); hr = IPropertyBag_Read(prop_bag, L"FriendlyName", &var, NULL); @@ -914,18 +914,18 @@ static void test_waveout(void) mon = check_display_name(parser, buffer);
hr = IMoniker_BindToStorage(mon, NULL, NULL, &IID_IPropertyBag, (void **)&prop_bag); - ok(hr == S_OK, "BindToStorage failed: %#x\n", hr); + ok(hr == S_OK, "BindToStorage failed: %#lx\n", hr);
hr = IPropertyBag_Read(prop_bag, L"FriendlyName", &var, NULL); } - ok(hr == S_OK, "Read failed: %#x\n", hr); + ok(hr == S_OK, "Read failed: %#lx\n", hr);
ok(!wcsncmp(name, V_BSTR(&var), wcslen(name)), "expected %s, got %s\n", wine_dbgstr_w(name), wine_dbgstr_w(V_BSTR(&var)));
VariantClear(&var); hr = IPropertyBag_Read(prop_bag, L"CLSID", &var, NULL); - ok(hr == S_OK, "Read failed: %#x\n", hr); + ok(hr == S_OK, "Read failed: %#lx\n", hr);
StringFromGUID2(&CLSID_AudioRender, buffer, CHARS_IN_GUID); ok(!wcscmp(buffer, V_BSTR(&var)), "expected %s, got %s\n", @@ -933,9 +933,9 @@ static void test_waveout(void)
VariantClear(&var); hr = IPropertyBag_Read(prop_bag, L"WaveOutId", &var, NULL); - ok(hr == S_OK, "Read failed: %#x\n", hr); + ok(hr == S_OK, "Read failed: %#lx\n", hr);
- ok(V_I4(&var) == i, "expected %d, got %d\n", i, V_I4(&var)); + ok(V_I4(&var) == i, "expected %d, got %ld\n", i, V_I4(&var));
IPropertyBag_Release(prop_bag); IMoniker_Release(mon); @@ -958,7 +958,7 @@ static void test_wavein(void) HRESULT hr;
hr = CoCreateInstance(&CLSID_CDeviceMoniker, NULL, CLSCTX_INPROC, &IID_IParseDisplayName, (void **)&parser); - ok(hr == S_OK, "Failed to create ParseDisplayName: %#x\n", hr); + ok(hr == S_OK, "Failed to create ParseDisplayName: %#lx\n", hr);
count = waveInGetNumDevs();
@@ -974,7 +974,7 @@ static void test_wavein(void) mon = check_display_name(parser, buffer);
hr = IMoniker_BindToStorage(mon, NULL, NULL, &IID_IPropertyBag, (void **)&prop_bag); - ok(hr == S_OK, "BindToStorage failed: %#x\n", hr); + ok(hr == S_OK, "BindToStorage failed: %#lx\n", hr);
VariantInit(&var); hr = IPropertyBag_Read(prop_bag, L"FriendlyName", &var, NULL); @@ -996,18 +996,18 @@ static void test_wavein(void) mon = check_display_name(parser, buffer);
hr = IMoniker_BindToStorage(mon, NULL, NULL, &IID_IPropertyBag, (void **)&prop_bag); - ok(hr == S_OK, "BindToStorage failed: %#x\n", hr); + ok(hr == S_OK, "BindToStorage failed: %#lx\n", hr);
hr = IPropertyBag_Read(prop_bag, L"FriendlyName", &var, NULL); } - ok(hr == S_OK, "Read failed: %#x\n", hr); + ok(hr == S_OK, "Read failed: %#lx\n", hr);
ok(!wcsncmp(caps.szPname, V_BSTR(&var), wcslen(caps.szPname)), "expected %s, got %s\n", wine_dbgstr_w(caps.szPname), wine_dbgstr_w(V_BSTR(&var)));
VariantClear(&var); hr = IPropertyBag_Read(prop_bag, L"CLSID", &var, NULL); - ok(hr == S_OK, "Read failed: %#x\n", hr); + ok(hr == S_OK, "Read failed: %#lx\n", hr);
StringFromGUID2(&CLSID_AudioRecord, buffer, CHARS_IN_GUID); ok(!wcscmp(buffer, V_BSTR(&var)), "expected %s, got %s\n", @@ -1015,9 +1015,9 @@ static void test_wavein(void)
VariantClear(&var); hr = IPropertyBag_Read(prop_bag, L"WaveInId", &var, NULL); - ok(hr == S_OK, "Read failed: %#x\n", hr); + ok(hr == S_OK, "Read failed: %#lx\n", hr);
- ok(V_I4(&var) == i, "expected %d, got %d\n", i, V_I4(&var)); + ok(V_I4(&var) == i, "expected %d, got %ld\n", i, V_I4(&var));
IPropertyBag_Release(prop_bag); IMoniker_Release(mon); @@ -1039,7 +1039,7 @@ static void test_midiout(void) HRESULT hr;
hr = CoCreateInstance(&CLSID_CDeviceMoniker, NULL, CLSCTX_INPROC, &IID_IParseDisplayName, (void **)&parser); - ok(hr == S_OK, "Failed to create ParseDisplayName: %#x\n", hr); + ok(hr == S_OK, "Failed to create ParseDisplayName: %#lx\n", hr);
count = midiOutGetNumDevs();
@@ -1060,18 +1060,18 @@ static void test_midiout(void) mon = check_display_name(parser, buffer);
hr = IMoniker_BindToStorage(mon, NULL, NULL, &IID_IPropertyBag, (void **)&prop_bag); - ok(hr == S_OK, "BindToStorage failed: %#x\n", hr); + ok(hr == S_OK, "BindToStorage failed: %#lx\n", hr);
VariantInit(&var); hr = IPropertyBag_Read(prop_bag, L"FriendlyName", &var, NULL); - ok(hr == S_OK, "Read failed: %#x\n", hr); + ok(hr == S_OK, "Read failed: %#lx\n", hr);
ok(!wcscmp(name, V_BSTR(&var)), "expected %s, got %s\n", wine_dbgstr_w(name), wine_dbgstr_w(V_BSTR(&var)));
VariantClear(&var); hr = IPropertyBag_Read(prop_bag, L"CLSID", &var, NULL); - ok(hr == S_OK, "Read failed: %#x\n", hr); + ok(hr == S_OK, "Read failed: %#lx\n", hr);
StringFromGUID2(&CLSID_AVIMIDIRender, buffer, CHARS_IN_GUID); ok(!wcscmp(buffer, V_BSTR(&var)), "expected %s, got %s\n", @@ -1079,9 +1079,9 @@ static void test_midiout(void)
VariantClear(&var); hr = IPropertyBag_Read(prop_bag, L"MidiOutId", &var, NULL); - ok(hr == S_OK, "Read failed: %#x\n", hr); + ok(hr == S_OK, "Read failed: %#lx\n", hr);
- ok(V_I4(&var) == i, "expected %d, got %d\n", i, V_I4(&var)); + ok(V_I4(&var) == i, "expected %d, got %ld\n", i, V_I4(&var));
IPropertyBag_Release(prop_bag); IMoniker_Release(mon); @@ -1109,7 +1109,7 @@ static void test_vfw(void) }
hr = CoCreateInstance(&CLSID_CDeviceMoniker, NULL, CLSCTX_INPROC, &IID_IParseDisplayName, (void **)&parser); - ok(hr == S_OK, "Failed to create ParseDisplayName: %#x\n", hr); + ok(hr == S_OK, "Failed to create ParseDisplayName: %#lx\n", hr);
while (ICInfo(ICTYPE_VIDEO, i++, &info)) { @@ -1128,18 +1128,18 @@ static void test_vfw(void) mon = check_display_name(parser, buffer);
hr = IMoniker_BindToStorage(mon, NULL, NULL, &IID_IPropertyBag, (void **)&prop_bag); - ok(hr == S_OK, "BindToStorage failed: %#x\n", hr); + ok(hr == S_OK, "BindToStorage failed: %#lx\n", hr);
VariantInit(&var); hr = IPropertyBag_Read(prop_bag, L"FriendlyName", &var, NULL); - ok(hr == S_OK, "Read failed: %#x\n", hr); + ok(hr == S_OK, "Read failed: %#lx\n", hr);
ok(!wcscmp(info.szDescription, V_BSTR(&var)), "expected %s, got %s\n", wine_dbgstr_w(info.szDescription), wine_dbgstr_w(V_BSTR(&var)));
VariantClear(&var); hr = IPropertyBag_Read(prop_bag, L"CLSID", &var, NULL); - ok(hr == S_OK, "Read failed: %#x\n", hr); + ok(hr == S_OK, "Read failed: %#lx\n", hr);
StringFromGUID2(&CLSID_AVICo, buffer, CHARS_IN_GUID); ok(!wcscmp(buffer, V_BSTR(&var)), "expected %s, got %s\n", @@ -1147,7 +1147,7 @@ static void test_vfw(void)
VariantClear(&var); hr = IPropertyBag_Read(prop_bag, L"FccHandler", &var, NULL); - ok(hr == S_OK, "Read failed: %#x\n", hr); + ok(hr == S_OK, "Read failed: %#lx\n", hr); ok(!wcscmp(name, V_BSTR(&var)), "expected %s, got %s\n", wine_dbgstr_w(name), wine_dbgstr_w(V_BSTR(&var)));
@@ -1176,7 +1176,7 @@ START_TEST(devenum)
test_legacy_filter(); hr = DirectSoundEnumerateW(test_dsound, NULL); - ok(hr == S_OK, "got %#x\n", hr); + ok(hr == S_OK, "got %#lx\n", hr); test_waveout(); test_wavein(); test_midiout();
Signed-off-by: Eric Pouech eric.pouech@gmail.com
--- dlls/dhcpcsvc/tests/Makefile.in | 1 - dlls/dhcpcsvc/tests/dhcpcsvc.c | 18 +++++++++--------- 2 files changed, 9 insertions(+), 10 deletions(-)
diff --git a/dlls/dhcpcsvc/tests/Makefile.in b/dlls/dhcpcsvc/tests/Makefile.in index 1f1e6acb7ce..47440eb2cd4 100644 --- a/dlls/dhcpcsvc/tests/Makefile.in +++ b/dlls/dhcpcsvc/tests/Makefile.in @@ -1,4 +1,3 @@ -EXTRADEFS = -DWINE_NO_LONG_TYPES TESTDLL = dhcpcsvc.dll IMPORTS = dhcpcsvc iphlpapi
diff --git a/dlls/dhcpcsvc/tests/dhcpcsvc.c b/dlls/dhcpcsvc/tests/dhcpcsvc.c index 547fb515329..52b1b150ad8 100644 --- a/dlls/dhcpcsvc/tests/dhcpcsvc.c +++ b/dlls/dhcpcsvc/tests/dhcpcsvc.c @@ -56,24 +56,24 @@ static void test_DhcpRequestParams(void) for (ptr = adapters; ptr; ptr = ptr->Next) { MultiByteToWideChar( CP_ACP, 0, ptr->AdapterName, -1, name, ARRAY_SIZE(name) ); - trace( "adapter '%s' type %u dhcpv4 enabled %d\n", wine_dbgstr_w(ptr->Description), ptr->IfType, ptr->Dhcpv4Enabled ); + trace( "adapter '%s' type %lu dhcpv4 enabled %d\n", wine_dbgstr_w(ptr->Description), ptr->IfType, ptr->Dhcpv4Enabled );
if (ptr->IfType == IF_TYPE_SOFTWARE_LOOPBACK) continue;
memset( &send_params, 0, sizeof(send_params) ); memset( &recv_params, 0, sizeof(recv_params) ); err = DhcpRequestParams( DHCPCAPI_REQUEST_SYNCHRONOUS, NULL, NULL, NULL, send_params, recv_params, NULL, NULL, NULL ); - ok( err == ERROR_INVALID_PARAMETER, "got %u\n", err ); + ok( err == ERROR_INVALID_PARAMETER, "got %lu\n", err );
err = DhcpRequestParams( DHCPCAPI_REQUEST_SYNCHRONOUS, NULL, nosuchW, NULL, send_params, recv_params, NULL, NULL, NULL ); - ok( err == ERROR_INVALID_PARAMETER, "got %u\n", err ); + ok( err == ERROR_INVALID_PARAMETER, "got %lu\n", err );
err = DhcpRequestParams( DHCPCAPI_REQUEST_SYNCHRONOUS, NULL, name, NULL, send_params, recv_params, NULL, NULL, NULL ); - ok( err == ERROR_INVALID_PARAMETER, "got %u\n", err ); + ok( err == ERROR_INVALID_PARAMETER, "got %lu\n", err );
size = 0; err = DhcpRequestParams( DHCPCAPI_REQUEST_SYNCHRONOUS, NULL, name, NULL, send_params, recv_params, NULL, &size, NULL ); - ok( err == ERROR_INVALID_PARAMETER, "got %u\n", err ); + ok( err == ERROR_INVALID_PARAMETER, "got %lu\n", err );
memset( params, 0, sizeof(params) ); params[0].OptionId = OPTION_SUBNET_MASK; @@ -106,8 +106,8 @@ static void test_DhcpRequestParams(void) case OPTION_BROADCAST_ADDRESS: if (params[i].Data) { - ok( params[i].nBytesData == sizeof(DWORD), "got %u\n", params[i].nBytesData ); - trace( "%u: Data %p (%08x) nBytesData %u OptionId %u Flags %08x IsVendor %d\n", + ok( params[i].nBytesData == sizeof(DWORD), "got %lu\n", params[i].nBytesData ); + trace( "%lu: Data %p (%08lx) nBytesData %lu OptionId %lu Flags %08lx IsVendor %d\n", i, params[i].Data, *(DWORD *)params[i].Data, params[i].nBytesData, params[i].OptionId, params[i].Flags, params[i].IsVendor ); } @@ -120,14 +120,14 @@ static void test_DhcpRequestParams(void) char *str = HeapAlloc( GetProcessHeap(), 0, params[i].nBytesData + 1 ); memcpy( str, params[i].Data, params[i].nBytesData ); str[params[i].nBytesData] = 0; - trace( "%u: Data %p (%s) nBytesData %u OptionId %u Flags %08x IsVendor %d\n", + trace( "%lu: Data %p (%s) nBytesData %lu OptionId %lu Flags %08lx IsVendor %d\n", i, params[i].Data, str, params[i].nBytesData, params[i].OptionId, params[i].Flags, params[i].IsVendor ); HeapFree( GetProcessHeap(), 0, str ); } break; default: - ok( 0, "unexpected option %u\n", params[i].OptionId ); + ok( 0, "unexpected option %lu\n", params[i].OptionId ); break; } }
Signed-off-by: Eric Pouech eric.pouech@gmail.com
--- dlls/directmanipulation/tests/Makefile.in | 1 - dlls/directmanipulation/tests/manipulation.c | 4 ++-- 2 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/dlls/directmanipulation/tests/Makefile.in b/dlls/directmanipulation/tests/Makefile.in index 6fa94fa3cc6..29ec0db511a 100644 --- a/dlls/directmanipulation/tests/Makefile.in +++ b/dlls/directmanipulation/tests/Makefile.in @@ -1,4 +1,3 @@ -EXTRADEFS = -DWINE_NO_LONG_TYPES TESTDLL = directmanipulation.dll IMPORTS = uuid ole32
diff --git a/dlls/directmanipulation/tests/manipulation.c b/dlls/directmanipulation/tests/manipulation.c index 93b692729b3..92c8ddd9edd 100644 --- a/dlls/directmanipulation/tests/manipulation.c +++ b/dlls/directmanipulation/tests/manipulation.c @@ -39,10 +39,10 @@ static void test_IDirectManipulationManager2(void) win_skip("Failed to create XMLView instance\n"); return; } - ok(hres == S_OK, "CoCreateInstance returned %x, expected S_OK\n", hres); + ok(hres == S_OK, "CoCreateInstance returned %lx, expected S_OK\n", hres);
hres = IDirectManipulationManager2_GetUpdateManager(manager2, &IID_IDirectManipulationUpdateManager, (void**)&update); - ok(hres == S_OK, "returned %x, expected S_OK\n", hres); + ok(hres == S_OK, "returned %lx, expected S_OK\n", hres);
if(update) IDirectManipulationUpdateManager_Release(update);
Signed-off-by: Eric Pouech eric.pouech@gmail.com
--- include/ddraw.h | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-)
diff --git a/include/ddraw.h b/include/ddraw.h index 0c14c468121..14aa0c44e6d 100644 --- a/include/ddraw.h +++ b/include/ddraw.h @@ -858,17 +858,17 @@ typedef struct _DDPIXELFORMAT { #define DDFXALPHACAPS_OVERLAYALPHASURFACESNEG 0x00000200
/* DDCAPS.dwPalCaps */ -#define DDPCAPS_4BIT 0x00000001 -#define DDPCAPS_8BITENTRIES 0x00000002 -#define DDPCAPS_8BIT 0x00000004 -#define DDPCAPS_INITIALIZE 0x00000008 -#define DDPCAPS_PRIMARYSURFACE 0x00000010 -#define DDPCAPS_PRIMARYSURFACELEFT 0x00000020 -#define DDPCAPS_ALLOW256 0x00000040 -#define DDPCAPS_VSYNC 0x00000080 -#define DDPCAPS_1BIT 0x00000100 -#define DDPCAPS_2BIT 0x00000200 -#define DDPCAPS_ALPHA 0x00000400 +#define DDPCAPS_4BIT 0x00000001l +#define DDPCAPS_8BITENTRIES 0x00000002l +#define DDPCAPS_8BIT 0x00000004l +#define DDPCAPS_INITIALIZE 0x00000008l +#define DDPCAPS_PRIMARYSURFACE 0x00000010l +#define DDPCAPS_PRIMARYSURFACELEFT 0x00000020l +#define DDPCAPS_ALLOW256 0x00000040l +#define DDPCAPS_VSYNC 0x00000080l +#define DDPCAPS_1BIT 0x00000100l +#define DDPCAPS_2BIT 0x00000200l +#define DDPCAPS_ALPHA 0x00000400l
/* DDCAPS.dwSVCaps */ /* the first 4 of these are now obsolete */
Signed-off-by: Eric Pouech eric.pouech@gmail.com
--- dlls/dplayx/tests/dplayx.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/dlls/dplayx/tests/dplayx.c b/dlls/dplayx/tests/dplayx.c index d71df8838f7..11d96706e9f 100644 --- a/dlls/dplayx/tests/dplayx.c +++ b/dlls/dplayx/tests/dplayx.c @@ -6864,7 +6864,8 @@ done: /* taken from programs/winetest/main.c */ static BOOL is_stub_dll(const char *filename) { - DWORD size, ver; + UINT size; + DWORD ver; BOOL isstub = FALSE; char *p, *data;
Signed-off-by: Alistair Leslie-Hughes leslie_alistair@hotmail.com
Signed-off-by: Eric Pouech eric.pouech@gmail.com
--- dlls/dplayx/tests/dplayx.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-)
diff --git a/dlls/dplayx/tests/dplayx.c b/dlls/dplayx/tests/dplayx.c index 11d96706e9f..75c05cbb282 100644 --- a/dlls/dplayx/tests/dplayx.c +++ b/dlls/dplayx/tests/dplayx.c @@ -45,11 +45,15 @@ static HRESULT (WINAPI *pDirectPlayCreate)( GUID *GUID, LPDIRECTPLAY *lplpDP, IU ok( (result != NULL) && (!strcmp(expected, result)), \ "expected=%s got=%s\n", \ expected, result ); -#define checkFlags(expected, result, flags) \ - ok( (expected) == (result), \ - "expected=0x%08x(%s) got=0x%08x(%s)\n", \ - expected, dwFlags2str(expected, flags), \ +static LPCSTR dwFlags2str(DWORD dwFlags, DWORD flagType); +#define checkFlags(expected, result, flags) checkFlags_(__LINE__, expected, result, flags) +static void checkFlags_(unsigned line, DWORD expected, DWORD result, DWORD flags) +{ + ok_(__FILE__, line)( expected == result, + "expected=0x%08x(%s) got=0x%08x(%s)\n", + expected, dwFlags2str(expected, flags), result, dwFlags2str(result, flags) ); +} #define checkGuid(expected, result) \ ok( IsEqualGUID(expected, result), \ "expected=%s got=%s\n", \
Signed-off-by: Alistair Leslie-Hughes leslie_alistair@hotmail.com
Signed-off-by: Eric Pouech eric.pouech@gmail.com
--- dlls/dplayx/tests/Makefile.in | 1 dlls/dplayx/tests/dplayx.c | 120 +++++++++++++++++++++-------------------- 2 files changed, 60 insertions(+), 61 deletions(-)
diff --git a/dlls/dplayx/tests/Makefile.in b/dlls/dplayx/tests/Makefile.in index 7295078c722..b55ec38acc9 100644 --- a/dlls/dplayx/tests/Makefile.in +++ b/dlls/dplayx/tests/Makefile.in @@ -1,4 +1,3 @@ -EXTRADEFS = -DWINE_NO_LONG_TYPES TESTDLL = dplayx.dll IMPORTS = ole32 oleaut32 version advapi32
diff --git a/dlls/dplayx/tests/dplayx.c b/dlls/dplayx/tests/dplayx.c index 75c05cbb282..6cc149bac95 100644 --- a/dlls/dplayx/tests/dplayx.c +++ b/dlls/dplayx/tests/dplayx.c @@ -50,7 +50,7 @@ static LPCSTR dwFlags2str(DWORD dwFlags, DWORD flagType); static void checkFlags_(unsigned line, DWORD expected, DWORD result, DWORD flags) { ok_(__FILE__, line)( expected == result, - "expected=0x%08x(%s) got=0x%08x(%s)\n", + "expected=0x%08lx(%s) got=0x%08lx(%s)\n", expected, dwFlags2str(expected, flags), result, dwFlags2str(result, flags) ); } @@ -58,10 +58,10 @@ static void checkFlags_(unsigned line, DWORD expected, DWORD result, DWORD flags ok( IsEqualGUID(expected, result), \ "expected=%s got=%s\n", \ Guid2str(expected), Guid2str(result) ); -#define checkConv(expected, result, function) \ - ok( (expected) == (result), \ - "expected=0x%08x(%s) got=0x%08x(%s)\n", \ - expected, function(expected), \ +#define checkConv(expected, result, function) \ + ok( (expected) == (result), \ + "expected=0x%08x(%s) got=0x%08lx(%s)\n", \ + expected, function(expected), \ result, function(result) );
@@ -218,7 +218,7 @@ static LPCSTR dpResult2str(HRESULT hr) default: { LPSTR buffer = get_temp_buffer(); - sprintf( buffer, "%d", HRESULT_CODE(hr) ); + sprintf( buffer, "%ld", HRESULT_CODE(hr) ); return buffer; } } @@ -639,7 +639,7 @@ static void check_messages( IDirectPlay4 *pDP, DPID *dpid, DWORD dpidSize, callbackData->szTrace1[ 3*i+1 ] = dpid2char( dpid, dpidSize, idTo ); callbackData->szTrace1[ 3*i+2 ] = ',';
- sprintf( temp, "%d,", dwDataSize ); + sprintf( temp, "%ld,", dwDataSize ); strcat( callbackData->szTrace2, temp );
dwDataSize = 1024; @@ -780,7 +780,7 @@ static BOOL CALLBACK callback_providersA(GUID* guid, char *name, DWORD major, DW }
if (prov->ret_value) /* Only trace when looping all providers */ - trace("Provider #%d '%s' (%d.%d)\n", prov->call_count, name, major, minor); + trace("Provider #%d '%s' (%ld.%ld)\n", prov->call_count, name, major, minor); return prov->ret_value; }
@@ -816,12 +816,12 @@ static void test_EnumerateProviders(void) SetLastError(0xdeadbeef); hr = pDirectPlayEnumerateA(NULL, &arg); ok(FAILED(hr), "DirectPlayEnumerateA expected to fail\n"); - ok(GetLastError() == 0xdeadbeef, "Expected 0xdeadbeef, got 0x%x\n", GetLastError()); + ok(GetLastError() == 0xdeadbeef, "Expected 0xdeadbeef, got 0x%lx\n", GetLastError());
SetLastError(0xdeadbeef); hr = pDirectPlayEnumerateA(NULL, NULL); ok(FAILED(hr), "DirectPlayEnumerateA expected to fail\n"); - ok(GetLastError() == 0xdeadbeef, "Expected 0xdeadbeef, got 0x%x\n", GetLastError()); + ok(GetLastError() == 0xdeadbeef, "Expected 0xdeadbeef, got 0x%lx\n", GetLastError());
hr = pDirectPlayEnumerateA(callback_providersA, &arg); ok(SUCCEEDED(hr), "DirectPlayEnumerateA failed\n"); @@ -846,12 +846,12 @@ static void test_EnumerateProviders(void) SetLastError(0xdeadbeef); hr = pDirectPlayEnumerateW(NULL, &arg); ok(FAILED(hr), "DirectPlayEnumerateW expected to fail\n"); - ok(GetLastError() == 0xdeadbeef, "Expected 0xdeadbeef, got 0x%x\n", GetLastError()); + ok(GetLastError() == 0xdeadbeef, "Expected 0xdeadbeef, got 0x%lx\n", GetLastError());
SetLastError(0xdeadbeef); hr = pDirectPlayEnumerateW(NULL, NULL); ok(FAILED(hr), "DirectPlayEnumerateW expected to fail\n"); - ok(GetLastError() == 0xdeadbeef, "Expected 0xdeadbeef, got 0x%x\n", GetLastError()); + ok(GetLastError() == 0xdeadbeef, "Expected 0xdeadbeef, got 0x%lx\n", GetLastError());
memset(&arg, 0, sizeof(arg)); arg.ret_value = TRUE; @@ -6561,64 +6561,64 @@ static void test_COM(void) hr = CoCreateInstance(&CLSID_DirectPlay, (IUnknown*)0xdeadbeef, CLSCTX_INPROC_SERVER, &IID_IUnknown, (void**)&dp4); ok(hr == CLASS_E_NOAGGREGATION || broken(hr == E_INVALIDARG), - "DirectPlay create failed: %08x, expected CLASS_E_NOAGGREGATION\n", hr); + "DirectPlay create failed: %08lx, expected CLASS_E_NOAGGREGATION\n", hr); ok(!dp4 || dp4 == (IDirectPlay4*)0xdeadbeef, "dp4 = %p\n", dp4);
/* Invalid RIID */ hr = CoCreateInstance(&CLSID_DirectPlay, NULL, CLSCTX_INPROC_SERVER, &IID_IDirectPlayLobby, (void**)&dp4); - ok(hr == E_NOINTERFACE, "DirectPlay create failed: %08x, expected E_NOINTERFACE\n", hr); + ok(hr == E_NOINTERFACE, "DirectPlay create failed: %08lx, expected E_NOINTERFACE\n", hr);
/* Different refcount for all DirectPlay Interfaces */ hr = CoCreateInstance(&CLSID_DirectPlay, NULL, CLSCTX_INPROC_SERVER, &IID_IDirectPlay4, (void**)&dp4); - ok(hr == S_OK, "DirectPlay create failed: %08x, expected S_OK\n", hr); + ok(hr == S_OK, "DirectPlay create failed: %08lx, expected S_OK\n", hr); refcount = IDirectPlayX_AddRef(dp4); - ok(refcount == 2, "refcount == %u, expected 2\n", refcount); + ok(refcount == 2, "refcount == %lu, expected 2\n", refcount);
hr = IDirectPlayX_QueryInterface(dp4, &IID_IDirectPlay2A, (void**)&dp2A); - ok(hr == S_OK, "QueryInterface for IID_IDirectPlay2A failed: %08x\n", hr); + ok(hr == S_OK, "QueryInterface for IID_IDirectPlay2A failed: %08lx\n", hr); refcount = IDirectPlay2_AddRef(dp2A); - ok(refcount == 2, "refcount == %u, expected 2\n", refcount); + ok(refcount == 2, "refcount == %lu, expected 2\n", refcount); IDirectPlay2_Release(dp2A);
hr = IDirectPlayX_QueryInterface(dp4, &IID_IDirectPlay2, (void**)&dp2); - ok(hr == S_OK, "QueryInterface for IID_IDirectPlay2 failed: %08x\n", hr); + ok(hr == S_OK, "QueryInterface for IID_IDirectPlay2 failed: %08lx\n", hr); refcount = IDirectPlay2_AddRef(dp2); - ok(refcount == 2, "refcount == %u, expected 2\n", refcount); + ok(refcount == 2, "refcount == %lu, expected 2\n", refcount); IDirectPlay2_Release(dp2);
hr = IDirectPlayX_QueryInterface(dp4, &IID_IDirectPlay3A, (void**)&dp3A); - ok(hr == S_OK, "QueryInterface for IID_IDirectPlay3A failed: %08x\n", hr); + ok(hr == S_OK, "QueryInterface for IID_IDirectPlay3A failed: %08lx\n", hr); refcount = IDirectPlay3_AddRef(dp3A); - ok(refcount == 2, "refcount == %u, expected 2\n", refcount); + ok(refcount == 2, "refcount == %lu, expected 2\n", refcount); IDirectPlay3_Release(dp3A);
hr = IDirectPlayX_QueryInterface(dp4, &IID_IDirectPlay3, (void**)&dp3); - ok(hr == S_OK, "QueryInterface for IID_IDirectPlay3 failed: %08x\n", hr); + ok(hr == S_OK, "QueryInterface for IID_IDirectPlay3 failed: %08lx\n", hr); refcount = IDirectPlay3_AddRef(dp3); - ok(refcount == 2, "refcount == %u, expected 2\n", refcount); + ok(refcount == 2, "refcount == %lu, expected 2\n", refcount); IDirectPlay3_Release(dp3);
hr = IDirectPlayX_QueryInterface(dp4, &IID_IDirectPlay4A, (void**)&dp4A); - ok(hr == S_OK, "QueryInterface for IID_IDirectPlay4A failed: %08x\n", hr); + ok(hr == S_OK, "QueryInterface for IID_IDirectPlay4A failed: %08lx\n", hr); refcount = IDirectPlayX_AddRef(dp4A); - ok(refcount == 2, "refcount == %u, expected 2\n", refcount); + ok(refcount == 2, "refcount == %lu, expected 2\n", refcount); IDirectPlayX_Release(dp4A);
/* IDirectPlay and IUnknown share a refcount */ hr = IDirectPlayX_QueryInterface(dp4, &IID_IDirectPlay, (void**)&dp); - ok(hr == S_OK, "QueryInterface for IID_IDirectPlay failed: %08x\n", hr); + ok(hr == S_OK, "QueryInterface for IID_IDirectPlay failed: %08lx\n", hr); refcount = IDirectPlayX_AddRef(dp); - ok(refcount == 2, "refcount == %u, expected 2\n", refcount); + ok(refcount == 2, "refcount == %lu, expected 2\n", refcount); IDirectPlay_Release(dp);
hr = IDirectPlayX_QueryInterface(dp4, &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: %08lx\n", hr); refcount = IUnknown_AddRef(unk); - ok(refcount == 3, "refcount == %u, expected 3\n", refcount); + ok(refcount == 3, "refcount == %lu, expected 3\n", refcount); refcount = IUnknown_Release(unk); - ok(refcount == 2, "refcount == %u, expected 2\n", refcount); + ok(refcount == 2, "refcount == %lu, expected 2\n", refcount);
IUnknown_Release(unk); IDirectPlay_Release(dp); @@ -6629,7 +6629,7 @@ static void test_COM(void) IDirectPlay2_Release(dp2A); IDirectPlayX_Release(dp4); refcount = IDirectPlayX_Release(dp4); - ok(refcount == 0, "refcount == %u, expected 0\n", refcount); + ok(refcount == 0, "refcount == %lu, expected 0\n", refcount); }
static void test_COM_dplobby(void) @@ -6648,56 +6648,56 @@ static void test_COM_dplobby(void) hr = CoCreateInstance(&CLSID_DirectPlayLobby, (IUnknown*)0xdeadbeef, CLSCTX_INPROC_SERVER, &IID_IUnknown, (void**)&dpl); ok(hr == CLASS_E_NOAGGREGATION || broken(hr == E_INVALIDARG), - "DirectPlayLobby create failed: %08x, expected CLASS_E_NOAGGREGATION\n", hr); + "DirectPlayLobby create failed: %08lx, expected CLASS_E_NOAGGREGATION\n", hr); ok(!dpl || dpl == (IDirectPlayLobby*)0xdeadbeef, "dpl = %p\n", dpl);
/* Invalid RIID */ hr = CoCreateInstance(&CLSID_DirectPlayLobby, NULL, CLSCTX_INPROC_SERVER, &IID_IDirectPlay, (void**)&dpl); - ok(hr == E_NOINTERFACE, "DirectPlayLobby create failed: %08x, expected E_NOINTERFACE\n", hr); + ok(hr == E_NOINTERFACE, "DirectPlayLobby create failed: %08lx, expected E_NOINTERFACE\n", hr);
/* Different refcount for all DirectPlayLobby Interfaces */ hr = CoCreateInstance(&CLSID_DirectPlayLobby, NULL, CLSCTX_INPROC_SERVER, &IID_IDirectPlayLobby, (void**)&dpl); - ok(hr == S_OK, "DirectPlayLobby create failed: %08x, expected S_OK\n", hr); + ok(hr == S_OK, "DirectPlayLobby create failed: %08lx, expected S_OK\n", hr); refcount = IDirectPlayLobby_AddRef(dpl); - ok(refcount == 2, "refcount == %u, expected 2\n", refcount); + ok(refcount == 2, "refcount == %lu, expected 2\n", refcount);
hr = IDirectPlayLobby_QueryInterface(dpl, &IID_IDirectPlayLobbyA, (void**)&dplA); - ok(hr == S_OK, "QueryInterface for IID_IDirectPlayLobbyA failed: %08x\n", hr); + ok(hr == S_OK, "QueryInterface for IID_IDirectPlayLobbyA failed: %08lx\n", hr); refcount = IDirectPlayLobby_AddRef(dplA); - ok(refcount == 2, "refcount == %u, expected 2\n", refcount); + ok(refcount == 2, "refcount == %lu, expected 2\n", refcount); IDirectPlayLobby_Release(dplA);
hr = IDirectPlayLobby_QueryInterface(dpl, &IID_IDirectPlayLobby2, (void**)&dpl2); - ok(hr == S_OK, "QueryInterface for IID_IDirectPlayLobby2 failed: %08x\n", hr); + ok(hr == S_OK, "QueryInterface for IID_IDirectPlayLobby2 failed: %08lx\n", hr); refcount = IDirectPlayLobby_AddRef(dpl2); - ok(refcount == 2, "refcount == %u, expected 2\n", refcount); + ok(refcount == 2, "refcount == %lu, expected 2\n", refcount); IDirectPlayLobby_Release(dpl2);
hr = IDirectPlayLobby_QueryInterface(dpl, &IID_IDirectPlayLobby2A, (void**)&dpl2A); - ok(hr == S_OK, "QueryInterface for IID_IDirectPlayLobby2A failed: %08x\n", hr); + ok(hr == S_OK, "QueryInterface for IID_IDirectPlayLobby2A failed: %08lx\n", hr); refcount = IDirectPlayLobby_AddRef(dpl2A); - ok(refcount == 2, "refcount == %u, expected 2\n", refcount); + ok(refcount == 2, "refcount == %lu, expected 2\n", refcount); IDirectPlayLobby_Release(dpl2A);
hr = IDirectPlayLobby_QueryInterface(dpl, &IID_IDirectPlayLobby3, (void**)&dpl3); - ok(hr == S_OK, "QueryInterface for IID_IDirectPlayLobby3 failed: %08x\n", hr); + ok(hr == S_OK, "QueryInterface for IID_IDirectPlayLobby3 failed: %08lx\n", hr); refcount = IDirectPlayLobby_AddRef(dpl3); - ok(refcount == 2, "refcount == %u, expected 2\n", refcount); + ok(refcount == 2, "refcount == %lu, expected 2\n", refcount); IDirectPlayLobby_Release(dpl3);
hr = IDirectPlayLobby_QueryInterface(dpl, &IID_IDirectPlayLobby3A, (void**)&dpl3A); - ok(hr == S_OK, "QueryInterface for IID_IDirectPlayLobby3A failed: %08x\n", hr); + ok(hr == S_OK, "QueryInterface for IID_IDirectPlayLobby3A failed: %08lx\n", hr); refcount = IDirectPlayLobby_AddRef(dpl3A); - ok(refcount == 2, "refcount == %u, expected 2\n", refcount); + ok(refcount == 2, "refcount == %lu, expected 2\n", refcount); IDirectPlayLobby_Release(dpl3A);
/* IDirectPlayLobby and IUnknown share a refcount */ hr = IDirectPlayX_QueryInterface(dpl, &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: %08lx\n", hr); refcount = IUnknown_AddRef(unk); - ok(refcount == 4, "refcount == %u, expected 4\n", refcount); + ok(refcount == 4, "refcount == %lu, expected 4\n", refcount); IDirectPlayLobby_Release(unk);
IUnknown_Release(unk); @@ -6708,7 +6708,7 @@ static void test_COM_dplobby(void) IDirectPlayLobby_Release(dplA); IDirectPlayLobby_Release(dpl); refcount = IDirectPlayLobby_Release(dpl); - ok(refcount == 0, "refcount == %u, expected 0\n", refcount); + ok(refcount == 0, "refcount == %lu, expected 0\n", refcount); }
enum firewall_op @@ -6745,18 +6745,18 @@ static BOOL is_firewall_enabled(void)
hr = CoCreateInstance( &CLSID_NetFwMgr, NULL, CLSCTX_INPROC_SERVER, &IID_INetFwMgr, (void **)&mgr ); - ok( hr == S_OK, "got %08x\n", hr ); + ok( hr == S_OK, "got %08lx\n", hr ); if (hr != S_OK) goto done;
hr = INetFwMgr_get_LocalPolicy( mgr, &policy ); - ok( hr == S_OK, "got %08x\n", hr ); + ok( hr == S_OK, "got %08lx\n", hr ); if (hr != S_OK) goto done;
hr = INetFwPolicy_get_CurrentProfile( policy, &profile ); if (hr != S_OK) goto done;
hr = INetFwProfile_get_FirewallEnabled( profile, &enabled ); - ok( hr == S_OK, "got %08x\n", hr ); + ok( hr == S_OK, "got %08lx\n", hr );
done: if (policy) INetFwPolicy_Release( policy ); @@ -6794,23 +6794,23 @@ static HRESULT set_firewall( enum firewall_op op )
hr = CoCreateInstance( &CLSID_NetFwMgr, NULL, CLSCTX_INPROC_SERVER, &IID_INetFwMgr, (void **)&mgr ); - ok( hr == S_OK, "got %08x\n", hr ); + ok( hr == S_OK, "got %08lx\n", hr ); if (hr != S_OK) goto done;
hr = INetFwMgr_get_LocalPolicy( mgr, &policy ); - ok( hr == S_OK, "got %08x\n", hr ); + ok( hr == S_OK, "got %08lx\n", hr ); if (hr != S_OK) goto done;
hr = INetFwPolicy_get_CurrentProfile( policy, &profile ); if (hr != S_OK) goto done;
hr = INetFwProfile_get_AuthorizedApplications( profile, &apps ); - ok( hr == S_OK, "got %08x\n", hr ); + ok( hr == S_OK, "got %08lx\n", hr ); if (hr != S_OK) goto done;
hr = CoCreateInstance( &CLSID_NetFwAuthorizedApplication, NULL, CLSCTX_INPROC_SERVER, &IID_INetFwAuthorizedApplication, (void **)&app ); - ok( hr == S_OK, "got %08x\n", hr ); + ok( hr == S_OK, "got %08lx\n", hr ); if (hr != S_OK) goto done;
hr = INetFwAuthorizedApplication_put_ProcessImageFileName( app, image ); @@ -6819,7 +6819,7 @@ static HRESULT set_firewall( enum firewall_op op ) name = SysAllocString( L"dplay_client" ); hr = INetFwAuthorizedApplication_put_Name( app, name ); SysFreeString( name ); - ok( hr == S_OK, "got %08x\n", hr ); + ok( hr == S_OK, "got %08lx\n", hr ); if (hr != S_OK) goto done;
if (op == APP_ADD) @@ -6833,7 +6833,7 @@ static HRESULT set_firewall( enum firewall_op op ) INetFwAuthorizedApplication_Release( app ); hr = CoCreateInstance( &CLSID_NetFwAuthorizedApplication, NULL, CLSCTX_INPROC_SERVER, &IID_INetFwAuthorizedApplication, (void **)&app ); - ok( hr == S_OK, "got %08x\n", hr ); + ok( hr == S_OK, "got %08lx\n", hr ); if (hr != S_OK) goto done;
SysFreeString( image ); @@ -6844,7 +6844,7 @@ static HRESULT set_firewall( enum firewall_op op ) name = SysAllocString( L"dplay_server" ); hr = INetFwAuthorizedApplication_put_Name( app, name ); SysFreeString( name ); - ok( hr == S_OK, "got %08x\n", hr ); + ok( hr == S_OK, "got %08lx\n", hr ); if (hr != S_OK) goto done;
if (op == APP_ADD) @@ -6923,7 +6923,7 @@ START_TEST(dplayx) hr = set_firewall(APP_ADD); if (hr != S_OK) { - skip("can't authorize app in firewall %08x\n", hr); + skip("can't authorize app in firewall %08lx\n", hr); return; } }
Signed-off-by: Alistair Leslie-Hughes leslie_alistair@hotmail.com
Signed-off-by: Eric Pouech eric.pouech@gmail.com
--- dlls/dpnet/tests/server.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/dlls/dpnet/tests/server.c b/dlls/dpnet/tests/server.c index 4314c69ccc1..3d59d746fba 100644 --- a/dlls/dpnet/tests/server.c +++ b/dlls/dpnet/tests/server.c @@ -418,7 +418,8 @@ done: /* taken from programs/winetest/main.c */ BOOL is_stub_dll(const char *filename) { - DWORD size, ver; + UINT size; + DWORD ver; BOOL isstub = FALSE; char *p, *data;
Signed-off-by: Alistair Leslie-Hughes leslie_alistair@hotmail.com
Signed-off-by: Eric Pouech eric.pouech@gmail.com
--- dlls/dpnet/tests/Makefile.in | 1 dlls/dpnet/tests/address.c | 194 +++++++++++------------ dlls/dpnet/tests/client.c | 362 +++++++++++++++++++++--------------------- dlls/dpnet/tests/server.c | 82 +++++----- dlls/dpnet/tests/thread.c | 108 ++++++------- 5 files changed, 373 insertions(+), 374 deletions(-)
diff --git a/dlls/dpnet/tests/Makefile.in b/dlls/dpnet/tests/Makefile.in index 2bef531a9ca..62ef3f7c47c 100644 --- a/dlls/dpnet/tests/Makefile.in +++ b/dlls/dpnet/tests/Makefile.in @@ -1,4 +1,3 @@ -EXTRADEFS = -DWINE_NO_LONG_TYPES TESTDLL = dpnet.dll IMPORTS = dxguid uuid dpnet ole32 oleaut32 version advapi32
diff --git a/dlls/dpnet/tests/address.c b/dlls/dpnet/tests/address.c index fe17cfde52d..260d960f42b 100644 --- a/dlls/dpnet/tests/address.c +++ b/dlls/dpnet/tests/address.c @@ -40,30 +40,30 @@ static void create_directplay_address(void) GUID guidsp;
hr = IDirectPlay8Address_GetSP(localaddr, NULL); - ok(hr == DPNERR_INVALIDPOINTER, "GetSP failed 0x%08x\n", hr); + ok(hr == DPNERR_INVALIDPOINTER, "GetSP failed 0x%08lx\n", hr);
hr = IDirectPlay8Address_GetSP(localaddr, &guidsp); - ok(hr == DPNERR_DOESNOTEXIST, "got 0x%08x\n", hr); + ok(hr == DPNERR_DOESNOTEXIST, "got 0x%08lx\n", hr);
hr = IDirectPlay8Address_SetSP(localaddr, &GUID_NULL); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
hr = IDirectPlay8Address_GetSP(localaddr, &guidsp); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(IsEqualGUID(&guidsp, &GUID_NULL), "wrong guid: %s\n", wine_dbgstr_guid(&guidsp));
hr = IDirectPlay8Address_SetSP(localaddr, &IID_Random); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
hr = IDirectPlay8Address_GetSP(localaddr, &guidsp); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(IsEqualGUID(&guidsp, &IID_Random), "wrong guid: %s\n", wine_dbgstr_guid(&guidsp));
hr = IDirectPlay8Address_SetSP(localaddr, &CLSID_DP8SP_TCPIP); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
hr = IDirectPlay8Address_GetSP(localaddr, &guidsp); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(IsEqualGUID(&guidsp, &CLSID_DP8SP_TCPIP), "wrong guid: %s\n", wine_dbgstr_guid(&guidsp));
IDirectPlay8Address_Release(localaddr); @@ -92,130 +92,130 @@ static void address_addcomponents(void)
/* We can add any Component to the Address interface not just the predefined ones. */ hr = IDirectPlay8Address_AddComponent(localaddr, L"unknown", &IID_Random, sizeof(GUID), DPNA_DATATYPE_GUID); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
hr = IDirectPlay8Address_AddComponent(localaddr, L"unknown", &IID_Random, sizeof(GUID)+1, DPNA_DATATYPE_GUID); - ok(hr == DPNERR_INVALIDPARAM, "got 0x%08x\n", hr); + ok(hr == DPNERR_INVALIDPARAM, "got 0x%08lx\n", hr);
hr = IDirectPlay8Address_AddComponent(localaddr, DPNA_KEY_HOSTNAME, &localhost, sizeof(localhost)+2, DPNA_DATATYPE_STRING); - ok(hr == DPNERR_INVALIDPARAM, "got 0x%08x\n", hr); + ok(hr == DPNERR_INVALIDPARAM, "got 0x%08lx\n", hr);
hr = IDirectPlay8Address_AddComponent(localaddr, DPNA_KEY_HOSTNAME, &localhost, sizeof(localhost)/2, DPNA_DATATYPE_STRING); - ok(hr == DPNERR_INVALIDPARAM, "got 0x%08x\n", hr); + ok(hr == DPNERR_INVALIDPARAM, "got 0x%08lx\n", hr);
hr = IDirectPlay8Address_AddComponent(localaddr, DPNA_KEY_HOSTNAME, testing, sizeof(testing)+2, DPNA_DATATYPE_STRING_ANSI); - ok(hr == DPNERR_INVALIDPARAM, "got 0x%08x\n", hr); + ok(hr == DPNERR_INVALIDPARAM, "got 0x%08lx\n", hr);
/* Show that on error, nothing is added. */ size = sizeof(buffer); hr = IDirectPlay8Address_GetComponentByName(localaddr, DPNA_KEY_HOSTNAME, buffer, &size, &type); - ok(hr == DPNERR_DOESNOTEXIST, "got 0x%08x\n", hr); + ok(hr == DPNERR_DOESNOTEXIST, "got 0x%08lx\n", hr);
hr = IDirectPlay8Address_AddComponent(localaddr, DPNA_KEY_HOSTNAME, testing, sizeof(testing), DPNA_DATATYPE_STRING_ANSI); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
hr = IDirectPlay8Address_AddComponent(localaddr, DPNA_KEY_PORT, &port, sizeof(DWORD)+2, DPNA_DATATYPE_DWORD); - ok(hr == DPNERR_INVALIDPARAM, "got 0x%08x\n", hr); + ok(hr == DPNERR_INVALIDPARAM, "got 0x%08lx\n", hr);
hr = IDirectPlay8Address_AddComponent(localaddr, DPNA_KEY_HOSTNAME, &localhost, sizeof(localhost), DPNA_DATATYPE_STRING); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
/* The information doesn't get removed when invalid parameters are used.*/ hr = IDirectPlay8Address_AddComponent(localaddr, DPNA_KEY_HOSTNAME, &localhost, sizeof(localhost)+2, DPNA_DATATYPE_STRING); - ok(hr == DPNERR_INVALIDPARAM, "got 0x%08x\n", hr); + ok(hr == DPNERR_INVALIDPARAM, "got 0x%08lx\n", hr);
size = 0; hr = IDirectPlay8Address_GetComponentByName(localaddr, DPNA_KEY_HOSTNAME, NULL, &size, &type); - ok(hr == DPNERR_BUFFERTOOSMALL, "got 0x%08x\n", hr); - ok(size == sizeof(localhost), "Invalid string length: %d\n", size); + ok(hr == DPNERR_BUFFERTOOSMALL, "got 0x%08lx\n", hr); + ok(size == sizeof(localhost), "Invalid string length: %ld\n", size);
size = 1; hr = IDirectPlay8Address_GetComponentByName(localaddr, DPNA_KEY_HOSTNAME, NULL, &size, &type); - ok(hr == E_POINTER, "got 0x%08x\n", hr); + ok(hr == E_POINTER, "got 0x%08lx\n", hr);
size = sizeof(buffer); hr = IDirectPlay8Address_GetComponentByName(localaddr, DPNA_KEY_HOSTNAME, buffer, &size, &type); - ok(hr == S_OK, "got 0x%08x\n", hr); - ok(type == DPNA_DATATYPE_STRING, "incorrect type %d\n", type); + ok(hr == S_OK, "got 0x%08lx\n", hr); + ok(type == DPNA_DATATYPE_STRING, "incorrect type %ld\n", type); ok(!lstrcmpW(buffer, localhost), "Invalid string: %s\n", wine_dbgstr_w(buffer));
hr = IDirectPlay8Address_AddComponent(localaddr, DPNA_KEY_PORT, &port, sizeof(DWORD)+2, DPNA_DATATYPE_DWORD); - ok(hr == DPNERR_INVALIDPARAM, "got 0x%08x\n", hr); + ok(hr == DPNERR_INVALIDPARAM, "got 0x%08lx\n", hr);
hr = IDirectPlay8Address_AddComponent(localaddr, DPNA_KEY_PORT, &port, sizeof(DWORD), DPNA_DATATYPE_DWORD); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
hr = IDirectPlay8Address_GetComponentByName(localaddr, NULL, &compguid, &size, &type); - ok(hr == E_POINTER, "got 0x%08x\n", hr); + ok(hr == E_POINTER, "got 0x%08lx\n", hr);
size = sizeof(GUID)-1; hr = IDirectPlay8Address_GetComponentByName(localaddr, L"unknown", NULL, &size, &type); - ok(hr == E_POINTER, "got 0x%08x\n", hr); + ok(hr == E_POINTER, "got 0x%08lx\n", hr);
size = sizeof(GUID); hr = IDirectPlay8Address_GetComponentByName(localaddr, L"unknown", NULL, &size, &type); - ok(hr == E_POINTER, "got 0x%08x\n", hr); + ok(hr == E_POINTER, "got 0x%08lx\n", hr);
hr = IDirectPlay8Address_GetComponentByName(localaddr, L"unknown", &compguid, NULL, &type); - ok(hr == E_POINTER, "got 0x%08x\n", hr); + ok(hr == E_POINTER, "got 0x%08lx\n", hr);
size = sizeof(GUID)-1; hr = IDirectPlay8Address_GetComponentByName(localaddr, L"unknown", &compguid, &size, NULL); - ok(hr == E_POINTER, "got 0x%08x\n", hr); + ok(hr == E_POINTER, "got 0x%08lx\n", hr);
size = sizeof(GUID); hr = IDirectPlay8Address_GetComponentByName(localaddr, L"unknown", &compguid, &size, NULL); - ok(hr == E_POINTER, "got 0x%08x\n", hr); + ok(hr == E_POINTER, "got 0x%08lx\n", hr);
size = sizeof(GUID)-1; hr = IDirectPlay8Address_GetComponentByName(localaddr, L"unknown", &compguid, &size, &type); - ok(hr == DPNERR_BUFFERTOOSMALL, "got 0x%08x\n", hr); - ok(size == sizeof(GUID), "got %d\n", size); + ok(hr == DPNERR_BUFFERTOOSMALL, "got 0x%08lx\n", hr); + ok(size == sizeof(GUID), "got %ld\n", size);
size = sizeof(GUID); hr = IDirectPlay8Address_GetComponentByName(localaddr, L"unknown", &compguid, &size, &type); ok(IsEqualGUID(&compguid, &IID_Random), "incorrect guid\n"); - ok(size == sizeof(GUID), "incorrect size got %d\n", size); + ok(size == sizeof(GUID), "incorrect size got %ld\n", size); ok(type == DPNA_DATATYPE_GUID, "incorrect type\n"); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
hr = IDirectPlay8Address_GetNumComponents(localaddr, NULL); - ok(hr == DPNERR_INVALIDPOINTER, "got 0x%08x\n", hr); + ok(hr == DPNERR_INVALIDPOINTER, "got 0x%08lx\n", hr);
hr = IDirectPlay8Address_GetNumComponents(localaddr, &components); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
hr = IDirectPlay8Address_GetComponentByIndex(localaddr, 100, NULL, &namelen, NULL, &bufflen, &type); - ok(hr == DPNERR_DOESNOTEXIST, "got 0x%08x\n", hr); + ok(hr == DPNERR_DOESNOTEXIST, "got 0x%08lx\n", hr);
hr = IDirectPlay8Address_GetComponentByIndex(localaddr, 1, NULL, &namelen, NULL, &bufflen, NULL); - ok(hr == DPNERR_INVALIDPOINTER, "got 0x%08x\n", hr); + ok(hr == DPNERR_INVALIDPOINTER, "got 0x%08lx\n", hr);
bufflen = 100; namelen = 0; hr = IDirectPlay8Address_GetComponentByIndex(localaddr, 1, name, &namelen, buffer, &bufflen, &type); - ok(hr == DPNERR_BUFFERTOOSMALL, "got 0x%08x\n", hr); + ok(hr == DPNERR_BUFFERTOOSMALL, "got 0x%08lx\n", hr);
namelen = 100; hr = IDirectPlay8Address_GetComponentByIndex(localaddr, 1, NULL, &namelen, NULL, &bufflen, &type); - ok(hr == DPNERR_INVALIDPOINTER, "got 0x%08x\n", hr); + ok(hr == DPNERR_INVALIDPOINTER, "got 0x%08lx\n", hr);
hr = IDirectPlay8Address_GetComponentByIndex(localaddr, 100, NULL, NULL, NULL, &bufflen, &type); - ok(hr == DPNERR_INVALIDPOINTER, "got 0x%08x\n", hr); + ok(hr == DPNERR_INVALIDPOINTER, "got 0x%08lx\n", hr);
hr = IDirectPlay8Address_GetComponentByIndex(localaddr, 100, NULL, &namelen, NULL, NULL, &type); - ok(hr == DPNERR_INVALIDPOINTER, "got 0x%08x\n", hr); + ok(hr == DPNERR_INVALIDPOINTER, "got 0x%08lx\n", hr);
bufflen = 0; namelen = 0; type = 0; hr = IDirectPlay8Address_GetComponentByIndex(localaddr, 0, NULL, &namelen, NULL, &bufflen, &type); - ok(hr == DPNERR_BUFFERTOOSMALL, "got 0x%08x\n", hr); - ok(namelen == 8, "namelen expected 8 got %d\n", namelen); - ok(bufflen == 16, "bufflen expected 16 got %d\n", bufflen); - ok(type == DPNA_DATATYPE_GUID, "type expected DPNA_DATATYPE_GUID got %d\n", type); + ok(hr == DPNERR_BUFFERTOOSMALL, "got 0x%08lx\n", hr); + ok(namelen == 8, "namelen expected 8 got %ld\n", namelen); + ok(bufflen == 16, "bufflen expected 16 got %ld\n", bufflen); + ok(type == DPNA_DATATYPE_GUID, "type expected DPNA_DATATYPE_GUID got %ld\n", type);
- trace("GetNumComponents=%d\n", components); + trace("GetNumComponents=%ld\n", components); for(i=0; i < components; i++) { void *buffer; @@ -224,28 +224,28 @@ static void address_addcomponents(void) namelen = 0;
hr = IDirectPlay8Address_GetComponentByIndex(localaddr, i, NULL, &namelen, NULL, &bufflen, &type); - ok(hr == DPNERR_BUFFERTOOSMALL, "got 0x%08x\n", hr); + ok(hr == DPNERR_BUFFERTOOSMALL, "got 0x%08lx\n", hr);
name = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, namelen * sizeof(WCHAR)); buffer = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, bufflen);
hr = IDirectPlay8Address_GetComponentByIndex(localaddr, i, name, &namelen, buffer, &bufflen, &type); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); if(hr == S_OK) { switch(type) { case DPNA_DATATYPE_STRING: - trace("%d: %s: %s\n", i, wine_dbgstr_w(name), wine_dbgstr_w(buffer)); + trace("%ld: %s: %s\n", i, wine_dbgstr_w(name), wine_dbgstr_w(buffer)); break; case DPNA_DATATYPE_DWORD: - trace("%d: %s: %d\n", i, wine_dbgstr_w(name), *(DWORD*)buffer); + trace("%ld: %s: %ld\n", i, wine_dbgstr_w(name), *(DWORD*)buffer); break; case DPNA_DATATYPE_GUID: - trace("%d: %s: %s\n", i, wine_dbgstr_w(name), wine_dbgstr_guid( (GUID*)buffer)); + trace("%ld: %s: %s\n", i, wine_dbgstr_w(name), wine_dbgstr_guid( (GUID*)buffer)); break; case DPNA_DATATYPE_BINARY: - trace("%d: %s: Binary Data %d\n", i, wine_dbgstr_w(name), bufflen); + trace("%ld: %s: Binary Data %ld\n", i, wine_dbgstr_w(name), bufflen); break; default: trace(" Unknown\n"); @@ -278,24 +278,24 @@ static void address_setsp(void) DWORD bufflen = 0;
hr = IDirectPlay8Address_GetNumComponents(localaddr, &components); - ok(hr == S_OK, "got 0x%08x\n", hr); - ok(components == 0, "components=%d\n", components); + ok(hr == S_OK, "got 0x%08lx\n", hr); + ok(components == 0, "components=%ld\n", components);
hr = IDirectPlay8Address_SetSP(localaddr, &CLSID_DP8SP_TCPIP); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
hr = IDirectPlay8Address_GetNumComponents(localaddr, &components); - ok(hr == S_OK, "got 0x%08x\n", hr); - ok(components == 1, "components=%d\n", components); + ok(hr == S_OK, "got 0x%08lx\n", hr); + ok(components == 1, "components=%ld\n", components);
hr = IDirectPlay8Address_GetComponentByIndex(localaddr, 0, NULL, &namelen, NULL, &bufflen, &type); - ok(hr == DPNERR_BUFFERTOOSMALL, "got 0x%08x\n", hr); + ok(hr == DPNERR_BUFFERTOOSMALL, "got 0x%08lx\n", hr);
name = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, namelen * sizeof(WCHAR));
hr = IDirectPlay8Address_GetComponentByIndex(localaddr, 0, name, &namelen, (void*)&guid, &bufflen, &type); - ok(hr == S_OK, "got 0x%08x\n", hr); - ok(type == DPNA_DATATYPE_GUID, "wrong datatype: %d\n", type); + ok(hr == S_OK, "got 0x%08lx\n", hr); + ok(type == DPNA_DATATYPE_GUID, "wrong datatype: %ld\n", type); ok(IsEqualGUID(&guid, &CLSID_DP8SP_TCPIP), "wrong guid\n");
HeapFree(GetProcessHeap(), 0, name); @@ -318,50 +318,50 @@ static void address_urlW(void) DWORD port = 4321;
hr = IDirectPlay8Address_SetSP(localaddr, &CLSID_DP8SP_TCPIP); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
hr = IDirectPlay8Address_GetURLW(localaddr, NULL, NULL); - ok(hr == DPNERR_INVALIDPOINTER, "got 0x%08x\n", hr); + ok(hr == DPNERR_INVALIDPOINTER, "got 0x%08lx\n", hr);
bufflen = 10; hr = IDirectPlay8Address_GetURLW(localaddr, NULL, &bufflen); - ok(hr == DPNERR_INVALIDPOINTER, "got 0x%08x\n", hr); + ok(hr == DPNERR_INVALIDPOINTER, "got 0x%08lx\n", hr);
bufflen = 0; hr = IDirectPlay8Address_GetURLW(localaddr, NULL, &bufflen); - ok(bufflen == 66, "got %d\n", bufflen); - ok(hr == DPNERR_BUFFERTOOSMALL, "got 0x%08x\n", hr); + ok(bufflen == 66, "got %ld\n", bufflen); + ok(hr == DPNERR_BUFFERTOOSMALL, "got 0x%08lx\n", hr);
hr = IDirectPlay8Address_GetURLW(localaddr, buffer, &bufflen); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(!lstrcmpW(L"x-directplay:/provider=%7BEBFE7BA0-628D-11D2-AE0F-006097B01411%7D", buffer), "got %s\n", wine_dbgstr_w(buffer));
hr = IDirectPlay8Address_AddComponent(localaddr, DPNA_KEY_PORT, &port, sizeof(DWORD), DPNA_DATATYPE_DWORD); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
bufflen = 0; hr = IDirectPlay8Address_GetURLW(localaddr, NULL, &bufflen); - ok(hr == DPNERR_BUFFERTOOSMALL, "got 0x%08x\n", hr); + ok(hr == DPNERR_BUFFERTOOSMALL, "got 0x%08lx\n", hr);
bufflen2 = bufflen/2; memset( buffer, 0xcc, sizeof(buffer) ); hr = IDirectPlay8Address_GetURLW(localaddr, buffer, &bufflen2); - ok(hr == DPNERR_BUFFERTOOSMALL, "got 0x%08x\n", hr); + ok(hr == DPNERR_BUFFERTOOSMALL, "got 0x%08lx\n", hr); ok(buffer[0] == 0xcccc, "buffer modified\n");
hr = IDirectPlay8Address_GetURLW(localaddr, buffer, &bufflen); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(!lstrcmpW(L"x-directplay:/provider=%7BEBFE7BA0-628D-11D2-AE0F-006097B01411%7D;port=4321", buffer), "got %s\n", wine_dbgstr_w(buffer));
hr = IDirectPlay8Address_AddComponent(localaddr, DPNA_KEY_HOSTNAME, &localhost, sizeof(localhost), DPNA_DATATYPE_STRING); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
bufflen = 0; hr = IDirectPlay8Address_GetURLW(localaddr, NULL, &bufflen); - ok(hr == DPNERR_BUFFERTOOSMALL, "got 0x%08x\n", hr); + ok(hr == DPNERR_BUFFERTOOSMALL, "got 0x%08lx\n", hr);
hr = IDirectPlay8Address_GetURLW(localaddr, buffer, &bufflen); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(!lstrcmpW(L"x-directplay:/provider=%7BEBFE7BA0-628D-11D2-AE0F-006097B01411%7D;port=4321;hostname=localhost", buffer), "got %s\n", wine_dbgstr_w(buffer));
IDirectPlay8Address_Release(localaddr); @@ -386,49 +386,49 @@ static void address_urlA(void) DWORD port = 4321;
hr = IDirectPlay8Address_SetSP(localaddr, &CLSID_DP8SP_TCPIP); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
hr = IDirectPlay8Address_GetURLA(localaddr, NULL, NULL); - ok(hr == DPNERR_INVALIDPOINTER, "got 0x%08x\n", hr); + ok(hr == DPNERR_INVALIDPOINTER, "got 0x%08lx\n", hr);
bufflen = 10; hr = IDirectPlay8Address_GetURLA(localaddr, NULL, &bufflen); - ok(hr == DPNERR_INVALIDPOINTER, "got 0x%08x\n", hr); + ok(hr == DPNERR_INVALIDPOINTER, "got 0x%08lx\n", hr);
bufflen = 0; hr = IDirectPlay8Address_GetURLA(localaddr, NULL, &bufflen); - ok(hr == DPNERR_BUFFERTOOSMALL, "got 0x%08x\n", hr); + ok(hr == DPNERR_BUFFERTOOSMALL, "got 0x%08lx\n", hr);
bufflen2 = bufflen/2; memset( buffer, 0x55, sizeof(buffer) ); hr = IDirectPlay8Address_GetURLA(localaddr, buffer, &bufflen2); - ok(hr == DPNERR_BUFFERTOOSMALL, "got 0x%08x\n", hr); + ok(hr == DPNERR_BUFFERTOOSMALL, "got 0x%08lx\n", hr); ok(buffer[0] == 0x55, "buffer modified\n");
hr = IDirectPlay8Address_GetURLA(localaddr, buffer, &bufflen); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(!lstrcmpA(urlA1, buffer), "got %s\n", buffer);
hr = IDirectPlay8Address_AddComponent(localaddr, DPNA_KEY_PORT, &port, sizeof(DWORD), DPNA_DATATYPE_DWORD); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
bufflen = 0; hr = IDirectPlay8Address_GetURLA(localaddr, NULL, &bufflen); - ok(hr == DPNERR_BUFFERTOOSMALL, "got 0x%08x\n", hr); + ok(hr == DPNERR_BUFFERTOOSMALL, "got 0x%08lx\n", hr);
hr = IDirectPlay8Address_GetURLA(localaddr, buffer, &bufflen); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(!lstrcmpA(urlA2, buffer), "got %s\n", buffer);
hr = IDirectPlay8Address_AddComponent(localaddr, DPNA_KEY_HOSTNAME, &localhostA, sizeof(localhostA), DPNA_DATATYPE_STRING_ANSI); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
bufflen = 0; hr = IDirectPlay8Address_GetURLA(localaddr, NULL, &bufflen); - ok(hr == DPNERR_BUFFERTOOSMALL, "got 0x%08x\n", hr); + ok(hr == DPNERR_BUFFERTOOSMALL, "got 0x%08lx\n", hr);
hr = IDirectPlay8Address_GetURLA(localaddr, buffer, &bufflen); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(!lstrcmpA(urlA3, buffer), "got %s\n", buffer);
IDirectPlay8Address_Release(localaddr); @@ -448,34 +448,34 @@ static void address_duplicate(void) if(SUCCEEDED(hr)) { hr = IDirectPlay8Address_SetSP(localaddr, &CLSID_DP8SP_TCPIP); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
hr = IDirectPlay8Address_AddComponent(localaddr, DPNA_KEY_HOSTNAME, &localhost, sizeof(localhost), DPNA_DATATYPE_STRING); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
hr = IDirectPlay8Address_GetNumComponents(localaddr, &components); - ok(hr == S_OK, "got 0x%08x\n", hr); - ok(components == 2, "components=%d\n", components); + ok(hr == S_OK, "got 0x%08lx\n", hr); + ok(components == 2, "components=%ld\n", components);
hr = IDirectPlay8Address_Duplicate(localaddr, &duplicate); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); if(SUCCEEDED(hr)) { DWORD size, type; WCHAR buffer[256];
hr = IDirectPlay8Address_GetSP(duplicate, &guid); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(IsEqualGUID(&guid, &CLSID_DP8SP_TCPIP), "wrong guid\n");
hr = IDirectPlay8Address_GetNumComponents(duplicate, &dupcomps); - ok(hr == S_OK, "got 0x%08x\n", hr); - ok(components == dupcomps, "expected %d got %d\n", components, dupcomps); + ok(hr == S_OK, "got 0x%08lx\n", hr); + ok(components == dupcomps, "expected %ld got %ld\n", components, dupcomps);
size = sizeof(buffer); hr = IDirectPlay8Address_GetComponentByName(duplicate, DPNA_KEY_HOSTNAME, buffer, &size, &type); - ok(hr == S_OK, "got 0x%08x\n", hr); - ok(type == DPNA_DATATYPE_STRING, "incorrect type %d\n", type); + ok(hr == S_OK, "got 0x%08lx\n", hr); + ok(type == DPNA_DATATYPE_STRING, "incorrect type %ld\n", type); ok(!lstrcmpW(buffer, localhost), "Invalid string: %s\n", wine_dbgstr_w(buffer));
IDirectPlay8Address_Release(duplicate); diff --git a/dlls/dpnet/tests/client.c b/dlls/dpnet/tests/client.c index da42e6d6951..04d7b18581c 100644 --- a/dlls/dpnet/tests/client.c +++ b/dlls/dpnet/tests/client.c @@ -49,7 +49,7 @@ static HRESULT WINAPI DirectPlayServerHandler(void *context, DWORD message_id, v /* These are tested in the server test */ break; default: - trace("DirectPlayServerHandler: 0x%08x\n", message_id); + trace("DirectPlayServerHandler: 0x%08lx\n", message_id); } return S_OK; } @@ -71,7 +71,7 @@ static HRESULT WINAPI DirectPlayMessageHandler(PVOID context, DWORD message_id, break; } default: - trace("DirectPlayMessageHandler: 0x%08x\n", message_id); + trace("DirectPlayMessageHandler: 0x%08lx\n", message_id); }
return S_OK; @@ -79,13 +79,13 @@ static HRESULT WINAPI DirectPlayMessageHandler(PVOID context, DWORD message_id,
static HRESULT WINAPI DirectPlayLobbyMessageHandler(PVOID context, DWORD message_id, PVOID buffer) { - trace("DirectPlayLobbyMessageHandler: 0x%08x\n", message_id); + trace("DirectPlayLobbyMessageHandler: 0x%08lx\n", message_id); return S_OK; }
static HRESULT WINAPI DirectPlayLobbyClientMessageHandler(void *context, DWORD message_id, void* buffer) { - trace("DirectPlayLobbyClientMessageHandler: 0x%08x\n", message_id); + trace("DirectPlayLobbyClientMessageHandler: 0x%08lx\n", message_id); return S_OK; }
@@ -100,13 +100,13 @@ static void create_server(void) ok(hr == S_OK, "Failed to create IDirectPlay8Server object\n");
hr = IDirectPlay8Server_Initialize(server, NULL, DirectPlayServerHandler, 0); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
hr = CoCreateInstance( &CLSID_DirectPlay8Address, NULL, CLSCTX_ALL, &IID_IDirectPlay8Address, (void **)&localaddr); ok(hr == S_OK, "Failed to create IDirectPlay8Address object\n");
hr = IDirectPlay8Address_SetSP(localaddr, &CLSID_DP8SP_TCPIP); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
memset( &appdesc, 0, sizeof(DPN_APPLICATION_DESC) ); appdesc.dwSize = sizeof( DPN_APPLICATION_DESC ); @@ -115,7 +115,7 @@ static void create_server(void) appdesc.pwszSessionName = sessionname;
hr = IDirectPlay8Server_Host(server, &appdesc, &localaddr, 1, NULL, NULL, NULL, 0); - todo_wine ok(hr == S_OK, "got 0x%08x\n", hr); + todo_wine ok(hr == S_OK, "got 0x%08lx\n", hr);
IDirectPlay8Address_Release(localaddr); } @@ -129,30 +129,30 @@ static BOOL test_init_dp(void) enumevent = CreateEventA( NULL, TRUE, FALSE, NULL);
hr = CoCreateInstance(&CLSID_DirectPlay8Client, NULL, CLSCTX_INPROC_SERVER, &IID_IDirectPlay8Client, (void **)&client); - ok(hr == S_OK, "CoCreateInstance failed with 0x%x\n", hr); + ok(hr == S_OK, "CoCreateInstance failed with 0x%lx\n", hr);
memset(&caps, 0, sizeof(DPN_SP_CAPS)); caps.dwSize = sizeof(DPN_SP_CAPS);
hr = IDirectPlay8Client_GetSPCaps(client, &CLSID_DP8SP_TCPIP, &caps, 0); - ok(hr == DPNERR_UNINITIALIZED, "GetSPCaps failed with %x\n", hr); + ok(hr == DPNERR_UNINITIALIZED, "GetSPCaps failed with %lx\n", hr);
hr = IDirectPlay8Client_Initialize(client, NULL, NULL, 0); - ok(hr == DPNERR_INVALIDPARAM, "got %x\n", hr); + ok(hr == DPNERR_INVALIDPARAM, "got %lx\n", hr);
hr = IDirectPlay8Client_SetSPCaps(client, &CLSID_DP8SP_TCPIP, &caps, 0); - ok(hr == DPNERR_INVALIDPARAM, "SetSPCaps failed with %x\n", hr); + ok(hr == DPNERR_INVALIDPARAM, "SetSPCaps failed with %lx\n", hr);
hr = IDirectPlay8Client_Initialize(client, NULL, DirectPlayMessageHandler, 0); - ok(hr == S_OK, "IDirectPlay8Client_Initialize failed with %x\n", hr); + ok(hr == S_OK, "IDirectPlay8Client_Initialize failed with %lx\n", hr);
hr = CoCreateInstance(&CLSID_DirectPlay8LobbiedApplication, NULL, CLSCTX_INPROC_SERVER, &IID_IDirectPlay8LobbiedApplication, (void **)&lobbied); - ok(hr == S_OK, "CoCreateInstance failed with 0x%x\n", hr); + ok(hr == S_OK, "CoCreateInstance failed with 0x%lx\n", hr);
hr = IDirectPlay8LobbiedApplication_Initialize(lobbied, NULL, DirectPlayLobbyMessageHandler, &lobbyConnection, 0); - ok(hr == S_OK, "IDirectPlay8LobbiedApplication_Initialize failed with %x\n", hr); + ok(hr == S_OK, "IDirectPlay8LobbiedApplication_Initialize failed with %lx\n", hr);
return client != NULL; } @@ -168,22 +168,22 @@ static void test_enum_service_providers(void) items = 0;
hr = IDirectPlay8Client_EnumServiceProviders(client, NULL, NULL, NULL, &size, NULL, 0); - ok(hr == E_POINTER, "IDirectPlay8Client_EnumServiceProviders failed with %x\n", hr); + ok(hr == E_POINTER, "IDirectPlay8Client_EnumServiceProviders failed with %lx\n", hr);
hr = IDirectPlay8Client_EnumServiceProviders(client, NULL, NULL, NULL, NULL, &items, 0); - ok(hr == E_POINTER, "IDirectPlay8Client_EnumServiceProviders failed with %x\n", hr); + ok(hr == E_POINTER, "IDirectPlay8Client_EnumServiceProviders failed with %lx\n", hr);
hr = IDirectPlay8Client_EnumServiceProviders(client, NULL, NULL, NULL, &size, &items, 0); - ok(hr == DPNERR_BUFFERTOOSMALL, "IDirectPlay8Client_EnumServiceProviders failed with %x\n", hr); + ok(hr == DPNERR_BUFFERTOOSMALL, "IDirectPlay8Client_EnumServiceProviders failed with %lx\n", hr); ok(size != 0, "size is unexpectedly 0\n");
serv_prov_info = HeapAlloc(GetProcessHeap(), 0, size);
hr = IDirectPlay8Client_EnumServiceProviders(client, NULL, NULL, serv_prov_info, &size, &items, 0); - ok(hr == S_OK, "IDirectPlay8Client_EnumServiceProviders failed with %x\n", hr); + ok(hr == S_OK, "IDirectPlay8Client_EnumServiceProviders failed with %lx\n", hr); ok(items != 0, "Found unexpectedly no service providers\n");
- trace("number of items found: %d\n", items); + trace("number of items found: %ld\n", items);
for (i=0;i<items;i++) { @@ -197,13 +197,13 @@ static void test_enum_service_providers(void) items = 0;
hr = IDirectPlay8Client_EnumServiceProviders(client, &CLSID_DP8SP_TCPIP, NULL, NULL, &size, &items, 0); - ok(hr == DPNERR_BUFFERTOOSMALL, "IDirectPlay8Client_EnumServiceProviders failed with %x\n", hr); + ok(hr == DPNERR_BUFFERTOOSMALL, "IDirectPlay8Client_EnumServiceProviders failed with %lx\n", hr); ok(size != 0, "size is unexpectedly 0\n");
serv_prov_info = HeapAlloc(GetProcessHeap(), 0, size);
hr = IDirectPlay8Client_EnumServiceProviders(client, &CLSID_DP8SP_TCPIP, NULL, serv_prov_info, &size, &items, 0); - ok(hr == S_OK, "IDirectPlay8Client_EnumServiceProviders failed with %x\n", hr); + ok(hr == S_OK, "IDirectPlay8Client_EnumServiceProviders failed with %lx\n", hr); ok(items != 0, "Found unexpectedly no adapter\n");
@@ -216,8 +216,8 @@ static void test_enum_service_providers(void) /* Invalid GUID */ items = 88; hr = IDirectPlay8Client_EnumServiceProviders(client, &appguid, NULL, serv_prov_info, &size, &items, 0); - ok(hr == DPNERR_DOESNOTEXIST, "IDirectPlay8Peer_EnumServiceProviders failed with %x\n", hr); - ok(items == 88, "Found adapter %d\n", items); + ok(hr == DPNERR_DOESNOTEXIST, "IDirectPlay8Peer_EnumServiceProviders failed with %lx\n", hr); + ok(items == 88, "Found adapter %ld\n", items);
HeapFree(GetProcessHeap(), 0, serv_prov_info); } @@ -238,65 +238,65 @@ static void test_enum_hosts(void) appdesc.guidApplication = appguid;
hr = CoCreateInstance(&CLSID_DirectPlay8Client, NULL, CLSCTX_INPROC_SERVER, &IID_IDirectPlay8Client, (void **)&client2); - ok(hr == S_OK, "CoCreateInstance failed with 0x%x\n", hr); + ok(hr == S_OK, "CoCreateInstance failed with 0x%lx\n", hr);
hr = CoCreateInstance( &CLSID_DirectPlay8Address, NULL, CLSCTX_ALL, &IID_IDirectPlay8Address, (LPVOID*)&local); - ok(hr == S_OK, "IDirectPlay8Address failed with 0x%08x\n", hr); + ok(hr == S_OK, "IDirectPlay8Address failed with 0x%08lx\n", hr);
hr = IDirectPlay8Address_SetSP(local, &CLSID_DP8SP_TCPIP); - ok(hr == S_OK, "IDirectPlay8Address_SetSP failed with 0x%08x\n", hr); + ok(hr == S_OK, "IDirectPlay8Address_SetSP failed with 0x%08lx\n", hr);
hr = CoCreateInstance( &CLSID_DirectPlay8Address, NULL, CLSCTX_ALL, &IID_IDirectPlay8Address, (LPVOID*)&host); - ok(hr == S_OK, "IDirectPlay8Address failed with 0x%08x\n", hr); + ok(hr == S_OK, "IDirectPlay8Address failed with 0x%08lx\n", hr);
hr = IDirectPlay8Address_SetSP(host, &CLSID_DP8SP_TCPIP); - ok(hr == S_OK, "IDirectPlay8Address_SetSP failed with 0x%08x\n", hr); + ok(hr == S_OK, "IDirectPlay8Address_SetSP failed with 0x%08lx\n", hr);
hr = IDirectPlay8Address_AddComponent(host, DPNA_KEY_HOSTNAME, localhost, sizeof(localhost), DPNA_DATATYPE_STRING); - ok(hr == S_OK, "IDirectPlay8Address failed with 0x%08x\n", hr); + ok(hr == S_OK, "IDirectPlay8Address failed with 0x%08lx\n", hr);
caps.dwSize = sizeof(DPN_SP_CAPS);
hr = IDirectPlay8Client_GetSPCaps(client, &CLSID_DP8SP_TCPIP, &caps, 0); - ok(hr == DPN_OK, "got %x\n", hr); + ok(hr == DPN_OK, "got %lx\n", hr); data = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, caps.dwMaxEnumPayloadSize + 1);
hr = IDirectPlay8Client_EnumHosts(client, &appdesc, host, local, NULL, 0, 2, 1000, 1000, NULL, &async, DPNENUMHOSTS_SYNC); - ok(hr == DPNERR_INVALIDPARAM, "got 0x%08x\n", hr); + ok(hr == DPNERR_INVALIDPARAM, "got 0x%08lx\n", hr);
hr = IDirectPlay8Client_EnumHosts(client, &appdesc, host, local, data, caps.dwMaxEnumPayloadSize + 1, INFINITE, 0, INFINITE, NULL, &async, DPNENUMHOSTS_SYNC); - ok(hr == DPNERR_INVALIDPARAM, "got 0x%08x\n", hr); + ok(hr == DPNERR_INVALIDPARAM, "got 0x%08lx\n", hr);
async = 0; hr = IDirectPlay8Client_EnumHosts(client, &appdesc, host, local, data, caps.dwMaxEnumPayloadSize + 1, INFINITE, 0, INFINITE, NULL, &async, 0); - ok(hr == DPNERR_ENUMQUERYTOOLARGE, "got 0x%08x\n", hr); + ok(hr == DPNERR_ENUMQUERYTOOLARGE, "got 0x%08lx\n", hr); ok(!async, "Handle returned\n");
async = 0; hr = IDirectPlay8Client_EnumHosts(client, &appdesc, host, local, data, caps.dwMaxEnumPayloadSize, INFINITE, 0, INFINITE, NULL, &async, 0); - ok(hr == DPNSUCCESS_PENDING, "got 0x%08x\n", hr); + ok(hr == DPNSUCCESS_PENDING, "got 0x%08lx\n", hr); todo_wine ok(async, "No Handle returned\n");
/* This CancelAsyncOperation doesn't generate a DPN_MSGID_ASYNC_OP_COMPLETE */ hr = IDirectPlay8Client_CancelAsyncOperation(client, async, 0); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); HeapFree(GetProcessHeap(), 0, data);
/* No Initialize has been called on client2. */ hr = IDirectPlay8Client_EnumHosts(client2, &appdesc, host, local, NULL, 0, INFINITE, 0, INFINITE, NULL, &async, 0); - ok(hr == DPNERR_UNINITIALIZED, "IDirectPlay8Client_EnumHosts failed with 0x%08x\n", hr); + ok(hr == DPNERR_UNINITIALIZED, "IDirectPlay8Client_EnumHosts failed with 0x%08lx\n", hr);
/* Since we are running asynchronously, EnumHosts returns DPNSUCCESS_PENDING. */ hr = IDirectPlay8Client_EnumHosts(client, &appdesc, host, local, NULL, 0, INFINITE, 0, INFINITE, NULL, &async, 0); - ok(hr == DPNSUCCESS_PENDING, "IDirectPlay8Client_EnumHosts failed with 0x%08x\n", hr); + ok(hr == DPNSUCCESS_PENDING, "IDirectPlay8Client_EnumHosts failed with 0x%08lx\n", hr); todo_wine ok(async, "No Handle returned\n");
hr = IDirectPlay8Client_EnumHosts(client, &appdesc, host, local, NULL, 0, INFINITE, 0, INFINITE, NULL, &async2, 0); - ok(hr == DPNSUCCESS_PENDING, "IDirectPlay8Client_EnumHosts failed with 0x%08x\n", hr); + ok(hr == DPNSUCCESS_PENDING, "IDirectPlay8Client_EnumHosts failed with 0x%08lx\n", hr); todo_wine ok(async2, "No Handle returned\n"); todo_wine ok(async2 != async, "Same handle returned.\n");
@@ -305,23 +305,23 @@ static void test_enum_hosts(void) lastAsyncCode = E_FAIL; lastAsyncHandle = 0xdeadbeef; hr = IDirectPlay8Client_CancelAsyncOperation(client, async, 0); - ok(hr == S_OK, "IDirectPlay8Client_CancelAsyncOperation failed with 0x%08x\n", hr); - todo_wine ok(lastAsyncCode == DPNERR_USERCANCEL, "got 0x%08x\n", lastAsyncCode); - todo_wine ok(lastAsyncHandle == async, "got 0x%08x\n", async); + ok(hr == S_OK, "IDirectPlay8Client_CancelAsyncOperation failed with 0x%08lx\n", hr); + todo_wine ok(lastAsyncCode == DPNERR_USERCANCEL, "got 0x%08lx\n", lastAsyncCode); + todo_wine ok(lastAsyncHandle == async, "got 0x%08lx\n", async);
hr = IDirectPlay8Client_Initialize(client2, NULL, DirectPlayMessageHandler, 0); - ok(hr == S_OK, "got %x\n", hr); + ok(hr == S_OK, "got %lx\n", hr);
/* Show that handlers are per object. */ hr = IDirectPlay8Client_CancelAsyncOperation(client2, async2, 0); - todo_wine ok(hr == DPNERR_INVALIDHANDLE, "IDirectPlay8Client_CancelAsyncOperation failed with 0x%08x\n", hr); + todo_wine ok(hr == DPNERR_INVALIDHANDLE, "IDirectPlay8Client_CancelAsyncOperation failed with 0x%08lx\n", hr);
lastAsyncCode = E_FAIL; lastAsyncHandle = 0xdeadbeef; hr = IDirectPlay8Client_CancelAsyncOperation(client, async2, 0); - ok(hr == S_OK, "IDirectPlay8Client_CancelAsyncOperation failed with 0x%08x\n", hr); - todo_wine ok(lastAsyncCode == DPNERR_USERCANCEL, "got 0x%08x\n", lastAsyncCode); - todo_wine ok(lastAsyncHandle == async2, "got 0x%08x\n", async2); + ok(hr == S_OK, "IDirectPlay8Client_CancelAsyncOperation failed with 0x%08lx\n", hr); + todo_wine ok(lastAsyncCode == DPNERR_USERCANCEL, "got 0x%08lx\n", lastAsyncCode); + todo_wine ok(lastAsyncHandle == async2, "got 0x%08lx\n", async2);
IDirectPlay8Address_Release(local); IDirectPlay8Address_Release(host); @@ -341,36 +341,36 @@ static void test_enum_hosts_sync(void) appdesc.guidApplication = appguid;
hr = CoCreateInstance( &CLSID_DirectPlay8Address, NULL, CLSCTX_ALL, &IID_IDirectPlay8Address, (void**)&local); - ok(hr == S_OK, "Failed with 0x%08x\n", hr); + ok(hr == S_OK, "Failed with 0x%08lx\n", hr);
hr = IDirectPlay8Address_SetSP(local, &CLSID_DP8SP_TCPIP); - ok(hr == S_OK, "Failed with 0x%08x\n", hr); + ok(hr == S_OK, "Failed with 0x%08lx\n", hr);
hr = CoCreateInstance( &CLSID_DirectPlay8Address, NULL, CLSCTX_ALL, &IID_IDirectPlay8Address, (void**)&host); - ok(hr == S_OK, "Failed with 0x%08x\n", hr); + ok(hr == S_OK, "Failed with 0x%08lx\n", hr);
hr = IDirectPlay8Address_SetSP(host, &CLSID_DP8SP_TCPIP); - ok(hr == S_OK, "Failed with 0x%08x\n", hr); + ok(hr == S_OK, "Failed with 0x%08lx\n", hr);
hr = IDirectPlay8Address_AddComponent(host, DPNA_KEY_HOSTNAME, localhost, sizeof(localhost), DPNA_DATATYPE_STRING); - ok(hr == S_OK, "Failed with 0x%08x\n", hr); + ok(hr == S_OK, "Failed with 0x%08lx\n", hr);
handlecnt = 0; lastAsyncCode = 0xdeadbeef; hr = IDirectPlay8Client_EnumHosts(client, &appdesc, host, local, NULL, 0, 3, 1500, 1000, NULL, NULL, DPNENUMHOSTS_SYNC); - ok(hr == DPN_OK, "got 0x%08x\n", hr); - ok(lastAsyncCode == 0xdeadbeef, "got 0x%08x\n", lastAsyncCode); + ok(hr == DPN_OK, "got 0x%08lx\n", hr); + ok(lastAsyncCode == 0xdeadbeef, "got 0x%08lx\n", lastAsyncCode); todo_wine ok(handlecnt == 2, "message handler not called\n");
size = sizeof(port); hr = IDirectPlay8Address_GetComponentByName(host, DPNA_KEY_PORT, &port, &size, &type); - ok(hr == DPNERR_DOESNOTEXIST, "got 0x%08x\n", hr); + ok(hr == DPNERR_DOESNOTEXIST, "got 0x%08lx\n", hr);
size = sizeof(port); hr = IDirectPlay8Address_GetComponentByName(local, DPNA_KEY_PORT, &port, &size, &type); - ok(hr == DPNERR_DOESNOTEXIST, "got 0x%08x\n", hr); + ok(hr == DPNERR_DOESNOTEXIST, "got 0x%08lx\n", hr);
/* Try with specific port */ port = 5445; @@ -379,11 +379,11 @@ static void test_enum_hosts_sync(void)
handlecnt = 0; lastAsyncCode = 0xbeefdead; - ok(hr == S_OK, "Failed with 0x%08x\n", hr); + ok(hr == S_OK, "Failed with 0x%08lx\n", hr); hr = IDirectPlay8Client_EnumHosts(client, &appdesc, host, local, NULL, 0, 1, 1500, 1000, NULL, NULL, DPNENUMHOSTS_SYNC); - ok(hr == DPN_OK, "got 0x%08x\n", hr); - ok(lastAsyncCode == 0xbeefdead, "got 0x%08x\n", lastAsyncCode); + ok(hr == DPN_OK, "got 0x%08lx\n", hr); + ok(lastAsyncCode == 0xbeefdead, "got 0x%08lx\n", lastAsyncCode); ok(handlecnt == 0, "message handler called\n");
IDirectPlay8Address_Release(local); @@ -398,26 +398,26 @@ static void test_get_sp_caps(void) memset(&caps, 0, sizeof(DPN_SP_CAPS));
hr = IDirectPlay8Client_GetSPCaps(client, &CLSID_DP8SP_TCPIP, &caps, 0); - ok(hr == DPNERR_INVALIDPARAM, "GetSPCaps unexpectedly returned %x\n", hr); + ok(hr == DPNERR_INVALIDPARAM, "GetSPCaps unexpectedly returned %lx\n", hr);
caps.dwSize = sizeof(DPN_SP_CAPS);
hr = IDirectPlay8Client_GetSPCaps(client, &CLSID_DP8SP_TCPIP, &caps, 0); - ok(hr == DPN_OK, "GetSPCaps failed with %x\n", hr); + ok(hr == DPN_OK, "GetSPCaps failed with %lx\n", hr);
- ok(caps.dwSize == sizeof(DPN_SP_CAPS), "got %d\n", caps.dwSize); + ok(caps.dwSize == sizeof(DPN_SP_CAPS), "got %ld\n", caps.dwSize); ok((caps.dwFlags & (DPNSPCAPS_SUPPORTSDPNSRV | DPNSPCAPS_SUPPORTSBROADCAST | DPNSPCAPS_SUPPORTSALLADAPTERS)) == (DPNSPCAPS_SUPPORTSDPNSRV | DPNSPCAPS_SUPPORTSBROADCAST | DPNSPCAPS_SUPPORTSALLADAPTERS), - "unexpected flags %x\n", caps.dwFlags); - ok(caps.dwNumThreads >= 3, "got %d\n", caps.dwNumThreads); - ok(caps.dwDefaultEnumCount == 5, "expected 5, got %d\n", caps.dwDefaultEnumCount); - ok(caps.dwDefaultEnumRetryInterval == 1500, "expected 1500, got %d\n", caps.dwDefaultEnumRetryInterval); - ok(caps.dwDefaultEnumTimeout == 1500, "expected 1500, got %d\n", caps.dwDefaultEnumTimeout); - ok(caps.dwMaxEnumPayloadSize == 983, "expected 983, got %d\n", caps.dwMaxEnumPayloadSize); - ok(caps.dwBuffersPerThread == 1, "expected 1, got %d\n", caps.dwBuffersPerThread); + "unexpected flags %lx\n", caps.dwFlags); + ok(caps.dwNumThreads >= 3, "got %ld\n", caps.dwNumThreads); + ok(caps.dwDefaultEnumCount == 5, "expected 5, got %ld\n", caps.dwDefaultEnumCount); + ok(caps.dwDefaultEnumRetryInterval == 1500, "expected 1500, got %ld\n", caps.dwDefaultEnumRetryInterval); + ok(caps.dwDefaultEnumTimeout == 1500, "expected 1500, got %ld\n", caps.dwDefaultEnumTimeout); + ok(caps.dwMaxEnumPayloadSize == 983, "expected 983, got %ld\n", caps.dwMaxEnumPayloadSize); + ok(caps.dwBuffersPerThread == 1, "expected 1, got %ld\n", caps.dwBuffersPerThread); ok(caps.dwSystemBufferSize == 0x10000 || broken(caps.dwSystemBufferSize == 0x2000 /* before Win8 */), - "expected 0x10000, got 0x%x\n", caps.dwSystemBufferSize); + "expected 0x10000, got 0x%lx\n", caps.dwSystemBufferSize);
caps.dwNumThreads = 2; caps.dwDefaultEnumCount = 3; @@ -427,24 +427,24 @@ static void test_get_sp_caps(void) caps.dwBuffersPerThread = 2; caps.dwSystemBufferSize = 0x0ffff; hr = IDirectPlay8Client_SetSPCaps(client, &CLSID_DP8SP_TCPIP, &caps, 0); - ok(hr == DPN_OK, "SetSPCaps failed with %x\n", hr); + ok(hr == DPN_OK, "SetSPCaps failed with %lx\n", hr);
hr = IDirectPlay8Client_GetSPCaps(client, &CLSID_DP8SP_TCPIP, &caps, 0); - ok(hr == DPN_OK, "GetSPCaps failed with %x\n", hr); + ok(hr == DPN_OK, "GetSPCaps failed with %lx\n", hr);
- ok(caps.dwSize == sizeof(DPN_SP_CAPS), "got %d\n", caps.dwSize); - ok(caps.dwNumThreads >= 3, "got %d\n", caps.dwNumThreads); - ok(caps.dwDefaultEnumCount == 5, "expected 5, got %d\n", caps.dwDefaultEnumCount); - ok(caps.dwDefaultEnumRetryInterval == 1500, "expected 1500, got %d\n", caps.dwDefaultEnumRetryInterval); - ok(caps.dwDefaultEnumTimeout == 1500, "expected 1500, got %d\n", caps.dwDefaultEnumTimeout); - ok(caps.dwMaxEnumPayloadSize == 983, "expected 983, got %d\n", caps.dwMaxEnumPayloadSize); - ok(caps.dwBuffersPerThread == 1, "expected 1, got %d\n", caps.dwBuffersPerThread); - ok(caps.dwSystemBufferSize == 0x0ffff, "expected 0x0ffff, got 0x%x\n", caps.dwSystemBufferSize); + ok(caps.dwSize == sizeof(DPN_SP_CAPS), "got %ld\n", caps.dwSize); + ok(caps.dwNumThreads >= 3, "got %ld\n", caps.dwNumThreads); + ok(caps.dwDefaultEnumCount == 5, "expected 5, got %ld\n", caps.dwDefaultEnumCount); + ok(caps.dwDefaultEnumRetryInterval == 1500, "expected 1500, got %ld\n", caps.dwDefaultEnumRetryInterval); + ok(caps.dwDefaultEnumTimeout == 1500, "expected 1500, got %ld\n", caps.dwDefaultEnumTimeout); + ok(caps.dwMaxEnumPayloadSize == 983, "expected 983, got %ld\n", caps.dwMaxEnumPayloadSize); + ok(caps.dwBuffersPerThread == 1, "expected 1, got %ld\n", caps.dwBuffersPerThread); + ok(caps.dwSystemBufferSize == 0x0ffff, "expected 0x0ffff, got 0x%lx\n", caps.dwSystemBufferSize);
/* Reset the System setting back to its default. */ caps.dwSystemBufferSize = 0x10000; hr = IDirectPlay8Client_SetSPCaps(client, &CLSID_DP8SP_TCPIP, &caps, 0); - ok(hr == DPN_OK, "SetSPCaps failed with %x\n", hr); + ok(hr == DPN_OK, "SetSPCaps failed with %lx\n", hr); }
static void test_lobbyclient(void) @@ -457,13 +457,13 @@ static void test_lobbyclient(void) if(SUCCEEDED(hr)) { hr = IDirectPlay8LobbyClient_Initialize(client, NULL, NULL, 0); - ok(hr == E_POINTER, "got 0x%08x\n", hr); + ok(hr == E_POINTER, "got 0x%08lx\n", hr);
hr = IDirectPlay8LobbyClient_Initialize(client, NULL, DirectPlayLobbyClientMessageHandler, 0); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
hr = IDirectPlay8LobbyClient_Close(client, 0); - todo_wine ok(hr == S_OK, "got 0x%08x\n", hr); + todo_wine ok(hr == S_OK, "got 0x%08lx\n", hr);
IDirectPlay8LobbyClient_Release(client); } @@ -482,48 +482,48 @@ static void test_player_info(void) info.dwInfoFlags = DPNINFO_NAME;
hr = IDirectPlay8Client_SetClientInfo(client, NULL, NULL, NULL, DPNSETCLIENTINFO_SYNC); - ok(hr == E_POINTER, "got %x\n", hr); + ok(hr == E_POINTER, "got %lx\n", hr);
info.pwszName = NULL; hr = IDirectPlay8Client_SetClientInfo(client, &info, NULL, NULL, DPNSETCLIENTINFO_SYNC); - ok(hr == S_OK, "got %x\n", hr); + ok(hr == S_OK, "got %lx\n", hr);
info.pwszName = name; hr = IDirectPlay8Client_SetClientInfo(client, &info, NULL, NULL, DPNSETCLIENTINFO_SYNC); - ok(hr == S_OK, "got %x\n", hr); + ok(hr == S_OK, "got %lx\n", hr);
info.dwInfoFlags = DPNINFO_NAME; info.pwszName = name2; hr = IDirectPlay8Client_SetClientInfo(client, &info, NULL, NULL, DPNSETCLIENTINFO_SYNC); - ok(hr == S_OK, "got %x\n", hr); + ok(hr == S_OK, "got %lx\n", hr);
info.dwInfoFlags = DPNINFO_DATA; info.pwszName = NULL; info.pvData = NULL; info.dwDataSize = sizeof(data); hr = IDirectPlay8Client_SetClientInfo(client, &info, NULL, NULL, DPNSETCLIENTINFO_SYNC); - ok(hr == E_POINTER, "got %x\n", hr); + ok(hr == E_POINTER, "got %lx\n", hr);
info.dwInfoFlags = DPNINFO_DATA; info.pwszName = NULL; info.pvData = data; info.dwDataSize = 0; hr = IDirectPlay8Client_SetClientInfo(client, &info, NULL, NULL, DPNSETCLIENTINFO_SYNC); - ok(hr == S_OK, "got %x\n", hr); + ok(hr == S_OK, "got %lx\n", hr);
info.dwInfoFlags = DPNINFO_DATA; info.pwszName = NULL; info.pvData = data; info.dwDataSize = sizeof(data); hr = IDirectPlay8Client_SetClientInfo(client, &info, NULL, NULL, DPNSETCLIENTINFO_SYNC); - ok(hr == S_OK, "got %x\n", hr); + ok(hr == S_OK, "got %lx\n", hr);
info.dwInfoFlags = DPNINFO_DATA | DPNINFO_NAME; info.pwszName = name; info.pvData = data; info.dwDataSize = sizeof(data); hr = IDirectPlay8Client_SetClientInfo(client, &info, NULL, NULL, DPNSETCLIENTINFO_SYNC); - ok(hr == S_OK, "got %x\n", hr); + ok(hr == S_OK, "got %lx\n", hr);
/* Leave ClientInfo with only the name set. */ info.dwInfoFlags = DPNINFO_DATA | DPNINFO_NAME; @@ -531,7 +531,7 @@ static void test_player_info(void) info.pvData = NULL; info.dwDataSize = 0; hr = IDirectPlay8Client_SetClientInfo(client, &info, NULL, NULL, DPNSETCLIENTINFO_SYNC); - ok(hr == S_OK, "got %x\n", hr); + ok(hr == S_OK, "got %lx\n", hr); }
static void test_cleanup_dp(void) @@ -539,12 +539,12 @@ static void test_cleanup_dp(void) HRESULT hr;
hr = IDirectPlay8Client_Close(client, 0); - ok(hr == S_OK, "IDirectPlay8Client_Close failed with %x\n", hr); + ok(hr == S_OK, "IDirectPlay8Client_Close failed with %lx\n", hr);
if(lobbied) { hr = IDirectPlay8LobbiedApplication_Close(lobbied, 0); - ok(hr == S_OK, "IDirectPlay8LobbiedApplication_Close failed with %x\n", hr); + ok(hr == S_OK, "IDirectPlay8LobbiedApplication_Close failed with %lx\n", hr);
IDirectPlay8LobbiedApplication_Release(lobbied); } @@ -559,22 +559,22 @@ static void test_close(void) DPN_SP_CAPS caps;
hr = CoCreateInstance(&CLSID_DirectPlay8Client, NULL, CLSCTX_INPROC_SERVER, &IID_IDirectPlay8Client, (void **)&client2); - ok(hr == S_OK, "got 0x%x\n", hr); + ok(hr == S_OK, "got 0x%lx\n", hr);
memset(&caps, 0, sizeof(DPN_SP_CAPS)); caps.dwSize = sizeof(DPN_SP_CAPS);
hr = IDirectPlay8Client_Initialize(client2, NULL, DirectPlayMessageHandler, 0); - ok(hr == S_OK, "got %x\n", hr); + ok(hr == S_OK, "got %lx\n", hr);
hr = IDirectPlay8Client_GetSPCaps(client2, &CLSID_DP8SP_TCPIP, &caps, 0); - ok(hr == DPN_OK, "got %x\n", hr); + ok(hr == DPN_OK, "got %lx\n", hr);
hr = IDirectPlay8Client_Close(client2, 0); - ok(hr == DPN_OK, "got %x\n", hr); + ok(hr == DPN_OK, "got %lx\n", hr);
hr = IDirectPlay8Client_GetSPCaps(client2, &CLSID_DP8SP_TCPIP, &caps, 0); - ok(hr == DPNERR_UNINITIALIZED, "got %x\n", hr); + ok(hr == DPNERR_UNINITIALIZED, "got %lx\n", hr);
IDirectPlay8Client_Release(client2); } @@ -586,34 +586,34 @@ static void test_init_dp_peer(void) DPNHANDLE lobbyConnection;
hr = CoCreateInstance(&CLSID_DirectPlay8Peer, NULL, CLSCTX_INPROC_SERVER, &IID_IDirectPlay8Peer, (void **)&peer); - ok(hr == S_OK, "CoCreateInstance failed with 0x%x\n", hr); + ok(hr == S_OK, "CoCreateInstance failed with 0x%lx\n", hr);
memset(&caps, 0, sizeof(DPN_SP_CAPS)); caps.dwSize = sizeof(DPN_SP_CAPS);
hr = IDirectPlay8Peer_SetSPCaps(peer, &CLSID_DP8SP_TCPIP, &caps, 0); - ok(hr == DPNERR_INVALIDPARAM, "SetSPCaps failed with %x\n", hr); + ok(hr == DPNERR_INVALIDPARAM, "SetSPCaps failed with %lx\n", hr);
hr = IDirectPlay8Peer_GetSPCaps(peer, &CLSID_DP8SP_TCPIP, &caps, 0); - ok(hr == DPNERR_UNINITIALIZED, "GetSPCaps failed with %x\n", hr); + ok(hr == DPNERR_UNINITIALIZED, "GetSPCaps failed with %lx\n", hr);
hr = IDirectPlay8Peer_Initialize(peer, NULL, NULL, 0); - ok(hr == DPNERR_INVALIDPARAM, "got %x\n", hr); + ok(hr == DPNERR_INVALIDPARAM, "got %lx\n", hr);
hr = IDirectPlay8Peer_Initialize(peer, NULL, DirectPlayMessageHandler, 0); - ok(hr == S_OK, "IDirectPlay8Peer_Initialize failed with %x\n", hr); + ok(hr == S_OK, "IDirectPlay8Peer_Initialize failed with %lx\n", hr);
hr = CoCreateInstance(&CLSID_DirectPlay8LobbiedApplication, NULL, CLSCTX_INPROC_SERVER, &IID_IDirectPlay8LobbiedApplication, (void **)&lobbied); - ok(hr == S_OK, "CoCreateInstance failed with 0x%x\n", hr); + ok(hr == S_OK, "CoCreateInstance failed with 0x%lx\n", hr);
hr = IDirectPlay8LobbiedApplication_Initialize(lobbied, NULL, NULL, &lobbyConnection, 0); - ok(hr == DPNERR_INVALIDPOINTER, "Failed with %x\n", hr); + ok(hr == DPNERR_INVALIDPOINTER, "Failed with %lx\n", hr);
hr = IDirectPlay8LobbiedApplication_Initialize(lobbied, NULL, DirectPlayLobbyMessageHandler, &lobbyConnection, 0); - ok(hr == S_OK, "IDirectPlay8LobbiedApplication_Initialize failed with %x\n", hr); + ok(hr == S_OK, "IDirectPlay8LobbiedApplication_Initialize failed with %lx\n", hr); }
static void test_enum_service_providers_peer(void) @@ -627,22 +627,22 @@ static void test_enum_service_providers_peer(void) items = 0;
hr = IDirectPlay8Peer_EnumServiceProviders(peer, NULL, NULL, NULL, &size, NULL, 0); - ok(hr == E_POINTER, "IDirectPlay8Peer_EnumServiceProviders failed with %x\n", hr); + ok(hr == E_POINTER, "IDirectPlay8Peer_EnumServiceProviders failed with %lx\n", hr);
hr = IDirectPlay8Peer_EnumServiceProviders(peer, NULL, NULL, NULL, NULL, &items, 0); - ok(hr == E_POINTER, "IDirectPlay8Peer_EnumServiceProviders failed with %x\n", hr); + ok(hr == E_POINTER, "IDirectPlay8Peer_EnumServiceProviders failed with %lx\n", hr);
hr = IDirectPlay8Peer_EnumServiceProviders(peer, NULL, NULL, NULL, &size, &items, 0); - ok(hr == DPNERR_BUFFERTOOSMALL, "IDirectPlay8Peer_EnumServiceProviders failed with %x\n", hr); + ok(hr == DPNERR_BUFFERTOOSMALL, "IDirectPlay8Peer_EnumServiceProviders failed with %lx\n", hr); ok(size != 0, "size is unexpectedly 0\n");
serv_prov_info = HeapAlloc(GetProcessHeap(), 0, size);
hr = IDirectPlay8Peer_EnumServiceProviders(peer, NULL, NULL, serv_prov_info, &size, &items, 0); - ok(hr == S_OK, "IDirectPlay8Peer_EnumServiceProviders failed with %x\n", hr); + ok(hr == S_OK, "IDirectPlay8Peer_EnumServiceProviders failed with %lx\n", hr); ok(items != 0, "Found unexpectedly no service providers\n");
- trace("number of items found: %d\n", items); + trace("number of items found: %ld\n", items);
for (i=0;i<items;i++) { @@ -656,13 +656,13 @@ static void test_enum_service_providers_peer(void) items = 0;
hr = IDirectPlay8Peer_EnumServiceProviders(peer, &CLSID_DP8SP_TCPIP, NULL, NULL, &size, &items, 0); - ok(hr == DPNERR_BUFFERTOOSMALL, "IDirectPlay8Peer_EnumServiceProviders failed with %x\n", hr); + ok(hr == DPNERR_BUFFERTOOSMALL, "IDirectPlay8Peer_EnumServiceProviders failed with %lx\n", hr); ok(size != 0, "size is unexpectedly 0\n");
serv_prov_info = HeapAlloc(GetProcessHeap(), 0, size);
hr = IDirectPlay8Peer_EnumServiceProviders(peer, &CLSID_DP8SP_TCPIP, NULL, serv_prov_info, &size, &items, 0); - ok(hr == S_OK, "IDirectPlay8Peer_EnumServiceProviders failed with %x\n", hr); + ok(hr == S_OK, "IDirectPlay8Peer_EnumServiceProviders failed with %lx\n", hr); ok(items != 0, "Found unexpectedly no adapter\n");
@@ -675,8 +675,8 @@ static void test_enum_service_providers_peer(void) /* Invalid GUID */ items = 88; hr = IDirectPlay8Peer_EnumServiceProviders(peer, &appguid, NULL, serv_prov_info, &size, &items, 0); - ok(hr == DPNERR_DOESNOTEXIST, "IDirectPlay8Peer_EnumServiceProviders failed with %x\n", hr); - ok(items == 88, "Found adapter %d\n", items); + ok(hr == DPNERR_DOESNOTEXIST, "IDirectPlay8Peer_EnumServiceProviders failed with %lx\n", hr); + ok(items == 88, "Found adapter %ld\n", items);
HeapFree(GetProcessHeap(), 0, serv_prov_info); } @@ -698,42 +698,42 @@ static void test_enum_hosts_peer(void) appdesc.guidApplication = appguid;
hr = CoCreateInstance(&CLSID_DirectPlay8Peer, NULL, CLSCTX_INPROC_SERVER, &IID_IDirectPlay8Peer, (void **)&peer2); - ok(hr == S_OK, "CoCreateInstance failed with 0x%x\n", hr); + ok(hr == S_OK, "CoCreateInstance failed with 0x%lx\n", hr);
hr = CoCreateInstance( &CLSID_DirectPlay8Address, NULL, CLSCTX_ALL, &IID_IDirectPlay8Address, (LPVOID*)&local); - ok(hr == S_OK, "IDirectPlay8Address failed with 0x%08x\n", hr); + ok(hr == S_OK, "IDirectPlay8Address failed with 0x%08lx\n", hr);
hr = IDirectPlay8Address_SetSP(local, &CLSID_DP8SP_TCPIP); - ok(hr == S_OK, "IDirectPlay8Address_SetSP failed with 0x%08x\n", hr); + ok(hr == S_OK, "IDirectPlay8Address_SetSP failed with 0x%08lx\n", hr);
hr = CoCreateInstance( &CLSID_DirectPlay8Address, NULL, CLSCTX_ALL, &IID_IDirectPlay8Address, (LPVOID*)&host); - ok(hr == S_OK, "IDirectPlay8Address failed with 0x%08x\n", hr); + ok(hr == S_OK, "IDirectPlay8Address failed with 0x%08lx\n", hr);
hr = IDirectPlay8Address_SetSP(host, &CLSID_DP8SP_TCPIP); - ok(hr == S_OK, "IDirectPlay8Address_SetSP failed with 0x%08x\n", hr); + ok(hr == S_OK, "IDirectPlay8Address_SetSP failed with 0x%08lx\n", hr);
hr = IDirectPlay8Address_AddComponent(host, DPNA_KEY_HOSTNAME, localhost, sizeof(localhost), DPNA_DATATYPE_STRING); - ok(hr == S_OK, "IDirectPlay8Address failed with 0x%08x\n", hr); + ok(hr == S_OK, "IDirectPlay8Address failed with 0x%08lx\n", hr);
hr = IDirectPlay8Peer_EnumHosts(peer, &appdesc, host, local, NULL, 0, INFINITE, 0, INFINITE, NULL, &async, 0); - ok(hr == DPNSUCCESS_PENDING, "IDirectPlay8Peer_EnumServiceProviders failed with 0x%08x\n", hr); + ok(hr == DPNSUCCESS_PENDING, "IDirectPlay8Peer_EnumServiceProviders failed with 0x%08lx\n", hr); todo_wine ok(async, "No Handle returned\n");
hr = IDirectPlay8Peer_CancelAsyncOperation(peer, async, 0); - todo_wine ok(hr == S_OK, "IDirectPlay8Peer_CancelAsyncOperation failed with 0x%08x\n", hr); + todo_wine ok(hr == S_OK, "IDirectPlay8Peer_CancelAsyncOperation failed with 0x%08lx\n", hr);
/* No Initialize has been called on peer2. */ hr = IDirectPlay8Peer_EnumHosts(peer2, &appdesc, host, local, NULL, 0, INFINITE, 0, INFINITE, NULL, &async, 0); - ok(hr == DPNERR_UNINITIALIZED, "IDirectPlay8Peer_EnumHosts failed with 0x%08x\n", hr); + ok(hr == DPNERR_UNINITIALIZED, "IDirectPlay8Peer_EnumHosts failed with 0x%08lx\n", hr);
/* Since we are running asynchronously, EnumHosts returns DPNSUCCESS_PENDING. */ hr = IDirectPlay8Peer_EnumHosts(peer, &appdesc, host, local, NULL, 0, INFINITE, 0, INFINITE, NULL, &async, 0); - ok(hr == DPNSUCCESS_PENDING, "IDirectPlay8Peer_EnumHosts failed with 0x%08x\n", hr); + ok(hr == DPNSUCCESS_PENDING, "IDirectPlay8Peer_EnumHosts failed with 0x%08lx\n", hr); todo_wine ok(async, "No Handle returned\n");
hr = IDirectPlay8Peer_EnumHosts(peer, &appdesc, host, local, NULL, 0, INFINITE, 0, INFINITE, NULL, &async2, 0); - ok(hr == DPNSUCCESS_PENDING, "IDirectPlay8Peer_EnumHosts failed with 0x%08x\n", hr); + ok(hr == DPNSUCCESS_PENDING, "IDirectPlay8Peer_EnumHosts failed with 0x%08lx\n", hr); todo_wine ok(async2, "No Handle returned\n"); todo_wine ok(async2 != async, "Same handle returned.\n");
@@ -742,16 +742,16 @@ static void test_enum_hosts_peer(void) lastAsyncCode = E_FAIL; lastAsyncHandle = 0xdeadbeef; hr = IDirectPlay8Peer_CancelAsyncOperation(peer, async, 0); - todo_wine ok(hr == S_OK, "IDirectPlay8Peer_CancelAsyncOperation failed with 0x%08x\n", hr); - todo_wine ok(lastAsyncCode == DPNERR_USERCANCEL, "got 0x%08x\n", lastAsyncCode); - todo_wine ok(lastAsyncHandle == async, "got 0x%08x\n", async); + todo_wine ok(hr == S_OK, "IDirectPlay8Peer_CancelAsyncOperation failed with 0x%08lx\n", hr); + todo_wine ok(lastAsyncCode == DPNERR_USERCANCEL, "got 0x%08lx\n", lastAsyncCode); + todo_wine ok(lastAsyncHandle == async, "got 0x%08lx\n", async);
lastAsyncCode = E_FAIL; lastAsyncHandle = 0xdeadbeef; hr = IDirectPlay8Peer_CancelAsyncOperation(peer, async2, 0); - todo_wine ok(hr == S_OK, "IDirectPlay8Peer_CancelAsyncOperation failed with 0x%08x\n", hr); - todo_wine ok(lastAsyncCode == DPNERR_USERCANCEL, "got 0x%08x\n", lastAsyncCode); - todo_wine ok(lastAsyncHandle == async2, "got 0x%08x\n", async2); + todo_wine ok(hr == S_OK, "IDirectPlay8Peer_CancelAsyncOperation failed with 0x%08lx\n", hr); + todo_wine ok(lastAsyncCode == DPNERR_USERCANCEL, "got 0x%08lx\n", lastAsyncCode); + todo_wine ok(lastAsyncHandle == async2, "got 0x%08lx\n", async2);
IDirectPlay8Peer_Release(peer2); IDirectPlay8Address_Release(local); @@ -771,36 +771,36 @@ static void test_enum_hosts_sync_peer(void) appdesc.guidApplication = appguid;
hr = CoCreateInstance( &CLSID_DirectPlay8Address, NULL, CLSCTX_ALL, &IID_IDirectPlay8Address, (void**)&local); - ok(hr == S_OK, "Failed with 0x%08x\n", hr); + ok(hr == S_OK, "Failed with 0x%08lx\n", hr);
hr = IDirectPlay8Address_SetSP(local, &CLSID_DP8SP_TCPIP); - ok(hr == S_OK, "Failed with 0x%08x\n", hr); + ok(hr == S_OK, "Failed with 0x%08lx\n", hr);
hr = CoCreateInstance( &CLSID_DirectPlay8Address, NULL, CLSCTX_ALL, &IID_IDirectPlay8Address, (void**)&host); - ok(hr == S_OK, "Failed with 0x%08x\n", hr); + ok(hr == S_OK, "Failed with 0x%08lx\n", hr);
hr = IDirectPlay8Address_SetSP(host, &CLSID_DP8SP_TCPIP); - ok(hr == S_OK, "Failed with 0x%08x\n", hr); + ok(hr == S_OK, "Failed with 0x%08lx\n", hr);
hr = IDirectPlay8Address_AddComponent(host, DPNA_KEY_HOSTNAME, localhost, sizeof(localhost), DPNA_DATATYPE_STRING); - ok(hr == S_OK, "Failed with 0x%08x\n", hr); + ok(hr == S_OK, "Failed with 0x%08lx\n", hr);
handlecnt = 0; lastAsyncCode = 0xdeadbeef; hr = IDirectPlay8Peer_EnumHosts(peer, &appdesc, host, local, NULL, 0, 3, 1500, 1000, NULL, NULL, DPNENUMHOSTS_SYNC); - ok(hr == DPN_OK, "got 0x%08x\n", hr); - ok(lastAsyncCode == 0xdeadbeef, "got 0x%08x\n", lastAsyncCode); + ok(hr == DPN_OK, "got 0x%08lx\n", hr); + ok(lastAsyncCode == 0xdeadbeef, "got 0x%08lx\n", lastAsyncCode); todo_wine ok(handlecnt == 2, "wrong handle cnt\n");
size = sizeof(port); hr = IDirectPlay8Address_GetComponentByName(host, DPNA_KEY_PORT, &port, &size, &type); - ok(hr == DPNERR_DOESNOTEXIST, "got 0x%08x\n", hr); + ok(hr == DPNERR_DOESNOTEXIST, "got 0x%08lx\n", hr);
size = sizeof(port); hr = IDirectPlay8Address_GetComponentByName(local, DPNA_KEY_PORT, &port, &size, &type); - ok(hr == DPNERR_DOESNOTEXIST, "got 0x%08x\n", hr); + ok(hr == DPNERR_DOESNOTEXIST, "got 0x%08lx\n", hr);
/* Try with specific port */ port = 5445; @@ -809,11 +809,11 @@ static void test_enum_hosts_sync_peer(void)
handlecnt = 0; lastAsyncCode = 0xbeefdead; - ok(hr == S_OK, "Failed with 0x%08x\n", hr); + ok(hr == S_OK, "Failed with 0x%08lx\n", hr); hr = IDirectPlay8Peer_EnumHosts(peer, &appdesc, host, local, NULL, 0, 1, 1500, 1000, NULL, NULL, DPNENUMHOSTS_SYNC); - ok(hr == DPN_OK, "got 0x%08x\n", hr); - ok(lastAsyncCode == 0xbeefdead, "got 0x%08x\n", lastAsyncCode); + ok(hr == DPN_OK, "got 0x%08lx\n", hr); + ok(lastAsyncCode == 0xbeefdead, "got 0x%08lx\n", lastAsyncCode); ok(handlecnt == 0, "message handler called\n");
IDirectPlay8Address_Release(local); @@ -828,26 +828,26 @@ static void test_get_sp_caps_peer(void) memset(&caps, 0, sizeof(DPN_SP_CAPS));
hr = IDirectPlay8Peer_GetSPCaps(peer, &CLSID_DP8SP_TCPIP, &caps, 0); - ok(hr == DPNERR_INVALIDPARAM, "GetSPCaps unexpectedly returned %x\n", hr); + ok(hr == DPNERR_INVALIDPARAM, "GetSPCaps unexpectedly returned %lx\n", hr);
caps.dwSize = sizeof(DPN_SP_CAPS);
hr = IDirectPlay8Peer_GetSPCaps(peer, &CLSID_DP8SP_TCPIP, &caps, 0); - ok(hr == DPN_OK, "GetSPCaps failed with %x\n", hr); + ok(hr == DPN_OK, "GetSPCaps failed with %lx\n", hr);
- ok(caps.dwSize == sizeof(DPN_SP_CAPS), "got %d\n", caps.dwSize); + ok(caps.dwSize == sizeof(DPN_SP_CAPS), "got %ld\n", caps.dwSize); ok((caps.dwFlags & (DPNSPCAPS_SUPPORTSDPNSRV | DPNSPCAPS_SUPPORTSBROADCAST | DPNSPCAPS_SUPPORTSALLADAPTERS)) == (DPNSPCAPS_SUPPORTSDPNSRV | DPNSPCAPS_SUPPORTSBROADCAST | DPNSPCAPS_SUPPORTSALLADAPTERS), - "unexpected flags %x\n", caps.dwFlags); - ok(caps.dwNumThreads >= 3, "got %d\n", caps.dwNumThreads); - ok(caps.dwDefaultEnumCount == 5, "expected 5, got %d\n", caps.dwDefaultEnumCount); - ok(caps.dwDefaultEnumRetryInterval == 1500, "expected 1500, got %d\n", caps.dwDefaultEnumRetryInterval); - ok(caps.dwDefaultEnumTimeout == 1500, "expected 1500, got %d\n", caps.dwDefaultEnumTimeout); - ok(caps.dwMaxEnumPayloadSize == 983, "expected 983, got %d\n", caps.dwMaxEnumPayloadSize); - ok(caps.dwBuffersPerThread == 1, "expected 1, got %d\n", caps.dwBuffersPerThread); + "unexpected flags %lx\n", caps.dwFlags); + ok(caps.dwNumThreads >= 3, "got %ld\n", caps.dwNumThreads); + ok(caps.dwDefaultEnumCount == 5, "expected 5, got %ld\n", caps.dwDefaultEnumCount); + ok(caps.dwDefaultEnumRetryInterval == 1500, "expected 1500, got %ld\n", caps.dwDefaultEnumRetryInterval); + ok(caps.dwDefaultEnumTimeout == 1500, "expected 1500, got %ld\n", caps.dwDefaultEnumTimeout); + ok(caps.dwMaxEnumPayloadSize == 983, "expected 983, got %ld\n", caps.dwMaxEnumPayloadSize); + ok(caps.dwBuffersPerThread == 1, "expected 1, got %ld\n", caps.dwBuffersPerThread); ok(caps.dwSystemBufferSize == 0x10000 || broken(caps.dwSystemBufferSize == 0x2000 /* before Win8 */), - "expected 0x10000, got 0x%x\n", caps.dwSystemBufferSize); + "expected 0x10000, got 0x%lx\n", caps.dwSystemBufferSize);
caps.dwNumThreads = 2; caps.dwDefaultEnumCount = 3; @@ -857,19 +857,19 @@ static void test_get_sp_caps_peer(void) caps.dwBuffersPerThread = 2; caps.dwSystemBufferSize = 0x0ffff; hr = IDirectPlay8Peer_SetSPCaps(peer, &CLSID_DP8SP_TCPIP, &caps, 0); - ok(hr == DPN_OK, "SetSPCaps failed with %x\n", hr); + ok(hr == DPN_OK, "SetSPCaps failed with %lx\n", hr);
hr = IDirectPlay8Peer_GetSPCaps(peer, &CLSID_DP8SP_TCPIP, &caps, 0); - ok(hr == DPN_OK, "GetSPCaps failed with %x\n", hr); - - ok(caps.dwSize == sizeof(DPN_SP_CAPS), "got %d\n", caps.dwSize); - ok(caps.dwNumThreads >= 3, "got %d\n", caps.dwNumThreads); - ok(caps.dwDefaultEnumCount == 5, "expected 5, got %d\n", caps.dwDefaultEnumCount); - ok(caps.dwDefaultEnumRetryInterval == 1500, "expected 1500, got %d\n", caps.dwDefaultEnumRetryInterval); - ok(caps.dwDefaultEnumTimeout == 1500, "expected 1500, got %d\n", caps.dwDefaultEnumTimeout); - ok(caps.dwMaxEnumPayloadSize == 983, "expected 983, got %d\n", caps.dwMaxEnumPayloadSize); - ok(caps.dwBuffersPerThread == 1, "expected 1, got %d\n", caps.dwBuffersPerThread); - ok(caps.dwSystemBufferSize == 0x0ffff, "expected 0x0ffff, got 0x%x\n", caps.dwSystemBufferSize); + ok(hr == DPN_OK, "GetSPCaps failed with %lx\n", hr); + + ok(caps.dwSize == sizeof(DPN_SP_CAPS), "got %ld\n", caps.dwSize); + ok(caps.dwNumThreads >= 3, "got %ld\n", caps.dwNumThreads); + ok(caps.dwDefaultEnumCount == 5, "expected 5, got %ld\n", caps.dwDefaultEnumCount); + ok(caps.dwDefaultEnumRetryInterval == 1500, "expected 1500, got %ld\n", caps.dwDefaultEnumRetryInterval); + ok(caps.dwDefaultEnumTimeout == 1500, "expected 1500, got %ld\n", caps.dwDefaultEnumTimeout); + ok(caps.dwMaxEnumPayloadSize == 983, "expected 983, got %ld\n", caps.dwMaxEnumPayloadSize); + ok(caps.dwBuffersPerThread == 1, "expected 1, got %ld\n", caps.dwBuffersPerThread); + ok(caps.dwSystemBufferSize == 0x0ffff, "expected 0x0ffff, got 0x%lx\n", caps.dwSystemBufferSize); }
static void test_player_info_peer(void) @@ -885,20 +885,20 @@ static void test_player_info_peer(void) info.dwInfoFlags = DPNINFO_NAME;
hr = IDirectPlay8Peer_SetPeerInfo(peer, NULL, NULL, NULL, DPNSETPEERINFO_SYNC); - ok(hr == E_POINTER, "got %x\n", hr); + ok(hr == E_POINTER, "got %lx\n", hr);
info.pwszName = NULL; hr = IDirectPlay8Peer_SetPeerInfo(peer, &info, NULL, NULL, DPNSETPEERINFO_SYNC); - ok(hr == S_OK, "got %x\n", hr); + ok(hr == S_OK, "got %lx\n", hr);
info.pwszName = name; hr = IDirectPlay8Peer_SetPeerInfo(peer, &info, NULL, NULL, DPNSETPEERINFO_SYNC); - ok(hr == S_OK, "got %x\n", hr); + ok(hr == S_OK, "got %lx\n", hr);
info.dwInfoFlags = DPNINFO_NAME; info.pwszName = name2; hr = IDirectPlay8Peer_SetPeerInfo(peer, &info, NULL, NULL, DPNSETPEERINFO_SYNC); - ok(hr == S_OK, "got %x\n", hr); + ok(hr == S_OK, "got %lx\n", hr);
if(0) /* Crashes on windows */ { @@ -907,7 +907,7 @@ if(0) /* Crashes on windows */ info.pvData = NULL; info.dwDataSize = sizeof(data); hr = IDirectPlay8Peer_SetPeerInfo(peer, &info, NULL, NULL, DPNSETPEERINFO_SYNC); - ok(hr == S_OK, "got %x\n", hr); + ok(hr == S_OK, "got %lx\n", hr); }
info.dwInfoFlags = DPNINFO_DATA; @@ -915,21 +915,21 @@ if(0) /* Crashes on windows */ info.pvData = data; info.dwDataSize = 0; hr = IDirectPlay8Peer_SetPeerInfo(peer, &info, NULL, NULL, DPNSETPEERINFO_SYNC); - ok(hr == S_OK, "got %x\n", hr); + ok(hr == S_OK, "got %lx\n", hr);
info.dwInfoFlags = DPNINFO_DATA; info.pwszName = NULL; info.pvData = data; info.dwDataSize = sizeof(data); hr = IDirectPlay8Peer_SetPeerInfo(peer, &info, NULL, NULL, DPNSETPEERINFO_SYNC); - ok(hr == S_OK, "got %x\n", hr); + ok(hr == S_OK, "got %lx\n", hr);
info.dwInfoFlags = DPNINFO_DATA | DPNINFO_NAME; info.pwszName = name; info.pvData = data; info.dwDataSize = sizeof(data); hr = IDirectPlay8Peer_SetPeerInfo(peer, &info, NULL, NULL, DPNSETPEERINFO_SYNC); - ok(hr == S_OK, "got %x\n", hr); + ok(hr == S_OK, "got %lx\n", hr);
/* Leave PeerInfo with only the name set. */ info.dwInfoFlags = DPNINFO_DATA | DPNINFO_NAME; @@ -937,7 +937,7 @@ if(0) /* Crashes on windows */ info.pvData = NULL; info.dwDataSize = 0; hr = IDirectPlay8Peer_SetPeerInfo(peer, &info, NULL, NULL, DPNSETPEERINFO_SYNC); - ok(hr == S_OK, "got %x\n", hr); + ok(hr == S_OK, "got %lx\n", hr); }
static void test_cleanup_dp_peer(void) @@ -945,12 +945,12 @@ static void test_cleanup_dp_peer(void) HRESULT hr;
hr = IDirectPlay8Peer_Close(peer, 0); - ok(hr == S_OK, "IDirectPlay8Peer_Close failed with %x\n", hr); + ok(hr == S_OK, "IDirectPlay8Peer_Close failed with %lx\n", hr);
if(lobbied) { hr = IDirectPlay8LobbiedApplication_Close(lobbied, 0); - ok(hr == S_OK, "IDirectPlay8LobbiedApplication_Close failed with %x\n", hr); + ok(hr == S_OK, "IDirectPlay8LobbiedApplication_Close failed with %lx\n", hr);
IDirectPlay8LobbiedApplication_Release(lobbied); } @@ -988,13 +988,13 @@ START_TEST(client) hr = set_firewall(APP_ADD); if (hr != S_OK) { - skip("can't authorize app in firewall %08x\n", hr); + skip("can't authorize app in firewall %08lx\n", hr); return; } }
hr = CoInitialize(0); - ok(hr == S_OK, "CoInitialize failed with %x\n", hr); + ok(hr == S_OK, "CoInitialize failed with %lx\n", hr);
if (!test_init_dp()) goto done; @@ -1019,7 +1019,7 @@ START_TEST(client) test_cleanup_dp_peer();
hr = IDirectPlay8Server_Close(server, 0); - todo_wine ok(hr == S_OK, "got 0x%08x\n", hr); + todo_wine ok(hr == S_OK, "got 0x%08lx\n", hr); IDirectPlay8Server_Release(server);
CloseHandle(enumevent); diff --git a/dlls/dpnet/tests/server.c b/dlls/dpnet/tests/server.c index 3d59d746fba..94a9da0d47f 100644 --- a/dlls/dpnet/tests/server.c +++ b/dlls/dpnet/tests/server.c @@ -35,7 +35,7 @@ static BOOL nDestroyPlayer;
static HRESULT WINAPI DirectPlayMessageHandler(PVOID pvUserContext, DWORD dwMessageId, PVOID pMsgBuffer) { - trace("msgid: 0x%08x\n", dwMessageId); + trace("msgid: 0x%08lx\n", dwMessageId);
switch(dwMessageId) { @@ -60,13 +60,13 @@ static void create_server(void) if( SUCCEEDED(hr) ) { hr = IDirectPlay8Server_Close(server, 0); - todo_wine ok(hr == DPNERR_UNINITIALIZED, "got 0x%08x\n", hr); + todo_wine ok(hr == DPNERR_UNINITIALIZED, "got 0x%08lx\n", hr);
hr = IDirectPlay8Server_Initialize(server, NULL, NULL, 0); - ok(hr == DPNERR_INVALIDPARAM, "got 0x%08x\n", hr); + ok(hr == DPNERR_INVALIDPARAM, "got 0x%08lx\n", hr);
hr = IDirectPlay8Server_Initialize(server, NULL, DirectPlayMessageHandler, 0); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); if(hr == S_OK) { IDirectPlay8Address *localaddr = NULL; @@ -76,7 +76,7 @@ static void create_server(void) ok(hr == S_OK, "Failed to create IDirectPlay8Address object\n");
hr = IDirectPlay8Address_SetSP(localaddr, &CLSID_DP8SP_TCPIP); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
memset( &appdesc, 0, sizeof(DPN_APPLICATION_DESC) ); appdesc.dwSize = sizeof( DPN_APPLICATION_DESC ); @@ -85,13 +85,13 @@ static void create_server(void) appdesc.pwszSessionName = sessionname;
hr = IDirectPlay8Server_Host(server, &appdesc, &localaddr, 1, NULL, NULL, NULL, 0); - todo_wine ok(hr == S_OK, "got 0x%08x\n", hr); + todo_wine ok(hr == S_OK, "got 0x%08lx\n", hr);
todo_wine ok(nCreatePlayer, "No DPN_MSGID_CREATE_PLAYER Message\n"); ok(!nDestroyPlayer, "Received DPN_MSGID_DESTROY_PLAYER Message\n");
hr = IDirectPlay8Server_Close(server, 0); - todo_wine ok(hr == S_OK, "got 0x%08x\n", hr); + todo_wine ok(hr == S_OK, "got 0x%08lx\n", hr);
todo_wine ok(nDestroyPlayer, "No DPN_MSGID_DESTROY_PLAYER Message\n");
@@ -120,65 +120,65 @@ static void test_server_info(void) info.dwInfoFlags = DPNINFO_NAME;
hr = IDirectPlay8Server_SetServerInfo(server, NULL, NULL, NULL, DPNSETSERVERINFO_SYNC); - ok(hr == E_POINTER, "got %x\n", hr); + ok(hr == E_POINTER, "got %lx\n", hr);
info.pwszName = name; hr = IDirectPlay8Server_SetServerInfo(server, &info, NULL, NULL, DPNSETSERVERINFO_SYNC); - ok(hr == DPNERR_UNINITIALIZED, "got %x\n", hr); + ok(hr == DPNERR_UNINITIALIZED, "got %lx\n", hr);
hr = IDirectPlay8Server_Initialize(server, NULL, DirectPlayMessageHandler, 0); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
hr = IDirectPlay8Server_SetServerInfo(server, NULL, NULL, NULL, DPNSETSERVERINFO_SYNC); - ok(hr == E_POINTER, "got %x\n", hr); + ok(hr == E_POINTER, "got %lx\n", hr);
info.pwszName = NULL; hr = IDirectPlay8Server_SetServerInfo(server, &info, NULL, NULL, DPNSETSERVERINFO_SYNC); - ok(hr == S_OK, "got %x\n", hr); + ok(hr == S_OK, "got %lx\n", hr);
info.pwszName = name; hr = IDirectPlay8Server_SetServerInfo(server, &info, NULL, NULL, DPNSETSERVERINFO_SYNC); - ok(hr == S_OK, "got %x\n", hr); + ok(hr == S_OK, "got %lx\n", hr);
info.dwInfoFlags = DPNINFO_NAME; info.pwszName = name2; hr = IDirectPlay8Server_SetServerInfo(server, &info, NULL, NULL, DPNSETSERVERINFO_SYNC); - ok(hr == S_OK, "got %x\n", hr); + ok(hr == S_OK, "got %lx\n", hr);
info.dwInfoFlags = DPNINFO_DATA; info.pwszName = NULL; info.pvData = NULL; info.dwDataSize = sizeof(data); hr = IDirectPlay8Server_SetServerInfo(server, &info, NULL, NULL, DPNSETSERVERINFO_SYNC); - ok(hr == E_POINTER, "got %x\n", hr); + ok(hr == E_POINTER, "got %lx\n", hr);
info.dwInfoFlags = DPNINFO_DATA; info.pwszName = NULL; info.pvData = data; info.dwDataSize = 0; hr = IDirectPlay8Server_SetServerInfo(server, &info, NULL, NULL, DPNSETSERVERINFO_SYNC); - ok(hr == S_OK, "got %x\n", hr); + ok(hr == S_OK, "got %lx\n", hr);
info.dwInfoFlags = DPNINFO_DATA; info.pwszName = NULL; info.pvData = data; info.dwDataSize = sizeof(data); hr = IDirectPlay8Server_SetServerInfo(server, &info, NULL, NULL, DPNSETSERVERINFO_SYNC); - ok(hr == S_OK, "got %x\n", hr); + ok(hr == S_OK, "got %lx\n", hr);
info.dwInfoFlags = DPNINFO_DATA | DPNINFO_NAME; info.pwszName = name; info.pvData = data; info.dwDataSize = sizeof(data); hr = IDirectPlay8Server_SetServerInfo(server, &info, NULL, NULL, DPNSETSERVERINFO_SYNC); - ok(hr == S_OK, "got %x\n", hr); + ok(hr == S_OK, "got %lx\n", hr);
info.dwInfoFlags = DPNINFO_DATA | DPNINFO_NAME; info.pwszName = name; info.pvData = NULL; info.dwDataSize = 0; hr = IDirectPlay8Server_SetServerInfo(server, &info, NULL, NULL, DPNSETSERVERINFO_SYNC); - ok(hr == S_OK, "got %x\n", hr); + ok(hr == S_OK, "got %lx\n", hr);
IDirectPlay8Server_Release(server); } @@ -200,10 +200,10 @@ static void test_enum_service_providers(void) size = 0; items = 0; hr = IDirectPlay8Server_EnumServiceProviders(server, NULL, NULL, serv_prov_info, &size, &items, 0); - ok(hr == DPNERR_UNINITIALIZED, "got %x\n", hr); + ok(hr == DPNERR_UNINITIALIZED, "got %lx\n", hr);
hr = IDirectPlay8Server_Initialize(server, NULL, DirectPlayMessageHandler, 0); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); if (FAILED(hr)) { IDirectPlay8Server_Release(server); @@ -214,22 +214,22 @@ static void test_enum_service_providers(void) items = 0;
hr = IDirectPlay8Server_EnumServiceProviders(server, NULL, NULL, NULL, &size, NULL, 0); - ok(hr == E_POINTER, "IDirectPlay8Server_EnumServiceProviders failed with %x\n", hr); + ok(hr == E_POINTER, "IDirectPlay8Server_EnumServiceProviders failed with %lx\n", hr);
hr = IDirectPlay8Server_EnumServiceProviders(server, NULL, NULL, NULL, NULL, &items, 0); - ok(hr == E_POINTER, "IDirectPlay8Server_EnumServiceProviders failed with %x\n", hr); + ok(hr == E_POINTER, "IDirectPlay8Server_EnumServiceProviders failed with %lx\n", hr);
hr = IDirectPlay8Server_EnumServiceProviders(server, NULL, NULL, NULL, &size, &items, 0); - ok(hr == DPNERR_BUFFERTOOSMALL, "IDirectPlay8Server_EnumServiceProviders failed with %x\n", hr); + ok(hr == DPNERR_BUFFERTOOSMALL, "IDirectPlay8Server_EnumServiceProviders failed with %lx\n", hr); ok(size != 0, "size is unexpectedly 0\n");
serv_prov_info = HeapAlloc(GetProcessHeap(), 0, size);
hr = IDirectPlay8Server_EnumServiceProviders(server, NULL, NULL, serv_prov_info, &size, &items, 0); - ok(hr == S_OK, "IDirectPlay8Server_EnumServiceProviders failed with %x\n", hr); + ok(hr == S_OK, "IDirectPlay8Server_EnumServiceProviders failed with %lx\n", hr); ok(items != 0, "Found unexpectedly no service providers\n");
- trace("number of items found: %d\n", items); + trace("number of items found: %ld\n", items);
for (i=0;i<items;i++) { @@ -243,13 +243,13 @@ static void test_enum_service_providers(void) items = 0;
hr = IDirectPlay8Server_EnumServiceProviders(server, &CLSID_DP8SP_TCPIP, NULL, NULL, &size, &items, 0); - ok(hr == DPNERR_BUFFERTOOSMALL, "IDirectPlay8Server_EnumServiceProviders failed with %x\n", hr); + ok(hr == DPNERR_BUFFERTOOSMALL, "IDirectPlay8Server_EnumServiceProviders failed with %lx\n", hr); ok(size != 0, "size is unexpectedly 0\n");
serv_prov_info = HeapAlloc(GetProcessHeap(), 0, size);
hr = IDirectPlay8Server_EnumServiceProviders(server, &CLSID_DP8SP_TCPIP, NULL, serv_prov_info, &size, &items, 0); - ok(hr == S_OK, "IDirectPlay8Server_EnumServiceProviders failed with %x\n", hr); + ok(hr == S_OK, "IDirectPlay8Server_EnumServiceProviders failed with %lx\n", hr); ok(items != 0, "Found unexpectedly no adapter\n");
@@ -262,8 +262,8 @@ static void test_enum_service_providers(void) /* Invalid GUID */ items = 88; hr = IDirectPlay8Server_EnumServiceProviders(server, &appguid, NULL, serv_prov_info, &size, &items, 0); - ok(hr == DPNERR_DOESNOTEXIST, "IDirectPlay8Peer_EnumServiceProviders failed with %x\n", hr); - ok(items == 88, "Found adapter %d\n", items); + ok(hr == DPNERR_DOESNOTEXIST, "IDirectPlay8Peer_EnumServiceProviders failed with %lx\n", hr); + ok(items == 88, "Found adapter %ld\n", items);
HeapFree(GetProcessHeap(), 0, serv_prov_info); IDirectPlay8Server_Release(server); @@ -297,18 +297,18 @@ BOOL is_firewall_enabled(void)
hr = CoCreateInstance( &CLSID_NetFwMgr, NULL, CLSCTX_INPROC_SERVER, &IID_INetFwMgr, (void **)&mgr ); - ok( hr == S_OK, "got %08x\n", hr ); + ok( hr == S_OK, "got %08lx\n", hr ); if (hr != S_OK) goto done;
hr = INetFwMgr_get_LocalPolicy( mgr, &policy ); - ok( hr == S_OK, "got %08x\n", hr ); + ok( hr == S_OK, "got %08lx\n", hr ); if (hr != S_OK) goto done;
hr = INetFwPolicy_get_CurrentProfile( policy, &profile ); if (hr != S_OK) goto done;
hr = INetFwProfile_get_FirewallEnabled( profile, &enabled ); - ok( hr == S_OK, "got %08x\n", hr ); + ok( hr == S_OK, "got %08lx\n", hr );
done: if (policy) INetFwPolicy_Release( policy ); @@ -346,23 +346,23 @@ HRESULT set_firewall( enum firewall_op op )
hr = CoCreateInstance( &CLSID_NetFwMgr, NULL, CLSCTX_INPROC_SERVER, &IID_INetFwMgr, (void **)&mgr ); - ok( hr == S_OK, "got %08x\n", hr ); + ok( hr == S_OK, "got %08lx\n", hr ); if (hr != S_OK) goto done;
hr = INetFwMgr_get_LocalPolicy( mgr, &policy ); - ok( hr == S_OK, "got %08x\n", hr ); + ok( hr == S_OK, "got %08lx\n", hr ); if (hr != S_OK) goto done;
hr = INetFwPolicy_get_CurrentProfile( policy, &profile ); if (hr != S_OK) goto done;
hr = INetFwProfile_get_AuthorizedApplications( profile, &apps ); - ok( hr == S_OK, "got %08x\n", hr ); + ok( hr == S_OK, "got %08lx\n", hr ); if (hr != S_OK) goto done;
hr = CoCreateInstance( &CLSID_NetFwAuthorizedApplication, NULL, CLSCTX_INPROC_SERVER, &IID_INetFwAuthorizedApplication, (void **)&app ); - ok( hr == S_OK, "got %08x\n", hr ); + ok( hr == S_OK, "got %08lx\n", hr ); if (hr != S_OK) goto done;
hr = INetFwAuthorizedApplication_put_ProcessImageFileName( app, image ); @@ -371,7 +371,7 @@ HRESULT set_firewall( enum firewall_op op ) name = SysAllocString( L"dpnet_client" ); hr = INetFwAuthorizedApplication_put_Name( app, name ); SysFreeString( name ); - ok( hr == S_OK, "got %08x\n", hr ); + ok( hr == S_OK, "got %08lx\n", hr ); if (hr != S_OK) goto done;
if (op == APP_ADD) @@ -385,7 +385,7 @@ HRESULT set_firewall( enum firewall_op op ) INetFwAuthorizedApplication_Release( app ); hr = CoCreateInstance( &CLSID_NetFwAuthorizedApplication, NULL, CLSCTX_INPROC_SERVER, &IID_INetFwAuthorizedApplication, (void **)&app ); - ok( hr == S_OK, "got %08x\n", hr ); + ok( hr == S_OK, "got %08lx\n", hr ); if (hr != S_OK) goto done;
SysFreeString( image ); @@ -396,7 +396,7 @@ HRESULT set_firewall( enum firewall_op op ) name = SysAllocString( L"dpnet_server" ); hr = INetFwAuthorizedApplication_put_Name( app, name ); SysFreeString( name ); - ok( hr == S_OK, "got %08x\n", hr ); + ok( hr == S_OK, "got %08lx\n", hr ); if (hr != S_OK) goto done;
if (op == APP_ADD) @@ -472,7 +472,7 @@ START_TEST(server) HRESULT hr = set_firewall(APP_ADD); if (hr != S_OK) { - skip("can't authorize app in firewall %08x\n", hr); + skip("can't authorize app in firewall %08lx\n", hr); return; } } diff --git a/dlls/dpnet/tests/thread.c b/dlls/dpnet/tests/thread.c index d681abded91..76d71b8f940 100644 --- a/dlls/dpnet/tests/thread.c +++ b/dlls/dpnet/tests/thread.c @@ -46,7 +46,7 @@ static HRESULT WINAPI DirectPlayThreadHandler(void *context, DWORD message_id, v SetEvent(enumevent); break; default: - trace("DirectPlayThreadHandler: 0x%08x\n", message_id); + trace("DirectPlayThreadHandler: 0x%08lx\n", message_id); } return S_OK; } @@ -59,52 +59,52 @@ static void create_threadpool(void) DWORD threadcnt = 10;
hr = CoCreateInstance( &CLSID_DirectPlay8ThreadPool, NULL, CLSCTX_ALL, &IID_IDirectPlay8ThreadPool, (void**)&pool1); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
hr = CoCreateInstance( &CLSID_DirectPlay8ThreadPool, NULL, CLSCTX_ALL, &IID_IDirectPlay8ThreadPool, (void**)&pool2); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
hr = IDirectPlay8ThreadPool_Initialize(pool1, NULL, NULL, 0); - ok(hr == DPNERR_INVALIDPARAM, "got 0x%08x\n", hr); + ok(hr == DPNERR_INVALIDPARAM, "got 0x%08lx\n", hr);
hr = IDirectPlay8ThreadPool_Initialize(pool1, NULL, &DirectPlayThreadHandler, 0); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
hr = IDirectPlay8ThreadPool_Initialize(pool2, NULL, &DirectPlayThreadHandler, 0); - ok(hr == DPNERR_ALREADYINITIALIZED, "got 0x%08x\n", hr); + ok(hr == DPNERR_ALREADYINITIALIZED, "got 0x%08lx\n", hr);
hr = IDirectPlay8ThreadPool_GetThreadCount(pool1, -1, &threadcnt, 0); - ok(hr == S_OK, "got 0x%08x\n", hr); - ok(threadcnt == 0, "got %d\n", threadcnt); + ok(hr == S_OK, "got 0x%08lx\n", hr); + ok(threadcnt == 0, "got %ld\n", threadcnt);
hr = IDirectPlay8ThreadPool_SetThreadCount(pool1, -1, 5, 0); - ok(hr == S_OK, "got 0x%08x\n", hr); - todo_wine ok(cnt_thread_create == 5, "got %d\n", threadcnt); + ok(hr == S_OK, "got 0x%08lx\n", hr); + todo_wine ok(cnt_thread_create == 5, "got %ld\n", threadcnt);
hr = IDirectPlay8ThreadPool_SetThreadCount(pool2, -1, 5, 0); - ok(hr == S_OK, "got 0x%08x\n", hr); - todo_wine ok(cnt_thread_create == 5, "got %d\n", threadcnt); + ok(hr == S_OK, "got 0x%08lx\n", hr); + todo_wine ok(cnt_thread_create == 5, "got %ld\n", threadcnt);
/* Thead count must be zero before DoWork can be called. */ hr = IDirectPlay8ThreadPool_DoWork(pool1, 100, 0); - todo_wine ok(hr == DPNERR_NOTREADY, "got 0x%08x\n", hr); + todo_wine ok(hr == DPNERR_NOTREADY, "got 0x%08lx\n", hr);
hr = IDirectPlay8ThreadPool_GetThreadCount(pool1, -1, &threadcnt, 0); - ok(hr == S_OK, "got 0x%08x\n", hr); - todo_wine ok(threadcnt == 5, "got %d\n", threadcnt); + ok(hr == S_OK, "got 0x%08lx\n", hr); + todo_wine ok(threadcnt == 5, "got %ld\n", threadcnt);
hr = IDirectPlay8ThreadPool_SetThreadCount(pool1, -1, 0, 0); - ok(hr == S_OK, "got 0x%08x\n", hr); - todo_wine ok(cnt_thread_destroy == 5, "got %d\n", threadcnt); + ok(hr == S_OK, "got 0x%08lx\n", hr); + todo_wine ok(cnt_thread_destroy == 5, "got %ld\n", threadcnt);
hr = IDirectPlay8ThreadPool_DoWork(pool1, 100, 0); - ok(hr == DPN_OK, "got 0x%08x\n", hr); + ok(hr == DPN_OK, "got 0x%08lx\n", hr);
hr = IDirectPlay8ThreadPool_Close(pool1, 0); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
hr = IDirectPlay8ThreadPool_Close(pool2, 0); - ok(hr == DPNERR_UNINITIALIZED, "got 0x%08x\n", hr); + ok(hr == DPNERR_UNINITIALIZED, "got 0x%08lx\n", hr);
IDirectPlay8ThreadPool_Release(pool1); IDirectPlay8ThreadPool_Release(pool2); @@ -128,81 +128,81 @@ static void test_enum_hosts(void) appdesc.guidApplication = appguid;
hr = CoCreateInstance( &CLSID_DirectPlay8ThreadPool, NULL, CLSCTX_ALL, &IID_IDirectPlay8ThreadPool, (void**)&pool1); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
hr = IDirectPlay8ThreadPool_Initialize(pool1, NULL, &DirectPlayThreadHandler, 0); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
hr = IDirectPlay8ThreadPool_Initialize(pool1, NULL, &DirectPlayThreadHandler, 0); - ok(hr == DPNERR_ALREADYINITIALIZED, "got 0x%08x\n", hr); + ok(hr == DPNERR_ALREADYINITIALIZED, "got 0x%08lx\n", hr);
hr = IDirectPlay8ThreadPool_GetThreadCount(pool1, -1, &threadcnt, 0); - ok(hr == S_OK, "got 0x%08x\n", hr); - ok(threadcnt == 0, "got %d\n", threadcnt); + ok(hr == S_OK, "got 0x%08lx\n", hr); + ok(threadcnt == 0, "got %ld\n", threadcnt);
hr = CoCreateInstance(&CLSID_DirectPlay8Client, NULL, CLSCTX_INPROC_SERVER, &IID_IDirectPlay8Client, (void **)&client); - ok(hr == S_OK, "CoCreateInstance failed with 0x%x\n", hr); + ok(hr == S_OK, "CoCreateInstance failed with 0x%lx\n", hr);
hr = IDirectPlay8Client_Initialize(client, NULL, DirectPlayThreadHandler, 0); - ok(hr == S_OK, "IDirectPlay8Client_Initialize failed with %x\n", hr); + ok(hr == S_OK, "IDirectPlay8Client_Initialize failed with %lx\n", hr);
hr = IDirectPlay8ThreadPool_GetThreadCount(pool1, -1, &threadcnt, 0); - ok(hr == S_OK, "got 0x%08x\n", hr); - todo_wine ok(threadcnt == 1, "got %d\n", threadcnt); + ok(hr == S_OK, "got 0x%08lx\n", hr); + todo_wine ok(threadcnt == 1, "got %ld\n", threadcnt);
hr = CoCreateInstance( &CLSID_DirectPlay8Address, NULL, CLSCTX_ALL, &IID_IDirectPlay8Address, (LPVOID*)&local); - ok(hr == S_OK, "IDirectPlay8Address failed with 0x%08x\n", hr); + ok(hr == S_OK, "IDirectPlay8Address failed with 0x%08lx\n", hr);
hr = IDirectPlay8Address_SetSP(local, &CLSID_DP8SP_TCPIP); - ok(hr == S_OK, "IDirectPlay8Address_SetSP failed with 0x%08x\n", hr); + ok(hr == S_OK, "IDirectPlay8Address_SetSP failed with 0x%08lx\n", hr);
hr = CoCreateInstance( &CLSID_DirectPlay8Address, NULL, CLSCTX_ALL, &IID_IDirectPlay8Address, (LPVOID*)&host); - ok(hr == S_OK, "IDirectPlay8Address failed with 0x%08x\n", hr); + ok(hr == S_OK, "IDirectPlay8Address failed with 0x%08lx\n", hr);
hr = IDirectPlay8Address_SetSP(host, &CLSID_DP8SP_TCPIP); - ok(hr == S_OK, "IDirectPlay8Address_SetSP failed with 0x%08x\n", hr); + ok(hr == S_OK, "IDirectPlay8Address_SetSP failed with 0x%08lx\n", hr);
hr = IDirectPlay8Address_AddComponent(host, DPNA_KEY_HOSTNAME, L"127.0.0.1", sizeof(L"127.0.0.1"), DPNA_DATATYPE_STRING); - ok(hr == S_OK, "IDirectPlay8Address failed with 0x%08x\n", hr); + ok(hr == S_OK, "IDirectPlay8Address failed with 0x%08lx\n", hr);
hr = IDirectPlay8Client_EnumHosts(client, &appdesc, host, local, NULL, 0, INFINITE, 0, INFINITE, NULL, &async, 0); - ok(hr == DPNSUCCESS_PENDING, "IDirectPlay8Client_EnumHosts failed with 0x%08x\n", hr); + ok(hr == DPNSUCCESS_PENDING, "IDirectPlay8Client_EnumHosts failed with 0x%08lx\n", hr); todo_wine ok(async, "No Handle returned\n");
/* The first EnumHosts call will increase the thread count */ hr = IDirectPlay8ThreadPool_GetThreadCount(pool1, -1, &threadorig, 0); - ok(hr == S_OK, "got 0x%08x\n", hr); - todo_wine ok(threadorig > 1, "got %d\n", threadorig); + ok(hr == S_OK, "got 0x%08lx\n", hr); + todo_wine ok(threadorig > 1, "got %ld\n", threadorig);
hr = IDirectPlay8Client_EnumHosts(client, &appdesc, host, local, NULL, 0, INFINITE, 0, INFINITE, NULL, &async2, 0); - ok(hr == DPNSUCCESS_PENDING, "IDirectPlay8Client_EnumHosts failed with 0x%08x\n", hr); + ok(hr == DPNSUCCESS_PENDING, "IDirectPlay8Client_EnumHosts failed with 0x%08lx\n", hr);
WaitForSingleObject(enumevent, 1000);
hr = IDirectPlay8ThreadPool_GetThreadCount(pool1, -1, &threadcnt, 0); - ok(hr == S_OK, "got 0x%08x\n", hr); - ok(threadcnt == threadorig, "got %d\n", threadcnt); + ok(hr == S_OK, "got 0x%08lx\n", hr); + ok(threadcnt == threadorig, "got %ld\n", threadcnt);
hr = IDirectPlay8Client_CancelAsyncOperation(client, async, 0); - ok(hr == S_OK, "IDirectPlay8Client_CancelAsyncOperation failed with 0x%08x\n", hr); + ok(hr == S_OK, "IDirectPlay8Client_CancelAsyncOperation failed with 0x%08lx\n", hr);
hr = IDirectPlay8ThreadPool_GetThreadCount(pool1, -1, &threadcnt, 0); - ok(hr == S_OK, "got 0x%08x\n", hr); - ok(threadcnt == threadorig, "got %d\n", threadcnt); + ok(hr == S_OK, "got 0x%08lx\n", hr); + ok(threadcnt == threadorig, "got %ld\n", threadcnt);
hr = IDirectPlay8Client_CancelAsyncOperation(client, async2, 0); - ok(hr == S_OK, "IDirectPlay8Client_CancelAsyncOperation failed with 0x%08x\n", hr); + ok(hr == S_OK, "IDirectPlay8Client_CancelAsyncOperation failed with 0x%08lx\n", hr);
hr = IDirectPlay8ThreadPool_GetThreadCount(pool1, -1, &threadcnt, 0); - ok(hr == S_OK, "got 0x%08x\n", hr); - ok(threadcnt == threadorig, "got %d\n", threadcnt); + ok(hr == S_OK, "got 0x%08lx\n", hr); + ok(threadcnt == threadorig, "got %ld\n", threadcnt);
IDirectPlay8Address_Release(local); IDirectPlay8Address_Release(host);
hr = IDirectPlay8ThreadPool_Close(pool1, 0); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
IDirectPlay8Client_Release(client); IDirectPlay8ThreadPool_Release(pool1); @@ -216,23 +216,23 @@ static void test_singleton(void) IDirectPlay8ThreadPool *pool1, *pool2;
hr = CoCreateInstance( &CLSID_DirectPlay8ThreadPool, NULL, CLSCTX_ALL, &IID_IDirectPlay8ThreadPool, (void**)&pool1); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
hr = CoCreateInstance( &CLSID_DirectPlay8ThreadPool, NULL, CLSCTX_ALL, &IID_IDirectPlay8ThreadPool, (void**)&pool2); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(pool1 != pool2, "same pointer returned.\n");
hr = IDirectPlay8ThreadPool_Initialize(pool1, NULL, &DirectPlayThreadHandler, 0); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
hr = IDirectPlay8ThreadPool_Initialize(pool2, NULL, &DirectPlayThreadHandler, 0); - ok(hr == DPNERR_ALREADYINITIALIZED, "got 0x%08x\n", hr); + ok(hr == DPNERR_ALREADYINITIALIZED, "got 0x%08lx\n", hr);
hr = IDirectPlay8ThreadPool_Close(pool1, 0); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
hr = IDirectPlay8ThreadPool_Close(pool2, 0); - ok(hr == DPNERR_UNINITIALIZED, "got 0x%08x\n", hr); + ok(hr == DPNERR_UNINITIALIZED, "got 0x%08lx\n", hr);
IDirectPlay8ThreadPool_Release(pool1); IDirectPlay8ThreadPool_Release(pool2); @@ -268,7 +268,7 @@ START_TEST(thread) HRESULT hr = set_firewall(APP_ADD); if (hr != S_OK) { - skip("can't authorize app in firewall %08x\n", hr); + skip("can't authorize app in firewall %08lx\n", hr); return; } }
Signed-off-by: Alistair Leslie-Hughes leslie_alistair@hotmail.com
Signed-off-by: Eric Pouech eric.pouech@gmail.com
--- dlls/dpvoice/tests/Makefile.in | 1 dlls/dpvoice/tests/voice.c | 100 ++++++++++++++++++++-------------------- 2 files changed, 50 insertions(+), 51 deletions(-)
diff --git a/dlls/dpvoice/tests/Makefile.in b/dlls/dpvoice/tests/Makefile.in index 05e4c8b66fd..04b3a5c0b5b 100644 --- a/dlls/dpvoice/tests/Makefile.in +++ b/dlls/dpvoice/tests/Makefile.in @@ -1,4 +1,3 @@ -EXTRADEFS = -DWINE_NO_LONG_TYPES TESTDLL = dpvoice.dll IMPORTS = uuid dpnet ole32 user32
diff --git a/dlls/dpvoice/tests/voice.c b/dlls/dpvoice/tests/voice.c index 4b44e1e1081..0afec713a80 100644 --- a/dlls/dpvoice/tests/voice.c +++ b/dlls/dpvoice/tests/voice.c @@ -42,13 +42,13 @@ static WCHAR sessionname[] = L"winegamesserver";
static HRESULT WINAPI DirectPlayMessageHandler(void *lpvUserContext, DWORD dwMessageId, void *lpMessage) { - trace("msgid: 0x%08x\n", dwMessageId); + trace("msgid: 0x%08lx\n", dwMessageId); return S_OK; }
static HRESULT WINAPI DirectPlayClientMessageHandler(void *lpvUserContext, DWORD dwMessageId, void *lpMessage) { - trace("cmsgid: 0x%08x\n", dwMessageId); + trace("cmsgid: 0x%08lx\n", dwMessageId); switch(dwMessageId) { case DPN_MSGID_CONNECT_COMPLETE: @@ -56,7 +56,7 @@ static HRESULT WINAPI DirectPlayClientMessageHandler(void *lpvUserContext, DWORD PDPNMSG_CONNECT_COMPLETE completemsg; completemsg = (PDPNMSG_CONNECT_COMPLETE)lpMessage;
- trace("DPN_MSGID_CONNECT_COMPLETE code: 0x%08x\n", completemsg->hResultCode); + trace("DPN_MSGID_CONNECT_COMPLETE code: 0x%08lx\n", completemsg->hResultCode); SetEvent(connected); break; } @@ -67,13 +67,13 @@ static HRESULT WINAPI DirectPlayClientMessageHandler(void *lpvUserContext, DWORD
static HRESULT CALLBACK DirectPlayVoiceServerMessageHandler(void *lpvUserContext, DWORD dwMessageId, void *lpMessage) { - trace("vserver: 0x%08x\n", dwMessageId); + trace("vserver: 0x%08lx\n", dwMessageId); return S_OK; }
static HRESULT CALLBACK DirectPlayVoiceClientMessageHandler(void *lpvUserContext, DWORD dwMessageId, void *lpMessage) { - trace("cserver: 0x%08x\n", dwMessageId); + trace("cserver: 0x%08lx\n", dwMessageId);
return S_OK; } @@ -90,23 +90,23 @@ static BOOL test_init_dpvoice_server(void) DPN_APPLICATION_DESC dpnAppDesc;
hr = CoCreateInstance(&CLSID_DirectPlay8Server, NULL, CLSCTX_INPROC_SERVER, &IID_IDirectPlay8Server, (void **)&dpserver); - ok(hr == S_OK, "CoCreateInstance failed with 0x%08x\n", hr); + ok(hr == S_OK, "CoCreateInstance failed with 0x%08lx\n", hr);
hr = IDirectPlay8Server_Initialize(dpserver, NULL, DirectPlayMessageHandler, 0); - ok(hr == S_OK, "Initialize failed with 0x%08x\n", hr); + ok(hr == S_OK, "Initialize failed with 0x%08lx\n", hr);
hr = CoCreateInstance(&CLSID_DirectPlay8Address, NULL, CLSCTX_ALL, &IID_IDirectPlay8Address, (void **)&localaddr); - ok(hr == S_OK, "CoCreateInstance failed with 0x%08x\n", hr); + ok(hr == S_OK, "CoCreateInstance failed with 0x%08lx\n", hr);
hr = IDirectPlay8Address_SetSP(localaddr, &CLSID_DP8SP_TCPIP); - ok(hr == S_OK, "SetSP with 0x%08x\n", hr); + ok(hr == S_OK, "SetSP with 0x%08lx\n", hr);
hr = IDirectPlay8Address_AddComponent(localaddr, DPNA_KEY_HOSTNAME, L"localhost", sizeof(L"localhost"), DPNA_DATATYPE_STRING ); - ok(hr == S_OK, "AddComponent(addr) with 0x%08x\n", hr); + ok(hr == S_OK, "AddComponent(addr) with 0x%08lx\n", hr);
hr = IDirectPlay8Address_AddComponent(localaddr, DPNA_KEY_PORT, &port, sizeof(port), DPNA_DATATYPE_DWORD); - ok(hr == S_OK, "AddComponent(port)) with 0x%08x\n", hr); + ok(hr == S_OK, "AddComponent(port)) with 0x%08lx\n", hr);
memset(&dpnAppDesc, 0, sizeof(DPN_APPLICATION_DESC) ); dpnAppDesc.dwSize = sizeof( DPN_APPLICATION_DESC ); @@ -115,13 +115,13 @@ static BOOL test_init_dpvoice_server(void) dpnAppDesc.pwszSessionName = sessionname;
hr = IDirectPlay8Server_Host(dpserver, &dpnAppDesc, &localaddr, 1, NULL, NULL, NULL, 0 ); - todo_wine ok(hr == S_OK, "Host failed with 0x%08x\n", hr); + todo_wine ok(hr == S_OK, "Host failed with 0x%08lx\n", hr);
hr = IDirectPlayVoiceServer_Initialize(vserver, NULL, &DirectPlayVoiceServerMessageHandler, NULL, 0, 0); - todo_wine ok(hr == DVERR_NOTRANSPORT, "Initialize failed with 0x%08x\n", hr); + todo_wine ok(hr == DVERR_NOTRANSPORT, "Initialize failed with 0x%08lx\n", hr);
hr = IDirectPlayVoiceServer_Initialize(vserver, (IUnknown*)dpserver, &DirectPlayVoiceServerMessageHandler, NULL, 0, 0); - todo_wine ok(hr == S_OK, "Initialize failed with 0x%08x\n", hr); + todo_wine ok(hr == S_OK, "Initialize failed with 0x%08lx\n", hr);
memset( &dvSessionDesc, 0, sizeof(DVSESSIONDESC) ); dvSessionDesc.dwSize = sizeof( DVSESSIONDESC ); @@ -132,7 +132,7 @@ static BOOL test_init_dpvoice_server(void) dvSessionDesc.guidCT = DPVCTGUID_DEFAULT;
hr = IDirectPlayVoiceServer_StartSession(vserver, &dvSessionDesc, 0); - todo_wine ok(hr == S_OK, "StartSession failed with 0x%08x\n", hr); + todo_wine ok(hr == S_OK, "StartSession failed with 0x%08lx\n", hr);
if(localaddr) IDirectPlay8Address_Release(localaddr); @@ -165,29 +165,29 @@ static BOOL test_init_dpvoice_client(void) connected = CreateEventA(NULL, FALSE, FALSE, NULL);
hr = CoCreateInstance(&CLSID_DirectPlay8Client, NULL, CLSCTX_INPROC_SERVER, &IID_IDirectPlay8Client, (void **)&dpclient); - ok(hr == S_OK, "CoCreateInstance failed with 0x%08x\n", hr); + ok(hr == S_OK, "CoCreateInstance failed with 0x%08lx\n", hr);
hr = IDirectPlay8Client_Initialize(dpclient, NULL, DirectPlayClientMessageHandler, 0); - ok(hr == S_OK, "Initialize failed with 0x%08x\n", hr); + ok(hr == S_OK, "Initialize failed with 0x%08lx\n", hr);
hr = CoCreateInstance(&CLSID_DirectPlay8Address, NULL, CLSCTX_ALL, &IID_IDirectPlay8Address, (void **)&hostaddr); - ok(hr == S_OK, "CoCreateInstance failed with 0x%08x\n", hr); + ok(hr == S_OK, "CoCreateInstance failed with 0x%08lx\n", hr);
hr = IDirectPlay8Address_SetSP(hostaddr, &CLSID_DP8SP_TCPIP); - ok(hr == S_OK, "SetSP with 0x%08x\n", hr); + ok(hr == S_OK, "SetSP with 0x%08lx\n", hr);
hr = CoCreateInstance(&CLSID_DirectPlay8Address, NULL, CLSCTX_ALL, &IID_IDirectPlay8Address, (void **)&localaddr); - ok(hr == S_OK, "CoCreateInstance failed with 0x%08x\n", hr); + ok(hr == S_OK, "CoCreateInstance failed with 0x%08lx\n", hr);
hr = IDirectPlay8Address_SetSP(localaddr, &CLSID_DP8SP_TCPIP); - ok(hr == S_OK, "SetSP with 0x%08x\n", hr); + ok(hr == S_OK, "SetSP with 0x%08lx\n", hr);
hr = IDirectPlay8Address_AddComponent(hostaddr, DPNA_KEY_HOSTNAME, L"localhost", sizeof(L"localhost"), DPNA_DATATYPE_STRING ); - ok(hr == S_OK, "AddComponent(addr) with 0x%08x\n", hr); + ok(hr == S_OK, "AddComponent(addr) with 0x%08lx\n", hr);
hr = IDirectPlay8Address_AddComponent(hostaddr, DPNA_KEY_PORT, &port, sizeof(port), DPNA_DATATYPE_DWORD); - ok(hr == S_OK, "AddComponent(port)) with 0x%08x\n", hr); + ok(hr == S_OK, "AddComponent(port)) with 0x%08lx\n", hr);
memset( &playerinfo, 0, sizeof(DPN_PLAYER_INFO) ); playerinfo.dwSize = sizeof(DPN_PLAYER_INFO); @@ -195,7 +195,7 @@ static BOOL test_init_dpvoice_client(void) playerinfo.pwszName = player;
hr = IDirectPlay8Client_SetClientInfo(dpclient, &playerinfo, NULL, NULL, DPNOP_SYNC); - ok(hr == S_OK, "SetClientInfo with 0x%08x\n", hr); + ok(hr == S_OK, "SetClientInfo with 0x%08lx\n", hr);
memset( &appdesc, 0, sizeof(DPN_APPLICATION_DESC)); appdesc.dwSize = sizeof( DPN_APPLICATION_DESC ); @@ -203,12 +203,12 @@ static BOOL test_init_dpvoice_client(void)
hr = IDirectPlay8Client_Connect(dpclient, &appdesc, hostaddr, localaddr, NULL, NULL, NULL, 0, NULL, &asyncop, DPNCONNECT_OKTOQUERYFORADDRESSING); - ok(hr == S_OK || hr == DPNSUCCESS_PENDING, "Connect with 0x%08x\n", hr); + ok(hr == S_OK || hr == DPNSUCCESS_PENDING, "Connect with 0x%08lx\n", hr);
WaitForSingleObject(connected, 5000);
hr = IDirectPlayVoiceClient_Initialize(vclient, (IUnknown*)dpclient, DirectPlayVoiceClientMessageHandler, NULL, 0, 0 ); - todo_wine ok(hr == S_OK, "Connect failed with 0x%08x\n", hr); + todo_wine ok(hr == S_OK, "Connect failed with 0x%08lx\n", hr);
soundDeviceConfig.dwSize = sizeof(soundDeviceConfig); soundDeviceConfig.dwFlags = 0; @@ -239,16 +239,16 @@ static BOOL test_init_dpvoice_client(void)
/* See if we can get the default values from the registry and try again. */ hr = CoCreateInstance(&CLSID_DirectPlayVoiceTest, NULL, CLSCTX_INPROC_SERVER, &IID_IDirectPlayVoiceTest, (void **)&voicetest); - ok(hr == S_OK, "CoCreateInstance failed with 0x%08x\n", hr); + ok(hr == S_OK, "CoCreateInstance failed with 0x%08lx\n", hr); if(hr == S_OK) { hr = IDirectPlayVoiceTest_CheckAudioSetup(voicetest, &DSDEVID_DefaultVoicePlayback, &DSDEVID_DefaultVoiceCapture, NULL, DVFLAGS_QUERYONLY); - todo_wine ok(hr == S_OK || hr == DVERR_RUNSETUP, "CheckAudioSetup failed with 0x%08x\n", hr); + todo_wine ok(hr == S_OK || hr == DVERR_RUNSETUP, "CheckAudioSetup failed with 0x%08lx\n", hr); if(hr == S_OK) { hr = IDirectPlayVoiceClient_Connect(vclient, &soundDeviceConfig, &clientConfig, DVFLAGS_SYNC); - todo_wine ok(hr == S_OK, "Voice Connect failed with 0x%08x\n", hr); + todo_wine ok(hr == S_OK, "Voice Connect failed with 0x%08lx\n", hr); } else { @@ -292,7 +292,7 @@ static void test_cleanup_dpvoice(void) if(HasConnected) { hr = IDirectPlayVoiceClient_Disconnect(vclient, 0); - todo_wine ok(hr == S_OK || hr == DV_PENDING, "Disconnect failed with 0x%08x\n", hr); + todo_wine ok(hr == S_OK || hr == DV_PENDING, "Disconnect failed with 0x%08lx\n", hr); } IDirectPlayVoiceClient_Release(vclient); } @@ -300,7 +300,7 @@ static void test_cleanup_dpvoice(void) if(dpclient) { hr = IDirectPlay8Client_Close(dpclient, 0); - ok(hr == S_OK, "IDirectPlay8Client_Close failed with 0x%08x\n", hr); + ok(hr == S_OK, "IDirectPlay8Client_Close failed with 0x%08lx\n", hr);
IDirectPlay8Client_Release(dpclient); } @@ -308,7 +308,7 @@ static void test_cleanup_dpvoice(void) if(vserver) { hr = IDirectPlayVoiceServer_StopSession(vserver, 0); - todo_wine ok(hr == S_OK, "StopSession failed with 0x%08x\n", hr); + todo_wine ok(hr == S_OK, "StopSession failed with 0x%08lx\n", hr);
IDirectPlayVoiceServer_Release(vserver); } @@ -316,7 +316,7 @@ static void test_cleanup_dpvoice(void) if(dpserver) { hr = IDirectPlay8Server_Close(dpserver, 0); - todo_wine ok(hr == S_OK, "got 0x%08x\n", hr); + todo_wine ok(hr == S_OK, "got 0x%08lx\n", hr);
IDirectPlay8Server_Release(dpserver); } @@ -332,7 +332,7 @@ static void create_voicetest(void) { hr = IDirectPlayVoiceTest_CheckAudioSetup(voicetest, &DSDEVID_DefaultVoicePlayback, &DSDEVID_DefaultVoiceCapture, NULL, DVFLAGS_QUERYONLY); - todo_wine ok(hr == S_OK || hr == DVERR_RUNSETUP, "CheckAudioSetup failed with 0x%08x\n", hr); + todo_wine ok(hr == S_OK || hr == DVERR_RUNSETUP, "CheckAudioSetup failed with 0x%08lx\n", hr);
IDirectPlayVoiceTest_Release(voicetest); } @@ -424,9 +424,9 @@ static void test_GetCompressionTypes(IDirectPlayVoiceClient *client_iface, IDire else ret = IDirectPlayVoiceServer_GetCompressionTypes(server_iface, NULL, &data_size, &num_elements, 0); ok(ret == DVERR_BUFFERTOOSMALL, - "%s: expected ret=%x got ret=%x\n", name, DVERR_BUFFERTOOSMALL, ret); + "%s: expected ret=%lx got ret=%lx\n", name, DVERR_BUFFERTOOSMALL, ret); ok(data_size > sizeof(DVCOMPRESSIONINFO) && data_size < sizeof(data) - 1, - "%s: got data_size=%u\n", name, data_size); + "%s: got data_size=%lu\n", name, data_size); tests[ARRAY_SIZE(tests) - 3].data_size = data_size - 1; tests[ARRAY_SIZE(tests) - 2].data_size = data_size; tests[ARRAY_SIZE(tests) - 1].data_size = data_size + 1; @@ -458,23 +458,23 @@ static void test_GetCompressionTypes(IDirectPlayVoiceClient *client_iface, IDire );
ok(ret == tests[i].ret, - "%s: tests[%u]: expected ret=%x got ret=%x\n", name, i, tests[i].ret, ret); + "%s: tests[%lu]: expected ret=%lx got ret=%lx\n", name, i, tests[i].ret, ret);
if(ret == DV_OK || ret == DVERR_BUFFERTOOSMALL || tests[i].test_flags == NULL_DATA) { ok(data_size > sizeof(DVCOMPRESSIONINFO) && data_size < sizeof(data) - 1, - "%s: tests[%u]: got data_size=%u\n", name, i, data_size); + "%s: tests[%lu]: got data_size=%lu\n", name, i, data_size); if(!(tests[i].test_flags & SHARED_VARIABLE)) ok(num_elements > 0 && num_elements < data_size / sizeof(DVCOMPRESSIONINFO) + 1, - "%s: tests[%u]: got num_elements=%u\n", name, i, num_elements); + "%s: tests[%lu]: got num_elements=%lu\n", name, i, num_elements); } else { ok(data_size == tests[i].data_size, - "%s: tests[%u]: expected data_size=%u got data_size=%u\n", + "%s: tests[%lu]: expected data_size=%lu got data_size=%lu\n", name, i, tests[i].data_size, data_size); ok(num_elements == tests[i].num_elements, - "%s: tests[%u]: expected num_elements=%u got num_elements=%u\n", + "%s: tests[%lu]: expected num_elements=%lu got num_elements=%lu\n", name, i, tests[i].num_elements, num_elements); }
@@ -487,36 +487,36 @@ static void test_GetCompressionTypes(IDirectPlayVoiceClient *client_iface, IDire if(memcmp(&data[j].guidType, &DPVCTGUID_NONE, sizeof(GUID)) == 0) { ok(data[j].dwMaxBitsPerSecond == 64000, - "%s: tests[%u]: data[%u]: expected dwMaxBitsPerSecond=64000 got dwMaxBitsPerSecond=%u\n", + "%s: tests[%lu]: data[%lu]: expected dwMaxBitsPerSecond=64000 got dwMaxBitsPerSecond=%lu\n", name, i, j, data[j].dwMaxBitsPerSecond); found_pcm = TRUE; } ok(data[j].dwSize == 80, - "%s: tests[%u]: data[%u]: expected dwSize=80 got dwSize=%u\n", + "%s: tests[%lu]: data[%lu]: expected dwSize=80 got dwSize=%lu\n", name, i, j, data[j].dwSize); ok(data[j].lpszName == string_loc, - "%s: tests[%u]: data[%u]: expected lpszName=%p got lpszName=%p\n", + "%s: tests[%lu]: data[%lu]: expected lpszName=%p got lpszName=%p\n", name, i, j, string_loc, data[j].lpszName); ok(!data[j].lpszDescription, - "%s: tests[%u]: data[%u]: expected lpszDescription=NULL got lpszDescription=%s\n", + "%s: tests[%lu]: data[%lu]: expected lpszDescription=NULL got lpszDescription=%s\n", name, i, j, wine_dbgstr_w(data[j].lpszDescription)); ok(!data[j].dwFlags, - "%s: tests[%u]: data[%u]: expected dwFlags=0 got dwFlags=%u\n", + "%s: tests[%lu]: data[%lu]: expected dwFlags=0 got dwFlags=%lu\n", name, i, j, data[j].dwFlags); string_loc += lstrlenW(data[j].lpszName) + 1; } ok((char*)string_loc == (char*)data + data_size, - "%s: tests[%u]: expected string_loc=%p got string_loc=%p\n", + "%s: tests[%lu]: expected string_loc=%p got string_loc=%p\n", name, i, (char*)data + data_size, string_loc); ok(*(char*)string_loc == 0x23, - "%s: tests[%u]: expected *(char*)string_loc=0x23 got *(char*)string_loc=0x%x\n", + "%s: tests[%lu]: expected *(char*)string_loc=0x23 got *(char*)string_loc=0x%x\n", name, i, *(char*)string_loc); - ok(found_pcm, "%s: tests[%u]: MS-PCM codec not found\n", name, i); + ok(found_pcm, "%s: tests[%lu]: MS-PCM codec not found\n", name, i); } else { ok(*(char*)data == 0x23, - "%s: tests[%u]: expected *(char*)data=0x23 got *(char*)data=0x%x\n", + "%s: tests[%lu]: expected *(char*)data=0x23 got *(char*)data=0x%x\n", name, i, *(char*)data); } }
Signed-off-by: Eric Pouech eric.pouech@gmail.com
--- dlls/dsdmo/tests/Makefile.in | 1 dlls/dsdmo/tests/dsdmo.c | 170 +++++++++++++++++++++--------------------- 2 files changed, 85 insertions(+), 86 deletions(-)
diff --git a/dlls/dsdmo/tests/Makefile.in b/dlls/dsdmo/tests/Makefile.in index 38e1247d726..67378635f3c 100644 --- a/dlls/dsdmo/tests/Makefile.in +++ b/dlls/dsdmo/tests/Makefile.in @@ -1,4 +1,3 @@ -EXTRADEFS = -DWINE_NO_LONG_TYPES TESTDLL = dsdmo.dll IMPORTS = dmoguids uuid msdmo ole32
diff --git a/dlls/dsdmo/tests/dsdmo.c b/dlls/dsdmo/tests/dsdmo.c index 1ecafeb7ceb..44e4f88af8f 100644 --- a/dlls/dsdmo/tests/dsdmo.c +++ b/dlls/dsdmo/tests/dsdmo.c @@ -80,53 +80,53 @@ static void test_aggregation(const GUID *clsid) dmo = (IMediaObject *)0xdeadbeef; hr = CoCreateInstance(clsid, &test_outer, CLSCTX_INPROC_SERVER, &IID_IMediaObject, (void **)&dmo); - ok(hr == E_NOINTERFACE, "Got hr %#x.\n", hr); + ok(hr == E_NOINTERFACE, "Got hr %#lx.\n", hr); ok(!dmo, "Got interface %p.\n", dmo);
hr = CoCreateInstance(clsid, &test_outer, CLSCTX_INPROC_SERVER, &IID_IUnknown, (void **)&unk); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(outer_ref == 1, "Got unexpected refcount %d.\n", outer_ref); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(outer_ref == 1, "Got unexpected refcount %ld.\n", outer_ref); ok(unk != &test_outer, "Returned IUnknown should not be outer IUnknown.\n"); ref = get_refcount(unk); - ok(ref == 1, "Got unexpected refcount %d.\n", ref); + ok(ref == 1, "Got unexpected refcount %ld.\n", ref);
ref = IUnknown_AddRef(unk); - ok(ref == 2, "Got unexpected refcount %d.\n", ref); - ok(outer_ref == 1, "Got unexpected refcount %d.\n", outer_ref); + ok(ref == 2, "Got unexpected refcount %ld.\n", ref); + ok(outer_ref == 1, "Got unexpected refcount %ld.\n", outer_ref);
ref = IUnknown_Release(unk); - ok(ref == 1, "Got unexpected refcount %d.\n", ref); - ok(outer_ref == 1, "Got unexpected refcount %d.\n", outer_ref); + ok(ref == 1, "Got unexpected refcount %ld.\n", ref); + ok(outer_ref == 1, "Got unexpected refcount %ld.\n", outer_ref);
hr = IUnknown_QueryInterface(unk, &IID_IUnknown, (void **)&unk2); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(unk2 == unk, "Got unexpected IUnknown %p.\n", unk2); IUnknown_Release(unk2);
hr = IUnknown_QueryInterface(unk, &IID_IMediaObject, (void **)&dmo); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IMediaObject_QueryInterface(dmo, &IID_IUnknown, (void **)&unk2); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(unk2 == (IUnknown *)0xdeadbeef, "Got unexpected IUnknown %p.\n", unk2);
hr = IMediaObject_QueryInterface(dmo, &IID_IMediaObject, (void **)&dmo2); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(dmo2 == (IMediaObject *)0xdeadbeef, "Got unexpected IMediaObject %p.\n", dmo2);
hr = IUnknown_QueryInterface(unk, &test_iid, (void **)&unk2); - ok(hr == E_NOINTERFACE, "Got hr %#x.\n", hr); + ok(hr == E_NOINTERFACE, "Got hr %#lx.\n", hr); ok(!unk2, "Got unexpected IUnknown %p.\n", unk2);
hr = IMediaObject_QueryInterface(dmo, &test_iid, (void **)&unk2); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(unk2 == (IUnknown *)0xdeadbeef, "Got unexpected IUnknown %p.\n", unk2);
IMediaObject_Release(dmo); ref = IUnknown_Release(unk); - ok(!ref, "Got unexpected refcount %d.\n", ref); - ok(outer_ref == 1, "Got unexpected refcount %d.\n", outer_ref); + ok(!ref, "Got unexpected refcount %ld.\n", ref); + ok(outer_ref == 1, "Got unexpected refcount %ld.\n", outer_ref); }
static void test_interfaces(const GUID *clsid, const GUID *iid) @@ -136,26 +136,26 @@ static void test_interfaces(const GUID *clsid, const GUID *iid) ULONG ref;
hr = CoCreateInstance(clsid, NULL, CLSCTX_INPROC_SERVER, iid, (void **)&unk); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IUnknown_QueryInterface(unk, &IID_IMediaObject, (void **)&unk2); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IUnknown_QueryInterface(unk2, iid, (void **)&unk3); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(unk3 == unk, "Interface pointers didn't match.\n"); IUnknown_Release(unk3); IUnknown_Release(unk2);
hr = IUnknown_QueryInterface(unk, &IID_IMediaObjectInPlace, (void **)&unk2); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IUnknown_QueryInterface(unk2, iid, (void **)&unk3); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(unk3 == unk, "Interface pointers didn't match.\n"); IUnknown_Release(unk3); IUnknown_Release(unk2);
ref = IUnknown_Release(unk); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); }
static void build_pcm_format(WAVEFORMATEX *format, WORD tag, WORD depth, DWORD sample_rate, WORD channels) @@ -200,38 +200,38 @@ static void test_media_types(const GUID *clsid) };
hr = CoCreateInstance(clsid, NULL, CLSCTX_INPROC_SERVER, &IID_IMediaObject, (void **)&dmo); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
build_pcm_format(&wfx, WAVE_FORMAT_PCM, 16, 44100, 2);
mt.majortype = MEDIATYPE_Video; hr = IMediaObject_SetInputType(dmo, 0, &mt, 0); - ok(hr == DMO_E_TYPE_NOT_ACCEPTED, "Got hr %#x.\n", hr); + ok(hr == DMO_E_TYPE_NOT_ACCEPTED, "Got hr %#lx.\n", hr); mt.majortype = GUID_NULL; hr = IMediaObject_SetInputType(dmo, 0, &mt, 0); - ok(hr == DMO_E_TYPE_NOT_ACCEPTED, "Got hr %#x.\n", hr); + ok(hr == DMO_E_TYPE_NOT_ACCEPTED, "Got hr %#lx.\n", hr); mt.majortype = MEDIATYPE_Audio;
mt.subtype = MEDIASUBTYPE_RGB8; hr = IMediaObject_SetInputType(dmo, 0, &mt, 0); - ok(hr == DMO_E_TYPE_NOT_ACCEPTED, "Got hr %#x.\n", hr); + ok(hr == DMO_E_TYPE_NOT_ACCEPTED, "Got hr %#lx.\n", hr); mt.subtype = GUID_NULL; hr = IMediaObject_SetInputType(dmo, 0, &mt, 0); - ok(hr == DMO_E_TYPE_NOT_ACCEPTED, "Got hr %#x.\n", hr); + ok(hr == DMO_E_TYPE_NOT_ACCEPTED, "Got hr %#lx.\n", hr); mt.subtype = MEDIASUBTYPE_IEEE_FLOAT; hr = IMediaObject_SetInputType(dmo, 0, &mt, 0); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); mt.subtype = MEDIASUBTYPE_PCM;
mt.formattype = FORMAT_VideoInfo; hr = IMediaObject_SetInputType(dmo, 0, &mt, 0); - ok(hr == DMO_E_TYPE_NOT_ACCEPTED, "Got hr %#x.\n", hr); + ok(hr == DMO_E_TYPE_NOT_ACCEPTED, "Got hr %#lx.\n", hr); mt.formattype = FORMAT_None; hr = IMediaObject_SetInputType(dmo, 0, &mt, 0); - ok(hr == DMO_E_TYPE_NOT_ACCEPTED, "Got hr %#x.\n", hr); + ok(hr == DMO_E_TYPE_NOT_ACCEPTED, "Got hr %#lx.\n", hr); mt.formattype = GUID_NULL; hr = IMediaObject_SetInputType(dmo, 0, &mt, 0); - ok(hr == DMO_E_TYPE_NOT_ACCEPTED, "Got hr %#x.\n", hr); + ok(hr == DMO_E_TYPE_NOT_ACCEPTED, "Got hr %#lx.\n", hr); mt.formattype = FORMAT_WaveFormatEx;
for (i = 0; i < ARRAY_SIZE(sample_rates); ++i) @@ -247,48 +247,48 @@ static void test_media_types(const GUID *clsid) build_pcm_format(&wfx, depths[j].format, depths[j].depth, sample_rates[i], channels);
hr = IMediaObject_SetInputType(dmo, 0, &mt, 0); - ok(hr == S_OK, "Got hr %#x for %u Hz, %u channels, format %#x, depth %u.\n", + ok(hr == S_OK, "Got hr %#lx for %lu Hz, %u channels, format %#x, depth %u.\n", hr, sample_rates[i], channels, depths[j].format, depths[j].depth);
/* The output type must match the input type. */
build_pcm_format(&wfx, depths[j].format, depths[j].depth, sample_rates[i], 3 - channels); hr = IMediaObject_SetOutputType(dmo, 0, &mt, 0); - ok(hr == DMO_E_TYPE_NOT_ACCEPTED, "Got hr %#x for %u Hz, %u channels, format %#x, depth %u.\n", + ok(hr == DMO_E_TYPE_NOT_ACCEPTED, "Got hr %#lx for %lu Hz, %u channels, format %#x, depth %u.\n", hr, sample_rates[i], channels, depths[j].format, depths[j].depth);
build_pcm_format(&wfx, depths[j].format, depths[j].depth, 2 * sample_rates[i], channels); hr = IMediaObject_SetOutputType(dmo, 0, &mt, 0); - ok(hr == DMO_E_TYPE_NOT_ACCEPTED, "Got hr %#x for %u Hz, %u channels, format %#x, depth %u.\n", + ok(hr == DMO_E_TYPE_NOT_ACCEPTED, "Got hr %#lx for %lu Hz, %u channels, format %#x, depth %u.\n", hr, sample_rates[i], channels, depths[j].format, depths[j].depth);
build_pcm_format(&wfx, depths[j].format, 24 - depths[j].depth, sample_rates[i], channels); hr = IMediaObject_SetOutputType(dmo, 0, &mt, 0); - ok(hr == DMO_E_TYPE_NOT_ACCEPTED, "Got hr %#x for %u Hz, %u channels, format %#x, depth %u.\n", + ok(hr == DMO_E_TYPE_NOT_ACCEPTED, "Got hr %#lx for %lu Hz, %u channels, format %#x, depth %u.\n", hr, sample_rates[i], channels, depths[j].format, depths[j].depth);
build_pcm_format(&wfx, depths[j].format, depths[j].depth, sample_rates[i], channels); hr = IMediaObject_SetOutputType(dmo, 0, &mt, 0); - ok(hr == S_OK, "Got hr %#x for %u Hz, %u channels, format %#x, depth %u.\n", + ok(hr == S_OK, "Got hr %#lx for %lu Hz, %u channels, format %#x, depth %u.\n", hr, sample_rates[i], channels, depths[j].format, depths[j].depth);
hr = IMediaObject_SetInputType(dmo, 0, NULL, DMO_SET_TYPEF_CLEAR); - ok(hr == S_OK, "Got hr %#x for %u Hz, %u channels, format %#x, depth %u.\n", + ok(hr == S_OK, "Got hr %#lx for %lu Hz, %u channels, format %#x, depth %u.\n", hr, sample_rates[i], channels, depths[j].format, depths[j].depth);
hr = IMediaObject_SetOutputType(dmo, 0, NULL, DMO_SET_TYPEF_CLEAR); - ok(hr == S_OK, "Got hr %#x for %u Hz, %u channels, format %#x, depth %u.\n", + ok(hr == S_OK, "Got hr %#lx for %lu Hz, %u channels, format %#x, depth %u.\n", hr, sample_rates[i], channels, depths[j].format, depths[j].depth);
hr = IMediaObject_SetInputType(dmo, 0, NULL, DMO_SET_TYPEF_CLEAR); - ok(hr == S_OK, "Got hr %#x for %u Hz, %u channels, format %#x, depth %u.\n", + ok(hr == S_OK, "Got hr %#lx for %lu Hz, %u channels, format %#x, depth %u.\n", hr, sample_rates[i], channels, depths[j].format, depths[j].depth); } } }
ref = IMediaObject_Release(dmo); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); }
static void test_chorus_parameters(void) @@ -300,22 +300,22 @@ static void test_chorus_parameters(void)
hr = CoCreateInstance(&GUID_DSFX_STANDARD_CHORUS, NULL, CLSCTX_INPROC_SERVER, &IID_IDirectSoundFXChorus, (void **)&chorus); - todo_wine ok(hr == S_OK, "Got hr %#x.\n", hr); + todo_wine ok(hr == S_OK, "Got hr %#lx.\n", hr); if (hr != S_OK) return;
hr = IDirectSoundFXChorus_GetAllParameters(chorus, ¶ms); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(params.fWetDryMix == 50.0f, "Got wetness %.8e%%.\n", params.fWetDryMix); ok(params.fDepth == 10.0f, "Got depth %.8e.\n", params.fDepth); ok(params.fFeedback == 25.0f, "Got feedback %.8e.\n", params.fFeedback); ok(params.fFrequency == 1.1f, "Got LFO frequency %.8e.\n", params.fFrequency); - ok(params.lWaveform == DSFXCHORUS_WAVE_SIN, "Got LFO waveform %d.\n", params.lWaveform); + ok(params.lWaveform == DSFXCHORUS_WAVE_SIN, "Got LFO waveform %ld.\n", params.lWaveform); ok(params.fDelay == 16.0f, "Got delay %.8e.\n", params.fDelay); - ok(params.lPhase == 3, "Got phase differential %d.\n", params.lPhase); + ok(params.lPhase == 3, "Got phase differential %ld.\n", params.lPhase);
ref = IDirectSoundFXChorus_Release(chorus); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); }
static void test_compressor_parameters(void) @@ -327,12 +327,12 @@ static void test_compressor_parameters(void)
hr = CoCreateInstance(&GUID_DSFX_STANDARD_COMPRESSOR, NULL, CLSCTX_INPROC_SERVER, &IID_IDirectSoundFXCompressor, (void **)&compressor); - todo_wine ok(hr == S_OK, "Got hr %#x.\n", hr); + todo_wine ok(hr == S_OK, "Got hr %#lx.\n", hr); if (hr != S_OK) return;
hr = IDirectSoundFXCompressor_GetAllParameters(compressor, ¶ms); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(params.fGain == 0.0f, "Got gain %.8e dB.\n", params.fGain); ok(params.fAttack == 10.0f, "Got attack time %.8e ms.\n", params.fAttack); ok(params.fThreshold == -20.0f, "Got threshold %.8e dB.\n", params.fThreshold); @@ -340,7 +340,7 @@ static void test_compressor_parameters(void) ok(params.fPredelay == 4.0f, "Got pre-delay %.8e ms.\n", params.fPredelay);
ref = IDirectSoundFXCompressor_Release(compressor); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); }
static void test_distortion_parameters(void) @@ -352,12 +352,12 @@ static void test_distortion_parameters(void)
hr = CoCreateInstance(&GUID_DSFX_STANDARD_DISTORTION, NULL, CLSCTX_INPROC_SERVER, &IID_IDirectSoundFXDistortion, (void **)&distortion); - todo_wine ok(hr == S_OK, "Got hr %#x.\n", hr); + todo_wine ok(hr == S_OK, "Got hr %#lx.\n", hr); if (hr != S_OK) return;
hr = IDirectSoundFXDistortion_GetAllParameters(distortion, ¶ms); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(params.fGain == -18.0f, "Got gain %.8e dB.\n", params.fGain); ok(params.fEdge == 15.0f, "Got edge %.8e%%.\n", params.fEdge); ok(params.fPostEQCenterFrequency == 2400.0f, "Got center frequency %.8e Hz.\n", params.fPostEQCenterFrequency); @@ -365,7 +365,7 @@ static void test_distortion_parameters(void) ok(params.fPreLowpassCutoff == 8000.0f, "Got pre-lowpass cutoff %.8e Hz.\n", params.fPreLowpassCutoff);
ref = IDirectSoundFXDistortion_Release(distortion); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); }
static void test_echo_parameters(void) @@ -377,20 +377,20 @@ static void test_echo_parameters(void)
hr = CoCreateInstance(&GUID_DSFX_STANDARD_ECHO, NULL, CLSCTX_INPROC_SERVER, &IID_IDirectSoundFXEcho, (void **)&echo); - todo_wine ok(hr == S_OK, "Got hr %#x.\n", hr); + todo_wine ok(hr == S_OK, "Got hr %#lx.\n", hr); if (hr != S_OK) return;
hr = IDirectSoundFXEcho_GetAllParameters(echo, ¶ms); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(params.fWetDryMix == 50.0f, "Got %.8e%% wetness.\n", params.fWetDryMix); ok(params.fFeedback == 50.0f, "Got %.8e%% feedback.\n", params.fFeedback); ok(params.fLeftDelay == 500.0f, "Got left delay %.8e ms.\n", params.fLeftDelay); ok(params.fRightDelay == 500.0f, "Got right delay %.8e ms.\n", params.fRightDelay); - ok(!params.lPanDelay, "Got delay swap %d.\n", params.lPanDelay); + ok(!params.lPanDelay, "Got delay swap %ld.\n", params.lPanDelay);
ref = IDirectSoundFXEcho_Release(echo); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); }
static void test_flanger_parameters(void) @@ -402,21 +402,21 @@ static void test_flanger_parameters(void)
hr = CoCreateInstance(&GUID_DSFX_STANDARD_FLANGER, NULL, CLSCTX_INPROC_SERVER, &IID_IDirectSoundFXFlanger, (void **)&flanger); - todo_wine ok(hr == S_OK, "Got hr %#x.\n", hr); + todo_wine ok(hr == S_OK, "Got hr %#lx.\n", hr); if (hr != S_OK) return;
hr = IDirectSoundFXFlanger_GetAllParameters(flanger, ¶ms); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(params.fWetDryMix == 50.0f, "Got %.8e%% wetness.\n", params.fWetDryMix); ok(params.fDepth == 100.0f, "Got %.8e * 0.01%% depth.\n", params.fDepth); ok(params.fFeedback == -50.0f, "Got %.8e%% feedback.\n", params.fFeedback); - ok(params.lWaveform == DSFXFLANGER_WAVE_SIN, "Got LFO waveform %d.\n", params.lWaveform); + ok(params.lWaveform == DSFXFLANGER_WAVE_SIN, "Got LFO waveform %ld.\n", params.lWaveform); ok(params.fDelay == 2.0f, "Got delay %.8e ms.\n", params.fDelay); - ok(params.lPhase == DSFXFLANGER_PHASE_ZERO, "Got phase differential %d.\n", params.lPhase); + ok(params.lPhase == DSFXFLANGER_PHASE_ZERO, "Got phase differential %ld.\n", params.lPhase);
ref = IDirectSoundFXFlanger_Release(flanger); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); }
static void test_gargle_parameters(void) @@ -428,17 +428,17 @@ static void test_gargle_parameters(void)
hr = CoCreateInstance(&GUID_DSFX_STANDARD_GARGLE, NULL, CLSCTX_INPROC_SERVER, &IID_IDirectSoundFXGargle, (void **)&gargle); - todo_wine ok(hr == S_OK, "Got hr %#x.\n", hr); + todo_wine ok(hr == S_OK, "Got hr %#lx.\n", hr); if (hr != S_OK) return;
hr = IDirectSoundFXGargle_GetAllParameters(gargle, ¶ms); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(params.dwRateHz == 20, "Got rate %u Hz.\n", params.dwRateHz); - ok(params.dwWaveShape == DSFXGARGLE_WAVE_TRIANGLE, "Got wave shape %u.\n", params.dwWaveShape); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(params.dwRateHz == 20, "Got rate %lu Hz.\n", params.dwRateHz); + ok(params.dwWaveShape == DSFXGARGLE_WAVE_TRIANGLE, "Got wave shape %lu.\n", params.dwWaveShape);
ref = IDirectSoundFXGargle_Release(gargle); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); }
static void test_eq_parameters(void) @@ -450,33 +450,33 @@ static void test_eq_parameters(void)
hr = CoCreateInstance(&GUID_DSFX_STANDARD_PARAMEQ, NULL, CLSCTX_INPROC_SERVER, &IID_IDirectSoundFXParamEq, (void **)&eq); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IDirectSoundFXParamEq_GetAllParameters(eq, ¶ms); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(params.fCenter == 8000.0f, "Got center frequency %.8e Hz.\n", params.fCenter); ok(params.fBandwidth == 12.0f, "Got band width %.8e semitones.\n", params.fBandwidth); ok(params.fGain == 0.0f, "Got gain %.8e.\n", params.fGain);
params.fCenter = 79.0f; hr = IDirectSoundFXParamEq_SetAllParameters(eq, ¶ms); - todo_wine ok(hr == E_INVALIDARG, "Got hr %#x.\n", hr); + todo_wine ok(hr == E_INVALIDARG, "Got hr %#lx.\n", hr); params.fCenter = 16001.0f; hr = IDirectSoundFXParamEq_SetAllParameters(eq, ¶ms); - todo_wine ok(hr == E_INVALIDARG, "Got hr %#x.\n", hr); + todo_wine ok(hr == E_INVALIDARG, "Got hr %#lx.\n", hr); params.fCenter = 738.0f; hr = IDirectSoundFXParamEq_SetAllParameters(eq, ¶ms); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
memset(¶ms, 0xcc, sizeof(params)); hr = IDirectSoundFXParamEq_GetAllParameters(eq, ¶ms); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(params.fCenter == 738.0f, "Got center frequency %.8e Hz.\n", params.fCenter); ok(params.fBandwidth == 12.0f, "Got band width %.8e semitones.\n", params.fBandwidth); ok(params.fGain == 0.0f, "Got gain %.8e.\n", params.fGain);
ref = IDirectSoundFXParamEq_Release(eq); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); }
static void test_reverb_parameters(void) @@ -488,18 +488,18 @@ static void test_reverb_parameters(void)
hr = CoCreateInstance(&GUID_DSFX_STANDARD_I3DL2REVERB, NULL, CLSCTX_INPROC_SERVER, &IID_IDirectSoundFXI3DL2Reverb, (void **)&reverb); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IDirectSoundFXI3DL2Reverb_GetAllParameters(reverb, ¶ms); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(params.lRoom == -1000, "Got room attenuation %d mB.\n", params.lRoom); - ok(params.lRoomHF == -100, "Got room high-frequency attenuation %d mB.\n", params.lRoomHF); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(params.lRoom == -1000, "Got room attenuation %ld mB.\n", params.lRoom); + ok(params.lRoomHF == -100, "Got room high-frequency attenuation %ld mB.\n", params.lRoomHF); ok(params.flRoomRolloffFactor == 0.0f, "Got room rolloff factor %.8e.\n", params.flRoomRolloffFactor); ok(params.flDecayTime == 1.49f, "Got decay time %.8e s.\n", params.flDecayTime); ok(params.flDecayHFRatio == 0.83f, "Got decay time ratio %.8e.\n", params.flDecayHFRatio); - ok(params.lReflections == -2602, "Got early reflection attenuation %d mB.\n", params.lReflections); + ok(params.lReflections == -2602, "Got early reflection attenuation %ld mB.\n", params.lReflections); ok(params.flReflectionsDelay == 0.007f, "Got first reflection delay %.8e s.\n", params.flReflectionsDelay); - ok(params.lReverb == 200, "Got reverb attenuation %d mB.\n", params.lReverb); + ok(params.lReverb == 200, "Got reverb attenuation %ld mB.\n", params.lReverb); ok(params.flReverbDelay == 0.011f, "Got reverb delay %.8e s.\n", params.flReverbDelay); ok(params.flDiffusion == 100.0f, "Got diffusion %.8e%%.\n", params.flDiffusion); ok(params.flDensity == 100.0f, "Got density %.8e%%.\n", params.flDensity); @@ -507,21 +507,21 @@ static void test_reverb_parameters(void)
params.lRoom = -10001; hr = IDirectSoundFXI3DL2Reverb_SetAllParameters(reverb, ¶ms); - todo_wine ok(hr == E_INVALIDARG, "Got hr %#x.\n", hr); + todo_wine ok(hr == E_INVALIDARG, "Got hr %#lx.\n", hr); params.lRoom = 1; hr = IDirectSoundFXI3DL2Reverb_SetAllParameters(reverb, ¶ms); - todo_wine ok(hr == E_INVALIDARG, "Got hr %#x.\n", hr); + todo_wine ok(hr == E_INVALIDARG, "Got hr %#lx.\n", hr); params.lRoom = -900; hr = IDirectSoundFXI3DL2Reverb_SetAllParameters(reverb, ¶ms); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
memset(¶ms, 0xcc, sizeof(params)); hr = IDirectSoundFXI3DL2Reverb_GetAllParameters(reverb, ¶ms); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(params.lRoom == -900, "Got room attenuation %d mB.\n", params.lRoom); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(params.lRoom == -900, "Got room attenuation %ld mB.\n", params.lRoom);
ref = IDirectSoundFXI3DL2Reverb_Release(reverb); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); }
START_TEST(dsdmo) @@ -554,7 +554,7 @@ START_TEST(dsdmo) HRESULT hr;
hr = CoCreateInstance(tests[i].clsid, NULL, CLSCTX_INPROC_SERVER, tests[i].iid, (void **)&unk); - todo_wine_if(tests[i].todo) ok(hr == S_OK, "Failed to create %s, hr %#x.\n", + todo_wine_if(tests[i].todo) ok(hr == S_OK, "Failed to create %s, hr %#lx.\n", debugstr_guid(tests[i].clsid), hr); if (hr == S_OK) IUnknown_Release(unk);
Signed-off-by: Eric Pouech eric.pouech@gmail.com
--- dlls/dsound/tests/Makefile.in | 1 dlls/dsound/tests/capture.c | 150 +++++++------- dlls/dsound/tests/ds3d.c | 250 ++++++++++++------------ dlls/dsound/tests/ds3d8.c | 238 +++++++++++------------ dlls/dsound/tests/dsound.c | 386 +++++++++++++++++++------------------ dlls/dsound/tests/dsound8.c | 426 +++++++++++++++++++++-------------------- dlls/dsound/tests/duplex.c | 76 ++++--- dlls/dsound/tests/propset.c | 124 ++++++------ 8 files changed, 825 insertions(+), 826 deletions(-)
diff --git a/dlls/dsound/tests/Makefile.in b/dlls/dsound/tests/Makefile.in index cc39c4bda22..234b49b1bba 100644 --- a/dlls/dsound/tests/Makefile.in +++ b/dlls/dsound/tests/Makefile.in @@ -1,4 +1,3 @@ -EXTRADEFS = -DWINE_NO_LONG_TYPES TESTDLL = dsound.dll IMPORTS = dmoguids dsound msdmo ole32 version user32
diff --git a/dlls/dsound/tests/capture.c b/dlls/dsound/tests/capture.c index 2d8138aa19e..63998276a77 100644 --- a/dlls/dsound/tests/capture.c +++ b/dlls/dsound/tests/capture.c @@ -90,7 +90,7 @@ const char * format_string(const WAVEFORMATEX* wfx) { static char str[64];
- sprintf(str, "%5dx%2dx%d %s", + sprintf(str, "%5ldx%2dx%d %s", wfx->nSamplesPerSec, wfx->wBitsPerSample, wfx->nChannels, get_format_str(wfx->wFormatTag));
@@ -110,14 +110,14 @@ static void IDirectSoundCapture_test(LPDIRECTSOUNDCAPTURE dsco, rc=IDirectSoundCapture_QueryInterface(dsco, &IID_IUnknown, (LPVOID*)&unknown); ok(rc==DS_OK, "IDirectSoundCapture_QueryInterface(IID_IUnknown) " - "failed: %08x\n", rc); + "failed: %08lx\n", rc); if (rc==DS_OK) IUnknown_Release(unknown);
rc=IDirectSoundCapture_QueryInterface(dsco, &IID_IDirectSoundCapture, (LPVOID*)&dsc); ok(rc==DS_OK, "IDirectSoundCapture_QueryInterface(IID_IDirectSoundCapture) " - "failed: %08x\n", rc); + "failed: %08lx\n", rc); if (rc==DS_OK) IDirectSoundCapture_Release(dsc);
@@ -126,16 +126,16 @@ static void IDirectSoundCapture_test(LPDIRECTSOUNDCAPTURE dsco, rc=IDirectSoundCapture_GetCaps(dsco,0); ok(rc==DSERR_UNINITIALIZED||rc==E_INVALIDARG, "IDirectSoundCapture_GetCaps(NULL) should have returned " - "DSERR_UNINITIALIZED or E_INVALIDARG, returned: %08x\n", rc); + "DSERR_UNINITIALIZED or E_INVALIDARG, returned: %08lx\n", rc);
rc=IDirectSoundCapture_GetCaps(dsco, &dsccaps); ok(rc==DSERR_UNINITIALIZED,"IDirectSoundCapture_GetCaps() " - "should have returned DSERR_UNINITIALIZED, returned: %08x\n", rc); + "should have returned DSERR_UNINITIALIZED, returned: %08lx\n", rc);
rc=IDirectSoundCapture_Initialize(dsco, lpGuid); ok(rc==DS_OK||rc==DSERR_NODRIVER||rc==DSERR_ALLOCATED|| rc==E_FAIL||rc==E_INVALIDARG, - "IDirectSoundCapture_Initialize() failed: %08x\n", rc); + "IDirectSoundCapture_Initialize() failed: %08lx\n", rc); if (rc==DSERR_NODRIVER||rc==E_INVALIDARG) { trace(" No Driver\n"); goto EXIT; @@ -150,25 +150,25 @@ static void IDirectSoundCapture_test(LPDIRECTSOUNDCAPTURE dsco,
rc=IDirectSoundCapture_Initialize(dsco, lpGuid); ok(rc==DSERR_ALREADYINITIALIZED, "IDirectSoundCapture_Initialize() " - "should have returned DSERR_ALREADYINITIALIZED: %08x\n", rc); + "should have returned DSERR_ALREADYINITIALIZED: %08lx\n", rc);
/* DSOUND: Error: Invalid caps buffer */ rc=IDirectSoundCapture_GetCaps(dsco, 0); ok(rc==DSERR_INVALIDPARAM, "IDirectSoundCapture_GetCaps(NULL) " - "should have returned DSERR_INVALIDPARAM, returned: %08x\n", rc); + "should have returned DSERR_INVALIDPARAM, returned: %08lx\n", rc);
ZeroMemory(&dsccaps, sizeof(dsccaps));
/* DSOUND: Error: Invalid caps buffer */ rc=IDirectSoundCapture_GetCaps(dsco, &dsccaps); ok(rc==DSERR_INVALIDPARAM, "IDirectSound_GetCaps() " - "should have returned DSERR_INVALIDPARAM, returned: %08x\n", rc); + "should have returned DSERR_INVALIDPARAM, returned: %08lx\n", rc);
dsccaps.dwSize=sizeof(dsccaps);
/* DSOUND: Running on a certified driver */ rc=IDirectSoundCapture_GetCaps(dsco, &dsccaps); - ok(rc==DS_OK, "IDirectSoundCapture_GetCaps() failed: %08x\n", rc); + ok(rc==DS_OK, "IDirectSoundCapture_GetCaps() failed: %08lx\n", rc);
EXIT: ref=IDirectSoundCapture_Release(dsco); @@ -187,17 +187,17 @@ static void test_capture(void) rc=CoGetClassObject(&CLSID_DirectSoundCapture, CLSCTX_INPROC_SERVER, NULL, &IID_IClassFactory, (void**)&cf); ok(rc==S_OK,"CoGetClassObject(CLSID_DirectSoundCapture, IID_IClassFactory) " - "failed: %08x\n", rc); + "failed: %08lx\n", rc);
rc=CoGetClassObject(&CLSID_DirectSoundCapture, CLSCTX_INPROC_SERVER, NULL, &IID_IUnknown, (void**)&cf); ok(rc==S_OK,"CoGetClassObject(CLSID_DirectSoundCapture, IID_IUnknown) " - "failed: %08x\n", rc); + "failed: %08lx\n", rc);
/* try the COM class factory method of creation with no device specified */ rc=CoCreateInstance(&CLSID_DirectSoundCapture, NULL, CLSCTX_INPROC_SERVER, &IID_IDirectSoundCapture, (void**)&dsco); - ok(rc==S_OK||rc==REGDB_E_CLASSNOTREG,"CoCreateInstance(CLSID_DirectSoundCapture) failed: %08x\n", rc); + ok(rc==S_OK||rc==REGDB_E_CLASSNOTREG,"CoCreateInstance(CLSID_DirectSoundCapture) failed: %08lx\n", rc); if (rc==REGDB_E_CLASSNOTREG) { trace(" Class Not Registered\n"); return; @@ -209,7 +209,7 @@ static void test_capture(void) * device specified */ rc=CoCreateInstance(&CLSID_DirectSoundCapture, NULL, CLSCTX_INPROC_SERVER, &IID_IDirectSoundCapture, (void**)&dsco); - ok(rc==S_OK,"CoCreateInstance(CLSID_DirectSoundCapture) failed: %08x\n", rc); + ok(rc==S_OK,"CoCreateInstance(CLSID_DirectSoundCapture) failed: %08lx\n", rc); if (dsco) IDirectSoundCapture_test(dsco, FALSE, &DSDEVID_DefaultCapture);
@@ -217,7 +217,7 @@ static void test_capture(void) * capture device specified */ rc=CoCreateInstance(&CLSID_DirectSoundCapture, NULL, CLSCTX_INPROC_SERVER, &IID_IDirectSoundCapture, (void**)&dsco); - ok(rc==S_OK,"CoCreateInstance(CLSID_DirectSoundCapture) failed: %08x\n", rc); + ok(rc==S_OK,"CoCreateInstance(CLSID_DirectSoundCapture) failed: %08lx\n", rc); if (dsco) IDirectSoundCapture_test(dsco, FALSE, &DSDEVID_DefaultVoiceCapture);
@@ -227,26 +227,26 @@ static void test_capture(void) &CLSID_DirectSoundPrivate, (void**)&dsco); ok(rc==E_NOINTERFACE, "CoCreateInstance(CLSID_DirectSoundCapture,CLSID_DirectSoundPrivate) " - "should have failed: %08x\n",rc); + "should have failed: %08lx\n",rc);
/* try with no device specified */ rc = DirectSoundCaptureCreate(NULL, &dsco, NULL); ok(rc==DS_OK||rc==DSERR_NODRIVER||rc==DSERR_ALLOCATED||rc==E_FAIL, - "DirectSoundCaptureCreate(NULL) failed: %08x\n",rc); + "DirectSoundCaptureCreate(NULL) failed: %08lx\n",rc); if (rc==S_OK && dsco) IDirectSoundCapture_test(dsco, TRUE, NULL);
/* try with default capture device specified */ rc = DirectSoundCaptureCreate(&DSDEVID_DefaultCapture, &dsco, NULL); ok(rc==DS_OK||rc==DSERR_NODRIVER||rc==DSERR_ALLOCATED||rc==E_FAIL, - "DirectSoundCaptureCreate(DSDEVID_DefaultCapture) failed: %08x\n", rc); + "DirectSoundCaptureCreate(DSDEVID_DefaultCapture) failed: %08lx\n", rc); if (rc==DS_OK && dsco) IDirectSoundCapture_test(dsco, TRUE, NULL);
/* try with default voice capture device specified */ rc = DirectSoundCaptureCreate(&DSDEVID_DefaultVoiceCapture, &dsco, NULL); ok(rc==DS_OK||rc==DSERR_NODRIVER||rc==DSERR_ALLOCATED||rc==E_FAIL, - "DirectSoundCaptureCreate(DSDEVID_DefaultVoiceCapture) failed: %08x\n", rc); + "DirectSoundCaptureCreate(DSDEVID_DefaultVoiceCapture) failed: %08lx\n", rc); if (rc==DS_OK && dsco) IDirectSoundCapture_test(dsco, TRUE, NULL);
@@ -254,7 +254,7 @@ static void test_capture(void) rc = DirectSoundCaptureCreate(&DSDEVID_DefaultVoicePlayback, &dsco, NULL); ok(rc==DSERR_NODRIVER, "DirectSoundCaptureCreate(DSDEVID_DefaultVoicePlatback) " - "should have failed: %08x\n",rc); + "should have failed: %08lx\n",rc); if (rc==DS_OK && dsco) IDirectSoundCapture_Release(dsco); } @@ -286,18 +286,18 @@ static BOOL capture_buffer_service(capture_state_t* state)
rc=IDirectSoundCaptureBuffer_GetCurrentPosition(state->dscbo,&capture_pos, &read_pos); - ok(rc==DS_OK,"IDirectSoundCaptureBuffer_GetCurrentPosition() failed: %08x\n", rc); + ok(rc==DS_OK,"IDirectSoundCaptureBuffer_GetCurrentPosition() failed: %08lx\n", rc); if (rc!=DS_OK) return FALSE;
rc=IDirectSoundCaptureBuffer_Lock(state->dscbo,state->offset,state->size, &ptr1,&len1,&ptr2,&len2,0); - ok(rc==DS_OK,"IDirectSoundCaptureBuffer_Lock() failed: %08x\n", rc); + ok(rc==DS_OK,"IDirectSoundCaptureBuffer_Lock() failed: %08lx\n", rc); if (rc!=DS_OK) return FALSE;
rc=IDirectSoundCaptureBuffer_Unlock(state->dscbo,ptr1,len1,ptr2,len2); - ok(rc==DS_OK,"IDirectSoundCaptureBuffer_Unlock() failed: %08x\n", rc); + ok(rc==DS_OK,"IDirectSoundCaptureBuffer_Unlock() failed: %08lx\n", rc); if (rc!=DS_OK) return FALSE;
@@ -319,19 +319,19 @@ static void test_capture_buffer(LPDIRECTSOUNDCAPTURE dsco, /* Private dsound.dll: Error: Invalid caps pointer */ rc=IDirectSoundCaptureBuffer_GetCaps(dscbo,0); ok(rc==DSERR_INVALIDPARAM,"IDirectSoundCaptureBuffer_GetCaps() should " - "have returned DSERR_INVALIDPARAM, returned: %08x\n", rc); + "have returned DSERR_INVALIDPARAM, returned: %08lx\n", rc);
/* Private dsound.dll: Error: Invalid caps pointer */ dscbcaps.dwSize=0; rc=IDirectSoundCaptureBuffer_GetCaps(dscbo,&dscbcaps); ok(rc==DSERR_INVALIDPARAM,"IDirectSoundCaptureBuffer_GetCaps() should " - "have returned DSERR_INVALIDPARAM, returned: %08x\n", rc); + "have returned DSERR_INVALIDPARAM, returned: %08lx\n", rc);
dscbcaps.dwSize=sizeof(dscbcaps); rc=IDirectSoundCaptureBuffer_GetCaps(dscbo,&dscbcaps); - ok(rc==DS_OK,"IDirectSoundCaptureBuffer_GetCaps() failed: %08x\n", rc); + ok(rc==DS_OK,"IDirectSoundCaptureBuffer_GetCaps() failed: %08lx\n", rc); if (rc==DS_OK && winetest_debug > 1) { - trace(" Caps: size = %d flags=0x%08x buffer size=%d\n", + trace(" Caps: size = %ld flags=0x%08lx buffer size=%ld\n", dscbcaps.dwSize,dscbcaps.dwFlags,dscbcaps.dwBufferBytes); }
@@ -340,17 +340,17 @@ static void test_capture_buffer(LPDIRECTSOUNDCAPTURE dsco, * be non-NULL */ rc=IDirectSoundCaptureBuffer_GetFormat(dscbo,NULL,0,NULL); ok(rc==DSERR_INVALIDPARAM,"IDirectSoundCaptureBuffer_GetFormat() should " - "have returned DSERR_INVALIDPARAM, returned: %08x\n", rc); + "have returned DSERR_INVALIDPARAM, returned: %08lx\n", rc);
size=0; rc=IDirectSoundCaptureBuffer_GetFormat(dscbo,NULL,0,&size); ok(rc==DS_OK && size!=0,"IDirectSoundCaptureBuffer_GetFormat() should " - "have returned the needed size: rc=%08x, size=%d\n", rc,size); + "have returned the needed size: rc=%08lx, size=%ld\n", rc,size);
rc=IDirectSoundCaptureBuffer_GetFormat(dscbo,&wfx,sizeof(wfx),NULL); - ok(rc==DS_OK,"IDirectSoundCaptureBuffer_GetFormat() failed: %08x\n", rc); + ok(rc==DS_OK,"IDirectSoundCaptureBuffer_GetFormat() failed: %08lx\n", rc); if (rc==DS_OK && winetest_debug > 1) { - trace(" Format: tag=0x%04x %dx%dx%d avg.B/s=%d align=%d\n", + trace(" Format: tag=0x%04x %ldx%dx%d avg.B/s=%ld align=%d\n", wfx.wFormatTag,wfx.nSamplesPerSec,wfx.wBitsPerSample, wfx.nChannels,wfx.nAvgBytesPerSec,wfx.nBlockAlign); } @@ -358,12 +358,12 @@ static void test_capture_buffer(LPDIRECTSOUNDCAPTURE dsco, /* Private dsound.dll: Error: Invalid status pointer */ rc=IDirectSoundCaptureBuffer_GetStatus(dscbo,0); ok(rc==DSERR_INVALIDPARAM,"IDirectSoundCaptureBuffer_GetStatus() should " - "have returned DSERR_INVALIDPARAM, returned: %08x\n", rc); + "have returned DSERR_INVALIDPARAM, returned: %08lx\n", rc);
rc=IDirectSoundCaptureBuffer_GetStatus(dscbo,&status); - ok(rc==DS_OK,"IDirectSoundCaptureBuffer_GetStatus() failed: %08x\n", rc); + ok(rc==DS_OK,"IDirectSoundCaptureBuffer_GetStatus() failed: %08lx\n", rc); if (rc==DS_OK && winetest_debug > 1) { - trace(" Status=0x%04x\n",status); + trace(" Status=0x%04lx\n",status); }
ZeroMemory(&state, sizeof(state)); @@ -377,7 +377,7 @@ static void test_capture_buffer(LPDIRECTSOUNDCAPTURE dsco, rc=IDirectSoundCaptureBuffer_QueryInterface(dscbo,&IID_IDirectSoundNotify, (void **)&(state.notify)); ok((rc==DS_OK)&&(state.notify!=NULL), - "IDirectSoundCaptureBuffer_QueryInterface() failed: %08x\n", rc); + "IDirectSoundCaptureBuffer_QueryInterface() failed: %08lx\n", rc);
for (i = 0; i < TIMESTAMP_NOTIFICATIONS; i++) { state.posnotify[i].dwOffset = (i * state.size) + state.size - 1; @@ -389,32 +389,32 @@ static void test_capture_buffer(LPDIRECTSOUNDCAPTURE dsco,
rc = IDirectSoundNotify_SetNotificationPositions(state.notify, TOTAL_NOTIFICATIONS, state.posnotify); - ok(rc==DS_OK,"IDirectSoundNotify_SetNotificationPositions() failed: %08x\n", rc); + ok(rc==DS_OK,"IDirectSoundNotify_SetNotificationPositions() failed: %08lx\n", rc);
ref=IDirectSoundNotify_Release(state.notify); ok(ref==0,"IDirectSoundNotify_Release(): has %d references, should have " "0\n",ref);
rc=IDirectSoundCaptureBuffer_Start(dscbo,DSCBSTART_LOOPING); - ok(rc==DS_OK,"IDirectSoundCaptureBuffer_Start() failed: %08x\n", rc); + ok(rc==DS_OK,"IDirectSoundCaptureBuffer_Start() failed: %08lx\n", rc);
rc=IDirectSoundCaptureBuffer_Start(dscbo,0); - ok(rc==DS_OK,"IDirectSoundCaptureBuffer_Start() failed: %08x\n", rc); + ok(rc==DS_OK,"IDirectSoundCaptureBuffer_Start() failed: %08lx\n", rc);
rc=IDirectSoundCaptureBuffer_GetStatus(dscbo,&status); - ok(rc==DS_OK,"IDirectSoundCaptureBuffer_GetStatus() failed: %08x\n", rc); + ok(rc==DS_OK,"IDirectSoundCaptureBuffer_GetStatus() failed: %08lx\n", rc); ok(status==(DSCBSTATUS_CAPTURING|DSCBSTATUS_LOOPING) || broken(status==DSCBSTATUS_CAPTURING), - "GetStatus: bad status: %x\n",status); + "GetStatus: bad status: %lx\n",status);
if (record) { /* wait for timestamp notifications */ for (i = 0; i < (TIMESTAMP_NOTIFICATIONS * 2); i++) { rc = WaitForMultipleObjects(TOTAL_NOTIFICATIONS, state.event, FALSE, 3000); ok(rc == (WAIT_OBJECT_0 + (i % TIMESTAMP_NOTIFICATIONS)), - "WaitForMultipleObjects failed: 0x%x\n",rc); + "WaitForMultipleObjects failed: 0x%lx\n",rc); if (rc != (WAIT_OBJECT_0 + (i % TIMESTAMP_NOTIFICATIONS))) { ok((rc==WAIT_TIMEOUT)||(rc==WAIT_FAILED), - "Wrong notification: should be %d, got %d\n", + "Wrong notification: should be %d, got %ld\n", i % TIMESTAMP_NOTIFICATIONS, rc - WAIT_OBJECT_0); } if (!capture_buffer_service(&state)) @@ -423,14 +423,14 @@ static void test_capture_buffer(LPDIRECTSOUNDCAPTURE dsco,
} rc=IDirectSoundCaptureBuffer_Stop(dscbo); - ok(rc==DS_OK,"IDirectSoundCaptureBuffer_Stop() failed: %08x\n", rc); + ok(rc==DS_OK,"IDirectSoundCaptureBuffer_Stop() failed: %08lx\n", rc);
/* wait for stop notification */ rc = WaitForSingleObject(state.event[TIMESTAMP_NOTIFICATIONS], 3000); - ok(rc == WAIT_OBJECT_0, "WaitForSingleObject failed: 0x%x\n", rc); + ok(rc == WAIT_OBJECT_0, "WaitForSingleObject failed: 0x%lx\n", rc);
rc=IDirectSoundCaptureBuffer_Stop(dscbo); - ok(rc==DS_OK,"IDirectSoundCaptureBuffer_Stop() failed: %08x\n", rc); + ok(rc==DS_OK,"IDirectSoundCaptureBuffer_Stop() failed: %08lx\n", rc); }
static BOOL WINAPI dscenum_callback(LPGUID lpGuid, LPCSTR lpcstrDescription, @@ -449,11 +449,11 @@ static BOOL WINAPI dscenum_callback(LPGUID lpGuid, LPCSTR lpcstrDescription, trace("*** Testing %s - %s ***\n",lpcstrDescription,lpcstrModule); rc = DirectSoundCaptureCreate(lpGuid, NULL, NULL); ok(rc==DSERR_INVALIDPARAM,"DirectSoundCaptureCreate() should have " - "returned DSERR_INVALIDPARAM, returned: %08x\n",rc); + "returned DSERR_INVALIDPARAM, returned: %08lx\n",rc);
rc = DirectSoundCaptureCreate(lpGuid, &dsco, NULL); ok((rc==DS_OK)||(rc==DSERR_NODRIVER)||(rc==E_FAIL)||(rc==DSERR_ALLOCATED), - "DirectSoundCaptureCreate() failed: %08x\n",rc); + "DirectSoundCaptureCreate() failed: %08lx\n",rc); if (rc!=DS_OK) { if (rc==DSERR_NODRIVER) trace(" No Driver\n"); @@ -467,19 +467,19 @@ static BOOL WINAPI dscenum_callback(LPGUID lpGuid, LPCSTR lpcstrDescription, /* Private dsound.dll: Error: Invalid caps buffer */ rc=IDirectSoundCapture_GetCaps(dsco,NULL); ok(rc==DSERR_INVALIDPARAM,"IDirectSoundCapture_GetCaps() should have " - "returned DSERR_INVALIDPARAM, returned: %08x\n",rc); + "returned DSERR_INVALIDPARAM, returned: %08lx\n",rc);
/* Private dsound.dll: Error: Invalid caps buffer */ dsccaps.dwSize=0; rc=IDirectSoundCapture_GetCaps(dsco,&dsccaps); ok(rc==DSERR_INVALIDPARAM,"IDirectSoundCapture_GetCaps() should have " - "returned DSERR_INVALIDPARAM, returned: %08x\n",rc); + "returned DSERR_INVALIDPARAM, returned: %08lx\n",rc);
dsccaps.dwSize=sizeof(dsccaps); rc=IDirectSoundCapture_GetCaps(dsco,&dsccaps); - ok(rc==DS_OK,"IDirectSoundCapture_GetCaps() failed: %08x\n", rc); + ok(rc==DS_OK,"IDirectSoundCapture_GetCaps() failed: %08lx\n", rc); if (rc==DS_OK && winetest_debug > 1) { - trace(" Caps: size=%d flags=0x%08x formats=%05x channels=%d\n", + trace(" Caps: size=%ld flags=0x%08lx formats=%05lx channels=%ld\n", dsccaps.dwSize,dsccaps.dwFlags,dsccaps.dwFormats, dsccaps.dwChannels); } @@ -494,7 +494,7 @@ static BOOL WINAPI dscenum_callback(LPGUID lpGuid, LPCSTR lpcstrDescription, bufdesc.lpwfxFormat=NULL; rc=IDirectSoundCapture_CreateCaptureBuffer(dsco,&bufdesc,&dscbo,NULL); ok(rc==DSERR_INVALIDPARAM,"IDirectSoundCapture_CreateCaptureBuffer() " - "should have returned DSERR_INVALIDPARAM, returned: %08x\n", rc); + "should have returned DSERR_INVALIDPARAM, returned: %08lx\n", rc); if (rc==DS_OK) { ref=IDirectSoundCaptureBuffer_Release(dscbo); ok(ref==0,"IDirectSoundCaptureBuffer_Release() has %d references, " @@ -511,7 +511,7 @@ static BOOL WINAPI dscenum_callback(LPGUID lpGuid, LPCSTR lpcstrDescription, bufdesc.lpwfxFormat=NULL; rc=IDirectSoundCapture_CreateCaptureBuffer(dsco,&bufdesc,&dscbo,NULL); ok(rc==DSERR_INVALIDPARAM,"IDirectSoundCapture_CreateCaptureBuffer() " - "should have returned DSERR_INVALIDPARAM, returned %08x\n", rc); + "should have returned DSERR_INVALIDPARAM, returned %08lx\n", rc); if (rc==DS_OK) { ref=IDirectSoundCaptureBuffer_Release(dscbo); ok(ref==0,"IDirectSoundCaptureBuffer_Release() has %d references, " @@ -529,7 +529,7 @@ static BOOL WINAPI dscenum_callback(LPGUID lpGuid, LPCSTR lpcstrDescription, bufdesc.lpwfxFormat=&wfx; rc=IDirectSoundCapture_CreateCaptureBuffer(dsco,&bufdesc,&dscbo,NULL); ok(rc==DSERR_INVALIDPARAM,"IDirectSoundCapture_CreateCaptureBuffer() " - "should have returned DSERR_INVALIDPARAM, returned: %08x\n", rc); + "should have returned DSERR_INVALIDPARAM, returned: %08lx\n", rc); if (rc==DS_OK) { ref=IDirectSoundCaptureBuffer_Release(dscbo); ok(ref==0,"IDirectSoundCaptureBuffer_Release() has %d references, " @@ -547,7 +547,7 @@ static BOOL WINAPI dscenum_callback(LPGUID lpGuid, LPCSTR lpcstrDescription, bufdesc.lpwfxFormat=&wfx; rc=IDirectSoundCapture_CreateCaptureBuffer(dsco,&bufdesc,&dscbo,NULL); ok(rc==DSERR_INVALIDPARAM,"IDirectSoundCapture_CreateCaptureBuffer() " - "should have returned DSERR_INVALIDPARAM, returned: %08x\n", rc); + "should have returned DSERR_INVALIDPARAM, returned: %08lx\n", rc); if (rc==DS_OK) { ref=IDirectSoundCaptureBuffer_Release(dscbo); ok(ref==0,"IDirectSoundCaptureBuffer_Release() has %d references, " @@ -571,7 +571,7 @@ static BOOL WINAPI dscenum_callback(LPGUID lpGuid, LPCSTR lpcstrDescription, || rc==DSERR_BADFORMAT || rc==DSERR_INVALIDCALL || rc==DSERR_NODRIVER || rc==DSERR_ALLOCATED || rc==E_INVALIDARG || rc==E_FAIL, "IDirectSoundCapture_CreateCaptureBuffer() failed to create a " - "%s capture buffer: %08x\n",format_string(&wfx),rc); + "%s capture buffer: %08lx\n",format_string(&wfx),rc); if (rc==DS_OK) { test_capture_buffer(dsco, dscbo, winetest_interactive); ref=IDirectSoundCaptureBuffer_Release(dscbo); @@ -599,7 +599,7 @@ static BOOL WINAPI dscenum_callback(LPGUID lpGuid, LPCSTR lpcstrDescription, (DSCBUFFERDESC*)&bufdesc1,&dscbo,NULL); ok(rc==DS_OK || broken(rc==DSERR_INVALIDPARAM), "IDirectSoundCapture_CreateCaptureBuffer() failed to create a " - "%s capture buffer: %08x\n",format_string(&wfx), rc); + "%s capture buffer: %08lx\n",format_string(&wfx), rc); if (rc==DSERR_INVALIDPARAM) { skip("broken driver\n"); goto EXIT; @@ -634,7 +634,7 @@ static BOOL WINAPI dscenum_callback(LPGUID lpGuid, LPCSTR lpcstrDescription, trace(" Testing the capture buffer at %s\n", format_string(&wfx)); rc=IDirectSoundCapture_CreateCaptureBuffer(dsco,&bufdesc,&dscbo,NULL); ok((rc==DS_OK)&&(dscbo!=NULL),"IDirectSoundCapture_CreateCaptureBuffer() " - "failed to create a capture buffer: %08x\n",rc); + "failed to create a capture buffer: %08lx\n",rc); if ((rc==DS_OK)&&(dscbo!=NULL)) { test_capture_buffer(dsco, dscbo, winetest_interactive); ref=IDirectSoundCaptureBuffer_Release(dscbo); @@ -658,7 +658,7 @@ static BOOL WINAPI dscenum_callback(LPGUID lpGuid, LPCSTR lpcstrDescription, trace(" Testing the capture buffer at %s\n", format_string(&wfx)); rc=IDirectSoundCapture_CreateCaptureBuffer(dsco,&bufdesc,&dscbo,NULL); ok(rc!=DS_OK,"IDirectSoundCapture_CreateCaptureBuffer() should have failed " - "at 2 MHz %08x\n",rc); + "at 2 MHz %08lx\n",rc); }
EXIT: @@ -675,7 +675,7 @@ static void test_enumerate(void) { HRESULT rc; rc = DirectSoundCaptureEnumerateA(dscenum_callback, NULL); - ok(rc==DS_OK,"DirectSoundCaptureEnumerateA() failed: %08x\n", rc); + ok(rc==DS_OK,"DirectSoundCaptureEnumerateA() failed: %08lx\n", rc); }
static void test_COM(void) @@ -691,7 +691,7 @@ static void test_COM(void)
hr = DirectSoundCaptureCreate(NULL, &dsc, (IUnknown *)0xdeadbeef); ok(hr == DSERR_NOAGGREGATION, - "DirectSoundCaptureCreate failed: %08x, expected DSERR_NOAGGREGATION\n", hr); + "DirectSoundCaptureCreate failed: %08lx, expected DSERR_NOAGGREGATION\n", hr); ok(dsc == (IDirectSoundCapture*)0xdeadbeef, "dsc = %p\n", dsc);
hr = DirectSoundCaptureCreate(NULL, &dsc, NULL); @@ -699,15 +699,15 @@ static void test_COM(void) skip("No driver\n"); return; } - ok(hr == DS_OK, "DirectSoundCaptureCreate failed: %08x, expected DS_OK\n", hr); + ok(hr == DS_OK, "DirectSoundCaptureCreate failed: %08lx, expected DS_OK\n", hr);
/* Different refcount for IDirectSoundCapture and for IUnknown */ refcount = IDirectSoundCapture_AddRef(dsc); - ok(refcount == 2, "refcount == %u, expected 2\n", refcount); + ok(refcount == 2, "refcount == %lu, expected 2\n", refcount); hr = IDirectSoundCapture_QueryInterface(dsc, &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: %08lx\n", hr); refcount = IUnknown_AddRef(unk); - ok(refcount == 2, "refcount == %u, expected 2\n", refcount); + ok(refcount == 2, "refcount == %lu, expected 2\n", refcount); IUnknown_Release(unk); IUnknown_Release(unk); IDirectSoundCapture_Release(dsc); @@ -725,37 +725,37 @@ static void test_COM(void) hr = IDirectSoundCapture_CreateCaptureBuffer(dsc, &bufdesc, &buffer, (IUnknown*)0xdeadbeef); } ok(hr == DSERR_NOAGGREGATION, - "IDirectSoundCapture_CreateCaptureBuffer failed: %08x, expected DSERR_NOAGGREGATION\n", hr); + "IDirectSoundCapture_CreateCaptureBuffer failed: %08lx, expected DSERR_NOAGGREGATION\n", hr); ok(buffer == (IDirectSoundCaptureBuffer*)0xdeadbeef || !buffer /* Win2k without DirectX9 */, "buffer = %p\n", buffer);
hr = IDirectSoundCapture_CreateCaptureBuffer(dsc, &bufdesc, &buffer, NULL); - ok(hr == DS_OK, "IDirectSoundCapture_CreateCaptureBuffer failed: %08x, expected DS_OK\n", hr); + ok(hr == DS_OK, "IDirectSoundCapture_CreateCaptureBuffer failed: %08lx, expected DS_OK\n", hr);
/* IDirectSoundCaptureBuffer and IDirectSoundNotify have separate refcounts */ IDirectSoundCaptureBuffer_AddRef(buffer); refcount = IDirectSoundCaptureBuffer_AddRef(buffer); - ok(refcount == 3, "IDirectSoundCaptureBuffer refcount is %u, expected 3\n", refcount); + ok(refcount == 3, "IDirectSoundCaptureBuffer refcount is %lu, expected 3\n", refcount); hr = IDirectSoundCaptureBuffer_QueryInterface(buffer, &IID_IDirectSoundNotify, (void**)¬ify); - ok(hr == DS_OK, "IDirectSoundCapture_QueryInterface failed: %08x, expected DS_OK\n", hr); + ok(hr == DS_OK, "IDirectSoundCapture_QueryInterface failed: %08lx, expected DS_OK\n", hr); refcount = IDirectSoundNotify_AddRef(notify); - ok(refcount == 2, "IDirectSoundNotify refcount is %u, expected 2\n", refcount); + ok(refcount == 2, "IDirectSoundNotify refcount is %lu, expected 2\n", refcount); IDirectSoundCaptureBuffer_AddRef(buffer); refcount = IDirectSoundCaptureBuffer_Release(buffer); - ok(refcount == 3, "IDirectSoundCaptureBuffer refcount is %u, expected 3\n", refcount); + ok(refcount == 3, "IDirectSoundCaptureBuffer refcount is %lu, expected 3\n", refcount);
/* Release IDirectSoundCaptureBuffer while keeping IDirectSoundNotify alive */ while (IDirectSoundCaptureBuffer_Release(buffer) > 0); refcount = IDirectSoundNotify_AddRef(notify); - ok(refcount == 3, "IDirectSoundNotify refcount is %u, expected 3\n", refcount); + ok(refcount == 3, "IDirectSoundNotify refcount is %lu, expected 3\n", refcount); refcount = IDirectSoundCaptureBuffer_AddRef(buffer); - ok(refcount == 1, "IDirectSoundCaptureBuffer refcount is %u, expected 1\n", refcount); + ok(refcount == 1, "IDirectSoundCaptureBuffer refcount is %lu, expected 1\n", refcount);
while (IDirectSoundNotify_Release(notify) > 0); refcount = IDirectSoundCaptureBuffer_Release(buffer); - ok(refcount == 0, "IDirectSoundCaptureBuffer refcount is %u, expected 0\n", refcount); + ok(refcount == 0, "IDirectSoundCaptureBuffer refcount is %lu, expected 0\n", refcount); refcount = IDirectSoundCapture_Release(dsc); - ok(refcount == 0, "IDirectSoundCapture refcount is %u, expected 0\n", refcount); + ok(refcount == 0, "IDirectSoundCapture refcount is %lu, expected 0\n", refcount); }
START_TEST(capture) diff --git a/dlls/dsound/tests/ds3d.c b/dlls/dsound/tests/ds3d.c index a6b31641d4a..577c4155e9f 100644 --- a/dlls/dsound/tests/ds3d.c +++ b/dlls/dsound/tests/ds3d.c @@ -197,10 +197,10 @@ static int buffer_refill(play_state_t* state, DWORD size) /* some broken apps like Navyfield mistakenly pass NULL for a ppValue */ rc=IDirectSoundBuffer_Lock(state->dsbo,state->offset,size, &ptr1,NULL,&ptr2,&len2,0); - ok(rc==DSERR_INVALIDPARAM,"expected %08x got %08x\n",DSERR_INVALIDPARAM, rc); + ok(rc==DSERR_INVALIDPARAM,"expected %08lx got %08lx\n",DSERR_INVALIDPARAM, rc); rc=IDirectSoundBuffer_Lock(state->dsbo,state->offset,size, &ptr1,&len1,&ptr2,&len2,0); - ok(rc==DS_OK,"IDirectSoundBuffer_Lock() failed: %08x\n", rc); + ok(rc==DS_OK,"IDirectSoundBuffer_Lock() failed: %08lx\n", rc); if (rc!=DS_OK) return -1;
@@ -213,9 +213,9 @@ static int buffer_refill(play_state_t* state, DWORD size) state->offset=state->written % state->buffer_size; /* some apps blindly pass &ptr1 instead of ptr1 */ rc=IDirectSoundBuffer_Unlock(state->dsbo,&ptr1,len1,ptr2,len2); - ok(rc==DSERR_INVALIDPARAM, "IDDirectSoundBuffer_Unlock(): expected %08x got %08x, %p %p\n",DSERR_INVALIDPARAM, rc, &ptr1, ptr1); + ok(rc==DSERR_INVALIDPARAM, "IDDirectSoundBuffer_Unlock(): expected %08lx got %08lx, %p %p\n",DSERR_INVALIDPARAM, rc, &ptr1, ptr1); rc=IDirectSoundBuffer_Unlock(state->dsbo,ptr1,len1,ptr2,len2); - ok(rc==DS_OK,"IDirectSoundBuffer_Unlock() failed: %08x\n", rc); + ok(rc==DS_OK,"IDirectSoundBuffer_Unlock() failed: %08lx\n", rc); if (rc!=DS_OK) return -1; return size; @@ -230,7 +230,7 @@ static int buffer_silence(play_state_t* state, DWORD size)
rc=IDirectSoundBuffer_Lock(state->dsbo,state->offset,size, &ptr1,&len1,&ptr2,&len2,0); - ok(rc==DS_OK,"IDirectSoundBuffer_Lock() failed: %08x\n", rc); + ok(rc==DS_OK,"IDirectSoundBuffer_Lock() failed: %08lx\n", rc); if (rc!=DS_OK) return -1;
@@ -241,7 +241,7 @@ static int buffer_silence(play_state_t* state, DWORD size) } state->offset=(state->offset+size) % state->buffer_size; rc=IDirectSoundBuffer_Unlock(state->dsbo,ptr1,len1,ptr2,len2); - ok(rc==DS_OK,"IDirectSoundBuffer_Unlock() failed: %08x\n", rc); + ok(rc==DS_OK,"IDirectSoundBuffer_Unlock() failed: %08lx\n", rc); if (rc!=DS_OK) return -1; return size; @@ -253,7 +253,7 @@ static BOOL buffer_service(play_state_t* state) HRESULT rc;
rc=IDirectSoundBuffer_GetCurrentPosition(state->dsbo,&play_pos,NULL); - ok(rc==DS_OK,"IDirectSoundBuffer_GetCurrentPosition() failed: %08x\n", rc); + ok(rc==DS_OK,"IDirectSoundBuffer_GetCurrentPosition() failed: %08lx\n", rc); if (rc!=DS_OK) { goto STOP; } @@ -266,7 +266,7 @@ static BOOL buffer_service(play_state_t* state) state->played+=play_pos-last_play_pos;
if (winetest_debug > 1) - trace("buf size=%d last_play_pos=%d play_pos=%d played=%d / %d\n", + trace("buf size=%ld last_play_pos=%ld play_pos=%ld played=%ld / %ld\n", state->buffer_size,last_play_pos,play_pos,state->played, state->wave_len);
@@ -283,7 +283,7 @@ static BOOL buffer_service(play_state_t* state) buf_free=state->buffer_size-state->offset+play_pos;
if (winetest_debug > 1) - trace("offset=%d free=%d written=%d / %d\n", + trace("offset=%ld free=%ld written=%ld / %ld\n", state->offset,buf_free,state->written,state->wave_len); if (buf_free==0) return TRUE; @@ -295,14 +295,14 @@ static BOOL buffer_service(play_state_t* state) goto STOP; buf_free-=w; if (state->written==state->wave_len && winetest_debug > 1) - trace("last sound byte at %d\n", + trace("last sound byte at %ld\n", (state->written % state->buffer_size)); }
if (buf_free>0) { /* Fill with silence */ if (winetest_debug > 1) - trace("writing %d bytes of silence\n",buf_free); + trace("writing %ld bytes of silence\n",buf_free); if (buffer_silence(state,buf_free)==-1) goto STOP; } @@ -312,7 +312,7 @@ STOP: if (winetest_debug > 1) trace("stopping playback\n"); rc=IDirectSoundBuffer_Stop(state->dsbo); - ok(rc==DS_OK,"IDirectSoundBuffer_Stop() failed: %08x\n", rc); + ok(rc==DS_OK,"IDirectSoundBuffer_Stop() failed: %08lx\n", rc); return FALSE; }
@@ -333,7 +333,7 @@ void test_buffer(LPDIRECTSOUND dso, LPDIRECTSOUNDBUFFER *dsbo, if (set_frequency) { rc=IDirectSoundBuffer_SetFrequency(*dsbo,frequency); ok(rc==DS_OK||rc==DSERR_CONTROLUNAVAIL, - "IDirectSoundBuffer_SetFrequency() failed to set frequency %08x\n",rc); + "IDirectSoundBuffer_SetFrequency() failed to set frequency %08lx\n",rc); if (rc!=DS_OK) return; } @@ -341,20 +341,20 @@ void test_buffer(LPDIRECTSOUND dso, LPDIRECTSOUNDBUFFER *dsbo, /* DSOUND: Error: Invalid caps pointer */ rc=IDirectSoundBuffer_GetCaps(*dsbo,0); ok(rc==DSERR_INVALIDPARAM,"IDirectSoundBuffer_GetCaps() should have " - "returned DSERR_INVALIDPARAM, returned: %08x\n",rc); + "returned DSERR_INVALIDPARAM, returned: %08lx\n",rc);
ZeroMemory(&dsbcaps, sizeof(dsbcaps));
/* DSOUND: Error: Invalid caps pointer */ rc=IDirectSoundBuffer_GetCaps(*dsbo,&dsbcaps); ok(rc==DSERR_INVALIDPARAM,"IDirectSoundBuffer_GetCaps() should have " - "returned DSERR_INVALIDPARAM, returned: %08x\n",rc); + "returned DSERR_INVALIDPARAM, returned: %08lx\n",rc);
dsbcaps.dwSize=sizeof(dsbcaps); rc=IDirectSoundBuffer_GetCaps(*dsbo,&dsbcaps); - ok(rc==DS_OK,"IDirectSoundBuffer_GetCaps() failed: %08x\n", rc); + ok(rc==DS_OK,"IDirectSoundBuffer_GetCaps() failed: %08lx\n", rc); if (rc==DS_OK && winetest_debug > 1) { - trace(" Caps: flags=0x%08x size=%d\n",dsbcaps.dwFlags, + trace(" Caps: flags=0x%08lx size=%ld\n",dsbcaps.dwFlags, dsbcaps.dwBufferBytes); }
@@ -362,10 +362,10 @@ void test_buffer(LPDIRECTSOUND dso, LPDIRECTSOUNDBUFFER *dsbo, size=0; rc=IDirectSoundBuffer_GetFormat(*dsbo,NULL,0,&size); ok(rc==DS_OK && size!=0,"IDirectSoundBuffer_GetFormat() should have " - "returned the needed size: rc=%08x size=%d\n",rc,size); + "returned the needed size: rc=%08lx size=%ld\n",rc,size);
ok(size == sizeof(WAVEFORMATEX) || size == sizeof(WAVEFORMATEXTENSIBLE), - "Expected a correct structure size, got %d\n", size); + "Expected a correct structure size, got %ld\n", size);
if (size == sizeof(WAVEFORMATEX)) { rc=IDirectSoundBuffer_GetFormat(*dsbo,&wfx,size,NULL); @@ -380,9 +380,9 @@ void test_buffer(LPDIRECTSOUND dso, LPDIRECTSOUNDBUFFER *dsbo, return;
ok(rc==DS_OK, - "IDirectSoundBuffer_GetFormat() failed: %08x\n", rc); + "IDirectSoundBuffer_GetFormat() failed: %08lx\n", rc); if (rc==DS_OK && winetest_debug > 1) { - trace(" Format: %s tag=0x%04x %dx%dx%d avg.B/s=%d align=%d\n", + trace(" Format: %s tag=0x%04x %ldx%dx%d avg.B/s=%ld align=%d\n", is_primary ? "Primary" : "Secondary", wfx.wFormatTag,wfx.nSamplesPerSec,wfx.wBitsPerSample, wfx.nChannels,wfx.nAvgBytesPerSec,wfx.nBlockAlign); @@ -391,45 +391,45 @@ void test_buffer(LPDIRECTSOUND dso, LPDIRECTSOUNDBUFFER *dsbo, /* DSOUND: Error: Invalid frequency buffer */ rc=IDirectSoundBuffer_GetFrequency(*dsbo,0); ok(rc==DSERR_INVALIDPARAM,"IDirectSoundBuffer_GetFrequency() should have " - "returned DSERR_INVALIDPARAM, returned: %08x\n",rc); + "returned DSERR_INVALIDPARAM, returned: %08lx\n",rc);
/* DSOUND: Error: Primary buffers don't support CTRLFREQUENCY */ rc=IDirectSoundBuffer_GetFrequency(*dsbo,&freq); ok((rc==DS_OK && !is_primary) || (rc==DSERR_CONTROLUNAVAIL&&is_primary) || (rc==DSERR_CONTROLUNAVAIL&&!(dsbcaps.dwFlags&DSBCAPS_CTRLFREQUENCY)), - "IDirectSoundBuffer_GetFrequency() failed: %08x\n",rc); + "IDirectSoundBuffer_GetFrequency() failed: %08lx\n",rc); if (rc==DS_OK) { DWORD f = set_frequency?frequency:wfx.nSamplesPerSec; ok(freq==f,"The frequency returned by GetFrequency " - "%d does not match the format %d\n",freq,f); + "%ld does not match the format %ld\n",freq,f); }
/* DSOUND: Error: Invalid status pointer */ rc=IDirectSoundBuffer_GetStatus(*dsbo,0); ok(rc==DSERR_INVALIDPARAM,"IDirectSoundBuffer_GetStatus() should have " - "returned DSERR_INVALIDPARAM, returned: %08x\n",rc); + "returned DSERR_INVALIDPARAM, returned: %08lx\n",rc);
rc=IDirectSoundBuffer_GetStatus(*dsbo,&status); - ok(rc==DS_OK,"IDirectSoundBuffer_GetStatus() failed: %08x\n", rc); - ok(status==0,"status=0x%x instead of 0\n",status); + ok(rc==DS_OK,"IDirectSoundBuffer_GetStatus() failed: %08lx\n", rc); + ok(status==0,"status=0x%lx instead of 0\n",status);
if (is_primary) { DSBCAPS new_dsbcaps; /* We must call SetCooperativeLevel to be allowed to call SetFormat */ /* DSOUND: Setting DirectSound cooperative level to DSSCL_PRIORITY */ rc=IDirectSound_SetCooperativeLevel(dso,get_hwnd(),DSSCL_PRIORITY); - ok(rc==DS_OK,"IDirectSound_SetCooperativeLevel(DSSCL_PRIORITY) failed: %08x\n",rc); + ok(rc==DS_OK,"IDirectSound_SetCooperativeLevel(DSSCL_PRIORITY) failed: %08lx\n",rc); if (rc!=DS_OK) return;
/* DSOUND: Error: Invalid format pointer */ rc=IDirectSoundBuffer_SetFormat(*dsbo,0); ok(rc==DSERR_INVALIDPARAM,"IDirectSoundBuffer_SetFormat() should have " - "returned DSERR_INVALIDPARAM, returned: %08x\n",rc); + "returned DSERR_INVALIDPARAM, returned: %08lx\n",rc);
init_format(&wfx2,WAVE_FORMAT_PCM,11025,16,2); rc=IDirectSoundBuffer_SetFormat(*dsbo,&wfx2); - ok(rc==DS_OK,"IDirectSoundBuffer_SetFormat(%s) failed: %08x\n", + ok(rc==DS_OK,"IDirectSoundBuffer_SetFormat(%s) failed: %08lx\n", format_string(&wfx2), rc);
/* There is no guarantee that SetFormat will actually change the @@ -437,16 +437,16 @@ void test_buffer(LPDIRECTSOUND dso, LPDIRECTSOUNDBUFFER *dsbo, * supports. So we must re-query the format. */ rc=IDirectSoundBuffer_GetFormat(*dsbo,&wfx,sizeof(wfx),NULL); - ok(rc==DS_OK,"IDirectSoundBuffer_GetFormat() failed: %08x\n", rc); + ok(rc==DS_OK,"IDirectSoundBuffer_GetFormat() failed: %08lx\n", rc); if (rc==DS_OK && (wfx.wFormatTag!=wfx2.wFormatTag || wfx.nSamplesPerSec!=wfx2.nSamplesPerSec || wfx.wBitsPerSample!=wfx2.wBitsPerSample || wfx.nChannels!=wfx2.nChannels)) { - trace("Requested format tag=0x%04x %dx%dx%d avg.B/s=%d align=%d\n", + trace("Requested format tag=0x%04x %ldx%dx%d avg.B/s=%ld align=%d\n", wfx2.wFormatTag,wfx2.nSamplesPerSec,wfx2.wBitsPerSample, wfx2.nChannels,wfx2.nAvgBytesPerSec,wfx2.nBlockAlign); - trace("Got tag=0x%04x %dx%dx%d avg.B/s=%d align=%d\n", + trace("Got tag=0x%04x %ldx%dx%d avg.B/s=%ld align=%d\n", wfx.wFormatTag,wfx.nSamplesPerSec,wfx.wBitsPerSample, wfx.nChannels,wfx.nAvgBytesPerSec,wfx.nBlockAlign); } @@ -454,29 +454,29 @@ void test_buffer(LPDIRECTSOUND dso, LPDIRECTSOUNDBUFFER *dsbo, ZeroMemory(&new_dsbcaps, sizeof(new_dsbcaps)); new_dsbcaps.dwSize = sizeof(new_dsbcaps); rc=IDirectSoundBuffer_GetCaps(*dsbo,&new_dsbcaps); - ok(rc==DS_OK,"IDirectSoundBuffer_GetCaps() failed: %08x\n", rc); + ok(rc==DS_OK,"IDirectSoundBuffer_GetCaps() failed: %08lx\n", rc); if (rc==DS_OK && winetest_debug > 1) { - trace(" new Caps: flags=0x%08x size=%d\n",new_dsbcaps.dwFlags, + trace(" new Caps: flags=0x%08lx size=%ld\n",new_dsbcaps.dwFlags, new_dsbcaps.dwBufferBytes); }
/* Check for primary buffer size change */ ok(new_dsbcaps.dwBufferBytes == dsbcaps.dwBufferBytes, " buffer size changed after SetFormat() - " - "previous size was %u, current size is %u\n", + "previous size was %lu, current size is %lu\n", dsbcaps.dwBufferBytes, new_dsbcaps.dwBufferBytes); dsbcaps.dwBufferBytes = new_dsbcaps.dwBufferBytes;
/* Check for primary buffer flags change */ ok(new_dsbcaps.dwFlags == dsbcaps.dwFlags, " flags changed after SetFormat() - " - "previous flags were %08x, current flags are %08x\n", + "previous flags were %08lx, current flags are %08lx\n", dsbcaps.dwFlags, new_dsbcaps.dwFlags);
/* Set the CooperativeLevel back to normal */ /* DSOUND: Setting DirectSound cooperative level to DSSCL_NORMAL */ rc=IDirectSound_SetCooperativeLevel(dso,get_hwnd(),DSSCL_NORMAL); - ok(rc==DS_OK,"IDirectSound_SetCooperativeLevel(DSSCL_NORMAL) failed: %08x\n",rc); + ok(rc==DS_OK,"IDirectSound_SetCooperativeLevel(DSSCL_NORMAL) failed: %08lx\n",rc); }
if (play) { @@ -490,12 +490,12 @@ void test_buffer(LPDIRECTSOUND dso, LPDIRECTSOUNDBUFFER *dsbo,
if (winetest_interactive) { if (set_frequency) - trace(" Playing %g second 440Hz tone at %dx%dx%d with a " - "frequency of %d (%dHz)\n", duration, + trace(" Playing %g second 440Hz tone at %ldx%dx%d with a " + "frequency of %ld (%ldHz)\n", duration, wfx.nSamplesPerSec, wfx.wBitsPerSample, wfx.nChannels, frequency, (440 * frequency) / wfx.nSamplesPerSec); else - trace(" Playing %g second 440Hz tone at %dx%dx%d\n", duration, + trace(" Playing %g second 440Hz tone at %ldx%dx%d\n", duration, wfx.nSamplesPerSec, wfx.wBitsPerSample, wfx.nChannels); }
@@ -506,7 +506,7 @@ void test_buffer(LPDIRECTSOUND dso, LPDIRECTSOUNDBUFFER *dsbo, rc=IDirectSound_SetCooperativeLevel(dso,get_hwnd(), DSSCL_WRITEPRIMARY); ok(rc==DS_OK,"IDirectSound_SetCooperativeLevel(DSSCL_WRITEPRIMARY) " - "failed: %08x\n",rc); + "failed: %08lx\n",rc); if (rc!=DS_OK) return; } @@ -515,7 +515,7 @@ void test_buffer(LPDIRECTSOUND dso, LPDIRECTSOUNDBUFFER *dsbo,
rc=IDirectSoundBuffer_QueryInterface(*dsbo,&IID_IDirectSound3DBuffer, (LPVOID *)&buffer); - ok(rc==DS_OK,"IDirectSoundBuffer_QueryInterface() failed: %08x\n", rc); + ok(rc==DS_OK,"IDirectSoundBuffer_QueryInterface() failed: %08lx\n", rc); if (rc!=DS_OK) return;
@@ -523,7 +523,7 @@ void test_buffer(LPDIRECTSOUND dso, LPDIRECTSOUNDBUFFER *dsbo, rc=IDirectSoundBuffer_QueryInterface(*dsbo, &IID_IDirectSoundBuffer, (LPVOID *)&temp_buffer); ok(rc==DS_OK && temp_buffer!=NULL, - "IDirectSoundBuffer_QueryInterface() failed: %08x\n", rc); + "IDirectSoundBuffer_QueryInterface() failed: %08lx\n", rc); ok(temp_buffer==*dsbo,"COM interface broken: %p != %p\n", temp_buffer,*dsbo); ref=IDirectSoundBuffer_Release(temp_buffer); @@ -538,37 +538,37 @@ void test_buffer(LPDIRECTSOUND dso, LPDIRECTSOUNDBUFFER *dsbo, &IID_IDirectSoundBuffer, (LPVOID *)dsbo); ok(rc==DS_OK && *dsbo!=NULL,"IDirectSound3DBuffer_QueryInterface() " - "failed: %08x\n",rc); + "failed: %08lx\n",rc);
/* DSOUND: Error: Invalid buffer */ rc=IDirectSound3DBuffer_GetAllParameters(buffer,0); ok(rc==DSERR_INVALIDPARAM,"IDirectSound3DBuffer_GetAllParameters() " - "failed: %08x\n",rc); + "failed: %08lx\n",rc);
ZeroMemory(&buffer_param, sizeof(buffer_param));
/* DSOUND: Error: Invalid buffer */ rc=IDirectSound3DBuffer_GetAllParameters(buffer,&buffer_param); ok(rc==DSERR_INVALIDPARAM,"IDirectSound3DBuffer_GetAllParameters() " - "failed: %08x\n",rc); + "failed: %08lx\n",rc);
buffer_param.dwSize=sizeof(buffer_param); rc=IDirectSound3DBuffer_GetAllParameters(buffer,&buffer_param); - ok(rc==DS_OK,"IDirectSound3DBuffer_GetAllParameters() failed: %08x\n", rc); + ok(rc==DS_OK,"IDirectSound3DBuffer_GetAllParameters() failed: %08lx\n", rc); } if (set_volume) { if (dsbcaps.dwFlags & DSBCAPS_CTRLVOLUME) { LONG val; rc=IDirectSoundBuffer_GetVolume(*dsbo,&val); - ok(rc==DS_OK,"IDirectSoundBuffer_GetVolume() failed: %08x\n", rc); + ok(rc==DS_OK,"IDirectSoundBuffer_GetVolume() failed: %08lx\n", rc);
rc=IDirectSoundBuffer_SetVolume(*dsbo,volume); - ok(rc==DS_OK,"IDirectSoundBuffer_SetVolume() failed: %08x\n", rc); + ok(rc==DS_OK,"IDirectSoundBuffer_SetVolume() failed: %08lx\n", rc); } else { /* DSOUND: Error: Buffer does not have CTRLVOLUME */ rc=IDirectSoundBuffer_GetVolume(*dsbo,&volume); ok(rc==DSERR_CONTROLUNAVAIL,"IDirectSoundBuffer_GetVolume() " - "should have returned DSERR_CONTROLUNAVAIL, returned: %08x\n", rc); + "should have returned DSERR_CONTROLUNAVAIL, returned: %08lx\n", rc); } }
@@ -576,15 +576,15 @@ void test_buffer(LPDIRECTSOUND dso, LPDIRECTSOUNDBUFFER *dsbo, if (dsbcaps.dwFlags & DSBCAPS_CTRLPAN) { LONG val; rc=IDirectSoundBuffer_GetPan(*dsbo,&val); - ok(rc==DS_OK,"IDirectSoundBuffer_GetPan() failed: %08x\n", rc); + ok(rc==DS_OK,"IDirectSoundBuffer_GetPan() failed: %08lx\n", rc);
rc=IDirectSoundBuffer_SetPan(*dsbo,pan); - ok(rc==DS_OK,"IDirectSoundBuffer_SetPan() failed: %08x\n", rc); + ok(rc==DS_OK,"IDirectSoundBuffer_SetPan() failed: %08lx\n", rc); } else { /* DSOUND: Error: Buffer does not have CTRLPAN */ rc=IDirectSoundBuffer_GetPan(*dsbo,&pan); ok(rc==DSERR_CONTROLUNAVAIL,"IDirectSoundBuffer_GetPan() " - "should have returned DSERR_CONTROLUNAVAIL, returned: %08x\n", rc); + "should have returned DSERR_CONTROLUNAVAIL, returned: %08lx\n", rc); } }
@@ -593,14 +593,14 @@ void test_buffer(LPDIRECTSOUND dso, LPDIRECTSOUNDBUFFER *dsbo, &length1, NULL, NULL, DSBLOCK_ENTIREBUFFER); ok(rc==DSERR_INVALIDPARAM, "IDirectSoundBuffer_Lock() should have " - "returned DSERR_INVALIDPARAM, returned %08x\n", rc); + "returned DSERR_INVALIDPARAM, returned %08lx\n", rc);
/* try a size larger than the buffer */ rc = IDirectSoundBuffer_Lock(*dsbo, 0, dsbcaps.dwBufferBytes + 1, &buffer1, &length1, NULL, NULL, DSBLOCK_FROMWRITECURSOR); ok(rc==DSERR_INVALIDPARAM, "IDirectSoundBuffer_Lock() should have " - "returned DSERR_INVALIDPARAM, returned %08x\n", rc); + "returned DSERR_INVALIDPARAM, returned %08lx\n", rc);
if (set_frequency) state.wave=wave_generate_la(&wfx,(duration*frequency)/wfx.nSamplesPerSec,&state.wave_len,ieee); @@ -614,12 +614,12 @@ void test_buffer(LPDIRECTSOUND dso, LPDIRECTSOUNDBUFFER *dsbo, buffer_refill(&state,state.buffer_size);
rc=IDirectSoundBuffer_Play(*dsbo,0,0,DSBPLAY_LOOPING); - ok(rc==DS_OK,"IDirectSoundBuffer_Play() failed: %08x\n", rc); + ok(rc==DS_OK,"IDirectSoundBuffer_Play() failed: %08lx\n", rc);
rc=IDirectSoundBuffer_GetStatus(*dsbo,&status); - ok(rc==DS_OK,"IDirectSoundBuffer_GetStatus() failed: %08x\n", rc); + ok(rc==DS_OK,"IDirectSoundBuffer_GetStatus() failed: %08lx\n", rc); ok(status==(DSBSTATUS_PLAYING|DSBSTATUS_LOOPING), - "GetStatus: bad status: %x\n",status); + "GetStatus: bad status: %lx\n",status);
if (listener) { ZeroMemory(&listener_param,sizeof(listener_param)); @@ -627,7 +627,7 @@ void test_buffer(LPDIRECTSOUND dso, LPDIRECTSOUNDBUFFER *dsbo, rc=IDirectSound3DListener_GetAllParameters(listener, &listener_param); ok(rc==DS_OK,"IDirectSound3dListener_GetAllParameters() " - "failed: %08x\n",rc); + "failed: %08lx\n",rc); if (move_listener) { listener_param.vPosition.x = -5.0f; listener_param.vVelocity.x = (float)(10.0/duration); @@ -635,7 +635,7 @@ void test_buffer(LPDIRECTSOUND dso, LPDIRECTSOUNDBUFFER *dsbo, rc=IDirectSound3DListener_SetAllParameters(listener, &listener_param, DS3D_IMMEDIATE); - ok(rc==DS_OK,"IDirectSound3dListener_SetPosition() failed: %08x\n", rc); + ok(rc==DS_OK,"IDirectSound3dListener_SetPosition() failed: %08lx\n", rc); } if (buffer3d) { if (move_sound) { @@ -645,7 +645,7 @@ void test_buffer(LPDIRECTSOUND dso, LPDIRECTSOUNDBUFFER *dsbo, buffer_param.flMinDistance = 10; rc=IDirectSound3DBuffer_SetAllParameters(buffer,&buffer_param, DS3D_IMMEDIATE); - ok(rc==DS_OK,"IDirectSound3dBuffer_SetPosition() failed: %08x\n", rc); + ok(rc==DS_OK,"IDirectSound3dBuffer_SetPosition() failed: %08lx\n", rc); }
start_time=GetTickCount(); @@ -659,7 +659,7 @@ void test_buffer(LPDIRECTSOUND dso, LPDIRECTSOUNDBUFFER *dsbo, rc=IDirectSound3DListener_SetPosition(listener, listener_param.vPosition.x,listener_param.vPosition.y, listener_param.vPosition.z,DS3D_IMMEDIATE); - ok(rc==DS_OK,"IDirectSound3dListener_SetPosition() failed: %08x\n",rc); + ok(rc==DS_OK,"IDirectSound3dListener_SetPosition() failed: %08lx\n",rc); } if (buffer3d && move_sound) { buffer_param.vPosition.x = (float)(100-200.0*(now-start_time)/1000/duration); @@ -668,13 +668,13 @@ void test_buffer(LPDIRECTSOUND dso, LPDIRECTSOUNDBUFFER *dsbo, rc=IDirectSound3DBuffer_SetPosition(buffer, buffer_param.vPosition.x,buffer_param.vPosition.y, buffer_param.vPosition.z,DS3D_IMMEDIATE); - ok(rc==DS_OK,"IDirectSound3dBuffer_SetPosition() failed: %08x\n", rc); + ok(rc==DS_OK,"IDirectSound3dBuffer_SetPosition() failed: %08lx\n", rc); } } /* Check the sound duration was within 10% of the expected value */ now=GetTickCount(); ok(fabs(1000*duration-now+start_time)<=100*duration, - "The sound played for %d ms instead of %g ms\n", + "The sound played for %ld ms instead of %g ms\n", now-start_time,1000*duration);
HeapFree(GetProcessHeap(), 0, state.wave); @@ -683,7 +683,7 @@ void test_buffer(LPDIRECTSOUND dso, LPDIRECTSOUNDBUFFER *dsbo, /* DSOUND: Setting DirectSound cooperative level to DSSCL_NORMAL */ rc=IDirectSound_SetCooperativeLevel(dso,get_hwnd(),DSSCL_NORMAL); ok(rc==DS_OK,"IDirectSound_SetCooperativeLevel(DSSCL_NORMAL) " - "failed: %08x\n",rc); + "failed: %08lx\n",rc); } if (buffer3d) { ref=IDirectSound3DBuffer_Release(buffer); @@ -708,14 +708,14 @@ static HRESULT test_secondary(LPGUID lpGuid, int play,
/* Create the DirectSound object */ rc = DirectSoundCreate(lpGuid, &dso, NULL); - ok(rc==DS_OK||rc==DSERR_NODRIVER,"DirectSoundCreate() failed: %08x\n", rc); + ok(rc==DS_OK||rc==DSERR_NODRIVER,"DirectSoundCreate() failed: %08lx\n", rc); if (rc!=DS_OK) return rc;
/* We must call SetCooperativeLevel before creating primary buffer */ /* DSOUND: Setting DirectSound cooperative level to DSSCL_PRIORITY */ rc=IDirectSound_SetCooperativeLevel(dso,get_hwnd(),DSSCL_PRIORITY); - ok(rc==DS_OK,"IDirectSound_SetCooperativeLevel(DSSCL_PRIORITY) failed: %08x\n",rc); + ok(rc==DS_OK,"IDirectSound_SetCooperativeLevel(DSSCL_PRIORITY) failed: %08lx\n",rc); if (rc!=DS_OK) goto EXIT;
@@ -728,12 +728,12 @@ static HRESULT test_secondary(LPGUID lpGuid, int play, bufdesc.dwFlags|=(DSBCAPS_CTRLVOLUME|DSBCAPS_CTRLPAN); rc=IDirectSound_CreateSoundBuffer(dso,&bufdesc,&primary,NULL); ok((rc==DS_OK && primary!=NULL) || (rc==DSERR_CONTROLUNAVAIL), - "IDirectSound_CreateSoundBuffer() failed to create a %sprimary buffer: %08x\n",has_3d?"3D ":"", rc); + "IDirectSound_CreateSoundBuffer() failed to create a %sprimary buffer: %08lx\n",has_3d?"3D ":"", rc); if (rc==DSERR_CONTROLUNAVAIL) trace(" No Primary\n"); else if (rc==DS_OK && primary!=NULL) { rc=IDirectSoundBuffer_GetFormat(primary,&wfx1,sizeof(wfx1),NULL); - ok(rc==DS_OK,"IDirectSoundBuffer8_Getformat() failed: %08x\n", rc); + ok(rc==DS_OK,"IDirectSoundBuffer8_Getformat() failed: %08lx\n", rc); if (rc!=DS_OK) goto EXIT1;
@@ -742,7 +742,7 @@ static HRESULT test_secondary(LPGUID lpGuid, int play, &IID_IDirectSound3DListener, (void **)&listener); ok(rc==DS_OK && listener!=NULL, - "IDirectSoundBuffer_QueryInterface() failed to get a 3D listener: %08x\n",rc); + "IDirectSoundBuffer_QueryInterface() failed to get a 3D listener: %08lx\n",rc); ref=IDirectSoundBuffer_Release(primary); ok(ref==0,"IDirectSoundBuffer_Release() primary has %d references, " "should have 0\n",ref); @@ -753,20 +753,20 @@ static HRESULT test_secondary(LPGUID lpGuid, int play, rc=IDirectSound3DListener_GetAllParameters(listener,0); ok(rc==DSERR_INVALIDPARAM, "IDirectSound3dListener_GetAllParameters() should have " - "returned DSERR_INVALIDPARAM, returned: %08x\n", rc); + "returned DSERR_INVALIDPARAM, returned: %08lx\n", rc);
/* DSOUND: Error: Invalid buffer */ rc=IDirectSound3DListener_GetAllParameters(listener, &listener_param); ok(rc==DSERR_INVALIDPARAM, "IDirectSound3dListener_GetAllParameters() should have " - "returned DSERR_INVALIDPARAM, returned: %08x\n", rc); + "returned DSERR_INVALIDPARAM, returned: %08lx\n", rc);
listener_param.dwSize=sizeof(listener_param); rc=IDirectSound3DListener_GetAllParameters(listener, &listener_param); ok(rc==DS_OK,"IDirectSound3dListener_GetAllParameters() " - "failed: %08x\n",rc); + "failed: %08lx\n",rc); } else { ok(listener==NULL, "IDirectSoundBuffer_QueryInterface() " "failed but returned a listener anyway\n"); @@ -793,8 +793,8 @@ static HRESULT test_secondary(LPGUID lpGuid, int play, wfx.nBlockAlign); bufdesc.lpwfxFormat=&wfx; if (winetest_interactive) { - trace(" Testing a %s%ssecondary buffer %s%s%s%sat %dx%dx%d " - "with a primary buffer at %dx%dx%d\n", + trace(" Testing a %s%ssecondary buffer %s%s%s%sat %ldx%dx%d " + "with a primary buffer at %ldx%dx%d\n", has_3dbuffer?"3D ":"", has_duplicate?"duplicated ":"", listener!=NULL||move_sound?"with ":"", @@ -807,7 +807,7 @@ static HRESULT test_secondary(LPGUID lpGuid, int play, } rc=IDirectSound_CreateSoundBuffer(dso,&bufdesc,&secondary,NULL); ok((rc==DS_OK && secondary!=NULL) || broken(rc == DSERR_CONTROLUNAVAIL), /* vmware drivers on w2k */ - "IDirectSound_CreateSoundBuffer() failed to create a %s%ssecondary buffer %s%s%s%sat %dx%dx%d (%s): %08x\n", + "IDirectSound_CreateSoundBuffer() failed to create a %s%ssecondary buffer %s%s%s%sat %ldx%dx%d (%s): %08lx\n", has_3dbuffer?"3D ":"", has_duplicate?"duplicated ":"", listener!=NULL||move_sound?"with ":"", move_listener?"moving ":"", listener!=NULL?"listener ":"", @@ -820,7 +820,7 @@ static HRESULT test_secondary(LPGUID lpGuid, int play,
rc=IDirectSoundBuffer_QueryInterface(secondary, &IID_IDirectSound3DBuffer, (void**)&ds3d); ok((has_3dbuffer && rc==DS_OK) || (!has_3dbuffer && rc==E_NOINTERFACE), - "Wrong return trying to get 3D buffer on %s3D secondary interface: %08x\n", has_3dbuffer ? "" : "non-", rc); + "Wrong return trying to get 3D buffer on %s3D secondary interface: %08lx\n", has_3dbuffer ? "" : "non-", rc); if(rc==DS_OK) IDirectSound3DBuffer_Release(ds3d);
@@ -829,53 +829,53 @@ static HRESULT test_secondary(LPGUID lpGuid, int play,
/* Check the initial secondary buffer's volume and pan */ rc=IDirectSoundBuffer_GetVolume(secondary,&vol); - ok(rc==DS_OK,"IDirectSoundBuffer_GetVolume(secondary) failed: %08x\n",rc); - ok(vol==0,"wrong volume for a new secondary buffer: %d\n",vol); + ok(rc==DS_OK,"IDirectSoundBuffer_GetVolume(secondary) failed: %08lx\n",rc); + ok(vol==0,"wrong volume for a new secondary buffer: %ld\n",vol); rc=IDirectSoundBuffer_GetPan(secondary,&pan); - ok(rc==DS_OK,"IDirectSoundBuffer_GetPan(secondary) failed: %08x\n",rc); - ok(pan==0,"wrong pan for a new secondary buffer: %d\n",pan); + ok(rc==DS_OK,"IDirectSoundBuffer_GetPan(secondary) failed: %08lx\n",rc); + ok(pan==0,"wrong pan for a new secondary buffer: %ld\n",pan);
/* Check that changing the secondary buffer's volume and pan * does not impact the primary buffer's volume and pan */ rc=IDirectSoundBuffer_GetVolume(primary,&refvol); - ok(rc==DS_OK,"IDirectSoundBuffer_GetVolume(primary) failed: %08x\n",rc); + ok(rc==DS_OK,"IDirectSoundBuffer_GetVolume(primary) failed: %08lx\n",rc); rc=IDirectSoundBuffer_GetPan(primary,&refpan); - ok(rc==DS_OK,"IDirectSoundBuffer_GetPan(primary) failed: %08x\n", rc); + ok(rc==DS_OK,"IDirectSoundBuffer_GetPan(primary) failed: %08lx\n", rc);
rc=IDirectSoundBuffer_SetVolume(secondary,-1000); - ok(rc==DS_OK,"IDirectSoundBuffer_SetVolume(secondary) failed: %08x\n",rc); + ok(rc==DS_OK,"IDirectSoundBuffer_SetVolume(secondary) failed: %08lx\n",rc); rc=IDirectSoundBuffer_GetVolume(secondary,&vol); - ok(rc==DS_OK,"IDirectSoundBuffer_SetVolume(secondary) failed: %08x\n",rc); - ok(vol==-1000,"secondary: wrong volume %d instead of -1000\n", + ok(rc==DS_OK,"IDirectSoundBuffer_SetVolume(secondary) failed: %08lx\n",rc); + ok(vol==-1000,"secondary: wrong volume %ld instead of -1000\n", vol); rc=IDirectSoundBuffer_SetPan(secondary,-1000); - ok(rc==DS_OK,"IDirectSoundBuffer_SetPan(secondary) failed: %08x\n",rc); + ok(rc==DS_OK,"IDirectSoundBuffer_SetPan(secondary) failed: %08lx\n",rc); rc=IDirectSoundBuffer_GetPan(secondary,&pan); - ok(rc==DS_OK,"IDirectSoundBuffer_SetPan(secondary) failed: %08x\n",rc); - ok(pan==-1000,"secondary: wrong pan %d instead of -1000\n", + ok(rc==DS_OK,"IDirectSoundBuffer_SetPan(secondary) failed: %08lx\n",rc); + ok(pan==-1000,"secondary: wrong pan %ld instead of -1000\n", pan);
rc=IDirectSoundBuffer_GetVolume(primary,&vol); - ok(rc==DS_OK,"IDirectSoundBuffer_GetVolume(primary) failed: %08x\n",rc); - ok(vol==refvol,"The primary volume changed from %d to %d\n", + ok(rc==DS_OK,"IDirectSoundBuffer_GetVolume(primary) failed: %08lx\n",rc); + ok(vol==refvol,"The primary volume changed from %ld to %ld\n", refvol,vol); rc=IDirectSoundBuffer_GetPan(primary,&pan); - ok(rc==DS_OK,"IDirectSoundBuffer_GetPan(primary) failed: %08x\n", rc); - ok(pan==refpan,"The primary pan changed from %d to %d\n", + ok(rc==DS_OK,"IDirectSoundBuffer_GetPan(primary) failed: %08lx\n", rc); + ok(pan==refpan,"The primary pan changed from %ld to %ld\n", refpan,pan);
rc=IDirectSoundBuffer_SetVolume(secondary,0); - ok(rc==DS_OK,"IDirectSoundBuffer_SetVolume(secondary) failed: %08x\n",rc); + ok(rc==DS_OK,"IDirectSoundBuffer_SetVolume(secondary) failed: %08lx\n",rc); rc=IDirectSoundBuffer_SetPan(secondary,0); - ok(rc==DS_OK,"IDirectSoundBuffer_SetPan(secondary) failed: %08x\n",rc); + ok(rc==DS_OK,"IDirectSoundBuffer_SetPan(secondary) failed: %08lx\n",rc); } else if (has_3dbuffer) { LONG pan;
rc=IDirectSoundBuffer_GetPan(secondary,&pan); - ok(rc==DS_OK,"IDirectSoundBuffer_GetPan() failed, returned: %08x\n", rc); + ok(rc==DS_OK,"IDirectSoundBuffer_GetPan() failed, returned: %08lx\n", rc); rc=IDirectSoundBuffer_SetPan(secondary,0); - ok(rc==DS_OK,"IDirectSoundBuffer_SetPan() failed, returned: %08x\n", rc); + ok(rc==DS_OK,"IDirectSoundBuffer_SetPan() failed, returned: %08lx\n", rc); }
if (has_duplicate) { @@ -885,26 +885,26 @@ static HRESULT test_secondary(LPGUID lpGuid, int play, rc=IDirectSound_DuplicateSoundBuffer(dso,0,0); ok(rc==DSERR_INVALIDPARAM, "IDirectSound_DuplicateSoundBuffer() should have returned " - "DSERR_INVALIDPARAM, returned: %08x\n",rc); + "DSERR_INVALIDPARAM, returned: %08lx\n",rc);
/* DSOUND: Error: Invalid dest buffer */ rc=IDirectSound_DuplicateSoundBuffer(dso,secondary,0); ok(rc==DSERR_INVALIDPARAM, "IDirectSound_DuplicateSoundBuffer() should have returned " - "DSERR_INVALIDPARAM, returned: %08x\n",rc); + "DSERR_INVALIDPARAM, returned: %08lx\n",rc);
/* DSOUND: Error: Invalid source buffer */ rc=IDirectSound_DuplicateSoundBuffer(dso,0,&duplicated); ok(rc==DSERR_INVALIDPARAM, "IDirectSound_DuplicateSoundBuffer() should have returned " - "DSERR_INVALIDPARAM, returned: %08x\n",rc); + "DSERR_INVALIDPARAM, returned: %08lx\n",rc);
duplicated=NULL; rc=IDirectSound_DuplicateSoundBuffer(dso,secondary, &duplicated); ok(rc==DS_OK && duplicated!=NULL, "IDirectSound_DuplicateSoundBuffer() failed to duplicate " - "a secondary buffer: %08x\n",rc); + "a secondary buffer: %08lx\n",rc);
if (rc==DS_OK && duplicated!=NULL) { ref=IDirectSoundBuffer_Release(secondary); @@ -951,7 +951,7 @@ EXIT2: /* Set the CooperativeLevel back to normal */ /* DSOUND: Setting DirectSound cooperative level to DSSCL_NORMAL */ rc=IDirectSound_SetCooperativeLevel(dso,get_hwnd(),DSSCL_NORMAL); - ok(rc==DS_OK,"IDirectSound_SetCooperativeLevel(DSSCL_NORMAL) failed: %08x\n", rc); + ok(rc==DS_OK,"IDirectSound_SetCooperativeLevel(DSSCL_NORMAL) failed: %08lx\n", rc);
EXIT: ref=IDirectSound_Release(dso); @@ -971,7 +971,7 @@ static HRESULT test_for_driver(LPGUID lpGuid) /* Create the DirectSound object */ rc = DirectSoundCreate(lpGuid, &dso, NULL); ok(rc==DS_OK||rc==DSERR_NODRIVER||rc==DSERR_ALLOCATED||rc==E_FAIL, - "DirectSoundCreate() failed: %08x\n",rc); + "DirectSoundCreate() failed: %08lx\n",rc); if (rc!=DS_OK) return rc;
@@ -994,7 +994,7 @@ static HRESULT test_primary(LPGUID lpGuid)
/* Create the DirectSound object */ rc = DirectSoundCreate(lpGuid, &dso, NULL); - ok(rc==DS_OK||rc==DSERR_NODRIVER,"DirectSoundCreate() failed: %08x\n", rc); + ok(rc==DS_OK||rc==DSERR_NODRIVER,"DirectSoundCreate() failed: %08lx\n", rc); if (rc!=DS_OK) return rc;
@@ -1002,14 +1002,14 @@ static HRESULT test_primary(LPGUID lpGuid) ZeroMemory(&dscaps, sizeof(dscaps)); dscaps.dwSize=sizeof(dscaps); rc=IDirectSound_GetCaps(dso,&dscaps); - ok(rc==DS_OK,"IDirectSound_GetCaps() failed: %08x\n",rc); + ok(rc==DS_OK,"IDirectSound_GetCaps() failed: %08lx\n",rc); if (rc!=DS_OK) goto EXIT;
/* We must call SetCooperativeLevel before calling CreateSoundBuffer */ /* DSOUND: Setting DirectSound cooperative level to DSSCL_PRIORITY */ rc=IDirectSound_SetCooperativeLevel(dso,get_hwnd(),DSSCL_PRIORITY); - ok(rc==DS_OK,"IDirectSound_SetCooperativeLevel(DSSCL_PRIORITY) failed: %08x\n",rc); + ok(rc==DS_OK,"IDirectSound_SetCooperativeLevel(DSSCL_PRIORITY) failed: %08lx\n",rc); if (rc!=DS_OK) goto EXIT;
@@ -1020,7 +1020,7 @@ static HRESULT test_primary(LPGUID lpGuid) bufdesc.dwFlags=DSBCAPS_PRIMARYBUFFER|DSBCAPS_CTRLVOLUME|DSBCAPS_CTRLPAN; rc=IDirectSound_CreateSoundBuffer(dso,&bufdesc,&primary,NULL); ok((rc==DS_OK && primary!=NULL) || (rc==DSERR_CONTROLUNAVAIL), - "IDirectSound_CreateSoundBuffer() failed to create a primary buffer: %08x\n",rc); + "IDirectSound_CreateSoundBuffer() failed to create a primary buffer: %08lx\n",rc); if (rc==DSERR_CONTROLUNAVAIL) trace(" No Primary\n"); else if (rc==DS_OK && primary!=NULL) { @@ -1055,7 +1055,7 @@ static HRESULT test_primary(LPGUID lpGuid) /* Set the CooperativeLevel back to normal */ /* DSOUND: Setting DirectSound cooperative level to DSSCL_NORMAL */ rc=IDirectSound_SetCooperativeLevel(dso,get_hwnd(),DSSCL_NORMAL); - ok(rc==DS_OK,"IDirectSound_SetCooperativeLevel(DSSCL_NORMAL) failed: %08x\n", rc); + ok(rc==DS_OK,"IDirectSound_SetCooperativeLevel(DSSCL_NORMAL) failed: %08lx\n", rc);
EXIT: ref=IDirectSound_Release(dso); @@ -1077,7 +1077,7 @@ static HRESULT test_primary_3d(LPGUID lpGuid)
/* Create the DirectSound object */ rc = DirectSoundCreate(lpGuid, &dso, NULL); - ok(rc==DS_OK||rc==DSERR_NODRIVER,"DirectSoundCreate() failed: %08x\n", rc); + ok(rc==DS_OK||rc==DSERR_NODRIVER,"DirectSoundCreate() failed: %08lx\n", rc); if (rc!=DS_OK) return rc;
@@ -1085,14 +1085,14 @@ static HRESULT test_primary_3d(LPGUID lpGuid) ZeroMemory(&dscaps, sizeof(dscaps)); dscaps.dwSize=sizeof(dscaps); rc=IDirectSound_GetCaps(dso,&dscaps); - ok(rc==DS_OK,"IDirectSound_GetCaps() failed: %08x\n",rc); + ok(rc==DS_OK,"IDirectSound_GetCaps() failed: %08lx\n",rc); if (rc!=DS_OK) goto EXIT;
/* We must call SetCooperativeLevel before calling CreateSoundBuffer */ /* DSOUND: Setting DirectSound cooperative level to DSSCL_PRIORITY */ rc=IDirectSound_SetCooperativeLevel(dso,get_hwnd(),DSSCL_PRIORITY); - ok(rc==DS_OK,"IDirectSound_SetCooperativeLevel(DSSCL_PRIORITY) failed: %08x\n",rc); + ok(rc==DS_OK,"IDirectSound_SetCooperativeLevel(DSSCL_PRIORITY) failed: %08lx\n",rc); if (rc!=DS_OK) goto EXIT;
@@ -1102,7 +1102,7 @@ static HRESULT test_primary_3d(LPGUID lpGuid) bufdesc.dwFlags=DSBCAPS_PRIMARYBUFFER; rc=IDirectSound_CreateSoundBuffer(dso,&bufdesc,&primary,NULL); ok(rc==DS_OK && primary!=NULL,"IDirectSound_CreateSoundBuffer() failed " - "to create a primary buffer: %08x\n",rc); + "to create a primary buffer: %08lx\n",rc); if (rc==DS_OK && primary!=NULL) { ref=IDirectSoundBuffer_Release(primary); ok(ref==0,"IDirectSoundBuffer_Release() primary has %d references, " @@ -1113,7 +1113,7 @@ static HRESULT test_primary_3d(LPGUID lpGuid) bufdesc.dwFlags=DSBCAPS_PRIMARYBUFFER|DSBCAPS_CTRL3D; rc=IDirectSound_CreateSoundBuffer(dso,&bufdesc,&primary,NULL); ok(rc==DS_OK && primary!=NULL,"IDirectSound_CreateSoundBuffer() " - "failed to create a 3D primary buffer: %08x\n",rc); + "failed to create a 3D primary buffer: %08lx\n",rc); if (rc==DS_OK && primary!=NULL) { test_buffer(dso,&primary,1,FALSE,0,FALSE,0,winetest_interactive && !(dscaps.dwFlags & DSCAPS_EMULDRIVER),1.0,0,0,0,0, @@ -1126,7 +1126,7 @@ static HRESULT test_primary_3d(LPGUID lpGuid) /* Set the CooperativeLevel back to normal */ /* DSOUND: Setting DirectSound cooperative level to DSSCL_NORMAL */ rc=IDirectSound_SetCooperativeLevel(dso,get_hwnd(),DSSCL_NORMAL); - ok(rc==DS_OK,"IDirectSound_SetCooperativeLevel(DSSCL_NORMAL) failed: %08x\n", rc); + ok(rc==DS_OK,"IDirectSound_SetCooperativeLevel(DSSCL_NORMAL) failed: %08lx\n", rc);
EXIT: ref=IDirectSound_Release(dso); @@ -1148,7 +1148,7 @@ static HRESULT test_primary_3d_with_listener(LPGUID lpGuid)
/* Create the DirectSound object */ rc = DirectSoundCreate(lpGuid, &dso, NULL); - ok(rc==DS_OK||rc==DSERR_NODRIVER,"DirectSoundCreate() failed: %08x\n", rc); + ok(rc==DS_OK||rc==DSERR_NODRIVER,"DirectSoundCreate() failed: %08lx\n", rc); if (rc!=DS_OK) return rc;
@@ -1156,14 +1156,14 @@ static HRESULT test_primary_3d_with_listener(LPGUID lpGuid) ZeroMemory(&dscaps, sizeof(dscaps)); dscaps.dwSize=sizeof(dscaps); rc=IDirectSound_GetCaps(dso,&dscaps); - ok(rc==DS_OK,"IDirectSound_GetCaps() failed: %08x\n",rc); + ok(rc==DS_OK,"IDirectSound_GetCaps() failed: %08lx\n",rc); if (rc!=DS_OK) goto EXIT;
/* We must call SetCooperativeLevel before calling CreateSoundBuffer */ /* DSOUND: Setting DirectSound cooperative level to DSSCL_PRIORITY */ rc=IDirectSound_SetCooperativeLevel(dso,get_hwnd(),DSSCL_PRIORITY); - ok(rc==DS_OK,"IDirectSound_SetCooperativeLevel(DSSCL_PRIORITY) failed: %08x\n",rc); + ok(rc==DS_OK,"IDirectSound_SetCooperativeLevel(DSSCL_PRIORITY) failed: %08lx\n",rc); if (rc!=DS_OK) goto EXIT; primary=NULL; @@ -1172,7 +1172,7 @@ static HRESULT test_primary_3d_with_listener(LPGUID lpGuid) bufdesc.dwFlags=DSBCAPS_PRIMARYBUFFER|DSBCAPS_CTRL3D; rc=IDirectSound_CreateSoundBuffer(dso,&bufdesc,&primary,NULL); ok(rc==DS_OK && primary!=NULL,"IDirectSound_CreateSoundBuffer() failed " - "to create a 3D primary buffer: %08x\n",rc); + "to create a 3D primary buffer: %08lx\n",rc); if (rc==DS_OK && primary!=NULL) { LPDIRECTSOUND3DLISTENER listener=NULL; LPDIRECTSOUNDBUFFER temp_buffer=NULL; @@ -1181,13 +1181,13 @@ static HRESULT test_primary_3d_with_listener(LPGUID lpGuid) rc=IDirectSoundBuffer_QueryInterface(primary, &IID_IDirectSound3DListener,(void **)&listener); ok(rc==DS_OK && listener!=NULL,"IDirectSoundBuffer_QueryInterface() " - "failed to get a 3D listener: %08x\n",rc); + "failed to get a 3D listener: %08lx\n",rc); if (rc==DS_OK && listener!=NULL) { /* Checking the COM interface */ rc=IDirectSoundBuffer_QueryInterface(primary, &IID_IDirectSoundBuffer,(LPVOID *)&temp_buffer); ok(rc==DS_OK && temp_buffer!=NULL, - "IDirectSoundBuffer_QueryInterface() failed: %08x\n", rc); + "IDirectSoundBuffer_QueryInterface() failed: %08lx\n", rc); ok(temp_buffer==primary, "COM interface broken: %p != %p\n", temp_buffer,primary); @@ -1200,7 +1200,7 @@ static HRESULT test_primary_3d_with_listener(LPGUID lpGuid) rc=IDirectSound3DListener_QueryInterface(listener, &IID_IDirectSoundBuffer,(LPVOID *)&temp_buffer); ok(rc==DS_OK && temp_buffer!=NULL, - "IDirectSoundBuffer_QueryInterface() failed: %08x\n", rc); + "IDirectSoundBuffer_QueryInterface() failed: %08lx\n", rc); ok(temp_buffer==primary, "COM interface broken: %p != %p\n", temp_buffer,primary); @@ -1218,7 +1218,7 @@ static HRESULT test_primary_3d_with_listener(LPGUID lpGuid) rc = IDirectSound3DListener_QueryInterface(listener, &IID_IKsPropertySet, (void **)&propset); ok(rc == DS_OK && propset != NULL, - "IDirectSound3DListener_QueryInterface didn't handle IKsPropertySet: ret = %08x\n", rc); + "IDirectSound3DListener_QueryInterface didn't handle IKsPropertySet: ret = %08lx\n", rc); IKsPropertySet_Release(propset); }
@@ -1231,7 +1231,7 @@ static HRESULT test_primary_3d_with_listener(LPGUID lpGuid) propset = NULL; rc = IDirectSoundBuffer_QueryInterface(primary, &IID_IKsPropertySet, (void **)&propset); ok(rc == DS_OK && propset != NULL, - "IDirectSoundBuffer_QueryInterface didn't handle IKsPropertySet on primary buffer: ret = %08x\n", rc); + "IDirectSoundBuffer_QueryInterface didn't handle IKsPropertySet on primary buffer: ret = %08lx\n", rc); IKsPropertySet_Release(propset);
/* Testing the reference counting */ @@ -1302,7 +1302,7 @@ static void ds3d_tests(void) { HRESULT rc; rc = DirectSoundEnumerateA(dsenum_callback, NULL); - ok(rc==DS_OK,"DirectSoundEnumerateA() failed: %08x\n",rc); + ok(rc==DS_OK,"DirectSoundEnumerateA() failed: %08lx\n",rc); trace("tested %u DirectSound drivers\n", driver_count); }
diff --git a/dlls/dsound/tests/ds3d8.c b/dlls/dsound/tests/ds3d8.c index 465ba040a33..9c4a132b545 100644 --- a/dlls/dsound/tests/ds3d8.c +++ b/dlls/dsound/tests/ds3d8.c @@ -57,7 +57,7 @@ static int buffer_refill8(play_state_t* state, DWORD size)
rc=IDirectSoundBuffer_Lock(state->dsbo,state->offset,size, &ptr1,&len1,&ptr2,&len2,0); - ok(rc==DS_OK,"IDirectSoundBuffer_Lock() failed: %08x\n", rc); + ok(rc==DS_OK,"IDirectSoundBuffer_Lock() failed: %08lx\n", rc); if (rc!=DS_OK) return -1;
@@ -69,7 +69,7 @@ static int buffer_refill8(play_state_t* state, DWORD size) } state->offset=state->written % state->buffer_size; rc=IDirectSoundBuffer_Unlock(state->dsbo,ptr1,len1,ptr2,len2); - ok(rc==DS_OK,"IDirectSoundBuffer_Unlock() failed: %08x\n", rc); + ok(rc==DS_OK,"IDirectSoundBuffer_Unlock() failed: %08lx\n", rc); if (rc!=DS_OK) return -1; return size; @@ -84,7 +84,7 @@ static int buffer_silence8(play_state_t* state, DWORD size)
rc=IDirectSoundBuffer_Lock(state->dsbo,state->offset,size, &ptr1,&len1,&ptr2,&len2,0); - ok(rc==DS_OK,"IDirectSoundBuffer_Lock() failed: %08x\n", rc); + ok(rc==DS_OK,"IDirectSoundBuffer_Lock() failed: %08lx\n", rc); if (rc!=DS_OK) return -1;
@@ -95,7 +95,7 @@ static int buffer_silence8(play_state_t* state, DWORD size) } state->offset=(state->offset+size) % state->buffer_size; rc=IDirectSoundBuffer_Unlock(state->dsbo,ptr1,len1,ptr2,len2); - ok(rc==DS_OK,"IDirectSoundBuffer_Unlock() failed: %08x\n", rc); + ok(rc==DS_OK,"IDirectSoundBuffer_Unlock() failed: %08lx\n", rc); if (rc!=DS_OK) return -1; return size; @@ -107,7 +107,7 @@ static BOOL buffer_service8(play_state_t* state) HRESULT rc;
rc=IDirectSoundBuffer_GetCurrentPosition(state->dsbo,&play_pos,NULL); - ok(rc==DS_OK,"IDirectSoundBuffer_GetCurrentPosition() failed: %08x\n", rc); + ok(rc==DS_OK,"IDirectSoundBuffer_GetCurrentPosition() failed: %08lx\n", rc); if (rc!=DS_OK) { goto STOP; } @@ -120,7 +120,7 @@ static BOOL buffer_service8(play_state_t* state) state->played+=play_pos-last_play_pos;
if (winetest_debug > 1) - trace("buf size=%d last_play_pos=%d play_pos=%d played=%d / %d\n", + trace("buf size=%ld last_play_pos=%ld play_pos=%ld played=%ld / %ld\n", state->buffer_size,last_play_pos,play_pos,state->played, state->wave_len);
@@ -137,7 +137,7 @@ static BOOL buffer_service8(play_state_t* state) buf_free=state->buffer_size-state->offset+play_pos;
if (winetest_debug > 1) - trace("offset=%d free=%d written=%d / %d\n", + trace("offset=%ld free=%ld written=%ld / %ld\n", state->offset,buf_free,state->written,state->wave_len); if (buf_free==0) return TRUE; @@ -149,14 +149,14 @@ static BOOL buffer_service8(play_state_t* state) goto STOP; buf_free-=w; if (state->written==state->wave_len && winetest_debug > 1) - trace("last sound byte at %d\n", + trace("last sound byte at %ld\n", (state->written % state->buffer_size)); }
if (buf_free>0) { /* Fill with silence */ if (winetest_debug > 1) - trace("writing %d bytes of silence\n",buf_free); + trace("writing %ld bytes of silence\n",buf_free); if (buffer_silence8(state,buf_free)==-1) goto STOP; } @@ -166,7 +166,7 @@ STOP: if (winetest_debug > 1) trace("stopping playback\n"); rc=IDirectSoundBuffer_Stop(state->dsbo); - ok(rc==DS_OK,"IDirectSoundBuffer_Stop() failed: %08x\n", rc); + ok(rc==DS_OK,"IDirectSoundBuffer_Stop() failed: %08lx\n", rc); return FALSE; }
@@ -186,20 +186,20 @@ void test_buffer8(LPDIRECTSOUND8 dso, LPDIRECTSOUNDBUFFER * dsbo, /* DSOUND: Error: Invalid caps pointer */ rc=IDirectSoundBuffer_GetCaps(*dsbo,0); ok(rc==DSERR_INVALIDPARAM,"IDirectSoundBuffer_GetCaps() should have " - "returned DSERR_INVALIDPARAM, returned: %08x\n",rc); + "returned DSERR_INVALIDPARAM, returned: %08lx\n",rc);
ZeroMemory(&dsbcaps, sizeof(dsbcaps));
/* DSOUND: Error: Invalid caps pointer */ rc=IDirectSoundBuffer_GetCaps(*dsbo,&dsbcaps); ok(rc==DSERR_INVALIDPARAM,"IDirectSoundBuffer_GetCaps() should have " - "returned DSERR_INVALIDPARAM, returned: %08x\n",rc); + "returned DSERR_INVALIDPARAM, returned: %08lx\n",rc);
dsbcaps.dwSize=sizeof(dsbcaps); rc=IDirectSoundBuffer_GetCaps(*dsbo,&dsbcaps); - ok(rc==DS_OK,"IDirectSoundBuffer_GetCaps() failed: %08x\n", rc); + ok(rc==DS_OK,"IDirectSoundBuffer_GetCaps() failed: %08lx\n", rc); if (rc==DS_OK && winetest_debug > 1) { - trace(" Caps: flags=0x%08x size=%d\n",dsbcaps.dwFlags, + trace(" Caps: flags=0x%08lx size=%ld\n",dsbcaps.dwFlags, dsbcaps.dwBufferBytes); }
@@ -207,10 +207,10 @@ void test_buffer8(LPDIRECTSOUND8 dso, LPDIRECTSOUNDBUFFER * dsbo, size=0; rc=IDirectSoundBuffer_GetFormat(*dsbo,NULL,0,&size); ok(rc==DS_OK && size!=0,"IDirectSoundBuffer_GetFormat() should have " - "returned the needed size: rc=%08x size=%d\n",rc,size); + "returned the needed size: rc=%08lx size=%ld\n",rc,size);
ok(size == sizeof(WAVEFORMATEX) || size == sizeof(WAVEFORMATEXTENSIBLE), - "Expected a correct structure size, got %d\n", size); + "Expected a correct structure size, got %ld\n", size);
if (size == sizeof(WAVEFORMATEX)) { rc=IDirectSoundBuffer_GetFormat(*dsbo,&wfx,size,NULL); @@ -223,9 +223,9 @@ void test_buffer8(LPDIRECTSOUND8 dso, LPDIRECTSOUNDBUFFER * dsbo, } else return;
- ok(rc==DS_OK,"IDirectSoundBuffer_GetFormat() failed: %08x\n", rc); + ok(rc==DS_OK,"IDirectSoundBuffer_GetFormat() failed: %08lx\n", rc); if (rc==DS_OK && winetest_debug > 1) { - trace(" Format: %s tag=0x%04x %dx%dx%d avg.B/s=%d align=%d\n", + trace(" Format: %s tag=0x%04x %ldx%dx%d avg.B/s=%ld align=%d\n", is_primary ? "Primary" : "Secondary", wfx.wFormatTag,wfx.nSamplesPerSec,wfx.wBitsPerSample, wfx.nChannels,wfx.nAvgBytesPerSec,wfx.nBlockAlign); @@ -234,26 +234,26 @@ void test_buffer8(LPDIRECTSOUND8 dso, LPDIRECTSOUNDBUFFER * dsbo, /* DSOUND: Error: Invalid frequency buffer */ rc=IDirectSoundBuffer_GetFrequency(*dsbo,0); ok(rc==DSERR_INVALIDPARAM,"IDirectSoundBuffer_GetFrequency() should have " - "returned DSERR_INVALIDPARAM, returned: %08x\n",rc); + "returned DSERR_INVALIDPARAM, returned: %08lx\n",rc);
/* DSOUND: Error: Primary buffers don't support CTRLFREQUENCY */ rc=IDirectSoundBuffer_GetFrequency(*dsbo,&freq); ok((rc==DS_OK && !is_primary) || (rc==DSERR_CONTROLUNAVAIL&&is_primary) || (rc==DSERR_CONTROLUNAVAIL&&!(dsbcaps.dwFlags&DSBCAPS_CTRLFREQUENCY)), - "IDirectSoundBuffer_GetFrequency() failed: %08x\n",rc); + "IDirectSoundBuffer_GetFrequency() failed: %08lx\n",rc); if (rc==DS_OK) { ok(freq==wfx.nSamplesPerSec,"The frequency returned by GetFrequency " - "%d does not match the format %d\n",freq,wfx.nSamplesPerSec); + "%ld does not match the format %ld\n",freq,wfx.nSamplesPerSec); }
/* DSOUND: Error: Invalid status pointer */ rc=IDirectSoundBuffer_GetStatus(*dsbo,0); ok(rc==DSERR_INVALIDPARAM,"IDirectSoundBuffer_GetStatus() should have " - "returned DSERR_INVALIDPARAM, returned: %08x\n",rc); + "returned DSERR_INVALIDPARAM, returned: %08lx\n",rc);
rc=IDirectSoundBuffer_GetStatus(*dsbo,&status); - ok(rc==DS_OK,"IDirectSoundBuffer_GetStatus() failed: %08x\n", rc); - ok(status==0,"status=0x%x instead of 0\n",status); + ok(rc==DS_OK,"IDirectSoundBuffer_GetStatus() failed: %08lx\n", rc); + ok(status==0,"status=0x%lx instead of 0\n",status);
if (is_primary) { DSBCAPS new_dsbcaps; @@ -261,18 +261,18 @@ void test_buffer8(LPDIRECTSOUND8 dso, LPDIRECTSOUNDBUFFER * dsbo, /* DSOUND: Setting DirectSound cooperative level to DSSCL_PRIORITY */ rc=IDirectSound8_SetCooperativeLevel(dso,get_hwnd(),DSSCL_PRIORITY); ok(rc==DS_OK,"IDirectSound8_SetCooperativeLevel(DSSCL_PRIORITY) " - "failed: %08x\n",rc); + "failed: %08lx\n",rc); if (rc!=DS_OK) return;
/* DSOUND: Error: Invalid format pointer */ rc=IDirectSoundBuffer_SetFormat(*dsbo,0); ok(rc==DSERR_INVALIDPARAM,"IDirectSoundBuffer_SetFormat() should have " - "returned DSERR_INVALIDPARAM, returned: %08x\n",rc); + "returned DSERR_INVALIDPARAM, returned: %08lx\n",rc);
init_format(&wfx2,WAVE_FORMAT_PCM,11025,16,2); rc=IDirectSoundBuffer_SetFormat(*dsbo,&wfx2); - ok(rc==DS_OK,"IDirectSoundBuffer_SetFormat(%s) failed: %08x\n", + ok(rc==DS_OK,"IDirectSoundBuffer_SetFormat(%s) failed: %08lx\n", format_string(&wfx2), rc);
/* There is no guarantee that SetFormat will actually change the @@ -280,16 +280,16 @@ void test_buffer8(LPDIRECTSOUND8 dso, LPDIRECTSOUNDBUFFER * dsbo, * supports. So we must re-query the format. */ rc=IDirectSoundBuffer_GetFormat(*dsbo,&wfx,sizeof(wfx),NULL); - ok(rc==DS_OK,"IDirectSoundBuffer_GetFormat() failed: %08x\n", rc); + ok(rc==DS_OK,"IDirectSoundBuffer_GetFormat() failed: %08lx\n", rc); if (rc==DS_OK && (wfx.wFormatTag!=wfx2.wFormatTag || wfx.nSamplesPerSec!=wfx2.nSamplesPerSec || wfx.wBitsPerSample!=wfx2.wBitsPerSample || wfx.nChannels!=wfx2.nChannels)) { - trace("Requested format tag=0x%04x %dx%dx%d avg.B/s=%d align=%d\n", + trace("Requested format tag=0x%04x %ldx%dx%d avg.B/s=%ld align=%d\n", wfx2.wFormatTag,wfx2.nSamplesPerSec,wfx2.wBitsPerSample, wfx2.nChannels,wfx2.nAvgBytesPerSec,wfx2.nBlockAlign); - trace("Got tag=0x%04x %dx%dx%d avg.B/s=%d align=%d\n", + trace("Got tag=0x%04x %ldx%dx%d avg.B/s=%ld align=%d\n", wfx.wFormatTag,wfx.nSamplesPerSec,wfx.wBitsPerSample, wfx.nChannels,wfx.nAvgBytesPerSec,wfx.nBlockAlign); } @@ -297,30 +297,30 @@ void test_buffer8(LPDIRECTSOUND8 dso, LPDIRECTSOUNDBUFFER * dsbo, ZeroMemory(&new_dsbcaps, sizeof(new_dsbcaps)); new_dsbcaps.dwSize = sizeof(new_dsbcaps); rc=IDirectSoundBuffer_GetCaps(*dsbo,&new_dsbcaps); - ok(rc==DS_OK,"IDirectSoundBuffer_GetCaps() failed: %08x\n", rc); + ok(rc==DS_OK,"IDirectSoundBuffer_GetCaps() failed: %08lx\n", rc); if (rc==DS_OK && winetest_debug > 1) { - trace(" new Caps: flags=0x%08x size=%d\n",new_dsbcaps.dwFlags, + trace(" new Caps: flags=0x%08lx size=%ld\n",new_dsbcaps.dwFlags, new_dsbcaps.dwBufferBytes); }
/* Check for primary buffer size change */ ok(new_dsbcaps.dwBufferBytes == dsbcaps.dwBufferBytes, " buffer size changed after SetFormat() - " - "previous size was %u, current size is %u\n", + "previous size was %lu, current size is %lu\n", dsbcaps.dwBufferBytes, new_dsbcaps.dwBufferBytes); dsbcaps.dwBufferBytes = new_dsbcaps.dwBufferBytes;
/* Check for primary buffer flags change */ ok(new_dsbcaps.dwFlags == dsbcaps.dwFlags, " flags changed after SetFormat() - " - "previous flags were %08x, current flags are %08x\n", + "previous flags were %08lx, current flags are %08lx\n", dsbcaps.dwFlags, new_dsbcaps.dwFlags);
/* Set the CooperativeLevel back to normal */ /* DSOUND: Setting DirectSound cooperative level to DSSCL_NORMAL */ rc=IDirectSound8_SetCooperativeLevel(dso,get_hwnd(),DSSCL_NORMAL); ok(rc==DS_OK,"IDirectSound8_SetCooperativeLevel(DSSCL_NORMAL) " - "failed: %08x\n",rc); + "failed: %08lx\n",rc); }
if (play) { @@ -333,7 +333,7 @@ void test_buffer8(LPDIRECTSOUND8 dso, LPDIRECTSOUNDBUFFER * dsbo, DWORD length1;
if (winetest_interactive) { - trace(" Playing %g second 440Hz tone at %dx%dx%d\n", duration, + trace(" Playing %g second 440Hz tone at %ldx%dx%d\n", duration, wfx.nSamplesPerSec, wfx.wBitsPerSample,wfx.nChannels); }
@@ -344,7 +344,7 @@ void test_buffer8(LPDIRECTSOUND8 dso, LPDIRECTSOUNDBUFFER * dsbo, rc=IDirectSound8_SetCooperativeLevel(dso,get_hwnd(), DSSCL_WRITEPRIMARY); ok(rc==DS_OK, - "IDirectSound8_SetCooperativeLevel(DSSCL_WRITEPRIMARY) failed: %08x\n",rc); + "IDirectSound8_SetCooperativeLevel(DSSCL_WRITEPRIMARY) failed: %08lx\n",rc); if (rc!=DS_OK) return; } @@ -353,7 +353,7 @@ void test_buffer8(LPDIRECTSOUND8 dso, LPDIRECTSOUNDBUFFER * dsbo,
rc=IDirectSoundBuffer_QueryInterface(*dsbo,&IID_IDirectSound3DBuffer, (LPVOID *)&buffer); - ok(rc==DS_OK,"IDirectSoundBuffer_QueryInterface() failed: %08x\n", rc); + ok(rc==DS_OK,"IDirectSoundBuffer_QueryInterface() failed: %08lx\n", rc); if (rc!=DS_OK) return;
@@ -361,7 +361,7 @@ void test_buffer8(LPDIRECTSOUND8 dso, LPDIRECTSOUNDBUFFER * dsbo, rc=IDirectSoundBuffer_QueryInterface(*dsbo, &IID_IDirectSoundBuffer, (LPVOID *)&temp_buffer); ok(rc==DS_OK && temp_buffer!=NULL, - "IDirectSoundBuffer_QueryInterface() failed: %08x\n", rc); + "IDirectSoundBuffer_QueryInterface() failed: %08lx\n", rc); ok(temp_buffer==*dsbo,"COM interface broken: %p != %p\n", temp_buffer,*dsbo); ref=IDirectSoundBuffer_Release(temp_buffer); @@ -376,37 +376,37 @@ void test_buffer8(LPDIRECTSOUND8 dso, LPDIRECTSOUNDBUFFER * dsbo, &IID_IDirectSoundBuffer, (LPVOID *)dsbo); ok(rc==DS_OK && *dsbo!=NULL,"IDirectSound3DBuffer_QueryInterface() " - "failed: %08x\n",rc); + "failed: %08lx\n",rc);
/* DSOUND: Error: Invalid buffer */ rc=IDirectSound3DBuffer_GetAllParameters(buffer,0); ok(rc==DSERR_INVALIDPARAM,"IDirectSound3DBuffer_GetAllParameters() " - "failed: %08x\n",rc); + "failed: %08lx\n",rc);
ZeroMemory(&buffer_param, sizeof(buffer_param));
/* DSOUND: Error: Invalid buffer */ rc=IDirectSound3DBuffer_GetAllParameters(buffer,&buffer_param); ok(rc==DSERR_INVALIDPARAM,"IDirectSound3DBuffer_GetAllParameters() " - "failed: %08x\n",rc); + "failed: %08lx\n",rc);
buffer_param.dwSize=sizeof(buffer_param); rc=IDirectSound3DBuffer_GetAllParameters(buffer,&buffer_param); - ok(rc==DS_OK,"IDirectSound3DBuffer_GetAllParameters() failed: %08x\n", rc); + ok(rc==DS_OK,"IDirectSound3DBuffer_GetAllParameters() failed: %08lx\n", rc); } if (set_volume) { if (dsbcaps.dwFlags & DSBCAPS_CTRLVOLUME) { LONG val; rc=IDirectSoundBuffer_GetVolume(*dsbo,&val); - ok(rc==DS_OK,"IDirectSoundBuffer_GetVolume() failed: %08x\n", rc); + ok(rc==DS_OK,"IDirectSoundBuffer_GetVolume() failed: %08lx\n", rc);
rc=IDirectSoundBuffer_SetVolume(*dsbo,volume); - ok(rc==DS_OK,"IDirectSoundBuffer_SetVolume() failed: %08x\n", rc); + ok(rc==DS_OK,"IDirectSoundBuffer_SetVolume() failed: %08lx\n", rc); } else { /* DSOUND: Error: Buffer does not have CTRLVOLUME */ rc=IDirectSoundBuffer_GetVolume(*dsbo,&volume); ok(rc==DSERR_CONTROLUNAVAIL,"IDirectSoundBuffer_GetVolume() " - "should have returned DSERR_CONTROLUNAVAIL, returned: %08x\n", rc); + "should have returned DSERR_CONTROLUNAVAIL, returned: %08lx\n", rc); } }
@@ -414,15 +414,15 @@ void test_buffer8(LPDIRECTSOUND8 dso, LPDIRECTSOUNDBUFFER * dsbo, if (dsbcaps.dwFlags & DSBCAPS_CTRLPAN) { LONG val; rc=IDirectSoundBuffer_GetPan(*dsbo,&val); - ok(rc==DS_OK,"IDirectSoundBuffer_GetPan() failed: %08x\n", rc); + ok(rc==DS_OK,"IDirectSoundBuffer_GetPan() failed: %08lx\n", rc);
rc=IDirectSoundBuffer_SetPan(*dsbo,pan); - ok(rc==DS_OK,"IDirectSoundBuffer_SetPan() failed: %08x\n", rc); + ok(rc==DS_OK,"IDirectSoundBuffer_SetPan() failed: %08lx\n", rc); } else { /* DSOUND: Error: Buffer does not have CTRLPAN */ rc=IDirectSoundBuffer_GetPan(*dsbo,&pan); ok(rc==DSERR_CONTROLUNAVAIL,"IDirectSoundBuffer_GetPan() " - "should have returned DSERR_CONTROLUNAVAIL, returned: %08x\n", rc); + "should have returned DSERR_CONTROLUNAVAIL, returned: %08lx\n", rc); } }
@@ -431,14 +431,14 @@ void test_buffer8(LPDIRECTSOUND8 dso, LPDIRECTSOUNDBUFFER * dsbo, &length1, NULL, NULL, DSBLOCK_ENTIREBUFFER); ok(rc==DSERR_INVALIDPARAM, "IDirectSoundBuffer_Lock() should have " - "returned DSERR_INVALIDPARAM, returned %08x\n", rc); + "returned DSERR_INVALIDPARAM, returned %08lx\n", rc);
/* try a size larger than the buffer */ rc = IDirectSoundBuffer_Lock(*dsbo, 0, dsbcaps.dwBufferBytes + 1, &buffer1, &length1, NULL, NULL, DSBLOCK_FROMWRITECURSOR); ok(rc==DSERR_INVALIDPARAM, "IDirectSoundBuffer_Lock() should have " - "returned DSERR_INVALIDPARAM, returned %08x\n", rc); + "returned DSERR_INVALIDPARAM, returned %08lx\n", rc);
state.wave=wave_generate_la(&wfx,duration,&state.wave_len,ieee);
@@ -449,19 +449,19 @@ void test_buffer8(LPDIRECTSOUND8 dso, LPDIRECTSOUNDBUFFER * dsbo, buffer_refill8(&state,state.buffer_size);
rc=IDirectSoundBuffer_Play(*dsbo,0,0,DSBPLAY_LOOPING); - ok(rc==DS_OK,"IDirectSoundBuffer_Play() failed: %08x\n", rc); + ok(rc==DS_OK,"IDirectSoundBuffer_Play() failed: %08lx\n", rc);
rc=IDirectSoundBuffer_GetStatus(*dsbo,&status); - ok(rc==DS_OK,"IDirectSoundBuffer_GetStatus() failed: %08x\n", rc); + ok(rc==DS_OK,"IDirectSoundBuffer_GetStatus() failed: %08lx\n", rc); ok(status==(DSBSTATUS_PLAYING|DSBSTATUS_LOOPING), - "GetStatus: bad status: %x\n",status); + "GetStatus: bad status: %lx\n",status);
if (listener) { ZeroMemory(&listener_param,sizeof(listener_param)); listener_param.dwSize=sizeof(listener_param); rc=IDirectSound3DListener_GetAllParameters(listener,&listener_param); ok(rc==DS_OK,"IDirectSound3dListener_GetAllParameters() " - "failed: %08x\n",rc); + "failed: %08lx\n",rc); if (move_listener) { listener_param.vPosition.x = -5.0f; listener_param.vVelocity.x = (float)(10.0/duration); @@ -469,7 +469,7 @@ void test_buffer8(LPDIRECTSOUND8 dso, LPDIRECTSOUNDBUFFER * dsbo, rc=IDirectSound3DListener_SetAllParameters(listener, &listener_param, DS3D_IMMEDIATE); - ok(rc==DS_OK,"IDirectSound3dListener_SetPosition() failed: %08x\n", rc); + ok(rc==DS_OK,"IDirectSound3dListener_SetPosition() failed: %08lx\n", rc); } if (buffer3d) { if (move_sound) { @@ -479,7 +479,7 @@ void test_buffer8(LPDIRECTSOUND8 dso, LPDIRECTSOUNDBUFFER * dsbo, buffer_param.flMinDistance = 10; rc=IDirectSound3DBuffer_SetAllParameters(buffer,&buffer_param, DS3D_IMMEDIATE); - ok(rc==DS_OK,"IDirectSound3dBuffer_SetPosition() failed: %08x\n", rc); + ok(rc==DS_OK,"IDirectSound3dBuffer_SetPosition() failed: %08lx\n", rc); }
start_time=GetTickCount(); @@ -493,7 +493,7 @@ void test_buffer8(LPDIRECTSOUND8 dso, LPDIRECTSOUNDBUFFER * dsbo, rc=IDirectSound3DListener_SetPosition(listener, listener_param.vPosition.x,listener_param.vPosition.y, listener_param.vPosition.z,DS3D_IMMEDIATE); - ok(rc==DS_OK,"IDirectSound3dListener_SetPosition() failed: %08x\n",rc); + ok(rc==DS_OK,"IDirectSound3dListener_SetPosition() failed: %08lx\n",rc); } if (buffer3d && move_sound) { buffer_param.vPosition.x = (float)(100-200.0*(now-start_time)/1000/duration); @@ -502,13 +502,13 @@ void test_buffer8(LPDIRECTSOUND8 dso, LPDIRECTSOUNDBUFFER * dsbo, rc=IDirectSound3DBuffer_SetPosition(buffer, buffer_param.vPosition.x,buffer_param.vPosition.y, buffer_param.vPosition.z,DS3D_IMMEDIATE); - ok(rc==DS_OK,"IDirectSound3dBuffer_SetPosition() failed: %08x\n", rc); + ok(rc==DS_OK,"IDirectSound3dBuffer_SetPosition() failed: %08lx\n", rc); } } /* Check the sound duration was within 10% of the expected value */ now=GetTickCount(); ok(fabs(1000*duration-now+start_time)<=100*duration, - "The sound played for %d ms instead of %g ms\n", + "The sound played for %ld ms instead of %g ms\n", now-start_time,1000*duration);
HeapFree(GetProcessHeap(), 0, state.wave); @@ -517,7 +517,7 @@ void test_buffer8(LPDIRECTSOUND8 dso, LPDIRECTSOUNDBUFFER * dsbo, /* DSOUND: Setting DirectSound cooperative level to DSSCL_NORMAL */ rc=IDirectSound8_SetCooperativeLevel(dso,get_hwnd(),DSSCL_NORMAL); ok(rc==DS_OK,"IDirectSound8_SetCooperativeLevel(DSSCL_NORMAL) " - "failed: %08x\n",rc); + "failed: %08lx\n",rc); } if (buffer3d) { ref=IDirectSound3DBuffer_Release(buffer); @@ -542,14 +542,14 @@ static HRESULT test_secondary8(LPGUID lpGuid, BOOL play,
/* Create the DirectSound object */ rc = DirectSoundCreate8(lpGuid, &dso, NULL); - ok(rc==DS_OK||rc==DSERR_NODRIVER,"DirectSoundCreate8() failed: %08x\n", rc); + ok(rc==DS_OK||rc==DSERR_NODRIVER,"DirectSoundCreate8() failed: %08lx\n", rc); if (rc!=DS_OK) return rc;
/* We must call SetCooperativeLevel before creating primary buffer */ /* DSOUND: Setting DirectSound cooperative level to DSSCL_PRIORITY */ rc=IDirectSound8_SetCooperativeLevel(dso,get_hwnd(),DSSCL_PRIORITY); - ok(rc==DS_OK,"IDirectSound8_SetCooperativeLevel(DSSCL_PRIORITY) failed: %08x\n",rc); + ok(rc==DS_OK,"IDirectSound8_SetCooperativeLevel(DSSCL_PRIORITY) failed: %08lx\n",rc); if (rc!=DS_OK) goto EXIT;
@@ -562,12 +562,12 @@ static HRESULT test_secondary8(LPGUID lpGuid, BOOL play, bufdesc.dwFlags|=(DSBCAPS_CTRLVOLUME|DSBCAPS_CTRLPAN); rc=IDirectSound8_CreateSoundBuffer(dso,&bufdesc,&primary,NULL); ok((rc==DS_OK && primary!=NULL) || (rc == DSERR_CONTROLUNAVAIL), - "IDirectSound8_CreateSoundBuffer() failed to create a %sprimary buffer: %08x\n",has_3d?"3D ":"", rc); + "IDirectSound8_CreateSoundBuffer() failed to create a %sprimary buffer: %08lx\n",has_3d?"3D ":"", rc); if (rc == DSERR_CONTROLUNAVAIL) trace(" No Primary\n"); else if (rc==DS_OK && primary!=NULL) { rc=IDirectSoundBuffer_GetFormat(primary,&wfx1,sizeof(wfx1),NULL); - ok(rc==DS_OK,"IDirectSoundBuffer8_Getformat() failed: %08x\n", rc); + ok(rc==DS_OK,"IDirectSoundBuffer8_Getformat() failed: %08lx\n", rc); if (rc!=DS_OK) goto EXIT1;
@@ -577,7 +577,7 @@ static HRESULT test_secondary8(LPGUID lpGuid, BOOL play, (void **)&listener); ok(rc==DS_OK && listener!=NULL, "IDirectSoundBuffer_QueryInterface() failed to get a 3D " - "listener %08x\n",rc); + "listener %08lx\n",rc); ref=IDirectSoundBuffer_Release(primary); ok(ref==0,"IDirectSoundBuffer_Release() primary has %d references, " "should have 0\n",ref); @@ -588,20 +588,20 @@ static HRESULT test_secondary8(LPGUID lpGuid, BOOL play, rc=IDirectSound3DListener_GetAllParameters(listener,0); ok(rc==DSERR_INVALIDPARAM, "IDirectSound3dListener_GetAllParameters() should have " - "returned DSERR_INVALIDPARAM, returned: %08x\n", rc); + "returned DSERR_INVALIDPARAM, returned: %08lx\n", rc);
/* DSOUND: Error: Invalid buffer */ rc=IDirectSound3DListener_GetAllParameters(listener, &listener_param); ok(rc==DSERR_INVALIDPARAM, "IDirectSound3dListener_GetAllParameters() should have " - "returned DSERR_INVALIDPARAM, returned: %08x\n", rc); + "returned DSERR_INVALIDPARAM, returned: %08lx\n", rc);
listener_param.dwSize=sizeof(listener_param); rc=IDirectSound3DListener_GetAllParameters(listener, &listener_param); ok(rc==DS_OK,"IDirectSound3dListener_GetAllParameters() " - "failed: %08x\n",rc); + "failed: %08lx\n",rc); } else { ok(listener==NULL, "IDirectSoundBuffer_QueryInterface() " "failed but returned a listener anyway\n"); @@ -634,7 +634,7 @@ static HRESULT test_secondary8(LPGUID lpGuid, BOOL play, rc=IDirectSound8_CreateSoundBuffer(dso,&bufdesc,&secondary,NULL); ok(rc==DSERR_INVALIDPARAM, "IDirectSound8_CreateSoundBuffer(secondary) should have " - "returned DSERR_INVALIDPARAM, returned %08x\n", rc); + "returned DSERR_INVALIDPARAM, returned %08lx\n", rc); init_format(&wfx,WAVE_FORMAT_PCM,22050,16,1);
/* Invalid flag combination */ @@ -642,13 +642,13 @@ static HRESULT test_secondary8(LPGUID lpGuid, BOOL play, rc=IDirectSound8_CreateSoundBuffer(dso,&bufdesc,&secondary,NULL); ok(rc==DSERR_INVALIDPARAM, "IDirectSound8_CreateSoundBuffer(secondary) should have " - "returned DSERR_INVALIDPARAM, returned %08x\n", rc); + "returned DSERR_INVALIDPARAM, returned %08lx\n", rc); bufdesc.dwFlags&=~DSBCAPS_CTRLPAN; }
if (winetest_interactive) { - trace(" Testing a %s%ssecondary buffer %s%s%s%sat %dx%dx%d " - "with a primary buffer at %dx%dx%d\n", + trace(" Testing a %s%ssecondary buffer %s%s%s%sat %ldx%dx%d " + "with a primary buffer at %ldx%dx%d\n", has_3dbuffer?"3D ":"", has_duplicate?"duplicated ":"", listener!=NULL||move_sound?"with ":"", @@ -661,7 +661,7 @@ static HRESULT test_secondary8(LPGUID lpGuid, BOOL play, } rc=IDirectSound8_CreateSoundBuffer(dso,&bufdesc,&secondary,NULL); ok(rc==DS_OK && secondary!=NULL,"IDirectSound8_CreateSoundBuffer() " - "failed to create a %s%ssecondary buffer %s%s%s%sat %dx%dx%d (%s): %08x\n", + "failed to create a %s%ssecondary buffer %s%s%s%sat %ldx%dx%d (%s): %08lx\n", has_3dbuffer?"3D ":"", has_duplicate?"duplicated ":"", listener!=NULL||move_sound?"with ":"", move_listener?"moving ":"", listener!=NULL?"listener ":"", @@ -675,55 +675,55 @@ static HRESULT test_secondary8(LPGUID lpGuid, BOOL play,
/* Check the initial secondary buffer's volume and pan */ rc=IDirectSoundBuffer_GetVolume(secondary,&vol); - ok(rc==DS_OK,"IDirectSoundBuffer_GetVolume(secondary) failed: %08x\n",rc); - ok(vol==0,"wrong volume for a new secondary buffer: %d\n",vol); + ok(rc==DS_OK,"IDirectSoundBuffer_GetVolume(secondary) failed: %08lx\n",rc); + ok(vol==0,"wrong volume for a new secondary buffer: %ld\n",vol); rc=IDirectSoundBuffer_GetPan(secondary,&pan); - ok(rc==DS_OK,"IDirectSoundBuffer_GetPan(secondary) failed: %08x\n",rc); - ok(pan==0,"wrong pan for a new secondary buffer: %d\n",pan); + ok(rc==DS_OK,"IDirectSoundBuffer_GetPan(secondary) failed: %08lx\n",rc); + ok(pan==0,"wrong pan for a new secondary buffer: %ld\n",pan);
/* Check that changing the secondary buffer's volume and pan * does not impact the primary buffer's volume and pan */ rc=IDirectSoundBuffer_GetVolume(primary,&refvol); - ok(rc==DS_OK,"IDirectSoundBuffer_GetVolume(primary) failed: %08x\n",rc); + ok(rc==DS_OK,"IDirectSoundBuffer_GetVolume(primary) failed: %08lx\n",rc); rc=IDirectSoundBuffer_GetPan(primary,&refpan); - ok(rc==DS_OK,"IDirectSoundBuffer_GetPan(primary) failed: %08x\n",rc); + ok(rc==DS_OK,"IDirectSoundBuffer_GetPan(primary) failed: %08lx\n",rc);
rc=IDirectSoundBuffer_SetVolume(secondary,-1000); - ok(rc==DS_OK,"IDirectSoundBuffer_SetVolume(secondary) failed: %08x\n",rc); + ok(rc==DS_OK,"IDirectSoundBuffer_SetVolume(secondary) failed: %08lx\n",rc); rc=IDirectSoundBuffer_GetVolume(secondary,&vol); - ok(rc==DS_OK,"IDirectSoundBuffer_SetVolume(secondary) failed: %08x\n",rc); - ok(vol==-1000,"secondary: wrong volume %d instead of -1000\n", + ok(rc==DS_OK,"IDirectSoundBuffer_SetVolume(secondary) failed: %08lx\n",rc); + ok(vol==-1000,"secondary: wrong volume %ld instead of -1000\n", vol); rc=IDirectSoundBuffer_SetPan(secondary,-1000); - ok(rc==DS_OK,"IDirectSoundBuffer_SetPan(secondary) failed: %08x\n",rc); + ok(rc==DS_OK,"IDirectSoundBuffer_SetPan(secondary) failed: %08lx\n",rc); rc=IDirectSoundBuffer_GetPan(secondary,&pan); - ok(rc==DS_OK,"IDirectSoundBuffer_GetPan(secondary) failed: %08x\n",rc); - ok(pan==-1000,"secondary: wrong pan %d instead of -1000\n", + ok(rc==DS_OK,"IDirectSoundBuffer_GetPan(secondary) failed: %08lx\n",rc); + ok(pan==-1000,"secondary: wrong pan %ld instead of -1000\n", pan);
rc=IDirectSoundBuffer_GetVolume(primary,&vol); - ok(rc==DS_OK,"IDirectSoundBuffer_`GetVolume(primary) failed: i%08x\n",rc); - ok(vol==refvol,"The primary volume changed from %d to %d\n", + ok(rc==DS_OK,"IDirectSoundBuffer_`GetVolume(primary) failed: i%08lx\n",rc); + ok(vol==refvol,"The primary volume changed from %ld to %ld\n", refvol,vol); rc=IDirectSoundBuffer_GetPan(primary,&pan); - ok(rc==DS_OK,"IDirectSoundBuffer_GetPan(primary) failed: %08x\n",rc); - ok(pan==refpan,"The primary pan changed from %d to %d\n", + ok(rc==DS_OK,"IDirectSoundBuffer_GetPan(primary) failed: %08lx\n",rc); + ok(pan==refpan,"The primary pan changed from %ld to %ld\n", refpan,pan);
rc=IDirectSoundBuffer_SetVolume(secondary,0); - ok(rc==DS_OK,"IDirectSoundBuffer_SetVolume(secondary) failed: %08x\n",rc); + ok(rc==DS_OK,"IDirectSoundBuffer_SetVolume(secondary) failed: %08lx\n",rc); rc=IDirectSoundBuffer_SetPan(secondary,0); - ok(rc==DS_OK,"IDirectSoundBuffer_SetPan(secondary) failed: %08x\n",rc); + ok(rc==DS_OK,"IDirectSoundBuffer_SetPan(secondary) failed: %08lx\n",rc); } else { LONG pan;
rc=IDirectSoundBuffer_GetPan(secondary,&pan); ok(rc==DSERR_CONTROLUNAVAIL,"IDirectSoundBuffer_GetPan() " - "should have returned DSERR_CONTROLUNAVAIL, returned: %08x\n", rc); + "should have returned DSERR_CONTROLUNAVAIL, returned: %08lx\n", rc); rc=IDirectSoundBuffer_SetPan(secondary,0); ok(rc==DSERR_CONTROLUNAVAIL,"IDirectSoundBuffer_SetPan() " - "should have returned DSERR_CONTROLUNAVAIL, returned: %08x\n", rc); + "should have returned DSERR_CONTROLUNAVAIL, returned: %08lx\n", rc); }
if (has_duplicate) { @@ -733,26 +733,26 @@ static HRESULT test_secondary8(LPGUID lpGuid, BOOL play, rc=IDirectSound8_DuplicateSoundBuffer(dso,0,0); ok(rc==DSERR_INVALIDPARAM, "IDirectSound8_DuplicateSoundBuffer() should have returned " - "DSERR_INVALIDPARAM, returned: %08x\n",rc); + "DSERR_INVALIDPARAM, returned: %08lx\n",rc);
/* DSOUND: Error: Invalid dest buffer */ rc=IDirectSound8_DuplicateSoundBuffer(dso,secondary,0); ok(rc==DSERR_INVALIDPARAM, "IDirectSound8_DuplicateSoundBuffer() should have returned " - "DSERR_INVALIDPARAM, returned: %08x\n",rc); + "DSERR_INVALIDPARAM, returned: %08lx\n",rc);
/* DSOUND: Error: Invalid source buffer */ rc=IDirectSound8_DuplicateSoundBuffer(dso,0,&duplicated); ok(rc==DSERR_INVALIDPARAM, "IDirectSound8_DuplicateSoundBuffer() should have returned " - "DSERR_INVALIDPARAM, returned: %08x\n",rc); + "DSERR_INVALIDPARAM, returned: %08lx\n",rc);
duplicated=NULL; rc=IDirectSound8_DuplicateSoundBuffer(dso,secondary, &duplicated); ok(rc==DS_OK && duplicated!=NULL, "IDirectSound8_DuplicateSoundBuffer() failed to duplicate " - "a secondary buffer: %08x\n",rc); + "a secondary buffer: %08lx\n",rc);
if (rc==DS_OK && duplicated!=NULL) { ref=IDirectSoundBuffer_Release(secondary); @@ -801,7 +801,7 @@ EXIT2: /* Set the CooperativeLevel back to normal */ /* DSOUND: Setting DirectSound cooperative level to DSSCL_NORMAL */ rc=IDirectSound8_SetCooperativeLevel(dso,get_hwnd(),DSSCL_NORMAL); - ok(rc==DS_OK,"IDirectSound8_SetCooperativeLevel(DSSCL_NORMAL) failed: %08x\n",rc); + ok(rc==DS_OK,"IDirectSound8_SetCooperativeLevel(DSSCL_NORMAL) failed: %08lx\n",rc);
EXIT: ref=IDirectSound8_Release(dso); @@ -821,7 +821,7 @@ static HRESULT test_for_driver8(LPGUID lpGuid) /* Create the DirectSound object */ rc = DirectSoundCreate8(lpGuid, &dso, NULL); ok(rc==DS_OK||rc==DSERR_NODRIVER||rc==DSERR_ALLOCATED||rc==E_FAIL, - "DirectSoundCreate8() failed: %08x\n",rc); + "DirectSoundCreate8() failed: %08lx\n",rc); if (rc!=DS_OK) return rc;
@@ -844,7 +844,7 @@ static HRESULT test_primary8(LPGUID lpGuid)
/* Create the DirectSound object */ rc = DirectSoundCreate8(lpGuid, &dso, NULL); - ok(rc==DS_OK||rc==DSERR_NODRIVER,"DirectSoundCreate8() failed: %08x\n", rc); + ok(rc==DS_OK||rc==DSERR_NODRIVER,"DirectSoundCreate8() failed: %08lx\n", rc); if (rc!=DS_OK) return rc;
@@ -852,14 +852,14 @@ static HRESULT test_primary8(LPGUID lpGuid) ZeroMemory(&dscaps, sizeof(dscaps)); dscaps.dwSize=sizeof(dscaps); rc=IDirectSound8_GetCaps(dso,&dscaps); - ok(rc==DS_OK,"IDirectSound8_GetCaps() failed: %08x\n",rc); + ok(rc==DS_OK,"IDirectSound8_GetCaps() failed: %08lx\n",rc); if (rc!=DS_OK) goto EXIT;
/* We must call SetCooperativeLevel before calling CreateSoundBuffer */ /* DSOUND: Setting DirectSound cooperative level to DSSCL_PRIORITY */ rc=IDirectSound8_SetCooperativeLevel(dso,get_hwnd(),DSSCL_PRIORITY); - ok(rc==DS_OK,"IDirectSound8_SetCooperativeLevel(DSSCL_PRIORITY) failed: %08x\n",rc); + ok(rc==DS_OK,"IDirectSound8_SetCooperativeLevel(DSSCL_PRIORITY) failed: %08lx\n",rc); if (rc!=DS_OK) goto EXIT;
@@ -870,7 +870,7 @@ static HRESULT test_primary8(LPGUID lpGuid) bufdesc.dwFlags=DSBCAPS_PRIMARYBUFFER|DSBCAPS_CTRLVOLUME|DSBCAPS_CTRLPAN; rc=IDirectSound8_CreateSoundBuffer(dso,&bufdesc,&primary,NULL); ok((rc==DS_OK && primary!=NULL) || (rc == DSERR_CONTROLUNAVAIL), - "IDirectSound8_CreateSoundBuffer() failed to create a primary buffer: %08x\n",rc); + "IDirectSound8_CreateSoundBuffer() failed to create a primary buffer: %08lx\n",rc); if (rc == DSERR_CONTROLUNAVAIL) trace(" No Primary\n"); else if (rc==DS_OK && primary!=NULL) { @@ -904,7 +904,7 @@ static HRESULT test_primary8(LPGUID lpGuid) /* Set the CooperativeLevel back to normal */ /* DSOUND: Setting DirectSound cooperative level to DSSCL_NORMAL */ rc=IDirectSound8_SetCooperativeLevel(dso,get_hwnd(),DSSCL_NORMAL); - ok(rc==DS_OK,"IDirectSound8_SetCooperativeLevel(DSSCL_NORMAL) failed: %08x\n",rc); + ok(rc==DS_OK,"IDirectSound8_SetCooperativeLevel(DSSCL_NORMAL) failed: %08lx\n",rc);
EXIT: ref=IDirectSound8_Release(dso); @@ -926,7 +926,7 @@ static HRESULT test_primary_3d8(LPGUID lpGuid)
/* Create the DirectSound object */ rc = DirectSoundCreate8(lpGuid, &dso, NULL); - ok(rc==DS_OK||rc==DSERR_NODRIVER,"DirectSoundCreate8() failed: %08x\n", rc); + ok(rc==DS_OK||rc==DSERR_NODRIVER,"DirectSoundCreate8() failed: %08lx\n", rc); if (rc!=DS_OK) return rc;
@@ -934,14 +934,14 @@ static HRESULT test_primary_3d8(LPGUID lpGuid) ZeroMemory(&dscaps, sizeof(dscaps)); dscaps.dwSize=sizeof(dscaps); rc=IDirectSound8_GetCaps(dso,&dscaps); - ok(rc==DS_OK,"IDirectSound8_GetCaps failed: %08x\n",rc); + ok(rc==DS_OK,"IDirectSound8_GetCaps failed: %08lx\n",rc); if (rc!=DS_OK) goto EXIT;
/* We must call SetCooperativeLevel before calling CreateSoundBuffer */ /* DSOUND: Setting DirectSound cooperative level to DSSCL_PRIORITY */ rc=IDirectSound8_SetCooperativeLevel(dso,get_hwnd(),DSSCL_PRIORITY); - ok(rc==DS_OK,"IDirectSound8_SetCooperativeLevel(DSSCL_PRIORITY) failed: %08x\n",rc); + ok(rc==DS_OK,"IDirectSound8_SetCooperativeLevel(DSSCL_PRIORITY) failed: %08lx\n",rc); if (rc!=DS_OK) goto EXIT;
@@ -951,7 +951,7 @@ static HRESULT test_primary_3d8(LPGUID lpGuid) bufdesc.dwFlags=DSBCAPS_PRIMARYBUFFER; rc=IDirectSound8_CreateSoundBuffer(dso,&bufdesc,&primary,NULL); ok(rc==DS_OK && primary!=NULL,"IDirectSound8_CreateSoundBuffer() failed " - "to create a primary buffer: %08x\n",rc); + "to create a primary buffer: %08lx\n",rc); if (rc==DS_OK && primary!=NULL) { ref=IDirectSoundBuffer_Release(primary); ok(ref==0,"IDirectSoundBuffer_Release() primary has %d references, " @@ -962,7 +962,7 @@ static HRESULT test_primary_3d8(LPGUID lpGuid) bufdesc.dwFlags=DSBCAPS_PRIMARYBUFFER|DSBCAPS_CTRL3D; rc=IDirectSound8_CreateSoundBuffer(dso,&bufdesc,&primary,NULL); ok(rc==DS_OK && primary!=NULL,"IDirectSound8_CreateSoundBuffer() " - "failed to create a 3D primary buffer: %08x\n",rc); + "failed to create a 3D primary buffer: %08lx\n",rc); if (rc==DS_OK && primary!=NULL) { test_buffer8(dso,&primary,TRUE,FALSE,0,FALSE,0, winetest_interactive && !(dscaps.dwFlags & DSCAPS_EMULDRIVER), @@ -975,7 +975,7 @@ static HRESULT test_primary_3d8(LPGUID lpGuid) /* Set the CooperativeLevel back to normal */ /* DSOUND: Setting DirectSound cooperative level to DSSCL_NORMAL */ rc=IDirectSound8_SetCooperativeLevel(dso,get_hwnd(),DSSCL_NORMAL); - ok(rc==DS_OK,"IDirectSound8_SetCooperativeLevel(DSSCL_NORMAL) failed: %08x\n",rc); + ok(rc==DS_OK,"IDirectSound8_SetCooperativeLevel(DSSCL_NORMAL) failed: %08lx\n",rc);
EXIT: ref=IDirectSound8_Release(dso); @@ -997,7 +997,7 @@ static HRESULT test_primary_3d_with_listener8(LPGUID lpGuid)
/* Create the DirectSound object */ rc = DirectSoundCreate8(lpGuid, &dso, NULL); - ok(rc==DS_OK||rc==DSERR_NODRIVER,"DirectSoundCreate8() failed: %08x\n", rc); + ok(rc==DS_OK||rc==DSERR_NODRIVER,"DirectSoundCreate8() failed: %08lx\n", rc); if (rc!=DS_OK) return rc;
@@ -1005,14 +1005,14 @@ static HRESULT test_primary_3d_with_listener8(LPGUID lpGuid) ZeroMemory(&dscaps, sizeof(dscaps)); dscaps.dwSize=sizeof(dscaps); rc=IDirectSound8_GetCaps(dso,&dscaps); - ok(rc==DS_OK,"IDirectSound8_GetCaps() failed: %08x\n",rc); + ok(rc==DS_OK,"IDirectSound8_GetCaps() failed: %08lx\n",rc); if (rc!=DS_OK) goto EXIT;
/* We must call SetCooperativeLevel before calling CreateSoundBuffer */ /* DSOUND: Setting DirectSound cooperative level to DSSCL_PRIORITY */ rc=IDirectSound8_SetCooperativeLevel(dso,get_hwnd(),DSSCL_PRIORITY); - ok(rc==DS_OK,"IDirectSound8_SetCooperativeLevel(DSSCL_PRIORITY) failed: %08x\n",rc); + ok(rc==DS_OK,"IDirectSound8_SetCooperativeLevel(DSSCL_PRIORITY) failed: %08lx\n",rc); if (rc!=DS_OK) goto EXIT; primary=NULL; @@ -1021,14 +1021,14 @@ static HRESULT test_primary_3d_with_listener8(LPGUID lpGuid) bufdesc.dwFlags=DSBCAPS_PRIMARYBUFFER|DSBCAPS_CTRL3D; rc=IDirectSound8_CreateSoundBuffer(dso,&bufdesc,&primary,NULL); ok(rc==DS_OK && primary!=NULL,"IDirectSound8_CreateSoundBuffer() failed " - "to create a 3D primary buffer %08x\n",rc); + "to create a 3D primary buffer %08lx\n",rc); if (rc==DS_OK && primary!=NULL) { LPDIRECTSOUND3DLISTENER listener=NULL; rc=IDirectSoundBuffer_QueryInterface(primary, &IID_IDirectSound3DListener, (void **)&listener); ok(rc==DS_OK && listener!=NULL,"IDirectSoundBuffer_QueryInterface() " - "failed to get a 3D listener: %08x\n",rc); + "failed to get a 3D listener: %08lx\n",rc); if (rc==DS_OK && listener!=NULL) { LPDIRECTSOUNDBUFFER temp_buffer=NULL;
@@ -1037,7 +1037,7 @@ static HRESULT test_primary_3d_with_listener8(LPGUID lpGuid) &IID_IDirectSoundBuffer, (LPVOID *)&temp_buffer); ok(rc==DS_OK && temp_buffer!=NULL, - "IDirectSoundBuffer_QueryInterface() failed: %08x\n", rc); + "IDirectSoundBuffer_QueryInterface() failed: %08lx\n", rc); ok(temp_buffer==primary,"COM interface broken: %p != %p\n",temp_buffer,primary); if (rc==DS_OK && temp_buffer!=NULL) { ref=IDirectSoundBuffer_Release(temp_buffer); @@ -1048,7 +1048,7 @@ static HRESULT test_primary_3d_with_listener8(LPGUID lpGuid) rc=IDirectSound3DListener_QueryInterface(listener, &IID_IDirectSoundBuffer,(LPVOID *)&temp_buffer); ok(rc==DS_OK && temp_buffer!=NULL, - "IDirectSoundBuffer_QueryInterface() failed: %08x\n", rc); + "IDirectSoundBuffer_QueryInterface() failed: %08lx\n", rc); ok(temp_buffer==primary,"COM interface broken: %p != %p\n",temp_buffer,primary); ref=IDirectSoundBuffer_Release(temp_buffer); ok(ref==1,"IDirectSoundBuffer_Release() has %d references, " @@ -1134,7 +1134,7 @@ static void ds3d8_tests(void) { HRESULT rc; rc = DirectSoundEnumerateA(dsenum_callback, NULL); - ok(rc==DS_OK,"DirectSoundEnumerateA() failed: %08x\n",rc); + ok(rc==DS_OK,"DirectSoundEnumerateA() failed: %08lx\n",rc); trace("tested %u DirectSound drivers\n", driver_count); }
diff --git a/dlls/dsound/tests/dsound.c b/dlls/dsound/tests/dsound.c index a4f59efaad9..d5a3ccad8fd 100644 --- a/dlls/dsound/tests/dsound.c +++ b/dlls/dsound/tests/dsound.c @@ -54,18 +54,18 @@ static void IDirectSound_test(LPDIRECTSOUND dso, BOOL initialized,
/* Try to Query for objects */ rc=IDirectSound_QueryInterface(dso,&IID_IUnknown,(LPVOID*)&unknown); - ok(rc==DS_OK,"IDirectSound_QueryInterface(IID_IUnknown) failed: %08x\n", rc); + ok(rc==DS_OK,"IDirectSound_QueryInterface(IID_IUnknown) failed: %08lx\n", rc); if (rc==DS_OK) IUnknown_Release(unknown);
rc=IDirectSound_QueryInterface(dso,&IID_IDirectSound,(LPVOID*)&ds); - ok(rc==DS_OK,"IDirectSound_QueryInterface(IID_IDirectSound) failed: %08x\n", rc); + ok(rc==DS_OK,"IDirectSound_QueryInterface(IID_IDirectSound) failed: %08lx\n", rc); if (rc==DS_OK) IDirectSound_Release(ds);
rc=IDirectSound_QueryInterface(dso,&IID_IDirectSound8,(LPVOID*)&ds8); ok(rc==E_NOINTERFACE,"IDirectSound_QueryInterface(IID_IDirectSound8) " - "should have failed: %08x\n",rc); + "should have failed: %08lx\n",rc); if (rc==DS_OK) IDirectSound8_Release(ds8);
@@ -73,23 +73,23 @@ static void IDirectSound_test(LPDIRECTSOUND dso, BOOL initialized, /* try uninitialized object */ rc=IDirectSound_GetCaps(dso,0); ok(rc==DSERR_UNINITIALIZED,"IDirectSound_GetCaps(NULL) " - "should have returned DSERR_UNINITIALIZED, returned: %08x\n", rc); + "should have returned DSERR_UNINITIALIZED, returned: %08lx\n", rc);
rc=IDirectSound_GetCaps(dso,&dscaps); ok(rc==DSERR_UNINITIALIZED,"IDirectSound_GetCaps() " - "should have returned DSERR_UNINITIALIZED, returned: %08x\n", rc); + "should have returned DSERR_UNINITIALIZED, returned: %08lx\n", rc);
rc=IDirectSound_Compact(dso); ok(rc==DSERR_UNINITIALIZED,"IDirectSound_Compact() " - "should have returned DSERR_UNINITIALIZED, returned: %08x\n", rc); + "should have returned DSERR_UNINITIALIZED, returned: %08lx\n", rc);
rc=IDirectSound_GetSpeakerConfig(dso,&speaker_config); ok(rc==DSERR_UNINITIALIZED,"IDirectSound_GetSpeakerConfig() " - "should have returned DSERR_UNINITIALIZED, returned: %08x\n", rc); + "should have returned DSERR_UNINITIALIZED, returned: %08lx\n", rc);
rc=IDirectSound_Initialize(dso,lpGuid); ok(rc==DS_OK||rc==DSERR_NODRIVER||rc==DSERR_ALLOCATED||rc==E_FAIL, - "IDirectSound_Initialize() failed: %08x\n",rc); + "IDirectSound_Initialize() failed: %08lx\n",rc); if (rc==DSERR_NODRIVER) { trace(" No Driver\n"); goto EXIT; @@ -104,41 +104,41 @@ static void IDirectSound_test(LPDIRECTSOUND dso, BOOL initialized,
rc=IDirectSound_Initialize(dso,lpGuid); ok(rc==DSERR_ALREADYINITIALIZED, "IDirectSound_Initialize() " - "should have returned DSERR_ALREADYINITIALIZED: %08x\n", rc); + "should have returned DSERR_ALREADYINITIALIZED: %08lx\n", rc);
/* DSOUND: Error: Invalid caps buffer */ rc=IDirectSound_GetCaps(dso,0); ok(rc==DSERR_INVALIDPARAM,"IDirectSound_GetCaps(NULL) " - "should have returned DSERR_INVALIDPARAM, returned: %08x\n", rc); + "should have returned DSERR_INVALIDPARAM, returned: %08lx\n", rc);
ZeroMemory(&dscaps, sizeof(dscaps));
/* DSOUND: Error: Invalid caps buffer */ rc=IDirectSound_GetCaps(dso,&dscaps); ok(rc==DSERR_INVALIDPARAM,"IDirectSound_GetCaps() " - "should have returned DSERR_INVALIDPARAM, returned: %08x\n", rc); + "should have returned DSERR_INVALIDPARAM, returned: %08lx\n", rc);
dscaps.dwSize=sizeof(dscaps);
/* DSOUND: Running on a certified driver */ rc=IDirectSound_GetCaps(dso,&dscaps); - ok(rc==DS_OK,"IDirectSound_GetCaps() failed: %08x\n",rc); + ok(rc==DS_OK,"IDirectSound_GetCaps() failed: %08lx\n",rc);
rc=IDirectSound_Compact(dso); - ok(rc==DSERR_PRIOLEVELNEEDED,"IDirectSound_Compact() failed: %08x\n", rc); + ok(rc==DSERR_PRIOLEVELNEEDED,"IDirectSound_Compact() failed: %08lx\n", rc);
rc=IDirectSound_SetCooperativeLevel(dso,get_hwnd(),DSSCL_PRIORITY); - ok(rc==DS_OK,"IDirectSound_SetCooperativeLevel() failed: %08x\n", rc); + ok(rc==DS_OK,"IDirectSound_SetCooperativeLevel() failed: %08lx\n", rc);
rc=IDirectSound_Compact(dso); - ok(rc==DS_OK,"IDirectSound_Compact() failed: %08x\n",rc); + ok(rc==DS_OK,"IDirectSound_Compact() failed: %08lx\n",rc);
rc=IDirectSound_GetSpeakerConfig(dso,0); ok(rc==DSERR_INVALIDPARAM,"IDirectSound_GetSpeakerConfig(NULL) " - "should have returned DSERR_INVALIDPARAM, returned: %08x\n", rc); + "should have returned DSERR_INVALIDPARAM, returned: %08lx\n", rc);
rc=IDirectSound_GetSpeakerConfig(dso,&speaker_config); - ok(rc==DS_OK,"IDirectSound_GetSpeakerConfig() failed: %08x\n", rc); + ok(rc==DS_OK,"IDirectSound_GetSpeakerConfig() failed: %08lx\n", rc); ref_speaker_config = speaker_config;
speaker_config = DSSPEAKER_COMBINED(DSSPEAKER_STEREO, @@ -148,14 +148,14 @@ static void IDirectSound_test(LPDIRECTSOUND dso, BOOL initialized, DSSPEAKER_GEOMETRY_NARROW); if(rc==DS_OK) { rc=IDirectSound_SetSpeakerConfig(dso,speaker_config); - ok(rc==DS_OK,"IDirectSound_SetSpeakerConfig() failed: %08x\n", rc); + ok(rc==DS_OK,"IDirectSound_SetSpeakerConfig() failed: %08lx\n", rc); } if (rc==DS_OK) { rc=IDirectSound_GetSpeakerConfig(dso,&new_speaker_config); - ok(rc==DS_OK,"IDirectSound_GetSpeakerConfig() failed: %08x\n", rc); + ok(rc==DS_OK,"IDirectSound_GetSpeakerConfig() failed: %08lx\n", rc); if (rc==DS_OK && speaker_config!=new_speaker_config && ref_speaker_config!=new_speaker_config) trace("IDirectSound_GetSpeakerConfig() failed to set speaker " - "config: expected 0x%08x or 0x%08x, got 0x%08x\n", + "config: expected 0x%08lx or 0x%08lx, got 0x%08lx\n", speaker_config,ref_speaker_config,new_speaker_config); IDirectSound_SetSpeakerConfig(dso,ref_speaker_config); } @@ -176,23 +176,23 @@ static void IDirectSound_tests(void) rc=CoGetClassObject(&CLSID_DirectSound, CLSCTX_INPROC_SERVER, NULL, &IID_IClassFactory, (void**)&cf); ok(rc==S_OK,"CoGetClassObject(CLSID_DirectSound, IID_IClassFactory) " - "failed: %08x\n", rc); + "failed: %08lx\n", rc);
rc=CoGetClassObject(&CLSID_DirectSound, CLSCTX_INPROC_SERVER, NULL, &IID_IUnknown, (void**)&cf); ok(rc==S_OK,"CoGetClassObject(CLSID_DirectSound, IID_IUnknown) " - "failed: %08x\n", rc); + "failed: %08lx\n", rc);
/* COM aggregation */ rc=CoCreateInstance(&CLSID_DirectSound, (IUnknown*)0xdeadbeef, CLSCTX_INPROC_SERVER, &IID_IDirectSound, (void**)&dso); ok(rc==CLASS_E_NOAGGREGATION || broken(rc==DSERR_INVALIDPARAM), - "DirectMusicPerformance create failed: %08x, expected CLASS_E_NOAGGREGATION\n", rc); + "DirectMusicPerformance create failed: %08lx, expected CLASS_E_NOAGGREGATION\n", rc);
/* try the COM class factory method of creation with no device specified */ rc=CoCreateInstance(&CLSID_DirectSound, NULL, CLSCTX_INPROC_SERVER, &IID_IDirectSound, (void**)&dso); - ok(rc==S_OK,"CoCreateInstance(CLSID_DirectSound) failed: %08x\n", rc); + ok(rc==S_OK,"CoCreateInstance(CLSID_DirectSound) failed: %08lx\n", rc); if (dso) IDirectSound_test(dso, FALSE, NULL);
@@ -200,7 +200,7 @@ static void IDirectSound_tests(void) * device specified */ rc=CoCreateInstance(&CLSID_DirectSound, NULL, CLSCTX_INPROC_SERVER, &IID_IDirectSound, (void**)&dso); - ok(rc==S_OK,"CoCreateInstance(CLSID_DirectSound) failed: %08x\n", rc); + ok(rc==S_OK,"CoCreateInstance(CLSID_DirectSound) failed: %08lx\n", rc); if (dso) IDirectSound_test(dso, FALSE, &DSDEVID_DefaultPlayback);
@@ -208,7 +208,7 @@ static void IDirectSound_tests(void) * playback device specified */ rc=CoCreateInstance(&CLSID_DirectSound, NULL, CLSCTX_INPROC_SERVER, &IID_IDirectSound, (void**)&dso); - ok(rc==S_OK,"CoCreateInstance(CLSID_DirectSound) failed: %08x\n", rc); + ok(rc==S_OK,"CoCreateInstance(CLSID_DirectSound) failed: %08lx\n", rc); if (dso) IDirectSound_test(dso, FALSE, &DSDEVID_DefaultVoicePlayback);
@@ -218,7 +218,7 @@ static void IDirectSound_tests(void) &CLSID_DirectSoundPrivate, (void**)&dso); ok(rc==E_NOINTERFACE, "CoCreateInstance(CLSID_DirectSound,CLSID_DirectSoundPrivate) " - "should have failed: %08x\n",rc); + "should have failed: %08lx\n",rc);
/* try the COM class factory method of creation with a bad * GUID and IID specified */ @@ -226,33 +226,33 @@ static void IDirectSound_tests(void) &IID_IDirectSound, (void**)&dso); ok(rc==REGDB_E_CLASSNOTREG, "CoCreateInstance(CLSID_DirectSoundPrivate,IID_IDirectSound) " - "should have failed: %08x\n",rc); + "should have failed: %08lx\n",rc);
/* try with no device specified */ rc = DirectSoundCreate(NULL, &dso, NULL); ok(rc==DS_OK||rc==DSERR_NODRIVER||rc==DSERR_ALLOCATED||rc==E_FAIL, - "DirectSoundCreate(NULL) failed: %08x\n",rc); + "DirectSoundCreate(NULL) failed: %08lx\n",rc); if (rc==S_OK && dso) IDirectSound_test(dso, TRUE, NULL);
/* try with default playback device specified */ rc = DirectSoundCreate(&DSDEVID_DefaultPlayback, &dso, NULL); ok(rc==DS_OK||rc==DSERR_NODRIVER||rc==DSERR_ALLOCATED||rc==E_FAIL, - "DirectSoundCreate(DSDEVID_DefaultPlayback) failed: %08x\n", rc); + "DirectSoundCreate(DSDEVID_DefaultPlayback) failed: %08lx\n", rc); if (rc==DS_OK && dso) IDirectSound_test(dso, TRUE, NULL);
/* try with default voice playback device specified */ rc = DirectSoundCreate(&DSDEVID_DefaultVoicePlayback, &dso, NULL); ok(rc==DS_OK||rc==DSERR_NODRIVER||rc==DSERR_ALLOCATED||rc==E_FAIL, - "DirectSoundCreate(DSDEVID_DefaultVoicePlayback) failed: %08x\n", rc); + "DirectSoundCreate(DSDEVID_DefaultVoicePlayback) failed: %08lx\n", rc); if (rc==DS_OK && dso) IDirectSound_test(dso, TRUE, NULL);
/* try with a bad device specified */ rc = DirectSoundCreate(&DSDEVID_DefaultVoiceCapture, &dso, NULL); ok(rc==DSERR_NODRIVER,"DirectSoundCreate(DSDEVID_DefaultVoiceCapture) " - "should have failed: %08x\n",rc); + "should have failed: %08lx\n",rc); if (rc==DS_OK && dso) IDirectSound_Release(dso); } @@ -266,12 +266,12 @@ static HRESULT test_dsound(LPGUID lpGuid) /* DSOUND: Error: Invalid interface buffer */ rc = DirectSoundCreate(lpGuid, 0, NULL); ok(rc==DSERR_INVALIDPARAM,"DirectSoundCreate() should have returned " - "DSERR_INVALIDPARAM, returned: %08x\n",rc); + "DSERR_INVALIDPARAM, returned: %08lx\n",rc);
/* Create the DirectSound object */ rc = DirectSoundCreate(lpGuid, &dso, NULL); ok(rc==DS_OK||rc==DSERR_NODRIVER||rc==DSERR_ALLOCATED||rc==E_FAIL, - "DirectSoundCreate() failed: %08x\n",rc); + "DirectSoundCreate() failed: %08lx\n",rc); if (rc!=DS_OK) return rc;
@@ -281,19 +281,19 @@ static HRESULT test_dsound(LPGUID lpGuid) /* Try the COM class factory method of creation with enumerated device */ rc=CoCreateInstance(&CLSID_DirectSound, NULL, CLSCTX_INPROC_SERVER, &IID_IDirectSound, (void**)&dso); - ok(rc==S_OK,"CoCreateInstance(CLSID_DirectSound) failed: %08x\n", rc); + ok(rc==S_OK,"CoCreateInstance(CLSID_DirectSound) failed: %08lx\n", rc); if (dso) IDirectSound_test(dso, FALSE, lpGuid);
/* Create a DirectSound object */ rc = DirectSoundCreate(lpGuid, &dso, NULL); - ok(rc==DS_OK,"DirectSoundCreate() failed: %08x\n",rc); + ok(rc==DS_OK,"DirectSoundCreate() failed: %08lx\n",rc); if (rc==DS_OK) { LPDIRECTSOUND dso1=NULL;
/* Create a second DirectSound object */ rc = DirectSoundCreate(lpGuid, &dso1, NULL); - ok(rc==DS_OK,"DirectSoundCreate() failed: %08x\n",rc); + ok(rc==DS_OK,"DirectSoundCreate() failed: %08lx\n",rc); if (rc==DS_OK) { /* Release the second DirectSound object */ ref=IDirectSound_Release(dso1); @@ -313,7 +313,7 @@ static HRESULT test_dsound(LPGUID lpGuid)
/* Create a DirectSound object */ rc = DirectSoundCreate(lpGuid, &dso, NULL); - ok(rc==DS_OK,"DirectSoundCreate() failed: %08x\n",rc); + ok(rc==DS_OK,"DirectSoundCreate() failed: %08lx\n",rc); if (rc==DS_OK) { LPDIRECTSOUNDBUFFER secondary; DSBUFFERDESC bufdesc; @@ -329,13 +329,13 @@ static HRESULT test_dsound(LPGUID lpGuid) rc=IDirectSound_CreateSoundBuffer(dso,&bufdesc,&secondary,NULL); ok((rc==DS_OK && secondary!=NULL) || broken(rc == DSERR_CONTROLUNAVAIL), /* vmware drivers on w2k */ "IDirectSound_CreateSoundBuffer() failed to create a secondary " - "buffer %08x\n",rc); + "buffer %08lx\n",rc); if (rc==DS_OK && secondary!=NULL) { LPDIRECTSOUND3DBUFFER buffer3d; rc = IDirectSoundBuffer_QueryInterface(secondary, &IID_IDirectSound3DBuffer, (void **)&buffer3d); ok(rc==DS_OK && buffer3d!=NULL,"IDirectSound_QueryInterface() " - "failed: %08x\n",rc); + "failed: %08lx\n",rc); if (rc==DS_OK && buffer3d!=NULL) { ref=IDirectSound3DBuffer_AddRef(buffer3d); ok(ref==2,"IDirectSound3DBuffer_AddRef() has %d references, " @@ -370,7 +370,7 @@ static HRESULT test_primary(LPGUID lpGuid) /* Create the DirectSound object */ rc = DirectSoundCreate(lpGuid, &dso, NULL); ok(rc==DS_OK||rc==DSERR_NODRIVER||rc==DSERR_ALLOCATED, - "DirectSoundCreate() failed: %08x\n",rc); + "DirectSoundCreate() failed: %08lx\n",rc); if (rc!=DS_OK) return rc;
@@ -378,20 +378,20 @@ static HRESULT test_primary(LPGUID lpGuid) ZeroMemory(&dscaps, sizeof(dscaps)); dscaps.dwSize=sizeof(dscaps); rc=IDirectSound_GetCaps(dso,&dscaps); - ok(rc==DS_OK,"IDirectSound_GetCaps() failed: %08x\n",rc); + ok(rc==DS_OK,"IDirectSound_GetCaps() failed: %08lx\n",rc); if (rc!=DS_OK) goto EXIT;
/* DSOUND: Error: Invalid buffer description pointer */ rc=IDirectSound_CreateSoundBuffer(dso,0,0,NULL); ok(rc==DSERR_INVALIDPARAM, - "IDirectSound_CreateSoundBuffer() should have failed: %08x\n", rc); + "IDirectSound_CreateSoundBuffer() should have failed: %08lx\n", rc);
/* DSOUND: Error: NULL pointer is invalid */ /* DSOUND: Error: Invalid buffer description pointer */ rc=IDirectSound_CreateSoundBuffer(dso,0,&primary,NULL); ok(rc==DSERR_INVALIDPARAM && primary==0, - "IDirectSound_CreateSoundBuffer() should have failed: rc=%08x," + "IDirectSound_CreateSoundBuffer() should have failed: rc=%08lx," "dsbo=%p\n",rc,primary);
/* DSOUND: Error: Invalid size */ @@ -401,7 +401,7 @@ static HRESULT test_primary(LPGUID lpGuid) bufdesc.dwSize=sizeof(bufdesc)-1; rc=IDirectSound_CreateSoundBuffer(dso,&bufdesc,&primary,NULL); ok(rc==DSERR_INVALIDPARAM && primary==0, - "IDirectSound_CreateSoundBuffer() should have failed: rc=%08x," + "IDirectSound_CreateSoundBuffer() should have failed: rc=%08lx," "primary=%p\n",rc,primary);
/* DSOUND: Error: DSBCAPS_PRIMARYBUFFER flag with non-NULL lpwfxFormat */ @@ -413,7 +413,7 @@ static HRESULT test_primary(LPGUID lpGuid) bufdesc.lpwfxFormat=&wfx; rc=IDirectSound_CreateSoundBuffer(dso,&bufdesc,&primary,NULL); ok(rc==DSERR_INVALIDPARAM && primary==0, - "IDirectSound_CreateSoundBuffer() should have failed: rc=%08x," + "IDirectSound_CreateSoundBuffer() should have failed: rc=%08lx," "primary=%p\n",rc,primary);
/* DSOUND: Error: No DSBCAPS_PRIMARYBUFFER flag with NULL lpwfxFormat */ @@ -425,13 +425,13 @@ static HRESULT test_primary(LPGUID lpGuid) bufdesc.lpwfxFormat=NULL; rc=IDirectSound_CreateSoundBuffer(dso,&bufdesc,&primary,NULL); ok(rc==DSERR_INVALIDPARAM && primary==0, - "IDirectSound_CreateSoundBuffer() should have failed: rc=%08x," + "IDirectSound_CreateSoundBuffer() should have failed: rc=%08lx," "primary=%p\n",rc,primary);
/* We must call SetCooperativeLevel before calling CreateSoundBuffer */ /* DSOUND: Setting DirectSound cooperative level to DSSCL_PRIORITY */ rc=IDirectSound_SetCooperativeLevel(dso,get_hwnd(),DSSCL_PRIORITY); - ok(rc==DS_OK,"IDirectSound_SetCooperativeLevel() failed: %08x\n", rc); + ok(rc==DS_OK,"IDirectSound_SetCooperativeLevel() failed: %08lx\n", rc); if (rc!=DS_OK) goto EXIT;
@@ -444,7 +444,7 @@ static HRESULT test_primary(LPGUID lpGuid) init_format(&wfx,WAVE_FORMAT_PCM,11025,8,2); rc=IDirectSound_CreateSoundBuffer(dso,&bufdesc,&primary,NULL); ok(rc==DSERR_INVALIDPARAM,"IDirectSound_CreateSoundBuffer() should have " - "returned DSERR_INVALIDPARAM, returned: %08x\n", rc); + "returned DSERR_INVALIDPARAM, returned: %08lx\n", rc); if (rc==DS_OK && primary!=NULL) IDirectSoundBuffer_Release(primary);
@@ -454,7 +454,7 @@ static HRESULT test_primary(LPGUID lpGuid) bufdesc.dwFlags=DSBCAPS_PRIMARYBUFFER|DSBCAPS_CTRLVOLUME; rc=IDirectSound_CreateSoundBuffer(dso,&bufdesc,&primary,NULL); ok((rc==DS_OK && primary!=NULL) || (rc==DSERR_CONTROLUNAVAIL), - "IDirectSound_CreateSoundBuffer() failed to create a primary buffer: %08x\n",rc); + "IDirectSound_CreateSoundBuffer() failed to create a primary buffer: %08lx\n",rc); if (rc==DSERR_CONTROLUNAVAIL) trace(" No Primary\n"); else if (rc==DS_OK && primary!=NULL) { @@ -467,7 +467,7 @@ static HRESULT test_primary(LPGUID lpGuid) rc=IDirectSound_CreateSoundBuffer(dso,&bufdesc,&second,NULL); ok(rc==DS_OK && second==primary, "IDirectSound_CreateSoundBuffer() should have returned original " - "primary buffer: %08x\n",rc); + "primary buffer: %08lx\n",rc); ref=IDirectSoundBuffer_Release(second); ok(ref==1,"IDirectSoundBuffer_Release() primary has %d references, " "should have 1\n",ref); @@ -477,16 +477,16 @@ static HRESULT test_primary(LPGUID lpGuid) rc=IDirectSound_DuplicateSoundBuffer(dso,primary,&third); /* rc=0x88780032 */ ok(rc!=DS_OK,"IDirectSound_DuplicateSoundBuffer() primary buffer " - "should have failed %08x\n",rc); + "should have failed %08lx\n",rc);
rc=IDirectSoundBuffer_GetVolume(primary,&vol); - ok(rc==DS_OK,"IDirectSoundBuffer_GetVolume() failed: %08x\n", rc); + ok(rc==DS_OK,"IDirectSoundBuffer_GetVolume() failed: %08lx\n", rc);
if (winetest_interactive) { trace("Playing a 5 seconds reference tone at the current " "volume.\n"); if (rc==DS_OK) - trace("(the current volume is %d according to DirectSound)\n", + trace("(the current volume is %ld according to DirectSound)\n", vol); trace("All subsequent tones should be identical to this one.\n"); trace("Listen for stutter, changes in pitch, volume, etc.\n"); @@ -507,13 +507,13 @@ static HRESULT test_primary(LPGUID lpGuid) ok(ref==0,"IDirectSoundBuffer_Release() primary has %d references\n",ref);
rc=IDirectSoundBuffer_QueryInterface(primary,&IID_IDirectSoundNotify,(void **)¬ify); - ok(rc==E_NOINTERFACE,"IDirectSoundBuffer_QueryInterface() failed %08x\n",rc); + ok(rc==E_NOINTERFACE,"IDirectSoundBuffer_QueryInterface() failed %08lx\n",rc); }
/* Set the CooperativeLevel back to normal */ /* DSOUND: Setting DirectSound cooperative level to DSSCL_NORMAL */ rc=IDirectSound_SetCooperativeLevel(dso,get_hwnd(),DSSCL_NORMAL); - ok(rc==DS_OK,"IDirectSound_SetCooperativeLevel() failed: %08x\n", rc); + ok(rc==DS_OK,"IDirectSound_SetCooperativeLevel() failed: %08lx\n", rc);
EXIT: ref=IDirectSound_Release(dso); @@ -541,7 +541,7 @@ static HRESULT test_primary_secondary(LPGUID lpGuid) /* Create the DirectSound object */ rc = DirectSoundCreate(lpGuid, &dso, NULL); ok(rc==DS_OK||rc==DSERR_NODRIVER||rc==DSERR_ALLOCATED, - "DirectSoundCreate() failed: %08x\n",rc); + "DirectSoundCreate() failed: %08lx\n",rc); if (rc!=DS_OK) return rc;
@@ -549,14 +549,14 @@ static HRESULT test_primary_secondary(LPGUID lpGuid) ZeroMemory(&dscaps, sizeof(dscaps)); dscaps.dwSize=sizeof(dscaps); rc=IDirectSound_GetCaps(dso,&dscaps); - ok(rc==DS_OK,"IDirectSound_GetCaps() failed: %08x\n",rc); + ok(rc==DS_OK,"IDirectSound_GetCaps() failed: %08lx\n",rc); if (rc!=DS_OK) goto EXIT;
/* We must call SetCooperativeLevel before creating primary buffer */ /* DSOUND: Setting DirectSound cooperative level to DSSCL_PRIORITY */ rc=IDirectSound_SetCooperativeLevel(dso,get_hwnd(),DSSCL_PRIORITY); - ok(rc==DS_OK,"IDirectSound_SetCooperativeLevel() failed: %08x\n", rc); + ok(rc==DS_OK,"IDirectSound_SetCooperativeLevel() failed: %08lx\n", rc); if (rc!=DS_OK) goto EXIT;
@@ -565,7 +565,7 @@ static HRESULT test_primary_secondary(LPGUID lpGuid) bufdesc.dwFlags=DSBCAPS_PRIMARYBUFFER; rc=IDirectSound_CreateSoundBuffer(dso,&bufdesc,&primary,NULL); ok(rc==DS_OK && primary!=NULL, - "IDirectSound_CreateSoundBuffer() failed to create a primary buffer %08x\n",rc); + "IDirectSound_CreateSoundBuffer() failed to create a primary buffer %08lx\n",rc);
if (rc==DS_OK && primary!=NULL) { for (f = 0; f < ARRAY_SIZE(formats); f++) { @@ -579,7 +579,7 @@ static HRESULT test_primary_secondary(LPGUID lpGuid) /* DSOUND: Setting DirectSound cooperative level to * DSSCL_PRIORITY */ rc=IDirectSound_SetCooperativeLevel(dso,get_hwnd(),DSSCL_PRIORITY); - ok(rc==DS_OK,"IDirectSound_SetCooperativeLevel() failed: %08x\n", rc); + ok(rc==DS_OK,"IDirectSound_SetCooperativeLevel() failed: %08lx\n", rc); if (rc!=DS_OK) goto EXIT;
@@ -589,10 +589,10 @@ static HRESULT test_primary_secondary(LPGUID lpGuid) rc=IDirectSoundBuffer_SetFormat(primary,&wfx);
if (wfx.wBitsPerSample <= 16) - ok(rc==DS_OK,"IDirectSoundBuffer_SetFormat(%s) failed: %08x\n", + ok(rc==DS_OK,"IDirectSoundBuffer_SetFormat(%s) failed: %08lx\n", format_string(&wfx), rc); else - ok(rc==DS_OK || rc == E_INVALIDARG, "SetFormat (%s) failed: %08x\n", + ok(rc==DS_OK || rc == E_INVALIDARG, "SetFormat (%s) failed: %08lx\n", format_string(&wfx), rc);
/* There is no guarantee that SetFormat will actually change the @@ -600,17 +600,17 @@ static HRESULT test_primary_secondary(LPGUID lpGuid) * supports. So we must re-query the format. */ rc=IDirectSoundBuffer_GetFormat(primary,&wfx,sizeof(wfx),NULL); - ok(rc==DS_OK,"IDirectSoundBuffer_GetFormat() failed: %08x\n", rc); + ok(rc==DS_OK,"IDirectSoundBuffer_GetFormat() failed: %08lx\n", rc); if (rc==DS_OK && (wfx.wFormatTag!=wfx2.wFormatTag || wfx.nSamplesPerSec!=wfx2.nSamplesPerSec || wfx.wBitsPerSample!=wfx2.wBitsPerSample || wfx.nChannels!=wfx2.nChannels)) { - trace("Requested primary format tag=0x%04x %dx%dx%d " - "avg.B/s=%d align=%d\n", + trace("Requested primary format tag=0x%04x %ldx%dx%d " + "avg.B/s=%ld align=%d\n", wfx2.wFormatTag,wfx2.nSamplesPerSec,wfx2.wBitsPerSample, wfx2.nChannels,wfx2.nAvgBytesPerSec,wfx2.nBlockAlign); - trace("Got tag=0x%04x %dx%dx%d avg.B/s=%d align=%d\n", + trace("Got tag=0x%04x %ldx%dx%d avg.B/s=%ld align=%d\n", wfx.wFormatTag,wfx.nSamplesPerSec,wfx.wBitsPerSample, wfx.nChannels,wfx.nAvgBytesPerSec,wfx.nBlockAlign); } @@ -618,7 +618,7 @@ static HRESULT test_primary_secondary(LPGUID lpGuid) /* Set the CooperativeLevel back to normal */ /* DSOUND: Setting DirectSound cooperative level to DSSCL_NORMAL */ rc=IDirectSound_SetCooperativeLevel(dso,get_hwnd(),DSSCL_NORMAL); - ok(rc==DS_OK,"IDirectSound_SetCooperativeLevel() failed: %08x\n", rc); + ok(rc==DS_OK,"IDirectSound_SetCooperativeLevel() failed: %08lx\n", rc);
init_format(&wfx2,WAVE_FORMAT_PCM,11025,16,2);
@@ -630,14 +630,14 @@ static HRESULT test_primary_secondary(LPGUID lpGuid) wfx.nBlockAlign); bufdesc.lpwfxFormat=&wfx2; if (winetest_interactive) { - trace(" Testing a primary buffer at %dx%dx%d (fmt=%d) with a " - "secondary buffer at %dx%dx%d\n", + trace(" Testing a primary buffer at %ldx%dx%d (fmt=%d) with a " + "secondary buffer at %ldx%dx%d\n", wfx.nSamplesPerSec,wfx.wBitsPerSample,wfx.nChannels,format_tags[tag], wfx2.nSamplesPerSec,wfx2.wBitsPerSample,wfx2.nChannels); } rc=IDirectSound_CreateSoundBuffer(dso,&bufdesc,&secondary,NULL); ok((rc==DS_OK && secondary!=NULL) || broken(rc == DSERR_CONTROLUNAVAIL), /* vmware drivers on w2k */ - "IDirectSound_CreateSoundBuffer() failed to create a secondary buffer %08x\n",rc); + "IDirectSound_CreateSoundBuffer() failed to create a secondary buffer %08lx\n",rc);
if (rc==DS_OK && secondary!=NULL) { test_buffer(dso,&secondary,0,FALSE,0,FALSE,0, @@ -658,7 +658,7 @@ static HRESULT test_primary_secondary(LPGUID lpGuid) /* Set the CooperativeLevel back to normal */ /* DSOUND: Setting DirectSound cooperative level to DSSCL_NORMAL */ rc=IDirectSound_SetCooperativeLevel(dso,get_hwnd(),DSSCL_NORMAL); - ok(rc==DS_OK,"IDirectSound_SetCooperativeLevel() failed: %08x\n", rc); + ok(rc==DS_OK,"IDirectSound_SetCooperativeLevel() failed: %08lx\n", rc);
EXIT: ref=IDirectSound_Release(dso); @@ -683,7 +683,7 @@ static HRESULT test_secondary(LPGUID lpGuid) /* Create the DirectSound object */ rc = DirectSoundCreate(lpGuid, &dso, NULL); ok(rc==DS_OK||rc==DSERR_NODRIVER||rc==DSERR_ALLOCATED, - "DirectSoundCreate() failed: %08x\n",rc); + "DirectSoundCreate() failed: %08lx\n",rc); if (rc!=DS_OK) return rc;
@@ -691,14 +691,14 @@ static HRESULT test_secondary(LPGUID lpGuid) ZeroMemory(&dscaps, sizeof(dscaps)); dscaps.dwSize=sizeof(dscaps); rc=IDirectSound_GetCaps(dso,&dscaps); - ok(rc==DS_OK,"IDirectSound_GetCaps() failed: %08x\n",rc); + ok(rc==DS_OK,"IDirectSound_GetCaps() failed: %08lx\n",rc); if (rc!=DS_OK) goto EXIT;
/* We must call SetCooperativeLevel before creating primary buffer */ /* DSOUND: Setting DirectSound cooperative level to DSSCL_PRIORITY */ rc=IDirectSound_SetCooperativeLevel(dso,get_hwnd(),DSSCL_PRIORITY); - ok(rc==DS_OK,"IDirectSound_SetCooperativeLevel() failed: %08x\n", rc); + ok(rc==DS_OK,"IDirectSound_SetCooperativeLevel() failed: %08lx\n", rc); if (rc!=DS_OK) goto EXIT;
@@ -707,11 +707,11 @@ static HRESULT test_secondary(LPGUID lpGuid) bufdesc.dwFlags=DSBCAPS_PRIMARYBUFFER; rc=IDirectSound_CreateSoundBuffer(dso,&bufdesc,&primary,NULL); ok(rc==DS_OK && primary!=NULL, - "IDirectSound_CreateSoundBuffer() failed to create a primary buffer %08x\n",rc); + "IDirectSound_CreateSoundBuffer() failed to create a primary buffer %08lx\n",rc);
if (rc==DS_OK && primary!=NULL) { rc=IDirectSoundBuffer_GetFormat(primary,&wfx1,sizeof(wfx1),NULL); - ok(rc==DS_OK,"IDirectSoundBuffer8_Getformat() failed: %08x\n", rc); + ok(rc==DS_OK,"IDirectSoundBuffer8_Getformat() failed: %08lx\n", rc); if (rc!=DS_OK) goto EXIT1;
@@ -733,7 +733,7 @@ static HRESULT test_secondary(LPGUID lpGuid) wfx.nBlockAlign); rc=IDirectSound_CreateSoundBuffer(dso,&bufdesc,&secondary,NULL); ok(rc==DSERR_INVALIDPARAM,"IDirectSound_CreateSoundBuffer() " - "should have returned DSERR_INVALIDPARAM, returned: %08x\n", rc); + "should have returned DSERR_INVALIDPARAM, returned: %08lx\n", rc); if (rc==DS_OK && secondary!=NULL) IDirectSoundBuffer_Release(secondary);
@@ -751,10 +751,10 @@ static HRESULT test_secondary(LPGUID lpGuid) || rc == DS_OK, /* driver dependent? */ "IDirectSound_CreateSoundBuffer() " "should have returned (DSERR_CONTROLUNAVAIL or DSERR_INVALIDCALL) " - "and NULL, returned: %08x %p\n", rc, secondary); + "and NULL, returned: %08lx %p\n", rc, secondary); else ok((rc==DS_OK && secondary!=NULL) || broken(rc == DSERR_CONTROLUNAVAIL), /* vmware drivers on w2k */ - "IDirectSound_CreateSoundBuffer() failed to create a secondary buffer %08x\n",rc); + "IDirectSound_CreateSoundBuffer() failed to create a secondary buffer %08lx\n",rc);
if (secondary) IDirectSoundBuffer_Release(secondary); @@ -770,7 +770,7 @@ static HRESULT test_secondary(LPGUID lpGuid)
rc=IDirectSound_CreateSoundBuffer(dso,&bufdesc,&secondary,NULL); ok((rc==DSERR_INVALIDPARAM || rc==DSERR_INVALIDCALL /* 2003 */) && !secondary, - "IDirectSound_CreateSoundBuffer() returned: %08x %p\n", + "IDirectSound_CreateSoundBuffer() returned: %08lx %p\n", rc, secondary); if (secondary) { @@ -784,7 +784,7 @@ static HRESULT test_secondary(LPGUID lpGuid) ok(((rc==DSERR_CONTROLUNAVAIL || rc==DSERR_INVALIDCALL || rc==DSERR_INVALIDPARAM) && !secondary) || rc==DS_OK, /* 2003 / 2008 */ - "IDirectSound_CreateSoundBuffer() returned: %08x %p\n", + "IDirectSound_CreateSoundBuffer() returned: %08lx %p\n", rc, secondary); if (secondary) { @@ -796,7 +796,7 @@ static HRESULT test_secondary(LPGUID lpGuid) wfxe.SubFormat = GUID_NULL; rc=IDirectSound_CreateSoundBuffer(dso,&bufdesc,&secondary,NULL); ok((rc==DSERR_INVALIDPARAM || rc==DSERR_INVALIDCALL) && !secondary, - "IDirectSound_CreateSoundBuffer() returned: %08x %p\n", + "IDirectSound_CreateSoundBuffer() returned: %08lx %p\n", rc, secondary); if (secondary) { @@ -808,7 +808,7 @@ static HRESULT test_secondary(LPGUID lpGuid) ++wfxe.Samples.wValidBitsPerSample; rc=IDirectSound_CreateSoundBuffer(dso,&bufdesc,&secondary,NULL); ok(rc==DSERR_INVALIDPARAM && !secondary, - "IDirectSound_CreateSoundBuffer() returned: %08x %p\n", + "IDirectSound_CreateSoundBuffer() returned: %08lx %p\n", rc, secondary); if (secondary) { @@ -820,7 +820,7 @@ static HRESULT test_secondary(LPGUID lpGuid) wfxe.Samples.wValidBitsPerSample = 0; rc=IDirectSound_CreateSoundBuffer(dso,&bufdesc,&secondary,NULL); ok(rc==DS_OK && secondary, - "IDirectSound_CreateSoundBuffer() returned: %08x %p\n", + "IDirectSound_CreateSoundBuffer() returned: %08lx %p\n", rc, secondary); if (secondary) { @@ -831,12 +831,12 @@ static HRESULT test_secondary(LPGUID lpGuid)
rc=IDirectSound_CreateSoundBuffer(dso,&bufdesc,&secondary,NULL); ok(rc==DS_OK && secondary!=NULL, - "IDirectSound_CreateSoundBuffer() failed to create a secondary buffer %08x\n",rc); + "IDirectSound_CreateSoundBuffer() failed to create a secondary buffer %08lx\n",rc);
if (rc==DS_OK && secondary!=NULL) { if (winetest_interactive) { - trace(" Testing a secondary buffer at %dx%dx%d (fmt=%d) " - "with a primary buffer at %dx%dx%d\n", + trace(" Testing a secondary buffer at %ldx%dx%d (fmt=%d) " + "with a primary buffer at %ldx%dx%d\n", wfx.nSamplesPerSec,wfx.wBitsPerSample,wfx.nChannels,format_tags[tag], wfx1.nSamplesPerSec,wfx1.wBitsPerSample,wfx1.nChannels); } @@ -858,7 +858,7 @@ EXIT1: /* Set the CooperativeLevel back to normal */ /* DSOUND: Setting DirectSound cooperative level to DSSCL_NORMAL */ rc=IDirectSound_SetCooperativeLevel(dso,get_hwnd(),DSSCL_NORMAL); - ok(rc==DS_OK,"IDirectSound_SetCooperativeLevel() failed: %08x\n", rc); + ok(rc==DS_OK,"IDirectSound_SetCooperativeLevel() failed: %08lx\n", rc);
EXIT: ref=IDirectSound_Release(dso); @@ -883,7 +883,7 @@ static HRESULT test_block_align(LPGUID lpGuid) /* Create the DirectSound object */ rc = DirectSoundCreate(lpGuid, &dso, NULL); ok(rc==DS_OK||rc==DSERR_NODRIVER||rc==DSERR_ALLOCATED, - "DirectSoundCreate() failed: %08x\n",rc); + "DirectSoundCreate() failed: %08lx\n",rc); if (rc!=DS_OK) return rc;
@@ -895,30 +895,30 @@ static HRESULT test_block_align(LPGUID lpGuid) bufdesc.lpwfxFormat=&wfx; rc=IDirectSound_CreateSoundBuffer(dso,&bufdesc,&secondary,NULL); ok(rc == DS_OK || broken(rc == DSERR_CONTROLUNAVAIL), /* vmware drivers on w2k */ - "IDirectSound_CreateSoundBuffer() should have returned DS_OK, returned: %08x\n", rc); + "IDirectSound_CreateSoundBuffer() should have returned DS_OK, returned: %08lx\n", rc);
if (rc==DS_OK && secondary!=NULL) { ZeroMemory(&dsbcaps, sizeof(dsbcaps)); dsbcaps.dwSize = sizeof(dsbcaps); rc=IDirectSoundBuffer_GetCaps(secondary,&dsbcaps); ok(rc==DS_OK,"IDirectSoundBuffer_GetCaps() should have returned DS_OK, " - "returned: %08x\n", rc); + "returned: %08lx\n", rc); if (rc==DS_OK && wfx.nBlockAlign > 1) { ok(dsbcaps.dwBufferBytes==(wfx.nAvgBytesPerSec + wfx.nBlockAlign), - "Buffer size not a multiple of nBlockAlign: requested %d, " - "got %d, should be %d\n", bufdesc.dwBufferBytes, + "Buffer size not a multiple of nBlockAlign: requested %ld, " + "got %ld, should be %ld\n", bufdesc.dwBufferBytes, dsbcaps.dwBufferBytes, wfx.nAvgBytesPerSec + wfx.nBlockAlign);
rc = IDirectSoundBuffer_SetCurrentPosition(secondary, 0); - ok(rc == DS_OK, "Could not set position to 0: %08x\n", rc); + ok(rc == DS_OK, "Could not set position to 0: %08lx\n", rc); rc = IDirectSoundBuffer_GetCurrentPosition(secondary, &pos, NULL); - ok(rc == DS_OK, "Could not get position: %08x\n", rc); + ok(rc == DS_OK, "Could not get position: %08lx\n", rc); rc = IDirectSoundBuffer_SetCurrentPosition(secondary, 1); - ok(rc == DS_OK, "Could not set position to 1: %08x\n", rc); + ok(rc == DS_OK, "Could not set position to 1: %08lx\n", rc); rc = IDirectSoundBuffer_GetCurrentPosition(secondary, &pos2, NULL); - ok(rc == DS_OK, "Could not get new position: %08x\n", rc); - ok(pos == pos2, "Positions not the same! Old position: %d, new position: %d\n", pos, pos2); + ok(rc == DS_OK, "Could not get new position: %08lx\n", rc); + ok(pos == pos2, "Positions not the same! Old position: %ld, new position: %ld\n", pos, pos2); } ref=IDirectSoundBuffer_Release(secondary); ok(ref==0,"IDirectSoundBuffer_Release() secondary has %d references, " @@ -954,7 +954,7 @@ static HRESULT test_frequency(LPGUID lpGuid) /* Create the DirectSound object */ rc = DirectSoundCreate(lpGuid, &dso, NULL); ok(rc==DS_OK||rc==DSERR_NODRIVER||rc==DSERR_ALLOCATED, - "DirectSoundCreate() failed: %08x\n",rc); + "DirectSoundCreate() failed: %08lx\n",rc); if (rc!=DS_OK) return rc;
@@ -962,14 +962,14 @@ static HRESULT test_frequency(LPGUID lpGuid) ZeroMemory(&dscaps, sizeof(dscaps)); dscaps.dwSize=sizeof(dscaps); rc=IDirectSound_GetCaps(dso,&dscaps); - ok(rc==DS_OK,"IDirectSound_GetCaps() failed: %08x\n",rc); + ok(rc==DS_OK,"IDirectSound_GetCaps() failed: %08lx\n",rc); if (rc!=DS_OK) goto EXIT;
/* We must call SetCooperativeLevel before creating primary buffer */ /* DSOUND: Setting DirectSound cooperative level to DSSCL_PRIORITY */ rc=IDirectSound_SetCooperativeLevel(dso,get_hwnd(),DSSCL_PRIORITY); - ok(rc==DS_OK,"IDirectSound_SetCooperativeLevel() failed: %08x\n", rc); + ok(rc==DS_OK,"IDirectSound_SetCooperativeLevel() failed: %08lx\n", rc); if (rc!=DS_OK) goto EXIT;
@@ -978,11 +978,11 @@ static HRESULT test_frequency(LPGUID lpGuid) bufdesc.dwFlags=DSBCAPS_PRIMARYBUFFER; rc=IDirectSound_CreateSoundBuffer(dso,&bufdesc,&primary,NULL); ok(rc==DS_OK && primary!=NULL, - "IDirectSound_CreateSoundBuffer() failed to create a primary buffer %08x\n",rc); + "IDirectSound_CreateSoundBuffer() failed to create a primary buffer %08lx\n",rc);
if (rc==DS_OK && primary!=NULL) { rc=IDirectSoundBuffer_GetFormat(primary,&wfx1,sizeof(wfx1),NULL); - ok(rc==DS_OK,"IDirectSoundBuffer8_Getformat() failed: %08x\n", rc); + ok(rc==DS_OK,"IDirectSoundBuffer8_Getformat() failed: %08lx\n", rc); if (rc!=DS_OK) goto EXIT1;
@@ -998,14 +998,14 @@ static HRESULT test_frequency(LPGUID lpGuid) BUFFER_LEN/1000,wfx.nBlockAlign); bufdesc.lpwfxFormat=&wfx; if (winetest_interactive) { - trace(" Testing a secondary buffer at %dx%dx%d " - "with a primary buffer at %dx%dx%d\n", + trace(" Testing a secondary buffer at %ldx%dx%d " + "with a primary buffer at %ldx%dx%d\n", wfx.nSamplesPerSec,wfx.wBitsPerSample,wfx.nChannels, wfx1.nSamplesPerSec,wfx1.wBitsPerSample,wfx1.nChannels); } rc=IDirectSound_CreateSoundBuffer(dso,&bufdesc,&secondary,NULL); ok((rc==DS_OK && secondary!=NULL) || broken(rc == DSERR_CONTROLUNAVAIL), /* vmware drivers on w2k */ - "IDirectSound_CreateSoundBuffer() failed to create a secondary buffer %08x\n",rc); + "IDirectSound_CreateSoundBuffer() failed to create a secondary buffer %08lx\n",rc);
if (rc==DS_OK && secondary!=NULL) { test_buffer(dso,&secondary,0,FALSE,0,FALSE,0, @@ -1026,7 +1026,7 @@ EXIT1: /* Set the CooperativeLevel back to normal */ /* DSOUND: Setting DirectSound cooperative level to DSSCL_NORMAL */ rc=IDirectSound_SetCooperativeLevel(dso,get_hwnd(),DSSCL_NORMAL); - ok(rc==DS_OK,"IDirectSound_SetCooperativeLevel() failed: %08x\n", rc); + ok(rc==DS_OK,"IDirectSound_SetCooperativeLevel() failed: %08lx\n", rc);
EXIT: ref=IDirectSound_Release(dso); @@ -1046,30 +1046,30 @@ static HRESULT test_notify(LPDIRECTSOUNDBUFFER dsb,
rc=IDirectSoundBuffer_SetCurrentPosition(dsb,0); ok(rc==DS_OK, - "IDirectSoundBuffer_SetCurrentPosition failed %08x\n",rc); + "IDirectSoundBuffer_SetCurrentPosition failed %08lx\n",rc); if(rc!=DS_OK) return rc;
rc=IDirectSoundBuffer_Play(dsb,0,0,0); - ok(rc==DS_OK,"IDirectSoundBuffer_Play failed %08x\n",rc); + ok(rc==DS_OK,"IDirectSoundBuffer_Play failed %08lx\n",rc); if(rc!=DS_OK) return rc;
rc = IDirectSoundBuffer_GetStatus(dsb, &status); - ok(rc == DS_OK,"Failed %08x\n",rc); - ok(status == DSBSTATUS_PLAYING,"got %08x\n", status); + ok(rc == DS_OK,"Failed %08lx\n",rc); + ok(status == DSBSTATUS_PLAYING,"got %08lx\n", status);
rc=IDirectSoundBuffer_Stop(dsb); - ok(rc==DS_OK,"IDirectSoundBuffer_Stop failed %08x\n",rc); + ok(rc==DS_OK,"IDirectSoundBuffer_Stop failed %08lx\n",rc); if(rc!=DS_OK) return rc;
rc = IDirectSoundBuffer_GetStatus(dsb, &status); - ok(rc == DS_OK,"Failed %08x\n",rc); - ok(status == 0 /* Stopped */,"got %08x\n", status); + ok(rc == DS_OK,"Failed %08lx\n",rc); + ok(status == 0 /* Stopped */,"got %08lx\n", status);
ret = WaitForMultipleObjects(count, event, FALSE, 3000); - ok(ret==expected,"expected %d. got %d\n",expected,ret); + ok(ret==expected,"expected %ld. got %ld\n",expected,ret);
return rc; } @@ -1085,14 +1085,14 @@ static HRESULT test_duplicate(LPGUID lpGuid) /* Create the DirectSound object */ rc = DirectSoundCreate(lpGuid, &dso, NULL); ok(rc==DS_OK||rc==DSERR_NODRIVER||rc==DSERR_ALLOCATED, - "DirectSoundCreate() failed: %08x\n",rc); + "DirectSoundCreate() failed: %08lx\n",rc); if (rc!=DS_OK) return rc;
/* We must call SetCooperativeLevel before creating primary buffer */ /* DSOUND: Setting DirectSound cooperative level to DSSCL_PRIORITY */ rc=IDirectSound_SetCooperativeLevel(dso,get_hwnd(),DSSCL_PRIORITY); - ok(rc==DS_OK,"IDirectSound_SetCooperativeLevel() failed: %08x\n", rc); + ok(rc==DS_OK,"IDirectSound_SetCooperativeLevel() failed: %08lx\n", rc); if (rc!=DS_OK) goto EXIT;
@@ -1101,7 +1101,7 @@ static HRESULT test_duplicate(LPGUID lpGuid) bufdesc.dwFlags=DSBCAPS_PRIMARYBUFFER; rc=IDirectSound_CreateSoundBuffer(dso,&bufdesc,&primary,NULL); ok(rc==DS_OK && primary!=NULL,"IDirectSound_CreateSoundBuffer() failed " - "to create a primary buffer %08x\n",rc); + "to create a primary buffer %08lx\n",rc);
if (rc==DS_OK && primary!=NULL) { LPDIRECTSOUNDBUFFER original=NULL; @@ -1116,7 +1116,7 @@ static HRESULT test_duplicate(LPGUID lpGuid) rc=IDirectSound_CreateSoundBuffer(dso,&bufdesc,&original,NULL); ok(rc==DS_OK && original!=NULL, "IDirectSound_CreateSoundBuffer() failed to create an original " - "buffer %08x\n",rc); + "buffer %08lx\n",rc); if (rc==DS_OK && original!=NULL) { LPDIRECTSOUNDBUFFER duplicated=NULL; LPDIRECTSOUNDNOTIFY notify=NULL; @@ -1134,7 +1134,7 @@ static HRESULT test_duplicate(LPGUID lpGuid) rc=IDirectSoundBuffer_Lock(original,0,0,&buf,&bufsize, NULL,NULL,DSBLOCK_ENTIREBUFFER); ok(rc==DS_OK && buf!=NULL, - "IDirectSoundBuffer_Lock failed to lock the buffer %08x\n",rc); + "IDirectSoundBuffer_Lock failed to lock the buffer %08lx\n",rc); if (rc==DS_OK && buf!=NULL) { if (sizeof(void*)==4) { /* crashes on 64-bit */ /* broken apps like Asuka 120% Return BURNING Fest, @@ -1147,7 +1147,7 @@ static HRESULT test_duplicate(LPGUID lpGuid) rc=IDirectSoundBuffer_Unlock(original,buf,bufsize, NULL,0); ok(rc==DS_OK,"IDirectSoundBuffer_Unlock failed to unlock " - "%08x\n",rc); + "%08lx\n",rc); }
rc=IDirectSoundBuffer_QueryInterface(original, @@ -1155,7 +1155,7 @@ static HRESULT test_duplicate(LPGUID lpGuid) (void**)¬ify); ok(rc==DS_OK && notify!=NULL, "IDirectSoundBuffer_QueryInterface() failed to create a " - "notification %08x\n",rc); + "notification %08lx\n",rc); if (rc==DS_OK && notify!=NULL) { DSBPOSITIONNOTIFY dsbpn; LPDIRECTSOUNDNOTIFY dup_notify=NULL; @@ -1165,11 +1165,11 @@ static HRESULT test_duplicate(LPGUID lpGuid) rc=IDirectSoundNotify_SetNotificationPositions(notify, 1,&dsbpn); ok(rc==DS_OK,"IDirectSoundNotify_SetNotificationPositions " - "failed %08x\n",rc); + "failed %08lx\n",rc);
rc=IDirectSound_DuplicateSoundBuffer(dso,original,&duplicated); ok(rc==DS_OK && duplicated!=NULL, - "IDirectSound_DuplicateSoundBuffer failed %08x\n",rc); + "IDirectSound_DuplicateSoundBuffer failed %08lx\n",rc);
trace("testing duplicated buffer without notifications.\n"); test_notify(duplicated, ARRAY_SIZE(event), event, WAIT_TIMEOUT); @@ -1179,14 +1179,14 @@ static HRESULT test_duplicate(LPGUID lpGuid) (void**)&dup_notify); ok(rc==DS_OK&&dup_notify!=NULL, "IDirectSoundBuffer_QueryInterface() failed to create a " - "notification %08x\n",rc); + "notification %08lx\n",rc); if(rc==DS_OK&&dup_notify!=NULL) { dsbpn.dwOffset=DSBPN_OFFSETSTOP; dsbpn.hEventNotify=event[1]; rc=IDirectSoundNotify_SetNotificationPositions(dup_notify, 1,&dsbpn); ok(rc==DS_OK,"IDirectSoundNotify_SetNotificationPositions " - "failed %08x\n",rc); + "failed %08lx\n",rc);
trace("testing duplicated buffer with a notification.\n"); test_notify(duplicated, ARRAY_SIZE(event), event, WAIT_OBJECT_0 + 1); @@ -1218,7 +1218,7 @@ static HRESULT test_duplicate(LPGUID lpGuid) /* Set the CooperativeLevel back to normal */ /* DSOUND: Setting DirectSound cooperative level to DSSCL_NORMAL */ rc=IDirectSound_SetCooperativeLevel(dso,get_hwnd(),DSSCL_NORMAL); - ok(rc==DS_OK,"IDirectSound_SetCooperativeLevel() failed: %08x\n", rc); + ok(rc==DS_OK,"IDirectSound_SetCooperativeLevel() failed: %08lx\n", rc);
EXIT: ref=IDirectSound_Release(dso); @@ -1267,7 +1267,7 @@ static void perform_invalid_fmt_tests(const char *testname, IDirectSound *dso, I wfx.nBlockAlign = wfx.nChannels * wfx.wBitsPerSample / 8; wfx.nAvgBytesPerSec = wfx.nSamplesPerSec * wfx.nBlockAlign; rc = do_invalid_fmt_test(dso, buf, &wfx, &got_buf); - ok(rc == E_INVALIDARG, "%s: SetFormat: %08x\n", testname, rc); + ok(rc == E_INVALIDARG, "%s: SetFormat: %08lx\n", testname, rc);
wfx.nChannels = 2; wfx.nSamplesPerSec = 44100; @@ -1275,7 +1275,7 @@ static void perform_invalid_fmt_tests(const char *testname, IDirectSound *dso, I wfx.nBlockAlign = wfx.nChannels * wfx.wBitsPerSample / 8; wfx.nAvgBytesPerSec = wfx.nSamplesPerSec * wfx.nBlockAlign; rc = do_invalid_fmt_test(dso, buf, &wfx, &got_buf); - ok(rc == E_INVALIDARG, "%s: SetFormat: %08x\n", testname, rc); + ok(rc == E_INVALIDARG, "%s: SetFormat: %08lx\n", testname, rc);
wfx.nChannels = 2; wfx.nSamplesPerSec = 44100; @@ -1283,7 +1283,7 @@ static void perform_invalid_fmt_tests(const char *testname, IDirectSound *dso, I wfx.nBlockAlign = wfx.nChannels * wfx.wBitsPerSample / 8; wfx.nAvgBytesPerSec = wfx.nSamplesPerSec * wfx.nBlockAlign; rc = do_invalid_fmt_test(dso, buf, &wfx, &got_buf); - ok(rc == E_INVALIDARG, "%s: SetFormat: %08x\n", testname, rc); + ok(rc == E_INVALIDARG, "%s: SetFormat: %08lx\n", testname, rc);
wfx.nChannels = 2; wfx.nSamplesPerSec = 44100; @@ -1291,7 +1291,7 @@ static void perform_invalid_fmt_tests(const char *testname, IDirectSound *dso, I wfx.nBlockAlign = wfx.nChannels * wfx.wBitsPerSample / 8; wfx.nAvgBytesPerSec = wfx.nSamplesPerSec * wfx.nBlockAlign; rc = do_invalid_fmt_test(dso, buf, &wfx, &got_buf); - ok(rc == E_INVALIDARG, "%s: SetFormat: %08x\n", testname, rc); + ok(rc == E_INVALIDARG, "%s: SetFormat: %08lx\n", testname, rc);
wfx.nChannels = 2; wfx.nSamplesPerSec = 0; @@ -1299,7 +1299,7 @@ static void perform_invalid_fmt_tests(const char *testname, IDirectSound *dso, I wfx.nBlockAlign = wfx.nChannels * wfx.wBitsPerSample / 8; wfx.nAvgBytesPerSec = wfx.nSamplesPerSec * wfx.nBlockAlign; rc = do_invalid_fmt_test(dso, buf, &wfx, &got_buf); - ok(rc == E_INVALIDARG, "%s: SetFormat: %08x\n", testname, rc); + ok(rc == E_INVALIDARG, "%s: SetFormat: %08lx\n", testname, rc);
wfx.nChannels = 2; wfx.nSamplesPerSec = 44100; @@ -1307,7 +1307,7 @@ static void perform_invalid_fmt_tests(const char *testname, IDirectSound *dso, I wfx.nBlockAlign = 0; wfx.nAvgBytesPerSec = wfx.nSamplesPerSec * wfx.nBlockAlign; rc = do_invalid_fmt_test(dso, buf, &wfx, &got_buf); - ok(rc == E_INVALIDARG, "%s: SetFormat: %08x\n", testname, rc); + ok(rc == E_INVALIDARG, "%s: SetFormat: %08lx\n", testname, rc);
wfx.nChannels = 2; wfx.nSamplesPerSec = 44100; @@ -1315,7 +1315,7 @@ static void perform_invalid_fmt_tests(const char *testname, IDirectSound *dso, I wfx.nBlockAlign = wfx.nChannels * wfx.wBitsPerSample / 8; wfx.nAvgBytesPerSec = 0; rc = do_invalid_fmt_test(dso, buf, &wfx, &got_buf); - ok(rc == E_INVALIDARG, "%s: SetFormat: %08x\n", testname, rc); + ok(rc == E_INVALIDARG, "%s: SetFormat: %08lx\n", testname, rc);
wfx.nChannels = 2; wfx.nSamplesPerSec = 44100; @@ -1323,7 +1323,7 @@ static void perform_invalid_fmt_tests(const char *testname, IDirectSound *dso, I wfx.nBlockAlign = (wfx.nChannels * wfx.wBitsPerSample / 8) - 1; wfx.nAvgBytesPerSec = wfx.nSamplesPerSec * wfx.nBlockAlign; rc = do_invalid_fmt_test(dso, buf, &wfx, &got_buf); - ok(rc == E_INVALIDARG, "%s: SetFormat: %08x\n", testname, rc); + ok(rc == E_INVALIDARG, "%s: SetFormat: %08lx\n", testname, rc);
wfx.nChannels = 2; wfx.nSamplesPerSec = 44100; @@ -1331,7 +1331,7 @@ static void perform_invalid_fmt_tests(const char *testname, IDirectSound *dso, I wfx.nBlockAlign = (wfx.nChannels * wfx.wBitsPerSample / 8) + 1; wfx.nAvgBytesPerSec = wfx.nSamplesPerSec * wfx.nBlockAlign; rc = do_invalid_fmt_test(dso, buf, &wfx, &got_buf); - ok(rc == E_INVALIDARG, "%s: SetFormat: %08x\n", testname, rc); + ok(rc == E_INVALIDARG, "%s: SetFormat: %08lx\n", testname, rc);
wfx.nChannels = 2; wfx.nSamplesPerSec = 44100; @@ -1339,16 +1339,16 @@ static void perform_invalid_fmt_tests(const char *testname, IDirectSound *dso, I wfx.nBlockAlign = wfx.nChannels * wfx.wBitsPerSample / 8; wfx.nAvgBytesPerSec = wfx.nSamplesPerSec * wfx.nBlockAlign + 1; rc = do_invalid_fmt_test(dso, buf, &wfx, &got_buf); - ok(rc == S_OK, "%s: SetFormat: %08x\n", testname, rc); + ok(rc == S_OK, "%s: SetFormat: %08lx\n", testname, rc);
rc = IDirectSoundBuffer_GetFormat(got_buf, &wfx, sizeof(wfx), NULL); - ok(rc == S_OK, "%s: GetFormat: %08x\n", testname, rc); + ok(rc == S_OK, "%s: GetFormat: %08lx\n", testname, rc); ok(wfx.wFormatTag == WAVE_FORMAT_PCM, "%s: format: 0x%x\n", testname, wfx.wFormatTag); ok(wfx.nChannels == 2, "%s: channels: %u\n", testname, wfx.nChannels); - ok(wfx.nSamplesPerSec == 44100, "%s: rate: %u\n", testname, wfx.nSamplesPerSec); + ok(wfx.nSamplesPerSec == 44100, "%s: rate: %lu\n", testname, wfx.nSamplesPerSec); ok(wfx.wBitsPerSample == 16, "%s: bps: %u\n", testname, wfx.wBitsPerSample); ok(wfx.nBlockAlign == 4, "%s: blockalign: %u\n", testname, wfx.nBlockAlign); - ok(wfx.nAvgBytesPerSec == 44100 * 4 + 1, "%s: avgbytes: %u\n", testname, wfx.nAvgBytesPerSec); + ok(wfx.nAvgBytesPerSec == 44100 * 4 + 1, "%s: avgbytes: %lu\n", testname, wfx.nAvgBytesPerSec); IDirectSoundBuffer_Release(got_buf);
wfx.nChannels = 2; @@ -1357,16 +1357,16 @@ static void perform_invalid_fmt_tests(const char *testname, IDirectSound *dso, I wfx.nBlockAlign = wfx.nChannels * wfx.wBitsPerSample / 8; wfx.nAvgBytesPerSec = wfx.nSamplesPerSec * wfx.nBlockAlign - 1; rc = do_invalid_fmt_test(dso, buf, &wfx, &got_buf); - ok(rc == S_OK, "%s: SetFormat: %08x\n", testname, rc); + ok(rc == S_OK, "%s: SetFormat: %08lx\n", testname, rc);
rc = IDirectSoundBuffer_GetFormat(got_buf, &wfx, sizeof(wfx), NULL); - ok(rc == S_OK, "%s: GetFormat: %08x\n", testname, rc); + ok(rc == S_OK, "%s: GetFormat: %08lx\n", testname, rc); ok(wfx.wFormatTag == WAVE_FORMAT_PCM, "%s: format: 0x%x\n", testname, wfx.wFormatTag); ok(wfx.nChannels == 2, "%s: channels: %u\n", testname, wfx.nChannels); - ok(wfx.nSamplesPerSec == 44100, "%s: rate: %u\n", testname, wfx.nSamplesPerSec); + ok(wfx.nSamplesPerSec == 44100, "%s: rate: %lu\n", testname, wfx.nSamplesPerSec); ok(wfx.wBitsPerSample == 16, "%s: bps: %u\n", testname, wfx.wBitsPerSample); ok(wfx.nBlockAlign == 4, "%s: blockalign: %u\n", testname, wfx.nBlockAlign); - ok(wfx.nAvgBytesPerSec == 44100 * 4 - 1, "%s: avgbytes: %u\n", testname, wfx.nAvgBytesPerSec); + ok(wfx.nAvgBytesPerSec == 44100 * 4 - 1, "%s: avgbytes: %lu\n", testname, wfx.nAvgBytesPerSec); IDirectSoundBuffer_Release(got_buf);
wfx.nChannels = 2; @@ -1375,16 +1375,16 @@ static void perform_invalid_fmt_tests(const char *testname, IDirectSound *dso, I wfx.nBlockAlign = wfx.nChannels * wfx.wBitsPerSample / 8; wfx.nAvgBytesPerSec = wfx.nSamplesPerSec * wfx.nBlockAlign + 1; rc = do_invalid_fmt_test(dso, buf, &wfx, &got_buf); - ok(rc == S_OK, "%s: SetFormat: %08x\n", testname, rc); + ok(rc == S_OK, "%s: SetFormat: %08lx\n", testname, rc);
rc = IDirectSoundBuffer_GetFormat(got_buf, &wfx, sizeof(wfx), NULL); - ok(rc == S_OK, "%s: GetFormat: %08x\n", testname, rc); + ok(rc == S_OK, "%s: GetFormat: %08lx\n", testname, rc); ok(wfx.wFormatTag == WAVE_FORMAT_PCM, "%s: format: 0x%x\n", testname, wfx.wFormatTag); ok(wfx.nChannels == 2, "%s: channels: %u\n", testname, wfx.nChannels); - ok(wfx.nSamplesPerSec == 44100, "%s: rate: %u\n", testname, wfx.nSamplesPerSec); + ok(wfx.nSamplesPerSec == 44100, "%s: rate: %lu\n", testname, wfx.nSamplesPerSec); ok(wfx.wBitsPerSample == 16, "%s: bps: %u\n", testname, wfx.wBitsPerSample); ok(wfx.nBlockAlign == 4, "%s: blockalign: %u\n", testname, wfx.nBlockAlign); - ok(wfx.nAvgBytesPerSec == 44100 * 4 + 1, "%s: avgbytes: %u\n", testname, wfx.nAvgBytesPerSec); + ok(wfx.nAvgBytesPerSec == 44100 * 4 + 1, "%s: avgbytes: %lu\n", testname, wfx.nAvgBytesPerSec); IDirectSoundBuffer_Release(got_buf);
if(buf){ @@ -1395,17 +1395,17 @@ static void perform_invalid_fmt_tests(const char *testname, IDirectSound *dso, I wfx.nBlockAlign = wfx.nChannels * wfx.wBitsPerSample / 8; wfx.nAvgBytesPerSec = wfx.nSamplesPerSec * wfx.nBlockAlign; rc = do_invalid_fmt_test(dso, buf, &wfx, &got_buf); - ok(rc == S_OK, "%s: SetFormat: %08x\n", testname, rc); + ok(rc == S_OK, "%s: SetFormat: %08lx\n", testname, rc);
if(got_buf){ rc = IDirectSoundBuffer_GetFormat(got_buf, &wfx, sizeof(wfx), NULL); - ok(rc == S_OK, "%s: GetFormat: %08x\n", testname, rc); + ok(rc == S_OK, "%s: GetFormat: %08lx\n", testname, rc); ok(wfx.wFormatTag == WAVE_FORMAT_ALAW, "%s: format: 0x%x\n", testname, wfx.wFormatTag); ok(wfx.nChannels == 2, "%s: channels: %u\n", testname, wfx.nChannels); - ok(wfx.nSamplesPerSec == 44100, "%s: rate: %u\n", testname, wfx.nSamplesPerSec); + ok(wfx.nSamplesPerSec == 44100, "%s: rate: %lu\n", testname, wfx.nSamplesPerSec); ok(wfx.wBitsPerSample == 16, "%s: bps: %u\n", testname, wfx.wBitsPerSample); ok(wfx.nBlockAlign == 4, "%s: blockalign: %u\n", testname, wfx.nBlockAlign); - ok(wfx.nAvgBytesPerSec == 44100 * 4, "%s: avgbytes: %u\n", testname, wfx.nAvgBytesPerSec); + ok(wfx.nAvgBytesPerSec == 44100 * 4, "%s: avgbytes: %lu\n", testname, wfx.nAvgBytesPerSec); IDirectSoundBuffer_Release(got_buf); } } @@ -1421,16 +1421,16 @@ static void perform_invalid_fmt_tests(const char *testname, IDirectSound *dso, I fmtex.dwChannelMask = SPEAKER_FRONT_LEFT | SPEAKER_FRONT_RIGHT; fmtex.SubFormat = KSDATAFORMAT_SUBTYPE_PCM; rc = do_invalid_fmt_test(dso, buf, (WAVEFORMATEX*)&fmtex, &got_buf); - ok(rc == S_OK, "%s: SetFormat: %08x\n", testname, rc); + ok(rc == S_OK, "%s: SetFormat: %08lx\n", testname, rc);
rc = IDirectSoundBuffer_GetFormat(got_buf, (WAVEFORMATEX*)&fmtex, sizeof(fmtex), NULL); - ok(rc == S_OK, "%s: GetFormat: %08x\n", testname, rc); + ok(rc == S_OK, "%s: GetFormat: %08lx\n", testname, rc); ok(fmtex.Format.wFormatTag == WAVE_FORMAT_EXTENSIBLE, "%s: format: 0x%x\n", testname, fmtex.Format.wFormatTag); ok(fmtex.Format.nChannels == 2, "%s: channels: %u\n", testname, fmtex.Format.nChannels); - ok(fmtex.Format.nSamplesPerSec == 44100, "%s: rate: %u\n", testname, fmtex.Format.nSamplesPerSec); + ok(fmtex.Format.nSamplesPerSec == 44100, "%s: rate: %lu\n", testname, fmtex.Format.nSamplesPerSec); ok(fmtex.Format.wBitsPerSample == 16, "%s: bps: %u\n", testname, fmtex.Format.wBitsPerSample); ok(fmtex.Format.nBlockAlign == 4, "%s: blockalign: %u\n", testname, fmtex.Format.nBlockAlign); - ok(fmtex.Format.nAvgBytesPerSec == 44100 * 4, "%s: avgbytes: %u\n", testname, fmtex.Format.nAvgBytesPerSec); + ok(fmtex.Format.nAvgBytesPerSec == 44100 * 4, "%s: avgbytes: %lu\n", testname, fmtex.Format.nAvgBytesPerSec); ok(fmtex.Samples.wValidBitsPerSample == 0 || /* <= XP */ fmtex.Samples.wValidBitsPerSample == 16, /* >= Vista */ "%s: validbits: %u\n", testname, fmtex.Samples.wValidBitsPerSample); @@ -1448,16 +1448,16 @@ static void perform_invalid_fmt_tests(const char *testname, IDirectSound *dso, I fmtex.dwChannelMask = SPEAKER_FRONT_LEFT | SPEAKER_FRONT_RIGHT; fmtex.SubFormat = KSDATAFORMAT_SUBTYPE_PCM; rc = do_invalid_fmt_test(dso, buf, (WAVEFORMATEX*)&fmtex, &got_buf); - ok(rc == S_OK, "%s: SetFormat: %08x\n", testname, rc); + ok(rc == S_OK, "%s: SetFormat: %08lx\n", testname, rc);
rc = IDirectSoundBuffer_GetFormat(got_buf, (WAVEFORMATEX*)&fmtex, sizeof(fmtex), NULL); - ok(rc == S_OK, "%s: GetFormat: %08x\n", testname, rc); + ok(rc == S_OK, "%s: GetFormat: %08lx\n", testname, rc); ok(fmtex.Format.wFormatTag == WAVE_FORMAT_EXTENSIBLE, "%s: format: 0x%x\n", testname, fmtex.Format.wFormatTag); ok(fmtex.Format.nChannels == 2, "%s: channels: %u\n", testname, fmtex.Format.nChannels); - ok(fmtex.Format.nSamplesPerSec == 44100, "%s: rate: %u\n", testname, fmtex.Format.nSamplesPerSec); + ok(fmtex.Format.nSamplesPerSec == 44100, "%s: rate: %lu\n", testname, fmtex.Format.nSamplesPerSec); ok(fmtex.Format.wBitsPerSample == 24, "%s: bps: %u\n", testname, fmtex.Format.wBitsPerSample); ok(fmtex.Format.nBlockAlign == 6, "%s: blockalign: %u\n", testname, fmtex.Format.nBlockAlign); - ok(fmtex.Format.nAvgBytesPerSec == 44100 * 6, "%s: avgbytes: %u\n", testname, fmtex.Format.nAvgBytesPerSec); + ok(fmtex.Format.nAvgBytesPerSec == 44100 * 6, "%s: avgbytes: %lu\n", testname, fmtex.Format.nAvgBytesPerSec); ok(fmtex.Samples.wValidBitsPerSample == 20, "%s: validbits: %u\n", testname, fmtex.Samples.wValidBitsPerSample); ok(IsEqualGUID(&fmtex.SubFormat, &KSDATAFORMAT_SUBTYPE_PCM), "%s: subtype incorrect\n", testname); IDirectSoundBuffer_Release(got_buf); @@ -1473,7 +1473,7 @@ static void perform_invalid_fmt_tests(const char *testname, IDirectSound *dso, I fmtex.dwChannelMask = SPEAKER_FRONT_LEFT | SPEAKER_FRONT_RIGHT; fmtex.SubFormat = KSDATAFORMAT_SUBTYPE_PCM; rc = do_invalid_fmt_test(dso, buf, (WAVEFORMATEX*)&fmtex, &got_buf); - ok(rc == E_INVALIDARG, "%s: SetFormat: %08x\n", testname, rc); + ok(rc == E_INVALIDARG, "%s: SetFormat: %08lx\n", testname, rc); }
static HRESULT test_invalid_fmts(LPGUID lpGuid) @@ -1486,14 +1486,14 @@ static HRESULT test_invalid_fmts(LPGUID lpGuid) /* Create the DirectSound object */ rc = DirectSoundCreate(lpGuid, &dso, NULL); ok(rc==DS_OK||rc==DSERR_NODRIVER||rc==DSERR_ALLOCATED, - "DirectSoundCreate() failed: %08x\n",rc); + "DirectSoundCreate() failed: %08lx\n",rc); if (rc!=DS_OK) return rc;
/* We must call SetCooperativeLevel before creating primary buffer */ /* DSOUND: Setting DirectSound cooperative level to DSSCL_PRIORITY */ rc=IDirectSound_SetCooperativeLevel(dso,get_hwnd(),DSSCL_PRIORITY); - ok(rc==DS_OK,"IDirectSound_SetCooperativeLevel() failed: %08x\n", rc); + ok(rc==DS_OK,"IDirectSound_SetCooperativeLevel() failed: %08lx\n", rc); if (rc!=DS_OK){ IDirectSound_Release(dso); return rc; @@ -1504,7 +1504,7 @@ static HRESULT test_invalid_fmts(LPGUID lpGuid) bufdesc.dwFlags=DSBCAPS_PRIMARYBUFFER; rc=IDirectSound_CreateSoundBuffer(dso,&bufdesc,&buffer,NULL); ok(rc==DS_OK && buffer!=NULL,"IDirectSound_CreateSoundBuffer() failed " - "to create a primary buffer %08x\n",rc); + "to create a primary buffer %08lx\n",rc); if (rc==DS_OK && buffer!=NULL) { perform_invalid_fmt_tests("primary", dso, buffer); IDirectSoundBuffer_Release(buffer); @@ -1532,12 +1532,12 @@ static void test_notifications(LPGUID lpGuid)
rc = DirectSoundCreate(lpGuid, &dso, NULL); ok(rc == DS_OK || rc == DSERR_NODRIVER || rc == DSERR_ALLOCATED, - "DirectSoundCreate() failed: %08x\n", rc); + "DirectSoundCreate() failed: %08lx\n", rc); if(rc != DS_OK) return;
rc = IDirectSound_SetCooperativeLevel(dso, get_hwnd(), DSSCL_PRIORITY); - ok(rc == DS_OK, "IDirectSound_SetCooperativeLevel() failed: %08x\n", rc); + ok(rc == DS_OK, "IDirectSound_SetCooperativeLevel() failed: %08lx\n", rc); if(rc != DS_OK){ IDirectSound_Release(dso); return; @@ -1558,10 +1558,10 @@ static void test_notifications(LPGUID lpGuid) bufdesc.lpwfxFormat = &wfx; rc = IDirectSound_CreateSoundBuffer(dso, &bufdesc, &buf, NULL); ok(rc == DS_OK && buf != NULL, "IDirectSound_CreateSoundBuffer() failed " - "to create a buffer %08x\n", rc); + "to create a buffer %08lx\n", rc);
rc = IDirectSoundBuffer_QueryInterface(buf, &IID_IDirectSoundNotify, (void**)&buf_notif); - ok(rc == E_NOINTERFACE, "QueryInterface(IID_IDirectSoundNotify): %08x\n", rc); + ok(rc == E_NOINTERFACE, "QueryInterface(IID_IDirectSoundNotify): %08lx\n", rc); IDirectSoundBuffer_Release(buf);
ZeroMemory(&bufdesc, sizeof(bufdesc)); @@ -1571,10 +1571,10 @@ static void test_notifications(LPGUID lpGuid) bufdesc.lpwfxFormat = &wfx; rc = IDirectSound_CreateSoundBuffer(dso, &bufdesc, &buf, NULL); ok(rc == DS_OK && buf != NULL, "IDirectSound_CreateSoundBuffer() failed " - "to create a buffer %08x\n", rc); + "to create a buffer %08lx\n", rc);
rc = IDirectSoundBuffer_QueryInterface(buf, &IID_IDirectSoundNotify, (void**)&buf_notif); - ok(rc == DS_OK, "QueryInterface(IID_IDirectSoundNotify): %08x\n", rc); + ok(rc == DS_OK, "QueryInterface(IID_IDirectSoundNotify): %08lx\n", rc);
notifies[0].dwOffset = 0; handles[0] = notifies[0].hEventNotify = CreateEventW(NULL, FALSE, FALSE, NULL); @@ -1582,12 +1582,12 @@ static void test_notifications(LPGUID lpGuid) handles[1] = notifies[1].hEventNotify = CreateEventW(NULL, FALSE, FALSE, NULL);
rc = IDirectSoundNotify_SetNotificationPositions(buf_notif, 2, notifies); - ok(rc == DS_OK, "SetNotificationPositions: %08x\n", rc); + ok(rc == DS_OK, "SetNotificationPositions: %08lx\n", rc);
IDirectSoundNotify_Release(buf_notif);
rc = IDirectSoundBuffer_Play(buf, 0, 0, DSBPLAY_LOOPING); - ok(rc == DS_OK, "Play: %08x\n", rc); + ok(rc == DS_OK, "Play: %08lx\n", rc);
expect = 0; for(cycles = 0; cycles < 6 /* 1.5s */; ++cycles){ @@ -1595,21 +1595,21 @@ static void test_notifications(LPGUID lpGuid)
wait = WaitForMultipleObjects(2, handles, FALSE, 1000); ok(wait <= WAIT_OBJECT_0 + 1 && wait - WAIT_OBJECT_0 == expect, - "Got unexpected notification order or timeout: %u\n", wait); + "Got unexpected notification order or timeout: %lu\n", wait);
rc = IDirectSoundBuffer_GetStatus(buf, &status); - ok(rc == DS_OK,"Failed %08x\n",rc); - ok(status == (DSBSTATUS_PLAYING | DSBSTATUS_LOOPING),"got %08x\n", status); + ok(rc == DS_OK,"Failed %08lx\n",rc); + ok(status == (DSBSTATUS_PLAYING | DSBSTATUS_LOOPING),"got %08lx\n", status);
expect = !expect; }
rc = IDirectSoundBuffer_Stop(buf); - ok(rc == DS_OK, "Stop: %08x\n", rc); + ok(rc == DS_OK, "Stop: %08lx\n", rc);
rc = IDirectSoundBuffer_GetStatus(buf, &status); - ok(rc == DS_OK,"Failed %08x\n",rc); - ok(status == 0,"got %08x\n", status); + ok(rc == DS_OK,"Failed %08lx\n",rc); + ok(status == 0,"got %08lx\n", status);
CloseHandle(notifies[0].hEventNotify); CloseHandle(notifies[1].hEventNotify); @@ -1658,7 +1658,7 @@ static void dsound_tests(void) { HRESULT rc; rc = DirectSoundEnumerateA(&dsenum_callback, NULL); - ok(rc==DS_OK,"DirectSoundEnumerateA() failed: %08x\n",rc); + ok(rc==DS_OK,"DirectSoundEnumerateA() failed: %08lx\n",rc); }
static void test_hw_buffers(void) @@ -1675,16 +1675,16 @@ static void test_hw_buffers(void)
hr = DirectSoundCreate(NULL, &ds, NULL); ok(hr == S_OK || hr == DSERR_NODRIVER || hr == DSERR_ALLOCATED || hr == E_FAIL, - "DirectSoundCreate failed: %08x\n", hr); + "DirectSoundCreate failed: %08lx\n", hr); if(hr != S_OK) return;
caps.dwSize = sizeof(caps);
hr = IDirectSound_GetCaps(ds, &caps); - ok(hr == S_OK, "GetCaps failed: %08x\n", hr); + ok(hr == S_OK, "GetCaps failed: %08lx\n", hr);
- ok(caps.dwPrimaryBuffers == 1, "Got wrong number of primary buffers: %u\n", + ok(caps.dwPrimaryBuffers == 1, "Got wrong number of primary buffers: %lu\n", caps.dwPrimaryBuffers);
/* DSBCAPS_LOC* is ignored for primary buffers */ @@ -1697,7 +1697,7 @@ static void test_hw_buffers(void) bufdesc.guid3DAlgorithm = GUID_NULL;
hr = IDirectSound_CreateSoundBuffer(ds, &bufdesc, &primary, NULL); - ok(hr == S_OK, "CreateSoundBuffer failed: %08x\n", hr); + ok(hr == S_OK, "CreateSoundBuffer failed: %08lx\n", hr); if(hr != S_OK){ IDirectSound_Release(ds); return; @@ -1707,7 +1707,7 @@ static void test_hw_buffers(void) DSBCAPS_PRIMARYBUFFER;
hr = IDirectSound_CreateSoundBuffer(ds, &bufdesc, &primary2, NULL); - ok(hr == S_OK, "CreateSoundBuffer failed: %08x\n", hr); + ok(hr == S_OK, "CreateSoundBuffer failed: %08lx\n", hr); ok(primary == primary2, "Got different primary buffers: %p, %p\n", primary, primary2); if(hr == S_OK) IDirectSoundBuffer_Release(primary2); @@ -1715,7 +1715,7 @@ static void test_hw_buffers(void) buf8 = (IDirectSoundBuffer8 *)0xDEADBEEF; hr = IDirectSoundBuffer_QueryInterface(primary, &IID_IDirectSoundBuffer8, (void**)&buf8); - ok(hr == E_NOINTERFACE, "QueryInterface gave wrong failure: %08x\n", hr); + ok(hr == E_NOINTERFACE, "QueryInterface gave wrong failure: %08lx\n", hr); ok(buf8 == NULL, "Pointer didn't get set to NULL\n");
fmt.wFormatTag = WAVE_FORMAT_PCM; @@ -1735,21 +1735,21 @@ static void test_hw_buffers(void) sizeof(IDirectSoundBuffer *) * caps.dwMaxHwMixingAllBuffers);
/* try to fill all of the hw buffers */ - trace("dwMaxHwMixingAllBuffers: %u\n", caps.dwMaxHwMixingAllBuffers); - trace("dwMaxHwMixingStaticBuffers: %u\n", caps.dwMaxHwMixingStaticBuffers); - trace("dwMaxHwMixingStreamingBuffers: %u\n", caps.dwMaxHwMixingStreamingBuffers); + trace("dwMaxHwMixingAllBuffers: %lu\n", caps.dwMaxHwMixingAllBuffers); + trace("dwMaxHwMixingStaticBuffers: %lu\n", caps.dwMaxHwMixingStaticBuffers); + trace("dwMaxHwMixingStreamingBuffers: %lu\n", caps.dwMaxHwMixingStreamingBuffers); for(i = 0; i < caps.dwMaxHwMixingAllBuffers; ++i){ hr = IDirectSound_CreateSoundBuffer(ds, &bufdesc, &secondaries[i], NULL); ok(hr == S_OK || hr == E_NOTIMPL || broken(hr == DSERR_CONTROLUNAVAIL) || broken(hr == E_FAIL), - "CreateSoundBuffer(%u) failed: %08x\n", i, hr); + "CreateSoundBuffer(%u) failed: %08lx\n", i, hr); if(hr != S_OK) break;
bufcaps.dwSize = sizeof(bufcaps); hr = IDirectSoundBuffer_GetCaps(secondaries[i], &bufcaps); - ok(hr == S_OK, "GetCaps failed: %08x\n", hr); + ok(hr == S_OK, "GetCaps failed: %08lx\n", hr); ok((bufcaps.dwFlags & DSBCAPS_LOCHARDWARE) != 0, - "Buffer wasn't allocated in hardware, dwFlags: %x\n", bufcaps.dwFlags); + "Buffer wasn't allocated in hardware, dwFlags: %lx\n", bufcaps.dwFlags); }
/* see if we can create one more */ @@ -1760,7 +1760,7 @@ static void test_hw_buffers(void) broken(hr == DSERR_CONTROLUNAVAIL) || /* vmware winxp, others? */ broken(hr == E_FAIL) || /* broken AC97 driver */ broken(hr == S_OK) /* broken driver allows more hw bufs than dscaps claims */, - "CreateSoundBuffer(%u) gave wrong error: %08x\n", i, hr); + "CreateSoundBuffer(%u) gave wrong error: %08lx\n", i, hr); if(hr == S_OK) IDirectSoundBuffer_Release(secondary);
diff --git a/dlls/dsound/tests/dsound8.c b/dlls/dsound/tests/dsound8.c index e3adbfbe70e..70db008a0df 100644 --- a/dlls/dsound/tests/dsound8.c +++ b/dlls/dsound/tests/dsound8.c @@ -70,18 +70,18 @@ static void IDirectSound8_test(LPDIRECTSOUND8 dso, BOOL initialized,
/* Try to Query for objects */ rc=IDirectSound8_QueryInterface(dso,&IID_IUnknown,(LPVOID*)&unknown); - ok(rc==DS_OK,"IDirectSound8_QueryInterface(IID_IUnknown) failed: %08x\n", rc); + ok(rc==DS_OK,"IDirectSound8_QueryInterface(IID_IUnknown) failed: %08lx\n", rc); if (rc==DS_OK) IUnknown_Release(unknown);
rc=IDirectSound8_QueryInterface(dso,&IID_IDirectSound,(LPVOID*)&ds); - ok(rc==DS_OK,"IDirectSound8_QueryInterface(IID_IDirectSound) failed: %08x\n", rc); + ok(rc==DS_OK,"IDirectSound8_QueryInterface(IID_IDirectSound) failed: %08lx\n", rc); if (rc==DS_OK) IDirectSound_Release(ds);
rc=IDirectSound8_QueryInterface(dso,&IID_IDirectSound8,(LPVOID*)&ds8); ok(rc==DS_OK,"IDirectSound8_QueryInterface(IID_IDirectSound8) " - "should have returned DSERR_INVALIDPARAM, returned: %08x\n", rc); + "should have returned DSERR_INVALIDPARAM, returned: %08lx\n", rc); if (rc==DS_OK) IDirectSound8_Release(ds8);
@@ -89,27 +89,27 @@ static void IDirectSound8_test(LPDIRECTSOUND8 dso, BOOL initialized, /* try uninitialized object */ rc=IDirectSound8_GetCaps(dso,0); ok(rc==DSERR_UNINITIALIZED,"IDirectSound8_GetCaps(NULL) " - "should have returned DSERR_UNINITIALIZED, returned: %08x\n", rc); + "should have returned DSERR_UNINITIALIZED, returned: %08lx\n", rc);
rc=IDirectSound8_GetCaps(dso,&dscaps); ok(rc==DSERR_UNINITIALIZED,"IDirectSound8_GetCaps() " - "should have returned DSERR_UNINITIALIZED, returned: %08x\n", rc); + "should have returned DSERR_UNINITIALIZED, returned: %08lx\n", rc);
rc=IDirectSound8_Compact(dso); ok(rc==DSERR_UNINITIALIZED,"IDirectSound8_Compact() " - "should have returned DSERR_UNINITIALIZED, returned: %08x\n", rc); + "should have returned DSERR_UNINITIALIZED, returned: %08lx\n", rc);
rc=IDirectSound8_GetSpeakerConfig(dso,&speaker_config); ok(rc==DSERR_UNINITIALIZED,"IDirectSound8_GetSpeakerConfig() " - "should have returned DSERR_UNINITIALIZED, returned: %08x\n", rc); + "should have returned DSERR_UNINITIALIZED, returned: %08lx\n", rc);
rc=IDirectSound8_VerifyCertification(dso, &certified); ok(rc==DSERR_UNINITIALIZED,"IDirectSound8_VerifyCertification() " - "should have returned DSERR_UNINITIALIZED, returned: %08x\n", rc); + "should have returned DSERR_UNINITIALIZED, returned: %08lx\n", rc);
rc=IDirectSound8_Initialize(dso,lpGuid); ok(rc==DS_OK||rc==DSERR_NODRIVER||rc==DSERR_ALLOCATED||rc==E_FAIL, - "IDirectSound8_Initialize() failed: %08x\n",rc); + "IDirectSound8_Initialize() failed: %08lx\n",rc); if (rc==DSERR_NODRIVER) { trace(" No Driver\n"); goto EXIT; @@ -124,41 +124,41 @@ static void IDirectSound8_test(LPDIRECTSOUND8 dso, BOOL initialized,
rc=IDirectSound8_Initialize(dso,lpGuid); ok(rc==DSERR_ALREADYINITIALIZED, "IDirectSound8_Initialize() " - "should have returned DSERR_ALREADYINITIALIZED: %08x\n", rc); + "should have returned DSERR_ALREADYINITIALIZED: %08lx\n", rc);
/* DSOUND: Error: Invalid caps buffer */ rc=IDirectSound8_GetCaps(dso,0); ok(rc==DSERR_INVALIDPARAM,"IDirectSound8_GetCaps() " - "should have returned DSERR_INVALIDPARAM, returned: %08x\n", rc); + "should have returned DSERR_INVALIDPARAM, returned: %08lx\n", rc);
ZeroMemory(&dscaps, sizeof(dscaps));
/* DSOUND: Error: Invalid caps buffer */ rc=IDirectSound8_GetCaps(dso,&dscaps); ok(rc==DSERR_INVALIDPARAM,"IDirectSound8_GetCaps() " - "should have returned DSERR_INVALIDPARAM, returned: %08x\n", rc); + "should have returned DSERR_INVALIDPARAM, returned: %08lx\n", rc);
dscaps.dwSize=sizeof(dscaps);
/* DSOUND: Running on a certified driver */ rc=IDirectSound8_GetCaps(dso,&dscaps); - ok(rc==DS_OK,"IDirectSound8_GetCaps() failed: %08x\n",rc); + ok(rc==DS_OK,"IDirectSound8_GetCaps() failed: %08lx\n",rc);
rc=IDirectSound8_Compact(dso); - ok(rc==DSERR_PRIOLEVELNEEDED,"IDirectSound8_Compact() failed: %08x\n", rc); + ok(rc==DSERR_PRIOLEVELNEEDED,"IDirectSound8_Compact() failed: %08lx\n", rc);
rc=IDirectSound8_SetCooperativeLevel(dso,get_hwnd(),DSSCL_PRIORITY); - ok(rc==DS_OK,"IDirectSound8_SetCooperativeLevel() failed: %08x\n", rc); + ok(rc==DS_OK,"IDirectSound8_SetCooperativeLevel() failed: %08lx\n", rc);
rc=IDirectSound8_Compact(dso); - ok(rc==DS_OK,"IDirectSound8_Compact() failed: %08x\n",rc); + ok(rc==DS_OK,"IDirectSound8_Compact() failed: %08lx\n",rc);
rc=IDirectSound8_GetSpeakerConfig(dso,0); ok(rc==DSERR_INVALIDPARAM,"IDirectSound8_GetSpeakerConfig(NULL) " - "should have returned DSERR_INVALIDPARAM, returned: %08x\n", rc); + "should have returned DSERR_INVALIDPARAM, returned: %08lx\n", rc);
rc=IDirectSound8_GetSpeakerConfig(dso,&speaker_config); - ok(rc==DS_OK,"IDirectSound8_GetSpeakerConfig() failed: %08x\n", rc); + ok(rc==DS_OK,"IDirectSound8_GetSpeakerConfig() failed: %08lx\n", rc); ref_speaker_config = speaker_config;
speaker_config = DSSPEAKER_COMBINED(DSSPEAKER_STEREO, @@ -168,20 +168,20 @@ static void IDirectSound8_test(LPDIRECTSOUND8 dso, BOOL initialized, DSSPEAKER_GEOMETRY_NARROW); if(rc==DS_OK) { rc=IDirectSound8_SetSpeakerConfig(dso,speaker_config); - ok(rc==DS_OK,"IDirectSound8_SetSpeakerConfig() failed: %08x\n", rc); + ok(rc==DS_OK,"IDirectSound8_SetSpeakerConfig() failed: %08lx\n", rc); } if (rc==DS_OK) { rc=IDirectSound8_GetSpeakerConfig(dso,&new_speaker_config); - ok(rc==DS_OK,"IDirectSound8_GetSpeakerConfig() failed: %08x\n", rc); + ok(rc==DS_OK,"IDirectSound8_GetSpeakerConfig() failed: %08lx\n", rc); if (rc==DS_OK && speaker_config!=new_speaker_config && ref_speaker_config!=new_speaker_config) trace("IDirectSound8_GetSpeakerConfig() failed to set speaker " - "config: expected 0x%08x or 0x%08x, got 0x%08x\n", + "config: expected 0x%08lx or 0x%08lx, got 0x%08lx\n", speaker_config,ref_speaker_config,new_speaker_config); IDirectSound8_SetSpeakerConfig(dso,ref_speaker_config); }
rc=IDirectSound8_VerifyCertification(dso, &certified); - ok(rc==DS_OK||rc==E_NOTIMPL,"IDirectSound8_VerifyCertification() failed: %08x\n", rc); + ok(rc==DS_OK||rc==E_NOTIMPL,"IDirectSound8_VerifyCertification() failed: %08lx\n", rc);
EXIT: ref=IDirectSound8_Release(dso); @@ -199,17 +199,17 @@ static void IDirectSound8_tests(void) rc=CoGetClassObject(&CLSID_DirectSound8, CLSCTX_INPROC_SERVER, NULL, &IID_IClassFactory, (void**)&cf); ok(rc==S_OK,"CoGetClassObject(CLSID_DirectSound8, IID_IClassFactory) " - "failed: %08x\n", rc); + "failed: %08lx\n", rc);
rc=CoGetClassObject(&CLSID_DirectSound8, CLSCTX_INPROC_SERVER, NULL, &IID_IUnknown, (void**)&cf); ok(rc==S_OK,"CoGetClassObject(CLSID_DirectSound8, IID_IUnknown) " - "failed: %08x\n", rc); + "failed: %08lx\n", rc);
/* try the COM class factory method of creation with no device specified */ rc=CoCreateInstance(&CLSID_DirectSound8, NULL, CLSCTX_INPROC_SERVER, &IID_IDirectSound8, (void**)&dso); - ok(rc==S_OK||rc==REGDB_E_CLASSNOTREG,"CoCreateInstance() failed: %08x\n", rc); + ok(rc==S_OK||rc==REGDB_E_CLASSNOTREG,"CoCreateInstance() failed: %08lx\n", rc); if (rc==REGDB_E_CLASSNOTREG) { trace(" Class Not Registered\n"); return; @@ -221,7 +221,7 @@ static void IDirectSound8_tests(void) * device specified */ rc=CoCreateInstance(&CLSID_DirectSound8, NULL, CLSCTX_INPROC_SERVER, &IID_IDirectSound8, (void**)&dso); - ok(rc==S_OK,"CoCreateInstance(CLSID_DirectSound8) failed: %08x\n", rc); + ok(rc==S_OK,"CoCreateInstance(CLSID_DirectSound8) failed: %08lx\n", rc); if (dso) IDirectSound8_test(dso, FALSE, &DSDEVID_DefaultPlayback);
@@ -229,7 +229,7 @@ static void IDirectSound8_tests(void) * playback device specified */ rc=CoCreateInstance(&CLSID_DirectSound8, NULL, CLSCTX_INPROC_SERVER, &IID_IDirectSound8, (void**)&dso); - ok(rc==S_OK,"CoCreateInstance(CLSID_DirectSound8) failed: %08x\n", rc); + ok(rc==S_OK,"CoCreateInstance(CLSID_DirectSound8) failed: %08lx\n", rc); if (dso) IDirectSound8_test(dso, FALSE, &DSDEVID_DefaultVoicePlayback);
@@ -239,7 +239,7 @@ static void IDirectSound8_tests(void) &CLSID_DirectSoundPrivate, (void**)&dso); ok(rc==E_NOINTERFACE, "CoCreateInstance(CLSID_DirectSound8,CLSID_DirectSoundPrivate) " - "should have failed: %08x\n",rc); + "should have failed: %08lx\n",rc);
/* try the COM class factory method of creation with a bad * GUID and IID specified */ @@ -247,33 +247,33 @@ static void IDirectSound8_tests(void) &IID_IDirectSound8, (void**)&dso); ok(rc==REGDB_E_CLASSNOTREG, "CoCreateInstance(CLSID_DirectSoundPrivate,IID_IDirectSound8) " - "should have failed: %08x\n",rc); + "should have failed: %08lx\n",rc);
/* try with no device specified */ rc = DirectSoundCreate8(NULL, &dso, NULL); ok(rc==S_OK||rc==DSERR_NODRIVER||rc==DSERR_ALLOCATED||rc==E_FAIL, - "DirectSoundCreate8() failed: %08x\n",rc); + "DirectSoundCreate8() failed: %08lx\n",rc); if (rc==DS_OK && dso) IDirectSound8_test(dso, TRUE, NULL);
/* try with default playback device specified */ rc = DirectSoundCreate8(&DSDEVID_DefaultPlayback, &dso, NULL); ok(rc==S_OK||rc==DSERR_NODRIVER||rc==DSERR_ALLOCATED||rc==E_FAIL, - "DirectSoundCreate8() failed: %08x\n",rc); + "DirectSoundCreate8() failed: %08lx\n",rc); if (rc==DS_OK && dso) IDirectSound8_test(dso, TRUE, NULL);
/* try with default voice playback device specified */ rc = DirectSoundCreate8(&DSDEVID_DefaultVoicePlayback, &dso, NULL); ok(rc==S_OK||rc==DSERR_NODRIVER||rc==DSERR_ALLOCATED||rc==E_FAIL, - "DirectSoundCreate8() failed: %08x\n",rc); + "DirectSoundCreate8() failed: %08lx\n",rc); if (rc==DS_OK && dso) IDirectSound8_test(dso, TRUE, NULL);
/* try with a bad device specified */ rc = DirectSoundCreate8(&DSDEVID_DefaultVoiceCapture, &dso, NULL); ok(rc==DSERR_NODRIVER,"DirectSoundCreate8(DSDEVID_DefaultVoiceCapture) " - "should have failed: %08x\n",rc); + "should have failed: %08lx\n",rc); }
static HRESULT test_dsound8(LPGUID lpGuid) @@ -285,12 +285,12 @@ static HRESULT test_dsound8(LPGUID lpGuid) /* DSOUND: Error: Invalid interface buffer */ rc = DirectSoundCreate8(lpGuid, 0, NULL); ok(rc==DSERR_INVALIDPARAM,"DirectSoundCreate8() should have returned " - "DSERR_INVALIDPARAM, returned: %08x\n",rc); + "DSERR_INVALIDPARAM, returned: %08lx\n",rc);
/* Create the DirectSound8 object */ rc = DirectSoundCreate8(lpGuid, &dso, NULL); ok(rc==DS_OK||rc==DSERR_NODRIVER||rc==DSERR_ALLOCATED||rc==E_FAIL, - "DirectSoundCreate8() failed: %08x\n",rc); + "DirectSoundCreate8() failed: %08lx\n",rc); if (rc!=DS_OK) return rc;
@@ -300,19 +300,19 @@ static HRESULT test_dsound8(LPGUID lpGuid) /* Try the COM class factory method of creation with enumerated device */ rc=CoCreateInstance(&CLSID_DirectSound8, NULL, CLSCTX_INPROC_SERVER, &IID_IDirectSound8, (void**)&dso); - ok(rc==S_OK,"CoCreateInstance(CLSID_DirectSound) failed: %08x\n", rc); + ok(rc==S_OK,"CoCreateInstance(CLSID_DirectSound) failed: %08lx\n", rc); if (dso) IDirectSound8_test(dso, FALSE, lpGuid);
/* Create a DirectSound8 object */ rc = DirectSoundCreate8(lpGuid, &dso, NULL); - ok(rc==DS_OK,"DirectSoundCreate8() failed: %08x\n",rc); + ok(rc==DS_OK,"DirectSoundCreate8() failed: %08lx\n",rc); if (rc==DS_OK) { LPDIRECTSOUND8 dso1=NULL;
/* Create a second DirectSound8 object */ rc = DirectSoundCreate8(lpGuid, &dso1, NULL); - ok(rc==DS_OK,"DirectSoundCreate8() failed: %08x\n",rc); + ok(rc==DS_OK,"DirectSoundCreate8() failed: %08lx\n",rc); if (rc==DS_OK) { /* Release the second DirectSound8 object */ ref=IDirectSound8_Release(dso1); @@ -333,7 +333,7 @@ static HRESULT test_dsound8(LPGUID lpGuid)
/* Create a DirectSound8 object */ rc = DirectSoundCreate8(lpGuid, &dso, NULL); - ok(rc==DS_OK,"DirectSoundCreate8() failed: %08x\n",rc); + ok(rc==DS_OK,"DirectSoundCreate8() failed: %08lx\n",rc); if (rc==DS_OK) { LPDIRECTSOUNDBUFFER secondary; DSBUFFERDESC bufdesc; @@ -349,7 +349,7 @@ static HRESULT test_dsound8(LPGUID lpGuid) rc=IDirectSound8_CreateSoundBuffer(dso,&bufdesc,&secondary,NULL); ok(rc==DS_OK && secondary!=NULL, "IDirectSound8_CreateSoundBuffer() failed to create a secondary " - "buffer: %08x\n",rc); + "buffer: %08lx\n",rc); if (rc==DS_OK && secondary!=NULL) { LPDIRECTSOUND3DBUFFER buffer3d; LPDIRECTSOUNDBUFFER8 buffer8; @@ -357,7 +357,7 @@ static HRESULT test_dsound8(LPGUID lpGuid) &IID_IDirectSound3DBuffer, (void **)&buffer3d); ok(rc==DS_OK && buffer3d!=NULL, - "IDirectSound8_QueryInterface() failed: %08x\n", rc); + "IDirectSound8_QueryInterface() failed: %08lx\n", rc); if (rc==DS_OK && buffer3d!=NULL) { ref=IDirectSound3DBuffer_AddRef(buffer3d); ok(ref==2,"IDirectSound3DBuffer_AddRef() has %d references, " @@ -403,7 +403,7 @@ static HRESULT test_primary8(LPGUID lpGuid) /* Create the DirectSound object */ rc = DirectSoundCreate8(lpGuid, &dso, NULL); ok(rc==DS_OK||rc==DSERR_NODRIVER||rc==DSERR_ALLOCATED, - "DirectSoundCreate8() failed: %08x\n",rc); + "DirectSoundCreate8() failed: %08lx\n",rc); if (rc!=DS_OK) return rc;
@@ -411,7 +411,7 @@ static HRESULT test_primary8(LPGUID lpGuid) ZeroMemory(&dscaps, sizeof(dscaps)); dscaps.dwSize=sizeof(dscaps); rc=IDirectSound8_GetCaps(dso,&dscaps); - ok(rc==DS_OK,"IDirectSound8_GetCaps() failed: %08x\n",rc); + ok(rc==DS_OK,"IDirectSound8_GetCaps() failed: %08lx\n",rc); if (rc!=DS_OK) goto EXIT;
@@ -419,13 +419,13 @@ static HRESULT test_primary8(LPGUID lpGuid) rc=IDirectSound8_CreateSoundBuffer(dso,0,0,NULL); ok(rc==DSERR_INVALIDPARAM, "IDirectSound8_CreateSoundBuffer should have returned " - "DSERR_INVALIDPARAM, returned: %08x\n",rc); + "DSERR_INVALIDPARAM, returned: %08lx\n",rc);
/* DSOUND: Error: Invalid buffer description pointer */ rc=IDirectSound8_CreateSoundBuffer(dso,0,&primary,NULL); ok(rc==DSERR_INVALIDPARAM && primary==0, "IDirectSound8_CreateSoundBuffer() should have returned " - "DSERR_INVALIDPARAM, returned: rc=%08x,dsbo=%p\n", + "DSERR_INVALIDPARAM, returned: rc=%08lx,dsbo=%p\n", rc,primary);
ZeroMemory(&bufdesc, sizeof(bufdesc)); @@ -434,7 +434,7 @@ static HRESULT test_primary8(LPGUID lpGuid) /* DSOUND: Error: Invalid dsound buffer interface pointer */ rc=IDirectSound8_CreateSoundBuffer(dso,&bufdesc,0,NULL); ok(rc==DSERR_INVALIDPARAM && primary==0, - "IDirectSound8_CreateSoundBuffer() should have failed: rc=%08x," + "IDirectSound8_CreateSoundBuffer() should have failed: rc=%08lx," "dsbo=%p\n",rc,primary);
ZeroMemory(&bufdesc, sizeof(bufdesc)); @@ -443,13 +443,13 @@ static HRESULT test_primary8(LPGUID lpGuid) /* DSOUND: Error: Invalid buffer description */ rc=IDirectSound8_CreateSoundBuffer(dso,&bufdesc,&primary,NULL); ok(rc==DSERR_INVALIDPARAM && primary==0, - "IDirectSound8_CreateSoundBuffer() should have failed: rc=%08x," + "IDirectSound8_CreateSoundBuffer() should have failed: rc=%08lx," "primary=%p\n",rc,primary);
/* We must call SetCooperativeLevel before calling CreateSoundBuffer */ /* DSOUND: Setting DirectSound cooperative level to DSSCL_PRIORITY */ rc=IDirectSound8_SetCooperativeLevel(dso,get_hwnd(),DSSCL_PRIORITY); - ok(rc==DS_OK,"IDirectSound8_SetCooperativeLevel() failed: %08x\n", rc); + ok(rc==DS_OK,"IDirectSound8_SetCooperativeLevel() failed: %08lx\n", rc); if (rc!=DS_OK) goto EXIT;
@@ -462,7 +462,7 @@ static HRESULT test_primary8(LPGUID lpGuid) init_format(&wfx,WAVE_FORMAT_PCM,11025,8,2); rc=IDirectSound8_CreateSoundBuffer(dso,&bufdesc,&primary,NULL); ok(rc==DSERR_INVALIDPARAM,"IDirectSound8_CreateSoundBuffer() should have " - "returned DSERR_INVALIDPARAM, returned: %08x\n", rc); + "returned DSERR_INVALIDPARAM, returned: %08lx\n", rc); if (rc==DS_OK && primary!=NULL) IDirectSoundBuffer_Release(primary);
@@ -473,7 +473,7 @@ static HRESULT test_primary8(LPGUID lpGuid) rc=IDirectSound8_CreateSoundBuffer(dso,&bufdesc,&primary,NULL); ok((rc==DS_OK && primary!=NULL) || (rc==DSERR_CONTROLUNAVAIL), "IDirectSound8_CreateSoundBuffer() failed to create a primary buffer: " - "%08x\n",rc); + "%08lx\n",rc); if (rc==DSERR_CONTROLUNAVAIL) trace(" No Primary\n"); else if (rc==DS_OK && primary!=NULL) { @@ -485,7 +485,7 @@ static HRESULT test_primary8(LPGUID lpGuid) rc=IDirectSound8_CreateSoundBuffer(dso,&bufdesc,&second,NULL); ok(rc==DS_OK && second==primary, "IDirectSound8_CreateSoundBuffer() should have returned original " - "primary buffer: %08x\n",rc); + "primary buffer: %08lx\n",rc); ref=IDirectSoundBuffer_Release(second); ok(ref==1,"IDirectSoundBuffer_Release() primary has %d references, " "should have 1\n",ref); @@ -495,19 +495,19 @@ static HRESULT test_primary8(LPGUID lpGuid) rc=IDirectSound8_DuplicateSoundBuffer(dso,primary,&third); /* rc=0x88780032 */ ok(rc!=DS_OK,"IDirectSound8_DuplicateSoundBuffer() primary buffer " - "should have failed %08x\n",rc); + "should have failed %08lx\n",rc);
/* Primary buffers don't have an IDirectSoundBuffer8 */ rc = IDirectSoundBuffer_QueryInterface(primary, &IID_IDirectSoundBuffer8, (LPVOID*)&pb8); - ok(FAILED(rc), "Primary buffer does have an IDirectSoundBuffer8: %08x\n", rc); + ok(FAILED(rc), "Primary buffer does have an IDirectSoundBuffer8: %08lx\n", rc);
rc=IDirectSoundBuffer_GetVolume(primary,&vol); - ok(rc==DS_OK,"IDirectSoundBuffer_GetVolume() failed: %08x\n", rc); + ok(rc==DS_OK,"IDirectSoundBuffer_GetVolume() failed: %08lx\n", rc);
if (winetest_interactive) { trace("Playing a 5 seconds reference tone at the current volume.\n"); if (rc==DS_OK) - trace("(the current volume is %d according to DirectSound)\n", + trace("(the current volume is %ld according to DirectSound)\n", vol); trace("All subsequent tones should be identical to this one.\n"); trace("Listen for stutter, changes in pitch, volume, etc.\n"); @@ -524,7 +524,7 @@ static HRESULT test_primary8(LPGUID lpGuid) /* Set the CooperativeLevel back to normal */ /* DSOUND: Setting DirectSound cooperative level to DSSCL_NORMAL */ rc=IDirectSound8_SetCooperativeLevel(dso,get_hwnd(),DSSCL_NORMAL); - ok(rc==DS_OK,"IDirectSound8_SetCooperativeLevel() failed: %08x\n", rc); + ok(rc==DS_OK,"IDirectSound8_SetCooperativeLevel() failed: %08lx\n", rc);
EXIT: ref=IDirectSound8_Release(dso); @@ -553,7 +553,7 @@ static HRESULT test_primary_secondary8(LPGUID lpGuid) /* Create the DirectSound object */ rc = DirectSoundCreate8(lpGuid, &dso, NULL); ok(rc==DS_OK||rc==DSERR_NODRIVER||rc==DSERR_ALLOCATED, - "DirectSoundCreate8() failed: %08x\n",rc); + "DirectSoundCreate8() failed: %08lx\n",rc); if (rc!=DS_OK) return rc;
@@ -561,14 +561,14 @@ static HRESULT test_primary_secondary8(LPGUID lpGuid) ZeroMemory(&dscaps, sizeof(dscaps)); dscaps.dwSize=sizeof(dscaps); rc=IDirectSound8_GetCaps(dso,&dscaps); - ok(rc==DS_OK,"IDirectSound8_GetCaps() failed: %08x\n",rc); + ok(rc==DS_OK,"IDirectSound8_GetCaps() failed: %08lx\n",rc); if (rc!=DS_OK) goto EXIT;
/* We must call SetCooperativeLevel before creating primary buffer */ /* DSOUND: Setting DirectSound cooperative level to DSSCL_PRIORITY */ rc=IDirectSound8_SetCooperativeLevel(dso,get_hwnd(),DSSCL_PRIORITY); - ok(rc==DS_OK,"IDirectSound8_SetCooperativeLevel() failed: %08x\n", rc); + ok(rc==DS_OK,"IDirectSound8_SetCooperativeLevel() failed: %08lx\n", rc); if (rc!=DS_OK) goto EXIT;
@@ -578,7 +578,7 @@ static HRESULT test_primary_secondary8(LPGUID lpGuid) rc=IDirectSound8_CreateSoundBuffer(dso,&bufdesc,&primary,NULL); ok(rc==DS_OK && primary!=NULL, "IDirectSound8_CreateSoundBuffer() failed to create a primary buffer " - "%08x\n",rc); + "%08lx\n",rc);
if (rc==DS_OK && primary!=NULL) { for (f = 0; f < ARRAY_SIZE(formats); f++) { @@ -592,7 +592,7 @@ static HRESULT test_primary_secondary8(LPGUID lpGuid) /* DSOUND: Setting DirectSound cooperative level to * DSSCL_PRIORITY */ rc=IDirectSound8_SetCooperativeLevel(dso,get_hwnd(),DSSCL_PRIORITY); - ok(rc==DS_OK,"IDirectSound8_SetCooperativeLevel() failed: %08x\n", rc); + ok(rc==DS_OK,"IDirectSound8_SetCooperativeLevel() failed: %08lx\n", rc); if (rc!=DS_OK) goto EXIT;
@@ -602,7 +602,7 @@ static HRESULT test_primary_secondary8(LPGUID lpGuid) rc=IDirectSoundBuffer_SetFormat(primary,&wfx); ok(rc==DS_OK || rc==DSERR_INVALIDPARAM, /* 2003 */ - "IDirectSoundBuffer_SetFormat(%s) failed: %08x\n", + "IDirectSoundBuffer_SetFormat(%s) failed: %08lx\n", format_string(&wfx), rc);
/* There is no guarantee that SetFormat will actually change the @@ -610,17 +610,17 @@ static HRESULT test_primary_secondary8(LPGUID lpGuid) * supports. So we must re-query the format. */ rc=IDirectSoundBuffer_GetFormat(primary,&wfx,sizeof(wfx),NULL); - ok(rc==DS_OK,"IDirectSoundBuffer_GetFormat() failed: %08x\n", rc); + ok(rc==DS_OK,"IDirectSoundBuffer_GetFormat() failed: %08lx\n", rc); if (rc==DS_OK && (wfx.wFormatTag!=wfx2.wFormatTag || wfx.nSamplesPerSec!=wfx2.nSamplesPerSec || wfx.wBitsPerSample!=wfx2.wBitsPerSample || wfx.nChannels!=wfx2.nChannels)) { - trace("Requested primary format tag=0x%04x %dx%dx%d " - "avg.B/s=%d align=%d\n", + trace("Requested primary format tag=0x%04x %ldx%dx%d " + "avg.B/s=%ld align=%d\n", wfx2.wFormatTag,wfx2.nSamplesPerSec,wfx2.wBitsPerSample, wfx2.nChannels,wfx2.nAvgBytesPerSec,wfx2.nBlockAlign); - trace("Got tag=0x%04x %dx%dx%d avg.B/s=%d align=%d\n", + trace("Got tag=0x%04x %ldx%dx%d avg.B/s=%ld align=%d\n", wfx.wFormatTag,wfx.nSamplesPerSec,wfx.wBitsPerSample, wfx.nChannels,wfx.nAvgBytesPerSec,wfx.nBlockAlign); } @@ -628,7 +628,7 @@ static HRESULT test_primary_secondary8(LPGUID lpGuid) /* Set the CooperativeLevel back to normal */ /* DSOUND: Setting DirectSound cooperative level to DSSCL_NORMAL */ rc=IDirectSound8_SetCooperativeLevel(dso,get_hwnd(),DSSCL_NORMAL); - ok(rc==DS_OK,"IDirectSound8_SetCooperativeLevel() failed: %08x\n", rc); + ok(rc==DS_OK,"IDirectSound8_SetCooperativeLevel() failed: %08lx\n", rc);
init_format(&wfx2,WAVE_FORMAT_PCM,11025,16,2);
@@ -640,15 +640,15 @@ static HRESULT test_primary_secondary8(LPGUID lpGuid) wfx.nBlockAlign); bufdesc.lpwfxFormat=&wfx2; if (winetest_interactive) { - trace(" Testing a primary buffer at %dx%dx%d (fmt=%d) with a " - "secondary buffer at %dx%dx%d\n", + trace(" Testing a primary buffer at %ldx%dx%d (fmt=%d) with a " + "secondary buffer at %ldx%dx%d\n", wfx.nSamplesPerSec,wfx.wBitsPerSample,wfx.nChannels,format_tags[tag], wfx2.nSamplesPerSec,wfx2.wBitsPerSample,wfx2.nChannels); } rc=IDirectSound8_CreateSoundBuffer(dso,&bufdesc,&secondary,NULL); ok(rc==DS_OK && secondary!=NULL, "IDirectSound_CreateSoundBuffer() failed to create a secondary " - "buffer %08x\n",rc); + "buffer %08lx\n",rc);
if (rc==DS_OK && secondary!=NULL) { test_buffer8(dso,&secondary,FALSE,FALSE,0,FALSE,0, @@ -669,7 +669,7 @@ static HRESULT test_primary_secondary8(LPGUID lpGuid) /* Set the CooperativeLevel back to normal */ /* DSOUND: Setting DirectSound cooperative level to DSSCL_NORMAL */ rc=IDirectSound8_SetCooperativeLevel(dso,get_hwnd(),DSSCL_NORMAL); - ok(rc==DS_OK,"IDirectSound8_SetCooperativeLevel() failed: %08x\n", rc); + ok(rc==DS_OK,"IDirectSound8_SetCooperativeLevel() failed: %08lx\n", rc);
EXIT: ref=IDirectSound8_Release(dso); @@ -694,7 +694,7 @@ static HRESULT test_secondary8(LPGUID lpGuid) /* Create the DirectSound object */ rc = DirectSoundCreate8(lpGuid, &dso, NULL); ok(rc==DS_OK||rc==DSERR_NODRIVER||rc==DSERR_ALLOCATED, - "DirectSoundCreate8() failed: %08x\n",rc); + "DirectSoundCreate8() failed: %08lx\n",rc); if (rc!=DS_OK) return rc;
@@ -702,14 +702,14 @@ static HRESULT test_secondary8(LPGUID lpGuid) ZeroMemory(&dscaps, sizeof(dscaps)); dscaps.dwSize=sizeof(dscaps); rc=IDirectSound8_GetCaps(dso,&dscaps); - ok(rc==DS_OK,"IDirectSound8_GetCaps() failed: %08x\n",rc); + ok(rc==DS_OK,"IDirectSound8_GetCaps() failed: %08lx\n",rc); if (rc!=DS_OK) goto EXIT;
/* We must call SetCooperativeLevel before creating primary buffer */ /* DSOUND: Setting DirectSound cooperative level to DSSCL_PRIORITY */ rc=IDirectSound8_SetCooperativeLevel(dso,get_hwnd(),DSSCL_PRIORITY); - ok(rc==DS_OK,"IDirectSound8_SetCooperativeLevel() failed: %08x\n", rc); + ok(rc==DS_OK,"IDirectSound8_SetCooperativeLevel() failed: %08lx\n", rc); if (rc!=DS_OK) goto EXIT;
@@ -719,11 +719,11 @@ static HRESULT test_secondary8(LPGUID lpGuid) rc=IDirectSound8_CreateSoundBuffer(dso,&bufdesc,&primary,NULL); ok(rc==DS_OK && primary!=NULL, "IDirectSound8_CreateSoundBuffer() failed to create a primary buffer " - "%08x\n",rc); + "%08lx\n",rc);
if (rc==DS_OK && primary!=NULL) { rc=IDirectSoundBuffer_GetFormat(primary,&wfx1,sizeof(wfx1),NULL); - ok(rc==DS_OK,"IDirectSoundBuffer8_Getformat() failed: %08x\n", rc); + ok(rc==DS_OK,"IDirectSoundBuffer8_Getformat() failed: %08lx\n", rc); if (rc!=DS_OK) goto EXIT1;
@@ -745,7 +745,7 @@ static HRESULT test_secondary8(LPGUID lpGuid) wfx.nBlockAlign); rc=IDirectSound8_CreateSoundBuffer(dso,&bufdesc,&secondary,NULL); ok(rc==DSERR_INVALIDPARAM,"IDirectSound8_CreateSoundBuffer() " - "should have returned DSERR_INVALIDPARAM, returned: %08x\n", rc); + "should have returned DSERR_INVALIDPARAM, returned: %08lx\n", rc); if (rc==DS_OK && secondary!=NULL) IDirectSoundBuffer_Release(secondary);
@@ -762,11 +762,11 @@ static HRESULT test_secondary8(LPGUID lpGuid) || rc == DS_OK, /* driver dependent? */ "IDirectSound_CreateSoundBuffer() " "should have returned (DSERR_CONTROLUNAVAIL or DSERR_INVALIDCALL) " - "and NULL, returned: %08x %p\n", rc, secondary); + "and NULL, returned: %08lx %p\n", rc, secondary); else ok(rc==DS_OK && secondary!=NULL, "IDirectSound_CreateSoundBuffer() failed to create a secondary " - "buffer %08x\n",rc); + "buffer %08lx\n",rc); if (secondary) IDirectSoundBuffer_Release(secondary); secondary = NULL; @@ -781,7 +781,7 @@ static HRESULT test_secondary8(LPGUID lpGuid)
rc=IDirectSound8_CreateSoundBuffer(dso,&bufdesc,&secondary,NULL); ok(rc==DSERR_INVALIDPARAM && !secondary, - "IDirectSound_CreateSoundBuffer() returned: %08x %p\n", + "IDirectSound_CreateSoundBuffer() returned: %08lx %p\n", rc, secondary); if (secondary) { @@ -794,7 +794,7 @@ static HRESULT test_secondary8(LPGUID lpGuid) rc=IDirectSound8_CreateSoundBuffer(dso,&bufdesc,&secondary,NULL); ok(((rc==DSERR_CONTROLUNAVAIL || rc==DSERR_INVALIDCALL /* 2003 */ || rc==DSERR_INVALIDPARAM) && !secondary) || rc==DS_OK /* driver dependent? */, - "IDirectSound_CreateSoundBuffer() returned: %08x %p\n", + "IDirectSound_CreateSoundBuffer() returned: %08lx %p\n", rc, secondary); if (secondary) { @@ -806,7 +806,7 @@ static HRESULT test_secondary8(LPGUID lpGuid) wfxe.SubFormat = GUID_NULL; rc=IDirectSound8_CreateSoundBuffer(dso,&bufdesc,&secondary,NULL); ok((rc==DSERR_INVALIDPARAM || rc==DSERR_INVALIDCALL) && !secondary, - "IDirectSound_CreateSoundBuffer() returned: %08x %p\n", + "IDirectSound_CreateSoundBuffer() returned: %08lx %p\n", rc, secondary); if (secondary) { @@ -817,7 +817,7 @@ static HRESULT test_secondary8(LPGUID lpGuid) wfxe.Format.cbSize = sizeof(wfxe); rc=IDirectSound8_CreateSoundBuffer(dso,&bufdesc,&secondary,NULL); ok((rc==DSERR_CONTROLUNAVAIL || rc==DSERR_INVALIDCALL || rc==DSERR_INVALIDPARAM) && !secondary, - "IDirectSound_CreateSoundBuffer() returned: %08x %p\n", + "IDirectSound_CreateSoundBuffer() returned: %08lx %p\n", rc, secondary); if (secondary) { @@ -828,7 +828,7 @@ static HRESULT test_secondary8(LPGUID lpGuid) wfxe.SubFormat = (format_tags[tag] == WAVE_FORMAT_PCM ? KSDATAFORMAT_SUBTYPE_PCM : KSDATAFORMAT_SUBTYPE_IEEE_FLOAT); rc=IDirectSound8_CreateSoundBuffer(dso,&bufdesc,&secondary,NULL); ok(rc==DS_OK && secondary, - "IDirectSound_CreateSoundBuffer() returned: %08x %p\n", + "IDirectSound_CreateSoundBuffer() returned: %08lx %p\n", rc, secondary); if (secondary) { @@ -840,7 +840,7 @@ static HRESULT test_secondary8(LPGUID lpGuid) rc=IDirectSound8_CreateSoundBuffer(dso,&bufdesc,&secondary,NULL); ok(((rc==DSERR_CONTROLUNAVAIL || rc==DSERR_INVALIDCALL /* 2003 */ || rc==DSERR_INVALIDPARAM) && !secondary) || rc==DS_OK /* driver dependent? */, - "IDirectSound_CreateSoundBuffer() returned: %08x %p\n", + "IDirectSound_CreateSoundBuffer() returned: %08lx %p\n", rc, secondary); if (secondary) { @@ -852,7 +852,7 @@ static HRESULT test_secondary8(LPGUID lpGuid) ++wfxe.Samples.wValidBitsPerSample; rc=IDirectSound8_CreateSoundBuffer(dso,&bufdesc,&secondary,NULL); ok(rc==DSERR_INVALIDPARAM && !secondary, - "IDirectSound_CreateSoundBuffer() returned: %08x %p\n", + "IDirectSound_CreateSoundBuffer() returned: %08lx %p\n", rc, secondary); if (secondary) { @@ -864,7 +864,7 @@ static HRESULT test_secondary8(LPGUID lpGuid) wfxe.Samples.wValidBitsPerSample = 0; rc=IDirectSound8_CreateSoundBuffer(dso,&bufdesc,&secondary,NULL); ok(rc==DS_OK && secondary, - "IDirectSound_CreateSoundBuffer() returned: %08x %p\n", + "IDirectSound_CreateSoundBuffer() returned: %08lx %p\n", rc, secondary); if (secondary) { @@ -876,12 +876,12 @@ static HRESULT test_secondary8(LPGUID lpGuid) rc=IDirectSound8_CreateSoundBuffer(dso,&bufdesc,&secondary,NULL); ok(rc==DS_OK && secondary!=NULL, "IDirectSound_CreateSoundBuffer() failed to create a secondary " - "buffer %08x\n",rc); + "buffer %08lx\n",rc);
if (rc==DS_OK && secondary!=NULL) { if (winetest_interactive) { - trace(" Testing a secondary buffer at %dx%dx%d (fmt=%d) " - "with a primary buffer at %dx%dx%d\n", + trace(" Testing a secondary buffer at %ldx%dx%d (fmt=%d) " + "with a primary buffer at %ldx%dx%d\n", wfx.nSamplesPerSec,wfx.wBitsPerSample,wfx.nChannels,format_tags[tag], wfx1.nSamplesPerSec,wfx1.wBitsPerSample,wfx1.nChannels); } @@ -903,7 +903,7 @@ EXIT1: /* Set the CooperativeLevel back to normal */ /* DSOUND: Setting DirectSound cooperative level to DSSCL_NORMAL */ rc=IDirectSound8_SetCooperativeLevel(dso,get_hwnd(),DSSCL_NORMAL); - ok(rc==DS_OK,"IDirectSound8_SetCooperativeLevel() failed: %08x\n", rc); + ok(rc==DS_OK,"IDirectSound8_SetCooperativeLevel() failed: %08lx\n", rc);
EXIT: ref=IDirectSound8_Release(dso); @@ -939,7 +939,7 @@ static void dsound8_tests(void) { HRESULT rc; rc = DirectSoundEnumerateA(dsenum_callback, NULL); - ok(rc==DS_OK,"DirectSoundEnumerateA() failed: %08x\n",rc); + ok(rc==DS_OK,"DirectSoundEnumerateA() failed: %08lx\n",rc); }
static void test_hw_buffers(void) @@ -956,16 +956,16 @@ static void test_hw_buffers(void)
hr = DirectSoundCreate8(NULL, &ds, NULL); ok(hr == S_OK || hr == DSERR_NODRIVER || hr == DSERR_ALLOCATED || hr == E_FAIL, - "DirectSoundCreate8 failed: %08x\n", hr); + "DirectSoundCreate8 failed: %08lx\n", hr); if(hr != S_OK) return;
caps.dwSize = sizeof(caps);
hr = IDirectSound8_GetCaps(ds, &caps); - ok(hr == S_OK, "GetCaps failed: %08x\n", hr); + ok(hr == S_OK, "GetCaps failed: %08lx\n", hr);
- ok(caps.dwPrimaryBuffers == 1, "Got wrong number of primary buffers: %u\n", + ok(caps.dwPrimaryBuffers == 1, "Got wrong number of primary buffers: %lu\n", caps.dwPrimaryBuffers);
/* DSBCAPS_LOC* is ignored for primary buffers */ @@ -978,7 +978,7 @@ static void test_hw_buffers(void) bufdesc.guid3DAlgorithm = GUID_NULL;
hr = IDirectSound8_CreateSoundBuffer(ds, &bufdesc, &primary, NULL); - ok(hr == S_OK, "CreateSoundBuffer failed: %08x\n", hr); + ok(hr == S_OK, "CreateSoundBuffer failed: %08lx\n", hr); if(hr != S_OK){ IDirectSound8_Release(ds); return; @@ -988,7 +988,7 @@ static void test_hw_buffers(void) DSBCAPS_PRIMARYBUFFER;
hr = IDirectSound8_CreateSoundBuffer(ds, &bufdesc, &primary2, NULL); - ok(hr == S_OK, "CreateSoundBuffer failed: %08x\n", hr); + ok(hr == S_OK, "CreateSoundBuffer failed: %08lx\n", hr); ok(primary == primary2, "Got different primary buffers: %p, %p\n", primary, primary2); if(hr == S_OK) IDirectSoundBuffer_Release(primary2); @@ -996,7 +996,7 @@ static void test_hw_buffers(void) buf8 = (IDirectSoundBuffer8 *)0xDEADBEEF; hr = IDirectSoundBuffer_QueryInterface(primary, &IID_IDirectSoundBuffer8, (void**)&buf8); - ok(hr == E_NOINTERFACE, "QueryInterface gave wrong failure: %08x\n", hr); + ok(hr == E_NOINTERFACE, "QueryInterface gave wrong failure: %08lx\n", hr); ok(buf8 == NULL, "Pointer didn't get set to NULL\n");
fmt.wFormatTag = WAVE_FORMAT_PCM; @@ -1016,21 +1016,21 @@ static void test_hw_buffers(void) sizeof(IDirectSoundBuffer *) * caps.dwMaxHwMixingAllBuffers);
/* try to fill all of the hw buffers */ - trace("dwMaxHwMixingAllBuffers: %u\n", caps.dwMaxHwMixingAllBuffers); - trace("dwMaxHwMixingStaticBuffers: %u\n", caps.dwMaxHwMixingStaticBuffers); - trace("dwMaxHwMixingStreamingBuffers: %u\n", caps.dwMaxHwMixingStreamingBuffers); + trace("dwMaxHwMixingAllBuffers: %lu\n", caps.dwMaxHwMixingAllBuffers); + trace("dwMaxHwMixingStaticBuffers: %lu\n", caps.dwMaxHwMixingStaticBuffers); + trace("dwMaxHwMixingStreamingBuffers: %lu\n", caps.dwMaxHwMixingStreamingBuffers); for(i = 0; i < caps.dwMaxHwMixingAllBuffers; ++i){ hr = IDirectSound8_CreateSoundBuffer(ds, &bufdesc, &secondaries[i], NULL); ok(hr == S_OK || hr == E_NOTIMPL || broken(hr == DSERR_CONTROLUNAVAIL) || broken(hr == E_FAIL), - "CreateSoundBuffer(%u) failed: %08x\n", i, hr); + "CreateSoundBuffer(%u) failed: %08lx\n", i, hr); if(hr != S_OK) break;
bufcaps.dwSize = sizeof(bufcaps); hr = IDirectSoundBuffer_GetCaps(secondaries[i], &bufcaps); - ok(hr == S_OK, "GetCaps failed: %08x\n", hr); + ok(hr == S_OK, "GetCaps failed: %08lx\n", hr); ok((bufcaps.dwFlags & DSBCAPS_LOCHARDWARE) != 0, - "Buffer wasn't allocated in hardware, dwFlags: %x\n", bufcaps.dwFlags); + "Buffer wasn't allocated in hardware, dwFlags: %lx\n", bufcaps.dwFlags); }
/* see if we can create one more */ @@ -1041,7 +1041,7 @@ static void test_hw_buffers(void) broken(hr == DSERR_CONTROLUNAVAIL) || /* vmware winxp, others? */ broken(hr == E_FAIL) || /* broken AC97 driver */ broken(hr == S_OK) /* broken driver allows more hw bufs than dscaps claims */, - "CreateSoundBuffer(%u) gave wrong error: %08x\n", i, hr); + "CreateSoundBuffer(%u) gave wrong error: %08lx\n", i, hr); if(hr == S_OK) IDirectSoundBuffer_Release(secondary);
@@ -1102,15 +1102,15 @@ static void test_first_device(void) win_skip("No default device found\n"); return; } - ok(hr == S_OK, "GetDefaultAudioEndpoint failed: %08x\n", hr); + ok(hr == S_OK, "GetDefaultAudioEndpoint failed: %08lx\n", hr);
hr = IMMDevice_OpenPropertyStore(defdev, STGM_READ, &ps); - ok(hr == S_OK, "OpenPropertyStore failed: %08x\n", hr); + ok(hr == S_OK, "OpenPropertyStore failed: %08lx\n", hr);
PropVariantInit(&pv);
hr = IPropertyStore_GetValue(ps, &PKEY_AudioEndpoint_GUID, &pv); - ok(hr == S_OK, "GetValue failed: %08x\n", hr); + ok(hr == S_OK, "GetValue failed: %08lx\n", hr);
CLSIDFromString(pv.pwszVal, &default_info.guid);
@@ -1120,7 +1120,7 @@ static void test_first_device(void) IMMDeviceEnumerator_Release(devenum);
hr = DirectSoundEnumerateA(default_device_cb, NULL); - ok(hr == S_OK, "DirectSoundEnumerateA failed: %08x\n", hr); + ok(hr == S_OK, "DirectSoundEnumerateA failed: %08lx\n", hr); }
static void test_COM(void) @@ -1135,39 +1135,39 @@ static void test_COM(void) hr = CoCreateInstance(&CLSID_DirectSound8, (IUnknown*)0xdeadbeef, CLSCTX_INPROC_SERVER, &IID_IUnknown, (void**)&ds8); ok(hr == CLASS_E_NOAGGREGATION, - "DirectSound create failed: %08x, expected CLASS_E_NOAGGREGATION\n", hr); + "DirectSound create failed: %08lx, expected CLASS_E_NOAGGREGATION\n", hr); ok(!ds8, "ds8 = %p\n", ds8);
/* Invalid RIID */ hr = CoCreateInstance(&CLSID_DirectSound8, NULL, CLSCTX_INPROC_SERVER, &IID_IDirectSound3DBuffer, (void**)&ds8); ok(hr == E_NOINTERFACE, - "DirectSound create failed: %08x, expected E_NOINTERFACE\n", hr); + "DirectSound create failed: %08lx, expected E_NOINTERFACE\n", hr);
/* Same refcount for IDirectSound and IDirectSound8 */ hr = CoCreateInstance(&CLSID_DirectSound8, NULL, CLSCTX_INPROC_SERVER, &IID_IDirectSound8, (void**)&ds8); - ok(hr == S_OK, "DirectSound create failed: %08x, expected S_OK\n", hr); + ok(hr == S_OK, "DirectSound create failed: %08lx, expected S_OK\n", hr); refcount = IDirectSound8_AddRef(ds8); - ok(refcount == 2, "refcount == %u, expected 2\n", refcount); + ok(refcount == 2, "refcount == %lu, expected 2\n", refcount); hr = IDirectSound8_QueryInterface(ds8, &IID_IDirectSound, (void**)&ds); - ok(hr == S_OK, "QueryInterface for IID_IDirectSound failed: %08x\n", hr); + ok(hr == S_OK, "QueryInterface for IID_IDirectSound failed: %08lx\n", hr); refcount = IDirectSound8_AddRef(ds8); - ok(refcount == 4, "refcount == %u, expected 4\n", refcount); + ok(refcount == 4, "refcount == %lu, expected 4\n", refcount); refcount = IDirectSound_AddRef(ds); - ok(refcount == 5, "refcount == %u, expected 5\n", refcount); + ok(refcount == 5, "refcount == %lu, expected 5\n", refcount);
/* Separate refcount for IUnknown */ hr = IDirectSound_QueryInterface(ds, &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: %08lx\n", hr); refcount = IUnknown_AddRef(unk); - ok(refcount == 2, "refcount == %u, expected 2\n", refcount); + ok(refcount == 2, "refcount == %lu, expected 2\n", refcount); hr = IDirectSound8_QueryInterface(ds8, &IID_IUnknown, (void**)&unk8); - ok(hr == S_OK, "QueryInterface for IID_IUnknown failed: %08x\n", hr); + ok(hr == S_OK, "QueryInterface for IID_IUnknown failed: %08lx\n", hr); refcount = IUnknown_AddRef(unk8); - ok(refcount == 4, "refcount == %u, expected 4\n", refcount); + ok(refcount == 4, "refcount == %lu, expected 4\n", refcount); refcount = IDirectSound_AddRef(ds); - ok(refcount == 6, "refcount == %u, expected 6\n", refcount); + ok(refcount == 6, "refcount == %lu, expected 6\n", refcount);
while (IDirectSound_Release(ds)); while (IUnknown_Release(unk)); @@ -1184,13 +1184,13 @@ static void test_primary_flags(void)
/* Create a DirectSound8 object */ rc = DirectSoundCreate8(NULL, &dso, NULL); - ok(rc == DS_OK || rc==DSERR_NODRIVER, "Failed: %08x\n",rc); + ok(rc == DS_OK || rc==DSERR_NODRIVER, "Failed: %08lx\n",rc);
if (rc!=DS_OK) return;
rc = IDirectSound8_SetCooperativeLevel(dso, get_hwnd(), DSSCL_PRIORITY); - ok(rc == DS_OK,"Failed: %08x\n", rc); + ok(rc == DS_OK,"Failed: %08lx\n", rc); if (rc != DS_OK) { IDirectSound8_Release(dso); return; @@ -1198,23 +1198,23 @@ static void test_primary_flags(void)
dscaps.dwSize = sizeof(dscaps); rc = IDirectSound8_GetCaps(dso, &dscaps); - ok(rc == DS_OK,"Failed: %08x\n", rc); - trace("0x%x\n", dscaps.dwFlags); + ok(rc == DS_OK,"Failed: %08lx\n", rc); + trace("0x%lx\n", dscaps.dwFlags);
ZeroMemory(&bufdesc, sizeof(bufdesc)); bufdesc.dwSize = sizeof(bufdesc); bufdesc.dwFlags = DSBCAPS_PRIMARYBUFFER | DSBCAPS_CTRLFX; rc = IDirectSound8_CreateSoundBuffer(dso, &bufdesc, &primary, NULL); - ok(rc == E_INVALIDARG, "got %08x\n", rc); + ok(rc == E_INVALIDARG, "got %08lx\n", rc);
ZeroMemory(&bufdesc, sizeof(bufdesc)); bufdesc.dwSize = sizeof(bufdesc); bufdesc.dwFlags = DSBCAPS_PRIMARYBUFFER | DSBCAPS_CTRL3D; rc = IDirectSound8_CreateSoundBuffer(dso, &bufdesc, &primary, NULL); - ok((rc == DS_OK && primary != NULL), "Failed to create a primary buffer: %08x\n", rc); + ok((rc == DS_OK && primary != NULL), "Failed to create a primary buffer: %08lx\n", rc); if (rc == DS_OK) { rc = IDirectSoundBuffer_QueryInterface(primary, &IID_IDirectSoundFXI3DL2Reverb, (LPVOID*)&reverb); - ok(rc==E_NOINTERFACE,"Failed: %08x\n", rc); + ok(rc==E_NOINTERFACE,"Failed: %08lx\n", rc);
IDirectSoundBuffer_Release(primary); } @@ -1292,8 +1292,8 @@ static HRESULT WINAPI dmo_SetInputType(IMediaObject *iface, DWORD index, const D
if (winetest_debug > 1) trace("SetInputType()\n");
- ok(!index, "Got unexpected index %u.\n", index); - ok(!flags, "Got unexpected flags %#x.\n", flags); + ok(!index, "Got unexpected index %lu.\n", index); + ok(!flags, "Got unexpected flags %#lx.\n", flags);
ok(IsEqualGUID(&type->majortype, &MEDIATYPE_Audio), "Got major type %s.\n", debugstr_guid(&type->majortype)); todo_wine ok(IsEqualGUID(&type->subtype, &MEDIASUBTYPE_PCM), "Got subtype %s.\n", debugstr_guid(&type->subtype)); @@ -1301,10 +1301,10 @@ static HRESULT WINAPI dmo_SetInputType(IMediaObject *iface, DWORD index, const D ok(!type->bTemporalCompression, "Got temporal compression %d.\n", type->bTemporalCompression); ok(IsEqualGUID(&type->formattype, &FORMAT_WaveFormatEx), "Got format type %s.\n", debugstr_guid(&type->formattype)); ok(!type->pUnk, "Got pUnk %p.\n", type->pUnk); - ok(type->cbFormat == sizeof(WAVEFORMATEX), "Got format size %u.\n", type->cbFormat); + ok(type->cbFormat == sizeof(WAVEFORMATEX), "Got format size %lu.\n", type->cbFormat);
wfx = (WAVEFORMATEX *)type->pbFormat; - todo_wine ok(type->lSampleSize == wfx->nBlockAlign, "Got sample size %u.\n", type->lSampleSize); + todo_wine ok(type->lSampleSize == wfx->nBlockAlign, "Got sample size %lu.\n", type->lSampleSize);
if (wfx->wBitsPerSample != 8) return DMO_E_TYPE_NOT_ACCEPTED; @@ -1318,8 +1318,8 @@ static HRESULT WINAPI dmo_SetOutputType(IMediaObject *iface, DWORD index, const { if (winetest_debug > 1) trace("SetOutputType()\n");
- ok(!index, "Got unexpected index %u.\n", index); - ok(!flags, "Got unexpected flags %#x.\n", flags); + ok(!index, "Got unexpected index %lu.\n", index); + ok(!flags, "Got unexpected flags %#lx.\n", flags);
ok(testdmo_input_type_set, "Expected the input type to be set.\n");
@@ -1327,10 +1327,10 @@ static HRESULT WINAPI dmo_SetOutputType(IMediaObject *iface, DWORD index, const ok(IsEqualGUID(&type->subtype, &MEDIASUBTYPE_PCM), "Got subtype %s.\n", debugstr_guid(&type->subtype)); ok(type->bFixedSizeSamples == TRUE, "Got fixed size %d.\n", type->bFixedSizeSamples); ok(!type->bTemporalCompression, "Got temporal compression %d.\n", type->bTemporalCompression); - ok(type->lSampleSize == 1, "Got sample size %u.\n", type->lSampleSize); + ok(type->lSampleSize == 1, "Got sample size %lu.\n", type->lSampleSize); ok(IsEqualGUID(&type->formattype, &FORMAT_WaveFormatEx), "Got format type %s.\n", debugstr_guid(&type->formattype)); ok(!type->pUnk, "Got pUnk %p.\n", type->pUnk); - ok(type->cbFormat == sizeof(WAVEFORMATEX), "Got format size %u.\n", type->cbFormat); + ok(type->cbFormat == sizeof(WAVEFORMATEX), "Got format size %lu.\n", type->cbFormat);
ok(!memcmp(type->pbFormat, &testdmo_input_type, sizeof(WAVEFORMATEX)), "Format blocks didn't match.\n");
@@ -1472,10 +1472,10 @@ static ULONG WINAPI dmo_inplace_Release(IMediaObjectInPlace *iface) static HRESULT WINAPI dmo_inplace_Process(IMediaObjectInPlace *iface, ULONG size, BYTE *data, REFERENCE_TIME start, DWORD flags) { - if (winetest_debug > 1) trace("Process(size %u)\n", size); + if (winetest_debug > 1) trace("Process(size %lu)\n", size);
ok(!start, "Got start time %s.\n", wine_dbgstr_longlong(start)); - ok(!flags, "Got flags %#x.\n", flags); + ok(!flags, "Got flags %#lx.\n", flags);
SetEvent(got_Process);
@@ -1574,12 +1574,12 @@ static void test_effects(void) ULONG ref;
hr = DirectSoundCreate8(NULL, &dsound, NULL); - ok(hr == DS_OK || hr == DSERR_NODRIVER, "Got hr %#x.\n", hr); + ok(hr == DS_OK || hr == DSERR_NODRIVER, "Got hr %#lx.\n", hr); if (FAILED(hr)) return;
hr = IDirectSound8_SetCooperativeLevel(dsound, get_hwnd(), DSSCL_PRIORITY); - ok(hr == DS_OK, "Got hr %#x.\n", hr); + ok(hr == DS_OK, "Got hr %#lx.\n", hr);
effects[0].dwSize = effects[1].dwSize = sizeof(effects[0]); effects[0].guidDSFXClass = GUID_DSFX_STANDARD_PARAMEQ; @@ -1588,161 +1588,161 @@ static void test_effects(void) buffer_desc.dwBufferBytes = align(wfx.nAvgBytesPerSec * BUFFER_LEN / 1000, wfx.nBlockAlign); buffer_desc.lpwfxFormat = &wfx; hr = IDirectSound8_CreateSoundBuffer(dsound, &buffer_desc, &buffer, NULL); - ok(hr == DS_OK, "Got hr %#x.\n", hr); + ok(hr == DS_OK, "Got hr %#lx.\n", hr); hr = IDirectSoundBuffer_QueryInterface(buffer, &IID_IDirectSoundBuffer8, (void **)&buffer8); - ok(hr == DS_OK, "Got hr %#x.\n", hr); + ok(hr == DS_OK, "Got hr %#lx.\n", hr); hr = IDirectSoundBuffer8_SetFX(buffer8, 1, effects, results); - ok(hr == DSERR_CONTROLUNAVAIL, "Got hr %#x.\n", hr); + ok(hr == DSERR_CONTROLUNAVAIL, "Got hr %#lx.\n", hr);
IDirectSoundBuffer8_Release(buffer8); IDirectSoundBuffer_Release(buffer);
buffer_desc.dwFlags = DSBCAPS_CTRLFX | DSBCAPS_CTRLPOSITIONNOTIFY; hr = IDirectSound8_CreateSoundBuffer(dsound, &buffer_desc, &buffer, NULL); - ok(hr == DS_OK, "Got hr %#x.\n", hr); + ok(hr == DS_OK, "Got hr %#lx.\n", hr); hr = IDirectSoundBuffer_QueryInterface(buffer, &IID_IDirectSoundBuffer8, (void **)&buffer8); - ok(hr == DS_OK, "Got hr %#x.\n", hr); + ok(hr == DS_OK, "Got hr %#lx.\n", hr); hr = IDirectSoundBuffer8_QueryInterface(buffer, &IID_IDirectSoundNotify, (void **)¬ify); - ok(hr == DS_OK, "Got hr %#x.\n", hr); + ok(hr == DS_OK, "Got hr %#lx.\n", hr);
hr = IDirectSoundNotify_SetNotificationPositions(notify, 1, ¬ify_params); - ok(hr == DS_OK, "Got hr %#x.\n", hr); + ok(hr == DS_OK, "Got hr %#lx.\n", hr);
hr = IDirectSoundBuffer8_SetFX(buffer8, 1, NULL, NULL); - ok(hr == DSERR_INVALIDPARAM, "Got hr %#x.\n", hr); + ok(hr == DSERR_INVALIDPARAM, "Got hr %#lx.\n", hr); hr = IDirectSoundBuffer8_SetFX(buffer8, 0, effects, NULL); - ok(hr == DSERR_INVALIDPARAM, "Got hr %#x.\n", hr); + ok(hr == DSERR_INVALIDPARAM, "Got hr %#lx.\n", hr); hr = IDirectSoundBuffer8_SetFX(buffer8, 0, NULL, results); - ok(hr == DSERR_INVALIDPARAM, "Got hr %#x.\n", hr); + ok(hr == DSERR_INVALIDPARAM, "Got hr %#lx.\n", hr);
results[0] = 0xdeadbeef; hr = IDirectSoundBuffer8_SetFX(buffer8, 1, effects, results); - ok(hr == DS_OK, "Got hr %#x.\n", hr); - ok(results[0] == DSFXR_LOCSOFTWARE, "Got result %#x.\n", results[0]); + ok(hr == DS_OK, "Got hr %#lx.\n", hr); + ok(results[0] == DSFXR_LOCSOFTWARE, "Got result %#lx.\n", results[0]);
hr = IDirectSoundBuffer8_Lock(buffer8, 0, 0, &ptr1, &size1, &ptr2, &size2, DSBLOCK_ENTIREBUFFER); - ok(hr == DS_OK, "Got hr %#x.\n", hr); + ok(hr == DS_OK, "Got hr %#lx.\n", hr); results[0] = 0xdeadbeef; hr = IDirectSoundBuffer8_SetFX(buffer8, 1, effects, results); - ok(hr == DSERR_INVALIDCALL, "Got hr %#x.\n", hr); - todo_wine ok(results[0] == 0xdeadbeef, "Got result %#x.\n", results[0]); + ok(hr == DSERR_INVALIDCALL, "Got hr %#lx.\n", hr); + todo_wine ok(results[0] == 0xdeadbeef, "Got result %#lx.\n", results[0]); hr = IDirectSoundBuffer8_Unlock(buffer8, ptr1, size1, ptr2, size2); - ok(hr == DS_OK, "Got hr %#x.\n", hr); + ok(hr == DS_OK, "Got hr %#lx.\n", hr);
hr = IDirectSoundBuffer8_Play(buffer8, 0, 0, DSBPLAY_LOOPING); - ok(hr == DS_OK, "Got hr %#x.\n", hr); + ok(hr == DS_OK, "Got hr %#lx.\n", hr); results[0] = 0xdeadbeef; hr = IDirectSoundBuffer8_SetFX(buffer8, 1, effects, results); - ok(hr == DSERR_INVALIDCALL, "Got hr %#x.\n", hr); - todo_wine ok(results[0] == 0xdeadbeef, "Got result %#x.\n", results[0]); + ok(hr == DSERR_INVALIDCALL, "Got hr %#lx.\n", hr); + todo_wine ok(results[0] == 0xdeadbeef, "Got result %#lx.\n", results[0]); hr = IDirectSoundBuffer8_Stop(buffer8); - ok(hr == DS_OK, "Got hr %#x.\n", hr); + ok(hr == DS_OK, "Got hr %#lx.\n", hr); ok(!WaitForSingleObject(notify_params.hEventNotify, 1000), "Wait timed out.\n");
effects[0].guidDSFXClass = GUID_NULL; results[0] = 0xdeadbeef; hr = IDirectSoundBuffer8_SetFX(buffer8, 1, effects, results); - ok(hr == REGDB_E_CLASSNOTREG, "Got hr %#x.\n", hr); - ok(results[0] == DSFXR_UNKNOWN, "Got result %#x.\n", results[0]); + ok(hr == REGDB_E_CLASSNOTREG, "Got hr %#lx.\n", hr); + ok(results[0] == DSFXR_UNKNOWN, "Got result %#lx.\n", results[0]);
effects[0].guidDSFXClass = GUID_DSFX_STANDARD_PARAMEQ; results[0] = 0xdeadbeef; hr = IDirectSoundBuffer8_SetFX(buffer8, 1, effects, results); - ok(hr == DS_OK, "Got hr %#x.\n", hr); - ok(results[0] == DSFXR_LOCSOFTWARE, "Got result %#x.\n", results[0]); + ok(hr == DS_OK, "Got hr %#lx.\n", hr); + ok(results[0] == DSFXR_LOCSOFTWARE, "Got result %#lx.\n", results[0]);
hr = IDirectSoundBuffer8_GetObjectInPath(buffer8, &GUID_All_Objects, 0, &IID_IMediaObject, NULL); - ok(hr == DSERR_INVALIDPARAM, "Got hr %#x.\n", hr); + ok(hr == DSERR_INVALIDPARAM, "Got hr %#lx.\n", hr);
dmo = (IMediaObject *)0xdeadbeef; hr = IDirectSoundBuffer8_GetObjectInPath(buffer8, &GUID_All_Objects, 0, &GUID_NULL, (void **)&dmo); - ok(hr == E_NOINTERFACE, "Got hr %#x.\n", hr); + ok(hr == E_NOINTERFACE, "Got hr %#lx.\n", hr); ok(!dmo, "Got object %p.\n", dmo);
dmo = (IMediaObject *)0xdeadbeef; hr = IDirectSoundBuffer8_GetObjectInPath(buffer8, &GUID_NULL, 0, &IID_IMediaObject, (void **)&dmo); - ok(hr == DSERR_OBJECTNOTFOUND, "Got hr %#x.\n", hr); + ok(hr == DSERR_OBJECTNOTFOUND, "Got hr %#lx.\n", hr); ok(dmo == (IMediaObject *)0xdeadbeef, "Got object %p.\n", dmo);
dmo = NULL; hr = IDirectSoundBuffer8_GetObjectInPath(buffer8, &GUID_All_Objects, 0, &IID_IMediaObject, (void **)&dmo); - ok(hr == DS_OK, "Got hr %#x.\n", hr); + ok(hr == DS_OK, "Got hr %#lx.\n", hr); ok(!!dmo, "Expected a non-NULL object.\n"); IMediaObject_Release(dmo);
dmo = NULL; hr = IDirectSoundBuffer8_GetObjectInPath(buffer8, &GUID_DSFX_STANDARD_PARAMEQ, 0, &IID_IMediaObject, (void **)&dmo); - ok(hr == DS_OK, "Got hr %#x.\n", hr); + ok(hr == DS_OK, "Got hr %#lx.\n", hr); ok(!!dmo, "Expected a non-NULL object.\n"); IMediaObject_Release(dmo);
dmo = (IMediaObject *)0xdeadbeef; hr = IDirectSoundBuffer8_GetObjectInPath(buffer8, &GUID_All_Objects, 1, &IID_IMediaObject, (void **)&dmo); - ok(hr == DSERR_OBJECTNOTFOUND, "Got hr %#x.\n", hr); + ok(hr == DSERR_OBJECTNOTFOUND, "Got hr %#lx.\n", hr); ok(dmo == (IMediaObject *)0xdeadbeef, "Got object %p.\n", dmo);
effects[0].guidDSFXClass = GUID_DSFX_STANDARD_PARAMEQ; effects[1].guidDSFXClass = GUID_NULL; results[0] = results[1] = 0xdeadbeef; hr = IDirectSoundBuffer8_SetFX(buffer8, 2, effects, results); - ok(hr == REGDB_E_CLASSNOTREG, "Got hr %#x.\n", hr); - ok(results[0] == DSFXR_PRESENT, "Got result %#x.\n", results[0]); - ok(results[1] == DSFXR_UNKNOWN, "Got result %#x.\n", results[1]); + ok(hr == REGDB_E_CLASSNOTREG, "Got hr %#lx.\n", hr); + ok(results[0] == DSFXR_PRESENT, "Got result %#lx.\n", results[0]); + ok(results[1] == DSFXR_UNKNOWN, "Got result %#lx.\n", results[1]);
hr = IDirectSoundBuffer8_GetObjectInPath(buffer8, &GUID_All_Objects, 0, &IID_IMediaObject, (void **)&dmo); - todo_wine ok(hr == DSERR_OBJECTNOTFOUND, "Got hr %#x.\n", hr); + todo_wine ok(hr == DSERR_OBJECTNOTFOUND, "Got hr %#lx.\n", hr);
effects[0].guidDSFXClass = GUID_DSFX_STANDARD_PARAMEQ; effects[1].guidDSFXClass = GUID_DSFX_STANDARD_I3DL2REVERB; results[0] = results[1] = 0xdeadbeef; hr = IDirectSoundBuffer8_SetFX(buffer8, 2, effects, results); - ok(hr == DS_OK, "Got hr %#x.\n", hr); - ok(results[0] == DSFXR_LOCSOFTWARE, "Got result %#x.\n", results[0]); - ok(results[1] == DSFXR_LOCSOFTWARE, "Got result %#x.\n", results[1]); + ok(hr == DS_OK, "Got hr %#lx.\n", hr); + ok(results[0] == DSFXR_LOCSOFTWARE, "Got result %#lx.\n", results[0]); + ok(results[1] == DSFXR_LOCSOFTWARE, "Got result %#lx.\n", results[1]);
hr = IDirectSoundBuffer8_GetObjectInPath(buffer8, &GUID_DSFX_STANDARD_PARAMEQ, 0, &IID_IMediaObject, (void **)&dmo); - ok(hr == DS_OK, "Got hr %#x.\n", hr); + ok(hr == DS_OK, "Got hr %#lx.\n", hr); echo = dmo; hr = IDirectSoundBuffer8_GetObjectInPath(buffer8, &GUID_DSFX_STANDARD_I3DL2REVERB, 0, &IID_IMediaObject, (void **)&dmo); - ok(hr == DS_OK, "Got hr %#x.\n", hr); + ok(hr == DS_OK, "Got hr %#lx.\n", hr); reverb = dmo;
hr = IDirectSoundBuffer8_GetObjectInPath(buffer8, &GUID_All_Objects, 0, &IID_IMediaObject, (void **)&dmo); - ok(hr == DS_OK, "Got hr %#x.\n", hr); + ok(hr == DS_OK, "Got hr %#lx.\n", hr); ok(dmo == echo, "Expected %p, got %p.\n", echo, dmo); IMediaObject_Release(dmo);
hr = IDirectSoundBuffer8_GetObjectInPath(buffer8, &GUID_All_Objects, 1, &IID_IMediaObject, (void **)&dmo); - ok(hr == DS_OK, "Got hr %#x.\n", hr); + ok(hr == DS_OK, "Got hr %#lx.\n", hr); ok(dmo == reverb, "Expected %p, got %p.\n", reverb, dmo); IMediaObject_Release(dmo);
hr = IDirectSoundBuffer8_GetObjectInPath(buffer8, &GUID_DSFX_STANDARD_I3DL2REVERB, 1, &IID_IMediaObject, (void **)&dmo); - ok(hr == DSERR_OBJECTNOTFOUND, "Got hr %#x.\n", hr); + ok(hr == DSERR_OBJECTNOTFOUND, "Got hr %#lx.\n", hr);
hr = IDirectSoundBuffer8_GetObjectInPath(buffer8, &GUID_All_Objects, 0, &IID_IDirectSoundFXParamEq, (void **)&unk); - ok(hr == DS_OK, "Got hr %#x.\n", hr); + ok(hr == DS_OK, "Got hr %#lx.\n", hr); IUnknown_Release(unk);
hr = IDirectSoundBuffer8_GetObjectInPath(buffer8, &GUID_All_Objects, 0, &IID_IDirectSoundFXParamEq, (void **)&unk); - ok(hr == DS_OK, "Got hr %#x.\n", hr); + ok(hr == DS_OK, "Got hr %#lx.\n", hr); IUnknown_Release(unk);
hr = IDirectSoundBuffer8_GetObjectInPath(buffer8, &GUID_All_Objects, 0, &IID_IDirectSoundFXI3DL2Reverb, (void **)&unk); - ok(hr == E_NOINTERFACE, "Got hr %#x.\n", hr); + ok(hr == E_NOINTERFACE, "Got hr %#lx.\n", hr);
hr = IDirectSoundBuffer8_GetObjectInPath(buffer8, &GUID_All_Objects, 1, &IID_IDirectSoundFXI3DL2Reverb, (void **)&unk); - ok(hr == DS_OK, "Got hr %#x.\n", hr); + ok(hr == DS_OK, "Got hr %#lx.\n", hr); IUnknown_Release(unk);
hr = IDirectSoundBuffer8_GetObjectInPath(buffer8, &GUID_DSFX_STANDARD_I3DL2REVERB, 0, &IID_IDirectSoundFXI3DL2Reverb, (void **)&unk); - ok(hr == DS_OK, "Got hr %#x.\n", hr); + ok(hr == DS_OK, "Got hr %#lx.\n", hr); IUnknown_Release(unk);
IMediaObject_Release(echo); @@ -1753,60 +1753,60 @@ static void test_effects(void) effects[0].guidDSFXClass = testdmo_clsid; results[0] = 0xdeadbeef; hr = IDirectSoundBuffer8_SetFX(buffer8, 1, effects, results); - todo_wine ok(hr == DS_OK, "Got hr %#x.\n", hr); - todo_wine ok(results[0] == DSFXR_LOCSOFTWARE, "Got result %#x.\n", results[0]); + todo_wine ok(hr == DS_OK, "Got hr %#lx.\n", hr); + todo_wine ok(results[0] == DSFXR_LOCSOFTWARE, "Got result %#lx.\n", results[0]); todo_wine ok(!memcmp(&testdmo_input_type, &wfx, sizeof(WAVEFORMATEX)), "Format blocks didn't match.\n");
ResetEvent(notify_params.hEventNotify); hr = IDirectSoundBuffer8_Play(buffer8, 0, 0, 0); - ok(hr == DS_OK, "Got hr %#x.\n", hr); + ok(hr == DS_OK, "Got hr %#lx.\n", hr); todo_wine ok(got_Discontinuity == 1, "Got %u calls to IMediaObject::Discontinuity().\n", got_Discontinuity);
todo_wine ok(!WaitForSingleObject(got_Process, 100), "Wait timed out.\n");
hr = IDirectSoundBuffer8_Stop(buffer8); - ok(hr == DS_OK, "Got hr %#x.\n", hr); + ok(hr == DS_OK, "Got hr %#lx.\n", hr); todo_wine ok(got_Discontinuity == 1, "Got %u calls to IMediaObject::Discontinuity().\n", got_Discontinuity); ok(!WaitForSingleObject(notify_params.hEventNotify, 1000), "Wait timed out.\n");
ResetEvent(notify_params.hEventNotify); hr = IDirectSoundBuffer8_Play(buffer8, 0, 0, 0); - ok(hr == DS_OK, "Got hr %#x.\n", hr); + ok(hr == DS_OK, "Got hr %#lx.\n", hr); todo_wine ok(got_Discontinuity == 2, "Got %u calls to IMediaObject::Discontinuity().\n", got_Discontinuity);
hr = IDirectSoundBuffer8_Stop(buffer8); - ok(hr == DS_OK, "Got hr %#x.\n", hr); + ok(hr == DS_OK, "Got hr %#lx.\n", hr); ok(!WaitForSingleObject(notify_params.hEventNotify, 1000), "Wait timed out.\n");
hr = IDirectSoundBuffer8_SetFX(buffer8, 0, NULL, NULL); - ok(hr == DS_OK, "Got hr %#x.\n", hr); + ok(hr == DS_OK, "Got hr %#lx.\n", hr);
hr = IDirectSoundBuffer8_GetObjectInPath(buffer8, &GUID_All_Objects, 0, &IID_IMediaObject, (void **)&dmo); - ok(hr == DSERR_OBJECTNOTFOUND, "Got hr %#x.\n", hr); + ok(hr == DSERR_OBJECTNOTFOUND, "Got hr %#lx.\n", hr);
CloseHandle(got_Process); IDirectSoundBuffer8_Release(buffer8); ref = IDirectSoundBuffer_Release(buffer); - ok(!ref, "Got outstanding refcount %u.\n", ref); + ok(!ref, "Got outstanding refcount %lu.\n", ref);
init_format(&wfx, WAVE_FORMAT_PCM, 11025, 16, 1); hr = IDirectSound8_CreateSoundBuffer(dsound, &buffer_desc, &buffer, NULL); - ok(hr == DS_OK, "Got hr %#x.\n", hr); + ok(hr == DS_OK, "Got hr %#lx.\n", hr); hr = IDirectSoundBuffer_QueryInterface(buffer, &IID_IDirectSoundBuffer8, (void **)&buffer8); - ok(hr == DS_OK, "Got hr %#x.\n", hr); + ok(hr == DS_OK, "Got hr %#lx.\n", hr);
results[0] = 0xdeadbeef; hr = IDirectSoundBuffer8_SetFX(buffer8, 1, effects, results); - ok(hr == DMO_E_TYPE_NOT_ACCEPTED, "Got hr %#x.\n", hr); - todo_wine ok(results[0] == DSFXR_UNKNOWN, "Got result %#x.\n", results[0]); + ok(hr == DMO_E_TYPE_NOT_ACCEPTED, "Got hr %#lx.\n", hr); + todo_wine ok(results[0] == DSFXR_UNKNOWN, "Got result %#lx.\n", results[0]);
IDirectSoundNotify_Release(notify); IDirectSoundBuffer8_Release(buffer8); ref = IDirectSoundBuffer_Release(buffer); - ok(!ref, "Got outstanding refcount %u.\n", ref); + ok(!ref, "Got outstanding refcount %lu.\n", ref);
ref = IDirectSound8_Release(dsound); - ok(!ref, "Got outstanding refcount %u.\n", ref); + ok(!ref, "Got outstanding refcount %lu.\n", ref); }
static void test_AcquireResources(void) @@ -1818,12 +1818,12 @@ static void test_AcquireResources(void) HRESULT hr;
hr = DirectSoundCreate8(NULL, &dsound, NULL); - ok(hr == DS_OK || hr == DSERR_NODRIVER, "Got hr %#x.\n", hr); + ok(hr == DS_OK || hr == DSERR_NODRIVER, "Got hr %#lx.\n", hr); if (FAILED(hr)) return;
hr = IDirectSound8_SetCooperativeLevel(dsound, get_hwnd(), DSSCL_PRIORITY); - ok(hr == DS_OK, "Got hr %#x.\n", hr); + ok(hr == DS_OK, "Got hr %#lx.\n", hr);
bufdesc.dwSize = sizeof(bufdesc); bufdesc.dwFlags = DSBCAPS_GETCURRENTPOSITION2 | DSBCAPS_PRIMARYBUFFER; @@ -1833,7 +1833,7 @@ static void test_AcquireResources(void) bufdesc.guid3DAlgorithm = GUID_NULL;
hr = IDirectSound8_CreateSoundBuffer(dsound, &bufdesc, &primary, NULL); - ok(hr == S_OK, "CreateSoundBuffer failed: %08x\n", hr); + ok(hr == S_OK, "CreateSoundBuffer failed: %08lx\n", hr); if(hr != S_OK) { IDirectSound_Release(dsound); return; @@ -1853,26 +1853,26 @@ static void test_AcquireResources(void)
/* see if we can create one more */ hr = IDirectSound8_CreateSoundBuffer(dsound, &bufdesc, &secondary, NULL); - ok(hr == S_OK, "CreateSoundBuffer gave wrong error: %08x\n", hr); + ok(hr == S_OK, "CreateSoundBuffer gave wrong error: %08lx\n", hr); if(hr == S_OK) { DWORD status; IDirectSoundBuffer8 *buffer8;
hr = IDirectSoundBuffer_QueryInterface(secondary, &IID_IDirectSoundBuffer8, (void **)&buffer8); - ok(hr == S_OK, "got: %08x\n", hr); + ok(hr == S_OK, "got: %08lx\n", hr);
status = 0xFFFF; hr = IDirectSoundBuffer8_GetStatus(buffer8, &status); - ok(hr == S_OK, "got: %08x\n", hr); - todo_wine ok(status == 0, "got: %08x\n", status); + ok(hr == S_OK, "got: %08lx\n", hr); + todo_wine ok(status == 0, "got: %08lx\n", status);
hr = IDirectSoundBuffer8_AcquireResources(buffer8, 0, 0, NULL); - ok(hr == S_OK, "got: %08x\n", hr); + ok(hr == S_OK, "got: %08lx\n", hr);
status = 0xFFFF; hr = IDirectSoundBuffer8_GetStatus(buffer8, &status); - ok(hr == S_OK, "got: %08x\n", hr); - ok(status == DSBSTATUS_LOCSOFTWARE, "got: %08x\n", status); + ok(hr == S_OK, "got: %08lx\n", hr); + ok(status == DSBSTATUS_LOCSOFTWARE, "got: %08lx\n", status);
IDirectSoundBuffer8_Release(buffer8); IDirectSoundBuffer_Release(secondary); @@ -1899,7 +1899,7 @@ START_TEST(dsound8)
hr = CoRegisterClassObject(&testdmo_clsid, (IUnknown *)&testdmo_cf, CLSCTX_INPROC_SERVER, REGCLS_MULTIPLEUSE, &cookie); - ok(hr == S_OK, "Failed to register class, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to register class, hr %#lx.\n", hr);
test_effects();
diff --git a/dlls/dsound/tests/duplex.c b/dlls/dsound/tests/duplex.c index 59507c566c1..3ea1aabe20a 100644 --- a/dlls/dsound/tests/duplex.c +++ b/dlls/dsound/tests/duplex.c @@ -43,7 +43,7 @@ static void IDirectSoundFullDuplex_test(LPDIRECTSOUNDFULLDUPLEX dsfdo,
/* Try to Query for objects */ rc=IDirectSoundFullDuplex_QueryInterface(dsfdo,&IID_IUnknown,(LPVOID*)&unknown); - ok(rc==DS_OK,"IDirectSoundFullDuplex_QueryInterface(IID_IUnknown) failed: %08x\n", rc); + ok(rc==DS_OK,"IDirectSoundFullDuplex_QueryInterface(IID_IUnknown) failed: %08lx\n", rc); if (rc==DS_OK) { ref = IUnknown_Release(unknown); ok(ref==0, "IDirectSoundFullDuplex_Release() has %d references, " @@ -51,7 +51,7 @@ static void IDirectSoundFullDuplex_test(LPDIRECTSOUNDFULLDUPLEX dsfdo, }
rc=IDirectSoundFullDuplex_QueryInterface(dsfdo,&IID_IDirectSound,(LPVOID*)&ds); - ok(rc==(initialized?DS_OK:E_NOINTERFACE),"IDirectSoundFullDuplex_QueryInterface(IID_IDirectSound) failed: %08x\n", rc); + ok(rc==(initialized?DS_OK:E_NOINTERFACE),"IDirectSoundFullDuplex_QueryInterface(IID_IDirectSound) failed: %08lx\n", rc); if (rc==DS_OK) { ref=IDirectSound_Release(ds); ok(ref==0, "IDirectSound_Release() has %d references, " @@ -60,12 +60,12 @@ static void IDirectSoundFullDuplex_test(LPDIRECTSOUNDFULLDUPLEX dsfdo,
rc=IDirectSoundFullDuplex_QueryInterface(dsfdo,&IID_IDirectSound8,(LPVOID*)&ds8); ok(rc==(initialized?DS_OK:E_NOINTERFACE),"IDirectSoundFullDuplex_QueryInterface(IID_IDirectSound8) " - "failed: %08x\n",rc); + "failed: %08lx\n",rc); if (rc==DS_OK) { IDirectSoundFullDuplex * dsfd1; rc=IDirectSound8_QueryInterface(ds8,&IID_IDirectSoundFullDuplex,(LPVOID*)&dsfd1); ok(rc==DS_OK,"IDirectSound8_QueryInterface(IID_IDirectSoundFullDuplex) " - "failed: %08x\n",rc); + "failed: %08lx\n",rc); if (rc==DS_OK) { ref=IDirectSoundFullDuplex_Release(dsfd1); ok(ref==1, "IDirectSoundFullDuplex_Release() has %d references, " @@ -78,7 +78,7 @@ static void IDirectSoundFullDuplex_test(LPDIRECTSOUNDFULLDUPLEX dsfdo,
rc=IDirectSoundFullDuplex_QueryInterface(dsfdo,&IID_IDirectSoundCapture,(LPVOID*)&dsc); ok(rc==(initialized?DS_OK:E_NOINTERFACE),"IDirectSoundFullDuplex_QueryInterface(IID_IDirectSoundCapture) " - "failed: %08x\n",rc); + "failed: %08lx\n",rc); if (rc==DS_OK) { ref=IDirectSoundCapture_Release(dsc); ok(ref==0, "IDirectSoundCapture_Release() has %d references, " @@ -87,7 +87,7 @@ static void IDirectSoundFullDuplex_test(LPDIRECTSOUNDFULLDUPLEX dsfdo,
rc=IDirectSoundFullDuplex_QueryInterface(dsfdo,&IID_IDirectSoundFullDuplex,(LPVOID*)&dsfd); ok(rc==DS_OK,"IDirectSoundFullDuplex_QueryInterface(IID_IDirectSoundFullDuplex) " - "failed: %08x\n",rc); + "failed: %08lx\n",rc); if (rc==DS_OK) { ok(dsfdo==dsfd, "different interfaces\n"); ref=IDirectSoundFullDuplex_Release(dsfd); @@ -116,7 +116,7 @@ static void IDirectSoundFullDuplex_tests(void) CLSCTX_INPROC_SERVER, &IID_IDirectSoundFullDuplex, (void**)&dsfdo); ok(rc==S_OK||rc==REGDB_E_CLASSNOTREG||rc==CLASS_E_CLASSNOTAVAILABLE, - "CoCreateInstance(CLSID_DirectSoundFullDuplex) failed: 0x%08x\n", rc); + "CoCreateInstance(CLSID_DirectSoundFullDuplex) failed: 0x%08lx\n", rc); if (rc==REGDB_E_CLASSNOTREG) { trace(" Class Not Registered\n"); return; @@ -132,7 +132,7 @@ static void IDirectSoundFullDuplex_tests(void) rc=CoCreateInstance(&CLSID_DirectSoundFullDuplex, NULL, CLSCTX_INPROC_SERVER, &IID_IDirectSoundFullDuplex, (void**)&dsfdo); - ok(rc==S_OK,"CoCreateInstance(CLSID_DirectSoundFullDuplex) failed: 0x%08x\n", rc); + ok(rc==S_OK,"CoCreateInstance(CLSID_DirectSoundFullDuplex) failed: 0x%08lx\n", rc); if (dsfdo) IDirectSoundFullDuplex_test(dsfdo, FALSE, &DSDEVID_DefaultCapture, &DSDEVID_DefaultPlayback); @@ -142,7 +142,7 @@ static void IDirectSoundFullDuplex_tests(void) rc=CoCreateInstance(&CLSID_DirectSoundFullDuplex, NULL, CLSCTX_INPROC_SERVER, &IID_IDirectSoundFullDuplex, (void**)&dsfdo); - ok(rc==S_OK,"CoCreateInstance(CLSID_DirectSoundFullDuplex) failed: 0x%08x\n", rc); + ok(rc==S_OK,"CoCreateInstance(CLSID_DirectSoundFullDuplex) failed: 0x%08lx\n", rc); if (dsfdo) IDirectSoundFullDuplex_test(dsfdo, FALSE, &DSDEVID_DefaultVoiceCapture, &DSDEVID_DefaultVoicePlayback); @@ -154,7 +154,7 @@ static void IDirectSoundFullDuplex_tests(void) (void**)&dsfdo); ok(rc==E_NOINTERFACE, "CoCreateInstance(CLSID_DirectSoundFullDuplex,CLSID_DirectSoundPrivate) " - "should have failed: 0x%08x\n", rc); + "should have failed: 0x%08lx\n", rc);
ZeroMemory(&wfex, sizeof(wfex)); wfex.wFormatTag = WAVE_FORMAT_PCM; @@ -180,7 +180,7 @@ static void IDirectSoundFullDuplex_tests(void) rc = DirectSoundFullDuplexCreate(NULL, NULL, &DSCBufferDesc, &DSBufferDesc, get_hwnd(), DSSCL_EXCLUSIVE, &dsfdo, &pDSCBuffer8, &pDSBuffer8, NULL); ok(rc==DS_OK||rc==DSERR_NODRIVER||rc==DSERR_ALLOCATED||rc==E_FAIL||rc==DSERR_INVALIDCALL, - "DirectSoundFullDuplexCreate(NULL,NULL) failed: %08x\n",rc); + "DirectSoundFullDuplexCreate(NULL,NULL) failed: %08lx\n",rc); if (rc==S_OK && dsfdo) IDirectSoundFullDuplex_test(dsfdo, TRUE, NULL, NULL);
@@ -190,7 +190,7 @@ static void IDirectSoundFullDuplex_tests(void) DSSCL_EXCLUSIVE, &dsfdo, &pDSCBuffer8,&pDSBuffer8, NULL); ok(rc==DS_OK||rc==DSERR_NODRIVER||rc==DSERR_ALLOCATED||rc==E_FAIL||rc==DSERR_INVALIDCALL, "DirectSoundFullDuplexCreate(DSDEVID_DefaultCapture," - "DSDEVID_DefaultPlayback) failed: %08x\n", rc); + "DSDEVID_DefaultPlayback) failed: %08lx\n", rc); if (rc==DS_OK && dsfdo) IDirectSoundFullDuplex_test(dsfdo, TRUE, NULL, NULL);
@@ -200,7 +200,7 @@ static void IDirectSoundFullDuplex_tests(void) get_hwnd(), DSSCL_EXCLUSIVE, &dsfdo, &pDSCBuffer8, &pDSBuffer8, NULL); ok(rc==DS_OK||rc==DSERR_NODRIVER||rc==DSERR_ALLOCATED||rc==E_FAIL||rc==DSERR_INVALIDCALL, "DirectSoundFullDuplexCreate(DSDEVID_DefaultVoiceCapture," - "DSDEVID_DefaultVoicePlayback) failed: %08x\n", rc); + "DSDEVID_DefaultVoicePlayback) failed: %08lx\n", rc); if (rc==DS_OK && dsfdo) IDirectSoundFullDuplex_test(dsfdo, TRUE, NULL, NULL);
@@ -210,7 +210,7 @@ static void IDirectSoundFullDuplex_tests(void) get_hwnd(), DSSCL_EXCLUSIVE, &dsfdo, &pDSCBuffer8, &pDSBuffer8, NULL); ok(rc==DSERR_NODRIVER||rc==DSERR_INVALIDCALL, "DirectSoundFullDuplexCreate(DSDEVID_DefaultVoicePlayback," - "DSDEVID_DefaultVoiceCapture) should have failed: %08x\n", rc); + "DSDEVID_DefaultVoiceCapture) should have failed: %08lx\n", rc); if (rc==DS_OK && dsfdo) IDirectSoundFullDuplex_Release(dsfdo); } @@ -234,33 +234,33 @@ static void test_COM(void) hr = CoCreateInstance(&CLSID_DirectSoundFullDuplex, (IUnknown*)0xdeadbeef, CLSCTX_INPROC_SERVER, &IID_IUnknown, (void**)&dsfd); ok(hr == CLASS_E_NOAGGREGATION, - "DirectSoundFullDuplex create failed: %08x, expected CLASS_E_NOAGGREGATION\n", hr); + "DirectSoundFullDuplex create failed: %08lx, expected CLASS_E_NOAGGREGATION\n", hr); ok(!dsfd, "dsfd = %p\n", dsfd);
/* Invalid RIID */ hr = CoCreateInstance(&CLSID_DirectSoundFullDuplex, NULL, CLSCTX_INPROC_SERVER, &IID_IDirectSound3DBuffer, (void**)&dsfd); ok(hr == E_NOINTERFACE, - "DirectSoundFullDuplex create failed: %08x, expected E_NOINTERFACE\n", hr); + "DirectSoundFullDuplex create failed: %08lx, expected E_NOINTERFACE\n", hr);
/* Different refcount for IDirectSoundFullDuplex and for IUnknown */ hr = CoCreateInstance(&CLSID_DirectSoundFullDuplex, NULL, CLSCTX_INPROC_SERVER, &IID_IDirectSoundFullDuplex, (void**)&dsfd); - ok(hr == S_OK, "DirectSoundFullDuplex create failed: %08x, expected S_OK\n", hr); + ok(hr == S_OK, "DirectSoundFullDuplex create failed: %08lx, expected S_OK\n", hr); refcount = IDirectSoundFullDuplex_AddRef(dsfd); - ok(refcount == 2, "refcount == %u, expected 2\n", refcount); + ok(refcount == 2, "refcount == %lu, expected 2\n", refcount); hr = IDirectSoundFullDuplex_QueryInterface(dsfd, &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: %08lx\n", hr); refcount = IUnknown_AddRef(unk); - ok(refcount == 2, "refcount == %u, expected 2\n", refcount); + ok(refcount == 2, "refcount == %lu, expected 2\n", refcount);
/* Not initialized */ hr = IDirectSoundFullDuplex_QueryInterface(dsfd, &IID_IDirectSound8, (void**)&ds8); ok(hr == E_NOINTERFACE, - "QueryInterface for IID_IDirectSound8 failed: %08x, expected E_NOINTERFACE\n", hr); + "QueryInterface for IID_IDirectSound8 failed: %08lx, expected E_NOINTERFACE\n", hr); hr = IDirectSoundFullDuplex_QueryInterface(dsfd, &IID_IDirectSoundCapture, (void**)&dsc); ok(hr == E_NOINTERFACE, - "QueryInterface for IID_IDirectSoundCapture failed: %08x, expected E_NOINTERFACE\n", hr); + "QueryInterface for IID_IDirectSoundCapture failed: %08lx, expected E_NOINTERFACE\n", hr);
init_format(&wfx, WAVE_FORMAT_PCM, 44100, 16, 1); ZeroMemory(&bufdesc, sizeof(bufdesc)); @@ -274,49 +274,49 @@ static void test_COM(void) hr = IDirectSoundFullDuplex_Initialize(dsfd, NULL, NULL, &cbufdesc, &bufdesc, get_hwnd(), DSSCL_EXCLUSIVE, NULL, NULL); ok(hr == E_INVALIDARG, - "IDirectSoundFullDuplex_Initialize failed: %08x, expected E_INVALIDARG\n", hr); + "IDirectSoundFullDuplex_Initialize failed: %08lx, expected E_INVALIDARG\n", hr); hr = IDirectSoundFullDuplex_Initialize(dsfd, NULL, NULL, &cbufdesc, &bufdesc, get_hwnd(), DSSCL_EXCLUSIVE, &dscb8, &dsb8); if (hr == DSERR_NODRIVER || hr == DSERR_INVALIDCALL) { skip("No driver\n"); return; } - ok(hr == S_OK, "IDirectSoundFullDuplex_Initialize failed: %08x\n", hr); + ok(hr == S_OK, "IDirectSoundFullDuplex_Initialize failed: %08lx\n", hr);
/* IDirectSound and IDirectSound8 */ hr = IDirectSoundFullDuplex_QueryInterface(dsfd, &IID_IDirectSound8, (void**)&ds8); - ok(hr == S_OK, "QueryInterface for IID_IDirectSound8 failed: %08x\n", hr); + ok(hr == S_OK, "QueryInterface for IID_IDirectSound8 failed: %08lx\n", hr); refcount = IDirectSound8_AddRef(ds8); - ok(refcount == 2, "refcount == %u, expected 2\n", refcount); + ok(refcount == 2, "refcount == %lu, expected 2\n", refcount); hr = IDirectSoundFullDuplex_QueryInterface(dsfd, &IID_IDirectSound, (void**)&ds); - ok(hr == S_OK, "QueryInterface for IID_IDirectSound failed: %08x\n", hr); + ok(hr == S_OK, "QueryInterface for IID_IDirectSound failed: %08lx\n", hr); refcount = IDirectSound8_AddRef(ds8); - ok(refcount == 4, "refcount == %u, expected 4\n", refcount); + ok(refcount == 4, "refcount == %lu, expected 4\n", refcount); refcount = IDirectSound_AddRef(ds); - ok(refcount == 5, "refcount == %u, expected 5\n", refcount); + ok(refcount == 5, "refcount == %lu, expected 5\n", refcount); hr = IDirectSound8_QueryInterface(ds8, &IID_IUnknown, (void**)&unk8); - ok(hr == S_OK, "QueryInterface for IID_IUnknown failed: %08x\n", hr); + ok(hr == S_OK, "QueryInterface for IID_IUnknown failed: %08lx\n", hr); ok(unk == unk8, "Got different IUnknown when QI'ing IDirectSoundFullDuplex and IDirectSound\n"); refcount = IUnknown_AddRef(unk8); - ok(refcount == 4, "refcount == %u, expected 4\n", refcount); + ok(refcount == 4, "refcount == %lu, expected 4\n", refcount); refcount = IDirectSound_AddRef(ds); - ok(refcount == 6, "refcount == %u, expected 6\n", refcount); + ok(refcount == 6, "refcount == %lu, expected 6\n", refcount); refcount = IDirectSoundFullDuplex_AddRef(dsfd); - ok(refcount == 3, "refcount == %u, expected 3\n", refcount); + ok(refcount == 3, "refcount == %lu, expected 3\n", refcount);
/* IDirectSoundCapture */ hr = IDirectSoundFullDuplex_QueryInterface(dsfd, &IID_IDirectSoundCapture, (void**)&dsc); - ok(hr == S_OK, "QueryInterface for IID_IDirectSoundCapture failed: %08x\n", hr); + ok(hr == S_OK, "QueryInterface for IID_IDirectSoundCapture failed: %08lx\n", hr); refcount = IDirectSoundCapture_AddRef(dsc); - ok(refcount == 2, "refcount == %u, expected 2\n", refcount); + ok(refcount == 2, "refcount == %lu, expected 2\n", refcount); refcount = IDirectSoundFullDuplex_AddRef(dsfd); - ok(refcount == 4, "refcount == %u, expected 4\n", refcount); + ok(refcount == 4, "refcount == %lu, expected 4\n", refcount); hr = IDirectSound8_QueryInterface(ds8, &IID_IUnknown, (void**)&unk8); - ok(hr == S_OK, "QueryInterface for IID_IUnknown failed: %08x\n", hr); + ok(hr == S_OK, "QueryInterface for IID_IUnknown failed: %08lx\n", hr); ok(unk == unk8, "Got different IUnknown when QI'ing IDirectSoundFullDuplex and IDirectSoundCapture\n"); refcount = IUnknown_AddRef(unk8); - ok(refcount == 6, "refcount == %u, expected 6\n", refcount); + ok(refcount == 6, "refcount == %lu, expected 6\n", refcount);
IDirectSoundBuffer8_Release(dsb8); IDirectSoundCaptureBuffer8_Release(dscb8); diff --git a/dlls/dsound/tests/propset.c b/dlls/dsound/tests/propset.c index 94f0d36345f..71040a70c77 100644 --- a/dlls/dsound/tests/propset.c +++ b/dlls/dsound/tests/propset.c @@ -67,7 +67,7 @@ static BOOL CALLBACK callback(PDSPROPERTY_DIRECTSOUNDDEVICE_DESCRIPTION_DATA dat trace(" Description: %s\n", data->Description); trace(" Module: %s\n", data->Module); trace(" Interface: %s\n", data->Interface); - trace(" WaveDeviceId: %d\n", data->WaveDeviceId); + trace(" WaveDeviceId: %ld\n", data->WaveDeviceId);
return TRUE; } @@ -94,7 +94,7 @@ static BOOL CALLBACK callback1(PDSPROPERTY_DIRECTSOUNDDEVICE_DESCRIPTION_1_DATA trace(" ModuleA: %s\n", data->ModuleA); WideCharToMultiByte(CP_ACP, 0, data->ModuleW, -1, moduleA, sizeof(moduleA), NULL, NULL); trace(" ModuleW: %s\n", moduleA); - trace(" WaveDeviceId: %d\n", data->WaveDeviceId); + trace(" WaveDeviceId: %ld\n", data->WaveDeviceId);
return TRUE; } @@ -115,7 +115,7 @@ static BOOL CALLBACK callbackA(PDSPROPERTY_DIRECTSOUNDDEVICE_DESCRIPTION_A_DATA trace(" Description: %s\n", data->Description); trace(" Module: %s\n", data->Module); trace(" Interface: %s\n", data->Interface); - trace(" WaveDeviceId: %d\n", data->WaveDeviceId); + trace(" WaveDeviceId: %ld\n", data->WaveDeviceId);
return TRUE; } @@ -143,7 +143,7 @@ static BOOL CALLBACK callbackW(PDSPROPERTY_DIRECTSOUNDDEVICE_DESCRIPTION_W_DATA trace("\tDescription: %s\n", descriptionA); trace("\tModule: %s\n", moduleA); trace("\tInterface: %s\n", interfaceA); - trace("\tWaveDeviceId: %d\n", data->WaveDeviceId); + trace("\tWaveDeviceId: %ld\n", data->WaveDeviceId);
return TRUE; } @@ -160,20 +160,20 @@ static void propset_private_tests(void) rc = (pDllGetClassObject)(&CLSID_DirectSound, &IID_IClassFactory, NULL); ok(rc==DSERR_INVALIDPARAM,"DllGetClassObject(CLSID_DirectSound, " "IID_IClassFactory) should have returned DSERR_INVALIDPARAM, " - "returned: %08x\n",rc); + "returned: %08lx\n",rc);
rc = (pDllGetClassObject)(&CLSID_DirectSound, &IID_IDirectSound, (void **)(&pcf)); ok(rc==E_NOINTERFACE,"DllGetClassObject(CLSID_DirectSound, " "IID_IDirectSound) should have returned E_NOINTERFACE, " - "returned: %08x\n",rc); + "returned: %08lx\n",rc);
rc = (pDllGetClassObject)(&CLSID_DirectSound, &IID_IUnknown, (void **)(&pcf)); ok(rc==DS_OK,"DllGetClassObject(CLSID_DirectSound, " - "IID_IUnknown) failed: %08x\n",rc); + "IID_IUnknown) failed: %08lx\n",rc);
rc = (pDllGetClassObject)(&CLSID_DirectSound, &IID_IClassFactory, (void **)(&pcf)); ok(pcf!=0, "DllGetClassObject(CLSID_DirectSound, IID_IClassFactory) " - "failed: %08x\n",rc); + "failed: %08lx\n",rc); if (pcf==0) return;
@@ -182,17 +182,17 @@ static void propset_private_tests(void) rc = IClassFactory_CreateInstance(pcf, NULL, &IID_IKsPropertySet, NULL); ok(rc==DSERR_INVALIDPARAM, "CreateInstance(IID_IKsPropertySet) should have " - "returned DSERR_INVALIDPARAM, returned: %08x\n",rc); + "returned DSERR_INVALIDPARAM, returned: %08lx\n",rc);
rc = IClassFactory_CreateInstance(pcf, NULL, &IID_IKsPropertySet, (void **)(&pps)); ok(rc==E_NOINTERFACE, "CreateInstance(IID_IKsPropertySet) should have " - "returned E_NOINTERFACE, returned: %08x\n",rc); + "returned E_NOINTERFACE, returned: %08lx\n",rc);
/* and the direct sound 8 version */ rc = pDllGetClassObject(&CLSID_DirectSound8, &IID_IClassFactory, (void **)&pcf); ok(pcf!=0, "DllGetClassObject(CLSID_DirectSound8, IID_IClassFactory) " - "failed: %08x\n",rc); + "failed: %08lx\n",rc); if (pcf==0) return;
@@ -200,12 +200,12 @@ static void propset_private_tests(void) rc = IClassFactory_CreateInstance(pcf, NULL, &IID_IKsPropertySet, (void **)(&pps)); ok(rc==E_NOINTERFACE, "CreateInstance(IID_IKsPropertySet) should have " - "returned E_NOINTERFACE, returned: %08x\n",rc); + "returned E_NOINTERFACE, returned: %08lx\n",rc);
/* try direct sound capture next */ rc = pDllGetClassObject(&CLSID_DirectSoundCapture, &IID_IClassFactory, (void **)&pcf); ok(pcf!=0, "DllGetClassObject(CLSID_DirectSoundCapture, IID_IClassFactory) " - "failed: %08x\n",rc); + "failed: %08lx\n",rc); if (pcf==0) return;
@@ -213,12 +213,12 @@ static void propset_private_tests(void) rc = IClassFactory_CreateInstance(pcf, NULL, &IID_IKsPropertySet, (void **)(&pps)); ok(rc==E_NOINTERFACE, "CreateInstance(IID_IKsPropertySet) should have " - "returned E_NOINTERFACE,returned: %08x\n",rc); + "returned E_NOINTERFACE,returned: %08lx\n",rc);
/* and the direct sound capture 8 version */ rc = pDllGetClassObject(&CLSID_DirectSoundCapture8, &IID_IClassFactory, (void **)&pcf); ok(pcf!=0, "DllGetClassObject(CLSID_DirectSoundCapture8, " - "IID_IClassFactory) failed: %08x\n",rc); + "IID_IClassFactory) failed: %08lx\n",rc); if (pcf==0) return;
@@ -226,13 +226,13 @@ static void propset_private_tests(void) rc = IClassFactory_CreateInstance(pcf, NULL, &IID_IKsPropertySet, (void **)(&pps)); ok(rc==E_NOINTERFACE, "CreateInstance(IID_IKsPropertySet) should have " - "returned E_NOINTERFACE, returned: %08x\n",rc); + "returned E_NOINTERFACE, returned: %08lx\n",rc);
/* try direct sound full duplex next */ rc = (pDllGetClassObject)(&CLSID_DirectSoundFullDuplex, &IID_IClassFactory, (void **)(&pcf)); ok(pcf!=0, "DllGetClassObject(CLSID_DirectSoundFullDuplex, " - "IID_IClassFactory) failed: %08x\n",rc); + "IID_IClassFactory) failed: %08lx\n",rc); if (pcf==0) return;
@@ -240,7 +240,7 @@ static void propset_private_tests(void) rc = IClassFactory_CreateInstance(pcf, NULL, &IID_IKsPropertySet, (void **)(&pps)); ok(rc==E_NOINTERFACE, "CreateInstance(IID_IKsPropertySet) should have " - "returned NOINTERFACE, returned: %08x\n",rc); + "returned NOINTERFACE, returned: %08lx\n",rc);
/* try direct sound private last */ rc = (pDllGetClassObject)(&CLSID_DirectSoundPrivate, &IID_IClassFactory, @@ -253,7 +253,7 @@ static void propset_private_tests(void) /* direct sound private does have an IKsPropertySet */ rc = IClassFactory_CreateInstance(pcf, NULL, &IID_IKsPropertySet, (void **)(&pps)); - ok(rc==DS_OK, "CreateInstance(IID_IKsPropertySet) failed: %08x\n", + ok(rc==DS_OK, "CreateInstance(IID_IKsPropertySet) failed: %08lx\n", rc); if (rc!=DS_OK) return; @@ -264,7 +264,7 @@ static void propset_private_tests(void) &support); ok(rc==DS_OK||rc==E_INVALIDARG, "QuerySupport(DSPROPSETID_DirectSoundDevice, " - "DSPROPERTY_DIRECTSOUNDDEVICE_DESCRIPTION) failed: %08x\n", + "DSPROPERTY_DIRECTSOUNDDEVICE_DESCRIPTION) failed: %08lx\n", rc); if (rc!=DS_OK) { if (rc==E_INVALIDARG) @@ -274,10 +274,10 @@ static void propset_private_tests(void)
ok(support & KSPROPERTY_SUPPORT_GET, "Couldn't get DSPROPERTY_DIRECTSOUNDDEVICE_DESCRIPTION: " - "support = 0x%x\n",support); + "support = 0x%lx\n",support); ok(!(support & KSPROPERTY_SUPPORT_SET), "Shouldn't be able to set DSPROPERTY_DIRECTSOUNDDEVICE_DESCRIPTION: " - "support = 0x%x\n",support); + "support = 0x%lx\n",support);
/* test DSPROPERTY_DIRECTSOUNDDEVICE_DESCRIPTION_1 */ rc = IKsPropertySet_QuerySupport(pps, &DSPROPSETID_DirectSoundDevice, @@ -285,7 +285,7 @@ static void propset_private_tests(void) &support); ok(rc==DS_OK||rc==E_INVALIDARG, "QuerySupport(DSPROPSETID_DirectSoundDevice, " - "DSPROPERTY_DIRECTSOUNDDEVICE_DESCRIPTION_1) failed: %08x\n", + "DSPROPERTY_DIRECTSOUNDDEVICE_DESCRIPTION_1) failed: %08lx\n", rc); if (rc!=DS_OK) { if (rc==E_INVALIDARG) @@ -295,10 +295,10 @@ static void propset_private_tests(void)
ok(support & KSPROPERTY_SUPPORT_GET, "Couldn't get DSPROPERTY_DIRECTSOUNDDEVICE_DESCRIPTION_1: " - "support = 0x%x\n",support); + "support = 0x%lx\n",support); ok(!(support & KSPROPERTY_SUPPORT_SET), "Shouldn't be able to set DSPROPERTY_DIRECTSOUNDDEVICE_DESCRIPTION_1: " - "support = 0x%x\n",support); + "support = 0x%lx\n",support);
/* test DSPROPERTY_DIRECTSOUNDDEVICE_DESCRIPTION_A */ rc = IKsPropertySet_QuerySupport(pps, &DSPROPSETID_DirectSoundDevice, @@ -306,7 +306,7 @@ static void propset_private_tests(void) &support); ok(rc==DS_OK||rc==E_INVALIDARG, "QuerySupport(DSPROPSETID_DirectSoundDevice, " - "DSPROPERTY_DIRECTSOUNDDEVICE_DESCRIPTION_A) failed: %08x\n", + "DSPROPERTY_DIRECTSOUNDDEVICE_DESCRIPTION_A) failed: %08lx\n", rc); if (rc!=DS_OK) { if (rc==E_INVALIDARG) @@ -316,10 +316,10 @@ static void propset_private_tests(void)
ok(support & KSPROPERTY_SUPPORT_GET, "Couldn't get DSPROPERTY_DIRECTSOUNDDEVICE_DESCRIPTION_A: " - "support = 0x%x\n",support); + "support = 0x%lx\n",support); ok(!(support & KSPROPERTY_SUPPORT_SET), "Shouldn't be able to set DSPROPERTY_DIRECTSOUNDDEVICE_DESCRIPTION_A: " - "support = 0x%x\n",support); + "support = 0x%lx\n",support);
/* test DSPROPERTY_DIRECTSOUNDDEVICE_DESCRIPTION_W */ rc = IKsPropertySet_QuerySupport(pps, &DSPROPSETID_DirectSoundDevice, @@ -327,7 +327,7 @@ static void propset_private_tests(void) &support); ok(rc==DS_OK||rc==E_INVALIDARG, "QuerySupport(DSPROPSETID_DirectSoundDevice, " - "DSPROPERTY_DIRECTSOUNDDEVICE_DESCRIPTION_W) failed: %08x\n", + "DSPROPERTY_DIRECTSOUNDDEVICE_DESCRIPTION_W) failed: %08lx\n", rc); if (rc!=DS_OK) { if (rc==E_INVALIDARG) @@ -337,58 +337,58 @@ static void propset_private_tests(void)
ok(support & KSPROPERTY_SUPPORT_GET, "Couldn't get DSPROPERTY_DIRECTSOUNDDEVICE_DESCRIPTION_W: " - "support = 0x%x\n",support); + "support = 0x%lx\n",support); ok(!(support & KSPROPERTY_SUPPORT_SET), "Shouldn't be able to set DSPROPERTY_DIRECTSOUNDDEVICE_DESCRIPTION_W: " - "support = 0x%x\n",support); + "support = 0x%lx\n",support);
/* test generic DSPROPERTY_DIRECTSOUNDDEVICE_WAVEDEVICEMAPPING */ rc = IKsPropertySet_QuerySupport(pps, &DSPROPSETID_DirectSoundDevice, DSPROPERTY_DIRECTSOUNDDEVICE_WAVEDEVICEMAPPING, &support); ok(rc==DS_OK, "QuerySupport(DSPROPSETID_DirectSoundDevice, " - "DSPROPERTY_DIRECTSOUNDDEVICE_WAVEDEVICEMAPPING) failed: %08x\n", + "DSPROPERTY_DIRECTSOUNDDEVICE_WAVEDEVICEMAPPING) failed: %08lx\n", rc); if (rc!=DS_OK) return;
ok(support & KSPROPERTY_SUPPORT_GET, "Couldn't get DSPROPERTY_DIRECTSOUNDDEVICE_WAVEDEVICEMAPPING: " - "support = 0x%x\n",support); + "support = 0x%lx\n",support); ok(!(support & KSPROPERTY_SUPPORT_SET), "Shouldn't be able to set " "DSPROPERTY_DIRECTSOUNDDEVICE_WAVEDEVICEMAPPING: support = " - "0x%x\n",support); + "0x%lx\n",support);
/* test DSPROPERTY_DIRECTSOUNDDEVICE_WAVEDEVICEMAPPING_A */ rc = IKsPropertySet_QuerySupport(pps, &DSPROPSETID_DirectSoundDevice, DSPROPERTY_DIRECTSOUNDDEVICE_WAVEDEVICEMAPPING_A, &support); ok(rc==DS_OK, "QuerySupport(DSPROPSETID_DirectSoundDevice, " - "DSPROPERTY_DIRECTSOUNDDEVICE_WAVEDEVICEMAPPING_A) failed: %08x\n", + "DSPROPERTY_DIRECTSOUNDDEVICE_WAVEDEVICEMAPPING_A) failed: %08lx\n", rc); if (rc!=DS_OK) return;
ok(support & KSPROPERTY_SUPPORT_GET, "Couldn't get DSPROPERTY_DIRECTSOUNDDEVICE_WAVEDEVICEMAPPING_A: " - "support = 0x%x\n",support); + "support = 0x%lx\n",support); ok(!(support & KSPROPERTY_SUPPORT_SET), "Shouldn't be able to set " "DSPROPERTY_DIRECTSOUNDDEVICE_WAVEDEVICEMAPPING_A: support = " - "0x%x\n",support); + "0x%lx\n",support);
/* test DSPROPERTY_DIRECTSOUNDDEVICE_WAVEDEVICEMAPPING_W */ rc = IKsPropertySet_QuerySupport(pps, &DSPROPSETID_DirectSoundDevice, DSPROPERTY_DIRECTSOUNDDEVICE_WAVEDEVICEMAPPING_W, &support); ok(rc==DS_OK, "QuerySupport(DSPROPSETID_DirectSoundDevice, " - "DSPROPERTY_DIRECTSOUNDDEVICE_WAVEDEVICEMAPPING_W) failed: %08x\n", + "DSPROPERTY_DIRECTSOUNDDEVICE_WAVEDEVICEMAPPING_W) failed: %08lx\n", rc); if (rc!=DS_OK) return;
ok(support & KSPROPERTY_SUPPORT_GET, "Couldn't get DSPROPERTY_DIRECTSOUNDDEVICE_WAVEDEVICEMAPPING_W: " - "support = 0x%x\n",support); + "support = 0x%lx\n",support); ok(!(support & KSPROPERTY_SUPPORT_SET), "Shouldn't be able to set " "DSPROPERTY_DIRECTSOUNDDEVICE_WAVEDEVICEMAPPING_W: support = " - "0x%x\n",support); + "0x%lx\n",support);
/* test generic DSPROPERTY_DIRECTSOUNDDEVICE_ENUMERATE */ trace("*** Testing DSPROPERTY_DIRECTSOUNDDEVICE_ENUMERATE ***\n"); @@ -396,16 +396,16 @@ static void propset_private_tests(void) DSPROPERTY_DIRECTSOUNDDEVICE_ENUMERATE, &support); ok(rc==DS_OK, "QuerySupport(DSPROPSETID_DirectSoundDevice, " - "DSPROPERTY_DIRECTSOUNDDEVICE_ENUMERATE) failed: %08x\n", + "DSPROPERTY_DIRECTSOUNDDEVICE_ENUMERATE) failed: %08lx\n", rc); if (rc!=DS_OK) return;
ok(support & KSPROPERTY_SUPPORT_GET, "Couldn't get DSPROPERTY_DIRECTSOUNDDEVICE_ENUMERATE: " - "support = 0x%x\n",support); + "support = 0x%lx\n",support); ok(!(support & KSPROPERTY_SUPPORT_SET),"Shouldn't be able to set " - "DSPROPERTY_DIRECTSOUNDDEVICE_ENUMERATE: support = 0x%x\n",support); + "DSPROPERTY_DIRECTSOUNDDEVICE_ENUMERATE: support = 0x%lx\n",support);
if (support & KSPROPERTY_SUPPORT_GET) { DSPROPERTY_DIRECTSOUNDDEVICE_ENUMERATE_DATA data; @@ -417,7 +417,7 @@ static void propset_private_tests(void) rc = IKsPropertySet_Get(pps, &DSPROPSETID_DirectSoundDevice, DSPROPERTY_DIRECTSOUNDDEVICE_ENUMERATE, NULL, 0, &data, sizeof(data), &bytes); - ok(rc==DS_OK, "Couldn't enumerate: 0x%x\n",rc); + ok(rc==DS_OK, "Couldn't enumerate: 0x%lx\n",rc); }
/* test DSPROPERTY_DIRECTSOUNDDEVICE_ENUMERATE_1 */ @@ -426,16 +426,16 @@ static void propset_private_tests(void) DSPROPERTY_DIRECTSOUNDDEVICE_ENUMERATE_1, &support); ok(rc==DS_OK, "QuerySupport(DSPROPSETID_DirectSoundDevice, " - "DSPROPERTY_DIRECTSOUNDDEVICE_ENUMERATE_1) failed: %08x\n", + "DSPROPERTY_DIRECTSOUNDDEVICE_ENUMERATE_1) failed: %08lx\n", rc); if (rc!=DS_OK) return;
ok(support & KSPROPERTY_SUPPORT_GET, "Couldn't get DSPROPERTY_DIRECTSOUNDDEVICE_ENUMERATE_1: " - "support = 0x%x\n",support); + "support = 0x%lx\n",support); ok(!(support & KSPROPERTY_SUPPORT_SET),"Shouldn't be able to set " - "DSPROPERTY_DIRECTSOUNDDEVICE_ENUMERATE_1: support = 0x%x\n",support); + "DSPROPERTY_DIRECTSOUNDDEVICE_ENUMERATE_1: support = 0x%lx\n",support);
if (support & KSPROPERTY_SUPPORT_GET) { DSPROPERTY_DIRECTSOUNDDEVICE_ENUMERATE_1_DATA data; @@ -447,7 +447,7 @@ static void propset_private_tests(void) rc = IKsPropertySet_Get(pps, &DSPROPSETID_DirectSoundDevice, DSPROPERTY_DIRECTSOUNDDEVICE_ENUMERATE_1, NULL, 0, &data, sizeof(data), &bytes); - ok(rc==DS_OK, "Couldn't enumerate: 0x%x\n",rc); + ok(rc==DS_OK, "Couldn't enumerate: 0x%lx\n",rc); }
/* test DSPROPERTY_DIRECTSOUNDDEVICE_ENUMERATE_A */ @@ -456,16 +456,16 @@ static void propset_private_tests(void) DSPROPERTY_DIRECTSOUNDDEVICE_ENUMERATE_A, &support); ok(rc==DS_OK, "QuerySupport(DSPROPSETID_DirectSoundDevice, " - "DSPROPERTY_DIRECTSOUNDDEVICE_ENUMERATE_A) failed: %08x\n", + "DSPROPERTY_DIRECTSOUNDDEVICE_ENUMERATE_A) failed: %08lx\n", rc); if (rc!=DS_OK) return;
ok(support & KSPROPERTY_SUPPORT_GET, "Couldn't get DSPROPERTY_DIRECTSOUNDDEVICE_ENUMERATE_A: " - "support = 0x%x\n",support); + "support = 0x%lx\n",support); ok(!(support & KSPROPERTY_SUPPORT_SET),"Shouldn't be able to set " - "DSPROPERTY_DIRECTSOUNDDEVICE_ENUMERATE_A: support = 0x%x\n",support); + "DSPROPERTY_DIRECTSOUNDDEVICE_ENUMERATE_A: support = 0x%lx\n",support);
if (support & KSPROPERTY_SUPPORT_GET) { DSPROPERTY_DIRECTSOUNDDEVICE_ENUMERATE_A_DATA data; @@ -477,7 +477,7 @@ static void propset_private_tests(void) rc = IKsPropertySet_Get(pps, &DSPROPSETID_DirectSoundDevice, DSPROPERTY_DIRECTSOUNDDEVICE_ENUMERATE_A, NULL, 0, &data, sizeof(data), &bytes); - ok(rc==DS_OK, "Couldn't enumerate: 0x%x\n",rc); + ok(rc==DS_OK, "Couldn't enumerate: 0x%lx\n",rc); }
/* test DSPROPERTY_DIRECTSOUNDDEVICE_ENUMERATE_W */ @@ -486,16 +486,16 @@ static void propset_private_tests(void) DSPROPERTY_DIRECTSOUNDDEVICE_ENUMERATE_W, &support); ok(rc==DS_OK, "QuerySupport(DSPROPSETID_DirectSoundDevice, " - "DSPROPERTY_DIRECTSOUNDDEVICE_ENUMERATE_W) failed: %08x\n", + "DSPROPERTY_DIRECTSOUNDDEVICE_ENUMERATE_W) failed: %08lx\n", rc); if (rc!=DS_OK) return;
ok(support & KSPROPERTY_SUPPORT_GET, "Couldn't get DSPROPERTY_DIRECTSOUNDDEVICE_ENUMERATE_W: " - "support = 0x%x\n",support); + "support = 0x%lx\n",support); ok(!(support & KSPROPERTY_SUPPORT_SET),"Shouldn't be able to set " - "DSPROPERTY_DIRECTSOUNDDEVICE_ENUMERATE_W: support = 0x%x\n",support); + "DSPROPERTY_DIRECTSOUNDDEVICE_ENUMERATE_W: support = 0x%lx\n",support);
if (support & KSPROPERTY_SUPPORT_GET) { DSPROPERTY_DIRECTSOUNDDEVICE_ENUMERATE_W_DATA data; @@ -507,7 +507,7 @@ static void propset_private_tests(void) rc = IKsPropertySet_Get(pps, &DSPROPSETID_DirectSoundDevice, DSPROPERTY_DIRECTSOUNDDEVICE_ENUMERATE_W, NULL, 0, &data, sizeof(data), &bytes); - ok(rc==DS_OK, "Couldn't enumerate: 0x%x\n",rc); + ok(rc==DS_OK, "Couldn't enumerate: 0x%lx\n",rc); } IKsPropertySet_Release(pps); } @@ -529,7 +529,7 @@ static BOOL WINAPI dsenum_callback(LPGUID lpGuid, LPCSTR lpcstrDescription,
rc = DirectSoundCreate(lpGuid, &dso, NULL); ok(rc==DS_OK||rc==DSERR_NODRIVER||rc==DSERR_ALLOCATED||rc==E_FAIL, - "DirectSoundCreate() failed: %08x\n",rc); + "DirectSoundCreate() failed: %08lx\n",rc); if (rc!=DS_OK) { if (rc==DSERR_NODRIVER) trace(" No Driver\n"); @@ -543,7 +543,7 @@ static BOOL WINAPI dsenum_callback(LPGUID lpGuid, LPCSTR lpcstrDescription, /* We must call SetCooperativeLevel before calling CreateSoundBuffer */ /* DSOUND: Setting DirectSound cooperative level to DSSCL_PRIORITY */ rc=IDirectSound_SetCooperativeLevel(dso,get_hwnd(),DSSCL_PRIORITY); - ok(rc==DS_OK,"IDirectSound_SetCooperativeLevel() failed: %08x\n", + ok(rc==DS_OK,"IDirectSound_SetCooperativeLevel() failed: %08lx\n", rc); if (rc!=DS_OK) goto EXIT; @@ -557,7 +557,7 @@ static BOOL WINAPI dsenum_callback(LPGUID lpGuid, LPCSTR lpcstrDescription, ok((rc==DS_OK&&primary!=NULL) || broken(rc==DSERR_INVALIDPARAM), "IDirectSound_CreateSoundBuffer() failed to " - "create a hardware 3D primary buffer: %08x\n",rc); + "create a hardware 3D primary buffer: %08lx\n",rc); if(rc==DSERR_INVALIDPARAM) { skip("broken driver\n"); goto EXIT; @@ -575,11 +575,11 @@ static BOOL WINAPI dsenum_callback(LPGUID lpGuid, LPCSTR lpcstrDescription, bufdesc.dwFlags=DSBCAPS_CTRLDEFAULT|DSBCAPS_GETCURRENTPOSITION2; bufdesc.dwBufferBytes=wfx.nAvgBytesPerSec; bufdesc.lpwfxFormat=&wfx; - trace(" Testing a secondary buffer at %dx%dx%d\n", + trace(" Testing a secondary buffer at %ldx%dx%d\n", wfx.nSamplesPerSec,wfx.wBitsPerSample,wfx.nChannels); rc=IDirectSound_CreateSoundBuffer(dso,&bufdesc,&secondary,NULL); ok((rc==DS_OK && secondary!=NULL) || broken(rc == DSERR_CONTROLUNAVAIL), /* vmware drivers on w2k */ - "IDirectSound_CreateSoundBuffer() failed to create a secondary buffer: %08x\n",rc); + "IDirectSound_CreateSoundBuffer() failed to create a secondary buffer: %08lx\n",rc); if (rc==DS_OK&&secondary!=NULL) { IKsPropertySet * pPropertySet=NULL; rc=IDirectSoundBuffer_QueryInterface(secondary, @@ -671,7 +671,7 @@ static void propset_buffer_tests(void) { HRESULT rc; rc = DirectSoundEnumerateA(dsenum_callback, NULL); - ok(rc==DS_OK,"DirectSoundEnumerateA() failed: %08x\n",rc); + ok(rc==DS_OK,"DirectSoundEnumerateA() failed: %08lx\n",rc); trace("tested %u DirectSound drivers\n", driver_count); }
Signed-off-by: Eric Pouech eric.pouech@gmail.com
--- dlls/dssenh/tests/Makefile.in | 1 dlls/dssenh/tests/dssenh.c | 254 +++++++++++++++++++++-------------------- 2 files changed, 127 insertions(+), 128 deletions(-)
diff --git a/dlls/dssenh/tests/Makefile.in b/dlls/dssenh/tests/Makefile.in index 2631c252ea9..d8c2f1f1429 100644 --- a/dlls/dssenh/tests/Makefile.in +++ b/dlls/dssenh/tests/Makefile.in @@ -1,4 +1,3 @@ -EXTRADEFS = -DWINE_NO_LONG_TYPES TESTDLL = dssenh.dll IMPORTS = advapi32
diff --git a/dlls/dssenh/tests/dssenh.c b/dlls/dssenh/tests/dssenh.c index f399f67d210..fb9ab820330 100644 --- a/dlls/dssenh/tests/dssenh.c +++ b/dlls/dssenh/tests/dssenh.c @@ -38,36 +38,36 @@ static void test_acquire_context(void) SetLastError(0xdeadbeef); result = CryptAcquireContextA(&hProv, NULL, NULL, 0, 0); ok(!result && GetLastError() == NTE_BAD_PROV_TYPE, - "Expected NTE_BAD_PROV_TYPE, got %08x\n", GetLastError()); + "Expected NTE_BAD_PROV_TYPE, got %08lx\n", GetLastError());
SetLastError(0xdeadbeef); result = CryptAcquireContextA(&hProv, NULL, NULL, 0, CRYPT_VERIFYCONTEXT); ok(!result && GetLastError() == NTE_BAD_PROV_TYPE, - "Expected NTE_BAD_PROV_TYPE, got %08x\n", GetLastError()); + "Expected NTE_BAD_PROV_TYPE, got %08lx\n", GetLastError());
/* flag allows us to delete a keyset, but not of an unknown provider */ SetLastError(0xdeadbeef); result = CryptAcquireContextA(&hProv, NULL, NULL, 0, CRYPT_DELETEKEYSET); ok(!result && GetLastError() == NTE_BAD_PROV_TYPE, - "Expected NTE_BAD_PROV_TYPE, got %08x\n", GetLastError()); + "Expected NTE_BAD_PROV_TYPE, got %08lx\n", GetLastError());
/* cannot acquire along with PROV_RSA_SIG, not compatible */ SetLastError(0xdeadbeef); result = CryptAcquireContextA(&hProv, NULL, MS_DEF_DSS_PROV_A, PROV_RSA_SIG, 0); ok(!result && GetLastError() == NTE_PROV_TYPE_NO_MATCH, - "Expected NTE_PROV_TYPE_NO_MATCH, got %08x\n", GetLastError()); + "Expected NTE_PROV_TYPE_NO_MATCH, got %08lx\n", GetLastError());
/* cannot acquire along with MS_DEF_RSA_SIG_PROV_A, not compatible */ SetLastError(0xdeadbeef); result = CryptAcquireContextA(&hProv, NULL, MS_DEF_RSA_SIG_PROV_A, PROV_DSS, 0); ok(!result && GetLastError() == NTE_KEYSET_NOT_DEF, - "Expected NTE_KEYSET_NOT_DEF, got %08x\n", GetLastError()); + "Expected NTE_KEYSET_NOT_DEF, got %08lx\n", GetLastError());
/* cannot acquire provider with 0 as Prov Type */ SetLastError(0xdeadbeef); result = CryptAcquireContextA(&hProv, NULL, MS_DEF_DSS_PROV_A, 0, 0); ok(!result && GetLastError() == NTE_BAD_PROV_TYPE, - "Expected NTE_BAD_PROV_TYPE, got %08x\n", GetLastError()); + "Expected NTE_BAD_PROV_TYPE, got %08lx\n", GetLastError());
/* test base DSS provider (PROV_DSS) */
@@ -75,7 +75,7 @@ static void test_acquire_context(void) result = CryptAcquireContextA(&hProv, NULL, NULL, PROV_DSS, 0); if (!result) { - ok(GetLastError() == NTE_BAD_KEYSET, "Expected NTE_BAD_KEYSET, got %08x\n", GetLastError()); + ok(GetLastError() == NTE_BAD_KEYSET, "Expected NTE_BAD_KEYSET, got %08lx\n", GetLastError()); SetLastError(0xdeadbeef); result = CryptAcquireContextA(&hProv, NULL, NULL, PROV_DSS, CRYPT_NEWKEYSET); } @@ -176,19 +176,19 @@ static void test_acquire_context(void) result = CryptAcquireContextA( &hProv, NULL, MS_DEF_DSS_DH_PROV_A, PROV_DSS_DH, CRYPT_NEWKEYSET); ok(!result && GetLastError() == NTE_EXISTS, - "Expected NTE_EXISTS, got %08x\n", GetLastError()); + "Expected NTE_EXISTS, got %08lx\n", GetLastError());
SetLastError(0xdeadbeef); result = CryptAcquireContextA( &hProv, NULL, MS_ENH_DSS_DH_PROV_A, PROV_DSS_DH, CRYPT_NEWKEYSET); ok(!result && GetLastError() == NTE_EXISTS, - "Expected NTE_EXISTS, got %08x\n", GetLastError()); + "Expected NTE_EXISTS, got %08lx\n", GetLastError());
SetLastError(0xdeadbeef); result = CryptAcquireContextA( &hProv, NULL, MS_DEF_DH_SCHANNEL_PROV_A, PROV_DH_SCHANNEL, CRYPT_NEWKEYSET); ok(!result && GetLastError() == NTE_EXISTS, - "Expected NTE_EXISTS, got %08x\n", GetLastError()); + "Expected NTE_EXISTS, got %08lx\n", GetLastError()); }
struct keylength_test { @@ -324,19 +324,19 @@ static void test_keylength_array(HCRYPTPROV hProv,const struct keylength_test *t /* success */ if (tests[i].expectedResult) { - todo_wine_if (tests[i].todo_result) ok(result, "%d: got %08x\n", i, GetLastError()); + todo_wine_if (tests[i].todo_result) ok(result, "%d: got %08lx\n", i, GetLastError()); if (result) { result = CryptDestroyKey(key); - ok(result, "%d: got %08x\n", i, GetLastError()); + ok(result, "%d: got %08lx\n", i, GetLastError()); } } else { - todo_wine_if (tests[i].todo_result) ok(!result, "%d: got %x\n", i, GetLastError()); + todo_wine_if (tests[i].todo_result) ok(!result, "%d: got %lx\n", i, GetLastError()); todo_wine_if (tests[i].todo_error) ok(GetLastError() == tests[i].expectedError || - broken(GetLastError() == tests[i].brokenError), "%d: got %08x\n", i, GetLastError()); + broken(GetLastError() == tests[i].brokenError), "%d: got %08lx\n", i, GetLastError()); } } } @@ -469,7 +469,7 @@ static void test_hash(const struct hash_test *tests, int testLen)
dataLen = sizeof(DWORD); result = CryptGetHashParam(hHash, HP_HASHSIZE, (BYTE *)&hashLen, &dataLen, 0); - ok(result && (hashLen == tests[i].hashLen), "Expected %d hash len, got %d.Error: %x\n", + ok(result && (hashLen == tests[i].hashLen), "Expected %ld hash len, got %ld.Error: %lx\n", tests[i].hashLen, hashLen, GetLastError());
dataLen = 0xdeadbeef; @@ -734,19 +734,19 @@ static void test_cipher_modes(const struct ciphermode_test *tests, int testLen) mode = 0xdeadbeef; dataLen = sizeof(mode); result = CryptGetKeyParam(pKey, KP_MODE, (BYTE*)&mode, &dataLen, 0); - ok(result, "Expected getting of KP_MODE, got %x.\n", GetLastError()); + ok(result, "Expected getting of KP_MODE, got %lx.\n", GetLastError()); ok(mode == CRYPT_MODE_CBC, "Default mode should be CBC\n");
memcpy(pbData, plainText, plainLen); dataLen = plainLen; result = CryptEncrypt(pKey, 0, TRUE, 0, pbData, &dataLen, 36); - ok(result, "Expected data encryption, got %x.\n", GetLastError()); + ok(result, "Expected data encryption, got %lx.\n", GetLastError());
/* Verify we have the correct encrypted data */ ok(!memcmp(pbData, tests[1].encrypted, dataLen), "Incorrect encrypted data.\n");
result = CryptDecrypt(pKey, 0, TRUE, 0, pbData, &dataLen); - ok(result, "Expected data decryption, got %x.\n", GetLastError()); + ok(result, "Expected data decryption, got %lx.\n", GetLastError());
/* Verify we have the correct decrypted data */ ok(!memcmp(pbData, (BYTE *)plainText, dataLen), "Incorrect decrypted data.\n"); @@ -762,23 +762,23 @@ static void test_cipher_modes(const struct ciphermode_test *tests, int testLen) result = CryptSetKeyParam(pKey, KP_MODE, (BYTE*)&mode, 0); if(tests[i].expectedResult) { - ok(result, "Expected setting of KP_MODE, got %x.\n", GetLastError()); + ok(result, "Expected setting of KP_MODE, got %lx.\n", GetLastError());
result = CryptEncrypt(pKey, 0, TRUE, 0, pbData, &dataLen, 36); - ok(result, "Expected data encryption, got %x.\n", GetLastError()); + ok(result, "Expected data encryption, got %lx.\n", GetLastError());
/* Verify we have the correct encrypted data */ ok(!memcmp(pbData, tests[i].encrypted, dataLen), "Incorrect encrypted data.\n");
result = CryptDecrypt(pKey, 0, TRUE, 0, pbData, &dataLen); - ok(result, "Expected data decryption, got %x.\n", GetLastError()); + ok(result, "Expected data decryption, got %lx.\n", GetLastError());
/* Verify we have the correct decrypted data */ ok(!memcmp(pbData, (BYTE *)plainText, dataLen), "Incorrect decrypted data.\n"); } else { /* Expected error */ - ok(!result && GetLastError() == tests[i].expectedError, "Expected %d, got %x.\n", + ok(!result && GetLastError() == tests[i].expectedError, "Expected %ld, got %lx.\n", tests[i].expectedError, GetLastError()); } } @@ -876,33 +876,33 @@ static void test_signhash_array(HCRYPTPROV hProv, const struct signature_test *t
/* Get a private key of array specified ALG_ID */ result = CryptImportKey(hProv, tests[i].privateKey, tests[i].keyLen, 0, 0, &privKey); - ok(result, "Failed to imported key, got %x\n", GetLastError()); + ok(result, "Failed to imported key, got %lx\n", GetLastError());
/* Create hash object and add data for signature 1 */ result = CryptCreateHash(hProv, CALG_SHA, 0, 0, &hHash1); - ok(result, "Failed to create a hash, got %x\n", GetLastError()); + ok(result, "Failed to create a hash, got %lx\n", GetLastError());
result = CryptHashData(hHash1, tests[i].signData, signLen1, 0); - ok(result, "Failed to add data to hash, got %x\n", GetLastError()); + ok(result, "Failed to add data to hash, got %lx\n", GetLastError());
/* Create hash object and add data for signature 2 */ result = CryptCreateHash(hProv, CALG_SHA, 0, 0, &hHash2); - ok(result, "Failed to create a hash, got %x\n", GetLastError()); + ok(result, "Failed to create a hash, got %lx\n", GetLastError());
result = CryptHashData(hHash2, tests[i].signData, signLen2, 0); - ok(result, "Failed to add data to hash, got %x\n", GetLastError()); + ok(result, "Failed to add data to hash, got %lx\n", GetLastError());
/* Acquire hash length and hash value */ dataLen1 = sizeof(DWORD); result = CryptGetHashParam(hHash1, HP_HASHSIZE, (BYTE *)&hashLen1, &dataLen1, 0); - ok(result, "Failed to get hash length, got %x\n", GetLastError()); + ok(result, "Failed to get hash length, got %lx\n", GetLastError());
result = CryptGetHashParam(hHash1, HP_HASHVAL, hashValue1, &hashLen1, 0); ok(result, "Failed to return hash value.\n");
dataLen2 = sizeof(DWORD); result = CryptGetHashParam(hHash2, HP_HASHSIZE, (BYTE *)&hashLen2, &dataLen2, 0); - ok(result, "Failed to get hash length, got %x\n", GetLastError()); + ok(result, "Failed to get hash length, got %lx\n", GetLastError());
result = CryptGetHashParam(hHash2, HP_HASHVAL, hashValue2, &hashLen2, 0); ok(result, "Failed to return hash value.\n"); @@ -914,20 +914,20 @@ static void test_signhash_array(HCRYPTPROV hProv, const struct signature_test *t /* Sign hash 1 */ signLen1 = 0; result = CryptSignHashA(hHash1, AT_SIGNATURE, NULL, 0, NULL, &signLen1); - ok(result, "Failed to get signature length, got %x\n", GetLastError()); - ok(signLen1 == 40, "Expected a 40-byte signature, got %d\n", signLen1); + ok(result, "Failed to get signature length, got %lx\n", GetLastError()); + ok(signLen1 == 40, "Expected a 40-byte signature, got %ld\n", signLen1);
result = CryptSignHashA(hHash1, AT_SIGNATURE, NULL, 0, signValue1, &signLen1); - ok(result, "Failed to sign hash, got %x\n", GetLastError()); + ok(result, "Failed to sign hash, got %lx\n", GetLastError());
/* Sign hash 2 */ signLen2 = 0; result = CryptSignHashA(hHash2, AT_SIGNATURE, NULL, 0, NULL, &signLen2); - ok(result, "Failed to get signature length, got %x\n", GetLastError()); - ok(signLen2 == 40, "Expected a 40-byte signature, got %d\n", signLen2); + ok(result, "Failed to get signature length, got %lx\n", GetLastError()); + ok(signLen2 == 40, "Expected a 40-byte signature, got %ld\n", signLen2);
result = CryptSignHashA(hHash2, AT_SIGNATURE, NULL, 0, signValue2, &signLen2); - ok(result, "Failed to sign hash2, got %x\n", GetLastError()); + ok(result, "Failed to sign hash2, got %lx\n", GetLastError());
/* Compare signatures to ensure they are both different, because every DSS signature should be different even if the input hash data is identical */ @@ -935,31 +935,31 @@ static void test_signhash_array(HCRYPTPROV hProv, const struct signature_test *t "the same hash input.\n");
result = CryptExportKey(privKey, 0, PUBLICKEYBLOB, 0, NULL, &pubKeyLen); - ok(result, "Failed to acquire public key length, got %x\n", GetLastError()); + ok(result, "Failed to acquire public key length, got %lx\n", GetLastError());
/* Export the public key */ result = CryptExportKey(privKey, 0, PUBLICKEYBLOB, 0, pubKeyBuffer, &pubKeyLen); - ok(result, "Failed to export public key, got %x\n", GetLastError()); + ok(result, "Failed to export public key, got %lx\n", GetLastError());
result = CryptDestroyHash(hHash1); - ok(result, "Failed to destroy hash1, got %x\n", GetLastError()); + ok(result, "Failed to destroy hash1, got %lx\n", GetLastError()); result = CryptDestroyHash(hHash2); - ok(result, "Failed to destroy hash2, got %x\n", GetLastError()); + ok(result, "Failed to destroy hash2, got %lx\n", GetLastError());
/* Destroy the private key */ result = CryptDestroyKey(privKey); - ok(result, "Failed to destroy private key, got %x\n", GetLastError()); + ok(result, "Failed to destroy private key, got %lx\n", GetLastError());
/* Import the public key we obtained earlier */ result = CryptImportKey(hProv, pubKeyBuffer, pubKeyLen, 0, 0, &pubKey); - ok(result, "Failed to import public key, got %x\n", GetLastError()); + ok(result, "Failed to import public key, got %lx\n", GetLastError());
result = CryptCreateHash(hProv, CALG_SHA, 0, 0, &hHash1); - ok(result, "Failed to create hash, got %x\n", GetLastError()); + ok(result, "Failed to create hash, got %lx\n", GetLastError());
/* Hash the data to compare with the signed hash */ result = CryptHashData(hHash1, tests[i].signData, tests[i].dataLen, 0); - ok(result, "Failed to add data to hash1, got %x\n", GetLastError()); + ok(result, "Failed to add data to hash1, got %lx\n", GetLastError());
/* Verify signed hash 1 */ result = CryptVerifySignatureA(hHash1, signValue1, sizeof(signValue1), pubKey, NULL, 0); @@ -968,27 +968,27 @@ static void test_signhash_array(HCRYPTPROV hProv, const struct signature_test *t skip("skipping sign tests\n"); return; } - ok(result, "Failed to verify signature, got %x\n", GetLastError()); + ok(result, "Failed to verify signature, got %lx\n", GetLastError());
result = CryptCreateHash(hProv, CALG_SHA, 0, 0, &hHash2); - ok(result, "Failed to create hash, got %x\n", GetLastError()); + ok(result, "Failed to create hash, got %lx\n", GetLastError());
/* Hash the data to compare with the signed hash */ result = CryptHashData(hHash2, tests[i].signData, tests[i].dataLen, 0); - ok(result, "Failed to add data to hash2, got %x\n", GetLastError()); + ok(result, "Failed to add data to hash2, got %lx\n", GetLastError());
/* Verify signed hash 2 */ result = CryptVerifySignatureA(hHash2, signValue2, sizeof(signValue2), pubKey, NULL, 0); - ok(result, "Failed to verify signature, got %x\n", GetLastError()); + ok(result, "Failed to verify signature, got %lx\n", GetLastError());
result = CryptDestroyHash(hHash1); - ok(result, "Failed to destroy hash1, got %x\n", GetLastError()); + ok(result, "Failed to destroy hash1, got %lx\n", GetLastError()); result = CryptDestroyHash(hHash2); - ok(result, "Failed to destroy hash2, got %x\n", GetLastError()); + ok(result, "Failed to destroy hash2, got %lx\n", GetLastError());
/* Destroy the public key */ result = CryptDestroyKey(pubKey); - ok(result, "Failed to destroy public key, got %x\n", GetLastError()); + ok(result, "Failed to destroy public key, got %lx\n", GetLastError()); } }
@@ -1142,55 +1142,55 @@ static void test_keyExchange_baseDSS(HCRYPTPROV hProv, const struct keyExchange_ return; } ok(!result && GetLastError() == NTE_BAD_ALGID, - "Expected NTE_BAD_ALGID, got %x\n", GetLastError()); + "Expected NTE_BAD_ALGID, got %lx\n", GetLastError());
result = CryptGenKey(hProv, tests[i].algid, 512 << 16 | CRYPT_PREGEN, &privKey2); ok(!result && GetLastError() == NTE_BAD_ALGID, - "Expected NTE_BAD_ALGID, got %x\n", GetLastError()); + "Expected NTE_BAD_ALGID, got %lx\n", GetLastError());
/* Set the prime and generator values, which are agreed upon */ result = CryptSetKeyParam(privKey1, KP_P, (BYTE *)&Prime, 0); ok(!result && GetLastError() == ERROR_INVALID_PARAMETER, - "Expected ERROR_INVALID_PARAMETER, got %x\n", GetLastError()); + "Expected ERROR_INVALID_PARAMETER, got %lx\n", GetLastError());
result = CryptSetKeyParam(privKey2, KP_P, (BYTE *)&Prime, 0); ok(!result && GetLastError() == ERROR_INVALID_PARAMETER, - "Expected ERROR_INVALID_PARAMETER, got %x\n", GetLastError()); + "Expected ERROR_INVALID_PARAMETER, got %lx\n", GetLastError());
result = CryptSetKeyParam(privKey1, KP_G, (BYTE *)&Generator, 0); ok(!result && GetLastError() == ERROR_INVALID_PARAMETER, - "Expected ERROR_INVALID_PARAMETER, got %x\n", GetLastError()); + "Expected ERROR_INVALID_PARAMETER, got %lx\n", GetLastError());
result = CryptSetKeyParam(privKey2, KP_G, (BYTE *)&Generator, 0); ok(!result && GetLastError() == ERROR_INVALID_PARAMETER, - "Expected ERROR_INVALID_PARAMETER, got %x\n", GetLastError()); + "Expected ERROR_INVALID_PARAMETER, got %lx\n", GetLastError());
/* Generate the secret value for user1 and user2 */ result = CryptSetKeyParam(privKey1, KP_X, NULL, 0); ok(!result && GetLastError() == ERROR_INVALID_PARAMETER, - "Expected ERROR_INVALID_PARAMETER, got %x\n", GetLastError()); + "Expected ERROR_INVALID_PARAMETER, got %lx\n", GetLastError());
result = CryptSetKeyParam(privKey2, KP_X, NULL, 0); ok(!result && GetLastError() == ERROR_INVALID_PARAMETER, - "Expected ERROR_INVALID_PARAMETER, got %x\n", GetLastError()); + "Expected ERROR_INVALID_PARAMETER, got %lx\n", GetLastError());
/* Acquire required size for the public keys */ result = CryptExportKey(privKey1, 0, PUBLICKEYBLOB, 0, NULL, &pubKeyLen1); ok(!result && GetLastError() == ERROR_INVALID_PARAMETER, - "Expected ERROR_INVALID_PARAMETER, got %x\n", GetLastError()); + "Expected ERROR_INVALID_PARAMETER, got %lx\n", GetLastError());
result = CryptExportKey(privKey2, 0, PUBLICKEYBLOB, 0, NULL, &pubKeyLen2); ok(!result && GetLastError() == ERROR_INVALID_PARAMETER, - "Expected ERROR_INVALID_PARAMETER, got %x\n", GetLastError()); + "Expected ERROR_INVALID_PARAMETER, got %lx\n", GetLastError());
/* Export public key which will be calculated into the shared key */ result = CryptExportKey(privKey1, 0, PUBLICKEYBLOB, 0, pubKeyBuffer1, &pubKeyLen1); ok(!result && GetLastError() == ERROR_INVALID_PARAMETER, - "Expected ERROR_INVALID_PARAMETER, got %x\n", GetLastError()); + "Expected ERROR_INVALID_PARAMETER, got %lx\n", GetLastError());
result = CryptExportKey(privKey2, 0, PUBLICKEYBLOB, 0, pubKeyBuffer2, &pubKeyLen2); ok(!result && GetLastError() == ERROR_INVALID_PARAMETER, - "Expected ERROR_INVALID_PARAMETER, got %x\n", GetLastError()); + "Expected ERROR_INVALID_PARAMETER, got %lx\n", GetLastError());
/* Import the public key and convert it into a shared key */ result = CryptImportKey(hProv, pubKeyBuffer2, pubKeyLen2, privKey1, 0, &sessionKey1); @@ -1198,25 +1198,25 @@ static void test_keyExchange_baseDSS(HCRYPTPROV hProv, const struct keyExchange_ broken(!result && GetLastError() == NTE_BAD_DATA) || /* Vista.64 */ broken(!result && GetLastError() == NTE_BAD_TYPE) || /* Win2K-W2K8, Win7.64 */ broken(!result && GetLastError() == NTE_BAD_ALGID), /* W7SP164 (32 bit dssenh) */ - "Expected ERROR_INVALID_PARAMETER, got %x\n", GetLastError()); + "Expected ERROR_INVALID_PARAMETER, got %lx\n", GetLastError());
result = CryptImportKey(hProv, pubKeyBuffer1, pubKeyLen1, privKey2, 0, &sessionKey2); ok((!result && GetLastError() == ERROR_INVALID_PARAMETER) || broken(!result && GetLastError() == NTE_BAD_DATA) || /* Win 7 */ broken(!result && GetLastError() == NTE_BAD_TYPE) || /* Win2K-W2K8, Win7.64 */ broken(!result && GetLastError() == NTE_BAD_ALGID), /* W7SP164 (32 bit dssenh) */ - "Expected ERROR_INVALID_PARAMETER, got %x\n", GetLastError()); + "Expected ERROR_INVALID_PARAMETER, got %lx\n", GetLastError());
/* Set the shared key parameters to matching type */ algid = CALG_RC4; result = CryptSetKeyParam(sessionKey1, KP_ALGID, (BYTE *)&algid, 0); ok(!result && GetLastError() == ERROR_INVALID_PARAMETER, - "Expected ERROR_INVALID_PARAMETER, got %x\n", GetLastError()); + "Expected ERROR_INVALID_PARAMETER, got %lx\n", GetLastError());
algid = CALG_RC4; result = CryptSetKeyParam(sessionKey2, KP_ALGID, (BYTE *)&algid, 0); ok(!result && GetLastError() == ERROR_INVALID_PARAMETER, - "Expected ERROR_INVALID_PARAMETER, got %x\n", GetLastError()); + "Expected ERROR_INVALID_PARAMETER, got %lx\n", GetLastError());
/* Encrypt some data and verify we are getting the same output */ memcpy(pbData1, plainText, plainLen); @@ -1224,11 +1224,11 @@ static void test_keyExchange_baseDSS(HCRYPTPROV hProv, const struct keyExchange_
result = CryptEncrypt(sessionKey1, 0, TRUE, 0, pbData1, &dataLen, 36); ok(!result && GetLastError() == ERROR_INVALID_PARAMETER, - "Expected ERROR_INVALID_PARAMETER, got %x\n", GetLastError()); + "Expected ERROR_INVALID_PARAMETER, got %lx\n", GetLastError());
result = CryptDecrypt(sessionKey2, 0, TRUE, 0, pbData1, &dataLen); ok(!result && GetLastError() == ERROR_INVALID_PARAMETER, - "Expected ERROR_INVALID_PARAMETER, got %x\n", GetLastError()); + "Expected ERROR_INVALID_PARAMETER, got %lx\n", GetLastError());
ok(!memcmp(pbData1, (BYTE *)plainText, sizeof(plainText)), "Incorrect decrypted data.\n");
@@ -1237,30 +1237,30 @@ static void test_keyExchange_baseDSS(HCRYPTPROV hProv, const struct keyExchange_
result = CryptEncrypt(sessionKey2, 0, TRUE, 0, pbData2, &dataLen, 36); ok(!result && GetLastError() == ERROR_INVALID_PARAMETER, - "Expected ERROR_INVALID_PARAMETER, got %x\n", GetLastError()); + "Expected ERROR_INVALID_PARAMETER, got %lx\n", GetLastError());
result = CryptDecrypt(sessionKey1, 0, TRUE, 0, pbData2, &dataLen); ok(!result && GetLastError() == ERROR_INVALID_PARAMETER, - "Expected ERROR_INVALID_PARAMETER, got %x\n", GetLastError()); + "Expected ERROR_INVALID_PARAMETER, got %lx\n", GetLastError());
ok(!memcmp(pbData1, pbData2, dataLen), "Decrypted data is not identical.\n");
/* Destroy all user keys */ result = CryptDestroyKey(sessionKey1); ok(!result && GetLastError() == ERROR_INVALID_PARAMETER, - "Expected ERROR_INVALID_PARAMETER, got %x\n", GetLastError()); + "Expected ERROR_INVALID_PARAMETER, got %lx\n", GetLastError());
result = CryptDestroyKey(sessionKey2); ok(!result && GetLastError() == ERROR_INVALID_PARAMETER, - "Expected ERROR_INVALID_PARAMETER, got %x\n", GetLastError()); + "Expected ERROR_INVALID_PARAMETER, got %lx\n", GetLastError());
result = CryptDestroyKey(privKey1); ok(!result && GetLastError() == ERROR_INVALID_PARAMETER, - "Expected ERROR_INVALID_PARAMETER, got %x\n", GetLastError()); + "Expected ERROR_INVALID_PARAMETER, got %lx\n", GetLastError());
result = CryptDestroyKey(privKey2); ok(!result && GetLastError() == ERROR_INVALID_PARAMETER, - "Expected ERROR_INVALID_PARAMETER, got %x\n", GetLastError()); + "Expected ERROR_INVALID_PARAMETER, got %lx\n", GetLastError()); } }
@@ -1295,70 +1295,70 @@ static void test_keyExchange_dssDH(HCRYPTPROV hProv, const struct keyExchange_te skip("skipping key exchange tests\n"); return; } - ok(result, "Failed to generate a key for user1, got %x\n", GetLastError()); + ok(result, "Failed to generate a key for user1, got %lx\n", GetLastError());
result = CryptGenKey(hProv, tests[i].algid, 512 << 16 | CRYPT_PREGEN, &privKey2); - ok(result, "Failed to generate a key for user2, got %x\n", GetLastError()); + ok(result, "Failed to generate a key for user2, got %lx\n", GetLastError());
/* Set the prime and generator values, which are agreed upon */ result = CryptSetKeyParam(privKey1, KP_P, (BYTE *)&Prime, 0); - ok(result, "Failed to set prime for user 1's key, got %x\n", GetLastError()); + ok(result, "Failed to set prime for user 1's key, got %lx\n", GetLastError());
result = CryptSetKeyParam(privKey2, KP_P, (BYTE *)&Prime, 0); - ok(result, "Failed to set prime for user 2's key, got %x\n", GetLastError()); + ok(result, "Failed to set prime for user 2's key, got %lx\n", GetLastError());
result = CryptSetKeyParam(privKey1, KP_G, (BYTE *)&Generator, 0); - ok(result, "Failed to set generator for user 1's key, got %x\n", GetLastError()); + ok(result, "Failed to set generator for user 1's key, got %lx\n", GetLastError());
result = CryptSetKeyParam(privKey2, KP_G, (BYTE *)&Generator, 0); - ok(result, "Failed to set generator for user 2's key, got %x\n", GetLastError()); + ok(result, "Failed to set generator for user 2's key, got %lx\n", GetLastError());
/* Generate the secret value for user1 and user2 */ result = CryptSetKeyParam(privKey1, KP_X, NULL, 0); - ok(result, "Failed to set secret value for user 1, got %x\n", GetLastError()); + ok(result, "Failed to set secret value for user 1, got %lx\n", GetLastError());
result = CryptSetKeyParam(privKey2, KP_X, NULL, 0); - ok(result, "Failed to set secret value for user 2, got %x\n", GetLastError()); + ok(result, "Failed to set secret value for user 2, got %lx\n", GetLastError());
/* Acquire required size for the public keys */ result = CryptExportKey(privKey1, 0, PUBLICKEYBLOB, 0, NULL, &pubKeyLen1); - ok(result, "Failed to acquire public key length for user 1, got %x\n", GetLastError()); + ok(result, "Failed to acquire public key length for user 1, got %lx\n", GetLastError());
result = CryptExportKey(privKey2, 0, PUBLICKEYBLOB, 0, NULL, &pubKeyLen2); - ok(result, "Failed to acquire public key length for user 2, got %x\n", GetLastError()); + ok(result, "Failed to acquire public key length for user 2, got %lx\n", GetLastError());
/* Export public key which will be calculated into the shared key */ result = CryptExportKey(privKey1, 0, PUBLICKEYBLOB, 0, pubKeyBuffer1, &pubKeyLen1); - ok(result, "Failed to export public key for user 1, got %x\n", GetLastError()); + ok(result, "Failed to export public key for user 1, got %lx\n", GetLastError());
result = CryptExportKey(privKey2, 0, PUBLICKEYBLOB, 0, pubKeyBuffer2, &pubKeyLen2); - ok(result, "Failed to export public key for user 2, got %x\n", GetLastError()); + ok(result, "Failed to export public key for user 2, got %lx\n", GetLastError());
/* Import the public key and convert it into a shared key */ result = CryptImportKey(hProv, pubKeyBuffer2, pubKeyLen2, privKey1, 0, &sessionKey1); - ok(result, "Failed to import key for user 1, got %x\n", GetLastError()); + ok(result, "Failed to import key for user 1, got %lx\n", GetLastError());
result = CryptImportKey(hProv, pubKeyBuffer1, pubKeyLen1, privKey2, 0, &sessionKey2); - ok(result, "Failed to import key for user 2, got %x\n", GetLastError()); + ok(result, "Failed to import key for user 2, got %lx\n", GetLastError());
/* Set the shared key parameters to matching cipher type */ algid = CALG_3DES; result = CryptSetKeyParam(sessionKey1, KP_ALGID, (BYTE *)&algid, 0); - ok(result, "Failed to set session key for user 1, got %x\n", GetLastError()); + ok(result, "Failed to set session key for user 1, got %lx\n", GetLastError());
algid = CALG_3DES; result = CryptSetKeyParam(sessionKey2, KP_ALGID, (BYTE *)&algid, 0); - ok(result, "Failed to set session key for user 2, got %x\n", GetLastError()); + ok(result, "Failed to set session key for user 2, got %lx\n", GetLastError());
/* Encrypt some data and verify we are getting the correct output */ memcpy(pbData1, plainText, plainLen); dataLen = plainLen;
result = CryptEncrypt(sessionKey1, 0, TRUE, 0, pbData1, &dataLen, 36); - ok(result, "Failed to encrypt data, got %x.\n", GetLastError()); + ok(result, "Failed to encrypt data, got %lx.\n", GetLastError());
result = CryptDecrypt(sessionKey2, 0, TRUE, 0, pbData1, &dataLen); - ok(result, "Failed to decrypt data, got %x.\n", GetLastError()); + ok(result, "Failed to decrypt data, got %lx.\n", GetLastError());
ok(!memcmp(pbData1, (BYTE *)plainText, sizeof(plainText)), "Incorrect decrypted data.\n");
@@ -1366,25 +1366,25 @@ static void test_keyExchange_dssDH(HCRYPTPROV hProv, const struct keyExchange_te dataLen = plainLen;
result = CryptEncrypt(sessionKey2, 0, TRUE, 0, pbData2, &dataLen, 36); - ok(result, "Failed to encrypt data, got %x.\n", GetLastError()); + ok(result, "Failed to encrypt data, got %lx.\n", GetLastError());
result = CryptDecrypt(sessionKey1, 0, TRUE, 0, pbData2, &dataLen); - ok(result, "Failed to decrypt data, got %x.\n", GetLastError()); + ok(result, "Failed to decrypt data, got %lx.\n", GetLastError());
ok(!memcmp(pbData1, pbData2, dataLen), "Decrypted data is not identical.\n");
/* Destroy all user keys */ result = CryptDestroyKey(sessionKey1); - ok(result, "Failed to destroy session key 1, got %x\n", GetLastError()); + ok(result, "Failed to destroy session key 1, got %lx\n", GetLastError());
result = CryptDestroyKey(sessionKey2); - ok(result, "Failed to destroy session key 2, got %x\n", GetLastError()); + ok(result, "Failed to destroy session key 2, got %lx\n", GetLastError());
result = CryptDestroyKey(privKey1); - ok(result, "Failed to destroy key private key 1, got %x\n", GetLastError()); + ok(result, "Failed to destroy key private key 1, got %lx\n", GetLastError());
result = CryptDestroyKey(privKey2); - ok(result, "Failed to destroy key private key 2, got %x\n", GetLastError()); + ok(result, "Failed to destroy key private key 2, got %lx\n", GetLastError()); } }
@@ -1449,45 +1449,45 @@ static void test_duplicate_hash(void) BOOL result;
result = CryptAcquireContextA(&hprov, NULL, MS_DEF_DSS_PROV_A, PROV_DSS, CRYPT_VERIFYCONTEXT); - ok(result, "got %08x\n", GetLastError()); + ok(result, "got %08lx\n", GetLastError());
result = CryptCreateHash(hprov, CALG_SHA, 0, 0, &hhash); - ok(result, "got %08x\n", GetLastError()); + ok(result, "got %08lx\n", GetLastError());
result = CryptHashData(hhash, (const BYTE *)"winetest", sizeof("winetest"), 0); - ok(result, "got %08x\n", GetLastError()); + ok(result, "got %08lx\n", GetLastError());
len = sizeof(buf); result = CryptGetHashParam(hhash, HP_HASHVAL, buf, &len, 0); - ok(result, "got %08x\n", GetLastError()); + ok(result, "got %08lx\n", GetLastError()); ok(!memcmp(buf, expected, sizeof(expected)), "wrong data\n");
SetLastError(0xdeadbeef); result = CryptHashData(hhash, (const BYTE *)"winetest", sizeof("winetest"), 0); ok(!result, "success\n"); - ok(GetLastError() == NTE_BAD_HASH_STATE, "got %08x\n", GetLastError()); + ok(GetLastError() == NTE_BAD_HASH_STATE, "got %08lx\n", GetLastError());
result = CryptDuplicateHash(hhash, NULL, 0, &hhash2); - ok(result, "got %08x\n", GetLastError()); + ok(result, "got %08lx\n", GetLastError());
SetLastError(0xdeadbeef); result = CryptHashData(hhash2, (const BYTE *)"winetest", sizeof("winetest"), 0); ok(!result, "success\n"); - ok(GetLastError() == NTE_BAD_HASH_STATE, "got %08x\n", GetLastError()); + ok(GetLastError() == NTE_BAD_HASH_STATE, "got %08lx\n", GetLastError());
len = sizeof(buf); result = CryptGetHashParam(hhash2, HP_HASHVAL, buf, &len, 0); - ok(result, "got %08x\n", GetLastError()); + ok(result, "got %08lx\n", GetLastError()); ok(!memcmp(buf, expected, sizeof(expected)), "wrong data\n");
result = CryptDestroyHash(hhash2); - ok(result, "got %08x\n", GetLastError()); + ok(result, "got %08lx\n", GetLastError());
result = CryptDestroyHash(hhash); - ok(result, "got %08x\n", GetLastError()); + ok(result, "got %08lx\n", GetLastError());
result = CryptReleaseContext(hprov, 0); - ok(result, "got %08x\n", GetLastError()); + ok(result, "got %08lx\n", GetLastError()); }
static void test_userkey(void) @@ -1498,40 +1498,40 @@ static void test_userkey(void)
CryptAcquireContextA(&hprov, "winetest", MS_ENH_DSS_DH_PROV_A, PROV_DSS_DH, CRYPT_DELETEKEYSET); result = CryptAcquireContextA(&hprov, "winetest", MS_ENH_DSS_DH_PROV_A, PROV_DSS_DH, CRYPT_NEWKEYSET); - ok(result, "got %08x\n", GetLastError()); + ok(result, "got %08lx\n", GetLastError());
SetLastError(0xdeadbeef); result = CryptGetUserKey(hprov, AT_KEYEXCHANGE, &hkey); ok(!result, "success\n"); - ok(GetLastError() == NTE_NO_KEY, "got %08x\n", GetLastError()); + ok(GetLastError() == NTE_NO_KEY, "got %08lx\n", GetLastError());
SetLastError(0xdeadbeef); result = CryptGetUserKey(hprov, AT_SIGNATURE, &hkey); ok(!result, "success\n"); - ok(GetLastError() == NTE_NO_KEY, "got %08x\n", GetLastError()); + ok(GetLastError() == NTE_NO_KEY, "got %08lx\n", GetLastError());
result = CryptGenKey(hprov, AT_SIGNATURE, 1024 << 16, &hkey); - ok(result, "got %08x\n", GetLastError()); + ok(result, "got %08lx\n", GetLastError()); result = CryptDestroyKey(hkey); - ok(result, "got %08x\n", GetLastError()); + ok(result, "got %08lx\n", GetLastError());
result = CryptGetUserKey(hprov, AT_SIGNATURE, &hkey); - ok(result, "got %08x\n", GetLastError()); + ok(result, "got %08lx\n", GetLastError()); result = CryptDestroyKey(hkey); - ok(result, "got %08x\n", GetLastError()); + ok(result, "got %08lx\n", GetLastError());
SetLastError(0xdeadbeef); result = CryptGetUserKey(hprov, AT_KEYEXCHANGE, &hkey); ok(!result, "success\n"); - ok(GetLastError() == NTE_NO_KEY, "got %08x\n", GetLastError()); + ok(GetLastError() == NTE_NO_KEY, "got %08lx\n", GetLastError());
result = CryptReleaseContext(hprov, 0); - ok(result, "got %08x\n", GetLastError()); + ok(result, "got %08lx\n", GetLastError());
hprov = 0xdeadbeef; result = CryptAcquireContextA(&hprov, "winetest", MS_ENH_DSS_DH_PROV_A, PROV_DSS_DH, CRYPT_DELETEKEYSET); - ok(result, "got %08x\n", GetLastError()); - ok(!hprov, "got %08x\n", (DWORD)hprov); + ok(result, "got %08lx\n", GetLastError()); + ok(!hprov, "got %08lx\n", (DWORD)hprov); }
static void test_duplicate_key(void) @@ -1543,25 +1543,25 @@ static void test_duplicate_key(void) BYTE buf[512];
result = CryptAcquireContextA(&hprov, NULL, MS_DEF_DSS_PROV_A, PROV_DSS, CRYPT_VERIFYCONTEXT); - ok(result, "got %08x\n", GetLastError()); + ok(result, "got %08lx\n", GetLastError());
result = CryptImportKey(hprov, DSS_SIGN_PrivateKey, sizeof(DSS_SIGN_PrivateKey), 0, CRYPT_EXPORTABLE, &hkey); - ok(result, "got %08x\n", GetLastError()); + ok(result, "got %08lx\n", GetLastError());
result = CryptDuplicateKey(hkey, NULL, 0, &hkey2); - ok(result, "got %08x\n", GetLastError()); + ok(result, "got %08lx\n", GetLastError());
len = sizeof(buf); result = CryptExportKey(hkey2, 0, PRIVATEKEYBLOB, 0, buf, &len); - ok(result, "got %08x\n", GetLastError()); - ok(len == sizeof(DSS_SIGN_PrivateKey), "got %u\n", len); + ok(result, "got %08lx\n", GetLastError()); + ok(len == sizeof(DSS_SIGN_PrivateKey), "got %lu\n", len); ok(!memcmp(buf, DSS_SIGN_PrivateKey, sizeof(DSS_SIGN_PrivateKey)), "wrong data\n");
result = CryptDestroyKey(hkey2); - ok(result, "got %08x\n", GetLastError()); + ok(result, "got %08lx\n", GetLastError());
result = CryptDestroyKey(hkey); - ok(result, "got %08x\n", GetLastError()); + ok(result, "got %08lx\n", GetLastError()); }
START_TEST(dssenh)
Signed-off-by: Eric Pouech eric.pouech@gmail.com
--- dlls/dwmapi/tests/Makefile.in | 1 - dlls/dwmapi/tests/dwmapi.c | 4 ++-- 2 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/dlls/dwmapi/tests/Makefile.in b/dlls/dwmapi/tests/Makefile.in index 8821fb5b0fb..6c6130401d6 100644 --- a/dlls/dwmapi/tests/Makefile.in +++ b/dlls/dwmapi/tests/Makefile.in @@ -1,4 +1,3 @@ -EXTRADEFS = -DWINE_NO_LONG_TYPES TESTDLL = dwmapi.dll IMPORTS = dwmapi
diff --git a/dlls/dwmapi/tests/dwmapi.c b/dlls/dwmapi/tests/dwmapi.c index 1904e283bba..7cb9eb424f1 100644 --- a/dlls/dwmapi/tests/dwmapi.c +++ b/dlls/dwmapi/tests/dwmapi.c @@ -25,11 +25,11 @@ static void test_DwmIsCompositionEnabled(void) HRESULT hr;
hr = DwmIsCompositionEnabled(NULL); - ok(hr == E_INVALIDARG, "Expected %#x, got %#x.\n", E_INVALIDARG, hr); + ok(hr == E_INVALIDARG, "Expected %#lx, got %#lx.\n", E_INVALIDARG, hr);
enabled = -1; hr = DwmIsCompositionEnabled(&enabled); - ok(hr == S_OK, "Expected %#x, got %#x.\n", S_OK, hr); + ok(hr == S_OK, "Expected %#lx, got %#lx.\n", S_OK, hr); ok(enabled == TRUE || enabled == FALSE, "Got unexpected %#x.\n", enabled); }
Signed-off-by: Eric Pouech eric.pouech@gmail.com
--- dlls/dwrite/tests/layout.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dlls/dwrite/tests/layout.c b/dlls/dwrite/tests/layout.c index 95166376ac7..4b2477892fd 100644 --- a/dlls/dwrite/tests/layout.c +++ b/dlls/dwrite/tests/layout.c @@ -5717,7 +5717,7 @@ static void test_tab_stops(void) IDWriteFactory *factory; DWRITE_TEXT_RANGE range; FLOAT tabstop, size; - ULONG count; + UINT count; HRESULT hr;
factory = create_factory();
Signed-off-by: Eric Pouech eric.pouech@gmail.com
--- dlls/dwrite/tests/Makefile.in | 1 dlls/dwrite/tests/analyzer.c | 196 ++-- dlls/dwrite/tests/font.c | 1848 +++++++++++++++++++++-------------------- dlls/dwrite/tests/layout.c | 1426 ++++++++++++++++---------------- 4 files changed, 1735 insertions(+), 1736 deletions(-)
diff --git a/dlls/dwrite/tests/Makefile.in b/dlls/dwrite/tests/Makefile.in index 3df59bf08b3..7fbf9e36c7e 100644 --- a/dlls/dwrite/tests/Makefile.in +++ b/dlls/dwrite/tests/Makefile.in @@ -1,4 +1,3 @@ -EXTRADEFS = -DWINE_NO_LONG_TYPES TESTDLL = dwrite.dll IMPORTS = dwrite gdi32 user32
diff --git a/dlls/dwrite/tests/analyzer.c b/dlls/dwrite/tests/analyzer.c index d1d44c94012..fcf4b300677 100644 --- a/dlls/dwrite/tests/analyzer.c +++ b/dlls/dwrite/tests/analyzer.c @@ -487,7 +487,7 @@ static IDWriteFontFace *create_fontface(void) HRESULT hr;
hr = IDWriteFactory_GetGdiInterop(factory, &interop); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
memset(&logfont, 0, sizeof(logfont)); logfont.lfHeight = 12; @@ -497,10 +497,10 @@ static IDWriteFontFace *create_fontface(void) lstrcpyW(logfont.lfFaceName, L"Tahoma");
hr = IDWriteGdiInterop_CreateFontFromLOGFONT(interop, &logfont, &font); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
hr = IDWriteFont_CreateFontFace(font, &fontface); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
IDWriteFont_Release(font); IDWriteGdiInterop_Release(interop); @@ -520,7 +520,7 @@ static WCHAR *create_testfontfile(const WCHAR *filename) lstrcatW(pathW, filename);
file = CreateFileW(pathW, GENERIC_READ|GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, 0, 0); - ok(file != INVALID_HANDLE_VALUE, "file creation failed, at %s, error %d\n", wine_dbgstr_w(pathW), + ok(file != INVALID_HANDLE_VALUE, "file creation failed, at %s, error %ld\n", wine_dbgstr_w(pathW), GetLastError());
res = FindResourceA(GetModuleHandleA(NULL), (LPCSTR)MAKEINTRESOURCE(1), (LPCSTR)RT_RCDATA); @@ -537,7 +537,7 @@ static WCHAR *create_testfontfile(const WCHAR *filename) static void _delete_testfontfile(const WCHAR *filename, int line) { BOOL ret = DeleteFileW(filename); - ok_(__FILE__,line)(ret, "failed to delete file %s, error %d\n", wine_dbgstr_w(filename), GetLastError()); + ok_(__FILE__,line)(ret, "failed to delete file %s, error %ld\n", wine_dbgstr_w(filename), GetLastError()); }
static IDWriteFontFace *create_testfontface(const WCHAR *filename) @@ -547,11 +547,11 @@ static IDWriteFontFace *create_testfontface(const WCHAR *filename) HRESULT hr;
hr = IDWriteFactory_CreateFontFileReference(factory, filename, NULL, &file); - ok(hr == S_OK, "got 0x%08x\n",hr); + ok(hr == S_OK, "got 0x%08lx\n",hr);
hr = IDWriteFactory_CreateFontFace(factory, DWRITE_FONT_FACE_TYPE_TRUETYPE, 1, &file, 0, DWRITE_FONT_SIMULATIONS_NONE, &face); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); IDWriteFontFile_Release(file);
return face; @@ -1041,11 +1041,11 @@ static void get_script_analysis(const WCHAR *str, DWRITE_SCRIPT_ANALYSIS *sa)
init_textsource(&analysissource, str, DWRITE_READING_DIRECTION_LEFT_TO_RIGHT); hr = IDWriteFactory_CreateTextAnalyzer(factory, &analyzer); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
hr = IDWriteTextAnalyzer_AnalyzeScript(analyzer, &analysissource.IDWriteTextAnalysisSource_iface, 0, lstrlenW(analysissource.text), &analysissink2); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
*sa = g_sa; } @@ -1057,7 +1057,7 @@ static void test_AnalyzeScript(void) HRESULT hr;
hr = IDWriteFactory_CreateTextAnalyzer(factory, &analyzer); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
while (*ptr->string) { @@ -1066,7 +1066,7 @@ static void test_AnalyzeScript(void) init_expected_sa(expected_seq, ptr); hr = IDWriteTextAnalyzer_AnalyzeScript(analyzer, &analysissource.IDWriteTextAnalysisSource_iface, 0, lstrlenW(ptr->string), &analysissink); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok_sequence(sequences, ANALYZER_ID, expected_seq[0]->sequence, wine_dbgstr_w(ptr->string), FALSE); ptr++; } @@ -1169,12 +1169,12 @@ static void test_AnalyzeLineBreakpoints(void) HRESULT hr;
hr = IDWriteFactory_CreateTextAnalyzer(factory, &analyzer); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
init_textsource(&analysissource, L"", DWRITE_READING_DIRECTION_LEFT_TO_RIGHT); hr = IDWriteTextAnalyzer_AnalyzeLineBreakpoints(analyzer, &analysissource.IDWriteTextAnalysisSource_iface, 0, 0, &analysissink); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
while (*ptr->text) { @@ -1193,7 +1193,7 @@ static void test_AnalyzeLineBreakpoints(void) memset(g_actual_bp, 0, sizeof(g_actual_bp)); hr = IDWriteTextAnalyzer_AnalyzeLineBreakpoints(analyzer, &analysissource.IDWriteTextAnalysisSource_iface, 0, len, &analysissink); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); compare_breakpoints(ptr, g_actual_bp);
i++; @@ -1212,7 +1212,7 @@ static void test_GetScriptProperties(void) HRESULT hr;
hr = IDWriteFactory_CreateTextAnalyzer(factory, &analyzer); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
hr = IDWriteTextAnalyzer_QueryInterface(analyzer, &IID_IDWriteTextAnalyzer1, (void**)&analyzer1); IDWriteTextAnalyzer_Release(analyzer); @@ -1223,14 +1223,14 @@ static void test_GetScriptProperties(void)
sa.script = 1000; hr = IDWriteTextAnalyzer1_GetScriptProperties(analyzer1, sa, &props); - ok(hr == E_INVALIDARG, "got 0x%08x\n", hr); + ok(hr == E_INVALIDARG, "got 0x%08lx\n", hr);
if (0) /* crashes on native */ hr = IDWriteTextAnalyzer1_GetScriptProperties(analyzer1, sa, NULL);
sa.script = 0; hr = IDWriteTextAnalyzer1_GetScriptProperties(analyzer1, sa, &props); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
IDWriteTextAnalyzer1_Release(analyzer1); } @@ -1277,7 +1277,7 @@ static void test_GetTextComplexity(void) int i;
hr = IDWriteFactory_CreateTextAnalyzer(factory, &analyzer); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
hr = IDWriteTextAnalyzer_QueryInterface(analyzer, &IID_IDWriteTextAnalyzer1, (void**)&analyzer1); IDWriteTextAnalyzer_Release(analyzer); @@ -1297,7 +1297,7 @@ if (0) { /* crashes on native */ len = 1; simple = TRUE; hr = IDWriteTextAnalyzer1_GetTextComplexity(analyzer1, NULL, 0, NULL, &simple, &len, NULL); - ok(hr == E_INVALIDARG, "got 0x%08x\n", hr); + ok(hr == E_INVALIDARG, "got 0x%08lx\n", hr); ok(len == 0, "got %d\n", len); ok(simple == FALSE, "got %d\n", simple);
@@ -1305,7 +1305,7 @@ if (0) { /* crashes on native */ simple = TRUE; indices[0] = 1; hr = IDWriteTextAnalyzer1_GetTextComplexity(analyzer1, L"ABC", 3, NULL, &simple, &len, NULL); - ok(hr == E_INVALIDARG, "got 0x%08x\n", hr); + ok(hr == E_INVALIDARG, "got 0x%08lx\n", hr); ok(len == 0, "got %d\n", len); ok(simple == FALSE, "got %d\n", simple); ok(indices[0] == 1, "got %d\n", indices[0]); @@ -1318,7 +1318,7 @@ if (0) { /* crashes on native */ simple = !ptr->simple; indices[0] = 0; hr = IDWriteTextAnalyzer1_GetTextComplexity(analyzer1, ptr->text, ptr->length, fontface, &simple, &len, indices); - ok(hr == S_OK, "%d: got 0x%08x\n", i, hr); + ok(hr == S_OK, "%d: got 0x%08lx\n", i, hr); ok(len == ptr->len_read, "%d: read length: got %d, expected %d\n", i, len, ptr->len_read); ok(simple == ptr->simple, "%d: simple: got %d, expected %d\n", i, simple, ptr->simple); if (simple && ptr->length) @@ -1338,43 +1338,43 @@ static void test_numbersubstitution(void)
/* locale is not specified, method does not require it */ hr = IDWriteFactory_CreateNumberSubstitution(factory, DWRITE_NUMBER_SUBSTITUTION_METHOD_NONE, NULL, FALSE, &substitution); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); IDWriteNumberSubstitution_Release(substitution);
/* invalid locale name, method does not require it */ hr = IDWriteFactory_CreateNumberSubstitution(factory, DWRITE_NUMBER_SUBSTITUTION_METHOD_NONE, L"dummy", FALSE, &substitution); - ok(hr == S_OK, "Failed to create number substitution, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create number substitution, hr %#lx.\n", hr); IDWriteNumberSubstitution_Release(substitution);
/* invalid method */ hr = IDWriteFactory_CreateNumberSubstitution(factory, DWRITE_NUMBER_SUBSTITUTION_METHOD_TRADITIONAL+1, NULL, FALSE, &substitution); - ok(hr == E_INVALIDARG, "got 0x%08x\n", hr); + ok(hr == E_INVALIDARG, "got 0x%08lx\n", hr);
/* invalid method */ hr = IDWriteFactory_CreateNumberSubstitution(factory, -1, NULL, FALSE, &substitution); - ok(hr == E_INVALIDARG, "got 0x%08x\n", hr); + ok(hr == E_INVALIDARG, "got 0x%08lx\n", hr);
/* invalid locale */ hr = IDWriteFactory_CreateNumberSubstitution(factory, DWRITE_NUMBER_SUBSTITUTION_METHOD_TRADITIONAL, NULL, FALSE, &substitution); - ok(hr == E_INVALIDARG, "got 0x%08x\n", hr); + ok(hr == E_INVALIDARG, "got 0x%08lx\n", hr);
hr = IDWriteFactory_CreateNumberSubstitution(factory, DWRITE_NUMBER_SUBSTITUTION_METHOD_TRADITIONAL, L"dummy", FALSE, &substitution); - ok(hr == E_INVALIDARG, "Unexpected hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Unexpected hr %#lx.\n", hr);
hr = IDWriteFactory_CreateNumberSubstitution(factory, DWRITE_NUMBER_SUBSTITUTION_METHOD_CONTEXTUAL, L"dummy", FALSE, &substitution); - ok(hr == E_INVALIDARG, "Unexpected hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Unexpected hr %#lx.\n", hr);
hr = IDWriteFactory_CreateNumberSubstitution(factory, DWRITE_NUMBER_SUBSTITUTION_METHOD_NATIONAL, L"dummy", FALSE, &substitution); - ok(hr == E_INVALIDARG, "Unexpected hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Unexpected hr %#lx.\n", hr);
/* invalid locale, but it's not needed for this method */ hr = IDWriteFactory_CreateNumberSubstitution(factory, DWRITE_NUMBER_SUBSTITUTION_METHOD_NONE, L"dummy", FALSE, &substitution); - ok(hr == S_OK, "Failed to create number substitution, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create number substitution, hr %#lx.\n", hr); IDWriteNumberSubstitution_Release(substitution); }
@@ -1385,7 +1385,7 @@ static void get_fontface_glyphs(IDWriteFontFace *fontface, const WCHAR *str, UIN HRESULT hr;
hr = IDWriteFontFace_GetGlyphIndices(fontface, &codepoint, 1, glyphs++); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); str++; } } @@ -1401,7 +1401,7 @@ static void get_fontface_advances(IDWriteFontFace *fontface, FLOAT emsize, const HRESULT hr;
hr = IDWriteFontFace_GetDesignGlyphMetrics(fontface, glyphs + i, 1, &metrics, FALSE); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
advances[i] = (FLOAT)metrics.advanceWidth * emsize / (FLOAT)fontmetrics.designUnitsPerEm; } @@ -1504,14 +1504,14 @@ static void get_enus_string(IDWriteLocalizedStrings *strings, WCHAR *buff, unsig HRESULT hr;
hr = IDWriteLocalizedStrings_FindLocaleName(strings, L"en-us", &index, &exists); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
/* Not all fonts have an en-us name! */ if (!exists) index = 0;
hr = IDWriteLocalizedStrings_GetString(strings, index, buff, size); - ok(hr == S_OK, "Failed to get name string, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get name string, hr %#lx.\n", hr); }
static void test_glyph_props(IDWriteTextAnalyzer *analyzer, const WCHAR *family, const WCHAR *face, @@ -1526,7 +1526,7 @@ static void test_glyph_props(IDWriteTextAnalyzer *analyzer, const WCHAR *family,
hr = IDWriteFontFace_TryGetFontTable(fontface, MS_GDEF_TAG, (const void **)&gdef.data, &gdef.size, &gdef.context, &exists); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
if (!exists) return; @@ -1545,12 +1545,12 @@ static void test_glyph_props(IDWriteTextAnalyzer *analyzer, const WCHAR *family, }
hr = IDWriteFontFace1_GetUnicodeRanges(fontface1, 0, NULL, &count); - ok(hr == E_NOT_SUFFICIENT_BUFFER, "Unexpected hr %#x.\n", hr); + ok(hr == E_NOT_SUFFICIENT_BUFFER, "Unexpected hr %#lx.\n", hr);
ranges = malloc(count * sizeof(*ranges));
hr = IDWriteFontFace1_GetUnicodeRanges(fontface1, count, ranges, &count); - ok(hr == S_OK, "Failed to get ranges, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get ranges, hr %#lx.\n", hr);
for (i = 0; i < count; ++i) { @@ -1567,7 +1567,7 @@ static void test_glyph_props(IDWriteTextAnalyzer *analyzer, const WCHAR *family, WCHAR text[1];
hr = IDWriteFontFace1_GetGlyphIndices(fontface1, &ch, 1, &glyph); - ok(hr == S_OK, "Failed to get glyph index, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get glyph index, hr %#lx.\n", hr);
if (!glyph) continue; @@ -1578,7 +1578,7 @@ static void test_glyph_props(IDWriteTextAnalyzer *analyzer, const WCHAR *family, memset(glyph_props, 0, sizeof(glyph_props)); hr = IDWriteTextAnalyzer_GetGlyphs(analyzer, text, 1, fontface, FALSE, FALSE, &sa, NULL, NULL, NULL, NULL, 0, ARRAY_SIZE(glyphs), clustermap, text_props, glyphs, glyph_props, &actual_count); - ok(hr == S_OK, "Failed to shape, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to shape, hr %#lx.\n", hr); if (actual_count > 1) continue;
@@ -1631,7 +1631,7 @@ static void test_GetGlyphs(void) HRESULT hr;
hr = IDWriteFactory_CreateTextAnalyzer(factory, &analyzer); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
fontface = create_fontface();
@@ -1640,7 +1640,7 @@ static void test_GetGlyphs(void) sa.shapes = DWRITE_SCRIPT_SHAPES_DEFAULT; hr = IDWriteTextAnalyzer_GetGlyphs(analyzer, test1W, lstrlenW(test1W), fontface, FALSE, FALSE, &sa, NULL, NULL, NULL, NULL, 0, maxglyphcount, clustermap, props, glyphs1, shapingprops, &actual_count); - ok(hr == E_NOT_SUFFICIENT_BUFFER, "got 0x%08x\n", hr); + ok(hr == E_NOT_SUFFICIENT_BUFFER, "got 0x%08lx\n", hr);
if (0) { /* NULL fontface - crashes on Windows */ @@ -1655,7 +1655,7 @@ if (0) { sa.shapes = DWRITE_SCRIPT_SHAPES_DEFAULT; hr = IDWriteTextAnalyzer_GetGlyphs(analyzer, test1W, lstrlenW(test1W), fontface, FALSE, FALSE, &sa, NULL, NULL, NULL, NULL, 0, maxglyphcount, clustermap, props, glyphs1, shapingprops, &actual_count); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(actual_count == 4, "got %d\n", actual_count); ok(sa.script == 999, "got %u\n", sa.script);
@@ -1664,13 +1664,13 @@ if (0) { actual_count = 0; hr = IDWriteTextAnalyzer_GetGlyphs(analyzer, test1W, lstrlenW(test1W), fontface, FALSE, FALSE, &sa, NULL, NULL, NULL, NULL, 0, maxglyphcount, clustermap, props, glyphs1, shapingprops, &actual_count); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(actual_count == 4, "got %d\n", actual_count);
actual_count = 0; hr = IDWriteTextAnalyzer_GetGlyphs(analyzer, test2W, lstrlenW(test2W), fontface, FALSE, FALSE, &sa, NULL, NULL, NULL, NULL, 0, maxglyphcount, clustermap, props, glyphs2, shapingprops, &actual_count); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(actual_count == 4, "got %d\n", actual_count); ok(glyphs1[2] != glyphs2[2], "got %d\n", glyphs1[2]);
@@ -1679,13 +1679,13 @@ if (0) { actual_count = 0; hr = IDWriteTextAnalyzer_GetGlyphs(analyzer, test1W, lstrlenW(test1W), fontface, FALSE, FALSE, &sa, NULL, NULL, NULL, NULL, 0, maxglyphcount, clustermap, props, glyphs1, shapingprops, &actual_count); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(actual_count == 4, "got %d\n", actual_count);
actual_count = 0; hr = IDWriteTextAnalyzer_GetGlyphs(analyzer, test1W, lstrlenW(test1W), fontface, FALSE, TRUE, &sa, NULL, NULL, NULL, NULL, 0, maxglyphcount, clustermap, props, glyphs2, shapingprops, &actual_count); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(actual_count == 4, "got %d\n", actual_count); ok(glyphs1[0] != glyphs2[0], "got %d\n", glyphs1[0]);
@@ -1696,7 +1696,7 @@ if (0) { actual_count = 0; hr = IDWriteTextAnalyzer_GetGlyphs(analyzer, test3W, lstrlenW(test3W), fontface, FALSE, TRUE, &sa, NULL, NULL, NULL, NULL, 0, maxglyphcount, clustermap, props, glyphs1, shapingprops, &actual_count); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(actual_count == 2, "got %d\n", actual_count); ok(glyphs1[0] == glyphs2[0], "got %u, expected %u\n", glyphs1[0], glyphs2[0]); ok(glyphs1[1] == glyphs2[1], "got %u, expected %u\n", glyphs1[1], glyphs2[1]); @@ -1711,7 +1711,7 @@ if (0) { hr = IDWriteTextAnalyzer_GetGlyphPlacements(analyzer, test3W, clustermap, props, lstrlenW(test3W), glyphs1, shapingprops, actual_count, fontface, 10.0, FALSE, FALSE, &sa, NULL, NULL, NULL, 0, advances, offsets); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(advances[0] == advances2[0], "got %.2f, expected %.2f\n", advances[0], advances2[0]); ok(advances[1] == advances2[1], "got %.2f, expected %.2f\n", advances[1], advances2[1]);
@@ -1722,7 +1722,7 @@ if (0) { actual_count = 0; hr = IDWriteTextAnalyzer_GetGlyphs(analyzer, test3W, lstrlenW(test3W), fontface, FALSE, FALSE, &sa, NULL, NULL, NULL, NULL, 0, maxglyphcount, clustermap, props, glyphs1, shapingprops, &actual_count); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(actual_count == 2, "got %d\n", actual_count); ok(glyphs1[0] == glyphs2[0], "got %u, expected %u\n", glyphs1[0], glyphs2[0]); ok(glyphs1[1] == glyphs2[1], "got %u, expected %u\n", glyphs1[1], glyphs2[1]); @@ -1737,7 +1737,7 @@ if (0) { hr = IDWriteTextAnalyzer_GetGlyphPlacements(analyzer, test3W, clustermap, props, lstrlenW(test3W), glyphs1, shapingprops, actual_count, fontface, 10.0, FALSE, FALSE, &sa, NULL, NULL, NULL, 0, advances, offsets); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(advances[0] == advances2[0], "got %.2f, expected %.2f\n", advances[0], advances2[0]); ok(advances[1] == advances2[1], "got %.2f, expected %.2f\n", advances[1], advances2[1]);
@@ -1748,7 +1748,7 @@ if (0) { sa.shapes = DWRITE_SCRIPT_SHAPES_NO_VISUAL; hr = IDWriteTextAnalyzer_GetGlyphs(analyzer, test1W, lstrlenW(test1W), fontface, FALSE, FALSE, &sa, NULL, NULL, NULL, NULL, 0, maxglyphcount, clustermap, props, glyphs1, shapingprops, &actual_count); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(actual_count == 4, "got %d\n", actual_count); ok(sa.script == 0, "got %u\n", sa.script); ok(!shapingprops[0].isZeroWidthSpace, "got %d\n", shapingprops[0].isZeroWidthSpace); @@ -1757,7 +1757,7 @@ if (0) {
/* Test setting glyph properties from GDEF. */ hr = IDWriteFactory_GetSystemFontCollection(factory, &syscoll, FALSE); - ok(hr == S_OK, "Failed to get system collection, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get system collection, hr %#lx.\n", hr);
for (i = 0; i < IDWriteFontCollection_GetFontFamilyCount(syscoll); ++i) { @@ -1766,10 +1766,10 @@ if (0) { WCHAR familyW[256];
hr = IDWriteFontCollection_GetFontFamily(syscoll, i, &family); - ok(hr == S_OK, "Failed to get font family, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get font family, hr %#lx.\n", hr);
hr = IDWriteFontFamily_GetFamilyNames(family, &names); - ok(hr == S_OK, "Failed to get family names, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get family names, hr %#lx.\n", hr); get_enus_string(names, familyW, ARRAY_SIZE(familyW)); IDWriteLocalizedStrings_Release(names);
@@ -1779,13 +1779,13 @@ if (0) { WCHAR faceW[256];
hr = IDWriteFontFamily_GetFont(family, j, &font); - ok(hr == S_OK, "Failed to get font instance, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get font instance, hr %#lx.\n", hr);
hr = IDWriteFont_CreateFontFace(font, &fontface); - ok(hr == S_OK, "Failed to create fontface, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create fontface, hr %#lx.\n", hr);
hr = IDWriteFont_GetFaceNames(font, &names); - ok(hr == S_OK, "Failed to get face names, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get face names, hr %#lx.\n", hr); get_enus_string(names, faceW, ARRAY_SIZE(faceW)); IDWriteLocalizedStrings_Release(names);
@@ -1815,7 +1815,7 @@ static void test_GetTypographicFeatures(void) HRESULT hr;
hr = IDWriteFactory_CreateTextAnalyzer(factory, &analyzer); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
hr = IDWriteTextAnalyzer_QueryInterface(analyzer, &IID_IDWriteTextAnalyzer2, (void**)&analyzer2); IDWriteTextAnalyzer_Release(analyzer); @@ -1829,14 +1829,14 @@ static void test_GetTypographicFeatures(void) get_script_analysis(L"abc", &sa); count = 0; hr = IDWriteTextAnalyzer2_GetTypographicFeatures(analyzer2, fontface, sa, NULL, 0, &count, NULL); - ok(hr == E_NOT_SUFFICIENT_BUFFER, "Unexpected hr %#x.\n", hr); + ok(hr == E_NOT_SUFFICIENT_BUFFER, "Unexpected hr %#lx.\n", hr); ok(!!count, "Unexpected count %u.\n", count);
/* invalid locale name is ignored */ get_script_analysis(L"abc", &sa); count = 0; hr = IDWriteTextAnalyzer2_GetTypographicFeatures(analyzer2, fontface, sa, L"cadabra", 0, &count, NULL); - ok(hr == E_NOT_SUFFICIENT_BUFFER, "Unexpected hr %#x.\n", hr); + ok(hr == E_NOT_SUFFICIENT_BUFFER, "Unexpected hr %#lx.\n", hr); ok(!!count, "Unexpected count %u.\n", count);
/* Make some calls for different scripts. */ @@ -1845,14 +1845,14 @@ static void test_GetTypographicFeatures(void) memset(tags, 0, sizeof(tags)); count = 0; hr = IDWriteTextAnalyzer2_GetTypographicFeatures(analyzer2, fontface, sa, NULL, ARRAY_SIZE(tags), &count, tags); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); ok(!!count, "Unexpected count %u.\n", count);
get_script_analysis(L"abc", &sa); memset(tags, 0, sizeof(tags)); count = 0; hr = IDWriteTextAnalyzer2_GetTypographicFeatures(analyzer2, fontface, sa, NULL, ARRAY_SIZE(tags), &count, tags); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); ok(!!count, "Unexpected count %u.\n", count);
IDWriteFontFace_Release(fontface); @@ -1875,7 +1875,7 @@ static void test_GetGlyphPlacements(void) HRESULT hr;
hr = IDWriteFactory_CreateTextAnalyzer(factory, &analyzer); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
path = create_testfontfile(L"wine_test_font.ttf"); fontface = create_testfontface(path); @@ -1885,7 +1885,7 @@ static void test_GetGlyphPlacements(void) len = lstrlenW(aW); hr = IDWriteTextAnalyzer_GetGlyphs(analyzer, aW, len, fontface, FALSE, FALSE, &sa, NULL, NULL, NULL, NULL, 0, len, clustermap, textprops, glyphs, glyphprops, &count); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(count == 2, "got %u\n", count);
/* just return on zero glyphs */ @@ -1894,7 +1894,7 @@ static void test_GetGlyphPlacements(void) hr = IDWriteTextAnalyzer_GetGlyphPlacements(analyzer, aW, clustermap, textprops, len, glyphs, glyphprops, 0, fontface, 0.0, FALSE, FALSE, &sa, NULL, NULL, NULL, 0, advances, offsets); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(advances[0] == 1.0, "got %.2f\n", advances[0]); ok(offsets[0].advanceOffset == 2.0 && offsets[0].ascenderOffset == 2.0, "got %.2f,%.2f\n", offsets[0].advanceOffset, offsets[0].ascenderOffset); @@ -1905,7 +1905,7 @@ static void test_GetGlyphPlacements(void) hr = IDWriteTextAnalyzer_GetGlyphPlacements(analyzer, aW, clustermap, textprops, len, glyphs, glyphprops, len, fontface, 0.0, FALSE, FALSE, &sa, NULL, NULL, NULL, 0, advances, offsets); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(advances[0] == 0.0, "got %.2f\n", advances[0]); ok(offsets[0].advanceOffset == 0.0 && offsets[0].ascenderOffset == 0.0, "got %.2f,%.2f\n", offsets[0].advanceOffset, offsets[0].ascenderOffset); @@ -1915,7 +1915,7 @@ static void test_GetGlyphPlacements(void) hr = IDWriteTextAnalyzer_GetGlyphPlacements(analyzer, aW, clustermap, textprops, len, glyphs, glyphprops, len, fontface, 2048.0, FALSE, FALSE, &sa, NULL, NULL, NULL, 0, advances, offsets); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(advances[0] == 1000.0, "got %.2f\n", advances[0]); ok(offsets[0].advanceOffset == 0.0 && offsets[0].ascenderOffset == 0.0, "got %.2f,%.2f\n", offsets[0].advanceOffset, offsets[0].ascenderOffset); @@ -1925,7 +1925,7 @@ static void test_GetGlyphPlacements(void) hr = IDWriteTextAnalyzer_GetGlyphPlacements(analyzer, aW, clustermap, textprops, len, glyphs, glyphprops, len, fontface, 1024.0, FALSE, FALSE, &sa, NULL, NULL, NULL, 0, advances, offsets); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(advances[0] == 500.0, "got %.2f\n", advances[0]); ok(advances[1] == 500.0, "got %.2f\n", advances[1]); ok(offsets[0].advanceOffset == 0.0 && offsets[0].ascenderOffset == 0.0, "got %.2f,%.2f\n", @@ -1936,7 +1936,7 @@ static void test_GetGlyphPlacements(void) hr = IDWriteTextAnalyzer_GetGlyphPlacements(analyzer, aW, clustermap, textprops, len, glyphs, glyphprops, len, fontface, 20.48, FALSE, FALSE, &sa, NULL, NULL, NULL, 0, advances, offsets); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(advances[0] == 10.0, "got %.2f\n", advances[0]); ok(advances[1] == 10.0, "got %.2f\n", advances[1]); ok(offsets[0].advanceOffset == 0.0 && offsets[0].ascenderOffset == 0.0, "got %.2f,%.2f\n", @@ -1947,7 +1947,7 @@ static void test_GetGlyphPlacements(void) hr = IDWriteTextAnalyzer_GetGlyphPlacements(analyzer, aW, NULL, textprops, len, glyphs, glyphprops, len, fontface, 1024.0, FALSE, FALSE, &sa, NULL, NULL, NULL, 0, advances, offsets); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(advances[0] == 500.0, "got %.2f\n", advances[0]); ok(advances[1] == 500.0, "got %.2f\n", advances[1]);
@@ -1957,7 +1957,7 @@ static void test_GetGlyphPlacements(void) hr = IDWriteTextAnalyzer_GetGlyphPlacements(analyzer, aW, clustermap, textprops, len, glyphs, glyphprops, len, fontface, -10.24, FALSE, FALSE, &sa, NULL, NULL, NULL, 0, advances, offsets); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(advances[0] == -5.0, "got %.2f\n", advances[0]); ok(offsets[0].advanceOffset == 0.0 && offsets[0].ascenderOffset == 0.0, "got %.2f,%.2f\n", offsets[0].advanceOffset, offsets[0].ascenderOffset); @@ -1969,7 +1969,7 @@ static void test_GetGlyphPlacements(void) hr = IDWriteTextAnalyzer_GetGlyphPlacements(analyzer, aW, clustermap, textprops, len, glyphs, glyphprops, len, fontface, 2048.0f, FALSE, FALSE, &sa, NULL, NULL, NULL, 0, advances, offsets); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(advances[0] == 1000.0f, "got %.2f\n", advances[0]); ok(advances[1] == 1000.0f, "got %.2f\n", advances[1]); ok(offsets[0].advanceOffset == 0.0f && offsets[0].ascenderOffset == 0.0f, "got %.2f,%.2f\n", @@ -1983,7 +1983,7 @@ static void test_GetGlyphPlacements(void) hr = IDWriteTextAnalyzer_GetGlyphPlacements(analyzer, aW, clustermap, textprops, len, glyphs, glyphprops, len, fontface, 2048.0f, FALSE, FALSE, &sa, NULL, NULL, NULL, 0, advances, offsets); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(advances[0] == 0.0f, "got %.2f\n", advances[0]); ok(advances[1] == 1000.0f, "got %.2f\n", advances[1]); ok(offsets[0].advanceOffset == 0.0f && offsets[0].ascenderOffset == 0.0f, "got %.2f,%.2f\n", @@ -2160,7 +2160,7 @@ static void test_ApplyCharacterSpacing(void) int i;
hr = IDWriteFactory_CreateTextAnalyzer(factory, &analyzer); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
hr = IDWriteTextAnalyzer_QueryInterface(analyzer, &IID_IDWriteTextAnalyzer1, (void**)&analyzer1); IDWriteTextAnalyzer_Release(analyzer); @@ -2216,7 +2216,7 @@ static void test_ApplyCharacterSpacing(void) props, advances, offsets); - ok(hr == (ptr->min_advance < 0.0f ? E_INVALIDARG : S_OK), "Unexpected hr %#x.\n", hr); + ok(hr == (ptr->min_advance < 0.0f ? E_INVALIDARG : S_OK), "Unexpected hr %#lx.\n", hr);
if (hr == S_OK) { ok(ptr->modified_advances[0] == advances[0], "Got advance[0] %.2f, expected %.2f.\n", advances[0], ptr->modified_advances[0]); @@ -2270,7 +2270,7 @@ static void test_ApplyCharacterSpacing(void) props, advances, offsets); - ok(hr == (ptr->min_advance < 0.0f ? E_INVALIDARG : S_OK), "Unexpected hr %#x.\n", hr); + ok(hr == (ptr->min_advance < 0.0f ? E_INVALIDARG : S_OK), "Unexpected hr %#lx.\n", hr);
if (hr == S_OK) { @@ -2346,7 +2346,7 @@ static void test_GetGlyphOrientationTransform(void) int i;
hr = IDWriteFactory_CreateTextAnalyzer(factory, &analyzer); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
hr = IDWriteTextAnalyzer_QueryInterface(analyzer, &IID_IDWriteTextAnalyzer1, (void**)&analyzer1); IDWriteTextAnalyzer_Release(analyzer); @@ -2359,14 +2359,14 @@ static void test_GetGlyphOrientationTransform(void) memset(&m, 0xcc, sizeof(m)); hr = IDWriteTextAnalyzer1_GetGlyphOrientationTransform(analyzer1, DWRITE_GLYPH_ORIENTATION_ANGLE_270_DEGREES + 1, FALSE, &m); - ok(hr == E_INVALIDARG, "got 0x%08x\n", hr); + ok(hr == E_INVALIDARG, "got 0x%08lx\n", hr); ok(m.m11 == 0.0, "got %.2f\n", m.m11);
for (i = 0; i < ARRAY_SIZE(ot_tests); i++) { memset(&m, 0, sizeof(m)); hr = IDWriteTextAnalyzer1_GetGlyphOrientationTransform(analyzer1, ot_tests[i].angle, ot_tests[i].is_sideways, &m); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(!memcmp(&ot_tests[i].m, &m, sizeof(m)), "%d: wrong matrix %s\n", i, dbgstr_matrix(&m)); }
@@ -2381,7 +2381,7 @@ static void test_GetGlyphOrientationTransform(void) memset(&m, 0xcc, sizeof(m)); hr = IDWriteTextAnalyzer2_GetGlyphOrientationTransform(analyzer2, DWRITE_GLYPH_ORIENTATION_ANGLE_270_DEGREES + 1, FALSE, 0.0, 0.0, &m); - ok(hr == E_INVALIDARG, "got 0x%08x\n", hr); + ok(hr == E_INVALIDARG, "got 0x%08lx\n", hr); ok(m.m11 == 0.0, "got %.2f\n", m.m11);
originx = 50.0; @@ -2395,13 +2395,13 @@ static void test_GetGlyphOrientationTransform(void) /* zero offset gives same result as a call from IDWriteTextAnalyzer1 */ hr = IDWriteTextAnalyzer2_GetGlyphOrientationTransform(analyzer2, ot_tests[i].angle, ot_tests[i].is_sideways, 0.0, 0.0, &m); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(!memcmp(&ot_tests[i].m, &m, sizeof(m)), "%d: wrong matrix %s\n", i, dbgstr_matrix(&m));
m_exp = ot_tests[i].m; hr = IDWriteTextAnalyzer2_GetGlyphOrientationTransform(analyzer2, ot_tests[i].angle, ot_tests[i].is_sideways, originx, originy, &m); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
/* 90 degrees more for sideways */ if (ot_tests[i].is_sideways) { @@ -2464,7 +2464,7 @@ static void test_GetBaseline(void) HRESULT hr;
hr = IDWriteFactory_CreateTextAnalyzer(factory, &analyzer); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
hr = IDWriteTextAnalyzer_QueryInterface(analyzer, &IID_IDWriteTextAnalyzer1, (void**)&analyzer1); IDWriteTextAnalyzer_Release(analyzer); @@ -2481,7 +2481,7 @@ static void test_GetBaseline(void) baseline = 456; hr = IDWriteTextAnalyzer1_GetBaseline(analyzer1, fontface, DWRITE_BASELINE_DEFAULT, FALSE, TRUE, sa, NULL, &baseline, &exists); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); ok(!baseline, "Unexpected baseline %d.\n", baseline); ok(!exists, "Unexpected flag %d.\n", exists);
@@ -2489,7 +2489,7 @@ static void test_GetBaseline(void) baseline = 456; hr = IDWriteTextAnalyzer1_GetBaseline(analyzer1, fontface, DWRITE_BASELINE_DEFAULT, FALSE, FALSE, sa, NULL, &baseline, &exists); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); ok(!baseline, "Unexpected baseline %d.\n", baseline); ok(!exists, "Unexpected flag %d.\n", exists);
@@ -2497,7 +2497,7 @@ static void test_GetBaseline(void) baseline = 0; hr = IDWriteTextAnalyzer1_GetBaseline(analyzer1, fontface, DWRITE_BASELINE_CENTRAL, FALSE, TRUE, sa, NULL, &baseline, &exists); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); ok(baseline != 0, "Unexpected baseline %d.\n", baseline); ok(!exists, "Unexpected flag %d.\n", exists);
@@ -2505,7 +2505,7 @@ static void test_GetBaseline(void) baseline = 0; hr = IDWriteTextAnalyzer1_GetBaseline(analyzer1, fontface, DWRITE_BASELINE_CENTRAL, FALSE, FALSE, sa, NULL, &baseline, &exists); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); ok(!baseline, "Unexpected baseline %d.\n", baseline); ok(!exists, "Unexpected flag %d.\n", exists);
@@ -2513,7 +2513,7 @@ static void test_GetBaseline(void) baseline = 456; hr = IDWriteTextAnalyzer1_GetBaseline(analyzer1, fontface, DWRITE_BASELINE_DEFAULT + 100, FALSE, TRUE, sa, NULL, &baseline, &exists); - ok(hr == E_INVALIDARG, "Unexpected hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Unexpected hr %#lx.\n", hr); ok(!baseline, "Unexpected baseline %d.\n", baseline); ok(!exists, "Unexpected flag %d.\n", exists);
@@ -2551,7 +2551,7 @@ static void test_GetGdiCompatibleGlyphPlacements(void) float emsize;
hr = IDWriteFactory_CreateTextAnalyzer(factory, &analyzer); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
fontface = create_fontface();
@@ -2560,7 +2560,7 @@ static void test_GetGdiCompatibleGlyphPlacements(void) count = 0; hr = IDWriteTextAnalyzer_GetGlyphs(analyzer, L"A", 1, fontface, FALSE, FALSE, &sa, NULL, NULL, NULL, NULL, 0, 1, clustermap, textprops, glyphs, glyphprops, &count); - ok(hr == S_OK, "Failed to get glyphs, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get glyphs, hr %#lx.\n", hr); ok(count == 1, "got %u\n", count);
for (emsize = 12.0f; emsize <= 20.0f; emsize += 1.0f) @@ -2570,20 +2570,20 @@ static void test_GetGdiCompatibleGlyphPlacements(void)
hr = IDWriteTextAnalyzer_GetGlyphPlacements(analyzer, L"A", clustermap, textprops, 1, glyphs, glyphprops, count, fontface, emsize, FALSE, FALSE, &sa, NULL, NULL, NULL, 0, &advance, offsets); - ok(hr == S_OK, "Failed to get glyph placements, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get glyph placements, hr %#lx.\n", hr); ok(advance > 0.0f, "Unexpected advance %f.\n", advance);
/* 1 ppdip, no transform */ ppdip = 1.0; hr = IDWriteFontFace_GetGdiCompatibleGlyphMetrics(fontface, emsize, ppdip, NULL, FALSE, glyphs, 1, &metrics, FALSE); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
expected = floorf(metrics.advanceWidth * emsize * ppdip / fontmetrics.designUnitsPerEm + 0.5f) / ppdip; hr = IDWriteTextAnalyzer_GetGdiCompatibleGlyphPlacements(analyzer, L"A", clustermap, textprops, 1, glyphs, glyphprops, count, fontface, emsize, ppdip, NULL, FALSE, FALSE, FALSE, &sa, NULL, NULL, NULL, 0, &compatadvance, offsets); - ok(hr == S_OK, "Failed to get glyph placements, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get glyph placements, hr %#lx.\n", hr); ok(compatadvance == expected, "%.0f: got advance %f, expected %f, natural %f\n", emsize, compatadvance, expected, advance);
@@ -2591,13 +2591,13 @@ static void test_GetGdiCompatibleGlyphPlacements(void) ppdip = 1.2f; hr = IDWriteFontFace_GetGdiCompatibleGlyphMetrics(fontface, emsize, ppdip, NULL, FALSE, glyphs, 1, &metrics, FALSE); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
expected = floorf(metrics.advanceWidth * emsize * ppdip / fontmetrics.designUnitsPerEm + 0.5f) / ppdip; hr = IDWriteTextAnalyzer_GetGdiCompatibleGlyphPlacements(analyzer, L"A", clustermap, textprops, 1, glyphs, glyphprops, count, fontface, emsize, ppdip, NULL, FALSE, FALSE, FALSE, &sa, NULL, NULL, NULL, 0, &compatadvance, offsets); - ok(hr == S_OK, "Failed to get glyph placements, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get glyph placements, hr %#lx.\n", hr); ok(float_eq(compatadvance, expected), "%.0f: got advance %f, expected %f, natural %f\n", emsize, compatadvance, expected, advance); } @@ -2783,7 +2783,7 @@ static void test_AnalyzeBidi(void) HRESULT hr;
hr = IDWriteFactory_CreateTextAnalyzer(factory, &analyzer); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
while (*ptr->text) { @@ -2803,7 +2803,7 @@ static void test_AnalyzeBidi(void) memset(g_resolved_levels, 0, sizeof(g_resolved_levels)); hr = IDWriteTextAnalyzer_AnalyzeBidi(analyzer, &analysissource.IDWriteTextAnalysisSource_iface, 0, len, &analysissink); - ok(hr == S_OK, "%u: got 0x%08x\n", i, hr); + ok(hr == S_OK, "%u: got 0x%08lx\n", i, hr); compare_bidi_levels(i, ptr, len, g_explicit_levels, g_resolved_levels);
i++; @@ -2818,7 +2818,7 @@ START_TEST(analyzer) HRESULT hr;
hr = DWriteCreateFactory(DWRITE_FACTORY_TYPE_ISOLATED, &IID_IDWriteFactory, (IUnknown**)&factory); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); if (hr != S_OK) { win_skip("failed to create factory\n"); diff --git a/dlls/dwrite/tests/font.c b/dlls/dwrite/tests/font.c index bb70c6f2320..32a2ab11cdf 100644 --- a/dlls/dwrite/tests/font.c +++ b/dlls/dwrite/tests/font.c @@ -72,7 +72,7 @@ #endif
#define EXPECT_HR(hr,hr_exp) \ - ok(hr == hr_exp, "got 0x%08x, expected 0x%08x\n", hr, hr_exp) + ok(hr == hr_exp, "got 0x%08lx, expected 0x%08lx\n", hr, hr_exp)
#define DEFINE_EXPECT(func) \ static BOOL expect_ ## func = FALSE, called_ ## func = FALSE @@ -109,7 +109,7 @@ static void _expect_ref(IUnknown* obj, ULONG ref, int line) ULONG rc; IUnknown_AddRef(obj); rc = IUnknown_Release(obj); - ok_(__FILE__,line)(rc == ref, "expected refcount %d, got %d\n", ref, rc); + ok_(__FILE__,line)(rc == ref, "expected refcount %ld, got %ld\n", ref, rc); }
#define EXPECT_REF_BROKEN(obj,ref,brokenref) _expect_ref_broken((IUnknown*)obj, ref, brokenref, __LINE__) @@ -118,7 +118,7 @@ static void _expect_ref_broken(IUnknown* obj, ULONG ref, ULONG brokenref, int li ULONG rc; IUnknown_AddRef(obj); rc = IUnknown_Release(obj); - ok_(__FILE__,line)(rc == ref || broken(rc == brokenref), "expected refcount %d, got %d\n", ref, rc); + ok_(__FILE__,line)(rc == ref || broken(rc == brokenref), "expected refcount %ld, got %ld\n", ref, rc); }
static BOOL (WINAPI *pGetFontRealizationInfo)(HDC hdc, void *); @@ -475,7 +475,7 @@ static IDWriteFontFace *create_fontface(IDWriteFactory *factory) HRESULT hr;
hr = IDWriteFactory_GetGdiInterop(factory, &interop); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
memset(&logfont, 0, sizeof(logfont)); logfont.lfHeight = 12; @@ -485,10 +485,10 @@ static IDWriteFontFace *create_fontface(IDWriteFactory *factory) lstrcpyW(logfont.lfFaceName, L"Tahoma");
hr = IDWriteGdiInterop_CreateFontFromLOGFONT(interop, &logfont, &font); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
hr = IDWriteFont_CreateFontFace(font, &fontface); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
IDWriteFont_Release(font); IDWriteGdiInterop_Release(interop); @@ -506,20 +506,20 @@ static IDWriteFont *get_font(IDWriteFactory *factory, const WCHAR *name, DWRITE_ HRESULT hr;
hr = IDWriteFactory_GetSystemFontCollection(factory, &collection, FALSE); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
index = ~0; exists = FALSE; hr = IDWriteFontCollection_FindFamilyName(collection, name, &index, &exists); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); if (!exists) goto not_found;
hr = IDWriteFontCollection_GetFontFamily(collection, index, &family); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
hr = IDWriteFontFamily_GetFirstMatchingFont(family, DWRITE_FONT_WEIGHT_NORMAL, DWRITE_FONT_STRETCH_NORMAL, style, &font); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
IDWriteFontFamily_Release(family); not_found: @@ -546,7 +546,7 @@ static WCHAR *create_testfontfile(const WCHAR *filename) lstrcatW(pathW, filename);
file = CreateFileW(pathW, GENERIC_READ|GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, 0, 0); - ok(file != INVALID_HANDLE_VALUE, "file creation failed, at %s, error %d\n", wine_dbgstr_w(pathW), + ok(file != INVALID_HANDLE_VALUE, "file creation failed, at %s, error %ld\n", wine_dbgstr_w(pathW), GetLastError());
res = FindResourceA(GetModuleHandleA(NULL), (LPCSTR)MAKEINTRESOURCE(1), (LPCSTR)RT_RCDATA); @@ -563,7 +563,7 @@ static WCHAR *create_testfontfile(const WCHAR *filename) static void _delete_testfontfile(const WCHAR *filename, int line) { BOOL ret = DeleteFileW(filename); - ok_(__FILE__,line)(ret, "failed to delete file %s, error %d\n", wine_dbgstr_w(filename), GetLastError()); + ok_(__FILE__,line)(ret, "failed to delete file %s, error %ld\n", wine_dbgstr_w(filename), GetLastError()); }
static void get_combined_font_name(const WCHAR *familyW, const WCHAR *faceW, WCHAR *nameW) @@ -731,10 +731,10 @@ static HRESULT WINAPI resourcecollectionloader_CreateEnumeratorFromKey(IDWriteFo HRESULT hr;
hr = IDWriteFactory_CreateCustomFontFileReference(factory, collectionKey, collectionKeySize, This->loader, &font_file); - ok(hr == S_OK, "Failed to create custom file reference, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create custom file reference, hr %#lx.\n", hr);
hr = create_enumerator(font_file, fontFileEnumerator); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
IDWriteFontFile_Release(font_file); return hr; @@ -1057,7 +1057,7 @@ static void test_CreateFontFromLOGFONT(void) factory = create_factory();
hr = IDWriteFactory_GetGdiInterop(factory, &interop); - ok(hr == S_OK, "got %#x\n", hr); + ok(hr == S_OK, "got %#lx\n", hr);
if (0) /* null out parameter crashes this call */ @@ -1090,12 +1090,12 @@ static void test_CreateFontFromLOGFONT(void)
exists = TRUE; hr = IDWriteFont_HasCharacter(font, 0xd800, &exists); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(exists == FALSE, "got %d\n", exists);
exists = FALSE; hr = IDWriteFont_HasCharacter(font, 0x20, &exists); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(exists == TRUE, "got %d\n", exists);
/* now check properties */ @@ -1125,7 +1125,7 @@ static void test_CreateFontFromLOGFONT(void)
weight = IDWriteFont_GetWeight(font); ok(weight == weights[i][1], - "%d: got %d, expected %d\n", i, weight, weights[i][1]); + "%d: got %d, expected %ld\n", i, weight, weights[i][1]);
IDWriteFont_Release(font); } @@ -1139,7 +1139,7 @@ static void test_CreateFontFromLOGFONT(void)
font = NULL; hr = IDWriteGdiInterop_CreateFontFromLOGFONT(interop, &logfont, &font); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
weight = IDWriteFont_GetWeight(font); ok(weight == DWRITE_FONT_WEIGHT_NORMAL || weight == DWRITE_FONT_WEIGHT_BOLD, @@ -1156,7 +1156,7 @@ static void test_CreateFontFromLOGFONT(void)
font = (void*)0xdeadbeef; hr = IDWriteGdiInterop_CreateFontFromLOGFONT(interop, &logfont, &font); - ok(hr == DWRITE_E_NOFONT, "got 0x%08x\n", hr); + ok(hr == DWRITE_E_NOFONT, "got 0x%08lx\n", hr); ok(font == NULL, "got %p\n", font);
/* Try with name 'Tahoma ' */ @@ -1168,7 +1168,7 @@ static void test_CreateFontFromLOGFONT(void)
font = (void*)0xdeadbeef; hr = IDWriteGdiInterop_CreateFontFromLOGFONT(interop, &logfont, &font); - ok(hr == DWRITE_E_NOFONT, "got 0x%08x\n", hr); + ok(hr == DWRITE_E_NOFONT, "got 0x%08lx\n", hr); ok(font == NULL, "got %p\n", font);
/* empty string as a facename */ @@ -1179,7 +1179,7 @@ static void test_CreateFontFromLOGFONT(void)
font = (void*)0xdeadbeef; hr = IDWriteGdiInterop_CreateFontFromLOGFONT(interop, &logfont, &font); - ok(hr == DWRITE_E_NOFONT, "got 0x%08x\n", hr); + ok(hr == DWRITE_E_NOFONT, "got 0x%08lx\n", hr); ok(font == NULL, "got %p\n", font);
/* IDWriteGdiInterop1::CreateFontFromLOGFONT() */ @@ -1193,7 +1193,7 @@ static void test_CreateFontFromLOGFONT(void) lstrcpyW(logfont.lfFaceName, L"Tahoma");
hr = IDWriteGdiInterop1_CreateFontFromLOGFONT(interop1, &logfont, NULL, &font); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
IDWriteFont_Release(font); IDWriteGdiInterop1_Release(interop1); @@ -1202,9 +1202,9 @@ static void test_CreateFontFromLOGFONT(void) win_skip("IDWriteGdiInterop1 is not supported, skipping CreateFontFromLOGFONT() tests.\n");
ref = IDWriteGdiInterop_Release(interop); - ok(ref == 0, "interop is not released, %u\n", ref); + ok(ref == 0, "interop is not released, %lu\n", ref); ref = IDWriteFactory_Release(factory); - ok(ref == 0, "factory is not released, %u\n", ref); + ok(ref == 0, "factory is not released, %lu\n", ref); }
static void test_CreateBitmapRenderTarget(void) @@ -1245,8 +1245,8 @@ static void test_CreateBitmapRenderTarget(void) size.cx = size.cy = -1; hr = IDWriteBitmapRenderTarget_GetSize(target, &size); EXPECT_HR(hr, S_OK); - ok(size.cx == 0, "got %d\n", size.cx); - ok(size.cy == 0, "got %d\n", size.cy); + ok(size.cx == 0, "got %ld\n", size.cx); + ok(size.cy == 0, "got %ld\n", size.cy);
target2 = NULL; hr = IDWriteGdiInterop_CreateBitmapRenderTarget(interop, NULL, 0, 0, &target2); @@ -1287,11 +1287,11 @@ static void test_CreateBitmapRenderTarget(void)
/* test context settings */ c = GetTextColor(hdc); - ok(c == RGB(0, 0, 0), "got 0x%08x\n", c); + ok(c == RGB(0, 0, 0), "got 0x%08lx\n", c); ret = GetBkMode(hdc); ok(ret == OPAQUE, "got %d\n", ret); c = GetBkColor(hdc); - ok(c == RGB(255, 255, 255), "got 0x%08x\n", c); + ok(c == RGB(255, 255, 255), "got 0x%08lx\n", c);
hbm = GetCurrentObject(hdc, OBJ_BITMAP); ok(hbm != NULL, "got %p\n", hbm); @@ -1308,49 +1308,49 @@ static void test_CreateBitmapRenderTarget(void) size.cx = size.cy = -1; hr = IDWriteBitmapRenderTarget_GetSize(target, &size); EXPECT_HR(hr, S_OK); - ok(size.cx == 10, "got %d\n", size.cx); - ok(size.cy == 5, "got %d\n", size.cy); + ok(size.cx == 10, "got %ld\n", size.cx); + ok(size.cy == 5, "got %ld\n", size.cy);
/* resize to same size */ hr = IDWriteBitmapRenderTarget_Resize(target, 10, 5); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
hbm2 = GetCurrentObject(hdc, OBJ_BITMAP); ok(hbm2 == hbm, "got %p, %p\n", hbm2, hbm);
/* shrink */ hr = IDWriteBitmapRenderTarget_Resize(target, 5, 5); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
size.cx = size.cy = -1; hr = IDWriteBitmapRenderTarget_GetSize(target, &size); - ok(hr == S_OK, "got 0x%08x\n", hr); - ok(size.cx == 5, "got %d\n", size.cx); - ok(size.cy == 5, "got %d\n", size.cy); + ok(hr == S_OK, "got 0x%08lx\n", hr); + ok(size.cx == 5, "got %ld\n", size.cx); + ok(size.cy == 5, "got %ld\n", size.cy);
hbm2 = GetCurrentObject(hdc, OBJ_BITMAP); ok(hbm2 != hbm, "got %p, %p\n", hbm2, hbm);
hr = IDWriteBitmapRenderTarget_Resize(target, 20, 5); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
size.cx = size.cy = -1; hr = IDWriteBitmapRenderTarget_GetSize(target, &size); - ok(hr == S_OK, "got 0x%08x\n", hr); - ok(size.cx == 20, "got %d\n", size.cx); - ok(size.cy == 5, "got %d\n", size.cy); + ok(hr == S_OK, "got 0x%08lx\n", hr); + ok(size.cx == 20, "got %ld\n", size.cx); + ok(size.cy == 5, "got %ld\n", size.cy);
hbm2 = GetCurrentObject(hdc, OBJ_BITMAP); ok(hbm2 != hbm, "got %p, %p\n", hbm2, hbm);
hr = IDWriteBitmapRenderTarget_Resize(target, 1, 5); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
size.cx = size.cy = -1; hr = IDWriteBitmapRenderTarget_GetSize(target, &size); - ok(hr == S_OK, "got 0x%08x\n", hr); - ok(size.cx == 1, "got %d\n", size.cx); - ok(size.cy == 5, "got %d\n", size.cy); + ok(hr == S_OK, "got 0x%08lx\n", hr); + ok(size.cx == 1, "got %ld\n", size.cx); + ok(size.cy == 5, "got %ld\n", size.cy);
hbm2 = GetCurrentObject(hdc, OBJ_BITMAP); ok(hbm2 != hbm, "got %p, %p\n", hbm2, hbm); @@ -1365,13 +1365,13 @@ static void test_CreateBitmapRenderTarget(void)
/* empty rectangle */ hr = IDWriteBitmapRenderTarget_Resize(target, 0, 5); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
size.cx = size.cy = -1; hr = IDWriteBitmapRenderTarget_GetSize(target, &size); - ok(hr == S_OK, "got 0x%08x\n", hr); - ok(size.cx == 0, "got %d\n", size.cx); - ok(size.cy == 5, "got %d\n", size.cy); + ok(hr == S_OK, "got 0x%08lx\n", hr); + ok(size.cx == 0, "got %ld\n", size.cx); + ok(size.cy == 5, "got %ld\n", size.cy);
hbm2 = GetCurrentObject(hdc, OBJ_BITMAP); ok(hbm2 != hbm, "got %p, %p\n", hbm2, hbm); @@ -1390,7 +1390,7 @@ static void test_CreateBitmapRenderTarget(void)
memset(&m, 0xcc, sizeof(m)); hr = IDWriteBitmapRenderTarget_GetCurrentTransform(target, &m); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(m.m11 == 1.0 && m.m22 == 1.0 && m.m12 == 0.0 && m.m21 == 0.0, "got %.1f,%.1f,%.1f,%.1f\n", m.m11, m.m22, m.m12, m.m21); ok(m.dx == 0.0 && m.dy == 0.0, "got %.1f,%.1f\n", m.dx, m.dy); ret = GetWorldTransform(hdc, &xform); @@ -1400,11 +1400,11 @@ static void test_CreateBitmapRenderTarget(void)
memset(&m, 0, sizeof(m)); hr = IDWriteBitmapRenderTarget_SetCurrentTransform(target, &m); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
memset(&m, 0xcc, sizeof(m)); hr = IDWriteBitmapRenderTarget_GetCurrentTransform(target, &m); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(m.m11 == 0.0 && m.m22 == 0.0 && m.m12 == 0.0 && m.m21 == 0.0, "got %.1f,%.1f,%.1f,%.1f\n", m.m11, m.m22, m.m12, m.m21); ok(m.dx == 0.0 && m.dy == 0.0, "got %.1f,%.1f\n", m.dx, m.dy); ret = GetWorldTransform(hdc, &xform); @@ -1415,18 +1415,18 @@ static void test_CreateBitmapRenderTarget(void) memset(&m, 0, sizeof(m)); m.m11 = 2.0; m.m22 = 1.0; hr = IDWriteBitmapRenderTarget_SetCurrentTransform(target, &m); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ret = GetWorldTransform(hdc, &xform); ok(ret, "got %d\n", ret); ok(xform.eM11 == 1.0 && xform.eM22 == 1.0 && xform.eM12 == 0.0 && xform.eM21 == 0.0, "got wrong transform\n"); ok(xform.eDx == 0.0 && xform.eDy == 0.0, "got %.1f,%.1f\n", xform.eDx, xform.eDy);
hr = IDWriteBitmapRenderTarget_SetCurrentTransform(target, NULL); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
memset(&m, 0xcc, sizeof(m)); hr = IDWriteBitmapRenderTarget_GetCurrentTransform(target, &m); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(m.m11 == 1.0 && m.m22 == 1.0 && m.m12 == 0.0 && m.m21 == 0.0, "got %.1f,%.1f,%.1f,%.1f\n", m.m11, m.m22, m.m12, m.m21); ok(m.dx == 0.0 && m.dy == 0.0, "got %.1f,%.1f\n", m.dx, m.dy);
@@ -1435,13 +1435,13 @@ static void test_CreateBitmapRenderTarget(void) ok(pdip == 1.0, "got %.2f\n", pdip);
hr = IDWriteBitmapRenderTarget_SetPixelsPerDip(target, 2.0); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
hr = IDWriteBitmapRenderTarget_SetPixelsPerDip(target, -1.0); - ok(hr == E_INVALIDARG, "got 0x%08x\n", hr); + ok(hr == E_INVALIDARG, "got 0x%08lx\n", hr);
hr = IDWriteBitmapRenderTarget_SetPixelsPerDip(target, 0.0); - ok(hr == E_INVALIDARG, "got 0x%08x\n", hr); + ok(hr == E_INVALIDARG, "got 0x%08lx\n", hr);
pdip = IDWriteBitmapRenderTarget_GetPixelsPerDip(target); ok(pdip == 2.0, "got %.2f\n", pdip); @@ -1454,13 +1454,13 @@ static void test_CreateBitmapRenderTarget(void) ok(mode == DWRITE_TEXT_ANTIALIAS_MODE_CLEARTYPE, "got %d\n", mode);
hr = IDWriteBitmapRenderTarget1_SetTextAntialiasMode(target1, DWRITE_TEXT_ANTIALIAS_MODE_GRAYSCALE+1); - ok(hr == E_INVALIDARG, "got 0x%08x\n", hr); + ok(hr == E_INVALIDARG, "got 0x%08lx\n", hr);
mode = IDWriteBitmapRenderTarget1_GetTextAntialiasMode(target1); ok(mode == DWRITE_TEXT_ANTIALIAS_MODE_CLEARTYPE, "got %d\n", mode);
hr = IDWriteBitmapRenderTarget1_SetTextAntialiasMode(target1, DWRITE_TEXT_ANTIALIAS_MODE_GRAYSCALE); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
mode = IDWriteBitmapRenderTarget1_GetTextAntialiasMode(target1); ok(mode == DWRITE_TEXT_ANTIALIAS_MODE_GRAYSCALE, "got %d\n", mode); @@ -1472,14 +1472,14 @@ static void test_CreateBitmapRenderTarget(void)
/* DrawGlyphRun() argument validation. */ hr = IDWriteBitmapRenderTarget_Resize(target, 16, 16); - ok(hr == S_OK, "Failed to resize target, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to resize target, hr %#lx.\n", hr);
fontface = create_fontface(factory);
ch = 'A'; glyphs[0] = 0; hr = IDWriteFontFace_GetGlyphIndices(fontface, &ch, 1, glyphs); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(glyphs[0] > 0, "got %u\n", glyphs[0]); glyphs[1] = glyphs[0];
@@ -1491,46 +1491,46 @@ static void test_CreateBitmapRenderTarget(void)
hr = IDWriteFactory_CreateCustomRenderingParams(factory, 1.0f, 0.0f, 0.0f, DWRITE_PIXEL_GEOMETRY_FLAT, DWRITE_RENDERING_MODE_DEFAULT, ¶ms); - ok(hr == S_OK, "Failed to create rendering params, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create rendering params, hr %#lx.\n", hr);
hr = IDWriteBitmapRenderTarget_DrawGlyphRun(target, 0.0f, 0.0f, DWRITE_MEASURING_MODE_NATURAL, &run, NULL, RGB(255, 0, 0), NULL); - ok(hr == E_INVALIDARG, "Unexpected hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Unexpected hr %#lx.\n", hr);
hr = IDWriteBitmapRenderTarget_DrawGlyphRun(target, 0.0f, 0.0f, DWRITE_MEASURING_MODE_GDI_NATURAL + 1, &run, NULL, RGB(255, 0, 0), NULL); - ok(hr == E_INVALIDARG, "Unexpected hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Unexpected hr %#lx.\n", hr);
hr = IDWriteBitmapRenderTarget_DrawGlyphRun(target, 0.0f, 0.0f, DWRITE_MEASURING_MODE_GDI_NATURAL + 1, &run, params, RGB(255, 0, 0), NULL); - ok(hr == E_INVALIDARG || broken(hr == S_OK) /* Vista */, "Unexpected hr %#x.\n", hr); + ok(hr == E_INVALIDARG || broken(hr == S_OK) /* Vista */, "Unexpected hr %#lx.\n", hr);
hr = IDWriteBitmapRenderTarget_DrawGlyphRun(target, 0.0f, 0.0f, DWRITE_MEASURING_MODE_GDI_NATURAL, &run, params, RGB(255, 0, 0), NULL); - ok(hr == S_OK, "Failed to draw a run, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to draw a run, hr %#lx.\n", hr);
IDWriteRenderingParams_Release(params);
/* Zero sized target returns earlier. */ hr = IDWriteBitmapRenderTarget_Resize(target, 0, 16); - ok(hr == S_OK, "Failed to resize target, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to resize target, hr %#lx.\n", hr);
hr = IDWriteBitmapRenderTarget_DrawGlyphRun(target, 0.0f, 0.0f, DWRITE_MEASURING_MODE_NATURAL, &run, NULL, RGB(255, 0, 0), NULL); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IDWriteBitmapRenderTarget_DrawGlyphRun(target, 0.0f, 0.0f, DWRITE_MEASURING_MODE_GDI_NATURAL + 1, &run, params, RGB(255, 0, 0), NULL); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
IDWriteFontFace_Release(fontface);
ref = IDWriteBitmapRenderTarget_Release(target); - ok(ref == 0, "render target not released, %u\n", ref); + ok(ref == 0, "render target not released, %lu\n", ref); ref = IDWriteGdiInterop_Release(interop); - ok(ref == 0, "interop not released, %u\n", ref); + ok(ref == 0, "interop not released, %lu\n", ref); ref = IDWriteFactory_Release(factory); - ok(ref == 0, "factory not released, %u\n", ref); + ok(ref == 0, "factory not released, %lu\n", ref); }
static void test_GetFontFamily(void) @@ -1553,7 +1553,7 @@ static void test_GetFontFamily(void) EXPECT_HR(hr, S_OK);
hr = IDWriteFactory_GetSystemFontCollection(factory, &syscoll, FALSE); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
memset(&logfont, 0, sizeof(logfont)); logfont.lfHeight = 12; @@ -1563,10 +1563,10 @@ static void test_GetFontFamily(void) lstrcpyW(logfont.lfFaceName, L"Tahoma");
hr = IDWriteGdiInterop_CreateFontFromLOGFONT(interop, &logfont, &font); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
hr = IDWriteGdiInterop_CreateFontFromLOGFONT(interop, &logfont, &font2); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(font2 != font, "got %p, %p\n", font2, font);
if (0) /* crashes on native */ @@ -1590,16 +1590,16 @@ static void test_GetFontFamily(void) ok(family2 == NULL, "got %p\n", family2);
hr = IDWriteFont_GetFontFamily(font2, &family2); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(family2 != family, "got %p, %p\n", family2, family);
collection = NULL; hr = IDWriteFontFamily_GetFontCollection(family, &collection); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
collection2 = NULL; hr = IDWriteFontFamily_GetFontCollection(family2, &collection2); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(collection == collection2, "got %p, %p\n", collection, collection2); ok(collection == syscoll, "got %p, %p\n", collection, syscoll);
@@ -1617,25 +1617,25 @@ static void test_GetFontFamily(void)
font3 = (void*)0xdeadbeef; hr = IDWriteFontFamily1_GetFont(family1, ~0u, &font3); - ok(hr == E_FAIL, "got 0x%08x\n", hr); + ok(hr == E_FAIL, "got 0x%08lx\n", hr); ok(font3 == NULL, "got %p\n", font3);
hr = IDWriteFontFamily1_GetFont(family1, 0, &font3); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
hr = IDWriteFont3_QueryInterface(font3, &IID_IDWriteFont, (void**)&font); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); IDWriteFont_Release(font);
hr = IDWriteFont3_QueryInterface(font3, &IID_IDWriteFont1, (void**)&font1); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); IDWriteFont1_Release(font1);
hr = IDWriteFontFamily1_QueryInterface(family1, &IID_IDWriteFontList1, (void **)&fontlist1); - ok(hr == S_OK || broken(hr == E_NOINTERFACE), "Failed to get interface, hr %#x.\n", hr); + ok(hr == S_OK || broken(hr == E_NOINTERFACE), "Failed to get interface, hr %#lx.\n", hr); if (hr == S_OK) { hr = IDWriteFontFamily1_QueryInterface(family1, &IID_IDWriteFontList, (void **)&fontlist); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); ok(fontlist == (IDWriteFontList *)fontlist1, "Unexpected interface pointer.\n"); ok(fontlist != (IDWriteFontList *)family1, "Unexpected interface pointer.\n"); ok(fontlist != (IDWriteFontList *)family, "Unexpected interface pointer.\n"); @@ -1647,10 +1647,10 @@ static void test_GetFontFamily(void) ok(fontlist == (IDWriteFontList *)fontlist2, "Unexpected interface pointer.\n");
hr = IDWriteFontList2_GetFontSet(fontlist2, &fontset); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IDWriteFontList2_GetFontSet(fontlist2, &fontset2); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); ok(fontset != fontset2, "Unexpected instance.\n");
IDWriteFontSet1_Release(fontset2); @@ -1666,16 +1666,16 @@ static void test_GetFontFamily(void) }
hr = IDWriteFontFamily1_QueryInterface(family1, &IID_IDWriteFontList, (void**)&fontlist); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); IDWriteFontList_Release(fontlist);
IDWriteFont3_Release(font3);
hr = IDWriteFontFamily1_GetFontFaceReference(family1, 0, &ref); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
hr = IDWriteFontFamily1_GetFontFaceReference(family1, 0, &ref1); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(ref != ref1, "got %p, %p\n", ref, ref1);
IDWriteFontFaceReference_Release(ref); @@ -1696,11 +1696,11 @@ static void test_GetFontFamily(void)
family2 = (void *)0xdeadbeef; hr = IDWriteFontCollection2_GetFontFamily(coll2, count, &family2); - ok(hr == E_FAIL, "Unexpected hr %#x.\n", hr); + ok(hr == E_FAIL, "Unexpected hr %#lx.\n", hr); ok(!family2, "Unexpected pointer.\n");
hr = IDWriteFontCollection2_GetFontFamily(coll2, 0, &family2); - ok(hr == S_OK, "Failed to get family, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get family, hr %#lx.\n", hr); IDWriteFontFamily2_Release(family2);
IDWriteFontCollection2_Release(coll2); @@ -1715,7 +1715,7 @@ static void test_GetFontFamily(void) IDWriteFontFamily_Release(family); IDWriteGdiInterop_Release(interop); ref = IDWriteFactory_Release(factory); - ok(ref == 0, "factory not released, %u\n", ref); + ok(ref == 0, "factory not released, %lu\n", ref); }
static void test_GetFamilyNames(void) @@ -1755,11 +1755,11 @@ static void test_GetFamilyNames(void) hr = IDWriteFontFamily_GetFamilyNames(family, NULL);
hr = IDWriteFontFamily_GetFamilyNames(family, &names); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); EXPECT_REF(names, 1);
hr = IDWriteFontFamily_GetFamilyNames(family, &names2); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); EXPECT_REF(names2, 1); ok(names != names2, "got %p, was %p\n", names2, names);
@@ -1771,58 +1771,58 @@ static void test_GetFamilyNames(void)
len = 100; hr = IDWriteLocalizedStrings_GetStringLength(names, 10, &len); - ok(hr == E_FAIL, "got 0x%08x\n", hr); + ok(hr == E_FAIL, "got 0x%08lx\n", hr); ok(len == (UINT32)-1, "got %u\n", len);
len = 0; hr = IDWriteLocalizedStrings_GetStringLength(names, 0, &len); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(len > 0, "got %u\n", len);
/* GetString */ hr = IDWriteLocalizedStrings_GetString(names, 0, NULL, 0); - ok(hr == E_NOT_SUFFICIENT_BUFFER, "got 0x%08x\n", hr); + ok(hr == E_NOT_SUFFICIENT_BUFFER, "got 0x%08lx\n", hr);
hr = IDWriteLocalizedStrings_GetString(names, 10, NULL, 0); - ok(FAILED(hr), "Unexpected hr %#x.\n", hr); + ok(FAILED(hr), "Unexpected hr %#lx.\n", hr);
if (0) hr = IDWriteLocalizedStrings_GetString(names, 0, NULL, 100);
buffer[0] = 1; hr = IDWriteLocalizedStrings_GetString(names, 10, buffer, 100); - ok(hr == E_FAIL, "got 0x%08x\n", hr); + ok(hr == E_FAIL, "got 0x%08lx\n", hr); ok(buffer[0] == 0, "got %x\n", buffer[0]);
buffer[0] = 1; hr = IDWriteLocalizedStrings_GetString(names, 0, buffer, len-1); - ok(hr == E_NOT_SUFFICIENT_BUFFER, "got 0x%08x\n", hr); + ok(hr == E_NOT_SUFFICIENT_BUFFER, "got 0x%08lx\n", hr); ok(buffer[0] == 0 || broken(buffer[0] == 'T'), "Unexpected buffer contents, %#x.\n", buffer[0]);
buffer[0] = 1; hr = IDWriteLocalizedStrings_GetString(names, 0, buffer, len); - ok(hr == E_NOT_SUFFICIENT_BUFFER, "got 0x%08x\n", hr); + ok(hr == E_NOT_SUFFICIENT_BUFFER, "got 0x%08lx\n", hr); ok(buffer[0] == 0 || broken(buffer[0] == 'T'), "Unexpected buffer contents, %#x.\n", buffer[0]);
buffer[0] = 0; hr = IDWriteLocalizedStrings_GetString(names, 0, buffer, len+1); - ok(hr == S_OK, "Failed to get a string, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get a string, hr %#lx.\n", hr); ok(!lstrcmpW(buffer, L"Tahoma"), "Unexpected family name %s.\n", wine_dbgstr_w(buffer));
IDWriteLocalizedStrings_Release(names);
/* GetFamilyNames() on font face */ hr = IDWriteFont_CreateFontFace(font, &fontface); - ok(hr == S_OK, "Failed to create fontface, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create fontface, hr %#lx.\n", hr);
if (SUCCEEDED(IDWriteFontFace_QueryInterface(fontface, &IID_IDWriteFontFace3, (void **)&fontface3))) { hr = IDWriteFontFace3_GetFamilyNames(fontface3, &names); - ok(hr == S_OK, "Failed to get family names, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get family names, hr %#lx.\n", hr);
buffer[0] = 0; hr = IDWriteLocalizedStrings_GetString(names, 0, buffer, len+1); - ok(hr == S_OK, "Failed to get a string, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get a string, hr %#lx.\n", hr); ok(!lstrcmpW(buffer, L"Tahoma"), "Unexpected family name %s.\n", wine_dbgstr_w(buffer));
IDWriteLocalizedStrings_Release(names); @@ -1837,7 +1837,7 @@ static void test_GetFamilyNames(void) IDWriteFont_Release(font); IDWriteGdiInterop_Release(interop); ref = IDWriteFactory_Release(factory); - ok(ref == 0, "factory not released, %u\n", ref); + ok(ref == 0, "factory not released, %lu\n", ref); }
static void test_CreateFontFace(void) @@ -1873,32 +1873,32 @@ static void test_CreateFontFace(void)
font = NULL; hr = IDWriteGdiInterop_CreateFontFromLOGFONT(interop, &logfont, &font); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
font2 = NULL; hr = IDWriteGdiInterop_CreateFontFromLOGFONT(interop, &logfont, &font2); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(font != font2, "got %p, %p\n", font, font2);
hr = IDWriteFont_QueryInterface(font, &IID_IDWriteFontFace, (void**)&fontface); - ok(hr == E_NOINTERFACE, "got 0x%08x\n", hr); + ok(hr == E_NOINTERFACE, "got 0x%08lx\n", hr);
if (0) /* crashes on native */ hr = IDWriteFont_CreateFontFace(font, NULL);
fontface = NULL; hr = IDWriteFont_CreateFontFace(font, &fontface); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
fontface2 = NULL; hr = IDWriteFont_CreateFontFace(font, &fontface2); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(fontface == fontface2, "got %p, was %p\n", fontface2, fontface); IDWriteFontFace_Release(fontface2);
fontface2 = NULL; hr = IDWriteFont_CreateFontFace(font2, &fontface2); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(fontface == fontface2, "got %p, was %p\n", fontface2, fontface); IDWriteFontFace_Release(fontface2);
@@ -1906,36 +1906,36 @@ static void test_CreateFontFace(void) IDWriteFont_Release(font);
hr = IDWriteFontFace_QueryInterface(fontface, &IID_IDWriteFont, (void**)&font); - ok(hr == E_NOINTERFACE || broken(hr == E_NOTIMPL), "got 0x%08x\n", hr); + ok(hr == E_NOINTERFACE || broken(hr == E_NOTIMPL), "got 0x%08lx\n", hr);
IDWriteFontFace_Release(fontface); IDWriteGdiInterop_Release(interop);
/* Create from system collection */ hr = IDWriteFactory_GetSystemFontCollection(factory, &collection, FALSE); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
hr = IDWriteFontCollection_GetFontFamily(collection, 0, &family); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
font = NULL; hr = IDWriteFontFamily_GetFirstMatchingFont(family, DWRITE_FONT_WEIGHT_NORMAL, DWRITE_FONT_STRETCH_NORMAL, DWRITE_FONT_STYLE_NORMAL, &font); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
font2 = NULL; hr = IDWriteFontFamily_GetFirstMatchingFont(family, DWRITE_FONT_WEIGHT_NORMAL, DWRITE_FONT_STRETCH_NORMAL, DWRITE_FONT_STYLE_NORMAL, &font2); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(font != font2, "got %p, %p\n", font, font2);
fontface = NULL; hr = IDWriteFont_CreateFontFace(font, &fontface); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
fontface2 = NULL; hr = IDWriteFont_CreateFontFace(font2, &fontface2); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(fontface == fontface2, "got %p, was %p\n", fontface2, fontface);
/* Trivial equality test */ @@ -1953,21 +1953,21 @@ static void test_CreateFontFace(void) IDWriteFontFamily_Release(family); IDWriteFontCollection_Release(collection); ref = IDWriteFactory_Release(factory); - ok(ref == 0, "factory not released, %u.\n", ref); + ok(ref == 0, "factory not released, %lu.\n", ref);
/* IDWriteFactory::CreateFontFace() */ path = create_testfontfile(test_fontfile); factory = create_factory();
hr = IDWriteFactory_CreateFontFileReference(factory, path, NULL, &file); - ok(hr == S_OK, "got 0x%08x\n",hr); + ok(hr == S_OK, "got 0x%08lx\n",hr);
supported = FALSE; file_type = DWRITE_FONT_FILE_TYPE_UNKNOWN; face_type = DWRITE_FONT_FACE_TYPE_CFF; count = 0; hr = IDWriteFontFile_Analyze(file, &supported, &file_type, &face_type, &count); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(supported == TRUE, "got %i\n", supported); ok(file_type == DWRITE_FONT_FILE_TYPE_TRUETYPE, "got %i\n", file_type); ok(face_type == DWRITE_FONT_FACE_TYPE_TRUETYPE, "got %i\n", face_type); @@ -1975,42 +1975,42 @@ static void test_CreateFontFace(void)
/* invalid simulation flags */ hr = IDWriteFactory_CreateFontFace(factory, DWRITE_FONT_FACE_TYPE_CFF, 1, &file, 0, ~0u, &fontface); - ok(hr == E_INVALIDARG, "got 0x%08x\n", hr); + ok(hr == E_INVALIDARG, "got 0x%08lx\n", hr);
hr = IDWriteFactory_CreateFontFace(factory, DWRITE_FONT_FACE_TYPE_CFF, 1, &file, 0, 0xf, &fontface); - ok(hr == E_INVALIDARG, "got 0x%08x\n", hr); + ok(hr == E_INVALIDARG, "got 0x%08lx\n", hr);
/* try mismatching face type, the one that's not supported */ hr = IDWriteFactory_CreateFontFace(factory, DWRITE_FONT_FACE_TYPE_CFF, 1, &file, 0, DWRITE_FONT_SIMULATIONS_NONE, &fontface); - ok(hr == DWRITE_E_FILEFORMAT, "got 0x%08x\n", hr); + ok(hr == DWRITE_E_FILEFORMAT, "got 0x%08lx\n", hr);
hr = IDWriteFactory_CreateFontFace(factory, DWRITE_FONT_FACE_TYPE_OPENTYPE_COLLECTION, 1, &file, 0, DWRITE_FONT_SIMULATIONS_NONE, &fontface); - ok(hr == DWRITE_E_FILEFORMAT || broken(hr == E_FAIL) /* < win10 */, "got 0x%08x\n", hr); + ok(hr == DWRITE_E_FILEFORMAT || broken(hr == E_FAIL) /* < win10 */, "got 0x%08lx\n", hr);
hr = IDWriteFactory_CreateFontFace(factory, DWRITE_FONT_FACE_TYPE_RAW_CFF, 1, &file, 0, DWRITE_FONT_SIMULATIONS_NONE, &fontface); todo_wine - ok(hr == DWRITE_E_UNSUPPORTEDOPERATION || broken(hr == E_INVALIDARG) /* older versions */, "got 0x%08x\n", hr); + ok(hr == DWRITE_E_UNSUPPORTEDOPERATION || broken(hr == E_INVALIDARG) /* older versions */, "got 0x%08lx\n", hr);
fontface = (void*)0xdeadbeef; hr = IDWriteFactory_CreateFontFace(factory, DWRITE_FONT_FACE_TYPE_TYPE1, 1, &file, 0, DWRITE_FONT_SIMULATIONS_NONE, &fontface); - ok(hr == E_INVALIDARG, "got 0x%08x\n", hr); + ok(hr == E_INVALIDARG, "got 0x%08lx\n", hr); ok(fontface == NULL, "got %p\n", fontface);
fontface = (void*)0xdeadbeef; hr = IDWriteFactory_CreateFontFace(factory, DWRITE_FONT_FACE_TYPE_VECTOR, 1, &file, 0, DWRITE_FONT_SIMULATIONS_NONE, &fontface); - ok(hr == E_INVALIDARG, "got 0x%08x\n", hr); + ok(hr == E_INVALIDARG, "got 0x%08lx\n", hr); ok(fontface == NULL, "got %p\n", fontface);
fontface = (void*)0xdeadbeef; hr = IDWriteFactory_CreateFontFace(factory, DWRITE_FONT_FACE_TYPE_BITMAP, 1, &file, 0, DWRITE_FONT_SIMULATIONS_NONE, &fontface); - ok(hr == E_INVALIDARG, "got 0x%08x\n", hr); + ok(hr == E_INVALIDARG, "got 0x%08lx\n", hr); ok(fontface == NULL, "got %p\n", fontface);
fontface = NULL; hr = IDWriteFactory_CreateFontFace(factory, DWRITE_FONT_FACE_TYPE_UNKNOWN, 1, &file, 0, DWRITE_FONT_SIMULATIONS_NONE, &fontface); todo_wine - ok(hr == S_OK || broken(hr == E_INVALIDARG) /* < win10 */, "got 0x%08x\n", hr); + ok(hr == S_OK || broken(hr == E_INVALIDARG) /* < win10 */, "got 0x%08lx\n", hr); if (hr == S_OK) { ok(fontface != NULL, "got %p\n", fontface); face_type = IDWriteFontFace_GetType(fontface); @@ -2020,7 +2020,7 @@ static void test_CreateFontFace(void)
IDWriteFontFile_Release(file); ref = IDWriteFactory_Release(factory); - ok(ref == 0, "factory not released, %u.\n", ref); + ok(ref == 0, "factory not released, %lu.\n", ref); DELETE_FONTFILE(path); }
@@ -2038,13 +2038,13 @@ static void get_expected_font_metrics(IDWriteFontFace *fontface, DWRITE_FONT_MET memset(metrics, 0, sizeof(*metrics));
hr = IDWriteFontFace_TryGetFontTable(fontface, MS_OS2_TAG, (const void **)&tt_os2, &size, &os2_context, &exists); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); hr = IDWriteFontFace_TryGetFontTable(fontface, MS_HEAD_TAG, (const void**)&tt_head, &size, &head_context, &exists); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); hr = IDWriteFontFace_TryGetFontTable(fontface, MS_HHEA_TAG, (const void**)&tt_hhea, &size, &hhea_context, &exists); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); hr = IDWriteFontFace_TryGetFontTable(fontface, MS_POST_TAG, (const void**)&tt_post, &size, &post_context, &exists); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
if (tt_head) { metrics->designUnitsPerEm = GET_BE_WORD(tt_head->unitsPerEm); @@ -2199,11 +2199,11 @@ static void get_enus_string(IDWriteLocalizedStrings *strings, WCHAR *buff, UINT3 HRESULT hr;
hr = IDWriteLocalizedStrings_FindLocaleName(strings, L"en-us", &index, &exists); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); if (!exists) index = 0; hr = IDWriteLocalizedStrings_GetString(strings, index, buff, size); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); }
static void test_GetMetrics(void) @@ -2238,7 +2238,7 @@ static void test_GetMetrics(void) lstrcpyW(logfont.lfFaceName, L"Tahoma");
hr = IDWriteGdiInterop_CreateFontFromLOGFONT(interop, &logfont, &font); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
hfont = CreateFontIndirectW(&logfont); hdc = CreateCompatibleDC(0); @@ -2268,7 +2268,7 @@ static void test_GetMetrics(void) ok(metrics.strikethroughThickness != 0, "strikethroughThickness %u\n", metrics.strikethroughThickness);
hr = IDWriteFont_CreateFontFace(font, &fontface); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
memset(&metrics, 0, sizeof(metrics)); IDWriteFontFace_GetMetrics(fontface, &metrics); @@ -2315,7 +2315,7 @@ static void test_GetMetrics(void) ok(!metrics1.hasTypographicMetrics, "hasTypographicMetrics %d\n", metrics1.hasTypographicMetrics);
hr = IDWriteFontFace_QueryInterface(fontface, &IID_IDWriteFontFace1, (void**)&fontface1); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
memset(&metrics1, 0, sizeof(metrics1)); IDWriteFontFace1_GetMetrics(fontface1, &metrics1); @@ -2357,11 +2357,11 @@ static void test_GetMetrics(void)
/* create regulat Tahoma with bold simulation */ hr = IDWriteFont_CreateFontFace(font, &fontface); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
count = 1; hr = IDWriteFontFace_GetFiles(fontface, &count, &file); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
IDWriteFontFace_GetMetrics(fontface, &metrics); ok(IDWriteFontFace_GetSimulations(fontface) == 0, "wrong simulations flags\n"); @@ -2369,7 +2369,7 @@ static void test_GetMetrics(void)
hr = IDWriteFactory_CreateFontFace(factory, DWRITE_FONT_FACE_TYPE_TRUETYPE, 1, &file, 0, DWRITE_FONT_SIMULATIONS_BOLD, &fontface); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); IDWriteFontFace_GetMetrics(fontface, &metrics2); ok(IDWriteFontFace_GetSimulations(fontface) == DWRITE_FONT_SIMULATIONS_BOLD, "wrong simulations flags\n");
@@ -2393,7 +2393,7 @@ static void test_GetMetrics(void)
/* test metrics for whole system collection */ hr = IDWriteFactory_GetSystemFontCollection(factory, &syscollection, FALSE); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); count = IDWriteFontCollection_GetFontFamilyCount(syscollection);
for (i = 0; i < count; i++) { @@ -2405,12 +2405,12 @@ static void test_GetMetrics(void) IDWriteFont *font;
hr = IDWriteFontCollection_GetFontFamily(syscollection, i, &family); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
fontcount = IDWriteFontFamily_GetFontCount(family);
hr = IDWriteFontFamily_GetFamilyNames(family, &names); - ok(hr == S_OK, "Failed to get family names, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get family names, hr %#lx.\n", hr); get_enus_string(names, familyW, ARRAY_SIZE(familyW)); IDWriteLocalizedStrings_Release(names);
@@ -2418,13 +2418,13 @@ static void test_GetMetrics(void) WCHAR nameW[256];
hr = IDWriteFontFamily_GetFont(family, j, &font); - ok(hr == S_OK, "Failed to get a font, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get a font, hr %#lx.\n", hr);
hr = IDWriteFont_CreateFontFace(font, &fontface); - ok(hr == S_OK, "Failed to create face instance, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create face instance, hr %#lx.\n", hr);
hr = IDWriteFont_GetFaceNames(font, &names); - ok(hr == S_OK, "Failed to get face names, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get face names, hr %#lx.\n", hr); get_enus_string(names, faceW, ARRAY_SIZE(faceW)); IDWriteLocalizedStrings_Release(names);
@@ -2451,7 +2451,7 @@ static void test_GetMetrics(void) } IDWriteFontCollection_Release(syscollection); ref = IDWriteFactory_Release(factory); - ok(ref == 0, "factory not released, %u\n", ref); + ok(ref == 0, "factory not released, %lu\n", ref); }
static void test_system_fontcollection(void) @@ -2476,16 +2476,16 @@ static void test_system_fontcollection(void) factory = create_factory();
hr = IDWriteFactory_GetSystemFontCollection(factory, &collection, FALSE); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
hr = IDWriteFactory_GetSystemFontCollection(factory, &coll2, FALSE); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(coll2 == collection, "got %p, was %p\n", coll2, collection); IDWriteFontCollection_Release(coll2);
factory2 = create_factory(); hr = IDWriteFactory_GetSystemFontCollection(factory2, &coll2, FALSE); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(coll2 != collection, "got %p, was %p\n", coll2, collection); IDWriteFontCollection_Release(coll2); IDWriteFactory_Release(factory2); @@ -2496,74 +2496,74 @@ static void test_system_fontcollection(void) /* invalid index */ family = (void*)0xdeadbeef; hr = IDWriteFontCollection_GetFontFamily(collection, i, &family); - ok(hr == E_FAIL, "got 0x%08x\n", hr); + ok(hr == E_FAIL, "got 0x%08lx\n", hr); ok(family == NULL, "got %p\n", family);
ret = FALSE; i = (UINT32)-1; hr = IDWriteFontCollection_FindFamilyName(collection, L"Tahoma", &i, &ret); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(ret, "got %d\n", ret); ok(i != (UINT32)-1, "got %u\n", i);
ret = FALSE; i = (UINT32)-1; hr = IDWriteFontCollection_FindFamilyName(collection, L"TAHOMA", &i, &ret); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); ok(ret, "got %d\n", ret); ok(i != (UINT32)-1, "got %u\n", i);
ret = FALSE; i = (UINT32)-1; hr = IDWriteFontCollection_FindFamilyName(collection, L"tAhOmA", &i, &ret); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); ok(ret, "got %d\n", ret); ok(i != (UINT32)-1, "got %u\n", i);
/* get back local file loader */ hr = IDWriteFontCollection_GetFontFamily(collection, i, &family); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
hr = IDWriteFontFamily_GetFirstMatchingFont(family, DWRITE_FONT_WEIGHT_NORMAL, DWRITE_FONT_STRETCH_NORMAL, DWRITE_FONT_STYLE_NORMAL, &font); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); IDWriteFontFamily_Release(family);
hr = IDWriteFont_CreateFontFace(font, &fontface); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); IDWriteFont_Release(font);
i = 1; file = NULL; hr = IDWriteFontFace_GetFiles(fontface, &i, &file); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(file != NULL, "got %p\n", file); IDWriteFontFace_Release(fontface);
hr = IDWriteFontFile_GetLoader(file, &loader); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); IDWriteFontFile_Release(file);
hr = IDWriteFontFileLoader_QueryInterface(loader, &IID_IDWriteLocalFontFileLoader, (void**)&localloader); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); IDWriteLocalFontFileLoader_Release(localloader);
/* local loader is not registered by default */ hr = IDWriteFactory_RegisterFontFileLoader(factory, loader); - ok(hr == S_OK || broken(hr == DWRITE_E_ALREADYREGISTERED), "got 0x%08x\n", hr); + ok(hr == S_OK || broken(hr == DWRITE_E_ALREADYREGISTERED), "got 0x%08lx\n", hr); hr = IDWriteFactory_UnregisterFontFileLoader(factory, loader); - ok(hr == S_OK || broken(hr == E_INVALIDARG), "got 0x%08x\n", hr); + ok(hr == S_OK || broken(hr == E_INVALIDARG), "got 0x%08lx\n", hr);
/* try with a different factory */ factory2 = create_factory(); hr = IDWriteFactory_RegisterFontFileLoader(factory2, loader); - ok(hr == S_OK || broken(hr == DWRITE_E_ALREADYREGISTERED), "got 0x%08x\n", hr); + ok(hr == S_OK || broken(hr == DWRITE_E_ALREADYREGISTERED), "got 0x%08lx\n", hr); hr = IDWriteFactory_RegisterFontFileLoader(factory2, loader); - ok(hr == DWRITE_E_ALREADYREGISTERED, "got 0x%08x\n", hr); + ok(hr == DWRITE_E_ALREADYREGISTERED, "got 0x%08lx\n", hr); hr = IDWriteFactory_UnregisterFontFileLoader(factory2, loader); - ok(hr == S_OK || broken(hr == E_INVALIDARG), "got 0x%08x\n", hr); + ok(hr == S_OK || broken(hr == E_INVALIDARG), "got 0x%08lx\n", hr); hr = IDWriteFactory_UnregisterFontFileLoader(factory2, loader); - ok(hr == E_INVALIDARG, "got 0x%08x\n", hr); + ok(hr == E_INVALIDARG, "got 0x%08lx\n", hr); IDWriteFactory_Release(factory2);
IDWriteFontFileLoader_Release(loader); @@ -2571,7 +2571,7 @@ static void test_system_fontcollection(void) ret = TRUE; i = 0; hr = IDWriteFontCollection_FindFamilyName(collection, L"Blah!", &i, &ret); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); ok(!ret, "got %d\n", ret); ok(i == (UINT32)-1, "got %u\n", i);
@@ -2582,17 +2582,17 @@ static void test_system_fontcollection(void) IDWriteFactory3 *factory3;
hr = IDWriteFontCollection1_QueryInterface(collection1, &IID_IDWriteFontCollection, (void**)&coll2); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(coll2 == collection, "got %p, %p\n", collection, coll2); IDWriteFontCollection_Release(coll2);
family1 = (void*)0xdeadbeef; hr = IDWriteFontCollection1_GetFontFamily(collection1, ~0u, &family1); - ok(hr == E_FAIL, "got 0x%08x\n", hr); + ok(hr == E_FAIL, "got 0x%08lx\n", hr); ok(family1 == NULL, "got %p\n", family1);
hr = IDWriteFontCollection1_GetFontFamily(collection1, 0, &family1); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); IDWriteFontFamily1_Release(family1);
/* system fontset */ @@ -2600,24 +2600,24 @@ static void test_system_fontcollection(void) EXPECT_REF(factory, 2); hr = IDWriteFontCollection1_GetFontSet(collection1, &fontset); todo_wine - ok(hr == S_OK, "Failed to get fontset, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get fontset, hr %#lx.\n", hr); if (hr == S_OK) { EXPECT_REF(collection1, 2); EXPECT_REF(factory, 2); EXPECT_REF(fontset, 1);
hr = IDWriteFontCollection1_GetFontSet(collection1, &fontset2); - ok(hr == S_OK, "Failed to get fontset, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get fontset, hr %#lx.\n", hr); ok(fontset != fontset2, "Expected new fontset instance.\n"); EXPECT_REF(fontset2, 1); IDWriteFontSet_Release(fontset2);
hr = IDWriteFactory_QueryInterface(factory, &IID_IDWriteFactory3, (void **)&factory3); - ok(hr == S_OK, "Failed to get IDWriteFactory3 interface, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get IDWriteFactory3 interface, hr %#lx.\n", hr);
EXPECT_REF(factory, 3); hr = IDWriteFactory3_GetSystemFontSet(factory3, &fontset2); - ok(hr == S_OK, "Failed to get system font set, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get system font set, hr %#lx.\n", hr); ok(fontset != fontset2, "Expected new fontset instance.\n"); EXPECT_REF(fontset2, 1); EXPECT_REF(factory, 4); @@ -2657,18 +2657,18 @@ static void test_system_fontcollection(void) hr = IDWriteFactory6_GetSystemFontCollection(factory6, FALSE, DWRITE_FONT_FAMILY_MODEL_TYPOGRAPHIC, &collection2); todo_wine - ok(hr == S_OK, "Failed to get collection, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get collection, hr %#lx.\n", hr); if (SUCCEEDED(hr)) { hr = IDWriteFactory6_GetSystemFontCollection(factory6, FALSE, DWRITE_FONT_FAMILY_MODEL_TYPOGRAPHIC, &c2); - ok(hr == S_OK, "Failed to get collection, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get collection, hr %#lx.\n", hr); ok(c2 == collection2 && collection != (IDWriteFontCollection *)c2, "Unexpected collection instance.\n"); IDWriteFontCollection2_Release(c2); IDWriteFontCollection2_Release(collection2);
hr = IDWriteFactory6_GetSystemFontCollection(factory6, FALSE, DWRITE_FONT_FAMILY_MODEL_WEIGHT_STRETCH_STYLE, &collection2); - ok(hr == S_OK, "Failed to get collection, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get collection, hr %#lx.\n", hr); IDWriteFontCollection2_Release(collection2); } IDWriteFactory6_Release(factory6); @@ -2677,9 +2677,9 @@ static void test_system_fontcollection(void) win_skip("IDWriteFactory6 is not supported.\n");
ref = IDWriteFontCollection_Release(collection); - ok(!ref, "Collection wasn't released, %u.\n", ref); + ok(!ref, "Collection wasn't released, %lu.\n", ref); ref = IDWriteFactory_Release(factory); - ok(!ref, "Factory wasn't released, %u.\n", ref); + ok(!ref, "Factory wasn't released, %lu.\n", ref); }
static void get_logfont_from_font(IDWriteFont *font, LOGFONTW *logfont) @@ -2708,15 +2708,15 @@ static void get_logfont_from_font(IDWriteFont *font, LOGFONTW *logfont) logfont->lfItalic = 0;
hr = IDWriteFont_CreateFontFace(font, &fontface); - ok(hr == S_OK, "Failed to create font face, %#x\n", hr); + ok(hr == S_OK, "Failed to create font face, %#lx\n", hr);
hr = IDWriteFontFace_TryGetFontTable(fontface, MS_OS2_TAG, (const void **)&tt_os2, &size, &os2_context, &exists); - ok(hr == S_OK, "Failed to get OS/2 table, %#x\n", hr); + ok(hr == S_OK, "Failed to get OS/2 table, %#lx\n", hr);
hr = IDWriteFontFace_TryGetFontTable(fontface, MS_HEAD_TAG, (const void **)&tt_head, &size, &head_context, &exists); - ok(hr == S_OK, "Failed to get head table, %#x\n", hr); + ok(hr == S_OK, "Failed to get head table, %#lx\n", hr);
sim = IDWriteFont_GetSimulations(font);
@@ -2781,7 +2781,7 @@ static void get_logfont_from_font(IDWriteFont *font, LOGFONTW *logfont) if (exists) { nameW[0] = 0; hr = IDWriteLocalizedStrings_GetString(names, index, nameW, ARRAY_SIZE(nameW)); - ok(hr == S_OK, "Failed to get name string, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get name string, hr %#lx.\n", hr); lstrcpynW(logfont->lfFaceName, nameW, ARRAY_SIZE(logfont->lfFaceName)); } } @@ -2810,7 +2810,7 @@ static void test_ConvertFontFaceToLOGFONT(void) factory = create_factory();
hr = IDWriteFactory_GetGdiInterop(factory, &interop); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
if (0) /* crashes on native */ { @@ -2819,11 +2819,11 @@ if (0) /* crashes on native */ } memset(&logfont, 0xcc, sizeof(logfont)); hr = IDWriteGdiInterop_ConvertFontFaceToLOGFONT(interop, NULL, &logfont); - ok(hr == E_INVALIDARG, "got 0x%08x\n", hr); + ok(hr == E_INVALIDARG, "got 0x%08lx\n", hr); ok(logfont.lfFaceName[0] == 0, "got face name %s\n", wine_dbgstr_w(logfont.lfFaceName));
hr = IDWriteFactory_GetSystemFontCollection(factory, &collection, FALSE); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
count = IDWriteFontCollection_GetFontFamilyCount(collection); for (i = 0; i < count; i++) { @@ -2836,10 +2836,10 @@ if (0) /* crashes on native */ LOGFONTW lf;
hr = IDWriteFontCollection_GetFontFamily(collection, i, &family); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
hr = IDWriteFontFamily_GetFamilyNames(family, &names); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
get_enus_string(names, familynameW, ARRAY_SIZE(familynameW)); IDWriteLocalizedStrings_Release(names); @@ -2850,10 +2850,10 @@ if (0) /* crashes on native */ IDWriteFontFace *fontface;
hr = IDWriteFontFamily_GetFont(family, j, &font); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
hr = IDWriteFont_GetFaceNames(font, &names); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
get_enus_string(names, facenameW, ARRAY_SIZE(facenameW)); IDWriteLocalizedStrings_Release(names); @@ -2861,7 +2861,7 @@ if (0) /* crashes on native */ get_combined_font_name(familynameW, facenameW, nameW);
hr = IDWriteFont_CreateFontFace(font, &fontface); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
if (has_face_variations(fontface)) { @@ -2875,14 +2875,14 @@ if (0) /* crashes on native */
memset(&logfont, 0xcc, sizeof(logfont)); hr = IDWriteGdiInterop_ConvertFontFaceToLOGFONT(interop, fontface, &logfont); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
sim = IDWriteFontFace_GetSimulations(fontface); get_logfont_from_font(font, &lf);
winetest_push_context("Font %s", wine_dbgstr_w(nameW));
- ok(logfont.lfWeight == lf.lfWeight, "Unexpected lfWeight %d, expected lfWeight %d, font weight %d, " + ok(logfont.lfWeight == lf.lfWeight, "Unexpected lfWeight %ld, expected lfWeight %ld, font weight %d, " "bold simulation %s.\n", logfont.lfWeight, lf.lfWeight, IDWriteFont_GetWeight(font), sim & DWRITE_FONT_SIMULATIONS_BOLD ? "yes" : "no"); ok(logfont.lfItalic == lf.lfItalic, "Unexpected italic flag %d, oblique simulation %s.\n", @@ -2907,7 +2907,7 @@ if (0) /* crashes on native */ IDWriteFontCollection_Release(collection); IDWriteGdiInterop_Release(interop); ref = IDWriteFactory_Release(factory); - ok(ref == 0, "factory not released, %u\n", ref); + ok(ref == 0, "factory not released, %lu\n", ref); }
static HRESULT WINAPI fontfileenumerator_QueryInterface(IDWriteFontFileEnumerator *iface, REFIID riid, void **obj) @@ -3046,50 +3046,50 @@ static void test_CustomFontCollection(void) loader3 = create_collection_loader();
hr = IDWriteFactory_RegisterFontCollectionLoader(factory, NULL); - ok(hr == E_INVALIDARG, "got 0x%08x\n", hr); + ok(hr == E_INVALIDARG, "got 0x%08lx\n", hr);
hr = IDWriteFactory_UnregisterFontCollectionLoader(factory, NULL); - ok(hr == E_INVALIDARG, "got 0x%08x\n", hr); + ok(hr == E_INVALIDARG, "got 0x%08lx\n", hr);
EXPECT_REF(loader, 1); EXPECT_REF(loader2, 1);
hr = IDWriteFactory_RegisterFontCollectionLoader(factory, loader); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); hr = IDWriteFactory_RegisterFontCollectionLoader(factory, loader2); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); hr = IDWriteFactory_RegisterFontCollectionLoader(factory, loader); - ok(hr == DWRITE_E_ALREADYREGISTERED, "got 0x%08x\n", hr); + ok(hr == DWRITE_E_ALREADYREGISTERED, "got 0x%08lx\n", hr);
EXPECT_REF(loader, 2); EXPECT_REF(loader2, 2);
hr = IDWriteFactory_RegisterFontFileLoader(factory, &rloader); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); hr = IDWriteFactory_RegisterFontCollectionLoader(factory, &resource_collection.IDWriteFontFileCollectionLoader_iface); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
/* Loader wasn't registered. */ font_collection = (void*)0xdeadbeef; hr = IDWriteFactory_CreateCustomFontCollection(factory, loader3, "Billy", 6, &font_collection); - ok(hr == E_INVALIDARG, "got 0x%08x\n", hr); + ok(hr == E_INVALIDARG, "got 0x%08lx\n", hr); ok(font_collection == NULL, "got %p\n", font_collection);
EXPECT_REF(factory, 1); hr = IDWriteFactory_CreateCustomFontCollection(factory, loader, "Billy", 6, &font_collection); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); todo_wine EXPECT_REF(factory, 1); EXPECT_REF(loader, 2); IDWriteFontCollection_Release(font_collection);
hr = IDWriteFactory_CreateCustomFontCollection(factory, loader2, "Billy", 6, &font_collection); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); IDWriteFontCollection_Release(font_collection);
font_collection = (void*)0xdeadbeef; hr = IDWriteFactory_CreateCustomFontCollection(factory, (IDWriteFontCollectionLoader*)0xdeadbeef, "Billy", 6, &font_collection); - ok(hr == E_INVALIDARG, "got 0x%08x\n", hr); + ok(hr == E_INVALIDARG, "got 0x%08lx\n", hr); ok(font_collection == NULL, "got %p\n", font_collection);
font = FindResourceA(GetModuleHandleA(NULL), (LPCSTR)MAKEINTRESOURCE(1), (LPCSTR)RT_RCDATA); @@ -3097,13 +3097,13 @@ static void test_CustomFontCollection(void)
hr = IDWriteFactory_CreateCustomFontCollection(factory, &resource_collection.IDWriteFontFileCollectionLoader_iface, &font, sizeof(HRSRC), &font_collection); - ok(hr == S_OK, "got 0x%08x\n",hr); + ok(hr == S_OK, "got 0x%08lx\n",hr); EXPECT_REF(font_collection, 1);
index = 1; exists = FALSE; hr = IDWriteFontCollection_FindFamilyName(font_collection, L"wine_test", &index, &exists); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(index == 0, "got index %i\n", index); ok(exists, "got exists %i\n", exists);
@@ -3112,65 +3112,65 @@ static void test_CustomFontCollection(void)
family = NULL; hr = IDWriteFontCollection_GetFontFamily(font_collection, 0, &family); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); EXPECT_REF(family, 1);
family2 = NULL; hr = IDWriteFontCollection_GetFontFamily(font_collection, 0, &family2); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); EXPECT_REF(family2, 1); ok(family != family2, "got %p, %p\n", family, family2);
hr = IDWriteFontFamily_GetFont(family, 0, &idfont); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); EXPECT_REF(idfont, 1); EXPECT_REF(family, 2); hr = IDWriteFontFamily_GetFont(family, 0, &idfont2); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); EXPECT_REF(idfont2, 1); EXPECT_REF(family, 3); ok(idfont != idfont2, "got %p, %p\n", idfont, idfont2); IDWriteFont_Release(idfont2);
hr = IDWriteFont_GetInformationalStrings(idfont, DWRITE_INFORMATIONAL_STRING_COPYRIGHT_NOTICE, &string, &exists); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(exists, "got %d\n", exists); EXPECT_REF(string, 1); IDWriteLocalizedStrings_Release(string);
family3 = NULL; hr = IDWriteFont_GetFontFamily(idfont, &family3); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); EXPECT_REF(family, 3); ok(family == family3, "got %p, %p\n", family, family3); IDWriteFontFamily_Release(family3);
idfontface = NULL; hr = IDWriteFont_CreateFontFace(idfont, &idfontface); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); EXPECT_REF(idfont, 1);
idfont2 = NULL; hr = IDWriteFontFamily_GetFont(family2, 0, &idfont2); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); EXPECT_REF(idfont2, 1); EXPECT_REF(idfont, 1); ok(idfont2 != idfont, "Font instances should not match\n");
idfontface2 = NULL; hr = IDWriteFont_CreateFontFace(idfont2, &idfontface2); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(idfontface2 == idfontface, "fontfaces should match\n");
index = 1; fontfile = NULL; hr = IDWriteFontFace_GetFiles(idfontface, &index, &fontfile); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
index = 1; fontfile2 = NULL; hr = IDWriteFontFace_GetFiles(idfontface2, &index, &fontfile2); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(fontfile == fontfile2, "fontfiles should match\n");
IDWriteFont_Release(idfont); @@ -3184,22 +3184,22 @@ static void test_CustomFontCollection(void) IDWriteFontCollection_Release(font_collection);
hr = IDWriteFactory_UnregisterFontCollectionLoader(factory, loader); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); hr = IDWriteFactory_UnregisterFontCollectionLoader(factory, loader); - ok(hr == E_INVALIDARG, "got 0x%08x\n", hr); + ok(hr == E_INVALIDARG, "got 0x%08lx\n", hr); hr = IDWriteFactory_UnregisterFontCollectionLoader(factory, loader2); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); hr = IDWriteFactory_UnregisterFontCollectionLoader(factory, &resource_collection.IDWriteFontFileCollectionLoader_iface); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); hr = IDWriteFactory_UnregisterFontFileLoader(factory, &rloader); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
IDWriteFontCollectionLoader_Release(loader); IDWriteFontCollectionLoader_Release(loader2); IDWriteFontCollectionLoader_Release(loader3);
ref = IDWriteFactory_Release(factory); - ok(ref == 0, "factory not released, %u\n", ref); + ok(ref == 0, "factory not released, %lu\n", ref); }
static HRESULT WINAPI fontfileloader_QueryInterface(IDWriteFontFileLoader *iface, REFIID riid, void **obj) @@ -3267,80 +3267,80 @@ static void test_CreateCustomFontFileReference(void)
if (0) { /* crashes on win10 */ hr = IDWriteFactory_RegisterFontFileLoader(factory, NULL); - ok(hr == E_INVALIDARG, "got 0x%08x\n", hr); + ok(hr == E_INVALIDARG, "got 0x%08lx\n", hr); } /* local loader is accepted too */ hr = IDWriteFactory_CreateFontFileReference(factory, path, NULL, &file); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
hr = IDWriteFontFile_GetLoader(file, &loader); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
hr = IDWriteFontFile_GetReferenceKey(file, &key, &key_size); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
hr = IDWriteFactory_CreateCustomFontFileReference(factory, key, key_size, loader, &file2); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
IDWriteFontFile_Release(file2); IDWriteFontFile_Release(file); IDWriteFontFileLoader_Release(loader);
hr = IDWriteFactory_RegisterFontFileLoader(factory, &floader); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); hr = IDWriteFactory_RegisterFontFileLoader(factory, &floader2); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); hr = IDWriteFactory_RegisterFontFileLoader(factory, &floader); - ok(hr == DWRITE_E_ALREADYREGISTERED, "got 0x%08x\n", hr); + ok(hr == DWRITE_E_ALREADYREGISTERED, "got 0x%08lx\n", hr); hr = IDWriteFactory_RegisterFontFileLoader(factory, &rloader); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
file = NULL; hr = IDWriteFactory_CreateCustomFontFileReference(factory, "test", 4, &floader, &file); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); IDWriteFontFile_Release(file);
file = (void*)0xdeadbeef; hr = IDWriteFactory_CreateCustomFontFileReference(factory, "test", 4, &floader3, &file); - ok(hr == E_INVALIDARG, "got 0x%08x\n", hr); + ok(hr == E_INVALIDARG, "got 0x%08lx\n", hr); ok(file == NULL, "got %p\n", file);
file = (void*)0xdeadbeef; hr = IDWriteFactory_CreateCustomFontFileReference(factory, "test", 4, NULL, &file); - ok(hr == E_INVALIDARG, "got 0x%08x\n", hr); + ok(hr == E_INVALIDARG, "got 0x%08lx\n", hr); ok(file == NULL, "got %p\n", file);
file = NULL; hr = IDWriteFactory_CreateCustomFontFileReference(factory, "test", 4, &floader, &file); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
file_type = DWRITE_FONT_FILE_TYPE_TRUETYPE; face_type = DWRITE_FONT_FACE_TYPE_TRUETYPE; support = TRUE; count = 1; hr = IDWriteFontFile_Analyze(file, &support, &file_type, &face_type, &count); - ok(hr == 0x8faecafe, "got 0x%08x\n", hr); + ok(hr == 0x8faecafe, "got 0x%08lx\n", hr); ok(support == FALSE, "got %i\n", support); ok(file_type == DWRITE_FONT_FILE_TYPE_UNKNOWN, "got %i\n", file_type); ok(face_type == DWRITE_FONT_FACE_TYPE_UNKNOWN, "got %i\n", face_type); ok(count == 0, "got %i\n", count);
hr = IDWriteFactory_CreateFontFace(factory, DWRITE_FONT_FACE_TYPE_CFF, 1, &file, 0, 0, &face); - ok(hr == 0x8faecafe, "got 0x%08x\n", hr); + ok(hr == 0x8faecafe, "got 0x%08lx\n", hr); IDWriteFontFile_Release(file);
fontrsrc = FindResourceA(GetModuleHandleA(NULL), (LPCSTR)MAKEINTRESOURCE(1), (LPCSTR)RT_RCDATA); ok(fontrsrc != NULL, "Failed to find font resource\n");
hr = IDWriteFactory_CreateCustomFontFileReference(factory, &fontrsrc, sizeof(HRSRC), &rloader, &file); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
file_type = DWRITE_FONT_FILE_TYPE_UNKNOWN; face_type = DWRITE_FONT_FACE_TYPE_UNKNOWN; support = FALSE; count = 0; hr = IDWriteFontFile_Analyze(file, &support, &file_type, &face_type, &count); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(support == TRUE, "got %i\n", support); ok(file_type == DWRITE_FONT_FILE_TYPE_TRUETYPE, "got %i\n", file_type); ok(face_type == DWRITE_FONT_FACE_TYPE_TRUETYPE, "got %i\n", face_type); @@ -3349,14 +3349,14 @@ if (0) { /* crashes on win10 */ /* invalid index */ face = (void*)0xdeadbeef; hr = IDWriteFactory_CreateFontFace(factory, face_type, 1, &file, 1, DWRITE_FONT_SIMULATIONS_NONE, &face); - ok(hr == E_INVALIDARG, "got 0x%08x\n", hr); + ok(hr == E_INVALIDARG, "got 0x%08lx\n", hr); ok(face == NULL, "got %p\n", face);
hr = IDWriteFactory_CreateFontFace(factory, face_type, 1, &file, 0, DWRITE_FONT_SIMULATIONS_NONE, &face); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
hr = IDWriteFactory_CreateFontFace(factory, face_type, 1, &file, 0, DWRITE_FONT_SIMULATIONS_NONE, &face2); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); /* fontface instances are reused starting with win7 */ ok(face == face2 || broken(face != face2), "got %p, %p\n", face, face2); IDWriteFontFace_Release(face2); @@ -3365,37 +3365,37 @@ if (0) { /* crashes on win10 */ face2 = NULL; hr = IDWriteFactory_CreateFontFace(factory2, face_type, 1, &file, 0, DWRITE_FONT_SIMULATIONS_NONE, &face2); todo_wine - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); if (face2) { IDWriteFontFace_Release(face2); } file2 = NULL; hr = IDWriteFactory_CreateCustomFontFileReference(factory, &fontrsrc, sizeof(HRSRC), &rloader, &file2); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(file != file2, "got %p, %p\n", file, file2);
hr = IDWriteFactory_CreateFontFace(factory, face_type, 1, &file2, 0, DWRITE_FONT_SIMULATIONS_NONE, &face2); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); /* fontface instances are reused starting with win7 */ ok(face == face2 || broken(face != face2), "got %p, %p\n", face, face2); IDWriteFontFace_Release(face2); IDWriteFontFile_Release(file2);
hr = IDWriteFontFace_GetGlyphIndices(face, NULL, 0, NULL); - ok(hr == E_INVALIDARG || broken(hr == S_OK) /* win8 */, "got 0x%08x\n", hr); + ok(hr == E_INVALIDARG || broken(hr == S_OK) /* win8 */, "got 0x%08lx\n", hr);
hr = IDWriteFontFace_GetGlyphIndices(face, codePoints, 0, NULL); - ok(hr == E_INVALIDARG || broken(hr == S_OK) /* win8 */, "got 0x%08x\n", hr); + ok(hr == E_INVALIDARG || broken(hr == S_OK) /* win8 */, "got 0x%08lx\n", hr);
hr = IDWriteFontFace_GetGlyphIndices(face, codePoints, 0, indices); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
hr = IDWriteFontFace_GetGlyphIndices(face, NULL, 0, indices); - ok(hr == E_INVALIDARG || broken(hr == S_OK) /* win8 */, "got 0x%08x\n", hr); + ok(hr == E_INVALIDARG || broken(hr == S_OK) /* win8 */, "got 0x%08lx\n", hr);
indices[0] = indices[1] = 11; hr = IDWriteFontFace_GetGlyphIndices(face, NULL, 1, indices); - ok(hr == E_INVALIDARG, "got 0x%08x\n", hr); + ok(hr == E_INVALIDARG, "got 0x%08lx\n", hr); ok(indices[0] == 0, "got index %i\n", indices[0]); ok(indices[1] == 11, "got index %i\n", indices[1]);
@@ -3403,24 +3403,24 @@ if (face2) { hr = IDWriteFontFace_GetGlyphIndices(face, NULL, 1, NULL);
hr = IDWriteFontFace_GetGlyphIndices(face, codePoints, 1, indices); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(indices[0] == 7, "Unexpected glyph index, %u.\n", indices[0]); IDWriteFontFace_Release(face); IDWriteFontFile_Release(file);
hr = IDWriteFactory_UnregisterFontFileLoader(factory, &floader); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); hr = IDWriteFactory_UnregisterFontFileLoader(factory, &floader); - ok(hr == E_INVALIDARG, "got 0x%08x\n", hr); + ok(hr == E_INVALIDARG, "got 0x%08lx\n", hr); hr = IDWriteFactory_UnregisterFontFileLoader(factory, &floader2); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); hr = IDWriteFactory_UnregisterFontFileLoader(factory, &rloader); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
ref = IDWriteFactory_Release(factory2); - ok(ref == 0, "factory not released, %u\n", ref); + ok(ref == 0, "factory not released, %lu\n", ref); ref = IDWriteFactory_Release(factory); - ok(ref == 0, "factory not released, %u\n", ref); + ok(ref == 0, "factory not released, %lu\n", ref); DELETE_FONTFILE(path); }
@@ -3442,30 +3442,30 @@ static void test_CreateFontFileReference(void)
ffile = (void*)0xdeadbeef; hr = IDWriteFactory_CreateFontFileReference(factory, NULL, NULL, &ffile); - ok(hr == E_INVALIDARG, "got 0x%08x\n",hr); + ok(hr == E_INVALIDARG, "got 0x%08lx\n",hr); ok(ffile == NULL, "got %p\n", ffile);
hr = IDWriteFactory_CreateFontFileReference(factory, path, NULL, &ffile); - ok(hr == S_OK, "got 0x%08x\n",hr); + ok(hr == S_OK, "got 0x%08lx\n",hr);
support = FALSE; type = DWRITE_FONT_FILE_TYPE_UNKNOWN; face = DWRITE_FONT_FACE_TYPE_CFF; count = 0; hr = IDWriteFontFile_Analyze(ffile, &support, &type, &face, &count); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(support == TRUE, "got %i\n", support); ok(type == DWRITE_FONT_FILE_TYPE_TRUETYPE, "got %i\n", type); ok(face == DWRITE_FONT_FACE_TYPE_TRUETYPE, "got %i\n", face); ok(count == 1, "got %i\n", count);
hr = IDWriteFactory_CreateFontFace(factory, face, 1, &ffile, 0, DWRITE_FONT_SIMULATIONS_NONE, &fface); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
IDWriteFontFace_Release(fface); IDWriteFontFile_Release(ffile); ref = IDWriteFactory_Release(factory); - ok(ref == 0, "factory not released, %u\n", ref); + ok(ref == 0, "factory not released, %lu\n", ref);
DELETE_FONTFILE(path); } @@ -3480,15 +3480,15 @@ static void test_shared_isolated(void) /* invalid type */ shared = NULL; hr = DWriteCreateFactory(DWRITE_FACTORY_TYPE_SHARED+1, &IID_IDWriteFactory, (IUnknown**)&shared); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(shared != NULL, "got %p\n", shared); IDWriteFactory_Release(shared);
hr = DWriteCreateFactory(DWRITE_FACTORY_TYPE_SHARED, &IID_IDWriteFactory, (IUnknown**)&shared); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
hr = DWriteCreateFactory(DWRITE_FACTORY_TYPE_SHARED, &IID_IDWriteFactory, (IUnknown**)&shared2); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(shared == shared2, "got %p, and %p\n", shared, shared2); IDWriteFactory_Release(shared2);
@@ -3496,30 +3496,30 @@ static void test_shared_isolated(void)
/* we got 2 references, released 2 - still same pointer is returned */ hr = DWriteCreateFactory(DWRITE_FACTORY_TYPE_SHARED, &IID_IDWriteFactory, (IUnknown**)&shared2); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(shared == shared2, "got %p, and %p\n", shared, shared2); IDWriteFactory_Release(shared2);
hr = DWriteCreateFactory(DWRITE_FACTORY_TYPE_ISOLATED, &IID_IDWriteFactory, (IUnknown**)&isolated); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
hr = DWriteCreateFactory(DWRITE_FACTORY_TYPE_ISOLATED, &IID_IDWriteFactory, (IUnknown**)&isolated2); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(isolated != isolated2, "got %p, and %p\n", isolated, isolated2); IDWriteFactory_Release(isolated2);
hr = DWriteCreateFactory(DWRITE_FACTORY_TYPE_ISOLATED, &IID_IUnknown, (IUnknown**)&isolated2); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); IDWriteFactory_Release(isolated2);
hr = DWriteCreateFactory(DWRITE_FACTORY_TYPE_SHARED+1, &IID_IDWriteFactory, (IUnknown**)&isolated2); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(shared != isolated2, "got %p, and %p\n", shared, isolated2);
ref = IDWriteFactory_Release(isolated); - ok(ref == 0, "factory not released, %u\n", ref); + ok(ref == 0, "factory not released, %lu\n", ref); ref = IDWriteFactory_Release(isolated2); - ok(ref == 0, "factory not released, %u\n", ref); + ok(ref == 0, "factory not released, %lu\n", ref); }
struct dwrite_fonttable @@ -3743,16 +3743,16 @@ static void test_GetUnicodeRanges(void) factory = create_factory();
hr = IDWriteFactory_RegisterFontFileLoader(factory, &rloader); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
font = FindResourceA(GetModuleHandleA(NULL), (LPCSTR)MAKEINTRESOURCE(1), (LPCSTR)RT_RCDATA); ok(font != NULL, "Failed to find font resource\n");
hr = IDWriteFactory_CreateCustomFontFileReference(factory, &font, sizeof(HRSRC), &rloader, &ffile); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
hr = IDWriteFactory_CreateFontFace(factory, DWRITE_FONT_FACE_TYPE_TRUETYPE, 1, &ffile, 0, DWRITE_FONT_SIMULATIONS_NONE, &fontface); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); IDWriteFontFile_Release(ffile);
hr = IDWriteFontFace_QueryInterface(fontface, &IID_IDWriteFontFace1, (void**)&fontface1); @@ -3765,39 +3765,39 @@ static void test_GetUnicodeRanges(void)
count = 0; hr = IDWriteFontFace1_GetUnicodeRanges(fontface1, 0, NULL, &count); - ok(hr == E_NOT_SUFFICIENT_BUFFER, "got 0x%08x\n", hr); + ok(hr == E_NOT_SUFFICIENT_BUFFER, "got 0x%08lx\n", hr); ok(count > 0, "got %u\n", count);
count = 1; hr = IDWriteFontFace1_GetUnicodeRanges(fontface1, 1, NULL, &count); - ok(hr == E_INVALIDARG, "got 0x%08x\n", hr); + ok(hr == E_INVALIDARG, "got 0x%08lx\n", hr); ok(count == 0, "got %u\n", count);
count = 0; hr = IDWriteFontFace1_GetUnicodeRanges(fontface1, 1, &r, &count); - ok(hr == E_NOT_SUFFICIENT_BUFFER, "got 0x%08x\n", hr); + ok(hr == E_NOT_SUFFICIENT_BUFFER, "got 0x%08lx\n", hr); ok(count > 1, "got %u\n", count);
ranges = malloc(count*sizeof(DWRITE_UNICODE_RANGE)); hr = IDWriteFontFace1_GetUnicodeRanges(fontface1, count, ranges, &count); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
ranges[0].first = ranges[0].last = 0; hr = IDWriteFontFace1_GetUnicodeRanges(fontface1, 1, ranges, &count); - ok(hr == E_NOT_SUFFICIENT_BUFFER, "got 0x%08x\n", hr); + ok(hr == E_NOT_SUFFICIENT_BUFFER, "got 0x%08lx\n", hr); ok(ranges[0].first != 0 && ranges[0].last != 0, "got 0x%x-0x%0x\n", ranges[0].first, ranges[0].last);
free(ranges);
hr = IDWriteFactory_UnregisterFontFileLoader(factory, &rloader); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
IDWriteFontFace1_Release(fontface1);
if (strcmp(winetest_platform, "wine")) {
hr = IDWriteFactory_GetSystemFontCollection(factory, &syscollection, FALSE); - ok(hr == S_OK, "Failed to get system collection, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get system collection, hr %#lx.\n", hr);
count = IDWriteFontCollection_GetFontFamilyCount(syscollection);
@@ -3809,10 +3809,10 @@ if (strcmp(winetest_platform, "wine")) { IDWriteFont *font;
hr = IDWriteFontCollection_GetFontFamily(syscollection, i, &family); - ok(hr == S_OK, "Failed to get font family, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get font family, hr %#lx.\n", hr);
hr = IDWriteFontFamily_GetFamilyNames(family, &names); - ok(hr == S_OK, "Failed to get family names, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get family names, hr %#lx.\n", hr);
get_enus_string(names, familynameW, ARRAY_SIZE(familynameW)); IDWriteLocalizedStrings_Release(names); @@ -3823,13 +3823,13 @@ if (strcmp(winetest_platform, "wine")) { UINT32 range_count, expected_count;
hr = IDWriteFontFamily_GetFont(family, j, &font); - ok(hr == S_OK, "Failed to get font, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get font, hr %#lx.\n", hr);
hr = IDWriteFont_CreateFontFace(font, &fontface); - ok(hr == S_OK, "Failed to create fontface, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create fontface, hr %#lx.\n", hr);
hr = IDWriteFont_GetFaceNames(font, &names); - ok(hr == S_OK, "Failed to get face names, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get face names, hr %#lx.\n", hr); IDWriteFont_Release(font);
get_enus_string(names, facenameW, ARRAY_SIZE(facenameW)); @@ -3848,12 +3848,12 @@ if (strcmp(winetest_platform, "wine")) { IDWriteFontFace_QueryInterface(fontface, &IID_IDWriteFontFace1, (void **)&fontface1);
hr = IDWriteFontFace1_GetUnicodeRanges(fontface1, 0, NULL, &range_count); - ok(hr == E_NOT_SUFFICIENT_BUFFER, "Unexpected hr %#x.\n", hr); + ok(hr == E_NOT_SUFFICIENT_BUFFER, "Unexpected hr %#lx.\n", hr);
ranges = malloc(range_count * sizeof(*ranges));
hr = IDWriteFontFace1_GetUnicodeRanges(fontface1, range_count, ranges, &range_count); - ok(hr == S_OK, "Failed to get ranges, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get ranges, hr %#lx.\n", hr);
expected_count = fontface_get_expected_unicode_ranges(fontface1, &expected_ranges); ok(expected_count == range_count, "%s - %s: unexpected range count %u, expected %u.\n", @@ -3885,7 +3885,7 @@ if (strcmp(winetest_platform, "wine")) { IDWriteFontCollection_Release(syscollection); } ref = IDWriteFactory_Release(factory); - ok(ref == 0, "factory not released, %u\n", ref); + ok(ref == 0, "factory not released, %lu\n", ref); }
static void test_GetFontFromFontFace(void) @@ -3903,35 +3903,35 @@ static void test_GetFontFromFontFace(void) factory = create_factory();
hr = IDWriteFactory_GetSystemFontCollection(factory, &collection, FALSE); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
hr = IDWriteFontCollection_GetFontFamily(collection, 0, &family); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
hr = IDWriteFontFamily_GetFirstMatchingFont(family, DWRITE_FONT_WEIGHT_NORMAL, DWRITE_FONT_STRETCH_NORMAL, DWRITE_FONT_STYLE_NORMAL, &font); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
hr = IDWriteFont_CreateFontFace(font, &fontface); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
font2 = NULL; hr = IDWriteFontCollection_GetFontFromFontFace(collection, fontface, &font2); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(font2 != font, "got %p, %p\n", font2, font);
font3 = NULL; hr = IDWriteFontCollection_GetFontFromFontFace(collection, fontface, &font3); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(font3 != font && font3 != font2, "got %p, %p, %p\n", font3, font2, font);
hr = IDWriteFont_CreateFontFace(font2, &fontface2); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(fontface2 == fontface, "got %p, %p\n", fontface2, fontface); IDWriteFontFace_Release(fontface2);
hr = IDWriteFont_CreateFontFace(font3, &fontface2); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(fontface2 == fontface, "got %p, %p\n", fontface2, fontface); IDWriteFontFace_Release(fontface2); IDWriteFontFace_Release(fontface); @@ -3943,14 +3943,14 @@ static void test_GetFontFromFontFace(void) path = create_testfontfile(test_fontfile);
hr = IDWriteFactory_CreateFontFileReference(factory, path, NULL, &file); - ok(hr == S_OK, "got 0x%08x\n",hr); + ok(hr == S_OK, "got 0x%08lx\n",hr);
hr = IDWriteFactory_CreateFontFace(factory, DWRITE_FONT_FACE_TYPE_TRUETYPE, 1, &file, 0, DWRITE_FONT_SIMULATIONS_NONE, &fontface); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); IDWriteFontFile_Release(file);
hr = IDWriteFontCollection_GetFontFromFontFace(collection, fontface, &font3); - ok(hr == DWRITE_E_NOFONT, "got 0x%08x\n", hr); + ok(hr == DWRITE_E_NOFONT, "got 0x%08lx\n", hr); ok(font3 == NULL, "got %p\n", font3); IDWriteFontFace_Release(fontface);
@@ -3959,7 +3959,7 @@ static void test_GetFontFromFontFace(void) IDWriteFontFamily_Release(family); IDWriteFontCollection_Release(collection); ref = IDWriteFactory_Release(factory); - ok(ref == 0, "factory not released, %u\n", ref); + ok(ref == 0, "factory not released, %lu\n", ref); DELETE_FONTFILE(path); }
@@ -3976,34 +3976,34 @@ static void test_GetFirstMatchingFont(void) factory = create_factory();
hr = IDWriteFactory_GetSystemFontCollection(factory, &collection, FALSE); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
hr = IDWriteFontCollection_GetFontFamily(collection, 0, &family); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
hr = IDWriteFontFamily_GetFirstMatchingFont(family, DWRITE_FONT_WEIGHT_NORMAL, DWRITE_FONT_STRETCH_NORMAL, DWRITE_FONT_STYLE_NORMAL, &font); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
hr = IDWriteFontFamily_GetFirstMatchingFont(family, DWRITE_FONT_WEIGHT_NORMAL, DWRITE_FONT_STRETCH_NORMAL, DWRITE_FONT_STYLE_NORMAL, &font2); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(font != font2, "got %p, %p\n", font, font2); IDWriteFont_Release(font); IDWriteFont_Release(font2);
/* out-of-range font props are allowed */ hr = IDWriteFontFamily_GetFirstMatchingFont(family, 1000, DWRITE_FONT_STRETCH_NORMAL, DWRITE_FONT_STYLE_NORMAL, &font); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); IDWriteFont_Release(font);
hr = IDWriteFontFamily_GetFirstMatchingFont(family, DWRITE_FONT_WEIGHT_NORMAL, 10, DWRITE_FONT_STYLE_NORMAL, &font); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); IDWriteFont_Release(font);
hr = IDWriteFontFamily_GetFirstMatchingFont(family, DWRITE_FONT_WEIGHT_NORMAL, DWRITE_FONT_STRETCH_NORMAL, 10, &font); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); IDWriteFont_Release(font);
IDWriteFontFamily_Release(family); @@ -4015,7 +4015,7 @@ static void test_GetFirstMatchingFont(void)
IDWriteFontCollection_Release(collection); ref = IDWriteFactory_Release(factory); - ok(ref == 0, "factory not released, %u\n", ref); + ok(ref == 0, "factory not released, %lu\n", ref); }
static void test_GetMatchingFonts(void) @@ -4032,34 +4032,34 @@ static void test_GetMatchingFonts(void) factory = create_factory();
hr = IDWriteFactory_GetSystemFontCollection(factory, &collection, FALSE); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
hr = IDWriteFontCollection_GetFontFamily(collection, 0, &family); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
/* out-of-range font props are allowed */ hr = IDWriteFontFamily_GetMatchingFonts(family, 1000, DWRITE_FONT_STRETCH_NORMAL, DWRITE_FONT_STYLE_NORMAL, &fontlist); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); IDWriteFontList_Release(fontlist);
hr = IDWriteFontFamily_GetMatchingFonts(family, DWRITE_FONT_WEIGHT_NORMAL, 10, DWRITE_FONT_STYLE_NORMAL, &fontlist); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); IDWriteFontList_Release(fontlist);
hr = IDWriteFontFamily_GetMatchingFonts(family, DWRITE_FONT_WEIGHT_NORMAL, DWRITE_FONT_STRETCH_NORMAL, 10, &fontlist); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); IDWriteFontList_Release(fontlist);
hr = IDWriteFontFamily_GetMatchingFonts(family, DWRITE_FONT_WEIGHT_NORMAL, DWRITE_FONT_STRETCH_NORMAL, DWRITE_FONT_STYLE_NORMAL, &fontlist); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
hr = IDWriteFontFamily_GetMatchingFonts(family, DWRITE_FONT_WEIGHT_NORMAL, DWRITE_FONT_STRETCH_NORMAL, DWRITE_FONT_STYLE_NORMAL, &fontlist2); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(fontlist != fontlist2, "got %p, %p\n", fontlist, fontlist2); IDWriteFontList_Release(fontlist2);
@@ -4074,23 +4074,23 @@ static void test_GetMatchingFonts(void)
font = (void*)0xdeadbeef; hr = IDWriteFontList1_GetFont(fontlist1, ~0u, &font); - ok(hr == E_FAIL, "got 0x%08x\n", hr); + ok(hr == E_FAIL, "got 0x%08lx\n", hr); ok(font == NULL, "got %p\n", font);
font = (void*)0xdeadbeef; hr = IDWriteFontList1_GetFont(fontlist1, count, &font); - ok(hr == E_FAIL, "got 0x%08x\n", hr); + ok(hr == E_FAIL, "got 0x%08lx\n", hr); ok(font == NULL, "got %p\n", font);
hr = IDWriteFontList1_GetFont(fontlist1, 0, &font); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); IDWriteFont3_Release(font);
hr = IDWriteFontList1_GetFontFaceReference(fontlist1, 0, &ref); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
hr = IDWriteFontList1_GetFontFaceReference(fontlist1, 0, &ref1); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(ref != ref1, "got %p, %p\n", ref, ref1);
IDWriteFontFaceReference_Release(ref1); @@ -4105,10 +4105,10 @@ static void test_GetMatchingFonts(void) IDWriteFontSet1 *fontset, *fontset2;
hr = IDWriteFontList2_GetFontSet(fontlist3, &fontset); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IDWriteFontList2_GetFontSet(fontlist3, &fontset2); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); ok(fontset != fontset2, "Unexpected instance.\n");
IDWriteFontSet1_Release(fontset2); @@ -4124,7 +4124,7 @@ static void test_GetMatchingFonts(void)
IDWriteFontCollection_Release(collection); ref = IDWriteFactory_Release(factory); - ok(ref == 0, "factory not released, %u\n", ref); + ok(ref == 0, "factory not released, %lu\n", ref); }
static void test_GetInformationalStrings(void) @@ -4143,51 +4143,51 @@ static void test_GetInformationalStrings(void) factory = create_factory();
hr = IDWriteFactory_GetSystemFontCollection(factory, &collection, FALSE); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
hr = IDWriteFontCollection_GetFontFamily(collection, 0, &family); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
hr = IDWriteFontFamily_GetFirstMatchingFont(family, DWRITE_FONT_WEIGHT_NORMAL, DWRITE_FONT_STRETCH_NORMAL, DWRITE_FONT_STYLE_NORMAL, &font); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
exists = TRUE; strings = (void *)0xdeadbeef; hr = IDWriteFont_GetInformationalStrings(font, 0xdead, &strings, &exists); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(exists == FALSE, "got %d\n", exists); ok(strings == NULL, "got %p\n", strings);
exists = TRUE; strings = NULL; hr = IDWriteFont_GetInformationalStrings(font, DWRITE_INFORMATIONAL_STRING_NONE, &strings, &exists); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(exists == FALSE, "got %d\n", exists);
exists = FALSE; strings = NULL; hr = IDWriteFont_GetInformationalStrings(font, DWRITE_INFORMATIONAL_STRING_WIN32_FAMILY_NAMES, &strings, &exists); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(exists == TRUE, "got %d\n", exists);
/* strings instance is not reused */ strings2 = NULL; hr = IDWriteFont_GetInformationalStrings(font, DWRITE_INFORMATIONAL_STRING_WIN32_FAMILY_NAMES, &strings2, &exists); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(strings2 != strings, "got %p, %p\n", strings2, strings);
IDWriteLocalizedStrings_Release(strings); IDWriteLocalizedStrings_Release(strings2);
hr = IDWriteFont_CreateFontFace(font, &fontface); - ok(hr == S_OK, "Failed to create fontface, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create fontface, hr %#lx.\n", hr);
if (SUCCEEDED(hr = IDWriteFontFace_QueryInterface(fontface, &IID_IDWriteFontFace3, (void **)&fontface3))) { hr = IDWriteFontFace3_GetInformationalStrings(fontface3, DWRITE_INFORMATIONAL_STRING_WIN32_FAMILY_NAMES, &strings, &exists); - ok(hr == S_OK, "Failed to get info strings, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get info strings, hr %#lx.\n", hr); IDWriteLocalizedStrings_Release(strings);
IDWriteFontFace3_Release(fontface3); @@ -4201,7 +4201,7 @@ static void test_GetInformationalStrings(void) IDWriteFontFamily_Release(family); IDWriteFontCollection_Release(collection); ref = IDWriteFactory_Release(factory); - ok(ref == 0, "factory not released, %u\n", ref); + ok(ref == 0, "factory not released, %lu\n", ref); }
static void test_GetGdiInterop(void) @@ -4217,21 +4217,21 @@ static void test_GetGdiInterop(void)
interop = NULL; hr = IDWriteFactory_GetGdiInterop(factory, &interop); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
interop2 = NULL; hr = IDWriteFactory_GetGdiInterop(factory, &interop2); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(interop == interop2, "got %p, %p\n", interop, interop2); IDWriteGdiInterop_Release(interop2);
hr = DWriteCreateFactory(DWRITE_FACTORY_TYPE_ISOLATED, &IID_IDWriteFactory, (IUnknown**)&factory2); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
/* each factory gets its own interop */ interop2 = NULL; hr = IDWriteFactory_GetGdiInterop(factory2, &interop2); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(interop != interop2, "got %p, %p\n", interop, interop2);
/* release factory - interop still works */ @@ -4245,13 +4245,13 @@ static void test_GetGdiInterop(void) lstrcpyW(logfont.lfFaceName, L"Tahoma");
hr = IDWriteGdiInterop_CreateFontFromLOGFONT(interop2, &logfont, &font); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); IDWriteFont_Release(font);
IDWriteGdiInterop_Release(interop2); IDWriteGdiInterop_Release(interop); ref = IDWriteFactory_Release(factory); - ok(ref == 0, "factory not released, %u\n", ref); + ok(ref == 0, "factory not released, %lu\n", ref); }
static void *map_font_file(const WCHAR *filename, DWORD *file_size) @@ -4320,17 +4320,17 @@ static void test_CreateFontFaceFromHdc(void)
interop = NULL; hr = IDWriteFactory_GetGdiInterop(factory, &interop); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
/* Invalid HDC. */ fontface = (void*)0xdeadbeef; hr = IDWriteGdiInterop_CreateFontFaceFromHdc(interop, NULL, &fontface); - ok(hr == E_INVALIDARG, "got 0x%08x\n", hr); + ok(hr == E_INVALIDARG, "got 0x%08lx\n", hr); ok(fontface == NULL, "got %p\n", fontface);
fontface = (void *)0xdeadbeef; hr = IDWriteGdiInterop_CreateFontFaceFromHdc(interop, (HDC)0xdeadbeef, &fontface); - ok(hr == E_FAIL, "got 0x%08x\n", hr); + ok(hr == E_FAIL, "got 0x%08lx\n", hr); ok(fontface == NULL, "got %p\n", fontface);
memset(&logfont, 0, sizeof(logfont)); @@ -4346,17 +4346,17 @@ static void test_CreateFontFaceFromHdc(void)
fontface = NULL; hr = IDWriteGdiInterop_CreateFontFaceFromHdc(interop, hdc, &fontface); - ok(hr == S_OK, "Failed to create font face, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create font face, hr %#lx.\n", hr);
count = 1; hr = IDWriteFontFace_GetFiles(fontface, &count, &file); - ok(hr == S_OK, "Failed to get font files, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get font files, hr %#lx.\n", hr);
hr = IDWriteFontFile_GetLoader(file, &loader); - ok(hr == S_OK, "Failed to get file loader, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get file loader, hr %#lx.\n", hr);
hr = IDWriteFontFileLoader_QueryInterface(loader, &IID_IDWriteLocalFontFileLoader, (void **)&unk); - ok(hr == S_OK || broken(hr == E_NOINTERFACE) /* Vista */, "Expected local loader, hr %#x.\n", hr); + ok(hr == S_OK || broken(hr == E_NOINTERFACE) /* Vista */, "Expected local loader, hr %#lx.\n", hr); if (unk) IUnknown_Release(unk);
@@ -4376,7 +4376,7 @@ static void test_CreateFontFaceFromHdc(void)
fontface = (void *)0xdeadbeef; hr = IDWriteGdiInterop_CreateFontFaceFromHdc(interop, hdc, &fontface); - ok(hr == DWRITE_E_FILEFORMAT || broken(hr == E_FAIL) /* Vista */, "got 0x%08x\n", hr); + ok(hr == DWRITE_E_FILEFORMAT || broken(hr == E_FAIL) /* Vista */, "got 0x%08lx\n", hr); ok(fontface == NULL, "got %p\n", fontface);
DeleteObject(SelectObject(hdc, oldhfont)); @@ -4389,7 +4389,7 @@ static void test_CreateFontFaceFromHdc(void)
num_fonts = 0; resource = AddFontMemResourceEx(font_data, data_size, NULL, &num_fonts); - ok(resource != NULL, "Failed to add memory resource font, %d.\n", GetLastError()); + ok(resource != NULL, "Failed to add memory resource font, %ld.\n", GetLastError()); ok(num_fonts == 1, "Unexpected number of fonts.\n");
memset(&lf, 0, sizeof(lf)); @@ -4401,27 +4401,27 @@ static void test_CreateFontFaceFromHdc(void) oldhfont = SelectObject(hdc, hfont);
hr = IDWriteGdiInterop_CreateFontFaceFromHdc(interop, hdc, &fontface); - ok(hr == S_OK, "Failed to create fontface, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create fontface, hr %#lx.\n", hr);
count = 1; hr = IDWriteFontFace_GetFiles(fontface, &count, &file); - ok(hr == S_OK, "Failed to get font files, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get font files, hr %#lx.\n", hr);
hr = IDWriteFontFile_GetLoader(file, &loader); - ok(hr == S_OK, "Failed to get file loader, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get file loader, hr %#lx.\n", hr);
hr = IDWriteFactory_RegisterFontFileLoader(factory, loader); - ok(hr == DWRITE_E_ALREADYREGISTERED, "Unexpected hr %#x.\n", hr); + ok(hr == DWRITE_E_ALREADYREGISTERED, "Unexpected hr %#lx.\n", hr);
hr = IDWriteFontFileLoader_QueryInterface(loader, &IID_IDWriteInMemoryFontFileLoader, (void **)&unk); - ok(hr == E_NOINTERFACE, "Unexpected hr %#x.\n", hr); + ok(hr == E_NOINTERFACE, "Unexpected hr %#lx.\n", hr);
hr = IDWriteFontFileLoader_QueryInterface(loader, &IID_IDWriteLocalFontFileLoader, (void **)&unk); - ok(hr == E_NOINTERFACE, "Unexpected hr %#x.\n", hr); + ok(hr == E_NOINTERFACE, "Unexpected hr %#lx.\n", hr);
count = 0; hr = IDWriteFontFile_GetReferenceKey(file, &refkey, &count); - ok(hr == S_OK, "Failed to get ref key, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get ref key, hr %#lx.\n", hr); ok(count > 0, "Unexpected key length %u.\n", count);
if (pGetFontRealizationInfo) @@ -4436,43 +4436,43 @@ static void test_CreateFontFaceFromHdc(void) win_skip("GetFontRealizationInfo() is not available.\n");
hr = IDWriteFontFileLoader_CreateStreamFromKey(loader, refkey, count, &stream); - ok(hr == S_OK, "Failed to create file stream, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create file stream, hr %#lx.\n", hr);
hr = IDWriteFontFileLoader_CreateStreamFromKey(loader, refkey, count, &stream2); - ok(hr == S_OK, "Failed to create file stream, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create file stream, hr %#lx.\n", hr); ok(stream2 != stream, "Unexpected stream instance.\n"); IDWriteFontFileStream_Release(stream2);
dummy = 1; hr = IDWriteFontFileLoader_CreateStreamFromKey(loader, &dummy, count, &stream2); - ok(hr == S_OK, "Failed to create file stream, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create file stream, hr %#lx.\n", hr);
writetime = 1; hr = IDWriteFontFileStream_GetLastWriteTime(stream2, &writetime); - ok(hr == E_NOTIMPL, "Unexpected hr %#x.\n", hr); + ok(hr == E_NOTIMPL, "Unexpected hr %#lx.\n", hr); ok(writetime == 1, "Unexpected write time.\n");
IDWriteFontFileStream_Release(stream2);
hr = IDWriteFontFileStream_GetFileSize(stream, &size); - ok(hr == S_OK, "Failed to get stream size, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get stream size, hr %#lx.\n", hr); ok(size == data_size, "Unexpected stream size.\n");
hr = IDWriteFontFileStream_GetLastWriteTime(stream, &writetime); - ok(hr == E_NOTIMPL, "Unexpected hr %#x.\n", hr); + ok(hr == E_NOTIMPL, "Unexpected hr %#lx.\n", hr);
fragment_context = NULL; hr = IDWriteFontFileStream_ReadFileFragment(stream, &fragment, 0, size, &fragment_context); - ok(hr == S_OK, "Failed to read fragment, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to read fragment, hr %#lx.\n", hr); ok(fragment_context != NULL, "Unexpected context %p.\n", fragment_context); ok(fragment == fragment_context, "Unexpected data pointer %p, context %p.\n", fragment, fragment_context); IDWriteFontFileStream_ReleaseFileFragment(stream, fragment_context);
hr = IDWriteFontFileStream_ReadFileFragment(stream, &fragment, 0, size + 1, &fragment_context); - ok(FAILED(hr), "Unexpected hr %#x.\n", hr); + ok(FAILED(hr), "Unexpected hr %#lx.\n", hr);
hr = IDWriteFontFileStream_ReadFileFragment(stream, &fragment, size - 1, size / 2, &fragment_context); - ok(FAILED(hr), "Unexpected hr %#x.\n", hr); + ok(FAILED(hr), "Unexpected hr %#lx.\n", hr);
IDWriteFontFileStream_Release(stream);
@@ -4482,7 +4482,7 @@ static void test_CreateFontFaceFromHdc(void) IDWriteFontFace_Release(fontface);
ret = RemoveFontMemResourceEx(resource); - ok(ret, "Failed to remove memory resource font, %d.\n", GetLastError()); + ok(ret, "Failed to remove memory resource font, %ld.\n", GetLastError());
UnmapViewOfFile(font_data);
@@ -4492,7 +4492,7 @@ static void test_CreateFontFaceFromHdc(void) DeleteDC(hdc); IDWriteGdiInterop_Release(interop); ref = IDWriteFactory_Release(factory); - ok(ref == 0, "factory not released, %u\n", ref); + ok(ref == 0, "factory not released, %lu\n", ref); }
static void test_GetSimulations(void) @@ -4509,7 +4509,7 @@ static void test_GetSimulations(void) factory = create_factory();
hr = IDWriteFactory_GetGdiInterop(factory, &interop); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
memset(&logfont, 0, sizeof(logfont)); logfont.lfHeight = 12; @@ -4519,12 +4519,12 @@ static void test_GetSimulations(void) lstrcpyW(logfont.lfFaceName, L"Tahoma");
hr = IDWriteGdiInterop_CreateFontFromLOGFONT(interop, &logfont, &font); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
simulations = IDWriteFont_GetSimulations(font); ok(simulations == DWRITE_FONT_SIMULATIONS_OBLIQUE, "got %d\n", simulations); hr = IDWriteFont_CreateFontFace(font, &fontface); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); simulations = IDWriteFontFace_GetSimulations(fontface); ok(simulations == DWRITE_FONT_SIMULATIONS_OBLIQUE, "got %d\n", simulations); IDWriteFontFace_Release(fontface); @@ -4538,12 +4538,12 @@ static void test_GetSimulations(void) lstrcpyW(logfont.lfFaceName, L"Tahoma");
hr = IDWriteGdiInterop_CreateFontFromLOGFONT(interop, &logfont, &font); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
simulations = IDWriteFont_GetSimulations(font); ok(simulations == DWRITE_FONT_SIMULATIONS_NONE, "got %d\n", simulations); hr = IDWriteFont_CreateFontFace(font, &fontface); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); simulations = IDWriteFontFace_GetSimulations(fontface); ok(simulations == DWRITE_FONT_SIMULATIONS_NONE, "got %d\n", simulations); IDWriteFontFace_Release(fontface); @@ -4551,7 +4551,7 @@ static void test_GetSimulations(void)
IDWriteGdiInterop_Release(interop); ref = IDWriteFactory_Release(factory); - ok(ref == 0, "factory not released, %u\n", ref); + ok(ref == 0, "factory not released, %lu\n", ref); }
static void test_GetFaceNames(void) @@ -4572,7 +4572,7 @@ static void test_GetFaceNames(void) factory = create_factory();
hr = IDWriteFactory_GetGdiInterop(factory, &interop); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
memset(&logfont, 0, sizeof(logfont)); logfont.lfHeight = 12; @@ -4582,13 +4582,13 @@ static void test_GetFaceNames(void) lstrcpyW(logfont.lfFaceName, L"Tahoma");
hr = IDWriteGdiInterop_CreateFontFromLOGFONT(interop, &logfont, &font); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
hr = IDWriteFont_GetFaceNames(font, &strings); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
hr = IDWriteFont_GetFaceNames(font, &strings2); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(strings != strings2, "got %p, %p\n", strings2, strings); IDWriteLocalizedStrings_Release(strings2);
@@ -4598,42 +4598,42 @@ static void test_GetFaceNames(void) index = 1; exists = FALSE; hr = IDWriteLocalizedStrings_FindLocaleName(strings, L"en-Us", &index, &exists); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); ok(index == 0 && exists, "got %d, %d\n", index, exists);
count = 0; hr = IDWriteLocalizedStrings_GetLocaleNameLength(strings, 1, &count); - ok(hr == E_FAIL, "got 0x%08x\n", hr); + ok(hr == E_FAIL, "got 0x%08lx\n", hr); ok(count == ~0, "got %d\n", count);
/* for simulated faces names are also simulated */ buffW[0] = 0; hr = IDWriteLocalizedStrings_GetLocaleName(strings, 0, buffW, ARRAY_SIZE(buffW)); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(!lstrcmpW(buffW, L"en-us"), "Unexpected locale name %s.\n", wine_dbgstr_w(buffW));
buffW[0] = 0; hr = IDWriteLocalizedStrings_GetString(strings, 0, buffW, ARRAY_SIZE(buffW)); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(!lstrcmpW(buffW, L"Oblique"), "got %s\n", wine_dbgstr_w(buffW)); IDWriteLocalizedStrings_Release(strings);
hr = IDWriteFont_CreateFontFace(font, &fontface); - ok(hr == S_OK, "Failed to create a font face, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create a font face, hr %#lx.\n", hr);
if (SUCCEEDED(IDWriteFontFace_QueryInterface(fontface, &IID_IDWriteFontFace3, (void **)&fontface3))) { hr = IDWriteFontFace3_GetFaceNames(fontface3, &strings2); - ok(hr == S_OK, "Failed to get face names, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get face names, hr %#lx.\n", hr);
hr = IDWriteFontFace3_GetFaceNames(fontface3, &strings3); - ok(hr == S_OK, "Failed to get face names, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get face names, hr %#lx.\n", hr); ok(strings2 != strings3, "Unexpected instance.\n"); IDWriteLocalizedStrings_Release(strings3);
buffW[0] = 0; hr = IDWriteLocalizedStrings_GetString(strings2, 0, buffW, ARRAY_SIZE(buffW)); - ok(hr == S_OK, "Failed to get a string, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get a string, hr %#lx.\n", hr); ok(!lstrcmpW(buffW, L"Oblique"), "Unexpected name %s.\n", wine_dbgstr_w(buffW)); IDWriteLocalizedStrings_Release(strings2);
@@ -4647,7 +4647,7 @@ static void test_GetFaceNames(void) IDWriteFont_Release(font); IDWriteGdiInterop_Release(interop); ref = IDWriteFactory_Release(factory); - ok(ref == 0, "factory not released, %u\n", ref); + ok(ref == 0, "factory not released, %lu\n", ref); }
struct local_refkey @@ -4679,12 +4679,12 @@ static void test_TryGetFontTable(void) factory = create_factory();
hr = IDWriteFactory_CreateFontFileReference(factory, path, NULL, &file); - ok(hr == S_OK, "got 0x%08x\n",hr); + ok(hr == S_OK, "got 0x%08lx\n",hr);
key = NULL; size = 0; hr = IDWriteFontFile_GetReferenceKey(file, (const void**)&key, &size); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(size != 0, "got %u\n", size);
ret = GetFileAttributesExW(path, GetFileExInfoStandard, &info); @@ -4692,27 +4692,27 @@ static void test_TryGetFontTable(void) ok(!memcmp(&info.ftLastWriteTime, &key->writetime, sizeof(key->writetime)), "got wrong write time\n");
hr = IDWriteFontFile_GetLoader(file, &loader); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); IDWriteFontFileLoader_QueryInterface(loader, &IID_IDWriteLocalFontFileLoader, (void**)&localloader); IDWriteFontFileLoader_Release(loader);
hr = IDWriteLocalFontFileLoader_GetFilePathLengthFromKey(localloader, key, size, &len); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(lstrlenW(key->name) == len, "path length %d\n", len);
hr = IDWriteLocalFontFileLoader_GetFilePathFromKey(localloader, key, size, buffW, ARRAY_SIZE(buffW)); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(!lstrcmpW(buffW, key->name), "got %s, expected %s\n", wine_dbgstr_w(buffW), wine_dbgstr_w(key->name)); IDWriteLocalFontFileLoader_Release(localloader);
hr = IDWriteFactory_CreateFontFace(factory, DWRITE_FONT_FACE_TYPE_TRUETYPE, 1, &file, 0, 0, &fontface); - ok(hr == S_OK, "got 0x%08x\n",hr); + ok(hr == S_OK, "got 0x%08lx\n",hr);
exists = FALSE; context = (void*)0xdeadbeef; table = NULL; hr = IDWriteFontFace_TryGetFontTable(fontface, MS_CMAP_TAG, &table, &size, &context, &exists); - ok(hr == S_OK, "got 0x%08x\n",hr); + ok(hr == S_OK, "got 0x%08lx\n",hr); ok(exists == TRUE, "got %d\n", exists); ok(context == NULL && table != NULL, "cmap: context %p, table %p\n", context, table);
@@ -4720,7 +4720,7 @@ static void test_TryGetFontTable(void) context2 = (void*)0xdeadbeef; table2 = NULL; hr = IDWriteFontFace_TryGetFontTable(fontface, MS_CMAP_TAG, &table2, &size, &context2, &exists); - ok(hr == S_OK, "got 0x%08x\n",hr); + ok(hr == S_OK, "got 0x%08lx\n",hr); ok(exists == TRUE, "got %d\n", exists); ok(context2 == context && table2 == table, "cmap: context2 %p, table2 %p\n", context2, table2);
@@ -4732,14 +4732,14 @@ static void test_TryGetFontTable(void) context = (void*)0xdeadbeef; table = (void*)0xdeadbeef; hr = IDWriteFontFace_TryGetFontTable(fontface, 0xabababab, &table, &size, &context, &exists); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(exists == FALSE, "got %d\n", exists); ok(context == NULL && table == NULL, "got context %p, table pointer %p\n", context, table);
IDWriteFontFace_Release(fontface); IDWriteFontFile_Release(file); ref = IDWriteFactory_Release(factory); - ok(ref == 0, "factory not released, %u\n", ref); + ok(ref == 0, "factory not released, %lu\n", ref); DELETE_FONTFILE(path); }
@@ -4761,17 +4761,17 @@ static void test_ConvertFontToLOGFONT(void)
interop = NULL; hr = IDWriteFactory_GetGdiInterop(factory, &interop); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
hr = IDWriteFactory_GetSystemFontCollection(factory2, &collection, FALSE); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
hr = IDWriteFontCollection_GetFontFamily(collection, 0, &family); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
hr = IDWriteFontFamily_GetFirstMatchingFont(family, DWRITE_FONT_WEIGHT_NORMAL, DWRITE_FONT_STRETCH_NORMAL, DWRITE_FONT_STYLE_NORMAL, &font); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
if (0) { /* crashes on native */ IDWriteGdiInterop_ConvertFontToLOGFONT(interop, NULL, NULL, NULL); @@ -4782,7 +4782,7 @@ if (0) { /* crashes on native */ memset(&logfont, 0xcc, sizeof(logfont)); system = TRUE; hr = IDWriteGdiInterop_ConvertFontToLOGFONT(interop, NULL, &logfont, &system); - ok(hr == E_INVALIDARG, "got 0x%08x\n", hr); + ok(hr == E_INVALIDARG, "got 0x%08lx\n", hr); ok(!system, "got %d\n", system); ok(logfont.lfFaceName[0] == 0, "got face name %s\n", wine_dbgstr_w(logfont.lfFaceName));
@@ -4797,10 +4797,10 @@ if (0) { /* crashes on native */ LOGFONTW lf;
hr = IDWriteFontCollection_GetFontFamily(collection, i, &family); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
hr = IDWriteFontFamily_GetFamilyNames(family, &names); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
get_enus_string(names, familynameW, ARRAY_SIZE(familynameW)); IDWriteLocalizedStrings_Release(names); @@ -4813,10 +4813,10 @@ if (0) { /* crashes on native */ BOOL has_variations;
hr = IDWriteFontFamily_GetFont(family, j, &font); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
hr = IDWriteFont_GetFaceNames(font, &names); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
get_enus_string(names, facenameW, ARRAY_SIZE(facenameW)); IDWriteLocalizedStrings_Release(names); @@ -4826,7 +4826,7 @@ if (0) { /* crashes on native */ lstrcatW(nameW, facenameW);
hr = IDWriteFont_CreateFontFace(font, &fontface); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
has_variations = has_face_variations(fontface); IDWriteFontFace_Release(fontface); @@ -4843,7 +4843,7 @@ if (0) { /* crashes on native */ system = FALSE; memset(&logfont, 0xcc, sizeof(logfont)); hr = IDWriteGdiInterop_ConvertFontToLOGFONT(interop, font, &logfont, &system); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(system, "got %d\n", system);
sim = IDWriteFont_GetSimulations(font); @@ -4851,7 +4851,7 @@ if (0) { /* crashes on native */ winetest_push_context("Font %s", wine_dbgstr_w(nameW));
get_logfont_from_font(font, &lf); - ok(logfont.lfWeight == lf.lfWeight, "Unexpected lfWeight %d, expected lfWeight %d, font weight %d, " + ok(logfont.lfWeight == lf.lfWeight, "Unexpected lfWeight %ld, expected lfWeight %ld, font weight %d, " "bold simulation %s.\n", logfont.lfWeight, lf.lfWeight, IDWriteFont_GetWeight(font), sim & DWRITE_FONT_SIMULATIONS_BOLD ? "yes" : "no"); ok(logfont.lfItalic == lf.lfItalic, "Unexpected italic flag %d, oblique simulation %s.\n", @@ -4879,7 +4879,7 @@ if (0) { /* crashes on native */ IDWriteFont_Release(font); IDWriteGdiInterop_Release(interop); ref = IDWriteFactory_Release(factory); - ok(ref == 0, "factory not released, %u\n", ref); + ok(ref == 0, "factory not released, %lu\n", ref); }
static void test_CreateStreamFromKey(void) @@ -4901,25 +4901,25 @@ static void test_CreateStreamFromKey(void) path = create_testfontfile(test_fontfile);
hr = IDWriteFactory_CreateFontFileReference(factory, path, NULL, &file); - ok(hr == S_OK, "got 0x%08x\n",hr); + ok(hr == S_OK, "got 0x%08lx\n",hr);
key = NULL; size = 0; hr = IDWriteFontFile_GetReferenceKey(file, (const void**)&key, &size); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(size != 0, "got %u\n", size);
hr = IDWriteFontFile_GetLoader(file, &loader); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); IDWriteFontFileLoader_QueryInterface(loader, &IID_IDWriteLocalFontFileLoader, (void**)&localloader); IDWriteFontFileLoader_Release(loader);
hr = IDWriteLocalFontFileLoader_CreateStreamFromKey(localloader, key, size, &stream); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); EXPECT_REF(stream, 1);
hr = IDWriteLocalFontFileLoader_CreateStreamFromKey(localloader, key, size, &stream2); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(stream == stream2 || broken(stream != stream2) /* Win7 SP0 */, "got %p, %p\n", stream, stream2); if (stream == stream2) EXPECT_REF(stream, 2); @@ -4927,12 +4927,12 @@ static void test_CreateStreamFromKey(void) IDWriteFontFileStream_Release(stream2);
hr = IDWriteLocalFontFileLoader_CreateStreamFromKey(localloader, key, size, &stream); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); EXPECT_REF(stream, 1);
writetime = 0; hr = IDWriteFontFileStream_GetLastWriteTime(stream, &writetime); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(writetime != 0, "got %s\n", wine_dbgstr_longlong(writetime));
IDWriteFontFileStream_Release(stream); @@ -4940,7 +4940,7 @@ static void test_CreateStreamFromKey(void)
IDWriteLocalFontFileLoader_Release(localloader); ref = IDWriteFactory_Release(factory); - ok(ref == 0, "factory not released, %u\n", ref); + ok(ref == 0, "factory not released, %lu\n", ref); DELETE_FONTFILE(path); }
@@ -4964,44 +4964,44 @@ static void test_ReadFileFragment(void) path = create_testfontfile(test_fontfile);
hr = IDWriteFactory_CreateFontFileReference(factory, path, NULL, &file); - ok(hr == S_OK, "got 0x%08x\n",hr); + ok(hr == S_OK, "got 0x%08lx\n",hr);
key = NULL; size = 0; hr = IDWriteFontFile_GetReferenceKey(file, (const void**)&key, &size); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(size != 0, "got %u\n", size);
hr = IDWriteFontFile_GetLoader(file, &loader); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); IDWriteFontFileLoader_QueryInterface(loader, &IID_IDWriteLocalFontFileLoader, (void**)&localloader); IDWriteFontFileLoader_Release(loader);
hr = IDWriteLocalFontFileLoader_CreateStreamFromKey(localloader, key, size, &stream); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
hr = IDWriteFontFileStream_GetFileSize(stream, &filesize); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
/* reading past the end of the stream */ fragment = (void*)0xdeadbeef; context = (void*)0xdeadbeef; hr = IDWriteFontFileStream_ReadFileFragment(stream, &fragment, 0, filesize+1, &context); - ok(hr == E_FAIL, "got 0x%08x\n", hr); + ok(hr == E_FAIL, "got 0x%08lx\n", hr); ok(context == NULL, "got %p\n", context); ok(fragment == NULL, "got %p\n", fragment);
fragment = (void*)0xdeadbeef; context = (void*)0xdeadbeef; hr = IDWriteFontFileStream_ReadFileFragment(stream, &fragment, 0, filesize, &context); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(context == NULL, "got %p\n", context); ok(fragment != NULL, "got %p\n", fragment);
fragment2 = (void*)0xdeadbeef; context2 = (void*)0xdeadbeef; hr = IDWriteFontFileStream_ReadFileFragment(stream, &fragment2, 0, filesize, &context2); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(context2 == NULL, "got %p\n", context2); ok(fragment == fragment2, "got %p, %p\n", fragment, fragment2);
@@ -5012,7 +5012,7 @@ static void test_ReadFileFragment(void) fragment = (void*)0xdeadbeef; context = (void*)0xdeadbeef; hr = IDWriteFontFileStream_ReadFileFragment(stream, &fragment, 0, filesize, &context); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(context == NULL, "got %p\n", context); ok(fragment == fragment2, "got %p, %p\n", fragment, fragment2); IDWriteFontFileStream_ReleaseFileFragment(stream, context); @@ -5021,7 +5021,7 @@ static void test_ReadFileFragment(void) IDWriteFontFileStream_Release(stream); IDWriteLocalFontFileLoader_Release(localloader); ref = IDWriteFactory_Release(factory); - ok(ref == 0, "factory not released, %u\n", ref); + ok(ref == 0, "factory not released, %lu\n", ref); DELETE_FONTFILE(path); }
@@ -5042,39 +5042,39 @@ static void test_GetDesignGlyphMetrics(void) path = create_testfontfile(test_fontfile);
hr = IDWriteFactory_CreateFontFileReference(factory, path, NULL, &file); - ok(hr == S_OK, "got 0x%08x\n",hr); + ok(hr == S_OK, "got 0x%08lx\n",hr);
hr = IDWriteFactory_CreateFontFace(factory, DWRITE_FONT_FACE_TYPE_TRUETYPE, 1, &file, 0, DWRITE_FONT_SIMULATIONS_NONE, &fontface); - ok(hr == S_OK, "got 0x%08x\n",hr); + ok(hr == S_OK, "got 0x%08lx\n",hr); IDWriteFontFile_Release(file);
codepoint = 'A'; indices[0] = 0; hr = IDWriteFontFace_GetGlyphIndices(fontface, &codepoint, 1, &indices[0]); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(indices[0] > 0, "got %u\n", indices[0]);
hr = IDWriteFontFace_GetDesignGlyphMetrics(fontface, NULL, 0, metrics, FALSE); - ok(hr == E_INVALIDARG, "got 0x%08x\n",hr); + ok(hr == E_INVALIDARG, "got 0x%08lx\n",hr);
hr = IDWriteFontFace_GetDesignGlyphMetrics(fontface, NULL, 1, metrics, FALSE); - ok(hr == E_INVALIDARG, "got 0x%08x\n",hr); + ok(hr == E_INVALIDARG, "got 0x%08lx\n",hr);
hr = IDWriteFontFace_GetDesignGlyphMetrics(fontface, indices, 0, metrics, FALSE); - ok(hr == S_OK, "got 0x%08x\n",hr); + ok(hr == S_OK, "got 0x%08lx\n",hr);
/* missing glyphs are ignored */ indices[1] = 1; memset(metrics, 0xcc, sizeof(metrics)); hr = IDWriteFontFace_GetDesignGlyphMetrics(fontface, indices, 2, metrics, FALSE); - ok(hr == S_OK, "got 0x%08x\n",hr); + ok(hr == S_OK, "got 0x%08lx\n",hr); ok(metrics[0].advanceWidth == 1000, "got %d\n", metrics[0].advanceWidth); ok(metrics[1].advanceWidth == 0, "got %d\n", metrics[1].advanceWidth);
IDWriteFontFace_Release(fontface); ref = IDWriteFactory_Release(factory); - ok(ref == 0, "factory not released, %u\n", ref); + ok(ref == 0, "factory not released, %lu\n", ref); DELETE_FONTFILE(path); }
@@ -5088,7 +5088,7 @@ static BOOL get_expected_is_monospaced(IDWriteFontFace1 *fontface, const DWRITE_
hr = IDWriteFontFace1_TryGetFontTable(fontface, MS_POST_TAG, (const void **)&tt_post, &size, &post_context, &exists); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
if (tt_post) { @@ -5119,7 +5119,7 @@ static void test_IsMonospacedFont(void) }
hr = IDWriteFactory1_GetSystemFontCollection(factory, &collection, FALSE); - ok(hr == S_OK, "Failed to get font collection, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get font collection, hr %#lx.\n", hr);
count = IDWriteFontCollection_GetFontFamilyCount(collection); for (i = 0; i < count; ++i) @@ -5130,10 +5130,10 @@ static void test_IsMonospacedFont(void) WCHAR nameW[256];
hr = IDWriteFontCollection_GetFontFamily(collection, i, &family); - ok(hr == S_OK, "Failed to get family, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get family, hr %#lx.\n", hr);
hr = IDWriteFontFamily_GetFamilyNames(family, &names); - ok(hr == S_OK, "Failed to get names, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get names, hr %#lx.\n", hr); get_enus_string(names, nameW, ARRAY_SIZE(nameW)); IDWriteLocalizedStrings_Release(names);
@@ -5149,17 +5149,17 @@ static void test_IsMonospacedFont(void) IDWriteFont *font;
hr = IDWriteFontFamily_GetFont(family, j, &font); - ok(hr == S_OK, "Failed to get font, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get font, hr %#lx.\n", hr);
hr = IDWriteFont_QueryInterface(font, &IID_IDWriteFont1, (void **)&font1); - ok(hr == S_OK, "Failed to get interface, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get interface, hr %#lx.\n", hr); IDWriteFont_Release(font);
hr = IDWriteFont1_CreateFontFace(font1, &fontface); - ok(hr == S_OK, "Failed to create fontface, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create fontface, hr %#lx.\n", hr);
hr = IDWriteFontFace_QueryInterface(fontface, &IID_IDWriteFontFace1, (void **)&fontface1); - ok(hr == S_OK, "Failed to get interface, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get interface, hr %#lx.\n", hr); IDWriteFontFace_Release(fontface);
is_monospaced_font = IDWriteFont1_IsMonospacedFont(font1); @@ -5181,7 +5181,7 @@ static void test_IsMonospacedFont(void)
IDWriteFontCollection_Release(collection); ref = IDWriteFactory1_Release(factory); - ok(ref == 0, "factory not released, %u\n", ref); + ok(ref == 0, "factory not released, %lu\n", ref); }
static void test_GetDesignGlyphAdvances(void) @@ -5199,11 +5199,11 @@ static void test_GetDesignGlyphAdvances(void) path = create_testfontfile(test_fontfile);
hr = IDWriteFactory_CreateFontFileReference(factory, path, NULL, &file); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
hr = IDWriteFactory_CreateFontFace(factory, DWRITE_FONT_FACE_TYPE_TRUETYPE, 1, &file, 0, DWRITE_FONT_SIMULATIONS_NONE, &fontface); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); IDWriteFontFile_Release(file);
hr = IDWriteFontFace_QueryInterface(fontface, &IID_IDWriteFontFace1, (void**)&fontface1); @@ -5215,17 +5215,17 @@ static void test_GetDesignGlyphAdvances(void) codepoint = 'A'; index = 0; hr = IDWriteFontFace1_GetGlyphIndices(fontface1, &codepoint, 1, &index); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(index > 0, "got %u\n", index);
advance = 0; hr = IDWriteFontFace1_GetDesignGlyphAdvances(fontface1, 1, &index, &advance, FALSE); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(advance == 1000, "got %i\n", advance);
advance = 0; hr = IDWriteFontFace1_GetDesignGlyphAdvances(fontface1, 1, &index, &advance, TRUE); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); todo_wine ok(advance == 2048, "got %i\n", advance);
@@ -5236,7 +5236,7 @@ static void test_GetDesignGlyphAdvances(void)
IDWriteFontFace_Release(fontface); ref = IDWriteFactory_Release(factory); - ok(ref == 0, "factory not released, %u\n", ref); + ok(ref == 0, "factory not released, %lu\n", ref); DELETE_FONTFILE(path); }
@@ -5257,24 +5257,24 @@ static void test_GetGlyphRunOutline(void) factory = create_factory();
hr = IDWriteFactory_CreateFontFileReference(factory, path, NULL, &file); - ok(hr == S_OK, "got 0x%08x\n",hr); + ok(hr == S_OK, "got 0x%08lx\n",hr);
hr = IDWriteFactory_CreateFontFace(factory, DWRITE_FONT_FACE_TYPE_TRUETYPE, 1, &file, 0, DWRITE_FONT_SIMULATIONS_NONE, &face); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); IDWriteFontFile_Release(file);
codepoint = 'A'; glyphs[0] = 0; hr = IDWriteFontFace_GetGlyphIndices(face, &codepoint, 1, glyphs); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(glyphs[0] > 0, "got %u\n", glyphs[0]); glyphs[1] = glyphs[0];
hr = IDWriteFontFace_GetGlyphRunOutline(face, 2048.0, glyphs, advances, offsets, 1, FALSE, FALSE, NULL); - ok(hr == E_INVALIDARG, "got 0x%08x\n", hr); + ok(hr == E_INVALIDARG, "got 0x%08lx\n", hr);
hr = IDWriteFontFace_GetGlyphRunOutline(face, 2048.0, NULL, NULL, offsets, 1, FALSE, FALSE, &test_geomsink); - ok(hr == E_INVALIDARG, "got 0x%08x\n", hr); + ok(hr == E_INVALIDARG, "got 0x%08lx\n", hr);
advances[0] = 1.0; advances[1] = 0.0; @@ -5289,7 +5289,7 @@ static void test_GetGlyphRunOutline(void) g_startpoint_count = 0; SET_EXPECT(setfillmode); hr = IDWriteFontFace_GetGlyphRunOutline(face, 1024.0, glyphs, NULL, NULL, 2, FALSE, FALSE, &test_geomsink); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(g_startpoint_count == 2, "got %d\n", g_startpoint_count); if (g_startpoint_count == 2) { /* glyph advance of 500 is applied */ @@ -5303,7 +5303,7 @@ static void test_GetGlyphRunOutline(void) g_startpoint_count = 0; SET_EXPECT(setfillmode); hr = IDWriteFontFace_GetGlyphRunOutline(face, 1024.0, glyphs, NULL, NULL, 2, FALSE, TRUE, &test_geomsink); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(g_startpoint_count == 2, "got %d\n", g_startpoint_count); if (g_startpoint_count == 2) { /* advance is -500 now */ @@ -5317,7 +5317,7 @@ static void test_GetGlyphRunOutline(void) g_startpoint_count = 0; SET_EXPECT(setfillmode); hr = IDWriteFontFace_GetGlyphRunOutline(face, 1024.0, glyphs, NULL, offsets, 2, FALSE, FALSE, &test_geomsink); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(g_startpoint_count == 2, "got %d\n", g_startpoint_count); if (g_startpoint_count == 2) { /* offsets applied to first contour */ @@ -5331,7 +5331,7 @@ static void test_GetGlyphRunOutline(void) g_startpoint_count = 0; SET_EXPECT(setfillmode); hr = IDWriteFontFace_GetGlyphRunOutline(face, 1024.0, glyphs, NULL, offsets, 2, FALSE, TRUE, &test_geomsink); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(g_startpoint_count == 2, "got %d\n", g_startpoint_count); if (g_startpoint_count == 2) { ok(g_startpoints[0].x == -271.5 && g_startpoints[0].y == -630.0, "0: got (%.2f,%.2f)\n", g_startpoints[0].x, g_startpoints[0].y); @@ -5344,7 +5344,7 @@ static void test_GetGlyphRunOutline(void) g_startpoint_count = 0; SET_EXPECT(setfillmode); hr = IDWriteFontFace_GetGlyphRunOutline(face, 1024.0, glyphs, advances, offsets, 2, FALSE, FALSE, &test_geomsink); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(g_startpoint_count == 2, "got %d\n", g_startpoint_count); if (g_startpoint_count == 2) { ok(g_startpoints[0].x == 230.5 && g_startpoints[0].y == -630.0, "0: got (%.2f,%.2f)\n", g_startpoints[0].x, g_startpoints[0].y); @@ -5354,18 +5354,18 @@ static void test_GetGlyphRunOutline(void)
/* 0 glyph count */ hr = IDWriteFontFace_GetGlyphRunOutline(face, 1024.0, glyphs, NULL, NULL, 0, FALSE, FALSE, &test_geomsink2); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
/* Glyph with open figure, single contour point. */ codepoint = 'B'; glyphs[0] = 0; hr = IDWriteFontFace_GetGlyphIndices(face, &codepoint, 1, glyphs); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(glyphs[0] > 0, "got %u\n", glyphs[0]);
SET_EXPECT(setfillmode); hr = IDWriteFontFace_GetGlyphRunOutline(face, 1024.0, glyphs, NULL, NULL, 1, FALSE, FALSE, &test_geomsink2); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); CHECK_CALLED(setfillmode);
IDWriteFactory_Release(factory); @@ -5379,17 +5379,17 @@ static void test_GetGlyphRunOutline(void) codepoint = ' '; glyphs[0] = 0; hr = IDWriteFontFace_GetGlyphIndices(face, &codepoint, 1, glyphs); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(glyphs[0] > 0, "got %u\n", glyphs[0]);
SET_EXPECT(setfillmode); hr = IDWriteFontFace_GetGlyphRunOutline(face, 1024.0, glyphs, NULL, NULL, 1, FALSE, FALSE, &test_geomsink2); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); CHECK_CALLED(setfillmode);
IDWriteFontFace_Release(face); ref = IDWriteFactory_Release(factory); - ok(ref == 0, "factory not released, %u\n", ref); + ok(ref == 0, "factory not released, %lu\n", ref); }
static void test_GetEudcFontCollection(void) @@ -5407,17 +5407,17 @@ static void test_GetEudcFontCollection(void)
EXPECT_REF(factory, 1); hr = IDWriteFactory1_GetEudcFontCollection(factory, &coll, FALSE); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); EXPECT_REF(factory, 2); hr = IDWriteFactory1_GetEudcFontCollection(factory, &coll2, FALSE); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); EXPECT_REF(factory, 2); ok(coll == coll2, "got %p, %p\n", coll, coll2); IDWriteFontCollection_Release(coll); IDWriteFontCollection_Release(coll2);
ref = IDWriteFactory1_Release(factory); - ok(ref == 0, "factory not released, %u\n", ref); + ok(ref == 0, "factory not released, %lu\n", ref); }
static void test_GetCaretMetrics(void) @@ -5437,10 +5437,10 @@ static void test_GetCaretMetrics(void) factory = create_factory();
hr = IDWriteFactory_CreateFontFileReference(factory, path, NULL, &file); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
hr = IDWriteFactory_CreateFontFace(factory, DWRITE_FONT_FACE_TYPE_TRUETYPE, 1, &file, 0, DWRITE_FONT_SIMULATIONS_NONE, &fontface); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); IDWriteFontFile_Release(file);
hr = IDWriteFontFace_QueryInterface(fontface, &IID_IDWriteFontFace1, (void**)&fontface1); @@ -5448,7 +5448,7 @@ static void test_GetCaretMetrics(void) if (hr != S_OK) { win_skip("GetCaretMetrics() is not supported.\n"); ref = IDWriteFactory_Release(factory); - ok(ref == 0, "factory not released, %u\n", ref); + ok(ref == 0, "factory not released, %lu\n", ref); DELETE_FONTFILE(path); return; } @@ -5465,10 +5465,10 @@ static void test_GetCaretMetrics(void) factory = create_factory(); font = get_tahoma_instance(factory, DWRITE_FONT_STYLE_NORMAL); hr = IDWriteFont_CreateFontFace(font, &fontface); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); IDWriteFont_Release(font); hr = IDWriteFontFace_QueryInterface(fontface, &IID_IDWriteFontFace1, (void**)&fontface1); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); IDWriteFontFace_Release(fontface);
memset(&caret, 0xcc, sizeof(caret)); @@ -5481,10 +5481,10 @@ static void test_GetCaretMetrics(void) /* simulated italic */ font = get_tahoma_instance(factory, DWRITE_FONT_STYLE_ITALIC); hr = IDWriteFont_CreateFontFace(font, &fontface); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); IDWriteFont_Release(font); hr = IDWriteFontFace_QueryInterface(fontface, &IID_IDWriteFontFace1, (void**)&fontface1); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); IDWriteFontFace_Release(fontface);
IDWriteFontFace1_GetMetrics(fontface1, &metrics); @@ -5497,7 +5497,7 @@ static void test_GetCaretMetrics(void) IDWriteFontFace1_Release(fontface1);
ref = IDWriteFactory_Release(factory); - ok(ref == 0, "factory not released, %u\n", ref); + ok(ref == 0, "factory not released, %lu\n", ref); DELETE_FONTFILE(path); }
@@ -5515,10 +5515,10 @@ static void test_GetGlyphCount(void) factory = create_factory();
hr = IDWriteFactory_CreateFontFileReference(factory, path, NULL, &file); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
hr = IDWriteFactory_CreateFontFace(factory, DWRITE_FONT_FACE_TYPE_TRUETYPE, 1, &file, 0, DWRITE_FONT_SIMULATIONS_NONE, &fontface); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); IDWriteFontFile_Release(file);
count = IDWriteFontFace_GetGlyphCount(fontface); @@ -5526,7 +5526,7 @@ static void test_GetGlyphCount(void)
IDWriteFontFace_Release(fontface); ref = IDWriteFactory_Release(factory); - ok(ref == 0, "factory not released, %u\n", ref); + ok(ref == 0, "factory not released, %lu\n", ref); DELETE_FONTFILE(path); }
@@ -5544,10 +5544,10 @@ static void test_GetKerningPairAdjustments(void) factory = create_factory();
hr = IDWriteFactory_CreateFontFileReference(factory, path, NULL, &file); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
hr = IDWriteFactory_CreateFontFace(factory, DWRITE_FONT_FACE_TYPE_TRUETYPE, 1, &file, 0, DWRITE_FONT_SIMULATIONS_NONE, &fontface); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); IDWriteFontFile_Release(file);
hr = IDWriteFontFace_QueryInterface(fontface, &IID_IDWriteFontFace1, (void**)&fontface1); @@ -5555,14 +5555,14 @@ static void test_GetKerningPairAdjustments(void) INT32 adjustments[1];
hr = IDWriteFontFace1_GetKerningPairAdjustments(fontface1, 0, NULL, NULL); - ok(hr == E_INVALIDARG || broken(hr == S_OK) /* win8 */, "got 0x%08x\n", hr); + ok(hr == E_INVALIDARG || broken(hr == S_OK) /* win8 */, "got 0x%08lx\n", hr);
if (0) /* crashes on native */ hr = IDWriteFontFace1_GetKerningPairAdjustments(fontface1, 1, NULL, NULL);
adjustments[0] = 1; hr = IDWriteFontFace1_GetKerningPairAdjustments(fontface1, 1, NULL, adjustments); - ok(hr == E_INVALIDARG, "got 0x%08x\n", hr); + ok(hr == E_INVALIDARG, "got 0x%08lx\n", hr); ok(adjustments[0] == 0, "got %d\n", adjustments[0]);
IDWriteFontFace1_Release(fontface1); @@ -5572,7 +5572,7 @@ static void test_GetKerningPairAdjustments(void)
IDWriteFontFace_Release(fontface); ref = IDWriteFactory_Release(factory); - ok(ref == 0, "factory not released, %u\n", ref); + ok(ref == 0, "factory not released, %lu\n", ref); DELETE_FONTFILE(path); }
@@ -5591,7 +5591,7 @@ static void test_CreateRenderingParams(void)
hr = IDWriteFactory_CreateCustomRenderingParams(factory, 1.0, 0.0, 0.0, DWRITE_PIXEL_GEOMETRY_FLAT, DWRITE_RENDERING_MODE_DEFAULT, ¶ms); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
hr = IDWriteRenderingParams_QueryInterface(params, &IID_IDWriteRenderingParams1, (void**)¶ms1); if (hr == S_OK) { @@ -5621,7 +5621,7 @@ static void test_CreateRenderingParams(void) IDWriteRenderingParams_Release(params);
hr = IDWriteFactory_CreateRenderingParams(factory, ¶ms); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
mode = IDWriteRenderingParams_GetRenderingMode(params); ok(mode == DWRITE_RENDERING_MODE_DEFAULT, "got %d\n", mode); @@ -5633,10 +5633,10 @@ static void test_CreateRenderingParams(void)
hr = IDWriteFactory3_CreateCustomRenderingParams(factory3, 1.0f, 0.0f, 0.0f, 1.0f, DWRITE_PIXEL_GEOMETRY_FLAT, DWRITE_RENDERING_MODE1_NATURAL_SYMMETRIC_DOWNSAMPLED, DWRITE_GRID_FIT_MODE_DEFAULT, ¶ms3); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
hr = IDWriteRenderingParams3_QueryInterface(params3, &IID_IDWriteRenderingParams, (void**)¶ms); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
mode = IDWriteRenderingParams_GetRenderingMode(params); ok(mode == DWRITE_RENDERING_MODE_NATURAL_SYMMETRIC, "got %d\n", mode); @@ -5649,7 +5649,7 @@ static void test_CreateRenderingParams(void) win_skip("IDWriteRenderingParams3 not supported.\n");
ref = IDWriteFactory_Release(factory); - ok(ref == 0, "factory not released, %u\n", ref); + ok(ref == 0, "factory not released, %lu\n", ref); }
static void test_CreateGlyphRunAnalysis(void) @@ -5689,11 +5689,11 @@ static void test_CreateGlyphRunAnalysis(void) ch = 'A'; glyph = 0; hr = IDWriteFontFace_GetGlyphIndices(face, &ch, 1, &glyph); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(glyph > 0, "got %u\n", glyph);
hr = IDWriteFontFace_GetDesignGlyphMetrics(face, &glyph, 1, &metrics, FALSE); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); advances[0] = metrics.advanceWidth;
offsets[0].advanceOffset = 0.0; @@ -5713,7 +5713,7 @@ static void test_CreateGlyphRunAnalysis(void) hr = IDWriteFactory_CreateGlyphRunAnalysis(factory, &run, 0.0, NULL, DWRITE_RENDERING_MODE_ALIASED, DWRITE_MEASURING_MODE_NATURAL, 0.0, 0.0, &analysis); - ok(hr == E_INVALIDARG, "got 0x%08x\n", hr); + ok(hr == E_INVALIDARG, "got 0x%08lx\n", hr); ok(analysis == NULL, "got %p\n", analysis);
/* negative ppdip */ @@ -5721,7 +5721,7 @@ static void test_CreateGlyphRunAnalysis(void) hr = IDWriteFactory_CreateGlyphRunAnalysis(factory, &run, -1.0, NULL, DWRITE_RENDERING_MODE_ALIASED, DWRITE_MEASURING_MODE_NATURAL, 0.0, 0.0, &analysis); - ok(hr == E_INVALIDARG, "got 0x%08x\n", hr); + ok(hr == E_INVALIDARG, "got 0x%08lx\n", hr); ok(analysis == NULL, "got %p\n", analysis);
/* default mode is not allowed */ @@ -5729,7 +5729,7 @@ static void test_CreateGlyphRunAnalysis(void) hr = IDWriteFactory_CreateGlyphRunAnalysis(factory, &run, 1.0, NULL, DWRITE_RENDERING_MODE_DEFAULT, DWRITE_MEASURING_MODE_NATURAL, 0.0, 0.0, &analysis); - ok(hr == E_INVALIDARG, "got 0x%08x\n", hr); + ok(hr == E_INVALIDARG, "got 0x%08lx\n", hr); ok(analysis == NULL, "got %p\n", analysis);
/* outline too */ @@ -5737,25 +5737,25 @@ static void test_CreateGlyphRunAnalysis(void) hr = IDWriteFactory_CreateGlyphRunAnalysis(factory, &run, 1.0, NULL, DWRITE_RENDERING_MODE_OUTLINE, DWRITE_MEASURING_MODE_NATURAL, 0.0, 0.0, &analysis); - ok(hr == E_INVALIDARG, "got 0x%08x\n", hr); + ok(hr == E_INVALIDARG, "got 0x%08lx\n", hr); ok(analysis == NULL, "got %p\n", analysis);
hr = IDWriteFactory_CreateGlyphRunAnalysis(factory, &run, 1.0, NULL, DWRITE_RENDERING_MODE_ALIASED, DWRITE_MEASURING_MODE_NATURAL, 0.0, 0.0, &analysis); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
/* invalid texture type */ memset(&rect, 0xcc, sizeof(rect)); hr = IDWriteGlyphRunAnalysis_GetAlphaTextureBounds(analysis, DWRITE_TEXTURE_CLEARTYPE_3x1+1, &rect); - ok(hr == E_INVALIDARG, "got 0x%08x\n", hr); + ok(hr == E_INVALIDARG, "got 0x%08lx\n", hr); ok(rect.left == 0 && rect.right == 0 && rect.top == 0 && rect.bottom == 0, "unexpected rect\n");
/* check how origin affects bounds */ SetRectEmpty(&rect); hr = IDWriteGlyphRunAnalysis_GetAlphaTextureBounds(analysis, DWRITE_TEXTURE_ALIASED_1x1, &rect); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(!IsRectEmpty(&rect), "got empty rect\n"); IDWriteGlyphRunAnalysis_Release(analysis);
@@ -5763,10 +5763,10 @@ static void test_CreateGlyphRunAnalysis(void) hr = IDWriteFactory_CreateGlyphRunAnalysis(factory, &run, 2.0, NULL, DWRITE_RENDERING_MODE_ALIASED, DWRITE_MEASURING_MODE_NATURAL, 0.0, 0.0, &analysis); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); SetRectEmpty(&rect2); hr = IDWriteGlyphRunAnalysis_GetAlphaTextureBounds(analysis, DWRITE_TEXTURE_ALIASED_1x1, &rect2); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(rect.right - rect.left < rect2.right - rect2.left, "expected wider rect\n"); ok(rect.bottom - rect.top < rect2.bottom - rect2.top, "expected taller rect\n"); IDWriteGlyphRunAnalysis_Release(analysis); @@ -5774,11 +5774,11 @@ static void test_CreateGlyphRunAnalysis(void) hr = IDWriteFactory_CreateGlyphRunAnalysis(factory, &run, 1.0, NULL, DWRITE_RENDERING_MODE_ALIASED, DWRITE_MEASURING_MODE_NATURAL, 10.0, -5.0, &analysis); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
SetRectEmpty(&rect2); hr = IDWriteGlyphRunAnalysis_GetAlphaTextureBounds(analysis, DWRITE_TEXTURE_ALIASED_1x1, &rect2); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(!IsRectEmpty(&rect2), "got empty rect\n"); IDWriteGlyphRunAnalysis_Release(analysis);
@@ -5790,28 +5790,28 @@ static void test_CreateGlyphRunAnalysis(void) hr = IDWriteFactory_CreateGlyphRunAnalysis(factory, &run, 1.0, NULL, rendermodes[i], DWRITE_MEASURING_MODE_NATURAL, 0.0, 0.0, &analysis); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
if (rendermodes[i] == DWRITE_RENDERING_MODE_ALIASED) { SetRectEmpty(&rect); hr = IDWriteGlyphRunAnalysis_GetAlphaTextureBounds(analysis, DWRITE_TEXTURE_ALIASED_1x1, &rect); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(!IsRectEmpty(&rect), "got empty rect\n");
SetRect(&rect, 0, 0, 1, 1); hr = IDWriteGlyphRunAnalysis_GetAlphaTextureBounds(analysis, DWRITE_TEXTURE_CLEARTYPE_3x1, &rect); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(IsRectEmpty(&rect), "unexpected empty rect\n"); } else { SetRect(&rect, 0, 0, 1, 1); hr = IDWriteGlyphRunAnalysis_GetAlphaTextureBounds(analysis, DWRITE_TEXTURE_ALIASED_1x1, &rect); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(IsRectEmpty(&rect), "got empty rect\n");
SetRectEmpty(&rect); hr = IDWriteGlyphRunAnalysis_GetAlphaTextureBounds(analysis, DWRITE_TEXTURE_CLEARTYPE_3x1, &rect); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(!IsRectEmpty(&rect), "got empty rect\n"); }
@@ -5828,15 +5828,15 @@ static void test_CreateGlyphRunAnalysis(void) hr = IDWriteFactory_CreateGlyphRunAnalysis(factory, &run, 1.0, NULL, DWRITE_RENDERING_MODE_ALIASED, DWRITE_MEASURING_MODE_GDI_CLASSIC, 0.0, 0.0, &analysis); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
SetRectEmpty(&rect); hr = IDWriteGlyphRunAnalysis_GetAlphaTextureBounds(analysis, DWRITE_TEXTURE_ALIASED_1x1, &rect); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
hr = IDWriteFontFace_GetGdiCompatibleGlyphMetrics(run.fontFace, run.fontEmSize, 1.0, NULL, DWRITE_MEASURING_MODE_GDI_CLASSIC, run.glyphIndices, 1, &gm, run.isSideways); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
/* metrics are in design units */ bboxX = (int)floorf((gm.advanceWidth - gm.leftSideBearing - gm.rightSideBearing) * run.fontEmSize / fm.designUnitsPerEm + 0.5f); @@ -5844,8 +5844,8 @@ static void test_CreateGlyphRunAnalysis(void)
rect.right -= rect.left; rect.bottom -= rect.top; - ok(abs(bboxX - rect.right) <= 2, "%.0f: bbox width %d, from metrics %d\n", run.fontEmSize, rect.right, bboxX); - ok(abs(bboxY - rect.bottom) <= 2, "%.0f: bbox height %d, from metrics %d\n", run.fontEmSize, rect.bottom, bboxY); + ok(abs(bboxX - rect.right) <= 2, "%.0f: bbox width %ld, from metrics %ld\n", run.fontEmSize, rect.right, bboxX); + ok(abs(bboxY - rect.bottom) <= 2, "%.0f: bbox height %ld, from metrics %ld\n", run.fontEmSize, rect.bottom, bboxY);
IDWriteGlyphRunAnalysis_Release(analysis); } @@ -5863,11 +5863,11 @@ static void test_CreateGlyphRunAnalysis(void) hr = IDWriteFactory_CreateGlyphRunAnalysis(factory, &run, 1.0, NULL, DWRITE_RENDERING_MODE_ALIASED, DWRITE_MEASURING_MODE_NATURAL, 0.0, 0.0, &analysis); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
SetRectEmpty(&rect); hr = IDWriteGlyphRunAnalysis_GetAlphaTextureBounds(analysis, DWRITE_TEXTURE_ALIASED_1x1, &rect); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(!IsRectEmpty(&rect), "got empty bounds\n");
IDWriteGlyphRunAnalysis_Release(analysis); @@ -5885,11 +5885,11 @@ static void test_CreateGlyphRunAnalysis(void) hr = IDWriteFactory_CreateGlyphRunAnalysis(factory, &run, 1.0, NULL, DWRITE_RENDERING_MODE_ALIASED, DWRITE_MEASURING_MODE_NATURAL, 0.0, 0.0, &analysis); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
SetRectEmpty(&rect); hr = IDWriteGlyphRunAnalysis_GetAlphaTextureBounds(analysis, DWRITE_TEXTURE_ALIASED_1x1, &rect); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(!IsRectEmpty(&rect), "got empty bounds\n");
IDWriteGlyphRunAnalysis_Release(analysis); @@ -5909,37 +5909,37 @@ static void test_CreateGlyphRunAnalysis(void) hr = IDWriteFactory_CreateGlyphRunAnalysis(factory, &run, 1.0, NULL, DWRITE_RENDERING_MODE_ALIASED, DWRITE_MEASURING_MODE_NATURAL, 0.0, 0.0, &analysis); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
SetRectEmpty(&rect2); hr = IDWriteGlyphRunAnalysis_GetAlphaTextureBounds(analysis, DWRITE_TEXTURE_ALIASED_1x1, &rect2); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(!IsRectEmpty(&rect2), "got empty bounds\n"); ok(!EqualRect(&rect, &rect2), "got wrong rect2\n"); - ok((rect2.right - rect.left) > advances[0], "got rect width %d for advance %f\n", rect.right - rect.left, advances[0]); + ok((rect2.right - rect.left) > advances[0], "got rect width %ld for advance %f\n", rect.right - rect.left, advances[0]); IDWriteGlyphRunAnalysis_Release(analysis);
hr = IDWriteFactory_CreateGlyphRunAnalysis(factory, &run, 2.0, NULL, DWRITE_RENDERING_MODE_ALIASED, DWRITE_MEASURING_MODE_NATURAL, 0.0, 0.0, &analysis); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
SetRectEmpty(&rect); hr = IDWriteGlyphRunAnalysis_GetAlphaTextureBounds(analysis, DWRITE_TEXTURE_ALIASED_1x1, &rect); - ok(hr == S_OK, "got 0x%08x\n", hr); - ok((rect.right - rect.left) > 2 * advances[0], "got rect width %d for advance %f\n", rect.right - rect.left, advances[0]); + ok(hr == S_OK, "got 0x%08lx\n", hr); + ok((rect.right - rect.left) > 2 * advances[0], "got rect width %ld for advance %f\n", rect.right - rect.left, advances[0]); IDWriteGlyphRunAnalysis_Release(analysis);
/* with scaling transform */ hr = IDWriteFactory_CreateGlyphRunAnalysis(factory, &run, 1.0, NULL, DWRITE_RENDERING_MODE_ALIASED, DWRITE_MEASURING_MODE_NATURAL, 0.0, 0.0, &analysis); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
SetRectEmpty(&rect); hr = IDWriteGlyphRunAnalysis_GetAlphaTextureBounds(analysis, DWRITE_TEXTURE_ALIASED_1x1, &rect); - ok(hr == S_OK, "got 0x%08x\n", hr); - ok(!IsRectEmpty(&rect), "got rect width %d\n", rect.right - rect.left); + ok(hr == S_OK, "got 0x%08lx\n", hr); + ok(!IsRectEmpty(&rect), "got rect width %ld\n", rect.right - rect.left); IDWriteGlyphRunAnalysis_Release(analysis);
memset(&m, 0, sizeof(m)); @@ -5948,18 +5948,18 @@ static void test_CreateGlyphRunAnalysis(void) hr = IDWriteFactory_CreateGlyphRunAnalysis(factory, &run, 1.0, &m, DWRITE_RENDERING_MODE_ALIASED, DWRITE_MEASURING_MODE_NATURAL, 0.0, 0.0, &analysis); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
SetRectEmpty(&rect2); hr = IDWriteGlyphRunAnalysis_GetAlphaTextureBounds(analysis, DWRITE_TEXTURE_ALIASED_1x1, &rect2); - ok(hr == S_OK, "got 0x%08x\n", hr); - ok((rect2.right - rect2.left) > (rect.right - rect.left), "got rect width %d\n", rect2.right - rect2.left); + ok(hr == S_OK, "got 0x%08lx\n", hr); + ok((rect2.right - rect2.left) > (rect.right - rect.left), "got rect width %ld\n", rect2.right - rect2.left);
/* instances are not reused for same runs */ hr = IDWriteFactory_CreateGlyphRunAnalysis(factory, &run, 1.0, &m, DWRITE_RENDERING_MODE_ALIASED, DWRITE_MEASURING_MODE_NATURAL, 0.0, 0.0, &analysis2); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(analysis2 != analysis, "got %p, previous instance %p\n", analysis2, analysis); IDWriteGlyphRunAnalysis_Release(analysis2);
@@ -5972,31 +5972,31 @@ static void test_CreateGlyphRunAnalysis(void) hr = IDWriteFactory2_CreateGlyphRunAnalysis(factory2, &run, NULL, DWRITE_RENDERING_MODE_ALIASED, DWRITE_MEASURING_MODE_NATURAL, DWRITE_GRID_FIT_MODE_DEFAULT, DWRITE_TEXT_ANTIALIAS_MODE_GRAYSCALE + 1, 0.0f, 0.0f, &analysis); - ok(hr == E_INVALIDARG, "Unexpected hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Unexpected hr %#lx.\n", hr);
/* Invalid grid fit mode. */ hr = IDWriteFactory2_CreateGlyphRunAnalysis(factory2, &run, NULL, DWRITE_RENDERING_MODE_ALIASED, DWRITE_MEASURING_MODE_NATURAL, DWRITE_GRID_FIT_MODE_ENABLED + 1, DWRITE_TEXT_ANTIALIAS_MODE_GRAYSCALE, 0.0f, 0.0f, &analysis); - ok(hr == E_INVALIDARG, "Unexpected hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Unexpected hr %#lx.\n", hr);
/* Invalid rendering mode. */ hr = IDWriteFactory2_CreateGlyphRunAnalysis(factory2, &run, NULL, DWRITE_RENDERING_MODE_OUTLINE, DWRITE_MEASURING_MODE_NATURAL, DWRITE_GRID_FIT_MODE_ENABLED, DWRITE_TEXT_ANTIALIAS_MODE_GRAYSCALE, 0.0f, 0.0f, &analysis); - ok(hr == E_INVALIDARG, "Unexpected hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Unexpected hr %#lx.\n", hr);
/* Invalid measuring mode. */ hr = IDWriteFactory2_CreateGlyphRunAnalysis(factory2, &run, NULL, DWRITE_RENDERING_MODE_ALIASED, DWRITE_MEASURING_MODE_GDI_NATURAL + 1, DWRITE_GRID_FIT_MODE_ENABLED, DWRITE_TEXT_ANTIALIAS_MODE_GRAYSCALE, 0.0f, 0.0f, &analysis); - ok(hr == E_INVALIDARG, "Unexpected hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Unexpected hr %#lx.\n", hr);
/* Win8 does not accept default grid fitting mode. */ hr = IDWriteFactory2_CreateGlyphRunAnalysis(factory2, &run, NULL, DWRITE_RENDERING_MODE_NATURAL, DWRITE_MEASURING_MODE_NATURAL, DWRITE_GRID_FIT_MODE_DEFAULT, DWRITE_TEXT_ANTIALIAS_MODE_GRAYSCALE, 0.0f, 0.0f, &analysis); - ok(hr == S_OK || broken(hr == E_INVALIDARG) /* Win8 */, "Failed to create analysis, hr %#x.\n", hr); + ok(hr == S_OK || broken(hr == E_INVALIDARG) /* Win8 */, "Failed to create analysis, hr %#lx.\n", hr); if (hr == S_OK) IDWriteGlyphRunAnalysis_Release(analysis);
@@ -6004,42 +6004,42 @@ static void test_CreateGlyphRunAnalysis(void) hr = IDWriteFactory2_CreateGlyphRunAnalysis(factory2, &run, NULL, DWRITE_RENDERING_MODE_NATURAL, DWRITE_MEASURING_MODE_NATURAL, DWRITE_GRID_FIT_MODE_DISABLED, DWRITE_TEXT_ANTIALIAS_MODE_GRAYSCALE, 0.0f, 0.0f, &analysis); - ok(hr == S_OK, "Failed to create analysis, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create analysis, hr %#lx.\n", hr);
SetRect(&rect, 0, 1, 0, 1); hr = IDWriteGlyphRunAnalysis_GetAlphaTextureBounds(analysis, DWRITE_TEXTURE_CLEARTYPE_3x1, &rect); - ok(hr == S_OK, "Failed to get texture bounds, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get texture bounds, hr %#lx.\n", hr); ok(IsRectEmpty(&rect), "Expected empty bbox.\n");
SetRectEmpty(&rect); hr = IDWriteGlyphRunAnalysis_GetAlphaTextureBounds(analysis, DWRITE_TEXTURE_ALIASED_1x1, &rect); - ok(hr == S_OK, "Failed to get texture bounds, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get texture bounds, hr %#lx.\n", hr); ok(!IsRectEmpty(&rect), "Unexpected empty bbox.\n");
size = (rect.right - rect.left) * (rect.bottom - rect.top); bits = malloc(size);
hr = IDWriteGlyphRunAnalysis_CreateAlphaTexture(analysis, DWRITE_TEXTURE_ALIASED_1x1, &rect, bits, size); - ok(hr == S_OK, "Failed to get alpha texture, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get alpha texture, hr %#lx.\n", hr);
hr = IDWriteGlyphRunAnalysis_CreateAlphaTexture(analysis, DWRITE_TEXTURE_ALIASED_1x1, &rect, bits, size - 1); - ok(hr == E_NOT_SUFFICIENT_BUFFER, "Unexpected hr %#x.\n", hr); + ok(hr == E_NOT_SUFFICIENT_BUFFER, "Unexpected hr %#lx.\n", hr);
hr = IDWriteGlyphRunAnalysis_CreateAlphaTexture(analysis, DWRITE_TEXTURE_CLEARTYPE_3x1, &rect, bits, size); - ok(hr == DWRITE_E_UNSUPPORTEDOPERATION, "Unexpected hr %#x.\n", hr); + ok(hr == DWRITE_E_UNSUPPORTEDOPERATION, "Unexpected hr %#lx.\n", hr);
hr = IDWriteGlyphRunAnalysis_CreateAlphaTexture(analysis, DWRITE_TEXTURE_CLEARTYPE_3x1, &rect, bits, size - 1); todo_wine - ok(hr == DWRITE_E_UNSUPPORTEDOPERATION, "Unexpected hr %#x.\n", hr); + ok(hr == DWRITE_E_UNSUPPORTEDOPERATION, "Unexpected hr %#lx.\n", hr);
free(bits);
hr = IDWriteFactory_CreateCustomRenderingParams(factory, 0.1f, 0.0f, 1.0f, DWRITE_PIXEL_GEOMETRY_FLAT, DWRITE_RENDERING_MODE_NATURAL, ¶ms); - ok(hr == S_OK, "Failed to create custom parameters, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create custom parameters, hr %#lx.\n", hr);
hr = IDWriteGlyphRunAnalysis_GetAlphaBlendParams(analysis, params, &gamma, &contrast, &cleartype_level); - ok(hr == S_OK, "Failed to get alpha blend params, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get alpha blend params, hr %#lx.\n", hr); todo_wine ok(cleartype_level == 0.0f, "Unexpected cleartype level %f.\n", cleartype_level);
@@ -6055,63 +6055,63 @@ static void test_CreateGlyphRunAnalysis(void) hr = IDWriteFactory3_CreateGlyphRunAnalysis(factory3, &run, NULL, DWRITE_RENDERING_MODE1_ALIASED, DWRITE_MEASURING_MODE_NATURAL, DWRITE_GRID_FIT_MODE_DEFAULT, DWRITE_TEXT_ANTIALIAS_MODE_GRAYSCALE + 1, 0.0f, 0.0f, &analysis); - ok(hr == E_INVALIDARG, "Unexpected hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Unexpected hr %#lx.\n", hr);
/* Invalid grid fit mode. */ hr = IDWriteFactory3_CreateGlyphRunAnalysis(factory3, &run, NULL, DWRITE_RENDERING_MODE1_ALIASED, DWRITE_MEASURING_MODE_NATURAL, DWRITE_GRID_FIT_MODE_ENABLED + 1, DWRITE_TEXT_ANTIALIAS_MODE_GRAYSCALE, 0.0f, 0.0f, &analysis); - ok(hr == E_INVALIDARG, "Unexpected hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Unexpected hr %#lx.\n", hr);
/* Invalid rendering mode. */ hr = IDWriteFactory3_CreateGlyphRunAnalysis(factory3, &run, NULL, DWRITE_RENDERING_MODE1_OUTLINE, DWRITE_MEASURING_MODE_NATURAL, DWRITE_GRID_FIT_MODE_ENABLED, DWRITE_TEXT_ANTIALIAS_MODE_GRAYSCALE, 0.0f, 0.0f, &analysis); - ok(hr == E_INVALIDARG, "Unexpected hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Unexpected hr %#lx.\n", hr);
/* Invalid measuring mode. */ hr = IDWriteFactory3_CreateGlyphRunAnalysis(factory3, &run, NULL, DWRITE_RENDERING_MODE1_ALIASED, DWRITE_MEASURING_MODE_GDI_NATURAL + 1, DWRITE_GRID_FIT_MODE_ENABLED, DWRITE_TEXT_ANTIALIAS_MODE_GRAYSCALE, 0.0f, 0.0f, &analysis); - ok(hr == E_INVALIDARG, "Unexpected hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Unexpected hr %#lx.\n", hr);
hr = IDWriteFactory3_CreateGlyphRunAnalysis(factory3, &run, NULL, DWRITE_RENDERING_MODE1_NATURAL, DWRITE_MEASURING_MODE_NATURAL, DWRITE_GRID_FIT_MODE_DEFAULT, DWRITE_TEXT_ANTIALIAS_MODE_GRAYSCALE, 0.0f, 0.0f, &analysis); - ok(hr == S_OK, "Failed to create analysis, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create analysis, hr %#lx.\n", hr); IDWriteGlyphRunAnalysis_Release(analysis);
/* Natural mode, grayscale antialiased. */ hr = IDWriteFactory3_CreateGlyphRunAnalysis(factory3, &run, NULL, DWRITE_RENDERING_MODE1_NATURAL, DWRITE_MEASURING_MODE_NATURAL, DWRITE_GRID_FIT_MODE_DISABLED, DWRITE_TEXT_ANTIALIAS_MODE_GRAYSCALE, 0.0f, 0.0f, &analysis); - ok(hr == S_OK, "Failed to create analysis, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create analysis, hr %#lx.\n", hr);
SetRect(&rect, 0, 1, 0, 1); hr = IDWriteGlyphRunAnalysis_GetAlphaTextureBounds(analysis, DWRITE_TEXTURE_CLEARTYPE_3x1, &rect); - ok(hr == S_OK, "Failed to get texture bounds, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get texture bounds, hr %#lx.\n", hr); ok(IsRectEmpty(&rect), "Expected empty bbox.\n");
SetRectEmpty(&rect); hr = IDWriteGlyphRunAnalysis_GetAlphaTextureBounds(analysis, DWRITE_TEXTURE_ALIASED_1x1, &rect); - ok(hr == S_OK, "Failed to get texture bounds, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get texture bounds, hr %#lx.\n", hr); ok(!IsRectEmpty(&rect), "Unexpected empty bbox.\n");
size = (rect.right - rect.left) * (rect.bottom - rect.top); bits = malloc(size);
hr = IDWriteGlyphRunAnalysis_CreateAlphaTexture(analysis, DWRITE_TEXTURE_ALIASED_1x1, &rect, bits, size); - ok(hr == S_OK, "Failed to get alpha texture, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get alpha texture, hr %#lx.\n", hr);
hr = IDWriteGlyphRunAnalysis_CreateAlphaTexture(analysis, DWRITE_TEXTURE_ALIASED_1x1, &rect, bits, size - 1); - ok(hr == E_NOT_SUFFICIENT_BUFFER, "Unexpected hr %#x.\n", hr); + ok(hr == E_NOT_SUFFICIENT_BUFFER, "Unexpected hr %#lx.\n", hr);
hr = IDWriteGlyphRunAnalysis_CreateAlphaTexture(analysis, DWRITE_TEXTURE_CLEARTYPE_3x1, &rect, bits, size); - ok(hr == DWRITE_E_UNSUPPORTEDOPERATION, "Unexpected hr %#x.\n", hr); + ok(hr == DWRITE_E_UNSUPPORTEDOPERATION, "Unexpected hr %#lx.\n", hr);
hr = IDWriteGlyphRunAnalysis_CreateAlphaTexture(analysis, DWRITE_TEXTURE_CLEARTYPE_3x1, &rect, bits, size - 1); todo_wine - ok(hr == DWRITE_E_UNSUPPORTEDOPERATION, "Unexpected hr %#x.\n", hr); + ok(hr == DWRITE_E_UNSUPPORTEDOPERATION, "Unexpected hr %#lx.\n", hr);
free(bits);
@@ -6122,7 +6122,7 @@ static void test_CreateGlyphRunAnalysis(void)
IDWriteFontFace_Release(face); ref = IDWriteFactory_Release(factory); - ok(ref == 0, "factory not released, %u\n", ref); + ok(ref == 0, "factory not released, %lu\n", ref); }
#define round(x) ((int)floor((x) + 0.5)) @@ -6312,7 +6312,7 @@ static void get_expected_metrics(IDWriteFontFace *fontface, struct compatmetrics
memset(expected, 0, sizeof(*expected)); hr = IDWriteFontFace_GetGdiCompatibleMetrics(fontface, ptr->ppdip * fabsf(ptr->m.m22) * ptr->emsize, 1.0, NULL, expected); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr); }
static void test_gdicompat_metrics(IDWriteFontFace *face) @@ -6352,26 +6352,26 @@ static void test_gdicompat_metrics(IDWriteFontFace *face) memset(&comp_metrics, 0xcc, sizeof(comp_metrics)); memset(&expected, 0, sizeof(expected)); hr = IDWriteFontFace_GetGdiCompatibleMetrics(face, -10.0, 1.0, NULL, &comp_metrics); - ok(hr == E_INVALIDARG, "got %08x\n", hr); + ok(hr == E_INVALIDARG, "got %08lx\n", hr); test_metrics_cmp(0.0, &comp_metrics, &expected);
/* zero emsize */ memset(&comp_metrics, 0xcc, sizeof(comp_metrics)); memset(&expected, 0, sizeof(expected)); hr = IDWriteFontFace_GetGdiCompatibleMetrics(face, 0.0, 1.0, NULL, &comp_metrics); - ok(hr == E_INVALIDARG, "got %08x\n", hr); + ok(hr == E_INVALIDARG, "got %08lx\n", hr); test_metrics_cmp(0.0, &comp_metrics, &expected);
/* zero pixels per dip */ memset(&comp_metrics, 0xcc, sizeof(comp_metrics)); memset(&expected, 0, sizeof(expected)); hr = IDWriteFontFace_GetGdiCompatibleMetrics(face, 5.0, 0.0, NULL, &comp_metrics); - ok(hr == E_INVALIDARG, "got %08x\n", hr); + ok(hr == E_INVALIDARG, "got %08lx\n", hr); test_metrics_cmp(5.0, &comp_metrics, &expected);
memset(&comp_metrics, 0xcc, sizeof(comp_metrics)); hr = IDWriteFontFace_GetGdiCompatibleMetrics(face, 5.0, -1.0, NULL, &comp_metrics); - ok(hr == E_INVALIDARG, "got %08x\n", hr); + ok(hr == E_INVALIDARG, "got %08lx\n", hr); test_metrics_cmp(5.0, &comp_metrics, &expected);
for (i = 0; i < ARRAY_SIZE(compatmetrics_tests); i++) { @@ -6379,7 +6379,7 @@ static void test_gdicompat_metrics(IDWriteFontFace *face)
get_expected_metrics(face, ptr, (DWRITE_FONT_METRICS*)&expected); hr = IDWriteFontFace_GetGdiCompatibleMetrics(face, ptr->emsize, ptr->ppdip, &ptr->m, &comp_metrics); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr); test_metrics_cmp(ptr->emsize, &comp_metrics, &expected); }
@@ -6389,11 +6389,11 @@ static void test_gdicompat_metrics(IDWriteFontFace *face)
if (fontface1) { hr = IDWriteFontFace1_GetGdiCompatibleMetrics(fontface1, emsize, 1.0, NULL, &comp_metrics1); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr); } else { hr = IDWriteFontFace_GetGdiCompatibleMetrics(face, emsize, 1.0, NULL, &comp_metrics); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr); }
scale = emsize / design_metrics.designUnitsPerEm; @@ -6458,7 +6458,7 @@ static void test_GetGdiCompatibleMetrics(void)
font = get_font(factory, L"Tahoma", DWRITE_FONT_STYLE_NORMAL); hr = IDWriteFont_CreateFontFace(font, &fontface); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); IDWriteFont_Release(font); test_gdicompat_metrics(fontface); IDWriteFontFace_Release(fontface); @@ -6469,7 +6469,7 @@ static void test_GetGdiCompatibleMetrics(void) else { hr = IDWriteFont_CreateFontFace(font, &fontface); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); IDWriteFont_Release(font);
test_gdicompat_metrics(fontface); @@ -6477,7 +6477,7 @@ static void test_GetGdiCompatibleMetrics(void) }
ref = IDWriteFactory_Release(factory); - ok(ref == 0, "factory not released, %u\n", ref); + ok(ref == 0, "factory not released, %lu\n", ref); }
static void get_expected_panose(IDWriteFont1 *font, DWRITE_PANOSE *panose) @@ -6492,10 +6492,10 @@ static void get_expected_panose(IDWriteFont1 *font, DWRITE_PANOSE *panose) memset(panose, 0, sizeof(*panose));
hr = IDWriteFont1_CreateFontFace(font, &fontface); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
hr = IDWriteFontFace_TryGetFontTable(fontface, MS_OS2_TAG, (const void **)&tt_os2, &size, &os2_context, &exists); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
if (tt_os2) { memcpy(panose, &tt_os2->panose, sizeof(*panose)); @@ -6523,14 +6523,14 @@ static void test_GetPanose(void)
if (FAILED(hr)) { ref = IDWriteFactory_Release(factory); - ok(ref == 0, "factory not released, %u\n", ref); + ok(ref == 0, "factory not released, %lu\n", ref); win_skip("GetPanose() is not supported.\n"); return; } IDWriteFont1_Release(font1);
hr = IDWriteFactory_GetSystemFontCollection(factory, &syscollection, FALSE); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); count = IDWriteFontCollection_GetFontFamilyCount(syscollection);
for (i = 0; i < count; i++) { @@ -6544,18 +6544,18 @@ static void test_GetPanose(void) WCHAR nameW[256];
hr = IDWriteFontCollection_GetFontFamily(syscollection, i, &family); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
hr = IDWriteFontFamily_GetFirstMatchingFont(family, DWRITE_FONT_WEIGHT_NORMAL, DWRITE_FONT_STRETCH_NORMAL, DWRITE_FONT_STYLE_NORMAL, &font); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
hr = IDWriteFont_QueryInterface(font, &IID_IDWriteFont1, (void **)&font1); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); IDWriteFont_Release(font);
hr = IDWriteFontFamily_GetFamilyNames(family, &names); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
get_enus_string(names, nameW, ARRAY_SIZE(nameW));
@@ -6590,7 +6590,7 @@ static void test_GetPanose(void) winetest_pop_context();
hr = IDWriteFont1_CreateFontFace(font1, &fontface); - ok(hr == S_OK, "Failed to create a font face, %#x.\n", hr); + ok(hr == S_OK, "Failed to create a font face, %#lx.\n", hr); if (IDWriteFontFace_QueryInterface(fontface, &IID_IDWriteFontFace3, (void **)&fontface3) == S_OK) { ok(!memcmp(&panose, &expected_panose, sizeof(panose)), "%s: Unexpected panose from font face.\n", wine_dbgstr_w(nameW)); @@ -6604,7 +6604,7 @@ static void test_GetPanose(void)
IDWriteFontCollection_Release(syscollection); ref = IDWriteFactory_Release(factory); - ok(ref == 0, "factory not released, %u\n", ref); + ok(ref == 0, "factory not released, %lu\n", ref); }
static INT32 get_gdi_font_advance(HDC hdc, FLOAT emsize) @@ -6650,7 +6650,7 @@ static void test_GetGdiCompatibleGlyphAdvances(void) font = get_tahoma_instance(factory, DWRITE_FONT_STYLE_NORMAL);
hr = IDWriteFont_CreateFontFace(font, &fontface); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); IDWriteFont_Release(font);
hr = IDWriteFontFace_QueryInterface(fontface, &IID_IDWriteFontFace1, (void **)&fontface1); @@ -6658,7 +6658,7 @@ static void test_GetGdiCompatibleGlyphAdvances(void)
if (hr != S_OK) { ref = IDWriteFactory_Release(factory); - ok(ref == 0, "factory not released, %u\n", ref); + ok(ref == 0, "factory not released, %lu\n", ref); win_skip("GetGdiCompatibleGlyphAdvances() is not supported\n"); return; } @@ -6666,35 +6666,35 @@ static void test_GetGdiCompatibleGlyphAdvances(void) codepoint = 'A'; glyph = 0; hr = IDWriteFontFace1_GetGlyphIndices(fontface1, &codepoint, 1, &glyph); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(glyph > 0, "got %u\n", glyph);
/* zero emsize */ advance = 1; hr = IDWriteFontFace1_GetGdiCompatibleGlyphAdvances(fontface1, 0.0, 1.0, NULL, FALSE, FALSE, 1, &glyph, &advance); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(advance == 0, "got %d\n", advance);
/* negative emsize */ advance = 1; hr = IDWriteFontFace1_GetGdiCompatibleGlyphAdvances(fontface1, -1.0, 1.0, NULL, FALSE, FALSE, 1, &glyph, &advance); - ok(hr == E_INVALIDARG, "got 0x%08x\n", hr); + ok(hr == E_INVALIDARG, "got 0x%08lx\n", hr); ok(advance == 0, "got %d\n", advance);
/* zero ppdip */ advance = 1; hr = IDWriteFontFace1_GetGdiCompatibleGlyphAdvances(fontface1, 1.0, 0.0, NULL, FALSE, FALSE, 1, &glyph, &advance); - ok(hr == E_INVALIDARG, "got 0x%08x\n", hr); + ok(hr == E_INVALIDARG, "got 0x%08lx\n", hr); ok(advance == 0, "got %d\n", advance);
/* negative ppdip */ advance = 1; hr = IDWriteFontFace1_GetGdiCompatibleGlyphAdvances(fontface1, 1.0, -1.0, NULL, FALSE, FALSE, 1, &glyph, &advance); - ok(hr == E_INVALIDARG, "got 0x%08x\n", hr); + ok(hr == E_INVALIDARG, "got 0x%08lx\n", hr); ok(advance == 0, "got %d\n", advance);
IDWriteFontFace1_GetMetrics(fontface1, &fm); @@ -6707,7 +6707,7 @@ static void test_GetGdiCompatibleGlyphAdvances(void) gdi_advance = get_gdi_font_advance(hdc, emsize); hr = IDWriteFontFace1_GetGdiCompatibleGlyphAdvances(fontface1, emsize, 1.0, NULL, FALSE, FALSE, 1, &glyph, &advance); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
/* advance is in design units */ advance = (int)floorf(emsize * advance / fm.designUnitsPerEm + 0.5f); @@ -6718,7 +6718,7 @@ static void test_GetGdiCompatibleGlyphAdvances(void)
IDWriteFontFace1_Release(fontface1); ref = IDWriteFactory_Release(factory); - ok(ref == 0, "factory not released, %u\n", ref); + ok(ref == 0, "factory not released, %lu\n", ref); }
static WORD get_gasp_flags(IDWriteFontFace *fontface, FLOAT emsize, FLOAT ppdip) @@ -6736,7 +6736,7 @@ static WORD get_gasp_flags(IDWriteFontFace *fontface, FLOAT emsize, FLOAT ppdip) exists = FALSE; hr = IDWriteFontFace_TryGetFontTable(fontface, MS_GASP_TAG, (const void**)&ptr, &size, &ctxt, &exists); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
if (!exists) goto done; @@ -6878,11 +6878,11 @@ static void test_GetRecommendedRenderingMode(void) mode = 10; hr = IDWriteFontFace_GetRecommendedRenderingMode(fontface, 3.0, 1.0, DWRITE_MEASURING_MODE_GDI_CLASSIC, NULL, &mode); - ok(hr == E_INVALIDARG, "got 0x%08x\n", hr); + ok(hr == E_INVALIDARG, "got 0x%08lx\n", hr); ok(mode == DWRITE_RENDERING_MODE_DEFAULT, "got %d\n", mode);
hr = IDWriteFactory_CreateRenderingParams(factory, ¶ms); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
/* detect old dwrite version, that is using higher threshold value */ g_is_vista = fontface1 == NULL; @@ -6905,7 +6905,7 @@ static void test_GetRecommendedRenderingMode(void) gasp = get_gasp_flags(fontface, emsize, ppdip); expected = get_expected_rendering_mode(emsize * ppdip, gasp, recmode_tests[i].measuring, recmode_tests[i].threshold); hr = IDWriteFontFace_GetRecommendedRenderingMode(fontface, emsize, ppdip, recmode_tests[i].measuring, params, &mode); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(mode == expected, "got %d, ppdip %f, flags 0x%04x, expected %d.\n", mode, ppdip, gasp, expected);
/* some ppdip variants */ @@ -6914,7 +6914,7 @@ static void test_GetRecommendedRenderingMode(void) gasp = get_gasp_flags(fontface, emsize, ppdip); expected = get_expected_rendering_mode(emsize * ppdip, gasp, recmode_tests[i].measuring, recmode_tests[i].threshold); hr = IDWriteFontFace_GetRecommendedRenderingMode(fontface, emsize, ppdip, recmode_tests[i].measuring, params, &mode); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(mode == expected, "got %d, ppdip %f, flags 0x%04x, expected %d.\n", mode, ppdip, gasp, expected);
/* Only test larger sizes to workaround Win7 differences, where unscaled natural emsize threshold is used; @@ -6926,7 +6926,7 @@ static void test_GetRecommendedRenderingMode(void) gasp = get_gasp_flags(fontface, emsize, ppdip); expected = get_expected_rendering_mode(emsize * ppdip, gasp, recmode_tests[i].measuring, recmode_tests[i].threshold); hr = IDWriteFontFace_GetRecommendedRenderingMode(fontface, emsize, ppdip, recmode_tests[i].measuring, params, &mode); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(mode == expected, "got %d, ppdip %f, flags 0x%04x, expected %d.\n", mode, ppdip, gasp, expected);
ppdip = 2.0f; @@ -6934,7 +6934,7 @@ static void test_GetRecommendedRenderingMode(void) gasp = get_gasp_flags(fontface, emsize, ppdip); expected = get_expected_rendering_mode(emsize * ppdip, gasp, recmode_tests[i].measuring, recmode_tests[i].threshold); hr = IDWriteFontFace_GetRecommendedRenderingMode(fontface, emsize, ppdip, recmode_tests[i].measuring, params, &mode); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(mode == expected, "got %d, ppdip %f, flags 0x%04x, expected %d.\n", mode, ppdip, gasp, expected); }
@@ -6957,7 +6957,7 @@ static void test_GetRecommendedRenderingMode(void) expected = get_expected_rendering_mode(emsize * ppdip, gasp, recmode_tests1[i].measuring, recmode_tests1[i].threshold); hr = IDWriteFontFace1_GetRecommendedRenderingMode(fontface1, emsize, dpi, dpi, NULL, FALSE, recmode_tests1[i].threshold, recmode_tests1[i].measuring, &mode); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(mode == expected, "got %d, dpi %f, flags 0x%04x, expected %d.\n", mode, dpi, gasp, expected);
/* Only test larger sizes to workaround Win7 differences, where unscaled natural emsize threshold is used; @@ -6971,7 +6971,7 @@ static void test_GetRecommendedRenderingMode(void) expected = get_expected_rendering_mode(emsize * ppdip, gasp, recmode_tests1[i].measuring, recmode_tests1[i].threshold); hr = IDWriteFontFace1_GetRecommendedRenderingMode(fontface1, emsize, dpi, dpi, NULL, FALSE, recmode_tests1[i].threshold, recmode_tests1[i].measuring, &mode); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(mode == expected, "got %d, dpi %f, flags 0x%04x, expected %d.\n", mode, dpi, gasp, expected);
ppdip = 0.5f; @@ -6981,7 +6981,7 @@ static void test_GetRecommendedRenderingMode(void) expected = get_expected_rendering_mode(emsize * ppdip, gasp, recmode_tests1[i].measuring, recmode_tests1[i].threshold); hr = IDWriteFontFace1_GetRecommendedRenderingMode(fontface1, emsize, dpi, dpi, NULL, FALSE, recmode_tests1[i].threshold, recmode_tests1[i].measuring, &mode); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(mode == expected, "got %d, dpi %f, flags 0x%04x, expected %d.\n", mode, dpi, gasp, expected);
/* try different dpis for X and Y direction */ @@ -6992,7 +6992,7 @@ static void test_GetRecommendedRenderingMode(void) expected = get_expected_rendering_mode(emsize * ppdip, gasp, recmode_tests1[i].measuring, recmode_tests1[i].threshold); hr = IDWriteFontFace1_GetRecommendedRenderingMode(fontface1, emsize, dpi * 0.5f, dpi, NULL, FALSE, recmode_tests1[i].threshold, recmode_tests1[i].measuring, &mode); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(mode == expected, "got %d, dpi %f, flags 0x%04x, expected %d.\n", mode, dpi, gasp, expected);
ppdip = 1.0f; @@ -7002,7 +7002,7 @@ static void test_GetRecommendedRenderingMode(void) expected = get_expected_rendering_mode(emsize * ppdip, gasp, recmode_tests1[i].measuring, recmode_tests1[i].threshold); hr = IDWriteFontFace1_GetRecommendedRenderingMode(fontface1, emsize, dpi, dpi * 0.5f, NULL, FALSE, recmode_tests1[i].threshold, recmode_tests1[i].measuring, &mode); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(mode == expected, "got %d, dpi %f, flags 0x%04x, expected %d.\n", mode, dpi, gasp, expected);
ppdip = 2.0f; @@ -7012,7 +7012,7 @@ static void test_GetRecommendedRenderingMode(void) expected = get_expected_rendering_mode(emsize * ppdip, gasp, recmode_tests1[i].measuring, recmode_tests1[i].threshold); hr = IDWriteFontFace1_GetRecommendedRenderingMode(fontface1, emsize, dpi * 0.5f, dpi, NULL, FALSE, recmode_tests1[i].threshold, recmode_tests1[i].measuring, &mode); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(mode == expected, "got %d, dpi %f, flags 0x%04x, expected %d.\n", mode, dpi, gasp, expected);
ppdip = 2.0f; @@ -7022,7 +7022,7 @@ static void test_GetRecommendedRenderingMode(void) expected = get_expected_rendering_mode(emsize * ppdip, gasp, recmode_tests1[i].measuring, recmode_tests1[i].threshold); hr = IDWriteFontFace1_GetRecommendedRenderingMode(fontface1, emsize, dpi, dpi * 0.5f, NULL, FALSE, recmode_tests1[i].threshold, recmode_tests1[i].measuring, &mode); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(mode == expected, "got %d, dpi %f, flags 0x%04x, expected %d.\n", mode, dpi, gasp, expected); }
@@ -7044,7 +7044,7 @@ static void test_GetRecommendedRenderingMode(void) expected_gridfit = get_expected_gridfit_mode(emsize, gasp, recmode_tests1[i].measuring, recmode_tests1[i].threshold); hr = IDWriteFontFace2_GetRecommendedRenderingMode(fontface2, emsize, 96.0f, 96.0f, NULL, FALSE, recmode_tests1[i].threshold, recmode_tests1[i].measuring, params, &mode, &gridfit); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(mode == expected, "got %d, flags 0x%04x, expected %d.\n", mode, gasp, expected); ok(gridfit == expected_gridfit, "gridfit: got %d, flags 0x%04x, expected %d.\n", gridfit, gasp, expected_gridfit);
@@ -7067,7 +7067,7 @@ static void test_GetRecommendedRenderingMode(void) expected_gridfit = get_expected_gridfit_mode(emsize, gasp, recmode_tests1[i].measuring, recmode_tests1[i].threshold); hr = IDWriteFontFace3_GetRecommendedRenderingMode(fontface3, emsize, 96.0f, 96.0f, NULL, FALSE, recmode_tests1[i].threshold, recmode_tests1[i].measuring, params, &mode1, &gridfit); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(mode1 == expected1, "got %d, flags 0x%04x, expected %d.\n", mode1, gasp, expected1); ok(gridfit == expected_gridfit, "gridfit: got %d, flags 0x%04x, expected %d.\n", gridfit, gasp, expected_gridfit);
@@ -7083,11 +7083,11 @@ static void test_GetRecommendedRenderingMode(void) /* test how parameters override returned modes */ hr = IDWriteFactory_CreateCustomRenderingParams(factory, 1.0, 0.0, 0.0, DWRITE_PIXEL_GEOMETRY_FLAT, DWRITE_RENDERING_MODE_GDI_CLASSIC, ¶ms); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
mode = 10; hr = IDWriteFontFace_GetRecommendedRenderingMode(fontface, 500.0, 1.0, DWRITE_MEASURING_MODE_NATURAL, params, &mode); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(mode == DWRITE_RENDERING_MODE_GDI_CLASSIC, "got %d\n", mode);
IDWriteRenderingParams_Release(params); @@ -7098,18 +7098,18 @@ static void test_GetRecommendedRenderingMode(void) DWRITE_GRID_FIT_MODE gridfit;
hr = IDWriteFactory_QueryInterface(factory, &IID_IDWriteFactory2, (void**)&factory2); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
hr = IDWriteFactory2_CreateCustomRenderingParams(factory2, 1.0, 0.0, 0.0, 0.5, DWRITE_PIXEL_GEOMETRY_FLAT, DWRITE_RENDERING_MODE_OUTLINE, DWRITE_GRID_FIT_MODE_ENABLED, ¶ms2); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
mode = 10; gridfit = 10; hr = IDWriteFontFace2_GetRecommendedRenderingMode(fontface2, 5.0, 96.0, 96.0, NULL, FALSE, DWRITE_OUTLINE_THRESHOLD_ANTIALIASED, DWRITE_MEASURING_MODE_GDI_CLASSIC, NULL, &mode, &gridfit); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(mode == DWRITE_RENDERING_MODE_GDI_CLASSIC, "got %d\n", mode); ok(gridfit == DWRITE_GRID_FIT_MODE_ENABLED, "got %d\n", gridfit);
@@ -7118,7 +7118,7 @@ static void test_GetRecommendedRenderingMode(void) hr = IDWriteFontFace2_GetRecommendedRenderingMode(fontface2, 5.0, 96.0, 96.0, NULL, FALSE, DWRITE_OUTLINE_THRESHOLD_ANTIALIASED, DWRITE_MEASURING_MODE_GDI_CLASSIC, (IDWriteRenderingParams*)params2, &mode, &gridfit); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(mode == DWRITE_RENDERING_MODE_OUTLINE, "got %d\n", mode); ok(gridfit == DWRITE_GRID_FIT_MODE_ENABLED, "got %d\n", gridfit);
@@ -7135,11 +7135,11 @@ static void test_GetRecommendedRenderingMode(void) DWRITE_RENDERING_MODE1 mode1;
hr = IDWriteFactory_QueryInterface(factory, &IID_IDWriteFactory3, (void**)&factory3); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
hr = IDWriteFactory3_CreateCustomRenderingParams(factory3, 1.0f, 0.0f, 0.0f, 0.5f, DWRITE_PIXEL_GEOMETRY_FLAT, DWRITE_RENDERING_MODE1_NATURAL_SYMMETRIC_DOWNSAMPLED, DWRITE_GRID_FIT_MODE_ENABLED, ¶ms3); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
mode1 = IDWriteRenderingParams3_GetRenderingMode1(params3); ok(mode1 == DWRITE_RENDERING_MODE1_NATURAL_SYMMETRIC_DOWNSAMPLED, "got %d\n", mode1); @@ -7148,14 +7148,14 @@ static void test_GetRecommendedRenderingMode(void) ok(mode == DWRITE_RENDERING_MODE_NATURAL_SYMMETRIC, "got %d\n", mode);
hr = IDWriteRenderingParams3_QueryInterface(params3, &IID_IDWriteRenderingParams, (void**)¶ms); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(params == (IDWriteRenderingParams*)params3, "got %p, %p\n", params3, params); mode = IDWriteRenderingParams_GetRenderingMode(params); ok(mode == DWRITE_RENDERING_MODE_NATURAL_SYMMETRIC, "got %d\n", mode); IDWriteRenderingParams_Release(params);
hr = IDWriteRenderingParams3_QueryInterface(params3, &IID_IDWriteRenderingParams2, (void**)¶ms2); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(params2 == (IDWriteRenderingParams2*)params3, "got %p, %p\n", params3, params2); mode = IDWriteRenderingParams2_GetRenderingMode(params2); ok(mode == DWRITE_RENDERING_MODE_NATURAL_SYMMETRIC, "got %d\n", mode); @@ -7166,7 +7166,7 @@ static void test_GetRecommendedRenderingMode(void) hr = IDWriteFontFace2_GetRecommendedRenderingMode(fontface2, 5.0f, 96.0f, 96.0f, NULL, FALSE, DWRITE_OUTLINE_THRESHOLD_ANTIALIASED, DWRITE_MEASURING_MODE_GDI_CLASSIC, NULL, &mode, &gridfit); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(mode == DWRITE_RENDERING_MODE_GDI_CLASSIC, "got %d\n", mode); ok(gridfit == DWRITE_GRID_FIT_MODE_ENABLED, "got %d\n", gridfit);
@@ -7175,7 +7175,7 @@ static void test_GetRecommendedRenderingMode(void) hr = IDWriteFontFace2_GetRecommendedRenderingMode(fontface2, 5.0f, 96.0f, 96.0f, NULL, FALSE, DWRITE_OUTLINE_THRESHOLD_ANTIALIASED, DWRITE_MEASURING_MODE_GDI_CLASSIC, (IDWriteRenderingParams*)params3, &mode, &gridfit); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(mode == DWRITE_RENDERING_MODE_NATURAL_SYMMETRIC, "got %d\n", mode); ok(gridfit == DWRITE_GRID_FIT_MODE_ENABLED, "got %d\n", gridfit);
@@ -7191,7 +7191,7 @@ static void test_GetRecommendedRenderingMode(void) IDWriteFontFace1_Release(fontface1); IDWriteFontFace_Release(fontface); ref = IDWriteFactory_Release(factory); - ok(ref == 0, "factory not released, %u\n", ref); + ok(ref == 0, "factory not released, %lu\n", ref); }
static inline BOOL float_eq(FLOAT left, FLOAT right) @@ -7239,11 +7239,11 @@ static void test_GetAlphaBlendParams(void) ch = 'A'; glyph = 0; hr = IDWriteFontFace_GetGlyphIndices(fontface, &ch, 1, &glyph); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(glyph > 0, "got %u\n", glyph);
hr = IDWriteFontFace_GetDesignGlyphMetrics(fontface, &glyph, 1, &metrics, FALSE); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); advance = metrics.advanceWidth;
offset.advanceOffset = 0.0; @@ -7260,7 +7260,7 @@ static void test_GetAlphaBlendParams(void)
hr = IDWriteFactory_CreateCustomRenderingParams(factory, 0.9, 0.3, 0.1, DWRITE_PIXEL_GEOMETRY_RGB, DWRITE_RENDERING_MODE_DEFAULT, ¶ms); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
value = 0; ret = SystemParametersInfoW(SPI_GETFONTSMOOTHINGCONTRAST, 0, &value, 0); @@ -7271,18 +7271,18 @@ static void test_GetAlphaBlendParams(void) hr = IDWriteFactory_CreateGlyphRunAnalysis(factory, &run, 1.0, NULL, rendermodes[i], DWRITE_MEASURING_MODE_NATURAL, 0.0, 0.0, &analysis); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
gamma = contrast = ctlevel = -1.0; hr = IDWriteGlyphRunAnalysis_GetAlphaBlendParams(analysis, NULL, &gamma, &contrast, &ctlevel); - ok(hr == E_INVALIDARG, "got 0x%08x\n", hr); + ok(hr == E_INVALIDARG, "got 0x%08lx\n", hr); ok(gamma == -1.0, "got %.2f\n", gamma); ok(contrast == -1.0, "got %.2f\n", contrast); ok(ctlevel == -1.0, "got %.2f\n", ctlevel);
gamma = contrast = ctlevel = -1.0; hr = IDWriteGlyphRunAnalysis_GetAlphaBlendParams(analysis, params, &gamma, &contrast, &ctlevel); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
if (rendermodes[i] == DWRITE_RENDERING_MODE_GDI_CLASSIC || rendermodes[i] == DWRITE_RENDERING_MODE_GDI_NATURAL) { ok(float_eq(gamma, expected_gdi_gamma), "got %.2f, expected %.2f\n", gamma, expected_gdi_gamma); @@ -7301,7 +7301,7 @@ static void test_GetAlphaBlendParams(void) IDWriteRenderingParams_Release(params); IDWriteFontFace_Release(fontface); ref = IDWriteFactory_Release(factory); - ok(ref == 0, "factory not released, %u\n", ref); + ok(ref == 0, "factory not released, %lu\n", ref); }
static void test_CreateAlphaTexture(void) @@ -7326,11 +7326,11 @@ static void test_CreateAlphaTexture(void) ch = 'A'; glyph = 0; hr = IDWriteFontFace_GetGlyphIndices(fontface, &ch, 1, &glyph); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(glyph > 0, "got %u\n", glyph);
hr = IDWriteFontFace_GetDesignGlyphMetrics(fontface, &glyph, 1, &metrics, FALSE); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); advance = metrics.advanceWidth;
offset.advanceOffset = 0.0; @@ -7348,11 +7348,11 @@ static void test_CreateAlphaTexture(void) hr = IDWriteFactory_CreateGlyphRunAnalysis(factory, &run, 1.0, NULL, DWRITE_RENDERING_MODE_NATURAL, DWRITE_MEASURING_MODE_NATURAL, 0.0, 0.0, &analysis); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
SetRectEmpty(&bounds); hr = IDWriteGlyphRunAnalysis_GetAlphaTextureBounds(analysis, DWRITE_TEXTURE_CLEARTYPE_3x1, &bounds); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(!IsRectEmpty(&bounds), "got empty rect\n"); size = (bounds.right - bounds.left)*(bounds.bottom - bounds.top)*3; ok(sizeof(buff) >= size, "required %u\n", size); @@ -7360,23 +7360,23 @@ static void test_CreateAlphaTexture(void) /* invalid type value */ memset(buff, 0xcf, sizeof(buff)); hr = IDWriteGlyphRunAnalysis_CreateAlphaTexture(analysis, DWRITE_TEXTURE_CLEARTYPE_3x1+1, &bounds, buff, sizeof(buff)); - ok(hr == E_INVALIDARG, "got 0x%08x\n", hr); + ok(hr == E_INVALIDARG, "got 0x%08lx\n", hr); ok(buff[0] == 0xcf, "got %1x\n", buff[0]);
memset(buff, 0xcf, sizeof(buff)); hr = IDWriteGlyphRunAnalysis_CreateAlphaTexture(analysis, DWRITE_TEXTURE_ALIASED_1x1, &bounds, buff, 2); - ok(hr == E_NOT_SUFFICIENT_BUFFER, "got 0x%08x\n", hr); + ok(hr == E_NOT_SUFFICIENT_BUFFER, "got 0x%08lx\n", hr); ok(buff[0] == 0xcf, "got %1x\n", buff[0]);
/* vista version allows texture type mismatch, mark it broken for now */ memset(buff, 0xcf, sizeof(buff)); hr = IDWriteGlyphRunAnalysis_CreateAlphaTexture(analysis, DWRITE_TEXTURE_ALIASED_1x1, &bounds, buff, sizeof(buff)); - ok(hr == DWRITE_E_UNSUPPORTEDOPERATION || broken(hr == S_OK), "got 0x%08x\n", hr); + ok(hr == DWRITE_E_UNSUPPORTEDOPERATION || broken(hr == S_OK), "got 0x%08lx\n", hr); ok(buff[0] == 0xcf || broken(buff[0] == 0), "got %1x\n", buff[0]);
memset(buff, 0xcf, sizeof(buff)); hr = IDWriteGlyphRunAnalysis_CreateAlphaTexture(analysis, DWRITE_TEXTURE_CLEARTYPE_3x1, &bounds, buff, size-1); - ok(hr == E_NOT_SUFFICIENT_BUFFER, "got 0x%08x\n", hr); + ok(hr == E_NOT_SUFFICIENT_BUFFER, "got 0x%08lx\n", hr); ok(buff[0] == 0xcf, "got %1x\n", buff[0]);
IDWriteGlyphRunAnalysis_Release(analysis); @@ -7384,32 +7384,32 @@ static void test_CreateAlphaTexture(void) hr = IDWriteFactory_CreateGlyphRunAnalysis(factory, &run, 1.0, NULL, DWRITE_RENDERING_MODE_ALIASED, DWRITE_MEASURING_MODE_GDI_CLASSIC, 0.0, 0.0, &analysis); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
SetRectEmpty(&bounds); hr = IDWriteGlyphRunAnalysis_GetAlphaTextureBounds(analysis, DWRITE_TEXTURE_ALIASED_1x1, &bounds); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(!IsRectEmpty(&bounds), "got empty rect\n"); size = (bounds.right - bounds.left)*(bounds.bottom - bounds.top); ok(sizeof(buff) >= size, "required %u\n", size);
memset(buff, 0xcf, sizeof(buff)); hr = IDWriteGlyphRunAnalysis_CreateAlphaTexture(analysis, DWRITE_TEXTURE_ALIASED_1x1, NULL, buff, sizeof(buff)); - ok(hr == E_INVALIDARG, "got 0x%08x\n", hr); + ok(hr == E_INVALIDARG, "got 0x%08lx\n", hr); ok(buff[0] == 0xcf, "got %1x\n", buff[0]);
hr = IDWriteGlyphRunAnalysis_CreateAlphaTexture(analysis, DWRITE_TEXTURE_ALIASED_1x1, NULL, NULL, sizeof(buff)); - ok(hr == E_INVALIDARG, "got 0x%08x\n", hr); + ok(hr == E_INVALIDARG, "got 0x%08lx\n", hr);
memset(buff, 0xcf, sizeof(buff)); hr = IDWriteGlyphRunAnalysis_CreateAlphaTexture(analysis, DWRITE_TEXTURE_ALIASED_1x1, NULL, buff, 0); - ok(hr == E_INVALIDARG, "got 0x%08x\n", hr); + ok(hr == E_INVALIDARG, "got 0x%08lx\n", hr); ok(buff[0] == 0xcf, "got %1x\n", buff[0]);
/* buffer size is not enough */ memset(buff, 0xcf, sizeof(buff)); hr = IDWriteGlyphRunAnalysis_CreateAlphaTexture(analysis, DWRITE_TEXTURE_ALIASED_1x1, &bounds, buff, size-1); - ok(hr == E_NOT_SUFFICIENT_BUFFER, "got 0x%08x\n", hr); + ok(hr == E_NOT_SUFFICIENT_BUFFER, "got 0x%08lx\n", hr); ok(buff[0] == 0xcf, "got %1x\n", buff[0]);
/* request texture for rectangle that doesn't intersect */ @@ -7417,14 +7417,14 @@ static void test_CreateAlphaTexture(void) r = bounds; OffsetRect(&r, (bounds.right - bounds.left)*2, 0); hr = IDWriteGlyphRunAnalysis_CreateAlphaTexture(analysis, DWRITE_TEXTURE_ALIASED_1x1, &r, buff, sizeof(buff)); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(buff[0] == 0, "got %1x\n", buff[0]);
memset(buff, 0xcf, sizeof(buff)); r = bounds; OffsetRect(&r, (bounds.right - bounds.left)*2, 0); hr = IDWriteGlyphRunAnalysis_CreateAlphaTexture(analysis, DWRITE_TEXTURE_ALIASED_1x1, &r, buff, sizeof(buff)); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(buff[0] == 0, "got %1x\n", buff[0]);
/* request texture for rectangle that doesn't intersect, small buffer */ @@ -7432,19 +7432,19 @@ static void test_CreateAlphaTexture(void) r = bounds; OffsetRect(&r, (bounds.right - bounds.left)*2, 0); hr = IDWriteGlyphRunAnalysis_CreateAlphaTexture(analysis, DWRITE_TEXTURE_ALIASED_1x1, &r, buff, size-1); - ok(hr == E_NOT_SUFFICIENT_BUFFER, "got 0x%08x\n", hr); + ok(hr == E_NOT_SUFFICIENT_BUFFER, "got 0x%08lx\n", hr); ok(buff[0] == 0xcf, "got %1x\n", buff[0]);
/* vista version allows texture type mismatch, mark it broken for now */ memset(buff, 0xcf, sizeof(buff)); hr = IDWriteGlyphRunAnalysis_CreateAlphaTexture(analysis, DWRITE_TEXTURE_CLEARTYPE_3x1, &bounds, buff, sizeof(buff)); - ok(hr == DWRITE_E_UNSUPPORTEDOPERATION || broken(hr == S_OK), "got 0x%08x\n", hr); + ok(hr == DWRITE_E_UNSUPPORTEDOPERATION || broken(hr == S_OK), "got 0x%08lx\n", hr); ok(buff[0] == 0xcf || broken(buff[0] == 0), "got %1x\n", buff[0]);
IDWriteGlyphRunAnalysis_Release(analysis); IDWriteFontFace_Release(fontface); ref = IDWriteFactory_Release(factory); - ok(ref == 0, "factory not released, %u\n", ref); + ok(ref == 0, "factory not released, %lu\n", ref); }
static BOOL get_expected_is_symbol(IDWriteFontFace *fontface) @@ -7460,7 +7460,7 @@ static BOOL get_expected_is_symbol(IDWriteFontFace *fontface) HRESULT hr;
hr = IDWriteFontFace_TryGetFontTable(fontface, MS_OS2_TAG, (const void **)&tt_os2, &size, &os2_context, &exists); - ok(hr == S_OK, "Failed to get OS/2 table, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get OS/2 table, hr %#lx.\n", hr);
if (tt_os2) { @@ -7512,7 +7512,7 @@ static void test_IsSymbolFont(void) factory = create_factory();
hr = IDWriteFactory_GetSystemFontCollection(factory, &collection, FALSE); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
count = IDWriteFontCollection_GetFontFamilyCount(collection); for (i = 0; i < count; ++i) @@ -7523,10 +7523,10 @@ static void test_IsSymbolFont(void) WCHAR nameW[256];
hr = IDWriteFontCollection_GetFontFamily(collection, i, &family); - ok(hr == S_OK, "Failed to get family, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get family, hr %#lx.\n", hr);
hr = IDWriteFontFamily_GetFamilyNames(family, &names); - ok(hr == S_OK, "Failed to get names, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get names, hr %#lx.\n", hr); get_enus_string(names, nameW, ARRAY_SIZE(nameW)); IDWriteLocalizedStrings_Release(names);
@@ -7537,10 +7537,10 @@ static void test_IsSymbolFont(void) BOOL is_symbol_font, is_symbol_face, is_symbol_expected;
hr = IDWriteFontFamily_GetFont(family, j, &font); - ok(hr == S_OK, "Failed to get font, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get font, hr %#lx.\n", hr);
hr = IDWriteFont_CreateFontFace(font, &fontface); - ok(hr == S_OK, "Failed to create fontface, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create fontface, hr %#lx.\n", hr);
is_symbol_font = IDWriteFont_IsSymbolFont(font); is_symbol_face = IDWriteFontFace_IsSymbolFont(fontface); @@ -7560,7 +7560,7 @@ static void test_IsSymbolFont(void) IDWriteFontCollection_Release(collection);
ref = IDWriteFactory_Release(factory); - ok(ref == 0, "factory not released, %u\n", ref); + ok(ref == 0, "factory not released, %lu\n", ref); }
struct CPAL_Header_0 @@ -7595,30 +7595,30 @@ static void test_GetPaletteEntries(void) IDWriteFontFace_Release(fontface); if (hr != S_OK) { ref = IDWriteFactory_Release(factory); - ok(ref == 0, "factory not released, %u\n", ref); + ok(ref == 0, "factory not released, %lu\n", ref); win_skip("GetPaletteEntries() is not supported.\n"); return; }
hr = IDWriteFontFace2_GetPaletteEntries(fontface2, 0, 0, 1, &color); - ok(hr == DWRITE_E_NOCOLOR, "got 0x%08x\n", hr); + ok(hr == DWRITE_E_NOCOLOR, "got 0x%08lx\n", hr); IDWriteFontFace2_Release(fontface2);
/* Segoe UI Emoji, with color support */ font = get_font(factory, L"Segoe UI Emoji", DWRITE_FONT_STYLE_NORMAL); if (!font) { ref = IDWriteFactory_Release(factory); - ok(ref == 0, "factory not released, %u\n", ref); + ok(ref == 0, "factory not released, %lu\n", ref); skip("Segoe UI Emoji font not found.\n"); return; }
hr = IDWriteFont_CreateFontFace(font, &fontface); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); IDWriteFont_Release(font);
hr = IDWriteFontFace_QueryInterface(fontface, &IID_IDWriteFontFace2, (void**)&fontface2); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); IDWriteFontFace_Release(fontface);
palettecount = IDWriteFontFace2_GetColorPaletteCount(fontface2); @@ -7629,7 +7629,7 @@ static void test_GetPaletteEntries(void)
exists = FALSE; hr = IDWriteFontFace2_TryGetFontTable(fontface2, MS_CPAL_TAG, (const void**)&cpal_header, &size, &ctxt, &exists); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(exists, "got %d\n", exists); colorrecords = GET_BE_WORD(cpal_header->numColorRecords); ok(colorrecords >= 1, "got %u\n", colorrecords); @@ -7637,33 +7637,33 @@ static void test_GetPaletteEntries(void) /* invalid palette index */ color.r = color.g = color.b = color.a = 123.0; hr = IDWriteFontFace2_GetPaletteEntries(fontface2, palettecount, 0, 1, &color); - ok(hr == DWRITE_E_NOCOLOR, "got 0x%08x\n", hr); + ok(hr == DWRITE_E_NOCOLOR, "got 0x%08lx\n", hr); ok(color.r == 123.0 && color.g == 123.0 && color.b == 123.0 && color.a == 123.0, "got wrong color %.2fx%.2fx%.2fx%.2f\n", color.r, color.g, color.b, color.a);
/* invalid entry index */ color.r = color.g = color.b = color.a = 123.0; hr = IDWriteFontFace2_GetPaletteEntries(fontface2, 0, entrycount, 1, &color); - ok(hr == E_INVALIDARG, "got 0x%08x\n", hr); + ok(hr == E_INVALIDARG, "got 0x%08lx\n", hr); ok(color.r == 123.0 && color.g == 123.0 && color.b == 123.0 && color.a == 123.0, "got wrong color %.2fx%.2fx%.2fx%.2f\n", color.r, color.g, color.b, color.a);
color.r = color.g = color.b = color.a = 123.0; hr = IDWriteFontFace2_GetPaletteEntries(fontface2, 0, entrycount - 1, 1, &color); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(color.r != 123.0 && color.g != 123.0 && color.b != 123.0 && color.a != 123.0, "got wrong color %.2fx%.2fx%.2fx%.2f\n", color.r, color.g, color.b, color.a);
/* zero return length */ color.r = color.g = color.b = color.a = 123.0; hr = IDWriteFontFace2_GetPaletteEntries(fontface2, 0, 0, 0, &color); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(color.r == 123.0 && color.g == 123.0 && color.b == 123.0 && color.a == 123.0, "got wrong color %.2fx%.2fx%.2fx%.2f\n", color.r, color.g, color.b, color.a);
IDWriteFontFace2_Release(fontface2); ref = IDWriteFactory_Release(factory); - ok(ref == 0, "factory not released, %u\n", ref); + ok(ref == 0, "factory not released, %lu\n", ref); }
static void test_TranslateColorGlyphRun(void) @@ -7695,7 +7695,7 @@ static void test_TranslateColorGlyphRun(void)
codepoints[0] = 'A'; hr = IDWriteFontFace_GetGlyphIndices(fontface, codepoints, 1, glyphs); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
run.fontFace = fontface; run.fontEmSize = 20.0f; @@ -7709,7 +7709,7 @@ static void test_TranslateColorGlyphRun(void) layers = (void*)0xdeadbeef; hr = IDWriteFactory2_TranslateColorGlyphRun(factory, 0.0f, 0.0f, &run, NULL, DWRITE_MEASURING_MODE_NATURAL, NULL, 0, &layers); - ok(hr == DWRITE_E_NOCOLOR, "got 0x%08x\n", hr); + ok(hr == DWRITE_E_NOCOLOR, "got 0x%08lx\n", hr); ok(layers == NULL, "got %p\n", layers); IDWriteFontFace_Release(fontface);
@@ -7722,19 +7722,19 @@ static void test_TranslateColorGlyphRun(void) }
hr = IDWriteFont_CreateFontFace(font, &fontface); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); IDWriteFont_Release(font);
codepoints[0] = 0x26c4; hr = IDWriteFontFace_GetGlyphIndices(fontface, codepoints, 1, glyphs); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
run.fontFace = fontface;
layers = NULL; hr = IDWriteFactory2_TranslateColorGlyphRun(factory, 0.0f, 0.0f, &run, NULL, DWRITE_MEASURING_MODE_NATURAL, NULL, 0, &layers); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(layers != NULL, "got %p\n", layers);
hr = IDWriteColorGlyphRunEnumerator_QueryInterface(layers, &IID_IDWriteColorGlyphRunEnumerator1, (void **)&layers1); @@ -7748,13 +7748,13 @@ static void test_TranslateColorGlyphRun(void) { hasrun = FALSE; hr = IDWriteColorGlyphRunEnumerator_MoveNext(layers, &hasrun); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
if (!hasrun) break;
hr = IDWriteColorGlyphRunEnumerator_GetCurrentRun(layers, &colorrun); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); ok(colorrun->glyphRun.fontFace == fontface, "Unexpected fontface %p.\n", colorrun->glyphRun.fontFace); ok(colorrun->glyphRun.fontEmSize == 20.0f, "got wrong font size %f\n", colorrun->glyphRun.fontEmSize); ok(colorrun->glyphRun.glyphCount == 1, "Unexpected glyph count %u.\n", colorrun->glyphRun.glyphCount); @@ -7765,7 +7765,7 @@ static void test_TranslateColorGlyphRun(void) if (layers1) { hr = IDWriteColorGlyphRunEnumerator1_GetCurrentRun(layers1, &colorrun1); - ok(hr == S_OK, "Failed to get color runt, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get color runt, hr %#lx.\n", hr); ok((const DWRITE_COLOR_GLYPH_RUN *)colorrun1 == colorrun, "Unexpected pointer.\n"); ok(colorrun1->glyphImageFormat == (DWRITE_GLYPH_IMAGE_FORMATS_TRUETYPE | DWRITE_GLYPH_IMAGE_FORMATS_COLR) || colorrun1->glyphImageFormat == DWRITE_GLYPH_IMAGE_FORMATS_NONE, @@ -7777,12 +7777,12 @@ static void test_TranslateColorGlyphRun(void)
/* iterated all way through */ hr = IDWriteColorGlyphRunEnumerator_GetCurrentRun(layers, &colorrun); - ok(hr == E_NOT_VALID_STATE, "got 0x%08x\n", hr); + ok(hr == E_NOT_VALID_STATE, "got 0x%08lx\n", hr);
if (layers1) { hr = IDWriteColorGlyphRunEnumerator1_GetCurrentRun(layers1, &colorrun1); - ok(hr == E_NOT_VALID_STATE, "Unexpected hr %#x.\n", hr); + ok(hr == E_NOT_VALID_STATE, "Unexpected hr %#lx.\n", hr); }
IDWriteColorGlyphRunEnumerator_Release(layers); @@ -7790,33 +7790,33 @@ static void test_TranslateColorGlyphRun(void) IDWriteColorGlyphRunEnumerator1_Release(layers1);
hr = IDWriteFontFace_QueryInterface(fontface, &IID_IDWriteFontFace2, (void**)&fontface2); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
/* invalid palette index */ layers = (void*)0xdeadbeef; hr = IDWriteFactory2_TranslateColorGlyphRun(factory, 0.0f, 0.0f, &run, NULL, DWRITE_MEASURING_MODE_NATURAL, NULL, IDWriteFontFace2_GetColorPaletteCount(fontface2), &layers); - ok(hr == DWRITE_E_NOCOLOR, "got 0x%08x\n", hr); + ok(hr == DWRITE_E_NOCOLOR, "got 0x%08lx\n", hr); ok(layers == NULL, "got %p\n", layers);
layers = NULL; hr = IDWriteFactory2_TranslateColorGlyphRun(factory, 0.0f, 0.0f, &run, NULL, DWRITE_MEASURING_MODE_NATURAL, NULL, IDWriteFontFace2_GetColorPaletteCount(fontface2) - 1, &layers); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); IDWriteColorGlyphRunEnumerator_Release(layers);
/* color font, glyph without color info */ codepoints[0] = 'A'; hr = IDWriteFontFace_GetGlyphIndices(fontface, codepoints, 1, glyphs); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(!!*glyphs, "Unexpected glyph.\n");
layers = (void*)0xdeadbeef; hr = IDWriteFactory2_TranslateColorGlyphRun(factory, 0.0f, 0.0f, &run, NULL, DWRITE_MEASURING_MODE_NATURAL, NULL, 0, &layers); - ok(hr == DWRITE_E_NOCOLOR, "got 0x%08x\n", hr); + ok(hr == DWRITE_E_NOCOLOR, "got 0x%08lx\n", hr); ok(layers == NULL, "got %p\n", layers);
/* one glyph with, one without */ @@ -7824,14 +7824,14 @@ static void test_TranslateColorGlyphRun(void) codepoints[1] = 0x26c4;
hr = IDWriteFontFace_GetGlyphIndices(fontface, codepoints, 2, glyphs); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
run.glyphCount = 2;
layers = NULL; hr = IDWriteFactory2_TranslateColorGlyphRun(factory, 0.0f, 0.0f, &run, NULL, DWRITE_MEASURING_MODE_NATURAL, NULL, 0, &layers); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(layers != NULL, "got %p\n", layers);
hr = IDWriteColorGlyphRunEnumerator_QueryInterface(layers, &IID_IDWriteColorGlyphRunEnumerator1, (void **)&layers1); @@ -7841,13 +7841,13 @@ static void test_TranslateColorGlyphRun(void) { hasrun = FALSE; hr = IDWriteColorGlyphRunEnumerator1_MoveNext(layers1, &hasrun); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
if (!hasrun) break;
hr = IDWriteColorGlyphRunEnumerator1_GetCurrentRun(layers1, &colorrun1); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); ok(!!colorrun1->glyphRun.fontFace, "Unexpected fontface %p.\n", colorrun1->glyphRun.fontFace); ok(colorrun1->glyphRun.fontEmSize == 20.0f, "got wrong font size %f\n", colorrun1->glyphRun.fontEmSize); ok(colorrun1->glyphRun.glyphCount > 0, "Unexpected glyph count %u.\n", colorrun1->glyphRun.glyphCount); @@ -7873,31 +7873,31 @@ static void test_TranslateColorGlyphRun(void) origin.x = origin.y = 0.0f; hr = IDWriteFactory4_TranslateColorGlyphRun(factory4, origin, &run, NULL, DWRITE_GLYPH_IMAGE_FORMATS_NONE, DWRITE_MEASURING_MODE_NATURAL, NULL, 0, &layers1); - ok(hr == DWRITE_E_NOCOLOR, "Unexpected hr %#x.\n", hr); + ok(hr == DWRITE_E_NOCOLOR, "Unexpected hr %#lx.\n", hr);
hr = IDWriteFactory4_TranslateColorGlyphRun(factory4, origin, &run, NULL, DWRITE_GLYPH_IMAGE_FORMATS_TRUETYPE, DWRITE_MEASURING_MODE_NATURAL, NULL, 0, &layers1); - ok(hr == DWRITE_E_NOCOLOR, "Unexpected hr %#x.\n", hr); + ok(hr == DWRITE_E_NOCOLOR, "Unexpected hr %#lx.\n", hr);
hr = IDWriteFactory4_TranslateColorGlyphRun(factory4, origin, &run, NULL, DWRITE_GLYPH_IMAGE_FORMATS_CFF, DWRITE_MEASURING_MODE_NATURAL, NULL, 0, &layers1); - ok(hr == DWRITE_E_NOCOLOR, "Unexpected hr %#x.\n", hr); + ok(hr == DWRITE_E_NOCOLOR, "Unexpected hr %#lx.\n", hr);
hr = IDWriteFactory4_TranslateColorGlyphRun(factory4, origin, &run, NULL, DWRITE_GLYPH_IMAGE_FORMATS_COLR, DWRITE_MEASURING_MODE_NATURAL, NULL, 0, &layers1); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
for (;;) { hasrun = FALSE; hr = IDWriteColorGlyphRunEnumerator1_MoveNext(layers1, &hasrun); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
if (!hasrun) break;
hr = IDWriteColorGlyphRunEnumerator1_GetCurrentRun(layers1, &colorrun1); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); ok(!!colorrun1->glyphRun.fontFace, "Unexpected fontface %p.\n", colorrun1->glyphRun.fontFace); ok(colorrun1->glyphRun.fontEmSize == 20.0f, "got wrong font size %f\n", colorrun1->glyphRun.fontEmSize); ok(colorrun1->glyphRun.glyphCount > 0, "Unexpected glyph count %u.\n", colorrun1->glyphRun.glyphCount); @@ -7921,7 +7921,7 @@ static void test_TranslateColorGlyphRun(void) IDWriteFontFace2_Release(fontface2); IDWriteFontFace_Release(fontface); ref = IDWriteFactory2_Release(factory); - ok(ref == 0, "factory not released, %u\n", ref); + ok(ref == 0, "factory not released, %lu\n", ref); }
static void test_HasCharacter(void) @@ -7943,7 +7943,7 @@ static void test_HasCharacter(void) hr = IDWriteFactory_QueryInterface(factory, &IID_IDWriteFactory3, (void**)&factory3); if (hr == S_OK) { hr = IDWriteFont_QueryInterface(font, &IID_IDWriteFont3, (void**)&font3); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
ret = IDWriteFont3_HasCharacter(font3, 'A'); ok(ret, "got %d\n", ret); @@ -7956,7 +7956,7 @@ static void test_HasCharacter(void)
IDWriteFont_Release(font); ref = IDWriteFactory_Release(factory); - ok(ref == 0, "factory not released, %u\n", ref); + ok(ref == 0, "factory not released, %lu\n", ref); }
static BOOL has_main_axis_values(const DWRITE_FONT_AXIS_VALUE *values, unsigned int count) @@ -8003,47 +8003,47 @@ static void test_CreateFontFaceReference(void) path = create_testfontfile(test_fontfile);
hr = IDWriteFactory3_CreateFontFaceReference(factory, NULL, NULL, 0, DWRITE_FONT_SIMULATIONS_NONE, &ref); - ok(hr == E_INVALIDARG, "got 0x%08x\n", hr); + ok(hr == E_INVALIDARG, "got 0x%08lx\n", hr);
/* out of range simulation flags */ hr = IDWriteFactory3_CreateFontFaceReference(factory, path, NULL, 0, ~0u, &ref); - ok(hr == E_INVALIDARG, "got 0x%08x\n", hr); + ok(hr == E_INVALIDARG, "got 0x%08lx\n", hr);
/* test file is not a collection, but reference could still be created with non-zero face index */ hr = IDWriteFactory3_CreateFontFaceReference(factory, path, NULL, 1, DWRITE_FONT_SIMULATIONS_NONE, &ref); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
index = IDWriteFontFaceReference_GetFontFaceIndex(ref); ok(index == 1, "got %u\n", index);
hr = IDWriteFontFaceReference_GetFontFile(ref, &file); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); IDWriteFontFile_Release(file);
hr = IDWriteFontFaceReference_CreateFontFace(ref, &fontface); todo_wine - ok(hr == DWRITE_E_FILEFORMAT, "got 0x%08x\n", hr); + ok(hr == DWRITE_E_FILEFORMAT, "got 0x%08lx\n", hr);
IDWriteFontFaceReference_Release(ref);
/* path however has to be valid */ hr = IDWriteFactory3_CreateFontFaceReference(factory, L"dummy", NULL, 0, DWRITE_FONT_SIMULATIONS_NONE, &ref); todo_wine - ok(hr == DWRITE_E_FILENOTFOUND, "got 0x%08x\n", hr); + ok(hr == DWRITE_E_FILENOTFOUND, "got 0x%08lx\n", hr); if (hr == S_OK) IDWriteFontFaceReference_Release(ref);
EXPECT_REF(factory, 1); hr = IDWriteFactory3_CreateFontFaceReference(factory, path, NULL, 0, DWRITE_FONT_SIMULATIONS_NONE, &ref); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); EXPECT_REF(factory, 2);
/* new file is returned */ hr = IDWriteFontFaceReference_GetFontFile(ref, &file); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
hr = IDWriteFontFaceReference_GetFontFile(ref, &file1); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(file != file1, "got %p, previous file %p\n", file1, file);
IDWriteFontFile_Release(file); @@ -8051,15 +8051,15 @@ static void test_CreateFontFaceReference(void)
/* references are not reused */ hr = IDWriteFactory3_CreateFontFaceReference(factory, path, NULL, 0, DWRITE_FONT_SIMULATIONS_NONE, &ref1); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(ref1 != ref, "got %p, previous ref %p\n", ref1, ref);
/* created fontfaces are cached */ hr = IDWriteFontFaceReference_CreateFontFace(ref, &fontface); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
hr = IDWriteFontFaceReference_CreateFontFace(ref1, &fontface1); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(fontface == fontface1, "got %p, expected %p\n", fontface1, fontface); IDWriteFontFace3_Release(fontface); IDWriteFontFace3_Release(fontface1); @@ -8070,13 +8070,13 @@ static void test_CreateFontFaceReference(void) IDWriteFontFaceReference_Release(ref1);
hr = IDWriteFactory3_CreateFontFaceReference(factory, path, NULL, 1, DWRITE_FONT_SIMULATIONS_NONE, &ref1); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ret = IDWriteFontFaceReference_Equals(ref, ref1); ok(!ret, "got %d\n", ret); IDWriteFontFaceReference_Release(ref1);
hr = IDWriteFactory3_CreateFontFaceReference(factory, path, NULL, 0, DWRITE_FONT_SIMULATIONS_BOLD, &ref1); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ret = IDWriteFontFaceReference_Equals(ref, ref1); ok(!ret, "got %d\n", ret); IDWriteFontFaceReference_Release(ref1); @@ -8085,13 +8085,13 @@ static void test_CreateFontFaceReference(void)
/* create reference from a file */ hr = IDWriteFactory3_CreateFontFileReference(factory, path, NULL, &file); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
hr = IDWriteFactory3_CreateFontFaceReference_(factory, file, 0, DWRITE_FONT_SIMULATIONS_NONE, &ref); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
hr = IDWriteFontFaceReference_GetFontFile(ref, &file1); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(file != file1, "got %p, previous file %p\n", file1, file);
IDWriteFontFaceReference_Release(ref); @@ -8100,7 +8100,7 @@ static void test_CreateFontFaceReference(void)
/* References returned from IDWriteFont3/IDWriteFontFace3. */ hr = IDWriteFactory3_GetSystemFontCollection(factory, FALSE, &collection, FALSE); - ok(hr == S_OK, "Failed to get system collection, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get system collection, hr %#lx.\n", hr);
count = IDWriteFontCollection1_GetFontFamilyCount(collection); for (i = 0; i < count; i++) @@ -8109,7 +8109,7 @@ static void test_CreateFontFaceReference(void) UINT32 font_count, j;
hr = IDWriteFontCollection1_GetFontFamily(collection, i, &family); - ok(hr == S_OK, "Failed to get family, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get family, hr %#lx.\n", hr);
font_count = IDWriteFontFamily1_GetFontCount(family);
@@ -8118,17 +8118,17 @@ static void test_CreateFontFaceReference(void) IDWriteFontFaceReference1 *ref2;
hr = IDWriteFontFamily1_GetFont(family, j, &font3); - ok(hr == S_OK, "Failed to get font, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get font, hr %#lx.\n", hr);
hr = IDWriteFont3_GetFontFaceReference(font3, &ref); - ok(hr == S_OK, "Failed to get reference object, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get reference object, hr %#lx.\n", hr);
hr = IDWriteFont3_GetFontFaceReference(font3, &ref1); - ok(hr == S_OK, "Failed to get reference object, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get reference object, hr %#lx.\n", hr); ok(ref != ref1, "Unexpected reference object %p, %p.\n", ref1, ref);
hr = IDWriteFont3_CreateFontFace(font3, &fontface); - ok(hr == S_OK, "Failed to create a fontface, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create a fontface, hr %#lx.\n", hr);
/* Fonts present regular properties as axis values, for non-variable fonts too. Normally it would include weight/width/slant/italic, but could also contain optical size axis. */ @@ -8140,7 +8140,7 @@ static void test_CreateFontFaceReference(void) ok(axis_count >= 4, "Unexpected axis value count.\n");
hr = IDWriteFontFaceReference1_GetFontAxisValues(ref2, axis_values, ARRAY_SIZE(axis_values)); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
todo_wine ok(has_main_axis_values(axis_values, axis_count), "Unexpected axis returned.\n"); @@ -8152,16 +8152,16 @@ static void test_CreateFontFaceReference(void) IDWriteFontFaceReference_Release(ref1);
hr = IDWriteFontFace3_GetFontFaceReference(fontface, &ref); - ok(hr == S_OK, "Failed to get a reference, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get a reference, hr %#lx.\n", hr); EXPECT_REF(fontface, 2);
hr = IDWriteFontFace3_GetFontFaceReference(fontface, &ref1); - ok(hr == S_OK, "Failed to get a reference, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get a reference, hr %#lx.\n", hr); ok(ref == ref1, "Unexpected reference %p, %p.\n", ref1, ref); EXPECT_REF(fontface, 3);
hr = IDWriteFontFace3_QueryInterface(fontface, &IID_IDWriteFontFaceReference, (void **)&ref3); - ok(hr == S_OK || broken(FAILED(hr)), "Failed to get interface, hr %#x.\n", hr); + ok(hr == S_OK || broken(FAILED(hr)), "Failed to get interface, hr %#lx.\n", hr); if (SUCCEEDED(hr)) { ok(ref == ref3, "Unexpected reference %p.\n", ref3); @@ -8169,7 +8169,7 @@ static void test_CreateFontFaceReference(void) }
hr = IDWriteFontFaceReference_CreateFontFace(ref, &fontface1); - ok(hr == S_OK, "Failed to create fontface, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create fontface, hr %#lx.\n", hr); ok(fontface1 == fontface, "Unexpected fontface %p, %p.\n", fontface1, fontface); IDWriteFontFace3_Release(fontface1);
@@ -8185,7 +8185,7 @@ static void test_CreateFontFaceReference(void) IDWriteFontCollection1_Release(collection);
refcount = IDWriteFactory3_Release(factory); - ok(refcount == 0, "factory not released, %u\n", refcount); + ok(refcount == 0, "factory not released, %lu\n", refcount); DELETE_FONTFILE(path); }
@@ -8201,10 +8201,10 @@ static void get_expected_fontsig(IDWriteFont *font, FONTSIGNATURE *fontsig) memset(fontsig, 0, sizeof(*fontsig));
hr = IDWriteFont_CreateFontFace(font, &fontface); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
hr = IDWriteFontFace_TryGetFontTable(fontface, MS_OS2_TAG, (const void **)&tt_os2, &size, &os2_context, &exists); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
if (tt_os2) { fontsig->fsUsb[0] = GET_BE_DWORD(tt_os2->ulUnicodeRange1); @@ -8241,7 +8241,7 @@ static void test_GetFontSignature(void) factory = create_factory();
hr = IDWriteFactory_GetGdiInterop(factory, &interop); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
hr = IDWriteGdiInterop_QueryInterface(interop, &IID_IDWriteGdiInterop1, (void**)&interop1); IDWriteGdiInterop_Release(interop); @@ -8251,13 +8251,13 @@ static void test_GetFontSignature(void) IDWriteFactory_Release(factory); return; }; - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
hr = IDWriteGdiInterop1_GetFontSignature(interop1, NULL, &fontsig); - ok(hr == E_INVALIDARG, "got 0x%08x\n", hr); + ok(hr == E_INVALIDARG, "got 0x%08lx\n", hr);
hr = IDWriteFactory_GetSystemFontCollection(factory, &syscollection, FALSE); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); count = IDWriteFontCollection_GetFontFamilyCount(syscollection);
for (i = 0; i < count; i++) { @@ -8268,38 +8268,38 @@ static void test_GetFontSignature(void) WCHAR nameW[256];
hr = IDWriteFontCollection_GetFontFamily(syscollection, i, &family); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
hr = IDWriteFontFamily_GetFirstMatchingFont(family, DWRITE_FONT_WEIGHT_NORMAL, DWRITE_FONT_STRETCH_NORMAL, DWRITE_FONT_STYLE_NORMAL, &font); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
hr = IDWriteFontFamily_GetFamilyNames(family, &names); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
get_enus_string(names, nameW, ARRAY_SIZE(nameW));
IDWriteLocalizedStrings_Release(names);
hr = IDWriteGdiInterop1_GetFontSignature(interop1, font, &fontsig); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
get_expected_fontsig(font, &expected_signature);
winetest_push_context("Font %s\n", wine_dbgstr_w(nameW));
- ok(fontsig.fsUsb[0] == expected_signature.fsUsb[0], "fsUsb[0] %#x, expected %#x.\n", + ok(fontsig.fsUsb[0] == expected_signature.fsUsb[0], "fsUsb[0] %#lx, expected %#lx.\n", fontsig.fsUsb[0], expected_signature.fsUsb[0]); - ok(fontsig.fsUsb[1] == expected_signature.fsUsb[1], "fsUsb[1] %#x, expected %#x.\n", + ok(fontsig.fsUsb[1] == expected_signature.fsUsb[1], "fsUsb[1] %#lx, expected %#lx.\n", fontsig.fsUsb[1], expected_signature.fsUsb[1]); - ok(fontsig.fsUsb[2] == expected_signature.fsUsb[2], "fsUsb[2] %#x, expected %#x.\n", + ok(fontsig.fsUsb[2] == expected_signature.fsUsb[2], "fsUsb[2] %#lx, expected %#lx.\n", fontsig.fsUsb[2], expected_signature.fsUsb[2]); - ok(fontsig.fsUsb[3] == expected_signature.fsUsb[3], "fsUsb[3] %#x, expected %#x.\n", + ok(fontsig.fsUsb[3] == expected_signature.fsUsb[3], "fsUsb[3] %#lx, expected %#lx.\n", fontsig.fsUsb[3], expected_signature.fsUsb[3]);
- ok(fontsig.fsCsb[0] == expected_signature.fsCsb[0], "fsCsb[0] %#x, expected %#x.\n", + ok(fontsig.fsCsb[0] == expected_signature.fsCsb[0], "fsCsb[0] %#lx, expected %#lx.\n", fontsig.fsCsb[0], expected_signature.fsCsb[0]); - ok(fontsig.fsCsb[1] == expected_signature.fsCsb[1], "fsCsb[1] %#x, expected %#x.\n", + ok(fontsig.fsCsb[1] == expected_signature.fsCsb[1], "fsCsb[1] %#lx, expected %#lx.\n", fontsig.fsCsb[1], expected_signature.fsCsb[1]);
winetest_pop_context(); @@ -8311,7 +8311,7 @@ static void test_GetFontSignature(void) IDWriteGdiInterop1_Release(interop1); IDWriteFontCollection_Release(syscollection); ref = IDWriteFactory_Release(factory); - ok(ref == 0, "factory not released, %u\n", ref); + ok(ref == 0, "factory not released, %lu\n", ref); }
static void test_font_properties(void) @@ -8333,7 +8333,7 @@ static void test_font_properties(void) ok(style == DWRITE_FONT_STYLE_OBLIQUE, "got %u\n", style);
hr = IDWriteFont_CreateFontFace(font, &fontface); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
hr = IDWriteFontFace_QueryInterface(fontface, &IID_IDWriteFontFace3, (void**)&fontface3); IDWriteFontFace_Release(fontface); @@ -8346,7 +8346,7 @@ static void test_font_properties(void)
IDWriteFont_Release(font); ref = IDWriteFactory_Release(factory); - ok(ref == 0, "factory not released, %u\n", ref); + ok(ref == 0, "factory not released, %lu\n", ref); }
static BOOL has_vertical_glyph_variants(IDWriteFontFace1 *fontface) @@ -8362,7 +8362,7 @@ static BOOL has_vertical_glyph_variants(IDWriteFontFace1 *fontface) UINT16 i;
hr = IDWriteFontFace1_TryGetFontTable(fontface, MS_GSUB_TAG, &data, &size, &context, &exists); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
if (!exists) return FALSE; @@ -8451,7 +8451,7 @@ static void test_HasVerticalGlyphVariants(void) IDWriteFontFace1_Release(fontface1);
hr = IDWriteFactory_GetSystemFontCollection(factory, &syscollection, FALSE); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); count = IDWriteFontCollection_GetFontFamilyCount(syscollection);
for (i = 0; i < count; i++) { @@ -8462,20 +8462,20 @@ static void test_HasVerticalGlyphVariants(void) WCHAR nameW[256];
hr = IDWriteFontCollection_GetFontFamily(syscollection, i, &family); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
hr = IDWriteFontFamily_GetFirstMatchingFont(family, DWRITE_FONT_WEIGHT_NORMAL, DWRITE_FONT_STRETCH_NORMAL, DWRITE_FONT_STYLE_NORMAL, &font); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
hr = IDWriteFont_CreateFontFace(font, &fontface); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
hr = IDWriteFontFace_QueryInterface(fontface, &IID_IDWriteFontFace1, (void**)&fontface1); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
hr = IDWriteFontFamily_GetFamilyNames(family, &names); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
get_enus_string(names, nameW, ARRAY_SIZE(nameW));
@@ -8495,7 +8495,7 @@ static void test_HasVerticalGlyphVariants(void)
IDWriteFontCollection_Release(syscollection); ref = IDWriteFactory_Release(factory); - ok(ref == 0, "factory not released, %u\n", ref); + ok(ref == 0, "factory not released, %lu\n", ref); }
static void test_HasKerningPairs(void) @@ -8521,7 +8521,7 @@ static void test_HasKerningPairs(void) IDWriteFontFace1_Release(fontface1);
hr = IDWriteFactory_GetSystemFontCollection(factory, &syscollection, FALSE); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); count = IDWriteFontCollection_GetFontFamilyCount(syscollection);
for (i = 0; i < count; i++) { @@ -8535,26 +8535,26 @@ static void test_HasKerningPairs(void) UINT32 size;
hr = IDWriteFontCollection_GetFontFamily(syscollection, i, &family); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
hr = IDWriteFontFamily_GetFirstMatchingFont(family, DWRITE_FONT_WEIGHT_NORMAL, DWRITE_FONT_STRETCH_NORMAL, DWRITE_FONT_STYLE_NORMAL, &font); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
hr = IDWriteFont_CreateFontFace(font, &fontface); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
hr = IDWriteFontFace_QueryInterface(fontface, &IID_IDWriteFontFace1, (void **)&fontface1); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
hr = IDWriteFontFamily_GetFamilyNames(family, &names); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
get_enus_string(names, nameW, ARRAY_SIZE(nameW));
exists = FALSE; hr = IDWriteFontFace1_TryGetFontTable(fontface1, MS_KERN_TAG, &data, &size, &context, &exists); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); IDWriteFontFace1_ReleaseFontTable(fontface1, context);
has_kerningpairs = IDWriteFontFace1_HasKerningPairs(fontface1); @@ -8571,7 +8571,7 @@ static void test_HasKerningPairs(void)
IDWriteFontCollection_Release(syscollection); ref = IDWriteFactory_Release(factory); - ok(ref == 0, "factory not released, %u\n", ref); + ok(ref == 0, "factory not released, %lu\n", ref); }
static float get_scaled_metric(const DWRITE_GLYPH_RUN *run, float metric, const DWRITE_FONT_METRICS *m) @@ -8591,7 +8591,7 @@ static void get_expected_glyph_origins(D2D1_POINT_2F baseline_origin, const DWRI
hr = IDWriteFontFace_GetDesignGlyphMetrics(run->fontFace, run->glyphIndices, run->glyphCount, glyph_metrics, run->isSideways); - ok(hr == S_OK, "Failed to get glyph metrics, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get glyph metrics, hr %#lx.\n", hr);
if (run->bidiLevel & 1) { @@ -8694,7 +8694,7 @@ static void test_ComputeGlyphOrigins(void)
memset(origins, 0, sizeof(origins)); hr = IDWriteFactory4_ComputeGlyphOrigins_(factory, &run, origins_tests[i].baseline_origin, origins); - ok(hr == S_OK, "%u: failed to compute glyph origins, hr %#x.\n", i, hr); + ok(hr == S_OK, "%u: failed to compute glyph origins, hr %#lx.\n", i, hr); for (j = 0; j < run.glyphCount; ++j) { todo_wine_if(run.isSideways) @@ -8723,7 +8723,7 @@ static void test_ComputeGlyphOrigins(void)
memset(origins, 0, sizeof(origins)); hr = IDWriteFactory4_ComputeGlyphOrigins_(factory, &run, baseline_origin, origins); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(origins[0].x == 123.0f && origins[0].y == 321.0f, "origins[0] %f,%f\n", origins[0].x, origins[0].y); ok(origins[1].x == 133.0f && origins[1].y == 321.0f, "origins[1] %f,%f\n", origins[1].x, origins[1].y);
@@ -8748,7 +8748,7 @@ static void test_ComputeGlyphOrigins(void) ok(origins[1].x == 133.0f && origins[1].y == 321.0f, "origins[1] %f,%f\n", origins[1].x, origins[1].y);
ref = IDWriteFactory4_Release(factory); - ok(ref == 0, "factory not released, %u\n", ref); + ok(ref == 0, "factory not released, %lu\n", ref); }
static void test_object_lifetime(void) @@ -8768,13 +8768,13 @@ static void test_object_lifetime(void)
/* system collection takes factory reference */ hr = IDWriteFactory_GetSystemFontCollection(factory, &collection, FALSE); - ok(hr == S_OK, "got %#x\n", hr); + ok(hr == S_OK, "got %#lx\n", hr);
EXPECT_REF(collection, 1); EXPECT_REF(factory, 2);
hr = IDWriteFactory_GetSystemFontCollection(factory, &collection2, FALSE); - ok(hr == S_OK, "got %#x\n", hr); + ok(hr == S_OK, "got %#lx\n", hr); ok(collection2 == collection, "expected same collection\n");
EXPECT_REF(collection, 2); @@ -8791,14 +8791,14 @@ static void test_object_lifetime(void)
/* family takes collection reference */ hr = IDWriteFontCollection_GetFontFamily(collection, 0, &family); - ok(hr == S_OK, "got %#x\n", hr); + ok(hr == S_OK, "got %#lx\n", hr);
EXPECT_REF(family, 1); EXPECT_REF(collection, 2); EXPECT_REF(factory, 2);
hr = IDWriteFontCollection_GetFontFamily(collection, 0, &family2); - ok(hr == S_OK, "got %#x\n", hr); + ok(hr == S_OK, "got %#lx\n", hr);
EXPECT_REF(family2, 1); EXPECT_REF(collection, 3); @@ -8813,14 +8813,14 @@ static void test_object_lifetime(void) /* font takes family reference */ hr = IDWriteFontFamily_GetFirstMatchingFont(family, DWRITE_FONT_WEIGHT_NORMAL, DWRITE_FONT_STRETCH_NORMAL, DWRITE_FONT_STYLE_NORMAL, &font); - ok(hr == S_OK, "got %#x\n", hr); + ok(hr == S_OK, "got %#lx\n", hr);
EXPECT_REF(family, 2); EXPECT_REF(collection, 2); EXPECT_REF(factory, 2);
hr = IDWriteFont_GetFontFamily(font, &family2); - ok(hr == S_OK, "got %#x\n", hr); + ok(hr == S_OK, "got %#lx\n", hr); ok(family2 == family, "unexpected family pointer\n"); IDWriteFontFamily_Release(family2);
@@ -8829,7 +8829,7 @@ static void test_object_lifetime(void)
/* Fontface takes factory reference and nothing else. */ hr = IDWriteFont_CreateFontFace(font, &fontface); - ok(hr == S_OK, "got %#x\n", hr); + ok(hr == S_OK, "got %#lx\n", hr);
EXPECT_REF(font, 1); EXPECT_REF_BROKEN(fontface, 1, 2); @@ -8839,7 +8839,7 @@ static void test_object_lifetime(void)
/* get font from fontface */ hr = IDWriteFontCollection_GetFontFromFontFace(collection, fontface, &font2); - ok(hr == S_OK, "got %#x\n", hr); + ok(hr == S_OK, "got %#lx\n", hr);
EXPECT_REF(font, 1); EXPECT_REF(font2, 1); @@ -8865,7 +8865,7 @@ static void test_object_lifetime(void) /* Matching fonts list takes family reference. */ hr = IDWriteFontFamily_GetMatchingFonts(family, DWRITE_FONT_WEIGHT_NORMAL, DWRITE_FONT_STRETCH_NORMAL, DWRITE_FONT_STYLE_NORMAL, &fontlist); - ok(hr == S_OK, "got %#x\n", hr); + ok(hr == S_OK, "got %#lx\n", hr);
EXPECT_REF(family, 2); EXPECT_REF(collection, 2); @@ -8873,7 +8873,7 @@ static void test_object_lifetime(void)
hr = IDWriteFontFamily_GetMatchingFonts(family, DWRITE_FONT_WEIGHT_NORMAL, DWRITE_FONT_STRETCH_NORMAL, DWRITE_FONT_STYLE_NORMAL, &fontlist2); - ok(hr == S_OK, "got %#x\n", hr); + ok(hr == S_OK, "got %#lx\n", hr); ok(fontlist2 != fontlist, "unexpected font list\n"); IDWriteFontList_Release(fontlist2);
@@ -8884,17 +8884,17 @@ static void test_object_lifetime(void)
EXPECT_REF(factory, 2); ref = IDWriteFontCollection_Release(collection); - ok(ref == 0, "collection not released, %u\n", ref); + ok(ref == 0, "collection not released, %lu\n", ref); EXPECT_REF(factory, 1);
/* GDI interop object takes factory reference */ hr = IDWriteFactory_GetGdiInterop(factory, &interop); - ok(hr == S_OK, "got %#x\n", hr); + ok(hr == S_OK, "got %#lx\n", hr); EXPECT_REF(interop, 1); EXPECT_REF(factory, 2);
hr = IDWriteFactory_GetGdiInterop(factory, &interop2); - ok(hr == S_OK, "got %#x\n", hr); + ok(hr == S_OK, "got %#lx\n", hr); ok(interop == interop2, "got unexpected interop pointer\n");
EXPECT_REF(interop, 2); @@ -8902,10 +8902,10 @@ static void test_object_lifetime(void)
IDWriteGdiInterop_Release(interop2); ref = IDWriteGdiInterop_Release(interop); - ok(ref == 0, "interop not released, %u\n", ref); + ok(ref == 0, "interop not released, %lu\n", ref);
ref = IDWriteFactory_Release(factory); - ok(ref == 0, "factory not released, %u\n", ref); + ok(ref == 0, "factory not released, %lu\n", ref); }
struct testowner_object @@ -8981,14 +8981,14 @@ static void test_inmemory_file_loader(void)
EXPECT_REF(factory, 1); hr = IDWriteFactory5_CreateInMemoryFontFileLoader(factory, &loader); - ok(hr == S_OK, "got %#x\n", hr); + ok(hr == S_OK, "got %#lx\n", hr); EXPECT_REF(factory, 1);
testowner_init(&ownerobject); fontface = create_fontface((IDWriteFactory *)factory);
hr = IDWriteFactory5_CreateInMemoryFontFileLoader(factory, &loader2); - ok(hr == S_OK, "got %#x\n", hr); + ok(hr == S_OK, "got %#lx\n", hr); ok(loader != loader2, "unexpected pointer\n"); IDWriteInMemoryFontFileLoader_Release(loader2);
@@ -9000,41 +9000,41 @@ static void test_inmemory_file_loader(void) /* Use whole font blob to construct in-memory file. */ count = 1; hr = IDWriteFontFace_GetFiles(fontface, &count, &file); - ok(hr == S_OK, "got %#x\n", hr); + ok(hr == S_OK, "got %#lx\n", hr);
hr = IDWriteFontFile_GetLoader(file, &fileloader); - ok(hr == S_OK, "got %#x\n", hr); + ok(hr == S_OK, "got %#lx\n", hr);
hr = IDWriteFontFile_GetReferenceKey(file, &key, &key_size); - ok(hr == S_OK, "got %#x\n", hr); + ok(hr == S_OK, "got %#lx\n", hr);
hr = IDWriteFontFileLoader_CreateStreamFromKey(fileloader, key, key_size, &stream); - ok(hr == S_OK, "got %#x\n", hr); + ok(hr == S_OK, "got %#lx\n", hr); IDWriteFontFileLoader_Release(fileloader); IDWriteFontFile_Release(file);
hr = IDWriteFontFileStream_GetFileSize(stream, &file_size); - ok(hr == S_OK, "got %#x\n", hr); + ok(hr == S_OK, "got %#lx\n", hr);
hr = IDWriteFontFileStream_ReadFileFragment(stream, &data, 0, file_size, &context); - ok(hr == S_OK, "got %#x\n", hr); + ok(hr == S_OK, "got %#lx\n", hr);
/* Not registered yet. */ hr = IDWriteInMemoryFontFileLoader_CreateInMemoryFontFileReference(inmemory, (IDWriteFactory *)factory, data, file_size, NULL, &file); - ok(hr == E_INVALIDARG, "got %#x\n", hr); + ok(hr == E_INVALIDARG, "got %#lx\n", hr);
count = IDWriteInMemoryFontFileLoader_GetFileCount(inmemory); ok(count == 1, "Unexpected file count %u.\n", count);
hr = IDWriteFactory5_RegisterFontFileLoader(factory, (IDWriteFontFileLoader *)inmemory); - ok(hr == S_OK, "got %#x\n", hr); + ok(hr == S_OK, "got %#lx\n", hr); EXPECT_REF(inmemory, 2);
EXPECT_REF(&ownerobject.IUnknown_iface, 1); hr = IDWriteInMemoryFontFileLoader_CreateInMemoryFontFileReference(inmemory, (IDWriteFactory *)factory, data, file_size, &ownerobject.IUnknown_iface, &file); - ok(hr == S_OK, "got %#x\n", hr); + ok(hr == S_OK, "got %#lx\n", hr); EXPECT_REF(&ownerobject.IUnknown_iface, 2); EXPECT_REF(inmemory, 3);
@@ -9043,7 +9043,7 @@ static void test_inmemory_file_loader(void)
hr = IDWriteInMemoryFontFileLoader_CreateInMemoryFontFileReference(inmemory, (IDWriteFactory *)factory, data, file_size, &ownerobject.IUnknown_iface, &file2); - ok(hr == S_OK, "got %#x\n", hr); + ok(hr == S_OK, "got %#lx\n", hr); ok(file2 != file, "got unexpected file\n"); EXPECT_REF(&ownerobject.IUnknown_iface, 3); EXPECT_REF(inmemory, 4); @@ -9053,25 +9053,25 @@ static void test_inmemory_file_loader(void)
/* Check in-memory reference key format. */ hr = IDWriteFontFile_GetReferenceKey(file, &key, &key_size); - ok(hr == S_OK, "got %#x\n", hr); + ok(hr == S_OK, "got %#lx\n", hr);
ok(key && *(DWORD*)key == 1, "got wrong ref key\n"); ok(key_size == 4, "ref key size %u\n", key_size);
hr = IDWriteFontFile_GetReferenceKey(file2, &key, &key_size); - ok(hr == S_OK, "got %#x\n", hr); + ok(hr == S_OK, "got %#lx\n", hr);
ok(key && *(DWORD*)key == 2, "got wrong ref key\n"); ok(key_size == 4, "ref key size %u\n", key_size);
EXPECT_REF(inmemory, 4); hr = IDWriteInMemoryFontFileLoader_CreateStreamFromKey(inmemory, key, key_size, &stream2); - ok(hr == S_OK, "Failed to create a stream, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create a stream, hr %#lx.\n", hr); EXPECT_REF(stream2, 1); EXPECT_REF(inmemory, 4);
hr = IDWriteInMemoryFontFileLoader_CreateStreamFromKey(inmemory, key, key_size, &stream3); - ok(hr == S_OK, "Failed to create a stream, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create a stream, hr %#lx.\n", hr);
ok(stream2 != stream3, "Unexpected stream.\n");
@@ -9081,7 +9081,7 @@ static void test_inmemory_file_loader(void) /* Release file at index 1, create new one to see if index is reused. */ EXPECT_REF(&ownerobject.IUnknown_iface, 3); ref = IDWriteFontFile_Release(file); - ok(ref == 0, "File object not released, %u.\n", ref); + ok(ref == 0, "File object not released, %lu.\n", ref); EXPECT_REF(&ownerobject.IUnknown_iface, 3);
count = IDWriteInMemoryFontFileLoader_GetFileCount(inmemory); @@ -9089,58 +9089,58 @@ static void test_inmemory_file_loader(void)
EXPECT_REF(&ownerobject.IUnknown_iface, 3); ref = IDWriteFontFile_Release(file2); - ok(ref == 0, "File object not released, %u.\n", ref); + ok(ref == 0, "File object not released, %lu.\n", ref); EXPECT_REF(&ownerobject.IUnknown_iface, 3);
count = IDWriteInMemoryFontFileLoader_GetFileCount(inmemory); ok(count == 3, "Unexpected file count %u.\n", count);
hr = IDWriteFactory5_UnregisterFontFileLoader(factory, (IDWriteFontFileLoader *)inmemory); - ok(hr == S_OK, "got %#x\n", hr); + ok(hr == S_OK, "got %#lx\n", hr); EXPECT_REF(&ownerobject.IUnknown_iface, 3);
EXPECT_REF(&ownerobject.IUnknown_iface, 3); ref = IDWriteInMemoryFontFileLoader_Release(inmemory); - ok(ref == 0, "loader not released, %u.\n", ref); + ok(ref == 0, "loader not released, %lu.\n", ref); EXPECT_REF(&ownerobject.IUnknown_iface, 1);
/* Test reference key for first added file. */ hr = IDWriteFactory5_CreateInMemoryFontFileLoader(factory, &loader); - ok(hr == S_OK, "Failed to create loader, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create loader, hr %#lx.\n", hr);
inmemory = loader;
hr = IDWriteFactory5_RegisterFontFileLoader(factory, (IDWriteFontFileLoader *)inmemory); - ok(hr == S_OK, "Failed to register loader, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to register loader, hr %#lx.\n", hr);
ref_key = 0; hr = IDWriteInMemoryFontFileLoader_CreateStreamFromKey(inmemory, &ref_key, sizeof(ref_key), &stream2); - ok(hr == E_INVALIDARG, "Unexpected hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Unexpected hr %#lx.\n", hr);
/* With owner object. */ hr = IDWriteInMemoryFontFileLoader_CreateInMemoryFontFileReference(inmemory, (IDWriteFactory *)factory, data, file_size, &ownerobject.IUnknown_iface, &file); - ok(hr == S_OK, "Failed to create in-memory file reference, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create in-memory file reference, hr %#lx.\n", hr);
ref_key = 0; hr = IDWriteInMemoryFontFileLoader_CreateStreamFromKey(inmemory, &ref_key, sizeof(ref_key), &stream2); - ok(hr == S_OK, "Failed to create a stream, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create a stream, hr %#lx.\n", hr);
context2 = (void *)0xdeadbeef; hr = IDWriteFontFileStream_ReadFileFragment(stream2, &frag_start, 0, file_size, &context2); - ok(hr == S_OK, "Failed to read a fragment, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to read a fragment, hr %#lx.\n", hr); ok(context2 == NULL, "Unexpected context %p.\n", context2); ok(frag_start == data, "Unexpected fragment pointer %p.\n", frag_start);
hr = IDWriteFontFileStream_GetFileSize(stream2, &size); - ok(hr == S_OK, "Failed to get file size, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get file size, hr %#lx.\n", hr); ok(size == file_size, "Unexpected file size.\n");
IDWriteFontFileStream_ReleaseFileFragment(stream2, context2);
writetime = 1; hr = IDWriteFontFileStream_GetLastWriteTime(stream2, &writetime); - ok(hr == E_NOTIMPL, "Unexpected hr %#x.\n", hr); + ok(hr == E_NOTIMPL, "Unexpected hr %#lx.\n", hr); ok(writetime == 0, "Unexpected writetime.\n");
IDWriteFontFileStream_Release(stream2); @@ -9148,27 +9148,27 @@ static void test_inmemory_file_loader(void) /* Without owner object. */ hr = IDWriteInMemoryFontFileLoader_CreateInMemoryFontFileReference(inmemory, (IDWriteFactory *)factory, data, file_size, NULL, &file2); - ok(hr == S_OK, "Failed to create in-memory file reference, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create in-memory file reference, hr %#lx.\n", hr);
ref_key = 1; hr = IDWriteInMemoryFontFileLoader_CreateStreamFromKey(inmemory, &ref_key, sizeof(ref_key), &stream2); - ok(hr == S_OK, "Failed to create a stream, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create a stream, hr %#lx.\n", hr);
context2 = (void *)0xdeadbeef; hr = IDWriteFontFileStream_ReadFileFragment(stream2, &frag_start, 0, file_size, &context2); - ok(hr == S_OK, "Failed to read a fragment, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to read a fragment, hr %#lx.\n", hr); ok(context2 == NULL, "Unexpected context %p.\n", context2); ok(frag_start != data, "Unexpected fragment pointer %p.\n", frag_start);
hr = IDWriteFontFileStream_GetFileSize(stream2, &size); - ok(hr == S_OK, "Failed to get file size, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get file size, hr %#lx.\n", hr); ok(size == file_size, "Unexpected file size.\n");
IDWriteFontFileStream_ReleaseFileFragment(stream2, context2);
writetime = 1; hr = IDWriteFontFileStream_GetLastWriteTime(stream2, &writetime); - ok(hr == E_NOTIMPL, "Unexpected hr %#x.\n", hr); + ok(hr == E_NOTIMPL, "Unexpected hr %#lx.\n", hr); ok(writetime == 0, "Unexpected writetime.\n");
IDWriteFontFileStream_Release(stream2); @@ -9177,21 +9177,21 @@ static void test_inmemory_file_loader(void) /* Key size validation. */ ref_key = 0; hr = IDWriteInMemoryFontFileLoader_CreateStreamFromKey(inmemory, NULL, sizeof(ref_key) - 1, &stream2); - ok(hr == E_INVALIDARG, "Unexpected hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Unexpected hr %#lx.\n", hr);
ref_key = 0; hr = IDWriteInMemoryFontFileLoader_CreateStreamFromKey(inmemory, &ref_key, sizeof(ref_key) - 1, &stream2); - ok(hr == E_INVALIDARG, "Unexpected hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Unexpected hr %#lx.\n", hr);
ref_key = 0; hr = IDWriteInMemoryFontFileLoader_CreateStreamFromKey(inmemory, &ref_key, sizeof(ref_key) + 1, &stream2); - ok(hr == E_INVALIDARG, "Unexpected hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Unexpected hr %#lx.\n", hr);
count = IDWriteInMemoryFontFileLoader_GetFileCount(inmemory); ok(count == 2, "Unexpected file count %u.\n", count);
hr = IDWriteFontFile_GetReferenceKey(file, &key, &key_size); - ok(hr == S_OK, "Failed to get reference key, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get reference key, hr %#lx.\n", hr);
ok(key && *(DWORD*)key == 0, "Unexpected reference key.\n"); ok(key_size == 4, "Unexpected key size %u.\n", key_size); @@ -9202,17 +9202,17 @@ static void test_inmemory_file_loader(void) ok(count == 2, "Unexpected file count %u.\n", count);
hr = IDWriteFactory5_UnregisterFontFileLoader(factory, (IDWriteFontFileLoader *)inmemory); - ok(hr == S_OK, "Failed to unregister loader, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to unregister loader, hr %#lx.\n", hr);
IDWriteFontFileStream_ReleaseFileFragment(stream, context); IDWriteFontFileStream_Release(stream); IDWriteFontFace_Release(fontface);
ref = IDWriteInMemoryFontFileLoader_Release(inmemory); - ok(ref == 0, "loader not released, %u.\n", ref); + ok(ref == 0, "loader not released, %lu.\n", ref);
ref = IDWriteFactory5_Release(factory); - ok(ref == 0, "factory not released, %u\n", ref); + ok(ref == 0, "factory not released, %lu\n", ref); }
static BOOL face_has_table(IDWriteFontFace4 *fontface, UINT32 tag) @@ -9224,7 +9224,7 @@ static BOOL face_has_table(IDWriteFontFace4 *fontface, UINT32 tag) HRESULT hr;
hr = IDWriteFontFace4_TryGetFontTable(fontface, tag, &data, &size, &context, &exists); - ok(hr == S_OK, "TryGetFontTable() failed, %#x\n", hr); + ok(hr == S_OK, "TryGetFontTable() failed, %#lx\n", hr); if (exists) IDWriteFontFace4_ReleaseFontTable(fontface, context);
@@ -9244,7 +9244,7 @@ static DWORD get_sbix_formats(IDWriteFontFace4 *fontface) HRESULT hr;
hr = IDWriteFontFace4_TryGetFontTable(fontface, MS_MAXP_TAG, &data, &size, &context, &exists); - ok(hr == S_OK, "TryGetFontTable() failed, %#x\n", hr); + ok(hr == S_OK, "TryGetFontTable() failed, %#lx\n", hr); ok(exists, "Expected maxp table\n");
if (!exists) @@ -9254,7 +9254,7 @@ static DWORD get_sbix_formats(IDWriteFontFace4 *fontface) num_glyphs = GET_BE_WORD(maxp->numGlyphs);
hr = IDWriteFontFace4_TryGetFontTable(fontface, MS_SBIX_TAG, &data, &size, &context, &exists); - ok(hr == S_OK, "TryGetFontTable() failed, %#x\n", hr); + ok(hr == S_OK, "TryGetFontTable() failed, %#lx\n", hr); ok(exists, "Expected sbix table\n");
header = data; @@ -9285,7 +9285,7 @@ static DWORD get_sbix_formats(IDWriteFontFace4 *fontface) ret |= DWRITE_GLYPH_IMAGE_FORMATS_TIFF; break; default: - ok(0, "unexpected format, %#x\n", GET_BE_DWORD(format)); + ok(0, "unexpected format, %#lx\n", GET_BE_DWORD(format)); } } } @@ -9306,7 +9306,7 @@ static DWORD get_cblc_formats(IDWriteFontFace4 *fontface) HRESULT hr;
hr = IDWriteFontFace4_TryGetFontTable(fontface, MS_CBLC_TAG, (const void **)&header, &size, &context, &exists); - ok(hr == S_OK, "TryGetFontTable() failed, %#x\n", hr); + ok(hr == S_OK, "TryGetFontTable() failed, %#lx\n", hr); ok(exists, "Expected CBLC table\n");
if (!exists) @@ -9378,7 +9378,7 @@ static void test_GetGlyphImageFormats(void) IDWriteFontFace4_Release(fontface4);
hr = IDWriteFactory_GetSystemFontCollection(factory, &syscollection, FALSE); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); count = IDWriteFontCollection_GetFontFamilyCount(syscollection);
for (i = 0; i < count; i++) { @@ -9389,10 +9389,10 @@ static void test_GetGlyphImageFormats(void) IDWriteFont *font;
hr = IDWriteFontCollection_GetFontFamily(syscollection, i, &family); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
hr = IDWriteFontFamily_GetFamilyNames(family, &names); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
get_enus_string(names, familynameW, ARRAY_SIZE(familynameW)); IDWriteLocalizedStrings_Release(names); @@ -9402,13 +9402,13 @@ static void test_GetGlyphImageFormats(void) DWORD formats, expected_formats;
hr = IDWriteFontFamily_GetFont(family, j, &font); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
hr = IDWriteFont_CreateFontFace(font, &fontface); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
hr = IDWriteFont_GetFaceNames(font, &names); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
get_enus_string(names, facenameW, ARRAY_SIZE(facenameW));
@@ -9419,7 +9419,7 @@ static void test_GetGlyphImageFormats(void) /* Mask describes font as a whole. */ formats = IDWriteFontFace4_GetGlyphImageFormats(fontface4); expected_formats = get_face_glyph_image_formats(fontface4); - ok(formats == expected_formats, "%s - %s, expected formats %#x, got formats %#x.\n", + ok(formats == expected_formats, "%s - %s, expected formats %#lx, got formats %#lx.\n", wine_dbgstr_w(familynameW), wine_dbgstr_w(facenameW), expected_formats, formats);
IDWriteFontFace4_Release(fontface4); @@ -9432,7 +9432,7 @@ static void test_GetGlyphImageFormats(void)
IDWriteFontCollection_Release(syscollection); ref = IDWriteFactory_Release(factory); - ok(ref == 0, "factory not released, %u\n", ref); + ok(ref == 0, "factory not released, %lu\n", ref); }
static void test_CreateCustomRenderingParams(void) @@ -9474,7 +9474,7 @@ static void test_CreateCustomRenderingParams(void) params = (void *)0xdeadbeef; hr = IDWriteFactory_CreateCustomRenderingParams(factory, params_tests[i].gamma, params_tests[i].contrast, params_tests[i].cleartype_level, params_tests[i].geometry, params_tests[i].rendering_mode, ¶ms); - ok(hr == params_tests[i].hr, "unexpected hr %#x, expected %#x.\n", hr, params_tests[i].hr); + ok(hr == params_tests[i].hr, "unexpected hr %#lx, expected %#lx.\n", hr, params_tests[i].hr);
if (hr == S_OK) { ok(params_tests[i].gamma == IDWriteRenderingParams_GetGamma(params), "unexpected gamma %f, expected %f.\n", @@ -9500,7 +9500,7 @@ static void test_CreateCustomRenderingParams(void) }
ref = IDWriteFactory_Release(factory); - ok(ref == 0, "factory not released, %u\n", ref); + ok(ref == 0, "factory not released, %lu\n", ref); }
static void test_localfontfileloader(void) @@ -9518,17 +9518,17 @@ static void test_localfontfileloader(void) path = create_testfontfile(test_fontfile);
hr = IDWriteFactory_CreateFontFileReference(factory, path, NULL, &file); - ok(hr == S_OK, "Failed to create file reference, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create file reference, hr %#lx.\n", hr);
hr = IDWriteFactory_CreateFontFileReference(factory2, path, NULL, &file2); - ok(hr == S_OK, "Failed to create file reference, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create file reference, hr %#lx.\n", hr); ok(file != file2, "Unexpected file instance.\n");
hr = IDWriteFontFile_GetLoader(file, &loader); - ok(hr == S_OK, "Failed to get loader, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get loader, hr %#lx.\n", hr);
hr = IDWriteFontFile_GetLoader(file2, &loader2); - ok(hr == S_OK, "Failed to get loader, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get loader, hr %#lx.\n", hr); ok(loader == loader2, "Unexpected loader instance\n");
IDWriteFontFile_Release(file); @@ -9536,9 +9536,9 @@ static void test_localfontfileloader(void) IDWriteFontFileLoader_Release(loader); IDWriteFontFileLoader_Release(loader2); ref = IDWriteFactory_Release(factory); - ok(ref == 0, "factory not released, %u\n", ref); + ok(ref == 0, "factory not released, %lu\n", ref); ref = IDWriteFactory_Release(factory2); - ok(ref == 0, "factory not released, %u\n", ref); + ok(ref == 0, "factory not released, %lu\n", ref); DELETE_FONTFILE(path); }
@@ -9619,7 +9619,7 @@ static void test_fontsetbuilder(void)
EXPECT_REF(factory, 1); hr = IDWriteFactory3_CreateFontSetBuilder(factory, &builder); - ok(hr == S_OK, "Failed to create font set builder, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create font set builder, hr %#lx.\n", hr); EXPECT_REF(factory, 2);
if (SUCCEEDED(hr = IDWriteFontSetBuilder_QueryInterface(builder, &IID_IDWriteFontSetBuilder1, (void **)&builder1))) @@ -9627,16 +9627,16 @@ static void test_fontsetbuilder(void) path = create_testfontfile(test_fontfile);
hr = IDWriteFactory3_CreateFontFileReference(factory, path, NULL, &file); - ok(hr == S_OK, "Unexpected hr %#x.\n",hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n",hr);
hr = IDWriteFontSetBuilder1_AddFontFile(builder1, file); - ok(hr == S_OK, "Unexpected hr %#x.\n",hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n",hr);
hr = IDWriteFontSetBuilder1_CreateFontSet(builder1, &fontset); - ok(hr == S_OK, "Unexpected hr %#x.\n",hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n",hr); hr = IDWriteFactory3_CreateFontCollectionFromFontSet(factory, fontset, &collection); todo_wine - ok(hr == S_OK, "Unexpected hr %#x.\n",hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n",hr); if (SUCCEEDED(hr)) { count = IDWriteFontCollection1_GetFontFamilyCount(collection); @@ -9646,14 +9646,14 @@ static void test_fontsetbuilder(void) IDWriteFontSet_Release(fontset);
hr = IDWriteFontSetBuilder1_AddFontFile(builder1, file); - ok(hr == S_OK, "Unexpected hr %#x.\n",hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n",hr);
hr = IDWriteFontSetBuilder1_CreateFontSet(builder1, &fontset); - ok(hr == S_OK, "Unexpected hr %#x.\n",hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n",hr);
hr = IDWriteFactory3_CreateFontCollectionFromFontSet(factory, fontset, &collection); todo_wine - ok(hr == S_OK, "Unexpected hr %#x.\n",hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n",hr); if (SUCCEEDED(hr)) { check_familymodel(collection, DWRITE_FONT_FAMILY_MODEL_WEIGHT_STRETCH_STYLE); @@ -9667,10 +9667,10 @@ static void test_fontsetbuilder(void) ok(count == 2, "Unexpected font count %u.\n", count);
hr = IDWriteFontSet_GetFontFaceReference(fontset, 0, &ref); - ok(hr == S_OK, "Unexpected hr %#x.\n",hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n",hr);
hr = IDWriteFontFaceReference_QueryInterface(ref, &IID_IDWriteFontFaceReference1, (void **)&ref1); - ok(hr == S_OK, "Unexpected hr %#x.\n",hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n",hr);
count = IDWriteFontFaceReference1_GetFontAxisValueCount(ref1); todo_wine @@ -9679,7 +9679,7 @@ static void test_fontsetbuilder(void) if (count == 4) { hr = IDWriteFontFaceReference1_GetFontAxisValues(ref1, axis_values, ARRAY_SIZE(axis_values)); - ok(hr == S_OK, "Unexpected hr %#x.\n",hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n",hr);
ok(axis_values[0].axisTag == DWRITE_FONT_AXIS_TAG_WEIGHT, "Unexpected tag[0] %s.\n", wine_dbgstr_an((char *)&axis_values[0].axisTag, 4)); @@ -9709,7 +9709,7 @@ static void test_fontsetbuilder(void) IDWriteFontSetBuilder_Release(builder);
hr = IDWriteFactory3_GetSystemFontCollection(factory, FALSE, &collection, FALSE); - ok(hr == S_OK, "Failed to get system collection, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get system collection, hr %#lx.\n", hr); count = IDWriteFontCollection1_GetFontFamilyCount(collection);
for (i = 0; i < count; i++) { @@ -9718,7 +9718,7 @@ static void test_fontsetbuilder(void) IDWriteFont3 *font;
hr = IDWriteFontCollection1_GetFontFamily(collection, i, &family); - ok(hr == S_OK, "Failed to get family, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get family, hr %#lx.\n", hr);
fontcount = IDWriteFontFamily1_GetFontCount(family); for (j = 0; j < fontcount; ++j) @@ -9727,39 +9727,39 @@ static void test_fontsetbuilder(void) UINT32 setcount, id;
hr = IDWriteFontFamily1_GetFont(family, j, &font); - ok(hr == S_OK, "Failed to get font, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get font, hr %#lx.\n", hr);
/* Create a set with a single font reference, test set properties. */ hr = IDWriteFactory3_CreateFontSetBuilder(factory, &builder); - ok(hr == S_OK, "Failed to create font set builder, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create font set builder, hr %#lx.\n", hr);
hr = IDWriteFont3_GetFontFaceReference(font, &ref); - ok(hr == S_OK, "Failed to get fontface reference, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get fontface reference, hr %#lx.\n", hr);
EXPECT_REF(ref, 1); hr = IDWriteFontSetBuilder_AddFontFaceReference(builder, ref); - ok(hr == S_OK, "Failed to add fontface reference, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to add fontface reference, hr %#lx.\n", hr); EXPECT_REF(ref, 1);
hr = IDWriteFontSetBuilder_CreateFontSet(builder, &fontset); - ok(hr == S_OK, "Failed to create a font set, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create a font set, hr %#lx.\n", hr);
setcount = IDWriteFontSet_GetFontCount(fontset); ok(setcount == 1, "Unexpected font count %u.\n", setcount);
ref2 = (void *)0xdeadbeef; hr = IDWriteFontSet_GetFontFaceReference(fontset, setcount, &ref2); - ok(hr == E_INVALIDARG, "Unexpected hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Unexpected hr %#lx.\n", hr); ok(!ref2, "Unexpected pointer.\n");
ref2 = NULL; hr = IDWriteFontSet_GetFontFaceReference(fontset, 0, &ref2); - ok(hr == S_OK, "Failed to get font face reference, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get font face reference, hr %#lx.\n", hr); ok(ref2 != ref, "Unexpected reference.\n");
ref3 = NULL; hr = IDWriteFontSet_GetFontFaceReference(fontset, 0, &ref3); - ok(hr == S_OK, "Failed to get font face reference, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get font face reference, hr %#lx.\n", hr); ok(ref2 != ref3, "Unexpected reference.\n");
IDWriteFontFaceReference_Release(ref3); @@ -9773,7 +9773,7 @@ static void test_fontsetbuilder(void) BOOL exists = FALSE;
hr = IDWriteFontSet_GetPropertyValues(fontset, 0, id, &exists, &values); - ok(hr == S_OK, "Failed to get property value, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get property value, hr %#lx.\n", hr);
if (id == DWRITE_FONT_PROPERTY_ID_WEIGHT || id == DWRITE_FONT_PROPERTY_ID_STRETCH || id == DWRITE_FONT_PROPERTY_ID_STYLE) @@ -9810,12 +9810,12 @@ static void test_fontsetbuilder(void)
buffW[0] = 'a'; hr = IDWriteLocalizedStrings_GetLocaleName(values, 0, buffW, ARRAY_SIZE(buffW)); - ok(hr == S_OK, "Failed to get locale name, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get locale name, hr %#lx.\n", hr); ok(!*buffW, "Unexpected locale %s.\n", wine_dbgstr_w(buffW));
buff2W[0] = 0; hr = IDWriteLocalizedStrings_GetString(values, 0, buff2W, ARRAY_SIZE(buff2W)); - ok(hr == S_OK, "Failed to get property string, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get property string, hr %#lx.\n", hr);
wsprintfW(buffW, L"%u", ivalue); ok(!lstrcmpW(buffW, buff2W), "Unexpected property value %s, expected %s.\n", wine_dbgstr_w(buff2W), @@ -9868,18 +9868,18 @@ static void test_font_resource(void)
count = 1; hr = IDWriteFontFace_GetFiles(fontface, &count, &fontfile); - ok(hr == S_OK, "Failed to get file object, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get file object, hr %#lx.\n", hr);
hr = IDWriteFactory6_CreateFontResource(factory, fontfile, 0, &resource); - ok(hr == S_OK, "Failed to create font resource, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create font resource, hr %#lx.\n", hr);
hr = IDWriteFactory6_CreateFontResource(factory, fontfile, 0, &resource2); - ok(hr == S_OK, "Failed to create font resource, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create font resource, hr %#lx.\n", hr); ok(resource != resource2, "Unexpected instance.\n"); IDWriteFontResource_Release(resource2);
hr = IDWriteFontResource_GetFontFile(resource, &fontfile2); - ok(hr == S_OK, "Failed to get font file, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get font file, hr %#lx.\n", hr); ok(fontfile2 == fontfile, "Unexpected file instance.\n"); IDWriteFontFile_Release(fontfile2);
@@ -9890,7 +9890,7 @@ static void test_font_resource(void) axis_values[0].axisTag = DWRITE_FONT_AXIS_TAG_WEIGHT; axis_values[0].value = 400.0f; hr = IDWriteFontResource_CreateFontFaceReference(resource, DWRITE_FONT_SIMULATIONS_NONE, axis_values, 1, &reference); - ok(hr == S_OK, "Failed to create reference object, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create reference object, hr %#lx.\n", hr);
count = IDWriteFontFaceReference1_GetFontAxisValueCount(reference); ok(count == 1, "Unexpected axis value count.\n"); @@ -9905,25 +9905,25 @@ static void test_font_resource(void)
EXPECT_REF(resource, 1); hr = IDWriteFontResource_CreateFontFaceReference(resource, DWRITE_FONT_SIMULATIONS_NONE, NULL, 0, &reference); - ok(hr == S_OK, "Failed to create reference object, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create reference object, hr %#lx.\n", hr); EXPECT_REF(resource, 1);
hr = IDWriteFontResource_CreateFontFaceReference(resource, DWRITE_FONT_SIMULATIONS_NONE, NULL, 0, &reference2); - ok(hr == S_OK, "Failed to create reference object, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create reference object, hr %#lx.\n", hr); ok(reference != reference2, "Unexpected reference instance.\n"); IDWriteFontFaceReference1_Release(reference2); IDWriteFontFaceReference1_Release(reference);
hr = IDWriteFontFace_QueryInterface(fontface, &IID_IDWriteFontFace5, (void **)&fontface5); - ok(hr == S_OK, "Failed to get interface, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get interface, hr %#lx.\n", hr);
hr = IDWriteFontFace5_GetFontResource(fontface5, &resource2); - ok(hr == S_OK, "Failed to get font resource, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get font resource, hr %#lx.\n", hr); ok(resource != resource2, "Unexpected resource instance.\n"); IDWriteFontResource_Release(resource);
hr = IDWriteFontFace5_GetFontResource(fontface5, &resource); - ok(hr == S_OK, "Failed to get font resource, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get font resource, hr %#lx.\n", hr); ok(resource != resource2, "Unexpected resource instance.\n"); EXPECT_REF(resource, 1); IDWriteFontResource_Release(resource); @@ -9980,16 +9980,16 @@ static void test_font_resource(void)
memset(axis_values, 0, sizeof(axis_values)); hr = IDWriteFontFaceReference1_GetFontAxisValues(reference, axis_values, 1); - ok(hr == E_NOT_SUFFICIENT_BUFFER, "Unexpected hr %#x.\n", hr); + ok(hr == E_NOT_SUFFICIENT_BUFFER, "Unexpected hr %#lx.\n", hr); ok(!axis_values[0].axisTag, "Unexpected axis tag.\n");
memset(axis_values, 0, sizeof(axis_values)); hr = IDWriteFontFaceReference1_GetFontAxisValues(reference, axis_values, 2); - ok(hr == S_OK, "Failed to get axis values, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get axis values, hr %#lx.\n", hr); ok(axis_values[0].axisTag == DWRITE_FONT_AXIS_TAG_WEIGHT, "Unexpected axis tag.\n");
hr = IDWriteFontFaceReference1_CreateFontFace(reference, &fontface5); - ok(hr == S_OK, "Failed to create a font face, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create a font face, hr %#lx.\n", hr); IDWriteFontFace5_Release(fontface5);
IDWriteFontFaceReference1_Release(reference); @@ -9998,7 +9998,7 @@ static void test_font_resource(void)
IDWriteFontFace_Release(fontface); ref = IDWriteFactory6_Release(factory); - ok(ref == 0, "Factory wasn't released, %u.\n", ref); + ok(ref == 0, "Factory wasn't released, %lu.\n", ref); }
static BOOL get_expected_is_color(IDWriteFontFace2 *fontface) @@ -10010,14 +10010,14 @@ static BOOL get_expected_is_color(IDWriteFontFace2 *fontface) HRESULT hr;
hr = IDWriteFontFace2_TryGetFontTable(fontface, MS_CPAL_TAG, (const void **)&data, &size, &context, &exists); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); if (context) IDWriteFontFace2_ReleaseFontTable(fontface, context);
if (exists) { hr = IDWriteFontFace2_TryGetFontTable(fontface, MS_COLR_TAG, (const void **)&data, &size, &context, &exists); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); if (context) IDWriteFontFace2_ReleaseFontTable(fontface, context); } @@ -10042,7 +10042,7 @@ static void test_IsColorFont(void) }
hr = IDWriteFactory2_GetSystemFontCollection(factory, &collection, FALSE); - ok(hr == S_OK, "Failed to get font collection, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get font collection, hr %#lx.\n", hr);
count = IDWriteFontCollection_GetFontFamilyCount(collection); for (i = 0; i < count; ++i) @@ -10053,10 +10053,10 @@ static void test_IsColorFont(void) WCHAR nameW[256];
hr = IDWriteFontCollection_GetFontFamily(collection, i, &family); - ok(hr == S_OK, "Failed to get family, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get family, hr %#lx.\n", hr);
hr = IDWriteFontFamily_GetFamilyNames(family, &names); - ok(hr == S_OK, "Failed to get names, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get names, hr %#lx.\n", hr); get_enus_string(names, nameW, ARRAY_SIZE(nameW)); IDWriteLocalizedStrings_Release(names);
@@ -10071,17 +10071,17 @@ static void test_IsColorFont(void) IDWriteFont *font;
hr = IDWriteFontFamily_GetFont(family, j, &font); - ok(hr == S_OK, "Failed to get font, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get font, hr %#lx.\n", hr);
hr = IDWriteFont_QueryInterface(font, &IID_IDWriteFont2, (void **)&font2); - ok(hr == S_OK, "Failed to get interface, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get interface, hr %#lx.\n", hr); IDWriteFont_Release(font);
hr = IDWriteFont2_CreateFontFace(font2, &fontface); - ok(hr == S_OK, "Failed to create fontface, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create fontface, hr %#lx.\n", hr);
hr = IDWriteFontFace_QueryInterface(fontface, &IID_IDWriteFontFace2, (void **)&fontface2); - ok(hr == S_OK, "Failed to get interface, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get interface, hr %#lx.\n", hr); IDWriteFontFace_Release(fontface);
is_color_font = IDWriteFont2_IsColorFont(font2); @@ -10101,7 +10101,7 @@ static void test_IsColorFont(void)
IDWriteFontCollection_Release(collection); refcount = IDWriteFactory2_Release(factory); - ok(refcount == 0, "Factory not released, refcount %u.\n", refcount); + ok(refcount == 0, "Factory not released, refcount %lu.\n", refcount); }
static void test_GetVerticalGlyphVariants(void) @@ -10130,12 +10130,12 @@ static void test_GetVerticalGlyphVariants(void) ch = 'A'; *glyphs = 0; hr = IDWriteFontFace1_GetGlyphIndices(fontface1, &ch, 1, glyphs); - ok(hr == S_OK, "Failed to get glyph, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get glyph, hr %#lx.\n", hr); ok(!!*glyphs, "Unexpected glyph %u.\n", glyphs[0]);
memset(glyph_variants, 0, sizeof(glyph_variants)); hr = IDWriteFontFace1_GetVerticalGlyphVariants(fontface1, 1, glyphs, glyph_variants); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); ok(glyphs[0] == glyph_variants[0], "Unexpected glyph.\n");
ret = IDWriteFontFace1_HasVerticalGlyphVariants(fontface1); @@ -10143,7 +10143,7 @@ static void test_GetVerticalGlyphVariants(void)
IDWriteFontFace1_Release(fontface1); refcount = IDWriteFactory_Release(factory); - ok(!refcount, "Factory not released, refcount %u.\n", refcount); + ok(!refcount, "Factory not released, refcount %lu.\n", refcount); }
static HANDLE get_collection_expiration_event(IDWriteFontCollection *collection) @@ -10153,7 +10153,7 @@ static HANDLE get_collection_expiration_event(IDWriteFontCollection *collection) HRESULT hr;
hr = IDWriteFontCollection_QueryInterface(collection, &IID_IDWriteFontCollection3, (void **)&collection3); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); event = IDWriteFontCollection3_GetExpirationEvent(collection3); IDWriteFontCollection3_Release(collection3);
@@ -10172,7 +10172,7 @@ static void test_expiration_event(void) factory = create_factory();
hr = IDWriteFactory_GetSystemFontCollection(factory, &collection, FALSE); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IDWriteFontCollection_QueryInterface(collection, &IID_IDWriteFontCollection3, (void **)&collection3); if (FAILED(hr)) @@ -10192,7 +10192,7 @@ static void test_expiration_event(void) factory2 = create_factory();
hr = IDWriteFactory_GetSystemFontCollection(factory2, &collection2, FALSE); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); event2 = get_collection_expiration_event(collection2); todo_wine { ok(!!event2, "Unexpected event handle.\n"); @@ -10225,17 +10225,17 @@ static void test_family_font_set(void) factory = create_factory();
hr = IDWriteFactory_GetSystemFontCollection(factory, &collection, FALSE); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IDWriteFontCollection_GetFontFamily(collection, 0, &family); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
if (SUCCEEDED(IDWriteFontFamily_QueryInterface(family, &IID_IDWriteFontFamily2, (void **)&family2))) { hr = IDWriteFontFamily2_GetFontSet(family2, &fontset); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); hr = IDWriteFontFamily2_GetFontSet(family2, &fontset2); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); ok(fontset != fontset2, "Unexpected fontset instance.\n");
count = IDWriteFontSet1_GetFontCount(fontset); @@ -10244,37 +10244,37 @@ static void test_family_font_set(void) exists = TRUE; values = (void *)0xdeadbeef; hr = IDWriteFontSet1_GetPropertyValues(fontset, 0, 100, &exists, &values); - ok(FAILED(hr), "Unexpected hr %#x.\n", hr); + ok(FAILED(hr), "Unexpected hr %#lx.\n", hr); ok(!exists && !values, "Unexpected return value.\n");
/* Invalid index. */ exists = TRUE; values = (void *)0xdeadbeef; hr = IDWriteFontSet1_GetPropertyValues(fontset, count, DWRITE_FONT_PROPERTY_ID_POSTSCRIPT_NAME, &exists, &values); - ok(FAILED(hr), "Unexpected hr %#x.\n", hr); + ok(FAILED(hr), "Unexpected hr %#lx.\n", hr); ok(!exists && !values, "Unexpected return value.\n");
exists = TRUE; values = (void *)0xdeadbeef; hr = IDWriteFontSet1_GetPropertyValues(fontset, count, 100, &exists, &values); - ok(FAILED(hr), "Unexpected hr %#x.\n", hr); + ok(FAILED(hr), "Unexpected hr %#lx.\n", hr); ok(!exists && !values, "Unexpected return value.\n");
hr = IDWriteFontSet1_GetPropertyValues(fontset, 0, DWRITE_FONT_PROPERTY_ID_POSTSCRIPT_NAME, &exists, &values); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); ok(exists == !!values, "Unexpected return value.\n"); if (values) { hr = IDWriteLocalizedStrings_GetString(values, 0, buffW, ARRAY_SIZE(buffW)); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); IDWriteLocalizedStrings_Release(values); }
hr = IDWriteFontSet1_CreateFontResource(fontset, 100, &resource); - ok(hr == E_INVALIDARG, "Unexpected hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Unexpected hr %#lx.\n", hr);
hr = IDWriteFontSet1_CreateFontResource(fontset, 0, &resource); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); IDWriteFontResource_Release(resource);
IDWriteFontSet1_Release(fontset2); @@ -10309,7 +10309,7 @@ static void test_system_font_set(void) }
hr = IDWriteFactory3_GetSystemFontSet(factory, &fontset); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
count = IDWriteFontSet_GetFontCount(fontset); ok(!!count, "Unexpected font count %u.\n", count); @@ -10318,15 +10318,15 @@ static void test_system_font_set(void) p.propertyValue = L"Tahoma"; p.localeName = L""; hr = IDWriteFontSet_GetMatchingFonts(fontset, &p, 1, &filtered_set); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); count = IDWriteFontSet_GetFontCount(filtered_set); ok(!!count, "Unexpected font count %u.\n", count);
hr = IDWriteFontSet_GetFontFaceReference(filtered_set, 0, &ref); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IDWriteFontFaceReference_CreateFontFace(ref, &fontface); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
IDWriteFontFace3_Release(fontface); IDWriteFontFaceReference_Release(ref); @@ -10359,33 +10359,33 @@ static void test_CreateFontCollectionFromFontSet(void) }
hr = IDWriteFactory5_CreateFontSetBuilder(factory, &builder); - ok(hr == S_OK, "Failed to create font set builder, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create font set builder, hr %#lx.\n", hr);
path = create_testfontfile(test_fontfile);
hr = IDWriteFactory5_CreateFontFileReference(factory, path, NULL, &file); - ok(hr == S_OK, "Unexpected hr %#x.\n",hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n",hr);
hr = IDWriteFontSetBuilder1_AddFontFile(builder, file); - ok(hr == S_OK, "Unexpected hr %#x.\n",hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n",hr);
/* Add same file, with explicit properties. */ hr = IDWriteFactory5_CreateFontFaceReference_(factory, file, 0, DWRITE_FONT_SIMULATIONS_NONE, &ref); - ok(hr == S_OK, "Unexpected hr %#x.\n",hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n",hr); props[0].propertyId = DWRITE_FONT_PROPERTY_ID_WEIGHT_STRETCH_STYLE_FAMILY_NAME; props[0].propertyValue = L"Another Font"; props[0].localeName = L"en-US"; hr = IDWriteFontSetBuilder1_AddFontFaceReference_(builder, ref, props, 1); todo_wine - ok(hr == S_OK, "Unexpected hr %#x.\n",hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n",hr); IDWriteFontFaceReference_Release(ref);
hr = IDWriteFontSetBuilder1_CreateFontSet(builder, &fontset); - ok(hr == S_OK, "Unexpected hr %#x.\n",hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n",hr);
hr = IDWriteFactory5_CreateFontCollectionFromFontSet(factory, fontset, &collection); todo_wine - ok(hr == S_OK, "Unexpected hr %#x.\n",hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n",hr);
if (SUCCEEDED(hr)) { @@ -10395,7 +10395,7 @@ if (SUCCEEDED(hr)) /* Explicit fontset properties are prioritized and not replaced by actual properties from a file. */ exists = FALSE; hr = IDWriteFontCollection1_FindFamilyName(collection, L"Another Font", &index, &exists); - ok(hr == S_OK, "Unexpected hr %#x.\n",hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n",hr); ok(!!exists, "Unexpected return value %d.\n", exists);
IDWriteFontCollection1_Release(collection); @@ -10428,14 +10428,14 @@ static void test_GetMatchingFontsByLOGFONT(void) }
hr = IDWriteFactory3_GetSystemFontSet(factory, &systemset); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
interop = NULL; hr = IDWriteFactory3_GetGdiInterop(factory, &interop0); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IDWriteGdiInterop_QueryInterface(interop0, &IID_IDWriteGdiInterop1, (void **)&interop); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); IDWriteGdiInterop_Release(interop0);
memset(&logfont, 0, sizeof(logfont)); @@ -10446,16 +10446,16 @@ static void test_GetMatchingFontsByLOGFONT(void) lstrcpyW(logfont.lfFaceName, L"tahoma");
hr = IDWriteGdiInterop1_GetMatchingFontsByLOGFONT(interop, NULL, systemset, &set); - ok(hr == E_INVALIDARG, "Unexpected hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Unexpected hr %#lx.\n", hr);
hr = IDWriteGdiInterop1_GetMatchingFontsByLOGFONT(interop, &logfont, NULL, &set); - ok(hr == E_INVALIDARG, "Unexpected hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Unexpected hr %#lx.\n", hr);
hr = IDWriteGdiInterop1_GetMatchingFontsByLOGFONT(interop, &logfont, systemset, &set); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
count = IDWriteFontSet_GetFontCount(set); - ok(count > 0, "Unexpected count %u.\n", count); + ok(count > 0, "Unexpected count %lu.\n", count);
IDWriteFontSet_Release(set);
@@ -10463,7 +10463,7 @@ static void test_GetMatchingFontsByLOGFONT(void) IDWriteFontSet_Release(systemset);
refcount = IDWriteFactory3_Release(factory); - ok(!refcount, "Factory wasn't released, %u.\n", refcount); + ok(!refcount, "Factory wasn't released, %lu.\n", refcount); }
START_TEST(font) diff --git a/dlls/dwrite/tests/layout.c b/dlls/dwrite/tests/layout.c index 4b2477892fd..47ea7f95b95 100644 --- a/dlls/dwrite/tests/layout.c +++ b/dlls/dwrite/tests/layout.c @@ -216,10 +216,10 @@ static void get_script_analysis(const WCHAR *str, UINT32 len, DWRITE_SCRIPT_ANAL
factory = create_factory(); hr = IDWriteFactory_CreateTextAnalyzer(factory, &analyzer); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
hr = IDWriteTextAnalyzer_AnalyzeScript(analyzer, &analysissource, 0, len, &analysissink.IDWriteTextAnalysisSink_iface); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
*sa = analysissink.sa; IDWriteFactory_Release(factory); @@ -237,16 +237,16 @@ static IDWriteFontFace *get_fontface_from_format(IDWriteTextFormat *format) HRESULT hr;
hr = IDWriteTextFormat_GetFontCollection(format, &collection); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
hr = IDWriteTextFormat_GetFontFamilyName(format, nameW, ARRAY_SIZE(nameW)); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
hr = IDWriteFontCollection_FindFamilyName(collection, nameW, &index, &exists); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
hr = IDWriteFontCollection_GetFontFamily(collection, index, &family); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); IDWriteFontCollection_Release(collection);
hr = IDWriteFontFamily_GetFirstMatchingFont(family, @@ -254,10 +254,10 @@ static IDWriteFontFace *get_fontface_from_format(IDWriteTextFormat *format) IDWriteTextFormat_GetFontStretch(format), IDWriteTextFormat_GetFontStyle(format), &font); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
hr = IDWriteFont_CreateFontFace(font, &fontface); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
IDWriteFont_Release(font); IDWriteFontFamily_Release(family); @@ -271,7 +271,7 @@ static void _expect_ref(IUnknown* obj, ULONG ref, int line) ULONG rc; IUnknown_AddRef(obj); rc = IUnknown_Release(obj); - ok_(__FILE__,line)(rc == ref, "expected refcount %d, got %d\n", ref, rc); + ok_(__FILE__,line)(rc == ref, "expected refcount %ld, got %ld\n", ref, rc); }
enum drawcall_modifiers_kind { @@ -913,60 +913,60 @@ static void test_CreateTextLayout(void)
layout = (void*)0xdeadbeef; hr = IDWriteFactory_CreateTextLayout(factory, NULL, 0, NULL, 0.0f, 0.0f, &layout); - ok(hr == E_INVALIDARG, "got 0x%08x\n", hr); + ok(hr == E_INVALIDARG, "got 0x%08lx\n", hr); ok(layout == NULL, "got %p\n", layout);
layout = (void*)0xdeadbeef; hr = IDWriteFactory_CreateTextLayout(factory, L"string", 6, NULL, 0.0f, 0.0f, &layout); - ok(hr == E_INVALIDARG, "Unexpected hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Unexpected hr %#lx.\n", hr); ok(layout == NULL, "got %p\n", layout);
layout = (void*)0xdeadbeef; hr = IDWriteFactory_CreateTextLayout(factory, L"string", 6, NULL, 1.0f, 0.0f, &layout); - ok(hr == E_INVALIDARG, "Unexpected hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Unexpected hr %#lx.\n", hr); ok(layout == NULL, "got %p\n", layout);
layout = (void*)0xdeadbeef; hr = IDWriteFactory_CreateTextLayout(factory, L"string", 6, NULL, 0.0f, 1.0f, &layout); - ok(hr == E_INVALIDARG, "Unexpected hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Unexpected hr %#lx.\n", hr); ok(layout == NULL, "got %p\n", layout);
layout = (void*)0xdeadbeef; hr = IDWriteFactory_CreateTextLayout(factory, L"string", 6, NULL, 1000.0f, 1000.0f, &layout); - ok(hr == E_INVALIDARG, "Unexpected hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Unexpected hr %#lx.\n", hr); ok(layout == NULL, "got %p\n", layout);
hr = IDWriteFactory_CreateTextFormat(factory, L"Tahoma", NULL, DWRITE_FONT_WEIGHT_NORMAL, DWRITE_FONT_STYLE_NORMAL, DWRITE_FONT_STRETCH_NORMAL, 10.0f, L"en-us", &format); - ok(hr == S_OK, "Failed to create format, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create format, hr %#lx.\n", hr);
layout = (void*)0xdeadbeef; hr = IDWriteFactory_CreateTextLayout(factory, NULL, 0, format, 100.0f, 100.0f, &layout); - ok(hr == E_INVALIDARG, "got 0x%08x\n", hr); + ok(hr == E_INVALIDARG, "got 0x%08lx\n", hr); ok(layout == NULL, "got %p\n", layout);
layout = (void *)0xdeadbeef; hr = IDWriteFactory_CreateTextLayout(factory, L"string", 6, format, -100.0f, 100.0f, &layout); - ok(hr == E_INVALIDARG, "Unexpected hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Unexpected hr %#lx.\n", hr); ok(layout == NULL, "Unexpected pointer %p.\n", layout);
layout = (void *)0xdeadbeef; hr = IDWriteFactory_CreateTextLayout(factory, L"string", 6, format, 100.0f, -100.0f, &layout); - ok(hr == E_INVALIDARG, "Unexpected hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Unexpected hr %#lx.\n", hr); ok(layout == NULL, "Unexpected pointer %p.\n", layout);
layout = (void *)0xdeadbeef; hr = IDWriteFactory_CreateTextLayout(factory, L"string", 6, format, -100.0f, -100.0f, &layout); - ok(hr == E_INVALIDARG, "Unexpected hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Unexpected hr %#lx.\n", hr); ok(layout == NULL, "Unexpected pointer %p.\n", layout);
hr = IDWriteFactory_CreateTextLayout(factory, L"string", 0, format, 0.0f, 0.0f, &layout); - ok(hr == S_OK, "Failed to create text layout, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create text layout, hr %#lx.\n", hr); IDWriteTextLayout_Release(layout);
EXPECT_REF(format, 1); hr = IDWriteFactory_CreateTextLayout(factory, L"string", 6, format, 1000.0f, 1000.0f, &layout); - ok(hr == S_OK, "Failed to create text layout, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create text layout, hr %#lx.\n", hr); EXPECT_REF(format, 1);
hr = IDWriteTextLayout_QueryInterface(layout, &IID_IDWriteTextLayout2, (void**)&layout2); @@ -976,33 +976,33 @@ static void test_CreateTextLayout(void) IDWriteTextFormat *format;
hr = IDWriteTextLayout2_QueryInterface(layout2, &IID_IDWriteTextLayout1, (void**)&layout1); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); IDWriteTextLayout1_Release(layout1);
EXPECT_REF(layout2, 2); hr = IDWriteTextLayout2_QueryInterface(layout2, &IID_IDWriteTextFormat1, (void**)&format1); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); EXPECT_REF(layout2, 3);
hr = IDWriteTextLayout2_QueryInterface(layout2, &IID_IDWriteTextFormat, (void**)&format); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(format == (IDWriteTextFormat*)format1, "got %p, %p\n", format, format1); ok(format != (IDWriteTextFormat*)layout2, "got %p, %p\n", format, layout2); EXPECT_REF(layout2, 4);
hr = IDWriteTextFormat_QueryInterface(format, &IID_IDWriteTextLayout1, (void**)&layout1); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); IDWriteTextLayout1_Release(layout1);
IDWriteTextFormat1_Release(format1); IDWriteTextFormat_Release(format);
hr = IDWriteTextLayout_QueryInterface(layout, &IID_IDWriteTextFormat1, (void**)&format1); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); EXPECT_REF(layout2, 3);
hr = IDWriteTextLayout_QueryInterface(layout, &IID_IDWriteTextFormat, (void**)&format); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(format == (IDWriteTextFormat*)format1, "got %p, %p\n", format, format1); EXPECT_REF(layout2, 4);
@@ -1015,7 +1015,7 @@ static void test_CreateTextLayout(void) if (layout2 && SUCCEEDED(IDWriteTextLayout2_QueryInterface(layout2, &IID_IDWriteTextLayout4, (void **)&layout4))) { hr = IDWriteTextLayout4_QueryInterface(layout4, &IID_IDWriteTextFormat3, (void **)&format3); - ok(hr == S_OK, "Failed to get text format, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get text format, hr %#lx.\n", hr); IDWriteTextFormat3_Release(format3); } else @@ -1051,65 +1051,65 @@ static void test_CreateGdiCompatibleTextLayout(void)
layout = (void*)0xdeadbeef; hr = IDWriteFactory_CreateGdiCompatibleTextLayout(factory, NULL, 0, NULL, 0.0f, 0.0f, 0.0f, NULL, FALSE, &layout); - ok(hr == E_INVALIDARG, "got 0x%08x\n", hr); + ok(hr == E_INVALIDARG, "got 0x%08lx\n", hr); ok(layout == NULL, "got %p\n", layout);
layout = (void*)0xdeadbeef; hr = IDWriteFactory_CreateGdiCompatibleTextLayout(factory, L"string", 6, NULL, 0.0f, 0.0f, 0.0f, NULL, FALSE, &layout); - ok(hr == E_INVALIDARG, "Unexpected hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Unexpected hr %#lx.\n", hr); ok(layout == NULL, "got %p\n", layout);
layout = (void*)0xdeadbeef; hr = IDWriteFactory_CreateGdiCompatibleTextLayout(factory, L"string", 6, NULL, 1.0f, 0.0f, 0.0f, NULL, FALSE, &layout); - ok(hr == E_INVALIDARG, "Unexpected hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Unexpected hr %#lx.\n", hr); ok(layout == NULL, "got %p\n", layout);
layout = (void*)0xdeadbeef; hr = IDWriteFactory_CreateGdiCompatibleTextLayout(factory, L"string", 6, NULL, 1.0f, 0.0f, 1.0f, NULL, FALSE, &layout); - ok(hr == E_INVALIDARG, "Unexpected hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Unexpected hr %#lx.\n", hr); ok(layout == NULL, "got %p\n", layout);
layout = (void*)0xdeadbeef; hr = IDWriteFactory_CreateGdiCompatibleTextLayout(factory, L"string", 6, NULL, 1000.0f, 1000.0f, 1.0f, NULL, FALSE, &layout); - ok(hr == E_INVALIDARG, "Unexpected hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Unexpected hr %#lx.\n", hr); ok(layout == NULL, "got %p\n", layout);
/* create with text format */ hr = IDWriteFactory_CreateTextFormat(factory, L"Tahoma", NULL, DWRITE_FONT_WEIGHT_NORMAL, DWRITE_FONT_STYLE_NORMAL, DWRITE_FONT_STRETCH_NORMAL, 10.0f, L"en-us", &format); - ok(hr == S_OK, "Failed to create text format, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create text format, hr %#lx.\n", hr); EXPECT_REF(format, 1);
layout = (void*)0xdeadbeef; hr = IDWriteFactory_CreateGdiCompatibleTextLayout(factory, NULL, 0, format, 100.0f, 100.0f, 1.0f, NULL, FALSE, &layout); - ok(hr == E_INVALIDARG, "got 0x%08x\n", hr); + ok(hr == E_INVALIDARG, "got 0x%08lx\n", hr); ok(layout == NULL, "got %p\n", layout);
layout = (void *)0xdeadbeef; hr = IDWriteFactory_CreateGdiCompatibleTextLayout(factory, L"string", 6, format, -100.0f, 100.0f, 1.0f, NULL, FALSE, &layout); - ok(hr == E_INVALIDARG, "Unexpected hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Unexpected hr %#lx.\n", hr); ok(layout == NULL, "Unexpected pointer %p.\n", layout);
layout = (void *)0xdeadbeef; hr = IDWriteFactory_CreateGdiCompatibleTextLayout(factory, L"string", 6, format, 100.0f, -100.0f, 1.0f, NULL, FALSE, &layout); - ok(hr == E_INVALIDARG, "Unexpected hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Unexpected hr %#lx.\n", hr); ok(layout == NULL, "Unexpected pointer %p.\n", layout);
layout = (void *)0xdeadbeef; hr = IDWriteFactory_CreateGdiCompatibleTextLayout(factory, L"string", 6, format, -100.0f, -100.0f, 1.0f, NULL, FALSE, &layout); - ok(hr == E_INVALIDARG, "Unexpected hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Unexpected hr %#lx.\n", hr); ok(layout == NULL, "Unexpected pointer %p.\n", layout);
hr = IDWriteFactory_CreateGdiCompatibleTextLayout(factory, L"string", 6, format, 100.0f, 100.0f, 1.0f, NULL, FALSE, &layout); - ok(hr == S_OK, "Failed to create text layout, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create text layout, hr %#lx.\n", hr); EXPECT_REF(format, 1); EXPECT_REF(layout, 1);
@@ -1122,7 +1122,7 @@ static void test_CreateGdiCompatibleTextLayout(void) /* zero length string is okay */ hr = IDWriteFactory_CreateGdiCompatibleTextLayout(factory, L"string", 0, format, 100.0f, 100.0f, 1.0f, NULL, FALSE, &layout); - ok(hr == S_OK, "Failed to create text layout, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create text layout, hr %#lx.\n", hr);
dimension = IDWriteTextLayout_GetMaxWidth(layout); ok(dimension == 100.0, "got %f\n", dimension); @@ -1135,12 +1135,12 @@ static void test_CreateGdiCompatibleTextLayout(void) /* negative, zero ppdip */ hr = IDWriteFactory_CreateGdiCompatibleTextLayout(factory, L"string", 1, format, 100.0f, 100.0f, -1.0f, NULL, FALSE, &layout); - ok(hr == S_OK, "Failed to create text layout, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create text layout, hr %#lx.\n", hr); IDWriteTextLayout_Release(layout);
hr = IDWriteFactory_CreateGdiCompatibleTextLayout(factory, L"string", 1, format, 100.0f, 100.0f, 0.0f, NULL, FALSE, &layout); - ok(hr == S_OK, "Failed to create text layout, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create text layout, hr %#lx.\n", hr); IDWriteTextLayout_Release(layout);
/* transforms */ @@ -1148,7 +1148,7 @@ static void test_CreateGdiCompatibleTextLayout(void) { hr = IDWriteFactory_CreateGdiCompatibleTextLayout(factory, L"string", 1, format, 100.0f, 100.0f, 1.0f, &layoutcreate_transforms[i], FALSE, &layout); - ok(hr == S_OK, "Failed to create text layout, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create text layout, hr %#lx.\n", hr); IDWriteTextLayout_Release(layout); }
@@ -1177,45 +1177,45 @@ static void test_CreateTextFormat(void) /* zero/negative font size */ hr = IDWriteFactory_CreateTextFormat(factory, L"Tahoma", NULL, DWRITE_FONT_WEIGHT_NORMAL, DWRITE_FONT_STYLE_NORMAL, DWRITE_FONT_STRETCH_NORMAL, 0.0f, L"en-us", &format); - ok(hr == E_INVALIDARG, "Unexpected hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Unexpected hr %#lx.\n", hr);
hr = IDWriteFactory_CreateTextFormat(factory, L"Tahoma", NULL, DWRITE_FONT_WEIGHT_NORMAL, DWRITE_FONT_STYLE_NORMAL, DWRITE_FONT_STRETCH_NORMAL, -10.0f, L"en-us", &format); - ok(hr == E_INVALIDARG, "Unexpected hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Unexpected hr %#lx.\n", hr);
/* invalid font properties */ hr = IDWriteFactory_CreateTextFormat(factory, L"Tahoma", NULL, 1000, DWRITE_FONT_STYLE_NORMAL, DWRITE_FONT_STRETCH_NORMAL, 10.0f, L"en-us", &format); - ok(hr == E_INVALIDARG, "Unexpected hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Unexpected hr %#lx.\n", hr);
hr = IDWriteFactory_CreateTextFormat(factory, L"Tahoma", NULL, DWRITE_FONT_WEIGHT_NORMAL, DWRITE_FONT_STYLE_ITALIC + 1, DWRITE_FONT_STRETCH_NORMAL, 10.0f, L"en-us", &format); - ok(hr == E_INVALIDARG, "Unexpected hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Unexpected hr %#lx.\n", hr);
hr = IDWriteFactory_CreateTextFormat(factory, L"Tahoma", NULL, DWRITE_FONT_WEIGHT_NORMAL, DWRITE_FONT_STYLE_ITALIC, 10, 10.0f, L"en-us", &format); - ok(hr == E_INVALIDARG, "Unexpected hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Unexpected hr %#lx.\n", hr);
/* empty family name */ hr = IDWriteFactory_CreateTextFormat(factory, L"", NULL, DWRITE_FONT_WEIGHT_NORMAL, DWRITE_FONT_STYLE_NORMAL, DWRITE_FONT_STRETCH_NORMAL, 10.0f, L"en-us", &format); - ok(hr == S_OK, "Failed to create text format, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create text format, hr %#lx.\n", hr); IDWriteTextFormat_Release(format);
hr = IDWriteFactory_CreateTextFormat(factory, L"Tahoma", NULL, DWRITE_FONT_WEIGHT_NORMAL, DWRITE_FONT_STYLE_NORMAL, DWRITE_FONT_STRETCH_NORMAL, 10.0f, L"en-us", &format); - ok(hr == S_OK, "Failed to create text format, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create text format, hr %#lx.\n", hr);
if (0) /* crashes on native */ hr = IDWriteTextFormat_GetFontCollection(format, NULL);
collection = NULL; hr = IDWriteTextFormat_GetFontCollection(format, &collection); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(collection != NULL, "got %p\n", collection);
hr = IDWriteFactory_GetSystemFontCollection(factory, &syscoll, FALSE); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(collection == syscoll, "got %p, was %p\n", syscoll, collection); IDWriteFontCollection_Release(syscoll); IDWriteFontCollection_Release(collection); @@ -1237,7 +1237,7 @@ static void test_CreateTextFormat(void) ok(flow == DWRITE_FLOW_DIRECTION_TOP_TO_BOTTOM, "got %d\n", flow);
hr = IDWriteTextFormat_GetLineSpacing(format, &method, &spacing, &baseline); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(spacing == 0.0, "got %f\n", spacing); ok(baseline == 0.0, "got %f\n", baseline); ok(method == DWRITE_LINE_SPACING_METHOD_DEFAULT, "got %d\n", method); @@ -1247,7 +1247,7 @@ static void test_CreateTextFormat(void) trimming.delimiterCount = 10; trimmingsign = (void*)0xdeadbeef; hr = IDWriteTextFormat_GetTrimming(format, &trimming, &trimmingsign); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(trimming.granularity == DWRITE_TRIMMING_GRANULARITY_NONE, "got %d\n", trimming.granularity); ok(trimming.delimiter == 0, "got %d\n", trimming.delimiter); ok(trimming.delimiterCount == 0, "got %d\n", trimming.delimiterCount); @@ -1255,39 +1255,39 @@ static void test_CreateTextFormat(void)
/* setters */ hr = IDWriteTextFormat_SetTextAlignment(format, DWRITE_TEXT_ALIGNMENT_LEADING); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
hr = IDWriteTextFormat_SetTextAlignment(format, DWRITE_TEXT_ALIGNMENT_JUSTIFIED+1); - ok(hr == E_INVALIDARG, "got 0x%08x\n", hr); + ok(hr == E_INVALIDARG, "got 0x%08lx\n", hr);
hr = IDWriteTextFormat_SetParagraphAlignment(format, DWRITE_PARAGRAPH_ALIGNMENT_NEAR); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
hr = IDWriteTextFormat_SetParagraphAlignment(format, DWRITE_PARAGRAPH_ALIGNMENT_CENTER+1); - ok(hr == E_INVALIDARG, "got 0x%08x\n", hr); + ok(hr == E_INVALIDARG, "got 0x%08lx\n", hr);
hr = IDWriteTextFormat_SetWordWrapping(format, DWRITE_WORD_WRAPPING_WRAP); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
hr = IDWriteTextFormat_SetWordWrapping(format, DWRITE_WORD_WRAPPING_CHARACTER+1); - ok(hr == E_INVALIDARG, "got 0x%08x\n", hr); + ok(hr == E_INVALIDARG, "got 0x%08lx\n", hr);
hr = IDWriteTextFormat_SetReadingDirection(format, DWRITE_READING_DIRECTION_LEFT_TO_RIGHT); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
hr = IDWriteTextFormat_SetFlowDirection(format, DWRITE_FLOW_DIRECTION_TOP_TO_BOTTOM); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
hr = IDWriteTextFormat_SetTrimming(format, &trimming, NULL); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
/* invalid granularity */ trimming.granularity = 10; trimming.delimiter = 0; trimming.delimiterCount = 0; hr = IDWriteTextFormat_SetTrimming(format, &trimming, NULL); - ok(hr == E_INVALIDARG, "got 0x%08x\n", hr); + ok(hr == E_INVALIDARG, "got 0x%08lx\n", hr);
IDWriteTextFormat_Release(format); IDWriteFactory_Release(factory); @@ -1306,28 +1306,28 @@ static void test_GetLocaleName(void)
hr = IDWriteFactory_CreateTextFormat(factory, L"Tahoma", NULL, DWRITE_FONT_WEIGHT_NORMAL, DWRITE_FONT_STYLE_NORMAL, DWRITE_FONT_STRETCH_NORMAL, 10.0f, L"ru", &format); - ok(hr == S_OK, "Failed to create text format, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create text format, hr %#lx.\n", hr);
hr = IDWriteFactory_CreateGdiCompatibleTextLayout(factory, L"string", 0, format, 100.0f, 100.0f, 1.0f, NULL, FALSE, &layout); - ok(hr == S_OK, "Failed to create text layout, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create text layout, hr %#lx.\n", hr);
hr = IDWriteTextLayout_QueryInterface(layout, &IID_IDWriteTextFormat, (void**)&format2); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
len = IDWriteTextFormat_GetLocaleNameLength(format2); ok(len == 2, "got %u\n", len); len = IDWriteTextFormat_GetLocaleNameLength(format); ok(len == 2, "got %u\n", len); hr = IDWriteTextFormat_GetLocaleName(format2, buff, len); - ok(hr == E_NOT_SUFFICIENT_BUFFER, "got 0x%08x\n", hr); + ok(hr == E_NOT_SUFFICIENT_BUFFER, "got 0x%08lx\n", hr); hr = IDWriteTextFormat_GetLocaleName(format2, buff, len+1); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(!lstrcmpW(buff, L"ru"), "Unexpected locale name %s.\n", wine_dbgstr_w(buff)); hr = IDWriteTextFormat_GetLocaleName(format, buff, len); - ok(hr == E_NOT_SUFFICIENT_BUFFER, "got 0x%08x\n", hr); + ok(hr == E_NOT_SUFFICIENT_BUFFER, "got 0x%08lx\n", hr); hr = IDWriteTextFormat_GetLocaleName(format, buff, len+1); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(!lstrcmpW(buff, L"ru"), "Unexpected locale name %s.\n", wine_dbgstr_w(buff));
IDWriteTextLayout_Release(layout); @@ -1356,20 +1356,20 @@ static void test_CreateEllipsisTrimmingSign(void)
hr = IDWriteFactory_CreateTextFormat(factory, L"Tahoma", NULL, DWRITE_FONT_WEIGHT_NORMAL, DWRITE_FONT_STYLE_NORMAL, DWRITE_FONT_STRETCH_NORMAL, 10.0f, L"en-GB", &format); - ok(hr == S_OK, "Failed to create text format, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create text format, hr %#lx.\n", hr);
sign = (void *)0xdeadbeef; hr = IDWriteFactory_CreateEllipsisTrimmingSign(factory, NULL, &sign); - ok(hr == E_INVALIDARG, "Unexpected hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Unexpected hr %#lx.\n", hr); ok(!sign, "Unexpected pointer %p.\n", sign);
EXPECT_REF(format, 1); hr = IDWriteFactory_CreateEllipsisTrimmingSign(factory, format, &sign); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); EXPECT_REF(format, 1);
hr = IDWriteInlineObject_QueryInterface(sign, &IID_IDWriteTextLayout, (void**)&unk); - ok(hr == E_NOINTERFACE, "got 0x%08x\n", hr); + ok(hr == E_NOINTERFACE, "got 0x%08lx\n", hr);
if (0) {/* crashes on native */ hr = IDWriteInlineObject_GetBreakConditions(sign, NULL, NULL); @@ -1380,7 +1380,7 @@ if (0) {/* crashes on native */ metrics.baseline = 123.0; metrics.supportsSideways = TRUE; hr = IDWriteInlineObject_GetMetrics(sign, &metrics); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(metrics.width > 0.0, "got %.2f\n", metrics.width); ok(metrics.height == 0.0, "got %.2f\n", metrics.height); ok(metrics.baseline == 0.0, "got %.2f\n", metrics.baseline); @@ -1388,14 +1388,14 @@ if (0) {/* crashes on native */
before = after = DWRITE_BREAK_CONDITION_CAN_BREAK; hr = IDWriteInlineObject_GetBreakConditions(sign, &before, &after); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(before == DWRITE_BREAK_CONDITION_NEUTRAL, "got %d\n", before); ok(after == DWRITE_BREAK_CONDITION_NEUTRAL, "got %d\n", after);
/* Draw tests */ flush_sequence(sequences, RENDERER_ID); hr = IDWriteInlineObject_Draw(sign, NULL, &testrenderer, 0.0, 0.0, FALSE, FALSE, NULL); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok_sequence(sequences, RENDERER_ID, drawellipsis_seq, "ellipsis sign draw test", FALSE);
effect = create_test_effect(); @@ -1403,7 +1403,7 @@ if (0) {/* crashes on native */ EXPECT_REF(effect, 1); flush_sequence(sequences, RENDERER_ID); hr = IDWriteInlineObject_Draw(sign, NULL, &testrenderer, 0.0f, 0.0f, FALSE, FALSE, effect); - ok(hr == S_OK, "Failed to draw trimming sign, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to draw trimming sign, hr %#lx.\n", hr); ok_sequence(sequences, RENDERER_ID, drawellipsis_seq, "ellipsis sign draw with effect test", FALSE); EXPECT_REF(effect, 1);
@@ -1411,39 +1411,39 @@ if (0) {/* crashes on native */
flush_sequence(sequences, RENDERER_ID); hr = IDWriteInlineObject_Draw(sign, NULL, &testrenderer, 0.0f, 0.0f, FALSE, FALSE, (void *)0xdeadbeef); - ok(hr == S_OK, "Failed to draw trimming sign, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to draw trimming sign, hr %#lx.\n", hr); ok_sequence(sequences, RENDERER_ID, drawellipsis_seq, "ellipsis sign draw with effect test", FALSE);
memset(&ctxt, 0, sizeof(ctxt)); hr = IDWriteInlineObject_Draw(sign, &ctxt, &testrenderer, 123.0f, 456.0f, FALSE, FALSE, NULL); - ok(hr == S_OK, "Failed to draw trimming sign, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to draw trimming sign, hr %#lx.\n", hr); ok(ctxt.originX == 123.0f && ctxt.originY == 456.0f, "Unexpected drawing origin\n");
IDWriteInlineObject_Release(sign);
/* Centered format */ hr = IDWriteTextFormat_SetTextAlignment(format, DWRITE_TEXT_ALIGNMENT_CENTER); - ok(hr == S_OK, "Failed to set text alignment, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to set text alignment, hr %#lx.\n", hr);
hr = IDWriteFactory_CreateEllipsisTrimmingSign(factory, format, &sign); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
memset(&ctxt, 0, sizeof(ctxt)); hr = IDWriteInlineObject_Draw(sign, &ctxt, &testrenderer, 123.0f, 456.0f, FALSE, FALSE, NULL); - ok(hr == S_OK, "Failed to draw trimming sign, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to draw trimming sign, hr %#lx.\n", hr); ok(ctxt.originX == 123.0f && ctxt.originY == 456.0f, "Unexpected drawing origin\n");
IDWriteInlineObject_Release(sign);
/* non-orthogonal flow/reading combination */ hr = IDWriteTextFormat_SetReadingDirection(format, DWRITE_READING_DIRECTION_LEFT_TO_RIGHT); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
hr = IDWriteTextFormat_SetFlowDirection(format, DWRITE_FLOW_DIRECTION_LEFT_TO_RIGHT); - ok(hr == S_OK || broken(hr == E_INVALIDARG) /* vista, win7 */, "got 0x%08x\n", hr); + ok(hr == S_OK || broken(hr == E_INVALIDARG) /* vista, win7 */, "got 0x%08lx\n", hr); if (hr == S_OK) { hr = IDWriteFactory_CreateEllipsisTrimmingSign(factory, format, &sign); - ok(hr == DWRITE_E_FLOWDIRECTIONCONFLICTS, "got 0x%08x\n", hr); + ok(hr == DWRITE_E_FLOWDIRECTIONCONFLICTS, "got 0x%08lx\n", hr); }
IDWriteTextFormat_Release(format); @@ -1464,31 +1464,31 @@ static void test_fontweight(void)
hr = IDWriteFactory_CreateTextFormat(factory, L"Tahoma", NULL, DWRITE_FONT_WEIGHT_BOLD, DWRITE_FONT_STYLE_NORMAL, DWRITE_FONT_STRETCH_NORMAL, 10.0, L"ru", &format); - ok(hr == S_OK, "Failed to create text format, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create text format, hr %#lx.\n", hr);
hr = IDWriteFactory_CreateGdiCompatibleTextLayout(factory, L"string", 6, format, 100.0f, 100.0f, 1.0f, NULL, FALSE, &layout); - ok(hr == S_OK, "Failed to create text layout, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create text layout, hr %#lx.\n", hr);
hr = IDWriteTextLayout_QueryInterface(layout, &IID_IDWriteTextFormat, (void**)&fmt2); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
weight = IDWriteTextFormat_GetFontWeight(fmt2); ok(weight == DWRITE_FONT_WEIGHT_BOLD, "got %u\n", weight);
range.startPosition = range.length = 0; hr = IDWriteTextLayout_GetFontWeight(layout, 0, &weight, &range); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(range.startPosition == 0 && range.length == ~0u, "got %u, %u\n", range.startPosition, range.length);
range.startPosition = 0; range.length = 6; hr = IDWriteTextLayout_SetFontWeight(layout, DWRITE_FONT_WEIGHT_NORMAL, range); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
range.startPosition = range.length = 0; hr = IDWriteTextLayout_GetFontWeight(layout, 0, &weight, &range); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(range.startPosition == 0 && range.length == 6, "got %u, %u\n", range.startPosition, range.length);
/* IDWriteTextFormat methods output doesn't reflect layout changes */ @@ -1498,32 +1498,32 @@ static void test_fontweight(void) range.length = 0; weight = DWRITE_FONT_WEIGHT_BOLD; hr = IDWriteTextLayout_GetFontWeight(layout, 0, &weight, &range); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(weight == DWRITE_FONT_WEIGHT_NORMAL, "got %d\n", weight); ok(range.length == 6, "got %d\n", range.length);
range.startPosition = 0; range.length = 6; hr = IDWriteTextLayout_SetFontWeight(layout, 1000, range); - ok(hr == E_INVALIDARG, "got 0x%08x\n", hr); + ok(hr == E_INVALIDARG, "got 0x%08lx\n", hr);
size = IDWriteTextLayout_GetMaxWidth(layout); ok(size == 100.0, "got %.2f\n", size);
hr = IDWriteTextLayout_SetMaxWidth(layout, 0.0); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
size = IDWriteTextLayout_GetMaxWidth(layout); ok(size == 0.0, "got %.2f\n", size);
hr = IDWriteTextLayout_SetMaxWidth(layout, -1.0); - ok(hr == E_INVALIDARG, "got 0x%08x\n", hr); + ok(hr == E_INVALIDARG, "got 0x%08lx\n", hr);
size = IDWriteTextLayout_GetMaxWidth(layout); ok(size == 0.0, "got %.2f\n", size);
hr = IDWriteTextLayout_SetMaxWidth(layout, 100.0); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
size = IDWriteTextLayout_GetMaxWidth(layout); ok(size == 100.0, "got %.2f\n", size); @@ -1532,19 +1532,19 @@ static void test_fontweight(void) ok(size == 100.0, "got %.2f\n", size);
hr = IDWriteTextLayout_SetMaxHeight(layout, 0.0); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
size = IDWriteTextLayout_GetMaxHeight(layout); ok(size == 0.0, "got %.2f\n", size);
hr = IDWriteTextLayout_SetMaxHeight(layout, -1.0); - ok(hr == E_INVALIDARG, "got 0x%08x\n", hr); + ok(hr == E_INVALIDARG, "got 0x%08lx\n", hr);
size = IDWriteTextLayout_GetMaxHeight(layout); ok(size == 0.0, "got %.2f\n", size);
hr = IDWriteTextLayout_SetMaxHeight(layout, 100.0); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
size = IDWriteTextLayout_GetMaxHeight(layout); ok(size == 100.0, "got %.2f\n", size); @@ -1568,42 +1568,42 @@ static void test_SetInlineObject(void)
hr = IDWriteFactory_CreateTextFormat(factory, L"Tahoma", NULL, DWRITE_FONT_WEIGHT_BOLD, DWRITE_FONT_STYLE_NORMAL, DWRITE_FONT_STRETCH_NORMAL, 10.0f, L"ru", &format); - ok(hr == S_OK, "Failed to create text format, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create text format, hr %#lx.\n", hr);
hr = IDWriteFactory_CreateGdiCompatibleTextLayout(factory, L"string", 6, format, 100.0f, 100.0f, 1.0f, NULL, FALSE, &layout); - ok(hr == S_OK, "Failed to create text layout, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create text layout, hr %#lx.\n", hr);
hr = IDWriteFactory_CreateEllipsisTrimmingSign(factory, format, &inlineobj); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
hr = IDWriteFactory_CreateEllipsisTrimmingSign(factory, format, &inlineobj2); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
EXPECT_REF(inlineobj, 1); EXPECT_REF(inlineobj2, 1);
inlinetest = (void*)0x1; hr = IDWriteTextLayout_GetInlineObject(layout, 0, &inlinetest, NULL); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(inlinetest == NULL, "got %p\n", inlinetest);
range.startPosition = 0; range.length = 2; hr = IDWriteTextLayout_SetInlineObject(layout, inlineobj, range); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
EXPECT_REF(inlineobj, 2);
inlinetest = (void*)0x1; hr = IDWriteTextLayout_GetInlineObject(layout, 2, &inlinetest, NULL); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(inlinetest == NULL, "got %p\n", inlinetest);
inlinetest = NULL; r2.startPosition = r2.length = 100; hr = IDWriteTextLayout_GetInlineObject(layout, 0, &inlinetest, &r2); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(inlinetest == inlineobj, "got %p\n", inlinetest); ok(r2.startPosition == 0 && r2.length == 2, "got %d, %d\n", r2.startPosition, r2.length); IDWriteInlineObject_Release(inlinetest); @@ -1614,7 +1614,7 @@ static void test_SetInlineObject(void) inlinetest = NULL; r2.startPosition = r2.length = 100; hr = IDWriteTextLayout_GetInlineObject(layout, 1, &inlinetest, &r2); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(inlinetest == inlineobj, "got %p\n", inlinetest); ok(r2.startPosition == 0 && r2.length == 2, "got %d, %d\n", r2.startPosition, r2.length); IDWriteInlineObject_Release(inlinetest); @@ -1624,12 +1624,12 @@ static void test_SetInlineObject(void) range.startPosition = 1; range.length = 1; hr = IDWriteTextLayout_SetInlineObject(layout, inlineobj2, range); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
inlinetest = NULL; r2.startPosition = r2.length = 100; hr = IDWriteTextLayout_GetInlineObject(layout, 1, &inlinetest, &r2); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(inlinetest == inlineobj2, "got %p\n", inlinetest); ok(r2.startPosition == 1 && r2.length == 1, "got %d, %d\n", r2.startPosition, r2.length); IDWriteInlineObject_Release(inlinetest); @@ -1640,7 +1640,7 @@ static void test_SetInlineObject(void) inlinetest = NULL; r2.startPosition = r2.length = 100; hr = IDWriteTextLayout_GetInlineObject(layout, 0, &inlinetest, &r2); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(inlinetest == inlineobj, "got %p\n", inlinetest); ok(r2.startPosition == 0 && r2.length == 1, "got %d, %d\n", r2.startPosition, r2.length); IDWriteInlineObject_Release(inlinetest); @@ -1650,11 +1650,11 @@ static void test_SetInlineObject(void) range.startPosition = 1; range.length = 1; hr = IDWriteTextLayout_SetInlineObject(layout, inlineobj, range); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
r2.startPosition = r2.length = 100; hr = IDWriteTextLayout_GetInlineObject(layout, 0, &inlinetest, &r2); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(inlinetest == inlineobj, "got %p\n", inlinetest); ok(r2.startPosition == 0 && r2.length == 2, "got %d, %d\n", r2.startPosition, r2.length); IDWriteInlineObject_Release(inlinetest); @@ -1664,13 +1664,13 @@ static void test_SetInlineObject(void) range.startPosition = 1; range.length = 2; hr = IDWriteTextLayout_SetInlineObject(layout, inlineobj, range); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
EXPECT_REF(inlineobj, 2);
r2.startPosition = r2.length = 100; hr = IDWriteTextLayout_GetInlineObject(layout, 0, &inlinetest, &r2); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(inlinetest == inlineobj, "got %p\n", inlinetest); ok(r2.startPosition == 0 && r2.length == 3, "got %d, %d\n", r2.startPosition, r2.length); IDWriteInlineObject_Release(inlinetest); @@ -1776,100 +1776,100 @@ static void test_Draw(void)
hr = IDWriteFactory_CreateTextFormat(factory, L"Tahoma", NULL, DWRITE_FONT_WEIGHT_BOLD, DWRITE_FONT_STYLE_NORMAL, DWRITE_FONT_STRETCH_NORMAL, 10.0f, L"ru", &format); - ok(hr == S_OK, "Failed to create text format, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create text format, hr %#lx.\n", hr);
hr = IDWriteFactory_CreateTextLayout(factory, L"string", 6, format, 100.0f, 100.0f, &layout); - ok(hr == S_OK, "Failed to create text layout, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create text layout, hr %#lx.\n", hr);
hr = IDWriteFactory_CreateEllipsisTrimmingSign(factory, format, &inlineobj); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
range.startPosition = 5; range.length = 1; hr = IDWriteTextLayout_SetStrikethrough(layout, TRUE, range); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
range.startPosition = 1; range.length = 1; hr = IDWriteTextLayout_SetInlineObject(layout, inlineobj, range); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
range.startPosition = 4; range.length = 1; hr = IDWriteTextLayout_SetDrawingEffect(layout, (IUnknown*)inlineobj, range); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
range.startPosition = 0; range.length = 1; hr = IDWriteTextLayout_SetUnderline(layout, TRUE, range); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
flush_sequence(sequences, RENDERER_ID); hr = IDWriteTextLayout_Draw(layout, &ctxt, &testrenderer, 0.0, 0.0); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok_sequence(sequences, RENDERER_ID, draw_seq, "draw test", FALSE); IDWriteTextLayout_Release(layout);
/* with reduced width DrawGlyphRun() is called for every line */ hr = IDWriteFactory_CreateTextLayout(factory, L"string", 6, format, 5.0f, 100.0f, &layout); - ok(hr == S_OK, "Failed to create text layout, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create text layout, hr %#lx.\n", hr); flush_sequence(sequences, RENDERER_ID); hr = IDWriteTextLayout_Draw(layout, &ctxt, &testrenderer, 0.0, 0.0); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok_sequence(sequences, RENDERER_ID, draw_seq2, "draw test 2", TRUE); hr = IDWriteTextLayout_GetMetrics(layout, &tm); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); todo_wine ok(tm.lineCount == 6, "got %u\n", tm.lineCount); IDWriteTextLayout_Release(layout);
/* string with control characters */ hr = IDWriteFactory_CreateTextLayout(factory, str2W, 4, format, 500.0, 100.0, &layout); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); flush_sequence(sequences, RENDERER_ID); hr = IDWriteTextLayout_Draw(layout, &ctxt, &testrenderer, 0.0, 0.0); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok_sequence(sequences, RENDERER_ID, draw_seq3, "draw test 3", FALSE); IDWriteTextLayout_Release(layout);
/* strikethrough splits ranges from renderer point of view, but doesn't break shaping */ hr = IDWriteFactory_CreateTextLayout(factory, L"string", 6, format, 500.0f, 100.0f, &layout); - ok(hr == S_OK, "Failed to create text layout, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create text layout, hr %#lx.\n", hr); flush_sequence(sequences, RENDERER_ID);
range.startPosition = 0; range.length = 3; hr = IDWriteTextLayout_SetStrikethrough(layout, TRUE, range); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
hr = IDWriteTextLayout_Draw(layout, &ctxt, &testrenderer, 0.0, 0.0); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok_sequence(sequences, RENDERER_ID, draw_seq4, "draw test 4", FALSE); IDWriteTextLayout_Release(layout);
/* Strike through somewhere in the middle */ hr = IDWriteFactory_CreateTextLayout(factory, L"string", 6, format, 500.0f, 100.0f, &layout); - ok(hr == S_OK, "Failed to create text layout, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create text layout, hr %#lx.\n", hr); flush_sequence(sequences, RENDERER_ID);
range.startPosition = 2; range.length = 2; hr = IDWriteTextLayout_SetStrikethrough(layout, TRUE, range); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
hr = IDWriteTextLayout_Draw(layout, &ctxt, &testrenderer, 0.0, 0.0); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok_sequence(sequences, RENDERER_ID, draw_seq5, "draw test 5", FALSE); IDWriteTextLayout_Release(layout);
/* empty string */ hr = IDWriteFactory_CreateTextLayout(factory, L"string", 0, format, 500.0f, 100.0f, &layout); - ok(hr == S_OK, "Failed to create text layout, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create text layout, hr %#lx.\n", hr);
flush_sequence(sequences, RENDERER_ID); hr = IDWriteTextLayout_Draw(layout, &ctxt, &testrenderer, 0.0, 0.0); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok_sequence(sequences, RENDERER_ID, empty_seq, "draw test 6", FALSE); IDWriteTextLayout_Release(layout);
@@ -1879,26 +1879,26 @@ static void test_Draw(void) /* different parameter combinations with gdi-compatible layout */ hr = IDWriteFactory_CreateGdiCompatibleTextLayout(factory, L"string", 6, format, 100.0f, 100.0f, 1.0f, NULL, TRUE, &layout); - ok(hr == S_OK, "Failed to create text layout, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create text layout, hr %#lx.\n", hr); flush_sequence(sequences, RENDERER_ID); hr = IDWriteTextLayout_Draw(layout, &ctxt, &testrenderer, 0.0, 0.0); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok_sequence(sequences, RENDERER_ID, draw_single_run_seq, "draw test 7", FALSE);
/* text alignment keeps pixel-aligned origin */ hr = IDWriteTextLayout_GetMetrics(layout, &tm); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(tm.width == floorf(tm.width), "got %f\n", tm.width);
hr = IDWriteTextLayout_SetMaxWidth(layout, tm.width + 3.0); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); hr = IDWriteTextLayout_SetTextAlignment(layout, DWRITE_TEXT_ALIGNMENT_CENTER); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
ctxt.originX = ctxt.originY = 0.0; flush_sequence(sequences, RENDERER_ID); hr = IDWriteTextLayout_Draw(layout, &ctxt, &testrenderer, 0.0, 0.0); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok_sequence(sequences, RENDERER_ID, draw_single_run_seq, "draw test 7", FALSE); ok(ctxt.originX != 0.0 && ctxt.originX == floorf(ctxt.originX), "got %f\n", ctxt.originX);
@@ -1909,10 +1909,10 @@ static void test_Draw(void)
hr = IDWriteFactory_CreateGdiCompatibleTextLayout(factory, L"string", 6, format, 100.0f, 100.0f, 1.0f, NULL, FALSE, &layout); - ok(hr == S_OK, "Failed to create text layout, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create text layout, hr %#lx.\n", hr); flush_sequence(sequences, RENDERER_ID); hr = IDWriteTextLayout_Draw(layout, &ctxt, &testrenderer, 0.0, 0.0); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok_sequence(sequences, RENDERER_ID, draw_single_run_seq, "draw test 8", FALSE); IDWriteTextLayout_Release(layout);
@@ -1923,10 +1923,10 @@ static void test_Draw(void) m.m12 = m.m21 = m.dx = m.dy = 0.0; hr = IDWriteFactory_CreateGdiCompatibleTextLayout(factory, L"string", 6, format, 100.0f, 100.0f, 1.0f, &m, TRUE, &layout); - ok(hr == S_OK, "Failed to create text layout, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create text layout, hr %#lx.\n", hr); flush_sequence(sequences, RENDERER_ID); hr = IDWriteTextLayout_Draw(layout, &ctxt, &testrenderer, 0.0, 0.0); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok_sequence(sequences, RENDERER_ID, draw_single_run_seq, "draw test 9", FALSE); IDWriteTextLayout_Release(layout);
@@ -1937,10 +1937,10 @@ static void test_Draw(void) m.m12 = m.m21 = m.dx = m.dy = 0.0; hr = IDWriteFactory_CreateGdiCompatibleTextLayout(factory, L"string", 6, format, 100.0f, 100.0f, 1.0f, &m, FALSE, &layout); - ok(hr == S_OK, "Failed to create text layout, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create text layout, hr %#lx.\n", hr); flush_sequence(sequences, RENDERER_ID); hr = IDWriteTextLayout_Draw(layout, &ctxt, &testrenderer, 0.0, 0.0); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok_sequence(sequences, RENDERER_ID, draw_single_run_seq, "draw test 10", FALSE); IDWriteTextLayout_Release(layout);
@@ -1948,18 +1948,18 @@ static void test_Draw(void)
/* text that triggers bidi run reordering */ hr = IDWriteFactory_CreateTextLayout(factory, str3W, lstrlenW(str3W), format, 1000.0f, 100.0f, &layout); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
ctxt.gdicompat = FALSE; ctxt.use_gdi_natural = FALSE; ctxt.snapping_disabled = TRUE;
hr = IDWriteTextLayout_SetReadingDirection(layout, DWRITE_READING_DIRECTION_LEFT_TO_RIGHT); - ok(hr == S_OK, "Failed to set reading direction, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to set reading direction, hr %#lx.\n", hr);
flush_sequence(sequences, RENDERER_ID); hr = IDWriteTextLayout_Draw(layout, &ctxt, &testrenderer, 0.0f, 0.0f); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok_sequence(sequences, RENDERER_ID, draw_ltr_reordered_run_seq, "draw test 11", FALSE);
IDWriteTextLayout_Release(layout); @@ -1979,12 +1979,12 @@ static void test_typography(void) factory = create_factory();
hr = IDWriteFactory_CreateTypography(factory, &typography); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
feature.nameTag = DWRITE_FONT_FEATURE_TAG_KERNING; feature.parameter = 1; hr = IDWriteTypography_AddFontFeature(typography, feature); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
count = IDWriteTypography_GetFontFeatureCount(typography); ok(count == 1, "got %u\n", count); @@ -1993,38 +1993,38 @@ static void test_typography(void) feature.nameTag = DWRITE_FONT_FEATURE_TAG_KERNING; feature.parameter = 0; hr = IDWriteTypography_AddFontFeature(typography, feature); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
count = IDWriteTypography_GetFontFeatureCount(typography); ok(count == 2, "got %u\n", count);
memset(&feature, 0xcc, sizeof(feature)); hr = IDWriteTypography_GetFontFeature(typography, 0, &feature); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(feature.nameTag == DWRITE_FONT_FEATURE_TAG_KERNING, "got tag %x\n", feature.nameTag); ok(feature.parameter == 1, "got %u\n", feature.parameter);
memset(&feature, 0xcc, sizeof(feature)); hr = IDWriteTypography_GetFontFeature(typography, 1, &feature); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(feature.nameTag == DWRITE_FONT_FEATURE_TAG_KERNING, "got tag %x\n", feature.nameTag); ok(feature.parameter == 0, "got %u\n", feature.parameter);
hr = IDWriteTypography_GetFontFeature(typography, 2, &feature); - ok(hr == E_INVALIDARG, "got 0x%08x\n", hr); + ok(hr == E_INVALIDARG, "got 0x%08lx\n", hr);
/* duplicated with same parameter value */ feature.nameTag = DWRITE_FONT_FEATURE_TAG_KERNING; feature.parameter = 0; hr = IDWriteTypography_AddFontFeature(typography, feature); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
count = IDWriteTypography_GetFontFeatureCount(typography); ok(count == 3, "got %u\n", count);
memset(&feature, 0xcc, sizeof(feature)); hr = IDWriteTypography_GetFontFeature(typography, 2, &feature); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(feature.nameTag == DWRITE_FONT_FEATURE_TAG_KERNING, "got tag %x\n", feature.nameTag); ok(feature.parameter == 0, "got %u\n", feature.parameter);
@@ -2062,27 +2062,27 @@ static void test_GetClusterMetrics(void)
hr = IDWriteFactory_CreateTextFormat(factory, L"Tahoma", NULL, DWRITE_FONT_WEIGHT_NORMAL, DWRITE_FONT_STYLE_NORMAL, DWRITE_FONT_STRETCH_NORMAL, 10.0f, L"en-us", &format); - ok(hr == S_OK, "Failed to create text format, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create text format, hr %#lx.\n", hr);
hr = IDWriteFactory_CreateTextLayout(factory, str3W, 7, format, 1000.0, 1000.0, &layout); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); hr = IDWriteTextLayout_GetClusterMetrics(layout, NULL, 0, &count); - ok(hr == E_NOT_SUFFICIENT_BUFFER, "got 0x%08x\n", hr); + ok(hr == E_NOT_SUFFICIENT_BUFFER, "got 0x%08lx\n", hr); ok(count == 7, "got %u\n", count); IDWriteTextLayout_Release(layout);
hr = IDWriteFactory_CreateTextLayout(factory, L"abcd", 4, format, 1000.0f, 1000.0f, &layout); - ok(hr == S_OK, "Failed to create text layout, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create text layout, hr %#lx.\n", hr);
count = 0; hr = IDWriteTextLayout_GetClusterMetrics(layout, NULL, 0, &count); - ok(hr == E_NOT_SUFFICIENT_BUFFER, "got 0x%08x\n", hr); + ok(hr == E_NOT_SUFFICIENT_BUFFER, "got 0x%08lx\n", hr); ok(count == 4, "got %u\n", count);
/* check every cluster width */ count = 0; hr = IDWriteTextLayout_GetClusterMetrics(layout, metrics, ARRAY_SIZE(metrics), &count); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(count == 4, "got %u\n", count); for (i = 0; i < count; i++) { ok(metrics[i].width > 0.0, "%u: got width %.2f\n", i, metrics[i].width); @@ -2098,7 +2098,7 @@ static void test_GetClusterMetrics(void) leading = trailing = min_advance = 2.0; hr = IDWriteTextLayout1_GetCharacterSpacing(layout1, 500, &leading, &trailing, &min_advance, &r); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(leading == 0.0 && trailing == 0.0 && min_advance == 0.0, "got %.2f, %.2f, %.2f\n", leading, trailing, min_advance); ok(r.startPosition == 0 && r.length == ~0u, "got %u, %u\n", r.startPosition, r.length); @@ -2106,18 +2106,18 @@ static void test_GetClusterMetrics(void) leading = trailing = min_advance = 2.0; hr = IDWriteTextLayout1_GetCharacterSpacing(layout1, 0, &leading, &trailing, &min_advance, NULL); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(leading == 0.0 && trailing == 0.0 && min_advance == 0.0, "got %.2f, %.2f, %.2f\n", leading, trailing, min_advance);
r.startPosition = 0; r.length = 4; hr = IDWriteTextLayout1_SetCharacterSpacing(layout1, 10.0, 15.0, 0.0, r); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
count = 0; hr = IDWriteTextLayout_GetClusterMetrics(layout, metrics2, ARRAY_SIZE(metrics2), &count); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(count == 4, "got %u\n", count); for (i = 0; i < count; ++i) { @@ -2130,13 +2130,13 @@ static void test_GetClusterMetrics(void) r.startPosition = 0; r.length = 4; hr = IDWriteTextLayout1_SetCharacterSpacing(layout1, 0.0, 0.0, 0.0, r); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
/* negative advance limit */ r.startPosition = 0; r.length = 4; hr = IDWriteTextLayout1_SetCharacterSpacing(layout1, 0.0, 0.0, -10.0, r); - ok(hr == E_INVALIDARG, "got 0x%08x\n", hr); + ok(hr == E_INVALIDARG, "got 0x%08lx\n", hr);
IDWriteTextLayout1_Release(layout1); } @@ -2144,28 +2144,28 @@ static void test_GetClusterMetrics(void) win_skip("IDWriteTextLayout1 is not supported, cluster spacing test skipped.\n");
hr = IDWriteFactory_CreateEllipsisTrimmingSign(factory, format, &trimm); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
range.startPosition = 0; range.length = 2; hr = IDWriteTextLayout_SetInlineObject(layout, trimm, range); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
/* inline object takes a separate cluster, replaced codepoints number doesn't matter */ count = 0; hr = IDWriteTextLayout_GetClusterMetrics(layout, NULL, 0, &count); - ok(hr == E_NOT_SUFFICIENT_BUFFER, "got 0x%08x\n", hr); + ok(hr == E_NOT_SUFFICIENT_BUFFER, "got 0x%08lx\n", hr); ok(count == 3, "got %u\n", count);
count = 0; memset(&metrics, 0, sizeof(metrics)); hr = IDWriteTextLayout_GetClusterMetrics(layout, metrics, 1, &count); - ok(hr == E_NOT_SUFFICIENT_BUFFER, "got 0x%08x\n", hr); + ok(hr == E_NOT_SUFFICIENT_BUFFER, "got 0x%08lx\n", hr); ok(count == 3, "got %u\n", count); ok(metrics[0].length == 2, "got %u\n", metrics[0].length);
hr = IDWriteInlineObject_GetMetrics(trimm, &inline_metrics); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(inline_metrics.width > 0.0 && inline_metrics.width == metrics[0].width, "got %.2f, expected %.2f\n", inline_metrics.width, metrics[0].width);
@@ -2173,13 +2173,13 @@ static void test_GetClusterMetrics(void)
/* text with non-visual control codes */ hr = IDWriteFactory_CreateTextLayout(factory, str2W, 3, format, 1000.0, 1000.0, &layout); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
/* bidi control codes take a separate cluster */ count = 0; memset(metrics, 0, sizeof(metrics)); hr = IDWriteTextLayout_GetClusterMetrics(layout, metrics, 3, &count); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(count == 3, "got %u\n", count);
ok(metrics[0].width == 0.0, "got %.2f\n", metrics[0].width); @@ -2210,17 +2210,17 @@ static void test_GetClusterMetrics(void)
/* single inline object that fails to report its metrics */ hr = IDWriteFactory_CreateTextLayout(factory, L"abcd", 4, format, 1000.0f, 1000.0f, &layout); - ok(hr == S_OK, "Failed to create text layout, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create text layout, hr %#lx.\n", hr);
range.startPosition = 0; range.length = 4; hr = IDWriteTextLayout_SetInlineObject(layout, &testinlineobj, range); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
count = 0; memset(metrics, 0, sizeof(metrics)); hr = IDWriteTextLayout_GetClusterMetrics(layout, metrics, 3, &count); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(count == 1, "got %u\n", count);
/* object sets a width to 123.0, but returns failure from GetMetrics() */ @@ -2236,12 +2236,12 @@ static void test_GetClusterMetrics(void) range.startPosition = 2; range.length = 2; hr = IDWriteTextLayout_SetInlineObject(layout, &testinlineobj2, range); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
count = 0; memset(metrics, 0, sizeof(metrics)); hr = IDWriteTextLayout_GetClusterMetrics(layout, metrics, 3, &count); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(count == 2, "got %u\n", count);
ok(metrics[0].width == 0.0, "got %.2f\n", metrics[0].width); @@ -2264,23 +2264,23 @@ static void test_GetClusterMetrics(void)
/* zero length string */ hr = IDWriteFactory_CreateTextLayout(factory, L"abcd", 0, format, 1000.0f, 1000.0f, &layout); - ok(hr == S_OK, "Failed to create text layout, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create text layout, hr %#lx.\n", hr);
count = 1; memset(metrics, 0, sizeof(metrics)); hr = IDWriteTextLayout_GetClusterMetrics(layout, metrics, 3, &count); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(count == 0, "got %u\n", count); IDWriteTextLayout_Release(layout);
/* Whitespace */ hr = IDWriteFactory_CreateTextLayout(factory, L"a ", 2, format, 1000.0f, 1000.0f, &layout); - ok(hr == S_OK, "Failed to create text layout, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create text layout, hr %#lx.\n", hr);
count = 0; memset(metrics, 0, sizeof(metrics)); hr = IDWriteTextLayout_GetClusterMetrics(layout, metrics, 2, &count); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(count == 2, "got %u\n", count); ok(metrics[0].isWhitespace == 0, "got %d\n", metrics[0].isWhitespace); ok(metrics[0].canWrapLineAfter == 0, "got %d\n", metrics[0].canWrapLineAfter); @@ -2290,17 +2290,17 @@ static void test_GetClusterMetrics(void)
/* Layout is fully covered by inline object with after condition DWRITE_BREAK_CONDITION_MAY_NOT_BREAK. */ hr = IDWriteFactory_CreateTextLayout(factory, L"a ", 2, format, 1000.0f, 1000.0f, &layout); - ok(hr == S_OK, "Failed to create text layout, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create text layout, hr %#lx.\n", hr);
range.startPosition = 0; range.length = ~0u; hr = IDWriteTextLayout_SetInlineObject(layout, &testinlineobj3, range); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
count = 0; memset(metrics, 0, sizeof(metrics)); hr = IDWriteTextLayout_GetClusterMetrics(layout, metrics, 2, &count); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(count == 1, "got %u\n", count); ok(metrics[0].canWrapLineAfter == 1, "got %d\n", metrics[0].canWrapLineAfter);
@@ -2308,12 +2308,12 @@ static void test_GetClusterMetrics(void)
/* compare natural cluster width with gdi layout */ hr = IDWriteFactory_CreateTextLayout(factory, L"a ", 1, format, 100.0f, 100.0f, &layout); - ok(hr == S_OK, "Failed to create text layout, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create text layout, hr %#lx.\n", hr);
count = 0; memset(metrics, 0, sizeof(metrics)); hr = IDWriteTextLayout_GetClusterMetrics(layout, metrics, 1, &count); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(count == 1, "got %u\n", count); ok(metrics[0].width != floorf(metrics[0].width), "got %f\n", metrics[0].width);
@@ -2321,12 +2321,12 @@ static void test_GetClusterMetrics(void)
hr = IDWriteFactory_CreateGdiCompatibleTextLayout(factory, L"a ", 1, format, 100.0f, 100.0f, 1.0f, NULL, FALSE, &layout); - ok(hr == S_OK, "Failed to create text layout, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create text layout, hr %#lx.\n", hr);
count = 0; memset(metrics, 0, sizeof(metrics)); hr = IDWriteTextLayout_GetClusterMetrics(layout, metrics, 1, &count); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(count == 1, "got %u\n", count); ok(metrics[0].width == floorf(metrics[0].width), "got %f\n", metrics[0].width);
@@ -2334,12 +2334,12 @@ static void test_GetClusterMetrics(void)
/* isNewline tests */ hr = IDWriteFactory_CreateTextLayout(factory, str5W, lstrlenW(str5W), format, 100.0f, 200.0f, &layout); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
count = 0; memset(metrics, 0, sizeof(metrics)); hr = IDWriteTextLayout_GetClusterMetrics(layout, metrics, ARRAY_SIZE(metrics), &count); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(count == 22, "got %u\n", count);
ok(metrics[1].isNewline == 1, "got %d\n", metrics[1].isNewline); @@ -2383,12 +2383,12 @@ static void test_GetClusterMetrics(void) /* Test whitespace resolution from linebreaking classes BK, ZW, and SP */ hr = IDWriteFactory_CreateTextLayout(factory, str_white_spaceW, ARRAY_SIZE(str_white_spaceW), format, 100.0f, 200.0f, &layout); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
count = 0; memset(metrics, 0, sizeof(metrics)); hr = IDWriteTextLayout_GetClusterMetrics(layout, metrics, 20, &count); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(count == 6, "got %u\n", count);
ok(metrics[0].isWhitespace == 1, "got %d\n", metrics[0].isWhitespace); @@ -2402,16 +2402,16 @@ static void test_GetClusterMetrics(void)
/* Trigger line trimming. */ hr = IDWriteFactory_CreateTextLayout(factory, L"abcd", 4, format, 100.0f, 200.0f, &layout); - ok(hr == S_OK, "Failed to create text layout, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create text layout, hr %#lx.\n", hr);
count = 0; memset(metrics, 0, sizeof(metrics)); hr = IDWriteTextLayout_GetClusterMetrics(layout, metrics, 4, &count); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(count == 4, "got %u\n", count);
hr = IDWriteTextLayout_GetMetrics(layout, &text_metrics); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
width = metrics[0].width + inline_metrics.width; ok(width < text_metrics.width, "unexpected trimming sign width\n"); @@ -2421,19 +2421,19 @@ static void test_GetClusterMetrics(void) trimming_options.delimiter = 0; trimming_options.delimiterCount = 0; hr = IDWriteTextLayout_SetTrimming(layout, &trimming_options, trimm); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
hr = IDWriteTextLayout_SetMaxWidth(layout, width); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
count = 0; memset(metrics, 0, sizeof(metrics)); hr = IDWriteTextLayout_GetClusterMetrics(layout, metrics, 4, &count); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(count == 4, "got %u\n", count);
hr = IDWriteTextLayout_GetLineMetrics(layout, &line, 1, &count); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(count == 1, "got %u\n", count); ok(line.length == 4, "got %u\n", line.length); ok(line.isTrimmed, "got %d\n", line.isTrimmed); @@ -2442,15 +2442,15 @@ static void test_GetClusterMetrics(void)
/* NO_WRAP, check cluster wrapping attribute. */ hr = IDWriteTextFormat_SetWordWrapping(format, DWRITE_WORD_WRAPPING_NO_WRAP); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
hr = IDWriteFactory_CreateTextLayout(factory, L"a b", 3, format, 1000.0f, 200.0f, &layout); - ok(hr == S_OK, "Failed to create text layout, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create text layout, hr %#lx.\n", hr);
count = 0; memset(metrics, 0, sizeof(metrics)); hr = IDWriteTextLayout_GetClusterMetrics(layout, metrics, 3, &count); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(count == 3, "got %u\n", count);
ok(metrics[0].canWrapLineAfter == 0, "got %d\n", metrics[0].canWrapLineAfter); @@ -2461,38 +2461,38 @@ static void test_GetClusterMetrics(void)
/* Single cluster layout, trigger trimming. */ hr = IDWriteFactory_CreateTextLayout(factory, L"a b", 1, format, 1000.0f, 200.0f, &layout); - ok(hr == S_OK, "Failed to create layout, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create layout, hr %#lx.\n", hr);
count = 0; memset(metrics, 0, sizeof(metrics)); hr = IDWriteTextLayout_GetClusterMetrics(layout, metrics, 1, &count); - ok(hr == S_OK, "Failed to get cluster metrics, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get cluster metrics, hr %#lx.\n", hr); ok(count == 1, "Unexpected cluster count %u.\n", count);
hr = IDWriteTextLayout_SetMaxWidth(layout, metrics[0].width / 2.0f); - ok(hr == S_OK, "Failed to set layout width, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to set layout width, hr %#lx.\n", hr);
trimming_options.granularity = DWRITE_TRIMMING_GRANULARITY_CHARACTER; trimming_options.delimiter = 0; trimming_options.delimiterCount = 0; hr = IDWriteTextLayout_SetTrimming(layout, &trimming_options, trimm); - ok(hr == S_OK, "Failed to set trimming options, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to set trimming options, hr %#lx.\n", hr);
count = 0; memset(metrics, 0, sizeof(metrics)); hr = IDWriteTextLayout_GetClusterMetrics(layout, metrics, 1, &count); - ok(hr == S_OK, "Failed to get cluster metrics, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get cluster metrics, hr %#lx.\n", hr); ok(count == 1, "Unexpected cluster count %u.\n", count);
hr = IDWriteTextLayout_GetLineMetrics(layout, &line, 1, &count); - ok(hr == S_OK, "Failed to get line metrics, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get line metrics, hr %#lx.\n", hr); ok(count == 1, "Unexpected line count %u.\n", count); ok(line.length == 1, "Unexpected line length %u.\n", line.length); ok(line.isTrimmed, "Unexpected trimming flag %x.\n", line.isTrimmed);
flush_sequence(sequences, RENDERER_ID); hr = IDWriteTextLayout_Draw(layout, NULL, &testrenderer, 0.0f, 0.0f); - ok(hr == S_OK, "Draw() failed, hr %#x.\n", hr); + ok(hr == S_OK, "Draw() failed, hr %#lx.\n", hr); ok_sequence(sequences, RENDERER_ID, draw_trimmed_seq, "Trimmed draw test", FALSE);
IDWriteTextLayout_Release(layout); @@ -2516,24 +2516,24 @@ static void test_SetLocaleName(void) /* create format with mixed case locale name, get it back */ hr = IDWriteFactory_CreateTextFormat(factory, L"Tahoma", NULL, DWRITE_FONT_WEIGHT_NORMAL, DWRITE_FONT_STYLE_NORMAL, DWRITE_FONT_STRETCH_NORMAL, 10.0f, L"eN-uS", &format); - ok(hr == S_OK, "Failed to create text format, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create text format, hr %#lx.\n", hr);
hr = IDWriteTextFormat_GetLocaleName(format, buffW, ARRAY_SIZE(buffW)); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(!lstrcmpW(buffW, L"en-us"), "Unexpected locale name %s.\n", wine_dbgstr_w(buffW));
hr = IDWriteFactory_CreateTextLayout(factory, L"abcd", 4, format, 1000.0f, 1000.0f, &layout); - ok(hr == S_OK, "Failed to create text layout, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create text layout, hr %#lx.\n", hr);
hr = IDWriteTextLayout_QueryInterface(layout, &IID_IDWriteTextFormat, (void**)&format2); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
hr = IDWriteTextFormat_GetLocaleName(format2, buffW, ARRAY_SIZE(buffW)); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(!lstrcmpW(buffW, L"en-us"), "Unexpected locale name %s.\n", wine_dbgstr_w(buffW));
hr = IDWriteTextLayout_GetLocaleName(layout, 0, buffW, ARRAY_SIZE(buffW), NULL); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(!lstrcmpW(buffW, L"en-us"), "Unexpected locale name %s.\n", wine_dbgstr_w(buffW));
IDWriteTextFormat_Release(format2); @@ -2542,25 +2542,25 @@ static void test_SetLocaleName(void)
hr = IDWriteFactory_CreateTextFormat(factory, L"Tahoma", NULL, DWRITE_FONT_WEIGHT_NORMAL, DWRITE_FONT_STYLE_NORMAL, DWRITE_FONT_STRETCH_NORMAL, 10.0f, L"en-us", &format); - ok(hr == S_OK, "Failed to create text format, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create text format, hr %#lx.\n", hr);
hr = IDWriteFactory_CreateTextLayout(factory, L"abcd", 4, format, 1000.0f, 1000.0f, &layout); - ok(hr == S_OK, "Failed to create text layout, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create text layout, hr %#lx.\n", hr);
range.startPosition = 0; range.length = 1; hr = IDWriteTextLayout_SetLocaleName(layout, L"en-us", range); - ok(hr == S_OK, "Failed to set locale name, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to set locale name, hr %#lx.\n", hr);
hr = IDWriteTextLayout_SetLocaleName(layout, NULL, range); - ok(hr == E_INVALIDARG, "got 0x%08x\n", hr); + ok(hr == E_INVALIDARG, "got 0x%08lx\n", hr);
/* invalid locale name is allowed */ hr = IDWriteTextLayout_SetLocaleName(layout, L"abcd", range); - ok(hr == S_OK, "Failed to set locale name, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to set locale name, hr %#lx.\n", hr);
hr = IDWriteTextLayout_GetLocaleName(layout, 0, NULL, 0, NULL); - ok(hr == E_INVALIDARG, "got 0x%08x\n", hr); + ok(hr == E_INVALIDARG, "got 0x%08lx\n", hr);
if (0) /* crashes on native */ hr = IDWriteTextLayout_GetLocaleName(layout, 0, NULL, 1, NULL); @@ -2568,14 +2568,14 @@ static void test_SetLocaleName(void) buffW[0] = 0; range.length = 0; hr = IDWriteTextLayout_GetLocaleName(layout, 0, buffW, ARRAY_SIZE(buffW), &range); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(!lstrcmpW(buffW, L"abcd"), "Unexpected locale name %s.\n", wine_dbgstr_w(buffW)); ok(range.startPosition == 0 && range.length == 1, "got %u,%u\n", range.startPosition, range.length);
/* get with a shorter buffer */ buffW[0] = 0xa; hr = IDWriteTextLayout_GetLocaleName(layout, 0, buffW, 1, NULL); - ok(hr == E_NOT_SUFFICIENT_BUFFER, "got 0x%08x\n", hr); + ok(hr == E_NOT_SUFFICIENT_BUFFER, "got 0x%08lx\n", hr); ok(buffW[0] == 0, "got %x\n", buffW[0]);
/* name is too long */ @@ -2586,23 +2586,23 @@ static void test_SetLocaleName(void) range.startPosition = 0; range.length = 1; hr = IDWriteTextLayout_SetLocaleName(layout, buffW, range); - ok(hr == E_INVALIDARG, "got 0x%08x\n", hr); + ok(hr == E_INVALIDARG, "got 0x%08lx\n", hr);
buffW[0] = 0; hr = IDWriteTextLayout_GetLocaleName(layout, 0, buffW, ARRAY_SIZE(buffW), NULL); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(!lstrcmpW(buffW, L"abcd"), "Unexpected locale name %s.\n", wine_dbgstr_w(buffW));
/* set initial locale name for whole text, except with a different casing */ range.startPosition = 0; range.length = 4; hr = IDWriteTextLayout_SetLocaleName(layout, L"eN-uS", range); - ok(hr == S_OK, "Failed to set locale name, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to set locale name, hr %#lx.\n", hr);
buffW[0] = 0; range.length = 0; hr = IDWriteTextLayout_GetLocaleName(layout, 0, buffW, ARRAY_SIZE(buffW), &range); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(!lstrcmpW(buffW, L"en-us"), "Unexpected locale name %s.\n", wine_dbgstr_w(buffW)); ok((range.startPosition == 0 && range.length == ~0u) || broken(range.startPosition == 0 && range.length == 4) /* vista/win7 */, "got %u,%u\n", range.startPosition, range.length); @@ -2611,7 +2611,7 @@ static void test_SetLocaleName(void) buffW[0] = 0; range.length = 0; hr = IDWriteTextLayout_GetLocaleName(layout, 100, buffW, ARRAY_SIZE(buffW), &range); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(!lstrcmpW(buffW, L"en-us"), "Unexpected locale name %s.\n", wine_dbgstr_w(buffW)); ok((range.startPosition == 0 && range.length == ~0u) || broken(range.startPosition == 4 && range.length == ~0u-4) /* vista/win7 */, "got %u,%u\n", range.startPosition, range.length); @@ -2638,10 +2638,10 @@ static void test_SetPairKerning(void)
hr = IDWriteFactory_CreateTextFormat(factory, L"Tahoma", NULL, DWRITE_FONT_WEIGHT_NORMAL, DWRITE_FONT_STYLE_NORMAL, DWRITE_FONT_STRETCH_NORMAL, 10.0f, L"en-us", &format); - ok(hr == S_OK, "Failed to create text format, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create text format, hr %#lx.\n", hr);
hr = IDWriteFactory_CreateTextLayout(factory, strW, 4, format, 1000.0, 1000.0, &layout); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); IDWriteTextFormat_Release(format);
hr = IDWriteTextLayout_QueryInterface(layout, &IID_IDWriteTextLayout1, (void**)&layout1); @@ -2659,19 +2659,19 @@ if (0) { /* crashes on native */ }
hr = IDWriteTextLayout1_GetPairKerning(layout1, 0, &kerning, NULL); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
range.startPosition = 0; range.length = 0; kerning = TRUE; hr = IDWriteTextLayout1_GetPairKerning(layout1, 0, &kerning, &range); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(!kerning, "got %d\n", kerning); ok(range.length == ~0u, "got %u\n", range.length);
count = 0; hr = IDWriteTextLayout1_GetClusterMetrics(layout1, clusters, 4, &count); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(count == 3, "Unexpected cluster count %u.\n", count); ok(clusters[0].length == 1, "got %u\n", clusters[0].length); ok(clusters[1].length == 2, "got %u\n", clusters[1].length); @@ -2682,16 +2682,16 @@ if (0) { /* crashes on native */ range.startPosition = 0; range.length = 2; hr = IDWriteTextLayout1_SetPairKerning(layout1, 2, range); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
kerning = FALSE; hr = IDWriteTextLayout1_GetPairKerning(layout1, 0, &kerning, &range); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(kerning == TRUE, "got %d\n", kerning);
count = 0; hr = IDWriteTextLayout1_GetClusterMetrics(layout1, clusters, 4, &count); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(count == 4, "got %u\n", count); ok(clusters[0].length == 1, "got %u\n", clusters[0].length); ok(clusters[1].length == 1, "got %u\n", clusters[1].length); @@ -2716,10 +2716,10 @@ static void test_SetVerticalGlyphOrientation(void)
hr = IDWriteFactory_CreateTextFormat(factory, L"Tahoma", NULL, DWRITE_FONT_WEIGHT_NORMAL, DWRITE_FONT_STYLE_NORMAL, DWRITE_FONT_STRETCH_NORMAL, 10.0f, L"en-us", &format); - ok(hr == S_OK, "Failed to create text format, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create text format, hr %#lx.\n", hr);
hr = IDWriteFactory_CreateTextLayout(factory, L"abcd", 4, format, 1000.0f, 1000.0f, &layout); - ok(hr == S_OK, "Failed to create text layout, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create text layout, hr %#lx.\n", hr); IDWriteTextFormat_Release(format);
hr = IDWriteTextLayout_QueryInterface(layout, &IID_IDWriteTextLayout2, (void**)&layout2); @@ -2735,16 +2735,16 @@ static void test_SetVerticalGlyphOrientation(void) ok(orientation == DWRITE_VERTICAL_GLYPH_ORIENTATION_DEFAULT, "got %d\n", orientation);
hr = IDWriteTextLayout2_SetVerticalGlyphOrientation(layout2, DWRITE_VERTICAL_GLYPH_ORIENTATION_STACKED+1); - ok(hr == E_INVALIDARG, "got 0x%08x\n", hr); + ok(hr == E_INVALIDARG, "got 0x%08lx\n", hr);
hr = IDWriteTextLayout2_QueryInterface(layout2, &IID_IDWriteTextFormat1, (void **)&format1); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
orientation = IDWriteTextFormat1_GetVerticalGlyphOrientation(format1); ok(orientation == DWRITE_VERTICAL_GLYPH_ORIENTATION_DEFAULT, "Unexpected orientation %d.\n", orientation);
hr = IDWriteTextLayout2_SetVerticalGlyphOrientation(layout2, DWRITE_VERTICAL_GLYPH_ORIENTATION_STACKED); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
orientation = IDWriteTextLayout2_GetVerticalGlyphOrientation(layout2); ok(orientation == DWRITE_VERTICAL_GLYPH_ORIENTATION_STACKED, "Unexpected orientation %d.\n", orientation); @@ -2753,7 +2753,7 @@ static void test_SetVerticalGlyphOrientation(void) ok(orientation == DWRITE_VERTICAL_GLYPH_ORIENTATION_STACKED, "Unexpected orientation %d.\n", orientation);
hr = IDWriteTextFormat1_SetVerticalGlyphOrientation(format1, DWRITE_VERTICAL_GLYPH_ORIENTATION_DEFAULT); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
orientation = IDWriteTextLayout2_GetVerticalGlyphOrientation(layout2); ok(orientation == DWRITE_VERTICAL_GLYPH_ORIENTATION_DEFAULT, "Unexpected orientation %d.\n", orientation); @@ -2787,22 +2787,22 @@ static void test_DetermineMinWidth(void)
hr = IDWriteFactory_CreateTextFormat(factory, L"Tahoma", NULL, DWRITE_FONT_WEIGHT_NORMAL, DWRITE_FONT_STYLE_NORMAL, DWRITE_FONT_STRETCH_NORMAL, 10.0f, L"en-us", &format); - ok(hr == S_OK, "Failed to create text format, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create text format, hr %#lx.\n", hr);
hr = IDWriteFactory_CreateTextLayout(factory, L"abcd", 4, format, 1000.0f, 1000.0f, &layout); - ok(hr == S_OK, "Failed to create text layout, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create text layout, hr %#lx.\n", hr);
hr = IDWriteTextLayout_DetermineMinWidth(layout, NULL); - ok(hr == E_INVALIDARG, "got 0x%08x\n", hr); + ok(hr == E_INVALIDARG, "got 0x%08lx\n", hr); IDWriteTextLayout_Release(layout);
/* empty string */ hr = IDWriteFactory_CreateTextLayout(factory, L"abcd", 0, format, 100.0f, 100.0f, &layout); - ok(hr == S_OK, "Failed to create text layout, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create text layout, hr %#lx.\n", hr);
minwidth = 1.0f; hr = IDWriteTextLayout_DetermineMinWidth(layout, &minwidth); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(minwidth == 0.0f, "got %f\n", minwidth); IDWriteTextLayout_Release(layout);
@@ -2811,10 +2811,10 @@ static void test_DetermineMinWidth(void)
/* measure expected width */ hr = IDWriteFactory_CreateTextLayout(factory, minwidth_tests[i].mintext, lstrlenW(minwidth_tests[i].mintext), format, 1000.0f, 1000.0f, &layout); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
hr = IDWriteTextLayout_GetClusterMetrics(layout, metrics, ARRAY_SIZE(metrics), &count); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
for (j = 0; j < count; j++) width += metrics[j].width; @@ -2822,11 +2822,11 @@ static void test_DetermineMinWidth(void) IDWriteTextLayout_Release(layout);
hr = IDWriteFactory_CreateTextLayout(factory, minwidth_tests[i].text, lstrlenW(minwidth_tests[i].text), format, 1000.0f, 1000.0f, &layout); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
minwidth = 0.0f; hr = IDWriteTextLayout_DetermineMinWidth(layout, &minwidth); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(minwidth == width, "test %u: expected width %f, got %f\n", i, width, minwidth);
IDWriteTextLayout_Release(layout); @@ -2849,76 +2849,76 @@ static void test_SetFontSize(void)
hr = IDWriteFactory_CreateTextFormat(factory, L"Tahoma", NULL, DWRITE_FONT_WEIGHT_NORMAL, DWRITE_FONT_STYLE_NORMAL, DWRITE_FONT_STRETCH_NORMAL, 10.0f, L"en-us", &format); - ok(hr == S_OK, "Failed to create text format, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create text format, hr %#lx.\n", hr);
hr = IDWriteFactory_CreateTextLayout(factory, L"abcd", 4, format, 1000.0f, 1000.0f, &layout); - ok(hr == S_OK, "Failed to create text layout, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create text layout, hr %#lx.\n", hr);
/* negative/zero size */ r.startPosition = 1; r.length = 1; hr = IDWriteTextLayout_SetFontSize(layout, -15.0, r); - ok(hr == E_INVALIDARG, "got 0x%08x\n", hr); + ok(hr == E_INVALIDARG, "got 0x%08lx\n", hr);
hr = IDWriteTextLayout_SetFontSize(layout, 0.0, r); - ok(hr == E_INVALIDARG, "got 0x%08x\n", hr); + ok(hr == E_INVALIDARG, "got 0x%08lx\n", hr);
r.startPosition = 1; r.length = 0; size = 0.0; hr = IDWriteTextLayout_GetFontSize(layout, 0, &size, &r); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(r.startPosition == 0 && r.length == ~0u, "got %u, %u\n", r.startPosition, r.length); ok(size == 10.0, "got %.2f\n", size);
r.startPosition = 1; r.length = 1; hr = IDWriteTextLayout_SetFontSize(layout, 15.0, r); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
/* zero length range */ r.startPosition = 1; r.length = 0; hr = IDWriteTextLayout_SetFontSize(layout, 123.0, r); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
size = 0.0; hr = IDWriteTextLayout_GetFontSize(layout, 1, &size, &r); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(size == 15.0, "got %.2f\n", size);
r.startPosition = 0; r.length = 4; hr = IDWriteTextLayout_SetFontSize(layout, 15.0, r); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
size = 0.0; hr = IDWriteTextLayout_GetFontSize(layout, 1, &size, &r); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(size == 15.0, "got %.2f\n", size);
size = 0.0; hr = IDWriteTextLayout_GetFontSize(layout, 0, &size, &r); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(r.startPosition == 0 && r.length == 4, "got %u, %u\n", r.startPosition, r.length); ok(size == 15.0, "got %.2f\n", size);
size = 15.0; r.startPosition = r.length = 0; hr = IDWriteTextLayout_GetFontSize(layout, 20, &size, &r); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(r.startPosition == 4 && r.length == ~0u-4, "got %u, %u\n", r.startPosition, r.length); ok(size == 10.0, "got %.2f\n", size);
r.startPosition = 100; r.length = 4; hr = IDWriteTextLayout_SetFontSize(layout, 25.0, r); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
size = 15.0; r.startPosition = r.length = 0; hr = IDWriteTextLayout_GetFontSize(layout, 100, &size, &r); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(r.startPosition == 100 && r.length == 4, "got %u, %u\n", r.startPosition, r.length); ok(size == 25.0, "got %.2f\n", size);
@@ -2940,63 +2940,63 @@ static void test_SetFontFamilyName(void)
hr = IDWriteFactory_CreateTextFormat(factory, L"Tahoma", NULL, DWRITE_FONT_WEIGHT_NORMAL, DWRITE_FONT_STYLE_NORMAL, DWRITE_FONT_STRETCH_NORMAL, 10.0f, L"en-us", &format); - ok(hr == S_OK, "Failed to create text format, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create text format, hr %#lx.\n", hr);
hr = IDWriteFactory_CreateTextLayout(factory, L"abcd", 4, format, 1000.0f, 1000.0f, &layout); - ok(hr == S_OK, "Failed to create text layout, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create text layout, hr %#lx.\n", hr);
/* NULL name */ r.startPosition = 1; r.length = 1; hr = IDWriteTextLayout_SetFontFamilyName(layout, NULL, r); - ok(hr == E_INVALIDARG, "got 0x%08x\n", hr); + ok(hr == E_INVALIDARG, "got 0x%08lx\n", hr);
r.startPosition = 1; r.length = 0; nameW[0] = 0; hr = IDWriteTextLayout_GetFontFamilyName(layout, 1, nameW, ARRAY_SIZE(nameW), &r); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(r.startPosition == 0 && r.length == ~0u, "got %u, %u\n", r.startPosition, r.length);
/* set name only different in casing */ r.startPosition = 1; r.length = 1; hr = IDWriteTextLayout_SetFontFamilyName(layout, L"TaHoma", r); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
/* zero length range */ r.startPosition = 1; r.length = 0; hr = IDWriteTextLayout_SetFontFamilyName(layout, L"Arial", r); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
r.startPosition = 0; r.length = 0; nameW[0] = 0; hr = IDWriteTextLayout_GetFontFamilyName(layout, 1, nameW, ARRAY_SIZE(nameW), &r); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(!lstrcmpW(nameW, L"TaHoma"), "Unexpected family name %s.\n", wine_dbgstr_w(nameW)); ok(r.startPosition == 1 && r.length == 1, "got %u, %u\n", r.startPosition, r.length);
r.startPosition = 1; r.length = 1; hr = IDWriteTextLayout_SetFontFamilyName(layout, L"Arial", r); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
r.startPosition = 1; r.length = 0; hr = IDWriteTextLayout_GetFontFamilyName(layout, 1, nameW, ARRAY_SIZE(nameW), &r); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(r.startPosition == 1 && r.length == 1, "got %u, %u\n", r.startPosition, r.length);
r.startPosition = 0; r.length = 4; hr = IDWriteTextLayout_SetFontFamilyName(layout, L"Arial", r); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
nameW[0] = 0; hr = IDWriteTextLayout_GetFontFamilyName(layout, 1, nameW, ARRAY_SIZE(nameW), &r); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(r.startPosition == 0 && r.length == 4, "got %u, %u\n", r.startPosition, r.length); ok(!lstrcmpW(nameW, L"Arial"), "Unexpected family name %s.\n", wine_dbgstr_w(nameW));
@@ -3018,72 +3018,72 @@ static void test_SetFontStyle(void)
hr = IDWriteFactory_CreateTextFormat(factory, L"Tahoma", NULL, DWRITE_FONT_WEIGHT_NORMAL, DWRITE_FONT_STYLE_NORMAL, DWRITE_FONT_STRETCH_NORMAL, 10.0f, L"en-us", &format); - ok(hr == S_OK, "Failed to create text format, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create text format, hr %#lx.\n", hr);
hr = IDWriteFactory_CreateTextLayout(factory, L"abcd", 4, format, 1000.0f, 1000.0f, &layout); - ok(hr == S_OK, "Failed to create text layout, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create text layout, hr %#lx.\n", hr);
/* invalid style value */ r.startPosition = 1; r.length = 1; hr = IDWriteTextLayout_SetFontStyle(layout, DWRITE_FONT_STYLE_ITALIC+1, r); - ok(hr == E_INVALIDARG, "got 0x%08x\n", hr); + ok(hr == E_INVALIDARG, "got 0x%08lx\n", hr);
r.startPosition = 1; r.length = 0; hr = IDWriteTextLayout_GetFontStyle(layout, 0, &style, &r); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(r.startPosition == 0 && r.length == ~0u, "got %u, %u\n", r.startPosition, r.length); ok(style == DWRITE_FONT_STYLE_NORMAL, "got %d\n", style);
r.startPosition = 1; r.length = 1; hr = IDWriteTextLayout_SetFontStyle(layout, DWRITE_FONT_STYLE_ITALIC, r); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
/* zero length range */ r.startPosition = 1; r.length = 0; hr = IDWriteTextLayout_SetFontStyle(layout, DWRITE_FONT_STYLE_NORMAL, r); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
style = DWRITE_FONT_STYLE_NORMAL; hr = IDWriteTextLayout_GetFontStyle(layout, 1, &style, &r); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(style == DWRITE_FONT_STYLE_ITALIC, "got %d\n", style);
r.startPosition = 0; r.length = 4; hr = IDWriteTextLayout_SetFontStyle(layout, DWRITE_FONT_STYLE_OBLIQUE, r); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
style = DWRITE_FONT_STYLE_ITALIC; hr = IDWriteTextLayout_GetFontStyle(layout, 1, &style, &r); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(style == DWRITE_FONT_STYLE_OBLIQUE, "got %d\n", style);
style = DWRITE_FONT_STYLE_ITALIC; hr = IDWriteTextLayout_GetFontStyle(layout, 0, &style, &r); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(r.startPosition == 0 && r.length == 4, "got %u, %u\n", r.startPosition, r.length); ok(style == DWRITE_FONT_STYLE_OBLIQUE, "got %d\n", style);
style = DWRITE_FONT_STYLE_ITALIC; r.startPosition = r.length = 0; hr = IDWriteTextLayout_GetFontStyle(layout, 20, &style, &r); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(r.startPosition == 4 && r.length == ~0u-4, "got %u, %u\n", r.startPosition, r.length); ok(style == DWRITE_FONT_STYLE_NORMAL, "got %d\n", style);
r.startPosition = 100; r.length = 4; hr = IDWriteTextLayout_SetFontStyle(layout, DWRITE_FONT_STYLE_OBLIQUE, r); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
style = DWRITE_FONT_STYLE_NORMAL; r.startPosition = r.length = 0; hr = IDWriteTextLayout_GetFontStyle(layout, 100, &style, &r); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(r.startPosition == 100 && r.length == 4, "got %u, %u\n", r.startPosition, r.length); ok(style == DWRITE_FONT_STYLE_OBLIQUE, "got %d\n", style);
@@ -3105,73 +3105,73 @@ static void test_SetFontStretch(void)
hr = IDWriteFactory_CreateTextFormat(factory, L"Tahoma", NULL, DWRITE_FONT_WEIGHT_NORMAL, DWRITE_FONT_STYLE_NORMAL, DWRITE_FONT_STRETCH_NORMAL, 10.0f, L"en-us", &format); - ok(hr == S_OK, "Failed to create text format, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create text format, hr %#lx.\n", hr);
hr = IDWriteFactory_CreateTextLayout(factory, L"abcd", 4, format, 1000.0f, 1000.0f, &layout); - ok(hr == S_OK, "Failed to create text layout, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create text layout, hr %#lx.\n", hr);
/* invalid stretch value */ r.startPosition = 1; r.length = 1; hr = IDWriteTextLayout_SetFontStretch(layout, DWRITE_FONT_STRETCH_ULTRA_EXPANDED+1, r); - ok(hr == E_INVALIDARG, "got 0x%08x\n", hr); + ok(hr == E_INVALIDARG, "got 0x%08lx\n", hr);
r.startPosition = 1; r.length = 0; stretch = DWRITE_FONT_STRETCH_UNDEFINED; hr = IDWriteTextLayout_GetFontStretch(layout, 0, &stretch, &r); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(r.startPosition == 0 && r.length == ~0u, "got %u, %u\n", r.startPosition, r.length); ok(stretch == DWRITE_FONT_STRETCH_NORMAL, "got %d\n", stretch);
r.startPosition = 1; r.length = 1; hr = IDWriteTextLayout_SetFontStretch(layout, DWRITE_FONT_STRETCH_CONDENSED, r); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
/* zero length range */ r.startPosition = 1; r.length = 0; hr = IDWriteTextLayout_SetFontStretch(layout, DWRITE_FONT_STRETCH_NORMAL, r); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
stretch = DWRITE_FONT_STRETCH_UNDEFINED; hr = IDWriteTextLayout_GetFontStretch(layout, 1, &stretch, &r); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(stretch == DWRITE_FONT_STRETCH_CONDENSED, "got %d\n", stretch);
r.startPosition = 0; r.length = 4; hr = IDWriteTextLayout_SetFontStretch(layout, DWRITE_FONT_STRETCH_EXPANDED, r); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
stretch = DWRITE_FONT_STRETCH_UNDEFINED; hr = IDWriteTextLayout_GetFontStretch(layout, 1, &stretch, &r); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(stretch == DWRITE_FONT_STRETCH_EXPANDED, "got %d\n", stretch);
stretch = DWRITE_FONT_STRETCH_UNDEFINED; hr = IDWriteTextLayout_GetFontStretch(layout, 0, &stretch, &r); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(r.startPosition == 0 && r.length == 4, "got %u, %u\n", r.startPosition, r.length); ok(stretch == DWRITE_FONT_STRETCH_EXPANDED, "got %d\n", stretch);
stretch = DWRITE_FONT_STRETCH_UNDEFINED; r.startPosition = r.length = 0; hr = IDWriteTextLayout_GetFontStretch(layout, 20, &stretch, &r); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(r.startPosition == 4 && r.length == ~0u-4, "got %u, %u\n", r.startPosition, r.length); ok(stretch == DWRITE_FONT_STRETCH_NORMAL, "got %d\n", stretch);
r.startPosition = 100; r.length = 4; hr = IDWriteTextLayout_SetFontStretch(layout, DWRITE_FONT_STRETCH_EXPANDED, r); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
stretch = DWRITE_FONT_STRETCH_UNDEFINED; r.startPosition = r.length = 0; hr = IDWriteTextLayout_GetFontStretch(layout, 100, &stretch, &r); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(r.startPosition == 100 && r.length == 4, "got %u, %u\n", r.startPosition, r.length); ok(stretch == DWRITE_FONT_STRETCH_EXPANDED, "got %d\n", stretch);
@@ -3179,7 +3179,7 @@ static void test_SetFontStretch(void) r.startPosition = 0; r.length = 2; hr = IDWriteTextLayout_SetFontStretch(layout, DWRITE_FONT_STRETCH_UNDEFINED, r); - ok(hr == E_INVALIDARG, "got 0x%08x\n", hr); + ok(hr == E_INVALIDARG, "got 0x%08lx\n", hr);
IDWriteTextLayout_Release(layout); IDWriteTextFormat_Release(format); @@ -3199,46 +3199,46 @@ static void test_SetStrikethrough(void)
hr = IDWriteFactory_CreateTextFormat(factory, L"Tahoma", NULL, DWRITE_FONT_WEIGHT_NORMAL, DWRITE_FONT_STYLE_NORMAL, DWRITE_FONT_STRETCH_NORMAL, 10.0f, L"en-us", &format); - ok(hr == S_OK, "Failed to create text format, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create text format, hr %#lx.\n", hr);
hr = IDWriteFactory_CreateTextLayout(factory, L"abcd", 4, format, 1000.0f, 1000.0f, &layout); - ok(hr == S_OK, "Failed to create text layout, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create text layout, hr %#lx.\n", hr);
r.startPosition = 1; r.length = 0; value = TRUE; hr = IDWriteTextLayout_GetStrikethrough(layout, 0, &value, &r); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(r.startPosition == 0 && r.length == ~0u, "got %u, %u\n", r.startPosition, r.length); ok(value == FALSE, "got %d\n", value);
r.startPosition = 1; r.length = 1; hr = IDWriteTextLayout_SetStrikethrough(layout, TRUE, r); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
value = FALSE; hr = IDWriteTextLayout_GetStrikethrough(layout, 1, &value, &r); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(value == TRUE, "got %d\n", value); ok(r.startPosition == 1 && r.length == 1, "got %u, %u\n", r.startPosition, r.length);
value = TRUE; r.startPosition = r.length = 0; hr = IDWriteTextLayout_GetStrikethrough(layout, 20, &value, &r); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(r.startPosition == 2 && r.length == ~0u-2, "got %u, %u\n", r.startPosition, r.length); ok(value == FALSE, "got %d\n", value);
r.startPosition = 100; r.length = 4; hr = IDWriteTextLayout_SetStrikethrough(layout, TRUE, r); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
value = FALSE; r.startPosition = r.length = 0; hr = IDWriteTextLayout_GetStrikethrough(layout, 100, &value, &r); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(r.startPosition == 100 && r.length == 4, "got %u, %u\n", r.startPosition, r.length); ok(value == TRUE, "got %d\n", value);
@@ -3263,21 +3263,21 @@ static void test_GetMetrics(void)
hr = IDWriteFactory_CreateTextFormat(factory, L"Tahoma", NULL, DWRITE_FONT_WEIGHT_NORMAL, DWRITE_FONT_STYLE_NORMAL, DWRITE_FONT_STRETCH_NORMAL, 10.0f, L"en-us", &format); - ok(hr == S_OK, "Failed to create text format, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create text format, hr %#lx.\n", hr);
hr = IDWriteFactory_CreateTextLayout(factory, L"abcd", 4, format, 500.0f, 1000.0f, &layout); - ok(hr == S_OK, "Failed to create text layout, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create text layout, hr %#lx.\n", hr);
count = 0; hr = IDWriteTextLayout_GetClusterMetrics(layout, clusters, 4, &count); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(count == 4, "got %u\n", count); for (i = 0, width = 0.0; i < count; i++) width += clusters[i].width;
memset(&metrics, 0xcc, sizeof(metrics)); hr = IDWriteTextLayout_GetMetrics(layout, &metrics); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(metrics.left == 0.0, "got %.2f\n", metrics.left); ok(metrics.top == 0.0, "got %.2f\n", metrics.top); ok(metrics.width == width, "got %.2f, expected %.2f\n", metrics.width, width); @@ -3293,12 +3293,12 @@ static void test_GetMetrics(void)
/* a string with more complex bidi sequence */ hr = IDWriteFactory_CreateTextLayout(factory, str2W, 7, format, 500.0, 1000.0, &layout); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
memset(&metrics, 0xcc, sizeof(metrics)); metrics.maxBidiReorderingDepth = 0; hr = IDWriteTextLayout_GetMetrics(layout, &metrics); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(metrics.left == 0.0, "got %.2f\n", metrics.left); ok(metrics.top == 0.0, "got %.2f\n", metrics.top); ok(metrics.width > 0.0, "got %.2f\n", metrics.width); @@ -3314,16 +3314,16 @@ static void test_GetMetrics(void)
/* single cluster layout */ hr = IDWriteFactory_CreateTextLayout(factory, L"a", 1, format, 500.0f, 1000.0f, &layout); - ok(hr == S_OK, "Failed to create text layout, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create text layout, hr %#lx.\n", hr);
count = 0; hr = IDWriteTextLayout_GetClusterMetrics(layout, clusters, 1, &count); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(count == 1, "got %u\n", count);
memset(&metrics, 0xcc, sizeof(metrics)); hr = IDWriteTextLayout_GetMetrics(layout, &metrics); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(metrics.left == 0.0, "got %.2f\n", metrics.left); ok(metrics.top == 0.0, "got %.2f\n", metrics.top); ok(metrics.width == clusters[0].width, "got %.2f, expected %.2f\n", metrics.width, clusters[0].width); @@ -3337,11 +3337,11 @@ static void test_GetMetrics(void)
/* Whitespace only. */ hr = IDWriteFactory_CreateTextLayout(factory, L" ", 1, format, 500.0f, 1000.0f, &layout); - ok(hr == S_OK, "Failed to create text layout, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create text layout, hr %#lx.\n", hr);
memset(&metrics, 0xcc, sizeof(metrics)); hr = IDWriteTextLayout_GetMetrics(layout, &metrics); - ok(hr == S_OK, "Failed to get layout metrics, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get layout metrics, hr %#lx.\n", hr); ok(metrics.left == 0.0f, "Unexpected value for left %f.\n", metrics.left); ok(metrics.top == 0.0f, "Unexpected value for top %f.\n", metrics.top); ok(metrics.width == 0.0f, "Unexpected width %f.\n", metrics.width); @@ -3371,7 +3371,7 @@ static void test_SetFlowDirection(void)
hr = IDWriteFactory_CreateTextFormat(factory, L"Tahoma", NULL, DWRITE_FONT_WEIGHT_NORMAL, DWRITE_FONT_STYLE_NORMAL, DWRITE_FONT_STRETCH_NORMAL, 10.0f, L"en-us", &format); - ok(hr == S_OK, "Failed to create text format, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create text format, hr %#lx.\n", hr);
flow = IDWriteTextFormat_GetFlowDirection(format); ok(flow == DWRITE_FLOW_DIRECTION_TOP_TO_BOTTOM, "got %d\n", flow); @@ -3380,25 +3380,25 @@ static void test_SetFlowDirection(void) ok(reading == DWRITE_READING_DIRECTION_LEFT_TO_RIGHT, "got %d\n", reading);
hr = IDWriteFactory_CreateTextLayout(factory, L"abcd", 4, format, 500.0f, 1000.0f, &layout); - ok(hr == S_OK, "Failed to create text layout, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create text layout, hr %#lx.\n", hr); IDWriteTextLayout_Release(layout);
hr = IDWriteTextFormat_SetFlowDirection(format, DWRITE_FLOW_DIRECTION_LEFT_TO_RIGHT); - ok(hr == S_OK || broken(hr == E_INVALIDARG) /* vista,win7 */, "got 0x%08x\n", hr); + ok(hr == S_OK || broken(hr == E_INVALIDARG) /* vista,win7 */, "got 0x%08lx\n", hr); if (hr == S_OK) { hr = IDWriteFactory_CreateTextLayout(factory, L"abcd", 4, format, 500.0f, 1000.0f, &layout); - ok(hr == S_OK, "Failed to create text layout, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create text layout, hr %#lx.\n", hr); IDWriteTextLayout_Release(layout);
hr = IDWriteTextFormat_SetReadingDirection(format, DWRITE_READING_DIRECTION_TOP_TO_BOTTOM); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
hr = IDWriteTextFormat_SetFlowDirection(format, DWRITE_FLOW_DIRECTION_TOP_TO_BOTTOM); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
hr = IDWriteFactory_CreateTextLayout(factory, L"abcd", 4, format, 500.0f, 1000.0f, &layout); - ok(hr == S_OK, "Failed to create text layout, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create text layout, hr %#lx.\n", hr); IDWriteTextLayout_Release(layout); } else @@ -3448,28 +3448,28 @@ static void test_SetDrawingEffect(void)
hr = IDWriteFactory_CreateTextFormat(factory, L"Tahoma", NULL, DWRITE_FONT_WEIGHT_NORMAL, DWRITE_FONT_STYLE_NORMAL, DWRITE_FONT_STRETCH_NORMAL, 10.0f, L"en-us", &format); - ok(hr == S_OK, "Failed to create text format, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create text format, hr %#lx.\n", hr);
/* string with combining mark */ hr = IDWriteFactory_CreateTextLayout(factory, strW, 4, format, 500.0, 1000.0, &layout); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
/* set effect past the end of text */ r.startPosition = 100; r.length = 10; hr = IDWriteTextLayout_SetDrawingEffect(layout, effect, r); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
r.startPosition = r.length = 0; hr = IDWriteTextLayout_GetDrawingEffect(layout, 101, &unk, &r); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(r.startPosition == 100 && r.length == 10, "got %u, %u\n", r.startPosition, r.length); IUnknown_Release(unk);
r.startPosition = r.length = 0; unk = (void*)0xdeadbeef; hr = IDWriteTextLayout_GetDrawingEffect(layout, 1000, &unk, &r); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(r.startPosition == 110 && r.length == ~0u-110, "got %u, %u\n", r.startPosition, r.length); ok(unk == NULL, "got %p\n", unk);
@@ -3477,84 +3477,84 @@ static void test_SetDrawingEffect(void) r.startPosition = 0; r.length = 2; hr = IDWriteTextLayout_SetDrawingEffect(layout, effect, r); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
flush_sequence(sequences, RENDERER_ID); hr = IDWriteTextLayout_Draw(layout, NULL, &testrenderer, 0.0, 0.0); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok_sequence(sequences, RENDERER_ID, draweffect_seq, "effect draw test", TRUE); IDWriteTextLayout_Release(layout);
/* simple string */ hr = IDWriteFactory_CreateTextLayout(factory, L"aecd", 4, format, 500.0f, 1000.0f, &layout); - ok(hr == S_OK, "Failed to create text layout, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create text layout, hr %#lx.\n", hr);
r.startPosition = 0; r.length = 2; hr = IDWriteTextLayout_SetDrawingEffect(layout, effect, r); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
flush_sequence(sequences, RENDERER_ID); hr = IDWriteTextLayout_Draw(layout, NULL, &testrenderer, 0.0, 0.0); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok_sequence(sequences, RENDERER_ID, draweffect2_seq, "effect draw test 2", FALSE); IDWriteTextLayout_Release(layout);
/* Inline object - effect set for same range */ hr = IDWriteFactory_CreateEllipsisTrimmingSign(factory, format, &sign); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
hr = IDWriteFactory_CreateTextLayout(factory, L"aecd", 4, format, 500.0f, 1000.0f, &layout); - ok(hr == S_OK, "Failed to create text layout, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create text layout, hr %#lx.\n", hr);
r.startPosition = 0; r.length = 4; hr = IDWriteTextLayout_SetInlineObject(layout, sign, r); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
hr = IDWriteTextLayout_SetDrawingEffect(layout, effect, r); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
flush_sequence(sequences, RENDERER_ID); hr = IDWriteTextLayout_Draw(layout, NULL, &testrenderer, 0.0, 0.0); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok_sequence(sequences, RENDERER_ID, draweffect3_seq, "effect draw test 3", FALSE);
/* now set effect somewhere inside a range replaced by inline object */ hr = IDWriteTextLayout_SetDrawingEffect(layout, NULL, r); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
r.startPosition = 1; r.length = 1; hr = IDWriteTextLayout_SetDrawingEffect(layout, effect, r); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
/* no effect is reported in this case */ flush_sequence(sequences, RENDERER_ID); hr = IDWriteTextLayout_Draw(layout, NULL, &testrenderer, 0.0, 0.0); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok_sequence(sequences, RENDERER_ID, draweffect4_seq, "effect draw test 4", FALSE);
r.startPosition = 0; r.length = 4; hr = IDWriteTextLayout_SetDrawingEffect(layout, NULL, r); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
r.startPosition = 0; r.length = 1; hr = IDWriteTextLayout_SetDrawingEffect(layout, effect, r); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
/* first range position is all that matters for inline ranges */ flush_sequence(sequences, RENDERER_ID); hr = IDWriteTextLayout_Draw(layout, NULL, &testrenderer, 0.0, 0.0); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok_sequence(sequences, RENDERER_ID, draweffect3_seq, "effect draw test 5", FALSE);
IDWriteTextLayout_Release(layout);
ref = IUnknown_Release(effect); - ok(ref == 0, "Unexpected effect refcount %u\n", ref); + ok(ref == 0, "Unexpected effect refcount %lu\n", ref); IDWriteInlineObject_Release(sign); IDWriteTextFormat_Release(format); IDWriteFactory_Release(factory); @@ -3567,11 +3567,11 @@ static BOOL get_enus_string(IDWriteLocalizedStrings *strings, WCHAR *buff, UINT3 HRESULT hr;
hr = IDWriteLocalizedStrings_FindLocaleName(strings, L"en-us", &index, &exists); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
if (exists) { hr = IDWriteLocalizedStrings_GetString(strings, index, buff, size); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); } else *buff = 0; @@ -3601,19 +3601,19 @@ static void test_GetLineMetrics(void)
hr = IDWriteFactory_CreateTextFormat(factory, L"Tahoma", NULL, DWRITE_FONT_WEIGHT_NORMAL, DWRITE_FONT_STYLE_NORMAL, DWRITE_FONT_STRETCH_NORMAL, 2048.0f, L"en-us", &format); - ok(hr == S_OK, "Failed to create text format, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create text format, hr %#lx.\n", hr);
hr = IDWriteFactory_CreateTextLayout(factory, strW, 5, format, 30000.0, 1000.0, &layout); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
count = 0; hr = IDWriteTextLayout_GetLineMetrics(layout, metrics, 0, &count); - ok(hr == E_NOT_SUFFICIENT_BUFFER, "got 0x%08x\n", hr); + ok(hr == E_NOT_SUFFICIENT_BUFFER, "got 0x%08lx\n", hr); ok(count == 1, "got count %u\n", count);
memset(metrics, 0, sizeof(metrics)); hr = IDWriteTextLayout_GetLineMetrics(layout, metrics, 1, &count); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(metrics[0].length == 5, "got %u\n", metrics[0].length); ok(metrics[0].trailingWhitespaceLength == 1, "got %u\n", metrics[0].trailingWhitespaceLength);
@@ -3625,7 +3625,7 @@ static void test_GetLineMetrics(void)
/* Test line height and baseline calculation */ hr = IDWriteFactory_GetSystemFontCollection(factory, &syscollection, FALSE); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); familycount = IDWriteFontCollection_GetFontFamilyCount(syscollection);
for (i = 0; i < familycount; i++) { @@ -3638,17 +3638,17 @@ static void test_GetLineMetrics(void) layout = NULL;
hr = IDWriteFontCollection_GetFontFamily(syscollection, i, &family); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
hr = IDWriteFontFamily_GetFirstMatchingFont(family, DWRITE_FONT_WEIGHT_NORMAL, DWRITE_FONT_STRETCH_NORMAL, DWRITE_FONT_STYLE_NORMAL, &font); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
hr = IDWriteFont_CreateFontFace(font, &fontface); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
hr = IDWriteFontFamily_GetFamilyNames(family, &names); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
if (!(exists = get_enus_string(names, nameW, ARRAY_SIZE(nameW)))) { IDWriteLocalFontFileLoader *localloader; @@ -3660,20 +3660,20 @@ static void test_GetLineMetrics(void)
count = 1; hr = IDWriteFontFace_GetFiles(fontface, &count, &file); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
hr = IDWriteFontFile_GetLoader(file, &loader); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
hr = IDWriteFontFileLoader_QueryInterface(loader, &IID_IDWriteLocalFontFileLoader, (void**)&localloader); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); IDWriteFontFileLoader_Release(loader);
hr = IDWriteFontFile_GetReferenceKey(file, &key, &keysize); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
hr = IDWriteLocalFontFileLoader_GetFilePathFromKey(localloader, key, keysize, nameW, ARRAY_SIZE(nameW)); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
skip("Failed to get English family name, font file %s\n", wine_dbgstr_w(nameW));
@@ -3690,15 +3690,15 @@ static void test_GetLineMetrics(void) IDWriteFontFace_GetMetrics(fontface, &fontmetrics); hr = IDWriteFactory_CreateTextFormat(factory, nameW, NULL, DWRITE_FONT_WEIGHT_NORMAL, DWRITE_FONT_STYLE_NORMAL, DWRITE_FONT_STRETCH_NORMAL, fontmetrics.designUnitsPerEm, L"en-us", &format); - ok(hr == S_OK, "Failed to create text format, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create text format, hr %#lx.\n", hr);
hr = IDWriteFactory_CreateTextLayout(factory, L"", 1, format, 30000.0f, 100.0f, &layout); - ok(hr == S_OK, "Failed to create text layout, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create text layout, hr %#lx.\n", hr);
memset(metrics, 0, sizeof(metrics)); count = 0; hr = IDWriteTextLayout_GetLineMetrics(layout, metrics, ARRAY_SIZE(metrics), &count); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(count == 1, "got %u\n", count);
ok(metrics[0].baseline == fontmetrics.ascent + fontmetrics.lineGap, "%s: got %.2f, expected %d, " @@ -3720,19 +3720,19 @@ static void test_GetLineMetrics(void)
hr = IDWriteFactory_CreateTextFormat(factory, L"Tahoma", NULL, DWRITE_FONT_WEIGHT_NORMAL, DWRITE_FONT_STYLE_NORMAL, DWRITE_FONT_STRETCH_NORMAL, 2048.0f, L"en-us", &format); - ok(hr == S_OK, "Failed to create text format, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create text format, hr %#lx.\n", hr);
fontface = get_fontface_from_format(format); ok(fontface != NULL, "got %p\n", fontface);
/* force 2 lines */ hr = IDWriteFactory_CreateTextLayout(factory, str2W, 5, format, 10000.0, 1000.0, &layout); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
memset(metrics, 0, sizeof(metrics)); count = 0; hr = IDWriteTextLayout_GetLineMetrics(layout, metrics, ARRAY_SIZE(metrics), &count); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(count == 2, "got %u\n", count); /* baseline is relative to a line, and is not accumulated */ ok(metrics[0].baseline == metrics[1].baseline, "got %.2f, %.2f\n", metrics[0].baseline, @@ -3744,15 +3744,15 @@ static void test_GetLineMetrics(void) /* line breaks */ hr = IDWriteFactory_CreateTextFormat(factory, L"Tahoma", NULL, DWRITE_FONT_WEIGHT_NORMAL, DWRITE_FONT_STYLE_NORMAL, DWRITE_FONT_STRETCH_NORMAL, 12.0f, L"en-us", &format); - ok(hr == S_OK, "Failed to create text format, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create text format, hr %#lx.\n", hr);
hr = IDWriteFactory_CreateTextLayout(factory, str3W, 10, format, 100.0, 300.0, &layout); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
memset(metrics, 0xcc, sizeof(metrics)); count = 0; hr = IDWriteTextLayout_GetLineMetrics(layout, metrics, ARRAY_SIZE(metrics), &count); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(count == 6, "got %u\n", count);
ok(metrics[0].length == 2, "got %u\n", metrics[0].length); @@ -3780,12 +3780,12 @@ static void test_GetLineMetrics(void)
/* empty text layout */ hr = IDWriteFactory_CreateTextLayout(factory, strW, 0, format, 100.0f, 300.0f, &layout); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
count = 0; memset(metrics, 0, sizeof(metrics)); hr = IDWriteTextLayout_GetLineMetrics(layout, metrics, 1, &count); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(count == 1, "got %u\n", count); ok(metrics[0].length == 0, "got %u\n", metrics[0].length); ok(metrics[0].trailingWhitespaceLength == 0, "got %u\n", metrics[0].trailingWhitespaceLength); @@ -3798,28 +3798,28 @@ static void test_GetLineMetrics(void) range.startPosition = 0; range.length = 1; hr = IDWriteTextLayout_SetFontSize(layout, 80.0f, range); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
count = 0; hr = IDWriteTextLayout_GetLineMetrics(layout, metrics + 1, 1, &count); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(count == 1, "got %u\n", count); ok(metrics[1].height > metrics[0].height, "got %f\n", metrics[1].height); ok(metrics[1].baseline > metrics[0].baseline, "got %f\n", metrics[1].baseline);
/* revert font size back to format value, set different size for position 1 */ hr = IDWriteTextLayout_SetFontSize(layout, 12.0f, range); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
range.startPosition = 1; range.length = 1; hr = IDWriteTextLayout_SetFontSize(layout, 80.0f, range); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
memset(metrics + 1, 0, sizeof(*metrics)); count = 0; hr = IDWriteTextLayout_GetLineMetrics(layout, metrics + 1, 1, &count); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(count == 1, "got %u\n", count); ok(metrics[1].height == metrics[0].height, "got %f\n", metrics[1].height); ok(metrics[1].baseline == metrics[0].baseline, "got %f\n", metrics[1].baseline); @@ -3828,12 +3828,12 @@ static void test_GetLineMetrics(void)
/* text is "a\r" */ hr = IDWriteFactory_CreateTextLayout(factory, str4W, 2, format, 100.0f, 300.0f, &layout); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
count = 0; memset(metrics, 0, sizeof(metrics)); hr = IDWriteTextLayout_GetLineMetrics(layout, metrics, ARRAY_SIZE(metrics), &count); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(count == 2, "got %u\n", count); ok(metrics[0].length == 2, "got %u\n", metrics[0].length); ok(metrics[0].newlineLength == 1, "got %u\n", metrics[0].newlineLength); @@ -3847,29 +3847,29 @@ static void test_GetLineMetrics(void) range.startPosition = 1; range.length = 1; hr = IDWriteTextLayout_SetFontSize(layout, 80.0f, range); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
hr = IDWriteTextLayout_GetLineMetrics(layout, metrics + 2, 2, &count); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(count == 2, "got %u\n", count); ok(metrics[3].height > metrics[1].height, "got %f, old %f\n", metrics[3].height, metrics[1].height); ok(metrics[3].baseline > metrics[1].baseline, "got %f, old %f\n", metrics[3].baseline, metrics[1].baseline);
/* revert to original format */ hr = IDWriteTextLayout_SetFontSize(layout, 12.0f, range); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); hr = IDWriteTextLayout_GetLineMetrics(layout, metrics + 2, 2, &count); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(count == 2, "got %u\n", count); ok(metrics[3].height == metrics[1].height, "got %f, old %f\n", metrics[3].height, metrics[1].height); ok(metrics[3].baseline == metrics[1].baseline, "got %f, old %f\n", metrics[3].baseline, metrics[1].baseline);
/* Switch to uniform spacing */ hr = IDWriteTextLayout_SetLineSpacing(layout, DWRITE_LINE_SPACING_METHOD_UNIFORM, 456.0f, 123.0f); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
hr = IDWriteTextLayout_GetLineMetrics(layout, metrics, ARRAY_SIZE(metrics), &count); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(count == 2, "got %u\n", count);
for (i = 0; i < count; i++) { @@ -3883,18 +3883,18 @@ static void test_GetLineMetrics(void) hr = IDWriteTextFormat_SetLineSpacing(format, DWRITE_LINE_SPACING_METHOD_PROPORTIONAL, 2.0f, 4.0f); if (hr == S_OK) { hr = IDWriteFactory_CreateTextLayout(factory, str4W, 1, format, 100.0f, 300.0f, &layout); - ok(hr == S_OK, "Failed to create layout, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create layout, hr %#lx.\n", hr);
hr = IDWriteTextLayout_GetLineMetrics(layout, metrics, ARRAY_SIZE(metrics), &count); - ok(hr == S_OK, "Failed to get line metrics, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get line metrics, hr %#lx.\n", hr); ok(count == 1, "Unexpected line count %u\n", count);
/* Back to default mode. */ hr = IDWriteTextLayout_SetLineSpacing(layout, DWRITE_LINE_SPACING_METHOD_DEFAULT, 0.0f, 0.0f); - ok(hr == S_OK, "Failed to set spacing method, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to set spacing method, hr %#lx.\n", hr);
hr = IDWriteTextLayout_GetLineMetrics(layout, metrics + 1, 1, &count); - ok(hr == S_OK, "Failed to get line metrics, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get line metrics, hr %#lx.\n", hr); ok(count == 1, "Unexpected line count %u\n", count);
/* Proportional spacing applies multipliers to default, content based spacing. */ @@ -3932,22 +3932,22 @@ static void test_SetTextAlignment(void)
hr = IDWriteFactory_CreateTextFormat(factory, L"Tahoma", NULL, DWRITE_FONT_WEIGHT_NORMAL, DWRITE_FONT_STYLE_NORMAL, DWRITE_FONT_STRETCH_NORMAL, 12.0f, L"en-us", &format); - ok(hr == S_OK, "Failed to create text format, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create text format, hr %#lx.\n", hr);
v = IDWriteTextFormat_GetTextAlignment(format); ok(v == DWRITE_TEXT_ALIGNMENT_LEADING, "got %d\n", v);
hr = IDWriteFactory_CreateTextLayout(factory, L"a", 1, format, 500.0f, 100.0f, &layout); - ok(hr == S_OK, "Failed to create text layout, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create text layout, hr %#lx.\n", hr);
v = IDWriteTextLayout_GetTextAlignment(layout); ok(v == DWRITE_TEXT_ALIGNMENT_LEADING, "got %d\n", v);
hr = IDWriteTextLayout_SetTextAlignment(layout, DWRITE_TEXT_ALIGNMENT_TRAILING); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
hr = IDWriteTextLayout_SetTextAlignment(layout, DWRITE_TEXT_ALIGNMENT_TRAILING); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
v = IDWriteTextFormat_GetTextAlignment(format); ok(v == DWRITE_TEXT_ALIGNMENT_LEADING, "got %d\n", v); @@ -3958,7 +3958,7 @@ static void test_SetTextAlignment(void) hr = IDWriteTextLayout_QueryInterface(layout, &IID_IDWriteTextFormat1, (void**)&format1); if (hr == S_OK) { hr = IDWriteTextFormat1_SetTextAlignment(format1, DWRITE_TEXT_ALIGNMENT_CENTER); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
v = IDWriteTextFormat_GetTextAlignment(format); ok(v == DWRITE_TEXT_ALIGNMENT_LEADING, "got %d\n", v); @@ -3980,17 +3980,17 @@ static void test_SetTextAlignment(void) FLOAT text_width;
hr = IDWriteTextFormat_SetTextAlignment(format, DWRITE_TEXT_ALIGNMENT_LEADING); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
hr = IDWriteFactory_CreateTextLayout(factory, stringsW[i], lstrlenW(stringsW[i]), format, 500.0f, 100.0f, &layout); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
hr = IDWriteTextLayout_SetWordWrapping(layout, DWRITE_WORD_WRAPPING_NO_WRAP); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
count = 0; hr = IDWriteTextLayout_GetClusterMetrics(layout, clusters, ARRAY_SIZE(clusters), &count); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); if (stringsW[i][0]) ok(count > 0, "got %u\n", count); else @@ -4002,10 +4002,10 @@ static void test_SetTextAlignment(void)
/* maxwidth is 500, leading alignment */ hr = IDWriteTextLayout_SetTextAlignment(layout, DWRITE_TEXT_ALIGNMENT_LEADING); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
hr = IDWriteTextLayout_GetMetrics(layout, &metrics); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
ok(metrics.left == 0.0f, "got %.2f\n", metrics.left); ok(metrics.width == text_width, "got %.2f\n", metrics.width); @@ -4014,10 +4014,10 @@ static void test_SetTextAlignment(void)
/* maxwidth is 500, trailing alignment */ hr = IDWriteTextLayout_SetTextAlignment(layout, DWRITE_TEXT_ALIGNMENT_TRAILING); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
hr = IDWriteTextLayout_GetMetrics(layout, &metrics); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
ok(metrics.left == metrics.layoutWidth - metrics.width, "got %.2f\n", metrics.left); ok(metrics.width == text_width, "got %.2f\n", metrics.width); @@ -4027,13 +4027,13 @@ static void test_SetTextAlignment(void)
/* initially created with trailing alignment */ hr = IDWriteTextFormat_SetTextAlignment(format, DWRITE_TEXT_ALIGNMENT_TRAILING); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
hr = IDWriteFactory_CreateTextLayout(factory, stringsW[i], lstrlenW(stringsW[i]), format, 500.0f, 100.0f, &layout); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
hr = IDWriteTextLayout_GetMetrics(layout, &metrics); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
ok(metrics.left == metrics.layoutWidth - metrics.width, "got %.2f\n", metrics.left); ok(metrics.width == text_width, "got %.2f\n", metrics.width); @@ -4044,12 +4044,12 @@ static void test_SetTextAlignment(void) if (stringsW[i][0]) { /* max width less than total run width, trailing alignment */ hr = IDWriteTextFormat_SetWordWrapping(format, DWRITE_WORD_WRAPPING_NO_WRAP); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
hr = IDWriteFactory_CreateTextLayout(factory, stringsW[i], lstrlenW(stringsW[i]), format, clusters[0].width, 100.0f, &layout); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); hr = IDWriteTextLayout_GetMetrics(layout, &metrics); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(metrics.left == metrics.layoutWidth - metrics.width, "got %.2f\n", metrics.left); ok(metrics.width == text_width, "got %.2f\n", metrics.width); ok(metrics.lineCount == 1, "got %d\n", metrics.lineCount); @@ -4058,13 +4058,13 @@ static void test_SetTextAlignment(void)
/* maxwidth is 500, centered */ hr = IDWriteTextFormat_SetTextAlignment(format, DWRITE_TEXT_ALIGNMENT_CENTER); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
hr = IDWriteFactory_CreateTextLayout(factory, stringsW[i], lstrlenW(stringsW[i]), format, 500.0f, 100.0f, &layout); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
hr = IDWriteTextLayout_GetMetrics(layout, &metrics); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(metrics.left == (metrics.layoutWidth - metrics.width) / 2.0f, "got %.2f\n", metrics.left); ok(metrics.width == text_width, "got %.2f\n", metrics.width); ok(metrics.lineCount == 1, "got %d\n", metrics.lineCount); @@ -4091,22 +4091,22 @@ static void test_SetParagraphAlignment(void)
hr = IDWriteFactory_CreateTextFormat(factory, L"Tahoma", NULL, DWRITE_FONT_WEIGHT_NORMAL, DWRITE_FONT_STYLE_NORMAL, DWRITE_FONT_STRETCH_NORMAL, 12.0f, L"en-us", &format); - ok(hr == S_OK, "Failed to create text format, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create text format, hr %#lx.\n", hr);
v = IDWriteTextFormat_GetParagraphAlignment(format); ok(v == DWRITE_PARAGRAPH_ALIGNMENT_NEAR, "got %d\n", v);
hr = IDWriteFactory_CreateTextLayout(factory, L"a", 1, format, 500.0f, 100.0f, &layout); - ok(hr == S_OK, "Failed to create text layout, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create text layout, hr %#lx.\n", hr);
v = IDWriteTextLayout_GetParagraphAlignment(layout); ok(v == DWRITE_PARAGRAPH_ALIGNMENT_NEAR, "got %d\n", v);
hr = IDWriteTextLayout_SetParagraphAlignment(layout, DWRITE_PARAGRAPH_ALIGNMENT_FAR); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
hr = IDWriteTextLayout_SetParagraphAlignment(layout, DWRITE_PARAGRAPH_ALIGNMENT_FAR); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
v = IDWriteTextFormat_GetParagraphAlignment(format); ok(v == DWRITE_PARAGRAPH_ALIGNMENT_NEAR, "got %d\n", v); @@ -4115,22 +4115,22 @@ static void test_SetParagraphAlignment(void) ok(v == DWRITE_PARAGRAPH_ALIGNMENT_FAR, "got %d\n", v);
hr = IDWriteTextLayout_SetParagraphAlignment(layout, DWRITE_PARAGRAPH_ALIGNMENT_CENTER); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
v = IDWriteTextLayout_GetParagraphAlignment(layout); ok(v == DWRITE_PARAGRAPH_ALIGNMENT_CENTER, "got %d\n", v);
count = 0; hr = IDWriteTextLayout_GetLineMetrics(layout, lines, 1, &count); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(count == 1, "got %u\n", count);
/* maxheight is 100, near alignment */ hr = IDWriteTextLayout_SetParagraphAlignment(layout, DWRITE_PARAGRAPH_ALIGNMENT_NEAR); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
hr = IDWriteTextLayout_GetMetrics(layout, &metrics); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
ok(metrics.top == 0.0, "got %.2f\n", metrics.top); ok(metrics.height == lines[0].height, "got %.2f\n", metrics.height); @@ -4139,10 +4139,10 @@ static void test_SetParagraphAlignment(void)
/* maxwidth is 100, far alignment */ hr = IDWriteTextLayout_SetParagraphAlignment(layout, DWRITE_PARAGRAPH_ALIGNMENT_FAR); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
hr = IDWriteTextLayout_GetMetrics(layout, &metrics); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
ok(metrics.top == metrics.layoutHeight - metrics.height, "got %.2f\n", metrics.top); ok(metrics.height == lines[0].height, "got %.2f\n", metrics.height); @@ -4152,13 +4152,13 @@ static void test_SetParagraphAlignment(void)
/* initially created with centered alignment */ hr = IDWriteTextFormat_SetParagraphAlignment(format, DWRITE_PARAGRAPH_ALIGNMENT_CENTER); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
hr = IDWriteFactory_CreateTextLayout(factory, L"a", 1, format, 500.0f, 100.0f, &layout); - ok(hr == S_OK, "Failed to create text layout, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create text layout, hr %#lx.\n", hr);
hr = IDWriteTextLayout_GetMetrics(layout, &metrics); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
ok(metrics.top == (metrics.layoutHeight - lines[0].height) / 2, "got %.2f\n", metrics.top); ok(metrics.height == lines[0].height, "got %.2f\n", metrics.height); @@ -4185,13 +4185,13 @@ static void test_SetReadingDirection(void)
hr = IDWriteFactory_CreateTextFormat(factory, L"Tahoma", NULL, DWRITE_FONT_WEIGHT_NORMAL, DWRITE_FONT_STYLE_NORMAL, DWRITE_FONT_STRETCH_NORMAL, 12.0f, L"en-us", &format); - ok(hr == S_OK, "Failed to create text format, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create text format, hr %#lx.\n", hr);
v = IDWriteTextFormat_GetReadingDirection(format); ok(v == DWRITE_READING_DIRECTION_LEFT_TO_RIGHT, "got %d\n", v);
hr = IDWriteFactory_CreateTextLayout(factory, L"a", 1, format, 500.0f, 100.0f, &layout); - ok(hr == S_OK, "Failed to create text layout, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create text layout, hr %#lx.\n", hr);
v = IDWriteTextLayout_GetReadingDirection(layout); ok(v == DWRITE_READING_DIRECTION_LEFT_TO_RIGHT, "got %d\n", v); @@ -4200,21 +4200,21 @@ static void test_SetReadingDirection(void) ok(v == DWRITE_READING_DIRECTION_LEFT_TO_RIGHT, "got %d\n", v);
hr = IDWriteTextLayout_SetReadingDirection(layout, DWRITE_READING_DIRECTION_RIGHT_TO_LEFT); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
count = 0; hr = IDWriteTextLayout_GetLineMetrics(layout, lines, 1, &count); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(count == 1, "got %u\n", count);
count = 0; hr = IDWriteTextLayout_GetClusterMetrics(layout, clusters, 1, &count); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(count == 1, "got %u\n", count);
/* leading alignment, RTL */ hr = IDWriteTextLayout_GetMetrics(layout, &metrics); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
ok(metrics.left == metrics.layoutWidth - clusters[0].width, "got %.2f\n", metrics.left); ok(metrics.top == 0.0, "got %.2f\n", metrics.top); @@ -4226,10 +4226,10 @@ static void test_SetReadingDirection(void)
/* trailing alignment, RTL */ hr = IDWriteTextLayout_SetTextAlignment(layout, DWRITE_TEXT_ALIGNMENT_TRAILING); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
hr = IDWriteTextLayout_GetMetrics(layout, &metrics); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
ok(metrics.left == 0.0, "got %.2f\n", metrics.left); ok(metrics.top == 0.0, "got %.2f\n", metrics.top); @@ -4241,10 +4241,10 @@ static void test_SetReadingDirection(void)
/* centered alignment, RTL */ hr = IDWriteTextLayout_SetTextAlignment(layout, DWRITE_TEXT_ALIGNMENT_CENTER); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
hr = IDWriteTextLayout_GetMetrics(layout, &metrics); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
ok(metrics.left == (metrics.layoutWidth - clusters[0].width) / 2.0, "got %.2f\n", metrics.left); ok(metrics.top == 0.0, "got %.2f\n", metrics.top); @@ -4372,13 +4372,13 @@ static void test_pixelsnapping(void)
hr = IDWriteFactory_CreateTextFormat(factory, L"Tahoma", NULL, DWRITE_FONT_WEIGHT_NORMAL, DWRITE_FONT_STYLE_NORMAL, DWRITE_FONT_STRETCH_NORMAL, 12.0f, L"en-us", &format); - ok(hr == S_OK, "Failed to create text format, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create text format, hr %#lx.\n", hr);
fontface = get_fontface_from_format(format); IDWriteFontFace_GetMetrics(fontface, &metrics);
hr = IDWriteFactory_CreateTextLayout(factory, L"a", 1, format, 500.0f, 100.0f, &layout); - ok(hr == S_OK, "Failed to create text layout, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create text layout, hr %#lx.\n", hr);
/* disabled snapping */ ctxt.snapping_disabled = TRUE; @@ -4390,7 +4390,7 @@ static void test_pixelsnapping(void) originX = 0.1;
hr = IDWriteTextLayout_Draw(layout, &ctxt, &testrenderer, originX, 0.0); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
baseline = get_scaled_font_metric(metrics.ascent, 12.0, &metrics); ok(ctxt.originX == originX, "got %f, originX %f\n", ctxt.originX, originX); @@ -4410,7 +4410,7 @@ static void test_pixelsnapping(void)
expectedY = snap_coord(&ctxt.m, ctxt.ppdip, baseline); hr = IDWriteTextLayout_Draw(layout, &ctxt, &testrenderer, originX, 0.0); - ok(hr == S_OK, "%d: got 0x%08x\n", i, hr); + ok(hr == S_OK, "%d: got 0x%08lx\n", i, hr); ok(ctxt.originX == originX, "%d: got %f, originX %f\n", i, ctxt.originX, originX); ok(float_eq(ctxt.originY, expectedY), "%d: got %f, expected %f, baseline %f\n", i, ctxt.originY, expectedY, baseline); @@ -4420,11 +4420,11 @@ static void test_pixelsnapping(void) { hr = IDWriteFactory_CreateGdiCompatibleTextLayout(factory, L"a", 1, format, 500.0f, 100.0f, 1.0f, &compattransforms[j], FALSE, &layout2); - ok(hr == S_OK, "%d: failed to create text layout, hr %#x.\n", i, hr); + ok(hr == S_OK, "%d: failed to create text layout, hr %#lx.\n", i, hr);
expectedY = snap_coord(&ctxt.m, ctxt.ppdip, baseline); hr = IDWriteTextLayout_Draw(layout, &ctxt, &testrenderer, originX, 0.0); - ok(hr == S_OK, "%d: got 0x%08x\n", i, hr); + ok(hr == S_OK, "%d: got 0x%08lx\n", i, hr); ok(ctxt.originX == originX, "%d: got %f, originX %f\n", i, ctxt.originX, originX); ok(float_eq(ctxt.originY, expectedY), "%d: got %f, expected %f, baseline %f\n", i, ctxt.originY, expectedY, baseline); @@ -4454,41 +4454,41 @@ static void test_SetWordWrapping(void)
hr = IDWriteFactory_CreateTextFormat(factory, L"Tahoma", NULL, DWRITE_FONT_WEIGHT_NORMAL, DWRITE_FONT_STYLE_NORMAL, DWRITE_FONT_STRETCH_NORMAL, 12.0f, L"en-us", &format); - ok(hr == S_OK, "Failed to create text format, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create text format, hr %#lx.\n", hr);
v = IDWriteTextFormat_GetWordWrapping(format); ok(v == DWRITE_WORD_WRAPPING_WRAP, "got %d\n", v);
hr = IDWriteFactory_CreateTextLayout(factory, strW, ARRAY_SIZE(strW), format, 10.0f, 100.0f, &layout); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
v = IDWriteTextLayout_GetWordWrapping(layout); ok(v == DWRITE_WORD_WRAPPING_WRAP, "got %d\n", v);
hr = IDWriteTextLayout_SetWordWrapping(layout, DWRITE_WORD_WRAPPING_NO_WRAP); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
hr = IDWriteTextLayout_SetWordWrapping(layout, DWRITE_WORD_WRAPPING_NO_WRAP); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
v = IDWriteTextFormat_GetWordWrapping(format); ok(v == DWRITE_WORD_WRAPPING_WRAP, "got %d\n", v);
/* disable wrapping, text has explicit newline */ hr = IDWriteTextLayout_SetWordWrapping(layout, DWRITE_WORD_WRAPPING_NO_WRAP); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
count = 0; hr = IDWriteTextLayout_GetLineMetrics(layout, NULL, 0, &count); - ok(hr == E_NOT_SUFFICIENT_BUFFER, "got 0x%08x\n", hr); + ok(hr == E_NOT_SUFFICIENT_BUFFER, "got 0x%08lx\n", hr); ok(count == 2, "got %u\n", count);
hr = IDWriteTextLayout_SetWordWrapping(layout, DWRITE_WORD_WRAPPING_WRAP); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
count = 0; hr = IDWriteTextLayout_GetLineMetrics(layout, NULL, 0, &count); - ok(hr == E_NOT_SUFFICIENT_BUFFER, "got 0x%08x\n", hr); + ok(hr == E_NOT_SUFFICIENT_BUFFER, "got 0x%08lx\n", hr); ok(count > 2, "got %u\n", count);
IDWriteTextLayout_Release(layout); @@ -4537,13 +4537,13 @@ static HRESULT WINAPI fontcollection_GetFontFamily(IDWriteFontCollection *iface, HRESULT hr;
hr = IDWriteFactory_GetSystemFontCollection(factory, &syscollection, FALSE); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
hr = IDWriteFontCollection_FindFamilyName(syscollection, L"Tahoma", &index, &exists); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IDWriteFontCollection_GetFontFamily(syscollection, index, family); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
IDWriteFontCollection_Release(syscollection); IDWriteFactory_Release(factory); @@ -4608,7 +4608,7 @@ static void test_MapCharacters(void)
fallback = NULL; hr = IDWriteFactory2_GetSystemFontFallback(factory2, &fallback); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(fallback != NULL, "got %p\n", fallback);
mappedlength = 1; @@ -4616,7 +4616,7 @@ static void test_MapCharacters(void) font = (void*)0xdeadbeef; hr = IDWriteFontFallback_MapCharacters(fallback, NULL, 0, 0, NULL, NULL, DWRITE_FONT_WEIGHT_NORMAL, DWRITE_FONT_STYLE_NORMAL, DWRITE_FONT_STRETCH_NORMAL, &mappedlength, &font, &scale); - ok(hr == E_INVALIDARG, "got 0x%08x\n", hr); + ok(hr == E_INVALIDARG, "got 0x%08lx\n", hr); ok(mappedlength == 0, "got %u\n", mappedlength); ok(scale == 1.0f, "got %f\n", scale); ok(font == NULL, "got %p\n", font); @@ -4628,7 +4628,7 @@ static void test_MapCharacters(void) font = (void*)0xdeadbeef; hr = IDWriteFontFallback_MapCharacters(fallback, &analysissource, 0, 0, NULL, NULL, DWRITE_FONT_WEIGHT_NORMAL, DWRITE_FONT_STYLE_NORMAL, DWRITE_FONT_STRETCH_NORMAL, &mappedlength, &font, &scale); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(mappedlength == 0, "got %u\n", mappedlength); ok(scale == 1.0f, "got %f\n", scale); ok(font == NULL, "got %p\n", font); @@ -4640,7 +4640,7 @@ static void test_MapCharacters(void) hr = IDWriteFontFallback_MapCharacters(fallback, &analysissource, 0, 1, NULL, NULL, DWRITE_FONT_WEIGHT_NORMAL, DWRITE_FONT_STYLE_NORMAL, DWRITE_FONT_STRETCH_NORMAL, &mappedlength, &font, &scale); todo_wine { - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(mappedlength == 1, "got %u\n", mappedlength); } ok(scale == 1.0f, "got %f\n", scale); @@ -4657,7 +4657,7 @@ if (font) { hr = IDWriteFontFallback_MapCharacters(fallback, &analysissource, 0, 3, NULL, NULL, DWRITE_FONT_WEIGHT_NORMAL, DWRITE_FONT_STYLE_NORMAL, DWRITE_FONT_STRETCH_NORMAL, &mappedlength, &font, &scale); todo_wine { - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(mappedlength == 3, "got %u\n", mappedlength); } ok(scale == 1.0f, "got %f\n", scale); @@ -4674,7 +4674,7 @@ if (font) { hr = IDWriteFontFallback_MapCharacters(fallback, &analysissource, 0, 3, NULL, NULL, DWRITE_FONT_WEIGHT_NORMAL, DWRITE_FONT_STYLE_NORMAL, DWRITE_FONT_STRETCH_NORMAL, &mappedlength, &font, &scale); todo_wine { - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(mappedlength == 1, "got %u\n", mappedlength); } ok(scale == 1.0f, "got %f\n", scale); @@ -4690,7 +4690,7 @@ if (font) { hr = IDWriteFontFallback_MapCharacters(fallback, &analysissource, 1, 2, NULL, NULL, DWRITE_FONT_WEIGHT_NORMAL, DWRITE_FONT_STYLE_NORMAL, DWRITE_FONT_STRETCH_NORMAL, &mappedlength, &font, &scale); todo_wine { - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(mappedlength == 1, "got %u\n", mappedlength); } ok(scale == 1.0f, "got %f\n", scale); @@ -4707,16 +4707,16 @@ if (font) { font = NULL; hr = IDWriteFontFallback_MapCharacters(fallback, &analysissource, 0, 3, &fallbackcollection, g_blahfontW, DWRITE_FONT_WEIGHT_NORMAL, DWRITE_FONT_STYLE_NORMAL, DWRITE_FONT_STRETCH_NORMAL, &mappedlength, &font, &scale); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(mappedlength == 1, "got %u\n", mappedlength); ok(scale == 1.0f, "got %f\n", scale); ok(font != NULL, "got %p\n", font);
exists = FALSE; hr = IDWriteFont_GetInformationalStrings(font, DWRITE_INFORMATIONAL_STRING_WIN32_FAMILY_NAMES, &strings, &exists); - ok(hr == S_OK && exists, "got 0x%08x, exists %d\n", hr, exists); + ok(hr == S_OK && exists, "got 0x%08lx, exists %d\n", hr, exists); hr = IDWriteLocalizedStrings_GetString(strings, 0, buffW, ARRAY_SIZE(buffW)); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(!lstrcmpW(buffW, L"Tahoma"), "Unexpected string %s.\n", wine_dbgstr_w(buffW)); IDWriteLocalizedStrings_Release(strings); IDWriteFont_Release(font); @@ -4728,16 +4728,16 @@ if (font) { font = NULL; hr = IDWriteFontFallback_MapCharacters(fallback, &analysissource, 1, 1, &fallbackcollection, g_blahfontW, DWRITE_FONT_WEIGHT_NORMAL, DWRITE_FONT_STYLE_NORMAL, DWRITE_FONT_STRETCH_NORMAL, &mappedlength, &font, &scale); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(mappedlength == 1, "got %u\n", mappedlength); ok(scale == 1.0f, "got %f\n", scale); ok(font != NULL, "got %p\n", font);
exists = FALSE; hr = IDWriteFont_GetInformationalStrings(font, DWRITE_INFORMATIONAL_STRING_WIN32_FAMILY_NAMES, &strings, &exists); - ok(hr == S_OK && exists, "got 0x%08x, exists %d\n", hr, exists); + ok(hr == S_OK && exists, "got 0x%08lx, exists %d\n", hr, exists); hr = IDWriteLocalizedStrings_GetString(strings, 0, buffW, ARRAY_SIZE(buffW)); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); todo_wine ok(lstrcmpW(buffW, L"Tahoma"), "Unexpected string %s.\n", wine_dbgstr_w(buffW)); IDWriteLocalizedStrings_Release(strings); @@ -4780,7 +4780,7 @@ static void test_FontFallbackBuilder(void) EXPECT_REF(factory2, 2); EXPECT_REF(builder, 1); hr = IDWriteFontFallbackBuilder_CreateFontFallback(builder, &fallback); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); EXPECT_REF(factory2, 3); EXPECT_REF(fallback, 1); EXPECT_REF(builder, 1); @@ -4793,54 +4793,54 @@ static void test_FontFallbackBuilder(void)
/* New instance is created every time, even if mappings have not changed. */ hr = IDWriteFontFallbackBuilder_CreateFontFallback(builder, &fallback2); - ok(hr == S_OK, "Failed to create fallback object, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create fallback object, hr %#lx.\n", hr); ok(fallback != fallback2, "Unexpected fallback instance.\n"); IDWriteFontFallback_Release(fallback2);
hr = IDWriteFontFallbackBuilder_AddMapping(builder, NULL, 0, NULL, 0, NULL, NULL, NULL, 0.0f); - ok(hr == E_INVALIDARG, "got 0x%08x\n", hr); + ok(hr == E_INVALIDARG, "got 0x%08lx\n", hr);
range.first = 'A'; range.last = 'B'; hr = IDWriteFontFallbackBuilder_AddMapping(builder, &range, 0, NULL, 0, NULL, NULL, NULL, 0.0f); - ok(hr == E_INVALIDARG, "got 0x%08x\n", hr); + ok(hr == E_INVALIDARG, "got 0x%08lx\n", hr);
hr = IDWriteFontFallbackBuilder_AddMapping(builder, &range, 0, NULL, 0, NULL, NULL, NULL, 1.0f); - ok(hr == E_INVALIDARG, "got 0x%08x\n", hr); + ok(hr == E_INVALIDARG, "got 0x%08lx\n", hr);
hr = IDWriteFontFallbackBuilder_AddMapping(builder, &range, 0, &familyW, 1, NULL, NULL, NULL, 1.0f); - ok(hr == E_INVALIDARG, "got 0x%08x\n", hr); + ok(hr == E_INVALIDARG, "got 0x%08lx\n", hr);
hr = IDWriteFontFallbackBuilder_AddMapping(builder, NULL, 0, &familyW, 1, NULL, NULL, NULL, 1.0f); - ok(hr == E_INVALIDARG, "got 0x%08x\n", hr); + ok(hr == E_INVALIDARG, "got 0x%08lx\n", hr);
/* negative scaling factor */ range.first = range.last = 0; familyW = g_blahfontW; hr = IDWriteFontFallbackBuilder_AddMapping(builder, &range, 1, &familyW, 1, NULL, NULL, NULL, -1.0f); - ok(hr == E_INVALIDARG, "got 0x%08x\n", hr); + ok(hr == E_INVALIDARG, "got 0x%08lx\n", hr);
hr = IDWriteFontFallbackBuilder_AddMapping(builder, &range, 1, &familyW, 1, NULL, NULL, NULL, 0.0f); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
/* empty range */ range.first = range.last = 0; familyW = g_blahfontW; hr = IDWriteFontFallbackBuilder_AddMapping(builder, &range, 1, &familyW, 1, NULL, NULL, NULL, 1.0f); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
range.first = range.last = 0; hr = IDWriteFontFallbackBuilder_AddMapping(builder, &range, 1, &familyW, 1, NULL, NULL, NULL, 2.0f); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
range.first = range.last = 'A'; hr = IDWriteFontFallbackBuilder_AddMapping(builder, &range, 1, &familyW, 1, NULL, NULL, NULL, 3.0f); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
range.first = 'B'; range.last = 'A'; hr = IDWriteFontFallbackBuilder_AddMapping(builder, &range, 1, &familyW, 1, NULL, NULL, NULL, 4.0f); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
IDWriteFontFallback_Release(fallback);
@@ -4848,7 +4848,7 @@ static void test_FontFallbackBuilder(void) hr = IDWriteFontFallbackBuilder_CreateFontFallback(builder, NULL);
hr = IDWriteFontFallbackBuilder_CreateFontFallback(builder, &fallback); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
/* fallback font missing from system collection */ g_source = L"A"; @@ -4858,7 +4858,7 @@ static void test_FontFallbackBuilder(void) hr = IDWriteFontFallback_MapCharacters(fallback, &analysissource, 0, 1, NULL, NULL, DWRITE_FONT_WEIGHT_NORMAL, DWRITE_FONT_STYLE_NORMAL, DWRITE_FONT_STRETCH_NORMAL, &mappedlength, &font, &scale); todo_wine { - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(mappedlength == 1, "got %u\n", mappedlength); ok(scale == 1.0f, "got %f\n", scale); ok(font == NULL, "got %p\n", font); @@ -4868,10 +4868,10 @@ todo_wine { /* remap with custom collection */ range.first = range.last = 'A'; hr = IDWriteFontFallbackBuilder_AddMapping(builder, &range, 1, &familyW, 1, &fallbackcollection, NULL, NULL, 5.0f); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
hr = IDWriteFontFallbackBuilder_CreateFontFallback(builder, &fallback); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
g_source = L"A"; mappedlength = 0; @@ -4880,7 +4880,7 @@ todo_wine { hr = IDWriteFontFallback_MapCharacters(fallback, &analysissource, 0, 1, NULL, NULL, DWRITE_FONT_WEIGHT_NORMAL, DWRITE_FONT_STYLE_NORMAL, DWRITE_FONT_STRETCH_NORMAL, &mappedlength, &font, &scale); todo_wine { - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(mappedlength == 1, "got %u\n", mappedlength); ok(scale == 5.0f, "got %f\n", scale); ok(font != NULL, "got %p\n", font); @@ -4893,10 +4893,10 @@ todo_wine { range.first = 'B'; range.last = 'A'; hr = IDWriteFontFallbackBuilder_AddMapping(builder, &range, 1, &familyW, 1, &fallbackcollection, NULL, NULL, 6.0f); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
hr = IDWriteFontFallbackBuilder_CreateFontFallback(builder, &fallback); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
g_source = L"A"; mappedlength = 0; @@ -4905,7 +4905,7 @@ todo_wine { hr = IDWriteFontFallback_MapCharacters(fallback, &analysissource, 0, 1, NULL, NULL, DWRITE_FONT_WEIGHT_NORMAL, DWRITE_FONT_STYLE_NORMAL, DWRITE_FONT_STRETCH_NORMAL, &mappedlength, &font, &scale); todo_wine { - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(mappedlength == 1, "got %u\n", mappedlength); ok(scale == 5.0f, "got %f\n", scale); ok(font != NULL, "got %p\n", font); @@ -4919,10 +4919,10 @@ todo_wine { range.first = 'A'; range.last = 'B'; hr = IDWriteFontFallbackBuilder_AddMapping(builder, &range, 1, &familyW, 1, &fallbackcollection, L"locale", NULL, 6.0f); - ok(hr == S_OK, "Failed to add mapping, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to add mapping, hr %#lx.\n", hr);
hr = IDWriteFontFallbackBuilder_CreateFontFallback(builder, &fallback); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
g_source = L"A"; mappedlength = 0; @@ -4931,7 +4931,7 @@ todo_wine { hr = IDWriteFontFallback_MapCharacters(fallback, &analysissource, 0, 1, NULL, NULL, DWRITE_FONT_WEIGHT_NORMAL, DWRITE_FONT_STYLE_NORMAL, DWRITE_FONT_STRETCH_NORMAL, &mappedlength, &font, &scale); todo_wine { - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(mappedlength == 1, "got %u\n", mappedlength); ok(scale == 5.0f, "got %f\n", scale); ok(font != NULL, "got %p\n", font); @@ -4950,7 +4950,7 @@ todo_wine {
IDWriteFontFallbackBuilder_Release(builder); ref = IDWriteFactory2_Release(factory2); - ok(ref == 0, "Factory is not released, ref %u.\n", ref); + ok(ref == 0, "Factory is not released, ref %lu.\n", ref); }
static void test_fallback(void) @@ -4974,15 +4974,15 @@ static void test_fallback(void) /* Font does not exist in system collection. */ hr = IDWriteFactory_CreateTextFormat(factory, g_blahfontW, NULL, DWRITE_FONT_WEIGHT_NORMAL, DWRITE_FONT_STYLE_NORMAL, DWRITE_FONT_STRETCH_NORMAL, 10.0f, L"en-us", &format); - ok(hr == S_OK, "Failed to create text format, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create text format, hr %#lx.\n", hr);
hr = IDWriteFactory_CreateTextLayout(factory, L"abcd", 4, format, 1000.0f, 1000.0f, &layout); - ok(hr == S_OK, "Failed to create text layout, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create text layout, hr %#lx.\n", hr);
count = 0; hr = IDWriteTextLayout_GetClusterMetrics(layout, clusters, 4, &count); todo_wine { - ok(hr == S_OK, "Failed to get cluster metrics, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get cluster metrics, hr %#lx.\n", hr); ok(count == 4, "Unexpected count %u.\n", count); } for (i = 0, width = 0.0; i < count; i++) @@ -4990,7 +4990,7 @@ todo_wine {
memset(&metrics, 0xcc, sizeof(metrics)); hr = IDWriteTextLayout_GetMetrics(layout, &metrics); - ok(hr == S_OK, "Failed to get layout metrics, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get layout metrics, hr %#lx.\n", hr); todo_wine { ok(metrics.width > 0.0 && metrics.width == width, "Unexpected width %.2f, expected %.2f.\n", metrics.width, width); ok(metrics.height > 0.0, "Unexpected height %.2f.\n", metrics.height); @@ -5001,11 +5001,11 @@ todo_wine {
hr = IDWriteFactory_CreateTextFormat(factory, L"Tahoma", NULL, DWRITE_FONT_WEIGHT_NORMAL, DWRITE_FONT_STYLE_NORMAL, DWRITE_FONT_STRETCH_NORMAL, 10.0f, L"en-us", &format); - ok(hr == S_OK, "Failed to create text format, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create text format, hr %#lx.\n", hr);
/* Existing font. */ hr = IDWriteFactory_CreateTextLayout(factory, L"abcd", 4, format, 1000.0f, 1000.0f, &layout); - ok(hr == S_OK, "Failed to create text layout, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create text layout, hr %#lx.\n", hr); IDWriteTextFormat_Release(format);
hr = IDWriteTextLayout_QueryInterface(layout, &IID_IDWriteTextLayout2, (void**)&layout2); @@ -5022,39 +5022,39 @@ todo_wine {
fallback = (void*)0xdeadbeef; hr = IDWriteTextLayout2_GetFontFallback(layout2, &fallback); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(fallback == NULL, "got %p\n", fallback);
hr = IDWriteTextLayout2_QueryInterface(layout2, &IID_IDWriteTextFormat1, (void**)&format1); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
fallback = (void*)0xdeadbeef; hr = IDWriteTextFormat1_GetFontFallback(format1, &fallback); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(fallback == NULL, "got %p\n", fallback);
hr = IDWriteFactory_QueryInterface(factory, &IID_IDWriteFactory2, (void**)&factory2); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
fallback = NULL; hr = IDWriteFactory2_GetSystemFontFallback(factory2, &fallback); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(fallback != NULL, "got %p\n", fallback);
hr = IDWriteTextFormat1_SetFontFallback(format1, fallback); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
fallback2 = (void*)0xdeadbeef; hr = IDWriteTextLayout2_GetFontFallback(layout2, &fallback2); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(fallback2 == fallback, "got %p\n", fallback2);
hr = IDWriteTextLayout2_SetFontFallback(layout2, NULL); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
fallback2 = (void*)0xdeadbeef; hr = IDWriteTextFormat1_GetFontFallback(format1, &fallback2); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(fallback2 == NULL, "got %p\n", fallback2);
if (SUCCEEDED(IDWriteFontFallback_QueryInterface(fallback, &IID_IDWriteFontFallback1, (void **)&fallback1))) @@ -5083,40 +5083,40 @@ static void test_SetTypography(void)
hr = IDWriteFactory_CreateTextFormat(factory, L"Tahoma", NULL, DWRITE_FONT_WEIGHT_NORMAL, DWRITE_FONT_STYLE_NORMAL, DWRITE_FONT_STRETCH_NORMAL, 10.0f, L"en-us", &format); - ok(hr == S_OK, "Failed to create text format, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create text format, hr %#lx.\n", hr);
hr = IDWriteFactory_CreateTextLayout(factory, L"afib", 4, format, 1000.0f, 1000.0f, &layout); - ok(hr == S_OK, "Failed to create text layout, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create text layout, hr %#lx.\n", hr); IDWriteTextFormat_Release(format);
hr = IDWriteFactory_CreateTypography(factory, &typography); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
EXPECT_REF(typography, 1); range.startPosition = 0; range.length = 2; hr = IDWriteTextLayout_SetTypography(layout, typography, range); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); EXPECT_REF(typography, 2);
hr = IDWriteTextLayout_GetTypography(layout, 0, &typography2, NULL); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(typography2 == typography, "got %p, expected %p\n", typography2, typography); IDWriteTypography_Release(typography2); IDWriteTypography_Release(typography);
hr = IDWriteFactory_CreateTypography(factory, &typography2); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
range.startPosition = 0; range.length = 1; hr = IDWriteTextLayout_SetTypography(layout, typography2, range); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); EXPECT_REF(typography2, 2); IDWriteTypography_Release(typography2);
hr = IDWriteTextLayout_GetTypography(layout, 0, &typography, &range); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(range.length == 1, "got %u\n", range.length);
IDWriteTypography_Release(typography); @@ -5139,7 +5139,7 @@ static void test_SetLastLineWrapping(void)
hr = IDWriteFactory_CreateTextFormat(factory, L"Tahoma", NULL, DWRITE_FONT_WEIGHT_NORMAL, DWRITE_FONT_STYLE_NORMAL, DWRITE_FONT_STRETCH_NORMAL, 10.0f, L"en-us", &format); - ok(hr == S_OK, "Failed to create text format, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create text format, hr %#lx.\n", hr);
hr = IDWriteTextFormat_QueryInterface(format, &IID_IDWriteTextFormat1, (void**)&format1); IDWriteTextFormat_Release(format); @@ -5153,20 +5153,20 @@ static void test_SetLastLineWrapping(void) ok(ret, "got %d\n", ret);
hr = IDWriteTextFormat1_SetLastLineWrapping(format1, FALSE); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
hr = IDWriteFactory_CreateTextLayout(factory, L"a", 1, (IDWriteTextFormat *)format1, 1000.0f, 1000.0f, &layout); - ok(hr == S_OK, "Failed to create text layout, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create text layout, hr %#lx.\n", hr);
hr = IDWriteTextLayout_QueryInterface(layout, &IID_IDWriteTextLayout2, (void**)&layout2); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); IDWriteTextLayout_Release(layout);
ret = IDWriteTextLayout2_GetLastLineWrapping(layout2); ok(!ret, "got %d\n", ret);
hr = IDWriteTextLayout2_SetLastLineWrapping(layout2, TRUE); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
IDWriteTextLayout2_Release(layout2); IDWriteTextFormat1_Release(format1); @@ -5187,7 +5187,7 @@ static void test_SetOpticalAlignment(void)
hr = IDWriteFactory_CreateTextFormat(factory, L"Tahoma", NULL, DWRITE_FONT_WEIGHT_NORMAL, DWRITE_FONT_STYLE_NORMAL, DWRITE_FONT_STRETCH_NORMAL, 10.0f, L"en-us", &format); - ok(hr == S_OK, "Failed to create text format, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create text format, hr %#lx.\n", hr);
hr = IDWriteTextFormat_QueryInterface(format, &IID_IDWriteTextFormat1, (void**)&format1); IDWriteTextFormat_Release(format); @@ -5201,10 +5201,10 @@ static void test_SetOpticalAlignment(void) ok(alignment == DWRITE_OPTICAL_ALIGNMENT_NONE, "got %d\n", alignment);
hr = IDWriteFactory_CreateTextLayout(factory, L"a", 1, (IDWriteTextFormat *)format1, 1000.0f, 1000.0f, &layout); - ok(hr == S_OK, "Failed to create text layout, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create text layout, hr %#lx.\n", hr);
hr = IDWriteTextLayout_QueryInterface(layout, &IID_IDWriteTextLayout2, (void**)&layout2); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); IDWriteTextLayout_Release(layout); IDWriteTextFormat1_Release(format1);
@@ -5212,25 +5212,25 @@ static void test_SetOpticalAlignment(void) ok(alignment == DWRITE_OPTICAL_ALIGNMENT_NONE, "got %d\n", alignment);
hr = IDWriteTextLayout2_QueryInterface(layout2, &IID_IDWriteTextFormat1, (void**)&format1); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
alignment = IDWriteTextFormat1_GetOpticalAlignment(format1); ok(alignment == DWRITE_OPTICAL_ALIGNMENT_NONE, "got %d\n", alignment);
hr = IDWriteTextLayout2_SetOpticalAlignment(layout2, DWRITE_OPTICAL_ALIGNMENT_NO_SIDE_BEARINGS); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
hr = IDWriteTextLayout2_SetOpticalAlignment(layout2, DWRITE_OPTICAL_ALIGNMENT_NO_SIDE_BEARINGS+1); - ok(hr == E_INVALIDARG, "got 0x%08x\n", hr); + ok(hr == E_INVALIDARG, "got 0x%08lx\n", hr);
alignment = IDWriteTextFormat1_GetOpticalAlignment(format1); ok(alignment == DWRITE_OPTICAL_ALIGNMENT_NO_SIDE_BEARINGS, "got %d\n", alignment);
hr = IDWriteTextFormat1_SetOpticalAlignment(format1, DWRITE_OPTICAL_ALIGNMENT_NONE); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
hr = IDWriteTextFormat1_SetOpticalAlignment(format1, DWRITE_OPTICAL_ALIGNMENT_NO_SIDE_BEARINGS+1); - ok(hr == E_INVALIDARG, "got 0x%08x\n", hr); + ok(hr == E_INVALIDARG, "got 0x%08lx\n", hr);
alignment = IDWriteTextLayout2_GetOpticalAlignment(layout2); ok(alignment == DWRITE_OPTICAL_ALIGNMENT_NONE, "got %d\n", alignment); @@ -5286,29 +5286,29 @@ static void test_SetUnderline(void)
hr = IDWriteFactory_CreateTextFormat(factory, L"Tahoma", NULL, DWRITE_FONT_WEIGHT_NORMAL, DWRITE_FONT_STYLE_NORMAL, DWRITE_FONT_STRETCH_NORMAL, 10.0f, L"en-us", &format); - ok(hr == S_OK, "Failed to create text format, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create text format, hr %#lx.\n", hr);
hr = IDWriteFactory_CreateTextLayout(factory, strW, 4, format, 1000.0, 1000.0, &layout); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
count = 0; hr = IDWriteTextLayout_GetClusterMetrics(layout, clusters, ARRAY_SIZE(clusters), &count); - ok(hr == S_OK, "Failed to get cluster metrics, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get cluster metrics, hr %#lx.\n", hr); ok(count == 3, "Unexpected cluster count %u.\n", count);
range.startPosition = 0; range.length = 2; hr = IDWriteTextLayout_SetUnderline(layout, TRUE, range); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
count = 0; hr = IDWriteTextLayout_GetClusterMetrics(layout, clusters, ARRAY_SIZE(clusters), &count); - ok(hr == S_OK, "Failed to get cluster metrics, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get cluster metrics, hr %#lx.\n", hr); ok(count == 3, "Unexpected cluster count %u.\n", count);
flush_sequence(sequences, RENDERER_ID); hr = IDWriteTextLayout_Draw(layout, NULL, &testrenderer, 0.0, 0.0); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok_sequence(sequences, RENDERER_ID, drawunderline_seq, "draw underline test", TRUE);
IDWriteTextLayout_Release(layout); @@ -5316,53 +5316,53 @@ static void test_SetUnderline(void) /* 2 characters, same font, significantly different font size. Set underline for both, see how many underline drawing calls is there. */ hr = IDWriteFactory_CreateTextLayout(factory, strW, 2, format, 1000.0f, 1000.0f, &layout); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
range.startPosition = 0; range.length = 2; hr = IDWriteTextLayout_SetUnderline(layout, TRUE, range); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
range.startPosition = 0; range.length = 1; hr = IDWriteTextLayout_SetFontSize(layout, 100.0f, range); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
flush_sequence(sequences, RENDERER_ID); hr = IDWriteTextLayout_Draw(layout, NULL, &testrenderer, 0.0f, 0.0f); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok_sequence(sequences, RENDERER_ID, drawunderline2_seq, "draw underline test 2", FALSE);
/* now set different locale for second char, draw again */ range.startPosition = 0; range.length = 1; hr = IDWriteTextLayout_SetLocaleName(layout, L"en-CA", range); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
flush_sequence(sequences, RENDERER_ID); hr = IDWriteTextLayout_Draw(layout, NULL, &testrenderer, 0.0f, 0.0f); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok_sequence(sequences, RENDERER_ID, drawunderline3_seq, "draw underline test 2", FALSE);
IDWriteTextLayout_Release(layout);
/* 2 characters, same font properties, first with strikethrough, both underlined */ hr = IDWriteFactory_CreateTextLayout(factory, strW, 2, format, 1000.0f, 1000.0f, &layout); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
range.startPosition = 0; range.length = 1; hr = IDWriteTextLayout_SetStrikethrough(layout, TRUE, range); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
range.startPosition = 0; range.length = 2; hr = IDWriteTextLayout_SetUnderline(layout, TRUE, range); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
flush_sequence(sequences, RENDERER_ID); hr = IDWriteTextLayout_Draw(layout, NULL, &testrenderer, 0.0f, 0.0f); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok_sequence(sequences, RENDERER_ID, drawunderline4_seq, "draw underline test 4", FALSE);
IDWriteTextLayout_Release(layout); @@ -5371,7 +5371,7 @@ static void test_SetUnderline(void)
/* Test runHeight value with all available fonts */ hr = IDWriteFactory_GetSystemFontCollection(factory, &syscollection, FALSE); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); count = IDWriteFontCollection_GetFontFamilyCount(syscollection);
for (i = 0; i < count; ++i) @@ -5391,17 +5391,17 @@ static void test_SetUnderline(void) layout = NULL;
hr = IDWriteFontCollection_GetFontFamily(syscollection, i, &family); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
hr = IDWriteFontFamily_GetFirstMatchingFont(family, DWRITE_FONT_WEIGHT_NORMAL, DWRITE_FONT_STRETCH_NORMAL, DWRITE_FONT_STYLE_NORMAL, &font); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
hr = IDWriteFont_CreateFontFace(font, &fontface); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
hr = IDWriteFontFamily_GetFamilyNames(family, &names); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
if (!(exists = get_enus_string(names, nameW, ARRAY_SIZE(nameW)))) { IDWriteLocalFontFileLoader *localloader; @@ -5413,20 +5413,20 @@ static void test_SetUnderline(void)
count = 1; hr = IDWriteFontFace_GetFiles(fontface, &count, &file); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
hr = IDWriteFontFile_GetLoader(file, &loader); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
hr = IDWriteFontFileLoader_QueryInterface(loader, &IID_IDWriteLocalFontFileLoader, (void**)&localloader); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); IDWriteFontFileLoader_Release(loader);
hr = IDWriteFontFile_GetReferenceKey(file, &key, &keysize); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
hr = IDWriteLocalFontFileLoader_GetFilePathFromKey(localloader, key, keysize, nameW, ARRAY_SIZE(nameW)); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
skip("Failed to get English family name, font file %s\n", wine_dbgstr_w(nameW));
@@ -5443,7 +5443,7 @@ static void test_SetUnderline(void) IDWriteFontFace_GetMetrics(fontface, &fontmetrics); hr = IDWriteFactory_CreateTextFormat(factory, nameW, NULL, DWRITE_FONT_WEIGHT_NORMAL, DWRITE_FONT_STYLE_NORMAL, DWRITE_FONT_STRETCH_NORMAL, fontmetrics.designUnitsPerEm, L"en-us", &format); - ok(hr == S_OK, "Failed to create text format, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create text format, hr %#lx.\n", hr);
/* Look for first supported character to avoid triggering fallback path. With fallback it's harder to test DrawUnderline() metrics, because actual resolved fontface is not passed to it. Grabbing fontface instance @@ -5452,7 +5452,7 @@ static void test_SetUnderline(void) { glyph = 0; hr = IDWriteFontFace_GetGlyphIndices(fontface, &codepoint, 1, &glyph); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); if (glyph) break; } @@ -5465,18 +5465,18 @@ static void test_SetUnderline(void)
str[0] = codepoint; hr = IDWriteFactory_CreateTextLayout(factory, str, 1, format, 30000.0f, 100.0f, &layout); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
range.startPosition = 0; range.length = 2; hr = IDWriteTextLayout_SetUnderline(layout, TRUE, range); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
memset(&ctxt, 0, sizeof(ctxt)); ctxt.format = format; ctxt.familyW = nameW; hr = IDWriteTextLayout_Draw(layout, &ctxt, &testrenderer, 0.0f, 0.0f); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
cleanup: if (layout) @@ -5503,10 +5503,10 @@ static void test_InvalidateLayout(void)
hr = IDWriteFactory_CreateTextFormat(factory, L"Tahoma", NULL, DWRITE_FONT_WEIGHT_NORMAL, DWRITE_FONT_STYLE_NORMAL, DWRITE_FONT_STRETCH_NORMAL, 10.0f, L"en-us", &format); - ok(hr == S_OK, "Failed to create text format, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create text format, hr %#lx.\n", hr);
hr = IDWriteFactory_CreateTextLayout(factory, L"a", 1, format, 1000.0f, 1000.0f, &layout); - ok(hr == S_OK, "Failed to create text layout, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create text layout, hr %#lx.\n", hr);
hr = IDWriteTextLayout_QueryInterface(layout, &IID_IDWriteTextLayout3, (void**)&layout3); if (hr == S_OK) { @@ -5514,32 +5514,32 @@ static void test_InvalidateLayout(void) IDWriteTextFormat2 *format2;
hr = IDWriteTextFormat_QueryInterface(format, &IID_IDWriteTextFormat2, (void**)&format2); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); IDWriteTextFormat2_Release(format2);
hr = IDWriteTextLayout_QueryInterface(layout, &IID_IDWriteTextFormat2, (void**)&format2); - ok(hr == S_OK || broken(hr == E_NOINTERFACE), "Unexpected hr %#x.\n", hr); + ok(hr == S_OK || broken(hr == E_NOINTERFACE), "Unexpected hr %#lx.\n", hr); if (hr == S_OK) { ok(format != (IDWriteTextFormat *)format2, "Unexpected interface pointer.\n"); IDWriteTextFormat2_Release(format2); }
hr = IDWriteTextLayout_QueryInterface(layout, &IID_IDWriteTextFormat1, (void**)&format1); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
hr = IDWriteTextFormat1_QueryInterface(format1, &IID_IDWriteTextFormat2, (void**)&format2); - ok(hr == S_OK || broken(hr == E_NOINTERFACE), "Unexpected hr %#x.\n", hr); + ok(hr == S_OK || broken(hr == E_NOINTERFACE), "Unexpected hr %#lx.\n", hr); if (hr == S_OK) IDWriteTextFormat2_Release(format2); IDWriteTextFormat1_Release(format1);
hr = IDWriteTextLayout3_QueryInterface(layout3, &IID_IDWriteTextFormat2, (void**)&format2); - ok(hr == S_OK || broken(hr == E_NOINTERFACE), "got 0x%08x\n", hr); + ok(hr == S_OK || broken(hr == E_NOINTERFACE), "got 0x%08lx\n", hr); if (hr == S_OK) IDWriteTextFormat2_Release(format2);
hr = IDWriteTextLayout3_InvalidateLayout(layout3); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); IDWriteTextLayout3_Release(layout3); } else @@ -5562,40 +5562,40 @@ static void test_line_spacing(void)
hr = IDWriteFactory_CreateTextFormat(factory, L"Tahoma", NULL, DWRITE_FONT_WEIGHT_NORMAL, DWRITE_FONT_STYLE_NORMAL, DWRITE_FONT_STRETCH_NORMAL, 10.0f, L"en-us", &format); - ok(hr == S_OK, "Failed to create text format, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create text format, hr %#lx.\n", hr);
hr = IDWriteTextFormat_SetLineSpacing(format, DWRITE_LINE_SPACING_METHOD_DEFAULT, 0.0f, 0.0f); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
hr = IDWriteTextFormat_SetLineSpacing(format, DWRITE_LINE_SPACING_METHOD_DEFAULT, 0.0f, -10.0f); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
hr = IDWriteTextFormat_SetLineSpacing(format, DWRITE_LINE_SPACING_METHOD_DEFAULT, -10.0f, 0.0f); - ok(hr == E_INVALIDARG, "got 0x%08x\n", hr); + ok(hr == E_INVALIDARG, "got 0x%08lx\n", hr);
hr = IDWriteTextFormat_SetLineSpacing(format, DWRITE_LINE_SPACING_METHOD_PROPORTIONAL+1, 0.0f, 0.0f); - ok(hr == E_INVALIDARG, "got 0x%08x\n", hr); + ok(hr == E_INVALIDARG, "got 0x%08lx\n", hr);
hr = IDWriteFactory_CreateTextLayout(factory, L"a", 1, format, 1000.0f, 1000.0f, &layout); - ok(hr == S_OK, "Failed to create text layout, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create text layout, hr %#lx.\n", hr);
hr = IDWriteTextLayout_SetLineSpacing(layout, DWRITE_LINE_SPACING_METHOD_DEFAULT, 0.0f, 0.0f); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
hr = IDWriteTextLayout_SetLineSpacing(layout, DWRITE_LINE_SPACING_METHOD_DEFAULT, 0.0f, -10.0f); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
hr = IDWriteTextLayout_SetLineSpacing(layout, DWRITE_LINE_SPACING_METHOD_DEFAULT, -10.0f, 0.0f); - ok(hr == E_INVALIDARG, "got 0x%08x\n", hr); + ok(hr == E_INVALIDARG, "got 0x%08lx\n", hr);
hr = IDWriteTextLayout_SetLineSpacing(layout, DWRITE_LINE_SPACING_METHOD_PROPORTIONAL+1, 0.0f, 0.0f); - ok(hr == E_INVALIDARG, "got 0x%08x\n", hr); + ok(hr == E_INVALIDARG, "got 0x%08lx\n", hr);
if (IDWriteTextFormat_QueryInterface(format, &IID_IDWriteTextFormat2, (void**)&format2) == S_OK) { DWRITE_LINE_SPACING spacing;
hr = IDWriteTextFormat2_GetLineSpacing(format2, &spacing); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
ok(spacing.method == DWRITE_LINE_SPACING_METHOD_DEFAULT, "got method %d\n", spacing.method); ok(spacing.height == 0.0f, "got %f\n", spacing.height); @@ -5606,29 +5606,29 @@ static void test_line_spacing(void) spacing.leadingBefore = -1.0f;
hr = IDWriteTextFormat2_SetLineSpacing(format2, &spacing); - ok(hr == E_INVALIDARG, "got 0x%08x\n", hr); + ok(hr == E_INVALIDARG, "got 0x%08lx\n", hr);
spacing.leadingBefore = 1.1f;
hr = IDWriteTextFormat2_SetLineSpacing(format2, &spacing); - ok(hr == E_INVALIDARG, "got 0x%08x\n", hr); + ok(hr == E_INVALIDARG, "got 0x%08lx\n", hr);
spacing.leadingBefore = 1.0f;
hr = IDWriteTextFormat2_SetLineSpacing(format2, &spacing); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
spacing.method = DWRITE_LINE_SPACING_METHOD_PROPORTIONAL + 1; hr = IDWriteTextFormat2_SetLineSpacing(format2, &spacing); - ok(hr == E_INVALIDARG, "got 0x%08x\n", hr); + ok(hr == E_INVALIDARG, "got 0x%08lx\n", hr);
spacing.method = DWRITE_LINE_SPACING_METHOD_PROPORTIONAL; spacing.fontLineGapUsage = DWRITE_FONT_LINE_GAP_USAGE_ENABLED + 1; hr = IDWriteTextFormat2_SetLineSpacing(format2, &spacing); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
hr = IDWriteTextFormat2_GetLineSpacing(format2, &spacing); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(spacing.fontLineGapUsage == DWRITE_FONT_LINE_GAP_USAGE_ENABLED + 1, "got %d\n", spacing.fontLineGapUsage);
IDWriteTextFormat2_Release(format2); @@ -5663,10 +5663,10 @@ static void test_GetOverhangMetrics(void)
hr = IDWriteFactory_CreateTextFormat(factory, L"Tahoma", NULL, DWRITE_FONT_WEIGHT_NORMAL, DWRITE_FONT_STYLE_NORMAL, DWRITE_FONT_STRETCH_NORMAL, 100.0f, L"en-us", &format); - ok(hr == S_OK, "Failed to create text format, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create text format, hr %#lx.\n", hr);
hr = IDWriteFactory_CreateTextLayout(factory, L"A", 1, format, 1000.0f, 1000.0f, &layout); - ok(hr == S_OK, "Failed to create text layout, hr %x.\n", hr); + ok(hr == S_OK, "Failed to create text layout, hr %lx.\n", hr);
for (i = 0; i < ARRAY_SIZE(overhangs_tests); i++) { const struct overhangs_test *test = &overhangs_tests[i]; @@ -5679,16 +5679,16 @@ static void test_GetOverhangMetrics(void)
hr = IDWriteTextLayout_SetLineSpacing(layout, DWRITE_LINE_SPACING_METHOD_UNIFORM, test->metrics.height * 2.0f, test->uniform_baseline); - ok(hr == S_OK, "Failed to set line spacing, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to set line spacing, hr %#lx.\n", hr);
hr = IDWriteTextLayout_SetInlineObject(layout, NULL, range); - ok(hr == S_OK, "Failed to reset inline object, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to reset inline object, hr %#lx.\n", hr);
hr = IDWriteTextLayout_SetInlineObject(layout, &obj.IDWriteInlineObject_iface, range); - ok(hr == S_OK, "Failed to set inline object, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to set inline object, hr %#lx.\n", hr);
hr = IDWriteTextLayout_GetMetrics(layout, &metrics); - ok(hr == S_OK, "Failed to get layout metrics, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get layout metrics, hr %#lx.\n", hr);
ok(metrics.width == test->metrics.width, "%u: unexpected formatted width.\n", i); ok(metrics.height == test->metrics.height * 2.0f, "%u: unexpected formatted height.\n", i); @@ -5697,7 +5697,7 @@ static void test_GetOverhangMetrics(void) hr = IDWriteTextLayout_SetMaxHeight(layout, test->metrics.height);
hr = IDWriteTextLayout_GetOverhangMetrics(layout, &overhang_metrics); - ok(hr == S_OK, "Failed to get overhang metrics, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get overhang metrics, hr %#lx.\n", hr);
ok(!memcmp(&overhang_metrics, &test->expected, sizeof(overhang_metrics)), "%u: unexpected overhang metrics (%f, %f, %f, %f).\n", i, overhang_metrics.left, overhang_metrics.top, @@ -5727,7 +5727,7 @@ static void test_tab_stops(void) { hr = IDWriteFactory_CreateTextFormat(factory, L"Tahoma", NULL, DWRITE_FONT_WEIGHT_NORMAL, DWRITE_FONT_STYLE_NORMAL, DWRITE_FONT_STRETCH_NORMAL, size, L"en-us", &format); - ok(hr == S_OK, "Failed to create text format, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create text format, hr %#lx.\n", hr);
tabstop = IDWriteTextFormat_GetIncrementalTabStop(format); ok(tabstop == 4.0f * size, "Unexpected tab stop %f.\n", tabstop); @@ -5737,28 +5737,28 @@ static void test_tab_stops(void)
hr = IDWriteFactory_CreateTextFormat(factory, L"Tahoma", NULL, DWRITE_FONT_WEIGHT_NORMAL, DWRITE_FONT_STYLE_NORMAL, DWRITE_FONT_STRETCH_NORMAL, 10.0f, L"en-us", &format); - ok(hr == S_OK, "Failed to create text format, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create text format, hr %#lx.\n", hr);
hr = IDWriteTextFormat_SetIncrementalTabStop(format, 0.0f); - ok(hr == E_INVALIDARG, "Unexpected hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Unexpected hr %#lx.\n", hr);
hr = IDWriteTextFormat_SetIncrementalTabStop(format, -10.0f); - ok(hr == E_INVALIDARG, "Unexpected hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Unexpected hr %#lx.\n", hr);
tabstop = IDWriteTextFormat_GetIncrementalTabStop(format); ok(tabstop == 40.0f, "Unexpected tab stop %f.\n", tabstop);
hr = IDWriteTextFormat_SetIncrementalTabStop(format, 100.0f); - ok(hr == S_OK, "Failed to set tab stop value, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to set tab stop value, hr %#lx.\n", hr);
tabstop = IDWriteTextFormat_GetIncrementalTabStop(format); ok(tabstop == 100.0f, "Unexpected tab stop %f.\n", tabstop);
hr = IDWriteFactory_CreateTextLayout(factory, L"\ta\tb", 4, format, 1000.0f, 1000.0f, &layout); - ok(hr == S_OK, "Failed to create text layout, hr %x.\n", hr); + ok(hr == S_OK, "Failed to create text layout, hr %lx.\n", hr);
hr = IDWriteTextLayout_GetClusterMetrics(layout, clusters, 4, &count); - ok(hr == S_OK, "Failed to get cluster metrics, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get cluster metrics, hr %#lx.\n", hr); ok(clusters[0].isWhitespace, "Unexpected isWhitespace.\n"); ok(!clusters[1].isWhitespace, "Unexpected isWhitespace.\n"); ok(clusters[2].isWhitespace, "Unexpected isWhitespace.\n"); @@ -5770,13 +5770,13 @@ todo_wine { range.startPosition = 0; range.length = ~0u; hr = IDWriteTextLayout_SetFontSize(layout, 20.0f, range); - ok(hr == S_OK, "Failed to set font size, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to set font size, hr %#lx.\n", hr);
tabstop = IDWriteTextLayout_GetIncrementalTabStop(layout); ok(tabstop == 100.0f, "Unexpected tab stop %f.\n", tabstop);
hr = IDWriteTextLayout_GetClusterMetrics(layout, clusters, 4, &count); - ok(hr == S_OK, "Failed to get cluster metrics, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get cluster metrics, hr %#lx.\n", hr); ok(clusters[0].isWhitespace, "Unexpected isWhitespace.\n"); ok(!clusters[1].isWhitespace, "Unexpected isWhitespace.\n"); ok(clusters[2].isWhitespace, "Unexpected isWhitespace.\n"); @@ -5806,10 +5806,10 @@ static void test_automatic_font_axes(void)
hr = IDWriteFactory_CreateTextFormat(factory, L"Tahoma", NULL, DWRITE_FONT_WEIGHT_NORMAL, DWRITE_FONT_STYLE_NORMAL, DWRITE_FONT_STRETCH_NORMAL, 16.0f, L"en-us", &format); - ok(hr == S_OK, "Failed to create text format, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create text format, hr %#lx.\n", hr);
hr = IDWriteFactory_CreateTextLayout(factory, L"a", 1, format, 1000.0f, 1000.0f, &layout); - ok(hr == S_OK, "Failed to create text layout, hr %x.\n", hr); + ok(hr == S_OK, "Failed to create text layout, hr %lx.\n", hr);
IDWriteTextLayout_QueryInterface(layout, &IID_IDWriteTextLayout4, (void **)&layout4);
@@ -5824,16 +5824,16 @@ static void test_automatic_font_axes(void) }
hr = IDWriteTextFormat_QueryInterface(format, &IID_IDWriteTextFormat3, (void **)&format3); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
axes = IDWriteTextFormat3_GetAutomaticFontAxes(format3); ok(axes == DWRITE_AUTOMATIC_FONT_AXES_NONE, "Unexpected automatic axes %u.\n", axes);
hr = IDWriteTextFormat3_SetAutomaticFontAxes(format3, DWRITE_AUTOMATIC_FONT_AXES_OPTICAL_SIZE); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IDWriteTextFormat3_SetAutomaticFontAxes(format3, DWRITE_AUTOMATIC_FONT_AXES_OPTICAL_SIZE + 1); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
IDWriteTextFormat3_Release(format3);
@@ -5841,37 +5841,37 @@ static void test_automatic_font_axes(void) ok(axes == DWRITE_AUTOMATIC_FONT_AXES_NONE, "Unexpected automatic axes %u.\n", axes);
hr = IDWriteTextLayout4_SetAutomaticFontAxes(layout4, DWRITE_AUTOMATIC_FONT_AXES_OPTICAL_SIZE + 1); - ok(hr == E_INVALIDARG, "Unexpected hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Unexpected hr %#lx.\n", hr);
hr = IDWriteTextLayout4_SetAutomaticFontAxes(layout4, DWRITE_AUTOMATIC_FONT_AXES_OPTICAL_SIZE); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
IDWriteTextLayout4_Release(layout4);
/* Out of range values allow for formats, but not for layouts. */ hr = IDWriteFactory_CreateTextLayout(factory, L"a", 1, format, 1000.0f, 1000.0f, &layout); - ok(hr == S_OK, "Failed to create text layout, hr %x.\n", hr); + ok(hr == S_OK, "Failed to create text layout, hr %lx.\n", hr);
hr = IDWriteTextLayout_QueryInterface(layout, &IID_IDWriteTextLayout4, (void **)&layout4); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
axes = IDWriteTextLayout4_GetAutomaticFontAxes(layout4); ok(axes == DWRITE_AUTOMATIC_FONT_AXES_OPTICAL_SIZE + 1, "Unexpected automatic axes %u.\n", axes);
hr = IDWriteTextLayout4_QueryInterface(layout4, &IID_IDWriteTextFormat3, (void **)&format3); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
axes = IDWriteTextFormat3_GetAutomaticFontAxes(format3); ok(axes == DWRITE_AUTOMATIC_FONT_AXES_OPTICAL_SIZE + 1, "Unexpected automatic axes %u.\n", axes);
hr = IDWriteTextLayout4_SetAutomaticFontAxes(layout4, DWRITE_AUTOMATIC_FONT_AXES_OPTICAL_SIZE); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
axes = IDWriteTextFormat3_GetAutomaticFontAxes(format3); ok(axes == DWRITE_AUTOMATIC_FONT_AXES_OPTICAL_SIZE, "Unexpected automatic axes %u.\n", axes);
hr = IDWriteTextFormat3_SetAutomaticFontAxes(format3, DWRITE_AUTOMATIC_FONT_AXES_OPTICAL_SIZE + 1); - ok(hr == E_INVALIDARG, "Unexpected hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Unexpected hr %#lx.\n", hr);
IDWriteTextFormat3_Release(format3);
@@ -5907,15 +5907,15 @@ static void test_text_format_axes(void)
hr = IDWriteFactory6_CreateTextFormat(factory, L"test_family", NULL, NULL, 0, 10.0f, L"en-us", &format3); todo_wine - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
if (SUCCEEDED(hr)) { hr = IDWriteTextFormat3_GetFontCollection(format3, &collection); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IDWriteFontCollection_QueryInterface(collection, &IID_IDWriteFontCollection2, (void **)&collection2); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
model = IDWriteFontCollection2_GetFontFamilyModel(collection2); ok(model == DWRITE_FONT_FAMILY_MODEL_TYPOGRAPHIC, "Unexpected model %d.\n", model); @@ -5939,7 +5939,7 @@ if (SUCCEEDED(hr)) axes[0].axisTag = DWRITE_FONT_AXIS_TAG_WEIGHT; axes[0].value = 200.0f; hr = IDWriteTextFormat3_SetFontAxisValues(format3, axes, 1); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
weight = IDWriteTextFormat3_GetFontWeight(format3); ok(weight == DWRITE_FONT_WEIGHT_NORMAL, "Unexpected font weight %d.\n", weight); @@ -5949,17 +5949,17 @@ if (SUCCEEDED(hr)) hr = IDWriteFactory_CreateTextFormat((IDWriteFactory *)factory, L"test_family", NULL, DWRITE_FONT_WEIGHT_BOLD, DWRITE_FONT_STYLE_ITALIC, DWRITE_FONT_STRETCH_EXPANDED, 10.0f, L"en-us", &format); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IDWriteTextFormat_QueryInterface(format, &IID_IDWriteTextFormat3, (void **)&format3); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
count = IDWriteTextFormat3_GetFontAxisValueCount(format3); ok(!count, "Unexpected axis count %u.\n", count);
axes[0].axisTag = DWRITE_FONT_AXIS_TAG_WEIGHT; hr = IDWriteTextFormat3_GetFontAxisValues(format3, axes, 1); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); ok(axes[0].axisTag == 0 && axes[0].value == 0.0f, "Unexpected value.\n");
axes[0].axisTag = DWRITE_FONT_AXIS_TAG_WEIGHT; @@ -5967,22 +5967,22 @@ if (SUCCEEDED(hr)) axes[1].axisTag = DWRITE_FONT_AXIS_TAG_WIDTH; axes[1].value = 2.0f; hr = IDWriteTextFormat3_SetFontAxisValues(format3, axes, 2); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
count = IDWriteTextFormat3_GetFontAxisValueCount(format3); ok(count == 2, "Unexpected axis count %u.\n", count);
hr = IDWriteTextFormat3_GetFontAxisValues(format3, axes, 1); - ok(hr == E_NOT_SUFFICIENT_BUFFER, "Unexpected hr %#x.\n", hr); + ok(hr == E_NOT_SUFFICIENT_BUFFER, "Unexpected hr %#lx.\n", hr);
hr = IDWriteTextFormat3_GetFontAxisValues(format3, axes, 0); - ok(hr == E_NOT_SUFFICIENT_BUFFER, "Unexpected hr %#x.\n", hr); + ok(hr == E_NOT_SUFFICIENT_BUFFER, "Unexpected hr %#lx.\n", hr);
hr = IDWriteTextFormat3_GetFontAxisValues(format3, axes, 2); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IDWriteTextFormat3_SetFontAxisValues(format3, axes, 0); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
count = IDWriteTextFormat3_GetFontAxisValueCount(format3); ok(!count, "Unexpected axis count %u.\n", count); @@ -6013,238 +6013,238 @@ static void test_layout_range_length(void)
hr = IDWriteFactory_CreateTextFormat(factory, L"Tahoma", NULL, DWRITE_FONT_WEIGHT_NORMAL, DWRITE_FONT_STYLE_NORMAL, DWRITE_FONT_STRETCH_NORMAL, 10.0f, L"ru", &format); - ok(hr == S_OK, "Failed to create text format, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create text format, hr %#lx.\n", hr);
/* Range length is validated when setting properties. */
hr = IDWriteFactory_CreateTextLayout(factory, L"string", 6, format, 100.0f, 100.0f, &layout); - ok(hr == S_OK, "Failed to create text layout, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create text layout, hr %#lx.\n", hr);
/* Weight */ range.startPosition = 10; range.length = ~0u; hr = IDWriteTextLayout_SetFontWeight(layout, DWRITE_FONT_WEIGHT_NORMAL, range); - ok(hr == E_INVALIDARG, "Unexpected hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Unexpected hr %#lx.\n", hr);
range.startPosition = 10; range.length = ~0u - 9; hr = IDWriteTextLayout_SetFontWeight(layout, DWRITE_FONT_WEIGHT_NORMAL, range); - ok(hr == E_INVALIDARG, "Unexpected hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Unexpected hr %#lx.\n", hr);
range.startPosition = 10; range.length = ~0u - 10; hr = IDWriteTextLayout_SetFontWeight(layout, DWRITE_FONT_WEIGHT_HEAVY, range); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
range.startPosition = range.length = 0; hr = IDWriteTextLayout_GetFontWeight(layout, 0, &weight, &range); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); ok(range.startPosition == 0 && range.length == 10, "Unexpected range (%u, %u).\n", range.startPosition, range.length);
range.startPosition = range.length = 0; hr = IDWriteTextLayout_GetFontWeight(layout, 10, &weight, &range); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); ok(range.startPosition == 10 && range.length == ~0u - 10, "Unexpected range (%u, %u).\n", range.startPosition, range.length);
range.startPosition = 0; range.length = ~0u; hr = IDWriteTextLayout_SetFontWeight(layout, DWRITE_FONT_WEIGHT_NORMAL, range); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
/* Family name */ range.startPosition = 10; range.length = ~0u; hr = IDWriteTextLayout_SetFontFamilyName(layout, L"family", range); - ok(hr == E_INVALIDARG, "Unexpected hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Unexpected hr %#lx.\n", hr);
range.startPosition = 10; range.length = ~0u - 9; hr = IDWriteTextLayout_SetFontFamilyName(layout, L"family", range); - ok(hr == E_INVALIDARG, "Unexpected hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Unexpected hr %#lx.\n", hr);
range.startPosition = 10; range.length = ~0u - 10; hr = IDWriteTextLayout_SetFontFamilyName(layout, L"family", range); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
range.startPosition = 0; range.length = ~0u; hr = IDWriteTextLayout_SetFontFamilyName(layout, L"Tahoma", range); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
/* Style */ range.startPosition = 10; range.length = ~0u; hr = IDWriteTextLayout_SetFontStyle(layout, DWRITE_FONT_STYLE_ITALIC, range); - ok(hr == E_INVALIDARG, "Unexpected hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Unexpected hr %#lx.\n", hr);
range.startPosition = 10; range.length = ~0u - 9; hr = IDWriteTextLayout_SetFontStyle(layout, DWRITE_FONT_STYLE_ITALIC, range); - ok(hr == E_INVALIDARG, "Unexpected hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Unexpected hr %#lx.\n", hr);
range.startPosition = 10; range.length = ~0u - 10; hr = IDWriteTextLayout_SetFontStyle(layout, DWRITE_FONT_STYLE_ITALIC, range); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
range.startPosition = range.length = 0; hr = IDWriteTextLayout_GetFontStyle(layout, 0, &style, &range); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); ok(range.startPosition == 0 && range.length == 10, "Unexpected range (%u, %u).\n", range.startPosition, range.length);
range.startPosition = range.length = 0; hr = IDWriteTextLayout_GetFontStyle(layout, 10, &style, &range); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); ok(range.startPosition == 10 && range.length == ~0u - 10, "Unexpected range (%u, %u).\n", range.startPosition, range.length);
range.startPosition = 0; range.length = ~0u; hr = IDWriteTextLayout_SetFontStyle(layout, DWRITE_FONT_STYLE_NORMAL, range); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
/* Stretch */ range.startPosition = 10; range.length = ~0u; hr = IDWriteTextLayout_SetFontStretch(layout, DWRITE_FONT_STRETCH_CONDENSED, range); - ok(hr == E_INVALIDARG, "Unexpected hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Unexpected hr %#lx.\n", hr);
range.startPosition = 10; range.length = ~0u - 9; hr = IDWriteTextLayout_SetFontStretch(layout, DWRITE_FONT_STRETCH_CONDENSED, range); - ok(hr == E_INVALIDARG, "Unexpected hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Unexpected hr %#lx.\n", hr);
range.startPosition = 10; range.length = ~0u - 10; hr = IDWriteTextLayout_SetFontStretch(layout, DWRITE_FONT_STRETCH_CONDENSED, range); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
range.startPosition = range.length = 0; hr = IDWriteTextLayout_GetFontStretch(layout, 0, &stretch, &range); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); ok(range.startPosition == 0 && range.length == 10, "Unexpected range (%u, %u).\n", range.startPosition, range.length);
range.startPosition = range.length = 0; hr = IDWriteTextLayout_GetFontStretch(layout, 10, &stretch, &range); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); ok(range.startPosition == 10 && range.length == ~0u - 10, "Unexpected range (%u, %u).\n", range.startPosition, range.length);
range.startPosition = 0; range.length = ~0u; hr = IDWriteTextLayout_SetFontStretch(layout, DWRITE_FONT_STRETCH_NORMAL, range); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
/* Underline */ range.startPosition = 10; range.length = ~0u; hr = IDWriteTextLayout_SetUnderline(layout, TRUE, range); - ok(hr == E_INVALIDARG, "Unexpected hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Unexpected hr %#lx.\n", hr);
range.startPosition = 10; range.length = ~0u - 9; hr = IDWriteTextLayout_SetUnderline(layout, TRUE, range); - ok(hr == E_INVALIDARG, "Unexpected hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Unexpected hr %#lx.\n", hr);
range.startPosition = 10; range.length = ~0u - 10; hr = IDWriteTextLayout_SetUnderline(layout, TRUE, range); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
range.startPosition = range.length = 0; hr = IDWriteTextLayout_GetUnderline(layout, 0, &value, &range); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); ok(range.startPosition == 0 && range.length == 10, "Unexpected range (%u, %u).\n", range.startPosition, range.length);
range.startPosition = range.length = 0; hr = IDWriteTextLayout_GetUnderline(layout, 10, &value, &range); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); ok(range.startPosition == 10 && range.length == ~0u - 10, "Unexpected range (%u, %u).\n", range.startPosition, range.length);
range.startPosition = 0; range.length = ~0u; hr = IDWriteTextLayout_SetUnderline(layout, FALSE, range); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
/* Strikethrough */ range.startPosition = 10; range.length = ~0u; hr = IDWriteTextLayout_SetStrikethrough(layout, TRUE, range); - ok(hr == E_INVALIDARG, "Unexpected hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Unexpected hr %#lx.\n", hr);
range.startPosition = 10; range.length = ~0u - 9; hr = IDWriteTextLayout_SetStrikethrough(layout, TRUE, range); - ok(hr == E_INVALIDARG, "Unexpected hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Unexpected hr %#lx.\n", hr);
range.startPosition = 10; range.length = ~0u - 10; hr = IDWriteTextLayout_SetStrikethrough(layout, TRUE, range); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
range.startPosition = range.length = 0; hr = IDWriteTextLayout_GetStrikethrough(layout, 0, &value, &range); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); ok(range.startPosition == 0 && range.length == 10, "Unexpected range (%u, %u).\n", range.startPosition, range.length);
range.startPosition = range.length = 0; hr = IDWriteTextLayout_GetStrikethrough(layout, 10, &value, &range); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); ok(range.startPosition == 10 && range.length == ~0u - 10, "Unexpected range (%u, %u).\n", range.startPosition, range.length);
range.startPosition = 0; range.length = ~0u; hr = IDWriteTextLayout_SetStrikethrough(layout, FALSE, range); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
/* Locale name */ range.startPosition = 10; range.length = ~0u; hr = IDWriteTextLayout_SetLocaleName(layout, L"locale", range); - ok(hr == E_INVALIDARG, "Unexpected hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Unexpected hr %#lx.\n", hr);
range.startPosition = 10; range.length = ~0u - 9; hr = IDWriteTextLayout_SetLocaleName(layout, L"locale", range); - ok(hr == E_INVALIDARG, "Unexpected hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Unexpected hr %#lx.\n", hr);
range.startPosition = 10; range.length = ~0u - 10; hr = IDWriteTextLayout_SetLocaleName(layout, L"locale", range); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
range.startPosition = 0; range.length = ~0u; hr = IDWriteTextLayout_SetLocaleName(layout, L"ru", range); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
/* Inline object */ hr = IDWriteFactory_CreateEllipsisTrimmingSign(factory, format, &sign); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
range.startPosition = 10; range.length = ~0u; hr = IDWriteTextLayout_SetInlineObject(layout, sign, range); - ok(hr == E_INVALIDARG, "Unexpected hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Unexpected hr %#lx.\n", hr);
range.startPosition = 10; range.length = ~0u - 9; hr = IDWriteTextLayout_SetInlineObject(layout, sign, range); - ok(hr == E_INVALIDARG, "Unexpected hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Unexpected hr %#lx.\n", hr);
range.startPosition = 10; range.length = ~0u - 10; hr = IDWriteTextLayout_SetInlineObject(layout, sign, range); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
range.startPosition = range.length = 0; object = NULL; hr = IDWriteTextLayout_GetInlineObject(layout, 10, &object, &range); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); ok(range.startPosition == 10 && range.length == ~0u - 10, "Unexpected range (%u, %u).\n", range.startPosition, range.length); IDWriteInlineObject_Release(object); @@ -6252,85 +6252,85 @@ static void test_layout_range_length(void) range.startPosition = 0; range.length = ~0u; hr = IDWriteTextLayout_SetInlineObject(layout, NULL, range); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
/* Drawing effect */ range.startPosition = 10; range.length = ~0u; hr = IDWriteTextLayout_SetDrawingEffect(layout, (IUnknown *)sign, range); - ok(hr == E_INVALIDARG, "Unexpected hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Unexpected hr %#lx.\n", hr);
range.startPosition = 10; range.length = ~0u - 9; hr = IDWriteTextLayout_SetDrawingEffect(layout, (IUnknown *)sign, range); - ok(hr == E_INVALIDARG, "Unexpected hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Unexpected hr %#lx.\n", hr);
range.startPosition = 10; range.length = ~0u - 10; hr = IDWriteTextLayout_SetDrawingEffect(layout, (IUnknown *)sign, range); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
range.startPosition = 0; range.length = ~0u; hr = IDWriteTextLayout_SetDrawingEffect(layout, NULL, range); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
IDWriteInlineObject_Release(sign);
/* Typography */ hr = IDWriteFactory_CreateTypography(factory, &typography); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
range.startPosition = 10; range.length = ~0u; hr = IDWriteTextLayout_SetTypography(layout, typography, range); - ok(hr == E_INVALIDARG, "Unexpected hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Unexpected hr %#lx.\n", hr);
range.startPosition = 10; range.length = ~0u - 9; hr = IDWriteTextLayout_SetTypography(layout, typography, range); - ok(hr == E_INVALIDARG, "Unexpected hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Unexpected hr %#lx.\n", hr);
range.startPosition = 10; range.length = ~0u - 10; hr = IDWriteTextLayout_SetTypography(layout, typography, range); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
range.startPosition = 0; range.length = ~0u; hr = IDWriteTextLayout_SetTypography(layout, NULL, range); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
IDWriteTypography_Release(typography);
/* Font collection */ hr = IDWriteFactory_GetSystemFontCollection(factory, &collection, FALSE); - ok(hr == S_OK, "Failed to get system collection, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get system collection, hr %#lx.\n", hr);
range.startPosition = 10; range.length = ~0u; hr = IDWriteTextLayout_SetFontCollection(layout, collection, range); - ok(hr == E_INVALIDARG, "Unexpected hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Unexpected hr %#lx.\n", hr);
range.startPosition = 10; range.length = ~0u - 9; hr = IDWriteTextLayout_SetFontCollection(layout, collection, range); - ok(hr == E_INVALIDARG, "Unexpected hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Unexpected hr %#lx.\n", hr);
range.startPosition = 10; range.length = ~0u - 10; hr = IDWriteTextLayout_SetFontCollection(layout, collection, range); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
range.startPosition = 0; range.length = ~0u; hr = IDWriteTextLayout_SetFontCollection(layout, NULL, range); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
range.startPosition = range.length = 0; collection2 = NULL; hr = IDWriteTextLayout_GetFontCollection(layout, 10, &collection2, &range); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); ok(range.length == ~0u, "Unexpected range length %u.\n", range.length); if (collection2) IDWriteFontCollection_Release(collection2); @@ -6343,27 +6343,27 @@ static void test_layout_range_length(void) range.startPosition = 10; range.length = ~0u; hr = IDWriteTextLayout1_SetPairKerning(layout1, TRUE, range); - ok(hr == E_INVALIDARG, "Unexpected hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Unexpected hr %#lx.\n", hr);
range.startPosition = 10; range.length = ~0u - 9; hr = IDWriteTextLayout1_SetPairKerning(layout1, TRUE, range); - ok(hr == E_INVALIDARG, "Unexpected hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Unexpected hr %#lx.\n", hr);
range.startPosition = 10; range.length = ~0u - 10; hr = IDWriteTextLayout1_SetPairKerning(layout1, TRUE, range); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
range.startPosition = range.length = 0; hr = IDWriteTextLayout1_GetPairKerning(layout1, 0, &value, &range); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); ok(range.startPosition == 0 && range.length == 10, "Unexpected range (%u, %u).\n", range.startPosition, range.length);
range.startPosition = range.length = 0; value = FALSE; hr = IDWriteTextLayout1_GetPairKerning(layout1, 10, &value, &range); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); ok(range.startPosition == 10 && range.length == ~0u - 10, "Unexpected range (%u, %u).\n", range.startPosition, range.length); ok(!!value, "Unexpected value %d.\n", value); @@ -6371,7 +6371,7 @@ static void test_layout_range_length(void) range.startPosition = 0; range.length = ~0u; hr = IDWriteTextLayout1_SetPairKerning(layout1, FALSE, range); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
IDWriteTextLayout1_Release(layout1); } @@ -6398,16 +6398,16 @@ static void test_HitTestTextRange(void)
hr = IDWriteFactory_CreateTextFormat(factory, L"Tahoma", NULL, DWRITE_FONT_WEIGHT_NORMAL, DWRITE_FONT_STYLE_NORMAL, DWRITE_FONT_STRETCH_NORMAL, 10.0f, L"ru", &format); - ok(hr == S_OK, "Failed to create text format, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create text format, hr %#lx.\n", hr);
hr = IDWriteFactory_CreateTextLayout(factory, L"string", 6, format, 100.0f, 100.0f, &layout); - ok(hr == S_OK, "Failed to create text layout, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create text layout, hr %#lx.\n", hr);
/* Start index exceeding layout text length, dummy range returned. */ count = 0; hr = IDWriteTextLayout_HitTestTextRange(layout, 7, 10, 0.0f, 0.0f, metrics, ARRAY_SIZE(metrics), &count); todo_wine - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); if (SUCCEEDED(hr)) { ok(count == 1, "Unexpected metrics count %u.\n", count); @@ -6419,7 +6419,7 @@ if (SUCCEEDED(hr)) count = 0; hr = IDWriteTextLayout_HitTestTextRange(layout, 0, 10, 0.0f, 0.0f, metrics, ARRAY_SIZE(metrics), &count); todo_wine - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); if (SUCCEEDED(hr)) { ok(count == 1, "Unexpected metrics count %u.\n", count); @@ -6431,12 +6431,12 @@ if (SUCCEEDED(hr)) range.startPosition = 3; range.length = 3; hr = IDWriteTextLayout_SetFontSize(layout, 20.0f, range); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
count = 0; hr = IDWriteTextLayout_HitTestTextRange(layout, 0, 6, 0.0f, 0.0f, metrics, ARRAY_SIZE(metrics), &count); todo_wine - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); if (SUCCEEDED(hr)) { ok(count == 1, "Unexpected metrics count %u.\n", count); @@ -6445,20 +6445,20 @@ if (SUCCEEDED(hr)) ok(!!metrics[0].isText, "Expected text range.\n");
hr = IDWriteTextLayout_GetLineMetrics(layout, &line, 1, &count); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); ok(line.height == metrics[0].height, "Unexpected range height.\n"); } /* With inline object. */ hr = IDWriteFactory_CreateEllipsisTrimmingSign(factory, format, &inlineobj); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IDWriteTextLayout_SetInlineObject(layout, inlineobj, range); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
count = 0; hr = IDWriteTextLayout_HitTestTextRange(layout, 0, 6, 0.0f, 0.0f, metrics, ARRAY_SIZE(metrics), &count); todo_wine - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); if (SUCCEEDED(hr)) { ok(count == 2, "Unexpected metrics count %u.\n", count); @@ -6472,7 +6472,7 @@ if (SUCCEEDED(hr)) count = 0; hr = IDWriteTextLayout_HitTestTextRange(layout, 7, 10, 0.0f, 0.0f, metrics, ARRAY_SIZE(metrics), &count); todo_wine - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); if (SUCCEEDED(hr)) { ok(count == 1, "Unexpected metrics count %u.\n", count);
Signed-off-by: Eric Pouech eric.pouech@gmail.com
--- dlls/dxdiagn/tests/Makefile.in | 1 dlls/dxdiagn/tests/container.c | 174 ++++++++++++++++++++-------------------- dlls/dxdiagn/tests/provider.c | 30 +++---- 3 files changed, 102 insertions(+), 103 deletions(-)
diff --git a/dlls/dxdiagn/tests/Makefile.in b/dlls/dxdiagn/tests/Makefile.in index 1deee3a846c..04437c5e7bd 100644 --- a/dlls/dxdiagn/tests/Makefile.in +++ b/dlls/dxdiagn/tests/Makefile.in @@ -1,4 +1,3 @@ -EXTRADEFS = -DWINE_NO_LONG_TYPES TESTDLL = dxdiagn.dll IMPORTS = oleaut32 ole32
diff --git a/dlls/dxdiagn/tests/container.c b/dlls/dxdiagn/tests/container.c index a43324b3e8f..31047337148 100644 --- a/dlls/dxdiagn/tests/container.c +++ b/dlls/dxdiagn/tests/container.c @@ -72,11 +72,11 @@ static void test_GetNumberOfChildContainers(void)
hr = IDxDiagContainer_GetNumberOfChildContainers(pddc, NULL); ok(hr == E_INVALIDARG, - "Expected IDxDiagContainer::GetNumberOfChildContainers to return E_INVALIDARG, got 0x%08x\n", hr); + "Expected IDxDiagContainer::GetNumberOfChildContainers to return E_INVALIDARG, got 0x%08lx\n", hr);
hr = IDxDiagContainer_GetNumberOfChildContainers(pddc, &count); ok(hr == S_OK, - "Expected IDxDiagContainer::GetNumberOfChildContainers to return S_OK, got 0x%08x\n", hr); + "Expected IDxDiagContainer::GetNumberOfChildContainers to return S_OK, got 0x%08lx\n", hr); if (hr == S_OK) ok(count != 0, "Expected the number of child containers for the root container to be non-zero\n");
@@ -96,10 +96,10 @@ static void test_GetNumberOfProps(void) }
hr = IDxDiagContainer_GetNumberOfProps(pddc, NULL); - ok(hr == E_INVALIDARG, "Expected IDxDiagContainer::GetNumberOfProps to return E_INVALIDARG, got 0x%08x\n", hr); + ok(hr == E_INVALIDARG, "Expected IDxDiagContainer::GetNumberOfProps to return E_INVALIDARG, got 0x%08lx\n", hr);
hr = IDxDiagContainer_GetNumberOfProps(pddc, &count); - ok(hr == S_OK, "Expected IDxDiagContainer::GetNumberOfProps to return S_OK, got 0x%08x\n", hr); + ok(hr == S_OK, "Expected IDxDiagContainer::GetNumberOfProps to return S_OK, got 0x%08lx\n", hr); if (hr == S_OK) ok(count == 0, "Expected the number of properties for the root container to be zero\n");
@@ -123,36 +123,36 @@ static void test_EnumChildContainerNames(void) /* Test various combinations of invalid parameters. */ hr = IDxDiagContainer_EnumChildContainerNames(pddc, 0, NULL, 0); ok(hr == E_INVALIDARG, - "Expected IDxDiagContainer::EnumChildContainerNames to return E_INVALIDARG, got 0x%08x\n", hr); + "Expected IDxDiagContainer::EnumChildContainerNames to return E_INVALIDARG, got 0x%08lx\n", hr);
hr = IDxDiagContainer_EnumChildContainerNames(pddc, 0, NULL, ARRAY_SIZE(container)); ok(hr == E_INVALIDARG, - "Expected IDxDiagContainer::EnumChildContainerNames to return E_INVALIDARG, got 0x%08x\n", hr); + "Expected IDxDiagContainer::EnumChildContainerNames to return E_INVALIDARG, got 0x%08lx\n", hr);
/* Test the conditions in which the output buffer can be modified. */ memcpy(container, testW, sizeof(testW)); hr = IDxDiagContainer_EnumChildContainerNames(pddc, 0, container, 0); ok(hr == E_INVALIDARG, - "Expected IDxDiagContainer::EnumChildContainerNames to return E_INVALIDARG, got 0x%08x\n", hr); + "Expected IDxDiagContainer::EnumChildContainerNames to return E_INVALIDARG, got 0x%08lx\n", hr); ok(!memcmp(container, testW, sizeof(testW)), "Expected the container buffer to be untouched, got %s\n", wine_dbgstr_w(container));
memcpy(container, testW, sizeof(testW)); hr = IDxDiagContainer_EnumChildContainerNames(pddc, ~0, container, 0); ok(hr == E_INVALIDARG, - "Expected IDxDiagContainer::EnumChildContainerNames to return E_INVALIDARG, got 0x%08x\n", hr); + "Expected IDxDiagContainer::EnumChildContainerNames to return E_INVALIDARG, got 0x%08lx\n", hr); ok(!memcmp(container, testW, sizeof(testW)), "Expected the container buffer to be untouched, got %s\n", wine_dbgstr_w(container));
memcpy(container, testW, sizeof(testW)); hr = IDxDiagContainer_EnumChildContainerNames(pddc, ~0, container, ARRAY_SIZE(container)); ok(hr == E_INVALIDARG, - "Expected IDxDiagContainer::EnumChildContainerNames to return E_INVALIDARG, got 0x%08x\n", hr); + "Expected IDxDiagContainer::EnumChildContainerNames to return E_INVALIDARG, got 0x%08lx\n", hr); ok(!memcmp(container, L"\0est", sizeof(L"\0est")), "Expected the container buffer string to be empty, got %s\n", wine_dbgstr_w(container));
hr = IDxDiagContainer_GetNumberOfChildContainers(pddc, &maxcount); - ok(hr == S_OK, "Expected IDxDiagContainer::GetNumberOfChildContainers to return S_OK, got 0x%08x\n", hr); + ok(hr == S_OK, "Expected IDxDiagContainer::GetNumberOfChildContainers to return S_OK, got 0x%08lx\n", hr); if (FAILED(hr)) { skip("IDxDiagContainer::GetNumberOfChildContainers failed\n"); @@ -175,7 +175,7 @@ static void test_EnumChildContainerNames(void) /* We should get here when index is one more than the maximum index value. */ ok(maxcount == index, "Expected IDxDiagContainer::EnumChildContainerNames to return E_INVALIDARG " - "on the last index %d, got 0x%08x\n", index, hr); + "on the last index %ld, got 0x%08lx\n", index, hr); ok(container[0] == '\0', "Expected the container buffer string to be empty, got %s\n", wine_dbgstr_w(container)); break; @@ -190,7 +190,7 @@ static void test_EnumChildContainerNames(void) /* Get the container name to compare against. */ hr = IDxDiagContainer_EnumChildContainerNames(pddc, index, temp, ARRAY_SIZE(temp)); ok(hr == S_OK, - "Expected IDxDiagContainer::EnumChildContainerNames to return S_OK, got 0x%08x\n", hr); + "Expected IDxDiagContainer::EnumChildContainerNames to return S_OK, got 0x%08lx\n", hr);
/* Show that the DirectX SDK's stipulation that the buffer be at * least 256 characters long is a mere suggestion, and smaller sizes @@ -210,13 +210,13 @@ static void test_EnumChildContainerNames(void)
ok(hr == S_OK, "Expected IDxDiagContainer::EnumChildContainerNames to return S_OK, " - "got hr = 0x%08x, buffersize = %d\n", hr, buffersize); + "got hr = 0x%08lx, buffersize = %ld\n", hr, buffersize); if (hr == S_OK) - trace("pddc[%d] = %s, length = %d\n", index, wine_dbgstr_w(container), buffersize); + trace("pddc[%ld] = %s, length = %ld\n", index, wine_dbgstr_w(container), buffersize); } else { - ok(0, "IDxDiagContainer::EnumChildContainerNames unexpectedly returned 0x%08x\n", hr); + ok(0, "IDxDiagContainer::EnumChildContainerNames unexpectedly returned 0x%08lx\n", hr); break; } } @@ -241,28 +241,28 @@ static void test_GetChildContainer(void) /* Test various combinations of invalid parameters. */ hr = IDxDiagContainer_GetChildContainer(pddc, NULL, NULL); ok(hr == E_INVALIDARG, - "Expected IDxDiagContainer::GetChildContainer to return E_INVALIDARG, got 0x%08x\n", hr); + "Expected IDxDiagContainer::GetChildContainer to return E_INVALIDARG, got 0x%08lx\n", hr);
child = (void*)0xdeadbeef; hr = IDxDiagContainer_GetChildContainer(pddc, NULL, &child); ok(hr == E_INVALIDARG, - "Expected IDxDiagContainer::GetChildContainer to return E_INVALIDARG, got 0x%08x\n", hr); + "Expected IDxDiagContainer::GetChildContainer to return E_INVALIDARG, got 0x%08lx\n", hr); ok(child == (void*)0xdeadbeef, "Expected output pointer to be unchanged, got %p\n", child);
hr = IDxDiagContainer_GetChildContainer(pddc, container, NULL); ok(hr == E_INVALIDARG, - "Expected IDxDiagContainer::GetChildContainer to return E_INVALIDARG, got 0x%08x\n", hr); + "Expected IDxDiagContainer::GetChildContainer to return E_INVALIDARG, got 0x%08lx\n", hr);
child = (void*)0xdeadbeef; hr = IDxDiagContainer_GetChildContainer(pddc, container, &child); ok(hr == E_INVALIDARG, - "Expected IDxDiagContainer::GetChildContainer to return E_INVALIDARG, got 0x%08x\n", hr); + "Expected IDxDiagContainer::GetChildContainer to return E_INVALIDARG, got 0x%08lx\n", hr); ok(child == NULL, "Expected output pointer to be NULL, got %p\n", child);
/* Get the name of a suitable child container. */ hr = IDxDiagContainer_EnumChildContainerNames(pddc, 0, container, ARRAY_SIZE(container)); ok(hr == S_OK, - "Expected IDxDiagContainer::EnumChildContainerNames to return S_OK, got 0x%08x\n", hr); + "Expected IDxDiagContainer::EnumChildContainerNames to return S_OK, got 0x%08lx\n", hr); if (FAILED(hr)) { skip("IDxDiagContainer::EnumChildContainerNames failed\n"); @@ -272,7 +272,7 @@ static void test_GetChildContainer(void) child = (void*)0xdeadbeef; hr = IDxDiagContainer_GetChildContainer(pddc, container, &child); ok(hr == S_OK, - "Expected IDxDiagContainer::GetChildContainer to return S_OK, got 0x%08x\n", hr); + "Expected IDxDiagContainer::GetChildContainer to return S_OK, got 0x%08lx\n", hr); ok(child != NULL && child != (void*)0xdeadbeef, "Expected a valid output pointer, got %p\n", child);
if (SUCCEEDED(hr)) @@ -283,7 +283,7 @@ static void test_GetChildContainer(void) * for multiple calls for the same container name. */ hr = IDxDiagContainer_GetChildContainer(pddc, container, &ptr); ok(hr == S_OK, - "Expected IDxDiagContainer::GetChildContainer to return S_OK, got 0x%08x\n", hr); + "Expected IDxDiagContainer::GetChildContainer to return S_OK, got 0x%08lx\n", hr); if (SUCCEEDED(hr)) ok(ptr != child, "Expected the two pointers (%p vs. %p) to be unequal\n", child, ptr);
@@ -323,7 +323,7 @@ static void test_dot_parsing(void)
/* Find a container with a child container of its own. */ hr = IDxDiagContainer_GetNumberOfChildContainers(pddc, &count); - ok(hr == S_OK, "Expected IDxDiagContainer::GetNumberOfChildContainers to return S_OK, got 0x%08x\n", hr); + ok(hr == S_OK, "Expected IDxDiagContainer::GetNumberOfChildContainers to return S_OK, got 0x%08lx\n", hr); if (FAILED(hr)) { skip("IDxDiagContainer::GetNumberOfChildContainers failed\n"); @@ -335,7 +335,7 @@ static void test_dot_parsing(void) IDxDiagContainer *child;
hr = IDxDiagContainer_EnumChildContainerNames(pddc, index, containerbufW, ARRAY_SIZE(containerbufW)); - ok(hr == S_OK, "Expected IDxDiagContainer_EnumChildContainerNames to return S_OK, got 0x%08x\n", hr); + ok(hr == S_OK, "Expected IDxDiagContainer_EnumChildContainerNames to return S_OK, got 0x%08lx\n", hr); if (FAILED(hr)) { skip("IDxDiagContainer::EnumChildContainerNames failed\n"); @@ -343,13 +343,13 @@ static void test_dot_parsing(void) }
hr = IDxDiagContainer_GetChildContainer(pddc, containerbufW, &child); - ok(hr == S_OK, "Expected IDxDiagContainer::GetChildContainer to return S_OK, got 0x%08x\n", hr); + ok(hr == S_OK, "Expected IDxDiagContainer::GetChildContainer to return S_OK, got 0x%08lx\n", hr);
if (SUCCEEDED(hr)) { hr = IDxDiagContainer_EnumChildContainerNames(child, 0, childbufW, ARRAY_SIZE(childbufW)); ok(hr == S_OK || hr == E_INVALIDARG, - "Expected IDxDiagContainer::EnumChildContainerNames to return S_OK or E_INVALIDARG, got 0x%08x\n", hr); + "Expected IDxDiagContainer::EnumChildContainerNames to return S_OK or E_INVALIDARG, got 0x%08lx\n", hr); IDxDiagContainer_Release(child);
if (SUCCEEDED(hr)) @@ -382,7 +382,7 @@ static void test_dot_parsing(void) trace("Trying container name %s\n", wine_dbgstr_w(dotbufferW)); hr = IDxDiagContainer_GetChildContainer(pddc, dotbufferW, &child); ok(hr == test_strings[i].expect, - "Expected IDxDiagContainer::GetChildContainer to return 0x%08x for %s, got 0x%08x\n", + "Expected IDxDiagContainer::GetChildContainer to return 0x%08lx for %s, got 0x%08lx\n", test_strings[i].expect, wine_dbgstr_w(dotbufferW), hr); if (SUCCEEDED(hr)) IDxDiagContainer_Release(child); @@ -409,7 +409,7 @@ static void test_EnumPropNames(void)
/* Find a container with a non-zero number of properties. */ hr = IDxDiagContainer_GetNumberOfChildContainers(pddc, &count); - ok(hr == S_OK, "Expected IDxDiagContainer::GetNumberOfChildContainers to return S_OK, got 0x%08x\n", hr); + ok(hr == S_OK, "Expected IDxDiagContainer::GetNumberOfChildContainers to return S_OK, got 0x%08lx\n", hr); if (FAILED(hr)) { skip("IDxDiagContainer::GetNumberOfChildContainers failed\n"); @@ -419,7 +419,7 @@ static void test_EnumPropNames(void) for (index = 0; index < count; index++) { hr = IDxDiagContainer_EnumChildContainerNames(pddc, index, container, ARRAY_SIZE(container)); - ok(hr == S_OK, "Expected IDxDiagContainer_EnumChildContainerNames to return S_OK, got 0x%08x\n", hr); + ok(hr == S_OK, "Expected IDxDiagContainer_EnumChildContainerNames to return S_OK, got 0x%08lx\n", hr); if (FAILED(hr)) { skip("IDxDiagContainer::EnumChildContainerNames failed\n"); @@ -427,12 +427,12 @@ static void test_EnumPropNames(void) }
hr = IDxDiagContainer_GetChildContainer(pddc, container, &child); - ok(hr == S_OK, "Expected IDxDiagContainer::GetChildContainer to return S_OK, got 0x%08x\n", hr); + ok(hr == S_OK, "Expected IDxDiagContainer::GetChildContainer to return S_OK, got 0x%08lx\n", hr);
if (SUCCEEDED(hr)) { hr = IDxDiagContainer_GetNumberOfProps(child, &propcount); - ok(hr == S_OK, "Expected IDxDiagContainer::GetNumberOfProps to return S_OK, got 0x%08x\n", hr); + ok(hr == S_OK, "Expected IDxDiagContainer::GetNumberOfProps to return S_OK, got 0x%08lx\n", hr);
if (!propcount) { @@ -451,17 +451,17 @@ static void test_EnumPropNames(void) }
hr = IDxDiagContainer_EnumPropNames(child, ~0, NULL, 0); - ok(hr == E_INVALIDARG, "Expected IDxDiagContainer::EnumPropNames to return E_INVALIDARG, got 0x%08x\n", hr); + ok(hr == E_INVALIDARG, "Expected IDxDiagContainer::EnumPropNames to return E_INVALIDARG, got 0x%08lx\n", hr);
memcpy(property, testW, sizeof(testW)); hr = IDxDiagContainer_EnumPropNames(child, ~0, property, 0); - ok(hr == E_INVALIDARG, "Expected IDxDiagContainer::EnumPropNames to return E_INVALIDARG, got 0x%08x\n", hr); + ok(hr == E_INVALIDARG, "Expected IDxDiagContainer::EnumPropNames to return E_INVALIDARG, got 0x%08lx\n", hr); ok(!memcmp(property, testW, sizeof(testW)), "Expected the property buffer to be unchanged, got %s\n", wine_dbgstr_w(property));
memcpy(property, testW, sizeof(testW)); hr = IDxDiagContainer_EnumPropNames(child, ~0, property, ARRAY_SIZE(property)); - ok(hr == E_INVALIDARG, "Expected IDxDiagContainer::EnumPropNames to return E_INVALIDARG, got 0x%08x\n", hr); + ok(hr == E_INVALIDARG, "Expected IDxDiagContainer::EnumPropNames to return E_INVALIDARG, got 0x%08lx\n", hr); ok(!memcmp(property, testW, sizeof(testW)), "Expected the property buffer to be unchanged, got %s\n", wine_dbgstr_w(property));
@@ -482,7 +482,7 @@ static void test_EnumPropNames(void) /* We should get here when index is one more than the maximum index value. */ ok(propcount == index, "Expected IDxDiagContainer::EnumPropNames to return E_INVALIDARG " - "on the last index %d, got 0x%08x\n", index, hr); + "on the last index %ld, got 0x%08lx\n", index, hr); ok(!memcmp(property, testW, sizeof(testW)), "Expected the property buffer to be unchanged, got %s\n", wine_dbgstr_w(property)); break; @@ -495,7 +495,7 @@ static void test_EnumPropNames(void) "Expected the property buffer string to be empty, got %s\n", wine_dbgstr_w(property)); hr = IDxDiagContainer_EnumPropNames(child, index, temp, ARRAY_SIZE(temp)); ok(hr == S_OK, - "Expected IDxDiagContainer::EnumPropNames to return S_OK, got 0x%08x\n", hr); + "Expected IDxDiagContainer::EnumPropNames to return S_OK, got 0x%08lx\n", hr);
/* Show that the DirectX SDK's stipulation that the buffer be at * least 256 characters long is a mere suggestion, and smaller sizes @@ -515,13 +515,13 @@ static void test_EnumPropNames(void)
ok(hr == S_OK, "Expected IDxDiagContainer::EnumPropNames to return S_OK, " - "got hr = 0x%08x, buffersize = %d\n", hr, buffersize); + "got hr = 0x%08lx, buffersize = %ld\n", hr, buffersize); if (hr == S_OK) - trace("child[%d] = %s, length = %d\n", index, wine_dbgstr_w(property), buffersize); + trace("child[%ld] = %s, length = %ld\n", index, wine_dbgstr_w(property), buffersize); } else { - ok(0, "IDxDiagContainer::EnumPropNames unexpectedly returned 0x%08x\n", hr); + ok(0, "IDxDiagContainer::EnumPropNames unexpectedly returned 0x%08lx\n", hr); break; } } @@ -553,7 +553,7 @@ static void test_GetProp(void)
/* Find a container with a property. */ hr = IDxDiagContainer_GetNumberOfChildContainers(pddc, &count); - ok(hr == S_OK, "Expected IDxDiagContainer::GetNumberOfChildContainers to return S_OK, got 0x%08x\n", hr); + ok(hr == S_OK, "Expected IDxDiagContainer::GetNumberOfChildContainers to return S_OK, got 0x%08lx\n", hr); if (FAILED(hr)) { skip("IDxDiagContainer::GetNumberOfChildContainers failed\n"); @@ -563,7 +563,7 @@ static void test_GetProp(void) for (index = 0; index < count; index++) { hr = IDxDiagContainer_EnumChildContainerNames(pddc, index, container, ARRAY_SIZE(container)); - ok(hr == S_OK, "Expected IDxDiagContainer_EnumChildContainerNames to return S_OK, got 0x%08x\n", hr); + ok(hr == S_OK, "Expected IDxDiagContainer_EnumChildContainerNames to return S_OK, got 0x%08lx\n", hr); if (FAILED(hr)) { skip("IDxDiagContainer::EnumChildContainerNames failed\n"); @@ -571,13 +571,13 @@ static void test_GetProp(void) }
hr = IDxDiagContainer_GetChildContainer(pddc, container, &child); - ok(hr == S_OK, "Expected IDxDiagContainer::GetChildContainer to return S_OK, got 0x%08x\n", hr); + ok(hr == S_OK, "Expected IDxDiagContainer::GetChildContainer to return S_OK, got 0x%08lx\n", hr);
if (SUCCEEDED(hr)) { hr = IDxDiagContainer_EnumPropNames(child, 0, property, ARRAY_SIZE(property)); ok(hr == S_OK || hr == E_INVALIDARG, - "Expected IDxDiagContainer::EnumPropNames to return S_OK or E_INVALIDARG, got 0x%08x\n", hr); + "Expected IDxDiagContainer::EnumPropNames to return S_OK or E_INVALIDARG, got 0x%08lx\n", hr);
if (SUCCEEDED(hr)) break; @@ -596,32 +596,32 @@ static void test_GetProp(void) }
hr = IDxDiagContainer_GetProp(child, NULL, NULL); - ok(hr == E_INVALIDARG, "Expected IDxDiagContainer::GetProp to return E_INVALIDARG, got 0x%08x\n", hr); + ok(hr == E_INVALIDARG, "Expected IDxDiagContainer::GetProp to return E_INVALIDARG, got 0x%08lx\n", hr);
V_VT(&var) = 0xdead; hr = IDxDiagContainer_GetProp(child, NULL, &var); - ok(hr == E_INVALIDARG, "Expected IDxDiagContainer::GetProp to return E_INVALIDARG, got 0x%08x\n", hr); + ok(hr == E_INVALIDARG, "Expected IDxDiagContainer::GetProp to return E_INVALIDARG, got 0x%08lx\n", hr); ok(V_VT(&var) == 0xdead, "Expected the variant to be untouched, got %u\n", V_VT(&var));
hr = IDxDiagContainer_GetProp(child, L"", NULL); - ok(hr == E_INVALIDARG, "Expected IDxDiagContainer::GetProp to return E_INVALIDARG, got 0x%08x\n", hr); + ok(hr == E_INVALIDARG, "Expected IDxDiagContainer::GetProp to return E_INVALIDARG, got 0x%08lx\n", hr);
V_VT(&var) = 0xdead; hr = IDxDiagContainer_GetProp(child, L"", &var); - ok(hr == E_INVALIDARG, "Expected IDxDiagContainer::GetProp to return E_INVALIDARG, got 0x%08x\n", hr); + ok(hr == E_INVALIDARG, "Expected IDxDiagContainer::GetProp to return E_INVALIDARG, got 0x%08lx\n", hr); ok(V_VT(&var) == 0xdead, "Expected the variant to be untouched, got %u\n", V_VT(&var));
hr = IDxDiagContainer_GetProp(child, testW, NULL); - ok(hr == E_INVALIDARG, "Expected IDxDiagContainer::GetProp to return E_INVALIDARG, got 0x%08x\n", hr); + ok(hr == E_INVALIDARG, "Expected IDxDiagContainer::GetProp to return E_INVALIDARG, got 0x%08lx\n", hr);
V_VT(&var) = 0xdead; hr = IDxDiagContainer_GetProp(child, testW, &var); - ok(hr == E_INVALIDARG, "Expected IDxDiagContainer::GetProp to return E_INVALIDARG, got 0x%08x\n", hr); + ok(hr == E_INVALIDARG, "Expected IDxDiagContainer::GetProp to return E_INVALIDARG, got 0x%08lx\n", hr); ok(V_VT(&var) == 0xdead, "Expected the variant to be untouched, got %u\n", V_VT(&var));
VariantInit(&var); hr = IDxDiagContainer_GetProp(child, property, &var); - ok(hr == S_OK, "Expected IDxDiagContainer::GetProp to return S_OK, got 0x%08x\n", hr); + ok(hr == S_OK, "Expected IDxDiagContainer::GetProp to return S_OK, got 0x%08lx\n", hr); ok(V_VT(&var) != VT_EMPTY, "Expected the variant to be modified, got %d\n", V_VT(&var));
/* Since the documentation for IDxDiagContainer::GetProp claims that the @@ -631,7 +631,7 @@ static void test_GetProp(void) /* Try an invalid variant type. */ V_VT(&var) = 0xdead; hr = IDxDiagContainer_GetProp(child, property, &var); - ok(hr == S_OK, "Expected IDxDiagContainer::GetProp to return S_OK, got 0x%08x\n", hr); + ok(hr == S_OK, "Expected IDxDiagContainer::GetProp to return S_OK, got 0x%08lx\n", hr); ok(V_VT(&var) != 0xdead, "Expected the variant to be modified, got %d\n", V_VT(&var));
/* Try passing a variant with a locked SAFEARRAY. */ @@ -644,16 +644,16 @@ static void test_GetProp(void) V_ARRAY(&var) = sa;
hr = SafeArrayLock(sa); - ok(hr == S_OK, "Expected SafeArrayLock to return S_OK, got 0x%08x\n", hr); + ok(hr == S_OK, "Expected SafeArrayLock to return S_OK, got 0x%08lx\n", hr);
hr = IDxDiagContainer_GetProp(child, property, &var); - ok(hr == S_OK, "Expected IDxDiagContainer::GetProp to return S_OK, got 0x%08x\n", hr); + ok(hr == S_OK, "Expected IDxDiagContainer::GetProp to return S_OK, got 0x%08lx\n", hr); ok(V_VT(&var) != (VT_ARRAY | VT_UI1), "Expected the variant to be modified\n");
hr = SafeArrayUnlock(sa); - ok(hr == S_OK, "Expected SafeArrayUnlock to return S_OK, got 0x%08x\n", hr); + ok(hr == S_OK, "Expected SafeArrayUnlock to return S_OK, got 0x%08lx\n", hr); hr = SafeArrayDestroy(sa); - ok(hr == S_OK, "Expected SafeArrayDestroy to return S_OK, got 0x%08x\n", hr); + ok(hr == S_OK, "Expected SafeArrayDestroy to return S_OK, got 0x%08lx\n", hr);
/* Determine whether GetProp calls VariantClear on the passed variant. */ V_VT(&var) = VT_UNKNOWN; @@ -661,12 +661,12 @@ static void test_GetProp(void) IDxDiagContainer_AddRef(child);
hr = IDxDiagContainer_GetProp(child, property, &var); - ok(hr == S_OK, "Expected IDxDiagContainer::GetProp to return S_OK, got 0x%08x\n", hr); + ok(hr == S_OK, "Expected IDxDiagContainer::GetProp to return S_OK, got 0x%08lx\n", hr); ok(V_VT(&var) != VT_UNKNOWN, "Expected the variant to be modified\n");
IDxDiagContainer_AddRef(child); ref = IDxDiagContainer_Release(child); - ok(ref == 2, "Expected reference count to be 2, got %u\n", ref); + ok(ref == 2, "Expected reference count to be 2, got %lu\n", ref); IDxDiagContainer_Release(child);
IDxDiagContainer_Release(child); @@ -695,7 +695,7 @@ static void test_root_children(void)
/* Verify the identity and ordering of the root container's children. */ hr = IDxDiagContainer_GetNumberOfChildContainers(pddc, &count); - ok(hr == S_OK, "Expected IDxDiagContainer::GetNumberOfChildContainers to return S_OK, got 0x%08x\n", hr); + ok(hr == S_OK, "Expected IDxDiagContainer::GetNumberOfChildContainers to return S_OK, got 0x%08lx\n", hr); if (FAILED(hr)) { skip("IDxDiagContainer::GetNumberOfChildContainers failed\n"); @@ -703,7 +703,7 @@ static void test_root_children(void) }
ok(count == ARRAY_SIZE(root_children), - "Got unexpected count %u for the number of child containers\n", count); + "Got unexpected count %lu for the number of child containers\n", count);
if (count != ARRAY_SIZE(root_children)) { @@ -720,18 +720,18 @@ static void test_root_children(void) { ok(index == count, "Expected IDxDiagContainer::EnumChildContainerNames to return " - "E_INVALIDARG on the last index %u\n", count); + "E_INVALIDARG on the last index %lu\n", count); break; } else if (hr == S_OK) { ok(!lstrcmpW(container, root_children[index]), - "Expected container %s for index %u, got %s\n", + "Expected container %s for index %lu, got %s\n", wine_dbgstr_w(root_children[index]), index, wine_dbgstr_w(container)); } else { - ok(0, "IDxDiagContainer::EnumChildContainerNames unexpectedly returned 0x%08x\n", hr); + ok(0, "IDxDiagContainer::EnumChildContainerNames unexpectedly returned 0x%08lx\n", hr); break; } } @@ -751,9 +751,9 @@ static void test_container_properties(IDxDiagContainer *container, const struct DWORD prop_count;
hr = IDxDiagContainer_GetNumberOfProps(container, &prop_count); - ok(hr == S_OK, "Expected IDxDiagContainer::GetNumberOfProps to return S_OK, got 0x%08x\n", hr); + ok(hr == S_OK, "Expected IDxDiagContainer::GetNumberOfProps to return S_OK, got 0x%08lx\n", hr); if (hr == S_OK) - ok(prop_count == 0, "Expected container property count to be zero, got %u\n", prop_count); + ok(prop_count == 0, "Expected container property count to be zero, got %lu\n", prop_count); } else { @@ -766,7 +766,7 @@ static void test_container_properties(IDxDiagContainer *container, const struct for (i = 0; i < len; i++) { hr = IDxDiagContainer_GetProp(container, property_tests[i].prop, &var); - ok(hr == S_OK, "[%d] Expected IDxDiagContainer::GetProp to return S_OK for %s, got 0x%08x\n", + ok(hr == S_OK, "[%d] Expected IDxDiagContainer::GetProp to return S_OK for %s, got 0x%08lx\n", i, wine_dbgstr_w(property_tests[i].prop), hr);
if (hr == S_OK) @@ -829,10 +829,10 @@ static void test_DxDiag_SystemInfo(void) }
hr = IDxDiagContainer_GetChildContainer(pddc, L"", &container2); - ok(hr == E_INVALIDARG, "Expected IDxDiagContainer::GetChildContainer to return E_INVALIDARG, got 0x%08x\n", hr); + ok(hr == E_INVALIDARG, "Expected IDxDiagContainer::GetChildContainer to return E_INVALIDARG, got 0x%08lx\n", hr);
hr = IDxDiagContainer_GetChildContainer(pddc, L"DxDiag_SystemInfo", &container); - ok(hr == S_OK, "Expected IDxDiagContainer::GetChildContainer to return S_OK, got 0x%08x\n", hr); + ok(hr == S_OK, "Expected IDxDiagContainer::GetChildContainer to return S_OK, got 0x%08lx\n", hr);
if (hr == S_OK) { @@ -841,7 +841,7 @@ static void test_DxDiag_SystemInfo(void)
container2 = NULL; hr = IDxDiagContainer_GetChildContainer(container, L"", &container2); - ok(hr == S_OK, "Expected IDxDiagContainer::GetChildContainer to return S_OK, got 0x%08x\n", hr); + ok(hr == S_OK, "Expected IDxDiagContainer::GetChildContainer to return S_OK, got 0x%08lx\n", hr); ok(container2 != NULL, "Expected container2 != NULL\n"); ok(container2 != container, "Expected container != container2\n");
@@ -892,18 +892,18 @@ static void test_DxDiag_DisplayDevices(void) }
hr = IDxDiagContainer_GetChildContainer(pddc, L"DxDiag_DisplayDevices", &display_cont); - ok(hr == S_OK, "Expected IDxDiagContainer::GetChildContainer to return S_OK, got 0x%08x\n", hr); + ok(hr == S_OK, "Expected IDxDiagContainer::GetChildContainer to return S_OK, got 0x%08lx\n", hr);
if (hr != S_OK) goto cleanup;
hr = IDxDiagContainer_GetNumberOfProps(display_cont, &count); - ok(hr == S_OK, "Expected IDxDiagContainer::GetNumberOfProps to return S_OK, got 0x%08x\n", hr); + ok(hr == S_OK, "Expected IDxDiagContainer::GetNumberOfProps to return S_OK, got 0x%08lx\n", hr); if (hr == S_OK) - ok(count == 0, "Expected count to be 0, got %u\n", count); + ok(count == 0, "Expected count to be 0, got %lu\n", count);
hr = IDxDiagContainer_GetNumberOfChildContainers(display_cont, &count); - ok(hr == S_OK, "Expected IDxDiagContainer::GetNumberOfChildContainers to return S_OK, got 0x%08x\n", hr); + ok(hr == S_OK, "Expected IDxDiagContainer::GetNumberOfChildContainers to return S_OK, got 0x%08lx\n", hr);
if (hr != S_OK) goto cleanup; @@ -914,10 +914,10 @@ static void test_DxDiag_DisplayDevices(void) IDxDiagContainer *child;
hr = IDxDiagContainer_EnumChildContainerNames(display_cont, i, child_container, ARRAY_SIZE(child_container)); - ok(hr == S_OK, "Expected IDxDiagContainer::EnumChildContainerNames to return S_OK, got 0x%08x\n", hr); + ok(hr == S_OK, "Expected IDxDiagContainer::EnumChildContainerNames to return S_OK, got 0x%08lx\n", hr);
hr = IDxDiagContainer_GetChildContainer(display_cont, child_container, &child); - ok(hr == S_OK, "Expected IDxDiagContainer::GetChildContainer to return S_OK, got 0x%08x\n", hr); + ok(hr == S_OK, "Expected IDxDiagContainer::GetChildContainer to return S_OK, got 0x%08lx\n", hr);
if (hr == S_OK) { @@ -954,14 +954,14 @@ static void test_DxDiag_SoundDevices(void) }
hr = IDxDiagContainer_GetChildContainer(pddc, L"DxDiag_DirectSound.DxDiag_SoundDevices", &sound_cont); - ok(hr == S_OK, "Expected IDxDiagContainer::GetChildContainer to return S_OK, got 0x%08x\n", hr); + ok(hr == S_OK, "Expected IDxDiagContainer::GetChildContainer to return S_OK, got 0x%08lx\n", hr);
hr = IDxDiagContainer_GetNumberOfProps(sound_cont, &count); - ok(hr == S_OK, "Expected IDxDiagContainer::GetNumberOfProps to return S_OK, got 0x%08x\n", hr); - ok(count == 0, "Expected count to be 0, got %u\n", count); + ok(hr == S_OK, "Expected IDxDiagContainer::GetNumberOfProps to return S_OK, got 0x%08lx\n", hr); + ok(count == 0, "Expected count to be 0, got %lu\n", count);
hr = IDxDiagContainer_GetNumberOfChildContainers(sound_cont, &count); - ok(hr == S_OK, "Expected IDxDiagContainer::GetNumberOfChildContainers to return S_OK, got 0x%08x\n", hr); + ok(hr == S_OK, "Expected IDxDiagContainer::GetNumberOfChildContainers to return S_OK, got 0x%08lx\n", hr);
for (i = 0; i < count; i++) { @@ -969,17 +969,17 @@ static void test_DxDiag_SoundDevices(void) WCHAR child_container[256];
hr = IDxDiagContainer_EnumChildContainerNames(sound_cont, i, child_container, ARRAY_SIZE(child_container)); - ok(hr == S_OK, "Expected IDxDiagContainer::EnumChildContainerNames to return S_OK, got 0x%08x\n", hr); + ok(hr == S_OK, "Expected IDxDiagContainer::EnumChildContainerNames to return S_OK, got 0x%08lx\n", hr);
hr = IDxDiagContainer_GetChildContainer(sound_cont, child_container, &child); - ok(hr == S_OK, "Expected IDxDiagContainer::GetChildContainer to return S_OK, got 0x%08x\n", hr); + ok(hr == S_OK, "Expected IDxDiagContainer::GetChildContainer to return S_OK, got 0x%08lx\n", hr);
trace("Testing container %s\n", wine_dbgstr_w(child_container)); test_container_properties(child, property_tests, ARRAY_SIZE(property_tests));
child2 = NULL; hr = IDxDiagContainer_GetChildContainer(child, L"", &child2); - ok(hr == S_OK, "Expected IDxDiagContainer::GetChildContainer to return S_OK, got 0x%08x\n", hr); + ok(hr == S_OK, "Expected IDxDiagContainer::GetChildContainer to return S_OK, got 0x%08lx\n", hr); ok(child2 != NULL, "Expected child2 != NULL\n"); ok(child2 != child, "Expected child != child2\n");
@@ -1013,14 +1013,14 @@ static void test_DxDiag_SoundCaptureDevices(void) }
hr = IDxDiagContainer_GetChildContainer(pddc, L"DxDiag_DirectSound.DxDiag_SoundCaptureDevices", &sound_cont); - ok(hr == S_OK, "Expected IDxDiagContainer::GetChildContainer to return S_OK, got 0x%08x\n", hr); + ok(hr == S_OK, "Expected IDxDiagContainer::GetChildContainer to return S_OK, got 0x%08lx\n", hr);
hr = IDxDiagContainer_GetNumberOfProps(sound_cont, &count); - ok(hr == S_OK, "Expected IDxDiagContainer::GetNumberOfProps to return S_OK, got 0x%08x\n", hr); - ok(count == 0, "Expected count to be 0, got %u\n", count); + ok(hr == S_OK, "Expected IDxDiagContainer::GetNumberOfProps to return S_OK, got 0x%08lx\n", hr); + ok(count == 0, "Expected count to be 0, got %lu\n", count);
hr = IDxDiagContainer_GetNumberOfChildContainers(sound_cont, &count); - ok(hr == S_OK, "Expected IDxDiagContainer::GetNumberOfChildContainers to return S_OK, got 0x%08x\n", hr); + ok(hr == S_OK, "Expected IDxDiagContainer::GetNumberOfChildContainers to return S_OK, got 0x%08lx\n", hr);
for (i = 0; i < count; i++) { @@ -1028,10 +1028,10 @@ static void test_DxDiag_SoundCaptureDevices(void) IDxDiagContainer *child;
hr = IDxDiagContainer_EnumChildContainerNames(sound_cont, i, child_container, ARRAY_SIZE(child_container)); - ok(hr == S_OK, "Expected IDxDiagContainer::EnumChildContainerNames to return S_OK, got 0x%08x\n", hr); + ok(hr == S_OK, "Expected IDxDiagContainer::EnumChildContainerNames to return S_OK, got 0x%08lx\n", hr);
hr = IDxDiagContainer_GetChildContainer(sound_cont, child_container, &child); - ok(hr == S_OK, "Expected IDxDiagContainer::GetChildContainer to return S_OK, got 0x%08x\n", hr); + ok(hr == S_OK, "Expected IDxDiagContainer::GetChildContainer to return S_OK, got 0x%08lx\n", hr);
trace("Testing container %s\n", wine_dbgstr_w(child_container)); test_container_properties(child, property_tests, ARRAY_SIZE(property_tests)); diff --git a/dlls/dxdiagn/tests/provider.c b/dlls/dxdiagn/tests/provider.c index 69006f06408..951e5f1fac3 100644 --- a/dlls/dxdiagn/tests/provider.c +++ b/dlls/dxdiagn/tests/provider.c @@ -34,7 +34,7 @@ static void test_Initialize(void) &IID_IDxDiagProvider, (LPVOID*)&pddp); ok(hr == S_OK || broken(hr == REGDB_E_CLASSNOTREG), /* Clean W2K3 */ - "Creating a IDxDiagProvider instance failed with %x\n", hr); + "Creating a IDxDiagProvider instance failed with %lx\n", hr); if (FAILED(hr)) { skip("Failed to create a IDxDiagProvider instance\n"); @@ -44,18 +44,18 @@ static void test_Initialize(void) /* Test passing a NULL DXDIAG_INIT_PARAMS pointer. */ hr = IDxDiagProvider_Initialize(pddp, NULL); ok(hr == E_POINTER, - "Expected IDxDiagProvider::Initialize to return E_POINTER, got %x\n", hr); + "Expected IDxDiagProvider::Initialize to return E_POINTER, got %lx\n", hr);
/* Test passing invalid dwSize values. */ params.dwSize = 0; hr = IDxDiagProvider_Initialize(pddp, ¶ms); ok(hr == E_INVALIDARG, - "Expected IDxDiagProvider::Initialize to return E_INVALIDARG, got %x\n", hr); + "Expected IDxDiagProvider::Initialize to return E_INVALIDARG, got %lx\n", hr);
params.dwSize = sizeof(params) + 1; hr = IDxDiagProvider_Initialize(pddp, ¶ms); ok(hr == E_INVALIDARG, - "Expected IDxDiagProvider::Initialize to return E_INVALIDARG, got %x\n", hr); + "Expected IDxDiagProvider::Initialize to return E_INVALIDARG, got %lx\n", hr);
/* Test passing an unexpected dwDxDiagHeaderVersion value. */ params.dwSize = sizeof(params); @@ -64,7 +64,7 @@ static void test_Initialize(void) params.pReserved = NULL; hr = IDxDiagProvider_Initialize(pddp, ¶ms); ok(hr == E_INVALIDARG, - "Expected IDxDiagProvider::Initialize to return E_INVALIDARG, got %x\n", hr); + "Expected IDxDiagProvider::Initialize to return E_INVALIDARG, got %lx\n", hr);
/* Setting pReserved to a non-NULL value causes a crash on Windows. */ if (0) @@ -73,7 +73,7 @@ static void test_Initialize(void) params.bAllowWHQLChecks = FALSE; params.pReserved = (VOID*)0xdeadbeef; hr = IDxDiagProvider_Initialize(pddp, ¶ms); - trace("IDxDiagProvider::Initialize returned %x\n", hr); + trace("IDxDiagProvider::Initialize returned %lx\n", hr); }
/* Test passing an appropriately initialized DXDIAG_INIT_PARAMS. */ @@ -81,11 +81,11 @@ static void test_Initialize(void) params.bAllowWHQLChecks = FALSE; params.pReserved = NULL; hr = IDxDiagProvider_Initialize(pddp, ¶ms); - ok(hr == S_OK, "Expected IDxDiagProvider::Initialize to return S_OK, got %x\n", hr); + ok(hr == S_OK, "Expected IDxDiagProvider::Initialize to return S_OK, got %lx\n", hr);
/* Test initializing multiple times. */ hr = IDxDiagProvider_Initialize(pddp, ¶ms); - ok(hr == S_OK, "Expected IDxDiagProvider::Initialize to return S_OK, got %x\n", hr); + ok(hr == S_OK, "Expected IDxDiagProvider::Initialize to return S_OK, got %lx\n", hr);
IDxDiagProvider_Release(pddp); } @@ -101,7 +101,7 @@ static void test_GetRootContainer(void) &IID_IDxDiagProvider, (LPVOID*)&pddp); ok(hr == S_OK || broken(hr == REGDB_E_CLASSNOTREG), /* Clean W2K3 */ - "Creating a IDxDiagProvider instance failed with %x\n", hr); + "Creating a IDxDiagProvider instance failed with %lx\n", hr); if (FAILED(hr)) { skip("Failed to create a IDxDiagProvider instance\n"); @@ -111,18 +111,18 @@ static void test_GetRootContainer(void) /* Test calling IDxDiagProvider::GetRootContainer before initialization. */ hr = IDxDiagProvider_GetRootContainer(pddp, NULL); ok(hr == CO_E_NOTINITIALIZED, - "Expected IDxDiagProvider::GetRootContainer to return CO_E_NOTINITIALIZED, got %x\n", hr); + "Expected IDxDiagProvider::GetRootContainer to return CO_E_NOTINITIALIZED, got %lx\n", hr);
hr = IDxDiagProvider_GetRootContainer(pddp, &pddc); ok(hr == CO_E_NOTINITIALIZED, - "Expected IDxDiagProvider::GetRootContainer to return CO_E_NOTINITIALIZED, got %x\n", hr); + "Expected IDxDiagProvider::GetRootContainer to return CO_E_NOTINITIALIZED, got %lx\n", hr);
params.dwSize = sizeof(params); params.dwDxDiagHeaderVersion = DXDIAG_DX9_SDK_VERSION; params.bAllowWHQLChecks = FALSE; params.pReserved = NULL; hr = IDxDiagProvider_Initialize(pddp, ¶ms); - ok(hr == S_OK, "Expected IDxDiagProvider::Initialize to return S_OK, got %x\n", hr); + ok(hr == S_OK, "Expected IDxDiagProvider::Initialize to return S_OK, got %lx\n", hr); if (FAILED(hr)) { skip("IDxDiagProvider::Initialize failed\n"); @@ -134,16 +134,16 @@ static void test_GetRootContainer(void) if (0) { hr = IDxDiagProvider_GetRootContainer(pddp, NULL); - trace("IDxDiagProvider::GetRootContainer returned %x\n", hr); + trace("IDxDiagProvider::GetRootContainer returned %lx\n", hr); }
hr = IDxDiagProvider_GetRootContainer(pddp, &pddc); - ok(hr == S_OK, "Expected IDxDiagProvider::GetRootContainer to return S_OK, got %x\n", hr); + ok(hr == S_OK, "Expected IDxDiagProvider::GetRootContainer to return S_OK, got %lx\n", hr);
/* IDxDiagProvider::GetRootContainer creates new instances of the root * container rather than maintain a static root container. */ hr = IDxDiagProvider_GetRootContainer(pddp, &pddc2); - ok(hr == S_OK, "Expected IDxDiagProvider::GetRootContainer to return S_OK, got %x\n", hr); + ok(hr == S_OK, "Expected IDxDiagProvider::GetRootContainer to return S_OK, got %lx\n", hr); ok(pddc != pddc2, "Expected the two pointers (%p vs. %p) to be unequal\n", pddc, pddc2);
IDxDiagContainer_Release(pddc2);
Signed-off-by: Eric Pouech eric.pouech@gmail.com
--- dlls/dxgi/tests/Makefile.in | 1 dlls/dxgi/tests/dxgi.c | 1590 ++++++++++++++++++++++--------------------- 2 files changed, 795 insertions(+), 796 deletions(-)
diff --git a/dlls/dxgi/tests/Makefile.in b/dlls/dxgi/tests/Makefile.in index 3bbece2d0a1..1c99d70957d 100644 --- a/dlls/dxgi/tests/Makefile.in +++ b/dlls/dxgi/tests/Makefile.in @@ -1,4 +1,3 @@ -EXTRADEFS = -DWINE_NO_LONG_TYPES TESTDLL = dxgi.dll IMPORTS = d3d10_1 dxgi user32
diff --git a/dlls/dxgi/tests/dxgi.c b/dlls/dxgi/tests/dxgi.c index f70d849aebc..a01b38520b8 100644 --- a/dlls/dxgi/tests/dxgi.c +++ b/dlls/dxgi/tests/dxgi.c @@ -244,7 +244,7 @@ static HRESULT check_interface_(unsigned int line, void *iface, REFIID iid, out = (IUnknown *)0xdeadbeef; 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 hr %#lx, expected %#lx.\n", hr, expected_hr); if (SUCCEEDED(hr)) IUnknown_Release(out); else @@ -266,9 +266,9 @@ static unsigned int check_multisample_quality_levels(IDXGIDevice *dxgi_device, HRESULT hr;
hr = IDXGIDevice_QueryInterface(dxgi_device, &IID_ID3D10Device, (void **)&device); - ok(hr == S_OK, "Failed to query ID3D10Device, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to query ID3D10Device, hr %#lx.\n", hr); hr = ID3D10Device_CheckMultisampleQualityLevels(device, format, sample_count, &levels); - ok(hr == S_OK, "Failed to check multisample quality levels, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to check multisample quality levels, hr %#lx.\n", hr); ID3D10Device_Release(device);
return levels; @@ -353,16 +353,16 @@ static void check_adapter_desc_(unsigned int line, const DXGI_ADAPTER_DESC *desc "Got revision %02x, expected %02x.\n", desc->Revision, expected_desc->Revision); ok_(__FILE__, line)(desc->DedicatedVideoMemory == expected_desc->DedicatedVideoMemory, - "Got dedicated video memory %lu, expected %lu.\n", + "Got dedicated video memory %Iu, expected %Iu.\n", desc->DedicatedVideoMemory, expected_desc->DedicatedVideoMemory); ok_(__FILE__, line)(desc->DedicatedSystemMemory == expected_desc->DedicatedSystemMemory, - "Got dedicated system memory %lu, expected %lu.\n", + "Got dedicated system memory %Iu, expected %Iu.\n", desc->DedicatedSystemMemory, expected_desc->DedicatedSystemMemory); ok_(__FILE__, line)(desc->SharedSystemMemory == expected_desc->SharedSystemMemory, - "Got shared system memory %lu, expected %lu.\n", + "Got shared system memory %Iu, expected %Iu.\n", desc->SharedSystemMemory, expected_desc->SharedSystemMemory); ok_(__FILE__, line)(equal_luid(desc->AdapterLuid, expected_desc->AdapterLuid), - "Got LUID %08x:%08x, expected %08x:%08x.\n", + "Got LUID %08lx:%08lx, expected %08lx:%08lx.\n", desc->AdapterLuid.HighPart, desc->AdapterLuid.LowPart, expected_desc->AdapterLuid.HighPart, expected_desc->AdapterLuid.LowPart); } @@ -387,9 +387,9 @@ static void check_output_equal_(unsigned int line, IDXGIOutput *output1, IDXGIOu HRESULT hr;
hr = IDXGIOutput_GetDesc(output1, &desc1); - ok(SUCCEEDED(hr), "GetDesc failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "GetDesc failed, hr %#lx.\n", hr); hr = IDXGIOutput_GetDesc(output2, &desc2); - ok(SUCCEEDED(hr), "GetDesc failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "GetDesc failed, hr %#lx.\n", hr); check_output_desc_(line, &desc1, &desc2); }
@@ -401,12 +401,12 @@ static BOOL output_belongs_to_adapter(IDXGIOutput *output, IDXGIAdapter *adapter HRESULT hr;
hr = IDXGIOutput_GetDesc(output, &output_desc); - ok(SUCCEEDED(hr), "Failed to get output desc, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get output desc, hr %#lx.\n", hr);
for (output_idx = 0; IDXGIAdapter_EnumOutputs(adapter, output_idx, &o) != DXGI_ERROR_NOT_FOUND; ++output_idx) { hr = IDXGIOutput_GetDesc(o, &desc); - ok(SUCCEEDED(hr), "Failed to get output desc, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get output desc, hr %#lx.\n", hr); IDXGIOutput_Release(o);
if (!lstrcmpW(desc.DeviceName, output_desc.DeviceName) @@ -462,10 +462,10 @@ static void check_fullscreen_state_(unsigned int line, const struct fullscreen_s { todo_wine_if(!windowed) ok_(__FILE__, line)((state->style & ~WS_VISIBLE) == (expected_state->style & ~WS_VISIBLE), - "Got style %#x, expected %#x.\n", + "Got style %#lx, expected %#lx.\n", state->style & ~(DWORD)WS_VISIBLE, expected_state->style & ~(DWORD)WS_VISIBLE); ok_(__FILE__, line)((state->exstyle & ~WS_EX_TOPMOST) == (expected_state->exstyle & ~WS_EX_TOPMOST), - "Got exstyle %#x, expected %#x.\n", + "Got exstyle %#lx, expected %#lx.\n", state->exstyle & ~(DWORD)WS_EX_TOPMOST, expected_state->exstyle & ~(DWORD)WS_EX_TOPMOST); ok_(__FILE__, line)(EqualRect(&state->window_rect, &expected_state->window_rect), "Got window rect %s, expected %s.\n", @@ -500,7 +500,7 @@ static void check_swapchain_fullscreen_state_(unsigned int line, IDXGISwapChain HRESULT hr;
hr = IDXGISwapChain_GetDesc(swapchain, &swapchain_desc); - ok_(__FILE__, line)(hr == S_OK, "Failed to get swapchain desc, hr %#x.\n", hr); + ok_(__FILE__, line)(hr == S_OK, "Failed to get swapchain desc, hr %#lx.\n", hr); check_window_fullscreen_state_(line, swapchain_desc.OutputWindow, &expected_state->fullscreen_state, swapchain_desc.Windowed);
@@ -509,7 +509,7 @@ static void check_swapchain_fullscreen_state_(unsigned int line, IDXGISwapChain swapchain_desc.Windowed, !expected_state->fullscreen);
hr = IDXGISwapChain_GetFullscreenState(swapchain, &fullscreen, &target); - ok_(__FILE__, line)(hr == S_OK, "Failed to get fullscreen state, hr %#x.\n", hr); + ok_(__FILE__, line)(hr == S_OK, "Failed to get fullscreen state, hr %#lx.\n", hr); ok_(__FILE__, line)(fullscreen == expected_state->fullscreen, "Got fullscreen %#x, expected %#x.\n", fullscreen, expected_state->fullscreen);
@@ -518,10 +518,10 @@ static void check_swapchain_fullscreen_state_(unsigned int line, IDXGISwapChain IDXGIAdapter *adapter;
hr = IDXGISwapChain_GetContainingOutput(swapchain, &containing_output); - ok_(__FILE__, line)(hr == S_OK, "Failed to get containing output, hr %#x.\n", hr); + ok_(__FILE__, line)(hr == S_OK, "Failed to get containing output, hr %#lx.\n", hr);
hr = IDXGIOutput_GetParent(containing_output, &IID_IDXGIAdapter, (void **)&adapter); - ok_(__FILE__, line)(hr == S_OK, "Failed to get parent, hr %#x.\n", hr); + ok_(__FILE__, line)(hr == S_OK, "Failed to get parent, hr %#lx.\n", hr);
check_output_equal_(line, target, expected_state->target); ok_(__FILE__, line)(target == containing_output, "Got target %p, expected %p.\n", @@ -562,7 +562,7 @@ static void compute_expected_swapchain_fullscreen_state_after_fullscreen_change_ mode_desc.Width = new_width; mode_desc.Height = new_height; hr = IDXGIOutput_FindClosestMatchingMode(target, &mode_desc, &mode_desc, NULL); - ok_(__FILE__, line)(SUCCEEDED(hr), "FindClosestMatchingMode failed, hr %#x.\n", hr); + ok_(__FILE__, line)(SUCCEEDED(hr), "FindClosestMatchingMode failed, hr %#lx.\n", hr); new_width = mode_desc.Width; new_height = mode_desc.Height; } @@ -615,7 +615,7 @@ static void wait_fullscreen_state_(unsigned int line, IDXGISwapChain *swapchain, Sleep(wait_step); total_time += wait_step; } - ok_(__FILE__, line)(hr == S_OK, "Failed to get fullscreen state, hr %#x.\n", hr); + ok_(__FILE__, line)(hr == S_OK, "Failed to get fullscreen state, hr %#lx.\n", hr); todo_wine_if(todo) ok_(__FILE__, line)(state == expected, "Got unexpected state %#x, expected %#x.\n", state, expected); } @@ -665,7 +665,7 @@ static IDXGIAdapter *create_adapter(void)
if (FAILED(hr = CreateDXGIFactory(&IID_IDXGIFactory, (void **)&factory))) { - trace("Failed to create IDXGIFactory, hr %#x.\n", hr); + trace("Failed to create IDXGIFactory, hr %#lx.\n", hr); return NULL; }
@@ -679,7 +679,7 @@ static IDXGIAdapter *create_adapter(void) } else { - trace("Failed to get IDXGIFactory4, hr %#x.\n", hr); + trace("Failed to get IDXGIFactory4, hr %#lx.\n", hr); } } else @@ -688,7 +688,7 @@ static IDXGIAdapter *create_adapter(void) } IDXGIFactory_Release(factory); if (FAILED(hr)) - trace("Failed to get adapter, hr %#x.\n", hr); + trace("Failed to get adapter, hr %#lx.\n", hr); return adapter; }
@@ -788,7 +788,7 @@ static ID3D12CommandQueue *create_d3d12_direct_queue(ID3D12Device *device) command_queue_desc.NodeMask = 0; hr = ID3D12Device_CreateCommandQueue(device, &command_queue_desc, &IID_ID3D12CommandQueue, (void **)&queue); - ok(hr == S_OK, "Failed to create command queue, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create command queue, hr %#lx.\n", hr); return queue; }
@@ -823,12 +823,12 @@ static void wait_queue_idle_(unsigned int line, ID3D12Device *device, ID3D12Comm
hr = ID3D12Device_CreateFence(device, 0, D3D12_FENCE_FLAG_NONE, &IID_ID3D12Fence, (void **)&fence); - ok_(__FILE__, line)(hr == S_OK, "Failed to create fence, hr %#x.\n", hr); + ok_(__FILE__, line)(hr == S_OK, "Failed to create fence, hr %#lx.\n", hr);
hr = ID3D12CommandQueue_Signal(queue, fence, 1); - ok_(__FILE__, line)(hr == S_OK, "Failed to signal fence, hr %#x.\n", hr); + ok_(__FILE__, line)(hr == S_OK, "Failed to signal fence, hr %#lx.\n", hr); hr = wait_for_fence(fence, 1); - ok_(__FILE__, line)(hr == S_OK, "Failed to wait for fence, hr %#x.\n", hr); + ok_(__FILE__, line)(hr == S_OK, "Failed to wait for fence, hr %#lx.\n", hr);
ID3D12Fence_Release(fence); } @@ -845,7 +845,7 @@ static void wait_device_idle_(unsigned int line, IUnknown *device) return;
hr = ID3D12CommandQueue_GetDevice(queue, &IID_ID3D12Device, (void **)&d3d12_device); - ok_(__FILE__, line)(hr == S_OK, "Failed to get d3d12 device, hr %#x.\n", hr); + ok_(__FILE__, line)(hr == S_OK, "Failed to get d3d12 device, hr %#lx.\n", hr);
wait_queue_idle_(line, d3d12_device, queue);
@@ -863,15 +863,15 @@ static void get_factory_(unsigned int line, IUnknown *device, BOOL is_d3d12, IDX if (is_d3d12) { hr = CreateDXGIFactory(&IID_IDXGIFactory, (void **)factory); - ok_(__FILE__, line)(hr == S_OK, "Failed to create factory, hr %#x.\n", hr); + ok_(__FILE__, line)(hr == S_OK, "Failed to create factory, hr %#lx.\n", hr); } else { dxgi_device = (IDXGIDevice *)device; hr = IDXGIDevice_GetAdapter(dxgi_device, &adapter); - ok_(__FILE__, line)(hr == S_OK, "Failed to get adapter, hr %#x.\n", hr); + ok_(__FILE__, line)(hr == S_OK, "Failed to get adapter, hr %#lx.\n", hr); hr = IDXGIAdapter_GetParent(adapter, &IID_IDXGIFactory, (void **)factory); - ok_(__FILE__, line)(hr == S_OK, "Failed to get parent, hr %#x.\n", hr); + ok_(__FILE__, line)(hr == S_OK, "Failed to get parent, hr %#lx.\n", hr); IDXGIAdapter_Release(adapter); } } @@ -890,11 +890,11 @@ static IDXGIAdapter *get_adapter_(unsigned int line, IUnknown *device, BOOL is_d { get_factory_(line, device, is_d3d12, &factory); hr = ID3D12CommandQueue_GetDevice((ID3D12CommandQueue *)device, &IID_ID3D12Device, (void **)&d3d12_device); - ok_(__FILE__, line)(hr == S_OK, "Got unexpected hr %#x.\n", hr); + ok_(__FILE__, line)(hr == S_OK, "Got unexpected hr %#lx.\n", hr); luid = ID3D12Device_GetAdapterLuid(d3d12_device); ID3D12Device_Release(d3d12_device); hr = IDXGIFactory_QueryInterface(factory, &IID_IDXGIFactory4, (void **)&factory4); - ok_(__FILE__, line)(hr == S_OK, "Got unexpected hr %#x.\n", hr); + ok_(__FILE__, line)(hr == S_OK, "Got unexpected hr %#lx.\n", hr); hr = IDXGIFactory4_EnumAdapterByLuid(factory4, luid, &IID_IDXGIAdapter, (void **)&adapter); IDXGIFactory4_Release(factory4); IDXGIFactory_Release(factory); @@ -902,7 +902,7 @@ static IDXGIAdapter *get_adapter_(unsigned int line, IUnknown *device, BOOL is_d else { hr = IDXGIDevice_GetAdapter((IDXGIDevice *)device, &adapter); - ok_(__FILE__, line)(hr == S_OK, "Got unexpected hr %#x.\n", hr); + ok_(__FILE__, line)(hr == S_OK, "Got unexpected hr %#lx.\n", hr); }
return adapter; @@ -934,7 +934,7 @@ static IDXGISwapChain *create_swapchain_(unsigned int line, IUnknown *device, BO
get_factory(device, is_d3d12, &factory); hr = IDXGIFactory_CreateSwapChain(factory, device, &desc, &swapchain); - ok_(__FILE__, line)(hr == S_OK, "Failed to create swapchain, hr %#x.\n", hr); + ok_(__FILE__, line)(hr == S_OK, "Failed to create swapchain, hr %#lx.\n", hr); IDXGIFactory_Release(factory);
return swapchain; @@ -957,33 +957,33 @@ static void test_adapter_desc(void) }
hr = IDXGIDevice_GetAdapter(device, &adapter); - ok(SUCCEEDED(hr), "GetAdapter failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "GetAdapter failed, hr %#lx.\n", hr);
hr = IDXGIAdapter_GetDesc(adapter, NULL); - ok(hr == E_INVALIDARG, "GetDesc returned %#x, expected %#x.\n", + ok(hr == E_INVALIDARG, "GetDesc returned %#lx, expected %#lx.\n", hr, E_INVALIDARG);
hr = IDXGIAdapter_GetDesc(adapter, &desc); - ok(SUCCEEDED(hr), "GetDesc failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "GetDesc failed, hr %#lx.\n", hr);
trace("%s.\n", wine_dbgstr_w(desc.Description)); trace("%04x: %04x:%04x (rev %02x).\n", desc.SubSysId, desc.VendorId, desc.DeviceId, desc.Revision); - trace("Dedicated video memory: %lu (%lu MB).\n", + trace("Dedicated video memory: %Iu (%Iu MB).\n", desc.DedicatedVideoMemory, desc.DedicatedVideoMemory / (1024 * 1024)); - trace("Dedicated system memory: %lu (%lu MB).\n", + trace("Dedicated system memory: %Iu (%Iu MB).\n", desc.DedicatedSystemMemory, desc.DedicatedSystemMemory / (1024 * 1024)); - trace("Shared system memory: %lu (%lu MB).\n", + trace("Shared system memory: %Iu (%Iu MB).\n", desc.SharedSystemMemory, desc.SharedSystemMemory / (1024 * 1024)); - trace("LUID: %08x:%08x.\n", desc.AdapterLuid.HighPart, desc.AdapterLuid.LowPart); + trace("LUID: %08lx:%08lx.\n", desc.AdapterLuid.HighPart, desc.AdapterLuid.LowPart);
hr = IDXGIAdapter_QueryInterface(adapter, &IID_IDXGIAdapter1, (void **)&adapter1); - ok(SUCCEEDED(hr) || broken(hr == E_NOINTERFACE), "Got unexpected hr %#x.\n", hr); + ok(SUCCEEDED(hr) || broken(hr == E_NOINTERFACE), "Got unexpected hr %#lx.\n", hr); if (hr == E_NOINTERFACE) goto done;
hr = IDXGIAdapter1_GetDesc1(adapter1, &desc1); - ok(SUCCEEDED(hr), "GetDesc1 failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "GetDesc1 failed, hr %#lx.\n", hr);
ok(!lstrcmpW(desc.Description, desc1.Description), "Got unexpected description %s.\n", wine_dbgstr_w(desc1.Description)); @@ -992,13 +992,13 @@ static void test_adapter_desc(void) ok(desc1.SubSysId == desc.SubSysId, "Got unexpected sub system ID %04x.\n", desc1.SubSysId); ok(desc1.Revision == desc.Revision, "Got unexpected revision %02x.\n", desc1.Revision); ok(desc1.DedicatedVideoMemory == desc.DedicatedVideoMemory, - "Got unexpected dedicated video memory %lu.\n", desc1.DedicatedVideoMemory); + "Got unexpected dedicated video memory %Iu.\n", desc1.DedicatedVideoMemory); ok(desc1.DedicatedSystemMemory == desc.DedicatedSystemMemory, - "Got unexpected dedicated system memory %lu.\n", desc1.DedicatedSystemMemory); + "Got unexpected dedicated system memory %Iu.\n", desc1.DedicatedSystemMemory); ok(desc1.SharedSystemMemory == desc.SharedSystemMemory, - "Got unexpected shared system memory %lu.\n", desc1.SharedSystemMemory); + "Got unexpected shared system memory %Iu.\n", desc1.SharedSystemMemory); ok(equal_luid(desc1.AdapterLuid, desc.AdapterLuid), - "Got unexpected adapter LUID %08x:%08x.\n", desc1.AdapterLuid.HighPart, desc1.AdapterLuid.LowPart); + "Got unexpected adapter LUID %08lx:%08lx.\n", desc1.AdapterLuid.HighPart, desc1.AdapterLuid.LowPart); trace("Flags: %08x.\n", desc1.Flags);
IDXGIAdapter1_Release(adapter1); @@ -1006,7 +1006,7 @@ static void test_adapter_desc(void) done: IDXGIAdapter_Release(adapter); refcount = IDXGIDevice_Release(device); - ok(!refcount, "Device has %u references left.\n", refcount); + ok(!refcount, "Device has %lu references left.\n", refcount); }
static void test_adapter_luid(void) @@ -1031,22 +1031,22 @@ static void test_adapter_luid(void) }
hr = IDXGIDevice_GetAdapter(device, &adapter); - ok(hr == S_OK, "Failed to get adapter, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get adapter, hr %#lx.\n", hr); hr = IDXGIAdapter_GetDesc(adapter, &device_adapter_desc); - ok(hr == S_OK, "Failed to get adapter desc, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get adapter desc, hr %#lx.\n", hr); IDXGIAdapter_Release(adapter); refcount = IDXGIDevice_Release(device); - ok(!refcount, "Device has %u references left.\n", refcount); + ok(!refcount, "Device has %lu references left.\n", refcount);
is_null_luid_adapter = !device_adapter_desc.AdapterLuid.LowPart && !device_adapter_desc.SubSysId && !device_adapter_desc.Revision && !device_adapter_desc.VendorId && !device_adapter_desc.DeviceId;
hr = CreateDXGIFactory(&IID_IDXGIFactory, (void **)&factory); - ok(hr == S_OK, "Failed to create DXGI factory, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create DXGI factory, hr %#lx.\n", hr);
hr = IDXGIFactory_QueryInterface(factory, &IID_IDXGIFactory4, (void **)&factory4); - ok(hr == S_OK || hr == E_NOINTERFACE, "Got unexpected hr %#x.\n", hr); + ok(hr == S_OK || hr == E_NOINTERFACE, "Got unexpected hr %#lx.\n", hr);
have_unique_luid = TRUE; found_adapter_count = 0; @@ -1054,7 +1054,7 @@ static void test_adapter_luid(void) while ((hr = IDXGIFactory_EnumAdapters(factory, adapter_index, &adapter)) == S_OK) { hr = IDXGIAdapter_GetDesc(adapter, &desc); - ok(hr == S_OK, "Failed to get adapter desc, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get adapter desc, hr %#lx.\n", hr);
if (equal_luid(desc.AdapterLuid, device_adapter_desc.AdapterLuid)) { @@ -1069,32 +1069,32 @@ static void test_adapter_luid(void) { hr = IDXGIFactory4_EnumAdapterByLuid(factory4, desc.AdapterLuid, &IID_IDXGIAdapter, (void **)&adapter2); - ok(hr == S_OK, "Failed to enum adapter by LUID, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to enum adapter by LUID, hr %#lx.\n", hr); hr = IDXGIAdapter_GetDesc(adapter2, &desc2); - ok(hr == S_OK, "Failed to get adapter desc, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get adapter desc, hr %#lx.\n", hr); check_adapter_desc(&desc2, &desc); ok(adapter2 != adapter, "Expected to get new instance of IDXGIAdapter.\n"); refcount = IDXGIAdapter_Release(adapter2); - ok(!refcount, "Adapter has %u references left.\n", refcount); + ok(!refcount, "Adapter has %lu references left.\n", refcount); }
refcount = IDXGIAdapter_Release(adapter); - ok(!refcount, "Adapter has %u references left.\n", refcount); + ok(!refcount, "Adapter has %lu references left.\n", refcount);
++adapter_index; } - ok(hr == DXGI_ERROR_NOT_FOUND, "Got unexpected hr %#x.\n", hr); + ok(hr == DXGI_ERROR_NOT_FOUND, "Got unexpected hr %#lx.\n", hr);
/* Older versions of WARP aren't enumerated by IDXGIFactory_EnumAdapters(). */ ok(found_adapter_count == 1 || broken(is_null_luid_adapter), - "Found %u adapters for LUID %08x:%08x.\n", + "Found %u adapters for LUID %08lx:%08lx.\n", found_adapter_count, device_adapter_desc.AdapterLuid.HighPart, device_adapter_desc.AdapterLuid.LowPart);
if (factory4) IDXGIFactory4_Release(factory4); refcount = IDXGIFactory_Release(factory); - ok(!refcount, "Factory has %u references left.\n", refcount); + ok(!refcount, "Factory has %lu references left.\n", refcount);
if (!pCreateDXGIFactory2 || FAILED(hr = pCreateDXGIFactory2(0, &IID_IDXGIFactory4, (void **)&factory4))) @@ -1105,24 +1105,24 @@ static void test_adapter_luid(void)
hr = IDXGIFactory4_EnumAdapterByLuid(factory4, device_adapter_desc.AdapterLuid, &IID_IDXGIAdapter, NULL); - ok(hr == DXGI_ERROR_INVALID_CALL, "Got unexpected hr %#x.\n", hr); + ok(hr == DXGI_ERROR_INVALID_CALL, "Got unexpected hr %#lx.\n", hr);
hr = IDXGIFactory4_EnumAdapterByLuid(factory4, device_adapter_desc.AdapterLuid, &IID_IDXGIAdapter, (void **)&adapter); - ok(hr == S_OK, "Failed to enum adapter by LUID, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to enum adapter by LUID, hr %#lx.\n", hr); if (SUCCEEDED(hr)) { hr = IDXGIAdapter_GetDesc(adapter, &desc); - ok(hr == S_OK, "Failed to get adapter desc, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get adapter desc, hr %#lx.\n", hr); check_adapter_desc(&desc, &device_adapter_desc); refcount = IDXGIAdapter_Release(adapter); - ok(!refcount, "Adapter has %u references left.\n", refcount); + ok(!refcount, "Adapter has %lu references left.\n", refcount); }
if (have_unique_luid) { hr = IDXGIFactory4_EnumAdapterByLuid(factory4, luid, &IID_IDXGIAdapter, (void **)&adapter); - ok(hr == DXGI_ERROR_NOT_FOUND, "Got unexpected hr %#x.\n", hr); + ok(hr == DXGI_ERROR_NOT_FOUND, "Got unexpected hr %#lx.\n", hr); } else { @@ -1130,7 +1130,7 @@ static void test_adapter_luid(void) }
refcount = IDXGIFactory4_Release(factory4); - ok(!refcount, "Factory has %u references left.\n", refcount); + ok(!refcount, "Factory has %lu references left.\n", refcount); }
static void test_query_video_memory_info(void) @@ -1149,14 +1149,14 @@ static void test_query_video_memory_info(void) }
hr = IDXGIDevice_GetAdapter(device, &adapter); - ok(hr == S_OK, "Failed to get adapter, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get adapter, hr %#lx.\n", hr); hr = IDXGIAdapter_QueryInterface(adapter, &IID_IDXGIAdapter3, (void **)&adapter3); - ok(hr == S_OK || hr == E_NOINTERFACE, "Got unexpected hr %#x.\n", hr); + ok(hr == S_OK || hr == E_NOINTERFACE, "Got unexpected hr %#lx.\n", hr); if (hr == E_NOINTERFACE) goto done;
hr = IDXGIAdapter3_QueryVideoMemoryInfo(adapter3, 0, DXGI_MEMORY_SEGMENT_GROUP_LOCAL, &memory_info); - ok(hr == S_OK, "Failed to query video memory info, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to query video memory info, hr %#lx.\n", hr); ok(memory_info.Budget >= memory_info.AvailableForReservation, "Available for reservation 0x%s is greater than budget 0x%s.\n", wine_dbgstr_longlong(memory_info.AvailableForReservation), @@ -1165,7 +1165,7 @@ static void test_query_video_memory_info(void) wine_dbgstr_longlong(memory_info.CurrentReservation));
hr = IDXGIAdapter3_QueryVideoMemoryInfo(adapter3, 0, DXGI_MEMORY_SEGMENT_GROUP_NON_LOCAL, &memory_info); - ok(hr == S_OK, "Failed to query video memory info, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to query video memory info, hr %#lx.\n", hr); ok(memory_info.Budget >= memory_info.AvailableForReservation, "Available for reservation 0x%s is greater than budget 0x%s.\n", wine_dbgstr_longlong(memory_info.AvailableForReservation), @@ -1174,14 +1174,14 @@ static void test_query_video_memory_info(void) wine_dbgstr_longlong(memory_info.CurrentReservation));
hr = IDXGIAdapter3_QueryVideoMemoryInfo(adapter3, 0, DXGI_MEMORY_SEGMENT_GROUP_NON_LOCAL + 1, &memory_info); - ok(hr == E_INVALIDARG, "Failed to query video memory info, hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Failed to query video memory info, hr %#lx.\n", hr);
IDXGIAdapter3_Release(adapter3);
done: IDXGIAdapter_Release(adapter); refcount = IDXGIDevice_Release(device); - ok(!refcount, "Device has %u references left.\n", refcount); + ok(!refcount, "Device has %lu references left.\n", refcount); }
static void test_check_interface_support(void) @@ -1200,16 +1200,16 @@ static void test_check_interface_support(void) }
hr = IDXGIDevice_GetAdapter(device, &adapter); - ok(SUCCEEDED(hr), "GetAdapter failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "GetAdapter failed, hr %#lx.\n", hr);
hr = IDXGIAdapter_CheckInterfaceSupport(adapter, &IID_IDXGIDevice, NULL); - ok(hr == S_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr); hr = IDXGIAdapter_CheckInterfaceSupport(adapter, &IID_IDXGIDevice, &driver_version); - ok(hr == S_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr); hr = IDXGIAdapter_CheckInterfaceSupport(adapter, &IID_ID3D10Device, NULL); - ok(hr == S_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr); hr = IDXGIAdapter_CheckInterfaceSupport(adapter, &IID_ID3D10Device, &driver_version); - ok(hr == S_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
trace("UMD version: %u.%u.%u.%u.\n", HIWORD(U(driver_version).HighPart), LOWORD(U(driver_version).HighPart), @@ -1220,9 +1220,9 @@ static void test_check_interface_support(void) { IUnknown_Release(iface); hr = IDXGIAdapter_CheckInterfaceSupport(adapter, &IID_ID3D10Device1, NULL); - ok(hr == S_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr); hr = IDXGIAdapter_CheckInterfaceSupport(adapter, &IID_ID3D10Device1, &driver_version); - ok(hr == S_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr); } else { @@ -1230,16 +1230,16 @@ static void test_check_interface_support(void) }
hr = IDXGIAdapter_CheckInterfaceSupport(adapter, &IID_ID3D11Device, NULL); - ok(hr == DXGI_ERROR_UNSUPPORTED, "Got unexpected hr %#x.\n", hr); + ok(hr == DXGI_ERROR_UNSUPPORTED, "Got unexpected hr %#lx.\n", hr); driver_version.LowPart = driver_version.HighPart = 0xdeadbeef; hr = IDXGIAdapter_CheckInterfaceSupport(adapter, &IID_ID3D11Device, &driver_version); - ok(hr == DXGI_ERROR_UNSUPPORTED, "Got unexpected hr %#x.\n", hr); - ok(driver_version.HighPart == 0xdeadbeef, "Got unexpected driver version %#x.\n", driver_version.HighPart); - ok(driver_version.LowPart == 0xdeadbeef, "Got unexpected driver version %#x.\n", driver_version.LowPart); + ok(hr == DXGI_ERROR_UNSUPPORTED, "Got unexpected hr %#lx.\n", hr); + ok(driver_version.HighPart == 0xdeadbeef, "Got unexpected driver version %#lx.\n", driver_version.HighPart); + ok(driver_version.LowPart == 0xdeadbeef, "Got unexpected driver version %#lx.\n", driver_version.LowPart);
IDXGIAdapter_Release(adapter); refcount = IDXGIDevice_Release(device); - ok(!refcount, "Device has %u references left.\n", refcount); + ok(!refcount, "Device has %lu references left.\n", refcount); }
static void test_create_surface(void) @@ -1264,7 +1264,7 @@ static void test_create_surface(void) desc.SampleDesc.Quality = 0;
hr = IDXGIDevice_CreateSurface(device, &desc, 1, DXGI_USAGE_RENDER_TARGET_OUTPUT, NULL, &surface); - ok(SUCCEEDED(hr), "Failed to create a dxgi surface, hr %#x\n", hr); + ok(SUCCEEDED(hr), "Failed to create a dxgi surface, hr %#lx\n", hr);
check_interface(surface, &IID_ID3D10Texture2D, TRUE, FALSE); /* Not available on all Windows versions. */ @@ -1274,7 +1274,7 @@ static void test_create_surface(void)
IDXGISurface_Release(surface); refcount = IDXGIDevice_Release(device); - ok(!refcount, "Device has %u references left.\n", refcount); + ok(!refcount, "Device has %lu references left.\n", refcount);
/* DXGI_USAGE_UNORDERED_ACCESS */ if (!(device = create_d3d11_device())) @@ -1285,7 +1285,7 @@ static void test_create_surface(void)
surface = NULL; hr = IDXGIDevice_CreateSurface(device, &desc, 1, DXGI_USAGE_UNORDERED_ACCESS, NULL, &surface); - ok(SUCCEEDED(hr), "Failed to create a dxgi surface, hr %#x\n", hr); + ok(SUCCEEDED(hr), "Failed to create a dxgi surface, hr %#lx\n", hr);
if (surface) { @@ -1293,12 +1293,12 @@ static void test_create_surface(void) ID3D11Device *d3d_device;
hr = IDXGISurface_QueryInterface(surface, &IID_ID3D11Texture2D, (void **)&texture2d); - ok(SUCCEEDED(hr), "Failed to get texture interface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get texture interface, hr %#lx.\n", hr);
ID3D11Texture2D_GetDevice(texture2d, &d3d_device);
hr = ID3D11Device_CreateUnorderedAccessView(d3d_device, (ID3D11Resource *)texture2d, NULL, &uav); - ok(SUCCEEDED(hr), "Failed to create unordered access view, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create unordered access view, hr %#lx.\n", hr); ID3D11UnorderedAccessView_Release(uav);
ID3D11Device_Release(d3d_device); @@ -1308,7 +1308,7 @@ static void test_create_surface(void) }
refcount = IDXGIDevice_Release(device); - ok(!refcount, "Device has %u references left.\n", refcount); + ok(!refcount, "Device has %lu references left.\n", refcount); }
static void test_parents(void) @@ -1336,16 +1336,16 @@ static void test_parents(void) surface_desc.SampleDesc.Quality = 0;
hr = IDXGIDevice_CreateSurface(device, &surface_desc, 1, DXGI_USAGE_RENDER_TARGET_OUTPUT, NULL, &surface); - ok(SUCCEEDED(hr), "Failed to create a dxgi surface, hr %#x\n", hr); + ok(SUCCEEDED(hr), "Failed to create a dxgi surface, hr %#lx\n", hr);
hr = IDXGISurface_GetParent(surface, &IID_IDXGIDevice, (void **)&parent); IDXGISurface_Release(surface); - ok(SUCCEEDED(hr), "GetParent failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "GetParent failed, hr %#lx.\n", hr); ok(parent == (IUnknown *)device, "Got parent %p, expected %p.\n", parent, device); IUnknown_Release(parent);
hr = IDXGIDevice_GetAdapter(device, &adapter); - ok(SUCCEEDED(hr), "GetAdapter failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "GetAdapter failed, hr %#lx.\n", hr);
hr = IDXGIAdapter_EnumOutputs(adapter, 0, &output); if (hr == DXGI_ERROR_NOT_FOUND) @@ -1354,31 +1354,31 @@ static void test_parents(void) } else { - ok(SUCCEEDED(hr), "EnumOutputs failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "EnumOutputs failed, hr %#lx.\n", hr);
hr = IDXGIOutput_GetParent(output, &IID_IDXGIAdapter, (void **)&parent); IDXGIOutput_Release(output); - ok(SUCCEEDED(hr), "GetParent failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "GetParent failed, hr %#lx.\n", hr); ok(parent == (IUnknown *)adapter, "Got parent %p, expected %p.\n", parent, adapter); IUnknown_Release(parent); }
hr = IDXGIAdapter_GetParent(adapter, &IID_IDXGIFactory, (void **)&factory); - ok(SUCCEEDED(hr), "GetParent failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "GetParent failed, hr %#lx.\n", hr);
hr = IDXGIFactory_GetParent(factory, &IID_IUnknown, (void **)&parent); - ok(hr == E_NOINTERFACE, "GetParent returned %#x, expected %#x.\n", hr, E_NOINTERFACE); + ok(hr == E_NOINTERFACE, "GetParent returned %#lx, expected %#lx.\n", hr, E_NOINTERFACE); ok(parent == NULL, "Got parent %p, expected %p.\n", parent, NULL); IDXGIFactory_Release(factory);
hr = IDXGIDevice_GetParent(device, &IID_IDXGIAdapter, (void **)&parent); - ok(SUCCEEDED(hr), "GetParent failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "GetParent failed, hr %#lx.\n", hr); ok(parent == (IUnknown *)adapter, "Got parent %p, expected %p.\n", parent, adapter); IUnknown_Release(parent);
IDXGIAdapter_Release(adapter); refcount = IDXGIDevice_Release(device); - ok(!refcount, "Device has %u references left.\n", refcount); + ok(!refcount, "Device has %lu references left.\n", refcount); }
static void test_output(void) @@ -1399,10 +1399,10 @@ static void test_output(void) }
hr = IDXGIDevice_GetAdapter(device, &adapter); - ok(SUCCEEDED(hr), "GetAdapter failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "GetAdapter failed, hr %#lx.\n", hr);
hr = IDXGIAdapter_EnumOutputs(adapter, 0, NULL); - ok(hr == E_INVALIDARG, "Got unexpected hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Got unexpected hr %#lx.\n", hr);
hr = IDXGIAdapter_EnumOutputs(adapter, 0, &output); if (hr == DXGI_ERROR_NOT_FOUND) @@ -1412,15 +1412,15 @@ static void test_output(void) IDXGIDevice_Release(device); return; } - ok(SUCCEEDED(hr), "EnumOutputs failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "EnumOutputs failed, hr %#lx.\n", hr);
hr = IDXGIOutput_GetDisplayModeList(output, DXGI_FORMAT_R8G8B8A8_UNORM, 0, NULL, NULL); - ok(hr == DXGI_ERROR_INVALID_CALL, "Got unexpected hr %#x.\n", hr); + ok(hr == DXGI_ERROR_INVALID_CALL, "Got unexpected hr %#lx.\n", hr);
hr = IDXGIOutput_GetDisplayModeList(output, DXGI_FORMAT_R8G8B8A8_UNORM, 0, &mode_count, NULL); ok(SUCCEEDED(hr) || broken(hr == DXGI_ERROR_NOT_CURRENTLY_AVAILABLE), /* Remote Desktop Services / Win 7 testbot */ - "Failed to list modes, hr %#x.\n", hr); + "Failed to list modes, hr %#lx.\n", hr); if (hr == DXGI_ERROR_NOT_CURRENTLY_AVAILABLE) { win_skip("GetDisplayModeList() not supported.\n"); @@ -1432,12 +1432,12 @@ static void test_output(void) mode_count_comp = mode_count;
hr = IDXGIOutput_GetDisplayModeList(output, 0, 0, &mode_count, NULL); - ok(SUCCEEDED(hr), "Failed to list modes, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to list modes, hr %#lx.\n", hr); ok(!mode_count, "Got unexpected mode_count %u.\n", mode_count);
hr = IDXGIOutput_GetDisplayModeList(output, DXGI_FORMAT_R8G8B8A8_UNORM, DXGI_ENUM_MODES_SCALING, &mode_count, NULL); - ok(SUCCEEDED(hr), "Failed to list modes, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to list modes, hr %#lx.\n", hr); ok(mode_count >= mode_count_comp, "Got unexpected mode_count %u, expected >= %u.\n", mode_count, mode_count_comp); mode_count_comp = mode_count;
@@ -1446,19 +1446,19 @@ static void test_output(void)
hr = IDXGIOutput_GetDisplayModeList(output, DXGI_FORMAT_R8G8B8A8_UNORM, DXGI_ENUM_MODES_SCALING, NULL, modes); - ok(hr == DXGI_ERROR_INVALID_CALL, "Got unexpected hr %#x.\n", hr); + ok(hr == DXGI_ERROR_INVALID_CALL, "Got unexpected hr %#lx.\n", hr); ok(!modes[0].Height, "No output was expected.\n");
mode_count = 0; hr = IDXGIOutput_GetDisplayModeList(output, DXGI_FORMAT_R8G8B8A8_UNORM, DXGI_ENUM_MODES_SCALING, &mode_count, modes); - ok(hr == DXGI_ERROR_MORE_DATA, "Got unexpected hr %#x.\n", hr); + ok(hr == DXGI_ERROR_MORE_DATA, "Got unexpected hr %#lx.\n", hr); ok(!modes[0].Height, "No output was expected.\n");
mode_count = mode_count_comp; hr = IDXGIOutput_GetDisplayModeList(output, DXGI_FORMAT_R8G8B8A8_UNORM, DXGI_ENUM_MODES_SCALING, &mode_count, modes); - ok(SUCCEEDED(hr), "Failed to list modes, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to list modes, hr %#lx.\n", hr); ok(mode_count == mode_count_comp, "Got unexpected mode_count %u, expected %u.\n", mode_count, mode_count_comp);
last_width = last_height = 0; @@ -1498,7 +1498,7 @@ static void test_output(void) mode_count += 5; hr = IDXGIOutput_GetDisplayModeList(output, DXGI_FORMAT_R8G8B8A8_UNORM, DXGI_ENUM_MODES_SCALING, &mode_count, modes); - ok(SUCCEEDED(hr), "Failed to list modes, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to list modes, hr %#lx.\n", hr); ok(mode_count == mode_count_comp, "Got unexpected mode_count %u, expected %u.\n", mode_count, mode_count_comp);
if (mode_count_comp) @@ -1506,7 +1506,7 @@ static void test_output(void) mode_count = mode_count_comp - 1; hr = IDXGIOutput_GetDisplayModeList(output, DXGI_FORMAT_R8G8B8A8_UNORM, DXGI_ENUM_MODES_SCALING, &mode_count, modes); - ok(hr == DXGI_ERROR_MORE_DATA, "Got unexpected hr %#x.\n", hr); + ok(hr == DXGI_ERROR_MORE_DATA, "Got unexpected hr %#lx.\n", hr); ok(mode_count == mode_count_comp - 1, "Got unexpected mode_count %u, expected %u.\n", mode_count, mode_count_comp - 1); } @@ -1519,7 +1519,7 @@ static void test_output(void) IDXGIOutput_Release(output); IDXGIAdapter_Release(adapter); refcount = IDXGIDevice_Release(device); - ok(!refcount, "Device has %u references left.\n", refcount); + ok(!refcount, "Device has %lu references left.\n", refcount); }
static void test_find_closest_matching_mode(void) @@ -1544,7 +1544,7 @@ static void test_find_closest_matching_mode(void) }
hr = IDXGIDevice_GetAdapter(device, &adapter); - ok(SUCCEEDED(hr), "GetAdapter failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "GetAdapter failed, hr %#lx.\n", hr);
hr = IDXGIAdapter_EnumOutputs(adapter, 0, &output); if (hr == DXGI_ERROR_NOT_FOUND) @@ -1554,12 +1554,12 @@ static void test_find_closest_matching_mode(void) IDXGIDevice_Release(device); return; } - ok(SUCCEEDED(hr), "EnumOutputs failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "EnumOutputs failed, hr %#lx.\n", hr);
memset(&mode, 0, sizeof(mode)); hr = IDXGIOutput_FindClosestMatchingMode(output, &mode, &matching_mode, NULL); ok(hr == DXGI_ERROR_INVALID_CALL || broken(hr == DXGI_ERROR_NOT_CURRENTLY_AVAILABLE), /* Win 7 testbot */ - "Got unexpected hr %#x.\n", hr); + "Got unexpected hr %#lx.\n", hr); if (hr == DXGI_ERROR_NOT_CURRENTLY_AVAILABLE) { win_skip("FindClosestMatchingMode() not supported.\n"); @@ -1568,42 +1568,42 @@ static void test_find_closest_matching_mode(void)
memset(&mode, 0, sizeof(mode)); hr = IDXGIOutput_FindClosestMatchingMode(output, &mode, &matching_mode, (IUnknown *)device); - 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 = IDXGIOutput_GetDisplayModeList(output, DXGI_FORMAT_R8G8B8A8_UNORM, 0, &mode_count, NULL); - ok(SUCCEEDED(hr), "Failed to list modes, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to list modes, hr %#lx.\n", hr);
modes = heap_calloc(mode_count, sizeof(*modes)); ok(!!modes, "Failed to allocate memory.\n");
hr = IDXGIOutput_GetDisplayModeList(output, DXGI_FORMAT_R8G8B8A8_UNORM, 0, &mode_count, modes); - ok(SUCCEEDED(hr), "Failed to list modes, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to list modes, hr %#lx.\n", hr);
for (i = 0; i < mode_count; ++i) { mode = modes[i]; hr = IDXGIOutput_FindClosestMatchingMode(output, &mode, &matching_mode, NULL); - ok(hr == S_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr); check_mode_desc(&matching_mode, &modes[i], MODE_DESC_IGNORE_SCALING);
mode.Format = DXGI_FORMAT_UNKNOWN; hr = IDXGIOutput_FindClosestMatchingMode(output, &mode, &matching_mode, NULL); - ok(hr == DXGI_ERROR_INVALID_CALL, "Got unexpected hr %#x.\n", hr); + ok(hr == DXGI_ERROR_INVALID_CALL, "Got unexpected hr %#lx.\n", hr);
mode = modes[i]; mode.Width = 0; hr = IDXGIOutput_FindClosestMatchingMode(output, &mode, &matching_mode, NULL); - ok(hr == DXGI_ERROR_INVALID_CALL, "Got unexpected hr %#x.\n", hr); + ok(hr == DXGI_ERROR_INVALID_CALL, "Got unexpected hr %#lx.\n", hr);
mode = modes[i]; mode.Height = 0; hr = IDXGIOutput_FindClosestMatchingMode(output, &mode, &matching_mode, NULL); - ok(hr == DXGI_ERROR_INVALID_CALL, "Got unexpected hr %#x.\n", hr); + ok(hr == DXGI_ERROR_INVALID_CALL, "Got unexpected hr %#lx.\n", hr);
mode = modes[i]; mode.Width = mode.Height = 0; hr = IDXGIOutput_FindClosestMatchingMode(output, &mode, &matching_mode, NULL); - ok(hr == S_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr); check_mode_desc(&matching_mode, &modes[i], MODE_DESC_IGNORE_SCALING | MODE_DESC_IGNORE_RESOLUTION); ok(matching_mode.Width > 0 && matching_mode.Height > 0, "Got unexpected resolution %ux%u.\n", matching_mode.Width, matching_mode.Height); @@ -1611,7 +1611,7 @@ static void test_find_closest_matching_mode(void) mode = modes[i]; mode.RefreshRate.Numerator = mode.RefreshRate.Denominator = 0; hr = IDXGIOutput_FindClosestMatchingMode(output, &mode, &matching_mode, NULL); - ok(hr == S_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr); check_mode_desc(&matching_mode, &modes[i], MODE_DESC_IGNORE_SCALING | MODE_DESC_IGNORE_REFRESH_RATE); ok(matching_mode.RefreshRate.Numerator > 0 && matching_mode.RefreshRate.Denominator > 0, "Got unexpected refresh rate %u / %u.\n", @@ -1620,7 +1620,7 @@ static void test_find_closest_matching_mode(void) mode = modes[i]; mode.ScanlineOrdering = DXGI_MODE_SCANLINE_ORDER_UNSPECIFIED; hr = IDXGIOutput_FindClosestMatchingMode(output, &mode, &matching_mode, NULL); - ok(hr == S_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr); check_mode_desc(&matching_mode, &modes[i], MODE_DESC_IGNORE_SCALING | MODE_DESC_IGNORE_SCANLINE_ORDERING); ok(matching_mode.ScanlineOrdering, "Got unexpected scanline ordering %#x.\n", matching_mode.ScanlineOrdering); @@ -1630,7 +1630,7 @@ static void test_find_closest_matching_mode(void) mode.Height = modes[i].Height; mode.Format = DXGI_FORMAT_R8G8B8A8_UNORM; hr = IDXGIOutput_FindClosestMatchingMode(output, &mode, &matching_mode, NULL); - ok(hr == S_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr); check_mode_desc(&matching_mode, &modes[i], MODE_DESC_CHECK_RESOLUTION & MODE_DESC_CHECK_FORMAT);
memset(&mode, 0, sizeof(mode)); @@ -1638,7 +1638,7 @@ static void test_find_closest_matching_mode(void) mode.Height = modes[i].Height - 1; mode.Format = DXGI_FORMAT_R8G8B8A8_UNORM; hr = IDXGIOutput_FindClosestMatchingMode(output, &mode, &matching_mode, NULL); - ok(hr == S_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr); check_mode_desc(&matching_mode, &modes[i], (MODE_DESC_CHECK_RESOLUTION & MODE_DESC_CHECK_FORMAT) | MODE_DESC_IGNORE_EXACT_RESOLUTION);
@@ -1647,7 +1647,7 @@ static void test_find_closest_matching_mode(void) mode.Height = modes[i].Height + 1; mode.Format = DXGI_FORMAT_R8G8B8A8_UNORM; hr = IDXGIOutput_FindClosestMatchingMode(output, &mode, &matching_mode, NULL); - ok(hr == S_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr); check_mode_desc(&matching_mode, &modes[i], (MODE_DESC_CHECK_RESOLUTION & MODE_DESC_CHECK_FORMAT) | MODE_DESC_IGNORE_EXACT_RESOLUTION); } @@ -1656,7 +1656,7 @@ static void test_find_closest_matching_mode(void) mode.Width = mode.Height = 10; mode.Format = DXGI_FORMAT_R8G8B8A8_UNORM; hr = IDXGIOutput_FindClosestMatchingMode(output, &mode, &matching_mode, NULL); - ok(hr == S_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr); /* Find mode for the lowest resolution. */ mode = modes[0]; for (i = 0; i < mode_count; ++i) @@ -1672,7 +1672,7 @@ static void test_find_closest_matching_mode(void) mode.Format = modes[0].Format; mode.ScanlineOrdering = DXGI_MODE_SCANLINE_ORDER_UPPER_FIELD_FIRST; hr = IDXGIOutput_FindClosestMatchingMode(output, &mode, &matching_mode, NULL); - ok(hr == S_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr); check_mode_desc(&matching_mode, &modes[0], MODE_DESC_CHECK_RESOLUTION & MODE_DESC_CHECK_FORMAT);
memset(&mode, 0, sizeof(mode)); @@ -1681,7 +1681,7 @@ static void test_find_closest_matching_mode(void) mode.Format = modes[0].Format; mode.ScanlineOrdering = DXGI_MODE_SCANLINE_ORDER_LOWER_FIELD_FIRST; hr = IDXGIOutput_FindClosestMatchingMode(output, &mode, &matching_mode, NULL); - ok(hr == S_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr); check_mode_desc(&matching_mode, &modes[0], MODE_DESC_CHECK_RESOLUTION & MODE_DESC_CHECK_FORMAT);
for (i = 0; i < ARRAY_SIZE(scaling_tests); ++i) @@ -1697,7 +1697,7 @@ static void test_find_closest_matching_mode(void) mode.Format = modes[j].Format; mode.Scaling = modes[j].Scaling; hr = IDXGIOutput_FindClosestMatchingMode(output, &mode, &matching_mode, 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); check_mode_desc(&matching_mode, &modes[j], MODE_DESC_IGNORE_REFRESH_RATE | MODE_DESC_IGNORE_SCANLINE_ORDERING); break; @@ -1710,7 +1710,7 @@ done: IDXGIOutput_Release(output); IDXGIAdapter_Release(adapter); refcount = IDXGIDevice_Release(device); - ok(!refcount, "Device has %u references left.\n", refcount); + ok(!refcount, "Device has %lu references left.\n", refcount); }
struct refresh_rates @@ -1777,87 +1777,87 @@ static void test_create_swapchain(void) ok(hr == S_OK, "IDXGIDevice does not implement IUnknown.\n");
hr = IDXGIDevice_GetAdapter(device, &adapter); - ok(hr == S_OK, "Failed to get adapter, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get adapter, hr %#lx.\n", hr);
hr = IDXGIAdapter_GetParent(adapter, &IID_IDXGIFactory, (void **)&factory); - ok(hr == S_OK, "Failed to get parent, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get parent, hr %#lx.\n", hr);
expected_refcount = get_refcount(adapter); refcount = get_refcount(factory); - ok(refcount == 2, "Got unexpected refcount %u.\n", refcount); + ok(refcount == 2, "Got unexpected refcount %lu.\n", refcount); refcount = get_refcount(device); - ok(refcount == 2, "Got unexpected refcount %u.\n", refcount); + ok(refcount == 2, "Got unexpected refcount %lu.\n", refcount);
creation_desc.OutputWindow = NULL; hr = IDXGIFactory_CreateSwapChain(factory, obj, &creation_desc, &swapchain); - ok(hr == DXGI_ERROR_INVALID_CALL, "Got unexpected hr %#x.\n", hr); + ok(hr == DXGI_ERROR_INVALID_CALL, "Got unexpected hr %#lx.\n", hr);
creation_desc.OutputWindow = CreateWindowA("static", "dxgi_test", 0, 0, 0, 0, 0, 0, 0, 0, 0); memset(&initial_state, 0, sizeof(initial_state)); capture_fullscreen_state(&initial_state.fullscreen_state, creation_desc.OutputWindow);
hr = IDXGIFactory_CreateSwapChain(factory, NULL, &creation_desc, &swapchain); - ok(hr == DXGI_ERROR_INVALID_CALL, "Got unexpected hr %#x.\n", hr); + ok(hr == DXGI_ERROR_INVALID_CALL, "Got unexpected hr %#lx.\n", hr); hr = IDXGIFactory_CreateSwapChain(factory, obj, NULL, &swapchain); - ok(hr == DXGI_ERROR_INVALID_CALL, "Got unexpected hr %#x.\n", hr); + ok(hr == DXGI_ERROR_INVALID_CALL, "Got unexpected hr %#lx.\n", hr); hr = IDXGIFactory_CreateSwapChain(factory, obj, &creation_desc, NULL); - ok(hr == DXGI_ERROR_INVALID_CALL, "Got unexpected hr %#x.\n", hr); + ok(hr == DXGI_ERROR_INVALID_CALL, "Got unexpected hr %#lx.\n", hr); hr = IDXGIFactory_CreateSwapChain(factory, obj, &creation_desc, &swapchain); - ok(hr == S_OK, "Failed to create swapchain, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create swapchain, hr %#lx.\n", hr);
refcount = get_refcount(adapter); - ok(refcount >= expected_refcount, "Got refcount %u, expected >= %u.\n", refcount, expected_refcount); + ok(refcount >= expected_refcount, "Got refcount %lu, expected >= %lu.\n", refcount, expected_refcount); refcount = get_refcount(factory); - todo_wine ok(refcount == 4, "Got unexpected refcount %u.\n", refcount); + todo_wine ok(refcount == 4, "Got unexpected refcount %lu.\n", refcount); refcount = get_refcount(device); - ok(refcount == 3, "Got unexpected refcount %u.\n", refcount); + ok(refcount == 3, "Got unexpected refcount %lu.\n", refcount);
hr = IDXGISwapChain_GetDesc(swapchain, NULL); - ok(hr == E_INVALIDARG, "GetDesc unexpectedly returned %#x.\n", hr); + ok(hr == E_INVALIDARG, "GetDesc unexpectedly returned %#lx.\n", hr);
hr = IDXGISwapChain_GetParent(swapchain, &IID_IUnknown, (void **)&parent); - ok(hr == S_OK, "Failed to get parent,%#x.\n", hr); + ok(hr == S_OK, "Failed to get parent,%#lx.\n", hr); ok(parent == (IUnknown *)factory, "Got unexpected parent interface pointer %p.\n", parent); refcount = IUnknown_Release(parent); - todo_wine ok(refcount == 4, "Got unexpected refcount %u.\n", refcount); + todo_wine ok(refcount == 4, "Got unexpected refcount %lu.\n", refcount);
hr = IDXGISwapChain_GetParent(swapchain, &IID_IDXGIFactory, (void **)&parent); - ok(hr == S_OK, "Failed to get parent,%#x.\n", hr); + ok(hr == S_OK, "Failed to get parent,%#lx.\n", hr); ok(parent == (IUnknown *)factory, "Got unexpected parent interface pointer %p.\n", parent); refcount = IUnknown_Release(parent); - todo_wine ok(refcount == 4, "Got unexpected refcount %u.\n", refcount); + todo_wine ok(refcount == 4, "Got unexpected refcount %lu.\n", refcount);
hr = IDXGISwapChain_QueryInterface(swapchain, &IID_IDXGISwapChain1, (void **)&swapchain1); ok(hr == S_OK || broken(hr == E_NOINTERFACE) /* Not available on all Windows versions. */, - "Failed to query IDXGISwapChain1 interface, hr %#x.\n", hr); + "Failed to query IDXGISwapChain1 interface, hr %#lx.\n", hr); if (SUCCEEDED(hr)) { hr = IDXGISwapChain1_GetDesc1(swapchain1, NULL); - ok(hr == E_INVALIDARG, "Got unexpected hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Got unexpected hr %#lx.\n", hr); hr = IDXGISwapChain1_GetDesc1(swapchain1, &swapchain_desc); - ok(hr == S_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr); ok(!swapchain_desc.Stereo, "Got unexpected stereo %#x.\n", swapchain_desc.Stereo); ok(swapchain_desc.Scaling == DXGI_SCALING_STRETCH, "Got unexpected scaling %#x.\n", swapchain_desc.Scaling); ok(swapchain_desc.AlphaMode == DXGI_ALPHA_MODE_IGNORE, "Got unexpected alpha mode %#x.\n", swapchain_desc.AlphaMode); hr = IDXGISwapChain1_GetFullscreenDesc(swapchain1, NULL); - ok(hr == E_INVALIDARG, "Got unexpected hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Got unexpected hr %#lx.\n", hr); hr = IDXGISwapChain1_GetFullscreenDesc(swapchain1, &fullscreen_desc); - ok(hr == S_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr); ok(fullscreen_desc.Windowed == creation_desc.Windowed, "Got unexpected windowed %#x.\n", fullscreen_desc.Windowed); hr = IDXGISwapChain1_GetHwnd(swapchain1, &window); - ok(hr == S_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr); ok(window == creation_desc.OutputWindow, "Got unexpected window %p.\n", window); IDXGISwapChain1_Release(swapchain1); }
refcount = IDXGISwapChain_Release(swapchain); - ok(!refcount, "Swapchain has %u references left.\n", refcount); + ok(!refcount, "Swapchain has %lu references left.\n", refcount);
refcount = get_refcount(factory); - ok(refcount == 2, "Got unexpected refcount %u.\n", refcount); + ok(refcount == 2, "Got unexpected refcount %lu.\n", refcount);
for (i = 0; i < ARRAY_SIZE(refresh_list); ++i) { @@ -1865,10 +1865,10 @@ static void test_create_swapchain(void) creation_desc.BufferDesc.RefreshRate.Denominator = refresh_list[i].denominator;
hr = IDXGIFactory_CreateSwapChain(factory, obj, &creation_desc, &swapchain); - ok(hr == S_OK, "Test %u: Failed to create swapchain, hr %#x.\n", i, hr); + ok(hr == S_OK, "Test %u: Failed to create swapchain, hr %#lx.\n", i, hr);
hr = IDXGISwapChain_GetDesc(swapchain, &result_desc); - ok(hr == S_OK, "Test %u: Failed to get swapchain desc, hr %#x.\n", i, hr); + ok(hr == S_OK, "Test %u: Failed to get swapchain desc, hr %#lx.\n", i, hr);
ok(result_desc.Windowed == creation_desc.Windowed, "Test %u: Got unexpected windowed %#x.\n", i, result_desc.Windowed); @@ -1884,19 +1884,19 @@ static void test_create_swapchain(void) fullscreen = 0xdeadbeef; target = (void *)0xdeadbeef; hr = IDXGISwapChain_GetFullscreenState(swapchain, &fullscreen, &target); - ok(hr == S_OK, "Test %u: Failed to get fullscreen state, hr %#x.\n", i, hr); + ok(hr == S_OK, "Test %u: Failed to get fullscreen state, hr %#lx.\n", i, hr); ok(!fullscreen, "Test %u: Got unexpected fullscreen %#x.\n", i, fullscreen); ok(!target, "Test %u: Got unexpected target %p.\n", i, target);
hr = IDXGISwapChain_GetFullscreenState(swapchain, 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); fullscreen = 0xdeadbeef; hr = IDXGISwapChain_GetFullscreenState(swapchain, &fullscreen, 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); ok(!fullscreen, "Test %u: Got unexpected fullscreen %#x.\n", i, fullscreen); target = (void *)0xdeadbeef; hr = IDXGISwapChain_GetFullscreenState(swapchain, NULL, &target); - 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); ok(!target, "Test %u: Got unexpected target %p.\n", i, target);
check_swapchain_fullscreen_state(swapchain, &initial_state); @@ -1913,7 +1913,7 @@ static void test_create_swapchain(void) ok(hr == S_OK, "IDXGIDevice does not implement IUnknown.\n");
hr = IDXGIFactory_CreateSwapChain(factory, obj2, &creation_desc, &swapchain); - ok(hr == S_OK, "Failed to create swapchain, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create swapchain, hr %#lx.\n", hr);
hr = IDXGISwapChain_GetBuffer(swapchain, 0, &IID_IDXGISurface1, (void **)&surface); if (SUCCEEDED(hr)) @@ -1921,7 +1921,7 @@ static void test_create_swapchain(void) HDC hdc;
hr = IDXGISurface1_GetDC(surface, FALSE, &hdc); - ok(FAILED(hr), "Expected GetDC() to fail, %#x\n", hr); + ok(FAILED(hr), "Expected GetDC() to fail, %#lx\n", hr);
IDXGISurface1_Release(surface); IDXGISwapChain_Release(swapchain); @@ -1930,16 +1930,16 @@ static void test_create_swapchain(void) creation_desc.Flags = DXGI_SWAP_CHAIN_FLAG_GDI_COMPATIBLE;
hr = IDXGIFactory_CreateSwapChain(factory, obj2, &creation_desc, &swapchain); - ok(hr == S_OK, "Failed to create swapchain, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create swapchain, hr %#lx.\n", hr);
creation_desc.BufferDesc.Format = DXGI_FORMAT_R8G8B8A8_UNORM; creation_desc.Flags = 0;
hr = IDXGISwapChain_GetBuffer(swapchain, 0, &IID_IDXGISurface1, (void **)&surface); - ok(hr == S_OK, "Failed to get front buffer, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get front buffer, hr %#lx.\n", hr);
hr = IDXGISurface1_GetDC(surface, FALSE, &hdc); - ok(hr == S_OK, "Expected GetDC() to succeed, %#x\n", hr); + ok(hr == S_OK, "Expected GetDC() to succeed, %#lx\n", hr); IDXGISurface1_ReleaseDC(surface, NULL);
IDXGISurface1_Release(surface); @@ -1961,10 +1961,10 @@ static void test_create_swapchain(void) creation_desc.BufferDesc.RefreshRate.Denominator = refresh_list[i].denominator;
hr = IDXGIFactory_CreateSwapChain(factory, obj, &creation_desc, &swapchain); - ok(SUCCEEDED(hr), "Test %u: Failed to create swapchain, hr %#x.\n", i, hr); + ok(SUCCEEDED(hr), "Test %u: Failed to create swapchain, hr %#lx.\n", i, hr);
hr = IDXGISwapChain_GetDesc(swapchain, &result_desc); - ok(hr == S_OK, "Test %u: Failed to get swapchain desc, hr %#x.\n", i, hr); + ok(hr == S_OK, "Test %u: Failed to get swapchain desc, hr %#lx.\n", i, hr);
/* When numerator is non-zero and denominator is zero, the windowed mode is used. * Additionally, some versions of WARP seem to always fail to change fullscreen state. */ @@ -1982,7 +1982,7 @@ static void test_create_swapchain(void) fullscreen = FALSE; target = NULL; hr = IDXGISwapChain_GetFullscreenState(swapchain, &fullscreen, &target); - ok(hr == S_OK, "Test %u: Failed to get fullscreen state, hr %#x.\n", i, hr); + ok(hr == S_OK, "Test %u: Failed to get fullscreen state, hr %#lx.\n", i, hr); ok(fullscreen == !result_desc.Windowed, "Test %u: Got fullscreen %#x, expected %#x.\n", i, fullscreen, result_desc.Windowed); ok(result_desc.Windowed ? !target : !!target, "Test %u: Got unexpected target %p.\n", i, target); @@ -1990,7 +1990,7 @@ static void test_create_swapchain(void) { IDXGIOutput *containing_output; hr = IDXGISwapChain_GetContainingOutput(swapchain, &containing_output); - ok(hr == S_OK, "Test %u: Failed to get containing output, hr %#x.\n", i, hr); + ok(hr == S_OK, "Test %u: Failed to get containing output, hr %#lx.\n", i, hr); ok(containing_output == target, "Test %u: Got unexpected containing output pointer %p.\n", i, containing_output); IDXGIOutput_Release(containing_output); @@ -2001,25 +2001,25 @@ static void test_create_swapchain(void) IDXGIOutput_Release(target);
hr = IDXGISwapChain_GetFullscreenState(swapchain, 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); fullscreen = FALSE; hr = IDXGISwapChain_GetFullscreenState(swapchain, &fullscreen, 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); ok(fullscreen, "Test %u: Got unexpected fullscreen %#x.\n", i, fullscreen); target = NULL; hr = IDXGISwapChain_GetFullscreenState(swapchain, NULL, &target); - 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); ok(!!target, "Test %u: Got unexpected target %p.\n", i, target); IDXGIOutput_Release(target); }
hr = IDXGISwapChain_SetFullscreenState(swapchain, FALSE, NULL); - ok(hr == S_OK, "Test %u: Failed to set fullscreen state, hr %#x.\n", i, hr); + ok(hr == S_OK, "Test %u: Failed to set fullscreen state, hr %#lx.\n", i, hr);
fullscreen = 0xdeadbeef; target = (void *)0xdeadbeef; hr = IDXGISwapChain_GetFullscreenState(swapchain, &fullscreen, &target); - ok(hr == S_OK, "Test %u: Failed to get fullscreen state, hr %#x.\n", i, hr); + ok(hr == S_OK, "Test %u: Failed to get fullscreen state, hr %#lx.\n", i, hr); ok(!fullscreen, "Test %u: Got unexpected fullscreen %#x.\n", i, fullscreen); ok(!target, "Test %u: Got unexpected target %p.\n", i, target);
@@ -2034,16 +2034,16 @@ static void test_create_swapchain(void) creation_desc.Windowed = TRUE; creation_desc.Flags = 0; hr = IDXGIFactory_CreateSwapChain(factory, obj, &creation_desc, &swapchain); - ok(hr == E_INVALIDARG, "Got unexpected hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Got unexpected hr %#lx.\n", hr);
creation_desc.Windowed = FALSE; hr = IDXGIFactory_CreateSwapChain(factory, obj, &creation_desc, &swapchain); - ok(hr == E_INVALIDARG, "Got unexpected hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Got unexpected hr %#lx.\n", hr);
creation_desc.BufferCount = 2; creation_desc.SwapEffect = DXGI_SWAP_EFFECT_FLIP_DISCARD; hr = IDXGIFactory_CreateSwapChain(factory, obj, &creation_desc, &swapchain); - ok(hr == E_INVALIDARG || hr == DXGI_ERROR_INVALID_CALL, "Got unexpected hr %#x.\n", hr); + ok(hr == E_INVALIDARG || hr == DXGI_ERROR_INVALID_CALL, "Got unexpected hr %#lx.\n", hr); creation_desc.BufferCount = 1; creation_desc.SwapEffect = DXGI_SWAP_EFFECT_DISCARD;
@@ -2063,9 +2063,9 @@ static void test_create_swapchain(void) creation_desc.Windowed = TRUE; creation_desc.Flags = 0; hr = IDXGIFactory_CreateSwapChain(factory, obj, &creation_desc, &swapchain); - ok(hr == S_OK, "Failed to create swapchain, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create swapchain, hr %#lx.\n", hr); hr = IDXGISwapChain_GetDesc(swapchain, &result_desc); - ok(hr == S_OK, "Failed to get swapchain desc, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get swapchain desc, hr %#lx.\n", hr); ok(result_desc.BufferDesc.Width == expected_width, "Got width %u, expected %u.\n", result_desc.BufferDesc.Width, expected_width); ok(result_desc.BufferDesc.Height == expected_height, "Got height %u, expected %u.\n", @@ -2087,9 +2087,9 @@ static void test_create_swapchain(void) creation_desc.BufferDesc.Width = 0; creation_desc.BufferDesc.Height = 0; hr = IDXGIFactory_CreateSwapChain(factory, obj, &creation_desc, &swapchain); - ok(hr == S_OK, "Failed to create swapchain, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create swapchain, hr %#lx.\n", hr); hr = IDXGISwapChain_GetDesc(swapchain, &result_desc); - ok(hr == S_OK, "Failed to get swapchain desc, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get swapchain desc, hr %#lx.\n", hr); ok(result_desc.BufferDesc.Width == expected_width, "Got width %u, expected %u.\n", result_desc.BufferDesc.Width, expected_width); ok(result_desc.BufferDesc.Height == expected_height, "Got height %u, expected %u.\n", @@ -2110,9 +2110,9 @@ static void test_create_swapchain(void) creation_desc.BufferDesc.Width = 0; creation_desc.BufferDesc.Height = 0; hr = IDXGIFactory_CreateSwapChain(factory, obj, &creation_desc, &swapchain); - ok(hr == S_OK, "Failed to create swapchain, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create swapchain, hr %#lx.\n", hr); hr = IDXGISwapChain_GetDesc(swapchain, &result_desc); - ok(hr == S_OK, "Failed to get swapchain desc, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get swapchain desc, hr %#lx.\n", hr); ok(result_desc.BufferDesc.Width == expected_width, "Got width %u, expected %u.\n", result_desc.BufferDesc.Width, expected_width); ok(result_desc.BufferDesc.Height == expected_height, "Got height %u, expected %u.\n", @@ -2127,14 +2127,14 @@ static void test_create_swapchain(void) /* Fullscreen */ creation_desc.Windowed = FALSE; hr = IDXGIFactory_CreateSwapChain(factory, obj, &creation_desc, &swapchain); - ok(SUCCEEDED(hr), "Failed to create swapchain, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create swapchain, hr %#lx.\n", hr); hr = IDXGISwapChain_GetDesc(swapchain, &result_desc); - ok(hr == S_OK, "Failed to get swapchain desc, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get swapchain desc, hr %#lx.\n", hr); hr = IDXGISwapChain_SetFullscreenState(swapchain, FALSE, NULL); - ok(hr == S_OK, "Failed to set fullscreen state, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to set fullscreen state, hr %#lx.\n", hr); hr = IDXGISwapChain_GetContainingOutput(swapchain, &expected_state.target); ok(hr == S_OK || broken(hr == DXGI_ERROR_UNSUPPORTED) /* Win 7 testbot */, - "Failed to get containing output, hr %#x.\n", hr); + "Failed to get containing output, hr %#lx.\n", hr); check_swapchain_fullscreen_state(swapchain, &initial_state); IDXGISwapChain_Release(swapchain); if (hr == DXGI_ERROR_UNSUPPORTED) @@ -2159,16 +2159,16 @@ static void test_create_swapchain(void) expected_height = expected_client_rect->bottom - expected_client_rect->top;
hr = IDXGIFactory_CreateSwapChain(factory, obj, &creation_desc, &swapchain); - ok(hr == S_OK, "Failed to create swapchain, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create swapchain, hr %#lx.\n", hr); hr = IDXGISwapChain_GetDesc(swapchain, &result_desc); - ok(hr == S_OK, "Failed to get swapchain desc, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get swapchain desc, hr %#lx.\n", hr); todo_wine ok(result_desc.BufferDesc.Width == expected_width, "Got width %u, expected %u.\n", result_desc.BufferDesc.Width, expected_width); todo_wine ok(result_desc.BufferDesc.Height == expected_height, "Got height %u, expected %u.\n", result_desc.BufferDesc.Height, expected_height); check_swapchain_fullscreen_state(swapchain, &expected_state); hr = IDXGISwapChain_SetFullscreenState(swapchain, FALSE, NULL); - ok(hr == S_OK, "Failed to set fullscreen state, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to set fullscreen state, hr %#lx.\n", hr); check_swapchain_fullscreen_state(swapchain, &initial_state); IDXGISwapChain_Release(swapchain);
@@ -2183,16 +2183,16 @@ static void test_create_swapchain(void) expected_height = expected_client_rect->bottom - expected_client_rect->top;
hr = IDXGIFactory_CreateSwapChain(factory, obj, &creation_desc, &swapchain); - ok(hr == S_OK, "Failed to create swapchain, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create swapchain, hr %#lx.\n", hr); hr = IDXGISwapChain_GetDesc(swapchain, &result_desc); - ok(hr == S_OK, "Failed to get swapchain desc, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get swapchain desc, hr %#lx.\n", hr); todo_wine ok(result_desc.BufferDesc.Width == expected_width, "Got width %u, expected %u.\n", result_desc.BufferDesc.Width, expected_width); todo_wine ok(result_desc.BufferDesc.Height == expected_height, "Got height %u, expected %u.\n", result_desc.BufferDesc.Height, expected_height); check_swapchain_fullscreen_state(swapchain, &expected_state); hr = IDXGISwapChain_SetFullscreenState(swapchain, FALSE, NULL); - ok(hr == S_OK, "Failed to set fullscreen state, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to set fullscreen state, hr %#lx.\n", hr); check_swapchain_fullscreen_state(swapchain, &initial_state); IDXGISwapChain_Release(swapchain);
@@ -2201,11 +2201,11 @@ static void test_create_swapchain(void) done: IUnknown_Release(obj); refcount = IDXGIDevice_Release(device); - ok(!refcount, "Device has %u references left.\n", refcount); + ok(!refcount, "Device has %lu references left.\n", refcount); refcount = IDXGIAdapter_Release(adapter); - ok(!refcount, "Adapter has %u references left.\n", refcount); + ok(!refcount, "Adapter has %lu references left.\n", refcount); refcount = IDXGIFactory_Release(factory); - ok(!refcount, "Factory has %u references left.\n", refcount); + ok(!refcount, "Factory has %lu references left.\n", refcount); check_window_fullscreen_state(creation_desc.OutputWindow, &initial_state.fullscreen_state); DestroyWindow(creation_desc.OutputWindow); } @@ -2238,7 +2238,7 @@ static void test_get_containing_output(IUnknown *device, BOOL is_d3d12) output_count = 0; while ((hr = IDXGIAdapter_EnumOutputs(adapter, output_count, &output)) != DXGI_ERROR_NOT_FOUND) { - ok(SUCCEEDED(hr), "Failed to enumerate output %u, hr %#x.\n", output_count, hr); + ok(SUCCEEDED(hr), "Failed to enumerate output %u, hr %#lx.\n", output_count, hr); IDXGIOutput_Release(output); ++output_count; } @@ -2263,7 +2263,7 @@ static void test_get_containing_output(IUnknown *device, BOOL is_d3d12)
get_factory(device, is_d3d12, &factory); hr = IDXGIFactory_CreateSwapChain(factory, device, &swapchain_desc, &swapchain); - ok(SUCCEEDED(hr), "CreateSwapChain failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "CreateSwapChain failed, hr %#lx.\n", hr);
monitor = MonitorFromWindow(swapchain_desc.OutputWindow, 0); ok(!!monitor, "MonitorFromWindow failed.\n"); @@ -2274,7 +2274,7 @@ static void test_get_containing_output(IUnknown *device, BOOL is_d3d12)
hr = IDXGISwapChain_GetContainingOutput(swapchain, &output); ok(SUCCEEDED(hr) || broken(hr == DXGI_ERROR_UNSUPPORTED) /* Win 7 testbot */, - "GetContainingOutput failed, hr %#x.\n", hr); + "GetContainingOutput failed, hr %#lx.\n", hr); if (hr == DXGI_ERROR_UNSUPPORTED) { win_skip("GetContainingOutput() not supported.\n"); @@ -2282,17 +2282,17 @@ static void test_get_containing_output(IUnknown *device, BOOL is_d3d12) }
hr = IDXGIOutput_GetDesc(output, &output_desc); - ok(SUCCEEDED(hr), "GetDesc failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "GetDesc failed, hr %#lx.\n", hr);
hr = IDXGISwapChain_GetContainingOutput(swapchain, &output2); - ok(SUCCEEDED(hr), "GetContainingOutput failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "GetContainingOutput failed, hr %#lx.\n", hr); ok(output != output2, "Got unexpected output pointers %p, %p.\n", output, output2); check_output_equal(output, output2);
refcount = IDXGIOutput_Release(output); - ok(!refcount, "IDXGIOutput has %u references left.\n", refcount); + ok(!refcount, "IDXGIOutput has %lu references left.\n", refcount); refcount = IDXGIOutput_Release(output2); - ok(!refcount, "IDXGIOutput has %u references left.\n", refcount); + ok(!refcount, "IDXGIOutput has %lu references left.\n", refcount);
ok(!lstrcmpW(output_desc.DeviceName, monitor_info.szDevice), "Got unexpected device name %s, expected %s.\n", @@ -2309,7 +2309,7 @@ static void test_get_containing_output(IUnknown *device, BOOL is_d3d12) ++output_idx) { hr = IDXGIOutput_GetDesc(output, &output_desc); - ok(SUCCEEDED(hr), "Adapter %u output %u: GetDesc failed, hr %#x.\n", adapter_idx, + ok(SUCCEEDED(hr), "Adapter %u output %u: GetDesc failed, hr %#lx.\n", adapter_idx, output_idx, hr);
/* Move the OutputWindow to the current output. */ @@ -2320,7 +2320,7 @@ static void test_get_containing_output(IUnknown *device, BOOL is_d3d12) hr = IDXGISwapChain_GetContainingOutput(swapchain, &output2); if (FAILED(hr)) { - win_skip("Adapter %u output %u: GetContainingOutput failed, hr %#x.\n", + win_skip("Adapter %u output %u: GetContainingOutput failed, hr %#lx.\n", adapter_idx, output_idx, hr); IDXGIOutput_Release(output); continue; @@ -2329,7 +2329,7 @@ static void test_get_containing_output(IUnknown *device, BOOL is_d3d12) check_output_equal(output, output2);
refcount = IDXGIOutput_Release(output2); - ok(!refcount, "Adapter %u output %u: IDXGIOutput has %u references left.\n", + ok(!refcount, "Adapter %u output %u: IDXGIOutput has %lu references left.\n", adapter_idx, output_idx, refcount);
/* Move the OutputWindow around the corners of the current output desktop coordinates. */ @@ -2393,17 +2393,17 @@ static void test_get_containing_output(IUnknown *device, BOOL is_d3d12)
hr = IDXGISwapChain_GetContainingOutput(swapchain, &output2); ok(hr == S_OK || broken(hr == DXGI_ERROR_UNSUPPORTED), - "Adapter %u output %u point %u: Failed to get containing output, hr %#x.\n", + "Adapter %u output %u point %u: Failed to get containing output, hr %#lx.\n", adapter_idx, output_idx, i, hr); if (hr != S_OK) continue; ok(!!output2, "Adapter %u output %u point %u: Got unexpected containing output %p.\n", adapter_idx, output_idx, i, output2); hr = IDXGIOutput_GetDesc(output2, &output_desc); - ok(hr == S_OK, "Adapter %u output %u point %u: Failed to get output desc, hr %#x.\n", + ok(hr == S_OK, "Adapter %u output %u point %u: Failed to get output desc, hr %#lx.\n", adapter_idx, output_idx, i, hr); refcount = IDXGIOutput_Release(output2); - ok(!refcount, "Adapter %u output %u point %u: IDXGIOutput has %u references left.\n", + ok(!refcount, "Adapter %u output %u point %u: IDXGIOutput has %lu references left.\n", adapter_idx, output_idx, i, refcount);
ok(!lstrcmpW(output_desc.DeviceName, monitor_info.szDevice), @@ -2426,14 +2426,14 @@ static void test_get_containing_output(IUnknown *device, BOOL is_d3d12) hr = IDXGISwapChain_SetFullscreenState(swapchain, TRUE, NULL); if (FAILED(hr)) { - skip("SetFullscreenState failed, hr %#x.\n", hr); + skip("SetFullscreenState failed, hr %#lx.\n", hr); goto done; }
hr = IDXGISwapChain_GetContainingOutput(swapchain, &output2); if (FAILED(hr)) { - win_skip("GetContainingOutput failed, hr %#x.\n", hr); + win_skip("GetContainingOutput failed, hr %#lx.\n", hr); IDXGISwapChain_SetFullscreenState(swapchain, FALSE, NULL); goto done; } @@ -2445,7 +2445,7 @@ static void test_get_containing_output(IUnknown *device, BOOL is_d3d12) ++output_idx) { hr = IDXGIOutput_GetDesc(output, &output_desc); - ok(hr == S_OK, "Adapter %u output %u: GetDesc failed, hr %#x.\n", adapter_idx, + ok(hr == S_OK, "Adapter %u output %u: GetDesc failed, hr %#lx.\n", adapter_idx, output_idx, hr); IDXGIOutput_Release(output);
@@ -2455,7 +2455,7 @@ static void test_get_containing_output(IUnknown *device, BOOL is_d3d12) ok(ret, "Adapter %u output %u: SetWindowPos failed.\n", adapter_idx, output_idx);
hr = IDXGISwapChain_GetFullscreenState(swapchain, &fullscreen, &output); - ok(hr == S_OK, "Adapter %u output %u: GetFullscreenState failed, hr %#x.\n", + ok(hr == S_OK, "Adapter %u output %u: GetFullscreenState failed, hr %#lx.\n", adapter_idx, output_idx, hr); ok(fullscreen, "Adapter %u output %u: Expect swapchain full screen.\n", adapter_idx, output_idx); @@ -2464,7 +2464,7 @@ static void test_get_containing_output(IUnknown *device, BOOL is_d3d12) IDXGIOutput_Release(output);
hr = IDXGISwapChain_GetContainingOutput(swapchain, &output); - ok(hr == S_OK, "Adapter %u output %u: GetContainingOutput failed, hr %#x.\n", + ok(hr == S_OK, "Adapter %u output %u: GetContainingOutput failed, hr %#lx.\n", adapter_idx, output_idx, hr); ok(output == output2, "Adapter %u output %u: Expect output %p, got %p.\n", adapter_idx, output_idx, output2, output); @@ -2475,7 +2475,7 @@ static void test_get_containing_output(IUnknown *device, BOOL is_d3d12)
IDXGIOutput_Release(output2); hr = IDXGISwapChain_SetFullscreenState(swapchain, FALSE, NULL); - ok(hr == S_OK, "SetFullscreenState failed, hr %#x.\n", hr); + ok(hr == S_OK, "SetFullscreenState failed, hr %#lx.\n", hr);
/* Test GetContainingOutput after a full screen swapchain is made windowed by pressing * Alt+Enter, then move it to another output and use Alt+Enter to enter full screen */ @@ -2502,7 +2502,7 @@ static void test_get_containing_output(IUnknown *device, BOOL is_d3d12) IDXGIOutput_Release(output); if (FAILED(hr)) { - skip("SetFullscreenState failed, hr %#x.\n", hr); + skip("SetFullscreenState failed, hr %#lx.\n", hr); IDXGIOutput_Release(output2); goto done; } @@ -2512,12 +2512,12 @@ static void test_get_containing_output(IUnknown *device, BOOL is_d3d12) (MapVirtualKeyA(VK_RETURN, MAPVK_VK_TO_VSC) << 16) | 0x20000001); flush_events(); hr = IDXGISwapChain_GetFullscreenState(swapchain, &fullscreen, NULL); - ok(hr == S_OK, "GetFullscreenState failed, hr %#x.\n", hr); + ok(hr == S_OK, "GetFullscreenState failed, hr %#lx.\n", hr); ok(!fullscreen, "Expect swapchain not full screen.\n");
/* Move the swapchain output window to the second output */ hr = IDXGIOutput_GetDesc(output2, &output_desc2); - ok(hr == S_OK, "GetDesc failed, hr %#x.\n", hr); + ok(hr == S_OK, "GetDesc failed, hr %#lx.\n", hr); ret = SetWindowPos(swapchain_desc.OutputWindow, 0, output_desc2.DesktopCoordinates.left, output_desc2.DesktopCoordinates.top, 0, 0, SWP_NOSIZE | SWP_NOZORDER); ok(ret, "SetWindowPos failed.\n"); @@ -2528,13 +2528,13 @@ static void test_get_containing_output(IUnknown *device, BOOL is_d3d12) flush_events(); output = NULL; hr = IDXGISwapChain_GetFullscreenState(swapchain, &fullscreen, &output); - ok(hr == S_OK, "GetFullscreenState failed, hr %#x.\n", hr); + ok(hr == S_OK, "GetFullscreenState failed, hr %#lx.\n", hr); ok(fullscreen, "Expect swapchain full screen.\n"); ok(!!output, "Expect output not NULL.\n"); hr = IDXGIOutput_GetDesc(output, &output_desc); - ok(hr == S_OK, "GetDesc failed, hr %#x.\n", hr); + ok(hr == S_OK, "GetDesc failed, hr %#lx.\n", hr); hr = IDXGIOutput_GetDesc(output2, &output_desc2); - ok(hr == S_OK, "GetDesc failed, hr %#x.\n", hr); + ok(hr == S_OK, "GetDesc failed, hr %#lx.\n", hr); ok(!lstrcmpW(output_desc.DeviceName, output_desc2.DeviceName), "Expect device name %s, got %s.\n", wine_dbgstr_w(output_desc2.DeviceName), wine_dbgstr_w(output_desc.DeviceName)); @@ -2542,17 +2542,17 @@ static void test_get_containing_output(IUnknown *device, BOOL is_d3d12)
output = NULL; hr = IDXGISwapChain_GetContainingOutput(swapchain, &output); - ok(hr == S_OK, "GetContainingOutput failed, hr %#x.\n", hr); + ok(hr == S_OK, "GetContainingOutput failed, hr %#lx.\n", hr); hr = IDXGIOutput_GetDesc(output, &output_desc); - ok(hr == S_OK, "GetDesc failed, hr %#x.\n", hr); + ok(hr == S_OK, "GetDesc failed, hr %#lx.\n", hr); hr = IDXGIOutput_GetDesc(output2, &output_desc2); - ok(hr == S_OK, "GetDesc failed, hr %#x.\n", hr); + ok(hr == S_OK, "GetDesc failed, hr %#lx.\n", hr); ok(!lstrcmpW(output_desc.DeviceName, output_desc2.DeviceName), "Expect device name %s, got %s.\n", wine_dbgstr_w(output_desc2.DeviceName), wine_dbgstr_w(output_desc.DeviceName));
hr = IDXGISwapChain_SetFullscreenState(swapchain, FALSE, NULL); - ok(hr == S_OK, "SetFullscreenState failed, hr %#x.\n", hr); + ok(hr == S_OK, "SetFullscreenState failed, hr %#lx.\n", hr); } else { @@ -2566,9 +2566,9 @@ static void test_get_containing_output(IUnknown *device, BOOL is_d3d12)
done: refcount = IDXGISwapChain_Release(swapchain); - ok(!refcount, "IDXGISwapChain has %u references left.\n", refcount); + ok(!refcount, "IDXGISwapChain has %lu references left.\n", refcount); refcount = IDXGIFactory_Release(factory); - ok(refcount == !is_d3d12, "IDXGIFactory has %u references left.\n", refcount); + ok(refcount == !is_d3d12, "IDXGIFactory has %lu references left.\n", refcount); DestroyWindow(swapchain_desc.OutputWindow); }
@@ -2585,7 +2585,7 @@ static void test_swapchain_fullscreen_state(IDXGISwapChain *swapchain, BOOL ret;
hr = IDXGISwapChain_GetDesc(swapchain, &swapchain_desc); - ok(SUCCEEDED(hr), "GetDesc failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "GetDesc failed, hr %#lx.\n", hr);
check_swapchain_fullscreen_state(swapchain, initial_state);
@@ -2593,10 +2593,10 @@ static void test_swapchain_fullscreen_state(IDXGISwapChain *swapchain, compute_expected_swapchain_fullscreen_state_after_fullscreen_change(&expected_state, &swapchain_desc, &initial_state->fullscreen_state.monitor_rect, 800, 600, NULL); hr = IDXGISwapChain_GetContainingOutput(swapchain, &expected_state.target); - ok(SUCCEEDED(hr), "GetContainingOutput failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "GetContainingOutput failed, hr %#lx.\n", hr);
hr = IDXGISwapChain_SetFullscreenState(swapchain, TRUE, NULL); - ok(hr == S_OK || hr == DXGI_ERROR_NOT_CURRENTLY_AVAILABLE, "Got unexpected hr %#x.\n", hr); + ok(hr == S_OK || hr == DXGI_ERROR_NOT_CURRENTLY_AVAILABLE, "Got unexpected hr %#lx.\n", hr); if (FAILED(hr)) { skip("Could not change fullscreen state.\n"); @@ -2606,15 +2606,15 @@ static void test_swapchain_fullscreen_state(IDXGISwapChain *swapchain, check_swapchain_fullscreen_state(swapchain, &expected_state);
hr = IDXGISwapChain_SetFullscreenState(swapchain, TRUE, NULL); - ok(hr == S_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr); check_swapchain_fullscreen_state(swapchain, &expected_state);
hr = IDXGISwapChain_SetFullscreenState(swapchain, FALSE, NULL); - ok(SUCCEEDED(hr), "SetFullscreenState failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "SetFullscreenState failed, hr %#lx.\n", hr); check_swapchain_fullscreen_state(swapchain, initial_state);
hr = IDXGISwapChain_SetFullscreenState(swapchain, FALSE, NULL); - ok(hr == S_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr); check_swapchain_fullscreen_state(swapchain, initial_state);
IDXGIOutput_Release(expected_state.target); @@ -2632,10 +2632,10 @@ static void test_swapchain_fullscreen_state(IDXGISwapChain *swapchain, for (i = 0; i < output_count; ++i) { hr = IDXGIAdapter_EnumOutputs(adapter, i, &output); - ok(hr == S_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = IDXGIOutput_GetDesc(output, &output_desc); - ok(SUCCEEDED(hr), "GetDesc failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "GetDesc failed, hr %#lx.\n", hr);
output_monitor_info[i].cbSize = sizeof(*output_monitor_info); ret = GetMonitorInfoW(output_desc.Monitor, (MONITORINFO *)&output_monitor_info[i]); @@ -2651,9 +2651,9 @@ static void test_swapchain_fullscreen_state(IDXGISwapChain *swapchain, BOOL fullscreen;
hr = IDXGIAdapter_EnumOutputs(adapter, i, &output); - ok(hr == S_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr); hr = IDXGIOutput_GetDesc(output, &output_desc); - ok(SUCCEEDED(hr), "GetDesc failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "GetDesc failed, hr %#lx.\n", hr);
expected_state = *initial_state; expected_state.target = output; @@ -2663,33 +2663,33 @@ static void test_swapchain_fullscreen_state(IDXGISwapChain *swapchain, &swapchain_desc, &orig_monitor_rect, 800, 600, NULL);
hr = IDXGISwapChain_SetFullscreenState(swapchain, TRUE, output); - ok(hr == S_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr); check_swapchain_fullscreen_state(swapchain, &expected_state);
target = NULL; hr = IDXGISwapChain_GetFullscreenState(swapchain, NULL, &target); - ok(SUCCEEDED(hr), "GetFullscreenState failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "GetFullscreenState failed, hr %#lx.\n", hr); ok(target == output, "Got target pointer %p, expected %p.\n", target, output); IDXGIOutput_Release(target); fullscreen = FALSE; hr = IDXGISwapChain_GetFullscreenState(swapchain, &fullscreen, NULL); - ok(SUCCEEDED(hr), "GetFullscreenState failed, hr %#x.\n", hr); - ok(fullscreen, "Got unexpected fullscreen %#x.\n", hr); + ok(SUCCEEDED(hr), "GetFullscreenState failed, hr %#lx.\n", hr); + ok(fullscreen, "Got unexpected fullscreen %#lx.\n", hr);
hr = IDXGISwapChain_SetFullscreenState(swapchain, TRUE, output); - ok(hr == S_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr); check_swapchain_fullscreen_state(swapchain, &expected_state); hr = IDXGISwapChain_SetFullscreenState(swapchain, FALSE, output); - ok(hr == DXGI_ERROR_INVALID_CALL, "Got unexpected hr %#x.\n", hr); + ok(hr == DXGI_ERROR_INVALID_CALL, "Got unexpected hr %#lx.\n", hr); check_swapchain_fullscreen_state(swapchain, &expected_state); hr = IDXGISwapChain_SetFullscreenState(swapchain, FALSE, NULL); - ok(hr == S_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr); check_swapchain_fullscreen_state(swapchain, initial_state);
fullscreen = TRUE; hr = IDXGISwapChain_GetFullscreenState(swapchain, &fullscreen, NULL); - ok(SUCCEEDED(hr), "GetFullscreenState failed, hr %#x.\n", hr); - ok(!fullscreen, "Got unexpected fullscreen %#x.\n", hr); + ok(SUCCEEDED(hr), "GetFullscreenState failed, hr %#lx.\n", hr); + ok(!fullscreen, "Got unexpected fullscreen %#lx.\n", hr);
check_swapchain_fullscreen_state(swapchain, initial_state); monitor_info.cbSize = sizeof(monitor_info); @@ -2699,22 +2699,22 @@ static void test_swapchain_fullscreen_state(IDXGISwapChain *swapchain, wine_dbgstr_rect(&monitor_info.rcMonitor), wine_dbgstr_rect(&orig_monitor_rect));
hr = IDXGISwapChain_SetFullscreenState(swapchain, TRUE, output); - ok(hr == S_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
IDXGIOutput_Release(output); }
hr = IDXGISwapChain_SetFullscreenState(swapchain, FALSE, NULL); - ok(hr == S_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr); check_swapchain_fullscreen_state(swapchain, initial_state);
for (i = 0; i < output_count; ++i) { hr = IDXGIAdapter_EnumOutputs(adapter, i, &output); - ok(hr == S_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = IDXGIOutput_GetDesc(output, &output_desc); - ok(SUCCEEDED(hr), "GetDesc failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "GetDesc failed, hr %#lx.\n", hr);
monitor_info.cbSize = sizeof(monitor_info); ret = GetMonitorInfoW(output_desc.Monitor, (MONITORINFO *)&monitor_info); @@ -2764,105 +2764,105 @@ static void test_set_fullscreen(IUnknown *device, BOOL is_d3d12) memset(&initial_state, 0, sizeof(initial_state)); capture_fullscreen_state(&initial_state.fullscreen_state, swapchain_desc.OutputWindow); hr = IDXGIFactory_CreateSwapChain(factory, device, &swapchain_desc, &swapchain); - ok(SUCCEEDED(hr), "CreateSwapChain failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "CreateSwapChain failed, hr %#lx.\n", hr); hr = IDXGISwapChain_GetContainingOutput(swapchain, &output); ok(SUCCEEDED(hr) || broken(hr == DXGI_ERROR_UNSUPPORTED), /* Win 7 testbot */ - "Failed to get containing output, hr %#x.\n", hr); + "Failed to get containing output, hr %#lx.\n", hr); if (FAILED(hr)) { skip("Could not get output.\n"); goto done; } hr = IDXGIOutput_GetParent(output, &IID_IDXGIAdapter, (void **)&adapter); - ok(hr == S_OK, "Failed to get parent, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get parent, hr %#lx.\n", hr); IDXGIOutput_Release(output);
check_swapchain_fullscreen_state(swapchain, &initial_state); hr = IDXGISwapChain_SetFullscreenState(swapchain, TRUE, NULL); ok(SUCCEEDED(hr) || hr == DXGI_ERROR_NOT_CURRENTLY_AVAILABLE || broken(hr == DXGI_ERROR_UNSUPPORTED), /* Win 7 testbot */ - "SetFullscreenState failed, hr %#x.\n", hr); + "SetFullscreenState failed, hr %#lx.\n", hr); if (FAILED(hr)) { skip("Could not change fullscreen state.\n"); goto done; } hr = IDXGISwapChain_SetFullscreenState(swapchain, FALSE, NULL); - ok(hr == S_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr); refcount = IDXGISwapChain_Release(swapchain); - ok(!refcount, "IDXGISwapChain has %u references left.\n", refcount); + ok(!refcount, "IDXGISwapChain has %lu references left.\n", refcount);
DestroyWindow(swapchain_desc.OutputWindow); swapchain_desc.OutputWindow = CreateWindowA("static", "dxgi_test", 0, 0, 0, 400, 200, 0, 0, 0, 0); check_window_fullscreen_state(swapchain_desc.OutputWindow, &initial_state.fullscreen_state); hr = IDXGIFactory_CreateSwapChain(factory, device, &swapchain_desc, &swapchain); - ok(SUCCEEDED(hr), "CreateSwapChain failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "CreateSwapChain failed, hr %#lx.\n", hr); check_swapchain_fullscreen_state(swapchain, &initial_state); test_swapchain_fullscreen_state(swapchain, adapter, &initial_state); refcount = IDXGISwapChain_Release(swapchain); - ok(!refcount, "IDXGISwapChain has %u references left.\n", refcount); + ok(!refcount, "IDXGISwapChain has %lu references left.\n", refcount);
DestroyWindow(swapchain_desc.OutputWindow); swapchain_desc.OutputWindow = CreateWindowA("static", "dxgi_test", 0, 0, 0, 400, 200, 0, 0, 0, 0); check_window_fullscreen_state(swapchain_desc.OutputWindow, &initial_state.fullscreen_state); hr = IDXGIFactory_CreateSwapChain(factory, device, &swapchain_desc, &swapchain); - ok(hr == S_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr); hr = IDXGISwapChain_SetFullscreenState(swapchain, FALSE, NULL); - ok(hr == S_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr); hr = IDXGISwapChain_GetFullscreenState(swapchain, &fullscreen, NULL); - ok(hr == S_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr); ok(!fullscreen, "Got unexpected fullscreen %#x.\n", fullscreen); DestroyWindow(swapchain_desc.OutputWindow); hr = IDXGISwapChain_SetFullscreenState(swapchain, FALSE, NULL); - ok(hr == S_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr); hr = IDXGISwapChain_GetFullscreenState(swapchain, &fullscreen, NULL); - ok(hr == S_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr); ok(!fullscreen, "Got unexpected fullscreen %#x.\n", fullscreen); hr = IDXGISwapChain_SetFullscreenState(swapchain, TRUE, NULL); - ok(hr == DXGI_ERROR_NOT_CURRENTLY_AVAILABLE, "Got unexpected hr %#x.\n", hr); + ok(hr == DXGI_ERROR_NOT_CURRENTLY_AVAILABLE, "Got unexpected hr %#lx.\n", hr); hr = IDXGISwapChain_GetFullscreenState(swapchain, &fullscreen, NULL); - ok(hr == S_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr); ok(!fullscreen, "Got unexpected fullscreen %#x.\n", fullscreen); hr = IDXGISwapChain_SetFullscreenState(swapchain, FALSE, NULL); - ok(hr == S_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr); refcount = IDXGISwapChain_Release(swapchain); - ok(!refcount, "IDXGISwapChain has %u references left.\n", refcount); + ok(!refcount, "IDXGISwapChain has %lu references left.\n", refcount);
swapchain_desc.OutputWindow = CreateWindowA("static", "dxgi_test", 0, 0, 0, 400, 200, 0, 0, 0, 0); check_window_fullscreen_state(swapchain_desc.OutputWindow, &initial_state.fullscreen_state); hr = IDXGIFactory_CreateSwapChain(factory, device, &swapchain_desc, &swapchain); - ok(hr == S_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr); hr = IDXGISwapChain_SetFullscreenState(swapchain, TRUE, NULL); - ok(hr == S_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr); hr = IDXGISwapChain_GetFullscreenState(swapchain, &fullscreen, NULL); - ok(hr == S_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr); ok(!!fullscreen, "Got unexpected fullscreen %#x.\n", fullscreen); DestroyWindow(swapchain_desc.OutputWindow); hr = IDXGISwapChain_SetFullscreenState(swapchain, TRUE, NULL); - ok(hr == S_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr); hr = IDXGISwapChain_GetFullscreenState(swapchain, &fullscreen, NULL); - ok(hr == S_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr); ok(!!fullscreen, "Got unexpected fullscreen %#x.\n", fullscreen); hr = IDXGISwapChain_SetFullscreenState(swapchain, FALSE, NULL); - ok(hr == S_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr); hr = IDXGISwapChain_GetFullscreenState(swapchain, &fullscreen, NULL); - ok(hr == S_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr); ok(!fullscreen, "Got unexpected fullscreen %#x.\n", fullscreen); hr = IDXGISwapChain_SetFullscreenState(swapchain, TRUE, NULL); - ok(hr == DXGI_ERROR_NOT_CURRENTLY_AVAILABLE, "Got unexpected hr %#x.\n", hr); + ok(hr == DXGI_ERROR_NOT_CURRENTLY_AVAILABLE, "Got unexpected hr %#lx.\n", hr); hr = IDXGISwapChain_GetFullscreenState(swapchain, &fullscreen, NULL); - ok(hr == S_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr); ok(!fullscreen, "Got unexpected fullscreen %#x.\n", fullscreen); hr = IDXGISwapChain_SetFullscreenState(swapchain, FALSE, NULL); - ok(hr == S_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr); refcount = IDXGISwapChain_Release(swapchain); - ok(!refcount, "IDXGISwapChain has %u references left.\n", refcount); + ok(!refcount, "IDXGISwapChain has %lu references left.\n", refcount);
swapchain_desc.OutputWindow = CreateWindowA("static", "dxgi_test", 0, 0, 0, 400, 200, 0, 0, 0, 0); check_window_fullscreen_state(swapchain_desc.OutputWindow, &initial_state.fullscreen_state); swapchain_desc.Flags = DXGI_SWAP_CHAIN_FLAG_ALLOW_MODE_SWITCH; hr = IDXGIFactory_CreateSwapChain(factory, device, &swapchain_desc, &swapchain); - ok(SUCCEEDED(hr), "CreateSwapChain failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "CreateSwapChain failed, hr %#lx.\n", hr); check_swapchain_fullscreen_state(swapchain, &initial_state); test_swapchain_fullscreen_state(swapchain, adapter, &initial_state);
@@ -2870,12 +2870,12 @@ done: if (adapter) IDXGIAdapter_Release(adapter); refcount = IDXGISwapChain_Release(swapchain); - ok(!refcount, "IDXGISwapChain has %u references left.\n", refcount); + ok(!refcount, "IDXGISwapChain has %lu references left.\n", refcount); check_window_fullscreen_state(swapchain_desc.OutputWindow, &initial_state.fullscreen_state); DestroyWindow(swapchain_desc.OutputWindow);
refcount = IDXGIFactory_Release(factory); - ok(refcount == !is_d3d12, "Got unexpected refcount %u.\n", refcount); + ok(refcount == !is_d3d12, "Got unexpected refcount %lu.\n", refcount); }
static void test_default_fullscreen_target_output(IUnknown *device, BOOL is_d3d12) @@ -2919,11 +2919,11 @@ static void test_default_fullscreen_target_output(IUnknown *device, BOOL is_d3d1 swapchain_desc.OutputWindow = create_window(); swapchain_desc.Windowed = TRUE; hr = IDXGIFactory_CreateSwapChain(factory, device, &swapchain_desc, &swapchain); - ok(SUCCEEDED(hr), "Adapter %u output %u: CreateSwapChain failed, hr %#x.\n", + ok(SUCCEEDED(hr), "Adapter %u output %u: CreateSwapChain failed, hr %#lx.\n", adapter_idx, output_idx, hr);
hr = IDXGISwapChain_GetFullscreenState(swapchain, &fullscreen, &containing_output); - ok(SUCCEEDED(hr), "Adapter %u output %u: GetFullscreenState failed, hr %#x.\n", + ok(SUCCEEDED(hr), "Adapter %u output %u: GetFullscreenState failed, hr %#lx.\n", adapter_idx, output_idx, hr); ok(!fullscreen, "Adapter %u output %u: Expected not fullscreen.\n", adapter_idx, output_idx); @@ -2932,17 +2932,17 @@ static void test_default_fullscreen_target_output(IUnknown *device, BOOL is_d3d1
/* Move the OutputWindow to the current output. */ hr = IDXGIOutput_GetDesc(output, &output_desc); - ok(SUCCEEDED(hr), "Adapter %u output %u: GetDesc failed, hr %#x.\n", adapter_idx, + ok(SUCCEEDED(hr), "Adapter %u output %u: GetDesc failed, hr %#lx.\n", adapter_idx, output_idx, hr); ret = SetWindowPos(swapchain_desc.OutputWindow, 0, output_desc.DesktopCoordinates.left, output_desc.DesktopCoordinates.top, 0, 0, SWP_NOSIZE | SWP_NOZORDER); - ok(ret, "Adapter %u output %u: SetWindowPos failed, error %#x.\n", adapter_idx, + ok(ret, "Adapter %u output %u: SetWindowPos failed, error %#lx.\n", adapter_idx, output_idx, GetLastError());
hr = IDXGISwapChain_GetContainingOutput(swapchain, &containing_output); ok(SUCCEEDED(hr) || broken(hr == DXGI_ERROR_UNSUPPORTED) /* Win 7 testbot */, - "Adapter %u output %u: GetContainingOutput failed, hr %#x.\n", adapter_idx, + "Adapter %u output %u: GetContainingOutput failed, hr %#lx.\n", adapter_idx, output_idx, hr); if (hr == DXGI_ERROR_UNSUPPORTED) { @@ -2956,7 +2956,7 @@ static void test_default_fullscreen_target_output(IUnknown *device, BOOL is_d3d1
hr = IDXGISwapChain_SetFullscreenState(swapchain, TRUE, NULL); ok(SUCCEEDED(hr) || hr == DXGI_ERROR_NOT_CURRENTLY_AVAILABLE, - "Adapter %u output %u: SetFullscreenState failed, hr %#x.\n", adapter_idx, + "Adapter %u output %u: SetFullscreenState failed, hr %#lx.\n", adapter_idx, output_idx, hr); if (hr == DXGI_ERROR_NOT_CURRENTLY_AVAILABLE) { @@ -2976,7 +2976,7 @@ static void test_default_fullscreen_target_output(IUnknown *device, BOOL is_d3d1
target = NULL; hr = IDXGISwapChain_GetFullscreenState(swapchain, NULL, &target); - ok(SUCCEEDED(hr), "Adapter %u output %u: GetFullscreenState failed, hr %#x.\n", + ok(SUCCEEDED(hr), "Adapter %u output %u: GetFullscreenState failed, hr %#lx.\n", adapter_idx, output_idx, hr); ok(target != containing_output, "Adapter %u output %u: Got unexpected output %p, expected %p.\n", adapter_idx, @@ -2984,27 +2984,27 @@ static void test_default_fullscreen_target_output(IUnknown *device, BOOL is_d3d1 check_output_equal(target, containing_output);
refcount = IDXGIOutput_Release(containing_output); - ok(!refcount, "Adapter %u output %u: IDXGIOutput has %u references left.\n", + ok(!refcount, "Adapter %u output %u: IDXGIOutput has %lu references left.\n", adapter_idx, output_idx, refcount);
hr = IDXGISwapChain_GetContainingOutput(swapchain, &containing_output); - ok(SUCCEEDED(hr), "Adapter %u output %u: GetContainingOutput failed, hr %#x.\n", + ok(SUCCEEDED(hr), "Adapter %u output %u: GetContainingOutput failed, hr %#lx.\n", adapter_idx, output_idx, hr); ok(containing_output == target, "Adapter %u output %u: Got unexpected containing output %p, expected %p.\n", adapter_idx, output_idx, containing_output, target); refcount = IDXGIOutput_Release(containing_output); - ok(refcount >= 2, "Adapter %u output %u: Got unexpected refcount %u.\n", adapter_idx, + ok(refcount >= 2, "Adapter %u output %u: Got unexpected refcount %lu.\n", adapter_idx, output_idx, refcount); refcount = IDXGIOutput_Release(target); - ok(refcount >= 1, "Adapter %u output %u: Got unexpected refcount %u.\n", adapter_idx, + ok(refcount >= 1, "Adapter %u output %u: Got unexpected refcount %lu.\n", adapter_idx, output_idx, refcount);
hr = IDXGISwapChain_SetFullscreenState(swapchain, FALSE, NULL); - ok(SUCCEEDED(hr), "Adapter %u output %u: SetFullscreenState failed, hr %#x.\n", + ok(SUCCEEDED(hr), "Adapter %u output %u: SetFullscreenState failed, hr %#lx.\n", adapter_idx, output_idx, hr); refcount = IDXGISwapChain_Release(swapchain); - ok(!refcount, "Adapter %u output %u: IDXGISwapChain has %u references left.\n", + ok(!refcount, "Adapter %u output %u: IDXGISwapChain has %lu references left.\n", adapter_idx, output_idx, refcount); DestroyWindow(swapchain_desc.OutputWindow);
@@ -3017,12 +3017,12 @@ static void test_default_fullscreen_target_output(IUnknown *device, BOOL is_d3d1 swapchain_desc.Windowed = FALSE; ret = SetWindowPos(swapchain_desc.OutputWindow, 0, output_desc.DesktopCoordinates.left, output_desc.DesktopCoordinates.top, 0, 0, SWP_NOSIZE | SWP_NOZORDER); - ok(ret, "Adapter %u output %u: SetWindowPos failed, error %#x.\n", adapter_idx, + ok(ret, "Adapter %u output %u: SetWindowPos failed, error %#lx.\n", adapter_idx, output_idx, GetLastError()); hr = IDXGIFactory_CreateSwapChain(factory, device, &swapchain_desc, &swapchain); if (FAILED(hr)) { - skip("Adapter %u output %u: CreateSwapChain failed, hr %#x.\n", adapter_idx, + skip("Adapter %u output %u: CreateSwapChain failed, hr %#lx.\n", adapter_idx, output_idx, hr); IDXGIOutput_Release(output); DestroyWindow(swapchain_desc.OutputWindow); @@ -3030,7 +3030,7 @@ static void test_default_fullscreen_target_output(IUnknown *device, BOOL is_d3d1 }
hr = IDXGISwapChain_GetFullscreenState(swapchain, &fullscreen, &containing_output); - ok(SUCCEEDED(hr), "Adapter %u output %u: GetFullscreenState failed, hr %#x.\n", + ok(SUCCEEDED(hr), "Adapter %u output %u: GetFullscreenState failed, hr %#lx.\n", adapter_idx, output_idx, hr); ok(fullscreen, "Adapter %u output %u: Expected fullscreen.\n", adapter_idx, output_idx); ok(!!containing_output, "Adapter %u output %u: Expected a valid output.\n", adapter_idx, @@ -3039,7 +3039,7 @@ static void test_default_fullscreen_target_output(IUnknown *device, BOOL is_d3d1 IDXGIOutput_Release(containing_output);
ret = GetWindowRect(swapchain_desc.OutputWindow, &window_rect); - ok(ret, "Adapter %u output %u: GetWindowRect failed, error %#x.\n", adapter_idx, + ok(ret, "Adapter %u output %u: GetWindowRect failed, error %#lx.\n", adapter_idx, output_idx, GetLastError()); ok(EqualRect(&window_rect, &output_desc.DesktopCoordinates), "Adapter %u output %u: Expect window rect %s, got %s.\n", adapter_idx, @@ -3047,7 +3047,7 @@ static void test_default_fullscreen_target_output(IUnknown *device, BOOL is_d3d1 wine_dbgstr_rect(&window_rect));
hr = IDXGISwapChain_GetContainingOutput(swapchain, &containing_output); - ok(hr == S_OK, "Adapter %u output %u: GetContainingOutput failed, hr %#x.\n", + ok(hr == S_OK, "Adapter %u output %u: GetContainingOutput failed, hr %#lx.\n", adapter_idx, output_idx, hr); ok(containing_output != output, "Adapter %u output %u: Got unexpected output %p, expected %p.\n", adapter_idx, @@ -3056,13 +3056,13 @@ static void test_default_fullscreen_target_output(IUnknown *device, BOOL is_d3d1 IDXGIOutput_Release(containing_output);
hr = IDXGISwapChain_SetFullscreenState(swapchain, FALSE, NULL); - ok(hr == S_OK, "Adapter %u output %u: SetFullscreenState failed, hr %#x.\n", + ok(hr == S_OK, "Adapter %u output %u: SetFullscreenState failed, hr %#lx.\n", adapter_idx, output_idx, hr); refcount = IDXGISwapChain_Release(swapchain); - ok(!refcount, "Adapter %u output %u: IDXGISwapChain has %u references left.\n", + ok(!refcount, "Adapter %u output %u: IDXGISwapChain has %lu references left.\n", adapter_idx, output_idx, refcount); refcount = IDXGIOutput_Release(output); - ok(!refcount, "Adapter %u output %u: IDXGIOutput has %u references left.\n", + ok(!refcount, "Adapter %u output %u: IDXGIOutput has %lu references left.\n", adapter_idx, output_idx, refcount); DestroyWindow(swapchain_desc.OutputWindow); } @@ -3070,7 +3070,7 @@ static void test_default_fullscreen_target_output(IUnknown *device, BOOL is_d3d1 }
refcount = IDXGIFactory_Release(factory); - ok(refcount == !is_d3d12, "IDXGIFactory has %u references left.\n", refcount); + ok(refcount == !is_d3d12, "IDXGIFactory has %lu references left.\n", refcount); }
static void test_windowed_resize_target(IDXGISwapChain *swapchain, HWND window, @@ -3129,20 +3129,20 @@ static void test_windowed_resize_target(IDXGISwapChain *swapchain, HWND window, mode.Width = sizes[i].width; mode.Height = sizes[i].height; hr = IDXGISwapChain_ResizeTarget(swapchain, &mode); - ok(hr == S_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr); check_swapchain_fullscreen_state(swapchain, &expected_state); }
ret = SetWindowPos(window, 0, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOZORDER); - ok(ret, "SetWindowPos failed, error %#x.\n", GetLastError()); + ok(ret, "SetWindowPos failed, error %#lx.\n", GetLastError()); GetWindowRect(window, &e->window_rect); GetClientRect(window, &e->client_rect); ret = SetWindowPos(window, 0, 0, 0, 200, 200, SWP_NOMOVE | SWP_NOZORDER); - ok(ret, "SetWindowPos failed, error %#x.\n", GetLastError()); + ok(ret, "SetWindowPos failed, error %#lx.\n", GetLastError());
memset(&mode, 0, sizeof(mode)); hr = IDXGISwapChain_ResizeTarget(swapchain, &mode); - ok(hr == S_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr); check_swapchain_fullscreen_state(swapchain, &expected_state);
GetWindowRect(window, &e->window_rect); @@ -3162,14 +3162,14 @@ static void test_fullscreen_resize_target(IDXGISwapChain *swapchain, HRESULT hr;
hr = IDXGISwapChain_GetDesc(swapchain, &swapchain_desc); - ok(SUCCEEDED(hr), "GetDesc failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "GetDesc failed, hr %#lx.\n", hr);
hr = IDXGISwapChain_GetFullscreenState(swapchain, NULL, &target); - ok(SUCCEEDED(hr), "GetFullscreenState failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "GetFullscreenState failed, hr %#lx.\n", hr);
hr = IDXGIOutput_GetDisplayModeList(target, DXGI_FORMAT_R8G8B8A8_UNORM, 0, &mode_count, NULL); ok(SUCCEEDED(hr) || broken(hr == DXGI_ERROR_NOT_CURRENTLY_AVAILABLE), /* Win 7 testbot */ - "Failed to list modes, hr %#x.\n", hr); + "Failed to list modes, hr %#lx.\n", hr); if (hr == DXGI_ERROR_NOT_CURRENTLY_AVAILABLE) { win_skip("GetDisplayModeList() not supported.\n"); @@ -3181,7 +3181,7 @@ static void test_fullscreen_resize_target(IDXGISwapChain *swapchain, ok(!!modes, "Failed to allocate memory.\n");
hr = IDXGIOutput_GetDisplayModeList(target, DXGI_FORMAT_R8G8B8A8_UNORM, 0, &mode_count, modes); - ok(SUCCEEDED(hr), "Failed to list modes, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to list modes, hr %#lx.\n", hr);
expected_state = *initial_state; for (i = 0; i < min(mode_count, 20); ++i) @@ -3192,13 +3192,13 @@ static void test_fullscreen_resize_target(IDXGISwapChain *swapchain, continue;
hr = IDXGIOutput_GetDesc(target, &output_desc); - ok(hr == S_OK, "Failed to get desc, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get desc, hr %#lx.\n", hr);
compute_expected_swapchain_fullscreen_state_after_fullscreen_change(&expected_state, &swapchain_desc, &output_desc.DesktopCoordinates, modes[i].Width, modes[i].Height, NULL);
hr = IDXGISwapChain_ResizeTarget(swapchain, &modes[i]); - ok(hr == S_OK || hr == DXGI_ERROR_NOT_CURRENTLY_AVAILABLE, "Got unexpected hr %#x.\n", hr); + ok(hr == S_OK || hr == DXGI_ERROR_NOT_CURRENTLY_AVAILABLE, "Got unexpected hr %#lx.\n", hr); if (hr == DXGI_ERROR_NOT_CURRENTLY_AVAILABLE) { skip("Failed to change to video mode %u.\n", i); @@ -3207,7 +3207,7 @@ static void test_fullscreen_resize_target(IDXGISwapChain *swapchain, check_swapchain_fullscreen_state(swapchain, &expected_state);
hr = IDXGIOutput_GetDesc(target, &output_desc); - ok(hr == S_OK, "Failed to get desc, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get desc, hr %#lx.\n", hr); ok(EqualRect(&output_desc.DesktopCoordinates, &expected_state.fullscreen_state.monitor_rect), "Got desktop coordinates %s, expected %s.\n", wine_dbgstr_rect(&output_desc.DesktopCoordinates), @@ -3278,7 +3278,7 @@ static void test_resize_target(IUnknown *device, BOOL is_d3d12) ++output_idx) { hr = IDXGIOutput_GetDesc(output, &output_desc); - ok(hr == S_OK, "Adapter %u output %u: GetDesc failed, hr %#x.\n", adapter_idx, + ok(hr == S_OK, "Adapter %u output %u: GetDesc failed, hr %#lx.\n", adapter_idx, output_idx, hr);
for (test_idx = 0; test_idx < ARRAY_SIZE(tests); ++test_idx) @@ -3300,7 +3300,7 @@ static void test_resize_target(IUnknown *device, BOOL is_d3d12) capture_fullscreen_state(&initial_state.fullscreen_state, swapchain_desc.OutputWindow);
hr = IDXGIFactory_CreateSwapChain(factory, device, &swapchain_desc, &swapchain); - ok(SUCCEEDED(hr), "Adapter %u output %u test %u: CreateSwapChain failed, hr %#x.\n", + ok(SUCCEEDED(hr), "Adapter %u output %u test %u: CreateSwapChain failed, hr %#lx.\n", adapter_idx, output_idx, test_idx, hr); check_swapchain_fullscreen_state(swapchain, &initial_state);
@@ -3312,7 +3312,7 @@ static void test_resize_target(IUnknown *device, BOOL is_d3d12) &swapchain_desc, &initial_state.fullscreen_state.monitor_rect, 800, 600, NULL); hr = IDXGISwapChain_GetContainingOutput(swapchain, &expected_state.target); ok(SUCCEEDED(hr) || broken(hr == DXGI_ERROR_UNSUPPORTED) /* Win 7 testbot */, - "Adapter %u output %u test %u: GetContainingOutput failed, hr %#x.\n", + "Adapter %u output %u test %u: GetContainingOutput failed, hr %#lx.\n", adapter_idx, output_idx, test_idx, hr); if (hr == DXGI_ERROR_UNSUPPORTED) { @@ -3325,7 +3325,7 @@ static void test_resize_target(IUnknown *device, BOOL is_d3d12)
hr = IDXGISwapChain_SetFullscreenState(swapchain, TRUE, NULL); ok(SUCCEEDED(hr) || hr == DXGI_ERROR_NOT_CURRENTLY_AVAILABLE, - "Adapter %u output %u test %u: SetFullscreenState failed, hr %#x.\n", + "Adapter %u output %u test %u: SetFullscreenState failed, hr %#lx.\n", adapter_idx, output_idx, test_idx, hr); if (hr == DXGI_ERROR_NOT_CURRENTLY_AVAILABLE) { @@ -3340,7 +3340,7 @@ static void test_resize_target(IUnknown *device, BOOL is_d3d12) check_swapchain_fullscreen_state(swapchain, &expected_state);
hr = IDXGISwapChain_ResizeTarget(swapchain, NULL); - ok(hr == DXGI_ERROR_INVALID_CALL, "Adapter %u output %u test %u: Got unexpected hr %#x.\n", + ok(hr == DXGI_ERROR_INVALID_CALL, "Adapter %u output %u test %u: Got unexpected hr %#lx.\n", adapter_idx, output_idx, test_idx, hr); check_swapchain_fullscreen_state(swapchain, &expected_state);
@@ -3349,7 +3349,7 @@ static void test_resize_target(IUnknown *device, BOOL is_d3d12) test_fullscreen_resize_target(swapchain, &expected_state);
hr = IDXGISwapChain_SetFullscreenState(swapchain, FALSE, NULL); - ok(SUCCEEDED(hr), "Adapter %u output %u test %u: SetFullscreenState failed, hr %#x.\n", + ok(SUCCEEDED(hr), "Adapter %u output %u test %u: SetFullscreenState failed, hr %#lx.\n", adapter_idx, output_idx, test_idx, hr); check_swapchain_fullscreen_state(swapchain, &initial_state); IDXGIOutput_Release(expected_state.target); @@ -3364,7 +3364,7 @@ static void test_resize_target(IUnknown *device, BOOL is_d3d12) }
refcount = IDXGISwapChain_Release(swapchain); - ok(!refcount, "Adapter %u output %u test %u: IDXGISwapChain has %u references left.\n", + ok(!refcount, "Adapter %u output %u test %u: IDXGISwapChain has %lu references left.\n", adapter_idx, output_idx, test_idx, refcount); check_window_fullscreen_state(swapchain_desc.OutputWindow, &expected_state.fullscreen_state); DestroyWindow(swapchain_desc.OutputWindow); @@ -3374,7 +3374,7 @@ static void test_resize_target(IUnknown *device, BOOL is_d3d12) IDXGIAdapter_Release(adapter); } refcount = IDXGIFactory_Release(factory); - ok(refcount == !is_d3d12, "Got unexpected refcount %u.\n", refcount); + ok(refcount == !is_d3d12, "Got unexpected refcount %lu.\n", refcount); }
static LRESULT CALLBACK resize_target_wndproc(HWND hwnd, unsigned int message, WPARAM wparam, LPARAM lparam) @@ -3388,7 +3388,7 @@ static LRESULT CALLBACK resize_target_wndproc(HWND hwnd, unsigned int message, W case WM_SIZE: ok(!!swapchain, "GWLP_USERDATA is NULL.\n"); hr = IDXGISwapChain_GetDesc(swapchain, &desc); - ok(hr == S_OK, "Failed to get desc, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get desc, hr %#lx.\n", hr); ok(desc.BufferDesc.Width == 800, "Got unexpected buffer width %u.\n", desc.BufferDesc.Width); ok(desc.BufferDesc.Height == 600, "Got unexpected buffer height %u.\n", desc.BufferDesc.Height); return 0; @@ -3421,7 +3421,7 @@ static DWORD WINAPI window_thread(void *data) ok(!!thread_data->window, "Failed to create window.\n");
ret = SetEvent(thread_data->window_created); - ok(ret, "Failed to set event, last error %#x.\n", GetLastError()); + ok(ret, "Failed to set event, last error %#lx.\n", GetLastError());
for (;;) { @@ -3432,7 +3432,7 @@ static DWORD WINAPI window_thread(void *data) if (ret != WAIT_TIMEOUT) break; } - ok(ret == WAIT_OBJECT_0, "Failed to wait for event, ret %#x, last error %#x.\n", ret, GetLastError()); + ok(ret == WAIT_OBJECT_0, "Failed to wait for event, ret %#x, last error %#lx.\n", ret, GetLastError());
DestroyWindow(thread_data->window); thread_data->window = NULL; @@ -3466,19 +3466,19 @@ static void test_resize_target_wndproc(void)
memset(&thread_data, 0, sizeof(thread_data)); thread_data.window_created = CreateEventA(NULL, FALSE, FALSE, NULL); - ok(!!thread_data.window_created, "Failed to create event, last error %#x.\n", GetLastError()); + ok(!!thread_data.window_created, "Failed to create event, last error %#lx.\n", GetLastError()); thread_data.finished = CreateEventA(NULL, FALSE, FALSE, NULL); - ok(!!thread_data.finished, "Failed to create event, last error %#x.\n", GetLastError()); + ok(!!thread_data.finished, "Failed to create event, last error %#lx.\n", GetLastError());
thread = CreateThread(NULL, 0, window_thread, &thread_data, 0, NULL); - ok(!!thread, "Failed to create thread, last error %#x.\n", GetLastError()); + ok(!!thread, "Failed to create thread, last error %#lx.\n", GetLastError()); ret = WaitForSingleObject(thread_data.window_created, INFINITE); - ok(ret == WAIT_OBJECT_0, "Failed to wait for thread, ret %#x, last error %#x.\n", ret, GetLastError()); + ok(ret == WAIT_OBJECT_0, "Failed to wait for thread, ret %#x, last error %#lx.\n", ret, GetLastError());
hr = IDXGIDevice_GetAdapter(device, &adapter); - ok(hr == S_OK, "Failed to get adapter, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get adapter, hr %#lx.\n", hr); hr = IDXGIAdapter_GetParent(adapter, &IID_IDXGIFactory, (void **)&factory); - ok(hr == S_OK, "Failed to get parent, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get parent, hr %#lx.\n", hr);
swapchain_desc.BufferDesc.Width = 800; swapchain_desc.BufferDesc.Height = 600; @@ -3496,7 +3496,7 @@ static void test_resize_target_wndproc(void) swapchain_desc.SwapEffect = DXGI_SWAP_EFFECT_DISCARD; swapchain_desc.Flags = 0; hr = IDXGIFactory_CreateSwapChain(factory, (IUnknown *)device, &swapchain_desc, &swapchain); - ok(hr == S_OK, "Failed to create swapchain, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create swapchain, hr %#lx.\n", hr);
data = SetWindowLongPtrA(thread_data.window, GWLP_USERDATA, (LONG_PTR)swapchain); ok(!data, "Got unexpected GWLP_USERDATA %p.\n", (void *)data); @@ -3505,10 +3505,10 @@ static void test_resize_target_wndproc(void) mode.Width = 600; mode.Height = 400; hr = IDXGISwapChain_ResizeTarget(swapchain, &mode); - ok(hr == S_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = IDXGISwapChain_GetDesc(swapchain, &swapchain_desc); - ok(hr == S_OK, "Getswapchain_desc failed, hr %#x.\n", hr); + ok(hr == S_OK, "Getswapchain_desc failed, hr %#lx.\n", hr); ok(swapchain_desc.BufferDesc.Width == 800, "Got unexpected buffer width %u.\n", swapchain_desc.BufferDesc.Width); ok(swapchain_desc.BufferDesc.Height == 600, @@ -3520,18 +3520,18 @@ static void test_resize_target_wndproc(void) "Got unexpected client rect %s.\n", wine_dbgstr_rect(&rect));
refcount = IDXGISwapChain_Release(swapchain); - ok(!refcount, "IDXGISwapChain has %u references left.\n", refcount); + ok(!refcount, "IDXGISwapChain has %lu references left.\n", refcount);
IDXGIAdapter_Release(adapter); refcount = IDXGIDevice_Release(device); - ok(!refcount, "Device has %u references left.\n", refcount); + ok(!refcount, "Device has %lu references left.\n", refcount); refcount = IDXGIFactory_Release(factory); - ok(!refcount, "Factory has %u references left.\n", refcount); + ok(!refcount, "Factory has %lu references left.\n", refcount);
ret = SetEvent(thread_data.finished); - ok(ret, "Failed to set event, last error %#x.\n", GetLastError()); + ok(ret, "Failed to set event, last error %#lx.\n", GetLastError()); ret = WaitForSingleObject(thread, INFINITE); - ok(ret == WAIT_OBJECT_0, "Failed to wait for thread, ret %#x, last error %#x.\n", ret, GetLastError()); + ok(ret == WAIT_OBJECT_0, "Failed to wait for thread, ret %#x, last error %#lx.\n", ret, GetLastError()); CloseHandle(thread); CloseHandle(thread_data.window_created); CloseHandle(thread_data.finished); @@ -3568,10 +3568,10 @@ static void test_inexact_modes(void) }
hr = IDXGIDevice_GetAdapter(device, &adapter); - ok(SUCCEEDED(hr), "GetAdapter failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "GetAdapter failed, hr %#lx.\n", hr);
hr = IDXGIAdapter_GetParent(adapter, &IID_IDXGIFactory, (void **)&factory); - ok(SUCCEEDED(hr), "GetParent failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "GetParent failed, hr %#lx.\n", hr);
swapchain_desc.BufferDesc.Width = 800; swapchain_desc.BufferDesc.Height = 600; @@ -3593,16 +3593,16 @@ static void test_inexact_modes(void) capture_fullscreen_state(&initial_state.fullscreen_state, swapchain_desc.OutputWindow);
hr = IDXGIFactory_CreateSwapChain(factory, (IUnknown *)device, &swapchain_desc, &swapchain); - ok(SUCCEEDED(hr), "CreateSwapChain failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "CreateSwapChain failed, hr %#lx.\n", hr); hr = IDXGISwapChain_GetDesc(swapchain, &result_desc); - ok(SUCCEEDED(hr), "GetDesc failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "GetDesc failed, hr %#lx.\n", hr); hr = IDXGISwapChain_SetFullscreenState(swapchain, FALSE, NULL); - ok(SUCCEEDED(hr), "SetFullscreenState failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "SetFullscreenState failed, hr %#lx.\n", hr); hr = IDXGISwapChain_GetContainingOutput(swapchain, &output); ok(SUCCEEDED(hr) || broken(hr == DXGI_ERROR_UNSUPPORTED) /* Win 7 testbot */, - "GetContainingOutput failed, hr %#x.\n", hr); + "GetContainingOutput failed, hr %#lx.\n", hr); refcount = IDXGISwapChain_Release(swapchain); - ok(!refcount, "IDXGISwapChain has %u references left.\n", refcount); + ok(!refcount, "IDXGISwapChain has %lu references left.\n", refcount); if (hr == DXGI_ERROR_UNSUPPORTED) { win_skip("GetContainingOutput() not supported.\n"); @@ -3629,22 +3629,22 @@ static void test_inexact_modes(void) sizes[i].width, sizes[i].height, output);
hr = IDXGIFactory_CreateSwapChain(factory, (IUnknown *)device, &swapchain_desc, &swapchain); - ok(SUCCEEDED(hr), "CreateSwapChain failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "CreateSwapChain failed, hr %#lx.\n", hr);
check_swapchain_fullscreen_state(swapchain, &expected_state); hr = IDXGISwapChain_GetDesc(swapchain, &result_desc); - ok(SUCCEEDED(hr), "GetDesc failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "GetDesc failed, hr %#lx.\n", hr); ok(result_desc.BufferDesc.Width == sizes[i].width, "Got width %u, expected %u.\n", result_desc.BufferDesc.Width, sizes[i].width); ok(result_desc.BufferDesc.Height == sizes[i].height, "Got height %u, expected %u.\n", result_desc.BufferDesc.Height, sizes[i].height);
hr = IDXGISwapChain_SetFullscreenState(swapchain, FALSE, NULL); - ok(SUCCEEDED(hr), "SetFullscreenState failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "SetFullscreenState failed, hr %#lx.\n", hr); check_swapchain_fullscreen_state(swapchain, &initial_state);
refcount = IDXGISwapChain_Release(swapchain); - ok(!refcount, "IDXGISwapChain has %u references left.\n", refcount); + ok(!refcount, "IDXGISwapChain has %lu references left.\n", refcount);
/* Test SetFullscreenState(). */ swapchain_desc.BufferDesc.Width = sizes[i].width; @@ -3652,25 +3652,25 @@ static void test_inexact_modes(void) swapchain_desc.Windowed = TRUE;
hr = IDXGIFactory_CreateSwapChain(factory, (IUnknown *)device, &swapchain_desc, &swapchain); - ok(SUCCEEDED(hr), "CreateSwapChain failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "CreateSwapChain failed, hr %#lx.\n", hr);
hr = IDXGISwapChain_SetFullscreenState(swapchain, TRUE, output); - ok(SUCCEEDED(hr), "SetFullscreenState failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "SetFullscreenState failed, hr %#lx.\n", hr);
check_swapchain_fullscreen_state(swapchain, &expected_state); hr = IDXGISwapChain_GetDesc(swapchain, &result_desc); - ok(SUCCEEDED(hr), "GetDesc failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "GetDesc failed, hr %#lx.\n", hr); ok(result_desc.BufferDesc.Width == sizes[i].width, "Got width %u, expected %u.\n", result_desc.BufferDesc.Width, sizes[i].width); ok(result_desc.BufferDesc.Height == sizes[i].height, "Got height %u, expected %u.\n", result_desc.BufferDesc.Height, sizes[i].height);
hr = IDXGISwapChain_SetFullscreenState(swapchain, FALSE, NULL); - ok(SUCCEEDED(hr), "SetFullscreenState failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "SetFullscreenState failed, hr %#lx.\n", hr); check_swapchain_fullscreen_state(swapchain, &initial_state);
refcount = IDXGISwapChain_Release(swapchain); - ok(!refcount, "IDXGISwapChain has %u references left.\n", refcount); + ok(!refcount, "IDXGISwapChain has %lu references left.\n", refcount);
/* Test ResizeTarget(). */ swapchain_desc.BufferDesc.Width = 800; @@ -3678,28 +3678,28 @@ static void test_inexact_modes(void) swapchain_desc.Windowed = TRUE;
hr = IDXGIFactory_CreateSwapChain(factory, (IUnknown *)device, &swapchain_desc, &swapchain); - ok(SUCCEEDED(hr), "CreateSwapChain failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "CreateSwapChain failed, hr %#lx.\n", hr);
hr = IDXGISwapChain_SetFullscreenState(swapchain, TRUE, output); - ok(SUCCEEDED(hr), "SetFullscreenState failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "SetFullscreenState failed, hr %#lx.\n", hr);
swapchain_desc.BufferDesc.Width = sizes[i].width; swapchain_desc.BufferDesc.Height = sizes[i].height; hr = IDXGISwapChain_ResizeTarget(swapchain, &swapchain_desc.BufferDesc); - ok(SUCCEEDED(hr), "ResizeTarget failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "ResizeTarget failed, hr %#lx.\n", hr);
check_swapchain_fullscreen_state(swapchain, &expected_state); hr = IDXGISwapChain_GetDesc(swapchain, &result_desc); - ok(SUCCEEDED(hr), "GetDesc failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "GetDesc failed, hr %#lx.\n", hr); ok(result_desc.BufferDesc.Width == 800, "Got width %u.\n", result_desc.BufferDesc.Width); ok(result_desc.BufferDesc.Height == 600, "Got height %u.\n", result_desc.BufferDesc.Height);
hr = IDXGISwapChain_SetFullscreenState(swapchain, FALSE, NULL); - ok(SUCCEEDED(hr), "SetFullscreenState failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "SetFullscreenState failed, hr %#lx.\n", hr); check_swapchain_fullscreen_state(swapchain, &initial_state);
refcount = IDXGISwapChain_Release(swapchain); - ok(!refcount, "IDXGISwapChain has %u references left.\n", refcount); + ok(!refcount, "IDXGISwapChain has %lu references left.\n", refcount); }
done: @@ -3707,9 +3707,9 @@ done: IDXGIOutput_Release(output); IDXGIAdapter_Release(adapter); refcount = IDXGIDevice_Release(device); - ok(!refcount, "Device has %u references left.\n", refcount); + ok(!refcount, "Device has %lu references left.\n", refcount); refcount = IDXGIFactory_Release(factory); - ok(!refcount, "Factory has %u references left.\n", refcount); + ok(!refcount, "Factory has %lu references left.\n", refcount); DestroyWindow(swapchain_desc.OutputWindow); }
@@ -3721,35 +3721,35 @@ static void test_create_factory(void)
iface = (void *)0xdeadbeef; hr = CreateDXGIFactory(&IID_IDXGIDevice, (void **)&iface); - ok(hr == E_NOINTERFACE, "Got unexpected hr %#x.\n", hr); + ok(hr == E_NOINTERFACE, "Got unexpected hr %#lx.\n", hr); ok(!iface, "Got unexpected iface %p.\n", iface);
hr = CreateDXGIFactory(&IID_IUnknown, (void **)&iface); - ok(SUCCEEDED(hr), "Failed to create factory with IID_IUnknown, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create factory with IID_IUnknown, hr %#lx.\n", hr); IUnknown_Release(iface);
hr = CreateDXGIFactory(&IID_IDXGIObject, (void **)&iface); - ok(SUCCEEDED(hr), "Failed to create factory with IID_IDXGIObject, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create factory with IID_IDXGIObject, hr %#lx.\n", hr); IUnknown_Release(iface);
hr = CreateDXGIFactory(&IID_IDXGIFactory, (void **)&iface); - ok(SUCCEEDED(hr), "Failed to create factory with IID_IDXGIFactory, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create factory with IID_IDXGIFactory, hr %#lx.\n", hr); check_interface(iface, &IID_IDXGIFactory1, FALSE, FALSE); IUnknown_Release(iface);
iface = (void *)0xdeadbeef; hr = CreateDXGIFactory(&IID_IDXGIFactory1, (void **)&iface); - ok(hr == E_NOINTERFACE, "Got unexpected hr %#x.\n", hr); + ok(hr == E_NOINTERFACE, "Got unexpected hr %#lx.\n", hr); ok(!iface, "Got unexpected iface %p.\n", iface);
iface = NULL; hr = CreateDXGIFactory(&IID_IDXGIFactory2, (void **)&iface); ok(hr == S_OK || broken(hr == E_NOINTERFACE) /* Not available on all Windows versions. */, - "Got unexpected hr %#x.\n", hr); + "Got unexpected hr %#lx.\n", hr); if (SUCCEEDED(hr)) { refcount = IUnknown_Release(iface); - ok(!refcount, "Factory has %u references left.\n", refcount); + ok(!refcount, "Factory has %lu references left.\n", refcount); }
if (!pCreateDXGIFactory1) @@ -3760,35 +3760,35 @@ static void test_create_factory(void)
iface = (void *)0xdeadbeef; hr = pCreateDXGIFactory1(&IID_IDXGIDevice, (void **)&iface); - ok(hr == E_NOINTERFACE, "Got unexpected hr %#x.\n", hr); + ok(hr == E_NOINTERFACE, "Got unexpected hr %#lx.\n", hr); ok(!iface, "Got unexpected iface %p.\n", iface);
hr = pCreateDXGIFactory1(&IID_IUnknown, (void **)&iface); - ok(SUCCEEDED(hr), "Failed to create factory with IID_IUnknown, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create factory with IID_IUnknown, hr %#lx.\n", hr); IUnknown_Release(iface);
hr = pCreateDXGIFactory1(&IID_IDXGIObject, (void **)&iface); - ok(SUCCEEDED(hr), "Failed to create factory with IID_IDXGIObject, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create factory with IID_IDXGIObject, hr %#lx.\n", hr); IUnknown_Release(iface);
hr = pCreateDXGIFactory1(&IID_IDXGIFactory, (void **)&iface); - ok(SUCCEEDED(hr), "Failed to create factory with IID_IDXGIFactory, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create factory with IID_IDXGIFactory, hr %#lx.\n", hr); check_interface(iface, &IID_IDXGIFactory1, TRUE, FALSE); refcount = IUnknown_Release(iface); - ok(!refcount, "Factory has %u references left.\n", refcount); + ok(!refcount, "Factory has %lu references left.\n", refcount);
hr = pCreateDXGIFactory1(&IID_IDXGIFactory1, (void **)&iface); - ok(SUCCEEDED(hr), "Failed to create factory with IID_IDXGIFactory1, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create factory with IID_IDXGIFactory1, hr %#lx.\n", hr); IUnknown_Release(iface);
iface = NULL; hr = pCreateDXGIFactory1(&IID_IDXGIFactory2, (void **)&iface); ok(hr == S_OK || broken(hr == E_NOINTERFACE) /* Not available on all Windows versions. */, - "Got unexpected hr %#x.\n", hr); + "Got unexpected hr %#lx.\n", hr); if (SUCCEEDED(hr)) { refcount = IUnknown_Release(iface); - ok(!refcount, "Factory has %u references left.\n", refcount); + ok(!refcount, "Factory has %lu references left.\n", refcount); }
if (!pCreateDXGIFactory2) @@ -3798,7 +3798,7 @@ static void test_create_factory(void) }
hr = pCreateDXGIFactory2(0, &IID_IDXGIFactory3, (void **)&iface); - ok(hr == S_OK, "Failed to create factory, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create factory, hr %#lx.\n", hr); check_interface(iface, &IID_IDXGIFactory, TRUE, FALSE); check_interface(iface, &IID_IDXGIFactory1, TRUE, FALSE); check_interface(iface, &IID_IDXGIFactory2, TRUE, FALSE); @@ -3807,16 +3807,16 @@ static void test_create_factory(void) check_interface(iface, &IID_IDXGIFactory4, TRUE, TRUE); check_interface(iface, &IID_IDXGIFactory5, TRUE, TRUE); refcount = IUnknown_Release(iface); - ok(!refcount, "Factory has %u references left.\n", refcount); + ok(!refcount, "Factory has %lu references left.\n", refcount);
hr = pCreateDXGIFactory2(0, &IID_IDXGIFactory, (void **)&iface); - ok(hr == S_OK, "Failed to create factory, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create factory, hr %#lx.\n", hr); check_interface(iface, &IID_IDXGIFactory, TRUE, FALSE); check_interface(iface, &IID_IDXGIFactory1, TRUE, FALSE); check_interface(iface, &IID_IDXGIFactory2, TRUE, FALSE); check_interface(iface, &IID_IDXGIFactory3, TRUE, FALSE); refcount = IUnknown_Release(iface); - ok(!refcount, "Factory has %u references left.\n", refcount); + ok(!refcount, "Factory has %lu references left.\n", refcount); }
static void test_private_data(void) @@ -3856,67 +3856,67 @@ static void test_private_data(void) * NULL interface is not considered a clear but as setting an interface pointer that * happens to be NULL. */ hr = IDXGIDevice_SetPrivateData(device, &dxgi_private_data_test_guid, 0, NULL); - ok(hr == S_FALSE, "Got unexpected hr %#x.\n", hr); + ok(hr == S_FALSE, "Got unexpected hr %#lx.\n", hr); hr = IDXGIDevice_SetPrivateDataInterface(device, &dxgi_private_data_test_guid, NULL); - ok(hr == S_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr); hr = IDXGIDevice_SetPrivateData(device, &dxgi_private_data_test_guid, ~0U, NULL); - ok(hr == S_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr); hr = IDXGIDevice_SetPrivateData(device, &dxgi_private_data_test_guid, ~0U, NULL); - ok(hr == S_FALSE, "Got unexpected hr %#x.\n", hr); + ok(hr == S_FALSE, "Got unexpected hr %#lx.\n", hr);
hr = IDXGIDevice_SetPrivateDataInterface(device, &dxgi_private_data_test_guid, NULL); - ok(hr == S_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr); size = sizeof(ptr) * 2; ptr = (IUnknown *)0xdeadbeef; hr = IDXGIDevice_GetPrivateData(device, &dxgi_private_data_test_guid, &size, &ptr); - ok(hr == S_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr); ok(!ptr, "Got unexpected pointer %p.\n", ptr); ok(size == sizeof(IUnknown *), "Got unexpected size %u.\n", size);
refcount = get_refcount(test_object); hr = IDXGIDevice_SetPrivateDataInterface(device, &dxgi_private_data_test_guid, (IUnknown *)test_object); - ok(hr == S_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr); expected_refcount = refcount + 1; refcount = get_refcount(test_object); - 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); hr = IDXGIDevice_SetPrivateDataInterface(device, &dxgi_private_data_test_guid, (IUnknown *)test_object); - ok(hr == S_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr); refcount = get_refcount(test_object); - 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);
hr = IDXGIDevice_SetPrivateDataInterface(device, &dxgi_private_data_test_guid, NULL); - ok(hr == S_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr); expected_refcount--; refcount = get_refcount(test_object); - 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);
hr = IDXGIDevice_SetPrivateDataInterface(device, &dxgi_private_data_test_guid, (IUnknown *)test_object); - ok(hr == S_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr); size = sizeof(data); hr = IDXGIDevice_SetPrivateData(device, &dxgi_private_data_test_guid, size, data); - ok(hr == S_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr); refcount = get_refcount(test_object); - 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); hr = IDXGIDevice_SetPrivateData(device, &dxgi_private_data_test_guid, 42, NULL); - ok(hr == S_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr); hr = IDXGIDevice_SetPrivateData(device, &dxgi_private_data_test_guid, 42, NULL); - ok(hr == S_FALSE, "Got unexpected hr %#x.\n", hr); + ok(hr == S_FALSE, "Got unexpected hr %#lx.\n", hr);
hr = IDXGIDevice_SetPrivateDataInterface(device, &dxgi_private_data_test_guid, (IUnknown *)test_object); - ok(hr == S_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr); expected_refcount++; size = 2 * sizeof(ptr); ptr = NULL; hr = IDXGIDevice_GetPrivateData(device, &dxgi_private_data_test_guid, &size, &ptr); - ok(hr == S_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr); ok(size == sizeof(test_object), "Got unexpected size %u.\n", size); expected_refcount++; refcount = get_refcount(test_object); - 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); if (ptr) IUnknown_Release(ptr); expected_refcount--; @@ -3924,35 +3924,35 @@ static void test_private_data(void) ptr = (IUnknown *)0xdeadbeef; size = 1; hr = IDXGIDevice_GetPrivateData(device, &dxgi_private_data_test_guid, &size, NULL); - ok(hr == S_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr); ok(size == sizeof(device), "Got unexpected size %u.\n", size); size = 2 * sizeof(ptr); hr = IDXGIDevice_GetPrivateData(device, &dxgi_private_data_test_guid, &size, NULL); - ok(hr == S_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr); ok(size == sizeof(device), "Got unexpected size %u.\n", size); refcount = get_refcount(test_object); - 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);
size = 1; hr = IDXGIDevice_GetPrivateData(device, &dxgi_private_data_test_guid, &size, &ptr); - ok(hr == DXGI_ERROR_MORE_DATA, "Got unexpected hr %#x.\n", hr); + ok(hr == DXGI_ERROR_MORE_DATA, "Got unexpected hr %#lx.\n", hr); ok(size == sizeof(device), "Got unexpected size %u.\n", size); ok(ptr == (IUnknown *)0xdeadbeef, "Got unexpected pointer %p.\n", ptr); hr = IDXGIDevice_GetPrivateData(device, &dxgi_private_data_test_guid2, NULL, NULL); - ok(hr == E_INVALIDARG, "Got unexpected hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Got unexpected hr %#lx.\n", hr); size = 0xdeadbabe; hr = IDXGIDevice_GetPrivateData(device, &dxgi_private_data_test_guid2, &size, &ptr); - ok(hr == DXGI_ERROR_NOT_FOUND, "Got unexpected hr %#x.\n", hr); + ok(hr == DXGI_ERROR_NOT_FOUND, "Got unexpected hr %#lx.\n", hr); ok(size == 0, "Got unexpected size %u.\n", size); ok(ptr == (IUnknown *)0xdeadbeef, "Got unexpected pointer %p.\n", ptr); hr = IDXGIDevice_GetPrivateData(device, &dxgi_private_data_test_guid, NULL, &ptr); - ok(hr == E_INVALIDARG, "Got unexpected hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Got unexpected hr %#lx.\n", hr); ok(ptr == (IUnknown *)0xdeadbeef, "Got unexpected pointer %p.\n", ptr);
refcount = IDXGIDevice_Release(device); - ok(!refcount, "Device has %u references left.\n", refcount); + ok(!refcount, "Device has %lu references left.\n", refcount); refcount = IDXGIDevice_Release(test_object); - ok(!refcount, "Test object has %u references left.\n", refcount); + ok(!refcount, "Test object has %lu references left.\n", refcount); }
#define check_surface_desc(a, b) check_surface_desc_(__LINE__, a, b) @@ -3963,7 +3963,7 @@ static void check_surface_desc_(unsigned int line, IDXGISurface *surface, HRESULT hr;
hr = IDXGISurface_GetDesc(surface, &surface_desc); - ok_(__FILE__, line)(hr == S_OK, "Failed to get surface desc, hr %#x.\n", hr); + ok_(__FILE__, line)(hr == S_OK, "Failed to get surface desc, hr %#lx.\n", hr); ok_(__FILE__, line)(surface_desc.Width == swapchain_desc->BufferDesc.Width, "Got Width %u, expected %u.\n", surface_desc.Width, swapchain_desc->BufferDesc.Width); ok_(__FILE__, line)(surface_desc.Height == swapchain_desc->BufferDesc.Height, @@ -4074,17 +4074,17 @@ static void test_swapchain_resize(IUnknown *device, BOOL is_d3d12) swapchain_desc.Flags = 0;
hr = IDXGIFactory_CreateSwapChain(factory, device, &swapchain_desc, &swapchain); - ok(hr == S_OK, "Failed to create swapchain, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create swapchain, hr %#lx.\n", hr); hr = IDXGISwapChain_GetBuffer(swapchain, 0, &IID_IDXGISurface, (void **)&surface); expected_hr = is_d3d12 ? E_NOINTERFACE : S_OK; - ok(hr == expected_hr, "Got hr %#x, expected %#x.\n", hr, expected_hr); + ok(hr == expected_hr, "Got hr %#lx, expected %#lx.\n", hr, expected_hr); ok(!surface || hr == S_OK, "Got unexpected pointer %p.\n", surface); hr = IDXGISwapChain_GetBuffer(swapchain, 0, &IID_ID3D10Texture2D, (void **)&texture); - ok(hr == expected_hr, "Got hr %#x, expected %#x.\n", hr, expected_hr); + ok(hr == expected_hr, "Got hr %#lx, expected %#lx.\n", hr, expected_hr); ok(!texture || hr == S_OK, "Got unexpected pointer %p.\n", texture); expected_hr = is_d3d12 ? S_OK : E_NOINTERFACE; hr = IDXGISwapChain_GetBuffer(swapchain, 0, &IID_ID3D12Resource, (void **)&resource); - ok(hr == expected_hr, "Got hr %#x, expected %#x.\n", hr, expected_hr); + ok(hr == expected_hr, "Got hr %#lx, expected %#lx.\n", hr, expected_hr); ok(!resource || hr == S_OK, "Got unexpected pointer %p.\n", resource);
ret = GetClientRect(window, &r); @@ -4094,7 +4094,7 @@ static void test_swapchain_resize(IUnknown *device, BOOL is_d3d12)
memset(&swapchain_desc, 0, sizeof(swapchain_desc)); hr = IDXGISwapChain_GetDesc(swapchain, &swapchain_desc); - ok(SUCCEEDED(hr), "Failed to get swapchain desc, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get swapchain desc, hr %#lx.\n", hr); ok(swapchain_desc.BufferDesc.Width == 640, "Got unexpected BufferDesc.Width %u.\n", swapchain_desc.BufferDesc.Width); ok(swapchain_desc.BufferDesc.Height == 480, @@ -4136,7 +4136,7 @@ static void test_swapchain_resize(IUnknown *device, BOOL is_d3d12) check_resource_desc(resource, &swapchain_desc);
hr = IDXGISwapChain_ResizeBuffers(swapchain, 2, 320, 240, DXGI_FORMAT_B8G8R8A8_UNORM, 0); - ok(hr == DXGI_ERROR_INVALID_CALL, "Got unexpected hr %#x.\n", hr); + ok(hr == DXGI_ERROR_INVALID_CALL, "Got unexpected hr %#lx.\n", hr);
ret = GetClientRect(window, &r); ok(ret, "Failed to get client rect.\n"); @@ -4145,7 +4145,7 @@ static void test_swapchain_resize(IUnknown *device, BOOL is_d3d12)
memset(&swapchain_desc, 0, sizeof(swapchain_desc)); hr = IDXGISwapChain_GetDesc(swapchain, &swapchain_desc); - ok(SUCCEEDED(hr), "Failed to get swapchain desc, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get swapchain desc, hr %#lx.\n", hr); ok(swapchain_desc.BufferDesc.Width == 640, "Got unexpected BufferDesc.Width %u.\n", swapchain_desc.BufferDesc.Width); ok(swapchain_desc.BufferDesc.Height == 480, @@ -4196,17 +4196,17 @@ static void test_swapchain_resize(IUnknown *device, BOOL is_d3d12) }
hr = IDXGISwapChain_ResizeBuffers(swapchain, 2, 320, 240, DXGI_FORMAT_B8G8R8A8_UNORM, 0); - ok(hr == S_OK, "Failed to resize buffers, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to resize buffers, hr %#lx.\n", hr); hr = IDXGISwapChain_GetBuffer(swapchain, 0, &IID_IDXGISurface, (void **)&surface); expected_hr = is_d3d12 ? E_NOINTERFACE : S_OK; - ok(hr == expected_hr, "Got hr %#x, expected %#x.\n", hr, expected_hr); + ok(hr == expected_hr, "Got hr %#lx, expected %#lx.\n", hr, expected_hr); ok(!surface || hr == S_OK, "Got unexpected pointer %p.\n", surface); hr = IDXGISwapChain_GetBuffer(swapchain, 0, &IID_ID3D10Texture2D, (void **)&texture); - ok(hr == expected_hr, "Got hr %#x, expected %#x.\n", hr, expected_hr); + ok(hr == expected_hr, "Got hr %#lx, expected %#lx.\n", hr, expected_hr); ok(!texture || hr == S_OK, "Got unexpected pointer %p.\n", texture); expected_hr = is_d3d12 ? S_OK : E_NOINTERFACE; hr = IDXGISwapChain_GetBuffer(swapchain, 0, &IID_ID3D12Resource, (void **)&resource); - ok(hr == expected_hr, "Got hr %#x, expected %#x.\n", hr, expected_hr); + ok(hr == expected_hr, "Got hr %#lx, expected %#lx.\n", hr, expected_hr); ok(!resource || hr == S_OK, "Got unexpected pointer %p.\n", resource);
ret = GetClientRect(window, &r); @@ -4216,7 +4216,7 @@ static void test_swapchain_resize(IUnknown *device, BOOL is_d3d12)
memset(&swapchain_desc, 0, sizeof(swapchain_desc)); hr = IDXGISwapChain_GetDesc(swapchain, &swapchain_desc); - ok(SUCCEEDED(hr), "Failed to get swapchain desc, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get swapchain desc, hr %#lx.\n", hr); ok(swapchain_desc.BufferDesc.Width == 320, "Got unexpected BufferDesc.Width %u.\n", swapchain_desc.BufferDesc.Width); ok(swapchain_desc.BufferDesc.Height == 240, @@ -4267,16 +4267,16 @@ static void test_swapchain_resize(IUnknown *device, BOOL is_d3d12) }
hr = IDXGISwapChain_ResizeBuffers(swapchain, 0, 0, 0, DXGI_FORMAT_UNKNOWN, 0); - ok(hr == S_OK, "Failed to resize buffers, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to resize buffers, hr %#lx.\n", hr);
memset(&swapchain_desc, 0, sizeof(swapchain_desc)); hr = IDXGISwapChain_GetDesc(swapchain, &swapchain_desc); - ok(SUCCEEDED(hr), "Failed to get swapchain desc, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get swapchain desc, hr %#lx.\n", hr); ok(swapchain_desc.BufferDesc.Width == client_rect.right - client_rect.left, - "Got unexpected BufferDesc.Width %u, expected %u.\n", + "Got unexpected BufferDesc.Width %u, expected %lu.\n", swapchain_desc.BufferDesc.Width, client_rect.right - client_rect.left); ok(swapchain_desc.BufferDesc.Height == client_rect.bottom - client_rect.top, - "Got unexpected bufferDesc.Height %u, expected %u.\n", + "Got unexpected bufferDesc.Height %u, expected %lu.\n", swapchain_desc.BufferDesc.Height, client_rect.bottom - client_rect.top); ok(swapchain_desc.BufferDesc.RefreshRate.Numerator == 60, "Got unexpected BufferDesc.RefreshRate.Numerator %u.\n", @@ -4318,34 +4318,34 @@ static void test_swapchain_resize(IUnknown *device, BOOL is_d3d12) else if (!is_d3d12) { hr = IDXGISwapChain3_ResizeBuffers1(swapchain3, 2, 320, 240, DXGI_FORMAT_B8G8R8A8_UNORM, 0, node_mask, present_queue); - ok(hr == DXGI_ERROR_INVALID_CALL, "Expected DXGI_ERROR_INVALID_CALL, got hr %#x.\n", hr); + ok(hr == DXGI_ERROR_INVALID_CALL, "Expected DXGI_ERROR_INVALID_CALL, got hr %#lx.\n", hr); IDXGISwapChain3_Release(swapchain3); } else { hr = IDXGISwapChain3_ResizeBuffers1(swapchain3, 2, 320, 240, DXGI_FORMAT_B8G8R8A8_UNORM, 0, node_mask, present_queue); - ok(hr == S_OK, "Failed to resize buffers, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to resize buffers, hr %#lx.\n", hr); hr = IDXGISwapChain3_ResizeBuffers1(swapchain3, 2, 320, 240, DXGI_FORMAT_B8G8R8A8_UNORM, 0, NULL, present_queue); - ok(hr == DXGI_ERROR_INVALID_CALL, "Expected DXGI_ERROR_INVALID_CALL, got hr %#x.\n", hr); + ok(hr == DXGI_ERROR_INVALID_CALL, "Expected DXGI_ERROR_INVALID_CALL, got hr %#lx.\n", hr); hr = IDXGISwapChain3_ResizeBuffers1(swapchain3, 2, 320, 240, DXGI_FORMAT_B8G8R8A8_UNORM, 0, NULL, NULL); - ok(hr == DXGI_ERROR_INVALID_CALL, "Expected DXGI_ERROR_INVALID_CALL, got hr %#x.\n", hr); + ok(hr == DXGI_ERROR_INVALID_CALL, "Expected DXGI_ERROR_INVALID_CALL, got hr %#lx.\n", hr); hr = IDXGISwapChain3_ResizeBuffers1(swapchain3, 0, 320, 240, DXGI_FORMAT_B8G8R8A8_UNORM, 0, NULL, NULL); - ok(hr == DXGI_ERROR_INVALID_CALL, "Expected DXGI_ERROR_INVALID_CALL, got hr %#x.\n", hr); + ok(hr == DXGI_ERROR_INVALID_CALL, "Expected DXGI_ERROR_INVALID_CALL, got hr %#lx.\n", hr); node_mask[0] = 2; node_mask[1] = 2; hr = IDXGISwapChain3_ResizeBuffers1(swapchain3, 2, 320, 240, DXGI_FORMAT_B8G8R8A8_UNORM, 0, node_mask, present_queue); - ok(hr == DXGI_ERROR_INVALID_CALL, "Expected DXGI_ERROR_INVALID_CALL, got hr %#x.\n", hr); + ok(hr == DXGI_ERROR_INVALID_CALL, "Expected DXGI_ERROR_INVALID_CALL, got hr %#lx.\n", hr); /* Windows validates node masks even when the buffer count is zero. It defaults to the current buffer count. * NULL queues cause some Windows versions to crash. */ hr = IDXGISwapChain3_ResizeBuffers1(swapchain3, 0, 320, 240, DXGI_FORMAT_B8G8R8A8_UNORM, 0, node_mask, present_queue); - ok(hr == DXGI_ERROR_INVALID_CALL, "Expected DXGI_ERROR_INVALID_CALL, got hr %#x.\n", hr); + ok(hr == DXGI_ERROR_INVALID_CALL, "Expected DXGI_ERROR_INVALID_CALL, got hr %#lx.\n", hr); IDXGISwapChain3_Release(swapchain3); }
IDXGISwapChain_Release(swapchain); DestroyWindow(window); refcount = IDXGIFactory_Release(factory); - ok(refcount == !is_d3d12, "Got unexpected refcount %u.\n", refcount); + ok(refcount == !is_d3d12, "Got unexpected refcount %lu.\n", refcount); }
static void test_swapchain_parameters(void) @@ -4477,9 +4477,9 @@ static void test_swapchain_parameters(void) ok(hr == S_OK, "IDXGIDevice does not implement IUnknown.\n");
hr = IDXGIDevice_GetAdapter(device, &adapter); - ok(hr == S_OK, "Failed to get adapter, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get adapter, hr %#lx.\n", hr); hr = IDXGIAdapter_GetParent(adapter, &IID_IDXGIFactory, (void **)&factory); - ok(hr == S_OK, "Failed to get parent, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get parent, hr %#lx.\n", hr); IDXGIAdapter_Release(adapter);
for (i = 0; i < ARRAY_SIZE(tests); ++i) @@ -4499,16 +4499,16 @@ static void test_swapchain_parameters(void) hr = IDXGIFactory_CreateSwapChain(factory, obj, &desc, &swapchain); ok(hr == tests[i].hr || broken(hr == tests[i].vista_hr) || (SUCCEEDED(tests[i].hr) && hr == DXGI_STATUS_OCCLUDED), - "Got unexpected hr %#x, test %u.\n", hr, i); + "Got unexpected hr %#lx, test %u.\n", hr, i); if (FAILED(hr)) continue;
hr = IDXGISwapChain_GetBuffer(swapchain, 0, &IID_IDXGIResource, (void **)&resource); - todo_wine ok(SUCCEEDED(hr), "GetBuffer(0) failed, hr %#x, test %u.\n", hr, i); + todo_wine ok(SUCCEEDED(hr), "GetBuffer(0) failed, hr %#lx, test %u.\n", hr, i); if (FAILED(hr)) { hr = IDXGISwapChain_SetFullscreenState(swapchain, FALSE, NULL); - ok(SUCCEEDED(hr), "SetFullscreenState failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "SetFullscreenState failed, hr %#lx.\n", hr);
IDXGISwapChain_Release(swapchain); continue; @@ -4516,19 +4516,19 @@ static void test_swapchain_parameters(void)
expected_usage = DXGI_USAGE_RENDER_TARGET_OUTPUT | DXGI_USAGE_BACK_BUFFER; hr = IDXGIResource_GetUsage(resource, &usage); - ok(SUCCEEDED(hr), "Failed to get resource usage, hr %#x, test %u.\n", hr, i); + ok(SUCCEEDED(hr), "Failed to get resource usage, hr %#lx, test %u.\n", hr, i); ok((usage & expected_usage) == expected_usage, "Got usage %x, expected %x, test %u.\n", usage, expected_usage, i);
IDXGIResource_Release(resource);
hr = IDXGISwapChain_GetDesc(swapchain, &desc); - ok(SUCCEEDED(hr), "Failed to get swapchain desc, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get swapchain desc, hr %#lx.\n", hr);
for (j = 1; j <= tests[i].highest_accessible_buffer; j++) { hr = IDXGISwapChain_GetBuffer(swapchain, j, &IID_IDXGIResource, (void **)&resource); - ok(SUCCEEDED(hr), "GetBuffer(%u) failed, hr %#x, test %u.\n", hr, i, j); + ok(SUCCEEDED(hr), "GetBuffer(%lu) failed, hr %#x, test %u.\n", hr, i, j);
/* Buffers > 0 are supposed to be read only. This is the case except that in * fullscreen mode on Windows <= 8 the last backbuffer (BufferCount - 1) is @@ -4553,7 +4553,7 @@ static void test_swapchain_parameters(void) broken_usage |= DXGI_USAGE_READ_ONLY;
hr = IDXGIResource_GetUsage(resource, &usage); - ok(SUCCEEDED(hr), "Failed to get resource usage, hr %#x, test %u, buffer %u.\n", hr, i, j); + ok(SUCCEEDED(hr), "Failed to get resource usage, hr %#lx, test %u, buffer %u.\n", hr, i, j); ok(usage == expected_usage || broken(usage == broken_usage), "Got usage %x, expected %x, test %u, buffer %u.\n", usage, expected_usage, i, j); @@ -4561,10 +4561,10 @@ static void test_swapchain_parameters(void) IDXGIResource_Release(resource); } hr = IDXGISwapChain_GetBuffer(swapchain, j, &IID_IDXGIResource, (void **)&resource); - ok(hr == DXGI_ERROR_INVALID_CALL, "GetBuffer(%u) returned unexpected hr %#x, test %u.\n", j, hr, i); + ok(hr == DXGI_ERROR_INVALID_CALL, "GetBuffer(%u) returned unexpected hr %#lx, test %u.\n", j, hr, i);
hr = IDXGISwapChain_SetFullscreenState(swapchain, FALSE, NULL); - ok(SUCCEEDED(hr), "SetFullscreenState failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "SetFullscreenState failed, hr %#lx.\n", hr);
IDXGISwapChain_Release(swapchain); } @@ -4584,10 +4584,10 @@ static void test_swapchain_parameters(void) desc.Windowed = TRUE; desc.SwapEffect = DXGI_SWAP_EFFECT_DISCARD; hr = IDXGIFactory_CreateSwapChain(factory, obj, &desc, &swapchain); - ok(hr == S_OK, "Got unexpected hr %#x, test %u.\n", hr, i); + ok(hr == S_OK, "Got unexpected hr %#lx, test %u.\n", hr, i);
hr = IDXGISwapChain_GetDesc(swapchain, &desc); - ok(hr == S_OK, "Failed to get swapchain desc, hr %#x, test %u.\n", hr, i); + ok(hr == S_OK, "Failed to get swapchain desc, hr %#lx, test %u.\n", hr, i); todo_wine_if(usage & ~(DXGI_USAGE_RENDER_TARGET_OUTPUT | DXGI_USAGE_SHADER_INPUT)) ok(desc.BufferUsage == usage, "Got usage %#x, expected %#x, test %u.\n", desc.BufferUsage, usage, i);
@@ -4598,7 +4598,7 @@ static void test_swapchain_parameters(void) expected_bind_flags |= D3D11_BIND_SHADER_RESOURCE;
hr = IDXGISwapChain_GetBuffer(swapchain, 0, &IID_ID3D10Texture2D, (void **)&d3d10_texture); - ok(hr == S_OK, "Failed to get d3d10 texture, hr %#x, test %u.\n", hr, i); + ok(hr == S_OK, "Failed to get d3d10 texture, hr %#lx, test %u.\n", hr, i); ID3D10Texture2D_GetDesc(d3d10_texture, &d3d10_texture_desc); ok(d3d10_texture_desc.BindFlags == expected_bind_flags, "Got d3d10 bind flags %#x, expected %#x, test %u.\n", @@ -4606,7 +4606,7 @@ static void test_swapchain_parameters(void) ID3D10Texture2D_Release(d3d10_texture);
hr = IDXGISwapChain_GetBuffer(swapchain, 0, &IID_ID3D11Texture2D, (void **)&d3d11_texture); - ok(hr == S_OK || broken(hr == E_NOINTERFACE), "Failed to get d3d11 texture, hr %#x, test %u.\n", hr, i); + ok(hr == S_OK || broken(hr == E_NOINTERFACE), "Failed to get d3d11 texture, hr %#lx, test %u.\n", hr, i); if (SUCCEEDED(hr)) { ID3D11Texture2D_GetDesc(d3d11_texture, &d3d11_texture_desc); @@ -4617,7 +4617,7 @@ static void test_swapchain_parameters(void) }
hr = IDXGISwapChain_GetBuffer(swapchain, 0, &IID_IDXGIResource, (void **)&resource); - todo_wine ok(hr == S_OK, "Failed to get buffer, hr %#x, test %u.\n", hr, i); + todo_wine ok(hr == S_OK, "Failed to get buffer, hr %#lx, test %u.\n", hr, i); if (FAILED(hr)) { IDXGISwapChain_Release(swapchain); @@ -4625,7 +4625,7 @@ static void test_swapchain_parameters(void) } expected_usage = usage | DXGI_USAGE_BACK_BUFFER | DXGI_USAGE_DISCARD_ON_PRESENT; hr = IDXGIResource_GetUsage(resource, &usage); - ok(hr == S_OK, "Failed to get resource usage, hr %#x, test %u.\n", hr, i); + ok(hr == S_OK, "Failed to get resource usage, hr %#lx, test %u.\n", hr, i); ok(usage == expected_usage, "Got usage %x, expected %x, test %u.\n", usage, expected_usage, i); IDXGIResource_Release(resource);
@@ -4644,19 +4644,19 @@ static void test_swapchain_parameters(void) desc.Windowed = TRUE; desc.SwapEffect = DXGI_SWAP_EFFECT_FLIP_SEQUENTIAL; hr = IDXGIFactory_CreateSwapChain(factory, obj, &desc, &swapchain); - ok(hr == DXGI_ERROR_INVALID_CALL, "Got unexpected hr %#x.\n", hr); + ok(hr == DXGI_ERROR_INVALID_CALL, "Got unexpected hr %#lx.\n", hr); desc.SwapEffect = DXGI_SWAP_EFFECT_FLIP_DISCARD; hr = IDXGIFactory_CreateSwapChain(factory, obj, &desc, &swapchain); - ok(hr == DXGI_ERROR_INVALID_CALL, "Got unexpected hr %#x.\n", hr); + ok(hr == DXGI_ERROR_INVALID_CALL, "Got unexpected hr %#lx.\n", hr); if (check_multisample_quality_levels(device, desc.BufferDesc.Format, desc.SampleDesc.Count)) { desc.SwapEffect = DXGI_SWAP_EFFECT_DISCARD; hr = IDXGIFactory_CreateSwapChain(factory, obj, &desc, &swapchain); - ok(hr == S_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr); IDXGISwapChain_Release(swapchain); desc.SwapEffect = DXGI_SWAP_EFFECT_SEQUENTIAL; hr = IDXGIFactory_CreateSwapChain(factory, obj, &desc, &swapchain); - ok(hr == S_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr); IDXGISwapChain_Release(swapchain); } else @@ -4667,7 +4667,7 @@ static void test_swapchain_parameters(void) IDXGIFactory_Release(factory); IUnknown_Release(obj); refcount = IDXGIDevice_Release(device); - ok(!refcount, "Device has %u references left.\n", refcount); + ok(!refcount, "Device has %lu references left.\n", refcount); DestroyWindow(window); }
@@ -4702,16 +4702,16 @@ static void test_swapchain_present(IUnknown *device, BOOL is_d3d12) swapchain_desc.Flags = 0;
hr = IDXGIFactory_CreateSwapChain(factory, device, &swapchain_desc, &swapchain); - ok(hr == S_OK, "Failed to create swapchain, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create swapchain, hr %#lx.\n", hr);
for (i = 0; i < 10; ++i) { hr = IDXGISwapChain_Present(swapchain, i, 0); ok(hr == (i <= 4 ? S_OK : DXGI_ERROR_INVALID_CALL), - "Got unexpected hr %#x for sync interval %u.\n", hr, i); + "Got unexpected hr %#lx for sync interval %u.\n", hr, i); } hr = IDXGISwapChain_Present(swapchain, 0, 0); - 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(flags); ++i) { @@ -4720,18 +4720,18 @@ static void test_swapchain_present(IUnknown *device, BOOL is_d3d12)
/* Another window covers the swapchain window. Not reported as occluded. */ hr = IDXGISwapChain_Present(swapchain, 0, flags[i]); - 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);
/* Minimised window. */ ShowWindow(swapchain_desc.OutputWindow, SW_MINIMIZE); hr = IDXGISwapChain_Present(swapchain, 0, flags[i]); - ok(hr == (is_d3d12 ? S_OK : DXGI_STATUS_OCCLUDED), "Test %u: Got unexpected hr %#x.\n", i, hr); + ok(hr == (is_d3d12 ? S_OK : DXGI_STATUS_OCCLUDED), "Test %u: Got unexpected hr %#lx.\n", i, hr); ShowWindow(swapchain_desc.OutputWindow, SW_NORMAL);
/* Hidden window. */ ShowWindow(swapchain_desc.OutputWindow, SW_HIDE); hr = IDXGISwapChain_Present(swapchain, 0, flags[i]); - 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); ShowWindow(swapchain_desc.OutputWindow, SW_SHOW); DestroyWindow(occluding_window);
@@ -4746,15 +4746,15 @@ static void test_swapchain_present(IUnknown *device, BOOL is_d3d12) continue; } flush_events(); - 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 = IDXGISwapChain_ResizeBuffers(swapchain, 0, 0, 0, DXGI_FORMAT_UNKNOWN, 0); - 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 = IDXGISwapChain_Present(swapchain, 0, flags[i]); - 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); output = NULL; fullscreen = FALSE; hr = IDXGISwapChain_GetFullscreenState(swapchain, &fullscreen, &output); - 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); ok(fullscreen, "Test %u: Got unexpected fullscreen status.\n", i); ok(!!output, "Test %u: Got unexpected output.\n", i);
@@ -4763,14 +4763,14 @@ static void test_swapchain_present(IUnknown *device, BOOL is_d3d12) /* Still fullscreen. */ fullscreen = FALSE; hr = IDXGISwapChain_GetFullscreenState(swapchain, &fullscreen, 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); ok(fullscreen, "Test %u: Got unexpected fullscreen status.\n", i); /* Calling IDXGISwapChain_Present() will exit fullscreen. */ hr = IDXGISwapChain_Present(swapchain, 0, flags[i]); - 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); fullscreen = TRUE; hr = IDXGISwapChain_GetFullscreenState(swapchain, &fullscreen, 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); /* Now fullscreen mode is exited. */ if (!flags[i] && !is_d3d12) /* Still fullscreen on vista and 2008. */ @@ -4789,26 +4789,26 @@ static void test_swapchain_present(IUnknown *device, BOOL is_d3d12) * compositing. D3d12 fullscreen mode acts just like borderless * fullscreen window mode. */ hr = IDXGISwapChain_SetFullscreenState(swapchain, TRUE, 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); fullscreen = FALSE; hr = IDXGISwapChain_GetFullscreenState(swapchain, &fullscreen, 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); ok(fullscreen, "Test %u: Got unexpected fullscreen status.\n", i); hr = IDXGISwapChain_ResizeBuffers(swapchain, 0, 0, 0, DXGI_FORMAT_UNKNOWN, 0); - 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 = IDXGISwapChain_Present(swapchain, 0, flags[i]); - 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);
occluding_window = CreateWindowA("static", "occluding_window", WS_POPUP, 0, 0, 400, 200, 0, 0, 0, 0); /* An invisible window doesn't cause the swapchain to exit fullscreen * mode. */ hr = IDXGISwapChain_ResizeBuffers(swapchain, 0, 0, 0, DXGI_FORMAT_UNKNOWN, 0); - 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 = IDXGISwapChain_Present(swapchain, 0, flags[i]); - 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); fullscreen = FALSE; hr = IDXGISwapChain_GetFullscreenState(swapchain, &fullscreen, 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); ok(fullscreen, "Test %u: Got unexpected fullscreen status.\n", i); /* A visible, but with bottom z-order window still causes the * swapchain to exit fullscreen mode. */ @@ -4822,19 +4822,19 @@ static void test_swapchain_present(IUnknown *device, BOOL is_d3d12) * for d3d12. */ fullscreen = TRUE; hr = IDXGISwapChain_GetFullscreenState(swapchain, &fullscreen, 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); todo_wine_if(!is_d3d12) ok(is_d3d12 ? fullscreen : !fullscreen, "Test %u: Got unexpected fullscreen status.\n", i);
hr = IDXGISwapChain_ResizeBuffers(swapchain, 0, 0, 0, DXGI_FORMAT_UNKNOWN, 0); - 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 = IDXGISwapChain_Present(swapchain, 0, flags[i]); todo_wine_if(is_d3d12) ok(hr == (is_d3d12 ? DXGI_STATUS_OCCLUDED : S_OK), - "Test %u: Got unexpected hr %#x.\n", i, hr); + "Test %u: Got unexpected hr %#lx.\n", i, hr);
fullscreen = TRUE; hr = IDXGISwapChain_GetFullscreenState(swapchain, &fullscreen, 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); if (flags[i] == DXGI_PRESENT_TEST) todo_wine_if(!is_d3d12) ok(is_d3d12 ? fullscreen : !fullscreen, "Test %u: Got unexpected fullscreen status.\n", i); @@ -4846,67 +4846,67 @@ static void test_swapchain_present(IUnknown *device, BOOL is_d3d12) * IDXGISwapChain_Present() calls to work, otherwise they will return * DXGI_ERROR_INVALID_CALL */ hr = IDXGISwapChain_ResizeBuffers(swapchain, 0, 0, 0, DXGI_FORMAT_UNKNOWN, 0); - 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 = IDXGISwapChain_Present(swapchain, 0, flags[i]); if (flags[i] == DXGI_PRESENT_TEST) todo_wine_if(is_d3d12) ok(hr == (is_d3d12 ? DXGI_STATUS_OCCLUDED : S_OK), - "Test %u: Got unexpected hr %#x.\n", i, hr); + "Test %u: Got unexpected hr %#lx.\n", i, hr); else - 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);
/* Trying to break out of fullscreen mode again. This time, don't call * IDXGISwapChain_GetFullscreenState() before IDXGISwapChain_Present(). */ ShowWindow(occluding_window, SW_HIDE); hr = IDXGISwapChain_SetFullscreenState(swapchain, TRUE, 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); ShowWindow(occluding_window, SW_SHOW);
hr = IDXGISwapChain_ResizeBuffers(swapchain, 0, 0, 0, DXGI_FORMAT_UNKNOWN, 0); - 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 = IDXGISwapChain_Present(swapchain, 0, flags[i]); /* hr == S_OK on vista and 2008 */ todo_wine ok(hr == DXGI_STATUS_OCCLUDED || broken(hr == S_OK), - "Test %u: Got unexpected hr %#x.\n", i, hr); + "Test %u: Got unexpected hr %#lx.\n", i, hr);
hr = IDXGISwapChain_ResizeBuffers(swapchain, 0, 0, 0, DXGI_FORMAT_UNKNOWN, 0); - 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 = IDXGISwapChain_Present(swapchain, 0, flags[i]); if (flags[i] == DXGI_PRESENT_TEST) { todo_wine ok(hr == DXGI_STATUS_OCCLUDED || broken(hr == S_OK), - "Test %u: Got unexpected hr %#x.\n", i, hr); + "Test %u: Got unexpected hr %#lx.\n", i, hr); /* IDXGISwapChain_Present() without flags refreshes the occlusion * state. */ hr = IDXGISwapChain_ResizeBuffers(swapchain, 0, 0, 0, DXGI_FORMAT_UNKNOWN, 0); - 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 = IDXGISwapChain_Present(swapchain, 0, 0); todo_wine ok(hr == DXGI_STATUS_OCCLUDED || broken(hr == S_OK), - "Test %u: Got unexpected hr %#x.\n", i, hr); + "Test %u: Got unexpected hr %#lx.\n", i, hr); hr = IDXGISwapChain_ResizeBuffers(swapchain, 0, 0, 0, DXGI_FORMAT_UNKNOWN, 0); - 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 = IDXGISwapChain_Present(swapchain, 0, DXGI_PRESENT_TEST); - 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); } else { - 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); } fullscreen = TRUE; hr = IDXGISwapChain_GetFullscreenState(swapchain, &fullscreen, 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); todo_wine ok(!fullscreen, "Test %u: Got unexpected fullscreen status.\n", i);
DestroyWindow(occluding_window); flush_events(); hr = IDXGISwapChain_ResizeBuffers(swapchain, 0, 0, 0, DXGI_FORMAT_UNKNOWN, 0); - 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 = IDXGISwapChain_Present(swapchain, 0, flags[i]); - 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 = IDXGISwapChain_SetFullscreenState(swapchain, FALSE, 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); hr = IDXGISwapChain_ResizeBuffers(swapchain, 0, 0, 0, DXGI_FORMAT_UNKNOWN, 0); - 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); }
wait_device_idle(device); @@ -4914,7 +4914,7 @@ static void test_swapchain_present(IUnknown *device, BOOL is_d3d12) IDXGISwapChain_Release(swapchain); DestroyWindow(swapchain_desc.OutputWindow); refcount = IDXGIFactory_Release(factory); - ok(refcount == !is_d3d12, "Got unexpected refcount %u.\n", refcount); + ok(refcount == !is_d3d12, "Got unexpected refcount %lu.\n", refcount); }
static void test_swapchain_backbuffer_index(IUnknown *device, BOOL is_d3d12) @@ -4964,7 +4964,7 @@ static void test_swapchain_backbuffer_index(IUnknown *device, BOOL is_d3d12) swapchain_desc.SwapEffect = swap_effects[i]; expected_hr = is_d3d12 && !is_flip_model(swap_effects[i]) ? DXGI_ERROR_INVALID_CALL : S_OK; hr = IDXGIFactory_CreateSwapChain(factory, device, &swapchain_desc, &swapchain); - ok(hr == expected_hr, "Got hr %#x, expected %#x.\n", hr, expected_hr); + ok(hr == expected_hr, "Got hr %#lx, expected %#lx.\n", hr, expected_hr); if (FAILED(hr)) continue;
@@ -4982,20 +4982,20 @@ static void test_swapchain_backbuffer_index(IUnknown *device, BOOL is_d3d12) expected_index = is_d3d12 ? j % swapchain_desc.BufferCount : 0; ok(index == expected_index, "Got back buffer index %u, expected %u.\n", index, expected_index); hr = IDXGISwapChain3_Present(swapchain3, 0, 0); - ok(hr == S_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr); }
wait_device_idle(device);
IDXGISwapChain3_Release(swapchain3); refcount = IDXGISwapChain_Release(swapchain); - ok(!refcount, "Swapchain has %u references left.\n", refcount); + ok(!refcount, "Swapchain has %lu references left.\n", refcount); }
done: DestroyWindow(swapchain_desc.OutputWindow); refcount = IDXGIFactory_Release(factory); - ok(refcount == !is_d3d12, "Got unexpected refcount %u.\n", refcount); + ok(refcount == !is_d3d12, "Got unexpected refcount %lu.\n", refcount); }
static void test_swapchain_formats(IUnknown *device, BOOL is_d3d12) @@ -5082,18 +5082,18 @@ static void test_swapchain_formats(IUnknown *device, BOOL is_d3d12) ok(hr == expected_hr /* Flip presentation model not supported. */ || broken(hr == DXGI_ERROR_INVALID_CALL && is_flip_model(tests[i].swap_effect) && !is_d3d12), - "Test %u, d3d12 %#x: Got hr %#x, expected %#x.\n", i, is_d3d12, hr, expected_hr); + "Test %u, d3d12 %#x: Got hr %#lx, expected %#lx.\n", i, is_d3d12, hr, expected_hr);
if (SUCCEEDED(hr)) { refcount = IDXGISwapChain_Release(swapchain); - ok(!refcount, "Swapchain has %u references left.\n", refcount); + ok(!refcount, "Swapchain has %lu references left.\n", refcount); } }
DestroyWindow(swapchain_desc.OutputWindow); refcount = IDXGIFactory_Release(factory); - ok(refcount == !is_d3d12, "Got unexpected refcount %u.\n", refcount); + ok(refcount == !is_d3d12, "Got unexpected refcount %lu.\n", refcount); }
static void test_maximum_frame_latency(void) @@ -5113,28 +5113,28 @@ static void test_maximum_frame_latency(void) if (SUCCEEDED(IDXGIDevice_QueryInterface(device, &IID_IDXGIDevice1, (void **)&device1))) { hr = IDXGIDevice1_GetMaximumFrameLatency(device1, NULL); - ok(hr == DXGI_ERROR_INVALID_CALL, "Got unexpected hr %#x.\n", hr); + ok(hr == DXGI_ERROR_INVALID_CALL, "Got unexpected hr %#lx.\n", hr);
hr = IDXGIDevice1_GetMaximumFrameLatency(device1, &max_latency); - ok(hr == S_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr); ok(max_latency == DEFAULT_FRAME_LATENCY, "Got unexpected maximum frame latency %u.\n", max_latency);
hr = IDXGIDevice1_SetMaximumFrameLatency(device1, MAX_FRAME_LATENCY); - ok(hr == S_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr); hr = IDXGIDevice1_GetMaximumFrameLatency(device1, &max_latency); - ok(hr == S_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr); ok(max_latency == MAX_FRAME_LATENCY, "Got unexpected maximum frame latency %u.\n", max_latency);
hr = IDXGIDevice1_SetMaximumFrameLatency(device1, MAX_FRAME_LATENCY + 1); - ok(hr == DXGI_ERROR_INVALID_CALL, "Got unexpected hr %#x.\n", hr); + ok(hr == DXGI_ERROR_INVALID_CALL, "Got unexpected hr %#lx.\n", hr); hr = IDXGIDevice1_GetMaximumFrameLatency(device1, &max_latency); - ok(hr == S_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr); ok(max_latency == MAX_FRAME_LATENCY, "Got unexpected maximum frame latency %u.\n", max_latency);
hr = IDXGIDevice1_SetMaximumFrameLatency(device1, 0); - ok(hr == S_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr); hr = IDXGIDevice1_GetMaximumFrameLatency(device1, &max_latency); - ok(hr == S_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr); /* 0 does not reset to the default frame latency on all Windows versions. */ ok(max_latency == DEFAULT_FRAME_LATENCY || broken(!max_latency), "Got unexpected maximum frame latency %u.\n", max_latency); @@ -5147,7 +5147,7 @@ static void test_maximum_frame_latency(void) }
refcount = IDXGIDevice_Release(device); - ok(!refcount, "Device has %u references left.\n", refcount); + ok(!refcount, "Device has %lu references left.\n", refcount); }
static void test_output_desc(void) @@ -5161,26 +5161,26 @@ static void test_output_desc(void) HRESULT hr;
hr = CreateDXGIFactory(&IID_IDXGIFactory, (void **)&factory); - ok(SUCCEEDED(hr), "Failed to create DXGI factory, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to create DXGI factory, hr %#lx.\n", hr);
for (i = 0; ; ++i) { hr = IDXGIFactory_EnumAdapters(factory, i, &adapter); if (hr == DXGI_ERROR_NOT_FOUND) break; - ok(SUCCEEDED(hr), "Failed to enumerate adapter %u, hr %#x.\n", i, hr); + ok(SUCCEEDED(hr), "Failed to enumerate adapter %u, hr %#lx.\n", i, hr);
hr = IDXGIFactory_EnumAdapters(factory, i, &adapter2); - ok(SUCCEEDED(hr), "Failed to enumerate adapter %u, hr %#x.\n", i, hr); + ok(SUCCEEDED(hr), "Failed to enumerate adapter %u, hr %#lx.\n", i, hr); ok(adapter != adapter2, "Expected to get new instance of IDXGIAdapter, %p == %p.\n", adapter, adapter2); refcount = get_refcount(adapter); - ok(refcount == 1, "Get unexpected refcount %u for adapter %u.\n", refcount, i); + ok(refcount == 1, "Get unexpected refcount %lu for adapter %u.\n", refcount, i); IDXGIAdapter_Release(adapter2);
refcount = get_refcount(factory); - ok(refcount == 2, "Get unexpected refcount %u.\n", refcount); + ok(refcount == 2, "Get unexpected refcount %lu.\n", refcount); refcount = get_refcount(adapter); - ok(refcount == 1, "Get unexpected refcount %u for adapter %u.\n", refcount, i); + ok(refcount == 1, "Get unexpected refcount %lu for adapter %u.\n", refcount, i);
for (j = 0; ; ++j) { @@ -5190,24 +5190,24 @@ static void test_output_desc(void) hr = IDXGIAdapter_EnumOutputs(adapter, j, &output); if (hr == DXGI_ERROR_NOT_FOUND) break; - ok(SUCCEEDED(hr), "Failed to enumerate output %u on adapter %u, hr %#x.\n", j, i, hr); + ok(SUCCEEDED(hr), "Failed to enumerate output %u on adapter %u, hr %#lx.\n", j, i, hr);
hr = IDXGIAdapter_EnumOutputs(adapter, j, &output2); - ok(SUCCEEDED(hr), "Failed to enumerate output %u on adapter %u, hr %#x.\n", j, i, hr); + ok(SUCCEEDED(hr), "Failed to enumerate output %u on adapter %u, hr %#lx.\n", j, i, hr); ok(output != output2, "Expected to get new instance of IDXGIOutput, %p == %p.\n", output, output2); refcount = get_refcount(output); - ok(refcount == 1, "Get unexpected refcount %u for output %u, adapter %u.\n", refcount, j, i); + ok(refcount == 1, "Get unexpected refcount %lu for output %u, adapter %u.\n", refcount, j, i); IDXGIOutput_Release(output2);
refcount = get_refcount(factory); - ok(refcount == 2, "Get unexpected refcount %u.\n", refcount); + ok(refcount == 2, "Get unexpected refcount %lu.\n", refcount); refcount = get_refcount(adapter); - ok(refcount == 2, "Get unexpected refcount %u for adapter %u.\n", refcount, i); + ok(refcount == 2, "Get unexpected refcount %lu for adapter %u.\n", refcount, i); refcount = get_refcount(output); - ok(refcount == 1, "Get unexpected refcount %u for output %u, adapter %u.\n", refcount, j, i); + ok(refcount == 1, "Get unexpected refcount %lu for output %u, adapter %u.\n", refcount, j, i);
hr = IDXGIOutput_GetDesc(output, &desc); - ok(SUCCEEDED(hr), "Failed to get desc for output %u on adapter %u, hr %#x.\n", j, i, hr); + ok(SUCCEEDED(hr), "Failed to get desc for output %u on adapter %u, hr %#lx.\n", j, i, hr);
monitor_info.cbSize = sizeof(monitor_info); ret = GetMonitorInfoW(desc.Monitor, (MONITORINFO *)&monitor_info); @@ -5221,16 +5221,16 @@ static void test_output_desc(void)
IDXGIOutput_Release(output); refcount = get_refcount(adapter); - ok(refcount == 1, "Get unexpected refcount %u for adapter %u.\n", refcount, i); + ok(refcount == 1, "Get unexpected refcount %lu for adapter %u.\n", refcount, i); }
IDXGIAdapter_Release(adapter); refcount = get_refcount(factory); - ok(refcount == 1, "Get unexpected refcount %u.\n", refcount); + ok(refcount == 1, "Get unexpected refcount %lu.\n", refcount); }
refcount = IDXGIFactory_Release(factory); - ok(!refcount, "IDXGIFactory has %u references left.\n", refcount); + ok(!refcount, "IDXGIFactory has %lu references left.\n", refcount); }
struct dxgi_factory @@ -5469,7 +5469,7 @@ static void test_object_wrapping(void) HRESULT hr;
hr = CreateDXGIFactory(&IID_IDXGIFactory, (void **)&factory); - ok(hr == S_OK, "Failed to create DXGI factory, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create DXGI factory, hr %#lx.\n", hr);
hr = IDXGIFactory_EnumAdapters(factory, 0, &adapter); if (hr == DXGI_ERROR_NOT_FOUND) @@ -5478,7 +5478,7 @@ static void test_object_wrapping(void) IDXGIFactory_Release(factory); return; } - ok(hr == S_OK, "Failed to enumerate adapter, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to enumerate adapter, hr %#lx.\n", hr);
wrapper.IDXGIAdapter_iface.lpVtbl = &dxgi_adapter_vtbl; wrapper.wrapped_iface = adapter; @@ -5492,19 +5492,19 @@ static void test_object_wrapping(void) if (SUCCEEDED(hr)) { refcount = ID3D10Device1_Release(device); - ok(!refcount, "Device has %u references left.\n", refcount); + ok(!refcount, "Device has %lu references left.\n", refcount); }
hr = IDXGIAdapter_GetDesc(&wrapper.IDXGIAdapter_iface, &desc); - ok(hr == S_OK, "Failed to get adapter desc, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get adapter desc, hr %#lx.\n", hr); ok(!wrapper.factory.wrapped_adapter_count, "Got unexpected wrapped adapter count %u.\n", wrapper.factory.wrapped_adapter_count); ok(!wrapper.wrapped_output_count, "Got unexpected wrapped output count %u.\n", wrapper.wrapped_output_count);
refcount = IDXGIAdapter_Release(&wrapper.IDXGIAdapter_iface); - ok(!refcount, "Adapter has %u references left.\n", refcount); + ok(!refcount, "Adapter has %lu references left.\n", refcount); refcount = IDXGIFactory_Release(factory); - ok(!refcount, "Factory has %u references left.\n", refcount); + ok(!refcount, "Factory has %lu references left.\n", refcount); }
struct adapter_info @@ -5558,12 +5558,12 @@ static void test_multi_adapter(void)
if (FAILED(hr = CreateDXGIFactory(&IID_IDXGIFactory, (void **)&factory))) { - skip("Failed to create IDXGIFactory, hr %#x.\n", hr); + skip("Failed to create IDXGIFactory, hr %#lx.\n", hr); return; }
hr = IDXGIFactory_EnumAdapters(factory, 0, NULL); - ok(hr == DXGI_ERROR_INVALID_CALL, "Got unexpected hr %#x.\n", hr); + ok(hr == DXGI_ERROR_INVALID_CALL, "Got unexpected hr %#lx.\n", hr);
hr = IDXGIFactory_EnumAdapters(factory, 0, &adapter); if (hr == DXGI_ERROR_NOT_FOUND) @@ -5572,14 +5572,14 @@ static void test_multi_adapter(void) IDXGIFactory_Release(factory); return; } - ok(hr == S_OK, "Failed to enumerate adapter, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to enumerate adapter, hr %#lx.\n", hr);
for (adapter_index = 0; SUCCEEDED(IDXGIFactory_EnumAdapters(factory, adapter_index, &adapter)); ++adapter_index) { for (output_index = 0; SUCCEEDED(IDXGIAdapter_EnumOutputs(adapter, output_index, &output)); ++output_index) { hr = IDXGIOutput_GetDesc(output, &output_desc); - ok(hr == S_OK, "Adapter %u output %u: Got unexpected hr %#x.\n", adapter_index, + ok(hr == S_OK, "Adapter %u output %u: Got unexpected hr %#lx.\n", adapter_index, output_index, hr);
found = FALSE; @@ -5596,15 +5596,15 @@ static void test_multi_adapter(void) adapter_index, output_index, wine_dbgstr_w(output_desc.DeviceName));
ok(display_device.StateFlags & DISPLAY_DEVICE_ATTACHED_TO_DESKTOP, - "Adapter %u output %u: Got unexpected state flags %#x.\n", adapter_index, + "Adapter %u output %u: Got unexpected state flags %#lx.\n", adapter_index, output_index, display_device.StateFlags); if (!adapter_index && !output_index) ok(display_device.StateFlags & DISPLAY_DEVICE_PRIMARY_DEVICE, - "Adapter %u output %u: Got unexpected state flags %#x.\n", adapter_index, + "Adapter %u output %u: Got unexpected state flags %#lx.\n", adapter_index, output_index, display_device.StateFlags); else ok(!(display_device.StateFlags & DISPLAY_DEVICE_PRIMARY_DEVICE), - "Adapter %u output %u: Got unexpected state flags %#x.\n", adapter_index, + "Adapter %u output %u: Got unexpected state flags %#lx.\n", adapter_index, output_index, display_device.StateFlags);
/* Should have the same monitor handle. */ @@ -5618,7 +5618,7 @@ static void test_multi_adapter(void) /* Should have the same monitor rectangle. */ monitor_info.cbSize = sizeof(monitor_info); ret = GetMonitorInfoA(monitor, &monitor_info); - ok(ret, "Adapter %u output %u: Failed to get monitor info, error %#x.\n", adapter_index, + ok(ret, "Adapter %u output %u: Failed to get monitor info, error %#lx.\n", adapter_index, output_index, GetLastError()); ok(EqualRect(&monitor_info.rcMonitor, &output_desc.DesktopCoordinates), "Adapter %u output %u: Got unexpected output rect %s, expected %s.\n", @@ -5642,7 +5642,7 @@ static void test_multi_adapter(void) ret = EnumDisplaySettingsW(display_device.DeviceName, ENUM_CURRENT_SETTINGS, &old_mode); /* Win10 TestBots may return FALSE but it's actually successful */ ok(ret || broken(!ret), - "Adapter %u output %u: EnumDisplaySettingsW failed for %s, error %#x.\n", + "Adapter %u output %u: EnumDisplaySettingsW failed for %s, error %#lx.\n", adapter_index, output_index, wine_dbgstr_w(display_device.DeviceName), GetLastError());
@@ -5654,11 +5654,11 @@ static void test_multi_adapter(void) ret = ChangeDisplaySettingsExW(display_device.DeviceName, &mode, NULL, CDS_UPDATEREGISTRY | CDS_NORESET, NULL); ok(ret == DISP_CHANGE_SUCCESSFUL, - "Adapter %u output %u: ChangeDisplaySettingsExW %s returned unexpected %d.\n", + "Adapter %u output %u: ChangeDisplaySettingsExW %s returned unexpected %ld.\n", adapter_index, output_index, wine_dbgstr_w(display_device.DeviceName), ret); ret = ChangeDisplaySettingsExW(display_device.DeviceName, NULL, NULL, 0, NULL); ok(ret == DISP_CHANGE_SUCCESSFUL, - "Adapter %u output %u: ChangeDisplaySettingsExW %s returned unexpected %d.\n", + "Adapter %u output %u: ChangeDisplaySettingsExW %s returned unexpected %ld.\n", adapter_index, output_index, wine_dbgstr_w(display_device.DeviceName), ret);
/* Check if it is really detached */ @@ -5667,7 +5667,7 @@ static void test_multi_adapter(void) ret = EnumDisplaySettingsW(display_device.DeviceName, ENUM_CURRENT_SETTINGS, &mode); /* Win10 TestBots may return FALSE but it's actually successful */ ok(ret || broken(!ret) , - "Adapter %u output %u: EnumDisplaySettingsW failed for %s, error %#x.\n", + "Adapter %u output %u: EnumDisplaySettingsW failed for %s, error %#lx.\n", adapter_index, output_index, wine_dbgstr_w(display_device.DeviceName), GetLastError()); if (mode.dmPelsWidth && mode.dmPelsHeight) @@ -5684,7 +5684,7 @@ static void test_multi_adapter(void) * unimplemented in Wine */ memset(&output_desc, 0, sizeof(output_desc)); hr = IDXGIOutput_GetDesc(output, &output_desc); - ok(hr == S_OK, "Adapter %u output %u: Got unexpected hr %#x.\n", adapter_index, + ok(hr == S_OK, "Adapter %u output %u: Got unexpected hr %#lx.\n", adapter_index, output_index, hr); ok(!lstrcmpiW(output_desc.DeviceName, old_output_desc.DeviceName), "Adapter %u output %u: Expect device name %s, got %s.\n", adapter_index, @@ -5710,11 +5710,11 @@ static void test_multi_adapter(void)
/* Call IDXGIAdapter_EnumOutputs() again to get up-to-date output description */ hr = IDXGIAdapter_EnumOutputs(adapter, output_index, &output); - ok(hr == S_OK, "Adapter %u output %u: Got unexpected hr %#x.\n", adapter_index, + ok(hr == S_OK, "Adapter %u output %u: Got unexpected hr %#lx.\n", adapter_index, output_index, hr); memset(&output_desc, 0, sizeof(output_desc)); hr = IDXGIOutput_GetDesc(output, &output_desc); - ok(hr == S_OK, "Adapter %u output %u: Got unexpected hr %#x.\n", adapter_index, + ok(hr == S_OK, "Adapter %u output %u: Got unexpected hr %#lx.\n", adapter_index, output_index, hr); ok(!lstrcmpiW(output_desc.DeviceName, display_device.DeviceName), "Adapter %u output %u: Expect device name %s, got %s.\n", adapter_index, @@ -5736,11 +5736,11 @@ static void test_multi_adapter(void) ret = ChangeDisplaySettingsExW(display_device.DeviceName, &old_mode, NULL, CDS_UPDATEREGISTRY | CDS_NORESET, NULL); ok(ret == DISP_CHANGE_SUCCESSFUL, - "Adapter %u output %u: ChangeDisplaySettingsExW %s returned unexpected %d.\n", + "Adapter %u output %u: ChangeDisplaySettingsExW %s returned unexpected %ld.\n", adapter_index, output_index, wine_dbgstr_w(display_device.DeviceName), ret); ret = ChangeDisplaySettingsExW(display_device.DeviceName, NULL, NULL, 0, NULL); ok(ret == DISP_CHANGE_SUCCESSFUL, - "Adapter %u output %u: ChangeDisplaySettingsExW %s returned unexpected %d.\n", + "Adapter %u output %u: ChangeDisplaySettingsExW %s returned unexpected %ld.\n", adapter_index, output_index, wine_dbgstr_w(display_device.DeviceName), ret);
IDXGIOutput_Release(output); @@ -5759,9 +5759,9 @@ static void test_multi_adapter(void) }
hr = IDXGIFactory_EnumAdapters(factory, adapter_index - 1, &adapter); - ok(hr == S_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr); hr = IDXGIAdapter_GetDesc(adapter, &adapter_desc); - ok(hr == S_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr); todo_wine ok(!lstrcmpW(adapter_desc.Description, L"Microsoft Basic Render Driver"), "Got unexpected description %s.\n", wine_dbgstr_w(adapter_desc.Description)); todo_wine ok(adapter_desc.VendorId == 0x1414, @@ -5773,16 +5773,16 @@ static void test_multi_adapter(void) ok(adapter_desc.Revision == 0x0000, "Got unexpected revision %#x.\n", adapter_desc.Revision); todo_wine ok(!adapter_desc.DedicatedVideoMemory, - "Got unexpected DedicatedVideoMemory %#lx.\n", adapter_desc.DedicatedVideoMemory); + "Got unexpected DedicatedVideoMemory %#Ix.\n", adapter_desc.DedicatedVideoMemory); ok(!adapter_desc.DedicatedSystemMemory, - "Got unexpected DedicatedSystemMemory %#lx.\n", adapter_desc.DedicatedSystemMemory); + "Got unexpected DedicatedSystemMemory %#Ix.\n", adapter_desc.DedicatedSystemMemory);
hr = IDXGIAdapter_QueryInterface(adapter, &IID_IDXGIAdapter1, (void **)&adapter1); - ok(hr == S_OK || broken(hr == E_NOINTERFACE), "Got unexpected hr %#x.\n", hr); + ok(hr == S_OK || broken(hr == E_NOINTERFACE), "Got unexpected hr %#lx.\n", hr); if (SUCCEEDED(hr)) { hr = IDXGIAdapter1_GetDesc1(adapter1, &adapter_desc1); - ok(hr == S_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr); todo_wine ok(adapter_desc1.Flags == DXGI_ADAPTER_FLAG_SOFTWARE, "Got unexpected flags %#x.\n", adapter_desc1.Flags); IDXGIAdapter1_Release(adapter1); @@ -5818,7 +5818,7 @@ static BOOL check_message(const struct message *expected, if (expected->check_wparam) { ok(wparam == expected->expect_wparam, - "Got unexpected wparam %lx for message %x, expected %lx.\n", + "Got unexpected wparam %Ix for message %x, expected %Ix.\n", wparam, message, expected->expect_wparam); }
@@ -5827,7 +5827,7 @@ static BOOL check_message(const struct message *expected,
static LRESULT CALLBACK test_wndproc(HWND hwnd, unsigned int message, WPARAM wparam, LPARAM lparam) { - ok(!expect_no_messages, "Got unexpected message %#x, hwnd %p, wparam %#lx, lparam %#lx.\n", + ok(!expect_no_messages, "Got unexpected message %#x, hwnd %p, wparam %#Ix, lparam %#Ix.\n", message, hwnd, wparam, lparam);
if (expect_messages) @@ -5928,9 +5928,9 @@ static void test_swapchain_window_messages(void) ok(!!window, "Failed to create window.\n");
hr = IDXGIDevice_GetAdapter(device, &adapter); - ok(hr == S_OK, "Failed to get adapter, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get adapter, hr %#lx.\n", hr); hr = IDXGIAdapter_GetParent(adapter, &IID_IDXGIFactory, (void **)&factory); - ok(hr == S_OK, "Failed to get parent, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get parent, hr %#lx.\n", hr); IDXGIAdapter_Release(adapter);
swapchain_desc.BufferDesc.Width = 800; @@ -5953,7 +5953,7 @@ static void test_swapchain_window_messages(void) flush_events(); expect_no_messages = TRUE; hr = IDXGIFactory_CreateSwapChain(factory, (IUnknown *)device, &swapchain_desc, &swapchain); - ok(hr == S_OK, "Failed to create swapchain, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create swapchain, hr %#lx.\n", hr); flush_events(); expect_no_messages = FALSE;
@@ -5963,7 +5963,7 @@ static void test_swapchain_window_messages(void) mode_desc.Width = 800; mode_desc.Height = 600; hr = IDXGISwapChain_ResizeTarget(swapchain, &mode_desc); - ok(hr == S_OK, "Failed to resize target, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to resize target, hr %#lx.\n", hr); flush_events(); ok(!expect_messages->message, "Expected message %#x.\n", expect_messages->message);
@@ -5972,7 +5972,7 @@ static void test_swapchain_window_messages(void) mode_desc.Width = 400; mode_desc.Height = 200; hr = IDXGISwapChain_ResizeTarget(swapchain, &mode_desc); - ok(hr == S_OK, "Failed to resize target, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to resize target, hr %#lx.\n", hr); flush_events(); ok(!expect_messages->message, "Expected message %#x.\n", expect_messages->message);
@@ -5982,7 +5982,7 @@ static void test_swapchain_window_messages(void) hr = IDXGISwapChain_SetFullscreenState(swapchain, TRUE, NULL); ok(hr == S_OK || hr == DXGI_ERROR_NOT_CURRENTLY_AVAILABLE || broken(hr == DXGI_ERROR_UNSUPPORTED), /* Win 7 testbot */ - "Failed to enter fullscreen, hr %#x.\n", hr); + "Failed to enter fullscreen, hr %#lx.\n", hr); if (FAILED(hr)) { skip("Could not change fullscreen state.\n"); @@ -5998,13 +5998,13 @@ static void test_swapchain_window_messages(void) /* leave fullscreen */ expect_messages = leave_fullscreen_messages; hr = IDXGISwapChain_SetFullscreenState(swapchain, FALSE, NULL); - ok(hr == S_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr); flush_events(); ok(!expect_messages->message, "Expected message %#x.\n", expect_messages->message); expect_messages = NULL;
refcount = IDXGISwapChain_Release(swapchain); - ok(!refcount, "IDXGISwapChain has %u references left.\n", refcount); + ok(!refcount, "IDXGISwapChain has %lu references left.\n", refcount);
/* create fullscreen swapchain */ DestroyWindow(window); @@ -6018,7 +6018,7 @@ static void test_swapchain_window_messages(void) expect_messages = enter_fullscreen_messages; expect_messages_broken = enter_fullscreen_messages_vista; hr = IDXGIFactory_CreateSwapChain(factory, (IUnknown *)device, &swapchain_desc, &swapchain); - ok(hr == S_OK, "Failed to create swapchain, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create swapchain, hr %#lx.\n", hr); flush_events(); todo_wine ok(!expect_messages->message || broken(!expect_messages_broken->message), @@ -6029,20 +6029,20 @@ static void test_swapchain_window_messages(void) /* leave fullscreen */ expect_messages = leave_fullscreen_messages; hr = IDXGISwapChain_SetFullscreenState(swapchain, FALSE, NULL); - ok(hr == S_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr); flush_events(); ok(!expect_messages->message, "Expected message %#x.\n", expect_messages->message); expect_messages = NULL;
done: refcount = IDXGISwapChain_Release(swapchain); - ok(!refcount, "IDXGISwapChain has %u references left.\n", refcount); + ok(!refcount, "IDXGISwapChain has %lu references left.\n", refcount); DestroyWindow(window);
refcount = IDXGIDevice_Release(device); - ok(!refcount, "Device has %u references left.\n", refcount); + ok(!refcount, "Device has %lu references left.\n", refcount); refcount = IDXGIFactory_Release(factory); - ok(!refcount, "Factory has %u references left.\n", refcount); + ok(!refcount, "Factory has %lu references left.\n", refcount);
UnregisterClassA("dxgi_test_wndproc_wc", GetModuleHandleA(NULL)); } @@ -6099,9 +6099,9 @@ static void test_swapchain_window_styles(void) }
hr = IDXGIDevice_GetAdapter(device, &adapter); - ok(hr == S_OK, "Failed to get adapter, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get adapter, hr %#lx.\n", hr); hr = IDXGIAdapter_GetParent(adapter, &IID_IDXGIFactory, (void **)&factory); - ok(hr == S_OK, "Failed to get parent, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get parent, hr %#lx.\n", hr); IDXGIAdapter_Release(adapter);
swapchain_desc.BufferDesc.Width = 800; @@ -6126,9 +6126,9 @@ static void test_swapchain_window_styles(void)
style = GetWindowLongA(swapchain_desc.OutputWindow, GWL_STYLE); exstyle = GetWindowLongA(swapchain_desc.OutputWindow, GWL_EXSTYLE); - ok(style == tests[i].expected_style, "Test %u: Got style %#x, expected %#x.\n", + ok(style == tests[i].expected_style, "Test %u: Got style %#lx, expected %#lx.\n", i, style, tests[i].expected_style); - ok(exstyle == tests[i].expected_exstyle, "Test %u: Got exstyle %#x, expected %#x.\n", + ok(exstyle == tests[i].expected_exstyle, "Test %u: Got exstyle %#lx, expected %#lx.\n", i, exstyle, tests[i].expected_exstyle);
fullscreen_style = tests[i].expected_style & ~(WS_POPUP | WS_MAXIMIZEBOX @@ -6138,31 +6138,31 @@ static void test_swapchain_window_styles(void) fullscreen_exstyle |= WS_EX_TOPMOST;
hr = IDXGIFactory_CreateSwapChain(factory, (IUnknown *)device, &swapchain_desc, &swapchain); - ok(hr == S_OK, "Failed to create swapchain, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create swapchain, hr %#lx.\n", hr);
style = GetWindowLongA(swapchain_desc.OutputWindow, GWL_STYLE); exstyle = GetWindowLongA(swapchain_desc.OutputWindow, GWL_EXSTYLE); - ok(style == tests[i].expected_style, "Test %u: Got style %#x, expected %#x.\n", + ok(style == tests[i].expected_style, "Test %u: Got style %#lx, expected %#lx.\n", i, style, tests[i].expected_style); - ok(exstyle == tests[i].expected_exstyle, "Test %u: Got exstyle %#x, expected %#x.\n", + ok(exstyle == tests[i].expected_exstyle, "Test %u: Got exstyle %#lx, expected %#lx.\n", i, exstyle, tests[i].expected_exstyle);
hr = IDXGISwapChain_SetFullscreenState(swapchain, TRUE, NULL); ok(hr == S_OK || hr == DXGI_ERROR_NOT_CURRENTLY_AVAILABLE || broken(hr == DXGI_ERROR_UNSUPPORTED), /* Win 7 testbot */ - "Failed to set fullscreen state, hr %#x.\n", hr); + "Failed to set fullscreen state, hr %#lx.\n", hr); if (SUCCEEDED(hr)) { style = GetWindowLongA(swapchain_desc.OutputWindow, GWL_STYLE); exstyle = GetWindowLongA(swapchain_desc.OutputWindow, GWL_EXSTYLE); todo_wine - ok(style == fullscreen_style, "Test %u: Got style %#x, expected %#x.\n", + ok(style == fullscreen_style, "Test %u: Got style %#lx, expected %#lx.\n", i, style, fullscreen_style); - ok(exstyle == fullscreen_exstyle, "Test %u: Got exstyle %#x, expected %#x.\n", + ok(exstyle == fullscreen_exstyle, "Test %u: Got exstyle %#lx, expected %#lx.\n", i, exstyle, fullscreen_exstyle);
hr = IDXGISwapChain_SetFullscreenState(swapchain, FALSE, NULL); - ok(hr == S_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr); } else { @@ -6171,38 +6171,38 @@ static void test_swapchain_window_styles(void)
style = GetWindowLongA(swapchain_desc.OutputWindow, GWL_STYLE); exstyle = GetWindowLongA(swapchain_desc.OutputWindow, GWL_EXSTYLE); - ok(style == tests[i].expected_style, "Test %u: Got style %#x, expected %#x.\n", + ok(style == tests[i].expected_style, "Test %u: Got style %#lx, expected %#lx.\n", i, style, tests[i].expected_style); - ok(exstyle == tests[i].expected_exstyle, "Test %u: Got exstyle %#x, expected %#x.\n", + ok(exstyle == tests[i].expected_exstyle, "Test %u: Got exstyle %#lx, expected %#lx.\n", i, exstyle, tests[i].expected_exstyle);
hr = IDXGISwapChain_SetFullscreenState(swapchain, TRUE, NULL); ok(hr == S_OK || hr == DXGI_ERROR_NOT_CURRENTLY_AVAILABLE || broken(hr == DXGI_ERROR_UNSUPPORTED), /* Win 7 testbot */ - "Failed to set fullscreen state, hr %#x.\n", hr); + "Failed to set fullscreen state, hr %#lx.\n", hr); if (SUCCEEDED(hr)) { style = GetWindowLongA(swapchain_desc.OutputWindow, GWL_STYLE); exstyle = GetWindowLongA(swapchain_desc.OutputWindow, GWL_EXSTYLE); todo_wine - ok(style == fullscreen_style, "Test %u: Got style %#x, expected %#x.\n", + ok(style == fullscreen_style, "Test %u: Got style %#lx, expected %#lx.\n", i, style, fullscreen_style); - ok(exstyle == fullscreen_exstyle, "Test %u: Got exstyle %#x, expected %#x.\n", + ok(exstyle == fullscreen_exstyle, "Test %u: Got exstyle %#lx, expected %#lx.\n", i, exstyle, fullscreen_exstyle);
SetWindowLongW(swapchain_desc.OutputWindow, GWL_STYLE, fullscreen_style); SetWindowLongW(swapchain_desc.OutputWindow, GWL_EXSTYLE, fullscreen_exstyle);
hr = IDXGISwapChain_SetFullscreenState(swapchain, FALSE, NULL); - ok(hr == S_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
style = GetWindowLongA(swapchain_desc.OutputWindow, GWL_STYLE); exstyle = GetWindowLongA(swapchain_desc.OutputWindow, GWL_EXSTYLE); todo_wine - ok(style == tests[i].expected_style, "Test %u: Got style %#x, expected %#x.\n", + ok(style == tests[i].expected_style, "Test %u: Got style %#lx, expected %#lx.\n", i, style, tests[i].expected_style); todo_wine - ok(exstyle == tests[i].expected_exstyle, "Test %u: Got exstyle %#x, expected %#x.\n", + ok(exstyle == tests[i].expected_exstyle, "Test %u: Got exstyle %#lx, expected %#lx.\n", i, exstyle, tests[i].expected_exstyle); } else @@ -6211,24 +6211,24 @@ static void test_swapchain_window_styles(void) }
refcount = IDXGISwapChain_Release(swapchain); - ok(!refcount, "IDXGISwapChain has %u references left.\n", refcount); + ok(!refcount, "IDXGISwapChain has %lu references left.\n", refcount);
style = GetWindowLongA(swapchain_desc.OutputWindow, GWL_STYLE); exstyle = GetWindowLongA(swapchain_desc.OutputWindow, GWL_EXSTYLE); todo_wine - ok(style == tests[i].expected_style, "Test %u: Got style %#x, expected %#x.\n", + ok(style == tests[i].expected_style, "Test %u: Got style %#lx, expected %#lx.\n", i, style, tests[i].expected_style); todo_wine - ok(exstyle == tests[i].expected_exstyle, "Test %u: Got exstyle %#x, expected %#x.\n", + ok(exstyle == tests[i].expected_exstyle, "Test %u: Got exstyle %#lx, expected %#lx.\n", i, exstyle, tests[i].expected_exstyle);
DestroyWindow(swapchain_desc.OutputWindow); }
refcount = IDXGIDevice_Release(device); - ok(!refcount, "Device has %u references left.\n", refcount); + ok(!refcount, "Device has %lu references left.\n", refcount); refcount = IDXGIFactory_Release(factory); - ok(!refcount, "Factory has %u references left.\n", refcount); + ok(!refcount, "Factory has %lu references left.\n", refcount); }
static void test_gamma_control(void) @@ -6252,7 +6252,7 @@ static void test_gamma_control(void) }
hr = IDXGIDevice_GetAdapter(device, &adapter); - ok(hr == S_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = IDXGIAdapter_EnumOutputs(adapter, 0, &output); if (hr == DXGI_ERROR_NOT_FOUND) @@ -6262,11 +6262,11 @@ static void test_gamma_control(void) IDXGIDevice_Release(device); return; } - ok(hr == S_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = IDXGIOutput_GetGammaControlCapabilities(output, &caps); todo_wine - ok(hr == DXGI_ERROR_INVALID_CALL, "Got unexpected hr %#x.\n", hr); + ok(hr == DXGI_ERROR_INVALID_CALL, "Got unexpected hr %#lx.\n", hr); IDXGIOutput_Release(output);
swapchain_desc.BufferDesc.Width = 640; @@ -6286,14 +6286,14 @@ static void test_gamma_control(void) swapchain_desc.Flags = 0;
hr = IDXGIAdapter_GetParent(adapter, &IID_IDXGIFactory, (void **)&factory); - ok(hr == S_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = IDXGIFactory_CreateSwapChain(factory, (IUnknown *)device, &swapchain_desc, &swapchain); - ok(hr == S_OK, "Failed to create swapchain, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create swapchain, hr %#lx.\n", hr); hr = IDXGISwapChain_SetFullscreenState(swapchain, TRUE, NULL); ok(hr == S_OK || hr == DXGI_ERROR_NOT_CURRENTLY_AVAILABLE || broken(hr == DXGI_ERROR_UNSUPPORTED), /* Win 7 testbot */ - "Failed to enter fullscreen, hr %#x.\n", hr); + "Failed to enter fullscreen, hr %#lx.\n", hr); if (FAILED(hr)) { skip("Could not change fullscreen state.\n"); @@ -6301,11 +6301,11 @@ static void test_gamma_control(void) }
hr = IDXGISwapChain_GetContainingOutput(swapchain, &output); - ok(hr == S_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
memset(&caps, 0, sizeof(caps)); hr = IDXGIOutput_GetGammaControlCapabilities(output, &caps); - ok(hr == S_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ok(caps.MaxConvertedValue > caps.MinConvertedValue || broken(caps.MaxConvertedValue == 0.0f && caps.MinConvertedValue == 1.0f) /* WARP */, @@ -6322,25 +6322,25 @@ static void test_gamma_control(void) memset(&gamma, 0, sizeof(gamma)); hr = IDXGIOutput_GetGammaControl(output, &gamma); todo_wine - ok(hr == DXGI_ERROR_INVALID_CALL, "Got unexpected hr %#x.\n", hr); + ok(hr == DXGI_ERROR_INVALID_CALL, "Got unexpected hr %#lx.\n", hr); hr = IDXGIOutput_SetGammaControl(output, &gamma); - ok(hr == S_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
IDXGIOutput_Release(output);
hr = IDXGISwapChain_SetFullscreenState(swapchain, FALSE, NULL); - ok(hr == S_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
done: refcount = IDXGISwapChain_Release(swapchain); - ok(!refcount, "IDXGISwapChain has %u references left.\n", refcount); + ok(!refcount, "IDXGISwapChain has %lu references left.\n", refcount); DestroyWindow(swapchain_desc.OutputWindow);
IDXGIAdapter_Release(adapter); refcount = IDXGIDevice_Release(device); - ok(!refcount, "Device has %u references left.\n", refcount); + ok(!refcount, "Device has %lu references left.\n", refcount); refcount = IDXGIFactory_Release(factory); - ok(!refcount, "Factory has %u references left.\n", refcount); + ok(!refcount, "Factory has %lu references left.\n", refcount); }
static void test_window_association(IUnknown *device, BOOL is_d3d12) @@ -6406,28 +6406,28 @@ static void test_window_association(IUnknown *device, BOOL is_d3d12)
hwnd2 = CreateWindowA("static", "dxgi_test2", 0, 0, 0, 400, 200, 0, 0, 0, 0); hr = CreateDXGIFactory(&IID_IDXGIFactory, (void **)&factory2); - ok(hr == S_OK, "Failed to create DXGI factory, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create DXGI factory, hr %#lx.\n", hr);
get_factory(device, is_d3d12, &factory);
hr = IDXGIFactory_GetWindowAssociation(factory, NULL); - ok(hr == DXGI_ERROR_INVALID_CALL, "Got unexpected hr %#x.\n", hr); + ok(hr == DXGI_ERROR_INVALID_CALL, "Got unexpected hr %#lx.\n", hr);
for (i = 0; i <= DXGI_MWA_VALID; ++i) { hr = IDXGIFactory_MakeWindowAssociation(factory, NULL, i); - ok(hr == S_OK, "Got unexpected hr %#x for flags %#x.\n", hr, i); + ok(hr == S_OK, "Got unexpected hr %#lx for flags %#x.\n", hr, i);
hr = IDXGIFactory_MakeWindowAssociation(factory, swapchain_desc.OutputWindow, i); - ok(hr == S_OK, "Got unexpected hr %#x for flags %#x.\n", hr, i); + ok(hr == S_OK, "Got unexpected hr %#lx for flags %#x.\n", hr, i);
wndproc = GetWindowLongPtrW(swapchain_desc.OutputWindow, GWLP_WNDPROC); - ok(wndproc == original_wndproc, "Got unexpected wndproc %#lx, expected %#lx for flags %#x.\n", + ok(wndproc == original_wndproc, "Got unexpected wndproc %#Ix, expected %#Ix for flags %#x.\n", wndproc, original_wndproc, i);
hwnd = (HWND)0xdeadbeef; hr = IDXGIFactory_GetWindowAssociation(factory, &hwnd); - ok(hr == S_OK, "Got unexpected hr %#x for flags %#x.\n", hr, i); + ok(hr == S_OK, "Got unexpected hr %#lx for flags %#x.\n", hr, i); /* Apparently GetWindowAssociation() always returns NULL, even when * MakeWindowAssociation() and GetWindowAssociation() are both * successfully called. */ @@ -6435,19 +6435,19 @@ static void test_window_association(IUnknown *device, BOOL is_d3d12) }
hr = IDXGIFactory_MakeWindowAssociation(factory, swapchain_desc.OutputWindow, DXGI_MWA_VALID + 1); - ok(hr == DXGI_ERROR_INVALID_CALL, "Got unexpected hr %#x.\n", hr); + ok(hr == DXGI_ERROR_INVALID_CALL, "Got unexpected hr %#lx.\n", hr);
/* Alt+Enter tests. */ hr = IDXGIFactory_CreateSwapChain(factory, device, &swapchain_desc, &swapchain); - ok(hr == S_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
wndproc = GetWindowLongPtrW(swapchain_desc.OutputWindow, GWLP_WNDPROC); - ok(wndproc == original_wndproc, "Got unexpected wndproc %#lx, expected %#lx.\n", wndproc, original_wndproc); + ok(wndproc == original_wndproc, "Got unexpected wndproc %#Ix, expected %#Ix.\n", wndproc, original_wndproc);
hr = IDXGISwapChain_SetFullscreenState(swapchain, TRUE, NULL); ok(hr == S_OK || hr == DXGI_ERROR_NOT_CURRENTLY_AVAILABLE || broken(hr == DXGI_ERROR_UNSUPPORTED) /* Windows 7 testbot */, - "Got unexpected hr %#x.\n", hr); + "Got unexpected hr %#lx.\n", hr); if (FAILED(hr)) { skip("Could not change fullscreen state.\n"); @@ -6455,27 +6455,27 @@ static void test_window_association(IUnknown *device, BOOL is_d3d12) else { hr = IDXGISwapChain_SetFullscreenState(swapchain, FALSE, NULL); - 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(tests); ++i) { /* First associate a window with the opposite flags. */ hr = IDXGIFactory_MakeWindowAssociation(factory, hwnd2, ~tests[i].flag & DXGI_MWA_VALID); - 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);
/* Associate the current test window. */ hwnd = tests[i].flag ? swapchain_desc.OutputWindow : NULL; hr = IDXGIFactory_MakeWindowAssociation(factory, hwnd, tests[i].flag); - 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);
/* Associating a new test window doesn't override the old window. */ hr = IDXGIFactory_MakeWindowAssociation(factory, hwnd2, ~tests[i].flag & DXGI_MWA_VALID); - 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);
/* Associations with a different factory don't affect the existing * association. */ hr = IDXGIFactory_MakeWindowAssociation(factory2, hwnd, ~tests[i].flag & DXGI_MWA_VALID); - 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);
/* Post synthesized Alt + VK_RETURN WM_SYSKEYDOWN. */ PostMessageA(swapchain_desc.OutputWindow, WM_SYSKEYDOWN, VK_RETURN, @@ -6483,7 +6483,7 @@ static void test_window_association(IUnknown *device, BOOL is_d3d12) flush_events(); output = NULL; hr = IDXGISwapChain_GetFullscreenState(swapchain, &fullscreen, &output); - 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); ok(fullscreen == tests[i].expect_fullscreen || broken(tests[i].broken_d3d10 && fullscreen), "Test %u: Got unexpected fullscreen %#x.\n", i, fullscreen); @@ -6492,24 +6492,24 @@ static void test_window_association(IUnknown *device, BOOL is_d3d12) IDXGIOutput_Release(output);
wndproc = GetWindowLongPtrW(swapchain_desc.OutputWindow, GWLP_WNDPROC); - ok(wndproc == original_wndproc, "Test %u: Got unexpected wndproc %#lx, expected %#lx.\n", + ok(wndproc == original_wndproc, "Test %u: Got unexpected wndproc %#Ix, expected %#Ix.\n", i, wndproc, original_wndproc); } }
hr = IDXGISwapChain_SetFullscreenState(swapchain, FALSE, NULL); - ok(hr == S_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
refcount = IDXGIFactory_Release(factory2); - ok(!refcount, "Factory has %u references left.\n", refcount); + ok(!refcount, "Factory has %lu references left.\n", refcount); DestroyWindow(hwnd2);
refcount = IDXGISwapChain_Release(swapchain); - ok(!refcount, "IDXGISwapChain has %u references left.\n", refcount); + ok(!refcount, "IDXGISwapChain has %lu references left.\n", refcount); DestroyWindow(swapchain_desc.OutputWindow);
refcount = IDXGIFactory_Release(factory); - ok(refcount == !is_d3d12, "IDXGIFactory has %u references left.\n", refcount); + ok(refcount == !is_d3d12, "IDXGIFactory has %lu references left.\n", refcount); }
static void test_output_ownership(IUnknown *device, BOOL is_d3d12) @@ -6552,19 +6552,19 @@ static void test_output_ownership(IUnknown *device, BOOL is_d3d12) IDXGIFactory_Release(factory); return; } - ok(hr == S_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = IDXGIOutput_GetDesc(output, &output_desc); - ok(hr == S_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
lstrcpyW(open_adapter_gdi_desc.DeviceName, output_desc.DeviceName); status = pD3DKMTOpenAdapterFromGdiDisplayName(&open_adapter_gdi_desc); - ok(status == STATUS_SUCCESS, "Got unexpected status %#x.\n", status); + ok(status == STATUS_SUCCESS, "Got unexpected status %#lx.\n", status);
check_ownership_desc.hAdapter = open_adapter_gdi_desc.hAdapter; check_ownership_desc.VidPnSourceId = open_adapter_gdi_desc.VidPnSourceId; status = get_expected_vidpn_exclusive_ownership(&check_ownership_desc, STATUS_SUCCESS); - ok(status == STATUS_SUCCESS, "Got unexpected status %#x, expected %#x.\n", status, + ok(status == STATUS_SUCCESS, "Got unexpected status %#lx, expected %#lx.\n", status, STATUS_SUCCESS);
swapchain_desc.BufferDesc.Width = 800; @@ -6583,7 +6583,7 @@ static void test_output_ownership(IUnknown *device, BOOL is_d3d12) swapchain_desc.SwapEffect = is_d3d12 ? DXGI_SWAP_EFFECT_FLIP_DISCARD : DXGI_SWAP_EFFECT_DISCARD; swapchain_desc.Flags = 0; hr = IDXGIFactory_CreateSwapChain(factory, device, &swapchain_desc, &swapchain); - ok(hr == S_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
/* Swapchain in fullscreen mode. */ hr = IDXGISwapChain_SetFullscreenState(swapchain, TRUE, output); @@ -6594,17 +6594,17 @@ static void test_output_ownership(IUnknown *device, BOOL is_d3d12) skip("Failed to change fullscreen state.\n"); goto done; } - ok(hr == S_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr); fullscreen = FALSE; hr = IDXGISwapChain_GetFullscreenState(swapchain, &fullscreen, NULL); - ok(hr == S_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr); ok(fullscreen, "Got unexpected fullscreen state.\n"); /* Win10 1909 doesn't seem to grab output exclusive ownership. * And all output ownership calls return S_OK on D3D10 and D3D12 with 1909. */ if (is_d3d12) { status = get_expected_vidpn_exclusive_ownership(&check_ownership_desc, STATUS_SUCCESS); - ok(status == STATUS_SUCCESS, "Got unexpected status %#x, expected %#x.\n", status, + ok(status == STATUS_SUCCESS, "Got unexpected status %#lx, expected %#lx.\n", status, STATUS_SUCCESS); } else @@ -6613,26 +6613,26 @@ static void test_output_ownership(IUnknown *device, BOOL is_d3d12) STATUS_GRAPHICS_PRESENT_OCCLUDED); todo_wine ok(status == STATUS_GRAPHICS_PRESENT_OCCLUDED || broken(status == STATUS_SUCCESS), /* Win10 1909 */ - "Got unexpected status %#x, expected %#x.\n", status, + "Got unexpected status %#lx, expected %#lx.\n", status, STATUS_GRAPHICS_PRESENT_OCCLUDED); } hr = IDXGIOutput_TakeOwnership(output, NULL, FALSE); ok(hr == DXGI_ERROR_INVALID_CALL || broken(hr == S_OK), /* Win10 1909 */ - "Got unexpected hr %#x.\n", hr); + "Got unexpected hr %#lx.\n", hr); hr = IDXGIOutput_TakeOwnership(output, NULL, TRUE); ok(hr == DXGI_ERROR_INVALID_CALL || broken(hr == S_OK), /* Win10 1909 */ - "Got unexpected hr %#x.\n", hr); + "Got unexpected hr %#lx.\n", hr); hr = IDXGIOutput_TakeOwnership(output, device, FALSE); if (is_d3d12) - todo_wine ok(hr == E_NOINTERFACE || hr == S_OK, "Got unexpected hr %#x.\n", hr); + todo_wine ok(hr == E_NOINTERFACE || hr == S_OK, "Got unexpected hr %#lx.\n", hr); else todo_wine ok(hr == E_INVALIDARG || broken(hr == S_OK), /* Win10 1909 */ - "Got unexpected hr %#x.\n", hr); + "Got unexpected hr %#lx.\n", hr); hr = IDXGIOutput_TakeOwnership(output, device, TRUE); - ok(hr == E_NOINTERFACE || hr == S_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == E_NOINTERFACE || hr == S_OK, "Got unexpected hr %#lx.\n", hr); IDXGIOutput_ReleaseOwnership(output); status = get_expected_vidpn_exclusive_ownership(&check_ownership_desc, STATUS_SUCCESS); - ok(status == STATUS_SUCCESS, "Got unexpected status %#x, expected %#x.\n", status, + ok(status == STATUS_SUCCESS, "Got unexpected status %#lx, expected %#lx.\n", status, STATUS_SUCCESS);
/* IDXGIOutput_TakeOwnership always returns E_NOINTERFACE for d3d12. Tests @@ -6642,46 +6642,46 @@ static void test_output_ownership(IUnknown *device, BOOL is_d3d12)
hr = IDXGIOutput_TakeOwnership(output, device, FALSE); ok(hr == DXGI_ERROR_NOT_CURRENTLY_AVAILABLE || broken(hr == S_OK), /* Win10 1909 */ - "Got unexpected hr %#x.\n", hr); + "Got unexpected hr %#lx.\n", hr); IDXGIOutput_ReleaseOwnership(output);
hr = IDXGIOutput_TakeOwnership(output, device, TRUE); - ok(hr == S_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr); /* Note that the "exclusive" parameter to IDXGIOutput_TakeOwnership() * seems to behave opposite to what's described by MSDN. */ status = get_expected_vidpn_exclusive_ownership(&check_ownership_desc, STATUS_GRAPHICS_PRESENT_OCCLUDED); ok(status == STATUS_GRAPHICS_PRESENT_OCCLUDED || broken(status == STATUS_SUCCESS), /* Win10 1909 */ - "Got unexpected status %#x, expected %#x.\n", status, STATUS_GRAPHICS_PRESENT_OCCLUDED); + "Got unexpected status %#lx, expected %#lx.\n", status, STATUS_GRAPHICS_PRESENT_OCCLUDED); hr = IDXGIOutput_TakeOwnership(output, device, FALSE); - ok(hr == E_INVALIDARG || broken(hr == S_OK) /* Win10 1909 */, "Got unexpected hr %#x.\n", hr); + ok(hr == E_INVALIDARG || broken(hr == S_OK) /* Win10 1909 */, "Got unexpected hr %#lx.\n", hr); IDXGIOutput_ReleaseOwnership(output);
/* Swapchain in windowed mode. */ hr = IDXGISwapChain_SetFullscreenState(swapchain, FALSE, NULL); - ok(hr == S_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr); fullscreen = TRUE; hr = IDXGISwapChain_GetFullscreenState(swapchain, &fullscreen, NULL); - ok(hr == S_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr); ok(!fullscreen, "Unexpected fullscreen state.\n"); status = get_expected_vidpn_exclusive_ownership(&check_ownership_desc, STATUS_SUCCESS); - ok(status == STATUS_SUCCESS, "Got unexpected status %#x, expected %#x.\n", status, + ok(status == STATUS_SUCCESS, "Got unexpected status %#lx, expected %#lx.\n", status, STATUS_SUCCESS);
hr = IDXGIOutput_TakeOwnership(output, device, FALSE); ok(hr == DXGI_ERROR_NOT_CURRENTLY_AVAILABLE || broken(hr == S_OK), /* Win10 1909 */ - "Got unexpected hr %#x.\n", hr); + "Got unexpected hr %#lx.\n", hr);
hr = IDXGIOutput_TakeOwnership(output, device, TRUE); - ok(hr == S_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr); status = get_expected_vidpn_exclusive_ownership(&check_ownership_desc, STATUS_GRAPHICS_PRESENT_OCCLUDED); ok(status == STATUS_GRAPHICS_PRESENT_OCCLUDED || broken(hr == S_OK), /* Win10 1909 */ - "Got unexpected status %#x, expected %#x.\n", status, STATUS_GRAPHICS_PRESENT_OCCLUDED); + "Got unexpected status %#lx, expected %#lx.\n", status, STATUS_GRAPHICS_PRESENT_OCCLUDED); IDXGIOutput_ReleaseOwnership(output); status = get_expected_vidpn_exclusive_ownership(&check_ownership_desc, STATUS_SUCCESS); - ok(status == STATUS_SUCCESS, "Got unexpected status %#x, expected %#x.\n", status, + ok(status == STATUS_SUCCESS, "Got unexpected status %#lx, expected %#lx.\n", status, STATUS_SUCCESS);
done: @@ -6692,11 +6692,11 @@ done: IDXGISwapChain_Release(swapchain); DestroyWindow(swapchain_desc.OutputWindow); refcount = IDXGIFactory_Release(factory); - ok(refcount == !is_d3d12, "Got unexpected refcount %u.\n", refcount); + ok(refcount == !is_d3d12, "Got unexpected refcount %lu.\n", refcount);
close_adapter_desc.hAdapter = open_adapter_gdi_desc.hAdapter; status = pD3DKMTCloseAdapter(&close_adapter_desc); - ok(status == STATUS_SUCCESS, "Got unexpected status %#x.\n", status); + ok(status == STATUS_SUCCESS, "Got unexpected status %#lx.\n", status); }
static void test_cursor_clipping(IUnknown *device, BOOL is_d3d12) @@ -6734,7 +6734,7 @@ static void test_cursor_clipping(IUnknown *device, BOOL is_d3d12) hr = IDXGIOutput_GetDisplayModeList(output, DXGI_FORMAT_R8G8B8A8_UNORM, 0, &mode_count, NULL); ok(SUCCEEDED(hr) || broken(hr == DXGI_ERROR_NOT_CURRENTLY_AVAILABLE), /* Win 7 TestBots */ - "Adapter %u output %u: GetDisplayModeList failed, hr %#x.\n", adapter_idx, + "Adapter %u output %u: GetDisplayModeList failed, hr %#lx.\n", adapter_idx, output_idx, hr); if (hr == DXGI_ERROR_NOT_CURRENTLY_AVAILABLE) { @@ -6747,11 +6747,11 @@ static void test_cursor_clipping(IUnknown *device, BOOL is_d3d12) modes = heap_calloc(mode_count, sizeof(*modes)); hr = IDXGIOutput_GetDisplayModeList(output, DXGI_FORMAT_R8G8B8A8_UNORM, 0, &mode_count, modes); - ok(hr == S_OK, "Adapter %u output %u: GetDisplayModeList failed, hr %#x.\n", + ok(hr == S_OK, "Adapter %u output %u: GetDisplayModeList failed, hr %#lx.\n", adapter_idx, output_idx, hr);
hr = IDXGIOutput_GetDesc(output, &output_desc); - ok(hr == S_OK, "Adapter %u output %u: GetDesc failed, hr %#x.\n", adapter_idx, + ok(hr == S_OK, "Adapter %u output %u: GetDesc failed, hr %#lx.\n", adapter_idx, output_idx, hr); width = output_desc.DesktopCoordinates.right - output_desc.DesktopCoordinates.left; height = output_desc.DesktopCoordinates.bottom - output_desc.DesktopCoordinates.top; @@ -6765,11 +6765,11 @@ static void test_cursor_clipping(IUnknown *device, BOOL is_d3d12) adapter_idx, output_idx, width, height);
ret = ClipCursor(NULL); - ok(ret, "Adapter %u output %u: ClipCursor failed, error %#x.\n", + ok(ret, "Adapter %u output %u: ClipCursor failed, error %#lx.\n", adapter_idx, output_idx, GetLastError()); get_virtual_rect(&virtual_rect); ret = GetClipCursor(&clip_rect); - ok(ret, "Adapter %u output %u: GetClipCursor failed, error %#x.\n", adapter_idx, + ok(ret, "Adapter %u output %u: GetClipCursor failed, error %#lx.\n", adapter_idx, output_idx, GetLastError()); ok(EqualRect(&clip_rect, &virtual_rect), "Adapter %u output %u: Expect clip rect %s, got %s.\n", adapter_idx, output_idx, @@ -6784,13 +6784,13 @@ static void test_cursor_clipping(IUnknown *device, BOOL is_d3d12) swapchain_desc.OutputWindow = create_window(); heap_free(modes); hr = IDXGIFactory_CreateSwapChain(factory, device, &swapchain_desc, &swapchain); - ok(hr == S_OK, "Adapter %u output %u: CreateSwapChain failed, hr %#x.\n", + ok(hr == S_OK, "Adapter %u output %u: CreateSwapChain failed, hr %#lx.\n", adapter_idx, output_idx, hr);
flush_events(); get_virtual_rect(&virtual_rect); ret = GetClipCursor(&clip_rect); - ok(ret, "Adapter %u output %u: GetClipCursor failed, error %#x.\n", adapter_idx, + ok(ret, "Adapter %u output %u: GetClipCursor failed, error %#lx.\n", adapter_idx, output_idx, GetLastError()); ok(EqualRect(&clip_rect, &virtual_rect), "Adapter %u output %u: Expect clip rect %s, got %s.\n", adapter_idx, output_idx, @@ -6799,11 +6799,11 @@ static void test_cursor_clipping(IUnknown *device, BOOL is_d3d12) hr = IDXGISwapChain_SetFullscreenState(swapchain, TRUE, NULL); ok(hr == S_OK || hr == DXGI_ERROR_NOT_CURRENTLY_AVAILABLE || broken(hr == DXGI_ERROR_UNSUPPORTED), /* Win 7 testbot */ - "Adapter %u output %u: SetFullscreenState failed, hr %#x.\n", adapter_idx, + "Adapter %u output %u: SetFullscreenState failed, hr %#lx.\n", adapter_idx, output_idx, hr); if (FAILED(hr)) { - skip("Adapter %u output %u: Could not change fullscreen state, hr %#x.\n", + skip("Adapter %u output %u: Could not change fullscreen state, hr %#lx.\n", adapter_idx, output_idx, hr); IDXGISwapChain_Release(swapchain); IDXGIOutput_Release(output); @@ -6814,27 +6814,27 @@ static void test_cursor_clipping(IUnknown *device, BOOL is_d3d12) flush_events(); get_virtual_rect(&virtual_rect); ret = GetClipCursor(&clip_rect); - ok(ret, "Adapter %u output %u: GetClipCursor failed, error %#x.\n", adapter_idx, + ok(ret, "Adapter %u output %u: GetClipCursor failed, error %#lx.\n", adapter_idx, output_idx, GetLastError()); ok(EqualRect(&clip_rect, &virtual_rect), "Adapter %u output %u: Expect clip rect %s, got %s.\n", adapter_idx, output_idx, wine_dbgstr_rect(&virtual_rect), wine_dbgstr_rect(&clip_rect));
hr = IDXGISwapChain_SetFullscreenState(swapchain, FALSE, NULL); - ok(hr == S_OK, "Adapter %u output %u: Got unexpected hr %#x.\n", adapter_idx, + ok(hr == S_OK, "Adapter %u output %u: Got unexpected hr %#lx.\n", adapter_idx, output_idx, hr); refcount = IDXGISwapChain_Release(swapchain); - ok(!refcount, "Adapter %u output %u: IDXGISwapChain has %u references left.\n", + ok(!refcount, "Adapter %u output %u: IDXGISwapChain has %lu references left.\n", adapter_idx, output_idx, refcount); refcount = IDXGIOutput_Release(output); - ok(!refcount, "Adapter %u output %u: IDXGIOutput has %u references left.\n", + ok(!refcount, "Adapter %u output %u: IDXGIOutput has %lu references left.\n", adapter_idx, output_idx, refcount); DestroyWindow(swapchain_desc.OutputWindow);
flush_events(); get_virtual_rect(&virtual_rect); ret = GetClipCursor(&clip_rect); - ok(ret, "Adapter %u output %u: GetClipCursor failed, error %#x.\n", adapter_idx, + ok(ret, "Adapter %u output %u: GetClipCursor failed, error %#lx.\n", adapter_idx, output_idx, GetLastError()); ok(EqualRect(&clip_rect, &virtual_rect), "Adapter %u output %u: Expect clip rect %s, got %s.\n", adapter_idx, output_idx, @@ -6845,7 +6845,7 @@ static void test_cursor_clipping(IUnknown *device, BOOL is_d3d12) }
refcount = IDXGIFactory_Release(factory); - ok(refcount == !is_d3d12, "Got unexpected refcount %u.\n", refcount); + ok(refcount == !is_d3d12, "Got unexpected refcount %lu.\n", refcount); }
static void test_factory_check_feature_support(void) @@ -6862,28 +6862,28 @@ static void test_factory_check_feature_support(void) }
hr = IDXGIFactory5_CheckFeatureSupport(factory, 0x12345678, (void *)&data, sizeof(data)); - ok(hr == DXGI_ERROR_INVALID_CALL, "Got unexpected hr %#x.\n", hr); + ok(hr == DXGI_ERROR_INVALID_CALL, "Got unexpected hr %#lx.\n", hr);
/* Crashes on Windows. */ if (0) { hr = IDXGIFactory5_CheckFeatureSupport(factory, DXGI_FEATURE_PRESENT_ALLOW_TEARING, NULL, sizeof(data)); - ok(hr == DXGI_ERROR_INVALID_CALL, "Got unexpected hr %#x.\n", hr); + ok(hr == DXGI_ERROR_INVALID_CALL, "Got unexpected hr %#lx.\n", hr); }
hr = IDXGIFactory5_CheckFeatureSupport(factory, DXGI_FEATURE_PRESENT_ALLOW_TEARING, &data, sizeof(data) - 1); - ok(hr == DXGI_ERROR_INVALID_CALL, "Got unexpected hr %#x.\n", hr); + ok(hr == DXGI_ERROR_INVALID_CALL, "Got unexpected hr %#lx.\n", hr);
hr = IDXGIFactory5_CheckFeatureSupport(factory, DXGI_FEATURE_PRESENT_ALLOW_TEARING, &data, sizeof(data) + 1); - ok(hr == DXGI_ERROR_INVALID_CALL, "Got unexpected hr %#x.\n", hr); + ok(hr == DXGI_ERROR_INVALID_CALL, "Got unexpected hr %#lx.\n", hr);
data = (BOOL)0xdeadbeef; hr = IDXGIFactory5_CheckFeatureSupport(factory, DXGI_FEATURE_PRESENT_ALLOW_TEARING, &data, sizeof(data)); - ok(hr == S_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr); ok(data == TRUE || data == FALSE, "Got unexpected data %#x.\n", data);
ref_count = IDXGIFactory5_Release(factory); - ok(!ref_count, "Factory has %u references left.\n", ref_count); + ok(!ref_count, "Factory has %lu references left.\n", ref_count); }
static void test_frame_latency_event(IUnknown *device, BOOL is_d3d12) @@ -6928,7 +6928,7 @@ static void test_frame_latency_event(IUnknown *device, BOOL is_d3d12)
hr = IDXGIFactory2_CreateSwapChainForHwnd(factory2, device, window, &swapchain_desc, NULL, NULL, &swapchain1); - ok(hr == S_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = IDXGISwapChain1_QueryInterface(swapchain1, &IID_IDXGISwapChain2, (void**)&swapchain2); IDXGISwapChain1_Release(swapchain1); @@ -6943,24 +6943,24 @@ static void test_frame_latency_event(IUnknown *device, BOOL is_d3d12) /* test swap chain without waitable object */ frame_latency = 0xdeadbeef; hr = IDXGISwapChain2_GetMaximumFrameLatency(swapchain2, &frame_latency); - ok(hr == DXGI_ERROR_INVALID_CALL, "Got unexpected hr %#x.\n", hr); + ok(hr == DXGI_ERROR_INVALID_CALL, "Got unexpected hr %#lx.\n", hr); ok(frame_latency == 0xdeadbeef, "Got unexpected frame latency %#x.\n", frame_latency); hr = IDXGISwapChain2_SetMaximumFrameLatency(swapchain2, 1); - ok(hr == DXGI_ERROR_INVALID_CALL, "Got unexpected hr %#x.\n", hr); + ok(hr == DXGI_ERROR_INVALID_CALL, "Got unexpected hr %#lx.\n", hr); event = IDXGISwapChain2_GetFrameLatencyWaitableObject(swapchain2); ok(!event, "Got unexpected event %p.\n", event);
ref_count = IDXGISwapChain2_Release(swapchain2); - ok(!ref_count, "Swap chain has %u references left.\n", ref_count); + ok(!ref_count, "Swap chain has %lu references left.\n", ref_count);
/* test swap chain with waitable object */ swapchain_desc.Flags = DXGI_SWAP_CHAIN_FLAG_FRAME_LATENCY_WAITABLE_OBJECT;
hr = IDXGIFactory2_CreateSwapChainForHwnd(factory2, device, window, &swapchain_desc, NULL, NULL, &swapchain1); - ok(hr == S_OK, "Failed to create swap chain, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create swap chain, hr %#lx.\n", hr); hr = IDXGISwapChain1_QueryInterface(swapchain1, &IID_IDXGISwapChain2, (void**)&swapchain2); - ok(hr == S_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr); IDXGISwapChain1_Release(swapchain1);
event = IDXGISwapChain2_GetFrameLatencyWaitableObject(swapchain2); @@ -6968,50 +6968,50 @@ static void test_frame_latency_event(IUnknown *device, BOOL is_d3d12)
/* auto-reset event */ wait_result = WaitForSingleObject(event, 0); - ok(!wait_result, "Got unexpected wait result %#x.\n", wait_result); + ok(!wait_result, "Got unexpected wait result %#lx.\n", wait_result); wait_result = WaitForSingleObject(event, 0); - ok(wait_result == WAIT_TIMEOUT, "Got unexpected wait result %#x.\n", wait_result); + ok(wait_result == WAIT_TIMEOUT, "Got unexpected wait result %#lx.\n", wait_result);
hr = IDXGISwapChain2_GetMaximumFrameLatency(swapchain2, &frame_latency); - ok(hr == S_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr); ok(frame_latency == 1, "Got unexpected frame latency %#x.\n", frame_latency);
hr = IDXGISwapChain2_SetMaximumFrameLatency(swapchain2, 0); - ok(hr == DXGI_ERROR_INVALID_CALL, "Got unexpected hr %#x.\n", hr); + ok(hr == DXGI_ERROR_INVALID_CALL, "Got unexpected hr %#lx.\n", hr); hr = IDXGISwapChain2_GetMaximumFrameLatency(swapchain2, &frame_latency); - ok(hr == S_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr); ok(frame_latency == 1, "Got unexpected frame latency %#x.\n", frame_latency);
hr = IDXGISwapChain2_SetMaximumFrameLatency(swapchain2, 3); - ok(hr == S_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr); hr = IDXGISwapChain2_GetMaximumFrameLatency(swapchain2, &frame_latency); - ok(hr == S_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr); ok(frame_latency == 3, "Got unexpected frame latency %#x.\n", frame_latency);
wait_result = WaitForSingleObject(event, 0); - todo_wine ok(!wait_result, "Got unexpected wait result %#x.\n", wait_result); + todo_wine ok(!wait_result, "Got unexpected wait result %#lx.\n", wait_result); wait_result = WaitForSingleObject(event, 0); - todo_wine ok(!wait_result, "Got unexpected wait result %#x.\n", wait_result); + todo_wine ok(!wait_result, "Got unexpected wait result %#lx.\n", wait_result); wait_result = WaitForSingleObject(event, 100); - ok(wait_result == WAIT_TIMEOUT, "Got unexpected wait result %#x.\n", wait_result); + ok(wait_result == WAIT_TIMEOUT, "Got unexpected wait result %#lx.\n", wait_result);
for (i = 0; i < 5; i++) { hr = IDXGISwapChain2_Present(swapchain2, 0, 0); - ok(hr == S_OK, "Present %u failed with hr %#x.\n", i, hr); + ok(hr == S_OK, "Present %u failed with hr %#lx.\n", i, hr);
wait_result = WaitForSingleObject(event, 100); - ok(!wait_result, "Got unexpected wait result %#x.\n", wait_result); + ok(!wait_result, "Got unexpected wait result %#lx.\n", wait_result); }
wait_result = WaitForSingleObject(event, 100); - ok(wait_result == WAIT_TIMEOUT, "Got unexpected wait result %#x.\n", wait_result); + ok(wait_result == WAIT_TIMEOUT, "Got unexpected wait result %#lx.\n", wait_result);
ref_count = IDXGISwapChain2_Release(swapchain2); - ok(!ref_count, "Swap chain has %u references left.\n", ref_count); + ok(!ref_count, "Swap chain has %lu references left.\n", ref_count); DestroyWindow(window); ref_count = IDXGIFactory2_Release(factory2); - ok(ref_count == !is_d3d12, "Factory has %u references left.\n", ref_count); + ok(ref_count == !is_d3d12, "Factory has %lu references left.\n", ref_count); }
static void test_colour_space_support(IUnknown *device, BOOL is_d3d12) @@ -7078,7 +7078,7 @@ static void test_colour_space_support(IUnknown *device, BOOL is_d3d12)
hr = IDXGIFactory2_CreateSwapChainForHwnd(factory2, device, window, &swapchain_desc, NULL, NULL, &swapchain1); - ok(hr == S_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = IDXGISwapChain1_QueryInterface(swapchain1, &IID_IDXGISwapChain3, (void**)&swapchain3); IDXGISwapChain1_Release(swapchain1); @@ -7094,7 +7094,7 @@ static void test_colour_space_support(IUnknown *device, BOOL is_d3d12) { support = 0xdeadbeef; hr = IDXGISwapChain3_CheckColorSpaceSupport(swapchain3, colour_spaces[i], &support); - ok(hr == S_OK, "Got unexpected hr %#x for test %u.\n", hr, i); + ok(hr == S_OK, "Got unexpected hr %#lx for test %u.\n", hr, i); ok(!(support & ~DXGI_SWAP_CHAIN_COLOR_SPACE_SUPPORT_FLAG_PRESENT), "Got unexpected support flags %#x for test %u.\n", support, i);
@@ -7110,14 +7110,14 @@ static void test_colour_space_support(IUnknown *device, BOOL is_d3d12)
hr = IDXGISwapChain3_SetColorSpace1(swapchain3, colour_spaces[i]); ok(hr == (support & DXGI_SWAP_CHAIN_COLOR_SPACE_SUPPORT_FLAG_PRESENT) ? S_OK : E_INVALIDARG, - "Got unexpected hr %#x for text %u.\n", hr, i); + "Got unexpected hr %#lx for text %u.\n", hr, i); }
ref_count = IDXGISwapChain3_Release(swapchain3); - ok(!ref_count, "Swap chain has %u references left.\n", ref_count); + ok(!ref_count, "Swap chain has %lu references left.\n", ref_count); DestroyWindow(window); ref_count = IDXGIFactory2_Release(factory2); - ok(ref_count == !is_d3d12, "Factory has %u references left.\n", ref_count); + ok(ref_count == !is_d3d12, "Factory has %lu references left.\n", ref_count); }
static void test_mode_change(IUnknown *device, BOOL is_d3d12) @@ -7140,10 +7140,10 @@ static void test_mode_change(IUnknown *device, BOOL is_d3d12) memset(&devmode, 0, sizeof(devmode)); devmode.dmSize = sizeof(devmode); ret = EnumDisplaySettingsW(NULL, ENUM_CURRENT_SETTINGS, &devmode); - ok(ret, "EnumDisplaySettingsW failed, error %#x.\n", GetLastError()); + ok(ret, "EnumDisplaySettingsW failed, error %#lx.\n", GetLastError()); ok(equal_mode_rect(&devmode, ®istry_mode), "Got a different mode.\n"); ret = EnumDisplaySettingsW(NULL, ENUM_REGISTRY_SETTINGS, &devmode); - ok(ret, "EnumDisplaySettingsW failed, error %#x.\n", GetLastError()); + ok(ret, "EnumDisplaySettingsW failed, error %#lx.\n", GetLastError()); ok(equal_mode_rect(&devmode, ®istry_mode), "Got a different mode.\n");
while (EnumDisplaySettingsW(NULL, mode_idx++, &devmode)) @@ -7179,7 +7179,7 @@ static void test_mode_change(IUnknown *device, BOOL is_d3d12)
/* Test that no mode restorations if no mode changes actually happened */ change_ret = ChangeDisplaySettingsW(&devmode, CDS_UPDATEREGISTRY | CDS_NORESET); - ok(change_ret == DISP_CHANGE_SUCCESSFUL, "ChangeDisplaySettingsW failed with %d.\n", change_ret); + ok(change_ret == DISP_CHANGE_SUCCESSFUL, "ChangeDisplaySettingsW failed with %ld.\n", change_ret);
swapchain_desc.BufferDesc.Width = registry_mode.dmPelsWidth; swapchain_desc.BufferDesc.Height = registry_mode.dmPelsHeight; @@ -7198,14 +7198,14 @@ static void test_mode_change(IUnknown *device, BOOL is_d3d12) swapchain_desc.Flags = DXGI_SWAP_CHAIN_FLAG_ALLOW_MODE_SWITCH;
hr = IDXGIFactory_CreateSwapChain(factory, device, &swapchain_desc, &swapchain); - ok(hr == S_OK, "CreateSwapChain failed, hr %#x.\n", hr); + ok(hr == S_OK, "CreateSwapChain failed, hr %#lx.\n", hr); refcount = IDXGISwapChain_Release(swapchain); - ok(!refcount, "IDXGISwapChain has %u references left.\n", refcount); + ok(!refcount, "IDXGISwapChain has %lu references left.\n", refcount);
memset(&devmode2, 0, sizeof(devmode2)); devmode2.dmSize = sizeof(devmode2); ret = EnumDisplaySettingsW(NULL, ENUM_CURRENT_SETTINGS, &devmode2); - ok(ret, "EnumDisplaySettingsW failed, error %#x.\n", GetLastError()); + ok(ret, "EnumDisplaySettingsW failed, error %#lx.\n", GetLastError()); ok(equal_mode_rect(&devmode2, ®istry_mode), "Got a different mode.\n"); ret = restore_display_modes(original_modes, display_count); ok(ret, "Failed to restore display modes.\n"); @@ -7213,48 +7213,48 @@ static void test_mode_change(IUnknown *device, BOOL is_d3d12) /* If current display settings are different than the display settings in registry before * calling SetFullscreenState() */ change_ret = ChangeDisplaySettingsW(&devmode, CDS_UPDATEREGISTRY | CDS_NORESET); - ok(change_ret == DISP_CHANGE_SUCCESSFUL, "ChangeDisplaySettingsW failed with %d.\n", change_ret); + ok(change_ret == DISP_CHANGE_SUCCESSFUL, "ChangeDisplaySettingsW failed with %ld.\n", change_ret);
hr = IDXGIFactory_CreateSwapChain(factory, device, &swapchain_desc, &swapchain); - ok(hr == S_OK, "CreateSwapChain failed, hr %#x.\n", hr); + ok(hr == S_OK, "CreateSwapChain failed, hr %#lx.\n", hr); hr = IDXGISwapChain_SetFullscreenState(swapchain, TRUE, NULL); ok(hr == DXGI_ERROR_UNSUPPORTED /* Win7 */ || hr == S_OK /* Win8~Win10 1909 */ || hr == DXGI_ERROR_NOT_CURRENTLY_AVAILABLE, /* Win10 2004 */ - "Got unexpected hr %#x.\n", hr); + "Got unexpected hr %#lx.\n", hr);
hr = IDXGISwapChain_SetFullscreenState(swapchain, FALSE, NULL); - ok(hr == S_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr); refcount = IDXGISwapChain_Release(swapchain); - ok(!refcount, "IDXGISwapChain has %u references left.\n", refcount); + ok(!refcount, "IDXGISwapChain has %lu references left.\n", refcount); ret = restore_display_modes(original_modes, display_count); ok(ret, "Failed to restore display modes.\n");
/* Test that mode restorations use display settings in the registry with a fullscreen device */ hr = IDXGIFactory_CreateSwapChain(factory, device, &swapchain_desc, &swapchain); - ok(hr == S_OK, "CreateSwapChain failed, hr %#x.\n", hr); + ok(hr == S_OK, "CreateSwapChain failed, hr %#lx.\n", hr); hr = IDXGISwapChain_SetFullscreenState(swapchain, TRUE, NULL); if (FAILED(hr)) { - skip("SetFullscreenState failed, hr %#x.\n", hr); + skip("SetFullscreenState failed, hr %#lx.\n", hr); refcount = IDXGISwapChain_Release(swapchain); - ok(!refcount, "IDXGISwapChain has %u references left.\n", refcount); + ok(!refcount, "IDXGISwapChain has %lu references left.\n", refcount); goto done; }
change_ret = ChangeDisplaySettingsW(&devmode, CDS_UPDATEREGISTRY | CDS_NORESET); - ok(change_ret == DISP_CHANGE_SUCCESSFUL, "ChangeDisplaySettingsW failed with %d.\n", change_ret); + ok(change_ret == DISP_CHANGE_SUCCESSFUL, "ChangeDisplaySettingsW failed with %ld.\n", change_ret); hr = IDXGISwapChain_SetFullscreenState(swapchain, FALSE, NULL); - ok(hr == S_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ret = EnumDisplaySettingsW(NULL, ENUM_CURRENT_SETTINGS, &devmode2); - ok(ret, "EnumDisplaySettingsW failed, error %#x.\n", GetLastError()); + ok(ret, "EnumDisplaySettingsW failed, error %#lx.\n", GetLastError()); ok(equal_mode_rect(&devmode2, &devmode), "Got a different mode.\n"); ret = EnumDisplaySettingsW(NULL, ENUM_REGISTRY_SETTINGS, &devmode2); - ok(ret, "EnumDisplaySettingsW failed, error %#x.\n", GetLastError()); + ok(ret, "EnumDisplaySettingsW failed, error %#lx.\n", GetLastError()); ok(equal_mode_rect(&devmode2, &devmode), "Got a different mode.\n"); refcount = IDXGISwapChain_Release(swapchain); - ok(!refcount, "IDXGISwapChain has %u references left.\n", refcount); + ok(!refcount, "IDXGISwapChain has %lu references left.\n", refcount); ret = restore_display_modes(original_modes, display_count); ok(ret, "Failed to restore display modes.\n");
@@ -7263,7 +7263,7 @@ static void test_mode_change(IUnknown *device, BOOL is_d3d12) for (output_idx = 0; SUCCEEDED(IDXGIAdapter_EnumOutputs(adapter, output_idx, &output)); ++output_idx) { hr = IDXGIOutput_GetDesc(output, &output_desc); - ok(hr == S_OK, "Adapter %u output %u: Got unexpected hr %#x.\n", adapter_idx, output_idx, hr); + ok(hr == S_OK, "Adapter %u output %u: Got unexpected hr %#lx.\n", adapter_idx, output_idx, hr);
if ((adapter_idx || output_idx) && output_desc.AttachedToDesktop) { @@ -7289,7 +7289,7 @@ static void test_mode_change(IUnknown *device, BOOL is_d3d12) memset(&old_devmode, 0, sizeof(old_devmode)); old_devmode.dmSize = sizeof(old_devmode); ret = EnumDisplaySettingsW(second_monitor_name, ENUM_CURRENT_SETTINGS, &old_devmode); - ok(ret, "EnumDisplaySettingsW failed, error %#x.\n", GetLastError()); + ok(ret, "EnumDisplaySettingsW failed, error %#lx.\n", GetLastError());
mode_idx = 0; d3d_width = 0; @@ -7324,88 +7324,88 @@ static void test_mode_change(IUnknown *device, BOOL is_d3d12)
/* Test that mode restorations for non-primary outputs upon fullscreen state changes */ hr = IDXGIFactory_CreateSwapChain(factory, device, &swapchain_desc, &swapchain); - ok(hr == S_OK, "CreateSwapChain failed, hr %#x.\n", hr); + ok(hr == S_OK, "CreateSwapChain failed, hr %#lx.\n", hr); hr = IDXGISwapChain_SetFullscreenState(swapchain, TRUE, NULL); - ok(hr == S_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
change_ret = ChangeDisplaySettingsExW(second_monitor_name, &devmode, NULL, CDS_RESET, NULL); - ok(change_ret == DISP_CHANGE_SUCCESSFUL, "ChangeDisplaySettingsExW failed with %d.\n", change_ret); + ok(change_ret == DISP_CHANGE_SUCCESSFUL, "ChangeDisplaySettingsExW failed with %ld.\n", change_ret); ret = EnumDisplaySettingsW(second_monitor_name, ENUM_CURRENT_SETTINGS, &devmode2); - ok(ret, "EnumDisplaySettingsW failed, error %#x.\n", GetLastError()); + ok(ret, "EnumDisplaySettingsW failed, error %#lx.\n", GetLastError()); if (devmode2.dmPelsWidth == old_devmode.dmPelsWidth && devmode2.dmPelsHeight == old_devmode.dmPelsHeight) { skip("Failed to change display settings of the second monitor.\n"); hr = IDXGISwapChain_SetFullscreenState(swapchain, FALSE, NULL); - ok(hr == S_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr); refcount = IDXGISwapChain_Release(swapchain); - ok(!refcount, "IDXGISwapChain has %u references left.\n", refcount); + ok(!refcount, "IDXGISwapChain has %lu references left.\n", refcount); goto done; }
hr = IDXGISwapChain_SetFullscreenState(swapchain, FALSE, NULL); - ok(hr == S_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ret = EnumDisplaySettingsW(second_monitor_name, ENUM_CURRENT_SETTINGS, &devmode2); - ok(ret, "EnumDisplaySettingsW failed, error %#x.\n", GetLastError()); + ok(ret, "EnumDisplaySettingsW failed, error %#lx.\n", GetLastError()); ok(equal_mode_rect(&devmode2, &old_devmode), "Got a different mode.\n"); ret = EnumDisplaySettingsW(second_monitor_name, ENUM_REGISTRY_SETTINGS, &devmode2); - ok(ret, "EnumDisplaySettingsW failed, error %#x.\n", GetLastError()); + ok(ret, "EnumDisplaySettingsW failed, error %#lx.\n", GetLastError()); ok(equal_mode_rect(&devmode2, &old_devmode), "Got a different mode.\n"); hr = IDXGIOutput_GetDesc(second_output, &output_desc); - ok(hr == S_OK, "GetDesc failed, hr %#x.\n", hr); + ok(hr == S_OK, "GetDesc failed, hr %#lx.\n", hr); ok(output_desc.DesktopCoordinates.right - output_desc.DesktopCoordinates.left == - old_devmode.dmPelsWidth, "Expected width %u, got %u.\n", old_devmode.dmPelsWidth, + old_devmode.dmPelsWidth, "Expected width %lu, got %lu.\n", old_devmode.dmPelsWidth, output_desc.DesktopCoordinates.right - output_desc.DesktopCoordinates.left); ok(output_desc.DesktopCoordinates.bottom - output_desc.DesktopCoordinates.top == - old_devmode.dmPelsHeight, "Expected height %u, got %u.\n", old_devmode.dmPelsHeight, + old_devmode.dmPelsHeight, "Expected height %lu, got %lu.\n", old_devmode.dmPelsHeight, output_desc.DesktopCoordinates.bottom - output_desc.DesktopCoordinates.top);
refcount = IDXGISwapChain_Release(swapchain); - ok(!refcount, "IDXGISwapChain has %u references left.\n", refcount); + ok(!refcount, "IDXGISwapChain has %lu references left.\n", refcount); ret = restore_display_modes(original_modes, display_count); ok(ret, "Failed to restore display modes.\n");
/* Test that mode restorations for non-primary outputs use display settings in the registry */ hr = IDXGIFactory_CreateSwapChain(factory, device, &swapchain_desc, &swapchain); - ok(hr == S_OK, "CreateSwapChain failed, hr %#x.\n", hr); + ok(hr == S_OK, "CreateSwapChain failed, hr %#lx.\n", hr); hr = IDXGISwapChain_SetFullscreenState(swapchain, TRUE, NULL); - ok(hr == S_OK, "SetFullscreenState failed, hr %#x.\n", hr); + ok(hr == S_OK, "SetFullscreenState failed, hr %#lx.\n", hr);
change_ret = ChangeDisplaySettingsExW(second_monitor_name, &devmode, NULL, CDS_UPDATEREGISTRY | CDS_NORESET, NULL); - ok(change_ret == DISP_CHANGE_SUCCESSFUL, "ChangeDisplaySettingsExW failed with %d.\n", change_ret); + ok(change_ret == DISP_CHANGE_SUCCESSFUL, "ChangeDisplaySettingsExW failed with %ld.\n", change_ret); hr = IDXGISwapChain_SetFullscreenState(swapchain, FALSE, NULL); - ok(hr == S_OK, "SetFullscreenState failed, hr %#x.\n", hr); + ok(hr == S_OK, "SetFullscreenState failed, hr %#lx.\n", hr);
ret = EnumDisplaySettingsW(second_monitor_name, ENUM_CURRENT_SETTINGS, &devmode2); - ok(ret, "EnumDisplaySettingsW failed, error %#x.\n", GetLastError()); + ok(ret, "EnumDisplaySettingsW failed, error %#lx.\n", GetLastError()); ok(devmode2.dmPelsWidth == devmode.dmPelsWidth && devmode2.dmPelsHeight == devmode.dmPelsHeight, - "Expected resolution %ux%u, got %ux%u.\n", devmode.dmPelsWidth, devmode.dmPelsHeight, + "Expected resolution %lux%lu, got %lux%lu.\n", devmode.dmPelsWidth, devmode.dmPelsHeight, devmode2.dmPelsWidth, devmode2.dmPelsHeight); ret = EnumDisplaySettingsW(second_monitor_name, ENUM_REGISTRY_SETTINGS, &devmode2); - ok(ret, "EnumDisplaySettingsW failed, error %#x.\n", GetLastError()); + ok(ret, "EnumDisplaySettingsW failed, error %#lx.\n", GetLastError()); ok(devmode2.dmPelsWidth == devmode.dmPelsWidth && devmode2.dmPelsHeight == devmode.dmPelsHeight, - "Expected resolution %ux%u, got %ux%u.\n", devmode.dmPelsWidth, devmode.dmPelsHeight, + "Expected resolution %lux%lu, got %lux%lu.\n", devmode.dmPelsWidth, devmode.dmPelsHeight, devmode2.dmPelsWidth, devmode2.dmPelsHeight); hr = IDXGIOutput_GetDesc(second_output, &output_desc); - ok(hr == S_OK, "GetDesc failed, hr %#x.\n", hr); + ok(hr == S_OK, "GetDesc failed, hr %#lx.\n", hr); ok(output_desc.DesktopCoordinates.right - output_desc.DesktopCoordinates.left == - devmode.dmPelsWidth, "Expected width %u, got %u.\n", devmode.dmPelsWidth, + devmode.dmPelsWidth, "Expected width %lu, got %lu.\n", devmode.dmPelsWidth, output_desc.DesktopCoordinates.right - output_desc.DesktopCoordinates.left); ok(output_desc.DesktopCoordinates.bottom - output_desc.DesktopCoordinates.top == - devmode.dmPelsHeight, "Expected height %u, got %u.\n", devmode.dmPelsHeight, + devmode.dmPelsHeight, "Expected height %lu, got %lu.\n", devmode.dmPelsHeight, output_desc.DesktopCoordinates.bottom - output_desc.DesktopCoordinates.top);
refcount = IDXGISwapChain_Release(swapchain); - ok(!refcount, "IDXGISwapChain has %u references left.\n", refcount); + ok(!refcount, "IDXGISwapChain has %lu references left.\n", refcount); ret = restore_display_modes(original_modes, display_count); ok(ret, "Failed to restore display modes.\n");
/* Test that mode restorations for non-primary outputs on fullscreen state changes when there * are two fullscreen swapchains on different outputs */ hr = IDXGIFactory_CreateSwapChain(factory, device, &swapchain_desc, &swapchain); - ok(hr == S_OK, "CreateSwapChain failed, hr %#x.\n", hr); + ok(hr == S_OK, "CreateSwapChain failed, hr %#lx.\n", hr);
swapchain_desc2 = swapchain_desc; swapchain_desc.BufferDesc.Width = d3d_width; @@ -7413,52 +7413,52 @@ static void test_mode_change(IUnknown *device, BOOL is_d3d12) swapchain_desc2.OutputWindow = CreateWindowA("static", "dxgi_test2", 0, old_devmode.dmPosition.x, old_devmode.dmPosition.y, 400, 200, 0, 0, 0, 0); hr = IDXGIFactory_CreateSwapChain(factory, device, &swapchain_desc2, &swapchain2); - ok(hr == S_OK, "CreateSwapChain failed, hr %#x.\n", hr); + ok(hr == S_OK, "CreateSwapChain failed, hr %#lx.\n", hr); hr = IDXGISwapChain_SetFullscreenState(swapchain, TRUE, NULL); - ok(hr == S_OK, "SetFullscreenState failed, hr %#x.\n", hr); + ok(hr == S_OK, "SetFullscreenState failed, hr %#lx.\n", hr); hr = IDXGISwapChain_SetFullscreenState(swapchain2, TRUE, NULL); if (FAILED(hr)) { - skip("SetFullscreenState failed, hr %#x.\n", hr); + skip("SetFullscreenState failed, hr %#lx.\n", hr); refcount = IDXGISwapChain_Release(swapchain2); - ok(!refcount, "IDXGISwapChain has %u references left.\n", refcount); + ok(!refcount, "IDXGISwapChain has %lu references left.\n", refcount); hr = IDXGISwapChain_SetFullscreenState(swapchain, FALSE, NULL); - ok(hr == S_OK, "SetFullscreenState failed, hr %#x.\n", hr); + ok(hr == S_OK, "SetFullscreenState failed, hr %#lx.\n", hr); refcount = IDXGISwapChain_Release(swapchain); - ok(!refcount, "IDXGISwapChain has %u references left.\n", refcount); + ok(!refcount, "IDXGISwapChain has %lu references left.\n", refcount); goto done; }
hr = IDXGISwapChain_SetFullscreenState(swapchain, FALSE, NULL); - ok(hr == S_OK, "SetFullscreenState failed, hr %#x.\n", hr); + ok(hr == S_OK, "SetFullscreenState failed, hr %#lx.\n", hr); hr = IDXGISwapChain_GetFullscreenState(swapchain, &fullscreen, NULL); - ok(hr == S_OK, "GetFullscreenState failed, hr %#x.\n", hr); + ok(hr == S_OK, "GetFullscreenState failed, hr %#lx.\n", hr); ok(!fullscreen, "Expected swapchain not fullscreen.\n"); hr = IDXGISwapChain_GetFullscreenState(swapchain2, &fullscreen, NULL); - ok(hr == S_OK, "GetFullscreenState failed, hr %#x.\n", hr); + ok(hr == S_OK, "GetFullscreenState failed, hr %#lx.\n", hr); ok(fullscreen, "Expected swapchain fullscreen.\n");
ret = EnumDisplaySettingsW(second_monitor_name, ENUM_CURRENT_SETTINGS, &devmode2); - ok(ret, "EnumDisplaySettingsW failed, error %#x.\n", GetLastError()); + ok(ret, "EnumDisplaySettingsW failed, error %#lx.\n", GetLastError()); ok(equal_mode_rect(&devmode2, &old_devmode), "Got a different mode.\n"); ret = EnumDisplaySettingsW(second_monitor_name, ENUM_REGISTRY_SETTINGS, &devmode2); - ok(ret, "EnumDisplaySettingsW failed, error %#x.\n", GetLastError()); + ok(ret, "EnumDisplaySettingsW failed, error %#lx.\n", GetLastError()); ok(equal_mode_rect(&devmode2, &old_devmode), "Got a different mode.\n"); hr = IDXGIOutput_GetDesc(second_output, &output_desc); - ok(hr == S_OK, "GetDesc failed, hr %#x.\n", hr); + ok(hr == S_OK, "GetDesc failed, hr %#lx.\n", hr); ok(output_desc.DesktopCoordinates.right - output_desc.DesktopCoordinates.left == - old_devmode.dmPelsWidth, "Expected width %u, got %u.\n", old_devmode.dmPelsWidth, + old_devmode.dmPelsWidth, "Expected width %lu, got %lu.\n", old_devmode.dmPelsWidth, output_desc.DesktopCoordinates.right - output_desc.DesktopCoordinates.left); ok(output_desc.DesktopCoordinates.bottom - output_desc.DesktopCoordinates.top == - old_devmode.dmPelsHeight, "Expected height %u, got %u.\n", old_devmode.dmPelsHeight, + old_devmode.dmPelsHeight, "Expected height %lu, got %lu.\n", old_devmode.dmPelsHeight, output_desc.DesktopCoordinates.bottom - output_desc.DesktopCoordinates.top);
hr = IDXGISwapChain_SetFullscreenState(swapchain2, FALSE, NULL); - ok(hr == S_OK, "SetFullscreenState failed, hr %#x.\n", hr); + ok(hr == S_OK, "SetFullscreenState failed, hr %#lx.\n", hr); refcount = IDXGISwapChain_Release(swapchain2); - ok(!refcount, "IDXGISwapChain has %u references left.\n", refcount); + ok(!refcount, "IDXGISwapChain has %lu references left.\n", refcount); refcount = IDXGISwapChain_Release(swapchain); - ok(!refcount, "IDXGISwapChain has %u references left.\n", refcount); + ok(!refcount, "IDXGISwapChain has %lu references left.\n", refcount); DestroyWindow(swapchain_desc2.OutputWindow); ret = restore_display_modes(original_modes, display_count); ok(ret, "Failed to restore display modes.\n"); @@ -7468,7 +7468,7 @@ done: IDXGIOutput_Release(second_output); DestroyWindow(swapchain_desc.OutputWindow); refcount = IDXGIFactory_Release(factory); - ok(refcount == !is_d3d12, "Got unexpected refcount %u.\n", refcount); + ok(refcount == !is_d3d12, "Got unexpected refcount %lu.\n", refcount); ret = restore_display_modes(original_modes, display_count); ok(ret, "Failed to restore display modes.\n"); heap_free(original_modes); @@ -7486,44 +7486,44 @@ static void test_swapchain_present_count(IUnknown *device, BOOL is_d3d12)
present_count = ~0u; hr = IDXGISwapChain_GetLastPresentCount(swapchain, &present_count); - ok(hr == S_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr); ok(!present_count, "Got unexpected present count %u.\n", present_count);
hr = IDXGISwapChain_Present(swapchain, 0, 0); - ok(hr == S_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr); expected = present_count + 1; hr = IDXGISwapChain_GetLastPresentCount(swapchain, &present_count); - ok(hr == S_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr); ok(present_count == expected, "Got unexpected present count %u, expected %u.\n", present_count, expected);
hr = IDXGISwapChain_Present(swapchain, 10, 0); - ok(hr == DXGI_ERROR_INVALID_CALL, "Got unexpected hr %#x.\n", hr); + ok(hr == DXGI_ERROR_INVALID_CALL, "Got unexpected hr %#lx.\n", hr); expected = present_count; hr = IDXGISwapChain_GetLastPresentCount(swapchain, &present_count); - ok(hr == S_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr); ok(present_count == expected, "Got unexpected present count %u, expected %u.\n", present_count, expected);
hr = IDXGISwapChain_Present(swapchain, 0, DXGI_PRESENT_TEST); - ok(hr == S_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr); expected = present_count; hr = IDXGISwapChain_GetLastPresentCount(swapchain, &present_count); - ok(hr == S_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr); ok(present_count == expected, "Got unexpected present count %u, expected %u.\n", present_count, expected);
ShowWindow(window, SW_MINIMIZE); hr = IDXGISwapChain_Present(swapchain, 0, 0); - ok(hr == (is_d3d12 ? S_OK : DXGI_STATUS_OCCLUDED), "Got unexpected hr %#x.\n", hr); + ok(hr == (is_d3d12 ? S_OK : DXGI_STATUS_OCCLUDED), "Got unexpected hr %#lx.\n", hr); expected = present_count + !!is_d3d12; hr = IDXGISwapChain_GetLastPresentCount(swapchain, &present_count); - ok(hr == S_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr); ok(present_count == expected, "Got unexpected present count %u, expected %u.\n", present_count, expected);
ShowWindow(window, SW_NORMAL); hr = IDXGISwapChain_Present(swapchain, 0, 0); - ok(hr == S_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr); expected = present_count + 1; hr = IDXGISwapChain_GetLastPresentCount(swapchain, &present_count); - ok(hr == S_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr); ok(present_count == expected, "Got unexpected present count %u, expected %u.\n", present_count, expected);
IDXGISwapChain_Release(swapchain); @@ -7544,7 +7544,7 @@ static void run_on_d3d10(void (*test_func)(IUnknown *device, BOOL is_d3d12)) test_func((IUnknown *)device, FALSE);
refcount = IDXGIDevice_Release(device); - ok(!refcount, "Device has %u references left.\n", refcount); + ok(!refcount, "Device has %lu references left.\n", refcount); }
static void run_on_d3d12(void (*test_func)(IUnknown *device, BOOL is_d3d12)) @@ -7566,9 +7566,9 @@ static void run_on_d3d12(void (*test_func)(IUnknown *device, BOOL is_d3d12)) wait_queue_idle(device, queue);
refcount = ID3D12CommandQueue_Release(queue); - ok(!refcount, "Command queue has %u references left.\n", refcount); + ok(!refcount, "Command queue has %lu references left.\n", refcount); refcount = ID3D12Device_Release(device); - ok(!refcount, "Device has %u references left.\n", refcount); + ok(!refcount, "Device has %lu references left.\n", refcount); }
START_TEST(dxgi)
Signed-off-by: Eric Pouech eric.pouech@gmail.com
--- dlls/explorerframe/tests/nstc.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/dlls/explorerframe/tests/nstc.c b/dlls/explorerframe/tests/nstc.c index 6433b69ebf8..617c93d9b09 100644 --- a/dlls/explorerframe/tests/nstc.c +++ b/dlls/explorerframe/tests/nstc.c @@ -910,7 +910,7 @@ static void test_basics(void) ok(style == tmp, "Got style %x (expected %x)\n", style, tmp); if(SUCCEEDED(hr)) { - DWORD tmp2; + NSTCSTYLE tmp2; for(i = 0; styles[i] != 0; i++) { hr = INameSpaceTreeControl2_GetControlStyle(pnstc2, styles[i], &tmp2); @@ -966,7 +966,7 @@ static void test_basics(void) ok(style2 == tmp, "Got style %x (expected %x)\n", style2, tmp); if(SUCCEEDED(hr)) { - DWORD tmp2; + NSTCSTYLE2 tmp2; for(i = 0; styles2[i] != 0; i++) { hr = INameSpaceTreeControl2_GetControlStyle2(pnstc2, styles2[i], &tmp2); @@ -1372,7 +1372,7 @@ static void test_basics(void) ok(hr == S_OK, "Got 0x%08x\n", hr); if(SUCCEEDED(hr)) { - UINT count; + DWORD count; hr = IShellItemArray_GetCount(psia, &count); ok(hr == S_OK, "Got 0x%08x\n", hr); ok(count == 1, "Got %d selected items.\n", count); @@ -1400,7 +1400,7 @@ static void test_basics(void) ok(hr == S_OK, "Got 0x%08x\n", hr); if(SUCCEEDED(hr)) { - UINT count; + DWORD count; hr = IShellItemArray_GetCount(psia, &count); ok(hr == S_OK, "Got 0x%08x\n", hr); ok(count == 1, "Got %d selected items.\n", count); @@ -1426,7 +1426,7 @@ static void test_basics(void) ok(hr == S_OK, "Got 0x%08x\n", hr); if(SUCCEEDED(hr)) { - UINT count; + DWORD count; hr = IShellItemArray_GetCount(psia, &count); ok(hr == S_OK, "Got 0x%08x\n", hr); ok(count == 1, "Got %d selected items.\n", count);
Signed-off-by: Eric Pouech eric.pouech@gmail.com
--- dlls/explorerframe/tests/Makefile.in | 1 dlls/explorerframe/tests/nstc.c | 596 ++++++++++++++++---------------- dlls/explorerframe/tests/taskbarlist.c | 66 ++-- 3 files changed, 331 insertions(+), 332 deletions(-)
diff --git a/dlls/explorerframe/tests/Makefile.in b/dlls/explorerframe/tests/Makefile.in index 34ddfb11449..ede5443bcd1 100644 --- a/dlls/explorerframe/tests/Makefile.in +++ b/dlls/explorerframe/tests/Makefile.in @@ -1,4 +1,3 @@ -EXTRADEFS = -DWINE_NO_LONG_TYPES TESTDLL = explorerframe.dll IMPORTS = uuid shell32 ole32 user32
diff --git a/dlls/explorerframe/tests/nstc.c b/dlls/explorerframe/tests/nstc.c index 617c93d9b09..f11ae0b1923 100644 --- a/dlls/explorerframe/tests/nstc.c +++ b/dlls/explorerframe/tests/nstc.c @@ -174,8 +174,8 @@ static HRESULT WINAPI NSTCEvents_fnOnSelectionChanged( HRESULT hr; DWORD count = 0xdeadbeef; hr = IShellItemArray_GetCount(psiaSelection, &count); - ok(hr == S_OK, "Got 0x%08x\n", hr); - ok(count == 1, "Got count 0x%x\n", count); + ok(hr == S_OK, "Got 0x%08lx\n", hr); + ok(count == 1, "Got count 0x%lx\n", count); } This->count[OnSelectionChanged]++; return E_NOTIMPL; @@ -190,8 +190,8 @@ static HRESULT WINAPI NSTCEvents_fnOnKeyboardInput( INameSpaceTreeControlEventsImpl *This = impl_from_INameSpaceTreeControlEvents(iface);
This->count[OnKeyboardInput]++; - ok(wParam == 0x1234, "Got unexpected wParam %lx\n", wParam); - ok(lParam == 0x1234, "Got unexpected lParam %lx\n", lParam); + ok(wParam == 0x1234, "Got unexpected wParam %Ix\n", wParam); + ok(lParam == 0x1234, "Got unexpected lParam %Ix\n", lParam); return E_NOTIMPL; }
@@ -501,12 +501,12 @@ static HWND get_treeview_hwnd(INameSpaceTreeControl *pnstc) HWND treeview = NULL;
hr = INameSpaceTreeControl_QueryInterface(pnstc, &IID_IOleWindow, (void**)&pow); - ok(hr == S_OK, "Got 0x%08x\n", hr); + ok(hr == S_OK, "Got 0x%08lx\n", hr); if(SUCCEEDED(hr)) { HWND host; hr = IOleWindow_GetWindow(pow, &host); - ok(hr == S_OK, "Got 0x%08x\n", hr); + ok(hr == S_OK, "Got 0x%08lx\n", hr); if(SUCCEEDED(hr)) treeview = FindWindowExW(host, NULL, WC_TREEVIEWW, NULL); IOleWindow_Release(pow); @@ -584,44 +584,44 @@ static BOOL test_initialization(void)
hr = CoCreateInstance(&CLSID_NamespaceTreeControl, NULL, CLSCTX_INPROC_SERVER, &IID_INameSpaceTreeControl, (void**)&pnstc); - ok(hr == S_OK || hr == REGDB_E_CLASSNOTREG, "Got 0x%08x\n", hr); + ok(hr == S_OK || hr == REGDB_E_CLASSNOTREG, "Got 0x%08lx\n", hr); if(FAILED(hr)) { return FALSE; }
hr = INameSpaceTreeControl_Initialize(pnstc, NULL, NULL, 0); - ok(hr == HRESULT_FROM_WIN32(ERROR_TLW_WITH_WSCHILD), "Got (0x%08x)\n", hr); + ok(hr == HRESULT_FROM_WIN32(ERROR_TLW_WITH_WSCHILD), "Got (0x%08lx)\n", hr);
hr = INameSpaceTreeControl_Initialize(pnstc, (HWND)0xDEADBEEF, NULL, 0); - ok(hr == HRESULT_FROM_WIN32(ERROR_INVALID_WINDOW_HANDLE), "Got (0x%08x)\n", hr); + ok(hr == HRESULT_FROM_WIN32(ERROR_INVALID_WINDOW_HANDLE), "Got (0x%08lx)\n", hr);
ZeroMemory(&rc, sizeof(RECT)); hr = INameSpaceTreeControl_Initialize(pnstc, NULL, &rc, 0); - ok(hr == HRESULT_FROM_WIN32(ERROR_TLW_WITH_WSCHILD), "Got (0x%08x)\n", hr); + ok(hr == HRESULT_FROM_WIN32(ERROR_TLW_WITH_WSCHILD), "Got (0x%08lx)\n", hr);
hr = INameSpaceTreeControl_Initialize(pnstc, (HWND)0xDEADBEEF, &rc, 0); - ok(hr == HRESULT_FROM_WIN32(ERROR_INVALID_WINDOW_HANDLE), "Got (0x%08x)\n", hr); + ok(hr == HRESULT_FROM_WIN32(ERROR_INVALID_WINDOW_HANDLE), "Got (0x%08lx)\n", hr);
hr = INameSpaceTreeControl_QueryInterface(pnstc, &IID_IOleWindow, (void**)&pow); - ok(hr == S_OK, "Got (0x%08x)\n", hr); + ok(hr == S_OK, "Got (0x%08lx)\n", hr); if(SUCCEEDED(hr)) { hr = IOleWindow_GetWindow(pow, &hwnd_host1); - ok(hr == S_OK, "Got (0x%08x)\n", hr); + ok(hr == S_OK, "Got (0x%08lx)\n", hr); ok(hwnd_host1 == NULL, "hwnd is not null.\n");
hr = IOleWindow_ContextSensitiveHelp(pow, TRUE); - ok(hr == E_NOTIMPL, "Got (0x%08x)\n", hr); + ok(hr == E_NOTIMPL, "Got (0x%08lx)\n", hr); hr = IOleWindow_ContextSensitiveHelp(pow, FALSE); - ok(hr == E_NOTIMPL, "Got (0x%08x)\n", hr); + ok(hr == E_NOTIMPL, "Got (0x%08lx)\n", hr); IOleWindow_Release(pow); }
hr = INameSpaceTreeControl_Initialize(pnstc, hwnd, NULL, 0); - ok(hr == S_OK, "Got (0x%08x)\n", hr); + ok(hr == S_OK, "Got (0x%08lx)\n", hr); hr = INameSpaceTreeControl_QueryInterface(pnstc, &IID_IOleWindow, (void**)&pow); - ok(hr == S_OK, "Got 0x%08x\n", hr); + ok(hr == S_OK, "Got 0x%08lx\n", hr); if(SUCCEEDED(hr)) { static const CHAR namespacetree[] = "NamespaceTreeControl"; @@ -629,7 +629,7 @@ static BOOL test_initialization(void) LONG style, expected_style; HWND hwnd_tv; hr = IOleWindow_GetWindow(pow, &hwnd_host1); - ok(hr == S_OK, "Got (0x%08x)\n", hr); + ok(hr == S_OK, "Got (0x%08lx)\n", hr); ok(hwnd_host1 != NULL, "hwnd_host1 is null.\n"); buf[0] = '\0'; GetClassNameA(hwnd_host1, buf, 1024); @@ -637,15 +637,15 @@ static BOOL test_initialization(void)
expected_style = WS_CHILD | WS_VISIBLE | WS_CLIPSIBLINGS | WS_CLIPCHILDREN; style = GetWindowLongPtrW(hwnd_host1, GWL_STYLE); - ok(style == expected_style, "Got style %08x\n", style); + ok(style == expected_style, "Got style %08lx\n", style);
expected_style = 0; style = GetWindowLongPtrW(hwnd_host1, GWL_EXSTYLE); - ok(style == expected_style, "Got style %08x\n", style); + ok(style == expected_style, "Got style %08lx\n", style);
expected_style = 0; style = SendMessageW(hwnd_host1, TVM_GETEXTENDEDSTYLE, 0, 0); - ok(style == expected_style, "Got 0x%08x\n", style); + ok(style == expected_style, "Got 0x%08lx\n", style);
hwnd_tv = FindWindowExW(hwnd_host1, NULL, WC_TREEVIEWW, NULL); ok(hwnd_tv != NULL, "Failed to get treeview hwnd.\n"); @@ -655,16 +655,16 @@ static BOOL test_initialization(void) WS_CLIPCHILDREN | WS_TABSTOP | TVS_NOHSCROLL | TVS_NONEVENHEIGHT | TVS_INFOTIP | TVS_TRACKSELECT | TVS_EDITLABELS; style = GetWindowLongPtrW(hwnd_tv, GWL_STYLE); - ok(style == expected_style, "Got style %08x\n", style); + ok(style == expected_style, "Got style %08lx\n", style);
expected_style = 0; style = GetWindowLongPtrW(hwnd_tv, GWL_EXSTYLE); - ok(style == expected_style, "Got style %08x\n", style); + ok(style == expected_style, "Got style %08lx\n", style);
expected_style = TVS_EX_NOSINGLECOLLAPSE | TVS_EX_DOUBLEBUFFER | TVS_EX_RICHTOOLTIP | TVS_EX_DRAWIMAGEASYNC; style = SendMessageW(hwnd_tv, TVM_GETEXTENDEDSTYLE, 0, 0); - todo_wine ok(style == expected_style, "Got 0x%08x\n", style); + todo_wine ok(style == expected_style, "Got 0x%08lx\n", style); }
IOleWindow_Release(pow); @@ -675,13 +675,13 @@ static BOOL test_initialization(void) /* The control can be initialized again without crashing, but * the reference counting will break. */ hr = INameSpaceTreeControl_Initialize(pnstc, hwnd, &rc, 0); - ok(hr == S_OK, "Got (0x%08x)\n", hr); + ok(hr == S_OK, "Got (0x%08lx)\n", hr); hr = INameSpaceTreeControl_QueryInterface(pnstc, &IID_IOleWindow, (void**)&pow); if(SUCCEEDED(hr)) { HWND hwnd_host2; hr = IOleWindow_GetWindow(pow, &hwnd_host2); - ok(hr == S_OK, "Got (0x%08x)\n", hr); + ok(hr == S_OK, "Got (0x%08lx)\n", hr); ok(hwnd_host1 != hwnd_host2, "Same hwnd.\n"); IOleWindow_Release(pow); } @@ -691,35 +691,35 @@ static BOOL test_initialization(void)
/* Next three are supported on Vista/2k8, but not on newer versions */ hr = INameSpaceTreeControl_QueryInterface(pnstc, &IID_IOleInPlaceObject, (void**)&punk); - ok(hr == E_NOINTERFACE || broken(hr == S_OK) /* vista, w2k8 */, "Got (0x%08x)\n", hr); + ok(hr == E_NOINTERFACE || broken(hr == S_OK) /* vista, w2k8 */, "Got (0x%08lx)\n", hr); if(SUCCEEDED(hr)) IUnknown_Release(punk); hr = INameSpaceTreeControl_QueryInterface(pnstc, &IID_IOleInPlaceActiveObject, (void**)&punk); - ok(hr == E_NOINTERFACE || broken(hr == S_OK) /* vista, w2k8 */, "Got (0x%08x)\n", hr); + ok(hr == E_NOINTERFACE || broken(hr == S_OK) /* vista, w2k8 */, "Got (0x%08lx)\n", hr); if(SUCCEEDED(hr)) IUnknown_Release(punk); hr = INameSpaceTreeControl_QueryInterface(pnstc, &IID_IOleInPlaceObjectWindowless, (void**)&punk); - ok(hr == E_NOINTERFACE || broken(hr == S_OK) /* vista, w2k8 */, "Got (0x%08x)\n", hr); + ok(hr == E_NOINTERFACE || broken(hr == S_OK) /* vista, w2k8 */, "Got (0x%08lx)\n", hr); if(SUCCEEDED(hr)) IUnknown_Release(punk);
hr = INameSpaceTreeControl_QueryInterface(pnstc, &IID_IOleInPlaceUIWindow, (void**)&punk); - ok(hr == E_NOINTERFACE, "Got (0x%08x)\n", hr); + ok(hr == E_NOINTERFACE, "Got (0x%08lx)\n", hr); hr = INameSpaceTreeControl_QueryInterface(pnstc, &IID_IOleInPlaceFrame, (void**)&punk); - ok(hr == E_NOINTERFACE, "Got (0x%08x)\n", hr); + ok(hr == E_NOINTERFACE, "Got (0x%08lx)\n", hr); hr = INameSpaceTreeControl_QueryInterface(pnstc, &IID_IOleInPlaceSite, (void**)&punk); - ok(hr == E_NOINTERFACE, "Got (0x%08x)\n", hr); + ok(hr == E_NOINTERFACE, "Got (0x%08lx)\n", hr); hr = INameSpaceTreeControl_QueryInterface(pnstc, &IID_IOleInPlaceSiteEx, (void**)&punk); - ok(hr == E_NOINTERFACE, "Got (0x%08x)\n", hr); + ok(hr == E_NOINTERFACE, "Got (0x%08lx)\n", hr); hr = INameSpaceTreeControl_QueryInterface(pnstc, &IID_IOleInPlaceSiteWindowless, (void**)&punk); - ok(hr == E_NOINTERFACE, "Got (0x%08x)\n", hr); + ok(hr == E_NOINTERFACE, "Got (0x%08lx)\n", hr);
/* On windows, the reference count won't go to zero until the * window is destroyed. */ INameSpaceTreeControl_AddRef(pnstc); lres = INameSpaceTreeControl_Release(pnstc); - ok(lres > 1, "Reference count was (%d).\n", lres); + ok(lres > 1, "Reference count was (%ld).\n", lres);
DestroyWindow(hwnd_host1); lres = INameSpaceTreeControl_Release(pnstc); - ok(!lres, "lres was %d\n", lres); + ok(!lres, "lres was %ld\n", lres);
return TRUE; } @@ -731,26 +731,26 @@ static void verify_root_order_(INameSpaceTreeControl *pnstc, IShellItem **roots, IShellItemArray *psia;
hr = INameSpaceTreeControl_GetRootItems(pnstc, &psia); - ok_(file,line) (hr == S_OK, "GetRootItems: got (0x%08x)\n", hr); + ok_(file,line) (hr == S_OK, "GetRootItems: got (0x%08lx)\n", hr); if(SUCCEEDED(hr)) { DWORD i, expected, count = -1; hr = IShellItemArray_GetCount(psia, &count); - ok_(file,line) (hr == S_OK, "Got (0x%08x)\n", hr); + ok_(file,line) (hr == S_OK, "Got (0x%08lx)\n", hr);
for(expected = 0; roots[expected] != NULL; expected++); - ok_(file,line) (count == expected, "Got %d roots, expected %d\n", count, expected); + ok_(file,line) (count == expected, "Got %ld roots, expected %ld\n", count, expected);
for(i = 0; i < count && roots[i] != NULL; i++) { IShellItem *psi; hr = IShellItemArray_GetItemAt(psia, i, &psi); - ok_(file,line) (hr == S_OK, "GetItemAt %i: got 0x%08x\n", i, hr); + ok_(file,line) (hr == S_OK, "GetItemAt %li: got 0x%08lx\n", i, hr); if(SUCCEEDED(hr)) { int cmp; hr = IShellItem_Compare(psi, roots[i], SICHINT_DISPLAY, &cmp); - ok_(file,line) (hr == S_OK, "Compare %i: got 0x%08x\n", i, hr); + ok_(file,line) (hr == S_OK, "Compare %li: got 0x%08lx\n", i, hr); IShellItem_Release(psi); } } @@ -791,15 +791,15 @@ static void test_basics(void) /* Create ShellItems for testing. */ SHGetDesktopFolder(&psfdesktop); hr = pSHGetIDListFromObject((IUnknown*)psfdesktop, &pidl_desktop); - ok(hr == S_OK, "Got 0x%08x\n", hr); + ok(hr == S_OK, "Got 0x%08lx\n", hr); if(SUCCEEDED(hr)) { hr = pSHCreateShellItem(NULL, NULL, pidl_desktop, &psidesktop); - ok(hr == S_OK, "Got 0x%08x\n", hr); + ok(hr == S_OK, "Got 0x%08lx\n", hr); if(SUCCEEDED(hr)) { hr = pSHCreateShellItem(NULL, NULL, pidl_desktop, &psidesktop2); - ok(hr == S_OK, "Got 0x%08x\n", hr); + ok(hr == S_OK, "Got 0x%08lx\n", hr); if(FAILED(hr)) IShellItem_Release(psidesktop); } ILFree(pidl_desktop); @@ -822,45 +822,45 @@ static void test_basics(void) myPathAddBackslashW(buf); lstrcatW(buf, L"testdir"); hr = pSHCreateItemFromParsingName(buf, NULL, &IID_IShellItem, (void**)&psitestdir); - ok(hr == S_OK, "Got 0x%08x\n", hr); + ok(hr == S_OK, "Got 0x%08lx\n", hr); if(FAILED(hr)) goto cleanup; lstrcpyW(buf, curdirW); myPathAddBackslashW(buf); lstrcatW(buf, L"testdir\testdir2"); hr = pSHCreateItemFromParsingName(buf, NULL, &IID_IShellItem, (void**)&psitestdir2); - ok(hr == S_OK, "Got 0x%08x\n", hr); + ok(hr == S_OK, "Got 0x%08lx\n", hr); if(FAILED(hr)) goto cleanup; lstrcpyW(buf, curdirW); myPathAddBackslashW(buf); lstrcatW(buf, L"testdir\test1.txt"); hr = pSHCreateItemFromParsingName(buf, NULL, &IID_IShellItem, (void**)&psitest1); - ok(hr == S_OK, "Got 0x%08x\n", hr); + ok(hr == S_OK, "Got 0x%08lx\n", hr); if(FAILED(hr)) goto cleanup;
hr = CoCreateInstance(&CLSID_NamespaceTreeControl, NULL, CLSCTX_INPROC_SERVER, &IID_INameSpaceTreeControl, (void**)&pnstc); - ok(hr == S_OK, "Failed to initialize control (0x%08x)\n", hr); + ok(hr == S_OK, "Failed to initialize control (0x%08lx)\n", hr);
/* Some tests on an uninitialized control */ hr = INameSpaceTreeControl_RemoveAllRoots(pnstc); - ok(hr == E_INVALIDARG, "Got (0x%08x)\n", hr); + ok(hr == E_INVALIDARG, "Got (0x%08lx)\n", hr); hr = INameSpaceTreeControl_RemoveRoot(pnstc, psidesktop); - ok(hr == E_FAIL, "Got (0x%08x)\n", hr); + ok(hr == E_FAIL, "Got (0x%08lx)\n", hr); hr = INameSpaceTreeControl_RemoveRoot(pnstc, NULL); - ok(hr == E_NOINTERFACE, "Got (0x%08x)\n", hr); + ok(hr == E_NOINTERFACE, "Got (0x%08lx)\n", hr); hr = INameSpaceTreeControl_AppendRoot(pnstc, psidesktop, SHCONTF_NONFOLDERS, 0, NULL); - ok(hr == E_FAIL, "Got (0x%08x)\n", hr); + ok(hr == E_FAIL, "Got (0x%08lx)\n", hr); process_msgs();
/* Initialize the control */ SetRect(&rc, 0, 0, 200, 200); hr = INameSpaceTreeControl_Initialize(pnstc, hwnd, &rc, 0); - ok(hr == S_OK, "Got (0x%08x)\n", hr); + ok(hr == S_OK, "Got (0x%08lx)\n", hr);
/* Set/GetControlStyle(2) */ hr = INameSpaceTreeControl_QueryInterface(pnstc, &IID_INameSpaceTreeControl2, (void**)&pnstc2); - ok(hr == S_OK || broken(hr == E_NOINTERFACE), "Got 0x%08x\n", hr); + ok(hr == S_OK || broken(hr == E_NOINTERFACE), "Got 0x%08lx\n", hr); if(SUCCEEDED(hr)) { DWORD tmp; @@ -875,7 +875,7 @@ static void test_basics(void) /* We can use this to differentiate between two versions of * this interface. Windows 7 returns hr == S_OK. */ hr = INameSpaceTreeControl2_SetControlStyle(pnstc2, 0, 0); - ok(hr == S_OK || broken(hr == E_FAIL), "Got 0x%08x\n", hr); + ok(hr == S_OK || broken(hr == E_FAIL), "Got 0x%08lx\n", hr); if(hr == S_OK) { static const NSTCSTYLE styles[] = @@ -891,86 +891,86 @@ static void test_basics(void) /* Set/GetControlStyle */ style = style2 = 0xdeadbeef; hr = INameSpaceTreeControl2_GetControlStyle(pnstc2, 0xFFFFFFFF, &style); - ok(hr == S_OK, "Got 0x%08x\n", hr); - ok(style == 0, "Got style %x\n", style); + ok(hr == S_OK, "Got 0x%08lx\n", hr); + ok(style == 0, "Got style %lx\n", style);
hr = INameSpaceTreeControl2_SetControlStyle(pnstc2, 0, 0xFFFFFFF); - ok(hr == S_OK, "Got 0x%08x\n", hr); + ok(hr == S_OK, "Got 0x%08lx\n", hr);
tmp = 0; for(i = 0; styles[i] != 0; i++) { hr = INameSpaceTreeControl2_SetControlStyle(pnstc2, styles[i], styles[i]); - ok(hr == S_OK, "Got 0x%08x (%x)\n", hr, styles[i]); + ok(hr == S_OK, "Got 0x%08lx (%lx)\n", hr, styles[i]); if(SUCCEEDED(hr)) tmp |= styles[i]; }
hr = INameSpaceTreeControl2_GetControlStyle(pnstc2, 0xFFFFFFFF, &style); - ok(hr == S_OK, "Got 0x%08x\n", hr); - ok(style == tmp, "Got style %x (expected %x)\n", style, tmp); + ok(hr == S_OK, "Got 0x%08lx\n", hr); + ok(style == tmp, "Got style %lx (expected %lx)\n", style, tmp); if(SUCCEEDED(hr)) { NSTCSTYLE tmp2; for(i = 0; styles[i] != 0; i++) { hr = INameSpaceTreeControl2_GetControlStyle(pnstc2, styles[i], &tmp2); - ok(hr == S_OK, "Got 0x%08x\n", hr); - ok(tmp2 == (style & styles[i]), "Got %x\n", tmp2); + ok(hr == S_OK, "Got 0x%08lx\n", hr); + ok(tmp2 == (style & styles[i]), "Got %lx\n", tmp2); } }
for(i = 0; styles[i] != 0; i++) { hr = INameSpaceTreeControl2_SetControlStyle(pnstc2, styles[i], 0); - ok(hr == S_OK, "Got 0x%08x (%x)\n", hr, styles[i]); + ok(hr == S_OK, "Got 0x%08lx (%lx)\n", hr, styles[i]); } hr = INameSpaceTreeControl2_GetControlStyle(pnstc2, 0xFFFFFFFF, &style); - ok(hr == S_OK, "Got 0x%08x\n", hr); - ok(style == 0, "Got style %x\n", style); + ok(hr == S_OK, "Got 0x%08lx\n", hr); + ok(style == 0, "Got style %lx\n", style);
/* Set/GetControlStyle2 */ hr = INameSpaceTreeControl2_GetControlStyle2(pnstc2, 0xFFFFFFFF, &style2); - ok(hr == S_OK, "Got 0x%08x\n", hr); + ok(hr == S_OK, "Got 0x%08lx\n", hr); ok(style2 == 0, "Got style %x\n", style2);
hr = INameSpaceTreeControl2_SetControlStyle2(pnstc2, 0, 0); - ok(hr == S_OK, "Got 0x%08x\n", hr); + ok(hr == S_OK, "Got 0x%08lx\n", hr); hr = INameSpaceTreeControl2_SetControlStyle2(pnstc2, 0, 0xFFFFFFFF); - ok(hr == S_OK, "Got 0x%08x\n", hr); + ok(hr == S_OK, "Got 0x%08lx\n", hr);
hr = INameSpaceTreeControl2_SetControlStyle2(pnstc2, 0xFFFFFFFF, 0); - ok(hr == S_OK, "Got 0x%08x\n", hr); + ok(hr == S_OK, "Got 0x%08lx\n", hr); hr = INameSpaceTreeControl2_SetControlStyle2(pnstc2, 0xFFFFFFFF, 0xFFFFFFFF); - ok(hr == S_OK, "Got 0x%08x\n", hr); + ok(hr == S_OK, "Got 0x%08lx\n", hr);
hr = INameSpaceTreeControl2_SetControlStyle2(pnstc2, 0xFFFFFFFF, 0); - ok(hr == S_OK, "Got 0x%08x\n", hr); + ok(hr == S_OK, "Got 0x%08lx\n", hr); hr = INameSpaceTreeControl2_GetControlStyle2(pnstc2, 0xFFFFFFFF, &style2); - ok(hr == S_OK, "Got 0x%08x\n", hr); + ok(hr == S_OK, "Got 0x%08lx\n", hr); ok(style2 == 0x00000000, "Got style %x\n", style2);
hr = INameSpaceTreeControl2_GetControlStyle2(pnstc2, 0xFFFF, &style2); - ok(hr == S_OK, "Got 0x%08x\n", hr); + ok(hr == S_OK, "Got 0x%08lx\n", hr); ok(style2 == 0, "Got style %x\n", style2);
tmp = 0; for(i = 0; styles2[i] != 0; i++) { hr = INameSpaceTreeControl2_SetControlStyle2(pnstc2, styles2[i], styles2[i]); - ok(hr == S_OK, "Got 0x%08x (%x)\n", hr, styles2[i]); + ok(hr == S_OK, "Got 0x%08lx (%x)\n", hr, styles2[i]); if(SUCCEEDED(hr)) tmp |= styles2[i]; }
hr = INameSpaceTreeControl2_GetControlStyle2(pnstc2, 0xFFFF, &style2); - ok(hr == S_OK, "Got 0x%08x\n", hr); - ok(style2 == tmp, "Got style %x (expected %x)\n", style2, tmp); + ok(hr == S_OK, "Got 0x%08lx\n", hr); + ok(style2 == tmp, "Got style %x (expected %lx)\n", style2, tmp); if(SUCCEEDED(hr)) { NSTCSTYLE2 tmp2; for(i = 0; styles2[i] != 0; i++) { hr = INameSpaceTreeControl2_GetControlStyle2(pnstc2, styles2[i], &tmp2); - ok(hr == S_OK, "Got 0x%08x\n", hr); + ok(hr == S_OK, "Got 0x%08lx\n", hr); ok(tmp2 == (style2 & styles2[i]), "Got %x\n", tmp2); } } @@ -978,10 +978,10 @@ static void test_basics(void) for(i = 0; styles2[i] != 0; i++) { hr = INameSpaceTreeControl2_SetControlStyle2(pnstc2, styles2[i], 0); - ok(hr == S_OK, "Got 0x%08x (%x)\n", hr, styles2[i]); + ok(hr == S_OK, "Got 0x%08lx (%x)\n", hr, styles2[i]); } hr = INameSpaceTreeControl2_GetControlStyle2(pnstc2, 0xFFFF, &style2); - ok(hr == S_OK, "Got 0x%08x\n", hr); + ok(hr == S_OK, "Got 0x%08lx\n", hr); ok(style2 == 0, "Got style %x (expected 0)\n", style2); } else @@ -1007,11 +1007,11 @@ static void test_basics(void)
style = 0xdeadbeef; hr = INameSpaceTreeControl2_GetControlStyle(pnstc2, 0xFFFFFFFF, &style); - ok(hr == S_OK, "Got 0x%08x\n", hr); - ok(style == 0xdeadbeef, "Got style %x\n", style); + ok(hr == S_OK, "Got 0x%08lx\n", hr); + ok(style == 0xdeadbeef, "Got style %lx\n", style);
hr = INameSpaceTreeControl2_GetControlStyle2(pnstc2, 0xFFFFFFFF, &style2); - ok(hr == S_OK, "Got 0x%08x\n", hr); + ok(hr == S_OK, "Got 0x%08lx\n", hr); ok(style2 == 0, "Got style %x\n", style2);
tmp = 0; @@ -1019,26 +1019,26 @@ static void test_basics(void) { hr = INameSpaceTreeControl2_SetControlStyle(pnstc2, styles[i], styles[i]); ok(hr == E_FAIL || ((styles[i] & NSTCS_SPRINGEXPAND) && hr == S_OK), - "Got 0x%08x (%x)\n", hr, styles[i]); + "Got 0x%08lx (%lx)\n", hr, styles[i]); if(SUCCEEDED(hr)) tmp |= styles[i]; }
style = 0xdeadbeef; hr = INameSpaceTreeControl2_GetControlStyle(pnstc2, tmp, &style); - ok(hr == S_OK, "Got 0x%08x\n", hr); - ok(style == 0xdeadbeef, "Got style %x\n", style); + ok(hr == S_OK, "Got 0x%08lx\n", hr); + ok(style == 0xdeadbeef, "Got style %lx\n", style);
tmp = 0; for(i = 0; styles2[i] != 0; i++) { hr = INameSpaceTreeControl2_SetControlStyle2(pnstc2, styles2[i], styles2[i]); - ok(hr == S_OK, "Got 0x%08x (%x)\n", hr, styles2[i]); + ok(hr == S_OK, "Got 0x%08lx (%x)\n", hr, styles2[i]); if(SUCCEEDED(hr)) tmp |= styles2[i]; }
style2 = 0xdeadbeef; hr = INameSpaceTreeControl2_GetControlStyle2(pnstc2, 0xFFFFFFFF, &style2); - ok(hr == S_OK, "Got 0x%08x\n", hr); + ok(hr == S_OK, "Got 0x%08lx\n", hr); ok(style2 == tmp, "Got style %x\n", style2);
} @@ -1051,7 +1051,7 @@ static void test_basics(void) }
hr = INameSpaceTreeControl_RemoveRoot(pnstc, NULL); - ok(hr == E_NOINTERFACE, "Got (0x%08x)\n", hr); + ok(hr == E_NOINTERFACE, "Got (0x%08lx)\n", hr);
/* Append / Insert root */ if(0) @@ -1063,43 +1063,43 @@ static void test_basics(void)
/* Note the usage of psidesktop and psidesktop2 */ hr = INameSpaceTreeControl_AppendRoot(pnstc, psidesktop, SHCONTF_FOLDERS, 0, NULL); - ok(hr == S_OK, "Got (0x%08x)\n", hr); + ok(hr == S_OK, "Got (0x%08lx)\n", hr); hr = INameSpaceTreeControl_AppendRoot(pnstc, psidesktop, SHCONTF_FOLDERS, 0, NULL); - ok(hr == S_OK, "Got (0x%08x)\n", hr); + ok(hr == S_OK, "Got (0x%08lx)\n", hr); hr = INameSpaceTreeControl_AppendRoot(pnstc, psidesktop2, SHCONTF_FOLDERS, 0, NULL); - ok(hr == S_OK, "Got (0x%08x)\n", hr); + ok(hr == S_OK, "Got (0x%08lx)\n", hr); process_msgs();
hr = INameSpaceTreeControl_RemoveRoot(pnstc, psidesktop); - ok(hr == S_OK, "Got (0x%08x)\n", hr); + ok(hr == S_OK, "Got (0x%08lx)\n", hr); hr = INameSpaceTreeControl_RemoveRoot(pnstc, psidesktop); - ok(hr == S_OK, "Got (0x%08x)\n", hr); + ok(hr == S_OK, "Got (0x%08lx)\n", hr); hr = INameSpaceTreeControl_RemoveRoot(pnstc, psidesktop); - ok(hr == S_OK, "Got (0x%08x)\n", hr); + ok(hr == S_OK, "Got (0x%08lx)\n", hr);
hr = INameSpaceTreeControl_RemoveRoot(pnstc, psidesktop); - ok(hr == E_FAIL, "Got (0x%08x)\n", hr); + ok(hr == E_FAIL, "Got (0x%08lx)\n", hr); hr = INameSpaceTreeControl_RemoveAllRoots(pnstc); - ok(hr == E_INVALIDARG, "Got (0x%08x)\n", hr); + ok(hr == E_INVALIDARG, "Got (0x%08lx)\n", hr);
hr = INameSpaceTreeControl_AppendRoot(pnstc, psidesktop, SHCONTF_FOLDERS, 0, NULL); - ok(hr == S_OK, "Got (0x%08x)\n", hr); + ok(hr == S_OK, "Got (0x%08lx)\n", hr); hr = INameSpaceTreeControl_RemoveAllRoots(pnstc); - ok(hr == S_OK, "Got (0x%08x)\n", hr); + ok(hr == S_OK, "Got (0x%08lx)\n", hr);
hr = INameSpaceTreeControl_InsertRoot(pnstc, 0, psidesktop, SHCONTF_FOLDERS, 0, NULL); - ok(hr == S_OK, "Got (0x%08x)\n", hr); + ok(hr == S_OK, "Got (0x%08lx)\n", hr); hr = INameSpaceTreeControl_InsertRoot(pnstc, -1, psidesktop, SHCONTF_FOLDERS, 0, NULL); - ok(hr == S_OK, "Got (0x%08x)\n", hr); + ok(hr == S_OK, "Got (0x%08lx)\n", hr); hr = INameSpaceTreeControl_InsertRoot(pnstc, -1, psidesktop, SHCONTF_FOLDERS, 0, NULL); - ok(hr == S_OK, "Got (0x%08x)\n", hr); + ok(hr == S_OK, "Got (0x%08lx)\n", hr); hr = INameSpaceTreeControl_InsertRoot(pnstc, 50, psidesktop, SHCONTF_FOLDERS, 0, NULL); - ok(hr == S_OK, "Got (0x%08x)\n", hr); + ok(hr == S_OK, "Got (0x%08lx)\n", hr); hr = INameSpaceTreeControl_InsertRoot(pnstc, 1, psidesktop, SHCONTF_FOLDERS, 0, NULL); - ok(hr == S_OK, "Got (0x%08x)\n", hr); + ok(hr == S_OK, "Got (0x%08lx)\n", hr);
hr = INameSpaceTreeControl_RemoveAllRoots(pnstc); - ok(hr == S_OK, "Got (0x%08x)\n", hr); + ok(hr == S_OK, "Got (0x%08lx)\n", hr);
/* GetRootItems */ if(0) @@ -1109,16 +1109,16 @@ static void test_basics(void) }
hr = INameSpaceTreeControl_GetRootItems(pnstc, &psia); - ok(hr == E_INVALIDARG, "Got (0x%08x)\n", hr); + ok(hr == E_INVALIDARG, "Got (0x%08lx)\n", hr);
hr = INameSpaceTreeControl_AppendRoot(pnstc, psidesktop, 0, 0, NULL); - ok(hr == S_OK, "Got 0x%08x\n", hr); + ok(hr == S_OK, "Got 0x%08lx\n", hr); hr = INameSpaceTreeControl_AppendRoot(pnstc, psidesktop2, 0, 0, NULL); - ok(hr == S_OK, "Got 0x%08x\n", hr); + ok(hr == S_OK, "Got 0x%08lx\n", hr); hr = INameSpaceTreeControl_AppendRoot(pnstc, psitestdir, 0, 0, NULL); - ok(hr == S_OK, "Got 0x%08x\n", hr); + ok(hr == S_OK, "Got 0x%08lx\n", hr); hr = INameSpaceTreeControl_AppendRoot(pnstc, psitestdir2, 0, 0, NULL); - ok(hr == S_OK, "Got 0x%08x\n", hr); + ok(hr == S_OK, "Got 0x%08lx\n", hr);
roots[0] = psidesktop; roots[1] = psidesktop2; @@ -1128,7 +1128,7 @@ static void test_basics(void) verify_root_order(pnstc, roots);
hr = INameSpaceTreeControl_InsertRoot(pnstc, 0, psitestdir2, 0, 0, NULL); - ok(hr == S_OK, "Got 0x%08x\n", hr); + ok(hr == S_OK, "Got 0x%08lx\n", hr);
roots[0] = psitestdir2; roots[1] = psidesktop; @@ -1139,7 +1139,7 @@ static void test_basics(void) verify_root_order(pnstc, roots);
hr = INameSpaceTreeControl_InsertRoot(pnstc, 5, psidesktop, 0, 0, NULL); - ok(hr == S_OK, "Got 0x%08x\n", hr); + ok(hr == S_OK, "Got 0x%08lx\n", hr);
roots[0] = psitestdir2; roots[1] = psidesktop; @@ -1151,7 +1151,7 @@ static void test_basics(void) verify_root_order(pnstc, roots);
hr = INameSpaceTreeControl_InsertRoot(pnstc, 3, psitestdir2, 0, 0, NULL); - ok(hr == S_OK, "Got 0x%08x\n", hr); + ok(hr == S_OK, "Got 0x%08lx\n", hr);
roots[0] = psitestdir2; roots[1] = psidesktop; @@ -1164,7 +1164,7 @@ static void test_basics(void) verify_root_order(pnstc, roots);
hr = INameSpaceTreeControl_AppendRoot(pnstc, psitestdir2, 0, 0, NULL); - ok(hr == S_OK, "Got 0x%08x\n", hr); + ok(hr == S_OK, "Got 0x%08lx\n", hr);
roots[0] = psitestdir2; roots[1] = psidesktop; @@ -1178,7 +1178,7 @@ static void test_basics(void) verify_root_order(pnstc, roots);
hr = INameSpaceTreeControl_InsertRoot(pnstc, -1, psidesktop, 0, 0, NULL); - ok(hr == S_OK, "Got 0x%08x\n", hr); + ok(hr == S_OK, "Got 0x%08lx\n", hr);
roots[0] = psidesktop; roots[1] = psitestdir2; @@ -1194,13 +1194,13 @@ static void test_basics(void)
/* CollapseAll */ hr = INameSpaceTreeControl_CollapseAll(pnstc); - ok(hr == S_OK, "Got 0x%08x\n", hr); + ok(hr == S_OK, "Got 0x%08lx\n", hr);
hr = INameSpaceTreeControl_RemoveAllRoots(pnstc); - ok(hr == S_OK, "Got (0x%08x)\n", hr); + ok(hr == S_OK, "Got (0x%08lx)\n", hr);
hr = INameSpaceTreeControl_CollapseAll(pnstc); - ok(hr == S_OK, "Got 0x%08x\n", hr); + ok(hr == S_OK, "Got 0x%08lx\n", hr);
/* SetItemState message checks */ res = subclass_treeview(pnstc); @@ -1211,7 +1211,7 @@ static void test_basics(void)
hr = INameSpaceTreeControl_AppendRoot( pnstc, psidesktop, SHCONTF_NONFOLDERS | SHCONTF_FOLDERS, 0, NULL); - ok(hr == S_OK, "Got (0x%08x)\n", hr); + ok(hr == S_OK, "Got (0x%08lx)\n", hr); flush_sequences(sequences, NUM_MSG_SEQUENCES);
/* A special case - @@ -1221,7 +1221,7 @@ static void test_basics(void) tvi_count = 0; hr = INameSpaceTreeControl_SetItemState(pnstc, psidesktop, NSTCIS_EXPANDED, NSTCIS_EXPANDED); - ok(hr == S_OK, "Got 0x%08x\n", hr); + ok(hr == S_OK, "Got 0x%08lx\n", hr); todo_wine { ok(tvi_count == 1, "Got %d\n", tvi_count); @@ -1231,7 +1231,7 @@ static void test_basics(void) tvi_count = 0; hr = INameSpaceTreeControl_SetItemState(pnstc, psidesktop, NSTCIS_EXPANDED, NSTCIS_EXPANDED); - ok(hr == S_OK, "Got 0x%08x\n", hr); + ok(hr == S_OK, "Got 0x%08lx\n", hr); ok(tvi_count == 0, "Got %d\n", tvi_count);
/* Test all the combinations of NSTCIS_SELECTED to NSTCIS_SELECTEDNOEXPAND */ @@ -1248,7 +1248,7 @@ static void test_basics(void) tvi_count = 0;
hr = INameSpaceTreeControl_SetItemState(pnstc, psidesktop, isMask, isFlags); - ok(hr == S_OK, "(%x|%x)Got 0x%08x\n", isMask, isFlags, hr); + ok(hr == S_OK, "(%x|%x)Got 0x%08lx\n", isMask, isFlags, hr);
/*****************************/ /* Calculate expected values */ @@ -1341,7 +1341,7 @@ static void test_basics(void) } } hr = INameSpaceTreeControl_RemoveAllRoots(pnstc); - ok(hr == S_OK, "Got (0x%08x)\n", hr); + ok(hr == S_OK, "Got (0x%08lx)\n", hr); }
/* GetSelectedItems */ @@ -1353,38 +1353,38 @@ static void test_basics(void)
psia = (void*)0xdeadbeef; hr = INameSpaceTreeControl_GetSelectedItems(pnstc, &psia); - ok(hr == E_FAIL, "Got 0x%08x\n", hr); + ok(hr == E_FAIL, "Got 0x%08lx\n", hr); ok(!psia || broken(psia == (void*)0xdeadbeef /* before Win8 */), "Got %p\n", psia);
hr = INameSpaceTreeControl_AppendRoot(pnstc, psitestdir2, SHCONTF_FOLDERS, 0, NULL); - ok(hr == S_OK, "Got (0x%08x)\n", hr); + ok(hr == S_OK, "Got (0x%08lx)\n", hr); process_msgs();
hr = INameSpaceTreeControl_AppendRoot(pnstc, psitestdir, SHCONTF_FOLDERS, 0, NULL); - ok(hr == S_OK, "Got (0x%08x)\n", hr); + ok(hr == S_OK, "Got (0x%08lx)\n", hr); process_msgs();
hr = INameSpaceTreeControl_SetItemState(pnstc, psitestdir, NSTCIS_SELECTED, NSTCIS_SELECTED); - ok(hr == S_OK, "Got 0x%08x\n", hr); + ok(hr == S_OK, "Got 0x%08lx\n", hr);
hr = INameSpaceTreeControl_GetSelectedItems(pnstc, &psia); - ok(hr == S_OK, "Got 0x%08x\n", hr); + ok(hr == S_OK, "Got 0x%08lx\n", hr); if(SUCCEEDED(hr)) { DWORD count; hr = IShellItemArray_GetCount(psia, &count); - ok(hr == S_OK, "Got 0x%08x\n", hr); - ok(count == 1, "Got %d selected items.\n", count); + ok(hr == S_OK, "Got 0x%08lx\n", hr); + ok(count == 1, "Got %ld selected items.\n", count); if(count) { hr = IShellItemArray_GetItemAt(psia, 0, &psi); - ok(hr == S_OK, "Got 0x%08x\n", hr); + ok(hr == S_OK, "Got 0x%08lx\n", hr); if(SUCCEEDED(hr)) { int cmp; hr = IShellItem_Compare(psi, psitestdir, SICHINT_DISPLAY, &cmp); - ok(hr == S_OK, "Got 0x%08x\n", hr); + ok(hr == S_OK, "Got 0x%08lx\n", hr); IShellItem_Release(psi); } } @@ -1393,26 +1393,26 @@ static void test_basics(void)
hr = INameSpaceTreeControl_SetItemState(pnstc, psitestdir2, NSTCIS_SELECTED, NSTCIS_SELECTED); - ok(hr == S_OK, "Got 0x%08x\n", hr); + ok(hr == S_OK, "Got 0x%08lx\n", hr); process_msgs();
hr = INameSpaceTreeControl_GetSelectedItems(pnstc, &psia); - ok(hr == S_OK, "Got 0x%08x\n", hr); + ok(hr == S_OK, "Got 0x%08lx\n", hr); if(SUCCEEDED(hr)) { DWORD count; hr = IShellItemArray_GetCount(psia, &count); - ok(hr == S_OK, "Got 0x%08x\n", hr); - ok(count == 1, "Got %d selected items.\n", count); + ok(hr == S_OK, "Got 0x%08lx\n", hr); + ok(count == 1, "Got %ld selected items.\n", count); if(count) { hr = IShellItemArray_GetItemAt(psia, 0, &psi); - ok(hr == S_OK, "Got 0x%08x\n", hr); + ok(hr == S_OK, "Got 0x%08lx\n", hr); if(SUCCEEDED(hr)) { int cmp; hr = IShellItem_Compare(psi, psitestdir2, SICHINT_DISPLAY, &cmp); - ok(hr == S_OK, "Got 0x%08x\n", hr); + ok(hr == S_OK, "Got 0x%08lx\n", hr); IShellItem_Release(psi); } } @@ -1421,24 +1421,24 @@ static void test_basics(void)
hr = INameSpaceTreeControl_SetItemState(pnstc, psitest1, NSTCIS_SELECTED, NSTCIS_SELECTED); - todo_wine ok(hr == S_OK, "Got 0x%08x\n", hr); + todo_wine ok(hr == S_OK, "Got 0x%08lx\n", hr); hr = INameSpaceTreeControl_GetSelectedItems(pnstc, &psia); - ok(hr == S_OK, "Got 0x%08x\n", hr); + ok(hr == S_OK, "Got 0x%08lx\n", hr); if(SUCCEEDED(hr)) { DWORD count; hr = IShellItemArray_GetCount(psia, &count); - ok(hr == S_OK, "Got 0x%08x\n", hr); - ok(count == 1, "Got %d selected items.\n", count); + ok(hr == S_OK, "Got 0x%08lx\n", hr); + ok(count == 1, "Got %ld selected items.\n", count); if(count) { hr = IShellItemArray_GetItemAt(psia, 0, &psi); - ok(hr == S_OK, "Got 0x%08x\n", hr); + ok(hr == S_OK, "Got 0x%08lx\n", hr); if(SUCCEEDED(hr)) { int cmp; hr = IShellItem_Compare(psi, psitest1, SICHINT_DISPLAY, &cmp); - todo_wine ok(hr == S_OK, "Got 0x%08x\n", hr); + todo_wine ok(hr == S_OK, "Got 0x%08lx\n", hr); IShellItem_Release(psi); } } @@ -1446,44 +1446,44 @@ static void test_basics(void) }
hr = INameSpaceTreeControl_RemoveAllRoots(pnstc); - ok(hr == S_OK || broken(hr == E_FAIL), "Got 0x%08x\n", hr); + ok(hr == S_OK || broken(hr == E_FAIL), "Got 0x%08lx\n", hr); if(hr == E_FAIL) { /* For some reason, Vista fails to properly remove both the * roots here on the first try. */ hr = INameSpaceTreeControl_RemoveAllRoots(pnstc); - ok(hr == S_OK, "Got 0x%08x\n", hr); + ok(hr == S_OK, "Got 0x%08lx\n", hr); }
/* Adding without NSTCRS_EXPANDED does not set the selection */ hr = INameSpaceTreeControl_AppendRoot(pnstc, psitestdir, SHCONTF_FOLDERS | SHCONTF_NONFOLDERS, 0, NULL); - ok(hr == S_OK, "Got 0x%08x\n", hr); + ok(hr == S_OK, "Got 0x%08lx\n", hr); process_msgs();
hr = INameSpaceTreeControl_GetItemState(pnstc, psitestdir, 0xFF, &istate); - ok(hr == S_OK, "Got 0x%08x\n", hr); - ok(!(istate & NSTCIS_SELECTED), "Got 0x%08x\n", istate); + ok(hr == S_OK, "Got 0x%08lx\n", hr); + ok(!(istate & NSTCIS_SELECTED), "Got 0x%08lx\n", istate); hr = INameSpaceTreeControl_GetSelectedItems(pnstc, &psia); - ok(hr == E_FAIL, "Got 0x%08x\n", hr); + ok(hr == E_FAIL, "Got 0x%08lx\n", hr); if(SUCCEEDED(hr)) IShellItemArray_Release(psia);
hr = INameSpaceTreeControl_RemoveAllRoots(pnstc); - ok(hr == S_OK, "Got 0x%08x\n", hr); + ok(hr == S_OK, "Got 0x%08lx\n", hr);
/* Adding with NSTCRS_EXPANDED sets the selection */ hr = INameSpaceTreeControl_AppendRoot(pnstc, psitestdir, SHCONTF_FOLDERS | SHCONTF_NONFOLDERS, NSTCRS_EXPANDED, NULL); - ok(hr == S_OK, "Got 0x%08x\n", hr); + ok(hr == S_OK, "Got 0x%08lx\n", hr); process_msgs();
hr = INameSpaceTreeControl_GetItemState(pnstc, psitestdir, 0xFF, &istate); - ok(hr == S_OK, "Got 0x%08x\n", hr); - todo_wine ok(istate & NSTCIS_SELECTED, "Got 0x%08x\n", istate); + ok(hr == S_OK, "Got 0x%08lx\n", hr); + todo_wine ok(istate & NSTCIS_SELECTED, "Got 0x%08lx\n", istate); hr = INameSpaceTreeControl_GetSelectedItems(pnstc, &psia); - todo_wine ok(hr == S_OK, "Got 0x%08x\n", hr); + todo_wine ok(hr == S_OK, "Got 0x%08lx\n", hr); if(SUCCEEDED(hr)) { IShellItem *psi; @@ -1493,7 +1493,7 @@ static void test_basics(void) { INT cmp; hr = IShellItem_Compare(psi, psitestdir, SICHINT_DISPLAY, &cmp); - ok(hr == S_OK, "Got 0x%08x\n", hr); + ok(hr == S_OK, "Got 0x%08lx\n", hr);
IShellItem_Release(psi); } @@ -1505,14 +1505,14 @@ static void test_basics(void) hr = INameSpaceTreeControl_AppendRoot(pnstc, psitestdir2, SHCONTF_FOLDERS | SHCONTF_NONFOLDERS, NSTCRS_EXPANDED, NULL); - ok(hr == S_OK, "Got 0x%08x\n", hr); + ok(hr == S_OK, "Got 0x%08lx\n", hr); process_msgs();
hr = INameSpaceTreeControl_GetItemState(pnstc, psitestdir2, 0xFF, &istate); - ok(hr == S_OK, "Got 0x%08x\n", hr); - ok(!(istate & NSTCIS_SELECTED), "Got 0x%08x\n", istate); + ok(hr == S_OK, "Got 0x%08lx\n", hr); + ok(!(istate & NSTCIS_SELECTED), "Got 0x%08lx\n", istate); hr = INameSpaceTreeControl_GetSelectedItems(pnstc, &psia); - todo_wine ok(hr == S_OK, "Got 0x%08x\n", hr); + todo_wine ok(hr == S_OK, "Got 0x%08lx\n", hr); if(SUCCEEDED(hr)) { IShellItem *psi; @@ -1522,7 +1522,7 @@ static void test_basics(void) { INT cmp; hr = IShellItem_Compare(psi, psitestdir, SICHINT_DISPLAY, &cmp); - ok(hr == S_OK, "Got 0x%08x\n", hr); + ok(hr == S_OK, "Got 0x%08lx\n", hr);
IShellItem_Release(psi); } @@ -1531,7 +1531,7 @@ static void test_basics(void) }
hr = INameSpaceTreeControl_RemoveAllRoots(pnstc); - ok(hr == S_OK, "Got (0x%08x)\n", hr); + ok(hr == S_OK, "Got (0x%08lx)\n", hr);
/* GetItemRect */ SetRectEmpty(&rc); @@ -1544,16 +1544,16 @@ static void test_basics(void) }
hr = INameSpaceTreeControl_GetItemRect(pnstc, psitestdir, &rc); - ok(hr == E_INVALIDARG, "Got 0x%08x\n", hr); + ok(hr == E_INVALIDARG, "Got 0x%08lx\n", hr);
hr = INameSpaceTreeControl_AppendRoot(pnstc, psitestdir, SHCONTF_FOLDERS | SHCONTF_NONFOLDERS, NSTCRS_EXPANDED, NULL); - ok(hr == S_OK, "Got 0x%08x\n", hr); + ok(hr == S_OK, "Got 0x%08lx\n", hr); process_msgs();
hr = INameSpaceTreeControl_GetItemRect(pnstc, psitestdir, &rc); - ok(hr == S_OK, "Got 0x%08x\n", hr); + ok(hr == S_OK, "Got 0x%08lx\n", hr); ok(rc.top != rc.bottom, "Got 0 height.\n"); ok(rc.left != rc.right, "Got 0 width.\n");
@@ -1587,90 +1587,90 @@ static void test_basics(void) win_skip("Skipping some GetItemRect tests.\n");
hr = INameSpaceTreeControl_RemoveAllRoots(pnstc); - ok(hr == S_OK, "Got (0x%08x)\n", hr); + ok(hr == S_OK, "Got (0x%08lx)\n", hr);
/* HitTest */ hr = INameSpaceTreeControl_HitTest(pnstc, NULL, NULL); - ok(hr == E_POINTER, "Got 0x%08x\n", hr); + ok(hr == E_POINTER, "Got 0x%08lx\n", hr); hr = INameSpaceTreeControl_HitTest(pnstc, &pt, NULL); - ok(hr == E_POINTER, "Got 0x%08x\n", hr); + ok(hr == E_POINTER, "Got 0x%08lx\n", hr); hr = INameSpaceTreeControl_HitTest(pnstc, NULL, &psi); - ok(hr == E_POINTER, "Got 0x%08x\n", hr); + ok(hr == E_POINTER, "Got 0x%08lx\n", hr);
psi = (void*)0xdeadbeef; pt.x = pt.y = 0; hr = INameSpaceTreeControl_HitTest(pnstc, &pt, &psi); - ok(hr == S_FALSE, "Got 0x%08x\n", hr); + ok(hr == S_FALSE, "Got 0x%08lx\n", hr); ok(psi == NULL, "Got psi %p\n", psi);
hr = INameSpaceTreeControl_AppendRoot(pnstc, psitestdir, SHCONTF_FOLDERS | SHCONTF_NONFOLDERS, NSTCRS_EXPANDED, NULL); - ok(hr == S_OK, "Got 0x%08x\n", hr); + ok(hr == S_OK, "Got 0x%08lx\n", hr); process_msgs();
hr = INameSpaceTreeControl_HitTest(pnstc, &pt, &psi); - ok(hr == S_OK, "Got 0x%08x\n", hr); + ok(hr == S_OK, "Got 0x%08lx\n", hr); if(SUCCEEDED(hr)) { int cmp; hr = IShellItem_Compare(psi, psitestdir, SICHINT_DISPLAY, &cmp); - ok(hr == S_OK, "Got 0x%08x\n", hr); + ok(hr == S_OK, "Got 0x%08lx\n", hr); ok(!cmp, "Got cmp %d\n", cmp); IShellItem_Release(psi); }
pt.y += height - 1; hr = INameSpaceTreeControl_HitTest(pnstc, &pt, &psi); - ok(hr == S_OK, "Got 0x%08x\n", hr); + ok(hr == S_OK, "Got 0x%08lx\n", hr); if(SUCCEEDED(hr)) { int cmp; hr = IShellItem_Compare(psi, psitestdir, SICHINT_DISPLAY, &cmp); - ok(hr == S_OK, "Got 0x%08x\n", hr); + ok(hr == S_OK, "Got 0x%08lx\n", hr); ok(!cmp, "Got cmp %d\n", cmp); IShellItem_Release(psi); }
pt.y += 1; hr = INameSpaceTreeControl_HitTest(pnstc, &pt, &psi); - ok(hr == S_OK, "Got 0x%08x\n", hr); + ok(hr == S_OK, "Got 0x%08lx\n", hr); if(SUCCEEDED(hr)) { int cmp; todo_wine { hr = IShellItem_Compare(psi, psitestdir, SICHINT_DISPLAY, &cmp); - ok(hr == S_FALSE, "Got 0x%08x\n", hr); + ok(hr == S_FALSE, "Got 0x%08lx\n", hr); ok(cmp, "no cmp value.\n"); hr = IShellItem_Compare(psi, psitestdir2, SICHINT_DISPLAY, &cmp); - ok(hr == S_OK, "Got 0x%08x\n", hr); + ok(hr == S_OK, "Got 0x%08lx\n", hr); ok(!cmp, "Got cmp %d\n", cmp); } IShellItem_Release(psi); }
hr = INameSpaceTreeControl_GetItemRect(pnstc, psitestdir2, &rc); - ok(hr == S_OK, "Got 0x%08x\n", hr); + ok(hr == S_OK, "Got 0x%08lx\n", hr); if(SUCCEEDED(hr)) { MapWindowPoints(NULL, hwnd, (POINT*)&rc, 2); pt.x = rc.left; pt.y = rc.top;
hr = INameSpaceTreeControl_HitTest(pnstc, &pt, &psi); - ok(hr == S_OK, "Got 0x%08x\n", hr); + ok(hr == S_OK, "Got 0x%08lx\n", hr); if(SUCCEEDED(hr)) { int cmp; hr = IShellItem_Compare(psi, psitestdir2, SICHINT_DISPLAY, &cmp); - ok(hr == S_OK, "Got 0x%08x\n", hr); + ok(hr == S_OK, "Got 0x%08lx\n", hr); ok(!cmp, "Got cmp %d\n", cmp); IShellItem_Release(psi); } }
hr = INameSpaceTreeControl_RemoveAllRoots(pnstc); - ok(hr == S_OK, "Got 0x%08x\n", hr); + ok(hr == S_OK, "Got 0x%08lx\n", hr);
/* GetItemCustomState / SetItemCustomState */ if(0) @@ -1686,30 +1686,30 @@ static void test_basics(void) SHCONTF_FOLDERS | SHCONTF_NONFOLDERS, 0, NULL); process_msgs(); - ok(hr == S_OK, "Got 0x%08x\n", hr); + ok(hr == S_OK, "Got 0x%08lx\n", hr);
todo_wine { cbstate = -1; hr = INameSpaceTreeControl_GetItemCustomState(pnstc, psitestdir, &cbstate); - ok(hr == S_OK, "Got 0x%08x\n", hr); + ok(hr == S_OK, "Got 0x%08lx\n", hr); ok(cbstate == BST_UNCHECKED || broken(cbstate == BST_CHECKED /* Vista x64 */), "Got %d\n", cbstate);
hr = INameSpaceTreeControl_SetItemCustomState(pnstc, psitestdir, BST_CHECKED); - ok(hr == S_OK, "Got 0x%08x\n", hr); + ok(hr == S_OK, "Got 0x%08lx\n", hr);
cbstate = -1; hr = INameSpaceTreeControl_GetItemCustomState(pnstc, psitestdir, &cbstate); - ok(hr == S_OK, "Got 0x%08x\n", hr); + ok(hr == S_OK, "Got 0x%08lx\n", hr); ok(cbstate == BST_CHECKED, "Got %d\n", cbstate);
hr = INameSpaceTreeControl_SetItemCustomState(pnstc, psitestdir, 0xFFF); - ok(hr == S_OK, "Got 0x%08x\n", hr); + ok(hr == S_OK, "Got 0x%08lx\n", hr);
cbstate = -1; hr = INameSpaceTreeControl_GetItemCustomState(pnstc, psitestdir, &cbstate); - ok(hr == S_OK, "Got 0x%08x\n", hr); + ok(hr == S_OK, "Got 0x%08lx\n", hr); ok(cbstate == 0xF, "Got %d\n", cbstate); }
@@ -1717,15 +1717,15 @@ static void test_basics(void) todo_wine { hr = INameSpaceTreeControl_SetTheme(pnstc, NULL); - ok(hr == S_OK, "Got 0x%08x\n", hr); + ok(hr == S_OK, "Got 0x%08lx\n", hr); hr = INameSpaceTreeControl_SetTheme(pnstc, L"Explorer"); - ok(hr == S_OK, "Got 0x%08x\n", hr); + ok(hr == S_OK, "Got 0x%08lx\n", hr); hr = INameSpaceTreeControl_SetTheme(pnstc, L"__hello"); - ok(hr == S_OK, "Got 0x%08x\n", hr); + ok(hr == S_OK, "Got 0x%08lx\n", hr); }
hr = INameSpaceTreeControl_RemoveAllRoots(pnstc); - ok(hr == S_OK, "Got (0x%08x)\n", hr); + ok(hr == S_OK, "Got (0x%08lx)\n", hr);
IShellItem_Release(psidesktop); IShellItem_Release(psidesktop2); @@ -1734,12 +1734,12 @@ static void test_basics(void) IShellItem_Release(psitest1);
hr = INameSpaceTreeControl_QueryInterface(pnstc, &IID_IOleWindow, (void**)&pow); - ok(hr == S_OK, "Got 0x%08x\n", hr); + ok(hr == S_OK, "Got 0x%08lx\n", hr); if(SUCCEEDED(hr)) { HWND hwnd_nstc; hr = IOleWindow_GetWindow(pow, &hwnd_nstc); - ok(hr == S_OK, "Got 0x%08x\n", hr); + ok(hr == S_OK, "Got 0x%08lx\n", hr); DestroyWindow(hwnd_nstc); IOleWindow_Release(pow); } @@ -1770,7 +1770,7 @@ static void test_events(void)
hr = CoCreateInstance(&CLSID_NamespaceTreeControl, NULL, CLSCTX_INPROC_SERVER, &IID_INameSpaceTreeControl, (void**)&pnstc); - ok(hr == S_OK, "Failed to initialize control (0x%08x)\n", hr); + ok(hr == S_OK, "Failed to initialize control (0x%08lx)\n", hr);
ok(pSHCreateShellItem != NULL, "No SHCreateShellItem.\n"); ok(pSHGetIDListFromObject != NULL, "No SHCreateShellItem.\n"); @@ -1778,9 +1778,9 @@ static void test_events(void) SHGetDesktopFolder(&psfdesktop); hr = pSHGetIDListFromObject((IUnknown*)psfdesktop, &pidl_desktop); IShellFolder_Release(psfdesktop); - ok(hr == S_OK, "Got (0x%08x)\n", hr); + ok(hr == S_OK, "Got (0x%08lx)\n", hr); hr = pSHCreateShellItem(NULL, NULL, pidl_desktop, &psidesktop); - ok(hr == S_OK, "Got 0x%08x\n", hr); + ok(hr == S_OK, "Got 0x%08lx\n", hr); ILFree(pidl_desktop);
/* Create two instances of INameSpaceTreeControlEvents */ @@ -1807,80 +1807,80 @@ static void test_events(void) pnstceimpl->qi_called_count = 0; cookie1 = 1; hr = INameSpaceTreeControl_TreeAdvise(pnstc, (IUnknown*)pnstce, &cookie1); - ok(hr == E_FAIL, "Got (0x%08x)\n", hr); - ok(cookie1 == 0, "cookie now (0x%08x)\n", cookie1); + ok(hr == E_FAIL, "Got (0x%08lx)\n", hr); + ok(cookie1 == 0, "cookie now (0x%08lx)\n", cookie1); ok(pnstceimpl->qi_called_count > 1, "got %d\n", pnstceimpl->qi_called_count); - ok(pnstceimpl->ref == 1, "refcount was %d\n", pnstceimpl->ref); + ok(pnstceimpl->ref == 1, "refcount was %ld\n", pnstceimpl->ref);
/* Accept query for IID_INameSpaceTreeControlEvents */ pnstceimpl->qi_enable_events = TRUE; pnstceimpl->qi_called_count = 0; cookie1 = 0; hr = INameSpaceTreeControl_TreeAdvise(pnstc, (IUnknown*)pnstce, &cookie1); - ok(hr == S_OK, "Got (0x%08x)\n", hr); - ok(cookie1 == 1, "cookie now (0x%08x)\n", cookie1); + ok(hr == S_OK, "Got (0x%08lx)\n", hr); + ok(cookie1 == 1, "cookie now (0x%08lx)\n", cookie1); ok(pnstceimpl->qi_called_count > 1, "got %d\n", pnstceimpl->qi_called_count); - ok(pnstceimpl->ref == 2, "refcount was %d\n", pnstceimpl->ref); + ok(pnstceimpl->ref == 2, "refcount was %ld\n", pnstceimpl->ref);
/* A second time, query interface will not be called at all. */ pnstceimpl->qi_enable_events = TRUE; pnstceimpl->qi_called_count = 0; cookie2 = 1; hr = INameSpaceTreeControl_TreeAdvise(pnstc, (IUnknown*)pnstce, &cookie2); - ok(hr == E_FAIL, "Got (0x%08x)\n", hr); - ok(cookie2 == 0, "cookie now (0x%08x)\n", cookie2); + ok(hr == E_FAIL, "Got (0x%08lx)\n", hr); + ok(cookie2 == 0, "cookie now (0x%08lx)\n", cookie2); ok(!pnstceimpl->qi_called_count, "QueryInterface called %d times.\n", pnstceimpl->qi_called_count); - ok(pnstceimpl->ref == 2, "refcount was %d\n", pnstceimpl->ref); + ok(pnstceimpl->ref == 2, "refcount was %ld\n", pnstceimpl->ref);
/* Using another "instance" does not help. */ pnstceimpl2->qi_enable_events = TRUE; pnstceimpl2->qi_called_count = 0; cookie2 = 1; hr = INameSpaceTreeControl_TreeAdvise(pnstc, (IUnknown*)pnstce2, &cookie2); - ok(hr == E_FAIL, "Got (0x%08x)\n", hr); - ok(cookie2 == 0, "cookie now (0x%08x)\n", cookie2); + ok(hr == E_FAIL, "Got (0x%08lx)\n", hr); + ok(cookie2 == 0, "cookie now (0x%08lx)\n", cookie2); ok(!pnstceimpl2->qi_called_count, "QueryInterface called %d times.\n", pnstceimpl2->qi_called_count); - ok(pnstceimpl2->ref == 1, "refcount was %d\n", pnstceimpl->ref); + ok(pnstceimpl2->ref == 1, "refcount was %ld\n", pnstceimpl->ref);
/* Unadvise with bogus cookie (will actually unadvise properly) */ pnstceimpl->qi_enable_events = TRUE; pnstceimpl->qi_called_count = 0; hr = INameSpaceTreeControl_TreeUnadvise(pnstc, 1234); - ok(hr == S_OK, "Got (0x%08x)\n", hr); + ok(hr == S_OK, "Got (0x%08lx)\n", hr); ok(!pnstceimpl->qi_called_count, "QueryInterface called %d times.\n", pnstceimpl->qi_called_count); - ok(pnstceimpl->ref == 1, "refcount was %d\n", pnstceimpl->ref); + ok(pnstceimpl->ref == 1, "refcount was %ld\n", pnstceimpl->ref);
/* Unadvise "properly" (will have no additional effect) */ pnstceimpl->qi_enable_events = TRUE; pnstceimpl->qi_called_count = 0; hr = INameSpaceTreeControl_TreeUnadvise(pnstc, cookie1); - ok(hr == S_OK, "Got (0x%08x)\n", hr); + ok(hr == S_OK, "Got (0x%08lx)\n", hr); ok(!pnstceimpl->qi_called_count, "QueryInterface called %d times.\n", pnstceimpl->qi_called_count); - ok(pnstceimpl->ref == 1, "refcount was %d\n", pnstceimpl->ref); + ok(pnstceimpl->ref == 1, "refcount was %ld\n", pnstceimpl->ref);
/* Advise again.. */ pnstceimpl->qi_enable_events = 1; pnstceimpl->qi_called_count = 0; hr = INameSpaceTreeControl_TreeAdvise(pnstc, (IUnknown*)pnstce, &cookie2); - ok(hr == S_OK, "Got (0x%08x)\n", hr); - ok(cookie2 == 1, "Cookie is %d\n", cookie2); + ok(hr == S_OK, "Got (0x%08lx)\n", hr); + ok(cookie2 == 1, "Cookie is %ld\n", cookie2); ok(cookie1 == cookie2, "Old cookie differs from old cookie.\n"); /* several kinds of callbacks are queried for */ ok(pnstceimpl->qi_called_count > 1, "got %d\n", pnstceimpl->qi_called_count); - ok(pnstceimpl->ref == 2, "refcount was %d\n", pnstceimpl->ref); + ok(pnstceimpl->ref == 2, "refcount was %ld\n", pnstceimpl->ref);
/* Initialize the control */ hr = INameSpaceTreeControl_Initialize(pnstc, hwnd, NULL, 0); - ok(hr == S_OK, "Got (0x%08x)\n", hr); + ok(hr == S_OK, "Got (0x%08lx)\n", hr); ok_no_events(pnstceimpl);
hr = INameSpaceTreeControl_AppendRoot(pnstc, psidesktop, SHCONTF_FOLDERS | SHCONTF_NONFOLDERS, 0, NULL); - ok(hr == S_OK, "Got (0x%08x)\n", hr); + ok(hr == S_OK, "Got (0x%08lx)\n", hr); process_msgs(); ok_event_count_broken(pnstceimpl, OnItemAdded, 1, 0 /* Vista */); ok_event_count(pnstceimpl, OnGetDefaultIconIndex, 0); @@ -1946,27 +1946,27 @@ static void test_events(void)
hr = INameSpaceTreeControl_RemoveAllRoots(pnstc); process_msgs(); - ok(hr == S_OK, "Got 0x%08x\n", hr); + ok(hr == S_OK, "Got 0x%08lx\n", hr); ok_event(pnstceimpl, OnItemDeleted); ok_no_events(pnstceimpl);
hr = INameSpaceTreeControl_AppendRoot(pnstc, psidesktop, SHCONTF_FOLDERS | SHCONTF_NONFOLDERS, 0, NULL); - ok(hr == S_OK, "Got (0x%08x)\n", hr); + ok(hr == S_OK, "Got (0x%08lx)\n", hr); process_msgs(); ok_event_count_broken(pnstceimpl, OnItemAdded, 1, 0 /* Vista */); ok_no_events(pnstceimpl);
hr = INameSpaceTreeControl_GetItemState(pnstc, psidesktop, 0xffff, &itemstate); - ok(hr == S_OK, "Got (0x%08x)\n", hr); - ok(itemstate == NSTCIS_NONE, "itemstate is 0x%08x\n", itemstate); + ok(hr == S_OK, "Got (0x%08lx)\n", hr); + ok(itemstate == NSTCIS_NONE, "itemstate is 0x%08lx\n", itemstate); process_msgs(); ok_no_events(pnstceimpl);
/* Expand the root */ itemstate |= NSTCIS_EXPANDED; hr = INameSpaceTreeControl_SetItemState(pnstc, psidesktop, 0xffff, itemstate); - ok(hr == S_OK, "Got (0x%08x)\n", hr); + ok(hr == S_OK, "Got (0x%08lx)\n", hr); process_msgs(); ok_event_count(pnstceimpl, OnBeforeExpand, 1); ok_event_broken(pnstceimpl, OnItemAdded); /* Does not fire on Vista */ @@ -1978,13 +1978,13 @@ static void test_events(void) ok_no_events(pnstceimpl);
hr = INameSpaceTreeControl_GetItemState(pnstc, psidesktop, 0xffff, &itemstate); - ok(hr == S_OK, "Got (0x%08x)\n", hr); + ok(hr == S_OK, "Got (0x%08lx)\n", hr); ok(itemstate & NSTCIS_EXPANDED, "Item not expanded.\n"); todo_wine { ok(itemstate == (NSTCIS_SELECTED | NSTCIS_EXPANDED)|| broken(itemstate == NSTCIS_EXPANDED) /* Vista */, - "itemstate is 0x%08x\n", itemstate); + "itemstate is 0x%08lx\n", itemstate); process_msgs(); ok_event_count_broken(pnstceimpl, OnSelectionChanged, 1, 0 /* Vista*/); } @@ -1993,22 +1993,22 @@ static void test_events(void) /* Deselect the root */ itemstate &= ~NSTCIS_SELECTED; hr = INameSpaceTreeControl_SetItemState(pnstc, psidesktop, 0xffff, itemstate); - ok(hr == S_OK, "Got (0x%08x)\n", hr); + ok(hr == S_OK, "Got (0x%08lx)\n", hr); process_msgs(); ok_no_events(pnstceimpl);
hr = INameSpaceTreeControl_GetItemState(pnstc, psidesktop, 0xffff, &itemstate); - ok(hr == S_OK, "Got (0x%08x)\n", hr); - ok(itemstate == (NSTCIS_EXPANDED), "itemstate is 0x%08x\n", itemstate); + ok(hr == S_OK, "Got (0x%08lx)\n", hr); + ok(itemstate == (NSTCIS_EXPANDED), "itemstate is 0x%08lx\n", itemstate); ok_no_events(pnstceimpl);
hr = INameSpaceTreeControl_CollapseAll(pnstc); - ok(hr == S_OK, "Got (0x%08x)\n", hr); + ok(hr == S_OK, "Got (0x%08lx)\n", hr); ok_no_events(pnstceimpl);
/* Delete all roots */ hr = INameSpaceTreeControl_RemoveAllRoots(pnstc); - ok(hr == S_OK, "Got (0x%08x)\n", hr); + ok(hr == S_OK, "Got (0x%08lx)\n", hr); ok_event_count(pnstceimpl, OnItemDeleted, 1); ok_no_events(pnstceimpl);
@@ -2026,26 +2026,26 @@ static void test_events(void)
itemstate = 0xDEADBEEF; hr = INameSpaceTreeControl_GetItemState(pnstc, psidesktop, 0xffff, &itemstate); - ok(hr == E_INVALIDARG, "Got (0x%08x)\n", hr); + ok(hr == E_INVALIDARG, "Got (0x%08lx)\n", hr); hr = INameSpaceTreeControl_SetItemState(pnstc, psidesktop, 0xffff, 0); - ok(hr == E_INVALIDARG, "Got (0x%08x)\n", hr); + ok(hr == E_INVALIDARG, "Got (0x%08lx)\n", hr); ok_no_events(pnstceimpl);
hr = INameSpaceTreeControl_AppendRoot(pnstc, psidesktop, SHCONTF_FOLDERS | SHCONTF_NONFOLDERS, 0, NULL); - ok(hr == S_OK, "Got (0x%08x)\n", hr); + ok(hr == S_OK, "Got (0x%08lx)\n", hr); process_msgs(); ok_event_count_broken(pnstceimpl, OnItemAdded, 1, 0 /* Vista */); ok_no_events(pnstceimpl);
itemstate = 0xDEADBEEF; hr = INameSpaceTreeControl_GetItemState(pnstc, psidesktop, 0xffff, &itemstate); - ok(hr == S_OK, "Got (0x%08x)\n", hr); - ok(itemstate == NSTCIS_NONE, "itemstate is 0x%08x\n", itemstate); + ok(hr == S_OK, "Got (0x%08lx)\n", hr); + ok(itemstate == NSTCIS_NONE, "itemstate is 0x%08lx\n", itemstate); ok_no_events(pnstceimpl);
hr = INameSpaceTreeControl_SetItemState(pnstc, psidesktop, 0, 0xffff); - ok(hr == S_OK, "Got (0x%08x)\n", hr); + ok(hr == S_OK, "Got (0x%08lx)\n", hr); process_msgs(); todo_wine { @@ -2057,69 +2057,69 @@ static void test_events(void)
itemstate = 0xDEADBEEF; hr = INameSpaceTreeControl_GetItemState(pnstc, psidesktop, 0xffff, &itemstate); - ok(hr == S_OK, "Got (0x%08x)\n", hr); + ok(hr == S_OK, "Got (0x%08lx)\n", hr); todo_wine - ok(itemstate == NSTCIS_NONE, "itemstate is 0x%08x\n", itemstate); + ok(itemstate == NSTCIS_NONE, "itemstate is 0x%08lx\n", itemstate); ok_no_events(pnstceimpl);
hr = INameSpaceTreeControl_SetItemState(pnstc, psidesktop, 0xffff, 0); - ok(hr == S_OK, "Got (0x%08x)\n", hr); + ok(hr == S_OK, "Got (0x%08lx)\n", hr); process_msgs(); ok_no_events(pnstceimpl);
itemstate = 0xDEADBEEF; hr = INameSpaceTreeControl_GetItemState(pnstc, psidesktop, 0xffff, &itemstate); - ok(hr == S_OK, "Got (0x%08x)\n", hr); - ok(itemstate == NSTCIS_NONE, "itemstate is 0x%08x\n", itemstate); + ok(hr == S_OK, "Got (0x%08lx)\n", hr); + ok(itemstate == NSTCIS_NONE, "itemstate is 0x%08lx\n", itemstate); ok_no_events(pnstceimpl);
hr = INameSpaceTreeControl_SetItemState(pnstc, psidesktop, 0xffff, NSTCIS_SELECTED); - ok(hr == S_OK, "Got (0x%08x)\n", hr); + ok(hr == S_OK, "Got (0x%08lx)\n", hr); process_msgs(); ok_event_count(pnstceimpl, OnSelectionChanged, 1); ok_no_events(pnstceimpl);
itemstate = 0xDEADBEEF; hr = INameSpaceTreeControl_GetItemState(pnstc, psidesktop, 0xffff, &itemstate); - ok(hr == S_OK, "Got (0x%08x)\n", hr); - ok(itemstate == NSTCIS_SELECTED, "itemstate is 0x%08x\n", itemstate); + ok(hr == S_OK, "Got (0x%08lx)\n", hr); + ok(itemstate == NSTCIS_SELECTED, "itemstate is 0x%08lx\n", itemstate); ok_no_events(pnstceimpl);
hr = INameSpaceTreeControl_SetItemState(pnstc, psidesktop, NSTCIS_EXPANDED, NSTCIS_SELECTED); - ok(hr == S_OK, "Got (0x%08x)\n", hr); + ok(hr == S_OK, "Got (0x%08lx)\n", hr); process_msgs(); ok_no_events(pnstceimpl);
itemstate = 0xDEADBEEF; hr = INameSpaceTreeControl_GetItemState(pnstc, psidesktop, 0xffff, &itemstate); - ok(hr == S_OK, "Got (0x%08x)\n", hr); - ok(itemstate == NSTCIS_SELECTED, "itemstate is 0x%08x\n", itemstate); + ok(hr == S_OK, "Got (0x%08lx)\n", hr); + ok(itemstate == NSTCIS_SELECTED, "itemstate is 0x%08lx\n", itemstate); ok_no_events(pnstceimpl);
hr = INameSpaceTreeControl_SetItemState(pnstc, psidesktop, 0xffff, 0); - ok(hr == S_OK, "Got (0x%08x)\n", hr); + ok(hr == S_OK, "Got (0x%08lx)\n", hr); process_msgs(); ok_no_events(pnstceimpl);
itemstate = 0xDEADBEEF; hr = INameSpaceTreeControl_GetItemState(pnstc, psidesktop, 0xffff, &itemstate); - ok(hr == S_OK, "Got (0x%08x)\n", hr); - ok(itemstate == NSTCIS_SELECTED, "itemstate is 0x%08x\n", itemstate); + ok(hr == S_OK, "Got (0x%08lx)\n", hr); + ok(itemstate == NSTCIS_SELECTED, "itemstate is 0x%08lx\n", itemstate); ok_no_events(pnstceimpl);
hr = INameSpaceTreeControl_SetItemState(pnstc, psidesktop, 0xffff, NSTCIS_SELECTEDNOEXPAND); - ok(hr == S_OK, "Got (0x%08x)\n", hr); + ok(hr == S_OK, "Got (0x%08lx)\n", hr); process_msgs(); ok_no_events(pnstceimpl);
itemstate = 0xDEADBEEF; hr = INameSpaceTreeControl_GetItemState(pnstc, psidesktop, 0xffff, &itemstate); - ok(hr == S_OK, "Got (0x%08x)\n", hr); - ok(itemstate == NSTCIS_SELECTED, "itemstate is 0x%08x\n", itemstate); + ok(hr == S_OK, "Got (0x%08lx)\n", hr); + ok(itemstate == NSTCIS_SELECTED, "itemstate is 0x%08lx\n", itemstate); ok_no_events(pnstceimpl);
hr = INameSpaceTreeControl_SetItemState(pnstc, psidesktop, 0xffff, NSTCIS_EXPANDED); - ok(hr == S_OK, "Got (0x%08x)\n", hr); + ok(hr == S_OK, "Got (0x%08lx)\n", hr); process_msgs(); todo_wine { @@ -2131,111 +2131,111 @@ static void test_events(void)
itemstate = 0xDEADBEEF; hr = INameSpaceTreeControl_GetItemState(pnstc, psidesktop, 0xffff, &itemstate); - ok(hr == S_OK, "Got (0x%08x)\n", hr); - ok(itemstate == NSTCIS_EXPANDED, "itemstate is 0x%08x\n", itemstate); + ok(hr == S_OK, "Got (0x%08lx)\n", hr); + ok(itemstate == NSTCIS_EXPANDED, "itemstate is 0x%08lx\n", itemstate); ok_no_events(pnstceimpl);
hr = INameSpaceTreeControl_SetItemState(pnstc, psidesktop, 0xffff, 0); - ok(hr == S_OK, "Got (0x%08x)\n", hr); + ok(hr == S_OK, "Got (0x%08lx)\n", hr); process_msgs(); ok_no_events(pnstceimpl);
itemstate = 0xDEADBEEF; hr = INameSpaceTreeControl_GetItemState(pnstc, psidesktop, 0xffff, &itemstate); - ok(hr == S_OK, "Got (0x%08x)\n", hr); - ok(itemstate == NSTCIS_NONE, "itemstate is 0x%08x\n", itemstate); + ok(hr == S_OK, "Got (0x%08lx)\n", hr); + ok(itemstate == NSTCIS_NONE, "itemstate is 0x%08lx\n", itemstate); ok_no_events(pnstceimpl);
hr = INameSpaceTreeControl_SetItemState(pnstc, psidesktop, 0xffff, 0xffff); - ok(hr == S_OK, "Got (0x%08x)\n", hr); + ok(hr == S_OK, "Got (0x%08lx)\n", hr); process_msgs(); ok_no_events(pnstceimpl);
itemstate = 0xDEADBEEF; hr = INameSpaceTreeControl_GetItemState(pnstc, psidesktop, 0xffff, &itemstate); - ok(hr == S_OK, "Got (0x%08x)\n", hr); + ok(hr == S_OK, "Got (0x%08lx)\n", hr); todo_wine { ok(itemstate == (NSTCIS_EXPANDED | NSTCIS_BOLD | NSTCIS_DISABLED), - "itemstate is 0x%08x\n", itemstate); + "itemstate is 0x%08lx\n", itemstate); } ok_no_events(pnstceimpl);
hr = INameSpaceTreeControl_SetItemState(pnstc, psidesktop, NSTCIS_SELECTED, NSTCIS_SELECTED); - ok(hr == S_OK, "Got (0x%08x)\n", hr); + ok(hr == S_OK, "Got (0x%08lx)\n", hr); process_msgs(); ok_no_events(pnstceimpl);
itemstate = 0xDEADBEEF; hr = INameSpaceTreeControl_GetItemState(pnstc, psidesktop, 0xffff, &itemstate); - ok(hr == S_OK, "Got (0x%08x)\n", hr); + ok(hr == S_OK, "Got (0x%08lx)\n", hr); todo_wine { ok(itemstate == (NSTCIS_EXPANDED | NSTCIS_BOLD | NSTCIS_DISABLED), - "itemstate is 0x%08x\n", itemstate); + "itemstate is 0x%08lx\n", itemstate); } ok_no_events(pnstceimpl);
hr = INameSpaceTreeControl_SetItemState(pnstc, psidesktop, NSTCIS_SELECTED | NSTCIS_DISABLED, NSTCIS_SELECTED); - ok(hr == S_OK, "Got (0x%08x)\n", hr); + ok(hr == S_OK, "Got (0x%08lx)\n", hr); process_msgs(); ok_no_events(pnstceimpl);
itemstate = 0xDEADBEEF; hr = INameSpaceTreeControl_GetItemState(pnstc, psidesktop, 0xffff, &itemstate); - ok(hr == S_OK, "Got (0x%08x)\n", hr); + ok(hr == S_OK, "Got (0x%08lx)\n", hr); ok(itemstate == (NSTCIS_BOLD | NSTCIS_EXPANDED), - "itemstate is 0x%08x\n", itemstate); + "itemstate is 0x%08lx\n", itemstate); ok_no_events(pnstceimpl);
hr = INameSpaceTreeControl_SetItemState(pnstc, psidesktop, NSTCIS_SELECTED, NSTCIS_SELECTED); - ok(hr == S_OK, "Got (0x%08x)\n", hr); + ok(hr == S_OK, "Got (0x%08lx)\n", hr); process_msgs(); ok_no_events(pnstceimpl);
itemstate = 0xDEADBEEF; hr = INameSpaceTreeControl_GetItemState(pnstc, psidesktop, 0xffff, &itemstate); - ok(hr == S_OK, "Got (0x%08x)\n", hr); + ok(hr == S_OK, "Got (0x%08lx)\n", hr); ok(itemstate == (NSTCIS_BOLD | NSTCIS_EXPANDED), - "itemstate is 0x%08x\n", itemstate); + "itemstate is 0x%08lx\n", itemstate); ok_no_events(pnstceimpl);
hr = INameSpaceTreeControl_SetItemState(pnstc, psidesktop, 0xffff & ~NSTCIS_DISABLED, 0); - ok(hr == S_OK, "Got (0x%08x)\n", hr); + ok(hr == S_OK, "Got (0x%08lx)\n", hr); process_msgs(); ok_no_events(pnstceimpl);
itemstate = 0xDEADBEEF; hr = INameSpaceTreeControl_GetItemState(pnstc, psidesktop, 0xffff, &itemstate); - ok(hr == S_OK, "Got (0x%08x)\n", hr); - ok(itemstate == NSTCIS_BOLD, "itemstate is 0x%08x\n", itemstate); + ok(hr == S_OK, "Got (0x%08lx)\n", hr); + ok(itemstate == NSTCIS_BOLD, "itemstate is 0x%08lx\n", itemstate); ok_no_events(pnstceimpl);
hr = INameSpaceTreeControl_RemoveAllRoots(pnstc); - ok(hr == S_OK, "Got (0x%08x)\n", hr); + ok(hr == S_OK, "Got (0x%08lx)\n", hr); ok_event_count(pnstceimpl, OnItemDeleted, 1); ok_no_events(pnstceimpl);
/* GetNextItem */ hr = INameSpaceTreeControl_GetNextItem(pnstc, NULL, 0, NULL); - ok(hr == E_POINTER, "Got (0x%08x)\n", hr); + ok(hr == E_POINTER, "Got (0x%08lx)\n", hr); ok_no_events(pnstceimpl);
hr = INameSpaceTreeControl_GetNextItem(pnstc, psidesktop, 0, NULL); - ok(hr == E_POINTER, "Got (0x%08x)\n", hr); + ok(hr == E_POINTER, "Got (0x%08lx)\n", hr); ok_no_events(pnstceimpl);
hr = INameSpaceTreeControl_GetNextItem(pnstc, NULL, 0, &psi); - ok(hr == E_FAIL, "Got (0x%08x)\n", hr); + ok(hr == E_FAIL, "Got (0x%08lx)\n", hr); ok_no_events(pnstceimpl);
hr = INameSpaceTreeControl_GetNextItem(pnstc, psidesktop, 0, &psi); - ok(hr == E_INVALIDARG, "Got (0x%08x)\n", hr); + ok(hr == E_INVALIDARG, "Got (0x%08lx)\n", hr); ok_no_events(pnstceimpl);
hr = INameSpaceTreeControl_AppendRoot(pnstc, psidesktop, SHCONTF_FOLDERS | SHCONTF_NONFOLDERS, 0, NULL); - ok(hr == S_OK, "Got (0x%08x)\n", hr); + ok(hr == S_OK, "Got (0x%08lx)\n", hr); process_msgs(); ok_event_count_broken(pnstceimpl, OnItemAdded, 1, 0 /* Vista */); ok_no_events(pnstceimpl); @@ -2243,14 +2243,14 @@ static void test_events(void) /* Get child from unexpanded and unfilled parent */ psi = (void*)0xDEADBEEF; hr = INameSpaceTreeControl_GetNextItem(pnstc, psidesktop, NSTCGNI_CHILD, &psi); - ok(hr == E_FAIL, "Got (0x%08x)\n", hr); + ok(hr == E_FAIL, "Got (0x%08lx)\n", hr); ok(psi == NULL, "psi is %p\n", psi); process_msgs(); ok_no_events(pnstceimpl);
/* Expand and try again */ hr = INameSpaceTreeControl_SetItemState(pnstc, psidesktop, NSTCIS_EXPANDED, 0xffff); - ok(hr == S_OK, "Got (0x%08x)\n", hr); + ok(hr == S_OK, "Got (0x%08lx)\n", hr); process_msgs(); ok_event_count(pnstceimpl, OnBeforeExpand, 1); ok_event_broken(pnstceimpl, OnItemAdded); /* Does not fire on Vista */ @@ -2259,14 +2259,14 @@ static void test_events(void) ok_no_events(pnstceimpl); psi = (void*)0xDEADBEEF; hr = INameSpaceTreeControl_GetNextItem(pnstc, psidesktop, NSTCGNI_CHILD, &psi); - ok(hr == S_OK, "Got (0x%08x)\n", hr); + ok(hr == S_OK, "Got (0x%08lx)\n", hr); ok((psi != NULL) && (psi != (void*)0xDEADBEEF), "psi is %p\n", psi); process_msgs(); ok_no_events(pnstceimpl); if(SUCCEEDED(hr)) IShellItem_Release(psi);
hr = INameSpaceTreeControl_RemoveAllRoots(pnstc); - ok(hr == S_OK, "Got (0x%08x)\n", hr); + ok(hr == S_OK, "Got (0x%08lx)\n", hr); ok_event_count(pnstceimpl, OnItemDeleted, 1); ok_no_events(pnstceimpl);
@@ -2278,43 +2278,43 @@ static void test_events(void) }
hr = INameSpaceTreeControl_EnsureItemVisible(pnstc, psidesktop); - ok(hr == E_INVALIDARG || hr == E_FAIL, "Got (0x%08x)\n", hr); + ok(hr == E_INVALIDARG || hr == E_FAIL, "Got (0x%08lx)\n", hr); ok_no_events(pnstceimpl);
hr = pSHGetSpecialFolderLocation(NULL, CSIDL_DRIVES, &pidl_drives); - ok(hr == S_OK, "Got (0x%08x)\n", hr); + ok(hr == S_OK, "Got (0x%08lx)\n", hr); if(SUCCEEDED(hr)) { hr = pSHCreateShellItem(NULL, NULL, pidl_drives, &psi); - ok(hr == S_OK, "Got (0x%08x)\n", hr); + ok(hr == S_OK, "Got (0x%08lx)\n", hr); if(SUCCEEDED(hr)) { hr = INameSpaceTreeControl_AppendRoot(pnstc, psi, SHCONTF_FOLDERS | SHCONTF_NONFOLDERS, 0, NULL); - ok(hr == S_OK, "Got (0x%08x)\n", hr); + ok(hr == S_OK, "Got (0x%08lx)\n", hr); process_msgs(); ok_event_count_broken(pnstceimpl, OnItemAdded, 1, 0 /* Vista */); ok_no_events(pnstceimpl);
hr = INameSpaceTreeControl_EnsureItemVisible(pnstc, psidesktop); - ok(hr == E_INVALIDARG, "Got (0x%08x)\n", hr); + ok(hr == E_INVALIDARG, "Got (0x%08lx)\n", hr); ok_no_events(pnstceimpl);
hr = INameSpaceTreeControl_EnsureItemVisible(pnstc, psi); - ok(hr == S_OK, "Got (0x%08x)\n", hr); + ok(hr == S_OK, "Got (0x%08lx)\n", hr); ok_no_events(pnstceimpl);
hr = INameSpaceTreeControl_AppendRoot(pnstc, psidesktop, SHCONTF_FOLDERS | SHCONTF_NONFOLDERS, 0, NULL); - ok(hr == S_OK, "Got (0x%08x)\n", hr); + ok(hr == S_OK, "Got (0x%08lx)\n", hr); process_msgs(); ok_event_count_broken(pnstceimpl, OnItemAdded, 1, 0 /* Vista */); ok_no_events(pnstceimpl);
hr = INameSpaceTreeControl_EnsureItemVisible(pnstc, psidesktop); - ok(hr == S_OK, "Got (0x%08x)\n", hr); + ok(hr == S_OK, "Got (0x%08lx)\n", hr); ok_no_events(pnstceimpl);
hr = INameSpaceTreeControl_EnsureItemVisible(pnstc, psi); - ok(hr == S_OK, "Got (0x%08x)\n", hr); + ok(hr == S_OK, "Got (0x%08lx)\n", hr); ok_no_events(pnstceimpl);
} @@ -2327,23 +2327,23 @@ static void test_events(void) skip("Failed to get pidl for CSIDL_DRIVES.\n");
hr = INameSpaceTreeControl_RemoveAllRoots(pnstc); - ok(hr == S_OK, "Got (0x%08x)\n", hr); + ok(hr == S_OK, "Got (0x%08lx)\n", hr); ok_event_count(pnstceimpl, OnItemDeleted, 2); ok_no_events(pnstceimpl);
hr = INameSpaceTreeControl_QueryInterface(pnstc, &IID_IOleWindow, (void**)&pow); - ok(hr == S_OK, "Got 0x%08x\n", hr); + ok(hr == S_OK, "Got 0x%08lx\n", hr); if(SUCCEEDED(hr)) { HWND hwnd_nstc; hr = IOleWindow_GetWindow(pow, &hwnd_nstc); - ok(hr == S_OK, "Got 0x%08x\n", hr); + ok(hr == S_OK, "Got 0x%08lx\n", hr); DestroyWindow(hwnd_nstc); IOleWindow_Release(pow); }
hr = INameSpaceTreeControl_TreeUnadvise(pnstc, cookie2); - ok(hr == S_OK, "Got 0x%08x\n", hr); + ok(hr == S_OK, "Got 0x%08lx\n", hr);
res = INameSpaceTreeControl_Release(pnstc); ok(!res, "res was %d!\n", res); @@ -2370,7 +2370,7 @@ static void setup_window(void) RegisterClassA(&wc); hwnd = CreateWindowA(nstctest_wnd_name, NULL, WS_TABSTOP, 0, 0, 200, 200, NULL, 0, 0, NULL); - ok(hwnd != NULL, "Failed to create window for test (lasterror: %d).\n", + ok(hwnd != NULL, "Failed to create window for test (lasterror: %ld).\n", GetLastError()); }
diff --git a/dlls/explorerframe/tests/taskbarlist.c b/dlls/explorerframe/tests/taskbarlist.c index 5f5cc98c5b4..4f5154967d6 100644 --- a/dlls/explorerframe/tests/taskbarlist.c +++ b/dlls/explorerframe/tests/taskbarlist.c @@ -30,132 +30,132 @@ static void test_ITaskbarList(void) HWND hwnd;
hwnd = CreateWindowA(WC_STATICA, "test", WS_POPUP | WS_VISIBLE, 0, 0, 50, 50, 0, 0, 0, NULL); - ok(hwnd != NULL, "Failed to create a test window, error %u.\n", GetLastError()); + ok(hwnd != NULL, "Failed to create a test window, error %lu.\n", GetLastError());
hr = CoCreateInstance((const CLSID *)&CLSID_TaskbarList, NULL, CLSCTX_INPROC_SERVER, (const IID *)&IID_ITaskbarList, (void **)&taskbarlist); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
ref_count = ITaskbarList_AddRef(taskbarlist); - ok(ref_count == 2, "Got unexpected reference count %u.\n", ref_count); + ok(ref_count == 2, "Got unexpected reference count %lu.\n", ref_count); ref_count = ITaskbarList_Release(taskbarlist); - ok(ref_count == 1, "Got unexpected reference count %u.\n", ref_count); + ok(ref_count == 1, "Got unexpected reference count %lu.\n", ref_count);
/* Test calling methods before calling ITaskbarList::HrInit() */ hr = ITaskbarList_AddTab(taskbarlist, hwnd); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = ITaskbarList_SetActiveAlt(taskbarlist, hwnd); todo_wine - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = ITaskbarList_ActivateTab(taskbarlist, hwnd); todo_wine - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = ITaskbarList_DeleteTab(taskbarlist, hwnd); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
/* Call ITaskbarList::HrInit() */ hr = ITaskbarList_HrInit(taskbarlist); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
/* Test ITaskbarList::HrInit() */ /* Call ITaskbarList::HrInit() again */ hr = ITaskbarList_HrInit(taskbarlist); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
/* Test ITaskbarList::AddTab() */ /* Check invalid parameters */ hr = ITaskbarList_AddTab(taskbarlist, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = ITaskbarList_AddTab(taskbarlist, (HWND)0xdeadbeef); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
/* Normal ITaskbarList::AddTab() */ hr = ITaskbarList_AddTab(taskbarlist, hwnd); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
/* Repeat ITaskbarList::AddTab() with the same hwnd */ hr = ITaskbarList_AddTab(taskbarlist, hwnd); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = ITaskbarList_DeleteTab(taskbarlist, hwnd); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
/* Test ITaskbarList::SetActiveAlt() */ /* Check invalid parameters */ hr = ITaskbarList_SetActiveAlt(taskbarlist, NULL); todo_wine - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = ITaskbarList_SetActiveAlt(taskbarlist, (HWND)0xdeadbeef); todo_wine - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
/* Normal ITaskbarList::SetActiveAlt() */ hr = ITaskbarList_AddTab(taskbarlist, hwnd); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = ITaskbarList_SetActiveAlt(taskbarlist, hwnd); todo_wine - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
/* Repeat ITaskbarList::SetActiveAlt() with the same hwnd */ hr = ITaskbarList_SetActiveAlt(taskbarlist, hwnd); todo_wine - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = ITaskbarList_DeleteTab(taskbarlist, hwnd); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
/* Test ITaskbarList::ActivateTab() */ /* Check invalid parameters */ hr = ITaskbarList_ActivateTab(taskbarlist, NULL); todo_wine - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = ITaskbarList_ActivateTab(taskbarlist, (HWND)0xdeadbeef); todo_wine - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
/* Normal ITaskbarList::ActivateTab() */ hr = ITaskbarList_AddTab(taskbarlist, hwnd); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = ITaskbarList_ActivateTab(taskbarlist, hwnd); todo_wine - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
/* Repeat ITaskbarList::ActivateTab() with the same hwnd */ hr = ITaskbarList_ActivateTab(taskbarlist, hwnd); todo_wine - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = ITaskbarList_DeleteTab(taskbarlist, hwnd); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
/* Test ITaskbarList::DeleteTab() */ /* Check invalid parameters */ hr = ITaskbarList_DeleteTab(taskbarlist, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = ITaskbarList_DeleteTab(taskbarlist, (HWND)0xdeadbeef); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = ITaskbarList_DeleteTab(taskbarlist, hwnd); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
/* Normal ITaskbarList::DeleteTab() */ hr = ITaskbarList_AddTab(taskbarlist, hwnd); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = ITaskbarList_DeleteTab(taskbarlist, hwnd); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
ref_count = ITaskbarList_Release(taskbarlist); - ok(ref_count == 0, "Got unexpected reference count %u.\n", ref_count); + ok(ref_count == 0, "Got unexpected reference count %lu.\n", ref_count); DestroyWindow(hwnd); }
Signed-off-by: Eric Pouech eric.pouech@gmail.com
--- dlls/faultrep/tests/Makefile.in | 1 - dlls/faultrep/tests/faultrep.c | 8 ++++---- 2 files changed, 4 insertions(+), 5 deletions(-)
diff --git a/dlls/faultrep/tests/Makefile.in b/dlls/faultrep/tests/Makefile.in index 202dd0571ba..404bd4d7d3f 100644 --- a/dlls/faultrep/tests/Makefile.in +++ b/dlls/faultrep/tests/Makefile.in @@ -1,4 +1,3 @@ -EXTRADEFS = -DWINE_NO_LONG_TYPES TESTDLL = faultrep.dll IMPORTS = faultrep advapi32
diff --git a/dlls/faultrep/tests/faultrep.c b/dlls/faultrep/tests/faultrep.c index 41f03ee8870..83acd34a6d4 100644 --- a/dlls/faultrep/tests/faultrep.c +++ b/dlls/faultrep/tests/faultrep.c @@ -82,11 +82,11 @@ static void test_AddERExcludedApplicationA(void)
SetLastError(0xdeadbeef); res = AddERExcludedApplicationA(NULL); - ok(!res, "got %d and 0x%x (expected FALSE)\n", res, GetLastError()); + ok(!res, "got %d and 0x%lx (expected FALSE)\n", res, GetLastError());
SetLastError(0xdeadbeef); res = AddERExcludedApplicationA(""); - ok(!res, "got %d and 0x%x (expected FALSE)\n", res, GetLastError()); + ok(!res, "got %d and 0x%lx (expected FALSE)\n", res, GetLastError());
SetLastError(0xdeadbeef); /* existence of the path doesn't matter this function succeeded */ @@ -99,12 +99,12 @@ static void test_AddERExcludedApplicationA(void) } else { - ok(res, "AddERExcludedApplicationA failed (le=0x%x)\n", GetLastError()); + ok(res, "AddERExcludedApplicationA failed (le=0x%lx)\n", GetLastError());
/* add, when already present */ SetLastError(0xdeadbeef); res = AddERExcludedApplicationA("winetest_faultrep.exe"); - ok(res, "AddERExcludedApplicationA failed (le=0x%x)\n", GetLastError()); + ok(res, "AddERExcludedApplicationA failed (le=0x%lx)\n", GetLastError()); }
/* cleanup */
Signed-off-by: Eric Pouech eric.pouech@gmail.com
--- dlls/fusion/tests/Makefile.in | 1 dlls/fusion/tests/asmcache.c | 344 +++++++++++++++++++++-------------------- dlls/fusion/tests/asmenum.c | 82 +++++----- dlls/fusion/tests/asmname.c | 316 +++++++++++++++++++------------------- dlls/fusion/tests/fusion.c | 22 +-- 5 files changed, 382 insertions(+), 383 deletions(-)
diff --git a/dlls/fusion/tests/Makefile.in b/dlls/fusion/tests/Makefile.in index ff4792cc9e5..02a6ae3970f 100644 --- a/dlls/fusion/tests/Makefile.in +++ b/dlls/fusion/tests/Makefile.in @@ -1,4 +1,3 @@ -EXTRADEFS = -DWINE_NO_LONG_TYPES TESTDLL = fusion.dll IMPORTS = user32
diff --git a/dlls/fusion/tests/asmcache.c b/dlls/fusion/tests/asmcache.c index 5e540a403c4..2b79cf57d29 100644 --- a/dlls/fusion/tests/asmcache.c +++ b/dlls/fusion/tests/asmcache.c @@ -843,7 +843,7 @@ static BOOL check_dotnet20(void) create_assembly("wine.dll");
hr = pCreateAssemblyCache(&cache, 0); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); + ok(hr == S_OK, "Expected S_OK, got %08lx\n", hr);
hr = IAssemblyCache_InstallAssembly(cache, 0, L"wine.dll", NULL); if (hr == S_OK) @@ -853,7 +853,7 @@ static BOOL check_dotnet20(void) else if (hr == E_ACCESSDENIED) skip("Not enough rights to install an assembly\n"); else - ok(0, "Expected S_OK, got %08x\n", hr); + ok(0, "Expected S_OK, got %08lx\n", hr);
DeleteFileA("wine.dll"); IAssemblyCache_UninstallAssembly(cache, 0, L"wine.dll", NULL, &disp); @@ -868,11 +868,11 @@ static void test_CreateAssemblyCache(void)
/* NULL ppAsmCache */ hr = pCreateAssemblyCache(NULL, 0); - ok(hr == E_INVALIDARG, "Expected E_INVALIDARG, got %08x\n", hr); + ok(hr == E_INVALIDARG, "Expected E_INVALIDARG, got %08lx\n", hr);
/* dwReserved is non-zero */ hr = pCreateAssemblyCache(&cache, 42); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); + ok(hr == S_OK, "Expected S_OK, got %08lx\n", hr);
IAssemblyCache_Release(cache); } @@ -884,29 +884,29 @@ static void test_CreateAssemblyCacheItem(void) HRESULT hr;
hr = pCreateAssemblyCache(&cache, 0); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); + ok(hr == S_OK, "Expected S_OK, got %08lx\n", hr);
hr = IAssemblyCache_CreateAssemblyCacheItem(cache, 0, NULL, NULL, NULL); - ok(hr == E_INVALIDARG, "Expected E_INVALIDARG, got %08x\n", hr); + ok(hr == E_INVALIDARG, "Expected E_INVALIDARG, got %08lx\n", hr);
hr = IAssemblyCache_CreateAssemblyCacheItem(cache, 0, NULL, &item, NULL); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); + ok(hr == S_OK, "Expected S_OK, got %08lx\n", hr); IAssemblyCacheItem_Release(item);
hr = IAssemblyCache_CreateAssemblyCacheItem(cache, 0, NULL, &item, L"wine"); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); + ok(hr == S_OK, "Expected S_OK, got %08lx\n", hr); IAssemblyCacheItem_Release(item);
hr = IAssemblyCache_CreateAssemblyCacheItem(cache, 1, (void *)0xdeadbeef, &item, NULL); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); + ok(hr == S_OK, "Expected S_OK, got %08lx\n", hr); IAssemblyCacheItem_Release(item);
hr = IAssemblyCache_CreateAssemblyCacheItem(cache, 1, NULL, &item, NULL); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); + ok(hr == S_OK, "Expected S_OK, got %08lx\n", hr); IAssemblyCacheItem_Release(item);
hr = IAssemblyCache_CreateAssemblyCacheItem(cache, 0, (void *)0xdeadbeef, &item, NULL); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); + ok(hr == S_OK, "Expected S_OK, got %08lx\n", hr); IAssemblyCacheItem_Release(item);
IAssemblyCache_Release(cache); @@ -924,44 +924,44 @@ static void test_InstallAssembly(void) create_assembly("wine.dll");
hr = pCreateAssemblyCache(&cache, 0); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); + ok(hr == S_OK, "Expected S_OK, got %08lx\n", hr);
/* NULL pszManifestFilePath */ hr = IAssemblyCache_InstallAssembly(cache, 0, NULL, NULL); - ok(hr == E_INVALIDARG, "Expected E_INVALIDARG, got %08x\n", hr); + ok(hr == E_INVALIDARG, "Expected E_INVALIDARG, got %08lx\n", hr);
/* empty pszManifestFilePath */ hr = IAssemblyCache_InstallAssembly(cache, 0, L"", NULL); - ok(hr == E_INVALIDARG, "Expected E_INVALIDARG, got %08x\n", hr); + ok(hr == E_INVALIDARG, "Expected E_INVALIDARG, got %08lx\n", hr);
/* pszManifestFilePath has no extension */ hr = IAssemblyCache_InstallAssembly(cache, 0, L"file", NULL); ok(hr == HRESULT_FROM_WIN32(ERROR_INVALID_NAME), - "Expected HRESULT_FROM_WIN32(ERROR_INVALID_NAME), got %08x\n", hr); + "Expected HRESULT_FROM_WIN32(ERROR_INVALID_NAME), got %08lx\n", hr);
/* pszManifestFilePath has bad extension */ hr = IAssemblyCache_InstallAssembly(cache, 0, L"file.bad", NULL); ok(hr == HRESULT_FROM_WIN32(ERROR_INVALID_NAME), - "Expected HRESULT_FROM_WIN32(ERROR_INVALID_NAME), got %08x\n", hr); + "Expected HRESULT_FROM_WIN32(ERROR_INVALID_NAME), got %08lx\n", hr);
/* pszManifestFilePath has dll extension */ hr = IAssemblyCache_InstallAssembly(cache, 0, L"file.dll", NULL); ok(hr == HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND), - "Expected HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND), got %08x\n", hr); + "Expected HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND), got %08lx\n", hr);
/* pszManifestFilePath has exe extension */ hr = IAssemblyCache_InstallAssembly(cache, 0, L"file.exe", NULL); ok(hr == HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND), - "Expected HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND), got %08x\n", hr); + "Expected HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND), got %08lx\n", hr);
/* empty file */ hr = IAssemblyCache_InstallAssembly(cache, 0, L"test.dll", NULL); ok(hr == COR_E_ASSEMBLYEXPECTED, - "Expected COR_E_ASSEMBLYEXPECTED, got %08x\n", hr); + "Expected COR_E_ASSEMBLYEXPECTED, got %08lx\n", hr);
/* wine assembly */ hr = IAssemblyCache_InstallAssembly(cache, 0, L"wine.dll", NULL); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); + ok(hr == S_OK, "Expected S_OK, got %08lx\n", hr);
GetWindowsDirectoryA(dllpath, MAX_PATH); strcat(dllpath, "\assembly\GAC_MSIL\wine\\1.0.0.0__2d03617b1c31e2f5\wine.dll"); @@ -972,18 +972,18 @@ static void test_InstallAssembly(void) /* uninstall the assembly from the GAC */ disp = 0xf00dbad; hr = IAssemblyCache_UninstallAssembly(cache, 0, L"wine", NULL, &disp); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); + ok(hr == S_OK, "Expected S_OK, got %08lx\n", hr); ok(disp == IASSEMBLYCACHE_UNINSTALL_DISPOSITION_UNINSTALLED, - "Expected IASSEMBLYCACHE_UNINSTALL_DISPOSITION_UNINSTALLED, got %d\n", disp); + "Expected IASSEMBLYCACHE_UNINSTALL_DISPOSITION_UNINSTALLED, got %ld\n", disp);
attr = GetFileAttributesA(dllpath); ok(attr == INVALID_FILE_ATTRIBUTES, "Expected assembly not to exist\n");
disp = 0xf00dbad; hr = IAssemblyCache_UninstallAssembly(cache, 0, L"wine", NULL, &disp); - ok(hr == S_FALSE, "Expected S_FALSE, got %08x\n", hr); + ok(hr == S_FALSE, "Expected S_FALSE, got %08lx\n", hr); ok(disp == IASSEMBLYCACHE_UNINSTALL_DISPOSITION_ALREADY_UNINSTALLED, - "Expected IASSEMBLYCACHE_UNINSTALL_DISPOSITION_ALREADY_UNINSTALLED, got %d\n", disp); + "Expected IASSEMBLYCACHE_UNINSTALL_DISPOSITION_ALREADY_UNINSTALLED, got %ld\n", disp);
DeleteFileA("test.dll"); DeleteFileA("wine.dll"); @@ -1010,253 +1010,253 @@ static void test_QueryAssemblyInfo(void)
size = MAX_PATH; hr = pGetCachePath(ASM_CACHE_GAC, asmpath, &size); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); + ok(hr == S_OK, "Expected S_OK, got %08lx\n", hr);
lstrcatW(asmpath, L"_MSIL\wine\1.0.0.0__2d03617b1c31e2f5\wine.dll");
create_assembly("wine.dll");
hr = pCreateAssemblyCache(&cache, 0); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); + ok(hr == S_OK, "Expected S_OK, got %08lx\n", hr);
/* assembly not installed yet */ INIT_ASM_INFO(); hr = IAssemblyCache_QueryAssemblyInfo(cache, 0, L"wine", &info); ok(hr == HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND), - "Expected HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND), got %08x\n", hr); + "Expected HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND), got %08lx\n", hr); ok(info.cbAssemblyInfo == sizeof(ASSEMBLY_INFO), - "Expected sizeof(ASSEMBLY_INFO), got %d\n", info.cbAssemblyInfo); - ok(info.dwAssemblyFlags == 0, "Expected 0, got %08x\n", info.dwAssemblyFlags); + "Expected sizeof(ASSEMBLY_INFO), got %ld\n", info.cbAssemblyInfo); + ok(info.dwAssemblyFlags == 0, "Expected 0, got %08lx\n", info.dwAssemblyFlags); ok(info.uliAssemblySizeInKB.u.HighPart == 0, - "Expected 0, got %d\n", info.uliAssemblySizeInKB.u.HighPart); + "Expected 0, got %ld\n", info.uliAssemblySizeInKB.u.HighPart); ok(info.uliAssemblySizeInKB.u.LowPart == 0, - "Expected 0, got %d\n", info.uliAssemblySizeInKB.u.LowPart); + "Expected 0, got %ld\n", info.uliAssemblySizeInKB.u.LowPart); ok(!lstrcmpW(info.pszCurrentAssemblyPathBuf, L""), "Assembly path was changed\n"); - ok(info.cchBuf == MAX_PATH, "Expected MAX_PATH, got %d\n", info.cchBuf); + ok(info.cchBuf == MAX_PATH, "Expected MAX_PATH, got %ld\n", info.cchBuf);
hr = IAssemblyCache_InstallAssembly(cache, 0, L"wine.dll", NULL); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); + ok(hr == S_OK, "Expected S_OK, got %08lx\n", hr);
/* NULL pszAssemblyName */ INIT_ASM_INFO(); hr = IAssemblyCache_QueryAssemblyInfo(cache, QUERYASMINFO_FLAG_VALIDATE, NULL, &info); - ok(hr == E_INVALIDARG, "Expected E_INVALIDARG, got %08x\n", hr); + ok(hr == E_INVALIDARG, "Expected E_INVALIDARG, got %08lx\n", hr); ok(info.cbAssemblyInfo == sizeof(ASSEMBLY_INFO), - "Expected sizeof(ASSEMBLY_INFO), got %d\n", info.cbAssemblyInfo); - ok(info.dwAssemblyFlags == 0, "Expected 0, got %08x\n", info.dwAssemblyFlags); + "Expected sizeof(ASSEMBLY_INFO), got %ld\n", info.cbAssemblyInfo); + ok(info.dwAssemblyFlags == 0, "Expected 0, got %08lx\n", info.dwAssemblyFlags); ok(info.uliAssemblySizeInKB.u.HighPart == 0, - "Expected 0, got %d\n", info.uliAssemblySizeInKB.u.HighPart); + "Expected 0, got %ld\n", info.uliAssemblySizeInKB.u.HighPart); ok(info.uliAssemblySizeInKB.u.LowPart == 0, - "Expected 0, got %d\n", info.uliAssemblySizeInKB.u.LowPart); + "Expected 0, got %ld\n", info.uliAssemblySizeInKB.u.LowPart); ok(!lstrcmpW(info.pszCurrentAssemblyPathBuf, L""), "Assembly path was changed\n"); - ok(info.cchBuf == MAX_PATH, "Expected MAX_PATH, got %d\n", info.cchBuf); + ok(info.cchBuf == MAX_PATH, "Expected MAX_PATH, got %ld\n", info.cchBuf);
/* empty pszAssemblyName */ INIT_ASM_INFO(); hr = IAssemblyCache_QueryAssemblyInfo(cache, QUERYASMINFO_FLAG_VALIDATE, L"", &info); - ok(hr == E_INVALIDARG, "Expected E_INVALIDARG, got %08x\n", hr); + ok(hr == E_INVALIDARG, "Expected E_INVALIDARG, got %08lx\n", hr); ok(info.cbAssemblyInfo == sizeof(ASSEMBLY_INFO), - "Expected sizeof(ASSEMBLY_INFO), got %d\n", info.cbAssemblyInfo); - ok(info.dwAssemblyFlags == 0, "Expected 0, got %08x\n", info.dwAssemblyFlags); + "Expected sizeof(ASSEMBLY_INFO), got %ld\n", info.cbAssemblyInfo); + ok(info.dwAssemblyFlags == 0, "Expected 0, got %08lx\n", info.dwAssemblyFlags); ok(info.uliAssemblySizeInKB.u.HighPart == 0, - "Expected 0, got %d\n", info.uliAssemblySizeInKB.u.HighPart); + "Expected 0, got %ld\n", info.uliAssemblySizeInKB.u.HighPart); ok(info.uliAssemblySizeInKB.u.LowPart == 0, - "Expected 0, got %d\n", info.uliAssemblySizeInKB.u.LowPart); + "Expected 0, got %ld\n", info.uliAssemblySizeInKB.u.LowPart); ok(!lstrcmpW(info.pszCurrentAssemblyPathBuf, L""), "Assembly path was changed\n"); - ok(info.cchBuf == MAX_PATH, "Expected MAX_PATH, got %d\n", info.cchBuf); + ok(info.cchBuf == MAX_PATH, "Expected MAX_PATH, got %ld\n", info.cchBuf);
/* no dwFlags */ INIT_ASM_INFO(); hr = IAssemblyCache_QueryAssemblyInfo(cache, 0, L"wine", &info); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); + ok(hr == S_OK, "Expected S_OK, got %08lx\n", hr); ok(info.cbAssemblyInfo == sizeof(ASSEMBLY_INFO), - "Expected sizeof(ASSEMBLY_INFO), got %d\n", info.cbAssemblyInfo); + "Expected sizeof(ASSEMBLY_INFO), got %ld\n", info.cbAssemblyInfo); ok(info.dwAssemblyFlags == ASSEMBLYINFO_FLAG_INSTALLED, - "Expected ASSEMBLYINFO_FLAG_INSTALLED, got %08x\n", info.dwAssemblyFlags); + "Expected ASSEMBLYINFO_FLAG_INSTALLED, got %08lx\n", info.dwAssemblyFlags); ok(info.uliAssemblySizeInKB.u.HighPart == 0, - "Expected 0, got %d\n", info.uliAssemblySizeInKB.u.HighPart); + "Expected 0, got %ld\n", info.uliAssemblySizeInKB.u.HighPart); ok(info.uliAssemblySizeInKB.u.LowPart == 0, - "Expected 0, got %d\n", info.uliAssemblySizeInKB.u.LowPart); + "Expected 0, got %ld\n", info.uliAssemblySizeInKB.u.LowPart); ok(!lstrcmpW(info.pszCurrentAssemblyPathBuf, asmpath), "Wrong assembly path returned\n"); ok(info.cchBuf == lstrlenW(asmpath) + 1, - "Expected %d, got %d\n", lstrlenW(asmpath) + 1, info.cchBuf); + "Expected %d, got %ld\n", lstrlenW(asmpath) + 1, info.cchBuf);
/* pwzCachePath is full filename */ INIT_ASM_INFO(); hr = IAssemblyCache_QueryAssemblyInfo(cache, 0, L"wine.dll", &info); ok(hr == HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND), - "Expected HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND), got %08x\n", hr); + "Expected HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND), got %08lx\n", hr); ok(info.cbAssemblyInfo == sizeof(ASSEMBLY_INFO), - "Expected sizeof(ASSEMBLY_INFO), got %d\n", info.cbAssemblyInfo); - ok(info.dwAssemblyFlags == 0, "Expected 0, got %08x\n", info.dwAssemblyFlags); + "Expected sizeof(ASSEMBLY_INFO), got %ld\n", info.cbAssemblyInfo); + ok(info.dwAssemblyFlags == 0, "Expected 0, got %08lx\n", info.dwAssemblyFlags); ok(info.uliAssemblySizeInKB.u.HighPart == 0, - "Expected 0, got %d\n", info.uliAssemblySizeInKB.u.HighPart); + "Expected 0, got %ld\n", info.uliAssemblySizeInKB.u.HighPart); ok(info.uliAssemblySizeInKB.u.LowPart == 0, - "Expected 0, got %d\n", info.uliAssemblySizeInKB.u.LowPart); + "Expected 0, got %ld\n", info.uliAssemblySizeInKB.u.LowPart); ok(!lstrcmpW(info.pszCurrentAssemblyPathBuf, L""), "Assembly path was changed\n"); - ok(info.cchBuf == MAX_PATH, "Expected MAX_PATH, got %d\n", info.cchBuf); + ok(info.cchBuf == MAX_PATH, "Expected MAX_PATH, got %ld\n", info.cchBuf);
/* NULL pAsmInfo, QUERYASMINFO_FLAG_VALIDATE */ hr = IAssemblyCache_QueryAssemblyInfo(cache, QUERYASMINFO_FLAG_VALIDATE, L"wine", NULL); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); + ok(hr == S_OK, "Expected S_OK, got %08lx\n", hr);
/* NULL pAsmInfo, QUERYASMINFO_FLAG_GETSIZE */ hr = IAssemblyCache_QueryAssemblyInfo(cache, QUERYASMINFO_FLAG_GETSIZE, L"wine", NULL); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); + ok(hr == S_OK, "Expected S_OK, got %08lx\n", hr);
/* info.cbAssemblyInfo is 0 */ INIT_ASM_INFO(); info.cbAssemblyInfo = 0; hr = IAssemblyCache_QueryAssemblyInfo(cache, QUERYASMINFO_FLAG_VALIDATE, L"wine", &info); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); + ok(hr == S_OK, "Expected S_OK, got %08lx\n", hr); ok(info.cbAssemblyInfo == sizeof(ASSEMBLY_INFO), - "Expected sizeof(ASSEMBLY_INFO), got %d\n", info.cbAssemblyInfo); + "Expected sizeof(ASSEMBLY_INFO), got %ld\n", info.cbAssemblyInfo); ok(info.dwAssemblyFlags == ASSEMBLYINFO_FLAG_INSTALLED, - "Expected ASSEMBLYINFO_FLAG_INSTALLED, got %08x\n", info.dwAssemblyFlags); + "Expected ASSEMBLYINFO_FLAG_INSTALLED, got %08lx\n", info.dwAssemblyFlags); ok(info.uliAssemblySizeInKB.u.HighPart == 0, - "Expected 0, got %d\n", info.uliAssemblySizeInKB.u.HighPart); + "Expected 0, got %ld\n", info.uliAssemblySizeInKB.u.HighPart); ok(info.uliAssemblySizeInKB.u.LowPart == 0, - "Expected 0, got %d\n", info.uliAssemblySizeInKB.u.LowPart); + "Expected 0, got %ld\n", info.uliAssemblySizeInKB.u.LowPart); ok(!lstrcmpW(info.pszCurrentAssemblyPathBuf, asmpath), "Wrong assembly path returned\n"); ok(info.cchBuf == lstrlenW(asmpath) + 1, - "Expected %d, got %d\n", lstrlenW(asmpath) + 1, info.cchBuf); + "Expected %d, got %ld\n", lstrlenW(asmpath) + 1, info.cchBuf);
/* info.cbAssemblyInfo is 1 */ INIT_ASM_INFO(); info.cbAssemblyInfo = 1; hr = IAssemblyCache_QueryAssemblyInfo(cache, QUERYASMINFO_FLAG_VALIDATE, L"wine", &info); - ok(hr == E_INVALIDARG, "Expected E_INVALIDARG, got %08x\n", hr); - ok(info.cbAssemblyInfo == 1, "Expected 1, got %d\n", info.cbAssemblyInfo); - ok(info.dwAssemblyFlags == 0, "Expected 0, got %08x\n", info.dwAssemblyFlags); + ok(hr == E_INVALIDARG, "Expected E_INVALIDARG, got %08lx\n", hr); + ok(info.cbAssemblyInfo == 1, "Expected 1, got %ld\n", info.cbAssemblyInfo); + ok(info.dwAssemblyFlags == 0, "Expected 0, got %08lx\n", info.dwAssemblyFlags); ok(info.uliAssemblySizeInKB.u.HighPart == 0, - "Expected 0, got %d\n", info.uliAssemblySizeInKB.u.HighPart); + "Expected 0, got %ld\n", info.uliAssemblySizeInKB.u.HighPart); ok(info.uliAssemblySizeInKB.u.LowPart == 0, - "Expected 0, got %d\n", info.uliAssemblySizeInKB.u.LowPart); + "Expected 0, got %ld\n", info.uliAssemblySizeInKB.u.LowPart); ok(!lstrcmpW(info.pszCurrentAssemblyPathBuf, L""), "Assembly path was changed\n"); - ok(info.cchBuf == MAX_PATH, "Expected MAX_PATH, got %d\n", info.cchBuf); + ok(info.cchBuf == MAX_PATH, "Expected MAX_PATH, got %ld\n", info.cchBuf);
/* info.cbAssemblyInfo is > sizeof(ASSEMBLY_INFO) */ INIT_ASM_INFO(); info.cbAssemblyInfo = sizeof(ASSEMBLY_INFO) * 2; hr = IAssemblyCache_QueryAssemblyInfo(cache, QUERYASMINFO_FLAG_GETSIZE, L"wine", &info); - ok(hr == E_INVALIDARG, "Expected E_INVALIDARG, got %08x\n", hr); + ok(hr == E_INVALIDARG, "Expected E_INVALIDARG, got %08lx\n", hr); ok(info.cbAssemblyInfo == sizeof(ASSEMBLY_INFO) * 2, - "Expected sizeof(ASSEMBLY_INFO) * 2, got %d\n", info.cbAssemblyInfo); - ok(info.dwAssemblyFlags == 0, "Expected 0, got %08x\n", info.dwAssemblyFlags); + "Expected sizeof(ASSEMBLY_INFO) * 2, got %ld\n", info.cbAssemblyInfo); + ok(info.dwAssemblyFlags == 0, "Expected 0, got %08lx\n", info.dwAssemblyFlags); ok(info.uliAssemblySizeInKB.u.HighPart == 0, - "Expected 0, got %d\n", info.uliAssemblySizeInKB.u.HighPart); + "Expected 0, got %ld\n", info.uliAssemblySizeInKB.u.HighPart); ok(info.uliAssemblySizeInKB.u.LowPart == 0, - "Expected 0, got %d\n", info.uliAssemblySizeInKB.u.LowPart); + "Expected 0, got %ld\n", info.uliAssemblySizeInKB.u.LowPart); ok(!lstrcmpW(info.pszCurrentAssemblyPathBuf, L""), "Assembly path was changed\n"); - ok(info.cchBuf == MAX_PATH, "Expected MAX_PATH, got %d\n", info.cchBuf); + ok(info.cchBuf == MAX_PATH, "Expected MAX_PATH, got %ld\n", info.cchBuf);
/* QUERYASMINFO_FLAG_GETSIZE */ INIT_ASM_INFO(); hr = IAssemblyCache_QueryAssemblyInfo(cache, QUERYASMINFO_FLAG_GETSIZE, L"wine", &info); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); + ok(hr == S_OK, "Expected S_OK, got %08lx\n", hr); ok(info.cbAssemblyInfo == sizeof(ASSEMBLY_INFO), - "Expected sizeof(ASSEMBLY_INFO), got %d\n", info.cbAssemblyInfo); + "Expected sizeof(ASSEMBLY_INFO), got %ld\n", info.cbAssemblyInfo); ok(info.dwAssemblyFlags == ASSEMBLYINFO_FLAG_INSTALLED, - "Expected ASSEMBLYINFO_FLAG_INSTALLED, got %08x\n", info.dwAssemblyFlags); + "Expected ASSEMBLYINFO_FLAG_INSTALLED, got %08lx\n", info.dwAssemblyFlags); ok(info.uliAssemblySizeInKB.u.HighPart == 0, - "Expected 0, got %d\n", info.uliAssemblySizeInKB.u.HighPart); + "Expected 0, got %ld\n", info.uliAssemblySizeInKB.u.HighPart); todo_wine { ok((info.uliAssemblySizeInKB.u.LowPart == 4), - "Expected 4, got %d\n", info.uliAssemblySizeInKB.u.LowPart); + "Expected 4, got %ld\n", info.uliAssemblySizeInKB.u.LowPart); } ok(!lstrcmpW(info.pszCurrentAssemblyPathBuf, asmpath), "Wrong assembly path returned\n"); ok(info.cchBuf == lstrlenW(asmpath) + 1, - "Expected %d, got %d\n", lstrlenW(asmpath) + 1, info.cchBuf); + "Expected %d, got %ld\n", lstrlenW(asmpath) + 1, info.cchBuf);
/* QUERYASMINFO_FLAG_GETSIZE and QUERYASMINFO_FLAG_VALIDATE */ INIT_ASM_INFO(); hr = IAssemblyCache_QueryAssemblyInfo(cache, QUERYASMINFO_FLAG_GETSIZE | QUERYASMINFO_FLAG_VALIDATE, L"wine", &info); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); + ok(hr == S_OK, "Expected S_OK, got %08lx\n", hr); ok(info.cbAssemblyInfo == sizeof(ASSEMBLY_INFO), - "Expected sizeof(ASSEMBLY_INFO), got %d\n", info.cbAssemblyInfo); + "Expected sizeof(ASSEMBLY_INFO), got %ld\n", info.cbAssemblyInfo); ok(info.dwAssemblyFlags == ASSEMBLYINFO_FLAG_INSTALLED, - "Expected ASSEMBLYINFO_FLAG_INSTALLED, got %08x\n", info.dwAssemblyFlags); + "Expected ASSEMBLYINFO_FLAG_INSTALLED, got %08lx\n", info.dwAssemblyFlags); ok(info.uliAssemblySizeInKB.u.HighPart == 0, - "Expected 0, got %d\n", info.uliAssemblySizeInKB.u.HighPart); + "Expected 0, got %ld\n", info.uliAssemblySizeInKB.u.HighPart); todo_wine { ok((info.uliAssemblySizeInKB.u.LowPart == 4), - "Expected 4, got %d\n", info.uliAssemblySizeInKB.u.LowPart); + "Expected 4, got %ld\n", info.uliAssemblySizeInKB.u.LowPart); } ok(!lstrcmpW(info.pszCurrentAssemblyPathBuf, asmpath), "Wrong assembly path returned\n"); ok(info.cchBuf == lstrlenW(asmpath) + 1, - "Expected %d, got %d\n", lstrlenW(asmpath) + 1, info.cchBuf); + "Expected %d, got %ld\n", lstrlenW(asmpath) + 1, info.cchBuf);
/* info.pszCurrentAssemblyPathBuf is NULL */ INIT_ASM_INFO(); info.pszCurrentAssemblyPathBuf = NULL; hr = IAssemblyCache_QueryAssemblyInfo(cache, QUERYASMINFO_FLAG_GETSIZE, L"wine", &info); ok(info.cbAssemblyInfo == sizeof(ASSEMBLY_INFO), - "Expected sizeof(ASSEMBLY_INFO), got %d\n", info.cbAssemblyInfo); + "Expected sizeof(ASSEMBLY_INFO), got %ld\n", info.cbAssemblyInfo); ok(info.dwAssemblyFlags == ASSEMBLYINFO_FLAG_INSTALLED, - "Expected ASSEMBLYINFO_FLAG_INSTALLED, got %08x\n", info.dwAssemblyFlags); + "Expected ASSEMBLYINFO_FLAG_INSTALLED, got %08lx\n", info.dwAssemblyFlags); ok(info.uliAssemblySizeInKB.u.HighPart == 0, - "Expected 0, got %d\n", info.uliAssemblySizeInKB.u.HighPart); - ok(hr == E_NOT_SUFFICIENT_BUFFER, "Expected E_NOT_SUFFICIENT_BUFFER, got %08x\n", hr); + "Expected 0, got %ld\n", info.uliAssemblySizeInKB.u.HighPart); + ok(hr == E_NOT_SUFFICIENT_BUFFER, "Expected E_NOT_SUFFICIENT_BUFFER, got %08lx\n", hr); todo_wine { ok((info.uliAssemblySizeInKB.u.LowPart == 4), - "Expected 4, got %d\n", info.uliAssemblySizeInKB.u.LowPart); + "Expected 4, got %ld\n", info.uliAssemblySizeInKB.u.LowPart); } ok(info.cchBuf == lstrlenW(asmpath) + 1, - "Expected %d, got %d\n", lstrlenW(asmpath) + 1, info.cchBuf); + "Expected %d, got %ld\n", lstrlenW(asmpath) + 1, info.cchBuf);
/* info.cchBuf is exactly size of asmpath */ INIT_ASM_INFO(); info.cchBuf = lstrlenW(asmpath); hr = IAssemblyCache_QueryAssemblyInfo(cache, QUERYASMINFO_FLAG_GETSIZE, L"wine", &info); ok(info.cbAssemblyInfo == sizeof(ASSEMBLY_INFO), - "Expected sizeof(ASSEMBLY_INFO), got %d\n", info.cbAssemblyInfo); + "Expected sizeof(ASSEMBLY_INFO), got %ld\n", info.cbAssemblyInfo); ok(info.dwAssemblyFlags == ASSEMBLYINFO_FLAG_INSTALLED, - "Expected ASSEMBLYINFO_FLAG_INSTALLED, got %08x\n", info.dwAssemblyFlags); + "Expected ASSEMBLYINFO_FLAG_INSTALLED, got %08lx\n", info.dwAssemblyFlags); ok(info.uliAssemblySizeInKB.u.HighPart == 0, - "Expected 0, got %d\n", info.uliAssemblySizeInKB.u.HighPart); + "Expected 0, got %ld\n", info.uliAssemblySizeInKB.u.HighPart); ok(!lstrcmpW(info.pszCurrentAssemblyPathBuf, L""), "Assembly path was changed\n"); - ok(hr == E_NOT_SUFFICIENT_BUFFER, "Expected E_NOT_SUFFICIENT_BUFFER, got %08x\n", hr); + ok(hr == E_NOT_SUFFICIENT_BUFFER, "Expected E_NOT_SUFFICIENT_BUFFER, got %08lx\n", hr); todo_wine { ok((info.uliAssemblySizeInKB.u.LowPart == 4), - "Expected 4, got %d\n", info.uliAssemblySizeInKB.u.LowPart); + "Expected 4, got %ld\n", info.uliAssemblySizeInKB.u.LowPart); } ok(info.cchBuf == lstrlenW(asmpath) + 1, - "Expected %d, got %d\n", lstrlenW(asmpath) + 1, info.cchBuf); + "Expected %d, got %ld\n", lstrlenW(asmpath) + 1, info.cchBuf);
/* info.cchBuf has room for NULL-terminator */ INIT_ASM_INFO(); info.cchBuf = lstrlenW(asmpath) + 1; hr = IAssemblyCache_QueryAssemblyInfo(cache, QUERYASMINFO_FLAG_GETSIZE, L"wine", &info); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); + ok(hr == S_OK, "Expected S_OK, got %08lx\n", hr); ok(info.cbAssemblyInfo == sizeof(ASSEMBLY_INFO), - "Expected sizeof(ASSEMBLY_INFO), got %d\n", info.cbAssemblyInfo); + "Expected sizeof(ASSEMBLY_INFO), got %ld\n", info.cbAssemblyInfo); ok(info.dwAssemblyFlags == ASSEMBLYINFO_FLAG_INSTALLED, - "Expected ASSEMBLYINFO_FLAG_INSTALLED, got %08x\n", info.dwAssemblyFlags); + "Expected ASSEMBLYINFO_FLAG_INSTALLED, got %08lx\n", info.dwAssemblyFlags); ok(info.uliAssemblySizeInKB.u.HighPart == 0, - "Expected 0, got %d\n", info.uliAssemblySizeInKB.u.HighPart); + "Expected 0, got %ld\n", info.uliAssemblySizeInKB.u.HighPart); ok(info.cchBuf == lstrlenW(asmpath) + 1, - "Expected %d, got %d\n", lstrlenW(asmpath) + 1, info.cchBuf); + "Expected %d, got %ld\n", lstrlenW(asmpath) + 1, info.cchBuf); todo_wine { ok((info.uliAssemblySizeInKB.u.LowPart == 4), - "Expected 4, got %d\n", info.uliAssemblySizeInKB.u.LowPart); + "Expected 4, got %ld\n", info.uliAssemblySizeInKB.u.LowPart); } ok(!lstrcmpW(info.pszCurrentAssemblyPathBuf, asmpath), "Wrong assembly path returned\n"); @@ -1266,59 +1266,59 @@ static void test_QueryAssemblyInfo(void) lstrcpyW(name, L"wine, Version=1.0.0.0"); hr = IAssemblyCache_QueryAssemblyInfo(cache, QUERYASMINFO_FLAG_GETSIZE, name, &info); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); + ok(hr == S_OK, "Expected S_OK, got %08lx\n", hr); ok(info.cbAssemblyInfo == sizeof(ASSEMBLY_INFO), - "Expected sizeof(ASSEMBLY_INFO), got %d\n", info.cbAssemblyInfo); + "Expected sizeof(ASSEMBLY_INFO), got %ld\n", info.cbAssemblyInfo); ok(info.dwAssemblyFlags == ASSEMBLYINFO_FLAG_INSTALLED, - "Expected ASSEMBLYINFO_FLAG_INSTALLED, got %08x\n", info.dwAssemblyFlags); + "Expected ASSEMBLYINFO_FLAG_INSTALLED, got %08lx\n", info.dwAssemblyFlags); ok(info.uliAssemblySizeInKB.u.HighPart == 0, - "Expected 0, got %d\n", info.uliAssemblySizeInKB.u.HighPart); + "Expected 0, got %ld\n", info.uliAssemblySizeInKB.u.HighPart); todo_wine { ok((info.uliAssemblySizeInKB.u.LowPart == 4), - "Expected 4, got %d\n", info.uliAssemblySizeInKB.u.LowPart); + "Expected 4, got %ld\n", info.uliAssemblySizeInKB.u.LowPart); } ok(!lstrcmpW(info.pszCurrentAssemblyPathBuf, asmpath), "Wrong assembly path returned\n"); ok(info.cchBuf == lstrlenW(asmpath) + 1, - "Expected %d, got %d\n", lstrlenW(asmpath) + 1, info.cchBuf); + "Expected %d, got %ld\n", lstrlenW(asmpath) + 1, info.cchBuf);
/* short buffer, QUERYASMINFO_FLAG_VALIDATE */ memset(&info, 0, sizeof(info)); lstrcpyW(name, L"wine, Version=1.0.0.00000"); hr = IAssemblyCache_QueryAssemblyInfo(cache, QUERYASMINFO_FLAG_VALIDATE, name, &info); - ok(hr == E_NOT_SUFFICIENT_BUFFER, "got %08x\n", hr); - ok(info.dwAssemblyFlags == ASSEMBLYINFO_FLAG_INSTALLED, "got %08x\n", info.dwAssemblyFlags); + ok(hr == E_NOT_SUFFICIENT_BUFFER, "got %08lx\n", hr); + ok(info.dwAssemblyFlags == ASSEMBLYINFO_FLAG_INSTALLED, "got %08lx\n", info.dwAssemblyFlags);
/* short buffer, QUERYASMINFO_FLAG_GETSIZE */ memset(&info, 0, sizeof(info)); lstrcpyW(name, L"wine, Version=1.0.0.00000"); hr = IAssemblyCache_QueryAssemblyInfo(cache, QUERYASMINFO_FLAG_GETSIZE, name, &info); - ok(hr == E_NOT_SUFFICIENT_BUFFER, "got %08x\n", hr); - ok(info.dwAssemblyFlags == ASSEMBLYINFO_FLAG_INSTALLED, "got %08x\n", info.dwAssemblyFlags); + ok(hr == E_NOT_SUFFICIENT_BUFFER, "got %08lx\n", hr); + ok(info.dwAssemblyFlags == ASSEMBLYINFO_FLAG_INSTALLED, "got %08lx\n", info.dwAssemblyFlags);
/* display name is "wine, Version=1.0.0.00000" */ INIT_ASM_INFO(); hr = IAssemblyCache_QueryAssemblyInfo(cache, QUERYASMINFO_FLAG_GETSIZE, name, &info); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); + ok(hr == S_OK, "Expected S_OK, got %08lx\n", hr); ok(info.cbAssemblyInfo == sizeof(ASSEMBLY_INFO), - "Expected sizeof(ASSEMBLY_INFO), got %d\n", info.cbAssemblyInfo); + "Expected sizeof(ASSEMBLY_INFO), got %ld\n", info.cbAssemblyInfo); ok(info.dwAssemblyFlags == ASSEMBLYINFO_FLAG_INSTALLED, - "Expected ASSEMBLYINFO_FLAG_INSTALLED, got %08x\n", info.dwAssemblyFlags); + "Expected ASSEMBLYINFO_FLAG_INSTALLED, got %08lx\n", info.dwAssemblyFlags); ok(info.uliAssemblySizeInKB.u.HighPart == 0, - "Expected 0, got %d\n", info.uliAssemblySizeInKB.u.HighPart); + "Expected 0, got %ld\n", info.uliAssemblySizeInKB.u.HighPart); todo_wine { ok((info.uliAssemblySizeInKB.u.LowPart == 4), - "Expected 4, got %d\n", info.uliAssemblySizeInKB.u.LowPart); + "Expected 4, got %ld\n", info.uliAssemblySizeInKB.u.LowPart); } ok(!lstrcmpW(info.pszCurrentAssemblyPathBuf, asmpath), "Wrong assembly path returned\n"); ok(info.cchBuf == lstrlenW(asmpath) + 1, - "Expected %d, got %d\n", lstrlenW(asmpath) + 1, info.cchBuf); + "Expected %d, got %ld\n", lstrlenW(asmpath) + 1, info.cchBuf);
/* display name is "wine, Version=1.0.0.1", versions don't match */ INIT_ASM_INFO(); @@ -1326,17 +1326,17 @@ static void test_QueryAssemblyInfo(void) hr = IAssemblyCache_QueryAssemblyInfo(cache, QUERYASMINFO_FLAG_GETSIZE, name, &info); ok(hr == HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND), - "Expected HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND), got %08x\n", hr); + "Expected HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND), got %08lx\n", hr); ok(info.cbAssemblyInfo == sizeof(ASSEMBLY_INFO), - "Expected sizeof(ASSEMBLY_INFO), got %d\n", info.cbAssemblyInfo); - ok(info.dwAssemblyFlags == 0, "Expected 0, got %08x\n", info.dwAssemblyFlags); + "Expected sizeof(ASSEMBLY_INFO), got %ld\n", info.cbAssemblyInfo); + ok(info.dwAssemblyFlags == 0, "Expected 0, got %08lx\n", info.dwAssemblyFlags); ok(info.uliAssemblySizeInKB.u.HighPart == 0, - "Expected 0, got %d\n", info.uliAssemblySizeInKB.u.HighPart); + "Expected 0, got %ld\n", info.uliAssemblySizeInKB.u.HighPart); ok(info.uliAssemblySizeInKB.u.LowPart == 0, - "Expected 0, got %d\n", info.uliAssemblySizeInKB.u.LowPart); + "Expected 0, got %ld\n", info.uliAssemblySizeInKB.u.LowPart); ok(!lstrcmpW(info.pszCurrentAssemblyPathBuf, L""), "Assembly path was changed\n"); - ok(info.cchBuf == MAX_PATH, "Expected MAX_PATH, got %d\n", info.cchBuf); + ok(info.cchBuf == MAX_PATH, "Expected MAX_PATH, got %ld\n", info.cchBuf);
/* display name is "wine,version=1.0.0.1,publicKeyToken=2d03617b1c31e2f5,culture=neutral" */ INIT_ASM_INFO(); @@ -1344,51 +1344,51 @@ static void test_QueryAssemblyInfo(void) hr = IAssemblyCache_QueryAssemblyInfo(cache, QUERYASMINFO_FLAG_GETSIZE, name, &info); ok(hr == HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND), - "Expected HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND), got %08x\n", hr); + "Expected HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND), got %08lx\n", hr); ok(info.cbAssemblyInfo == sizeof(ASSEMBLY_INFO), - "Expected sizeof(ASSEMBLY_INFO), got %d\n", info.cbAssemblyInfo); - ok(info.dwAssemblyFlags == 0, "Expected 0, got %08x\n", info.dwAssemblyFlags); + "Expected sizeof(ASSEMBLY_INFO), got %ld\n", info.cbAssemblyInfo); + ok(info.dwAssemblyFlags == 0, "Expected 0, got %08lx\n", info.dwAssemblyFlags); ok(info.uliAssemblySizeInKB.u.HighPart == 0, - "Expected 0, got %d\n", info.uliAssemblySizeInKB.u.HighPart); + "Expected 0, got %ld\n", info.uliAssemblySizeInKB.u.HighPart); ok(info.uliAssemblySizeInKB.u.LowPart == 0, - "Expected 0, got %d\n", info.uliAssemblySizeInKB.u.LowPart); + "Expected 0, got %ld\n", info.uliAssemblySizeInKB.u.LowPart); ok(!lstrcmpW(info.pszCurrentAssemblyPathBuf, L""), "Assembly path was changed\n"); - ok(info.cchBuf == MAX_PATH, "Expected MAX_PATH, got %d\n", info.cchBuf); + ok(info.cchBuf == MAX_PATH, "Expected MAX_PATH, got %ld\n", info.cchBuf);
/* display name is "mscorlib.dll,version=0.0.0.0,culture=neutral,publicKeyToken=null" */ INIT_ASM_INFO(); lstrcpyW(name, L"mscorlib.dll,version=0.0.0.0,culture=neutral,publicKeyToken=null"); hr = IAssemblyCache_QueryAssemblyInfo(cache, 0, name, &info); - ok(hr == FUSION_E_PRIVATE_ASM_DISALLOWED, "got %08x\n", hr); + ok(hr == FUSION_E_PRIVATE_ASM_DISALLOWED, "got %08lx\n", hr);
/* display name is "mscorlib.dll,publicKeyToken=nuLl" */ INIT_ASM_INFO(); lstrcpyW(name, L"mscorlib.dll,publicKeyToken=nuLl"); hr = IAssemblyCache_QueryAssemblyInfo(cache, 0, name, &info); - ok(hr == FUSION_E_PRIVATE_ASM_DISALLOWED, "got %08x\n", hr); + ok(hr == FUSION_E_PRIVATE_ASM_DISALLOWED, "got %08lx\n", hr);
/* display name is "wine, Culture=neutral" */ INIT_ASM_INFO(); lstrcpyW(name, L"wine, Culture=neutral"); hr = IAssemblyCache_QueryAssemblyInfo(cache, QUERYASMINFO_FLAG_GETSIZE, name, &info); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); + ok(hr == S_OK, "Expected S_OK, got %08lx\n", hr); ok(info.cbAssemblyInfo == sizeof(ASSEMBLY_INFO), - "Expected sizeof(ASSEMBLY_INFO), got %d\n", info.cbAssemblyInfo); + "Expected sizeof(ASSEMBLY_INFO), got %ld\n", info.cbAssemblyInfo); ok(info.dwAssemblyFlags == ASSEMBLYINFO_FLAG_INSTALLED, - "Expected ASSEMBLYINFO_FLAG_INSTALLED, got %08x\n", info.dwAssemblyFlags); + "Expected ASSEMBLYINFO_FLAG_INSTALLED, got %08lx\n", info.dwAssemblyFlags); ok(info.uliAssemblySizeInKB.u.HighPart == 0, - "Expected 0, got %d\n", info.uliAssemblySizeInKB.u.HighPart); + "Expected 0, got %ld\n", info.uliAssemblySizeInKB.u.HighPart); todo_wine { ok((info.uliAssemblySizeInKB.u.LowPart == 4), - "Expected 4, got %d\n", info.uliAssemblySizeInKB.u.LowPart); + "Expected 4, got %ld\n", info.uliAssemblySizeInKB.u.LowPart); } ok(!lstrcmpW(info.pszCurrentAssemblyPathBuf, asmpath), "Wrong assembly path returned\n"); ok(info.cchBuf == lstrlenW(asmpath) + 1, - "Expected %d, got %d\n", lstrlenW(asmpath) + 1, info.cchBuf); + "Expected %d, got %ld\n", lstrlenW(asmpath) + 1, info.cchBuf);
/* display name is "wine, Culture=en", cultures don't match */ INIT_ASM_INFO(); @@ -1396,39 +1396,39 @@ static void test_QueryAssemblyInfo(void) hr = IAssemblyCache_QueryAssemblyInfo(cache, QUERYASMINFO_FLAG_GETSIZE, name, &info); ok(hr == HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND), - "Expected HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND), got %08x\n", hr); - ok(info.dwAssemblyFlags == 0, "Expected 0, got %08x\n", info.dwAssemblyFlags); + "Expected HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND), got %08lx\n", hr); + ok(info.dwAssemblyFlags == 0, "Expected 0, got %08lx\n", info.dwAssemblyFlags); ok(info.cbAssemblyInfo == sizeof(ASSEMBLY_INFO), - "Expected sizeof(ASSEMBLY_INFO), got %d\n", info.cbAssemblyInfo); + "Expected sizeof(ASSEMBLY_INFO), got %ld\n", info.cbAssemblyInfo); ok(info.uliAssemblySizeInKB.u.HighPart == 0, - "Expected 0, got %d\n", info.uliAssemblySizeInKB.u.HighPart); + "Expected 0, got %ld\n", info.uliAssemblySizeInKB.u.HighPart); ok(info.uliAssemblySizeInKB.u.LowPart == 0, - "Expected 0, got %d\n", info.uliAssemblySizeInKB.u.LowPart); + "Expected 0, got %ld\n", info.uliAssemblySizeInKB.u.LowPart); ok(!lstrcmpW(info.pszCurrentAssemblyPathBuf, L""), "Assembly path was changed\n"); - ok(info.cchBuf == MAX_PATH, "Expected MAX_PATH, got %d\n", info.cchBuf); + ok(info.cchBuf == MAX_PATH, "Expected MAX_PATH, got %ld\n", info.cchBuf);
/* display name is "wine, PublicKeyTokens=2d03617b1c31e2f5" */ INIT_ASM_INFO(); lstrcpyW(name, L"wine, PublicKeyToken=2d03617b1c31e2f5"); hr = IAssemblyCache_QueryAssemblyInfo(cache, QUERYASMINFO_FLAG_GETSIZE, name, &info); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); + ok(hr == S_OK, "Expected S_OK, got %08lx\n", hr); ok(info.cbAssemblyInfo == sizeof(ASSEMBLY_INFO), - "Expected sizeof(ASSEMBLY_INFO), got %d\n", info.cbAssemblyInfo); + "Expected sizeof(ASSEMBLY_INFO), got %ld\n", info.cbAssemblyInfo); ok(info.dwAssemblyFlags == ASSEMBLYINFO_FLAG_INSTALLED, - "Expected ASSEMBLYINFO_FLAG_INSTALLED, got %08x\n", info.dwAssemblyFlags); + "Expected ASSEMBLYINFO_FLAG_INSTALLED, got %08lx\n", info.dwAssemblyFlags); ok(info.uliAssemblySizeInKB.u.HighPart == 0, - "Expected 0, got %d\n", info.uliAssemblySizeInKB.u.HighPart); + "Expected 0, got %ld\n", info.uliAssemblySizeInKB.u.HighPart); todo_wine { ok((info.uliAssemblySizeInKB.u.LowPart == 4), - "Expected 4, got %d\n", info.uliAssemblySizeInKB.u.LowPart); + "Expected 4, got %ld\n", info.uliAssemblySizeInKB.u.LowPart); } ok(!lstrcmpW(info.pszCurrentAssemblyPathBuf, asmpath), "Wrong assembly path returned\n"); ok(info.cchBuf == lstrlenW(asmpath) + 1, - "Expected %d, got %d\n", lstrlenW(asmpath) + 1, info.cchBuf); + "Expected %d, got %ld\n", lstrlenW(asmpath) + 1, info.cchBuf);
/* display name is "wine, PublicKeyToken=aaaaaaaaaaaaaaaa", pubkeys don't match */ INIT_ASM_INFO(); @@ -1436,39 +1436,39 @@ static void test_QueryAssemblyInfo(void) hr = IAssemblyCache_QueryAssemblyInfo(cache, QUERYASMINFO_FLAG_GETSIZE, name, &info); ok(hr == HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND), - "Expected HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND), got %08x\n", hr); + "Expected HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND), got %08lx\n", hr); ok(info.cbAssemblyInfo == sizeof(ASSEMBLY_INFO), - "Expected sizeof(ASSEMBLY_INFO), got %d\n", info.cbAssemblyInfo); - ok(info.dwAssemblyFlags == 0, "Expected 0, got %08x\n", info.dwAssemblyFlags); + "Expected sizeof(ASSEMBLY_INFO), got %ld\n", info.cbAssemblyInfo); + ok(info.dwAssemblyFlags == 0, "Expected 0, got %08lx\n", info.dwAssemblyFlags); ok(info.uliAssemblySizeInKB.u.HighPart == 0, - "Expected 0, got %d\n", info.uliAssemblySizeInKB.u.HighPart); + "Expected 0, got %ld\n", info.uliAssemblySizeInKB.u.HighPart); ok(info.uliAssemblySizeInKB.u.LowPart == 0, - "Expected 0, got %d\n", info.uliAssemblySizeInKB.u.LowPart); + "Expected 0, got %ld\n", info.uliAssemblySizeInKB.u.LowPart); ok(!lstrcmpW(info.pszCurrentAssemblyPathBuf, L""), "Assembly path was changed\n"); - ok(info.cchBuf == MAX_PATH, "Expected MAX_PATH, got %d\n", info.cchBuf); + ok(info.cchBuf == MAX_PATH, "Expected MAX_PATH, got %ld\n", info.cchBuf);
/* display name is "wine, BadProp=buh", bad property */ INIT_ASM_INFO(); lstrcpyW(name, L"wine, BadProp=buh"); hr = IAssemblyCache_QueryAssemblyInfo(cache, QUERYASMINFO_FLAG_GETSIZE, name, &info); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); + ok(hr == S_OK, "Expected S_OK, got %08lx\n", hr); ok(info.cbAssemblyInfo == sizeof(ASSEMBLY_INFO), - "Expected sizeof(ASSEMBLY_INFO), got %d\n", info.cbAssemblyInfo); + "Expected sizeof(ASSEMBLY_INFO), got %ld\n", info.cbAssemblyInfo); ok(info.dwAssemblyFlags == ASSEMBLYINFO_FLAG_INSTALLED, - "Expected ASSEMBLYINFO_FLAG_INSTALLED, got %08x\n", info.dwAssemblyFlags); + "Expected ASSEMBLYINFO_FLAG_INSTALLED, got %08lx\n", info.dwAssemblyFlags); ok(info.uliAssemblySizeInKB.u.HighPart == 0, - "Expected 0, got %d\n", info.uliAssemblySizeInKB.u.HighPart); + "Expected 0, got %ld\n", info.uliAssemblySizeInKB.u.HighPart); todo_wine { ok((info.uliAssemblySizeInKB.u.LowPart == 4), - "Expected 4, got %d\n", info.uliAssemblySizeInKB.u.LowPart); + "Expected 4, got %ld\n", info.uliAssemblySizeInKB.u.LowPart); } ok(!lstrcmpW(info.pszCurrentAssemblyPathBuf, asmpath), "Wrong assembly path returned\n"); ok(info.cchBuf == lstrlenW(asmpath) + 1, - "Expected %d, got %d\n", lstrlenW(asmpath) + 1, info.cchBuf); + "Expected %d, got %ld\n", lstrlenW(asmpath) + 1, info.cchBuf);
/* no flags, display name is "wine, Version=1.0.0.0" */ INIT_ASM_INFO(); @@ -1476,18 +1476,18 @@ static void test_QueryAssemblyInfo(void) info.cchBuf = 0; lstrcpyW(name, L"wine, Version=1.0.0.0"); hr = IAssemblyCache_QueryAssemblyInfo(cache, 0, name, &info); - ok(hr == E_NOT_SUFFICIENT_BUFFER, "Expected E_NOT_SUFFICIENT_BUFFER, got %08x\n", hr); + ok(hr == E_NOT_SUFFICIENT_BUFFER, "Expected E_NOT_SUFFICIENT_BUFFER, got %08lx\n", hr); ok(info.cbAssemblyInfo == sizeof(ASSEMBLY_INFO), - "Expected sizeof(ASSEMBLY_INFO), got %d\n", info.cbAssemblyInfo); + "Expected sizeof(ASSEMBLY_INFO), got %ld\n", info.cbAssemblyInfo); ok(info.dwAssemblyFlags == ASSEMBLYINFO_FLAG_INSTALLED, - "Expected ASSEMBLYINFO_FLAG_INSTALLED, got %08x\n", info.dwAssemblyFlags); + "Expected ASSEMBLYINFO_FLAG_INSTALLED, got %08lx\n", info.dwAssemblyFlags);
/* uninstall the assembly from the GAC */ disp = 0xf00dbad; hr = IAssemblyCache_UninstallAssembly(cache, 0, L"wine", NULL, &disp); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); + ok(hr == S_OK, "Expected S_OK, got %08lx\n", hr); ok(disp == IASSEMBLYCACHE_UNINSTALL_DISPOSITION_UNINSTALLED, - "Expected IASSEMBLYCACHE_UNINSTALL_DISPOSITION_UNINSTALLED, got %d\n", disp); + "Expected IASSEMBLYCACHE_UNINSTALL_DISPOSITION_UNINSTALLED, got %ld\n", disp);
DeleteFileA("test.dll"); DeleteFileA("wine.dll"); diff --git a/dlls/fusion/tests/asmenum.c b/dlls/fusion/tests/asmenum.c index eb7181f33c5..60e523edc52 100644 --- a/dlls/fusion/tests/asmenum.c +++ b/dlls/fusion/tests/asmenum.c @@ -176,7 +176,7 @@ static void test_CreateAssemblyEnum(void) to_widechar(namestr, "wine"); asmname = NULL; hr = pCreateAssemblyNameObject(&asmname, namestr, CANOF_PARSE_DISPLAY_NAME, NULL); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); + ok(hr == S_OK, "Expected S_OK, got %08lx\n", hr); ok(asmname != NULL, "Expected non-NULL asmname\n");
/* pEnum is NULL */ @@ -184,13 +184,13 @@ static void test_CreateAssemblyEnum(void) { /* Crashes on .NET 1.x */ hr = pCreateAssemblyEnum(NULL, NULL, asmname, ASM_CACHE_GAC, NULL); - ok(hr == E_INVALIDARG, "Expected E_INVALIDARG, got %08x\n", hr); + ok(hr == E_INVALIDARG, "Expected E_INVALIDARG, got %08lx\n", hr); }
/* pName is NULL */ asmenum = NULL; hr = pCreateAssemblyEnum(&asmenum, NULL, NULL, ASM_CACHE_GAC, NULL); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); + ok(hr == S_OK, "Expected S_OK, got %08lx\n", hr); ok(asmenum != NULL, "Expected non-NULL asmenum\n");
IAssemblyEnum_Release(asmenum); @@ -198,14 +198,14 @@ static void test_CreateAssemblyEnum(void) /* dwFlags is ASM_CACHE_ROOT */ asmenum = (IAssemblyEnum *)0xdeadbeef; hr = pCreateAssemblyEnum(&asmenum, NULL, NULL, ASM_CACHE_ROOT, NULL); - ok(hr == E_INVALIDARG, "Expected E_INVALIDARG, got %08x\n", hr); + ok(hr == E_INVALIDARG, "Expected E_INVALIDARG, got %08lx\n", hr); ok(asmenum == (IAssemblyEnum *)0xdeadbeef, "Expected asmenum to be unchanged, got %p\n", asmenum);
/* invalid dwFlags */ asmenum = (IAssemblyEnum *)0xdeadbeef; hr = pCreateAssemblyEnum(&asmenum, NULL, NULL, 0, NULL); - ok(hr == E_INVALIDARG, "Expected E_INVALIDARG, got %08x\n", hr); + ok(hr == E_INVALIDARG, "Expected E_INVALIDARG, got %08lx\n", hr); ok(asmenum == (IAssemblyEnum *)0xdeadbeef, "Expected asmenum to be unchanged, got %p\n", asmenum);
@@ -306,7 +306,7 @@ static void test_enumerate(void)
size = MAX_PATH; hr = pGetCachePath(ASM_CACHE_GAC, buf, &size); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); + ok(hr == S_OK, "Expected S_OK, got %08lx\n", hr);
to_multibyte(path, buf); lstrcatA(path, "_32"); @@ -325,7 +325,7 @@ static void test_enumerate(void)
asmenum = NULL; hr = pCreateAssemblyEnum(&asmenum, NULL, NULL, ASM_CACHE_GAC, NULL); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); + ok(hr == S_OK, "Expected S_OK, got %08lx\n", hr); ok(asmenum != NULL, "Expected non-NULL asmenum\n");
while (IAssemblyEnum_GetNextAssembly(asmenum, NULL, &next, 0) == S_OK) @@ -356,7 +356,7 @@ static void test_enumerate(void) /* enumeration is exhausted */ next = (IAssemblyName *)0xdeadbeef; hr = IAssemblyEnum_GetNextAssembly(asmenum, NULL, &next, 0); - ok(hr == S_FALSE, "Expected S_FALSE, got %08x\n", hr); + ok(hr == S_FALSE, "Expected S_FALSE, got %08lx\n", hr); ok(next == (IAssemblyName *)0xdeadbeef, "Expected next to be unchanged, got %p\n", next);
@@ -395,7 +395,7 @@ static void test_enumerate_name(void)
size = MAX_PATH; hr = pGetCachePath(ASM_CACHE_GAC, buf, &size); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); + ok(hr == S_OK, "Expected S_OK, got %08lx\n", hr);
to_multibyte(gac, buf); create_full_path(gac); @@ -437,23 +437,23 @@ static void test_enumerate_name(void) to_widechar(namestr, "wine"); asmname = NULL; hr = pCreateAssemblyNameObject(&asmname, namestr, CANOF_PARSE_DISPLAY_NAME, NULL); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); + ok(hr == S_OK, "Expected S_OK, got %08lx\n", hr); ok(asmname != NULL, "Expected non-NULL asmname\n");
asmenum = NULL; hr = pCreateAssemblyEnum(&asmenum, NULL, asmname, ASM_CACHE_GAC, NULL); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); + ok(hr == S_OK, "Expected S_OK, got %08lx\n", hr); ok(asmenum != NULL, "Expected non-NULL asmenum\n");
next = NULL; hr = IAssemblyEnum_GetNextAssembly(asmenum, NULL, &next, 0); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); + ok(hr == S_OK, "Expected S_OK, got %08lx\n", hr); ok(next != NULL, "Expected non-NULL next\n");
size = MAX_PATH; hr = IAssemblyName_GetDisplayName(next, buf, &size, 0); to_multibyte(disp, buf); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); + ok(hr == S_OK, "Expected S_OK, got %08lx\n", hr); ok(!lstrcmpA(disp, exp[0]), "Expected "%s" or "%s", got "%s"\n", exp[0], exp[1], disp);
@@ -461,13 +461,13 @@ static void test_enumerate_name(void)
next = NULL; hr = IAssemblyEnum_GetNextAssembly(asmenum, NULL, &next, 0); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); + ok(hr == S_OK, "Expected S_OK, got %08lx\n", hr); ok(next != NULL, "Expected non-NULL next\n");
size = MAX_PATH; hr = IAssemblyName_GetDisplayName(next, buf, &size, 0); to_multibyte(disp, buf); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); + ok(hr == S_OK, "Expected S_OK, got %08lx\n", hr); ok(!lstrcmpA(disp, exp[1]) || !lstrcmpA(disp, exp[2]), /* Win98 */ "Expected "%s" or "%s", got "%s"\n", exp[1], exp[2], disp); @@ -476,13 +476,13 @@ static void test_enumerate_name(void)
next = NULL; hr = IAssemblyEnum_GetNextAssembly(asmenum, NULL, &next, 0); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); + ok(hr == S_OK, "Expected S_OK, got %08lx\n", hr); ok(next != NULL, "Expected non-NULL next\n");
size = MAX_PATH; hr = IAssemblyName_GetDisplayName(next, buf, &size, 0); to_multibyte(disp, buf); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); + ok(hr == S_OK, "Expected S_OK, got %08lx\n", hr); ok(!lstrcmpA(disp, exp[2]) || !lstrcmpA(disp, exp[1]), /* Win98 */ "Expected "%s" or "%s", got "%s"\n", exp[2], exp[1], disp); @@ -491,7 +491,7 @@ static void test_enumerate_name(void)
next = (IAssemblyName *)0xdeadbeef; hr = IAssemblyEnum_GetNextAssembly(asmenum, NULL, &next, 0); - ok(hr == S_FALSE, "Expected S_FALSE, got %08x\n", hr); + ok(hr == S_FALSE, "Expected S_FALSE, got %08lx\n", hr); ok(next == (IAssemblyName *)0xdeadbeef, "Expected next to be unchanged, got %p\n", next);
@@ -502,23 +502,23 @@ static void test_enumerate_name(void) to_widechar(namestr, "Wine, Version=1.0.1.2"); asmname = NULL; hr = pCreateAssemblyNameObject(&asmname, namestr, CANOF_PARSE_DISPLAY_NAME, NULL); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); + ok(hr == S_OK, "Expected S_OK, got %08lx\n", hr); ok(asmname != NULL, "Expected non-NULL asmname\n");
asmenum = NULL; hr = pCreateAssemblyEnum(&asmenum, NULL, asmname, ASM_CACHE_GAC, NULL); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); + ok(hr == S_OK, "Expected S_OK, got %08lx\n", hr); ok(asmenum != NULL, "Expected non-NULL asmenum\n");
next = NULL; hr = IAssemblyEnum_GetNextAssembly(asmenum, NULL, &next, 0); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); + ok(hr == S_OK, "Expected S_OK, got %08lx\n", hr); ok(next != NULL, "Expected non-NULL next\n");
size = MAX_PATH; hr = IAssemblyName_GetDisplayName(next, buf, &size, 0); to_multibyte(disp, buf); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); + ok(hr == S_OK, "Expected S_OK, got %08lx\n", hr); ok(!lstrcmpA(disp, exp[4]) || !lstrcmpA(disp, exp[5]), /* Win98 */ "Expected "%s" or "%s", got "%s"\n", exp[4], exp[5], disp); @@ -527,13 +527,13 @@ static void test_enumerate_name(void)
next = NULL; hr = IAssemblyEnum_GetNextAssembly(asmenum, NULL, &next, 0); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); + ok(hr == S_OK, "Expected S_OK, got %08lx\n", hr); ok(next != NULL, "Expected non-NULL next\n");
size = MAX_PATH; hr = IAssemblyName_GetDisplayName(next, buf, &size, 0); to_multibyte(disp, buf); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); + ok(hr == S_OK, "Expected S_OK, got %08lx\n", hr); ok(!lstrcmpA(disp, exp[5]) || !lstrcmpA(disp, exp[4]), /* Win98 */ "Expected "%s" or "%s", got "%s"\n", exp[5], exp[4], disp); @@ -542,7 +542,7 @@ static void test_enumerate_name(void)
next = (IAssemblyName *)0xdeadbeef; hr = IAssemblyEnum_GetNextAssembly(asmenum, NULL, &next, 0); - ok(hr == S_FALSE, "Expected S_FALSE, got %08x\n", hr); + ok(hr == S_FALSE, "Expected S_FALSE, got %08lx\n", hr); ok(next == (IAssemblyName *)0xdeadbeef, "Expected next to be unchanged, got %p\n", next);
@@ -553,43 +553,43 @@ static void test_enumerate_name(void) to_widechar(namestr, "Wine, PublicKeyToken=16a3fcd171e93a8d"); asmname = NULL; hr = pCreateAssemblyNameObject(&asmname, namestr, CANOF_PARSE_DISPLAY_NAME, NULL); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); + ok(hr == S_OK, "Expected S_OK, got %08lx\n", hr); ok(asmname != NULL, "Expected non-NULL asmname\n");
asmenum = NULL; hr = pCreateAssemblyEnum(&asmenum, NULL, asmname, ASM_CACHE_GAC, NULL); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); + ok(hr == S_OK, "Expected S_OK, got %08lx\n", hr); ok(asmenum != NULL, "Expected non-NULL asmenum\n");
next = NULL; hr = IAssemblyEnum_GetNextAssembly(asmenum, NULL, &next, 0); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); + ok(hr == S_OK, "Expected S_OK, got %08lx\n", hr); ok(next != NULL, "Expected non-NULL next\n");
size = MAX_PATH; hr = IAssemblyName_GetDisplayName(next, buf, &size, 0); to_multibyte(disp, buf); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); + ok(hr == S_OK, "Expected S_OK, got %08lx\n", hr); ok(!lstrcmpA(disp, exp[3]), "Expected "%s", got "%s"\n", exp[3], disp);
IAssemblyName_Release(next);
next = NULL; hr = IAssemblyEnum_GetNextAssembly(asmenum, NULL, &next, 0); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); + ok(hr == S_OK, "Expected S_OK, got %08lx\n", hr); ok(next != NULL, "Expected non-NULL next\n");
size = MAX_PATH; hr = IAssemblyName_GetDisplayName(next, buf, &size, 0); to_multibyte(disp, buf); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); + ok(hr == S_OK, "Expected S_OK, got %08lx\n", hr); ok(!lstrcmpA(disp, exp[5]), "Expected "%s", got "%s"\n", exp[5], disp);
IAssemblyName_Release(next);
next = (IAssemblyName *)0xdeadbeef; hr = IAssemblyEnum_GetNextAssembly(asmenum, NULL, &next, 0); - ok(hr == S_FALSE, "Expected S_FALSE, got %08x\n", hr); + ok(hr == S_FALSE, "Expected S_FALSE, got %08lx\n", hr); ok(next == (IAssemblyName *)0xdeadbeef, "Expected next to be unchanged, got %p\n", next);
@@ -600,36 +600,36 @@ static void test_enumerate_name(void) to_widechar(namestr, "wine, Culture=neutral"); asmname = NULL; hr = pCreateAssemblyNameObject(&asmname, namestr, CANOF_PARSE_DISPLAY_NAME, NULL); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); + ok(hr == S_OK, "Expected S_OK, got %08lx\n", hr); ok(asmname != NULL, "Expected non-NULL asmname\n");
asmenum = NULL; hr = pCreateAssemblyEnum(&asmenum, NULL, asmname, ASM_CACHE_GAC, NULL); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); + ok(hr == S_OK, "Expected S_OK, got %08lx\n", hr); ok(asmenum != NULL, "Expected non-NULL asmenum\n");
next = NULL; hr = IAssemblyEnum_GetNextAssembly(asmenum, NULL, &next, 0); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); + ok(hr == S_OK, "Expected S_OK, got %08lx\n", hr); ok(next != NULL, "Expected non-NULL next\n");
size = MAX_PATH; hr = IAssemblyName_GetDisplayName(next, buf, &size, 0); to_multibyte(disp, buf); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); + ok(hr == S_OK, "Expected S_OK, got %08lx\n", hr); ok(!lstrcmpA(disp, exp[0]), "Expected "%s", got "%s"\n", exp[0], disp);
IAssemblyName_Release(next);
next = NULL; hr = IAssemblyEnum_GetNextAssembly(asmenum, NULL, &next, 0); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); + ok(hr == S_OK, "Expected S_OK, got %08lx\n", hr); ok(next != NULL, "Expected non-NULL next\n");
size = MAX_PATH; hr = IAssemblyName_GetDisplayName(next, buf, &size, 0); to_multibyte(disp, buf); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); + ok(hr == S_OK, "Expected S_OK, got %08lx\n", hr); ok(!lstrcmpA(disp, exp[1]) || !lstrcmpA(disp, exp[2]), /* Win98 */ "Expected "%s" or "%s", got "%s"\n", exp[1], exp[2], disp); @@ -638,13 +638,13 @@ static void test_enumerate_name(void)
next = NULL; hr = IAssemblyEnum_GetNextAssembly(asmenum, NULL, &next, 0); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); + ok(hr == S_OK, "Expected S_OK, got %08lx\n", hr); ok(next != NULL, "Expected non-NULL next\n");
size = MAX_PATH; hr = IAssemblyName_GetDisplayName(next, buf, &size, 0); to_multibyte(disp, buf); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); + ok(hr == S_OK, "Expected S_OK, got %08lx\n", hr); ok(!lstrcmpA(disp, exp[2]) || !lstrcmpA(disp, exp[1]), /* Win98 */ "Expected "%s" or "%s", got "%s"\n", exp[2], exp[1], disp); @@ -653,7 +653,7 @@ static void test_enumerate_name(void)
next = (IAssemblyName *)0xdeadbeef; hr = IAssemblyEnum_GetNextAssembly(asmenum, NULL, &next, 0); - ok(hr == S_FALSE, "Expected S_FALSE, got %08x\n", hr); + ok(hr == S_FALSE, "Expected S_FALSE, got %08lx\n", hr); ok(next == (IAssemblyName *)0xdeadbeef, "Expected next to be unchanged, got %p\n", next);
diff --git a/dlls/fusion/tests/asmname.c b/dlls/fusion/tests/asmname.c index 3dd587a7f26..1d3aceaf2fa 100644 --- a/dlls/fusion/tests/asmname.c +++ b/dlls/fusion/tests/asmname.c @@ -357,20 +357,20 @@ static void test_assembly_name_props_line(IAssemblyName *name, ok(hr == vals[i].hr || broken(i >= ASM_NAME_CONFIG_MASK && hr == E_INVALIDARG) || /* .NET 1.1 */ broken(i >= ASM_NAME_FILE_MAJOR_VERSION && hr == E_INVALIDARG), /* .NET 1.0 */ - "%d: prop %d: Expected %08x, got %08x\n", line, i, vals[i].hr, hr); + "%d: prop %ld: Expected %08lx, got %08lx\n", line, i, vals[i].hr, hr); if (hr != E_INVALIDARG) { - ok(size == vals[i].size, "%d: prop %d: Expected %d, got %d\n", line, i, vals[i].size, size); + ok(size == vals[i].size, "%d: prop %ld: Expected %ld, got %ld\n", line, i, vals[i].size, size); if (!size) { - ok(str[0] == 0xcccc, "%d: prop %d: str[0] = %x\n", line, i, str[0]); + ok(str[0] == 0xcccc, "%d: prop %ld: str[0] = %x\n", line, i, str[0]); } else if (size != MAX_PATH) { if (i != ASM_NAME_NAME && i != ASM_NAME_CULTURE) - ok( !memcmp( vals[i].val, str, size ), "%d: prop %d: wrong value\n", line, i ); + ok( !memcmp( vals[i].val, str, size ), "%d: prop %ld: wrong value\n", line, i ); else - ok( !lstrcmpW( expect, str ), "%d: prop %d: Expected %s, got %s\n", + ok( !lstrcmpW( expect, str ), "%d: prop %ld: Expected %s, got %s\n", line, i, wine_dbgstr_w(expect), wine_dbgstr_w(str) ); }
@@ -379,8 +379,8 @@ static void test_assembly_name_props_line(IAssemblyName *name, size--; hr = IAssemblyName_GetProperty(name, i, str, &size); ok(hr == STRSAFE_E_INSUFFICIENT_BUFFER, - "%d: prop %d: Expected STRSAFE_E_INSUFFICIENT_BUFFER, got %08x\n", line, i, hr); - ok(size == vals[i].size, "%d: prop %d: Expected %d, got %d\n", line, i, vals[i].size, size); + "%d: prop %ld: Expected STRSAFE_E_INSUFFICIENT_BUFFER, got %08lx\n", line, i, hr); + ok(size == vals[i].size, "%d: prop %ld: Expected %ld, got %ld\n", line, i, vals[i].size, size); } } } @@ -401,18 +401,18 @@ static void test_CreateAssemblyNameObject(void) /* NULL ppAssemblyNameObj */ to_widechar(namestr, "wine.dll"); hr = pCreateAssemblyNameObject(NULL, namestr, 0, NULL); - ok(hr == E_INVALIDARG, "Expected E_INVALIDARG, got %08x\n", hr); + ok(hr == E_INVALIDARG, "Expected E_INVALIDARG, got %08lx\n", hr);
/* NULL szAssemblyName, CANOF_PARSE_DISPLAY_NAME */ name = (IAssemblyName *)0xdeadbeef; hr = pCreateAssemblyNameObject(&name, NULL, CANOF_PARSE_DISPLAY_NAME, NULL); - ok(hr == E_INVALIDARG, "Expected E_INVALIDARG, got %08x\n", hr); + ok(hr == E_INVALIDARG, "Expected E_INVALIDARG, got %08lx\n", hr); ok(name == (IAssemblyName *)0xdeadbeef, "Expected 0xdeadbeef, got %p\n", name);
/* empty szAssemblyName, CANOF_PARSE_DISPLAY_NAME */ name = (IAssemblyName *)0xdeadbeef; hr = pCreateAssemblyNameObject(&name, L"", CANOF_PARSE_DISPLAY_NAME, NULL); - ok(hr == E_INVALIDARG, "Expected E_INVALIDARG, got %08x\n", hr); + ok(hr == E_INVALIDARG, "Expected E_INVALIDARG, got %08lx\n", hr); ok(name == (IAssemblyName *)0xdeadbeef, "Expected 0xdeadbeef, got %p\n", name);
/* check the contents of the AssemblyName for default values */ @@ -420,30 +420,30 @@ static void test_CreateAssemblyNameObject(void) /* NULL szAssemblyName */ name = NULL; hr = pCreateAssemblyNameObject(&name, NULL, CANOF_SET_DEFAULT_VALUES, NULL); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); + ok(hr == S_OK, "Expected S_OK, got %08lx\n", hr); ok(name != NULL, "Expected non-NULL name\n");
size = MAX_PATH; hr = IAssemblyName_GetDisplayName(name, str, &size, ASM_DISPLAYF_FULL); ok(hr == FUSION_E_INVALID_NAME || broken(hr == E_INVALIDARG), /* .NET 1.x */ - "Expected FUSION_E_INVALID_NAME, got %08x\n", hr); + "Expected FUSION_E_INVALID_NAME, got %08lx\n", hr);
str[0] = 'a'; size = MAX_PATH; hr = IAssemblyName_GetName(name, &size, str); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr); ok(str[0] == 'a', "got %c\n", str[0]); - ok(!size, "got %u\n", size); + ok(!size, "got %lu\n", size);
hi = 0xbeefcace; lo = 0xcafebabe; hr = IAssemblyName_GetVersion(name, &hi, &lo); ok(hr == FUSION_E_INVALID_NAME || broken(hr == S_OK), /* .NET 1.x */ - "Expected FUSION_E_INVALID_NAME, got %08x\n", hr); - ok(hi == 0, "Expected 0, got %08x\n", hi); - ok(lo == 0, "Expected 0, got %08x\n", lo); + "Expected FUSION_E_INVALID_NAME, got %08lx\n", hr); + ok(hi == 0, "Expected 0, got %08lx\n", hi); + ok(lo == 0, "Expected 0, got %08lx\n", lo);
if (hr == S_OK) win_skip(".NET 1.x doesn't handle ASM_NAME_PROCESSOR_ID_ARRAY" @@ -456,50 +456,50 @@ static void test_CreateAssemblyNameObject(void) /* empty szAssemblyName */ name = NULL; hr = pCreateAssemblyNameObject(&name, L"", CANOF_SET_DEFAULT_VALUES, NULL); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); + ok(hr == S_OK, "Expected S_OK, got %08lx\n", hr); ok(name != NULL, "Expected non-NULL name\n");
size = MAX_PATH; hr = IAssemblyName_GetDisplayName(name, str, &size, ASM_DISPLAYF_FULL); ok(hr == FUSION_E_INVALID_NAME || broken(hr == S_OK), /* .NET 1.x */ - "Expected FUSION_E_INVALID_NAME, got %08x\n", hr); + "Expected FUSION_E_INVALID_NAME, got %08lx\n", hr);
size = 0; hr = IAssemblyName_GetName(name, &size, NULL); - ok(hr == E_NOT_SUFFICIENT_BUFFER, "got %08x\n", hr); - ok(size == 1, "got %u\n", size); + ok(hr == E_NOT_SUFFICIENT_BUFFER, "got %08lx\n", hr); + ok(size == 1, "got %lu\n", size);
if (0) /* crash */ { str[0] = '\0'; hr = IAssemblyName_GetName(name, NULL, str); - ok(hr == E_NOT_SUFFICIENT_BUFFER, "got %08x\n", hr); + ok(hr == E_NOT_SUFFICIENT_BUFFER, "got %08lx\n", hr); ok(!str[0], "got %c\n", str[0]); }
size = 0; str[0] = '\0'; hr = IAssemblyName_GetName(name, &size, str); - ok(hr == E_NOT_SUFFICIENT_BUFFER, "got %08x\n", hr); + ok(hr == E_NOT_SUFFICIENT_BUFFER, "got %08lx\n", hr); ok(!str[0], "got %c\n", str[0]); - ok(size == 1, "got %u\n", size); + ok(size == 1, "got %lu\n", size);
size = MAX_PATH; str[0] = '\0'; hr = IAssemblyName_GetName(name, &size, str); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); + ok(hr == S_OK, "Expected S_OK, got %08lx\n", hr); ok(!str[0], "Expected empty name\n"); - ok(size == 1, "Expected 1, got %d\n", size); + ok(size == 1, "Expected 1, got %ld\n", size);
hi = 0xbeefcace; lo = 0xcafebabe; hr = IAssemblyName_GetVersion(name, &hi, &lo); ok(hr == FUSION_E_INVALID_NAME || broken(hr == S_OK), /* .NET 1.x */ - "Expected FUSION_E_INVALID_NAME, got %08x\n", hr); - ok(hi == 0, "Expected 0, got %08x\n", hi); - ok(lo == 0, "Expected 0, got %08x\n", lo); + "Expected FUSION_E_INVALID_NAME, got %08lx\n", hr); + ok(hi == 0, "Expected 0, got %08lx\n", hi); + ok(lo == 0, "Expected 0, got %08lx\n", lo);
if (hr == S_OK) win_skip(".NET 1.x doesn't handle ASM_NAME_PROCESSOR_ID_ARRAY" @@ -513,61 +513,61 @@ static void test_CreateAssemblyNameObject(void) to_widechar(namestr, "wine"); name = NULL; hr = pCreateAssemblyNameObject(&name, namestr, CANOF_SET_DEFAULT_VALUES, NULL); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); + ok(hr == S_OK, "Expected S_OK, got %08lx\n", hr); ok(name != NULL, "Expected non-NULL name\n");
size = 0; hr = IAssemblyName_GetDisplayName(name, NULL, &size, 0); - ok(hr == E_NOT_SUFFICIENT_BUFFER, "got %08x\n", hr); - ok(size == 5, "got %u\n", size); + ok(hr == E_NOT_SUFFICIENT_BUFFER, "got %08lx\n", hr); + ok(size == 5, "got %lu\n", size);
size = 3; hr = IAssemblyName_GetDisplayName(name, NULL, &size, 0); - ok(hr == E_NOT_SUFFICIENT_BUFFER || broken(hr == E_INVALIDARG), "got %08x\n", hr); - ok(size == 5 || broken(size == 3), "got %u\n", size); + ok(hr == E_NOT_SUFFICIENT_BUFFER || broken(hr == E_INVALIDARG), "got %08lx\n", hr); + ok(size == 5 || broken(size == 3), "got %lu\n", size);
size = 3; str[0] = 'a'; hr = IAssemblyName_GetDisplayName(name, str, &size, 0); - ok(hr == E_NOT_SUFFICIENT_BUFFER, "got %08x\n", hr); + ok(hr == E_NOT_SUFFICIENT_BUFFER, "got %08lx\n", hr); ok(str[0] == 'a', "got %c\n", str[0]); - ok(size == 5, "got %u\n", size); + ok(size == 5, "got %lu\n", size);
size = 0; str[0] = 'a'; hr = IAssemblyName_GetDisplayName(name, str, &size, ASM_DISPLAYF_FULL); - ok(hr == E_NOT_SUFFICIENT_BUFFER, "got %08x\n", hr); + ok(hr == E_NOT_SUFFICIENT_BUFFER, "got %08lx\n", hr); ok(str[0] == 'a', "got %c\n", str[0]); - ok(size == 5, "Wrong size %u\n", size); + ok(size == 5, "Wrong size %lu\n", size);
size = MAX_PATH; hr = IAssemblyName_GetDisplayName(name, str, &size, ASM_DISPLAYF_FULL); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); + ok(hr == S_OK, "Expected S_OK, got %08lx\n", hr); ok_aw("wine", str); - ok(size == 5, "Expected 5, got %d\n", size); + ok(size == 5, "Expected 5, got %ld\n", size);
size = 0; str[0] = 0; hr = IAssemblyName_GetName(name, &size, str); - ok(hr == E_NOT_SUFFICIENT_BUFFER, "got %08x\n", hr); + ok(hr == E_NOT_SUFFICIENT_BUFFER, "got %08lx\n", hr); ok(!str[0], "got %c\n", str[0]); - ok(size == 5, "got %u\n", size); + ok(size == 5, "got %lu\n", size);
size = MAX_PATH; str[0] = '\0'; hr = IAssemblyName_GetName(name, &size, str); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); + ok(hr == S_OK, "Expected S_OK, got %08lx\n", hr); ok_aw("wine", str); - ok(size == 5, "Expected 5, got %d\n", size); + ok(size == 5, "Expected 5, got %ld\n", size);
hi = 0xbeefcace; lo = 0xcafebabe; hr = IAssemblyName_GetVersion(name, &hi, &lo); ok(hr == FUSION_E_INVALID_NAME || broken(hr == S_OK), /* .NET 1.x */ - "Expected FUSION_E_INVALID_NAME, got %08x\n", hr); - ok(hi == 0, "Expected 0, got %08x\n", hi); - ok(lo == 0, "Expected 0, got %08x\n", lo); + "Expected FUSION_E_INVALID_NAME, got %08lx\n", hr); + ok(hi == 0, "Expected 0, got %08lx\n", hi); + ok(lo == 0, "Expected 0, got %08lx\n", lo);
if (hr == S_OK) win_skip(".NET 1.x doesn't handle ASM_NAME_PROCESSOR_ID_ARRAY" @@ -583,30 +583,30 @@ static void test_CreateAssemblyNameObject(void) to_widechar(namestr, "wine"); name = NULL; hr = pCreateAssemblyNameObject(&name, namestr, CANOF_PARSE_DISPLAY_NAME, NULL); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); + ok(hr == S_OK, "Expected S_OK, got %08lx\n", hr); ok(name != NULL, "Expected non-NULL name\n");
size = MAX_PATH; hr = IAssemblyName_GetDisplayName(name, str, &size, ASM_DISPLAYF_FULL); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); + ok(hr == S_OK, "Expected S_OK, got %08lx\n", hr); ok_aw("wine", str); - ok(size == 5, "Expected 5, got %d\n", size); + ok(size == 5, "Expected 5, got %ld\n", size);
size = MAX_PATH; str[0] = '\0'; hr = IAssemblyName_GetName(name, &size, str); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); + ok(hr == S_OK, "Expected S_OK, got %08lx\n", hr); ok_aw("wine", str); - ok(size == 5, "Expected 5, got %d\n", size); + ok(size == 5, "Expected 5, got %ld\n", size);
hi = 0xbeefcace; lo = 0xcafebabe; hr = IAssemblyName_GetVersion(name, &hi, &lo); ok(hr == FUSION_E_INVALID_NAME || broken(hr == S_OK), /* .NET 1.x */ - "Expected FUSION_E_INVALID_NAME, got %08x\n", hr); - ok(hi == 0, "Expected 0, got %08x\n", hi); - ok(lo == 0, "Expected 0, got %08x\n", lo); + "Expected FUSION_E_INVALID_NAME, got %08lx\n", hr); + ok(hi == 0, "Expected 0, got %08lx\n", hi); + ok(lo == 0, "Expected 0, got %08lx\n", lo);
test_assembly_name_props(name, winename);
@@ -616,28 +616,28 @@ static void test_CreateAssemblyNameObject(void) to_widechar(namestr, "wine, Version=1.2.3.4"); name = NULL; hr = pCreateAssemblyNameObject(&name, namestr, CANOF_PARSE_DISPLAY_NAME, NULL); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); + ok(hr == S_OK, "Expected S_OK, got %08lx\n", hr); ok(name != NULL, "Expected non-NULL name\n");
size = MAX_PATH; hr = IAssemblyName_GetDisplayName(name, str, &size, ASM_DISPLAYF_FULL); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); + ok(hr == S_OK, "Expected S_OK, got %08lx\n", hr); ok_aw("wine, Version=1.2.3.4", str); - ok(size == 22, "Expected 22, got %d\n", size); + ok(size == 22, "Expected 22, got %ld\n", size);
size = MAX_PATH; str[0] = '\0'; hr = IAssemblyName_GetName(name, &size, str); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); + ok(hr == S_OK, "Expected S_OK, got %08lx\n", hr); ok_aw("wine", str); - ok(size == 5, "Expected 5, got %d\n", size); + ok(size == 5, "Expected 5, got %ld\n", size);
hi = 0xbeefcace; lo = 0xcafebabe; hr = IAssemblyName_GetVersion(name, &hi, &lo); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); - ok(hi == 0x00010002, "Expected 0x00010002, got %08x\n", hi); - ok(lo == 0x00030004, "Expected 0x00030004, got %08x\n", lo); + ok(hr == S_OK, "Expected S_OK, got %08lx\n", hr); + ok(hi == 0x00010002, "Expected 0x00010002, got %08lx\n", hi); + ok(lo == 0x00030004, "Expected 0x00030004, got %08lx\n", lo);
test_assembly_name_props(name, vername);
@@ -647,32 +647,32 @@ static void test_CreateAssemblyNameObject(void) to_widechar(namestr, "wine, Version=1.5"); name = NULL; hr = pCreateAssemblyNameObject(&name, namestr, CANOF_PARSE_DISPLAY_NAME, NULL); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); + ok(hr == S_OK, "Expected S_OK, got %08lx\n", hr); ok(name != NULL, "Expected non-NULL name\n");
size = MAX_PATH; hr = IAssemblyName_GetDisplayName(name, str, &size, ASM_DISPLAYF_FULL); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); + ok(hr == S_OK, "Expected S_OK, got %08lx\n", hr); ok_aw("wine, Version=1.5", str); - ok(size == 18, "Expected 18, got %d\n", size); + ok(size == 18, "Expected 18, got %ld\n", size);
size = MAX_PATH; str[0] = '\0'; hr = IAssemblyName_GetName(name, &size, str); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); + ok(hr == S_OK, "Expected S_OK, got %08lx\n", hr); ok_aw("wine", str); - ok(size == 5, "Expected 5, got %d\n", size); + ok(size == 5, "Expected 5, got %ld\n", size);
hi = 0xbeefcace; lo = 0xcafebabe; hr = IAssemblyName_GetVersion(name, &hi, &lo); ok(hr == FUSION_E_INVALID_NAME || broken(hr == S_OK), /* .NET 1.x */ - "Expected FUSION_E_INVALID_NAME, got %08x\n", hr); + "Expected FUSION_E_INVALID_NAME, got %08lx\n", hr); ok(hi == 0 || broken(hi == 0x10005), /* .NET 1.x */ - "Expected 0, got %08x\n", hi); - ok(lo == 0, "Expected 0, got %08x\n", lo); + "Expected 0, got %08lx\n", hi); + ok(lo == 0, "Expected 0, got %08lx\n", lo);
test_assembly_name_props(name, badvername);
@@ -682,30 +682,30 @@ static void test_CreateAssemblyNameObject(void) to_widechar(namestr, "wine, Culture=neutral"); name = NULL; hr = pCreateAssemblyNameObject(&name, namestr, CANOF_PARSE_DISPLAY_NAME, NULL); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); + ok(hr == S_OK, "Expected S_OK, got %08lx\n", hr); ok(name != NULL, "Expected non-NULL name\n");
size = MAX_PATH; hr = IAssemblyName_GetDisplayName(name, str, &size, ASM_DISPLAYF_FULL); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); + ok(hr == S_OK, "Expected S_OK, got %08lx\n", hr); ok_aw("wine, Culture=neutral", str); - ok(size == 22, "Expected 22, got %d\n", size); + ok(size == 22, "Expected 22, got %ld\n", size);
size = MAX_PATH; str[0] = '\0'; hr = IAssemblyName_GetName(name, &size, str); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); + ok(hr == S_OK, "Expected S_OK, got %08lx\n", hr); ok_aw("wine", str); - ok(size == 5, "Expected 5, got %d\n", size); + ok(size == 5, "Expected 5, got %ld\n", size);
hi = 0xbeefcace; lo = 0xcafebabe; hr = IAssemblyName_GetVersion(name, &hi, &lo); ok(hr == FUSION_E_INVALID_NAME || broken(hr == S_OK), /* .NET 1.x */ - "Expected FUSION_E_INVALID_NAME, got %08x\n", hr); - ok(hi == 0, "Expected 0, got %08x\n", hi); - ok(lo == 0, "Expected 0, got %08x\n", lo); + "Expected FUSION_E_INVALID_NAME, got %08lx\n", hr); + ok(hi == 0, "Expected 0, got %08lx\n", hi); + ok(lo == 0, "Expected 0, got %08lx\n", lo);
test_assembly_name_props(name, neutralname);
@@ -715,30 +715,30 @@ static void test_CreateAssemblyNameObject(void) to_widechar(namestr, "wine, Culture=en"); name = NULL; hr = pCreateAssemblyNameObject(&name, namestr, CANOF_PARSE_DISPLAY_NAME, NULL); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); + ok(hr == S_OK, "Expected S_OK, got %08lx\n", hr); ok(name != NULL, "Expected non-NULL name\n");
size = MAX_PATH; hr = IAssemblyName_GetDisplayName(name, str, &size, ASM_DISPLAYF_FULL); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); + ok(hr == S_OK, "Expected S_OK, got %08lx\n", hr); ok_aw("wine, Culture=en", str); - ok(size == 17, "Expected 17, got %d\n", size); + ok(size == 17, "Expected 17, got %ld\n", size);
size = MAX_PATH; str[0] = '\0'; hr = IAssemblyName_GetName(name, &size, str); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); + ok(hr == S_OK, "Expected S_OK, got %08lx\n", hr); ok_aw("wine", str); - ok(size == 5, "Expected 5, got %d\n", size); + ok(size == 5, "Expected 5, got %ld\n", size);
hi = 0xbeefcace; lo = 0xcafebabe; hr = IAssemblyName_GetVersion(name, &hi, &lo); ok(hr == FUSION_E_INVALID_NAME || broken(hr == S_OK), /* .NET 1.x */ - "Expected FUSION_E_INVALID_NAME, got %08x\n", hr); - ok(hi == 0, "Expected 0, got %08x\n", hi); - ok(lo == 0, "Expected 0, got %08x\n", lo); + "Expected FUSION_E_INVALID_NAME, got %08lx\n", hr); + ok(hi == 0, "Expected 0, got %08lx\n", hi); + ok(lo == 0, "Expected 0, got %08lx\n", lo);
test_assembly_name_props(name, enname);
@@ -748,30 +748,30 @@ static void test_CreateAssemblyNameObject(void) to_widechar(namestr, "wine, PublicKeyToken=01234567890abcde"); name = NULL; hr = pCreateAssemblyNameObject(&name, namestr, CANOF_PARSE_DISPLAY_NAME, NULL); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); + ok(hr == S_OK, "Expected S_OK, got %08lx\n", hr); ok(name != NULL, "Expected non-NULL name\n");
size = MAX_PATH; hr = IAssemblyName_GetDisplayName(name, str, &size, ASM_DISPLAYF_FULL); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); + ok(hr == S_OK, "Expected S_OK, got %08lx\n", hr); ok_aw("wine, PublicKeyToken=01234567890abcde", str); - ok(size == 38, "Expected 38, got %d\n", size); + ok(size == 38, "Expected 38, got %ld\n", size);
size = MAX_PATH; str[0] = '\0'; hr = IAssemblyName_GetName(name, &size, str); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); + ok(hr == S_OK, "Expected S_OK, got %08lx\n", hr); ok_aw("wine", str); - ok(size == 5, "Expected 5, got %d\n", size); + ok(size == 5, "Expected 5, got %ld\n", size);
hi = 0xbeefcace; lo = 0xcafebabe; hr = IAssemblyName_GetVersion(name, &hi, &lo); ok(hr == FUSION_E_INVALID_NAME || broken(hr == S_OK), /* .NET 1.x */ - "Expected FUSION_E_INVALID_NAME, got %08x\n", hr); - ok(hi == 0, "Expected 0, got %08x\n", hi); - ok(lo == 0, "Expected 0, got %08x\n", lo); + "Expected FUSION_E_INVALID_NAME, got %08lx\n", hr); + ok(hi == 0, "Expected 0, got %08lx\n", hi); + ok(lo == 0, "Expected 0, got %08lx\n", lo);
test_assembly_name_props(name, pubkeyname);
@@ -781,13 +781,13 @@ static void test_CreateAssemblyNameObject(void) to_widechar(namestr, "wine, processorArchitecture=x86"); name = NULL; hr = pCreateAssemblyNameObject(&name, namestr, CANOF_PARSE_DISPLAY_NAME, NULL); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); + ok(hr == S_OK, "Expected S_OK, got %08lx\n", hr);
ok(name != NULL, "Expected non-NULL name\n");
size = MAX_PATH; hr = IAssemblyName_GetDisplayName(name, str, &size, ASM_DISPLAYF_PROCESSORARCHITECTURE); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); + ok(hr == S_OK, "Expected S_OK, got %08lx\n", hr);
WideCharToMultiByte(CP_ACP, 0, str, -1, string1, MAX_PATH, NULL, NULL);
@@ -796,13 +796,13 @@ static void test_CreateAssemblyNameObject(void) else { ok_aw("wine, processorArchitecture=x86", str); - ok(size == 32, "Expected 32, got %d\n", size); + ok(size == 32, "Expected 32, got %ld\n", size);
size = sizeof(arch); hr = IAssemblyName_GetProperty(name, ASM_NAME_ARCHITECTURE, &arch, &size); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); + ok(hr == S_OK, "Expected S_OK, got %08lx\n", hr); ok(arch == peI386, "Expected peI386, got %d\n", arch); - ok(size == sizeof(arch), "Wrong size %d\n", size); + ok(size == sizeof(arch), "Wrong size %ld\n", size);
IAssemblyName_Release(name);
@@ -810,19 +810,19 @@ static void test_CreateAssemblyNameObject(void) to_widechar(namestr, "wine, processorArchitecture=AMD64"); name = NULL; hr = pCreateAssemblyNameObject(&name, namestr, CANOF_PARSE_DISPLAY_NAME, NULL); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); + ok(hr == S_OK, "Expected S_OK, got %08lx\n", hr);
size = MAX_PATH; hr = IAssemblyName_GetDisplayName(name, str, &size, ASM_DISPLAYF_PROCESSORARCHITECTURE); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); + ok(hr == S_OK, "Expected S_OK, got %08lx\n", hr); ok_aw("wine, processorArchitecture=AMD64", str); - ok(size == 34, "Expected 34, got %d\n", size); + ok(size == 34, "Expected 34, got %ld\n", size);
size = sizeof(arch); hr = IAssemblyName_GetProperty(name, ASM_NAME_ARCHITECTURE, &arch, &size); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); + ok(hr == S_OK, "Expected S_OK, got %08lx\n", hr); ok(arch == peAMD64, "Expected peAMD64, got %d\n", arch); - ok(size == sizeof(arch), "Wrong size %d\n", size); + ok(size == sizeof(arch), "Wrong size %ld\n", size);
IAssemblyName_Release(name);
@@ -830,19 +830,19 @@ static void test_CreateAssemblyNameObject(void) to_widechar(namestr, "wine, processorArchitecture=IA64"); name = NULL; hr = pCreateAssemblyNameObject(&name, namestr, CANOF_PARSE_DISPLAY_NAME, NULL); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); + ok(hr == S_OK, "Expected S_OK, got %08lx\n", hr);
size = MAX_PATH; hr = IAssemblyName_GetDisplayName(name, str, &size, ASM_DISPLAYF_PROCESSORARCHITECTURE); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); + ok(hr == S_OK, "Expected S_OK, got %08lx\n", hr); ok_aw("wine, processorArchitecture=IA64", str); - ok(size == 33, "Expected 33, got %d\n", size); + ok(size == 33, "Expected 33, got %ld\n", size);
size = sizeof(arch); hr = IAssemblyName_GetProperty(name, ASM_NAME_ARCHITECTURE, &arch, &size); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); + ok(hr == S_OK, "Expected S_OK, got %08lx\n", hr); ok(arch == peIA64, "Expected peIA64, got %d\n", arch); - ok(size == sizeof(arch), "Wrong size %d\n", size); + ok(size == sizeof(arch), "Wrong size %ld\n", size);
IAssemblyName_Release(name);
@@ -850,19 +850,19 @@ static void test_CreateAssemblyNameObject(void) to_widechar(namestr, "wine, processorArchitecture=MSIL"); name = NULL; hr = pCreateAssemblyNameObject(&name, namestr, CANOF_PARSE_DISPLAY_NAME, NULL); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); + ok(hr == S_OK, "Expected S_OK, got %08lx\n", hr);
size = MAX_PATH; hr = IAssemblyName_GetDisplayName(name, str, &size, ASM_DISPLAYF_PROCESSORARCHITECTURE); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); + ok(hr == S_OK, "Expected S_OK, got %08lx\n", hr); ok_aw("wine, processorArchitecture=MSIL", str); - ok(size == 33, "Expected 33, got %d\n", size); + ok(size == 33, "Expected 33, got %ld\n", size);
size = sizeof(arch); hr = IAssemblyName_GetProperty(name, ASM_NAME_ARCHITECTURE, &arch, &size); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); + ok(hr == S_OK, "Expected S_OK, got %08lx\n", hr); ok(arch == peMSIL, "Expected peMSIL, got %d\n", arch); - ok(size == sizeof(arch), "Wrong size %d\n", size); + ok(size == sizeof(arch), "Wrong size %ld\n", size);
IAssemblyName_Release(name); } @@ -871,26 +871,26 @@ static void test_CreateAssemblyNameObject(void) to_widechar(namestr, "wine, Version=1.2.3.4, Culture=en, PublicKeyToken=1234567890abcdef"); name = NULL; hr = pCreateAssemblyNameObject(&name, namestr, CANOF_PARSE_DISPLAY_NAME, NULL); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); + ok(hr == S_OK, "Expected S_OK, got %08lx\n", hr); ok(name != NULL, "Expected non-NULL name\n");
size = MAX_PATH; hr = IAssemblyName_GetDisplayName(name, str, &size, ASM_DISPLAYF_VERSION | ASM_DISPLAYF_CULTURE); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); + ok(hr == S_OK, "Expected S_OK, got %08lx\n", hr); ok_aw("wine, Version=1.2.3.4, Culture=en", str); - ok(size == 34, "Expected 34, got %d\n", size); + ok(size == 34, "Expected 34, got %ld\n", size);
size = MAX_PATH; hr = IAssemblyName_GetDisplayName(name, str, &size, ASM_DISPLAYF_CULTURE | ASM_DISPLAYF_PUBLIC_KEY_TOKEN); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); + ok(hr == S_OK, "Expected S_OK, got %08lx\n", hr); ok_aw("wine, Culture=en, PublicKeyToken=1234567890abcdef", str); - ok(size == 50, "Expected 50, got %d\n", size); + ok(size == 50, "Expected 50, got %ld\n", size);
size = MAX_PATH; hr = IAssemblyName_GetDisplayName(name, str, &size, ASM_DISPLAYF_FULL); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); + ok(hr == S_OK, "Expected S_OK, got %08lx\n", hr); ok_aw("wine, Version=1.2.3.4, Culture=en, PublicKeyToken=1234567890abcdef", str); - ok(size == 67, "Expected 67, got %d\n", size); + ok(size == 67, "Expected 67, got %ld\n", size);
IAssemblyName_Release(name);
@@ -898,31 +898,31 @@ static void test_CreateAssemblyNameObject(void) to_widechar(namestr, "wine, BadProp=42"); name = NULL; hr = pCreateAssemblyNameObject(&name, namestr, CANOF_PARSE_DISPLAY_NAME, NULL); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); + ok(hr == S_OK, "Expected S_OK, got %08lx\n", hr); ok(name != NULL, "Expected non-NULL name\n");
size = MAX_PATH; str[0] = '\0'; hr = IAssemblyName_GetDisplayName(name, str, &size, ASM_DISPLAYF_FULL); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); + ok(hr == S_OK, "Expected S_OK, got %08lx\n", hr); ok_aw("wine", str); - ok(size == 5, "Expected 5, got %d\n", size); + ok(size == 5, "Expected 5, got %ld\n", size);
size = MAX_PATH; str[0] = '\0'; hr = IAssemblyName_GetName(name, &size, str); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); + ok(hr == S_OK, "Expected S_OK, got %08lx\n", hr); ok_aw("wine", str); - ok(size == 5, "Expected 5, got %d\n", size); + ok(size == 5, "Expected 5, got %ld\n", size);
hi = 0xbeefcace; lo = 0xcafebabe; hr = IAssemblyName_GetVersion(name, &hi, &lo); ok(hr == FUSION_E_INVALID_NAME || broken(hr == S_OK), /* .NET 1.x */ - "Expected FUSION_E_INVALID_NAME, got %08x\n", hr); - ok(hi == 0, "Expected 0, got %08x\n", hi); - ok(lo == 0, "Expected 0, got %08x\n", lo); + "Expected FUSION_E_INVALID_NAME, got %08lx\n", hr); + ok(hi == 0, "Expected 0, got %08lx\n", hi); + ok(lo == 0, "Expected 0, got %08lx\n", lo);
test_assembly_name_props(name, winename);
@@ -939,7 +939,7 @@ static void test_CreateAssemblyNameObject(void) return; } ok(hr == FUSION_E_INVALID_NAME, - "Expected FUSION_E_INVALID_NAME, got %08x\n", hr); + "Expected FUSION_E_INVALID_NAME, got %08lx\n", hr); ok(name == (IAssemblyName *)0xdeadbeef, "Expected 0xdeadbeef, got %p\n", name);
/* PublicKeyToken contains invalid chars */ @@ -947,7 +947,7 @@ static void test_CreateAssemblyNameObject(void) name = (IAssemblyName *)0xdeadbeef; hr = pCreateAssemblyNameObject(&name, namestr, CANOF_PARSE_DISPLAY_NAME, NULL); ok(hr == FUSION_E_INVALID_NAME, - "Expected FUSION_E_INVALID_NAME, got %08x\n", hr); + "Expected FUSION_E_INVALID_NAME, got %08lx\n", hr); ok(name == (IAssemblyName *)0xdeadbeef, "Expected 0xdeadbeef, got %p\n", name);
/* no comma separator */ @@ -955,7 +955,7 @@ static void test_CreateAssemblyNameObject(void) name = (IAssemblyName *)0xdeadbeef; hr = pCreateAssemblyNameObject(&name, namestr, CANOF_PARSE_DISPLAY_NAME, NULL); ok(hr == FUSION_E_INVALID_NAME, - "Expected FUSION_E_INVALID_NAME, got %08x\n", hr); + "Expected FUSION_E_INVALID_NAME, got %08lx\n", hr); ok(name == (IAssemblyName *)0xdeadbeef, "Expected 0xdeadbeef, got %p\n", name); if(SUCCEEDED(hr)) IAssemblyName_Release(name);
@@ -964,7 +964,7 @@ static void test_CreateAssemblyNameObject(void) name = (IAssemblyName *)0xdeadbeef; hr = pCreateAssemblyNameObject(&name, namestr, CANOF_PARSE_DISPLAY_NAME, NULL); ok(hr == FUSION_E_INVALID_NAME, - "Expected FUSION_E_INVALID_NAME, got %08x\n", hr); + "Expected FUSION_E_INVALID_NAME, got %08lx\n", hr); ok(name == (IAssemblyName *)0xdeadbeef, "Expected 0xdeadbeef, got %p\n", name);
/* no value */ @@ -972,33 +972,33 @@ static void test_CreateAssemblyNameObject(void) name = (IAssemblyName *)0xdeadbeef; hr = pCreateAssemblyNameObject(&name, namestr, CANOF_PARSE_DISPLAY_NAME, NULL); ok(hr == FUSION_E_INVALID_NAME, - "Expected FUSION_E_INVALID_NAME, got %08x\n", hr); + "Expected FUSION_E_INVALID_NAME, got %08lx\n", hr); ok(name == (IAssemblyName *)0xdeadbeef, "Expected 0xdeadbeef, got %p\n", name);
/* no spaces */ to_widechar(namestr, "wine,version=1.0.0.0"); name = (IAssemblyName *)0xdeadbeef; hr = pCreateAssemblyNameObject(&name, namestr, CANOF_PARSE_DISPLAY_NAME, NULL); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); + ok(hr == S_OK, "Expected S_OK, got %08lx\n", hr); ok(name != NULL, "Expected non-NULL name\n"); hi = lo = 0xdeadbeef; hr = IAssemblyName_GetVersion(name, &hi, &lo); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); - ok(hi == 65536, "Expected 536, got %u\n", hi); - ok(lo == 0, "Expected 0, got %u\n", lo); + ok(hr == S_OK, "Expected S_OK, got %08lx\n", hr); + ok(hi == 65536, "Expected 536, got %lu\n", hi); + ok(lo == 0, "Expected 0, got %lu\n", lo); IAssemblyName_Release(name);
/* quoted values */ to_widechar(namestr, "wine, version="1.0.0.0",culture="en""); name = (IAssemblyName *)0xdeadbeef; hr = pCreateAssemblyNameObject(&name, namestr, CANOF_PARSE_DISPLAY_NAME, NULL); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); + ok(hr == S_OK, "Expected S_OK, got %08lx\n", hr); ok(name != NULL, "Expected non-NULL name\n"); hi = lo = 0xdeadbeef; hr = IAssemblyName_GetVersion(name, &hi, &lo); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); - ok(hi == 65536, "Expected 65536, got %u\n", hi); - ok(lo == 0, "Expected 0, got %u\n", lo); + ok(hr == S_OK, "Expected S_OK, got %08lx\n", hr); + ok(hi == 65536, "Expected 65536, got %lu\n", hi); + ok(lo == 0, "Expected 0, got %lu\n", lo); IAssemblyName_Release(name); }
@@ -1008,59 +1008,59 @@ static void test_IAssemblyName_IsEqual(void) IAssemblyName *name1, *name2;
hr = pCreateAssemblyNameObject( &name1, L"wine", CANOF_PARSE_DISPLAY_NAME, NULL ); - ok( hr == S_OK, "got %08x\n", hr ); + ok( hr == S_OK, "got %08lx\n", hr );
hr = pCreateAssemblyNameObject( &name2, L"wine", CANOF_PARSE_DISPLAY_NAME, NULL ); - ok( hr == S_OK, "got %08x\n", hr ); + ok( hr == S_OK, "got %08lx\n", hr );
if (0) { /* crashes on some old version */ hr = IAssemblyName_IsEqual( name1, NULL, 0 ); - ok( hr == S_FALSE, "got %08x\n", hr ); + ok( hr == S_FALSE, "got %08lx\n", hr );
hr = IAssemblyName_IsEqual( name1, NULL, ASM_CMPF_IL_ALL ); - ok( hr == S_FALSE, "got %08x\n", hr ); + ok( hr == S_FALSE, "got %08lx\n", hr ); }
hr = IAssemblyName_IsEqual( name1, name1, ASM_CMPF_IL_ALL ); - ok( hr == S_OK, "got %08x\n", hr ); + ok( hr == S_OK, "got %08lx\n", hr );
hr = IAssemblyName_IsEqual( name1, name2, ASM_CMPF_IL_ALL ); - ok( hr == S_OK, "got %08x\n", hr ); + ok( hr == S_OK, "got %08lx\n", hr );
IAssemblyName_Release( name2 ); hr = pCreateAssemblyNameObject( &name2, L"wine,version=1.0.0.0", CANOF_PARSE_DISPLAY_NAME, NULL ); - ok( hr == S_OK, "got %08x\n", hr ); + ok( hr == S_OK, "got %08lx\n", hr );
hr = IAssemblyName_IsEqual( name1, name2, ASM_CMPF_IL_ALL ); - ok( hr == S_OK, "got %08x\n", hr ); + ok( hr == S_OK, "got %08lx\n", hr );
IAssemblyName_Release( name2 ); hr = pCreateAssemblyNameObject( &name2, L"wine,version=1.0.0.0,culture=neutral", CANOF_PARSE_DISPLAY_NAME, NULL ); - ok( hr == S_OK, "got %08x\n", hr ); + ok( hr == S_OK, "got %08lx\n", hr );
hr = IAssemblyName_IsEqual( name1, name2, ASM_CMPF_IL_ALL ); - ok( hr == S_OK, "got %08x\n", hr ); + ok( hr == S_OK, "got %08lx\n", hr );
IAssemblyName_Release( name1 ); hr = pCreateAssemblyNameObject( &name1, L"wine,version=1.0.0.0,culture=en", CANOF_PARSE_DISPLAY_NAME, NULL ); - ok( hr == S_OK, "got %08x\n", hr ); + ok( hr == S_OK, "got %08lx\n", hr );
hr = IAssemblyName_IsEqual( name1, name2, ASM_CMPF_IL_ALL ); - ok( hr == S_FALSE, "got %08x\n", hr ); + ok( hr == S_FALSE, "got %08lx\n", hr );
IAssemblyName_Release( name1 ); hr = pCreateAssemblyNameObject( &name1, L"wine", CANOF_PARSE_DISPLAY_NAME, NULL ); - ok( hr == S_OK, "got %08x\n", hr ); + ok( hr == S_OK, "got %08lx\n", hr );
IAssemblyName_Release( name2 ); hr = pCreateAssemblyNameObject( &name2, L"wine,version=1.0.0.0,publicKeyToken=1234567890abcdef", CANOF_PARSE_DISPLAY_NAME, NULL ); - ok( hr == S_OK, "got %08x\n", hr ); + ok( hr == S_OK, "got %08lx\n", hr );
hr = IAssemblyName_IsEqual( name1, name2, ASM_CMPF_IL_ALL ); - ok( hr == S_OK, "got %08x\n", hr ); + ok( hr == S_OK, "got %08lx\n", hr );
IAssemblyName_Release( name1 ); IAssemblyName_Release( name2 ); diff --git a/dlls/fusion/tests/fusion.c b/dlls/fusion/tests/fusion.c index 9a62180cf8c..625aeb765e7 100644 --- a/dlls/fusion/tests/fusion.c +++ b/dlls/fusion/tests/fusion.c @@ -88,25 +88,25 @@ static void test_GetCachePath(void) /* NULL pwzCachePath, pcchPath is 0 */ size = 0; hr = pGetCachePath(ASM_CACHE_GAC, NULL, &size); - ok(hr == E_NOT_SUFFICIENT_BUFFER, "Expected E_NOT_SUFFICIENT_BUFFER, got %08x\n", hr); + ok(hr == E_NOT_SUFFICIENT_BUFFER, "Expected E_NOT_SUFFICIENT_BUFFER, got %08lx\n", hr); ok(size == lstrlenW(cachepath) + 1, - "Expected %d, got %d\n", lstrlenW(cachepath) + 1, size); + "Expected %d, got %ld\n", lstrlenW(cachepath) + 1, size);
/* NULL pwszCachePath, pcchPath is MAX_PATH */ size = MAX_PATH; hr = pGetCachePath(ASM_CACHE_GAC, NULL, &size); - ok(hr == E_NOT_SUFFICIENT_BUFFER, "Expected E_NOT_SUFFICIENT_BUFFER, got %08x\n", hr); + ok(hr == E_NOT_SUFFICIENT_BUFFER, "Expected E_NOT_SUFFICIENT_BUFFER, got %08lx\n", hr); ok(size == lstrlenW(cachepath) + 1, - "Expected %d, got %d\n", lstrlenW(cachepath) + 1, size); + "Expected %d, got %ld\n", lstrlenW(cachepath) + 1, size);
/* both pwszCachePath and pcchPath NULL */ hr = pGetCachePath(ASM_CACHE_GAC, NULL, NULL); - ok(hr == E_INVALIDARG, "Expected E_INVALIDARG, got %08x\n", hr); + ok(hr == E_INVALIDARG, "Expected E_INVALIDARG, got %08lx\n", hr);
/* NULL pcchPath */ lstrcpyW(path, L"nochange"); hr = pGetCachePath(ASM_CACHE_GAC, path, NULL); - ok(hr == E_INVALIDARG, "Expected E_INVALIDARG, got %08x\n", hr); + ok(hr == E_INVALIDARG, "Expected E_INVALIDARG, got %08lx\n", hr); ok(!lstrcmpW(L"nochange", path), "Expected %s, got %s\n", wine_dbgstr_w(L"nochange"), wine_dbgstr_w(path));
@@ -114,14 +114,14 @@ static void test_GetCachePath(void) lstrcpyW(path, L"nochange"); size = MAX_PATH; hr = pGetCachePath(ASM_CACHE_GAC, path, &size); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); + ok(hr == S_OK, "Expected S_OK, got %08lx\n", hr); ok( !lstrcmpW( cachepath, path ), "Expected %s, got %s\n", wine_dbgstr_w(cachepath), wine_dbgstr_w(path));
/* pcchPath has no room for NULL terminator */ lstrcpyW(path, L"nochange"); size = lstrlenW(cachepath); hr = pGetCachePath(ASM_CACHE_GAC, path, &size); - ok(hr == E_NOT_SUFFICIENT_BUFFER, "Expected E_NOT_SUFFICIENT_BUFFER, got %08x\n", hr); + ok(hr == E_NOT_SUFFICIENT_BUFFER, "Expected E_NOT_SUFFICIENT_BUFFER, got %08lx\n", hr); ok(!lstrcmpW(L"nochange", path), "Expected %s, got %s\n", wine_dbgstr_w(L"nochange"), wine_dbgstr_w(path));
@@ -134,7 +134,7 @@ static void test_GetCachePath(void) hr = pGetCachePath(ASM_CACHE_ROOT, path, &size); ok(hr == S_OK || broken(hr == E_INVALIDARG), /* .NET 1.1 */ - "Expected S_OK, got %08x\n", hr); + "Expected S_OK, got %08lx\n", hr); if (hr == S_OK) ok( !lstrcmpW( cachepath, path ), "Expected %s, got %s\n", wine_dbgstr_w(cachepath), wine_dbgstr_w(path));
@@ -170,7 +170,7 @@ static void test_GetCachePath(void) lstrcpyW(path, L"nochange"); size = MAX_PATH; hr = pGetCachePath(ASM_CACHE_ZAP, path, &size); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); + ok(hr == S_OK, "Expected S_OK, got %08lx\n", hr); ok( !lstrcmpW( cachepath, path ), "Expected %s, got %s\n", wine_dbgstr_w(cachepath), wine_dbgstr_w(path)); }
@@ -178,7 +178,7 @@ static void test_GetCachePath(void) lstrcpyW(path, L"nochange"); size = MAX_PATH; hr = pGetCachePath(ASM_CACHE_GAC | ASM_CACHE_ROOT, path, &size); - ok(hr == E_INVALIDARG, "Expected E_INVALIDARG, got %08x\n", hr); + ok(hr == E_INVALIDARG, "Expected E_INVALIDARG, got %08lx\n", hr); ok(!lstrcmpW(L"nochange", path), "Expected %s, got %s\n", wine_dbgstr_w(L"nochange"), wine_dbgstr_w(path)); }