Wine-Devel
By message
wine-devel@list.winehq.org
By month
Threads by month
- ----- 2026 -----
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2025 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2024 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2011 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2010 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2009 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2008 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2007 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2006 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2005 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2004 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2003 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2002 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2001 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
February 2022
- 87 participants
- 926 discussions
[PATCH 1/3] opencl: Rename cl_{enums,types} to header_{enums,types}.
by Zebediah Figura Feb. 4, 2022
by Zebediah Figura Feb. 4, 2022
Feb. 4, 2022
Signed-off-by: Zebediah Figura <zfigura(a)codeweavers.com>
---
dlls/opencl/make_opencl | 18 +++++++++---------
1 file changed, 9 insertions(+), 9 deletions(-)
diff --git a/dlls/opencl/make_opencl b/dlls/opencl/make_opencl
index 088120c8081..a93946b2d2b 100755
--- a/dlls/opencl/make_opencl
+++ b/dlls/opencl/make_opencl
@@ -297,8 +297,8 @@ sub generate_spec_entry($$)
}
my %core_functions;
-my %cl_enums;
-my (%cl_types, @cl_types); # also use an array to preserve declaration order
+my %header_enums;
+my (%header_types, @header_types); # also use an array to preserve declaration order
# some functions need a hand-written wrapper
sub needs_pe_wrapper($)
@@ -440,13 +440,13 @@ sub parse_file($)
}
foreach my $enum ($feature->findnodes("./require/enum"))
{
- $cl_enums{$enum->{name}} = $enums{$enum->{name}};
+ $header_enums{$enum->{name}} = $enums{$enum->{name}};
}
foreach my $type ($feature->findnodes("./require/type"))
{
next unless $types{$type->{name}};
- push @cl_types, $type->{name} unless $cl_types{$type->{name}};
- $cl_types{$type->{name}} = $types{$type->{name}};
+ push @header_types, $type->{name} unless $header_types{$type->{name}};
+ $header_types{$type->{name}} = $types{$type->{name}};
}
}
@@ -588,9 +588,9 @@ typedef uint64_t DECLSPEC_ALIGN(8) cl_ulong;
END
;
-foreach (@cl_types)
+foreach (@header_types)
{
- my $type = $cl_types{$_};
+ my $type = $header_types{$_};
if ($type->{category} eq "define")
{
print TYPES $type->textContent() . "\n";
@@ -603,9 +603,9 @@ foreach (@cl_types)
print TYPES "\n";
-foreach (sort keys %cl_enums)
+foreach (sort keys %header_enums)
{
- printf TYPES "#define %s %s\n", $_, $cl_enums{$_};
+ printf TYPES "#define %s %s\n", $_, $header_enums{$_};
}
close(TYPES);
--
2.34.1
3
4
I have a question How do I get GM.DLS working my current setup is Linux
Mint 2.0.3 and Wine 7.0 GM.DLS is already in
.wine/drive_c/windows/system32/drivers but it doesn't work so whats
wrong and why doesn't it work I would like help
2
1
[PATCH vkd3d 3/3] vkd3d-utils: Implement the event functions for Windows.
by Alexandre Julliard Feb. 4, 2022
by Alexandre Julliard Feb. 4, 2022
Feb. 4, 2022
Signed-off-by: Alexandre Julliard <julliard(a)winehq.org>
---
libs/vkd3d-utils/vkd3d_utils_main.c | 37 ++++++++++++++++++++++++++
libs/vkd3d-utils/vkd3d_utils_private.h | 8 ------
2 files changed, 37 insertions(+), 8 deletions(-)
diff --git a/libs/vkd3d-utils/vkd3d_utils_main.c b/libs/vkd3d-utils/vkd3d_utils_main.c
index 9c968cc65334..7fb042cc3cbc 100644
--- a/libs/vkd3d-utils/vkd3d_utils_main.c
+++ b/libs/vkd3d-utils/vkd3d_utils_main.c
@@ -327,6 +327,41 @@ HRESULT WINAPI D3DPreprocess(const void *data, SIZE_T size, const char *filename
}
/* Events */
+
+#ifdef _WIN32
+
+HANDLE vkd3d_create_event(void)
+{
+ return CreateEventA(NULL, FALSE, FALSE, NULL);
+}
+
+HRESULT vkd3d_signal_event(HANDLE event)
+{
+ SetEvent(event);
+ return S_OK;
+}
+
+unsigned int vkd3d_wait_event(HANDLE event, unsigned int milliseconds)
+{
+ return WaitForSingleObject(event, milliseconds);
+}
+
+void vkd3d_destroy_event(HANDLE event)
+{
+ CloseHandle(event);
+}
+
+#else /* _WIN32 */
+
+#include <pthread.h>
+
+struct vkd3d_event
+{
+ pthread_mutex_t mutex;
+ pthread_cond_t cond;
+ BOOL is_signaled;
+};
+
HANDLE vkd3d_create_event(void)
{
struct vkd3d_event *event;
@@ -434,6 +469,8 @@ void vkd3d_destroy_event(HANDLE event)
vkd3d_free(impl);
}
+#endif /* _WIN32 */
+
HRESULT WINAPI D3DCreateBlob(SIZE_T data_size, ID3D10Blob **blob)
{
HRESULT hr;
diff --git a/libs/vkd3d-utils/vkd3d_utils_private.h b/libs/vkd3d-utils/vkd3d_utils_private.h
index 06ac7e6bbfa2..1b8254b67b1a 100644
--- a/libs/vkd3d-utils/vkd3d_utils_private.h
+++ b/libs/vkd3d-utils/vkd3d_utils_private.h
@@ -23,7 +23,6 @@
#define NONAMELESSUNION
#define VK_NO_PROTOTYPES
-#include <pthread.h>
#include <vkd3d.h>
#include <vkd3d_shader.h>
#include <vkd3d_d3dcompiler.h>
@@ -32,11 +31,4 @@
#include "vkd3d_memory.h"
#include <vkd3d_utils.h>
-struct vkd3d_event
-{
- pthread_mutex_t mutex;
- pthread_cond_t cond;
- BOOL is_signaled;
-};
-
#endif /* __VKD3D_UTILS_PRIVATE_H */
--
2.34.1
2
1
[PATCH vkd3d 2/3] vkd3d: Implement the synchronization wrappers for Windows.
by Alexandre Julliard Feb. 4, 2022
by Alexandre Julliard Feb. 4, 2022
Feb. 4, 2022
Signed-off-by: Alexandre Julliard <julliard(a)winehq.org>
---
libs/vkd3d/vkd3d_private.h | 72 ++++++++++++++++++++++++++++++++++++++
1 file changed, 72 insertions(+)
diff --git a/libs/vkd3d/vkd3d_private.h b/libs/vkd3d/vkd3d_private.h
index bb7be99e7efc..ece111325e77 100644
--- a/libs/vkd3d/vkd3d_private.h
+++ b/libs/vkd3d/vkd3d_private.h
@@ -23,6 +23,10 @@
#define NONAMELESSUNION
#define VK_NO_PROTOTYPES
+#ifdef _WIN32
+# define _WIN32_WINNT 0x0600 /* for condition variables */
+#endif
+
#include "vkd3d_common.h"
#include "vkd3d_blob.h"
#include "vkd3d_memory.h"
@@ -171,6 +175,72 @@ union vkd3d_thread_handle
void *handle;
};
+#ifdef _WIN32
+
+struct vkd3d_mutex
+{
+ CRITICAL_SECTION lock;
+};
+
+struct vkd3d_cond
+{
+ CONDITION_VARIABLE cond;
+};
+
+static inline int vkd3d_mutex_init(struct vkd3d_mutex *lock)
+{
+ InitializeCriticalSection(&lock->lock);
+ return 0;
+}
+
+static inline int vkd3d_mutex_lock(struct vkd3d_mutex *lock)
+{
+ EnterCriticalSection(&lock->lock);
+ return 0;
+}
+
+static inline int vkd3d_mutex_unlock(struct vkd3d_mutex *lock)
+{
+ LeaveCriticalSection(&lock->lock);
+ return 0;
+}
+
+static inline int vkd3d_mutex_destroy(struct vkd3d_mutex *lock)
+{
+ DeleteCriticalSection(&lock->lock);
+ return 0;
+}
+
+static inline int vkd3d_cond_init(struct vkd3d_cond *cond)
+{
+ InitializeConditionVariable(&cond->cond);
+ return 0;
+}
+
+static inline int vkd3d_cond_signal(struct vkd3d_cond *cond)
+{
+ WakeConditionVariable(&cond->cond);
+ return 0;
+}
+
+static inline int vkd3d_cond_broadcast(struct vkd3d_cond *cond)
+{
+ WakeAllConditionVariable(&cond->cond);
+ return 0;
+}
+
+static inline int vkd3d_cond_wait(struct vkd3d_cond *cond, struct vkd3d_mutex *lock)
+{
+ return !SleepConditionVariableCS(&cond->cond, &lock->lock, INFINITE);
+}
+
+static inline int vkd3d_cond_destroy(struct vkd3d_cond *cond)
+{
+ return 0;
+}
+
+#else /* _WIN32 */
+
struct vkd3d_mutex
{
pthread_mutex_t lock;
@@ -227,6 +297,8 @@ static inline int vkd3d_cond_destroy(struct vkd3d_cond *cond)
return pthread_cond_destroy(&cond->cond);
}
+#endif /* _WIN32 */
+
HRESULT vkd3d_create_thread(struct vkd3d_instance *instance,
PFN_vkd3d_thread thread_main, void *data, union vkd3d_thread_handle *thread);
HRESULT vkd3d_join_thread(struct vkd3d_instance *instance, union vkd3d_thread_handle *thread);
--
2.34.1
2
1
[PATCH vkd3d 1/3] vkd3d: Add inline wrappers for the pthread synchronization functions.
by Alexandre Julliard Feb. 4, 2022
by Alexandre Julliard Feb. 4, 2022
Feb. 4, 2022
Signed-off-by: Alexandre Julliard <julliard(a)winehq.org>
---
libs/vkd3d/command.c | 134 ++++++++++++++++++-------------------
libs/vkd3d/device.c | 52 +++++++-------
libs/vkd3d/resource.c | 28 ++++----
libs/vkd3d/state.c | 12 ++--
libs/vkd3d/utils.c | 12 ++--
libs/vkd3d/vkd3d_private.h | 86 +++++++++++++++++++-----
6 files changed, 190 insertions(+), 134 deletions(-)
diff --git a/libs/vkd3d/command.c b/libs/vkd3d/command.c
index f1ec6be3fd20..61e18105ee12 100644
--- a/libs/vkd3d/command.c
+++ b/libs/vkd3d/command.c
@@ -32,7 +32,7 @@ HRESULT vkd3d_queue_create(struct d3d12_device *device,
if (!(object = vkd3d_malloc(sizeof(*object))))
return E_OUTOFMEMORY;
- if ((rc = pthread_mutex_init(&object->mutex, NULL)))
+ if ((rc = vkd3d_mutex_init(&object->mutex)))
{
ERR("Failed to initialize mutex, error %d.\n", rc);
vkd3d_free(object);
@@ -67,7 +67,7 @@ void vkd3d_queue_destroy(struct vkd3d_queue *queue, struct d3d12_device *device)
unsigned int i;
int rc;
- if ((rc = pthread_mutex_lock(&queue->mutex)))
+ if ((rc = vkd3d_mutex_lock(&queue->mutex)))
ERR("Failed to lock mutex, error %d.\n", rc);
for (i = 0; i < queue->semaphore_count; ++i)
@@ -82,9 +82,9 @@ void vkd3d_queue_destroy(struct vkd3d_queue *queue, struct d3d12_device *device)
}
if (!rc)
- pthread_mutex_unlock(&queue->mutex);
+ vkd3d_mutex_unlock(&queue->mutex);
- pthread_mutex_destroy(&queue->mutex);
+ vkd3d_mutex_destroy(&queue->mutex);
vkd3d_free(queue);
}
@@ -94,7 +94,7 @@ VkQueue vkd3d_queue_acquire(struct vkd3d_queue *queue)
TRACE("queue %p.\n", queue);
- if ((rc = pthread_mutex_lock(&queue->mutex)))
+ if ((rc = vkd3d_mutex_lock(&queue->mutex)))
{
ERR("Failed to lock mutex, error %d.\n", rc);
return VK_NULL_HANDLE;
@@ -108,7 +108,7 @@ void vkd3d_queue_release(struct vkd3d_queue *queue)
{
TRACE("queue %p.\n", queue);
- pthread_mutex_unlock(&queue->mutex);
+ vkd3d_mutex_unlock(&queue->mutex);
}
static VkResult vkd3d_queue_wait_idle(struct vkd3d_queue *queue,
@@ -144,7 +144,7 @@ static void vkd3d_queue_update_sequence_number(struct vkd3d_queue *queue,
unsigned int i, j;
int rc;
- if ((rc = pthread_mutex_lock(&queue->mutex)))
+ if ((rc = vkd3d_mutex_lock(&queue->mutex)))
{
ERR("Failed to lock mutex, error %d.\n", rc);
return;
@@ -189,7 +189,7 @@ static void vkd3d_queue_update_sequence_number(struct vkd3d_queue *queue,
if (destroyed_semaphore_count)
TRACE("Destroyed %u Vulkan semaphores.\n", destroyed_semaphore_count);
- pthread_mutex_unlock(&queue->mutex);
+ vkd3d_mutex_unlock(&queue->mutex);
}
static uint64_t vkd3d_queue_reset_sequence_number_locked(struct vkd3d_queue *queue)
@@ -253,7 +253,7 @@ static HRESULT vkd3d_enqueue_gpu_fence(struct vkd3d_fence_worker *worker,
TRACE("worker %p, fence %p, value %#"PRIx64".\n", worker, fence, value);
- if ((rc = pthread_mutex_lock(&worker->mutex)))
+ if ((rc = vkd3d_mutex_lock(&worker->mutex)))
{
ERR("Failed to lock mutex, error %d.\n", rc);
return hresult_from_errno(rc);
@@ -263,7 +263,7 @@ static HRESULT vkd3d_enqueue_gpu_fence(struct vkd3d_fence_worker *worker,
worker->enqueued_fence_count + 1, sizeof(*worker->enqueued_fences)))
{
ERR("Failed to add GPU fence.\n");
- pthread_mutex_unlock(&worker->mutex);
+ vkd3d_mutex_unlock(&worker->mutex);
return E_OUTOFMEMORY;
}
@@ -277,8 +277,8 @@ static HRESULT vkd3d_enqueue_gpu_fence(struct vkd3d_fence_worker *worker,
InterlockedIncrement(&fence->pending_worker_operation_count);
- pthread_cond_signal(&worker->cond);
- pthread_mutex_unlock(&worker->mutex);
+ vkd3d_cond_signal(&worker->cond);
+ vkd3d_mutex_unlock(&worker->mutex);
return S_OK;
}
@@ -293,7 +293,7 @@ static void vkd3d_fence_worker_remove_fence(struct vkd3d_fence_worker *worker, s
WARN("Waiting for %u pending fence operations (fence %p).\n", count, fence);
- if ((rc = pthread_mutex_lock(&worker->mutex)))
+ if ((rc = vkd3d_mutex_lock(&worker->mutex)))
{
ERR("Failed to lock mutex, error %d.\n", rc);
return;
@@ -304,14 +304,14 @@ static void vkd3d_fence_worker_remove_fence(struct vkd3d_fence_worker *worker, s
TRACE("Still waiting for %u pending fence operations (fence %p).\n", count, fence);
worker->pending_fence_destruction = true;
- pthread_cond_signal(&worker->cond);
+ vkd3d_cond_signal(&worker->cond);
- pthread_cond_wait(&worker->fence_destruction_cond, &worker->mutex);
+ vkd3d_cond_wait(&worker->fence_destruction_cond, &worker->mutex);
}
TRACE("Removed fence %p.\n", fence);
- pthread_mutex_unlock(&worker->mutex);
+ vkd3d_mutex_unlock(&worker->mutex);
}
static void vkd3d_fence_worker_move_enqueued_fences_locked(struct vkd3d_fence_worker *worker)
@@ -412,7 +412,7 @@ static void *vkd3d_fence_worker_main(void *arg)
if (!worker->fence_count || InterlockedAdd(&worker->enqueued_fence_count, 0))
{
- if ((rc = pthread_mutex_lock(&worker->mutex)))
+ if ((rc = vkd3d_mutex_lock(&worker->mutex)))
{
ERR("Failed to lock mutex, error %d.\n", rc);
break;
@@ -420,7 +420,7 @@ static void *vkd3d_fence_worker_main(void *arg)
if (worker->pending_fence_destruction)
{
- pthread_cond_broadcast(&worker->fence_destruction_cond);
+ vkd3d_cond_broadcast(&worker->fence_destruction_cond);
worker->pending_fence_destruction = false;
}
@@ -432,19 +432,19 @@ static void *vkd3d_fence_worker_main(void *arg)
{
if (worker->should_exit)
{
- pthread_mutex_unlock(&worker->mutex);
+ vkd3d_mutex_unlock(&worker->mutex);
break;
}
- if ((rc = pthread_cond_wait(&worker->cond, &worker->mutex)))
+ if ((rc = vkd3d_cond_wait(&worker->cond, &worker->mutex)))
{
ERR("Failed to wait on condition variable, error %d.\n", rc);
- pthread_mutex_unlock(&worker->mutex);
+ vkd3d_mutex_unlock(&worker->mutex);
break;
}
}
- pthread_mutex_unlock(&worker->mutex);
+ vkd3d_mutex_unlock(&worker->mutex);
}
}
@@ -474,33 +474,33 @@ HRESULT vkd3d_fence_worker_start(struct vkd3d_fence_worker *worker,
worker->fences = NULL;
worker->fences_size = 0;
- if ((rc = pthread_mutex_init(&worker->mutex, NULL)))
+ if ((rc = vkd3d_mutex_init(&worker->mutex)))
{
ERR("Failed to initialize mutex, error %d.\n", rc);
return hresult_from_errno(rc);
}
- if ((rc = pthread_cond_init(&worker->cond, NULL)))
+ if ((rc = vkd3d_cond_init(&worker->cond)))
{
ERR("Failed to initialize condition variable, error %d.\n", rc);
- pthread_mutex_destroy(&worker->mutex);
+ vkd3d_mutex_destroy(&worker->mutex);
return hresult_from_errno(rc);
}
- if ((rc = pthread_cond_init(&worker->fence_destruction_cond, NULL)))
+ if ((rc = vkd3d_cond_init(&worker->fence_destruction_cond)))
{
ERR("Failed to initialize condition variable, error %d.\n", rc);
- pthread_mutex_destroy(&worker->mutex);
- pthread_cond_destroy(&worker->cond);
+ vkd3d_mutex_destroy(&worker->mutex);
+ vkd3d_cond_destroy(&worker->cond);
return hresult_from_errno(rc);
}
if (FAILED(hr = vkd3d_create_thread(device->vkd3d_instance,
vkd3d_fence_worker_main, worker, &worker->thread)))
{
- pthread_mutex_destroy(&worker->mutex);
- pthread_cond_destroy(&worker->cond);
- pthread_cond_destroy(&worker->fence_destruction_cond);
+ vkd3d_mutex_destroy(&worker->mutex);
+ vkd3d_cond_destroy(&worker->cond);
+ vkd3d_cond_destroy(&worker->fence_destruction_cond);
}
return hr;
@@ -514,23 +514,23 @@ HRESULT vkd3d_fence_worker_stop(struct vkd3d_fence_worker *worker,
TRACE("worker %p.\n", worker);
- if ((rc = pthread_mutex_lock(&worker->mutex)))
+ if ((rc = vkd3d_mutex_lock(&worker->mutex)))
{
ERR("Failed to lock mutex, error %d.\n", rc);
return hresult_from_errno(rc);
}
worker->should_exit = true;
- pthread_cond_signal(&worker->cond);
+ vkd3d_cond_signal(&worker->cond);
- pthread_mutex_unlock(&worker->mutex);
+ vkd3d_mutex_unlock(&worker->mutex);
if (FAILED(hr = vkd3d_join_thread(device->vkd3d_instance, &worker->thread)))
return hr;
- pthread_mutex_destroy(&worker->mutex);
- pthread_cond_destroy(&worker->cond);
- pthread_cond_destroy(&worker->fence_destruction_cond);
+ vkd3d_mutex_destroy(&worker->mutex);
+ vkd3d_cond_destroy(&worker->cond);
+ vkd3d_cond_destroy(&worker->fence_destruction_cond);
vkd3d_free(worker->enqueued_fences);
vkd3d_free(worker->vk_fences);
@@ -589,7 +589,7 @@ static VkResult d3d12_fence_create_vk_fence(struct d3d12_fence *fence, VkFence *
*vk_fence = VK_NULL_HANDLE;
- if ((rc = pthread_mutex_lock(&fence->mutex)))
+ if ((rc = vkd3d_mutex_lock(&fence->mutex)))
{
ERR("Failed to lock mutex, error %d.\n", rc);
goto create_fence;
@@ -604,7 +604,7 @@ static VkResult d3d12_fence_create_vk_fence(struct d3d12_fence *fence, VkFence *
}
}
- pthread_mutex_unlock(&fence->mutex);
+ vkd3d_mutex_unlock(&fence->mutex);
if (*vk_fence)
return VK_SUCCESS;
@@ -668,7 +668,7 @@ static void d3d12_fence_destroy_vk_objects(struct d3d12_fence *fence)
unsigned int i;
int rc;
- if ((rc = pthread_mutex_lock(&fence->mutex)))
+ if ((rc = vkd3d_mutex_lock(&fence->mutex)))
{
ERR("Failed to lock mutex, error %d.\n", rc);
return;
@@ -685,7 +685,7 @@ static void d3d12_fence_destroy_vk_objects(struct d3d12_fence *fence)
d3d12_fence_garbage_collect_vk_semaphores_locked(fence, true);
- pthread_mutex_unlock(&fence->mutex);
+ vkd3d_mutex_unlock(&fence->mutex);
}
static struct vkd3d_signaled_semaphore *d3d12_fence_acquire_vk_semaphore(struct d3d12_fence *fence,
@@ -698,7 +698,7 @@ static struct vkd3d_signaled_semaphore *d3d12_fence_acquire_vk_semaphore(struct
TRACE("fence %p, value %#"PRIx64".\n", fence, value);
- if ((rc = pthread_mutex_lock(&fence->mutex)))
+ if ((rc = vkd3d_mutex_lock(&fence->mutex)))
{
ERR("Failed to lock mutex, error %d.\n", rc);
return VK_NULL_HANDLE;
@@ -724,7 +724,7 @@ static struct vkd3d_signaled_semaphore *d3d12_fence_acquire_vk_semaphore(struct
*completed_value = fence->value;
- pthread_mutex_unlock(&fence->mutex);
+ vkd3d_mutex_unlock(&fence->mutex);
return semaphore;
}
@@ -733,7 +733,7 @@ static void d3d12_fence_remove_vk_semaphore(struct d3d12_fence *fence, struct vk
{
int rc;
- if ((rc = pthread_mutex_lock(&fence->mutex)))
+ if ((rc = vkd3d_mutex_lock(&fence->mutex)))
{
ERR("Failed to lock mutex, error %d.\n", rc);
return;
@@ -746,14 +746,14 @@ static void d3d12_fence_remove_vk_semaphore(struct d3d12_fence *fence, struct vk
--fence->semaphore_count;
- pthread_mutex_unlock(&fence->mutex);
+ vkd3d_mutex_unlock(&fence->mutex);
}
static void d3d12_fence_release_vk_semaphore(struct d3d12_fence *fence, struct vkd3d_signaled_semaphore *semaphore)
{
int rc;
- if ((rc = pthread_mutex_lock(&fence->mutex)))
+ if ((rc = vkd3d_mutex_lock(&fence->mutex)))
{
ERR("Failed to lock mutex, error %d.\n", rc);
return;
@@ -762,7 +762,7 @@ static void d3d12_fence_release_vk_semaphore(struct d3d12_fence *fence, struct v
assert(semaphore->is_acquired);
semaphore->is_acquired = false;
- pthread_mutex_unlock(&fence->mutex);
+ vkd3d_mutex_unlock(&fence->mutex);
}
static HRESULT d3d12_fence_add_vk_semaphore(struct d3d12_fence *fence,
@@ -780,7 +780,7 @@ static HRESULT d3d12_fence_add_vk_semaphore(struct d3d12_fence *fence,
return E_OUTOFMEMORY;
}
- if ((rc = pthread_mutex_lock(&fence->mutex)))
+ if ((rc = vkd3d_mutex_lock(&fence->mutex)))
{
ERR("Failed to lock mutex, error %d.\n", rc);
vkd3d_free(semaphore);
@@ -797,7 +797,7 @@ static HRESULT d3d12_fence_add_vk_semaphore(struct d3d12_fence *fence,
list_add_tail(&fence->semaphores, &semaphore->entry);
++fence->semaphore_count;
- pthread_mutex_unlock(&fence->mutex);
+ vkd3d_mutex_unlock(&fence->mutex);
return hr;
}
@@ -810,7 +810,7 @@ static HRESULT d3d12_fence_signal(struct d3d12_fence *fence, uint64_t value, VkF
unsigned int i, j;
int rc;
- if ((rc = pthread_mutex_lock(&fence->mutex)))
+ if ((rc = vkd3d_mutex_lock(&fence->mutex)))
{
ERR("Failed to lock mutex, error %d.\n", rc);
return hresult_from_errno(rc);
@@ -844,7 +844,7 @@ static HRESULT d3d12_fence_signal(struct d3d12_fence *fence, uint64_t value, VkF
fence->event_count = j;
if (signal_null_event_cond)
- pthread_cond_broadcast(&fence->null_event_cond);
+ vkd3d_cond_broadcast(&fence->null_event_cond);
if (vk_fence)
{
@@ -870,7 +870,7 @@ static HRESULT d3d12_fence_signal(struct d3d12_fence *fence, uint64_t value, VkF
VK_CALL(vkDestroyFence(device->vk_device, vk_fence, NULL));
}
- pthread_mutex_unlock(&fence->mutex);
+ vkd3d_mutex_unlock(&fence->mutex);
return S_OK;
}
@@ -926,9 +926,9 @@ static ULONG STDMETHODCALLTYPE d3d12_fence_Release(ID3D12Fence *iface)
d3d12_fence_destroy_vk_objects(fence);
vkd3d_free(fence->events);
- if ((rc = pthread_mutex_destroy(&fence->mutex)))
+ if ((rc = vkd3d_mutex_destroy(&fence->mutex)))
ERR("Failed to destroy mutex, error %d.\n", rc);
- pthread_cond_destroy(&fence->null_event_cond);
+ vkd3d_cond_destroy(&fence->null_event_cond);
vkd3d_free(fence);
d3d12_device_release(device);
@@ -995,13 +995,13 @@ static UINT64 STDMETHODCALLTYPE d3d12_fence_GetCompletedValue(ID3D12Fence *iface
TRACE("iface %p.\n", iface);
- if ((rc = pthread_mutex_lock(&fence->mutex)))
+ if ((rc = vkd3d_mutex_lock(&fence->mutex)))
{
ERR("Failed to lock mutex, error %d.\n", rc);
return 0;
}
completed_value = fence->value;
- pthread_mutex_unlock(&fence->mutex);
+ vkd3d_mutex_unlock(&fence->mutex);
return completed_value;
}
@@ -1015,7 +1015,7 @@ static HRESULT STDMETHODCALLTYPE d3d12_fence_SetEventOnCompletion(ID3D12Fence *i
TRACE("iface %p, value %#"PRIx64", event %p.\n", iface, value, event);
- if ((rc = pthread_mutex_lock(&fence->mutex)))
+ if ((rc = vkd3d_mutex_lock(&fence->mutex)))
{
ERR("Failed to lock mutex, error %d.\n", rc);
return hresult_from_errno(rc);
@@ -1025,7 +1025,7 @@ static HRESULT STDMETHODCALLTYPE d3d12_fence_SetEventOnCompletion(ID3D12Fence *i
{
if (event)
fence->device->signal_event(event);
- pthread_mutex_unlock(&fence->mutex);
+ vkd3d_mutex_unlock(&fence->mutex);
return S_OK;
}
@@ -1036,7 +1036,7 @@ static HRESULT STDMETHODCALLTYPE d3d12_fence_SetEventOnCompletion(ID3D12Fence *i
{
WARN("Event completion for (%p, %#"PRIx64") is already in the list.\n",
event, value);
- pthread_mutex_unlock(&fence->mutex);
+ vkd3d_mutex_unlock(&fence->mutex);
return S_OK;
}
}
@@ -1045,7 +1045,7 @@ static HRESULT STDMETHODCALLTYPE d3d12_fence_SetEventOnCompletion(ID3D12Fence *i
fence->event_count + 1, sizeof(*fence->events)))
{
WARN("Failed to add event.\n");
- pthread_mutex_unlock(&fence->mutex);
+ vkd3d_mutex_unlock(&fence->mutex);
return E_OUTOFMEMORY;
}
@@ -1062,10 +1062,10 @@ static HRESULT STDMETHODCALLTYPE d3d12_fence_SetEventOnCompletion(ID3D12Fence *i
if (!event)
{
while (!*latch)
- pthread_cond_wait(&fence->null_event_cond, &fence->mutex);
+ vkd3d_cond_wait(&fence->null_event_cond, &fence->mutex);
}
- pthread_mutex_unlock(&fence->mutex);
+ vkd3d_mutex_unlock(&fence->mutex);
return S_OK;
}
@@ -1116,16 +1116,16 @@ static HRESULT d3d12_fence_init(struct d3d12_fence *fence, struct d3d12_device *
fence->value = initial_value;
- if ((rc = pthread_mutex_init(&fence->mutex, NULL)))
+ if ((rc = vkd3d_mutex_init(&fence->mutex)))
{
ERR("Failed to initialize mutex, error %d.\n", rc);
return hresult_from_errno(rc);
}
- if ((rc = pthread_cond_init(&fence->null_event_cond, NULL)))
+ if ((rc = vkd3d_cond_init(&fence->null_event_cond)))
{
ERR("Failed to initialize cond variable, error %d.\n", rc);
- pthread_mutex_destroy(&fence->mutex);
+ vkd3d_mutex_destroy(&fence->mutex);
return hresult_from_errno(rc);
}
@@ -1145,8 +1145,8 @@ static HRESULT d3d12_fence_init(struct d3d12_fence *fence, struct d3d12_device *
if (FAILED(hr = vkd3d_private_store_init(&fence->private_store)))
{
- pthread_mutex_destroy(&fence->mutex);
- pthread_cond_destroy(&fence->null_event_cond);
+ vkd3d_mutex_destroy(&fence->mutex);
+ vkd3d_cond_destroy(&fence->null_event_cond);
return hr;
}
diff --git a/libs/vkd3d/device.c b/libs/vkd3d/device.c
index 4bcb5efcbba9..fe90eb37ef00 100644
--- a/libs/vkd3d/device.c
+++ b/libs/vkd3d/device.c
@@ -1878,7 +1878,7 @@ static HRESULT d3d12_device_init_pipeline_cache(struct d3d12_device *device)
VkResult vr;
int rc;
- if ((rc = pthread_mutex_init(&device->mutex, NULL)))
+ if ((rc = vkd3d_mutex_init(&device->mutex)))
{
ERR("Failed to initialize mutex, error %d.\n", rc);
return hresult_from_errno(rc);
@@ -1906,7 +1906,7 @@ static void d3d12_device_destroy_pipeline_cache(struct d3d12_device *device)
if (device->vk_pipeline_cache)
VK_CALL(vkDestroyPipelineCache(device->vk_device, device->vk_pipeline_cache, NULL));
- pthread_mutex_destroy(&device->mutex);
+ vkd3d_mutex_destroy(&device->mutex);
}
#define VKD3D_VA_FALLBACK_BASE 0x8000000000000000ull
@@ -1979,7 +1979,7 @@ D3D12_GPU_VIRTUAL_ADDRESS vkd3d_gpu_va_allocator_allocate(struct vkd3d_gpu_va_al
return 0;
size = align(size, alignment);
- if ((rc = pthread_mutex_lock(&allocator->mutex)))
+ if ((rc = vkd3d_mutex_lock(&allocator->mutex)))
{
ERR("Failed to lock mutex, error %d.\n", rc);
return 0;
@@ -1990,7 +1990,7 @@ D3D12_GPU_VIRTUAL_ADDRESS vkd3d_gpu_va_allocator_allocate(struct vkd3d_gpu_va_al
else
address = vkd3d_gpu_va_allocator_allocate_fallback(allocator, alignment, size, ptr);
- pthread_mutex_unlock(&allocator->mutex);
+ vkd3d_mutex_unlock(&allocator->mutex);
return address;
}
@@ -2061,7 +2061,7 @@ void *vkd3d_gpu_va_allocator_dereference(struct vkd3d_gpu_va_allocator *allocato
return vkd3d_gpu_va_allocator_dereference_slab(allocator, address);
/* Slow fallback. */
- if ((rc = pthread_mutex_lock(&allocator->mutex)))
+ if ((rc = vkd3d_mutex_lock(&allocator->mutex)))
{
ERR("Failed to lock mutex, error %d.\n", rc);
return NULL;
@@ -2069,7 +2069,7 @@ void *vkd3d_gpu_va_allocator_dereference(struct vkd3d_gpu_va_allocator *allocato
ret = vkd3d_gpu_va_allocator_dereference_fallback(allocator, address);
- pthread_mutex_unlock(&allocator->mutex);
+ vkd3d_mutex_unlock(&allocator->mutex);
return ret;
}
@@ -2124,7 +2124,7 @@ void vkd3d_gpu_va_allocator_free(struct vkd3d_gpu_va_allocator *allocator, D3D12
{
int rc;
- if ((rc = pthread_mutex_lock(&allocator->mutex)))
+ if ((rc = vkd3d_mutex_lock(&allocator->mutex)))
{
ERR("Failed to lock mutex, error %d.\n", rc);
return;
@@ -2133,13 +2133,13 @@ void vkd3d_gpu_va_allocator_free(struct vkd3d_gpu_va_allocator *allocator, D3D12
if (address < VKD3D_VA_FALLBACK_BASE)
{
vkd3d_gpu_va_allocator_free_slab(allocator, address);
- pthread_mutex_unlock(&allocator->mutex);
+ vkd3d_mutex_unlock(&allocator->mutex);
return;
}
vkd3d_gpu_va_allocator_free_fallback(allocator, address);
- pthread_mutex_unlock(&allocator->mutex);
+ vkd3d_mutex_unlock(&allocator->mutex);
}
static bool vkd3d_gpu_va_allocator_init(struct vkd3d_gpu_va_allocator *allocator)
@@ -2165,7 +2165,7 @@ static bool vkd3d_gpu_va_allocator_init(struct vkd3d_gpu_va_allocator *allocator
allocator->slabs[i].ptr = &allocator->slabs[i + 1];
}
- if ((rc = pthread_mutex_init(&allocator->mutex, NULL)))
+ if ((rc = vkd3d_mutex_init(&allocator->mutex)))
{
ERR("Failed to initialize mutex, error %d.\n", rc);
vkd3d_free(allocator->slabs);
@@ -2179,15 +2179,15 @@ static void vkd3d_gpu_va_allocator_cleanup(struct vkd3d_gpu_va_allocator *alloca
{
int rc;
- if ((rc = pthread_mutex_lock(&allocator->mutex)))
+ if ((rc = vkd3d_mutex_lock(&allocator->mutex)))
{
ERR("Failed to lock mutex, error %d.\n", rc);
return;
}
vkd3d_free(allocator->slabs);
vkd3d_free(allocator->fallback_allocations);
- pthread_mutex_unlock(&allocator->mutex);
- pthread_mutex_destroy(&allocator->mutex);
+ vkd3d_mutex_unlock(&allocator->mutex);
+ vkd3d_mutex_destroy(&allocator->mutex);
}
/* We could use bsearch() or recursion here, but it probably helps to omit
@@ -2223,7 +2223,7 @@ bool vkd3d_gpu_descriptor_allocator_register_range(struct vkd3d_gpu_descriptor_a
struct vkd3d_gpu_descriptor_allocation *allocation;
int rc;
- if ((rc = pthread_mutex_lock(&allocator->mutex)))
+ if ((rc = vkd3d_mutex_lock(&allocator->mutex)))
{
ERR("Failed to lock mutex, error %d.\n", rc);
return false;
@@ -2232,7 +2232,7 @@ bool vkd3d_gpu_descriptor_allocator_register_range(struct vkd3d_gpu_descriptor_a
if (!vkd3d_array_reserve((void **)&allocator->allocations, &allocator->allocations_size,
allocator->allocation_count + 1, sizeof(*allocator->allocations)))
{
- pthread_mutex_unlock(&allocator->mutex);
+ vkd3d_mutex_unlock(&allocator->mutex);
return false;
}
@@ -2247,7 +2247,7 @@ bool vkd3d_gpu_descriptor_allocator_register_range(struct vkd3d_gpu_descriptor_a
allocation->base = base;
allocation->count = count;
- pthread_mutex_unlock(&allocator->mutex);
+ vkd3d_mutex_unlock(&allocator->mutex);
return true;
}
@@ -2259,7 +2259,7 @@ bool vkd3d_gpu_descriptor_allocator_unregister_range(
size_t i;
int rc;
- if ((rc = pthread_mutex_lock(&allocator->mutex)))
+ if ((rc = vkd3d_mutex_lock(&allocator->mutex)))
{
ERR("Failed to lock mutex, error %d.\n", rc);
return false;
@@ -2277,7 +2277,7 @@ bool vkd3d_gpu_descriptor_allocator_unregister_range(
break;
}
- pthread_mutex_unlock(&allocator->mutex);
+ vkd3d_mutex_unlock(&allocator->mutex);
return found;
}
@@ -2301,7 +2301,7 @@ size_t vkd3d_gpu_descriptor_allocator_range_size_from_descriptor(
assert(allocator->allocation_count);
- if ((rc = pthread_mutex_lock(&allocator->mutex)))
+ if ((rc = vkd3d_mutex_lock(&allocator->mutex)))
{
ERR("Failed to lock mutex, error %d.\n", rc);
return 0;
@@ -2311,7 +2311,7 @@ size_t vkd3d_gpu_descriptor_allocator_range_size_from_descriptor(
if ((allocation = vkd3d_gpu_descriptor_allocator_allocation_from_descriptor(allocator, desc)))
remaining = allocation->count - (desc - allocation->base);
- pthread_mutex_unlock(&allocator->mutex);
+ vkd3d_mutex_unlock(&allocator->mutex);
return remaining;
}
@@ -2325,7 +2325,7 @@ struct d3d12_descriptor_heap *vkd3d_gpu_descriptor_allocator_heap_from_descripto
if (!allocator->allocation_count)
return NULL;
- if ((rc = pthread_mutex_lock(&allocator->mutex)))
+ if ((rc = vkd3d_mutex_lock(&allocator->mutex)))
{
ERR("Failed to lock mutex, error %d.\n", rc);
return NULL;
@@ -2333,7 +2333,7 @@ struct d3d12_descriptor_heap *vkd3d_gpu_descriptor_allocator_heap_from_descripto
allocation = vkd3d_gpu_descriptor_allocator_allocation_from_descriptor(allocator, desc);
- pthread_mutex_unlock(&allocator->mutex);
+ vkd3d_mutex_unlock(&allocator->mutex);
return allocation ? CONTAINING_RECORD(allocation->base, struct d3d12_descriptor_heap, descriptors)
: NULL;
@@ -2344,7 +2344,7 @@ static bool vkd3d_gpu_descriptor_allocator_init(struct vkd3d_gpu_descriptor_allo
int rc;
memset(allocator, 0, sizeof(*allocator));
- if ((rc = pthread_mutex_init(&allocator->mutex, NULL)))
+ if ((rc = vkd3d_mutex_init(&allocator->mutex)))
{
ERR("Failed to initialise mutex, error %d.\n", rc);
return false;
@@ -2356,7 +2356,7 @@ static bool vkd3d_gpu_descriptor_allocator_init(struct vkd3d_gpu_descriptor_allo
static void vkd3d_gpu_descriptor_allocator_cleanup(struct vkd3d_gpu_descriptor_allocator *allocator)
{
vkd3d_free(allocator->allocations);
- pthread_mutex_destroy(&allocator->mutex);
+ vkd3d_mutex_destroy(&allocator->mutex);
}
static bool have_vk_time_domain(VkTimeDomainEXT *domains, unsigned int count, VkTimeDomainEXT domain)
@@ -2479,7 +2479,7 @@ static ULONG STDMETHODCALLTYPE d3d12_device_Release(ID3D12Device *iface)
d3d12_device_destroy_pipeline_cache(device);
d3d12_device_destroy_vkd3d_queues(device);
for (i = 0; i < ARRAY_SIZE(device->desc_mutex); ++i)
- pthread_mutex_destroy(&device->desc_mutex[i]);
+ vkd3d_mutex_destroy(&device->desc_mutex[i]);
VK_CALL(vkDestroyDevice(device->vk_device, NULL));
if (device->parent)
IUnknown_Release(device->parent);
@@ -3977,7 +3977,7 @@ static HRESULT d3d12_device_init(struct d3d12_device *device,
vkd3d_time_domains_init(device);
for (i = 0; i < ARRAY_SIZE(device->desc_mutex); ++i)
- pthread_mutex_init(&device->desc_mutex[i], NULL);
+ vkd3d_mutex_init(&device->desc_mutex[i]);
if ((device->parent = create_info->parent))
IUnknown_AddRef(device->parent);
diff --git a/libs/vkd3d/resource.c b/libs/vkd3d/resource.c
index 19a163beead4..7b94ac926f28 100644
--- a/libs/vkd3d/resource.c
+++ b/libs/vkd3d/resource.c
@@ -326,7 +326,7 @@ static void d3d12_heap_destroy(struct d3d12_heap *heap)
VK_CALL(vkFreeMemory(device->vk_device, heap->vk_memory, NULL));
- pthread_mutex_destroy(&heap->mutex);
+ vkd3d_mutex_destroy(&heap->mutex);
if (heap->is_private)
device = NULL;
@@ -443,7 +443,7 @@ static HRESULT d3d12_heap_map(struct d3d12_heap *heap, uint64_t offset,
VkResult vr;
int rc;
- if ((rc = pthread_mutex_lock(&heap->mutex)))
+ if ((rc = vkd3d_mutex_lock(&heap->mutex)))
{
ERR("Failed to lock mutex, error %d.\n", rc);
if (data)
@@ -491,7 +491,7 @@ static HRESULT d3d12_heap_map(struct d3d12_heap *heap, uint64_t offset,
*data = NULL;
}
- pthread_mutex_unlock(&heap->mutex);
+ vkd3d_mutex_unlock(&heap->mutex);
return hr;
}
@@ -501,7 +501,7 @@ static void d3d12_heap_unmap(struct d3d12_heap *heap, struct d3d12_resource *res
struct d3d12_device *device = heap->device;
int rc;
- if ((rc = pthread_mutex_lock(&heap->mutex)))
+ if ((rc = vkd3d_mutex_lock(&heap->mutex)))
{
ERR("Failed to lock mutex, error %d.\n", rc);
return;
@@ -535,7 +535,7 @@ static void d3d12_heap_unmap(struct d3d12_heap *heap, struct d3d12_resource *res
}
done:
- pthread_mutex_unlock(&heap->mutex);
+ vkd3d_mutex_unlock(&heap->mutex);
}
static HRESULT validate_heap_desc(const D3D12_HEAP_DESC *desc, const struct d3d12_resource *resource)
@@ -594,7 +594,7 @@ static HRESULT d3d12_heap_init(struct d3d12_heap *heap,
if (FAILED(hr = validate_heap_desc(&heap->desc, resource)))
return hr;
- if ((rc = pthread_mutex_init(&heap->mutex, NULL)))
+ if ((rc = vkd3d_mutex_init(&heap->mutex)))
{
ERR("Failed to initialize mutex, error %d.\n", rc);
return hresult_from_errno(rc);
@@ -602,7 +602,7 @@ static HRESULT d3d12_heap_init(struct d3d12_heap *heap,
if (FAILED(hr = vkd3d_private_store_init(&heap->private_store)))
{
- pthread_mutex_destroy(&heap->mutex);
+ vkd3d_mutex_destroy(&heap->mutex);
return hr;
}
@@ -636,7 +636,7 @@ static HRESULT d3d12_heap_init(struct d3d12_heap *heap,
if (FAILED(hr))
{
vkd3d_private_store_destroy(&heap->private_store);
- pthread_mutex_destroy(&heap->mutex);
+ vkd3d_mutex_destroy(&heap->mutex);
return hr;
}
@@ -2126,10 +2126,10 @@ void d3d12_desc_write_atomic(struct d3d12_desc *dst, const struct d3d12_desc *sr
struct d3d12_device *device)
{
struct vkd3d_view *defunct_view = NULL;
- pthread_mutex_t *mutex;
+ struct vkd3d_mutex *mutex;
mutex = d3d12_device_get_descriptor_mutex(device, dst);
- pthread_mutex_lock(mutex);
+ vkd3d_mutex_lock(mutex);
/* Nothing to do for VKD3D_DESCRIPTOR_MAGIC_CBV. */
if ((dst->magic & VKD3D_DESCRIPTOR_MAGIC_HAS_VIEW)
@@ -2138,7 +2138,7 @@ void d3d12_desc_write_atomic(struct d3d12_desc *dst, const struct d3d12_desc *sr
*dst = *src;
- pthread_mutex_unlock(mutex);
+ vkd3d_mutex_unlock(mutex);
/* Destroy the view after unlocking to reduce wait time. */
if (defunct_view)
@@ -2156,21 +2156,21 @@ void d3d12_desc_copy(struct d3d12_desc *dst, const struct d3d12_desc *src,
struct d3d12_device *device)
{
struct d3d12_desc tmp;
- pthread_mutex_t *mutex;
+ struct vkd3d_mutex *mutex;
assert(dst != src);
/* Shadow of the Tomb Raider and possibly other titles sometimes destroy
* and rewrite a descriptor in another thread while it is being copied. */
mutex = d3d12_device_get_descriptor_mutex(device, src);
- pthread_mutex_lock(mutex);
+ vkd3d_mutex_lock(mutex);
if (src->magic & VKD3D_DESCRIPTOR_MAGIC_HAS_VIEW)
vkd3d_view_incref(src->u.view);
tmp = *src;
- pthread_mutex_unlock(mutex);
+ vkd3d_mutex_unlock(mutex);
d3d12_desc_write_atomic(dst, &tmp, device);
}
diff --git a/libs/vkd3d/state.c b/libs/vkd3d/state.c
index b54a6527c016..12c7a9e8f65c 100644
--- a/libs/vkd3d/state.c
+++ b/libs/vkd3d/state.c
@@ -1432,7 +1432,7 @@ HRESULT vkd3d_render_pass_cache_find(struct vkd3d_render_pass_cache *cache,
unsigned int i;
int rc;
- if ((rc = pthread_mutex_lock(&device->mutex)))
+ if ((rc = vkd3d_mutex_lock(&device->mutex)))
{
ERR("Failed to lock mutex, error %d.\n", rc);
*vk_render_pass = VK_NULL_HANDLE;
@@ -1454,7 +1454,7 @@ HRESULT vkd3d_render_pass_cache_find(struct vkd3d_render_pass_cache *cache,
if (!found)
hr = vkd3d_render_pass_cache_create_pass_locked(cache, device, key, vk_render_pass);
- pthread_mutex_unlock(&device->mutex);
+ vkd3d_mutex_unlock(&device->mutex);
return hr;
}
@@ -3078,7 +3078,7 @@ static VkPipeline d3d12_pipeline_state_find_compiled_pipeline(const struct d3d12
*vk_render_pass = VK_NULL_HANDLE;
- if (!(rc = pthread_mutex_lock(&device->mutex)))
+ if (!(rc = vkd3d_mutex_lock(&device->mutex)))
{
LIST_FOR_EACH_ENTRY(current, &graphics->compiled_pipelines, struct vkd3d_compiled_pipeline, entry)
{
@@ -3089,7 +3089,7 @@ static VkPipeline d3d12_pipeline_state_find_compiled_pipeline(const struct d3d12
break;
}
}
- pthread_mutex_unlock(&device->mutex);
+ vkd3d_mutex_unlock(&device->mutex);
}
else
{
@@ -3114,7 +3114,7 @@ static bool d3d12_pipeline_state_put_pipeline_to_cache(struct d3d12_pipeline_sta
compiled_pipeline->vk_pipeline = vk_pipeline;
compiled_pipeline->vk_render_pass = vk_render_pass;
- if ((rc = pthread_mutex_lock(&device->mutex)))
+ if ((rc = vkd3d_mutex_lock(&device->mutex)))
{
ERR("Failed to lock mutex, error %d.\n", rc);
vkd3d_free(compiled_pipeline);
@@ -3134,7 +3134,7 @@ static bool d3d12_pipeline_state_put_pipeline_to_cache(struct d3d12_pipeline_sta
if (compiled_pipeline)
list_add_tail(&graphics->compiled_pipelines, &compiled_pipeline->entry);
- pthread_mutex_unlock(&device->mutex);
+ vkd3d_mutex_unlock(&device->mutex);
return compiled_pipeline;
}
diff --git a/libs/vkd3d/utils.c b/libs/vkd3d/utils.c
index cdb81f671b94..873f840ccf56 100644
--- a/libs/vkd3d/utils.c
+++ b/libs/vkd3d/utils.c
@@ -948,7 +948,7 @@ HRESULT vkd3d_get_private_data(struct vkd3d_private_store *store,
if (!out_size)
return E_INVALIDARG;
- if ((rc = pthread_mutex_lock(&store->mutex)))
+ if ((rc = vkd3d_mutex_lock(&store->mutex)))
{
ERR("Failed to lock mutex, error %d.\n", rc);
return hresult_from_errno(rc);
@@ -977,7 +977,7 @@ HRESULT vkd3d_get_private_data(struct vkd3d_private_store *store,
memcpy(out, data->u.data, data->size);
done:
- pthread_mutex_unlock(&store->mutex);
+ vkd3d_mutex_unlock(&store->mutex);
return hr;
}
@@ -987,7 +987,7 @@ HRESULT vkd3d_set_private_data(struct vkd3d_private_store *store,
HRESULT hr;
int rc;
- if ((rc = pthread_mutex_lock(&store->mutex)))
+ if ((rc = vkd3d_mutex_lock(&store->mutex)))
{
ERR("Failed to lock mutex, error %d.\n", rc);
return hresult_from_errno(rc);
@@ -995,7 +995,7 @@ HRESULT vkd3d_set_private_data(struct vkd3d_private_store *store,
hr = vkd3d_private_store_set_private_data(store, tag, data, data_size, false);
- pthread_mutex_unlock(&store->mutex);
+ vkd3d_mutex_unlock(&store->mutex);
return hr;
}
@@ -1006,7 +1006,7 @@ HRESULT vkd3d_set_private_data_interface(struct vkd3d_private_store *store,
HRESULT hr;
int rc;
- if ((rc = pthread_mutex_lock(&store->mutex)))
+ if ((rc = vkd3d_mutex_lock(&store->mutex)))
{
ERR("Failed to lock mutex, error %d.\n", rc);
return hresult_from_errno(rc);
@@ -1014,7 +1014,7 @@ HRESULT vkd3d_set_private_data_interface(struct vkd3d_private_store *store,
hr = vkd3d_private_store_set_private_data(store, tag, data, sizeof(object), !!object);
- pthread_mutex_unlock(&store->mutex);
+ vkd3d_mutex_unlock(&store->mutex);
return hr;
}
diff --git a/libs/vkd3d/vkd3d_private.h b/libs/vkd3d/vkd3d_private.h
index d21cd411ec8a..bb7be99e7efc 100644
--- a/libs/vkd3d/vkd3d_private.h
+++ b/libs/vkd3d/vkd3d_private.h
@@ -171,6 +171,62 @@ union vkd3d_thread_handle
void *handle;
};
+struct vkd3d_mutex
+{
+ pthread_mutex_t lock;
+};
+
+struct vkd3d_cond
+{
+ pthread_cond_t cond;
+};
+
+
+static inline int vkd3d_mutex_init(struct vkd3d_mutex *lock)
+{
+ return pthread_mutex_init(&lock->lock, NULL);
+}
+
+static inline int vkd3d_mutex_lock(struct vkd3d_mutex *lock)
+{
+ return pthread_mutex_lock(&lock->lock);
+}
+
+static inline int vkd3d_mutex_unlock(struct vkd3d_mutex *lock)
+{
+ return pthread_mutex_unlock(&lock->lock);
+}
+
+static inline int vkd3d_mutex_destroy(struct vkd3d_mutex *lock)
+{
+ return pthread_mutex_destroy(&lock->lock);
+}
+
+static inline int vkd3d_cond_init(struct vkd3d_cond *cond)
+{
+ return pthread_cond_init(&cond->cond, NULL);
+}
+
+static inline int vkd3d_cond_signal(struct vkd3d_cond *cond)
+{
+ return pthread_cond_signal(&cond->cond);
+}
+
+static inline int vkd3d_cond_broadcast(struct vkd3d_cond *cond)
+{
+ return pthread_cond_broadcast(&cond->cond);
+}
+
+static inline int vkd3d_cond_wait(struct vkd3d_cond *cond, struct vkd3d_mutex *lock)
+{
+ return pthread_cond_wait(&cond->cond, &lock->lock);
+}
+
+static inline int vkd3d_cond_destroy(struct vkd3d_cond *cond)
+{
+ return pthread_cond_destroy(&cond->cond);
+}
+
HRESULT vkd3d_create_thread(struct vkd3d_instance *instance,
PFN_vkd3d_thread thread_main, void *data, union vkd3d_thread_handle *thread);
HRESULT vkd3d_join_thread(struct vkd3d_instance *instance, union vkd3d_thread_handle *thread);
@@ -186,9 +242,9 @@ struct vkd3d_waiting_fence
struct vkd3d_fence_worker
{
union vkd3d_thread_handle thread;
- pthread_mutex_t mutex;
- pthread_cond_t cond;
- pthread_cond_t fence_destruction_cond;
+ struct vkd3d_mutex mutex;
+ struct vkd3d_cond cond;
+ struct vkd3d_cond fence_destruction_cond;
bool should_exit;
bool pending_fence_destruction;
@@ -227,7 +283,7 @@ struct vkd3d_gpu_va_slab
struct vkd3d_gpu_va_allocator
{
- pthread_mutex_t mutex;
+ struct vkd3d_mutex mutex;
D3D12_GPU_VIRTUAL_ADDRESS fallback_floor;
struct vkd3d_gpu_va_allocation *fallback_allocations;
@@ -251,7 +307,7 @@ struct vkd3d_gpu_descriptor_allocation
struct vkd3d_gpu_descriptor_allocator
{
- pthread_mutex_t mutex;
+ struct vkd3d_mutex mutex;
struct vkd3d_gpu_descriptor_allocation *allocations;
size_t allocations_size;
@@ -294,7 +350,7 @@ void vkd3d_render_pass_cache_init(struct vkd3d_render_pass_cache *cache);
struct vkd3d_private_store
{
- pthread_mutex_t mutex;
+ struct vkd3d_mutex mutex;
struct list content;
};
@@ -327,7 +383,7 @@ static inline HRESULT vkd3d_private_store_init(struct vkd3d_private_store *store
list_init(&store->content);
- if ((rc = pthread_mutex_init(&store->mutex, NULL)))
+ if ((rc = vkd3d_mutex_init(&store->mutex)))
ERR("Failed to initialize mutex, error %d.\n", rc);
return hresult_from_errno(rc);
@@ -342,7 +398,7 @@ static inline void vkd3d_private_store_destroy(struct vkd3d_private_store *store
vkd3d_private_data_destroy(data);
}
- pthread_mutex_destroy(&store->mutex);
+ vkd3d_mutex_destroy(&store->mutex);
}
HRESULT vkd3d_get_private_data(struct vkd3d_private_store *store, const GUID *tag, unsigned int *out_size, void *out);
@@ -366,8 +422,8 @@ struct d3d12_fence
LONG refcount;
uint64_t value;
- pthread_mutex_t mutex;
- pthread_cond_t null_event_cond;
+ struct vkd3d_mutex mutex;
+ struct vkd3d_cond null_event_cond;
struct vkd3d_waiting_event
{
@@ -402,7 +458,7 @@ struct d3d12_heap
bool is_private;
D3D12_HEAP_DESC desc;
- pthread_mutex_t mutex;
+ struct vkd3d_mutex mutex;
VkDeviceMemory vk_memory;
void *map_ptr;
@@ -1041,7 +1097,7 @@ HRESULT d3d12_command_list_create(struct d3d12_device *device,
struct vkd3d_queue
{
/* Access to VkQueue must be externally synchronized. */
- pthread_mutex_t mutex;
+ struct vkd3d_mutex mutex;
VkQueue vk_queue;
@@ -1181,8 +1237,8 @@ struct d3d12_device
struct vkd3d_gpu_va_allocator gpu_va_allocator;
struct vkd3d_fence_worker fence_worker;
- pthread_mutex_t mutex;
- pthread_mutex_t desc_mutex[8];
+ struct vkd3d_mutex mutex;
+ struct vkd3d_mutex desc_mutex[8];
struct vkd3d_render_pass_cache render_pass_cache;
VkPipelineCache vk_pipeline_cache;
@@ -1249,7 +1305,7 @@ static inline unsigned int d3d12_device_get_descriptor_handle_increment_size(str
return ID3D12Device_GetDescriptorHandleIncrementSize(&device->ID3D12Device_iface, descriptor_type);
}
-static inline pthread_mutex_t *d3d12_device_get_descriptor_mutex(struct d3d12_device *device,
+static inline struct vkd3d_mutex *d3d12_device_get_descriptor_mutex(struct d3d12_device *device,
const struct d3d12_desc *descriptor)
{
STATIC_ASSERT(!(ARRAY_SIZE(device->desc_mutex) & (ARRAY_SIZE(device->desc_mutex) - 1)));
--
2.34.1
2
1
From: Francisco Casas <fcasas(a)codeweavers.com>
Signed-off-by: Francisco Casas <fcasas(a)codeweavers.com>
Signed-off-by: Zebediah Figura <zfigura(a)codeweavers.com>
Signed-off-by: Giovanni Mascellani <gmascellani(a)codeweavers.com>
Signed-off-by: Matteo Bruni <mbruni(a)codeweavers.com>
---
v4: Tweak style a tiny bit.
Makefile.am | 2 +
tests/hlsl-initializer-struct.shader_test | 84 +++++++++++++++++++++++
2 files changed, 86 insertions(+)
create mode 100644 tests/hlsl-initializer-struct.shader_test
diff --git a/Makefile.am b/Makefile.am
index 84c7b859..8cedf208 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -70,6 +70,7 @@ vkd3d_shader_tests = \
tests/hlsl-gather.shader_test \
tests/hlsl-initializer-local-array.shader_test \
tests/hlsl-initializer-static-array.shader_test \
+ tests/hlsl-initializer-struct.shader_test \
tests/hlsl-intrinsic-override.shader_test \
tests/hlsl-invalid.shader_test \
tests/hlsl-majority-pragma.shader_test \
@@ -299,6 +300,7 @@ XFAIL_TESTS = \
tests/hlsl-array-dimension.shader_test \
tests/hlsl-initializer-local-array.shader_test \
tests/hlsl-initializer-static-array.shader_test \
+ tests/hlsl-initializer-struct.shader_test \
tests/hlsl-bool-cast.shader_test \
tests/hlsl-duplicate-modifiers.shader_test \
tests/hlsl-for.shader_test \
diff --git a/tests/hlsl-initializer-struct.shader_test b/tests/hlsl-initializer-struct.shader_test
new file mode 100644
index 00000000..f4028b5b
--- /dev/null
+++ b/tests/hlsl-initializer-struct.shader_test
@@ -0,0 +1,84 @@
+[pixel shader]
+struct stu
+{
+ int3 aaa;
+ float3 bbb;
+ int2 ccc;
+ float4 ddd;
+ int eee;
+};
+
+float4 main() : sv_target
+{
+ struct stu val =
+ {
+ 11, 12, 13,
+ 21, 22, 23,
+ 31, 32,
+ 41, 42, 43, 44,
+ 51
+ };
+ return val.ddd;
+}
+
+[test]
+draw quad
+probe all rgba (41, 42, 43, 44)
+
+
+[pixel shader]
+struct stu
+{
+ int3 aaa;
+ float3 bbb[2];
+ int2 ccc;
+ float4 ddd[3][2];
+ int eee;
+};
+
+float4 main() : sv_target
+{
+ struct stu val =
+ {
+ 11, 12, 13,
+ 211, 212, 213, 221, 222, 223,
+ 31, 32,
+ 4111, 4112, 4113, 4114, 4121, 4122, 4123, 4124,
+ 4211, 4212, 4213, 4214, 4221, 4222, 4223, 4224,
+ 4311, 4312, 4313, 4314, 4321, 4322, 4323, 4324,
+ 51
+ };
+ return val.ddd[2][0];
+}
+
+[test]
+draw quad
+probe all rgba (4311, 4312, 4313, 4314)
+
+
+[pixel shader]
+struct stu
+{
+ int3 aaa;
+ struct
+ {
+ float4 foo;
+ int2 bar;
+ } bbb[3];
+};
+
+float4 main() : sv_target
+{
+ struct stu val =
+ {
+ 1, 2, 3,
+ 11, 12, 13, 14, 15, 16,
+ 21, 22, 23, 24, 25, 26,
+ 31, 32, 33, 34, 35, 36
+ };
+ return val.bbb[1].foo;
+}
+
+[test]
+draw quad
+probe all rgba (21, 22, 23, 24)
--
2.34.1
2
13
2
1
Feb. 4, 2022
Signed-off-by: Andrey Gusev <andrey.goosev(a)gmail.com>
---
v2: Updated spec entries.
configure.ac | 1 +
dlls/api-ms-win-security-lsalookup-ansi-l2-1-0/Makefile.in | 1 +
.../api-ms-win-security-lsalookup-ansi-l2-1-0.spec | 5 +++++
tools/make_specfiles | 1 +
4 files changed, 8 insertions(+)
create mode 100644 dlls/api-ms-win-security-lsalookup-ansi-l2-1-0/Makefile.in
create mode 100644 dlls/api-ms-win-security-lsalookup-ansi-l2-1-0/api-ms-win-security-lsalookup-ansi-l2-1-0.spec
diff --git a/configure.ac b/configure.ac
index 63e7aa7f5dd..e51e114c45e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2545,6 +2545,7 @@ WINE_CONFIG_MAKEFILE(dlls/api-ms-win-security-base-private-l1-1-1)
WINE_CONFIG_MAKEFILE(dlls/api-ms-win-security-credentials-l1-1-0)
WINE_CONFIG_MAKEFILE(dlls/api-ms-win-security-cryptoapi-l1-1-0)
WINE_CONFIG_MAKEFILE(dlls/api-ms-win-security-grouppolicy-l1-1-0)
+WINE_CONFIG_MAKEFILE(dlls/api-ms-win-security-lsalookup-ansi-l2-1-0)
WINE_CONFIG_MAKEFILE(dlls/api-ms-win-security-lsalookup-l1-1-0)
WINE_CONFIG_MAKEFILE(dlls/api-ms-win-security-lsalookup-l1-1-1)
WINE_CONFIG_MAKEFILE(dlls/api-ms-win-security-lsalookup-l2-1-0)
diff --git a/dlls/api-ms-win-security-lsalookup-ansi-l2-1-0/Makefile.in b/dlls/api-ms-win-security-lsalookup-ansi-l2-1-0/Makefile.in
new file mode 100644
index 00000000000..3a880198bd7
--- /dev/null
+++ b/dlls/api-ms-win-security-lsalookup-ansi-l2-1-0/Makefile.in
@@ -0,0 +1 @@
+MODULE = api-ms-win-security-lsalookup-ansi-l2-1-0.dll
diff --git a/dlls/api-ms-win-security-lsalookup-ansi-l2-1-0/api-ms-win-security-lsalookup-ansi-l2-1-0.spec b/dlls/api-ms-win-security-lsalookup-ansi-l2-1-0/api-ms-win-security-lsalookup-ansi-l2-1-0.spec
new file mode 100644
index 00000000000..fcb48049250
--- /dev/null
+++ b/dlls/api-ms-win-security-lsalookup-ansi-l2-1-0/api-ms-win-security-lsalookup-ansi-l2-1-0.spec
@@ -0,0 +1,5 @@
+@ stdcall LookupAccountNameA(str str ptr ptr ptr ptr ptr) advapi32.LookupAccountNameA
+@ stdcall LookupAccountSidA(str ptr ptr ptr ptr ptr ptr) advapi32.LookupAccountSidA
+@ stdcall LookupPrivilegeDisplayNameA(str str str ptr ptr) advapi32.LookupPrivilegeDisplayNameA
+@ stdcall LookupPrivilegeNameA(str ptr ptr ptr) advapi32.LookupPrivilegeNameA
+@ stdcall LookupPrivilegeValueA(str str ptr) advapi32.LookupPrivilegeValueA
diff --git a/tools/make_specfiles b/tools/make_specfiles
index b5e6443dd3c..594e01396db 100755
--- a/tools/make_specfiles
+++ b/tools/make_specfiles
@@ -137,6 +137,7 @@ my @dll_groups =
"api-ms-win-security-base-private-l1-1-1",
"api-ms-win-security-credentials-l1-1-0",
"api-ms-win-security-cryptoapi-l1-1-0",
+ "api-ms-win-security-lsalookup-ansi-l2-1-0",
"api-ms-win-security-lsalookup-l1-1-0",
"api-ms-win-security-lsalookup-l1-1-1",
"api-ms-win-security-lsalookup-l2-1-0",
--
2.34.1
1
0
32 bit compilation has been broken by 8db1662d749991a77b8945c752ab024d2d6b1244
(failing on C_ASSERT)
Signed-off-by: Eric Pouech <eric.pouech(a)gmail.com>
---
dlls/wldap32/libldap.c | 18 ++++++++++++++----
1 file changed, 14 insertions(+), 4 deletions(-)
diff --git a/dlls/wldap32/libldap.c b/dlls/wldap32/libldap.c
index 8872421dabc..03b71f3db87 100644
--- a/dlls/wldap32/libldap.c
+++ b/dlls/wldap32/libldap.c
@@ -53,7 +53,14 @@ C_ASSERT( sizeof(LDAPSortKeyU) == sizeof(LDAPSortKey) );
C_ASSERT( sizeof(LDAPVLVInfoU) == sizeof(LDAPVLVInfo) );
C_ASSERT( sizeof(LDAPAPIInfoU) == sizeof(LDAPAPIInfo) );
C_ASSERT( sizeof(LDAPAPIFeatureInfoU) == sizeof(LDAPAPIFeatureInfo) );
-C_ASSERT( sizeof(struct timevalU) == sizeof(struct timeval) );
+
+static struct timeval *cconvert_timeval(const struct timevalU *tvu, struct timeval *tv)
+{
+ if (!tvu) return NULL;
+ tv->tv_sec = tvu->tv_sec;
+ tv->tv_usec = tvu->tv_usec;
+ return tv;
+}
#define WLDAP32_LBER_ERROR (~0l)
@@ -488,8 +495,9 @@ static NTSTATUS wrap_ldap_rename_s( void *args )
static NTSTATUS wrap_ldap_result( void *args )
{
struct ldap_result_params *params = args;
+ struct timeval tv;
return ldap_result( params->ld, params->msgid, params->all,
- (struct timeval *)params->timeout, (LDAPMessage **)params->result );
+ convert_timeval(params->timeout, &tv), (LDAPMessage **)params->result );
}
static NTSTATUS wrap_ldap_sasl_bind( void *args )
@@ -555,18 +563,20 @@ static NTSTATUS wrap_ldap_sasl_interactive_bind_s( void *args )
static NTSTATUS wrap_ldap_search_ext( void *args )
{
struct ldap_search_ext_params *params = args;
+ struct timeval tv;
return ldap_search_ext( params->ld, params->base, params->scope, params->filter, params->attrs,
params->attrsonly, (LDAPControl **)params->serverctrls,
- (LDAPControl **)params->clientctrls, (struct timeval *)params->timeout,
+ (LDAPControl **)params->clientctrls, convert_timeval(params->timeout, &tv),
params->sizelimit, (int *)params->msg );
}
static NTSTATUS wrap_ldap_search_ext_s( void *args )
{
struct ldap_search_ext_s_params *params = args;
+ struct timeval tv;
return ldap_search_ext_s( params->ld, params->base, params->scope, params->filter, params->attrs,
params->attrsonly, (LDAPControl **)params->serverctrls,
- (LDAPControl **)params->clientctrls, (struct timeval *)params->timeout,
+ (LDAPControl **)params->clientctrls, convert_timeval(params->timeout, &tv),
params->sizelimit, (LDAPMessage **)params->result );
}
4
4
Feb. 4, 2022
A bunch of them... nothing fancy
A+
---
Eric Pouech (19):
programs/attrib: enable compilation with long types
programs/cabarc: enable compilation with long types
programs/chcp.com: enable compilation with long types
programs/conhost: enable compilation with long types
programs/[cw]script: enable compilation with long types
programs/dxdiag: enable compilation with long types
programs/eject: enable compilation with long types
programs/explorer: enable compilation with long types
programs/fsutil: enable compilation with long types
programs/msiexec: enable compilation with long types
programs/net: enable compilation with long types
programs/netstat: enable compilation with long types
programs/ping: enable compilation with long types
programs/plugplay: enable compilation with long types
programs/presentationfontcache: enable compilation with long types
programs/regedit: enable compilation with long types
programs/reg: enable compilation with long types
programs/regsvr32: enable compilation with long types
programs/rpcss: enable compilation with long types
programs/attrib/Makefile.in | 1 -
programs/attrib/attrib.c | 6 +--
programs/cabarc/Makefile.in | 1 -
programs/cabarc/cabarc.c | 2 +-
programs/chcp.com/Makefile.in | 1 -
programs/chcp.com/main.c | 4 +-
programs/conhost/Makefile.in | 1 -
programs/conhost/conhost.c | 18 ++++----
programs/conhost/window.c | 10 ++---
programs/cscript/Makefile.in | 2 +-
programs/dxdiag/Makefile.in | 1 -
programs/dxdiag/information.c | 2 +-
programs/dxdiag/output.c | 6 +--
programs/eject/Makefile.in | 1 -
programs/eject/eject.c | 6 +--
programs/explorer/Makefile.in | 1 -
programs/explorer/appbar.c | 2 +-
programs/explorer/desktop.c | 52 +++++++++++-----------
programs/explorer/explorer.c | 4 +-
programs/explorer/systray.c | 2 +-
programs/fsutil/Makefile.in | 1 -
programs/fsutil/main.c | 2 +-
programs/msiexec/Makefile.in | 1 -
programs/msiexec/msiexec.c | 12 ++---
programs/msiexec/service.c | 4 +-
programs/net/Makefile.in | 1 -
programs/net/net.c | 4 +-
programs/netstat/Makefile.in | 1 -
programs/netstat/netstat.c | 2 +-
programs/ping/Makefile.in | 1 -
programs/ping/ping_main.c | 2 +-
programs/plugplay/Makefile.in | 1 -
programs/plugplay/main.c | 8 ++--
programs/presentationfontcache/Makefile.in | 1 -
programs/presentationfontcache/main.c | 2 +-
programs/reg/Makefile.in | 1 -
programs/reg/import.c | 2 +-
programs/reg/reg.c | 4 +-
programs/regedit/Makefile.in | 1 -
programs/regedit/edit.c | 2 +-
programs/regedit/framewnd.c | 2 +-
programs/regedit/main.c | 2 +-
programs/regedit/regedit.c | 6 +--
programs/regsvr32/Makefile.in | 1 -
programs/regsvr32/regsvr32.c | 6 +--
programs/rpcss/Makefile.in | 1 -
programs/rpcss/epmp.c | 10 ++---
programs/rpcss/irotp.c | 8 ++--
programs/rpcss/rpcss_main.c | 4 +-
programs/wscript/Makefile.in | 1 -
programs/wscript/arguments.c | 8 ++--
programs/wscript/host.c | 10 ++---
programs/wscript/main.c | 6 +--
53 files changed, 111 insertions(+), 130 deletions(-)
1
19
1
0
Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com>
---
dlls/dxva2/Makefile.in | 1 -
dlls/dxva2/main.c | 38 +++++++++++++++++++-------------------
2 files changed, 19 insertions(+), 20 deletions(-)
diff --git a/dlls/dxva2/Makefile.in b/dlls/dxva2/Makefile.in
index 66add06535b..8f7a62bb902 100644
--- a/dlls/dxva2/Makefile.in
+++ b/dlls/dxva2/Makefile.in
@@ -1,4 +1,3 @@
-EXTRADEFS = -DWINE_NO_LONG_TYPES
MODULE = dxva2.dll
IMPORTS = uuid ole32
IMPORTLIB = dxva2
diff --git a/dlls/dxva2/main.c b/dlls/dxva2/main.c
index 5beac4164a6..b262990e0f7 100644
--- a/dlls/dxva2/main.c
+++ b/dlls/dxva2/main.c
@@ -163,7 +163,7 @@ static ULONG WINAPI video_processor_AddRef(IDirectXVideoProcessor *iface)
struct video_processor *processor = impl_from_IDirectXVideoProcessor(iface);
ULONG refcount = InterlockedIncrement(&processor->refcount);
- TRACE("%p, refcount %u.\n", iface, refcount);
+ TRACE("%p, refcount %lu.\n", iface, refcount);
return refcount;
}
@@ -173,7 +173,7 @@ static ULONG WINAPI video_processor_Release(IDirectXVideoProcessor *iface)
struct video_processor *processor = impl_from_IDirectXVideoProcessor(iface);
ULONG refcount = InterlockedDecrement(&processor->refcount);
- TRACE("%p, refcount %u.\n", iface, refcount);
+ TRACE("%p, refcount %lu.\n", iface, refcount);
if (!refcount)
{
@@ -314,7 +314,7 @@ static HRESULT WINAPI video_processor_VideoProcessBlt(IDirectXVideoProcessor *if
if (FAILED(hr = IDirect3DSurface9_GetDevice(rt, &device)))
{
- WARN("Failed to get surface device, hr %#x.\n", hr);
+ WARN("Failed to get surface device, hr %#lx.\n", hr);
return hr;
}
@@ -330,7 +330,7 @@ static HRESULT WINAPI video_processor_VideoProcessBlt(IDirectXVideoProcessor *if
if (FAILED(hr = IDirect3DDevice9_StretchRect(device, samples[i].SrcSurface, &samples[i].SrcRect,
rt, &dst_rect, D3DTEXF_POINT)))
{
- WARN("Failed to copy sample %u, hr %#x.\n", i, hr);
+ WARN("Failed to copy sample %u, hr %#lx.\n", i, hr);
}
}
@@ -398,7 +398,7 @@ static HRESULT WINAPI device_manager_processor_service_CreateSurface(IDirectXVid
unsigned int i, j;
HRESULT hr;
- TRACE("%p, %u, %u, %u, %u, %u, %u, %u, %p, %p.\n", iface, width, height, backbuffers, format, pool, usage, dxvaType,
+ TRACE("%p, %u, %u, %u, %u, %u, %lu, %lu, %p, %p.\n", iface, width, height, backbuffers, format, pool, usage, dxvaType,
surfaces, shared_handle);
if (backbuffers >= UINT_MAX)
@@ -679,7 +679,7 @@ static HRESULT WINAPI device_manager_decoder_service_CreateSurface(IDirectXVideo
UINT width, UINT height, UINT backbuffers, D3DFORMAT format, D3DPOOL pool, DWORD usage, DWORD dxvaType,
IDirect3DSurface9 **surfaces, HANDLE *shared_handle)
{
- FIXME("%p, %u, %u, %u, %#x, %d, %d, %d, %p, %p.\n", iface, width, height, backbuffers, format, pool, usage,
+ FIXME("%p, %u, %u, %u, %#x, %d, %ld, %ld, %p, %p.\n", iface, width, height, backbuffers, format, pool, usage,
dxvaType, surfaces, shared_handle);
return E_NOTIMPL;
@@ -753,7 +753,7 @@ static ULONG WINAPI device_manager_AddRef(IDirect3DDeviceManager9 *iface)
struct device_manager *manager = impl_from_IDirect3DDeviceManager9(iface);
ULONG refcount = InterlockedIncrement(&manager->refcount);
- TRACE("%p, refcount %u.\n", iface, refcount);
+ TRACE("%p, refcount %lu.\n", iface, refcount);
return refcount;
}
@@ -764,7 +764,7 @@ static ULONG WINAPI device_manager_Release(IDirect3DDeviceManager9 *iface)
ULONG refcount = InterlockedDecrement(&manager->refcount);
size_t i;
- TRACE("%p, refcount %u.\n", iface, refcount);
+ TRACE("%p, refcount %lu.\n", iface, refcount);
if (!refcount)
{
@@ -1037,7 +1037,7 @@ static const IDirect3DDeviceManager9Vtbl device_manager_vtbl =
BOOL WINAPI CapabilitiesRequestAndCapabilitiesReply( HMONITOR monitor, LPSTR buffer, DWORD length )
{
- FIXME("(%p, %p, %d): stub\n", monitor, buffer, length);
+ FIXME("%p, %p, %ld: stub.\n", monitor, buffer, length);
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
return FALSE;
@@ -1113,7 +1113,7 @@ BOOL WINAPI DestroyPhysicalMonitor( HMONITOR monitor )
BOOL WINAPI DestroyPhysicalMonitors( DWORD arraySize, LPPHYSICAL_MONITOR array )
{
- FIXME("(0x%x, %p): stub\n", arraySize, array);
+ FIXME("%lu, %p: stub.\n", arraySize, array);
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
return FALSE;
@@ -1221,7 +1221,7 @@ HRESULT WINAPI GetNumberOfPhysicalMonitorsFromIDirect3DDevice9( IDirect3DDevice9
BOOL WINAPI GetPhysicalMonitorsFromHMONITOR( HMONITOR monitor, DWORD arraySize, LPPHYSICAL_MONITOR array )
{
- FIXME("(%p, 0x%x, %p): stub\n", monitor, arraySize, array);
+ FIXME("%p, %lu, %p: stub.\n", monitor, arraySize, array);
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
return FALSE;
@@ -1229,7 +1229,7 @@ BOOL WINAPI GetPhysicalMonitorsFromHMONITOR( HMONITOR monitor, DWORD arraySize,
HRESULT WINAPI GetPhysicalMonitorsFromIDirect3DDevice9( IDirect3DDevice9 *device, DWORD arraySize, LPPHYSICAL_MONITOR array )
{
- FIXME("(%p, 0x%x, %p): stub\n", device, arraySize, array);
+ FIXME("%p, %lu, %p: stub.\n", device, arraySize, array);
return E_NOTIMPL;
}
@@ -1301,7 +1301,7 @@ BOOL WINAPI SaveCurrentSettings( HMONITOR monitor )
BOOL WINAPI SetMonitorBrightness( HMONITOR monitor, DWORD brightness )
{
- FIXME("(%p, 0x%x): stub\n", monitor, brightness);
+ FIXME("%p, %#lx: stub.\n", monitor, brightness);
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
return FALSE;
@@ -1317,7 +1317,7 @@ BOOL WINAPI SetMonitorColorTemperature( HMONITOR monitor, MC_COLOR_TEMPERATURE t
BOOL WINAPI SetMonitorContrast( HMONITOR monitor, DWORD contrast )
{
- FIXME("(%p, 0x%x): stub\n", monitor, contrast);
+ FIXME("%p, %#lx: stub.\n", monitor, contrast);
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
return FALSE;
@@ -1325,7 +1325,7 @@ BOOL WINAPI SetMonitorContrast( HMONITOR monitor, DWORD contrast )
BOOL WINAPI SetMonitorDisplayAreaPosition( HMONITOR monitor, MC_POSITION_TYPE type, DWORD position )
{
- FIXME("(%p, 0x%x, 0x%x): stub\n", monitor, type, position);
+ FIXME("%p, 0x%x, %#lx: stub.\n", monitor, type, position);
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
return FALSE;
@@ -1333,7 +1333,7 @@ BOOL WINAPI SetMonitorDisplayAreaPosition( HMONITOR monitor, MC_POSITION_TYPE ty
BOOL WINAPI SetMonitorDisplayAreaSize( HMONITOR monitor, MC_SIZE_TYPE type, DWORD size )
{
- FIXME("(%p, 0x%x, 0x%x): stub\n", monitor, type, size);
+ FIXME("%p, 0x%x, %#lx: stub.\n", monitor, type, size);
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
return FALSE;
@@ -1341,7 +1341,7 @@ BOOL WINAPI SetMonitorDisplayAreaSize( HMONITOR monitor, MC_SIZE_TYPE type, DWOR
BOOL WINAPI SetMonitorRedGreenOrBlueDrive( HMONITOR monitor, MC_DRIVE_TYPE type, DWORD drive )
{
- FIXME("(%p, 0x%x, 0x%x): stub\n", monitor, type, drive);
+ FIXME("%p, 0x%x, %#lx: stub.\n", monitor, type, drive);
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
return FALSE;
@@ -1349,7 +1349,7 @@ BOOL WINAPI SetMonitorRedGreenOrBlueDrive( HMONITOR monitor, MC_DRIVE_TYPE type,
BOOL WINAPI SetMonitorRedGreenOrBlueGain( HMONITOR monitor, MC_GAIN_TYPE type, DWORD gain )
{
- FIXME("(%p, 0x%x, 0x%x): stub\n", monitor, type, gain);
+ FIXME("%p, 0x%x, %#lx: stub.\n", monitor, type, gain);
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
return FALSE;
@@ -1357,7 +1357,7 @@ BOOL WINAPI SetMonitorRedGreenOrBlueGain( HMONITOR monitor, MC_GAIN_TYPE type, D
BOOL WINAPI SetVCPFeature( HMONITOR monitor, BYTE vcpCode, DWORD value )
{
- FIXME("(%p, 0x%02x, 0x%x): stub\n", monitor, vcpCode, value);
+ FIXME("%p, 0x%02x, %#lx: stub.\n", monitor, vcpCode, value);
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
return FALSE;
--
2.34.1
1
0
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=46284
Signed-off-by: Zebediah Figura <zfigura(a)codeweavers.com>
---
dlls/d3dx9_24/d3dx9_24.spec | 2 +-
dlls/d3dx9_25/d3dx9_25.spec | 2 +-
dlls/d3dx9_26/d3dx9_26.spec | 2 +-
dlls/d3dx9_27/d3dx9_27.spec | 2 +-
dlls/d3dx9_28/d3dx9_28.spec | 2 +-
dlls/d3dx9_29/d3dx9_29.spec | 2 +-
dlls/d3dx9_30/d3dx9_30.spec | 2 +-
dlls/d3dx9_31/d3dx9_31.spec | 2 +-
dlls/d3dx9_32/d3dx9_32.spec | 2 +-
dlls/d3dx9_33/d3dx9_33.spec | 2 +-
dlls/d3dx9_34/d3dx9_34.spec | 2 +-
dlls/d3dx9_35/d3dx9_35.spec | 2 +-
dlls/d3dx9_36/d3dx9_36.spec | 2 +-
dlls/d3dx9_36/d3dx9_private.h | 2 +
dlls/d3dx9_36/math.c | 143 ++++++++++++++++++++++++
dlls/d3dx9_36/surface.c | 2 +-
dlls/d3dx9_36/tests/math.c | 199 ++++++++++++++++++++++++++++++++++
dlls/d3dx9_37/d3dx9_37.spec | 2 +-
dlls/d3dx9_38/d3dx9_38.spec | 2 +-
dlls/d3dx9_39/d3dx9_39.spec | 2 +-
dlls/d3dx9_40/d3dx9_40.spec | 2 +-
dlls/d3dx9_41/d3dx9_41.spec | 2 +-
dlls/d3dx9_42/d3dx9_42.spec | 2 +-
dlls/d3dx9_43/d3dx9_43.spec | 2 +-
include/d3dx9math.h | 1 +
25 files changed, 366 insertions(+), 21 deletions(-)
diff --git a/dlls/d3dx9_24/d3dx9_24.spec b/dlls/d3dx9_24/d3dx9_24.spec
index d617d766f85..8791e4ec044 100644
--- a/dlls/d3dx9_24/d3dx9_24.spec
+++ b/dlls/d3dx9_24/d3dx9_24.spec
@@ -256,7 +256,7 @@
@ stdcall D3DXSHEvalSphericalLight(long ptr float float float float ptr ptr ptr)
@ stub D3DXSHPRTCompSplitMeshSC(ptr long long ptr long ptr long long ptr ptr long ptr ptr ptr ptr ptr)
@ stub D3DXSHPRTCompSuperCluster(ptr ptr long long ptr ptr)
-@ stub D3DXSHProjectCubeMap(long ptr ptr ptr ptr)
+@ stdcall D3DXSHProjectCubeMap(long ptr ptr ptr ptr)
@ stdcall D3DXSHRotate(ptr long ptr ptr)
@ stdcall D3DXSHRotateZ(ptr long float ptr)
@ stdcall D3DXSHScale(ptr long ptr float)
diff --git a/dlls/d3dx9_25/d3dx9_25.spec b/dlls/d3dx9_25/d3dx9_25.spec
index f13923dcb3a..0431a9f7f75 100644
--- a/dlls/d3dx9_25/d3dx9_25.spec
+++ b/dlls/d3dx9_25/d3dx9_25.spec
@@ -256,7 +256,7 @@
@ stdcall D3DXSHEvalSphericalLight(long ptr float float float float ptr ptr ptr)
@ stub D3DXSHPRTCompSplitMeshSC(ptr long long ptr long ptr long long ptr ptr long ptr ptr ptr ptr ptr)
@ stub D3DXSHPRTCompSuperCluster(ptr ptr long long ptr ptr)
-@ stub D3DXSHProjectCubeMap(long ptr ptr ptr ptr)
+@ stdcall D3DXSHProjectCubeMap(long ptr ptr ptr ptr)
@ stdcall D3DXSHRotate(ptr long ptr ptr)
@ stdcall D3DXSHRotateZ(ptr long float ptr)
@ stdcall D3DXSHScale(ptr long ptr float)
diff --git a/dlls/d3dx9_26/d3dx9_26.spec b/dlls/d3dx9_26/d3dx9_26.spec
index 286a9a094a0..5ab0a1d9fea 100644
--- a/dlls/d3dx9_26/d3dx9_26.spec
+++ b/dlls/d3dx9_26/d3dx9_26.spec
@@ -260,7 +260,7 @@
@ stdcall D3DXSHEvalSphericalLight(long ptr float float float float ptr ptr ptr)
@ stub D3DXSHPRTCompSplitMeshSC(ptr long long ptr long ptr long long ptr ptr long ptr ptr ptr ptr ptr)
@ stub D3DXSHPRTCompSuperCluster(ptr ptr long long ptr ptr)
-@ stub D3DXSHProjectCubeMap(long ptr ptr ptr ptr)
+@ stdcall D3DXSHProjectCubeMap(long ptr ptr ptr ptr)
@ stdcall D3DXSHRotate(ptr long ptr ptr)
@ stdcall D3DXSHRotateZ(ptr long float ptr)
@ stdcall D3DXSHScale(ptr long ptr float)
diff --git a/dlls/d3dx9_27/d3dx9_27.spec b/dlls/d3dx9_27/d3dx9_27.spec
index 286a9a094a0..5ab0a1d9fea 100644
--- a/dlls/d3dx9_27/d3dx9_27.spec
+++ b/dlls/d3dx9_27/d3dx9_27.spec
@@ -260,7 +260,7 @@
@ stdcall D3DXSHEvalSphericalLight(long ptr float float float float ptr ptr ptr)
@ stub D3DXSHPRTCompSplitMeshSC(ptr long long ptr long ptr long long ptr ptr long ptr ptr ptr ptr ptr)
@ stub D3DXSHPRTCompSuperCluster(ptr ptr long long ptr ptr)
-@ stub D3DXSHProjectCubeMap(long ptr ptr ptr ptr)
+@ stdcall D3DXSHProjectCubeMap(long ptr ptr ptr ptr)
@ stdcall D3DXSHRotate(ptr long ptr ptr)
@ stdcall D3DXSHRotateZ(ptr long float ptr)
@ stdcall D3DXSHScale(ptr long ptr float)
diff --git a/dlls/d3dx9_28/d3dx9_28.spec b/dlls/d3dx9_28/d3dx9_28.spec
index 06ced20df61..af5b6077202 100644
--- a/dlls/d3dx9_28/d3dx9_28.spec
+++ b/dlls/d3dx9_28/d3dx9_28.spec
@@ -265,7 +265,7 @@
@ stdcall D3DXSHEvalSphericalLight(long ptr float float float float ptr ptr ptr)
@ stub D3DXSHPRTCompSplitMeshSC(ptr long long ptr long ptr long long ptr ptr long ptr ptr ptr ptr ptr)
@ stub D3DXSHPRTCompSuperCluster(ptr ptr long long ptr ptr)
-@ stub D3DXSHProjectCubeMap(long ptr ptr ptr ptr)
+@ stdcall D3DXSHProjectCubeMap(long ptr ptr ptr ptr)
@ stdcall D3DXSHRotate(ptr long ptr ptr)
@ stdcall D3DXSHRotateZ(ptr long float ptr)
@ stdcall D3DXSHScale(ptr long ptr float)
diff --git a/dlls/d3dx9_29/d3dx9_29.spec b/dlls/d3dx9_29/d3dx9_29.spec
index 06ced20df61..af5b6077202 100644
--- a/dlls/d3dx9_29/d3dx9_29.spec
+++ b/dlls/d3dx9_29/d3dx9_29.spec
@@ -265,7 +265,7 @@
@ stdcall D3DXSHEvalSphericalLight(long ptr float float float float ptr ptr ptr)
@ stub D3DXSHPRTCompSplitMeshSC(ptr long long ptr long ptr long long ptr ptr long ptr ptr ptr ptr ptr)
@ stub D3DXSHPRTCompSuperCluster(ptr ptr long long ptr ptr)
-@ stub D3DXSHProjectCubeMap(long ptr ptr ptr ptr)
+@ stdcall D3DXSHProjectCubeMap(long ptr ptr ptr ptr)
@ stdcall D3DXSHRotate(ptr long ptr ptr)
@ stdcall D3DXSHRotateZ(ptr long float ptr)
@ stdcall D3DXSHScale(ptr long ptr float)
diff --git a/dlls/d3dx9_30/d3dx9_30.spec b/dlls/d3dx9_30/d3dx9_30.spec
index 06ced20df61..af5b6077202 100644
--- a/dlls/d3dx9_30/d3dx9_30.spec
+++ b/dlls/d3dx9_30/d3dx9_30.spec
@@ -265,7 +265,7 @@
@ stdcall D3DXSHEvalSphericalLight(long ptr float float float float ptr ptr ptr)
@ stub D3DXSHPRTCompSplitMeshSC(ptr long long ptr long ptr long long ptr ptr long ptr ptr ptr ptr ptr)
@ stub D3DXSHPRTCompSuperCluster(ptr ptr long long ptr ptr)
-@ stub D3DXSHProjectCubeMap(long ptr ptr ptr ptr)
+@ stdcall D3DXSHProjectCubeMap(long ptr ptr ptr ptr)
@ stdcall D3DXSHRotate(ptr long ptr ptr)
@ stdcall D3DXSHRotateZ(ptr long float ptr)
@ stdcall D3DXSHScale(ptr long ptr float)
diff --git a/dlls/d3dx9_31/d3dx9_31.spec b/dlls/d3dx9_31/d3dx9_31.spec
index c9aca309a35..8f77dc666a2 100644
--- a/dlls/d3dx9_31/d3dx9_31.spec
+++ b/dlls/d3dx9_31/d3dx9_31.spec
@@ -262,7 +262,7 @@
@ stdcall D3DXSHEvalSphericalLight(long ptr float float float float ptr ptr ptr)
@ stub D3DXSHPRTCompSplitMeshSC(ptr long long ptr long ptr long long ptr ptr long ptr ptr ptr ptr ptr)
@ stub D3DXSHPRTCompSuperCluster(ptr ptr long long ptr ptr)
-@ stub D3DXSHProjectCubeMap(long ptr ptr ptr ptr)
+@ stdcall D3DXSHProjectCubeMap(long ptr ptr ptr ptr)
@ stdcall D3DXSHRotate(ptr long ptr ptr)
@ stdcall D3DXSHRotateZ(ptr long float ptr)
@ stdcall D3DXSHScale(ptr long ptr float)
diff --git a/dlls/d3dx9_32/d3dx9_32.spec b/dlls/d3dx9_32/d3dx9_32.spec
index f541f6f2ef1..2fdd2a00615 100644
--- a/dlls/d3dx9_32/d3dx9_32.spec
+++ b/dlls/d3dx9_32/d3dx9_32.spec
@@ -267,7 +267,7 @@
@ stub D3DXSHMultiply6(ptr ptr ptr)
@ stub D3DXSHPRTCompSplitMeshSC(ptr long long ptr long ptr long long ptr ptr long ptr ptr ptr ptr ptr)
@ stub D3DXSHPRTCompSuperCluster(ptr ptr long long ptr ptr)
-@ stub D3DXSHProjectCubeMap(long ptr ptr ptr ptr)
+@ stdcall D3DXSHProjectCubeMap(long ptr ptr ptr ptr)
@ stdcall D3DXSHRotate(ptr long ptr ptr)
@ stdcall D3DXSHRotateZ(ptr long float ptr)
@ stdcall D3DXSHScale(ptr long ptr float)
diff --git a/dlls/d3dx9_33/d3dx9_33.spec b/dlls/d3dx9_33/d3dx9_33.spec
index f541f6f2ef1..2fdd2a00615 100644
--- a/dlls/d3dx9_33/d3dx9_33.spec
+++ b/dlls/d3dx9_33/d3dx9_33.spec
@@ -267,7 +267,7 @@
@ stub D3DXSHMultiply6(ptr ptr ptr)
@ stub D3DXSHPRTCompSplitMeshSC(ptr long long ptr long ptr long long ptr ptr long ptr ptr ptr ptr ptr)
@ stub D3DXSHPRTCompSuperCluster(ptr ptr long long ptr ptr)
-@ stub D3DXSHProjectCubeMap(long ptr ptr ptr ptr)
+@ stdcall D3DXSHProjectCubeMap(long ptr ptr ptr ptr)
@ stdcall D3DXSHRotate(ptr long ptr ptr)
@ stdcall D3DXSHRotateZ(ptr long float ptr)
@ stdcall D3DXSHScale(ptr long ptr float)
diff --git a/dlls/d3dx9_34/d3dx9_34.spec b/dlls/d3dx9_34/d3dx9_34.spec
index f541f6f2ef1..2fdd2a00615 100644
--- a/dlls/d3dx9_34/d3dx9_34.spec
+++ b/dlls/d3dx9_34/d3dx9_34.spec
@@ -267,7 +267,7 @@
@ stub D3DXSHMultiply6(ptr ptr ptr)
@ stub D3DXSHPRTCompSplitMeshSC(ptr long long ptr long ptr long long ptr ptr long ptr ptr ptr ptr ptr)
@ stub D3DXSHPRTCompSuperCluster(ptr ptr long long ptr ptr)
-@ stub D3DXSHProjectCubeMap(long ptr ptr ptr ptr)
+@ stdcall D3DXSHProjectCubeMap(long ptr ptr ptr ptr)
@ stdcall D3DXSHRotate(ptr long ptr ptr)
@ stdcall D3DXSHRotateZ(ptr long float ptr)
@ stdcall D3DXSHScale(ptr long ptr float)
diff --git a/dlls/d3dx9_35/d3dx9_35.spec b/dlls/d3dx9_35/d3dx9_35.spec
index f541f6f2ef1..2fdd2a00615 100644
--- a/dlls/d3dx9_35/d3dx9_35.spec
+++ b/dlls/d3dx9_35/d3dx9_35.spec
@@ -267,7 +267,7 @@
@ stub D3DXSHMultiply6(ptr ptr ptr)
@ stub D3DXSHPRTCompSplitMeshSC(ptr long long ptr long ptr long long ptr ptr long ptr ptr ptr ptr ptr)
@ stub D3DXSHPRTCompSuperCluster(ptr ptr long long ptr ptr)
-@ stub D3DXSHProjectCubeMap(long ptr ptr ptr ptr)
+@ stdcall D3DXSHProjectCubeMap(long ptr ptr ptr ptr)
@ stdcall D3DXSHRotate(ptr long ptr ptr)
@ stdcall D3DXSHRotateZ(ptr long float ptr)
@ stdcall D3DXSHScale(ptr long ptr float)
diff --git a/dlls/d3dx9_36/d3dx9_36.spec b/dlls/d3dx9_36/d3dx9_36.spec
index e1f44261610..5b7070145de 100644
--- a/dlls/d3dx9_36/d3dx9_36.spec
+++ b/dlls/d3dx9_36/d3dx9_36.spec
@@ -269,7 +269,7 @@
@ stub D3DXSHMultiply6(ptr ptr ptr)
@ stub D3DXSHPRTCompSplitMeshSC(ptr long long ptr long ptr long long ptr ptr long ptr ptr ptr ptr ptr)
@ stub D3DXSHPRTCompSuperCluster(ptr ptr long long ptr ptr)
-@ stub D3DXSHProjectCubeMap(long ptr ptr ptr ptr)
+@ stdcall D3DXSHProjectCubeMap(long ptr ptr ptr ptr)
@ stdcall D3DXSHRotate(ptr long ptr ptr)
@ stdcall D3DXSHRotateZ(ptr long float ptr)
@ stdcall D3DXSHScale(ptr long ptr float)
diff --git a/dlls/d3dx9_36/d3dx9_private.h b/dlls/d3dx9_36/d3dx9_private.h
index c3308b04d44..2d286b04694 100644
--- a/dlls/d3dx9_36/d3dx9_private.h
+++ b/dlls/d3dx9_36/d3dx9_private.h
@@ -100,6 +100,8 @@ HRESULT write_buffer_to_file(const WCHAR *filename, ID3DXBuffer *buffer) DECLSPE
const struct pixel_format_desc *get_format_info(D3DFORMAT format) DECLSPEC_HIDDEN;
const struct pixel_format_desc *get_format_info_idx(int idx) DECLSPEC_HIDDEN;
+void format_to_vec4(const struct pixel_format_desc *format, const BYTE *src, struct vec4 *dst);
+
void copy_pixels(const BYTE *src, UINT src_row_pitch, UINT src_slice_pitch,
BYTE *dst, UINT dst_row_pitch, UINT dst_slice_pitch, const struct volume *size,
const struct pixel_format_desc *format) DECLSPEC_HIDDEN;
diff --git a/dlls/d3dx9_36/math.c b/dlls/d3dx9_36/math.c
index a7b0a018680..0dde552d45f 100644
--- a/dlls/d3dx9_36/math.c
+++ b/dlls/d3dx9_36/math.c
@@ -2969,6 +2969,149 @@ static void rotate_X(FLOAT *out, UINT order, FLOAT a, FLOAT *in)
out[35] = 0.9057110548f * in[31] - 0.4192627370f * in[33] + 0.0624999329f * in[35];
}
+static void set_vec3(D3DXVECTOR3 *v, float x, float y, float z)
+{
+ v->x = x;
+ v->y = y;
+ v->z = z;
+}
+
+/*
+ * The following implementation of D3DXSHProjectCubeMap is based on the
+ * SHProjectCubeMap() implementation from Microsoft's DirectXMath library,
+ * covered under the following copyright:
+ *
+ * Copyright (c) Microsoft Corporation.
+ * Licensed under the MIT License.
+ */
+HRESULT WINAPI D3DXSHProjectCubeMap(unsigned int order, IDirect3DCubeTexture9 *texture, float *red, float *green, float *blue)
+{
+ const unsigned int order_square = order * order;
+ const struct pixel_format_desc *format;
+ unsigned int x, y, i, face;
+ float B, S, proj_normal;
+ D3DSURFACE_DESC desc;
+ float Wt = 0.0f;
+ float *temp;
+ HRESULT hr;
+
+ TRACE("order %u, texture %p, red %p, green %p, blue %p.\n", order, texture, red, green, blue);
+
+ if (!texture || !red || order < D3DXSH_MINORDER || order > D3DXSH_MAXORDER)
+ return D3DERR_INVALIDCALL;
+
+ memset(red, 0, order_square * sizeof(float));
+ if (green)
+ memset(green, 0, order_square * sizeof(float));
+ if (blue)
+ memset(blue, 0, order_square * sizeof(float));
+
+ if (FAILED(hr = IDirect3DCubeTexture9_GetLevelDesc(texture, 0, &desc)))
+ {
+ ERR("Failed to get level desc, hr %#x.\n", hr);
+ return hr;
+ }
+
+ format = get_format_info(desc.Format);
+ if (format->type != FORMAT_ARGB && format->type != FORMAT_ARGBF16 && format->type != FORMAT_ARGBF)
+ {
+ FIXME("Unsupported texture format %#x.\n", desc.Format);
+ return D3DERR_INVALIDCALL;
+ }
+
+ if (!(temp = malloc(order_square * sizeof(*temp))))
+ return E_OUTOFMEMORY;
+
+ B = -1.0f + 1.0f / desc.Width;
+ if (desc.Width > 1)
+ S = 2.0f * (1.0f - 1.0f / desc.Width) / (desc.Width - 1.0f);
+ else
+ S = 0.0f;
+
+ for (face = 0; face < 6; ++face)
+ {
+ D3DLOCKED_RECT map_desc;
+
+ if (FAILED(hr = IDirect3DCubeTexture9_LockRect(texture, face, 0, &map_desc, NULL, D3DLOCK_READONLY)))
+ {
+ ERR("Failed to map texture, hr %#x.\n", hr);
+ return hr;
+ }
+
+ for (y = 0; y < desc.Height; ++y)
+ {
+ const BYTE *row = (const BYTE *)map_desc.pBits + y * map_desc.Pitch;
+
+ for (x = 0; x < desc.Width; ++x)
+ {
+ float diff_solid, x_3d, y_3d;
+ const float u = x * S + B;
+ const float v = y * S + B;
+ struct vec4 colour;
+ D3DXVECTOR3 dir;
+
+ x_3d = (x * 2.0f + 1.0f) / desc.Width - 1.0f;
+ y_3d = (y * 2.0f + 1.0f) / desc.Width - 1.0f;
+
+ switch (face)
+ {
+ case D3DCUBEMAP_FACE_POSITIVE_X:
+ set_vec3(&dir, 1.0f, -y_3d, -x_3d);
+ break;
+
+ case D3DCUBEMAP_FACE_NEGATIVE_X:
+ set_vec3(&dir, -1.0f, -y_3d, x_3d);
+ break;
+
+ case D3DCUBEMAP_FACE_POSITIVE_Y:
+ set_vec3(&dir, x_3d, 1.0f, y_3d);
+ break;
+
+ case D3DCUBEMAP_FACE_NEGATIVE_Y:
+ set_vec3(&dir, x_3d, -1.0f, -y_3d);
+ break;
+
+ case D3DCUBEMAP_FACE_POSITIVE_Z:
+ set_vec3(&dir, x_3d, -y_3d, 1.0f);
+ break;
+
+ case D3DCUBEMAP_FACE_NEGATIVE_Z:
+ set_vec3(&dir, -x_3d, -y_3d, -1.0f);
+ break;
+ }
+
+ diff_solid = 4.0f / ((1.0f + u * u + v * v) * sqrtf(1.0f + u * u + v * v));
+ Wt += diff_solid;
+
+ D3DXVec3Normalize(&dir, &dir);
+ D3DXSHEvalDirection(temp, order, &dir);
+
+ format_to_vec4(format, &row[x * format->block_byte_count], &colour);
+
+ for (i = 0; i < order_square; ++i)
+ {
+ red[i] += temp[i] * colour.x * diff_solid;
+ if (green)
+ green[i] += temp[i] * colour.y * diff_solid;
+ if (blue)
+ blue[i] += temp[i] * colour.z * diff_solid;
+ }
+ }
+ }
+
+ IDirect3DCubeTexture9_UnlockRect(texture, face, 0);
+ }
+
+ proj_normal = (4.0f * M_PI) / Wt;
+ D3DXSHScale(red, order, red, proj_normal);
+ if (green)
+ D3DXSHScale(green, order, green, proj_normal);
+ if (blue)
+ D3DXSHScale(blue, order, blue, proj_normal);
+
+ return D3D_OK;
+}
+
FLOAT* WINAPI D3DXSHRotate(FLOAT *out, UINT order, const D3DXMATRIX *matrix, const FLOAT *in)
{
FLOAT alpha, beta, gamma, sinb, temp[36], temp1[36];
diff --git a/dlls/d3dx9_36/surface.c b/dlls/d3dx9_36/surface.c
index c3f9f84a789..2ca6f093b55 100644
--- a/dlls/d3dx9_36/surface.c
+++ b/dlls/d3dx9_36/surface.c
@@ -1564,7 +1564,7 @@ static DWORD make_argb_color(const struct argb_conversion_info *info, const DWOR
}
/* It doesn't work for components bigger than 32 bits (or somewhat smaller but unaligned). */
-static void format_to_vec4(const struct pixel_format_desc *format, const BYTE *src, struct vec4 *dst)
+void format_to_vec4(const struct pixel_format_desc *format, const BYTE *src, struct vec4 *dst)
{
DWORD mask, tmp;
unsigned int c;
diff --git a/dlls/d3dx9_36/tests/math.c b/dlls/d3dx9_36/tests/math.c
index 6f64e25d200..40193f50fcc 100644
--- a/dlls/d3dx9_36/tests/math.c
+++ b/dlls/d3dx9_36/tests/math.c
@@ -22,6 +22,7 @@
#include "wine/test.h"
#include "d3dx9.h"
#include <math.h>
+#include <stdint.h>
static BOOL compare_float(float f, float g, unsigned int ulps)
{
@@ -205,6 +206,53 @@ static void set_matrix(D3DXMATRIX* mat,
U(mat)->m[3][0] = m30; U(mat)->m[3][1] = m31; U(mat)->m[3][2] = m32; U(mat)->m[3][3] = m33;
}
+static HWND create_window(void)
+{
+ RECT r = {0, 0, 640, 480};
+
+ AdjustWindowRect(&r, WS_OVERLAPPEDWINDOW | WS_VISIBLE, FALSE);
+
+ return CreateWindowA("static", "d3d9_test", WS_OVERLAPPEDWINDOW | WS_VISIBLE,
+ 0, 0, r.right - r.left, r.bottom - r.top, NULL, NULL, NULL, NULL);
+}
+
+static IDirect3DDevice9 *create_device(IDirect3D9 *d3d9, HWND focus_window)
+{
+ D3DPRESENT_PARAMETERS present_parameters = {0};
+ unsigned int adapter_ordinal;
+ IDirect3DDevice9 *device;
+ DWORD behavior_flags = D3DCREATE_HARDWARE_VERTEXPROCESSING;
+
+ adapter_ordinal = D3DADAPTER_DEFAULT;
+ present_parameters.BackBufferWidth = 640;
+ present_parameters.BackBufferHeight = 480;
+ present_parameters.BackBufferFormat = D3DFMT_A8R8G8B8;
+ present_parameters.SwapEffect = D3DSWAPEFFECT_DISCARD;
+ present_parameters.hDeviceWindow = focus_window;
+ present_parameters.Windowed = TRUE;
+ present_parameters.EnableAutoDepthStencil = TRUE;
+ present_parameters.AutoDepthStencilFormat = D3DFMT_D24S8;
+
+ if (SUCCEEDED(IDirect3D9_CreateDevice(d3d9, adapter_ordinal, D3DDEVTYPE_HAL, focus_window,
+ behavior_flags, &present_parameters, &device)))
+ return device;
+
+ present_parameters.AutoDepthStencilFormat = D3DFMT_D16;
+ if (SUCCEEDED(IDirect3D9_CreateDevice(d3d9, adapter_ordinal, D3DDEVTYPE_HAL, focus_window,
+ behavior_flags, &present_parameters, &device)))
+ return device;
+
+ behavior_flags = (behavior_flags
+ & ~(D3DCREATE_MIXED_VERTEXPROCESSING | D3DCREATE_SOFTWARE_VERTEXPROCESSING))
+ | D3DCREATE_HARDWARE_VERTEXPROCESSING;
+
+ if (SUCCEEDED(IDirect3D9_CreateDevice(d3d9, adapter_ordinal, D3DDEVTYPE_HAL, focus_window,
+ behavior_flags, &present_parameters, &device)))
+ return device;
+
+ return NULL;
+}
+
static void D3DXColorTest(void)
{
D3DXCOLOR color, color1, color2, expected, got;
@@ -4364,6 +4412,156 @@ static void test_D3DXSHScale(void)
}
}
+static void test_D3DXSHProjectCubeMap(void)
+{
+ float red[4], green[4], blue[4];
+ IDirect3DCubeTexture9 *texture;
+ unsigned int i, j, face, x, y;
+ IDirect3DDevice9 *device;
+ D3DLOCKED_RECT map_desc;
+ IDirect3D9 *d3d;
+ ULONG refcount;
+ HWND window;
+ HRESULT hr;
+
+ static const struct
+ {
+ D3DFORMAT format;
+ float red[4];
+ float green[4];
+ float blue[4];
+ }
+ tests[] =
+ {
+ {D3DFMT_A8R8G8B8,
+ {1.77656245f, -1.11197047e-2f, 2.08763797e-2f, -2.10229922e-2f},
+ {1.75811982f, -4.82511893e-2f, 1.67397819e-2f, -1.71497762e-2f},
+ {1.75515056f, -4.07523997e-2f, 1.05397226e-2f, -2.46812664e-2f}},
+ {D3DFMT_X8R8G8B8,
+ {1.77656245f, -1.11197047e-2f, 2.08763797e-2f, -2.10229922e-2f},
+ {1.75811982f, -4.82511893e-2f, 1.67397819e-2f, -1.71497762e-2f},
+ {1.75515056f, -4.07523997e-2f, 1.05397226e-2f, -2.46812664e-2f}},
+ {D3DFMT_A8B8G8R8,
+ {1.75515056f, -4.07523997e-2f, 1.05397226e-2f, -2.46812664e-2f},
+ {1.75811982f, -4.82511893e-2f, 1.67397819e-2f, -1.71497762e-2f},
+ {1.77656245f, -1.11197047e-2f, 2.08763797e-2f, -2.10229922e-2f}},
+ {D3DFMT_R5G6B5,
+ {1.77099848f, -3.88867334e-2f, 6.73775524e-2f, -1.26888147e-2f},
+ {1.77244151f, -5.64723741e-4f, -2.77878426e-4f, -9.10691451e-3f},
+ {1.78902030f, 2.79005636e-2f, 1.62461456e-2f, 2.21668324e-3f}},
+ {D3DFMT_A1R5G5B5,
+ {1.78022826f, 1.46923587e-2f, 3.58058624e-2f, 2.51076911e-2f},
+ {1.77233493f, -7.58088892e-4f, -2.03727093e-3f, -1.34809706e-2f},
+ {1.78902030f, 2.79005636e-2f, 1.62461456e-2f, 2.21668324e-3f}},
+ {D3DFMT_X1R5G5B5,
+ {1.78022826f, 1.46923587e-2f, 3.58058624e-2f, 2.51076911e-2f},
+ {1.77233493f, -7.58088892e-4f, -2.03727093e-3f, -1.34809706e-2f},
+ {1.78902030f, 2.79005636e-2f, 1.62461456e-2f, 2.21668324e-3f}},
+ {D3DFMT_A2R10G10B10,
+ {1.79359019f, -7.74506712e-4f, 8.65613017e-3f, 5.75336441e-3f},
+ {1.77067971f, 6.42523961e-3f, 1.35379164e-2f, 2.24088971e-3f},
+ {1.76601243f, -4.94002625e-2f, 1.28124524e-2f, -7.69229094e-3f}},
+ {D3DFMT_A2B10G10R10,
+ {1.76601243f, -4.94002625e-2f, 1.28124524e-2f, -7.69229094e-3f},
+ {1.77067971f, 6.42523961e-3f, 1.35379164e-2f, 2.24088971e-3f},
+ {1.79359019f, -7.74506712e-4f, 8.65613017e-3f, 5.75336441e-3f}},
+ {D3DFMT_A16B16G16R16,
+ {1.75979614f, 1.44450525e-2f, -3.25212209e-3f, 2.98178056e-3f},
+ {1.78080165f, -2.63770130e-2f, 6.31967233e-3f, 3.66022950e-3f},
+ {1.77588308f, -1.93727610e-3f, -3.22831096e-3f, -6.18841546e-3f}},
+ {D3DFMT_A16B16G16R16F,
+ { 5.17193642e+1f, -3.41681671e+2f, -8.82221741e+2f, 7.77049316e+2f},
+ {-2.08198950e+3f, 5.24323584e+3f, -3.42663379e+3f, 3.80999243e+3f},
+ {-1.10743945e+3f, -9.43649292e+2f, 5.48424316e+2f, 1.65352710e+3f}},
+ };
+
+ window = create_window();
+ d3d = Direct3DCreate9(D3D_SDK_VERSION);
+ ok(!!d3d, "Failed to create a D3D object.\n");
+ if (!(device = create_device(d3d, window)))
+ {
+ skip("Failed to create a D3D device, skipping tests.\n");
+ IDirect3D9_Release(d3d);
+ DestroyWindow(window);
+ return;
+ }
+
+ for (i = 0; i < ARRAY_SIZE(tests); ++i)
+ {
+ winetest_push_context("Format %#x", tests[i].format);
+
+ hr = IDirect3DDevice9_CreateCubeTexture(device, 8, 1, D3DUSAGE_DYNAMIC,
+ tests[i].format, D3DPOOL_DEFAULT, &texture, NULL);
+ if (FAILED(hr))
+ {
+ skip("Failed to create cube texture.\n");
+ winetest_pop_context();
+ continue;
+ }
+ ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr);
+
+ for (face = 0; face < 6; ++face)
+ {
+ hr = IDirect3DCubeTexture9_LockRect(texture, face, 0, &map_desc, NULL, 0);
+ ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr);
+
+ for (y = 0; y < 8; ++y)
+ {
+ uint8_t *row = (uint8_t *)map_desc.pBits + y * map_desc.Pitch;
+
+ for (x = 0; x < map_desc.Pitch; ++x)
+ row[x] = face * 111 + y * 39 + x * 7;
+ }
+
+ hr = IDirect3DCubeTexture9_UnlockRect(texture, face, 0);
+ ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr);
+ }
+
+ hr = D3DXSHProjectCubeMap(1, texture, red, green, blue);
+ ok(hr == D3DERR_INVALIDCALL, "Got unexpected hr %#x.\n", hr);
+
+ hr = D3DXSHProjectCubeMap(7, texture, red, green, blue);
+ ok(hr == D3DERR_INVALIDCALL, "Got unexpected hr %#x.\n", hr);
+
+ hr = D3DXSHProjectCubeMap(2, NULL, red, green, blue);
+ ok(hr == D3DERR_INVALIDCALL, "Got unexpected hr %#x.\n", hr);
+
+ memset(red, 0, sizeof(red));
+ memset(green, 0, sizeof(green));
+ memset(blue, 0, sizeof(blue));
+ hr = D3DXSHProjectCubeMap(2, texture, red, green, blue);
+ ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr);
+
+ for (j = 0; j < 4; ++j)
+ {
+ ok(compare_float(red[j], tests[i].red[j], 1024),
+ "Got unexpected value %.8e for red coefficient %u.\n", red[j], j);
+ ok(compare_float(green[j], tests[i].green[j], 1024),
+ "Got unexpected value %.8e for green coefficient %u.\n", green[j], j);
+ ok(compare_float(blue[j], tests[i].blue[j], 1024),
+ "Got unexpected value %.8e for blue coefficient %u.\n", blue[j], j);
+ }
+
+ hr = D3DXSHProjectCubeMap(2, texture, red, NULL, NULL);
+ ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr);
+
+ hr = D3DXSHProjectCubeMap(2, texture, NULL, green, NULL);
+ ok(hr == D3DERR_INVALIDCALL, "Got unexpected hr %#x.\n", hr);
+
+ hr = D3DXSHProjectCubeMap(2, texture, NULL, NULL, blue);
+ ok(hr == D3DERR_INVALIDCALL, "Got unexpected hr %#x.\n", hr);
+
+ IDirect3DCubeTexture9_Release(texture);
+
+ winetest_pop_context();
+ }
+
+ refcount = IDirect3DDevice9_Release(device);
+ ok(!refcount, "Device has %u references left.\n", refcount);
+ IDirect3D9_Release(d3d);
+ DestroyWindow(window);
+}
+
START_TEST(math)
{
D3DXColorTest();
@@ -4393,4 +4591,5 @@ START_TEST(math)
test_D3DXSHRotate();
test_D3DXSHRotateZ();
test_D3DXSHScale();
+ test_D3DXSHProjectCubeMap();
}
diff --git a/dlls/d3dx9_37/d3dx9_37.spec b/dlls/d3dx9_37/d3dx9_37.spec
index e1f44261610..5b7070145de 100644
--- a/dlls/d3dx9_37/d3dx9_37.spec
+++ b/dlls/d3dx9_37/d3dx9_37.spec
@@ -269,7 +269,7 @@
@ stub D3DXSHMultiply6(ptr ptr ptr)
@ stub D3DXSHPRTCompSplitMeshSC(ptr long long ptr long ptr long long ptr ptr long ptr ptr ptr ptr ptr)
@ stub D3DXSHPRTCompSuperCluster(ptr ptr long long ptr ptr)
-@ stub D3DXSHProjectCubeMap(long ptr ptr ptr ptr)
+@ stdcall D3DXSHProjectCubeMap(long ptr ptr ptr ptr)
@ stdcall D3DXSHRotate(ptr long ptr ptr)
@ stdcall D3DXSHRotateZ(ptr long float ptr)
@ stdcall D3DXSHScale(ptr long ptr float)
diff --git a/dlls/d3dx9_38/d3dx9_38.spec b/dlls/d3dx9_38/d3dx9_38.spec
index e1f44261610..5b7070145de 100644
--- a/dlls/d3dx9_38/d3dx9_38.spec
+++ b/dlls/d3dx9_38/d3dx9_38.spec
@@ -269,7 +269,7 @@
@ stub D3DXSHMultiply6(ptr ptr ptr)
@ stub D3DXSHPRTCompSplitMeshSC(ptr long long ptr long ptr long long ptr ptr long ptr ptr ptr ptr ptr)
@ stub D3DXSHPRTCompSuperCluster(ptr ptr long long ptr ptr)
-@ stub D3DXSHProjectCubeMap(long ptr ptr ptr ptr)
+@ stdcall D3DXSHProjectCubeMap(long ptr ptr ptr ptr)
@ stdcall D3DXSHRotate(ptr long ptr ptr)
@ stdcall D3DXSHRotateZ(ptr long float ptr)
@ stdcall D3DXSHScale(ptr long ptr float)
diff --git a/dlls/d3dx9_39/d3dx9_39.spec b/dlls/d3dx9_39/d3dx9_39.spec
index e1f44261610..5b7070145de 100644
--- a/dlls/d3dx9_39/d3dx9_39.spec
+++ b/dlls/d3dx9_39/d3dx9_39.spec
@@ -269,7 +269,7 @@
@ stub D3DXSHMultiply6(ptr ptr ptr)
@ stub D3DXSHPRTCompSplitMeshSC(ptr long long ptr long ptr long long ptr ptr long ptr ptr ptr ptr ptr)
@ stub D3DXSHPRTCompSuperCluster(ptr ptr long long ptr ptr)
-@ stub D3DXSHProjectCubeMap(long ptr ptr ptr ptr)
+@ stdcall D3DXSHProjectCubeMap(long ptr ptr ptr ptr)
@ stdcall D3DXSHRotate(ptr long ptr ptr)
@ stdcall D3DXSHRotateZ(ptr long float ptr)
@ stdcall D3DXSHScale(ptr long ptr float)
diff --git a/dlls/d3dx9_40/d3dx9_40.spec b/dlls/d3dx9_40/d3dx9_40.spec
index e1f44261610..5b7070145de 100644
--- a/dlls/d3dx9_40/d3dx9_40.spec
+++ b/dlls/d3dx9_40/d3dx9_40.spec
@@ -269,7 +269,7 @@
@ stub D3DXSHMultiply6(ptr ptr ptr)
@ stub D3DXSHPRTCompSplitMeshSC(ptr long long ptr long ptr long long ptr ptr long ptr ptr ptr ptr ptr)
@ stub D3DXSHPRTCompSuperCluster(ptr ptr long long ptr ptr)
-@ stub D3DXSHProjectCubeMap(long ptr ptr ptr ptr)
+@ stdcall D3DXSHProjectCubeMap(long ptr ptr ptr ptr)
@ stdcall D3DXSHRotate(ptr long ptr ptr)
@ stdcall D3DXSHRotateZ(ptr long float ptr)
@ stdcall D3DXSHScale(ptr long ptr float)
diff --git a/dlls/d3dx9_41/d3dx9_41.spec b/dlls/d3dx9_41/d3dx9_41.spec
index e1f44261610..5b7070145de 100644
--- a/dlls/d3dx9_41/d3dx9_41.spec
+++ b/dlls/d3dx9_41/d3dx9_41.spec
@@ -269,7 +269,7 @@
@ stub D3DXSHMultiply6(ptr ptr ptr)
@ stub D3DXSHPRTCompSplitMeshSC(ptr long long ptr long ptr long long ptr ptr long ptr ptr ptr ptr ptr)
@ stub D3DXSHPRTCompSuperCluster(ptr ptr long long ptr ptr)
-@ stub D3DXSHProjectCubeMap(long ptr ptr ptr ptr)
+@ stdcall D3DXSHProjectCubeMap(long ptr ptr ptr ptr)
@ stdcall D3DXSHRotate(ptr long ptr ptr)
@ stdcall D3DXSHRotateZ(ptr long float ptr)
@ stdcall D3DXSHScale(ptr long ptr float)
diff --git a/dlls/d3dx9_42/d3dx9_42.spec b/dlls/d3dx9_42/d3dx9_42.spec
index 0851945d36b..4a418d1508a 100644
--- a/dlls/d3dx9_42/d3dx9_42.spec
+++ b/dlls/d3dx9_42/d3dx9_42.spec
@@ -262,7 +262,7 @@
@ stub D3DXSHMultiply6(ptr ptr ptr)
@ stub D3DXSHPRTCompSplitMeshSC(ptr long long ptr long ptr long long ptr ptr long ptr ptr ptr ptr ptr)
@ stub D3DXSHPRTCompSuperCluster(ptr ptr long long ptr ptr)
-@ stub D3DXSHProjectCubeMap(long ptr ptr ptr ptr)
+@ stdcall D3DXSHProjectCubeMap(long ptr ptr ptr ptr)
@ stdcall D3DXSHRotate(ptr long ptr ptr)
@ stdcall D3DXSHRotateZ(ptr long float ptr)
@ stdcall D3DXSHScale(ptr long ptr float)
diff --git a/dlls/d3dx9_43/d3dx9_43.spec b/dlls/d3dx9_43/d3dx9_43.spec
index 0851945d36b..4a418d1508a 100644
--- a/dlls/d3dx9_43/d3dx9_43.spec
+++ b/dlls/d3dx9_43/d3dx9_43.spec
@@ -262,7 +262,7 @@
@ stub D3DXSHMultiply6(ptr ptr ptr)
@ stub D3DXSHPRTCompSplitMeshSC(ptr long long ptr long ptr long long ptr ptr long ptr ptr ptr ptr ptr)
@ stub D3DXSHPRTCompSuperCluster(ptr ptr long long ptr ptr)
-@ stub D3DXSHProjectCubeMap(long ptr ptr ptr ptr)
+@ stdcall D3DXSHProjectCubeMap(long ptr ptr ptr ptr)
@ stdcall D3DXSHRotate(ptr long ptr ptr)
@ stdcall D3DXSHRotateZ(ptr long float ptr)
@ stdcall D3DXSHScale(ptr long ptr float)
diff --git a/include/d3dx9math.h b/include/d3dx9math.h
index bf03ca3abaa..32d894f9fed 100644
--- a/include/d3dx9math.h
+++ b/include/d3dx9math.h
@@ -396,6 +396,7 @@ HRESULT WINAPI D3DXSHEvalSphericalLight(UINT order, const D3DXVECTOR3 *dir, FLOA
FLOAT* WINAPI D3DXSHMultiply2(FLOAT *out, const FLOAT *a, const FLOAT *b);
FLOAT* WINAPI D3DXSHMultiply3(FLOAT *out, const FLOAT *a, const FLOAT *b);
FLOAT* WINAPI D3DXSHMultiply4(FLOAT *out, const FLOAT *a, const FLOAT *b);
+HRESULT WINAPI D3DXSHProjectCubeMap(UINT order, IDirect3DCubeTexture9 *texture, FLOAT *red, FLOAT *green, FLOAT *blue);
FLOAT* WINAPI D3DXSHRotate(FLOAT *out, UINT order, const D3DXMATRIX *matrix, const FLOAT *in);
FLOAT* WINAPI D3DXSHRotateZ(FLOAT *out, UINT order, FLOAT angle, const FLOAT *in);
FLOAT* WINAPI D3DXSHScale(FLOAT *out, UINT order, const FLOAT *a, const FLOAT scale);
--
2.34.1
2
2
[PATCH 1/3] shlwapi: Use the public definition of shared shell memory allocation functions.
by Zebediah Figura Feb. 3, 2022
by Zebediah Figura Feb. 3, 2022
Feb. 3, 2022
Signed-off-by: Zebediah Figura <zfigura(a)codeweavers.com>
---
dlls/shell32/changenotify.c | 1 +
dlls/shell32/shellord.c | 2 +-
dlls/shell32/undocshell.h | 24 ------------------------
include/shlwapi.h | 7 ++++++-
4 files changed, 8 insertions(+), 26 deletions(-)
diff --git a/dlls/shell32/changenotify.c b/dlls/shell32/changenotify.c
index 40ccb891589..35c090ceb67 100644
--- a/dlls/shell32/changenotify.c
+++ b/dlls/shell32/changenotify.c
@@ -27,6 +27,7 @@
#include "wine/debug.h"
#include "shell32_main.h"
#include "pidl.h"
+#include "shlwapi.h"
WINE_DEFAULT_DEBUG_CHANNEL(shell);
diff --git a/dlls/shell32/shellord.c b/dlls/shell32/shellord.c
index 57308e1c988..af00f125662 100644
--- a/dlls/shell32/shellord.c
+++ b/dlls/shell32/shellord.c
@@ -1353,7 +1353,7 @@ BOOL WINAPI IsUserAnAdmin(VOID)
*
* See shlwapi.SHAllocShared
*/
-HANDLE WINAPI SHAllocShared(LPVOID lpvData, DWORD dwSize, DWORD dwProcId)
+HANDLE WINAPI SHAllocShared(const void *lpvData, DWORD dwSize, DWORD dwProcId)
{
GET_FUNC(pSHAllocShared, shlwapi, (char*)7, NULL);
return pSHAllocShared(lpvData, dwSize, dwProcId);
diff --git a/dlls/shell32/undocshell.h b/dlls/shell32/undocshell.h
index 61c2ff4069f..f5c5ed8d43a 100644
--- a/dlls/shell32/undocshell.h
+++ b/dlls/shell32/undocshell.h
@@ -31,30 +31,6 @@
extern "C" {
#endif /* defined(__cplusplus) */
-/****************************************************************************
- * Memory Routines
- */
-
-/* The Platform SDK's shlobj.h header defines similar functions with a
- * leading underscore. However those are unusable because of the leading
- * underscore, because they have an incorrect calling convention, and
- * because these functions are not exported by name anyway.
- */
-HANDLE WINAPI SHAllocShared(
- LPVOID pv,
- ULONG cb,
- DWORD pid);
-
-BOOL WINAPI SHFreeShared(
- HANDLE hMem,
- DWORD pid);
-
-LPVOID WINAPI SHLockShared(
- HANDLE hMem,
- DWORD pid);
-
-BOOL WINAPI SHUnlockShared(LPVOID pv);
-
/****************************************************************************
* System Imagelist Routines
*/
diff --git a/include/shlwapi.h b/include/shlwapi.h
index ca15bd20777..07ca0fac837 100644
--- a/include/shlwapi.h
+++ b/include/shlwapi.h
@@ -1171,7 +1171,12 @@ HRESULT WINAPI SHGetViewStatePropertyBag(PCIDLIST_ABSOLUTE pidl, PCWSTR bagname,
BOOL WINAPI SHIsLowMemoryMachine(DWORD type);
-#include <poppack.h>
+#include <poppack.h>
+
+HANDLE WINAPI SHAllocShared(const void *data, DWORD size, DWORD pid);
+BOOL WINAPI SHFreeShared(HANDLE handle, DWORD pid);
+void * WINAPI SHLockShared(HANDLE handle, DWORD pid);
+BOOL WINAPI SHUnlockShared(void *data);
#ifdef __cplusplus
} /* extern "C" */
--
2.34.1
1
2
Feb. 3, 2022
Signed-off-by: Zebediah Figura <zfigura(a)codeweavers.com>
---
dlls/winegstreamer/Makefile.in | 1 -
dlls/winegstreamer/audioconvert.c | 44 ++++-----
dlls/winegstreamer/media_source.c | 60 ++++++-------
dlls/winegstreamer/mfplat.c | 34 +++----
dlls/winegstreamer/quartz_parser.c | 36 ++++----
dlls/winegstreamer/wm_asyncreader.c | 133 +++++++++++++++++-----------
dlls/winegstreamer/wm_reader.c | 74 ++++++++--------
dlls/winegstreamer/wm_syncreader.c | 24 ++---
dlls/winegstreamer/wma_decoder.c | 72 +++++++--------
9 files changed, 253 insertions(+), 225 deletions(-)
diff --git a/dlls/winegstreamer/Makefile.in b/dlls/winegstreamer/Makefile.in
index 1706effbd20..c53e914e246 100644
--- a/dlls/winegstreamer/Makefile.in
+++ b/dlls/winegstreamer/Makefile.in
@@ -1,4 +1,3 @@
-EXTRADEFS = -DWINE_NO_LONG_TYPES
MODULE = winegstreamer.dll
UNIXLIB = winegstreamer.so
IMPORTLIB = winegstreamer
diff --git a/dlls/winegstreamer/audioconvert.c b/dlls/winegstreamer/audioconvert.c
index 33350fb3566..d5723cdf58f 100644
--- a/dlls/winegstreamer/audioconvert.c
+++ b/dlls/winegstreamer/audioconvert.c
@@ -64,7 +64,7 @@ static ULONG WINAPI audio_converter_AddRef(IMFTransform *iface)
struct audio_converter *transform = impl_audio_converter_from_IMFTransform(iface);
ULONG refcount = InterlockedIncrement(&transform->refcount);
- TRACE("%p, refcount %u.\n", iface, refcount);
+ TRACE("%p, refcount %lu.\n", iface, refcount);
return refcount;
}
@@ -74,7 +74,7 @@ static ULONG WINAPI audio_converter_Release(IMFTransform *iface)
struct audio_converter *transform = impl_audio_converter_from_IMFTransform(iface);
ULONG refcount = InterlockedDecrement(&transform->refcount);
- TRACE("%p, refcount %u.\n", iface, refcount);
+ TRACE("%p, refcount %lu.\n", iface, refcount);
if (!refcount)
{
@@ -108,21 +108,21 @@ static HRESULT WINAPI audio_converter_GetStreamCount(IMFTransform *iface, DWORD
static HRESULT WINAPI audio_converter_GetStreamIDs(IMFTransform *iface, DWORD input_size, DWORD *inputs,
DWORD output_size, DWORD *outputs)
{
- TRACE("%p %u %p %u %p.\n", iface, input_size, inputs, output_size, outputs);
+ TRACE("%p, %lu, %p, %lu, %p.\n", iface, input_size, inputs, output_size, outputs);
return E_NOTIMPL;
}
static HRESULT WINAPI audio_converter_GetInputStreamInfo(IMFTransform *iface, DWORD id, MFT_INPUT_STREAM_INFO *info)
{
- FIXME("%p %u %p.\n", iface, id, info);
+ FIXME("%p, %lu, %p.\n", iface, id, info);
return E_NOTIMPL;
}
static HRESULT WINAPI audio_converter_GetOutputStreamInfo(IMFTransform *iface, DWORD id, MFT_OUTPUT_STREAM_INFO *info)
{
- FIXME("%p %u %p.\n", iface, id, info);
+ FIXME("%p. %lu, %p.\n", iface, id, info);
return E_NOTIMPL;
}
@@ -137,7 +137,7 @@ static HRESULT WINAPI audio_converter_GetAttributes(IMFTransform *iface, IMFAttr
static HRESULT WINAPI audio_converter_GetInputStreamAttributes(IMFTransform *iface, DWORD id,
IMFAttributes **attributes)
{
- FIXME("%p, %u, %p.\n", iface, id, attributes);
+ FIXME("%p, %lu, %p.\n", iface, id, attributes);
return E_NOTIMPL;
}
@@ -145,21 +145,21 @@ static HRESULT WINAPI audio_converter_GetInputStreamAttributes(IMFTransform *ifa
static HRESULT WINAPI audio_converter_GetOutputStreamAttributes(IMFTransform *iface, DWORD id,
IMFAttributes **attributes)
{
- FIXME("%p, %u, %p.\n", iface, id, attributes);
+ FIXME("%p, %lu, %p.\n", iface, id, attributes);
return E_NOTIMPL;
}
static HRESULT WINAPI audio_converter_DeleteInputStream(IMFTransform *iface, DWORD id)
{
- TRACE("%p, %u.\n", iface, id);
+ TRACE("%p, %lu.\n", iface, id);
return E_NOTIMPL;
}
static HRESULT WINAPI audio_converter_AddInputStreams(IMFTransform *iface, DWORD streams, DWORD *ids)
{
- TRACE("%p, %u, %p.\n", iface, streams, ids);
+ TRACE("%p, %lu, %p.\n", iface, streams, ids);
return E_NOTIMPL;
}
@@ -170,7 +170,7 @@ static HRESULT WINAPI audio_converter_GetInputAvailableType(IMFTransform *iface,
IMFMediaType *ret;
HRESULT hr;
- TRACE("%p, %u, %u, %p.\n", iface, id, index, type);
+ TRACE("%p, %lu, %lu, %p.\n", iface, id, index, type);
if (id != 0)
return MF_E_INVALIDSTREAMNUMBER;
@@ -222,7 +222,7 @@ static HRESULT WINAPI audio_converter_GetOutputAvailableType(IMFTransform *iface
const GUID *subtype;
DWORD rate, channels, bps;
- TRACE("%p, %u, %u, %p.\n", iface, id, index, type);
+ TRACE("%p, %lu, %lu, %p.\n", iface, id, index, type);
if (id != 0)
return MF_E_INVALIDSTREAMNUMBER;
@@ -272,12 +272,12 @@ fail:
static HRESULT WINAPI audio_converter_SetInputType(IMFTransform *iface, DWORD id, IMFMediaType *type, DWORD flags)
{
GUID major_type, subtype;
- DWORD unused;
+ UINT32 unused;
HRESULT hr;
struct audio_converter *converter = impl_audio_converter_from_IMFTransform(iface);
- TRACE("%p, %u, %p, %#x.\n", iface, id, type, flags);
+ TRACE("%p, %lu, %p, %#lx.\n", iface, id, type, flags);
if (id != 0)
return MF_E_INVALIDSTREAMNUMBER;
@@ -345,10 +345,10 @@ static HRESULT WINAPI audio_converter_SetOutputType(IMFTransform *iface, DWORD i
{
struct audio_converter *converter = impl_audio_converter_from_IMFTransform(iface);
GUID major_type, subtype;
- DWORD unused;
+ UINT32 unused;
HRESULT hr;
- TRACE("%p, %u, %p, %#x.\n", iface, id, type, flags);
+ TRACE("%p, %lu, %p, %#lx.\n", iface, id, type, flags);
if (id != 0)
return MF_E_INVALIDSTREAMNUMBER;
@@ -421,7 +421,7 @@ static HRESULT WINAPI audio_converter_GetInputCurrentType(IMFTransform *iface, D
IMFMediaType *ret;
HRESULT hr;
- TRACE("%p, %u, %p.\n", converter, id, type);
+ TRACE("%p, %lu, %p.\n", converter, id, type);
if (id != 0)
return MF_E_INVALIDSTREAMNUMBER;
@@ -452,7 +452,7 @@ static HRESULT WINAPI audio_converter_GetOutputCurrentType(IMFTransform *iface,
IMFMediaType *ret;
HRESULT hr;
- TRACE("%p, %u, %p.\n", converter, id, type);
+ TRACE("%p, %lu, %p.\n", converter, id, type);
if (id != 0)
return MF_E_INVALIDSTREAMNUMBER;
@@ -479,7 +479,7 @@ static HRESULT WINAPI audio_converter_GetOutputCurrentType(IMFTransform *iface,
static HRESULT WINAPI audio_converter_GetInputStatus(IMFTransform *iface, DWORD id, DWORD *flags)
{
- FIXME("%p, %u, %p.\n", iface, id, flags);
+ FIXME("%p, %lu, %p.\n", iface, id, flags);
return E_NOTIMPL;
}
@@ -500,14 +500,14 @@ static HRESULT WINAPI audio_converter_SetOutputBounds(IMFTransform *iface, LONGL
static HRESULT WINAPI audio_converter_ProcessEvent(IMFTransform *iface, DWORD id, IMFMediaEvent *event)
{
- TRACE("%p, %u, %p.\n", iface, id, event);
+ TRACE("%p, %lu, %p.\n", iface, id, event);
return E_NOTIMPL;
}
static HRESULT WINAPI audio_converter_ProcessMessage(IMFTransform *iface, MFT_MESSAGE_TYPE message, ULONG_PTR param)
{
- TRACE("%p, %u %lu.\n", iface, message, param);
+ TRACE("%p, %u, %Iu.\n", iface, message, param);
switch(message)
{
@@ -521,7 +521,7 @@ static HRESULT WINAPI audio_converter_ProcessMessage(IMFTransform *iface, MFT_ME
static HRESULT WINAPI audio_converter_ProcessInput(IMFTransform *iface, DWORD id, IMFSample *sample, DWORD flags)
{
- FIXME("%p, %u, %p, %#x.\n", iface, id, sample, flags);
+ FIXME("%p, %lu, %p, %#lx.\n", iface, id, sample, flags);
return E_NOTIMPL;
}
@@ -529,7 +529,7 @@ static HRESULT WINAPI audio_converter_ProcessInput(IMFTransform *iface, DWORD id
static HRESULT WINAPI audio_converter_ProcessOutput(IMFTransform *iface, DWORD flags, DWORD count,
MFT_OUTPUT_DATA_BUFFER *samples, DWORD *status)
{
- FIXME("%p, %#x, %u, %p, %p.\n", iface, flags, count, samples, status);
+ FIXME("%p, %#lx, %lu, %p, %p.\n", iface, flags, count, samples, status);
return E_NOTIMPL;
}
diff --git a/dlls/winegstreamer/media_source.c b/dlls/winegstreamer/media_source.c
index 6ecd345cb73..85ec31d2498 100644
--- a/dlls/winegstreamer/media_source.c
+++ b/dlls/winegstreamer/media_source.c
@@ -304,7 +304,7 @@ static void flush_token_queue(struct media_stream *stream, BOOL send)
&stream->parent_source->async_commands_callback, &command->IUnknown_iface);
}
if (FAILED(hr))
- WARN("Could not enqueue sample request, hr %#x\n", hr);
+ WARN("Could not enqueue sample request, hr %#lx\n", hr);
}
else if (stream->token_queue[i])
IUnknown_Release(stream->token_queue[i]);
@@ -461,32 +461,32 @@ static void send_buffer(struct media_stream *stream, const struct wg_parser_even
if (FAILED(hr = MFCreateSample(&sample)))
{
- ERR("Failed to create sample, hr %#x.\n", hr);
+ ERR("Failed to create sample, hr %#lx.\n", hr);
return;
}
if (FAILED(hr = MFCreateMemoryBuffer(event->u.buffer.size, &buffer)))
{
- ERR("Failed to create buffer, hr %#x.\n", hr);
+ ERR("Failed to create buffer, hr %#lx.\n", hr);
IMFSample_Release(sample);
return;
}
if (FAILED(hr = IMFSample_AddBuffer(sample, buffer)))
{
- ERR("Failed to add buffer, hr %#x.\n", hr);
+ ERR("Failed to add buffer, hr %#lx.\n", hr);
goto out;
}
if (FAILED(hr = IMFMediaBuffer_SetCurrentLength(buffer, event->u.buffer.size)))
{
- ERR("Failed to set size, hr %#x.\n", hr);
+ ERR("Failed to set size, hr %#lx.\n", hr);
goto out;
}
if (FAILED(hr = IMFMediaBuffer_Lock(buffer, &data, NULL, NULL)))
{
- ERR("Failed to lock buffer, hr %#x.\n", hr);
+ ERR("Failed to lock buffer, hr %#lx.\n", hr);
goto out;
}
@@ -500,19 +500,19 @@ static void send_buffer(struct media_stream *stream, const struct wg_parser_even
if (FAILED(hr = IMFMediaBuffer_Unlock(buffer)))
{
- ERR("Failed to unlock buffer, hr %#x.\n", hr);
+ ERR("Failed to unlock buffer, hr %#lx.\n", hr);
goto out;
}
if (FAILED(hr = IMFSample_SetSampleTime(sample, event->u.buffer.pts)))
{
- ERR("Failed to set sample time, hr %#x.\n", hr);
+ ERR("Failed to set sample time, hr %#lx.\n", hr);
goto out;
}
if (FAILED(hr = IMFSample_SetSampleDuration(sample, event->u.buffer.duration)))
{
- ERR("Failed to set sample duration, hr %#x.\n", hr);
+ ERR("Failed to set sample duration, hr %#lx.\n", hr);
goto out;
}
@@ -658,9 +658,9 @@ static DWORD CALLBACK read_thread(void *arg)
if (SUCCEEDED(hr = IMFByteStream_SetCurrentPosition(byte_stream, offset)))
hr = IMFByteStream_Read(byte_stream, data, size, &ret_size);
if (FAILED(hr))
- ERR("Failed to read %u bytes at offset %I64u, hr %#x.\n", size, offset, hr);
+ ERR("Failed to read %u bytes at offset %I64u, hr %#lx.\n", size, offset, hr);
else if (ret_size != size)
- ERR("Unexpected short read: requested %u bytes, got %u.\n", size, ret_size);
+ ERR("Unexpected short read: requested %u bytes, got %lu.\n", size, ret_size);
wg_parser_push_data(source->wg_parser, SUCCEEDED(hr) ? data : NULL, ret_size);
}
@@ -697,7 +697,7 @@ static ULONG WINAPI media_stream_AddRef(IMFMediaStream *iface)
struct media_stream *stream = impl_from_IMFMediaStream(iface);
ULONG ref = InterlockedIncrement(&stream->ref);
- TRACE("%p, refcount %u.\n", iface, ref);
+ TRACE("%p, refcount %lu.\n", iface, ref);
return ref;
}
@@ -707,7 +707,7 @@ static ULONG WINAPI media_stream_Release(IMFMediaStream *iface)
struct media_stream *stream = impl_from_IMFMediaStream(iface);
ULONG ref = InterlockedDecrement(&stream->ref);
- TRACE("%p, refcount %u.\n", iface, ref);
+ TRACE("%p, refcount %lu.\n", iface, ref);
if (!ref)
{
@@ -724,7 +724,7 @@ static HRESULT WINAPI media_stream_GetEvent(IMFMediaStream *iface, DWORD flags,
{
struct media_stream *stream = impl_from_IMFMediaStream(iface);
- TRACE("%p, %#x, %p.\n", iface, flags, event);
+ TRACE("%p, %#lx, %p.\n", iface, flags, event);
return IMFMediaEventQueue_GetEvent(stream->event_queue, flags, event);
}
@@ -752,7 +752,7 @@ static HRESULT WINAPI media_stream_QueueEvent(IMFMediaStream *iface, MediaEventT
{
struct media_stream *stream = impl_from_IMFMediaStream(iface);
- TRACE("%p, %d, %s, %#x, %p.\n", iface, event_type, debugstr_guid(ext_type), hr, value);
+ TRACE("%p, %lu, %s, %#lx, %p.\n", iface, event_type, debugstr_guid(ext_type), hr, value);
return IMFMediaEventQueue_QueueEventParamVar(stream->event_queue, event_type, ext_type, hr, value);
}
@@ -843,7 +843,7 @@ static HRESULT new_media_stream(struct media_source *source,
struct media_stream *object = calloc(1, sizeof(*object));
HRESULT hr;
- TRACE("source %p, wg_stream %p, stream_id %u.\n", source, wg_stream, stream_id);
+ TRACE("source %p, wg_stream %p, stream_id %lu.\n", source, wg_stream, stream_id);
object->IMFMediaStream_iface.lpVtbl = &media_stream_vtbl;
object->ref = 1;
@@ -1176,7 +1176,7 @@ static ULONG WINAPI media_source_AddRef(IMFMediaSource *iface)
struct media_source *source = impl_from_IMFMediaSource(iface);
ULONG ref = InterlockedIncrement(&source->ref);
- TRACE("%p, refcount %u.\n", iface, ref);
+ TRACE("%p, refcount %lu.\n", iface, ref);
return ref;
}
@@ -1186,7 +1186,7 @@ static ULONG WINAPI media_source_Release(IMFMediaSource *iface)
struct media_source *source = impl_from_IMFMediaSource(iface);
ULONG ref = InterlockedDecrement(&source->ref);
- TRACE("%p, refcount %u.\n", iface, ref);
+ TRACE("%p, refcount %lu.\n", iface, ref);
if (!ref)
{
@@ -1202,7 +1202,7 @@ static HRESULT WINAPI media_source_GetEvent(IMFMediaSource *iface, DWORD flags,
{
struct media_source *source = impl_from_IMFMediaSource(iface);
- TRACE("%p, %#x, %p.\n", iface, flags, event);
+ TRACE("%p, %#lx, %p.\n", iface, flags, event);
return IMFMediaEventQueue_GetEvent(source->event_queue, flags, event);
}
@@ -1230,7 +1230,7 @@ static HRESULT WINAPI media_source_QueueEvent(IMFMediaSource *iface, MediaEventT
{
struct media_source *source = impl_from_IMFMediaSource(iface);
- TRACE("%p, %d, %s, %#x, %p.\n", iface, event_type, debugstr_guid(ext_type), hr, value);
+ TRACE("%p, %lu, %s, %#lx, %p.\n", iface, event_type, debugstr_guid(ext_type), hr, value);
return IMFMediaEventQueue_QueueEventParamVar(source->event_queue, event_type, ext_type, hr, value);
}
@@ -1410,7 +1410,7 @@ static HRESULT media_source_constructor(IMFByteStream *bytestream, struct media_
if (FAILED(hr = IMFByteStream_GetLength(bytestream, &file_size)))
{
- FIXME("Failed to get byte stream length, hr %#x.\n", hr);
+ FIXME("Failed to get byte stream length, hr %#lx.\n", hr);
return hr;
}
@@ -1467,7 +1467,7 @@ static HRESULT media_source_constructor(IMFByteStream *bytestream, struct media_
if (FAILED(hr = media_stream_init_desc(object->streams[i])))
{
- ERR("Failed to finish initialization of media stream %p, hr %x.\n", object->streams[i], hr);
+ ERR("Failed to finish initialization of media stream %p, hr %#lx.\n", object->streams[i], hr);
IMFMediaSource_Release(&object->streams[i]->parent_source->IMFMediaSource_iface);
IMFMediaEventQueue_Release(object->streams[i]->event_queue);
free(object->streams[i]);
@@ -1509,7 +1509,7 @@ static HRESULT media_source_constructor(IMFByteStream *bytestream, struct media_
return S_OK;
fail:
- WARN("Failed to construct MFMediaSource, hr %#x.\n", hr);
+ WARN("Failed to construct MFMediaSource, hr %#lx.\n", hr);
if (descriptors)
{
@@ -1596,7 +1596,7 @@ static ULONG WINAPI winegstreamer_stream_handler_AddRef(IMFByteStreamHandler *if
struct winegstreamer_stream_handler *handler = impl_from_IMFByteStreamHandler(iface);
ULONG refcount = InterlockedIncrement(&handler->refcount);
- TRACE("%p, refcount %u.\n", handler, refcount);
+ TRACE("%p, refcount %lu.\n", handler, refcount);
return refcount;
}
@@ -1607,7 +1607,7 @@ static ULONG WINAPI winegstreamer_stream_handler_Release(IMFByteStreamHandler *i
ULONG refcount = InterlockedDecrement(&handler->refcount);
struct winegstreamer_stream_handler_result *result, *next;
- TRACE("%p, refcount %u.\n", iface, refcount);
+ TRACE("%p, refcount %lu.\n", iface, refcount);
if (!refcount)
{
@@ -1663,7 +1663,7 @@ static ULONG WINAPI create_object_context_AddRef(IUnknown *iface)
struct create_object_context *context = impl_from_IUnknown(iface);
ULONG refcount = InterlockedIncrement(&context->refcount);
- TRACE("%p, refcount %u.\n", iface, refcount);
+ TRACE("%p, refcount %lu.\n", iface, refcount);
return refcount;
}
@@ -1673,7 +1673,7 @@ static ULONG WINAPI create_object_context_Release(IUnknown *iface)
struct create_object_context *context = impl_from_IUnknown(iface);
ULONG refcount = InterlockedDecrement(&context->refcount);
- TRACE("%p, refcount %u.\n", iface, refcount);
+ TRACE("%p, refcount %lu.\n", iface, refcount);
if (!refcount)
{
@@ -1703,7 +1703,7 @@ static HRESULT WINAPI winegstreamer_stream_handler_BeginCreateObject(IMFByteStre
IMFAsyncResult *caller, *item;
HRESULT hr;
- TRACE("%p, %s, %#x, %p, %p, %p, %p.\n", iface, debugstr_w(url), flags, props, cancel_cookie, callback, state);
+ TRACE("%p, %s, %#lx, %p, %p, %p, %p.\n", iface, debugstr_w(url), flags, props, cancel_cookie, callback, state);
if (cancel_cookie)
*cancel_cookie = NULL;
@@ -1880,7 +1880,7 @@ static HRESULT WINAPI winegstreamer_stream_handler_callback_GetParameters(IMFAsy
static HRESULT winegstreamer_stream_handler_create_object(struct winegstreamer_stream_handler *This, WCHAR *url, IMFByteStream *stream, DWORD flags,
IPropertyStore *props, IUnknown **out_object, MF_OBJECT_TYPE *out_obj_type)
{
- TRACE("%p, %s, %p, %u, %p, %p, %p.\n", This, debugstr_w(url), stream, flags, props, out_object, out_obj_type);
+ TRACE("%p, %s, %p, %#lx, %p, %p, %p.\n", This, debugstr_w(url), stream, flags, props, out_object, out_obj_type);
if (flags & MF_RESOLUTION_MEDIASOURCE)
{
@@ -1899,7 +1899,7 @@ static HRESULT winegstreamer_stream_handler_create_object(struct winegstreamer_s
}
else
{
- FIXME("flags = %08x\n", flags);
+ FIXME("Unhandled flags %#lx.\n", flags);
return E_NOTIMPL;
}
}
diff --git a/dlls/winegstreamer/mfplat.c b/dlls/winegstreamer/mfplat.c
index 6a58f444204..aa5e60ec116 100644
--- a/dlls/winegstreamer/mfplat.c
+++ b/dlls/winegstreamer/mfplat.c
@@ -64,7 +64,7 @@ static ULONG WINAPI video_processor_AddRef(IMFTransform *iface)
struct video_processor *transform = impl_video_processor_from_IMFTransform(iface);
ULONG refcount = InterlockedIncrement(&transform->refcount);
- TRACE("%p, refcount %u.\n", iface, refcount);
+ TRACE("%p, refcount %lu.\n", iface, refcount);
return refcount;
}
@@ -74,7 +74,7 @@ static ULONG WINAPI video_processor_Release(IMFTransform *iface)
struct video_processor *transform = impl_video_processor_from_IMFTransform(iface);
ULONG refcount = InterlockedDecrement(&transform->refcount);
- TRACE("%p, refcount %u.\n", iface, refcount);
+ TRACE("%p, refcount %lu.\n", iface, refcount);
if (!refcount)
{
@@ -146,7 +146,7 @@ static HRESULT WINAPI video_processor_GetOutputStreamAttributes(IMFTransform *if
{
struct video_processor *transform = impl_video_processor_from_IMFTransform(iface);
- TRACE("%p, %u, %p.\n", iface, id, attributes);
+ TRACE("%p, %lu, %p.\n", iface, id, attributes);
*attributes = transform->output_attributes;
IMFAttributes_AddRef(*attributes);
@@ -156,14 +156,14 @@ static HRESULT WINAPI video_processor_GetOutputStreamAttributes(IMFTransform *if
static HRESULT WINAPI video_processor_DeleteInputStream(IMFTransform *iface, DWORD id)
{
- TRACE("%p, %u.\n", iface, id);
+ TRACE("%p, %lu.\n", iface, id);
return E_NOTIMPL;
}
static HRESULT WINAPI video_processor_AddInputStreams(IMFTransform *iface, DWORD streams, DWORD *ids)
{
- TRACE("%p, %u, %p.\n", iface, streams, ids);
+ TRACE("%p, %lu, %p.\n", iface, streams, ids);
return E_NOTIMPL;
}
@@ -171,7 +171,7 @@ static HRESULT WINAPI video_processor_AddInputStreams(IMFTransform *iface, DWORD
static HRESULT WINAPI video_processor_GetInputAvailableType(IMFTransform *iface, DWORD id, DWORD index,
IMFMediaType **type)
{
- FIXME("%p, %u, %u, %p.\n", iface, id, index, type);
+ FIXME("%p, %lu, %lu, %p.\n", iface, id, index, type);
return E_NOTIMPL;
}
@@ -179,42 +179,42 @@ static HRESULT WINAPI video_processor_GetInputAvailableType(IMFTransform *iface,
static HRESULT WINAPI video_processor_GetOutputAvailableType(IMFTransform *iface, DWORD id, DWORD index,
IMFMediaType **type)
{
- FIXME("%p, %u, %u, %p.\n", iface, id, index, type);
+ FIXME("%p, %lu, %lu, %p.\n", iface, id, index, type);
return E_NOTIMPL;
}
static HRESULT WINAPI video_processor_SetInputType(IMFTransform *iface, DWORD id, IMFMediaType *type, DWORD flags)
{
- FIXME("%p, %u, %p, %#x.\n", iface, id, type, flags);
+ FIXME("%p, %lu, %p, %#lx.\n", iface, id, type, flags);
return E_NOTIMPL;
}
static HRESULT WINAPI video_processor_SetOutputType(IMFTransform *iface, DWORD id, IMFMediaType *type, DWORD flags)
{
- FIXME("%p, %u, %p, %#x.\n", iface, id, type, flags);
+ FIXME("%p, %lu, %p, %#lx.\n", iface, id, type, flags);
return E_NOTIMPL;
}
static HRESULT WINAPI video_processor_GetInputCurrentType(IMFTransform *iface, DWORD id, IMFMediaType **type)
{
- FIXME("%p, %u, %p.\n", iface, id, type);
+ FIXME("%p, %lu, %p.\n", iface, id, type);
return E_NOTIMPL;
}
static HRESULT WINAPI video_processor_GetOutputCurrentType(IMFTransform *iface, DWORD id, IMFMediaType **type)
{
- FIXME("%p, %u, %p.\n", iface, id, type);
+ FIXME("%p, %lu, %p.\n", iface, id, type);
return E_NOTIMPL;
}
static HRESULT WINAPI video_processor_GetInputStatus(IMFTransform *iface, DWORD id, DWORD *flags)
{
- FIXME("%p, %u, %p.\n", iface, id, flags);
+ FIXME("%p, %lu, %p.\n", iface, id, flags);
return E_NOTIMPL;
}
@@ -235,21 +235,21 @@ static HRESULT WINAPI video_processor_SetOutputBounds(IMFTransform *iface, LONGL
static HRESULT WINAPI video_processor_ProcessEvent(IMFTransform *iface, DWORD id, IMFMediaEvent *event)
{
- TRACE("%p, %u, %p.\n", iface, id, event);
+ TRACE("%p, %lu, %p.\n", iface, id, event);
return E_NOTIMPL;
}
static HRESULT WINAPI video_processor_ProcessMessage(IMFTransform *iface, MFT_MESSAGE_TYPE message, ULONG_PTR param)
{
- FIXME("%p, %u.\n", iface, message);
+ FIXME("%p, %u, %#Ix.\n", iface, message, param);
return E_NOTIMPL;
}
static HRESULT WINAPI video_processor_ProcessInput(IMFTransform *iface, DWORD id, IMFSample *sample, DWORD flags)
{
- FIXME("%p, %u, %p, %#x.\n", iface, id, sample, flags);
+ FIXME("%p, %lu, %p, %#lx.\n", iface, id, sample, flags);
return E_NOTIMPL;
}
@@ -257,7 +257,7 @@ static HRESULT WINAPI video_processor_ProcessInput(IMFTransform *iface, DWORD id
static HRESULT WINAPI video_processor_ProcessOutput(IMFTransform *iface, DWORD flags, DWORD count,
MFT_OUTPUT_DATA_BUFFER *samples, DWORD *status)
{
- FIXME("%p, %#x, %u, %p, %p.\n", iface, flags, count, samples, status);
+ FIXME("%p, %#lx, %lu, %p, %p.\n", iface, flags, count, samples, status);
return E_NOTIMPL;
}
@@ -521,7 +521,7 @@ HRESULT mfplat_DllRegisterServer(void)
if (FAILED(hr))
{
- FIXME("Failed to register MFT, hr %#x\n", hr);
+ FIXME("Failed to register MFT, hr %#lx.\n", hr);
return hr;
}
}
diff --git a/dlls/winegstreamer/quartz_parser.c b/dlls/winegstreamer/quartz_parser.c
index e8d56d54785..331bc9a888a 100644
--- a/dlls/winegstreamer/quartz_parser.c
+++ b/dlls/winegstreamer/quartz_parser.c
@@ -452,7 +452,7 @@ static bool amt_to_wg_format_audio(const AM_MEDIA_TYPE *mt, struct wg_format *fo
}
if (mt->cbFormat < sizeof(WAVEFORMATEX) || !mt->pbFormat)
{
- ERR("Unexpected format size %u.\n", mt->cbFormat);
+ ERR("Unexpected format size %lu.\n", mt->cbFormat);
return false;
}
@@ -504,7 +504,7 @@ static bool amt_to_wg_format_audio_mpeg1(const AM_MEDIA_TYPE *mt, struct wg_form
}
if (mt->cbFormat < sizeof(*audio_format) || !mt->pbFormat)
{
- ERR("Unexpected format size %u.\n", mt->cbFormat);
+ ERR("Unexpected format size %lu.\n", mt->cbFormat);
return false;
}
@@ -533,7 +533,7 @@ static bool amt_to_wg_format_audio_mpeg1_layer3(const AM_MEDIA_TYPE *mt, struct
}
if (mt->cbFormat < sizeof(*audio_format) || !mt->pbFormat)
{
- ERR("Unexpected format size %u.\n", mt->cbFormat);
+ ERR("Unexpected format size %lu.\n", mt->cbFormat);
return false;
}
@@ -578,7 +578,7 @@ static bool amt_to_wg_format_video(const AM_MEDIA_TYPE *mt, struct wg_format *fo
}
if (mt->cbFormat < sizeof(VIDEOINFOHEADER) || !mt->pbFormat)
{
- ERR("Unexpected format size %u.\n", mt->cbFormat);
+ ERR("Unexpected format size %lu.\n", mt->cbFormat);
return false;
}
@@ -674,11 +674,11 @@ static HRESULT send_sample(struct parser_source *pin, IMediaSample *sample,
HRESULT hr;
BYTE *ptr = NULL;
- TRACE("offset %u, size %u, sample size %u\n", offset, size, IMediaSample_GetSize(sample));
+ TRACE("offset %u, size %u, sample size %lu.\n", offset, size, IMediaSample_GetSize(sample));
hr = IMediaSample_SetActualDataLength(sample, size);
if(FAILED(hr)){
- WARN("SetActualDataLength failed: %08x\n", hr);
+ ERR("Failed to set sample size, hr %#lx.\n", hr);
return hr;
}
@@ -728,12 +728,10 @@ static HRESULT send_sample(struct parser_source *pin, IMediaSample *sample,
IMediaSample_SetSyncPoint(sample, !event->u.buffer.delta);
if (!pin->pin.pin.peer)
- hr = VFW_E_NOT_CONNECTED;
- else
- hr = IMemInputPin_Receive(pin->pin.pMemInputPin, sample);
-
- TRACE("sending sample returned: %08x\n", hr);
+ return VFW_E_NOT_CONNECTED;
+ hr = IMemInputPin_Receive(pin->pin.pMemInputPin, sample);
+ TRACE("Receive() returned hr %#lx.\n", hr);
return hr;
}
@@ -760,7 +758,7 @@ static void send_buffer(struct parser_source *pin, const struct wg_parser_event
if (FAILED(hr))
{
if (hr != VFW_E_NOT_CONNECTED)
- ERR("Could not get a delivery buffer (%x), returning GST_FLOW_FLUSHING\n", hr);
+ ERR("Failed to get a sample, hr %#lx.\n", hr);
break;
}
@@ -783,7 +781,7 @@ static void send_buffer(struct parser_source *pin, const struct wg_parser_event
if (FAILED(hr))
{
if (hr != VFW_E_NOT_CONNECTED)
- ERR("Could not get a delivery buffer (%x), returning GST_FLOW_FLUSHING\n", hr);
+ ERR("Failed to get a sample, hr %#lx.\n", hr);
}
else
{
@@ -879,7 +877,7 @@ static DWORD CALLBACK read_thread(void *arg)
hr = IAsyncReader_SyncRead(filter->reader, offset, size, data);
if (FAILED(hr))
- ERR("Failed to read %u bytes at offset %I64u, hr %#x.\n", size, offset, hr);
+ ERR("Failed to read %u bytes at offset %I64u, hr %#lx.\n", size, offset, hr);
wg_parser_push_data(filter->wg_parser, SUCCEEDED(hr) ? data : NULL, size);
}
@@ -970,7 +968,7 @@ static HRESULT parser_init_stream(struct strmbase_filter *iface)
continue;
if (FAILED(hr = IMemAllocator_Commit(filter->sources[i]->pin.pAllocator)))
- ERR("Failed to commit allocator, hr %#x.\n", hr);
+ ERR("Failed to commit allocator, hr %#lx.\n", hr);
filter->sources[i]->thread = CreateThread(NULL, 0, stream_thread, filter->sources[i], 0, NULL);
}
@@ -1230,14 +1228,14 @@ static HRESULT WINAPI stream_select_Info(IAMStreamSelect *iface, LONG index,
AM_MEDIA_TYPE **mt, DWORD *flags, LCID *lcid, DWORD *group, WCHAR **name,
IUnknown **object, IUnknown **unknown)
{
- FIXME("iface %p, index %d, mt %p, flags %p, lcid %p, group %p, name %p, object %p, unknown %p, stub!\n",
+ FIXME("iface %p, index %ld, mt %p, flags %p, lcid %p, group %p, name %p, object %p, unknown %p, stub!\n",
iface, index, mt, flags, lcid, group, name, object, unknown);
return E_NOTIMPL;
}
static HRESULT WINAPI stream_select_Enable(IAMStreamSelect *iface, LONG index, DWORD flags)
{
- FIXME("iface %p, index %d, flags %#x, stub!\n", iface, index, flags);
+ FIXME("iface %p, index %ld, flags %#lx, stub!\n", iface, index, flags);
return E_NOTIMPL;
}
@@ -1299,7 +1297,7 @@ static HRESULT WINAPI GST_Seeking_SetPositions(IMediaSeeking *iface,
struct parser *filter = impl_from_strmbase_filter(pin->pin.pin.filter);
int i;
- TRACE("pin %p, current %s, current_flags %#x, stop %s, stop_flags %#x.\n",
+ TRACE("pin %p, current %s, current_flags %#lx, stop %s, stop_flags %#lx.\n",
pin, current ? debugstr_time(*current) : "<null>", current_flags,
stop ? debugstr_time(*stop) : "<null>", stop_flags);
@@ -1419,7 +1417,7 @@ static HRESULT WINAPI GST_QualityControl_Notify(IQualityControl *iface, IBaseFil
uint64_t timestamp;
int64_t diff;
- TRACE("pin %p, sender %p, type %s, proportion %u, late %s, timestamp %s.\n",
+ TRACE("pin %p, sender %p, type %s, proportion %ld, late %s, timestamp %s.\n",
pin, sender, q.Type == Famine ? "Famine" : "Flood", q.Proportion,
debugstr_time(q.Late), debugstr_time(q.TimeStamp));
diff --git a/dlls/winegstreamer/wm_asyncreader.c b/dlls/winegstreamer/wm_asyncreader.c
index aa15a5a77f9..fc919ef2c49 100644
--- a/dlls/winegstreamer/wm_asyncreader.c
+++ b/dlls/winegstreamer/wm_asyncreader.c
@@ -66,7 +66,7 @@ static void open_stream(struct async_reader *reader, IWMReaderCallback *callback
if (FAILED(hr = IWMReaderCallback_QueryInterface(callback,
&IID_IWMReaderCallbackAdvanced, (void **)&reader->reader.callback_advanced)))
reader->reader.callback_advanced = NULL;
- TRACE("Querying for IWMReaderCallbackAdvanced returned %#x.\n", hr);
+ TRACE("Querying for IWMReaderCallbackAdvanced returned %#lx.\n", hr);
}
static DWORD WINAPI stream_thread(void *arg)
@@ -139,13 +139,13 @@ static DWORD WINAPI stream_thread(void *arg)
else
hr = IWMReaderCallback_OnSample(callback, i, pts, duration,
flags, sample, reader->context);
- TRACE("Callback returned %#x.\n", hr);
+ TRACE("Callback returned %#lx.\n", hr);
INSSBuffer_Release(sample);
all_eos = false;
}
else if (hr != NS_E_NO_MORE_SAMPLES)
{
- ERR("Failed to get sample, hr %#x.\n", hr);
+ ERR("Failed to get sample, hr %#lx.\n", hr);
return 0;
}
}
@@ -279,7 +279,7 @@ static HRESULT WINAPI WMReader_GetOutputProps(IWMReader *iface, DWORD output, IW
{
struct async_reader *reader = impl_from_IWMReader(iface);
- TRACE("reader %p, output %u, props %p.\n", reader, output, props);
+ TRACE("reader %p, output %lu, props %p.\n", reader, output, props);
return wm_reader_get_output_props(&reader->reader, output, props);
}
@@ -288,7 +288,7 @@ static HRESULT WINAPI WMReader_SetOutputProps(IWMReader *iface, DWORD output, IW
{
struct async_reader *reader = impl_from_IWMReader(iface);
- TRACE("reader %p, output %u, props %p.\n", reader, output, props);
+ TRACE("reader %p, output %lu, props %p.\n", reader, output, props);
return wm_reader_set_output_props(&reader->reader, output, props);
}
@@ -297,7 +297,7 @@ static HRESULT WINAPI WMReader_GetOutputFormatCount(IWMReader *iface, DWORD outp
{
struct async_reader *reader = impl_from_IWMReader(iface);
- TRACE("reader %p, output %u, count %p.\n", reader, output, count);
+ TRACE("reader %p, output %lu, count %p.\n", reader, output, count);
return wm_reader_get_output_format_count(&reader->reader, output, count);
}
@@ -307,7 +307,7 @@ static HRESULT WINAPI WMReader_GetOutputFormat(IWMReader *iface, DWORD output,
{
struct async_reader *reader = impl_from_IWMReader(iface);
- TRACE("reader %p, output %u, index %u, props %p.\n", reader, output, index, props);
+ TRACE("reader %p, output %lu, index %lu, props %p.\n", reader, output, index, props);
return wm_reader_get_output_format(&reader->reader, output, index, props);
}
@@ -538,15 +538,17 @@ static HRESULT WINAPI WMReaderAdvanced_SetAllocateForOutput(IWMReaderAdvanced6 *
{
struct async_reader *reader = impl_from_IWMReaderAdvanced6(iface);
- TRACE("reader %p, output %u, allocate %d.\n", reader, output, allocate);
+ TRACE("reader %p, output %lu, allocate %d.\n", reader, output, allocate);
return wm_reader_set_allocate_for_output(&reader->reader, output, allocate);
}
static HRESULT WINAPI WMReaderAdvanced_GetAllocateForOutput(IWMReaderAdvanced6 *iface, DWORD output_num, BOOL *allocate)
{
- struct async_reader *This = impl_from_IWMReaderAdvanced6(iface);
- FIXME("(%p)->(%d %p)\n", This, output_num, allocate);
+ struct async_reader *reader = impl_from_IWMReaderAdvanced6(iface);
+
+ FIXME("reader %p, output %lu, allocate %p, stub!\n", reader, output_num, allocate);
+
return E_NOTIMPL;
}
@@ -584,7 +586,7 @@ static HRESULT WINAPI WMReaderAdvanced_SetClientInfo(IWMReaderAdvanced6 *iface,
static HRESULT WINAPI WMReaderAdvanced_GetMaxOutputSampleSize(IWMReaderAdvanced6 *iface, DWORD output, DWORD *max)
{
struct async_reader *This = impl_from_IWMReaderAdvanced6(iface);
- FIXME("(%p)->(%d %p)\n", This, output, max);
+ FIXME("(%p)->(%lu %p)\n", This, output, max);
return E_NOTIMPL;
}
@@ -667,7 +669,7 @@ static HRESULT WINAPI WMReaderAdvanced2_GetOutputSetting(IWMReaderAdvanced6 *ifa
const WCHAR *name, WMT_ATTR_DATATYPE *type, BYTE *value, WORD *length)
{
struct async_reader *This = impl_from_IWMReaderAdvanced6(iface);
- FIXME("(%p)->(%d %s %p %p %p)\n", This, output_num, debugstr_w(name), type, value, length);
+ FIXME("(%p)->(%lu %s %p %p %p)\n", This, output_num, debugstr_w(name), type, value, length);
return E_NOTIMPL;
}
@@ -675,7 +677,7 @@ static HRESULT WINAPI WMReaderAdvanced2_SetOutputSetting(IWMReaderAdvanced6 *ifa
const WCHAR *name, WMT_ATTR_DATATYPE type, const BYTE *value, WORD length)
{
struct async_reader *This = impl_from_IWMReaderAdvanced6(iface);
- FIXME("(%p)->(%d %s %d %p %d)\n", This, output_num, debugstr_w(name), type, value, length);
+ FIXME("(%p)->(%lu %s %#x %p %u)\n", This, output_num, debugstr_w(name), type, value, length);
return E_NOTIMPL;
}
@@ -742,15 +744,18 @@ static HRESULT WINAPI WMReaderAdvanced3_StartAtPosition(IWMReaderAdvanced6 *ifac
static HRESULT WINAPI WMReaderAdvanced4_GetLanguageCount(IWMReaderAdvanced6 *iface, DWORD output_num, WORD *language_count)
{
struct async_reader *This = impl_from_IWMReaderAdvanced6(iface);
- FIXME("(%p)->(%d %p)\n", This, output_num, language_count);
+ FIXME("(%p)->(%lu %p)\n", This, output_num, language_count);
return E_NOTIMPL;
}
static HRESULT WINAPI WMReaderAdvanced4_GetLanguage(IWMReaderAdvanced6 *iface, DWORD output_num,
WORD language, WCHAR *language_string, WORD *language_string_len)
{
- struct async_reader *This = impl_from_IWMReaderAdvanced6(iface);
- FIXME("(%p)->(%d %x %p %p)\n", This, output_num, language, language_string, language_string_len);
+ struct async_reader *reader = impl_from_IWMReaderAdvanced6(iface);
+
+ FIXME("reader %p, output %lu, language %#x, language_string %p, language_string_len %p, stub!\n",
+ reader, output_num, language, language_string, language_string_len);
+
return E_NOTIMPL;
}
@@ -806,17 +811,21 @@ static HRESULT WINAPI WMReaderAdvanced4_GetURL(IWMReaderAdvanced6 *iface, WCHAR
static HRESULT WINAPI WMReaderAdvanced5_SetPlayerHook(IWMReaderAdvanced6 *iface, DWORD output_num, IWMPlayerHook *hook)
{
- struct async_reader *This = impl_from_IWMReaderAdvanced6(iface);
- FIXME("(%p)->(%d %p)\n", This, output_num, hook);
+ struct async_reader *reader = impl_from_IWMReaderAdvanced6(iface);
+
+ FIXME("reader %p, output %lu, hook %p, stub!\n", reader, output_num, hook);
+
return E_NOTIMPL;
}
static HRESULT WINAPI WMReaderAdvanced6_SetProtectStreamSamples(IWMReaderAdvanced6 *iface, BYTE *cert,
DWORD cert_size, DWORD cert_type, DWORD flags, BYTE *initialization_vector, DWORD *initialization_vector_size)
{
- struct async_reader *This = impl_from_IWMReaderAdvanced6(iface);
- FIXME("(%p)->(%p %d %d %x %p %p)\n", This, cert, cert_size, cert_type, flags, initialization_vector,
- initialization_vector_size);
+ struct async_reader *reader = impl_from_IWMReaderAdvanced6(iface);
+
+ FIXME("reader %p, cert %p, cert_size %lu, cert_type %#lx, flags %#lx, vector %p, vector_size %p, stub!\n",
+ reader, cert, cert_size, cert_type, flags, initialization_vector, initialization_vector_size);
+
return E_NOTIMPL;
}
@@ -899,18 +908,18 @@ static ULONG WINAPI reader_accl_Release(IWMReaderAccelerator *iface)
static HRESULT WINAPI reader_accl_GetCodecInterface(IWMReaderAccelerator *iface, DWORD output, REFIID riid, void **codec)
{
- struct async_reader *This = impl_from_IWMReaderAccelerator(iface);
+ struct async_reader *reader = impl_from_IWMReaderAccelerator(iface);
- FIXME("%p, %d, %s, %p\n", This, output, debugstr_guid(riid), codec);
+ FIXME("reader %p, output %lu, iid %s, codec %p, stub!\n", reader, output, debugstr_guid(riid), codec);
return E_NOTIMPL;
}
static HRESULT WINAPI reader_accl_Notify(IWMReaderAccelerator *iface, DWORD output, WM_MEDIA_TYPE *subtype)
{
- struct async_reader *This = impl_from_IWMReaderAccelerator(iface);
+ struct async_reader *reader = impl_from_IWMReaderAccelerator(iface);
- FIXME("%p, %d, %p\n", This, output, subtype);
+ FIXME("reader %p, output %lu, subtype %p, stub!\n", reader, output, subtype);
return E_NOTIMPL;
}
@@ -968,11 +977,13 @@ static HRESULT WINAPI networkconfig_GetUDPPortRanges(IWMReaderNetworkConfig2 *if
return E_NOTIMPL;
}
-static HRESULT WINAPI networkconfig_SetUDPPortRanges(IWMReaderNetworkConfig2 *iface, WM_PORT_NUMBER_RANGE *array,
- DWORD ranges)
+static HRESULT WINAPI networkconfig_SetUDPPortRanges(IWMReaderNetworkConfig2 *iface,
+ WM_PORT_NUMBER_RANGE *ranges, DWORD count)
{
- struct async_reader *This = impl_from_IWMReaderNetworkConfig2(iface);
- FIXME("%p, %p, %u\n", This, array, ranges);
+ struct async_reader *reader = impl_from_IWMReaderNetworkConfig2(iface);
+
+ FIXME("reader %p, ranges %p, count %lu.\n", reader, ranges, count);
+
return E_NOTIMPL;
}
@@ -1019,8 +1030,10 @@ static HRESULT WINAPI networkconfig_GetProxyPort(IWMReaderNetworkConfig2 *iface,
static HRESULT WINAPI networkconfig_SetProxyPort(IWMReaderNetworkConfig2 *iface, const WCHAR *protocol,
DWORD port)
{
- struct async_reader *This = impl_from_IWMReaderNetworkConfig2(iface);
- FIXME("%p, %s, %u\n", This, debugstr_w(protocol), port);
+ struct async_reader *reader = impl_from_IWMReaderNetworkConfig2(iface);
+
+ FIXME("reader %p, protocol %s, port %lu, stub!\n", reader, debugstr_w(protocol), port);
+
return E_NOTIMPL;
}
@@ -1144,8 +1157,10 @@ static HRESULT WINAPI networkconfig_GetConnectionBandwidth(IWMReaderNetworkConfi
static HRESULT WINAPI networkconfig_SetConnectionBandwidth(IWMReaderNetworkConfig2 *iface, DWORD bandwidth)
{
- struct async_reader *This = impl_from_IWMReaderNetworkConfig2(iface);
- FIXME("%p, %u\n", This, bandwidth);
+ struct async_reader *reader = impl_from_IWMReaderNetworkConfig2(iface);
+
+ FIXME("reader %p, bandwidth %lu, stub!\n", reader, bandwidth);
+
return E_NOTIMPL;
}
@@ -1159,8 +1174,10 @@ static HRESULT WINAPI networkconfig_GetNumProtocolsSupported(IWMReaderNetworkCon
static HRESULT WINAPI networkconfig_GetSupportedProtocolName(IWMReaderNetworkConfig2 *iface, DWORD protocol_num,
WCHAR *protocol, DWORD *size)
{
- struct async_reader *This = impl_from_IWMReaderNetworkConfig2(iface);
- FIXME("%p, %u, %p %p\n", This, protocol_num, protocol, size);
+ struct async_reader *reader = impl_from_IWMReaderNetworkConfig2(iface);
+
+ FIXME("reader %p, index %lu, protocol %p, size %p, stub!\n", reader, protocol_num, protocol, size);
+
return E_NOTIMPL;
}
@@ -1174,8 +1191,10 @@ static HRESULT WINAPI networkconfig_AddLoggingUrl(IWMReaderNetworkConfig2 *iface
static HRESULT WINAPI networkconfig_GetLoggingUrl(IWMReaderNetworkConfig2 *iface, DWORD index, WCHAR *url,
DWORD *size)
{
- struct async_reader *This = impl_from_IWMReaderNetworkConfig2(iface);
- FIXME("%p, %u, %p, %p\n", This, index, url, size);
+ struct async_reader *reader = impl_from_IWMReaderNetworkConfig2(iface);
+
+ FIXME("reader %p, index %lu, url %p, size %p, stub!\n", reader, index, url, size);
+
return E_NOTIMPL;
}
@@ -1246,8 +1265,10 @@ static HRESULT WINAPI networkconfig_GetAutoReconnectLimit(IWMReaderNetworkConfig
static HRESULT WINAPI networkconfig_SetAutoReconnectLimit(IWMReaderNetworkConfig2 *iface, DWORD limit)
{
- struct async_reader *This = impl_from_IWMReaderNetworkConfig2(iface);
- FIXME("%p, %u\n", This, limit);
+ struct async_reader *reader = impl_from_IWMReaderNetworkConfig2(iface);
+
+ FIXME("reader %p, limit %lu, stub!\n", reader, limit);
+
return E_NOTIMPL;
}
@@ -1378,8 +1399,10 @@ static HRESULT WINAPI readclock_SetTimer(IWMReaderStreamClock *iface, QWORD when
static HRESULT WINAPI readclock_KillTimer(IWMReaderStreamClock *iface, DWORD id)
{
- struct async_reader *This = impl_from_IWMReaderStreamClock(iface);
- FIXME("%p, %d\n", This, id);
+ struct async_reader *reader = impl_from_IWMReaderStreamClock(iface);
+
+ FIXME("reader %p, id %lu, stub!\n", reader, id);
+
return E_NOTIMPL;
}
@@ -1418,8 +1441,10 @@ static ULONG WINAPI negotiation_Release(IWMReaderTypeNegotiation *iface)
static HRESULT WINAPI negotiation_TryOutputProps(IWMReaderTypeNegotiation *iface, DWORD output, IWMOutputMediaProps *props)
{
- struct async_reader *This = impl_from_IWMReaderTypeNegotiation(iface);
- FIXME("%p, %d, %p\n", This, output, props);
+ struct async_reader *reader = impl_from_IWMReaderTypeNegotiation(iface);
+
+ FIXME("reader %p, output %lu, props %p, stub!\n", reader, output, props);
+
return E_NOTIMPL;
}
@@ -1464,25 +1489,31 @@ static HRESULT WINAPI refclock_GetTime(IReferenceClock *iface, REFERENCE_TIME *t
static HRESULT WINAPI refclock_AdviseTime(IReferenceClock *iface, REFERENCE_TIME basetime,
REFERENCE_TIME streamtime, HEVENT event, DWORD_PTR *cookie)
{
- struct async_reader *This = impl_from_IReferenceClock(iface);
- FIXME("%p, %s, %s, %lu, %p\n", This, wine_dbgstr_longlong(basetime),
- wine_dbgstr_longlong(streamtime), event, cookie);
+ struct async_reader *reader = impl_from_IReferenceClock(iface);
+
+ FIXME("reader %p, basetime %s, streamtime %s, event %#Ix, cookie %p, stub!\n",
+ reader, debugstr_time(basetime), debugstr_time(streamtime), event, cookie);
+
return E_NOTIMPL;
}
static HRESULT WINAPI refclock_AdvisePeriodic(IReferenceClock *iface, REFERENCE_TIME starttime,
REFERENCE_TIME period, HSEMAPHORE semaphore, DWORD_PTR *cookie)
{
- struct async_reader *This = impl_from_IReferenceClock(iface);
- FIXME("%p, %s, %s, %lu, %p\n", This, wine_dbgstr_longlong(starttime),
- wine_dbgstr_longlong(period), semaphore, cookie);
+ struct async_reader *reader = impl_from_IReferenceClock(iface);
+
+ FIXME("reader %p, starttime %s, period %s, semaphore %#Ix, cookie %p, stub!\n",
+ reader, debugstr_time(starttime), debugstr_time(period), semaphore, cookie);
+
return E_NOTIMPL;
}
static HRESULT WINAPI refclock_Unadvise(IReferenceClock *iface, DWORD_PTR cookie)
{
- struct async_reader *This = impl_from_IReferenceClock(iface);
- FIXME("%p, %lu\n", This, cookie);
+ struct async_reader *reader = impl_from_IReferenceClock(iface);
+
+ FIXME("reader %p, cookie %Iu, stub!\n", reader, cookie);
+
return E_NOTIMPL;
}
diff --git a/dlls/winegstreamer/wm_reader.c b/dlls/winegstreamer/wm_reader.c
index 1a2b8d7614b..d6dddc177eb 100644
--- a/dlls/winegstreamer/wm_reader.c
+++ b/dlls/winegstreamer/wm_reader.c
@@ -24,7 +24,7 @@ static struct wm_stream *get_stream_by_output_number(struct wm_reader *reader, D
{
if (output < reader->stream_count)
return &reader->streams[output];
- WARN("Invalid output number %u.\n", output);
+ WARN("Invalid output number %lu.\n", output);
return NULL;
}
@@ -65,7 +65,7 @@ static ULONG WINAPI output_props_AddRef(IWMOutputMediaProps *iface)
struct output_props *props = impl_from_IWMOutputMediaProps(iface);
ULONG refcount = InterlockedIncrement(&props->refcount);
- TRACE("%p increasing refcount to %u.\n", props, refcount);
+ TRACE("%p increasing refcount to %lu.\n", props, refcount);
return refcount;
}
@@ -75,7 +75,7 @@ static ULONG WINAPI output_props_Release(IWMOutputMediaProps *iface)
struct output_props *props = impl_from_IWMOutputMediaProps(iface);
ULONG refcount = InterlockedDecrement(&props->refcount);
- TRACE("%p decreasing refcount to %u.\n", props, refcount);
+ TRACE("%p decreasing refcount to %lu.\n", props, refcount);
if (!refcount)
free(props);
@@ -209,7 +209,7 @@ static ULONG WINAPI buffer_AddRef(INSSBuffer *iface)
struct buffer *buffer = impl_from_INSSBuffer(iface);
ULONG refcount = InterlockedIncrement(&buffer->refcount);
- TRACE("%p increasing refcount to %u.\n", buffer, refcount);
+ TRACE("%p increasing refcount to %lu.\n", buffer, refcount);
return refcount;
}
@@ -219,7 +219,7 @@ static ULONG WINAPI buffer_Release(INSSBuffer *iface)
struct buffer *buffer = impl_from_INSSBuffer(iface);
ULONG refcount = InterlockedDecrement(&buffer->refcount);
- TRACE("%p decreasing refcount to %u.\n", buffer, refcount);
+ TRACE("%p decreasing refcount to %lu.\n", buffer, refcount);
if (!refcount)
free(buffer);
@@ -237,7 +237,7 @@ static HRESULT WINAPI buffer_SetLength(INSSBuffer *iface, DWORD size)
{
struct buffer *buffer = impl_from_INSSBuffer(iface);
- TRACE("iface %p, size %u.\n", buffer, size);
+ TRACE("iface %p, size %lu.\n", buffer, size);
if (size > buffer->capacity)
return E_INVALIDARG;
@@ -329,7 +329,7 @@ static ULONG WINAPI stream_config_AddRef(IWMStreamConfig *iface)
struct stream_config *config = impl_from_IWMStreamConfig(iface);
ULONG refcount = InterlockedIncrement(&config->refcount);
- TRACE("%p increasing refcount to %u.\n", config, refcount);
+ TRACE("%p increasing refcount to %lu.\n", config, refcount);
return refcount;
}
@@ -339,7 +339,7 @@ static ULONG WINAPI stream_config_Release(IWMStreamConfig *iface)
struct stream_config *config = impl_from_IWMStreamConfig(iface);
ULONG refcount = InterlockedDecrement(&config->refcount);
- TRACE("%p decreasing refcount to %u.\n", config, refcount);
+ TRACE("%p decreasing refcount to %lu.\n", config, refcount);
if (!refcount)
{
@@ -422,7 +422,7 @@ static HRESULT WINAPI stream_config_GetBitrate(IWMStreamConfig *iface, DWORD *bi
static HRESULT WINAPI stream_config_SetBitrate(IWMStreamConfig *iface, DWORD bitrate)
{
- FIXME("iface %p, bitrate %u, stub!\n", iface, bitrate);
+ FIXME("iface %p, bitrate %lu, stub!\n", iface, bitrate);
return E_NOTIMPL;
}
@@ -434,7 +434,7 @@ static HRESULT WINAPI stream_config_GetBufferWindow(IWMStreamConfig *iface, DWOR
static HRESULT WINAPI stream_config_SetBufferWindow(IWMStreamConfig *iface, DWORD window)
{
- FIXME("iface %p, window %u, stub!\n", iface, window);
+ FIXME("iface %p, window %lu, stub!\n", iface, window);
return E_NOTIMPL;
}
@@ -591,7 +591,7 @@ static DWORD CALLBACK read_thread(void *arg)
if (!SetFilePointerEx(file, large_offset, NULL, FILE_BEGIN)
|| !ReadFile(file, data, size, &ret_size, NULL))
{
- ERR("Failed to read %u bytes at offset %I64u, error %u.\n", size, offset, GetLastError());
+ ERR("Failed to read %u bytes at offset %I64u, error %lu.\n", size, offset, GetLastError());
wg_parser_push_data(reader->wg_parser, NULL, 0);
continue;
}
@@ -602,14 +602,14 @@ static DWORD CALLBACK read_thread(void *arg)
hr = IStream_Read(stream, data, size, &ret_size);
if (FAILED(hr))
{
- ERR("Failed to read %u bytes at offset %I64u, hr %#x.\n", size, offset, hr);
+ ERR("Failed to read %u bytes at offset %I64u, hr %#lx.\n", size, offset, hr);
wg_parser_push_data(reader->wg_parser, NULL, 0);
continue;
}
}
if (ret_size != size)
- ERR("Unexpected short read: requested %u bytes, got %u.\n", size, ret_size);
+ ERR("Unexpected short read: requested %u bytes, got %lu.\n", size, ret_size);
wg_parser_push_data(reader->wg_parser, data, ret_size);
}
@@ -674,7 +674,7 @@ static ULONG WINAPI profile_AddRef(IWMProfile3 *iface)
struct wm_reader *reader = impl_from_IWMProfile3(iface);
ULONG refcount = InterlockedIncrement(&reader->refcount);
- TRACE("%p increasing refcount to %u.\n", reader, refcount);
+ TRACE("%p increasing refcount to %lu.\n", reader, refcount);
return refcount;
}
@@ -684,7 +684,7 @@ static ULONG WINAPI profile_Release(IWMProfile3 *iface)
struct wm_reader *reader = impl_from_IWMProfile3(iface);
ULONG refcount = InterlockedDecrement(&reader->refcount);
- TRACE("%p decreasing refcount to %u.\n", reader, refcount);
+ TRACE("%p decreasing refcount to %lu.\n", reader, refcount);
if (!refcount)
reader->ops->destroy(reader);
@@ -742,14 +742,14 @@ static HRESULT WINAPI profile_GetStream(IWMProfile3 *iface, DWORD index, IWMStre
struct wm_reader *reader = impl_from_IWMProfile3(iface);
struct stream_config *object;
- TRACE("reader %p, index %u, config %p.\n", reader, index, config);
+ TRACE("reader %p, index %lu, config %p.\n", reader, index, config);
EnterCriticalSection(&reader->cs);
if (index >= reader->stream_count)
{
LeaveCriticalSection(&reader->cs);
- WARN("Index %u exceeds stream count %u; returning E_INVALIDARG.\n", index, reader->stream_count);
+ WARN("Index %lu exceeds stream count %u; returning E_INVALIDARG.\n", index, reader->stream_count);
return E_INVALIDARG;
}
@@ -816,7 +816,7 @@ static HRESULT WINAPI profile_GetMutualExclusionCount(IWMProfile3 *iface, DWORD
static HRESULT WINAPI profile_GetMutualExclusion(IWMProfile3 *iface, DWORD index, IWMMutualExclusion **excl)
{
- FIXME("iface %p, index %u, excl %p, stub!\n", iface, index, excl);
+ FIXME("iface %p, index %lu, excl %p, stub!\n", iface, index, excl);
return E_NOTIMPL;
}
@@ -864,7 +864,7 @@ static HRESULT WINAPI profile_GetBandwidthSharingCount(IWMProfile3 *iface, DWORD
static HRESULT WINAPI profile_GetBandwidthSharing(IWMProfile3 *iface, DWORD index, IWMBandwidthSharing **sharing)
{
- FIXME("iface %p, index %d, sharing %p, stub!\n", iface, index, sharing);
+ FIXME("iface %p, index %lu, sharing %p, stub!\n", iface, index, sharing);
return E_NOTIMPL;
}
@@ -1131,7 +1131,7 @@ static HRESULT WINAPI header_info_GetCodecInfoCount(IWMHeaderInfo3 *iface, DWORD
static HRESULT WINAPI header_info_GetCodecInfo(IWMHeaderInfo3 *iface, DWORD index, WORD *name_len,
WCHAR *name, WORD *desc_len, WCHAR *desc, WMT_CODEC_INFO_TYPE *type, WORD *size, BYTE *info)
{
- FIXME("iface %p, index %u, name_len %p, name %p, desc_len %p, desc %p, type %p, size %p, info %p, stub!\n",
+ FIXME("iface %p, index %lu, name_len %p, name %p, desc_len %p, desc %p, type %p, size %p, info %p, stub!\n",
iface, index, name_len, name, desc_len, desc, type, size, info);
return E_NOTIMPL;
}
@@ -1163,7 +1163,7 @@ static HRESULT WINAPI header_info_GetAttributeByIndexEx(IWMHeaderInfo3 *iface,
static HRESULT WINAPI header_info_ModifyAttribute(IWMHeaderInfo3 *iface, WORD stream_number,
WORD index, WMT_ATTR_DATATYPE type, WORD lang_index, const BYTE *value, DWORD size)
{
- FIXME("iface %p, stream_number %u, index %u, type %#x, lang_index %u, value %p, size %u, stub!\n",
+ FIXME("iface %p, stream_number %u, index %u, type %#x, lang_index %u, value %p, size %lu, stub!\n",
iface, stream_number, index, type, lang_index, value, size);
return E_NOTIMPL;
}
@@ -1172,7 +1172,7 @@ static HRESULT WINAPI header_info_AddAttribute(IWMHeaderInfo3 *iface,
WORD stream_number, const WCHAR *name, WORD *index,
WMT_ATTR_DATATYPE type, WORD lang_index, const BYTE *value, DWORD size)
{
- FIXME("iface %p, stream_number %u, name %s, index %p, type %#x, lang_index %u, value %p, size %u, stub!\n",
+ FIXME("iface %p, stream_number %u, name %s, index %p, type %#x, lang_index %u, value %p, size %lu, stub!\n",
iface, stream_number, debugstr_w(name), index, type, lang_index, value, size);
return E_NOTIMPL;
}
@@ -1309,7 +1309,7 @@ static HRESULT WINAPI packet_size_GetMaxPacketSize(IWMPacketSize2 *iface, DWORD
static HRESULT WINAPI packet_size_SetMaxPacketSize(IWMPacketSize2 *iface, DWORD size)
{
- FIXME("iface %p, size %u, stub!\n", iface, size);
+ FIXME("iface %p, size %lu, stub!\n", iface, size);
return E_NOTIMPL;
}
@@ -1321,7 +1321,7 @@ static HRESULT WINAPI packet_size_GetMinPacketSize(IWMPacketSize2 *iface, DWORD
static HRESULT WINAPI packet_size_SetMinPacketSize(IWMPacketSize2 *iface, DWORD size)
{
- FIXME("iface %p, size %u, stub!\n", iface, size);
+ FIXME("iface %p, size %lu, stub!\n", iface, size);
return E_NOTIMPL;
}
@@ -1365,14 +1365,14 @@ static ULONG WINAPI playlist_Release(IWMReaderPlaylistBurn *iface)
static HRESULT WINAPI playlist_InitPlaylistBurn(IWMReaderPlaylistBurn *iface, DWORD count,
const WCHAR **filenames, IWMStatusCallback *callback, void *context)
{
- FIXME("iface %p, count %u, filenames %p, callback %p, context %p, stub!\n",
+ FIXME("iface %p, count %lu, filenames %p, callback %p, context %p, stub!\n",
iface, count, filenames, callback, context);
return E_NOTIMPL;
}
static HRESULT WINAPI playlist_GetInitResults(IWMReaderPlaylistBurn *iface, DWORD count, HRESULT *hrs)
{
- FIXME("iface %p, count %u, hrs %p, stub!\n", iface, count, hrs);
+ FIXME("iface %p, count %lu, hrs %p, stub!\n", iface, count, hrs);
return E_NOTIMPL;
}
@@ -1384,7 +1384,7 @@ static HRESULT WINAPI playlist_Cancel(IWMReaderPlaylistBurn *iface)
static HRESULT WINAPI playlist_EndPlaylistBurn(IWMReaderPlaylistBurn *iface, HRESULT hr)
{
- FIXME("iface %p, hr %#x, stub!\n", iface, hr);
+ FIXME("iface %p, hr %#lx, stub!\n", iface, hr);
return E_NOTIMPL;
}
@@ -1468,7 +1468,7 @@ static HRESULT init_stream(struct wm_reader *reader, QWORD file_size)
if (FAILED(hr = wg_parser_connect(reader->wg_parser, file_size)))
{
- ERR("Failed to connect parser, hr %#x.\n", hr);
+ ERR("Failed to connect parser, hr %#lx.\n", hr);
goto out_shutdown_thread;
}
@@ -1543,7 +1543,7 @@ HRESULT wm_reader_open_stream(struct wm_reader *reader, IStream *stream)
if (FAILED(hr = IStream_Stat(stream, &stat, STATFLAG_NONAME)))
{
- ERR("Failed to stat stream, hr %#x.\n", hr);
+ ERR("Failed to stat stream, hr %#lx.\n", hr);
return hr;
}
@@ -1569,13 +1569,13 @@ HRESULT wm_reader_open_file(struct wm_reader *reader, const WCHAR *filename)
if ((file = CreateFileW(filename, GENERIC_READ, FILE_SHARE_READ, NULL,
OPEN_EXISTING, 0, NULL)) == INVALID_HANDLE_VALUE)
{
- ERR("Failed to open %s, error %u.\n", debugstr_w(filename), GetLastError());
+ ERR("Failed to open %s, error %lu.\n", debugstr_w(filename), GetLastError());
return HRESULT_FROM_WIN32(GetLastError());
}
if (!GetFileSizeEx(file, &size))
{
- ERR("Failed to get the size of %s, error %u.\n", debugstr_w(filename), GetLastError());
+ ERR("Failed to get the size of %s, error %lu.\n", debugstr_w(filename), GetLastError());
CloseHandle(file);
return HRESULT_FROM_WIN32(GetLastError());
}
@@ -1851,7 +1851,7 @@ HRESULT wm_reader_get_stream_sample(struct wm_stream *stream,
if (FAILED(hr = IWMReaderCallbackAdvanced_AllocateForStream(callback_advanced,
stream->index + 1, event.u.buffer.size, &sample, NULL)))
{
- ERR("Failed to allocate stream sample of %u bytes, hr %#x.\n", event.u.buffer.size, hr);
+ ERR("Failed to allocate stream sample of %u bytes, hr %#lx.\n", event.u.buffer.size, hr);
wg_parser_stream_release_buffer(wg_stream);
return hr;
}
@@ -1861,7 +1861,7 @@ HRESULT wm_reader_get_stream_sample(struct wm_stream *stream,
if (FAILED(hr = IWMReaderCallbackAdvanced_AllocateForOutput(callback_advanced,
stream->index, event.u.buffer.size, &sample, NULL)))
{
- ERR("Failed to allocate output sample of %u bytes, hr %#x.\n", event.u.buffer.size, hr);
+ ERR("Failed to allocate output sample of %u bytes, hr %#lx.\n", event.u.buffer.size, hr);
wg_parser_stream_release_buffer(wg_stream);
return hr;
}
@@ -1886,11 +1886,11 @@ HRESULT wm_reader_get_stream_sample(struct wm_stream *stream,
}
if (FAILED(hr = INSSBuffer_GetBufferAndLength(sample, &data, &size)))
- ERR("Failed to get data pointer, hr %#x.\n", hr);
+ ERR("Failed to get data pointer, hr %#lx.\n", hr);
if (FAILED(hr = INSSBuffer_GetMaxLength(sample, &capacity)))
- ERR("Failed to get capacity, hr %#x.\n", hr);
+ ERR("Failed to get capacity, hr %#lx.\n", hr);
if (event.u.buffer.size > capacity)
- ERR("Returned capacity %u is less than requested capacity %u.\n",
+ ERR("Returned capacity %lu is less than requested capacity %u.\n",
capacity, event.u.buffer.size);
if (!wg_parser_stream_copy_buffer(wg_stream, data, 0, event.u.buffer.size))
@@ -1901,7 +1901,7 @@ HRESULT wm_reader_get_stream_sample(struct wm_stream *stream,
}
if (FAILED(hr = INSSBuffer_SetLength(sample, event.u.buffer.size)))
- ERR("Failed to set size %u, hr %#x.\n", event.u.buffer.size, hr);
+ ERR("Failed to set size %u, hr %#lx.\n", event.u.buffer.size, hr);
wg_parser_stream_release_buffer(wg_stream);
diff --git a/dlls/winegstreamer/wm_syncreader.c b/dlls/winegstreamer/wm_syncreader.c
index 96754d107de..e86645a207a 100644
--- a/dlls/winegstreamer/wm_syncreader.c
+++ b/dlls/winegstreamer/wm_syncreader.c
@@ -67,7 +67,7 @@ static HRESULT WINAPI WMSyncReader_Close(IWMSyncReader2 *iface)
static HRESULT WINAPI WMSyncReader_GetMaxOutputSampleSize(IWMSyncReader2 *iface, DWORD output, DWORD *max)
{
struct sync_reader *This = impl_from_IWMSyncReader2(iface);
- FIXME("(%p)->(%d %p): stub!\n", This, output, max);
+ FIXME("(%p)->(%lu %p): stub!\n", This, output, max);
return E_NOTIMPL;
}
@@ -160,7 +160,7 @@ static HRESULT WINAPI WMSyncReader_GetOutputFormat(IWMSyncReader2 *iface,
{
struct sync_reader *reader = impl_from_IWMSyncReader2(iface);
- TRACE("reader %p, output %u, index %u, props %p.\n", reader, output, index, props);
+ TRACE("reader %p, output %lu, index %lu, props %p.\n", reader, output, index, props);
return wm_reader_get_output_format(&reader->reader, output, index, props);
}
@@ -169,7 +169,7 @@ static HRESULT WINAPI WMSyncReader_GetOutputFormatCount(IWMSyncReader2 *iface, D
{
struct sync_reader *reader = impl_from_IWMSyncReader2(iface);
- TRACE("reader %p, output %u, count %p.\n", reader, output, count);
+ TRACE("reader %p, output %lu, count %p.\n", reader, output, count);
return wm_reader_get_output_format_count(&reader->reader, output, count);
}
@@ -190,7 +190,7 @@ static HRESULT WINAPI WMSyncReader_GetOutputProps(IWMSyncReader2 *iface,
{
struct sync_reader *reader = impl_from_IWMSyncReader2(iface);
- TRACE("reader %p, output %u, props %p.\n", reader, output, props);
+ TRACE("reader %p, output %lu, props %p.\n", reader, output, props);
return wm_reader_get_output_props(&reader->reader, output, props);
}
@@ -199,7 +199,7 @@ static HRESULT WINAPI WMSyncReader_GetOutputSetting(IWMSyncReader2 *iface, DWORD
WMT_ATTR_DATATYPE *type, BYTE *value, WORD *length)
{
struct sync_reader *This = impl_from_IWMSyncReader2(iface);
- FIXME("(%p)->(%u %s %p %p %p): stub!\n", This, output_num, debugstr_w(name), type, value, length);
+ FIXME("(%p)->(%lu %s %p %p %p): stub!\n", This, output_num, debugstr_w(name), type, value, length);
return E_NOTIMPL;
}
@@ -215,7 +215,7 @@ static HRESULT WINAPI WMSyncReader_GetStreamNumberForOutput(IWMSyncReader2 *ifac
{
struct sync_reader *reader = impl_from_IWMSyncReader2(iface);
- TRACE("reader %p, output %u, stream_number %p.\n", reader, output, stream_number);
+ TRACE("reader %p, output %lu, stream_number %p.\n", reader, output, stream_number);
*stream_number = output + 1;
return S_OK;
@@ -253,7 +253,7 @@ static HRESULT WINAPI WMSyncReader_SetOutputProps(IWMSyncReader2 *iface, DWORD o
{
struct sync_reader *reader = impl_from_IWMSyncReader2(iface);
- TRACE("reader %p, output %u, props %p.\n", reader, output, props);
+ TRACE("reader %p, output %lu, props %p.\n", reader, output, props);
return wm_reader_set_output_props(&reader->reader, output, props);
}
@@ -263,7 +263,7 @@ static HRESULT WINAPI WMSyncReader_SetOutputSetting(IWMSyncReader2 *iface, DWORD
{
struct sync_reader *reader = impl_from_IWMSyncReader2(iface);
- TRACE("reader %p, output %u, name %s, type %#x, value %p, size %u.\n",
+ TRACE("reader %p, output %lu, name %s, type %#x, value %p, size %u.\n",
reader, output, debugstr_w(name), type, value, size);
if (!wcscmp(name, L"VideoSampleDurations"))
@@ -336,28 +336,28 @@ static HRESULT WINAPI WMSyncReader2_SetRangeByFrameEx(IWMSyncReader2 *iface, WOR
static HRESULT WINAPI WMSyncReader2_SetAllocateForOutput(IWMSyncReader2 *iface, DWORD output_num, IWMReaderAllocatorEx *allocator)
{
struct sync_reader *This = impl_from_IWMSyncReader2(iface);
- FIXME("(%p)->(%d %p): stub!\n", This, output_num, allocator);
+ FIXME("(%p)->(%lu %p): stub!\n", This, output_num, allocator);
return E_NOTIMPL;
}
static HRESULT WINAPI WMSyncReader2_GetAllocateForOutput(IWMSyncReader2 *iface, DWORD output_num, IWMReaderAllocatorEx **allocator)
{
struct sync_reader *This = impl_from_IWMSyncReader2(iface);
- FIXME("(%p)->(%d %p): stub!\n", This, output_num, allocator);
+ FIXME("(%p)->(%lu %p): stub!\n", This, output_num, allocator);
return E_NOTIMPL;
}
static HRESULT WINAPI WMSyncReader2_SetAllocateForStream(IWMSyncReader2 *iface, DWORD stream_num, IWMReaderAllocatorEx *allocator)
{
struct sync_reader *This = impl_from_IWMSyncReader2(iface);
- FIXME("(%p)->(%d %p): stub!\n", This, stream_num, allocator);
+ FIXME("(%p)->(%lu %p): stub!\n", This, stream_num, allocator);
return E_NOTIMPL;
}
static HRESULT WINAPI WMSyncReader2_GetAllocateForStream(IWMSyncReader2 *iface, DWORD stream_num, IWMReaderAllocatorEx **allocator)
{
struct sync_reader *This = impl_from_IWMSyncReader2(iface);
- FIXME("(%p)->(%d %p): stub!\n", This, stream_num, allocator);
+ FIXME("(%p)->(%lu %p): stub!\n", This, stream_num, allocator);
return E_NOTIMPL;
}
diff --git a/dlls/winegstreamer/wma_decoder.c b/dlls/winegstreamer/wma_decoder.c
index a6fdbf27724..945390f44db 100644
--- a/dlls/winegstreamer/wma_decoder.c
+++ b/dlls/winegstreamer/wma_decoder.c
@@ -90,7 +90,7 @@ static ULONG WINAPI unknown_AddRef(IUnknown *iface)
struct wma_decoder *decoder = impl_from_IUnknown(iface);
ULONG refcount = InterlockedIncrement(&decoder->refcount);
- TRACE("iface %p increasing refcount to %u.\n", decoder, refcount);
+ TRACE("iface %p increasing refcount to %lu.\n", decoder, refcount);
return refcount;
}
@@ -100,7 +100,7 @@ static ULONG WINAPI unknown_Release(IUnknown *iface)
struct wma_decoder *decoder = impl_from_IUnknown(iface);
ULONG refcount = InterlockedDecrement(&decoder->refcount);
- TRACE("iface %p decreasing refcount to %u.\n", decoder, refcount);
+ TRACE("iface %p decreasing refcount to %lu.\n", decoder, refcount);
if (!refcount)
{
@@ -161,7 +161,7 @@ static HRESULT WINAPI transform_GetStreamCount(IMFTransform *iface, DWORD *input
static HRESULT WINAPI transform_GetStreamIDs(IMFTransform *iface, DWORD input_size, DWORD *inputs,
DWORD output_size, DWORD *outputs)
{
- FIXME("iface %p, input_size %u, inputs %p, output_size %u, outputs %p stub!\n", iface,
+ FIXME("iface %p, input_size %lu, inputs %p, output_size %lu, outputs %p stub!\n", iface,
input_size, inputs, output_size, outputs);
return E_NOTIMPL;
}
@@ -172,7 +172,7 @@ static HRESULT WINAPI transform_GetInputStreamInfo(IMFTransform *iface, DWORD id
UINT32 block_alignment;
HRESULT hr;
- TRACE("iface %p, id %u, info %p.\n", iface, id, info);
+ TRACE("iface %p, id %lu, info %p.\n", iface, id, info);
if (!decoder->input_type || !decoder->output_type)
return MF_E_TRANSFORM_TYPE_NOT_SET;
@@ -195,7 +195,7 @@ static HRESULT WINAPI transform_GetOutputStreamInfo(IMFTransform *iface, DWORD i
UINT32 channel_count, block_alignment;
HRESULT hr;
- TRACE("iface %p, id %u, info %p.\n", iface, id, info);
+ TRACE("iface %p, id %lu, info %p.\n", iface, id, info);
if (!decoder->input_type || !decoder->output_type)
return MF_E_TRANSFORM_TYPE_NOT_SET;
@@ -220,32 +220,32 @@ static HRESULT WINAPI transform_GetAttributes(IMFTransform *iface, IMFAttributes
static HRESULT WINAPI transform_GetInputStreamAttributes(IMFTransform *iface, DWORD id, IMFAttributes **attributes)
{
- FIXME("iface %p, id %u, attributes %p stub!\n", iface, id, attributes);
+ FIXME("iface %p, id %lu, attributes %p stub!\n", iface, id, attributes);
return E_NOTIMPL;
}
static HRESULT WINAPI transform_GetOutputStreamAttributes(IMFTransform *iface, DWORD id, IMFAttributes **attributes)
{
- FIXME("iface %p, id %u, attributes %p stub!\n", iface, id, attributes);
+ FIXME("iface %p, id %lu, attributes %p stub!\n", iface, id, attributes);
return E_NOTIMPL;
}
static HRESULT WINAPI transform_DeleteInputStream(IMFTransform *iface, DWORD id)
{
- FIXME("iface %p, id %u stub!\n", iface, id);
+ FIXME("iface %p, id %lu stub!\n", iface, id);
return E_NOTIMPL;
}
static HRESULT WINAPI transform_AddInputStreams(IMFTransform *iface, DWORD streams, DWORD *ids)
{
- FIXME("iface %p, streams %u, ids %p stub!\n", iface, streams, ids);
+ FIXME("iface %p, streams %lu, ids %p stub!\n", iface, streams, ids);
return E_NOTIMPL;
}
static HRESULT WINAPI transform_GetInputAvailableType(IMFTransform *iface, DWORD id, DWORD index,
IMFMediaType **type)
{
- FIXME("iface %p, id %u, index %u, type %p stub!\n", iface, id, index, type);
+ FIXME("iface %p, id %lu, index %lu, type %p stub!\n", iface, id, index, type);
return E_NOTIMPL;
}
@@ -258,7 +258,7 @@ static HRESULT WINAPI transform_GetOutputAvailableType(IMFTransform *iface, DWOR
const GUID *output_type;
HRESULT hr;
- TRACE("iface %p, id %u, index %u, type %p.\n", iface, id, index, type);
+ TRACE("iface %p, id %lu, index %lu, type %p.\n", iface, id, index, type);
if (!decoder->input_type)
return MF_E_TRANSFORM_TYPE_NOT_SET;
@@ -330,7 +330,7 @@ static HRESULT WINAPI transform_SetInputType(IMFTransform *iface, DWORD id, IMFM
HRESULT hr;
ULONG i;
- TRACE("iface %p, id %u, type %p, flags %#x.\n", iface, id, type, flags);
+ TRACE("iface %p, id %lu, type %p, flags %#lx.\n", iface, id, type, flags);
if (FAILED(hr = IMFMediaType_GetGUID(type, &MF_MT_MAJOR_TYPE, &major)) ||
FAILED(hr = IMFMediaType_GetGUID(type, &MF_MT_SUBTYPE, &subtype)))
@@ -384,7 +384,7 @@ static HRESULT WINAPI transform_SetOutputType(IMFTransform *iface, DWORD id, IMF
GUID major, subtype;
HRESULT hr;
- TRACE("iface %p, id %u, type %p, flags %#x.\n", iface, id, type, flags);
+ TRACE("iface %p, id %lu, type %p, flags %#lx.\n", iface, id, type, flags);
if (!decoder->input_type)
return MF_E_TRANSFORM_TYPE_NOT_SET;
@@ -448,19 +448,19 @@ failed:
static HRESULT WINAPI transform_GetInputCurrentType(IMFTransform *iface, DWORD id, IMFMediaType **type)
{
- FIXME("iface %p, id %u, type %p stub!\n", iface, id, type);
+ FIXME("iface %p, id %lu, type %p stub!\n", iface, id, type);
return E_NOTIMPL;
}
static HRESULT WINAPI transform_GetOutputCurrentType(IMFTransform *iface, DWORD id, IMFMediaType **type)
{
- FIXME("iface %p, id %u, type %p stub!\n", iface, id, type);
+ FIXME("iface %p, id %lu, type %p stub!\n", iface, id, type);
return E_NOTIMPL;
}
static HRESULT WINAPI transform_GetInputStatus(IMFTransform *iface, DWORD id, DWORD *flags)
{
- FIXME("iface %p, id %u, flags %p stub!\n", iface, id, flags);
+ FIXME("iface %p, id %lu, flags %p stub!\n", iface, id, flags);
return E_NOTIMPL;
}
@@ -479,7 +479,7 @@ static HRESULT WINAPI transform_SetOutputBounds(IMFTransform *iface, LONGLONG lo
static HRESULT WINAPI transform_ProcessEvent(IMFTransform *iface, DWORD id, IMFMediaEvent *event)
{
- FIXME("iface %p, id %u, event %p stub!\n", iface, id, event);
+ FIXME("iface %p, id %lu, event %p stub!\n", iface, id, event);
return E_NOTIMPL;
}
@@ -491,14 +491,14 @@ static HRESULT WINAPI transform_ProcessMessage(IMFTransform *iface, MFT_MESSAGE_
static HRESULT WINAPI transform_ProcessInput(IMFTransform *iface, DWORD id, IMFSample *sample, DWORD flags)
{
- FIXME("iface %p, id %u, sample %p, flags %#x stub!\n", iface, id, sample, flags);
+ FIXME("iface %p, id %lu, sample %p, flags %#lx stub!\n", iface, id, sample, flags);
return E_NOTIMPL;
}
static HRESULT WINAPI transform_ProcessOutput(IMFTransform *iface, DWORD flags, DWORD count,
MFT_OUTPUT_DATA_BUFFER *samples, DWORD *status)
{
- FIXME("iface %p, flags %#x, count %u, samples %p, status %p stub!\n", iface, flags, count, samples, status);
+ FIXME("iface %p, flags %#lx, count %lu, samples %p, status %p stub!\n", iface, flags, count, samples, status);
return E_NOTIMPL;
}
@@ -564,79 +564,79 @@ static HRESULT WINAPI media_object_GetStreamCount(IMediaObject *iface, DWORD *in
static HRESULT WINAPI media_object_GetInputStreamInfo(IMediaObject *iface, DWORD index, DWORD *flags)
{
- FIXME("iface %p, index %u, flags %p stub!\n", iface, index, flags);
+ FIXME("iface %p, index %lu, flags %p stub!\n", iface, index, flags);
return E_NOTIMPL;
}
static HRESULT WINAPI media_object_GetOutputStreamInfo(IMediaObject *iface, DWORD index, DWORD *flags)
{
- FIXME("iface %p, index %u, flags %p stub!\n", iface, index, flags);
+ FIXME("iface %p, index %lu, flags %p stub!\n", iface, index, flags);
return E_NOTIMPL;
}
static HRESULT WINAPI media_object_GetInputType(IMediaObject *iface, DWORD index, DWORD type_index,
DMO_MEDIA_TYPE *type)
{
- FIXME("iface %p, index %u, type_index %u, type %p stub!\n", iface, index, type_index, type);
+ FIXME("iface %p, index %lu, type_index %lu, type %p stub!\n", iface, index, type_index, type);
return E_NOTIMPL;
}
static HRESULT WINAPI media_object_GetOutputType(IMediaObject *iface, DWORD index, DWORD type_index,
DMO_MEDIA_TYPE *type)
{
- FIXME("iface %p, index %u, type_index %u, type %p stub!\n", iface, index, type_index, type);
+ FIXME("iface %p, index %lu, type_index %lu, type %p stub!\n", iface, index, type_index, type);
return E_NOTIMPL;
}
static HRESULT WINAPI media_object_SetInputType(IMediaObject *iface, DWORD index,
const DMO_MEDIA_TYPE *type, DWORD flags)
{
- FIXME("iface %p, index %u, type %p, flags %#x stub!\n", iface, index, type, flags);
+ FIXME("iface %p, index %lu, type %p, flags %#lx stub!\n", iface, index, type, flags);
return E_NOTIMPL;
}
static HRESULT WINAPI media_object_SetOutputType(IMediaObject *iface, DWORD index,
const DMO_MEDIA_TYPE *type, DWORD flags)
{
- FIXME("iface %p, index %u, type %p, flags %#x stub!\n", iface, index, type, flags);
+ FIXME("iface %p, index %lu, type %p, flags %#lx stub!\n", iface, index, type, flags);
return E_NOTIMPL;
}
static HRESULT WINAPI media_object_GetInputCurrentType(IMediaObject *iface, DWORD index, DMO_MEDIA_TYPE *type)
{
- FIXME("iface %p, index %u, type %p stub!\n", iface, index, type);
+ FIXME("iface %p, index %lu, type %p stub!\n", iface, index, type);
return E_NOTIMPL;
}
static HRESULT WINAPI media_object_GetOutputCurrentType(IMediaObject *iface, DWORD index, DMO_MEDIA_TYPE *type)
{
- FIXME("iface %p, index %u, type %p stub!\n", iface, index, type);
+ FIXME("iface %p, index %lu, type %p stub!\n", iface, index, type);
return E_NOTIMPL;
}
static HRESULT WINAPI media_object_GetInputSizeInfo(IMediaObject *iface, DWORD index, DWORD *size,
DWORD *lookahead, DWORD *alignment)
{
- FIXME("iface %p, index %u, size %p, lookahead %p, alignment %p stub!\n", iface, index, size,
+ FIXME("iface %p, index %lu, size %p, lookahead %p, alignment %p stub!\n", iface, index, size,
lookahead, alignment);
return E_NOTIMPL;
}
static HRESULT WINAPI media_object_GetOutputSizeInfo(IMediaObject *iface, DWORD index, DWORD *size, DWORD *alignment)
{
- FIXME("iface %p, index %u, size %p, alignment %p stub!\n", iface, index, size, alignment);
+ FIXME("iface %p, index %lu, size %p, alignment %p stub!\n", iface, index, size, alignment);
return E_NOTIMPL;
}
static HRESULT WINAPI media_object_GetInputMaxLatency(IMediaObject *iface, DWORD index, REFERENCE_TIME *latency)
{
- FIXME("iface %p, index %u, latency %p stub!\n", iface, index, latency);
+ FIXME("iface %p, index %lu, latency %p stub!\n", iface, index, latency);
return E_NOTIMPL;
}
static HRESULT WINAPI media_object_SetInputMaxLatency(IMediaObject *iface, DWORD index, REFERENCE_TIME latency)
{
- FIXME("iface %p, index %u, latency %s stub!\n", iface, index, wine_dbgstr_longlong(latency));
+ FIXME("iface %p, index %lu, latency %s stub!\n", iface, index, wine_dbgstr_longlong(latency));
return E_NOTIMPL;
}
@@ -648,7 +648,7 @@ static HRESULT WINAPI media_object_Flush(IMediaObject *iface)
static HRESULT WINAPI media_object_Discontinuity(IMediaObject *iface, DWORD index)
{
- FIXME("iface %p, index %u stub!\n", iface, index);
+ FIXME("iface %p, index %lu stub!\n", iface, index);
return E_NOTIMPL;
}
@@ -666,14 +666,14 @@ static HRESULT WINAPI media_object_FreeStreamingResources(IMediaObject *iface)
static HRESULT WINAPI media_object_GetInputStatus(IMediaObject *iface, DWORD index, DWORD *flags)
{
- FIXME("iface %p, index %u, flags %p stub!\n", iface, index, flags);
+ FIXME("iface %p, index %lu, flags %p stub!\n", iface, index, flags);
return E_NOTIMPL;
}
static HRESULT WINAPI media_object_ProcessInput(IMediaObject *iface, DWORD index,
IMediaBuffer *buffer, DWORD flags, REFERENCE_TIME timestamp, REFERENCE_TIME timelength)
{
- FIXME("iface %p, index %u, buffer %p, flags %#x, timestamp %s, timelength %s stub!\n", iface,
+ FIXME("iface %p, index %lu, buffer %p, flags %#lx, timestamp %s, timelength %s stub!\n", iface,
index, buffer, flags, wine_dbgstr_longlong(timestamp), wine_dbgstr_longlong(timelength));
return E_NOTIMPL;
}
@@ -681,13 +681,13 @@ static HRESULT WINAPI media_object_ProcessInput(IMediaObject *iface, DWORD index
static HRESULT WINAPI media_object_ProcessOutput(IMediaObject *iface, DWORD flags, DWORD count,
DMO_OUTPUT_DATA_BUFFER *buffers, DWORD *status)
{
- FIXME("iface %p, flags %#x, count %u, buffers %p, status %p stub!\n", iface, flags, count, buffers, status);
+ FIXME("iface %p, flags %#lx, count %lu, buffers %p, status %p stub!\n", iface, flags, count, buffers, status);
return E_NOTIMPL;
}
static HRESULT WINAPI media_object_Lock(IMediaObject *iface, LONG lock)
{
- FIXME("iface %p, lock %d stub!\n", iface, lock);
+ FIXME("iface %p, lock %ld stub!\n", iface, lock);
return E_NOTIMPL;
}
--
2.34.1
1
1
[PATCH v5] ws2_32: Fix setsockopt(TCP_NODELAY) when optlen is less than 4.
by Bastien Orivel Feb. 3, 2022
by Bastien Orivel Feb. 3, 2022
Feb. 3, 2022
According to MSDN [1], the `TCP_NODELAY` parameter should be of type
`BOOL` which is 4 bytes. Due to a bug [2] in rustc passing a byte
instead of an int, any program written in rust that tries to set that
option on a socket will fail with a "Invalid parameter supplied" error.
Turns out that setsockopt on linux does not want optlen to be less than
4 bytes [3].
Windows' behavior is the following:
- For optlen <= 0, return SOCKET_ERROR and set last error to WSAEFAULT
- For optlen > 0, ignore the optlen value and set the TCP_NODELAY value
to one if the first byte of the given optvalue is not 0.
This will fix any rust program using the hyper library to do HTTP
requests.
[1]: https://docs.microsoft.com/en-us/windows/win32/winsock/ipproto-tcp-socket-o…
[2]: https://github.com/rust-lang/rust/blob/44593aeb1387b1be355aeaf0040d5927bd80…
[3]: https://github.com/torvalds/linux/blob/d58071a8a76d779eedab38033ae4c821c302…
Signed-off-by: Bastien Orivel <eijebong(a)bananium.fr>
---
dlls/ws2_32/socket.c | 10 +++++--
dlls/ws2_32/tests/sock.c | 63 ++++++++++++++++++++++++++++++++++++++++
2 files changed, 71 insertions(+), 2 deletions(-)
diff --git a/dlls/ws2_32/socket.c b/dlls/ws2_32/socket.c
index a75aaee68be..4b3ca3c2507 100644
--- a/dlls/ws2_32/socket.c
+++ b/dlls/ws2_32/socket.c
@@ -2903,8 +2903,14 @@ int WINAPI setsockopt( SOCKET s, int level, int optname, const char *optval, int
switch(optname)
{
case TCP_NODELAY:
- return server_setsockopt( s, IOCTL_AFD_WINE_SET_TCP_NODELAY, optval, optlen );
-
+ {
+ INT nodelay = *optval;
+ if (optlen <= 0) {
+ SetLastError(WSAEFAULT);
+ return SOCKET_ERROR;
+ }
+ return server_setsockopt( s, IOCTL_AFD_WINE_SET_TCP_NODELAY, (char*)&nodelay, sizeof(nodelay) );
+ }
default:
FIXME("Unknown IPPROTO_TCP optname 0x%08x\n", optname);
SetLastError(WSAENOPROTOOPT);
diff --git a/dlls/ws2_32/tests/sock.c b/dlls/ws2_32/tests/sock.c
index b38357954b7..d208c17e43f 100644
--- a/dlls/ws2_32/tests/sock.c
+++ b/dlls/ws2_32/tests/sock.c
@@ -1259,6 +1259,69 @@ static void test_set_getsockopt(void)
ok(err == SOCKET_ERROR && WSAGetLastError() == WSAEFAULT,
"got %d with %d (expected SOCKET_ERROR with WSAEFAULT)\n", err, WSAGetLastError());
+ /* TCP_NODELAY: optlen doesn't matter on windows, it should work with any positive value */
+ size = sizeof(value);
+
+ value = 1;
+ err = setsockopt(s, IPPROTO_TCP, TCP_NODELAY, (char*)&value, 1);
+ ok (!err, "setsockopt TCP_NODELAY failed with optlen == 1\n");
+ value = 0xff;
+ err = getsockopt(s, IPPROTO_TCP, TCP_NODELAY, (char*)&value, &size);
+ ok(!err, "getsockopt TCP_NODELAY failed\n");
+ ok(value == 1, "TCP_NODELAY should be 1\n");
+ value = 0;
+ err = setsockopt(s, IPPROTO_TCP, TCP_NODELAY, (char*)&value, sizeof(value));
+ ok(!err, "Failed to reset TCP_NODELAY to 0\n");
+
+ value = 1;
+ err = setsockopt(s, IPPROTO_TCP, TCP_NODELAY, (char*)&value, 4);
+ ok (!err, "setsockopt TCP_NODELAY failed with optlen == 4\n");
+ value = 0xff;
+ err = getsockopt(s, IPPROTO_TCP, TCP_NODELAY, (char*)&value, &size);
+ ok(!err, "getsockopt TCP_NODELAY failed\n");
+ ok(value == 1, "TCP_NODELAY should be 1\n");
+ value = 0;
+ err = setsockopt(s, IPPROTO_TCP, TCP_NODELAY, (char*)&value, sizeof(value));
+ ok(!err, "Failed to reset TCP_NODELAY to 0\n");
+
+ value = 1;
+ err = setsockopt(s, IPPROTO_TCP, TCP_NODELAY, (char*)&value, 42);
+ ok (!err, "setsockopt TCP_NODELAY failed with optlen == 42\n");
+ value = 0xff;
+ err = getsockopt(s, IPPROTO_TCP, TCP_NODELAY, (char*)&value, &size);
+ ok(!err, "getsockopt TCP_NODELAY failed\n");
+ ok(value == 1, "TCP_NODELAY should be 1\n");
+ value = 0;
+ err = setsockopt(s, IPPROTO_TCP, TCP_NODELAY, (char*)&value, sizeof(value));
+ ok(!err, "Failed to reset TCP_NODELAY to 0\n");
+
+ value = 1;
+ err = setsockopt(s, IPPROTO_TCP, TCP_NODELAY, (char*)&value, 0);
+ ok(err == SOCKET_ERROR && WSAGetLastError() == WSAEFAULT,
+ "got %d with %d (expected SOCKET_ERROR with WSAEFAULT)\n", err, WSAGetLastError());
+ value = 0xff;
+ err = getsockopt(s, IPPROTO_TCP, TCP_NODELAY, (char*)&value, &size);
+ ok(!err, "getsockopt TCP_NODELAY failed\n");
+ ok(!value, "TCP_NODELAY should be 0\n");
+
+ value = 1;
+ err = setsockopt(s, IPPROTO_TCP, TCP_NODELAY, (char*)&value, -1);
+ /* On win 10 pro, this sets the error to WSAENOBUFS instead of WSAEFAULT */
+ ok(err == SOCKET_ERROR && (WSAGetLastError() == WSAEFAULT || WSAGetLastError() == WSAENOBUFS),
+ "got %d with %d (expected SOCKET_ERROR with either WSAEFAULT or WSAENOBUFS)\n", err, WSAGetLastError());
+ value = 0xff;
+ err = getsockopt(s, IPPROTO_TCP, TCP_NODELAY, (char*)&value, &size);
+ ok(!err, "getsockopt TCP_NODELAY failed\n");
+ ok(!value, "TCP_NODELAY should be 0\n");
+
+ value = 0x100;
+ err = setsockopt(s, IPPROTO_TCP, TCP_NODELAY, (char*)&value, 4);
+ ok (!err, "setsockopt TCP_NODELAY failed with optlen == 4 and optvalue = 0x100\n");
+ value = 0xff;
+ err = getsockopt(s, IPPROTO_TCP, TCP_NODELAY, (char*)&value, &size);
+ ok(!err, "getsockopt TCP_NODELAY failed\n");
+ ok(!value, "TCP_NODELAY should be 0\n");
+
/* Test for erroneously passing a value instead of a pointer as optval */
size = sizeof(char);
err = setsockopt(s, SOL_SOCKET, SO_DONTROUTE, (char *)1, size);
--
2.34.1
2
1
Feb. 3, 2022
Signed-off-by: Derek Lesho <dlesho(a)codeweavers.com>
---
dlls/userenv/tests/userenv.c | 17 ++++++++++++++++-
dlls/userenv/userenv_main.c | 3 +++
2 files changed, 19 insertions(+), 1 deletion(-)
diff --git a/dlls/userenv/tests/userenv.c b/dlls/userenv/tests/userenv.c
index a91edeef260..c7a6791e2be 100644
--- a/dlls/userenv/tests/userenv.c
+++ b/dlls/userenv/tests/userenv.c
@@ -78,7 +78,7 @@ static void test_create_env(void)
BOOL r, is_wow64 = FALSE;
HANDLE htok;
WCHAR * env[4];
- char * st, systemroot[100];
+ char * st, systemroot[100], programdata[100];
int i, j;
static const struct profile_item common_vars[] = {
@@ -96,6 +96,7 @@ static void test_create_env(void)
};
static const struct profile_item common_post_nt4_vars[] = {
{ "ALLUSERSPROFILE" },
+ { "ProgramData" },
{ "TEMP" },
{ "TMP" },
{ "CommonProgramFiles" },
@@ -119,6 +120,12 @@ static void test_create_env(void)
r = SetEnvironmentVariableA("SystemRoot", "overwrite");
expect(TRUE, r);
+ r = GetEnvironmentVariableA("ProgramData", programdata, sizeof(programdata));
+ ok(r != 0, "GetEnvironmentVariable failed (%d)\n", GetLastError());
+
+ r = SetEnvironmentVariableA("ProgramData", "overwrite");
+ expect(TRUE, r);
+
if (0)
{
/* Crashes on NT4 */
@@ -151,12 +158,20 @@ static void test_create_env(void)
r = SetEnvironmentVariableA("SystemRoot", systemroot);
expect(TRUE, r);
+ r = SetEnvironmentVariableA("ProgramData", programdata);
+ expect(TRUE, r);
+
for(i=0; i<4; i++)
{
r = get_env(env[i], "SystemRoot", &st);
ok(!strcmp(st, "SystemRoot=overwrite"), "%s\n", st);
expect(TRUE, r);
HeapFree(GetProcessHeap(), 0, st);
+
+ r = get_env(env[i], "ProgramData", &st);
+ ok(strcmp(st, "ProgramData=overwrite"), "%s\n", st);
+ expect(TRUE, r);
+ HeapFree(GetProcessHeap(), 0, st);
}
/* Test for common environment variables (NT4 and higher) */
diff --git a/dlls/userenv/userenv_main.c b/dlls/userenv/userenv_main.c
index 87ace7d5c11..08dede60d35 100644
--- a/dlls/userenv/userenv_main.c
+++ b/dlls/userenv/userenv_main.c
@@ -243,7 +243,10 @@ BOOL WINAPI CreateEnvironmentBlock( LPVOID* lpEnvironment,
}
if (get_reg_value(env, hkey, L"Public", buf, UNICODE_STRING_MAX_CHARS))
+ {
set_env_var(&env, L"ALLUSERSPROFILE", buf);
+ set_env_var(&env, L"ProgramData", buf);
+ }
}
else
{
--
2.34.1
1
0
[PATCH v2] winegcc: --out-implib needs to propagate -m32/-m64 to winebuild
by Kevin Puetz Feb. 3, 2022
by Kevin Puetz Feb. 3, 2022
Feb. 3, 2022
This was already passed through for linking, and for spec.o files,
but was overlooked when implementing -Wl,--out-implib
Signed-off-by: Kevin Puetz <PuetzKevinA(a)JohnDeere.com>
--
This version will also send -m32/-m64 to subcommands that don't care
e.g. winebuild --fixup-constructors peeks at the ELF magic number instead,
and winebuld --builtin just modifies an existing PE header in-place.
But that's harmless; winebuild will always parse and accept -m16/32/64,
and it does interact with --target, so it's reasonable to always pass
them together just to have fewer details to think about.
---
tools/winegcc/winegcc.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/tools/winegcc/winegcc.c b/tools/winegcc/winegcc.c
index 0aafca1271a..44d86fb130a 100644
--- a/tools/winegcc/winegcc.c
+++ b/tools/winegcc/winegcc.c
@@ -897,6 +897,8 @@ static struct strarray get_winebuild_args(struct options *opts)
strarray_add( &spec_args, "--target" );
strarray_add( &spec_args, opts->target_alias );
}
+ if (opts->force_pointer_size)
+ strarray_add(&spec_args, strmake("-m%u", 8 * opts->force_pointer_size ));
for (i = 0; i < opts->prefix.count; i++)
strarray_add( &spec_args, strmake( "-B%s", opts->prefix.str[i] ));
strarray_addall( &spec_args, opts->winebuild_args );
@@ -1025,8 +1027,6 @@ static const char *build_spec_obj( struct options *opts, const char *spec_file,
}
spec_o_name = get_temp_file(output_name, ".spec.o");
- if (opts->force_pointer_size)
- strarray_add(&spec_args, strmake("-m%u", 8 * opts->force_pointer_size ));
if (opts->pic && !is_pe) strarray_add(&spec_args, "-fPIC");
strarray_add(&spec_args, opts->shared ? "--dll" : "--exe");
if (opts->fake_module)
--
2.34.1
1
0
[PATCH v2 1/2] win32u: Don't pass physdev to wine_get_wgl_driver() driver function.
by Paul Gofman Feb. 3, 2022
by Paul Gofman Feb. 3, 2022
Feb. 3, 2022
Signed-off-by: Paul Gofman <pgofman(a)codeweavers.com>
---
Supersedes 223960.
v2:
- added patch.
Specific GL driver initialization does not depend on anything in the device or context besides making
a decision to call or skip the next driver. Copying the driver constant function pointers out allows
to call driver's _wine_get_wgl_driver outside of any DC lock in the next patch.
dlls/win32u/dibdrv/dc.c | 11 ++++++-----
dlls/win32u/driver.c | 24 +++++++++++++++++++++---
dlls/wineandroid.drv/init.c | 11 ++---------
dlls/winemac.drv/opengl.c | 4 +++-
dlls/winex11.drv/init.c | 11 ++---------
include/wine/gdi_driver.h | 2 +-
6 files changed, 35 insertions(+), 28 deletions(-)
diff --git a/dlls/win32u/dibdrv/dc.c b/dlls/win32u/dibdrv/dc.c
index a96b613d0a3..4cc95e6b843 100644
--- a/dlls/win32u/dibdrv/dc.c
+++ b/dlls/win32u/dibdrv/dc.c
@@ -605,8 +605,10 @@ static struct opengl_funcs opengl_funcs =
/**********************************************************************
* dibdrv_wine_get_wgl_driver
*/
-static struct opengl_funcs * CDECL dibdrv_wine_get_wgl_driver( PHYSDEV dev, UINT version )
+static struct opengl_funcs * CDECL dibdrv_wine_get_wgl_driver( UINT version, const struct gdi_dc_funcs ***next_funcs )
{
+ *next_funcs = NULL;
+
if (version != WINE_WGL_DRIVER_VERSION)
{
ERR( "version mismatch, opengl32 wants %u but dibdrv has %u\n", version, WINE_WGL_DRIVER_VERSION );
@@ -1177,11 +1179,10 @@ static INT CDECL windrv_StretchDIBits( PHYSDEV dev, INT x_dst, INT y_dst, INT wi
return ret;
}
-static struct opengl_funcs * CDECL windrv_wine_get_wgl_driver( PHYSDEV dev, UINT version )
+static struct opengl_funcs * CDECL windrv_wine_get_wgl_driver( UINT version, const struct gdi_dc_funcs ***next_funcs )
{
- dev = GET_NEXT_PHYSDEV( dev, wine_get_wgl_driver );
- if (dev->funcs == &dib_driver) dev = GET_NEXT_PHYSDEV( dev, wine_get_wgl_driver );
- return dev->funcs->wine_get_wgl_driver( dev, version );
+ if (*(*next_funcs + 1) == &dib_driver) ++*next_funcs;
+ return NULL;
}
static const struct gdi_dc_funcs window_driver =
diff --git a/dlls/win32u/driver.c b/dlls/win32u/driver.c
index 39996086c6d..f527c6c51cf 100644
--- a/dlls/win32u/driver.c
+++ b/dlls/win32u/driver.c
@@ -579,8 +579,10 @@ static NTSTATUS CDECL nulldrv_D3DKMTSetVidPnSourceOwner( const D3DKMT_SETVIDPNSO
return STATUS_PROCEDURE_NOT_FOUND;
}
-static struct opengl_funcs * CDECL nulldrv_wine_get_wgl_driver( PHYSDEV dev, UINT version )
+static struct opengl_funcs * CDECL nulldrv_wine_get_wgl_driver( UINT version, const struct gdi_dc_funcs ***next_funcs )
{
+ *next_funcs = NULL;
+
return (void *)-1;
}
@@ -1347,13 +1349,29 @@ NTSTATUS WINAPI NtGdiDdDDICheckVidPnExclusiveOwnership( const D3DKMT_CHECKVIDPNE
*/
struct opengl_funcs * CDECL __wine_get_wgl_driver( HDC hdc, UINT version )
{
+ const struct gdi_dc_funcs *driver_funcs[11], **next_funcs;
struct opengl_funcs *ret = NULL;
DC * dc = get_dc_ptr( hdc );
+ PHYSDEV physdev;
if (dc)
{
- PHYSDEV physdev = GET_DC_PHYSDEV( dc, wine_get_wgl_driver );
- ret = physdev->funcs->wine_get_wgl_driver( physdev, version );
+ next_funcs = driver_funcs;
+ physdev = GET_DC_PHYSDEV( dc, wine_get_wgl_driver );
+ while (physdev && next_funcs - driver_funcs < ARRAY_SIZE(driver_funcs) - 1)
+ {
+ *next_funcs++ = physdev->funcs;
+ if (physdev->funcs == &null_driver) break;
+ physdev = GET_NEXT_PHYSDEV( physdev, wine_get_wgl_driver );
+ }
+ *next_funcs = NULL;
+ next_funcs = driver_funcs;
+ while (*next_funcs)
+ {
+ ret = (*next_funcs)->wine_get_wgl_driver( version, &next_funcs );
+ if (ret || !next_funcs) break;
+ ++next_funcs;
+ }
release_dc_ptr( dc );
}
return ret;
diff --git a/dlls/wineandroid.drv/init.c b/dlls/wineandroid.drv/init.c
index ed9116eb47e..3c7da3f780f 100644
--- a/dlls/wineandroid.drv/init.c
+++ b/dlls/wineandroid.drv/init.c
@@ -261,16 +261,9 @@ BOOL CDECL ANDROID_EnumDisplaySettingsEx( LPCWSTR name, DWORD n, LPDEVMODEW devm
/**********************************************************************
* ANDROID_wine_get_wgl_driver
*/
-static struct opengl_funcs * CDECL ANDROID_wine_get_wgl_driver( PHYSDEV dev, UINT version )
+static struct opengl_funcs * CDECL ANDROID_wine_get_wgl_driver( UINT version, const struct gdi_dc_funcs ***next_funcs )
{
- struct opengl_funcs *ret;
-
- if (!(ret = get_wgl_driver( version )))
- {
- dev = GET_NEXT_PHYSDEV( dev, wine_get_wgl_driver );
- ret = dev->funcs->wine_get_wgl_driver( dev, version );
- }
- return ret;
+ return get_wgl_driver( version );
}
diff --git a/dlls/winemac.drv/opengl.c b/dlls/winemac.drv/opengl.c
index daf194c2aec..b5670906e93 100644
--- a/dlls/winemac.drv/opengl.c
+++ b/dlls/winemac.drv/opengl.c
@@ -4632,10 +4632,12 @@ static struct opengl_funcs opengl_funcs =
/**********************************************************************
* macdrv_wine_get_wgl_driver
*/
-struct opengl_funcs * CDECL macdrv_wine_get_wgl_driver(PHYSDEV dev, UINT version)
+struct opengl_funcs * CDECL macdrv_wine_get_wgl_driver(UINT version, const struct gdi_dc_funcs ***next_funcs)
{
static INIT_ONCE opengl_init = INIT_ONCE_STATIC_INIT;
+ *next_funcs = NULL;
+
if (version != WINE_WGL_DRIVER_VERSION)
{
ERR("version mismatch, opengl32 wants %u but macdrv has %u\n", version, WINE_WGL_DRIVER_VERSION);
diff --git a/dlls/winex11.drv/init.c b/dlls/winex11.drv/init.c
index 5b31c352a23..ebd221c2d38 100644
--- a/dlls/winex11.drv/init.c
+++ b/dlls/winex11.drv/init.c
@@ -312,16 +312,9 @@ static INT CDECL X11DRV_ExtEscape( PHYSDEV dev, INT escape, INT in_count, LPCVOI
/**********************************************************************
* X11DRV_wine_get_wgl_driver
*/
-static struct opengl_funcs * CDECL X11DRV_wine_get_wgl_driver( PHYSDEV dev, UINT version )
+static struct opengl_funcs * CDECL X11DRV_wine_get_wgl_driver( UINT version, const struct gdi_dc_funcs ***next_funcs )
{
- struct opengl_funcs *ret;
-
- if (!(ret = get_glx_driver( version )))
- {
- dev = GET_NEXT_PHYSDEV( dev, wine_get_wgl_driver );
- ret = dev->funcs->wine_get_wgl_driver( dev, version );
- }
- return ret;
+ return get_glx_driver( version );
}
/**********************************************************************
diff --git a/include/wine/gdi_driver.h b/include/wine/gdi_driver.h
index 567a6c21608..0e3bbade6c4 100644
--- a/include/wine/gdi_driver.h
+++ b/include/wine/gdi_driver.h
@@ -159,7 +159,7 @@ struct gdi_dc_funcs
BOOL (CDECL *pUnrealizePalette)(HPALETTE);
NTSTATUS (CDECL *pD3DKMTCheckVidPnExclusiveOwnership)(const D3DKMT_CHECKVIDPNEXCLUSIVEOWNERSHIP *);
NTSTATUS (CDECL *pD3DKMTSetVidPnSourceOwner)(const D3DKMT_SETVIDPNSOURCEOWNER *);
- struct opengl_funcs * (CDECL *wine_get_wgl_driver)(PHYSDEV,UINT);
+ struct opengl_funcs * (CDECL *wine_get_wgl_driver)(UINT,const struct gdi_dc_funcs ***);
/* priority order for the driver on the stack */
UINT priority;
--
2.34.1
2
4
Feb. 3, 2022
Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org>
---
dlls/dmusic/tests/Makefile.in | 1 -
dlls/dmusic/tests/dmusic.c | 380 +++++++++++++++++-----------------
2 files changed, 190 insertions(+), 191 deletions(-)
diff --git a/dlls/dmusic/tests/Makefile.in b/dlls/dmusic/tests/Makefile.in
index 091204f16f6..2f8d6a8654c 100644
--- a/dlls/dmusic/tests/Makefile.in
+++ b/dlls/dmusic/tests/Makefile.in
@@ -1,4 +1,3 @@
-EXTRADEFS = -DWINE_NO_LONG_TYPES
TESTDLL = dmusic.dll
IMPORTS = oleaut32 ole32 uuid user32 dsound
diff --git a/dlls/dmusic/tests/dmusic.c b/dlls/dmusic/tests/dmusic.c
index f6b817cca60..d8fc6affd9b 100644
--- a/dlls/dmusic/tests/dmusic.c
+++ b/dlls/dmusic/tests/dmusic.c
@@ -46,7 +46,7 @@ static void test_dmusic(void)
IDirectMusicPort *port = NULL;
hr = CoCreateInstance(&CLSID_DirectMusic, NULL, CLSCTX_INPROC_SERVER, &IID_IDirectMusic, (LPVOID*)&dmusic);
- ok(hr == S_OK, "Cannot create DirectMusic object (%x)\n", hr);
+ ok(hr == S_OK, "Cannot create DirectMusic object: %#lx\n", hr);
port_params.dwSize = sizeof(port_params);
port_params.dwValidParams = DMUS_PORTPARAMS_CHANNELGROUPS | DMUS_PORTPARAMS_AUDIOCHANNELS;
@@ -55,39 +55,39 @@ static void test_dmusic(void)
/* No port can be created before SetDirectSound is called */
hr = IDirectMusic_CreatePort(dmusic, &GUID_NULL, &port_params, &port, NULL);
- ok(hr == DMUS_E_DSOUND_NOT_SET, "IDirectMusic_CreatePort returned: %x\n", hr);
+ ok(hr == DMUS_E_DSOUND_NOT_SET, "IDirectMusic_CreatePort returned: %#lx\n", hr);
hr = IDirectMusic_SetDirectSound(dmusic, NULL, NULL);
- ok(hr == S_OK, "IDirectMusic_SetDirectSound returned: %x\n", hr);
+ ok(hr == S_OK, "IDirectMusic_SetDirectSound returned: %#lx\n", hr);
/* Check wrong params */
hr = IDirectMusic_CreatePort(dmusic, &GUID_NULL, &port_params, &port, (IUnknown*)dmusic);
- ok(hr == CLASS_E_NOAGGREGATION, "IDirectMusic_CreatePort returned: %x\n", hr);
+ ok(hr == CLASS_E_NOAGGREGATION, "IDirectMusic_CreatePort returned: %#lx\n", hr);
hr = IDirectMusic_CreatePort(dmusic, NULL, &port_params, &port, NULL);
- ok(hr == E_POINTER, "IDirectMusic_CreatePort returned: %x\n", hr);
+ ok(hr == E_POINTER, "IDirectMusic_CreatePort returned: %#lx\n", hr);
hr = IDirectMusic_CreatePort(dmusic, &GUID_NULL, NULL, &port, NULL);
- ok(hr == E_INVALIDARG, "IDirectMusic_CreatePort returned: %x\n", hr);
+ ok(hr == E_INVALIDARG, "IDirectMusic_CreatePort returned: %#lx\n", hr);
hr = IDirectMusic_CreatePort(dmusic, &GUID_NULL, &port_params, NULL, NULL);
- ok(hr == E_POINTER, "IDirectMusic_CreatePort returned: %x\n", hr);
+ ok(hr == E_POINTER, "IDirectMusic_CreatePort returned: %#lx\n", hr);
/* Test creation of default port with GUID_NULL */
hr = IDirectMusic_CreatePort(dmusic, &GUID_NULL, &port_params, &port, NULL);
- ok(hr == S_OK, "IDirectMusic_CreatePort returned: %x\n", hr);
+ ok(hr == S_OK, "IDirectMusic_CreatePort returned: %#lx\n", hr);
port_caps.dwSize = sizeof(port_caps);
while (IDirectMusic_EnumPort(dmusic, index, &port_caps) == S_OK)
{
- ok(port_caps.dwSize == sizeof(port_caps), "DMUS_PORTCAPS dwSize member is wrong (%u)\n", port_caps.dwSize);
- trace("Port %u:\n", index);
- trace(" dwFlags = %x\n", port_caps.dwFlags);
+ ok(port_caps.dwSize == sizeof(port_caps), "DMUS_PORTCAPS dwSize member is wrong (%lu)\n", port_caps.dwSize);
+ trace("Port %lu:\n", index);
+ trace(" dwFlags = %lx\n", port_caps.dwFlags);
trace(" guidPort = %s\n", wine_dbgstr_guid(&port_caps.guidPort));
- trace(" dwClass = %u\n", port_caps.dwClass);
- trace(" dwType = %u\n", port_caps.dwType);
- trace(" dwMemorySize = %u\n", port_caps.dwMemorySize);
- trace(" dwMaxChannelGroups = %u\n", port_caps.dwMaxChannelGroups);
- trace(" dwMaxVoices = %u\n", port_caps.dwMaxVoices);
- trace(" dwMaxAudioChannels = %u\n", port_caps.dwMaxAudioChannels);
- trace(" dwEffectFlags = %x\n", port_caps.dwEffectFlags);
+ trace(" dwClass = %lu\n", port_caps.dwClass);
+ trace(" dwType = %lu\n", port_caps.dwType);
+ trace(" dwMemorySize = %lu\n", port_caps.dwMemorySize);
+ trace(" dwMaxChannelGroups = %lu\n", port_caps.dwMaxChannelGroups);
+ trace(" dwMaxVoices = %lu\n", port_caps.dwMaxVoices);
+ trace(" dwMaxAudioChannels = %lu\n", port_caps.dwMaxAudioChannels);
+ trace(" dwEffectFlags = %lx\n", port_caps.dwEffectFlags);
trace(" wszDescription = %s\n", wine_dbgstr_w(port_caps.wszDescription));
index++;
}
@@ -123,14 +123,14 @@ static void test_setdsound(void)
skip("No driver\n");
return;
}
- ok(hr == S_OK, "DirectSoundCreate failed: %08x\n", hr);
+ ok(hr == S_OK, "DirectSoundCreate failed: %#lx\n", hr);
hr = CoCreateInstance(&CLSID_DirectMusic, NULL, CLSCTX_INPROC_SERVER, &IID_IDirectMusic8,
(void **)&dmusic);
- ok(hr == S_OK, "DirectMusic create failed: %08x\n", hr);
+ ok(hr == S_OK, "DirectMusic create failed: %#lx\n", hr);
hr = IDirectMusic_SetDirectSound(dmusic, dsound, NULL);
- ok(hr == S_OK, "SetDirectSound failed: %08x\n", hr);
+ ok(hr == S_OK, "SetDirectSound failed: %#lx\n", hr);
hr = IDirectMusic_CreatePort(dmusic, &GUID_NULL, ¶ms, &port, NULL);
- ok(hr == S_OK, "CreatePort returned: %x\n", hr);
+ ok(hr == S_OK, "CreatePort returned: %#lx\n", hr);
IDirectMusicPort_Release(port);
IDirectMusic_Release(dmusic);
IDirectSound_Release(dsound);
@@ -138,103 +138,103 @@ static void test_setdsound(void)
/* dsound ref counting */
hr = CoCreateInstance(&CLSID_DirectMusic, NULL, CLSCTX_INPROC_SERVER, &IID_IDirectMusic8,
(void **)&dmusic);
- ok(hr == S_OK, "DirectMusic create failed: %08x\n", hr);
+ ok(hr == S_OK, "DirectMusic create failed: %#lx\n", hr);
hr = DirectSoundCreate8(NULL, (IDirectSound8 **)&dsound, NULL);
- ok(hr == S_OK, "DirectSoundCreate failed: %08x\n", hr);
+ ok(hr == S_OK, "DirectSoundCreate failed: %#lx\n", hr);
hr = IDirectSound_SetCooperativeLevel(dsound, GetForegroundWindow(), DSSCL_PRIORITY);
- ok(hr == S_OK, "SetCooperativeLevel failed: %08x\n", hr);
+ ok(hr == S_OK, "SetCooperativeLevel failed: %#lx\n", hr);
hr = IDirectMusic_SetDirectSound(dmusic, dsound, NULL);
- ok(hr == S_OK, "SetDirectSound failed: %08x\n", hr);
+ ok(hr == S_OK, "SetDirectSound failed: %#lx\n", hr);
ref = get_refcount(dsound);
- ok(ref == 2, "dsound ref count got %d expected 2\n", ref);
+ ok(ref == 2, "dsound ref count got %ld expected 2\n", ref);
hr = IDirectMusic_CreatePort(dmusic, &GUID_NULL, ¶ms, &port, NULL);
- ok(hr == S_OK, "CreatePort returned: %x\n", hr);
+ ok(hr == S_OK, "CreatePort returned: %#lx\n", hr);
ref = get_refcount(dsound);
- ok(ref == 2, "dsound ref count got %d expected 2\n", ref);
+ ok(ref == 2, "dsound ref count got %ld expected 2\n", ref);
IDirectMusicPort_AddRef(port);
ref = IDirectMusicPort_Release(port);
- ok(ref == 1, "port ref count got %d expected 1\n", ref);
+ ok(ref == 1, "port ref count got %ld expected 1\n", ref);
hr = IDirectMusicPort_Activate(port, TRUE);
- ok(hr == S_OK, "Port Activate returned: %x\n", hr);
+ ok(hr == S_OK, "Port Activate returned: %#lx\n", hr);
ref = get_refcount(dsound);
- ok(ref == 4, "dsound ref count got %d expected 4\n", ref);
+ ok(ref == 4, "dsound ref count got %ld expected 4\n", ref);
IDirectMusicPort_AddRef(port);
ref = IDirectMusicPort_Release(port);
- ok(ref == 1, "port ref count got %d expected 1\n", ref);
+ ok(ref == 1, "port ref count got %ld expected 1\n", ref);
/* Releasing dsound from dmusic */
hr = IDirectMusic_SetDirectSound(dmusic, NULL, NULL);
- ok(hr == DMUS_E_DSOUND_ALREADY_SET, "SetDirectSound failed: %08x\n", hr);
+ ok(hr == DMUS_E_DSOUND_ALREADY_SET, "SetDirectSound failed: %#lx\n", hr);
hr = IDirectMusicPort_Activate(port, FALSE);
- ok(hr == S_OK, "Port Activate returned: %x\n", hr);
+ ok(hr == S_OK, "Port Activate returned: %#lx\n", hr);
ref = get_refcount(dsound);
- ok(ref == 2, "dsound ref count got %d expected 2\n", ref);
+ ok(ref == 2, "dsound ref count got %ld expected 2\n", ref);
hr = IDirectMusic_SetDirectSound(dmusic, NULL, NULL);
- ok(hr == S_OK, "SetDirectSound failed: %08x\n", hr);
+ ok(hr == S_OK, "SetDirectSound failed: %#lx\n", hr);
ref = get_refcount(dsound);
- ok(ref == 1, "dsound ref count got %d expected 1\n", ref);
+ ok(ref == 1, "dsound ref count got %ld expected 1\n", ref);
/* Setting the same dsound twice */
hr = IDirectMusic_SetDirectSound(dmusic, dsound, NULL);
- ok(hr == S_OK, "SetDirectSound failed: %08x\n", hr);
+ ok(hr == S_OK, "SetDirectSound failed: %#lx\n", hr);
ref = get_refcount(dsound);
- ok(ref == 2, "dsound ref count got %d expected 2\n", ref);
+ ok(ref == 2, "dsound ref count got %ld expected 2\n", ref);
hr = IDirectMusic_SetDirectSound(dmusic, dsound, NULL);
- ok(hr == S_OK, "SetDirectSound failed: %08x\n", hr);
+ ok(hr == S_OK, "SetDirectSound failed: %#lx\n", hr);
ref = get_refcount(dsound);
- ok(ref == 2, "dsound ref count got %d expected 2\n", ref);
+ ok(ref == 2, "dsound ref count got %ld expected 2\n", ref);
/* Replacing one dsound with another */
hr = DirectSoundCreate8(NULL, (IDirectSound8 **)&dsound2, NULL);
- ok(hr == S_OK, "DirectSoundCreate failed: %08x\n", hr);
+ ok(hr == S_OK, "DirectSoundCreate failed: %#lx\n", hr);
hr = IDirectMusic_SetDirectSound(dmusic, dsound2, NULL);
- ok(hr == S_OK, "SetDirectSound failed: %08x\n", hr);
+ ok(hr == S_OK, "SetDirectSound failed: %#lx\n", hr);
ref = get_refcount(dsound);
- ok(ref == 1, "dsound ref count got %d expected 1\n", ref);
+ ok(ref == 1, "dsound ref count got %ld expected 1\n", ref);
ref = get_refcount(dsound2);
- ok(ref == 2, "dsound2 ref count got %d expected 2\n", ref);
+ ok(ref == 2, "dsound2 ref count got %ld expected 2\n", ref);
/* Replacing the dsound in the port */
hr = IDirectMusicPort_SetDirectSound(port, dsound, NULL);
- ok(hr == S_OK, "SetDirectSound failed: %08x\n", hr);
+ ok(hr == S_OK, "SetDirectSound failed: %#lx\n", hr);
ref = get_refcount(dsound);
- ok(ref == 2, "dsound ref count got %d expected 2\n", ref);
+ ok(ref == 2, "dsound ref count got %ld expected 2\n", ref);
ref = get_refcount(dsound2);
- ok(ref == 2, "dsound2 ref count got %d expected 2\n", ref);
+ ok(ref == 2, "dsound2 ref count got %ld expected 2\n", ref);
/* Setting the dsound again on the port will mess with the parent dmusic */
hr = IDirectMusicPort_SetDirectSound(port, dsound, NULL);
- ok(hr == S_OK, "SetDirectSound failed: %08x\n", hr);
+ ok(hr == S_OK, "SetDirectSound failed: %#lx\n", hr);
ref = get_refcount(dsound);
- ok(ref == 3, "dsound ref count got %d expected 3\n", ref);
+ ok(ref == 3, "dsound ref count got %ld expected 3\n", ref);
ref = get_refcount(dsound2);
- ok(ref == 1, "dsound2 ref count got %d expected 1\n", ref);
+ ok(ref == 1, "dsound2 ref count got %ld expected 1\n", ref);
IDirectSound_AddRef(dsound2); /* Crash prevention */
hr = IDirectMusicPort_Activate(port, TRUE);
- ok(hr == S_OK, "Activate returned: %x\n", hr);
+ ok(hr == S_OK, "Activate returned: %#lx\n", hr);
ref = get_refcount(dsound);
- ok(ref == 4, "dsound ref count got %d expected 4\n", ref);
+ ok(ref == 4, "dsound ref count got %ld expected 4\n", ref);
ref = get_refcount(dsound2);
- ok(ref == 2, "dsound2 ref count got %d expected 2\n", ref);
+ ok(ref == 2, "dsound2 ref count got %ld expected 2\n", ref);
hr = IDirectMusicPort_Activate(port, TRUE);
- ok(hr == S_FALSE, "Activate returned: %x\n", hr);
+ ok(hr == S_FALSE, "Activate returned: %#lx\n", hr);
ref = get_refcount(dsound);
- ok(ref == 4, "dsound ref count got %d expected 4\n", ref);
+ ok(ref == 4, "dsound ref count got %ld expected 4\n", ref);
ref = get_refcount(dsound2);
- ok(ref == 2, "dsound2 ref count got %d expected 2\n", ref);
+ ok(ref == 2, "dsound2 ref count got %ld expected 2\n", ref);
/* Deactivating the port messes with the dsound refcount in the parent dmusic */
hr = IDirectMusicPort_Activate(port, FALSE);
- ok(hr == S_OK, "Port Activate returned: %x\n", hr);
+ ok(hr == S_OK, "Port Activate returned: %#lx\n", hr);
ref = get_refcount(dsound);
- ok(ref == 3, "dsound ref count got %d expected 3\n", ref);
+ ok(ref == 3, "dsound ref count got %ld expected 3\n", ref);
ref = get_refcount(dsound2);
- ok(ref == 1, "dsound2 ref count got %d expected 1\n", ref);
+ ok(ref == 1, "dsound2 ref count got %ld expected 1\n", ref);
hr = IDirectMusicPort_Activate(port, FALSE);
- ok(hr == S_FALSE, "Port Activate returned: %x\n", hr);
+ ok(hr == S_FALSE, "Port Activate returned: %#lx\n", hr);
ref = get_refcount(dsound);
- ok(ref == 3, "dsound ref count got %d expected 3\n", ref);
+ ok(ref == 3, "dsound ref count got %ld expected 3\n", ref);
ref = get_refcount(dsound2);
- ok(ref == 1, "dsound2 ref count got %d expected 1\n", ref);
+ ok(ref == 1, "dsound2 ref count got %ld expected 1\n", ref);
IDirectMusicPort_Release(port);
IDirectMusic_Release(dmusic);
@@ -254,7 +254,7 @@ static void test_dmbuffer(void)
LPBYTE data;
hr = CoCreateInstance(&CLSID_DirectMusic, NULL, CLSCTX_INPROC_SERVER, &IID_IDirectMusic, (LPVOID*)&dmusic);
- ok(hr == S_OK, "Cannot create DirectMusic object (%x)\n", hr);
+ ok(hr == S_OK, "Cannot create DirectMusic object: %#lx\n", hr);
desc.dwSize = sizeof(DMUS_BUFFERDESC);
desc.dwFlags = 0;
@@ -262,43 +262,43 @@ static void test_dmbuffer(void)
memcpy(&desc.guidBufferFormat, &GUID_NULL, sizeof(GUID));
hr = IDirectMusic_CreateMusicBuffer(dmusic, &desc, &dmbuffer, NULL);
- ok(hr == S_OK, "IDirectMusic_CreateMusicBuffer return %x\n", hr);
+ ok(hr == S_OK, "IDirectMusic_CreateMusicBuffer returned %#lx\n", hr);
hr = IDirectMusicBuffer_GetBufferFormat(dmbuffer, &format);
- ok(hr == S_OK, "IDirectMusicBuffer_GetBufferFormat returned %x\n", hr);
+ ok(hr == S_OK, "IDirectMusicBuffer_GetBufferFormat returned %#lx\n", hr);
ok(IsEqualGUID(&format, &KSDATAFORMAT_SUBTYPE_MIDI), "Wrong format returned %s\n", wine_dbgstr_guid(&format));
hr = IDirectMusicBuffer_GetMaxBytes(dmbuffer, &size);
- ok(hr == S_OK, "IDirectMusicBuffer_GetMaxBytes returned %x\n", hr);
- ok(size == 1024, "Buffer size is %u instead of 1024\n", size);
+ ok(hr == S_OK, "IDirectMusicBuffer_GetMaxBytes returned %#lx\n", hr);
+ ok(size == 1024, "Buffer size is %lu instead of 1024\n", size);
hr = IDirectMusicBuffer_GetStartTime(dmbuffer, &time);
- ok(hr == DMUS_E_BUFFER_EMPTY, "IDirectMusicBuffer_GetStartTime returned %x\n", hr);
+ ok(hr == DMUS_E_BUFFER_EMPTY, "IDirectMusicBuffer_GetStartTime returned %#lx\n", hr);
hr = IDirectMusicBuffer_SetStartTime(dmbuffer, 10);
- ok(hr == S_OK, "IDirectMusicBuffer_GetStartTime returned %x\n", hr);
+ ok(hr == S_OK, "IDirectMusicBuffer_GetStartTime returned %#lx\n", hr);
hr = IDirectMusicBuffer_GetStartTime(dmbuffer, &time);
- ok(hr == DMUS_E_BUFFER_EMPTY, "IDirectMusicBuffer_GetStartTime returned %x\n", hr);
+ ok(hr == DMUS_E_BUFFER_EMPTY, "IDirectMusicBuffer_GetStartTime returned %#lx\n", hr);
hr = IDirectMusicBuffer_PackStructured(dmbuffer, 20, 0, 0);
- ok(hr == DMUS_E_INVALID_EVENT, "IDirectMusicBuffer_PackStructured returned %x\n", hr);
+ ok(hr == DMUS_E_INVALID_EVENT, "IDirectMusicBuffer_PackStructured returned %#lx\n", hr);
hr = IDirectMusicBuffer_PackStructured(dmbuffer, 20, 0, 0x000090); /* note on : chan 0, note 0 & vel 0 */
- ok(hr == S_OK, "IDirectMusicBuffer_PackStructured returned %x\n", hr);
+ ok(hr == S_OK, "IDirectMusicBuffer_PackStructured returned %#lx\n", hr);
hr = IDirectMusicBuffer_PackStructured(dmbuffer, 30, 0, 0x000080); /* note off : chan 0, note 0 & vel 0 */
- ok(hr == S_OK, "IDirectMusicBuffer_PackStructured returned %x\n", hr);
+ ok(hr == S_OK, "IDirectMusicBuffer_PackStructured returned %#lx\n", hr);
hr = IDirectMusicBuffer_GetUsedBytes(dmbuffer, &bytes);
- ok(hr == S_OK, "IDirectMusicBuffer_GetUsedBytes returned %x\n", hr);
- ok(bytes == 48, "Buffer size is %u instead of 48\n", bytes);
+ ok(hr == S_OK, "IDirectMusicBuffer_GetUsedBytes returned %#lx\n", hr);
+ ok(bytes == 48, "Buffer size is %lu instead of 48\n", bytes);
hr = IDirectMusicBuffer_GetStartTime(dmbuffer, &time);
- ok(hr == S_OK, "IDirectMusicBuffer_GetStartTime returned %x\n", hr);
+ ok(hr == S_OK, "IDirectMusicBuffer_GetStartTime returned %#lx\n", hr);
ok(time == 20, "Buffer start time is wrong\n");
hr = IDirectMusicBuffer_SetStartTime(dmbuffer, 40);
- ok(hr == S_OK, "IDirectMusicBuffer_GetStartTime returned %x\n", hr);
+ ok(hr == S_OK, "IDirectMusicBuffer_GetStartTime returned %#lx\n", hr);
hr = IDirectMusicBuffer_GetStartTime(dmbuffer, &time);
- ok(hr == S_OK, "IDirectMusicBuffer_GetStartTime returned %x\n", hr);
+ ok(hr == S_OK, "IDirectMusicBuffer_GetStartTime returned %#lx\n", hr);
ok(time == 40, "Buffer start time is wrong\n");
hr = IDirectMusicBuffer_GetRawBufferPtr(dmbuffer, &data);
- ok(hr == S_OK, "IDirectMusicBuffer_GetRawBufferPtr returned %x\n", hr);
+ ok(hr == S_OK, "IDirectMusicBuffer_GetRawBufferPtr returned %#lx\n", hr);
if (hr == S_OK)
{
DMUS_EVENTHEADER* header;
@@ -307,23 +307,23 @@ static void test_dmbuffer(void)
/* Check message 1 */
header = (DMUS_EVENTHEADER*)data;
data += sizeof(DMUS_EVENTHEADER);
- ok(header->cbEvent == 3, "cbEvent is %u instead of 3\n", header->cbEvent);
- ok(header->dwChannelGroup == 0, "dwChannelGroup is %u instead of 0\n", header->dwChannelGroup);
+ ok(header->cbEvent == 3, "cbEvent is %lu instead of 3\n", header->cbEvent);
+ ok(header->dwChannelGroup == 0, "dwChannelGroup is %lu instead of 0\n", header->dwChannelGroup);
ok(header->rtDelta == 0, "rtDelta is %s instead of 0\n", wine_dbgstr_longlong(header->rtDelta));
- ok(header->dwFlags == DMUS_EVENT_STRUCTURED, "dwFlags is %x instead of %x\n", header->dwFlags, DMUS_EVENT_STRUCTURED);
+ ok(header->dwFlags == DMUS_EVENT_STRUCTURED, "dwFlags is %lx instead of %x\n", header->dwFlags, DMUS_EVENT_STRUCTURED);
message = *(DWORD*)data & 0xffffff; /* Only 3 bytes are relevant */
data += sizeof(DWORD);
- ok(message == 0x000090, "Message is %0x instead of 0x000090\n", message);
+ ok(message == 0x000090, "Message is %0lx instead of 0x000090\n", message);
/* Check message 2 */
header = (DMUS_EVENTHEADER*)data;
data += sizeof(DMUS_EVENTHEADER);
- ok(header->cbEvent == 3, "cbEvent is %u instead of 3\n", header->cbEvent);
- ok(header->dwChannelGroup == 0, "dwChannelGroup is %u instead of 0\n", header->dwChannelGroup);
+ ok(header->cbEvent == 3, "cbEvent is %lu instead of 3\n", header->cbEvent);
+ ok(header->dwChannelGroup == 0, "dwChannelGroup is %lu instead of 0\n", header->dwChannelGroup);
ok(header->rtDelta == 10, "rtDelta is %s instead of 0\n", wine_dbgstr_longlong(header->rtDelta));
- ok(header->dwFlags == DMUS_EVENT_STRUCTURED, "dwFlags is %x instead of %x\n", header->dwFlags, DMUS_EVENT_STRUCTURED);
+ ok(header->dwFlags == DMUS_EVENT_STRUCTURED, "dwFlags is %lx instead of %x\n", header->dwFlags, DMUS_EVENT_STRUCTURED);
message = *(DWORD*)data & 0xffffff; /* Only 3 bytes are relevant */
- ok(message == 0x000080, "Message 2 is %0x instead of 0x000080\n", message);
+ ok(message == 0x000080, "Message 2 is %0lx instead of 0x000080\n", message);
}
if (dmbuffer)
@@ -343,13 +343,13 @@ static void test_COM(void)
hr = CoCreateInstance(&CLSID_DirectMusic, (IUnknown *)0xdeadbeef, CLSCTX_INPROC_SERVER, &IID_IUnknown,
(void**)&dm8);
ok(hr == CLASS_E_NOAGGREGATION,
- "DirectMusic8 create failed: %08x, expected CLASS_E_NOAGGREGATION\n", hr);
+ "DirectMusic8 create failed: %#lx, expected CLASS_E_NOAGGREGATION\n", hr);
ok(!dm8, "dm8 = %p\n", dm8);
/* Invalid RIID */
hr = CoCreateInstance(&CLSID_DirectMusic, NULL, CLSCTX_INPROC_SERVER, &IID_IDirectMusicObject,
(void**)&dm8);
- ok(hr == E_NOINTERFACE, "DirectMusic8 create failed: %08x, expected E_NOINTERFACE\n", hr);
+ ok(hr == E_NOINTERFACE, "DirectMusic8 create failed: %#lx, expected E_NOINTERFACE\n", hr);
/* Same refcount for DirectMusic and DirectMusic8 */
hr = CoCreateInstance(&CLSID_DirectMusic, NULL, CLSCTX_INPROC_SERVER, &IID_IDirectMusic8,
@@ -359,23 +359,23 @@ static void test_COM(void)
win_skip("DirectMusic too old (no IDirectMusic8)\n");
return;
}
- ok(hr == S_OK, "DirectMusic8 create failed: %08x, expected S_OK\n", hr);
+ ok(hr == S_OK, "DirectMusic8 create failed: %#lx, expected S_OK\n", hr);
refcount = IDirectMusic8_AddRef(dm8);
- ok(refcount == 2, "refcount == %u, expected 2\n", refcount);
+ ok(refcount == 2, "refcount == %lu, expected 2\n", refcount);
hr = IDirectMusic8_QueryInterface(dm8, &IID_IDirectMusic, (void**)&dm);
- ok(hr == S_OK, "QueryInterface for IID_IDirectMusic failed: %08x\n", hr);
+ ok(hr == S_OK, "QueryInterface for IID_IDirectMusic failed: %#lx\n", hr);
refcount = IDirectMusic_AddRef(dm);
- ok(refcount == 4, "refcount == %u, expected 4\n", refcount);
+ ok(refcount == 4, "refcount == %lu, expected 4\n", refcount);
IDirectMusic_Release(dm);
hr = IDirectMusic8_QueryInterface(dm8, &IID_IUnknown, (void**)&unk);
- ok(hr == S_OK, "QueryInterface for IID_IUnknown failed: %08x\n", hr);
+ ok(hr == S_OK, "QueryInterface for IID_IUnknown failed: %#lx\n", hr);
refcount = IUnknown_AddRef(unk);
- ok(refcount == 5, "refcount == %u, expected 5\n", refcount);
+ ok(refcount == 5, "refcount == %lu, expected 5\n", refcount);
refcount = IUnknown_Release(unk);
- ok(refcount == 4, "refcount == %u, expected 4\n", refcount);
+ ok(refcount == 4, "refcount == %lu, expected 4\n", refcount);
while (IDirectMusic8_Release(dm8));
}
@@ -392,40 +392,40 @@ static void test_COM_dmcoll(void)
hr = CoCreateInstance(&CLSID_DirectMusicCollection, (IUnknown *)0xdeadbeef, CLSCTX_INPROC_SERVER,
&IID_IUnknown, (void**)&dmc);
ok(hr == CLASS_E_NOAGGREGATION,
- "DirectMusicCollection create failed: %08x, expected CLASS_E_NOAGGREGATION\n", hr);
+ "DirectMusicCollection create failed: %#lx, expected CLASS_E_NOAGGREGATION\n", hr);
ok(!dmc, "dmc = %p\n", dmc);
/* Invalid RIID */
hr = CoCreateInstance(&CLSID_DirectMusicCollection, NULL, CLSCTX_INPROC_SERVER,
&IID_IClassFactory, (void**)&dmc);
- ok(hr == E_NOINTERFACE, "DirectMusicCollection create failed: %08x, expected E_NOINTERFACE\n", hr);
+ ok(hr == E_NOINTERFACE, "DirectMusicCollection create failed: %#lx, expected E_NOINTERFACE\n", hr);
/* Same refcount for all DirectMusicCollection interfaces */
hr = CoCreateInstance(&CLSID_DirectMusicCollection, NULL, CLSCTX_INPROC_SERVER,
&IID_IDirectMusicCollection, (void**)&dmc);
- ok(hr == S_OK, "DirectMusicCollection create failed: %08x, expected S_OK\n", hr);
+ ok(hr == S_OK, "DirectMusicCollection create failed: %#lx, expected S_OK\n", hr);
refcount = IDirectMusicCollection_AddRef(dmc);
- ok(refcount == 2, "refcount == %u, expected 2\n", refcount);
+ ok(refcount == 2, "refcount == %lu, expected 2\n", refcount);
hr = IDirectMusicCollection_QueryInterface(dmc, &IID_IDirectMusicObject, (void**)&dmo);
- ok(hr == S_OK, "QueryInterface for IID_IDirectMusicObject failed: %08x\n", hr);
+ ok(hr == S_OK, "QueryInterface for IID_IDirectMusicObject failed: %#lx\n", hr);
refcount = IDirectMusicObject_AddRef(dmo);
- ok(refcount == 4, "refcount == %u, expected 4\n", refcount);
+ ok(refcount == 4, "refcount == %lu, expected 4\n", refcount);
refcount = IDirectMusicObject_Release(dmo);
hr = IDirectMusicCollection_QueryInterface(dmc, &IID_IPersistStream, (void**)&ps);
- ok(hr == S_OK, "QueryInterface for IID_IPersistStream failed: %08x\n", hr);
+ ok(hr == S_OK, "QueryInterface for IID_IPersistStream failed: %#lx\n", hr);
refcount = IPersistStream_AddRef(ps);
- ok(refcount == 5, "refcount == %u, expected 5\n", refcount);
+ ok(refcount == 5, "refcount == %lu, expected 5\n", refcount);
refcount = IPersistStream_Release(ps);
hr = IDirectMusicCollection_QueryInterface(dmc, &IID_IUnknown, (void**)&unk);
- ok(hr == S_OK, "QueryInterface for IID_IUnknown failed: %08x\n", hr);
+ ok(hr == S_OK, "QueryInterface for IID_IUnknown failed: %#lx\n", hr);
refcount = IUnknown_AddRef(unk);
- ok(refcount == 6, "refcount == %u, expected 6\n", refcount);
+ ok(refcount == 6, "refcount == %lu, expected 6\n", refcount);
refcount = IUnknown_Release(unk);
- ok(refcount == 5, "refcount == %u, expected 5\n", refcount);
+ ok(refcount == 5, "refcount == %lu, expected 5\n", refcount);
while (IDirectMusicCollection_Release(dmc));
}
@@ -441,45 +441,45 @@ static void test_dmcoll(void)
hr = CoCreateInstance(&CLSID_DirectMusicCollection, NULL, CLSCTX_INPROC_SERVER,
&IID_IDirectMusicCollection, (void**)&dmc);
- ok(hr == S_OK, "DirectMusicCollection create failed: %08x, expected S_OK\n", hr);
+ ok(hr == S_OK, "DirectMusicCollection create failed: %#lx, expected S_OK\n", hr);
/* IDirectMusicObject */
hr = IDirectMusicCollection_QueryInterface(dmc, &IID_IDirectMusicObject, (void**)&dmo);
- ok(hr == S_OK, "QueryInterface for IID_IDirectMusicObject failed: %08x\n", hr);
+ ok(hr == S_OK, "QueryInterface for IID_IDirectMusicObject failed: %#lx\n", hr);
hr = IDirectMusicObject_GetDescriptor(dmo, NULL);
- ok(hr == E_POINTER, "IDirectMusicObject_GetDescriptor: expected E_POINTER, got %08x\n", hr);
+ ok(hr == E_POINTER, "IDirectMusicObject_GetDescriptor: expected E_POINTER, got %#lx\n", hr);
hr = IDirectMusicObject_SetDescriptor(dmo, NULL);
- ok(hr == E_POINTER, "IDirectMusicObject_SetDescriptor: expected E_POINTER, got %08x\n", hr);
+ ok(hr == E_POINTER, "IDirectMusicObject_SetDescriptor: expected E_POINTER, got %#lx\n", hr);
ZeroMemory(&desc, sizeof(desc));
hr = IDirectMusicObject_GetDescriptor(dmo, &desc);
- ok(hr == S_OK, "IDirectMusicObject_GetDescriptor failed: %08x\n", hr);
+ ok(hr == S_OK, "IDirectMusicObject_GetDescriptor failed: %#lx\n", hr);
ok(desc.dwValidData == DMUS_OBJ_CLASS,
- "Fresh object has more valid data (%08x) than DMUS_OBJ_CLASS\n", desc.dwValidData);
+ "Fresh object has more valid data (%#lx) than DMUS_OBJ_CLASS\n", desc.dwValidData);
/* DMUS_OBJ_CLASS is immutable */
desc.dwValidData = DMUS_OBJ_CLASS;
hr = IDirectMusicObject_SetDescriptor(dmo, &desc);
- ok(hr == S_FALSE , "IDirectMusicObject_SetDescriptor failed: %08x\n", hr);
- ok(!desc.dwValidData, "dwValidData wasn't cleared: %08x\n", desc.dwValidData);
+ ok(hr == S_FALSE , "IDirectMusicObject_SetDescriptor failed: %#lx\n", hr);
+ ok(!desc.dwValidData, "dwValidData wasn't cleared: %#lx\n", desc.dwValidData);
desc.dwValidData = DMUS_OBJ_CLASS;
desc.guidClass = CLSID_DirectMusicSegment;
hr = IDirectMusicObject_SetDescriptor(dmo, &desc);
- ok(hr == S_FALSE && !desc.dwValidData, "IDirectMusicObject_SetDescriptor failed: %08x\n", hr);
+ ok(hr == S_FALSE && !desc.dwValidData, "IDirectMusicObject_SetDescriptor failed: %#lx\n", hr);
hr = IDirectMusicObject_GetDescriptor(dmo, &desc);
- ok(hr == S_OK, "IDirectMusicObject_GetDescriptor failed: %08x\n", hr);
+ ok(hr == S_OK, "IDirectMusicObject_GetDescriptor failed: %#lx\n", hr);
ok(IsEqualGUID(&desc.guidClass, &CLSID_DirectMusicCollection),
"guidClass changed, should be CLSID_DirectMusicCollection\n");
/* Unimplemented IPersistStream methods*/
hr = IDirectMusicCollection_QueryInterface(dmc, &IID_IPersistStream, (void**)&ps);
- ok(hr == S_OK, "QueryInterface for IID_IPersistStream failed: %08x\n", hr);
+ ok(hr == S_OK, "QueryInterface for IID_IPersistStream failed: %#lx\n", hr);
hr = IPersistStream_GetClassID(ps, &class);
- ok(hr == E_NOTIMPL, "IPersistStream_GetClassID failed: %08x\n", hr);
+ ok(hr == E_NOTIMPL, "IPersistStream_GetClassID failed: %#lx\n", hr);
hr = IPersistStream_IsDirty(ps);
- ok(hr == S_FALSE, "IPersistStream_IsDirty failed: %08x\n", hr);
+ ok(hr == S_FALSE, "IPersistStream_IsDirty failed: %#lx\n", hr);
hr = IPersistStream_GetSizeMax(ps, &size);
- ok(hr == E_NOTIMPL, "IPersistStream_GetSizeMax failed: %08x\n", hr);
+ ok(hr == E_NOTIMPL, "IPersistStream_GetSizeMax failed: %#lx\n", hr);
hr = IPersistStream_Save(ps, NULL, TRUE);
- ok(hr == E_NOTIMPL, "IPersistStream_Save failed: %08x\n", hr);
+ ok(hr == E_NOTIMPL, "IPersistStream_Save failed: %#lx\n", hr);
while (IDirectMusicCollection_Release(dmc));
}
@@ -505,16 +505,16 @@ static IDirectMusicPort *create_synth_port(IDirectMusic **dmusic)
HRESULT hr;
hr = CoCreateInstance(&CLSID_DirectMusic, NULL, CLSCTX_INPROC_SERVER, &IID_IDirectMusic, (void **)dmusic);
- ok(hr == S_OK, "Cannot create DirectMusic object: %#x\n", hr);
+ ok(hr == S_OK, "Cannot create DirectMusic object: %#lx\n", hr);
params.dwSize = sizeof(params);
params.dwValidParams = DMUS_PORTPARAMS_CHANNELGROUPS | DMUS_PORTPARAMS_AUDIOCHANNELS;
params.dwChannelGroups = 1;
params.dwAudioChannels = 2;
hr = IDirectMusic_SetDirectSound(*dmusic, NULL, NULL);
- ok(hr == S_OK, "IDirectMusic_SetDirectSound failed: %#x\n", hr);
+ ok(hr == S_OK, "IDirectMusic_SetDirectSound failed: %#lx\n", hr);
hr = IDirectMusic_CreatePort(*dmusic, &GUID_NULL, ¶ms, &port, NULL);
- ok(hr == S_OK, "IDirectMusic_CreatePort failed: %#x\n", hr);
+ ok(hr == S_OK, "IDirectMusic_CreatePort failed: %#lx\n", hr);
return port;
}
@@ -535,35 +535,35 @@ static void test_COM_synthport(void)
/* Same refcount for all DirectMusicPort interfaces */
refcount = IDirectMusicPort_AddRef(port);
- ok(refcount == 2, "refcount == %u, expected 2\n", refcount);
+ ok(refcount == 2, "refcount == %lu, expected 2\n", refcount);
hr = IDirectMusicPort_QueryInterface(port, &IID_IDirectMusicPortDownload, (void**)&dmpd);
- ok(hr == S_OK, "QueryInterface for IID_IDirectMusicPortDownload failed: %08x\n", hr);
+ ok(hr == S_OK, "QueryInterface for IID_IDirectMusicPortDownload failed: %#lx\n", hr);
refcount = IDirectMusicPortDownload_AddRef(dmpd);
- ok(refcount == 4, "refcount == %u, expected 4\n", refcount);
+ ok(refcount == 4, "refcount == %lu, expected 4\n", refcount);
IDirectMusicPortDownload_Release(dmpd);
hr = IDirectMusicPort_QueryInterface(port, &IID_IKsControl, (void**)&iksc);
- ok(hr == S_OK, "QueryInterface for IID_IKsControl failed: %08x\n", hr);
+ ok(hr == S_OK, "QueryInterface for IID_IKsControl failed: %#lx\n", hr);
refcount = IKsControl_AddRef(iksc);
- ok(refcount == 5, "refcount == %u, expected 5\n", refcount);
+ ok(refcount == 5, "refcount == %lu, expected 5\n", refcount);
IKsControl_Release(iksc);
hr = IDirectMusicPort_QueryInterface(port, &IID_IUnknown, (void**)&unk);
- ok(hr == S_OK, "QueryInterface for IID_IUnknown failed: %08x\n", hr);
+ ok(hr == S_OK, "QueryInterface for IID_IUnknown failed: %#lx\n", hr);
refcount = IUnknown_AddRef(unk);
- ok(refcount == 6, "refcount == %u, expected 6\n", refcount);
+ ok(refcount == 6, "refcount == %lu, expected 6\n", refcount);
IUnknown_Release(unk);
/* Unsupported interface */
hr = IDirectMusicPort_QueryInterface(port, &IID_IDirectMusicThru, (void**)&dmt);
- todo_wine ok(hr == E_NOINTERFACE, "QueryInterface for IID_IDirectMusicThru failed: %08x\n", hr);
+ todo_wine ok(hr == E_NOINTERFACE, "QueryInterface for IID_IDirectMusicThru failed: %#lx\n", hr);
hr = IDirectMusicPort_QueryInterface(port, &IID_IReferenceClock, (void**)&clock);
- ok(hr == E_NOINTERFACE, "QueryInterface for IID_IReferenceClock failed: %08x\n", hr);
+ ok(hr == E_NOINTERFACE, "QueryInterface for IID_IReferenceClock failed: %#lx\n", hr);
while (IDirectMusicPort_Release(port));
refcount = IDirectMusic_Release(dmusic);
- ok(!refcount, "Got outstanding refcount %d.\n", refcount);
+ ok(!refcount, "Got outstanding refcount %ld.\n", refcount);
}
struct chunk {
@@ -679,12 +679,12 @@ static void test_parsedescriptor(void)
hr = CoCreateInstance(&CLSID_DirectMusicCollection, NULL, CLSCTX_INPROC_SERVER,
&IID_IDirectMusicObject, (void **)&dmo);
- ok(hr == S_OK, "DirectMusicCollection create failed: %08x, expected S_OK\n", hr);
+ ok(hr == S_OK, "DirectMusicCollection create failed: %#lx, expected S_OK\n", hr);
/* Nothing loaded */
hr = IDirectMusicObject_GetDescriptor(dmo, &desc);
- ok(hr == S_OK, "GetDescriptor failed: %08x, expected S_OK\n", hr);
- ok(desc.dwValidData == DMUS_OBJ_CLASS, "Got valid data %#x, expected DMUS_OBJ_OBJECT\n",
+ ok(hr == S_OK, "GetDescriptor failed: %#lx, expected S_OK\n", hr);
+ ok(desc.dwValidData == DMUS_OBJ_CLASS, "Got valid data %#lx, expected DMUS_OBJ_OBJECT\n",
desc.dwValidData);
ok(IsEqualGUID(&desc.guidClass, &CLSID_DirectMusicCollection),
"Got class guid %s, expected CLSID_DirectMusicCollection\n",
@@ -694,8 +694,8 @@ static void test_parsedescriptor(void)
stream = gen_riff_stream(empty);
memset(&desc, 0, sizeof(desc));
hr = IDirectMusicObject_ParseDescriptor(dmo, stream, &desc);
- ok(hr == S_OK, "ParseDescriptor failed: %08x, expected S_OK\n", hr);
- ok(desc.dwValidData == DMUS_OBJ_CLASS, "Got valid data %#x, expected DMUS_OBJ_CLASS\n",
+ ok(hr == S_OK, "ParseDescriptor failed: %#lx, expected S_OK\n", hr);
+ ok(desc.dwValidData == DMUS_OBJ_CLASS, "Got valid data %#lx, expected DMUS_OBJ_CLASS\n",
desc.dwValidData);
ok(IsEqualGUID(&desc.guidClass, &CLSID_DirectMusicCollection),
"Got class guid %s, expected CLSID_DirectMusicCollection\n",
@@ -705,31 +705,31 @@ static void test_parsedescriptor(void)
/* NULL pointers */
memset(&desc, 0, sizeof(desc));
hr = IDirectMusicObject_ParseDescriptor(dmo, NULL, &desc);
- ok(hr == E_POINTER, "ParseDescriptor failed: %08x, expected E_POINTER\n", hr);
+ ok(hr == E_POINTER, "ParseDescriptor failed: %#lx, expected E_POINTER\n", hr);
hr = IDirectMusicObject_ParseDescriptor(dmo, stream, NULL);
- ok(hr == E_POINTER, "ParseDescriptor failed: %08x, expected E_POINTER\n", hr);
+ ok(hr == E_POINTER, "ParseDescriptor failed: %#lx, expected E_POINTER\n", hr);
/* Wrong form */
empty[1] = DMUS_FOURCC_CONTAINER_FORM;
stream = gen_riff_stream(empty);
hr = IDirectMusicObject_ParseDescriptor(dmo, stream, &desc);
- ok(hr == DMUS_E_NOTADLSCOL, "ParseDescriptor failed: %08x, expected DMUS_E_NOTADLSCOL\n", hr);
+ ok(hr == DMUS_E_NOTADLSCOL, "ParseDescriptor failed: %#lx, expected DMUS_E_NOTADLSCOL\n", hr);
IStream_Release(stream);
/* All desc chunks */
stream = gen_riff_stream(alldesc);
memset(&desc, 0, sizeof(desc));
hr = IDirectMusicObject_ParseDescriptor(dmo, stream, &desc);
- ok(hr == S_OK, "ParseDescriptor failed: %08x, expected S_OK\n", hr);
+ ok(hr == S_OK, "ParseDescriptor failed: %#lx, expected S_OK\n", hr);
ok(desc.dwValidData == (DMUS_OBJ_CLASS | DMUS_OBJ_VERSION),
- "Got valid data %#x, expected DMUS_OBJ_CLASS | DMUS_OBJ_VERSION\n", desc.dwValidData);
+ "Got valid data %#lx, expected DMUS_OBJ_CLASS | DMUS_OBJ_VERSION\n", desc.dwValidData);
ok(IsEqualGUID(&desc.guidClass, &CLSID_DirectMusicCollection),
"Got class guid %s, expected CLSID_DirectMusicCollection\n",
wine_dbgstr_guid(&desc.guidClass));
ok(IsEqualGUID(&desc.guidObject, &GUID_NULL), "Got object guid %s, expected GUID_NULL\n",
wine_dbgstr_guid(&desc.guidClass));
ok(desc.vVersion.dwVersionMS == 5 && desc.vVersion.dwVersionLS == 8,
- "Got version %u.%u, expected 5.8\n", desc.vVersion.dwVersionMS,
+ "Got version %lu.%lu, expected 5.8\n", desc.vVersion.dwVersionMS,
desc.vVersion.dwVersionLS);
IStream_Release(stream);
@@ -738,8 +738,8 @@ static void test_parsedescriptor(void)
stream = gen_riff_stream(inam);
memset(&desc, 0, sizeof(desc));
hr = IDirectMusicObject_ParseDescriptor(dmo, stream, &desc);
- ok(hr == S_OK, "ParseDescriptor failed: %08x, expected S_OK\n", hr);
- ok(desc.dwValidData == DMUS_OBJ_CLASS, "Got valid data %#x, expected DMUS_OBJ_CLASS\n",
+ ok(hr == S_OK, "ParseDescriptor failed: %#lx, expected S_OK\n", hr);
+ ok(desc.dwValidData == DMUS_OBJ_CLASS, "Got valid data %#lx, expected DMUS_OBJ_CLASS\n",
desc.dwValidData);
IStream_Release(stream);
@@ -748,9 +748,9 @@ static void test_parsedescriptor(void)
stream = gen_riff_stream(inam);
memset(&desc, 0, sizeof(desc));
hr = IDirectMusicObject_ParseDescriptor(dmo, stream, &desc);
- ok(hr == S_OK, "ParseDescriptor failed: %08x, expected S_OK\n", hr);
+ ok(hr == S_OK, "ParseDescriptor failed: %#lx, expected S_OK\n", hr);
ok(desc.dwValidData == (DMUS_OBJ_CLASS | DMUS_OBJ_NAME),
- "Got valid data %#x, expected DMUS_OBJ_CLASS | DMUS_OBJ_NAME\n", desc.dwValidData);
+ "Got valid data %#lx, expected DMUS_OBJ_CLASS | DMUS_OBJ_NAME\n", desc.dwValidData);
ok(!lstrcmpW(desc.wszName, L"INAM"), "Got name '%s', expected 'INAM'\n",
wine_dbgstr_w(desc.wszName));
IStream_Release(stream);
@@ -759,9 +759,9 @@ static void test_parsedescriptor(void)
stream = gen_riff_stream(dupes);
memset(&desc, 0, sizeof(desc));
hr = IDirectMusicObject_ParseDescriptor(dmo, stream, &desc);
- ok(hr == S_OK, "ParseDescriptor failed: %08x, expected S_OK\n", hr);
+ ok(hr == S_OK, "ParseDescriptor failed: %#lx, expected S_OK\n", hr);
ok(desc.dwValidData == (DMUS_OBJ_CLASS | DMUS_OBJ_NAME | DMUS_OBJ_VERSION),
- "Got valid data %#x, expected DMUS_OBJ_CLASS | DMUS_OBJ_NAME | DMUS_OBJ_VERSION\n",
+ "Got valid data %#lx, expected DMUS_OBJ_CLASS | DMUS_OBJ_NAME | DMUS_OBJ_VERSION\n",
desc.dwValidData);
ok(!lstrcmpW(desc.wszName, L"INAM"), "Got name '%s', expected 'INAM'\n",
wine_dbgstr_w(desc.wszName));
@@ -785,29 +785,29 @@ static void test_master_clock(void)
GUID guid;
hr = CoCreateInstance(&CLSID_DirectMusic, NULL, CLSCTX_INPROC_SERVER, &IID_IDirectMusic, (void **)&dmusic);
- ok(hr == S_OK, "Got hr %#x.\n", hr);
+ ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IDirectMusic_GetMasterClock(dmusic, NULL, NULL);
- ok(hr == S_OK, "Got hr %#x.\n", hr);
+ ok(hr == S_OK, "Got hr %#lx.\n", hr);
memset(&guid, 0xcc, sizeof(guid));
hr = IDirectMusic_GetMasterClock(dmusic, &guid, NULL);
- ok(hr == S_OK, "Got hr %#x.\n", hr);
+ ok(hr == S_OK, "Got hr %#lx.\n", hr);
todo_wine ok(IsEqualGUID(&guid, &guid_system_clock), "Got guid %s.\n", wine_dbgstr_guid(&guid));
clock = (IReferenceClock *)0xdeadbeef;
hr = IDirectMusic_GetMasterClock(dmusic, NULL, &clock);
- ok(hr == S_OK, "Got hr %#x.\n", hr);
+ ok(hr == S_OK, "Got hr %#lx.\n", hr);
ok(clock && clock != (IReferenceClock *)0xdeadbeef, "Got clock %p.\n", clock);
hr = IDirectMusic_GetMasterClock(dmusic, NULL, &clock2);
- ok(hr == S_OK, "Got hr %#x.\n", hr);
+ ok(hr == S_OK, "Got hr %#lx.\n", hr);
ok(clock2 == clock, "Clocks didn't match.\n");
IReferenceClock_Release(clock2);
memset(&guid, 0xcc, sizeof(guid));
hr = IDirectMusic_GetMasterClock(dmusic, &guid, &clock2);
- ok(hr == S_OK, "Got hr %#x.\n", hr);
+ ok(hr == S_OK, "Got hr %#lx.\n", hr);
todo_wine ok(IsEqualGUID(&guid, &guid_system_clock), "Got guid %s.\n", wine_dbgstr_guid(&guid));
ok(clock2 == clock, "Clocks didn't match.\n");
IReferenceClock_Release(clock2);
@@ -815,59 +815,59 @@ static void test_master_clock(void)
QueryPerformanceFrequency(&freq);
QueryPerformanceCounter(&counter);
hr = IReferenceClock_GetTime(clock, &time1);
- ok(hr == S_OK, "Got hr %#x.\n", hr);
+ ok(hr == S_OK, "Got hr %#lx.\n", hr);
time2 = counter.QuadPart * 10000000.0 / freq.QuadPart;
ok(compare_time(time1, time2, 20 * 10000), "Expected about %s, got %s.\n",
wine_dbgstr_longlong(time2), wine_dbgstr_longlong(time1));
hr = IReferenceClock_GetTime(clock, &time2);
- ok(hr == (time2 == time1 ? S_FALSE : S_OK), "Got hr %#x.\n", hr);
+ ok(hr == (time2 == time1 ? S_FALSE : S_OK), "Got hr %#lx.\n", hr);
Sleep(100);
hr = IReferenceClock_GetTime(clock, &time2);
- ok(hr == S_OK, "Got hr %#x.\n", hr);
+ ok(hr == S_OK, "Got hr %#lx.\n", hr);
ok(time2 - time1 > 80 * 10000, "Expected about %s, but got %s.\n",
wine_dbgstr_longlong(time1 + 100 * 10000), wine_dbgstr_longlong(time2));
hr = IReferenceClock_AdviseTime(clock, 0, 0, NULL, &cookie);
- ok(hr == E_NOTIMPL, "Got hr %#x.\n", hr);
+ ok(hr == E_NOTIMPL, "Got hr %#lx.\n", hr);
hr = IReferenceClock_AdvisePeriodic(clock, 0, 0, NULL, &cookie);
- ok(hr == E_NOTIMPL, "Got hr %#x.\n", hr);
+ ok(hr == E_NOTIMPL, "Got hr %#lx.\n", hr);
hr = IReferenceClock_Unadvise(clock, 0);
- ok(hr == E_NOTIMPL, "Got hr %#x.\n", hr);
+ ok(hr == E_NOTIMPL, "Got hr %#lx.\n", hr);
IReferenceClock_Release(clock);
hr = IDirectMusic_EnumMasterClock(dmusic, 0, NULL);
- todo_wine ok(hr == E_INVALIDARG, "Got hr %#x.\n", hr);
+ todo_wine ok(hr == E_INVALIDARG, "Got hr %#lx.\n", hr);
memset(&clock_info, 0xcc, sizeof(DMUS_CLOCKINFO));
clock_info.dwSize = sizeof(DMUS_CLOCKINFO7);
hr = IDirectMusic_EnumMasterClock(dmusic, 0, &clock_info);
- ok(hr == S_OK, "Got hr %#x.\n", hr);
+ ok(hr == S_OK, "Got hr %#lx.\n", hr);
ok(clock_info.ctType == DMUS_CLOCK_SYSTEM, "Got type %#x.\n", clock_info.ctType);
ok(IsEqualGUID(&clock_info.guidClock, &guid_system_clock), "Got guid %s.\n",
wine_dbgstr_guid(&clock_info.guidClock));
- ok(clock_info.dwFlags == 0xcccccccc, "Got flags %#x.\n", clock_info.dwFlags);
+ ok(clock_info.dwFlags == 0xcccccccc, "Got flags %#lx.\n", clock_info.dwFlags);
memset(&clock_info, 0xcc, sizeof(DMUS_CLOCKINFO));
clock_info.dwSize = sizeof(DMUS_CLOCKINFO7);
hr = IDirectMusic_EnumMasterClock(dmusic, 1, &clock_info);
- ok(hr == S_OK, "Got hr %#x.\n", hr);
+ ok(hr == S_OK, "Got hr %#lx.\n", hr);
ok(clock_info.ctType == DMUS_CLOCK_SYSTEM, "Got type %#x.\n", clock_info.ctType);
ok(IsEqualGUID(&clock_info.guidClock, &guid_dsound_clock), "Got guid %s.\n",
wine_dbgstr_guid(&clock_info.guidClock));
- ok(clock_info.dwFlags == 0xcccccccc, "Got flags %#x.\n", clock_info.dwFlags);
+ ok(clock_info.dwFlags == 0xcccccccc, "Got flags %#lx.\n", clock_info.dwFlags);
memset(&clock_info, 0xcc, sizeof(DMUS_CLOCKINFO));
clock_info.dwSize = sizeof(DMUS_CLOCKINFO7);
hr = IDirectMusic_EnumMasterClock(dmusic, 2, &clock_info);
- ok(hr == S_FALSE, "Got hr %#x.\n", hr);
+ ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
ref = IDirectMusic_Release(dmusic);
- ok(!ref, "Got outstanding refcount %d.\n", ref);
+ ok(!ref, "Got outstanding refcount %ld.\n", ref);
}
static void test_synthport(void)
@@ -887,39 +887,39 @@ static void test_synthport(void)
desc.cbBuffer = 1023;
memcpy(&desc.guidBufferFormat, &GUID_NULL, sizeof(GUID));
hr = IDirectMusic_CreateMusicBuffer(dmusic, &desc, &buf, NULL);
- ok(hr == S_OK, "IDirectMusic_CreateMusicBuffer failed: %#x\n", hr);
+ ok(hr == S_OK, "IDirectMusic_CreateMusicBuffer failed: %#lx\n", hr);
/* Unsupported methods */
hr = IDirectMusicPort_Read(port, NULL);
- todo_wine ok(hr == E_POINTER, "Read returned: %#x\n", hr);
+ todo_wine ok(hr == E_POINTER, "Read returned: %#lx\n", hr);
hr = IDirectMusicPort_Read(port, buf);
- ok(hr == E_NOTIMPL, "Read returned: %#x\n", hr);
+ ok(hr == E_NOTIMPL, "Read returned: %#lx\n", hr);
hr = IDirectMusicPort_SetReadNotificationHandle(port, NULL);
- ok(hr == E_NOTIMPL, "SetReadNotificationHandle returned: %#x\n", hr);
+ ok(hr == E_NOTIMPL, "SetReadNotificationHandle returned: %#lx\n", hr);
hr = IDirectMusicPort_Compact(port);
- ok(hr == E_NOTIMPL, "Compact returned: %#x\n", hr);
+ ok(hr == E_NOTIMPL, "Compact returned: %#lx\n", hr);
/* GetCaps */
hr = IDirectMusicPort_GetCaps(port, NULL);
- ok(hr == E_INVALIDARG, "GetCaps failed: %#x\n", hr);
+ ok(hr == E_INVALIDARG, "GetCaps failed: %#lx\n", hr);
memset(&caps, 0, sizeof(caps));
hr = IDirectMusicPort_GetCaps(port, &caps);
- ok(hr == E_INVALIDARG, "GetCaps failed: %#x\n", hr);
+ ok(hr == E_INVALIDARG, "GetCaps failed: %#lx\n", hr);
caps.dwSize = sizeof(caps);
hr = IDirectMusicPort_GetCaps(port, &caps);
- ok(hr == S_OK, "GetCaps failed: %#x\n", hr);
- ok(caps.dwSize == sizeof(caps), "dwSize was modified to %d\n", caps.dwSize);
+ ok(hr == S_OK, "GetCaps failed: %#lx\n", hr);
+ ok(caps.dwSize == sizeof(caps), "dwSize was modified to %ld\n", caps.dwSize);
ok(IsEqualGUID(&caps.guidPort, &CLSID_DirectMusicSynth), "Expected port guid CLSID_DirectMusicSynth, got %s\n",
wine_dbgstr_guid(&caps.guidPort));
- ok(caps.dwClass == DMUS_PC_OUTPUTCLASS, "Got wrong dwClass: %#x\n", caps.dwClass);
- ok(caps.dwType == DMUS_PORT_USER_MODE_SYNTH, "Got wrong dwType: %#x\n", caps.dwType);
+ ok(caps.dwClass == DMUS_PC_OUTPUTCLASS, "Got wrong dwClass: %#lx\n", caps.dwClass);
+ ok(caps.dwType == DMUS_PORT_USER_MODE_SYNTH, "Got wrong dwType: %#lx\n", caps.dwType);
ok(caps.dwFlags == (DMUS_PC_AUDIOPATH|DMUS_PC_DIRECTSOUND|DMUS_PC_DLS|DMUS_PC_DLS2|DMUS_PC_SOFTWARESYNTH|
- DMUS_PC_WAVE), "Unexpected dwFlags returned: %#x\n", caps.dwFlags);
- ok(caps.dwMemorySize == DMUS_PC_SYSTEMMEMORY, "Got dwMemorySize: %#x\n", caps.dwMemorySize);
- ok(caps.dwMaxChannelGroups == 1000, "Got dwMaxChannelGroups: %d\n", caps.dwMaxChannelGroups);
- ok(caps.dwMaxVoices == 1000, "Got dwMaxVoices: %d\n", caps.dwMaxVoices);
- ok(caps.dwMaxAudioChannels == 2, "Got dwMaxAudioChannels: %#x\n", caps.dwMaxAudioChannels);
- ok(caps.dwEffectFlags == DMUS_EFFECT_REVERB, "Unexpected dwEffectFlags returned: %#x\n", caps.dwEffectFlags);
+ DMUS_PC_WAVE), "Unexpected dwFlags returned: %#lx\n", caps.dwFlags);
+ ok(caps.dwMemorySize == DMUS_PC_SYSTEMMEMORY, "Got dwMemorySize: %#lx\n", caps.dwMemorySize);
+ ok(caps.dwMaxChannelGroups == 1000, "Got dwMaxChannelGroups: %ld\n", caps.dwMaxChannelGroups);
+ ok(caps.dwMaxVoices == 1000, "Got dwMaxVoices: %ld\n", caps.dwMaxVoices);
+ ok(caps.dwMaxAudioChannels == 2, "Got dwMaxAudioChannels: %#lx\n", caps.dwMaxAudioChannels);
+ ok(caps.dwEffectFlags == DMUS_EFFECT_REVERB, "Unexpected dwEffectFlags returned: %#lx\n", caps.dwEffectFlags);
trace("Port wszDescription: %s\n", wine_dbgstr_w(caps.wszDescription));
IDirectMusicPort_Release(port);
--
2.34.1
1
0
[PATCH] winegcc: --out-implib needs to propagate -m32/-m64 to winebuild.
by Kevin Puetz Feb. 3, 2022
by Kevin Puetz Feb. 3, 2022
Feb. 3, 2022
This was already passed through for linking, and for spec.o files,
but was overlooked when implementing -Wl,--out-implib
Signed-off-by: Kevin Puetz <PuetzKevinA(a)JohnDeere.com>
---
tools/winegcc/winegcc.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/tools/winegcc/winegcc.c b/tools/winegcc/winegcc.c
index 0aafca1271a..aa8c63f5457 100644
--- a/tools/winegcc/winegcc.c
+++ b/tools/winegcc/winegcc.c
@@ -1408,6 +1408,8 @@ static void build(struct options* opts)
strarray_add( &implib_args, strmake( "--cc-cmd=%s", strarray_tostring( tool, " " )));
tool = build_tool_name( opts, TOOL_LD );
strarray_add( &implib_args, strmake( "--ld-cmd=%s", strarray_tostring( tool, " " )));
+ if (opts->force_pointer_size)
+ strarray_add(&implib_args, strmake("-m%u", 8 * opts->force_pointer_size ));
strarray_add(&implib_args, "--implib");
strarray_add(&implib_args, "-o");
--
2.34.1
2
2
Feb. 3, 2022
From: Eric Pouech <eric.pouech(a)gmail.com>
Signed-off-by: Eric Pouech <eric.pouech(a)gmail.com>
Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com>
---
dlls/d2d1/tests/Makefile.in | 1 -
dlls/d2d1/tests/d2d1.c | 1341 +++++++++++++++++------------------
2 files changed, 666 insertions(+), 676 deletions(-)
diff --git a/dlls/d2d1/tests/Makefile.in b/dlls/d2d1/tests/Makefile.in
index cd8701395b2e..5eeb815e07fb 100644
--- a/dlls/d2d1/tests/Makefile.in
+++ b/dlls/d2d1/tests/Makefile.in
@@ -1,4 +1,3 @@
-EXTRADEFS = -DWINE_NO_LONG_TYPES
TESTDLL = d2d1.dll
IMPORTS = d2d1 d3d10_1 d3d11 dwrite dxguid uuid user32 advapi32 ole32 gdi32
diff --git a/dlls/d2d1/tests/d2d1.c b/dlls/d2d1/tests/d2d1.c
index 003aad605054..2ac48e026c32 100644
--- a/dlls/d2d1/tests/d2d1.c
+++ b/dlls/d2d1/tests/d2d1.c
@@ -343,12 +343,12 @@ static void get_d3d10_surface_readback(IDXGISurface *surface, struct resource_re
HRESULT hr;
hr = IDXGISurface_GetDevice(surface, &IID_ID3D10Device, (void **)&device);
- ok(SUCCEEDED(hr), "Failed to get device, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = IDXGISurface_QueryInterface(surface, &IID_ID3D10Resource, (void **)&src_resource);
- ok(SUCCEEDED(hr), "Failed to query resource interface, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = IDXGISurface_GetDesc(surface, &surface_desc);
- ok(SUCCEEDED(hr), "Failed to get surface desc, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
texture_desc.Width = surface_desc.Width;
texture_desc.Height = surface_desc.Height;
texture_desc.MipLevels = 1;
@@ -360,7 +360,7 @@ static void get_d3d10_surface_readback(IDXGISurface *surface, struct resource_re
texture_desc.CPUAccessFlags = D3D10_CPU_ACCESS_READ;
texture_desc.MiscFlags = 0;
hr = ID3D10Device_CreateTexture2D(device, &texture_desc, NULL, (ID3D10Texture2D **)&rb->u.d3d10_resource);
- ok(SUCCEEDED(hr), "Failed to create texture, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
rb->width = texture_desc.Width;
rb->height = texture_desc.Height;
@@ -370,7 +370,7 @@ static void get_d3d10_surface_readback(IDXGISurface *surface, struct resource_re
ID3D10Device_Release(device);
hr = ID3D10Texture2D_Map((ID3D10Texture2D *)rb->u.d3d10_resource, 0, D3D10_MAP_READ, 0, &map_desc);
- ok(SUCCEEDED(hr), "Failed to map texture, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
rb->pitch = map_desc.RowPitch;
rb->data = map_desc.pData;
@@ -387,12 +387,12 @@ static void get_d3d11_surface_readback(IDXGISurface *surface, struct resource_re
HRESULT hr;
hr = IDXGISurface_GetDevice(surface, &IID_ID3D11Device, (void **)&device);
- ok(SUCCEEDED(hr), "Failed to get device, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = IDXGISurface_QueryInterface(surface, &IID_ID3D11Resource, (void **)&src_resource);
- ok(SUCCEEDED(hr), "Failed to query resource interface, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = IDXGISurface_GetDesc(surface, &surface_desc);
- ok(SUCCEEDED(hr), "Failed to get surface desc, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
texture_desc.Width = surface_desc.Width;
texture_desc.Height = surface_desc.Height;
texture_desc.MipLevels = 1;
@@ -404,7 +404,7 @@ static void get_d3d11_surface_readback(IDXGISurface *surface, struct resource_re
texture_desc.CPUAccessFlags = D3D11_CPU_ACCESS_READ;
texture_desc.MiscFlags = 0;
hr = ID3D11Device_CreateTexture2D(device, &texture_desc, NULL, (ID3D11Texture2D **)&rb->u.d3d11_resource);
- ok(SUCCEEDED(hr), "Failed to create texture, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
rb->width = texture_desc.Width;
rb->height = texture_desc.Height;
@@ -415,7 +415,7 @@ static void get_d3d11_surface_readback(IDXGISurface *surface, struct resource_re
ID3D11Device_Release(device);
hr = ID3D11DeviceContext_Map(context, rb->u.d3d11_resource, 0, D3D11_MAP_READ, 0, &map_desc);
- ok(SUCCEEDED(hr), "Failed to map texture, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID3D11DeviceContext_Release(context);
rb->pitch = map_desc.RowPitch;
@@ -556,7 +556,7 @@ static BOOL compare_sha1(void *data, unsigned int pitch, unsigned int bpp,
hash_size = sizeof(hash_data);
ret = CryptGetHashParam(hash, HP_HASHVAL, hash_data, &hash_size, 0);
ok(ret, "Failed to get hash value.\n");
- ok(hash_size == sizeof(hash_data), "Got unexpected hash size %u.\n", hash_size);
+ ok(hash_size == sizeof(hash_data), "Got unexpected hash size %lu.\n", hash_size);
ret = CryptDestroyHash(hash);
ok(ret, "Failed to destroy hash.\n");
@@ -594,16 +594,16 @@ static BOOL compare_wic_bitmap(IWICBitmap *bitmap, const char *ref_sha1)
BOOL ret;
hr = IWICBitmap_Lock(bitmap, NULL, WICBitmapLockRead, &lock);
- ok(SUCCEEDED(hr), "Failed to lock bitmap, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = IWICBitmapLock_GetDataPointer(lock, &buffer_size, &data);
- ok(SUCCEEDED(hr), "Failed to get bitmap data, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = IWICBitmapLock_GetStride(lock, &stride);
- ok(SUCCEEDED(hr), "Failed to get bitmap stride, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = IWICBitmapLock_GetSize(lock, &width, &height);
- ok(SUCCEEDED(hr), "Failed to get bitmap size, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ret = compare_sha1(data, stride, 4, width, height, ref_sha1);
@@ -862,7 +862,7 @@ static IDXGIDevice *create_device(BOOL d3d11)
ID3D10Device1_Release(d3d10_device);
}
- ok(SUCCEEDED(hr), "Failed to get DXGI device, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
return device;
}
@@ -886,9 +886,9 @@ static IDXGISwapChain *create_swapchain(IDXGIDevice *device, HWND window, BOOL w
HRESULT hr;
hr = IDXGIDevice_GetAdapter(device, &adapter);
- ok(SUCCEEDED(hr), "Failed to get adapter, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = IDXGIAdapter_GetParent(adapter, &IID_IDXGIFactory, (void **)&factory);
- ok(SUCCEEDED(hr), "Failed to get factory, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
IDXGIAdapter_Release(adapter);
desc.BufferDesc.Width = 640;
@@ -908,7 +908,7 @@ static IDXGISwapChain *create_swapchain(IDXGIDevice *device, HWND window, BOOL w
desc.Flags = 0;
hr = IDXGIFactory_CreateSwapChain(factory, (IUnknown *)device, &desc, &swapchain);
- ok(SUCCEEDED(hr), "Failed to create swapchain, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
IDXGIFactory_Release(factory);
return swapchain;
@@ -921,7 +921,7 @@ static IDXGISwapChain *create_d3d10_swapchain(ID3D10Device1 *device, HWND window
HRESULT hr;
hr = ID3D10Device1_QueryInterface(device, &IID_IDXGIDevice, (void **)&dxgi_device);
- ok(SUCCEEDED(hr), "Failed to get DXGI device, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
swapchain = create_swapchain(dxgi_device, window, windowed);
IDXGIDevice_Release(dxgi_device);
return swapchain;
@@ -935,9 +935,9 @@ static ID2D1RenderTarget *create_render_target_desc(IDXGISurface *surface,
HRESULT hr;
hr = D2D1CreateFactory(D2D1_FACTORY_TYPE_SINGLE_THREADED, &IID_ID2D1Factory, NULL, (void **)&factory);
- ok(SUCCEEDED(hr), "Failed to create factory, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = ID2D1Factory_CreateDxgiSurfaceRenderTarget(factory, surface, desc, &render_target);
- ok(SUCCEEDED(hr), "Failed to create render target, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID2D1Factory_Release(factory);
return render_target;
@@ -967,7 +967,7 @@ static void release_test_context_(unsigned int line, struct d2d1_test_context *c
ID2D1RenderTarget_GetFactory(ctx->rt, &factory);
ID2D1RenderTarget_Release(ctx->rt);
ref = ID2D1Factory_Release(factory);
- ok_(__FILE__, line)(!ref, "Factory has %u references left.\n", ref);
+ ok_(__FILE__, line)(!ref, "Factory has %lu references left.\n", ref);
IDXGISurface_Release(ctx->surface);
IDXGISwapChain_Release(ctx->swapchain);
@@ -994,7 +994,7 @@ static BOOL init_test_context_(unsigned int line, struct d2d1_test_context *ctx,
ctx->swapchain = create_swapchain(ctx->device, ctx->window, TRUE);
ok_(__FILE__, line)(!!ctx->swapchain, "Failed to create swapchain.\n");
hr = IDXGISwapChain_GetBuffer(ctx->swapchain, 0, &IID_IDXGISurface, (void **)&ctx->surface);
- ok_(__FILE__, line)(SUCCEEDED(hr), "Failed to get buffer, hr %#x.\n", hr);
+ ok_(__FILE__, line)(hr == S_OK, "Failed to get buffer, hr %#lx.\n", hr);
ctx->rt = create_render_target(ctx->surface, d3d11);
if (!ctx->rt && d3d11)
@@ -1026,7 +1026,7 @@ static void check_bitmap_surface_(unsigned int line, ID2D1Bitmap *bitmap, BOOL h
return;
options = ID2D1Bitmap1_GetOptions(bitmap1);
- ok_(__FILE__, line)(options == expected_options, "Unexpected bitmap options %#x, expected %#x.\n",
+ ok_(__FILE__, line)(options == expected_options, "Got unexpected bitmap options %#x, expected %#lx.\n",
options, expected_options);
surface = (void *)0xdeadbeef;
@@ -1038,12 +1038,12 @@ static void check_bitmap_surface_(unsigned int line, ID2D1Bitmap *bitmap, BOOL h
D2D1_SIZE_U pixel_size;
DWORD bind_flags = 0;
- ok_(__FILE__, line)(SUCCEEDED(hr), "Failed to get bitmap surface, hr %#x.\n", hr);
+ ok_(__FILE__, line)(hr == S_OK, "Failed to get bitmap surface, hr %#lx.\n", hr);
ok_(__FILE__, line)(!!surface, "Expected surface instance.\n");
/* Correlate with resource configuration. */
hr = IDXGISurface_QueryInterface(surface, &IID_ID3D10Texture2D, (void **)&texture);
- ok_(__FILE__, line)(SUCCEEDED(hr), "Failed to get texture pointer, hr %#x.\n", hr);
+ ok_(__FILE__, line)(hr == S_OK, "Failed to get texture pointer, hr %#lx.\n", hr);
ID3D10Texture2D_GetDesc(texture, &desc);
ok_(__FILE__, line)(desc.Usage == 0, "Unexpected usage %#x.\n", desc.Usage);
@@ -1072,7 +1072,7 @@ static void check_bitmap_surface_(unsigned int line, ID2D1Bitmap *bitmap, BOOL h
}
else
{
- ok_(__FILE__, line)(hr == D2DERR_INVALID_CALL, "Unexpected hr %#x.\n", hr);
+ ok_(__FILE__, line)(hr == D2DERR_INVALID_CALL, "Got unexpected hr %#lx.\n", hr);
ok_(__FILE__, line)(!surface, "Unexpected surface instance.\n");
}
@@ -1289,7 +1289,7 @@ static void geometry_sink_check_(unsigned int line, const struct geometry_sink *
"Got unexpected figure %u, segment %u type %#x, expected %#x.\n",
i, j, segment->type, expected_segment->type);
ok_(__FILE__, line)(segment->flags == expected_segment->flags,
- "Got unexpected figure %u, segment %u flags %#x, expected %#x.\n",
+ "Got unexpected figure %u, segment %u flags %#lx, expected %#lx.\n",
i, j, segment->flags, expected_segment->flags);
switch (segment->type)
{
@@ -1480,7 +1480,7 @@ static void test_clip(BOOL d3d11)
ID2D1RenderTarget_PopAxisAlignedClip(rt);
hr = ID2D1RenderTarget_EndDraw(rt, NULL, NULL);
- ok(SUCCEEDED(hr), "Failed to end draw, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
match = compare_surface(&ctx, "035a44d4198d6e422e9de6185b5b2c2bac5e33c9");
ok(match, "Surface does not match.\n");
@@ -1546,7 +1546,7 @@ static void test_clip(BOOL d3d11)
ID2D1RenderTarget_PopAxisAlignedClip(rt);
hr = ID2D1RenderTarget_EndDraw(rt, NULL, NULL);
- ok(SUCCEEDED(hr), "Failed to end draw, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
match = compare_surface(&ctx, "cb418ec4a7c8407b5e36db06fc6292a06bb8476c");
ok(match, "Surface does not match.\n");
@@ -1590,9 +1590,9 @@ static void test_state_block(BOOL d3d11)
rt = ctx.rt;
ID2D1RenderTarget_GetFactory(rt, &factory);
hr = DWriteCreateFactory(DWRITE_FACTORY_TYPE_SHARED, &IID_IDWriteFactory, (IUnknown **)&dwrite_factory);
- ok(SUCCEEDED(hr), "Failed to create dwrite factory, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = IDWriteFactory_CreateRenderingParams(dwrite_factory, &text_rendering_params1);
- ok(SUCCEEDED(hr), "Failed to create dwrite rendering params, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
IDWriteFactory_Release(dwrite_factory);
drawing_state.antialiasMode = ID2D1RenderTarget_GetAntialiasMode(rt);
@@ -1613,7 +1613,7 @@ static void test_state_block(BOOL d3d11)
ok(!text_rendering_params2, "Got unexpected text rendering params %p.\n", text_rendering_params2);
hr = ID2D1Factory_CreateDrawingStateBlock(factory, NULL, NULL, &state_block);
- ok(SUCCEEDED(hr), "Failed to create drawing state block, hr %#x\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID2D1DrawingStateBlock_GetDescription(state_block, &drawing_state);
ok(drawing_state.antialiasMode == D2D1_ANTIALIAS_MODE_PER_PRIMITIVE,
"Got unexpected antialias mode %#x.\n", drawing_state.antialiasMode);
@@ -1635,7 +1635,7 @@ static void test_state_block(BOOL d3d11)
drawing_state.tag2 = 0xbeef;
drawing_state.transform = transform1;
hr = ID2D1Factory_CreateDrawingStateBlock(factory, &drawing_state, text_rendering_params1, &state_block);
- ok(SUCCEEDED(hr), "Failed to create drawing state block, hr %#x\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID2D1DrawingStateBlock_GetDescription(state_block, &drawing_state);
ok(drawing_state.antialiasMode == D2D1_ANTIALIAS_MODE_ALIASED,
@@ -1743,7 +1743,7 @@ static void test_state_block(BOOL d3d11)
ID2D1DrawingStateBlock1 *state_block1;
hr = ID2D1DrawingStateBlock_QueryInterface(state_block, &IID_ID2D1DrawingStateBlock1, (void **)&state_block1);
- ok(SUCCEEDED(hr), "Failed to get ID2D1DrawingStateBlock1 interface, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID2D1DrawingStateBlock1_GetDescription(state_block1, &drawing_state1);
ok(drawing_state1.antialiasMode == D2D1_ANTIALIAS_MODE_ALIASED,
@@ -1783,7 +1783,7 @@ static void test_state_block(BOOL d3d11)
ID2D1DrawingStateBlock1_Release(state_block1);
hr = ID2D1Factory1_CreateDrawingStateBlock(factory1, NULL, NULL, &state_block1);
- ok(SUCCEEDED(hr), "Failed to create drawing state block, hr %#x\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID2D1DrawingStateBlock1_GetDescription(state_block1, &drawing_state1);
ok(drawing_state1.antialiasMode == D2D1_ANTIALIAS_MODE_PER_PRIMITIVE,
"Got unexpected antialias mode %#x.\n", drawing_state1.antialiasMode);
@@ -1808,7 +1808,7 @@ static void test_state_block(BOOL d3d11)
ID2D1DrawingStateBlock_Release(state_block);
refcount = IDWriteRenderingParams_Release(text_rendering_params1);
- ok(!refcount, "Rendering params %u references left.\n", refcount);
+ ok(!refcount, "Rendering params %lu references left.\n", refcount);
ID2D1Factory_Release(factory);
release_test_context(&ctx);
}
@@ -1835,7 +1835,7 @@ static void test_color_brush(BOOL d3d11)
set_color(&color, 0.0f, 0.0f, 0.0f, 0.0f);
hr = ID2D1RenderTarget_CreateSolidColorBrush(rt, &color, NULL, &brush);
- ok(SUCCEEDED(hr), "Failed to create brush, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
opacity = ID2D1SolidColorBrush_GetOpacity(brush);
ok(opacity == 1.0f, "Got unexpected opacity %.8e.\n", opacity);
set_matrix_identity(&matrix);
@@ -1856,7 +1856,7 @@ static void test_color_brush(BOOL d3d11)
scale_matrix(&matrix, 2.0f, 2.0f);
brush_desc.transform = matrix;
hr = ID2D1RenderTarget_CreateSolidColorBrush(rt, &color, &brush_desc, &brush);
- ok(SUCCEEDED(hr), "Failed to create brush, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
opacity = ID2D1SolidColorBrush_GetOpacity(brush);
ok(opacity == 0.3f, "Got unexpected opacity %.8e.\n", opacity);
ID2D1SolidColorBrush_GetTransform(brush, &tmp_matrix);
@@ -1890,7 +1890,7 @@ static void test_color_brush(BOOL d3d11)
ID2D1RenderTarget_FillRectangle(rt, &rect, (ID2D1Brush *)brush);
hr = ID2D1RenderTarget_EndDraw(rt, NULL, NULL);
- ok(SUCCEEDED(hr), "Failed to end draw, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
match = compare_surface(&ctx, "6d1218fca5e21fb7e287b3a439d60dbc251f5ceb");
ok(match, "Surface does not match.\n");
@@ -1964,11 +1964,11 @@ static void test_bitmap_brush(BOOL d3d11)
bitmap_desc.dpiX = 96.0f;
bitmap_desc.dpiY = 96.0f;
hr = ID2D1RenderTarget_CreateBitmap(rt, size, bitmap_data, 4 * sizeof(*bitmap_data), &bitmap_desc, &bitmap);
- ok(SUCCEEDED(hr), "Failed to create bitmap, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
image_size = ID2D1Bitmap_GetSize(bitmap);
hr = ID2D1Bitmap_QueryInterface(bitmap, &IID_ID2D1Image, (void **)&image);
- ok(SUCCEEDED(hr) || broken(hr == E_NOINTERFACE) /* Vista */, "Failed to get ID2D1Image, hr %#x.\n", hr);
+ ok(hr == S_OK || broken(hr == E_NOINTERFACE) /* Vista */, "Got unexpected hr %#lx.\n", hr);
if (hr == S_OK)
{
ID2D1DeviceContext *context;
@@ -1976,7 +1976,7 @@ static void test_bitmap_brush(BOOL d3d11)
D2D1_RECT_F src_rect;
hr = ID2D1RenderTarget_QueryInterface(rt, &IID_ID2D1DeviceContext, (void **)&context);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID2D1RenderTarget_BeginDraw(rt);
set_color(&color, 0.0f, 0.0f, 1.0f, 1.0f);
@@ -2029,7 +2029,7 @@ static void test_bitmap_brush(BOOL d3d11)
D2D1_COMPOSITE_MODE_SOURCE_OVER);
hr = ID2D1RenderTarget_EndDraw(rt, NULL, NULL);
- ok(SUCCEEDED(hr), "Failed to end draw, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
match = compare_surface(&ctx, "95675fbc4a16404c9568d41b14e8f6be64240998");
ok(match, "Surface does not match.\n");
@@ -2041,7 +2041,7 @@ static void test_bitmap_brush(BOOL d3d11)
D2D1_COMPOSITE_MODE_SOURCE_OVER);
hr = ID2D1RenderTarget_EndDraw(rt, NULL, NULL);
- ok(SUCCEEDED(hr), "Failed to end draw, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
match = compare_surface(&ctx, "95675fbc4a16404c9568d41b14e8f6be64240998");
ok(match, "Surface does not match.\n");
@@ -2053,7 +2053,7 @@ static void test_bitmap_brush(BOOL d3d11)
/* Creating a brush with a NULL bitmap crashes on Vista, but works fine on
* Windows 7+. */
hr = ID2D1RenderTarget_CreateBitmapBrush(rt, bitmap, NULL, NULL, &brush);
- ok(SUCCEEDED(hr), "Failed to create brush, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID2D1BitmapBrush_GetBitmap(brush, &tmp_bitmap);
ok(tmp_bitmap == bitmap, "Got unexpected bitmap %p, expected %p.\n", tmp_bitmap, bitmap);
ID2D1Bitmap_Release(tmp_bitmap);
@@ -2075,7 +2075,7 @@ static void test_bitmap_brush(BOOL d3d11)
ID2D1BitmapBrush_Release(brush);
hr = ID2D1RenderTarget_CreateBitmapBrush(rt, bitmap, NULL, NULL, &brush);
- ok(SUCCEEDED(hr), "Failed to create brush, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
set_matrix_identity(&matrix);
translate_matrix(&matrix, 40.0f, 120.0f);
scale_matrix(&matrix, 20.0f, 60.0f);
@@ -2130,7 +2130,7 @@ static void test_bitmap_brush(BOOL d3d11)
D2D1_BITMAP_INTERPOLATION_MODE_NEAREST_NEIGHBOR, &src_rect);
hr = ID2D1RenderTarget_EndDraw(rt, NULL, NULL);
- ok(SUCCEEDED(hr), "Failed to end draw, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
match = compare_surface(&ctx, "f5d039c280fa33ba05496c9883192a34108efbbe");
ok(match, "Surface does not match.\n");
@@ -2148,7 +2148,7 @@ static void test_bitmap_brush(BOOL d3d11)
D2D1_BITMAP_INTERPOLATION_MODE_LINEAR + 1, &src_rect);
hr = ID2D1RenderTarget_EndDraw(rt, NULL, NULL);
- ok(hr == E_INVALIDARG, "Unexpected hr %#x.\n", hr);
+ ok(hr == E_INVALIDARG, "Got unexpected hr %#lx.\n", hr);
match = compare_surface(&ctx, "f5d039c280fa33ba05496c9883192a34108efbbe");
ok(match, "Surface does not match.\n");
@@ -2160,7 +2160,7 @@ static void test_bitmap_brush(BOOL d3d11)
D2D1_BITMAP_INTERPOLATION_MODE_NEAREST_NEIGHBOR, &src_rect);
hr = ID2D1RenderTarget_EndDraw(rt, NULL, NULL);
- ok(SUCCEEDED(hr), "Failed to end draw, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
match = compare_surface(&ctx, "59043096393570ad800dbcbfdd644394b79493bd");
ok(match, "Surface does not match.\n");
@@ -2189,7 +2189,7 @@ static void test_bitmap_brush(BOOL d3d11)
}
hr = ID2D1RenderTarget_EndDraw(rt, NULL, NULL);
- ok(SUCCEEDED(hr), "Failed to end draw, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
match = compare_surface(&ctx, "b4b775afecdae2d26642001f4faff73663bb8b31");
ok(match, "Surface does not match.\n");
@@ -2197,7 +2197,7 @@ static void test_bitmap_brush(BOOL d3d11)
bitmap_desc.dpiX = 96.0f / 20.0f;
bitmap_desc.dpiY = 96.0f / 60.0f;
hr = ID2D1RenderTarget_CreateBitmap(rt, size, bitmap_data, 4 * sizeof(*bitmap_data), &bitmap_desc, &bitmap);
- ok(SUCCEEDED(hr), "Failed to create bitmap, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID2D1BitmapBrush_SetBitmap(brush, bitmap);
ID2D1RenderTarget_BeginDraw(rt);
@@ -2217,14 +2217,14 @@ static void test_bitmap_brush(BOOL d3d11)
set_rect(&dst_rect, -1.0f, -1.0f, 1.0f, 1.0f);
hr = ID2D1Factory_CreateRectangleGeometry(factory, &dst_rect, &rectangle_geometry);
- ok(SUCCEEDED(hr), "Failed to create geometry, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
set_matrix_identity(&matrix);
translate_matrix(&matrix, 240.0f, 720.0f);
scale_matrix(&matrix, 40.0f, 120.0f);
hr = ID2D1Factory_CreateTransformedGeometry(factory, (ID2D1Geometry *)rectangle_geometry,
&matrix, &transformed_geometry);
- ok(SUCCEEDED(hr), "Failed to create geometry, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID2D1RectangleGeometry_Release(rectangle_geometry);
set_matrix_identity(&matrix);
@@ -2238,7 +2238,7 @@ static void test_bitmap_brush(BOOL d3d11)
ID2D1Factory_Release(factory);
hr = ID2D1RenderTarget_EndDraw(rt, NULL, NULL);
- ok(SUCCEEDED(hr), "Failed to end draw, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
match = compare_surface(&ctx, "cf7b90ba7b139fdfbe9347e1907d635cfb4ed197");
ok(match, "Surface does not match.\n");
@@ -2287,7 +2287,7 @@ static void test_bitmap_brush(BOOL d3d11)
ID2D1BitmapBrush_Release(brush);
refcount = ID2D1Bitmap_Release(bitmap);
- ok(!refcount, "Bitmap has %u references left.\n", refcount);
+ ok(!refcount, "Bitmap has %lu references left.\n", refcount);
release_test_context(&ctx);
}
@@ -2357,12 +2357,12 @@ static void test_linear_brush(BOOL d3d11)
hr = ID2D1RenderTarget_CreateGradientStopCollection(rt, stops, ARRAY_SIZE(stops),
D2D1_GAMMA_2_2, D2D1_EXTEND_MODE_CLAMP, &gradient);
- ok(SUCCEEDED(hr), "Failed to create stop collection, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
set_point(&gradient_properties.startPoint, 320.0f, 0.0f);
set_point(&gradient_properties.endPoint, 0.0f, 960.0f);
hr = ID2D1RenderTarget_CreateLinearGradientBrush(rt, &gradient_properties, NULL, gradient, &brush);
- ok(SUCCEEDED(hr), "Failed to create brush, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
opacity = ID2D1LinearGradientBrush_GetOpacity(brush);
ok(opacity == 1.0f, "Got unexpected opacity %.8e.\n", opacity);
@@ -2389,7 +2389,7 @@ static void test_linear_brush(BOOL d3d11)
ID2D1RenderTarget_FillRectangle(rt, &r, (ID2D1Brush *)brush);
hr = ID2D1RenderTarget_EndDraw(rt, NULL, NULL);
- ok(SUCCEEDED(hr), "Failed to end draw, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
get_surface_readback(&ctx, &rb);
for (i = 0; i < ARRAY_SIZE(test1); ++i)
@@ -2398,7 +2398,7 @@ static void test_linear_brush(BOOL d3d11)
colour = get_readback_colour(&rb, test1[i].x, test1[i].y);
ok(compare_colour(colour, test1[i].colour, 1),
- "Got unexpected colour 0x%08x at position {%u, %u}.\n",
+ "Got unexpected colour 0x%08lx at position {%u, %u}.\n",
colour, test1[i].x, test1[i].y);
}
release_resource_readback(&rb);
@@ -2439,14 +2439,14 @@ static void test_linear_brush(BOOL d3d11)
set_rect(&r, -1.0f, -1.0f, 1.0f, 1.0f);
hr = ID2D1Factory_CreateRectangleGeometry(factory, &r, &rectangle_geometry);
- ok(SUCCEEDED(hr), "Failed to create geometry, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
set_matrix_identity(&matrix);
translate_matrix(&matrix, 228.5f, 714.0f);
scale_matrix(&matrix, 40.0f, 120.0f);
hr = ID2D1Factory_CreateTransformedGeometry(factory, (ID2D1Geometry *)rectangle_geometry,
&matrix, &transformed_geometry);
- ok(SUCCEEDED(hr), "Failed to create geometry, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID2D1RectangleGeometry_Release(rectangle_geometry);
set_matrix_identity(&matrix);
@@ -2462,7 +2462,7 @@ static void test_linear_brush(BOOL d3d11)
ID2D1Factory_Release(factory);
hr = ID2D1RenderTarget_EndDraw(rt, NULL, NULL);
- ok(SUCCEEDED(hr), "Failed to end draw, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
get_surface_readback(&ctx, &rb);
for (i = 0; i < ARRAY_SIZE(test2); ++i)
@@ -2471,14 +2471,14 @@ static void test_linear_brush(BOOL d3d11)
colour = get_readback_colour(&rb, test2[i].x, test2[i].y);
ok(compare_colour(colour, test2[i].colour, 1),
- "Got unexpected colour 0x%08x at position {%u, %u}.\n",
+ "Got unexpected colour 0x%08lx at position {%u, %u}.\n",
colour, test2[i].x, test2[i].y);
}
release_resource_readback(&rb);
ID2D1LinearGradientBrush_Release(brush);
refcount = ID2D1GradientStopCollection_Release(gradient);
- ok(!refcount, "Gradient has %u references left.\n", refcount);
+ ok(!refcount, "Gradient has %lu references left.\n", refcount);
release_test_context(&ctx);
}
@@ -2548,14 +2548,14 @@ static void test_radial_brush(BOOL d3d11)
hr = ID2D1RenderTarget_CreateGradientStopCollection(rt, stops, ARRAY_SIZE(stops),
D2D1_GAMMA_2_2, D2D1_EXTEND_MODE_CLAMP, &gradient);
- ok(SUCCEEDED(hr), "Failed to create stop collection, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
set_point(&gradient_properties.center, 160.0f, 480.0f);
set_point(&gradient_properties.gradientOriginOffset, 40.0f, -120.0f);
gradient_properties.radiusX = 160.0f;
gradient_properties.radiusY = 480.0f;
hr = ID2D1RenderTarget_CreateRadialGradientBrush(rt, &gradient_properties, NULL, gradient, &brush);
- ok(SUCCEEDED(hr), "Failed to create brush, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
f = ID2D1RadialGradientBrush_GetOpacity(brush);
ok(f == 1.0f, "Got unexpected opacity %.8e.\n", f);
@@ -2586,7 +2586,7 @@ static void test_radial_brush(BOOL d3d11)
ID2D1RenderTarget_FillRectangle(rt, &r, (ID2D1Brush *)brush);
hr = ID2D1RenderTarget_EndDraw(rt, NULL, NULL);
- ok(SUCCEEDED(hr), "Failed to end draw, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
get_surface_readback(&ctx, &rb);
for (i = 0; i < ARRAY_SIZE(test1); ++i)
@@ -2595,7 +2595,7 @@ static void test_radial_brush(BOOL d3d11)
colour = get_readback_colour(&rb, test1[i].x, test1[i].y);
ok(compare_colour(colour, test1[i].colour, 1),
- "Got unexpected colour 0x%08x at position {%u, %u}.\n",
+ "Got unexpected colour 0x%08lx at position {%u, %u}.\n",
colour, test1[i].x, test1[i].y);
}
release_resource_readback(&rb);
@@ -2636,14 +2636,14 @@ static void test_radial_brush(BOOL d3d11)
set_rect(&r, -1.0f, -1.0f, 1.0f, 1.0f);
hr = ID2D1Factory_CreateRectangleGeometry(factory, &r, &rectangle_geometry);
- ok(SUCCEEDED(hr), "Failed to create geometry, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
set_matrix_identity(&matrix);
translate_matrix(&matrix, 228.5f, 714.0f);
scale_matrix(&matrix, 40.0f, 120.0f);
hr = ID2D1Factory_CreateTransformedGeometry(factory, (ID2D1Geometry *)rectangle_geometry,
&matrix, &transformed_geometry);
- ok(SUCCEEDED(hr), "Failed to create geometry, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID2D1RectangleGeometry_Release(rectangle_geometry);
set_matrix_identity(&matrix);
@@ -2661,7 +2661,7 @@ static void test_radial_brush(BOOL d3d11)
ID2D1Factory_Release(factory);
hr = ID2D1RenderTarget_EndDraw(rt, NULL, NULL);
- ok(SUCCEEDED(hr), "Failed to end draw, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
get_surface_readback(&ctx, &rb);
for (i = 0; i < ARRAY_SIZE(test2); ++i)
@@ -2670,14 +2670,14 @@ static void test_radial_brush(BOOL d3d11)
colour = get_readback_colour(&rb, test2[i].x, test2[i].y);
ok(compare_colour(colour, test2[i].colour, 1),
- "Got unexpected colour 0x%08x at position {%u, %u}.\n",
+ "Got unexpected colour 0x%08lx at position {%u, %u}.\n",
colour, test2[i].x, test2[i].y);
}
release_resource_readback(&rb);
ID2D1RadialGradientBrush_Release(brush);
refcount = ID2D1GradientStopCollection_Release(gradient);
- ok(!refcount, "Gradient has %u references left.\n", refcount);
+ ok(!refcount, "Gradient has %lu references left.\n", refcount);
release_test_context(&ctx);
}
@@ -3161,163 +3161,163 @@ static void test_path_geometry(BOOL d3d11)
ID2D1RenderTarget_SetAntialiasMode(rt, D2D1_ANTIALIAS_MODE_ALIASED);
set_color(&color, 0.890f, 0.851f, 0.600f, 1.0f);
hr = ID2D1RenderTarget_CreateSolidColorBrush(rt, &color, NULL, &brush);
- ok(SUCCEEDED(hr), "Failed to create brush, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
/* Close() when closed. */
hr = ID2D1Factory_CreatePathGeometry(factory, &geometry);
- ok(SUCCEEDED(hr), "Failed to create path geometry, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = ID2D1PathGeometry_GetFigureCount(geometry, &count);
- ok(hr == D2DERR_WRONG_STATE, "Got unexpected hr %#x.\n", hr);
+ ok(hr == D2DERR_WRONG_STATE, "Got unexpected hr %#lx.\n", hr);
hr = ID2D1PathGeometry_GetSegmentCount(geometry, &count);
- ok(hr == D2DERR_WRONG_STATE, "Got unexpected hr %#x.\n", hr);
+ ok(hr == D2DERR_WRONG_STATE, "Got unexpected hr %#lx.\n", hr);
hr = ID2D1PathGeometry_Open(geometry, &sink);
- ok(SUCCEEDED(hr), "Failed to open geometry sink, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = ID2D1PathGeometry_GetFigureCount(geometry, &count);
- ok(hr == D2DERR_WRONG_STATE, "Got unexpected hr %#x.\n", hr);
+ ok(hr == D2DERR_WRONG_STATE, "Got unexpected hr %#lx.\n", hr);
hr = ID2D1PathGeometry_GetSegmentCount(geometry, &count);
- ok(hr == D2DERR_WRONG_STATE, "Got unexpected hr %#x.\n", hr);
+ ok(hr == D2DERR_WRONG_STATE, "Got unexpected hr %#lx.\n", hr);
hr = ID2D1GeometrySink_Close(sink);
- ok(SUCCEEDED(hr), "Failed to close geometry sink, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = ID2D1PathGeometry_GetFigureCount(geometry, &count);
- ok(SUCCEEDED(hr), "Failed to get figure count, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ok(!count, "Got unexpected figure count %u.\n", count);
hr = ID2D1PathGeometry_GetSegmentCount(geometry, &count);
- ok(SUCCEEDED(hr), "Failed to get segment count, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ok(!count, "Got unexpected segment count %u.\n", count);
hr = ID2D1GeometrySink_Close(sink);
- ok(hr == D2DERR_WRONG_STATE, "Got unexpected hr %#x.\n", hr);
+ ok(hr == D2DERR_WRONG_STATE, "Got unexpected hr %#lx.\n", hr);
ID2D1GeometrySink_Release(sink);
hr = ID2D1PathGeometry_GetFigureCount(geometry, &count);
- ok(SUCCEEDED(hr), "Failed to get figure count, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ok(!count, "Got unexpected figure count %u.\n", count);
hr = ID2D1PathGeometry_GetSegmentCount(geometry, &count);
- ok(SUCCEEDED(hr), "Failed to get segment count, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ok(!count, "Got unexpected segment count %u.\n", count);
ID2D1PathGeometry_Release(geometry);
/* Open() when closed. */
hr = ID2D1Factory_CreatePathGeometry(factory, &geometry);
- ok(SUCCEEDED(hr), "Failed to create path geometry, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = ID2D1PathGeometry_Open(geometry, &sink);
- ok(SUCCEEDED(hr), "Failed to open geometry sink, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = ID2D1GeometrySink_Close(sink);
- ok(SUCCEEDED(hr), "Failed to close geometry sink, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID2D1GeometrySink_Release(sink);
hr = ID2D1PathGeometry_Open(geometry, &sink);
- ok(hr == D2DERR_WRONG_STATE, "Got unexpected hr %#x.\n", hr);
+ ok(hr == D2DERR_WRONG_STATE, "Got unexpected hr %#lx.\n", hr);
hr = ID2D1PathGeometry_GetFigureCount(geometry, &count);
- ok(SUCCEEDED(hr), "Failed to get figure count, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ok(!count, "Got unexpected figure count %u.\n", count);
hr = ID2D1PathGeometry_GetSegmentCount(geometry, &count);
- ok(SUCCEEDED(hr), "Failed to get segment count, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ok(!count, "Got unexpected segment count %u.\n", count);
ID2D1PathGeometry_Release(geometry);
/* Open() when open. */
hr = ID2D1Factory_CreatePathGeometry(factory, &geometry);
- ok(SUCCEEDED(hr), "Failed to create path geometry, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = ID2D1PathGeometry_Open(geometry, &sink);
- ok(SUCCEEDED(hr), "Failed to open geometry sink, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = ID2D1PathGeometry_Open(geometry, &tmp_sink);
- ok(hr == D2DERR_WRONG_STATE, "Got unexpected hr %#x.\n", hr);
+ ok(hr == D2DERR_WRONG_STATE, "Got unexpected hr %#lx.\n", hr);
hr = ID2D1GeometrySink_Close(sink);
- ok(SUCCEEDED(hr), "Failed to close geometry sink, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID2D1GeometrySink_Release(sink);
hr = ID2D1PathGeometry_GetFigureCount(geometry, &count);
- ok(SUCCEEDED(hr), "Failed to get figure count, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ok(!count, "Got unexpected figure count %u.\n", count);
hr = ID2D1PathGeometry_GetSegmentCount(geometry, &count);
- ok(SUCCEEDED(hr), "Failed to get segment count, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ok(!count, "Got unexpected segment count %u.\n", count);
ID2D1PathGeometry_Release(geometry);
/* BeginFigure() without EndFigure(). */
hr = ID2D1Factory_CreatePathGeometry(factory, &geometry);
- ok(SUCCEEDED(hr), "Failed to create path geometry, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = ID2D1PathGeometry_Open(geometry, &sink);
- ok(SUCCEEDED(hr), "Failed to open geometry sink, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID2D1GeometrySink_BeginFigure(sink, point, D2D1_FIGURE_BEGIN_FILLED);
hr = ID2D1GeometrySink_Close(sink);
- ok(hr == D2DERR_WRONG_STATE, "Got unexpected hr %#x.\n", hr);
+ ok(hr == D2DERR_WRONG_STATE, "Got unexpected hr %#lx.\n", hr);
ID2D1GeometrySink_EndFigure(sink, D2D1_FIGURE_END_CLOSED);
hr = ID2D1GeometrySink_Close(sink);
- ok(hr == D2DERR_WRONG_STATE, "Got unexpected hr %#x.\n", hr);
+ ok(hr == D2DERR_WRONG_STATE, "Got unexpected hr %#lx.\n", hr);
ID2D1GeometrySink_Release(sink);
hr = ID2D1PathGeometry_GetFigureCount(geometry, &count);
- ok(hr == D2DERR_WRONG_STATE, "Got unexpected hr %#x.\n", hr);
+ ok(hr == D2DERR_WRONG_STATE, "Got unexpected hr %#lx.\n", hr);
hr = ID2D1PathGeometry_GetSegmentCount(geometry, &count);
- ok(hr == D2DERR_WRONG_STATE, "Got unexpected hr %#x.\n", hr);
+ ok(hr == D2DERR_WRONG_STATE, "Got unexpected hr %#lx.\n", hr);
ID2D1PathGeometry_Release(geometry);
/* EndFigure() without BeginFigure(). */
hr = ID2D1Factory_CreatePathGeometry(factory, &geometry);
- ok(SUCCEEDED(hr), "Failed to create path geometry, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = ID2D1PathGeometry_Open(geometry, &sink);
- ok(SUCCEEDED(hr), "Failed to open geometry sink, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID2D1GeometrySink_EndFigure(sink, D2D1_FIGURE_END_CLOSED);
hr = ID2D1GeometrySink_Close(sink);
- ok(hr == D2DERR_WRONG_STATE, "Got unexpected hr %#x.\n", hr);
+ ok(hr == D2DERR_WRONG_STATE, "Got unexpected hr %#lx.\n", hr);
ID2D1GeometrySink_Release(sink);
hr = ID2D1PathGeometry_GetFigureCount(geometry, &count);
- ok(hr == D2DERR_WRONG_STATE, "Got unexpected hr %#x.\n", hr);
+ ok(hr == D2DERR_WRONG_STATE, "Got unexpected hr %#lx.\n", hr);
hr = ID2D1PathGeometry_GetSegmentCount(geometry, &count);
- ok(hr == D2DERR_WRONG_STATE, "Got unexpected hr %#x.\n", hr);
+ ok(hr == D2DERR_WRONG_STATE, "Got unexpected hr %#lx.\n", hr);
ID2D1PathGeometry_Release(geometry);
/* BeginFigure()/EndFigure() mismatch. */
hr = ID2D1Factory_CreatePathGeometry(factory, &geometry);
- ok(SUCCEEDED(hr), "Failed to create path geometry, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = ID2D1PathGeometry_Open(geometry, &sink);
- ok(SUCCEEDED(hr), "Failed to open geometry sink, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID2D1GeometrySink_BeginFigure(sink, point, D2D1_FIGURE_BEGIN_FILLED);
ID2D1GeometrySink_BeginFigure(sink, point, D2D1_FIGURE_BEGIN_FILLED);
ID2D1GeometrySink_EndFigure(sink, D2D1_FIGURE_END_CLOSED);
ID2D1GeometrySink_EndFigure(sink, D2D1_FIGURE_END_CLOSED);
hr = ID2D1GeometrySink_Close(sink);
- ok(hr == D2DERR_WRONG_STATE, "Got unexpected hr %#x.\n", hr);
+ ok(hr == D2DERR_WRONG_STATE, "Got unexpected hr %#lx.\n", hr);
ID2D1GeometrySink_EndFigure(sink, D2D1_FIGURE_END_CLOSED);
hr = ID2D1GeometrySink_Close(sink);
- ok(hr == D2DERR_WRONG_STATE, "Got unexpected hr %#x.\n", hr);
+ ok(hr == D2DERR_WRONG_STATE, "Got unexpected hr %#lx.\n", hr);
ID2D1GeometrySink_Release(sink);
ID2D1PathGeometry_Release(geometry);
/* AddLine() outside BeginFigure()/EndFigure(). */
hr = ID2D1Factory_CreatePathGeometry(factory, &geometry);
- ok(SUCCEEDED(hr), "Failed to create path geometry, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = ID2D1PathGeometry_Open(geometry, &sink);
- ok(SUCCEEDED(hr), "Failed to open geometry sink, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID2D1GeometrySink_AddLine(sink, point);
hr = ID2D1GeometrySink_Close(sink);
- ok(hr == D2DERR_WRONG_STATE, "Got unexpected hr %#x.\n", hr);
+ ok(hr == D2DERR_WRONG_STATE, "Got unexpected hr %#lx.\n", hr);
ID2D1GeometrySink_AddLine(sink, point);
ID2D1GeometrySink_Release(sink);
hr = ID2D1PathGeometry_GetFigureCount(geometry, &count);
- ok(hr == D2DERR_WRONG_STATE, "Got unexpected hr %#x.\n", hr);
+ ok(hr == D2DERR_WRONG_STATE, "Got unexpected hr %#lx.\n", hr);
hr = ID2D1PathGeometry_GetSegmentCount(geometry, &count);
- ok(hr == D2DERR_WRONG_STATE, "Got unexpected hr %#x.\n", hr);
+ ok(hr == D2DERR_WRONG_STATE, "Got unexpected hr %#lx.\n", hr);
ID2D1PathGeometry_Release(geometry);
/* Empty figure. */
hr = ID2D1Factory_CreatePathGeometry(factory, &geometry);
- ok(SUCCEEDED(hr), "Failed to create path geometry, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = ID2D1PathGeometry_Open(geometry, &sink);
- ok(SUCCEEDED(hr), "Failed to open geometry sink, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
set_point(&point, 123.0f, 456.0f);
ID2D1GeometrySink_BeginFigure(sink, point, D2D1_FIGURE_BEGIN_FILLED);
ID2D1GeometrySink_EndFigure(sink, D2D1_FIGURE_END_CLOSED);
hr = ID2D1GeometrySink_Close(sink);
- ok(SUCCEEDED(hr), "Failed to close geometry sink, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID2D1GeometrySink_Release(sink);
hr = ID2D1PathGeometry_GetFigureCount(geometry, &count);
- ok(SUCCEEDED(hr), "Failed to get figure count, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ok(count == 1, "Got unexpected figure count %u.\n", count);
hr = ID2D1PathGeometry_GetSegmentCount(geometry, &count);
- ok(SUCCEEDED(hr), "Failed to get segment count, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ok(count == 1, "Got unexpected segment count %u.\n", count);
set_rect(&rect, 0.0f, 0.0f, 0.0f, 0.0f);
hr = ID2D1PathGeometry_GetBounds(geometry, NULL, &rect);
- ok(SUCCEEDED(hr), "Failed to get geometry bounds, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
match = compare_rect(&rect, 123.0f, 456.0f, 123.0f, 456.0f, 0);
ok(match, "Got unexpected rectangle {%.8e, %.8e, %.8e, %.8e}.\n",
rect.left, rect.top, rect.right, rect.bottom);
@@ -3326,7 +3326,7 @@ static void test_path_geometry(BOOL d3d11)
translate_matrix(&matrix, 80.0f, 640.0f);
scale_matrix(&matrix, 2.0f, 0.5f);
hr = ID2D1PathGeometry_GetBounds(geometry, &matrix, &rect);
- ok(SUCCEEDED(hr), "Failed to get geometry bounds, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
match = compare_rect(&rect, 326.0f, 868.0f, 326.0f, 868.0f, 0);
ok(match, "Got unexpected rectangle {%.8e, %.8e, %.8e, %.8e}.\n",
rect.left, rect.top, rect.right, rect.bottom);
@@ -3335,9 +3335,9 @@ static void test_path_geometry(BOOL d3d11)
/* Degenerate figure. */
hr = ID2D1Factory_CreatePathGeometry(factory, &geometry);
- ok(SUCCEEDED(hr), "Failed to create path geometry, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = ID2D1PathGeometry_Open(geometry, &sink);
- ok(SUCCEEDED(hr), "Failed to open geometry sink, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
set_point(&point, 123.0f, 456.0f);
ID2D1GeometrySink_BeginFigure(sink, point, D2D1_FIGURE_BEGIN_FILLED);
quadratic_to(sink, 123.0f, 456.0f, 123.0f, 456.0f);
@@ -3345,52 +3345,52 @@ static void test_path_geometry(BOOL d3d11)
quadratic_to(sink, 123.0f, 456.0f, 123.0f, 456.0f);
ID2D1GeometrySink_EndFigure(sink, D2D1_FIGURE_END_CLOSED);
hr = ID2D1GeometrySink_Close(sink);
- ok(SUCCEEDED(hr), "Failed to close geometry sink, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID2D1GeometrySink_Release(sink);
hr = ID2D1PathGeometry_GetFigureCount(geometry, &count);
- ok(SUCCEEDED(hr), "Failed to get figure count, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ok(count == 1, "Got unexpected figure count %u.\n", count);
hr = ID2D1PathGeometry_GetSegmentCount(geometry, &count);
- ok(SUCCEEDED(hr), "Failed to get segment count, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ok(count == 4, "Got unexpected segment count %u.\n", count);
ID2D1PathGeometry_Release(geometry);
/* Close right after Open(). */
hr = ID2D1Factory_CreatePathGeometry(factory, &geometry);
- ok(SUCCEEDED(hr), "Failed to create path geometry, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
/* Not open yet. */
set_rect(&rect, 1.0f, 2.0f, 3.0f, 4.0f);
hr = ID2D1PathGeometry_GetBounds(geometry, NULL, &rect);
- ok(hr == D2DERR_WRONG_STATE, "Unexpected hr %#x.\n", hr);
+ ok(hr == D2DERR_WRONG_STATE, "Got unexpected hr %#lx.\n", hr);
match = compare_rect(&rect, 1.0f, 2.0f, 3.0f, 4.0f, 0);
ok(match, "Got unexpected rectangle {%.8e, %.8e, %.8e, %.8e}.\n",
rect.left, rect.top, rect.right, rect.bottom);
hr = ID2D1PathGeometry_Open(geometry, &sink);
- ok(SUCCEEDED(hr), "Failed to open geometry sink, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
/* Open, not closed. */
set_rect(&rect, 1.0f, 2.0f, 3.0f, 4.0f);
hr = ID2D1PathGeometry_GetBounds(geometry, NULL, &rect);
- ok(hr == D2DERR_WRONG_STATE, "Unexpected hr %#x.\n", hr);
+ ok(hr == D2DERR_WRONG_STATE, "Got unexpected hr %#lx.\n", hr);
match = compare_rect(&rect, 1.0f, 2.0f, 3.0f, 4.0f, 0);
ok(match, "Got unexpected rectangle {%.8e, %.8e, %.8e, %.8e}.\n",
rect.left, rect.top, rect.right, rect.bottom);
hr = ID2D1GeometrySink_Close(sink);
- ok(SUCCEEDED(hr), "Failed to close geometry sink, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID2D1GeometrySink_Release(sink);
hr = ID2D1PathGeometry_GetFigureCount(geometry, &count);
- ok(SUCCEEDED(hr), "Failed to get figure count, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ok(count == 0, "Got unexpected figure count %u.\n", count);
hr = ID2D1PathGeometry_GetSegmentCount(geometry, &count);
- ok(SUCCEEDED(hr), "Failed to get segment count, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ok(count == 0, "Got unexpected segment count %u.\n", count);
set_rect(&rect, 0.0f, 0.0f, 0.0f, 0.0f);
hr = ID2D1PathGeometry_GetBounds(geometry, NULL, &rect);
- ok(SUCCEEDED(hr), "Failed to get geometry bounds, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ok(rect.left > rect.right && rect.top > rect.bottom,
"Got unexpected rectangle {%.8e, %.8e, %.8e, %.8e}.\n", rect.left, rect.top, rect.right, rect.bottom);
@@ -3399,7 +3399,7 @@ static void test_path_geometry(BOOL d3d11)
scale_matrix(&matrix, 10.0f, 20.0f);
set_rect(&rect, 0.0f, 0.0f, 0.0f, 0.0f);
hr = ID2D1PathGeometry_GetBounds(geometry, &matrix, &rect);
- ok(SUCCEEDED(hr), "Failed to get geometry bounds, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ok(rect.left > rect.right && rect.top > rect.bottom,
"Got unexpected rectangle {%.8e, %.8e, %.8e, %.8e}.\n", rect.left, rect.top, rect.right, rect.bottom);
@@ -3407,17 +3407,17 @@ static void test_path_geometry(BOOL d3d11)
/* GetBounds() with bezier segments. */
hr = ID2D1Factory_CreatePathGeometry(factory, &geometry);
- ok(SUCCEEDED(hr), "Failed to create path geometry, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = ID2D1PathGeometry_Open(geometry, &sink);
- ok(SUCCEEDED(hr), "Failed to open geometry sink, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
fill_geometry_sink_bezier(sink, 0);
hr = ID2D1GeometrySink_Close(sink);
- ok(SUCCEEDED(hr), "Failed to close geometry sink, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID2D1GeometrySink_Release(sink);
set_rect(&rect, 0.0f, 0.0f, 0.0f, 0.0f);
hr = ID2D1PathGeometry_GetBounds(geometry, NULL, &rect);
- ok(SUCCEEDED(hr), "Failed to get geometry bounds, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
match = compare_rect(&rect, 5.0f, 20.0f, 75.0f, 752.0f, 0);
ok(match, "Got unexpected rectangle {%.8e, %.8e, %.8e, %.8e}.\n",
rect.left, rect.top, rect.right, rect.bottom);
@@ -3427,7 +3427,7 @@ static void test_path_geometry(BOOL d3d11)
scale_matrix(&matrix, 2.0f, 0.5f);
set_rect(&rect, 0.0f, 0.0f, 0.0f, 0.0f);
hr = ID2D1PathGeometry_GetBounds(geometry, &matrix, &rect);
- ok(SUCCEEDED(hr), "Failed to get geometry bounds, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
match = compare_rect(&rect, 90.0f, 650.0f, 230.0f, 1016.0f, 0);
ok(match, "Got unexpected rectangle {%.8e, %.8e, %.8e, %.8e}.\n",
rect.left, rect.top, rect.right, rect.bottom);
@@ -3436,17 +3436,17 @@ static void test_path_geometry(BOOL d3d11)
/* GetBounds() with bezier segments and some hollow components. */
hr = ID2D1Factory_CreatePathGeometry(factory, &geometry);
- ok(SUCCEEDED(hr), "Failed to create path geometry, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = ID2D1PathGeometry_Open(geometry, &sink);
- ok(SUCCEEDED(hr), "Failed to open geometry sink, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
fill_geometry_sink_bezier(sink, 2);
hr = ID2D1GeometrySink_Close(sink);
- ok(SUCCEEDED(hr), "Failed to close geometry sink, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID2D1GeometrySink_Release(sink);
set_rect(&rect, 0.0f, 0.0f, 0.0f, 0.0f);
hr = ID2D1PathGeometry_GetBounds(geometry, NULL, &rect);
- ok(SUCCEEDED(hr), "Failed to get geometry bounds, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
match = compare_rect(&rect, 5.0f, 472.0f, 75.0f, 752.0f, 0);
ok(match, "Got unexpected rectangle {%.8e, %.8e, %.8e, %.8e}.\n",
rect.left, rect.top, rect.right, rect.bottom);
@@ -3456,7 +3456,7 @@ static void test_path_geometry(BOOL d3d11)
scale_matrix(&matrix, 2.0f, 0.5f);
set_rect(&rect, 0.0f, 0.0f, 0.0f, 0.0f);
hr = ID2D1PathGeometry_GetBounds(geometry, &matrix, &rect);
- ok(SUCCEEDED(hr), "Failed to get geometry bounds, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
match = compare_rect(&rect, 90.0f, 876.0f, 230.0f, 1016.0f, 0);
ok(match, "Got unexpected rectangle {%.8e, %.8e, %.8e, %.8e}.\n",
rect.left, rect.top, rect.right, rect.bottom);
@@ -3465,17 +3465,17 @@ static void test_path_geometry(BOOL d3d11)
/* GetBounds() with bezier segments and all hollow components. */
hr = ID2D1Factory_CreatePathGeometry(factory, &geometry);
- ok(SUCCEEDED(hr), "Failed to create path geometry, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = ID2D1PathGeometry_Open(geometry, &sink);
- ok(SUCCEEDED(hr), "Failed to open geometry sink, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
fill_geometry_sink_bezier(sink, 4);
hr = ID2D1GeometrySink_Close(sink);
- ok(SUCCEEDED(hr), "Failed to close geometry sink, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID2D1GeometrySink_Release(sink);
set_rect(&rect, 0.0f, 0.0f, 0.0f, 0.0f);
hr = ID2D1PathGeometry_GetBounds(geometry, NULL, &rect);
- ok(SUCCEEDED(hr), "Failed to get geometry bounds, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
match = compare_rect(&rect, INFINITY, INFINITY, FLT_MAX, FLT_MAX, 0);
ok(match, "Got unexpected rectangle {%.8e, %.8e, %.8e, %.8e}.\n",
rect.left, rect.top, rect.right, rect.bottom);
@@ -3485,7 +3485,7 @@ static void test_path_geometry(BOOL d3d11)
scale_matrix(&matrix, 2.0f, 0.5f);
set_rect(&rect, 0.0f, 0.0f, 0.0f, 0.0f);
hr = ID2D1PathGeometry_GetBounds(geometry, &matrix, &rect);
- ok(SUCCEEDED(hr), "Failed to get geometry bounds, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
match = compare_rect(&rect, INFINITY, INFINITY, FLT_MAX, FLT_MAX, 0);
ok(match, "Got unexpected rectangle {%.8e, %.8e, %.8e, %.8e}.\n",
rect.left, rect.top, rect.right, rect.bottom);
@@ -3493,20 +3493,20 @@ static void test_path_geometry(BOOL d3d11)
ID2D1PathGeometry_Release(geometry);
hr = ID2D1Factory_CreatePathGeometry(factory, &geometry);
- ok(SUCCEEDED(hr), "Failed to create path geometry, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = ID2D1PathGeometry_Open(geometry, &sink);
- ok(SUCCEEDED(hr), "Failed to open geometry sink, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
/* The fillmode that's used is the last one set before the sink is closed. */
ID2D1GeometrySink_SetFillMode(sink, D2D1_FILL_MODE_WINDING);
fill_geometry_sink(sink, 0);
ID2D1GeometrySink_SetFillMode(sink, D2D1_FILL_MODE_ALTERNATE);
hr = ID2D1GeometrySink_Close(sink);
- ok(SUCCEEDED(hr), "Failed to close geometry sink, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = ID2D1PathGeometry_GetFigureCount(geometry, &count);
- ok(SUCCEEDED(hr), "Failed to get figure count, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ok(count == 6, "Got unexpected figure count %u.\n", count);
hr = ID2D1PathGeometry_GetSegmentCount(geometry, &count);
- ok(SUCCEEDED(hr), "Failed to get segment count, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
/* Intersections don't create extra segments. */
ok(count == 44, "Got unexpected segment count %u.\n", count);
ID2D1GeometrySink_SetFillMode(sink, D2D1_FILL_MODE_WINDING);
@@ -3515,13 +3515,13 @@ static void test_path_geometry(BOOL d3d11)
geometry_sink_init(&simplify_sink);
hr = ID2D1PathGeometry_Simplify(geometry, D2D1_GEOMETRY_SIMPLIFICATION_OPTION_LINES,
NULL, 0.0f, &simplify_sink.ID2D1SimplifiedGeometrySink_iface);
- ok(SUCCEEDED(hr), "Failed to simplify geometry, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
geometry_sink_check(&simplify_sink, D2D1_FILL_MODE_ALTERNATE, 6, &expected_figures[0], 0);
geometry_sink_cleanup(&simplify_sink);
geometry_sink_init(&simplify_sink);
hr = ID2D1PathGeometry_Simplify(geometry, D2D1_GEOMETRY_SIMPLIFICATION_OPTION_CUBICS_AND_LINES,
NULL, 0.0f, &simplify_sink.ID2D1SimplifiedGeometrySink_iface);
- ok(SUCCEEDED(hr), "Failed to simplify geometry, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
geometry_sink_check(&simplify_sink, D2D1_FILL_MODE_ALTERNATE, 6, &expected_figures[0], 0);
geometry_sink_cleanup(&simplify_sink);
@@ -3529,12 +3529,12 @@ static void test_path_geometry(BOOL d3d11)
translate_matrix(&matrix, 80.0f, 640.0f);
scale_matrix(&matrix, 1.0f, -1.0f);
hr = ID2D1Factory_CreateTransformedGeometry(factory, (ID2D1Geometry *)geometry, &matrix, &transformed_geometry);
- ok(SUCCEEDED(hr), "Failed to create transformed geometry, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
geometry_sink_init(&simplify_sink);
hr = ID2D1TransformedGeometry_Simplify(transformed_geometry, D2D1_GEOMETRY_SIMPLIFICATION_OPTION_LINES,
NULL, 0.0f, &simplify_sink.ID2D1SimplifiedGeometrySink_iface);
- ok(SUCCEEDED(hr), "Failed to simplify geometry, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
geometry_sink_check(&simplify_sink, D2D1_FILL_MODE_ALTERNATE, 6, &expected_figures[6], 0);
geometry_sink_cleanup(&simplify_sink);
@@ -3549,7 +3549,7 @@ static void test_path_geometry(BOOL d3d11)
geometry_sink_init(&simplify_sink);
hr = ID2D1Geometry_Simplify(tmp_geometry, D2D1_GEOMETRY_SIMPLIFICATION_OPTION_LINES,
&tmp_matrix, 0.0f, &simplify_sink.ID2D1SimplifiedGeometrySink_iface);
- ok(SUCCEEDED(hr), "Failed to simplify geometry, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
geometry_sink_check(&simplify_sink, D2D1_FILL_MODE_ALTERNATE, 6, &expected_figures[6], 0);
geometry_sink_cleanup(&simplify_sink);
ID2D1Geometry_Release(tmp_geometry);
@@ -3560,7 +3560,7 @@ static void test_path_geometry(BOOL d3d11)
ID2D1RenderTarget_FillGeometry(rt, (ID2D1Geometry *)geometry, (ID2D1Brush *)brush, NULL);
ID2D1RenderTarget_FillGeometry(rt, (ID2D1Geometry *)transformed_geometry, (ID2D1Brush *)brush, NULL);
hr = ID2D1RenderTarget_EndDraw(rt, NULL, NULL);
- ok(SUCCEEDED(hr), "Failed to end draw, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
match = compare_surface(&ctx, "3aace1b22aae111cb577614fed16e4eb1650dba5");
ok(match, "Surface does not match.\n");
@@ -3568,13 +3568,13 @@ static void test_path_geometry(BOOL d3d11)
set_point(&point, 94.0f, 620.0f);
contains = TRUE;
hr = ID2D1TransformedGeometry_FillContainsPoint(transformed_geometry, point, NULL, 0.0f, &contains);
- ok(hr == S_OK, "FillContainsPoint failed, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ok(!contains, "Got unexpected contains %#x.\n", contains);
set_point(&point, 95.0f, 620.0f);
contains = FALSE;
hr = ID2D1TransformedGeometry_FillContainsPoint(transformed_geometry, point, NULL, 0.0f, &contains);
- ok(hr == S_OK, "FillContainsPoint failed, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ok(contains == TRUE, "Got unexpected contains %#x.\n", contains);
/* With transformation matrix. */
@@ -3583,31 +3583,31 @@ static void test_path_geometry(BOOL d3d11)
set_point(&point, 85.0f, 620.0f);
contains = FALSE;
hr = ID2D1TransformedGeometry_FillContainsPoint(transformed_geometry, point, &matrix, 0.0f, &contains);
- ok(hr == S_OK, "FillContainsPoint failed, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ok(contains == TRUE, "Got unexpected contains %#x.\n", contains);
ID2D1TransformedGeometry_Release(transformed_geometry);
ID2D1PathGeometry_Release(geometry);
hr = ID2D1Factory_CreatePathGeometry(factory, &geometry);
- ok(SUCCEEDED(hr), "Failed to create path geometry, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = ID2D1PathGeometry_Open(geometry, &sink);
- ok(SUCCEEDED(hr), "Failed to open geometry sink, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
fill_geometry_sink(sink, 0);
ID2D1GeometrySink_SetFillMode(sink, D2D1_FILL_MODE_WINDING);
hr = ID2D1GeometrySink_Close(sink);
- ok(SUCCEEDED(hr), "Failed to close geometry sink, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = ID2D1PathGeometry_GetFigureCount(geometry, &count);
- ok(SUCCEEDED(hr), "Failed to get figure count, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ok(count == 6, "Got unexpected figure count %u.\n", count);
hr = ID2D1PathGeometry_GetSegmentCount(geometry, &count);
- ok(SUCCEEDED(hr), "Failed to get segment count, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ok(count == 44, "Got unexpected segment count %u.\n", count);
ID2D1GeometrySink_Release(sink);
set_rect(&rect, 0.0f, 0.0f, 0.0f, 0.0f);
hr = ID2D1PathGeometry_GetBounds(geometry, NULL, &rect);
- ok(SUCCEEDED(hr), "Failed to get geometry bounds, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
match = compare_rect(&rect, 5.0f, 20.0f, 235.0f, 300.0f, 0);
ok(match, "Got unexpected rectangle {%.8e, %.8e, %.8e, %.8e}.\n",
rect.left, rect.top, rect.right, rect.bottom);
@@ -3618,7 +3618,7 @@ static void test_path_geometry(BOOL d3d11)
rotate_matrix(&matrix, M_PI / 4.0f);
set_rect(&rect, 0.0f, 0.0f, 0.0f, 0.0f);
hr = ID2D1PathGeometry_GetBounds(geometry, &matrix, &rect);
- ok(SUCCEEDED(hr), "Failed to get geometry bounds, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
match = compare_rect(&rect, -3.17192993e+02f, 8.71231079e+01f, 4.04055908e+02f, 6.17453125e+02f, 1);
ok(match, "Got unexpected rectangle {%.8e, %.8e, %.8e, %.8e}.\n",
rect.left, rect.top, rect.right, rect.bottom);
@@ -3626,7 +3626,7 @@ static void test_path_geometry(BOOL d3d11)
geometry_sink_init(&simplify_sink);
hr = ID2D1PathGeometry_Simplify(geometry, D2D1_GEOMETRY_SIMPLIFICATION_OPTION_LINES,
NULL, 0.0f, &simplify_sink.ID2D1SimplifiedGeometrySink_iface);
- ok(SUCCEEDED(hr), "Failed to simplify geometry, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
geometry_sink_check(&simplify_sink, D2D1_FILL_MODE_WINDING, 6, &expected_figures[0], 0);
geometry_sink_cleanup(&simplify_sink);
@@ -3634,50 +3634,50 @@ static void test_path_geometry(BOOL d3d11)
translate_matrix(&matrix, 320.0f, 320.0f);
scale_matrix(&matrix, -1.0f, 1.0f);
hr = ID2D1Factory_CreateTransformedGeometry(factory, (ID2D1Geometry *)geometry, &matrix, &transformed_geometry);
- ok(SUCCEEDED(hr), "Failed to create transformed geometry, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID2D1RenderTarget_BeginDraw(rt);
ID2D1RenderTarget_Clear(rt, &color);
ID2D1RenderTarget_FillGeometry(rt, (ID2D1Geometry *)geometry, (ID2D1Brush *)brush, NULL);
ID2D1RenderTarget_FillGeometry(rt, (ID2D1Geometry *)transformed_geometry, (ID2D1Brush *)brush, NULL);
hr = ID2D1RenderTarget_EndDraw(rt, NULL, NULL);
- ok(SUCCEEDED(hr), "Failed to end draw, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
match = compare_surface(&ctx, "bfb40a1f007694fa07dbd3b854f3f5d9c3e1d76b");
ok(match, "Surface does not match.\n");
ID2D1TransformedGeometry_Release(transformed_geometry);
ID2D1PathGeometry_Release(geometry);
hr = ID2D1Factory_CreatePathGeometry(factory, &geometry);
- ok(SUCCEEDED(hr), "Failed to create path geometry, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = ID2D1PathGeometry_Open(geometry, &sink);
- ok(SUCCEEDED(hr), "Failed to open geometry sink, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
fill_geometry_sink_bezier(sink, 0);
hr = ID2D1GeometrySink_Close(sink);
- ok(SUCCEEDED(hr), "Failed to close geometry sink, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = ID2D1PathGeometry_GetFigureCount(geometry, &count);
- ok(SUCCEEDED(hr), "Failed to get figure count, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ok(count == 4, "Got unexpected figure count %u.\n", count);
hr = ID2D1PathGeometry_GetSegmentCount(geometry, &count);
- ok(SUCCEEDED(hr), "Failed to get segment count, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ok(count == 20, "Got unexpected segment count %u.\n", count);
ID2D1GeometrySink_Release(sink);
geometry_sink_init(&simplify_sink);
hr = ID2D1PathGeometry_Simplify(geometry, D2D1_GEOMETRY_SIMPLIFICATION_OPTION_CUBICS_AND_LINES,
NULL, 0.0f, &simplify_sink.ID2D1SimplifiedGeometrySink_iface);
- ok(SUCCEEDED(hr), "Failed to simplify geometry, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
geometry_sink_check(&simplify_sink, D2D1_FILL_MODE_ALTERNATE, 4, &expected_figures[12], 1);
geometry_sink_cleanup(&simplify_sink);
geometry_sink_init(&simplify_sink);
hr = ID2D1PathGeometry_Simplify(geometry, D2D1_GEOMETRY_SIMPLIFICATION_OPTION_LINES,
NULL, 100.0f, &simplify_sink.ID2D1SimplifiedGeometrySink_iface);
- ok(SUCCEEDED(hr), "Failed to simplify geometry, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
geometry_sink_check(&simplify_sink, D2D1_FILL_MODE_ALTERNATE, 4, &expected_figures[20], 1);
geometry_sink_cleanup(&simplify_sink);
geometry_sink_init(&simplify_sink);
hr = ID2D1PathGeometry_Simplify(geometry, D2D1_GEOMETRY_SIMPLIFICATION_OPTION_LINES,
NULL, 10.0f, &simplify_sink.ID2D1SimplifiedGeometrySink_iface);
- ok(SUCCEEDED(hr), "Failed to simplify geometry, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
geometry_sink_check(&simplify_sink, D2D1_FILL_MODE_ALTERNATE, 4, &expected_figures[24], 1);
geometry_sink_cleanup(&simplify_sink);
@@ -3687,12 +3687,12 @@ static void test_path_geometry(BOOL d3d11)
rotate_matrix(&matrix, M_PI / 4.0f);
scale_matrix(&matrix, 2.0f, 0.5f);
hr = ID2D1Factory_CreateTransformedGeometry(factory, (ID2D1Geometry *)geometry, &matrix, &transformed_geometry);
- ok(SUCCEEDED(hr), "Failed to create transformed geometry, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
geometry_sink_init(&simplify_sink);
hr = ID2D1TransformedGeometry_Simplify(transformed_geometry, D2D1_GEOMETRY_SIMPLIFICATION_OPTION_CUBICS_AND_LINES,
NULL, 0.0f, &simplify_sink.ID2D1SimplifiedGeometrySink_iface);
- ok(SUCCEEDED(hr), "Failed to simplify geometry, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
geometry_sink_check(&simplify_sink, D2D1_FILL_MODE_ALTERNATE, 4, &expected_figures[16], 4);
geometry_sink_cleanup(&simplify_sink);
@@ -3701,7 +3701,7 @@ static void test_path_geometry(BOOL d3d11)
ID2D1RenderTarget_FillGeometry(rt, (ID2D1Geometry *)geometry, (ID2D1Brush *)brush, NULL);
ID2D1RenderTarget_FillGeometry(rt, (ID2D1Geometry *)transformed_geometry, (ID2D1Brush *)brush, NULL);
hr = ID2D1RenderTarget_EndDraw(rt, NULL, NULL);
- ok(SUCCEEDED(hr), "Failed to end draw, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
match = compare_figure(&ctx, 0, 0, 160, 160, 0xff652e89, 64,
"7xoCngECngECngECngECngECngECngECnQEEnAEEnAEEnAEEnAEEmwEGmgEGmgEGmgEGmQEImAEI"
"lAEECASLAQgKCIEBDQoMew8KD3YQDBByEgwSbhMOEmwUDhRpFBAUZxUQFWUVEhVjFhIWYRYUFl8X"
@@ -3750,37 +3750,37 @@ static void test_path_geometry(BOOL d3d11)
ID2D1PathGeometry_Release(geometry);
hr = ID2D1Factory_CreatePathGeometry(factory, &geometry);
- ok(SUCCEEDED(hr), "Failed to create path geometry, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = ID2D1PathGeometry_Open(geometry, &sink);
- ok(SUCCEEDED(hr), "Failed to open geometry sink, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
fill_geometry_sink_bezier(sink, 0);
ID2D1GeometrySink_SetFillMode(sink, D2D1_FILL_MODE_WINDING);
hr = ID2D1GeometrySink_Close(sink);
- ok(SUCCEEDED(hr), "Failed to close geometry sink, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = ID2D1PathGeometry_GetFigureCount(geometry, &count);
- ok(SUCCEEDED(hr), "Failed to get figure count, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ok(count == 4, "Got unexpected figure count %u.\n", count);
hr = ID2D1PathGeometry_GetSegmentCount(geometry, &count);
- ok(SUCCEEDED(hr), "Failed to get segment count, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ok(count == 20, "Got unexpected segment count %u.\n", count);
ID2D1GeometrySink_Release(sink);
geometry_sink_init(&simplify_sink);
hr = ID2D1PathGeometry_Simplify(geometry, D2D1_GEOMETRY_SIMPLIFICATION_OPTION_CUBICS_AND_LINES,
NULL, 0.0f, &simplify_sink.ID2D1SimplifiedGeometrySink_iface);
- ok(SUCCEEDED(hr), "Failed to simplify geometry, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
geometry_sink_check(&simplify_sink, D2D1_FILL_MODE_WINDING, 4, &expected_figures[12], 1);
geometry_sink_cleanup(&simplify_sink);
geometry_sink_init(&simplify_sink);
hr = ID2D1PathGeometry_Simplify(geometry, D2D1_GEOMETRY_SIMPLIFICATION_OPTION_LINES,
NULL, 100.0f, &simplify_sink.ID2D1SimplifiedGeometrySink_iface);
- ok(SUCCEEDED(hr), "Failed to simplify geometry, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
geometry_sink_check(&simplify_sink, D2D1_FILL_MODE_WINDING, 4, &expected_figures[20], 1);
geometry_sink_cleanup(&simplify_sink);
geometry_sink_init(&simplify_sink);
hr = ID2D1PathGeometry_Simplify(geometry, D2D1_GEOMETRY_SIMPLIFICATION_OPTION_LINES,
NULL, 10.0f, &simplify_sink.ID2D1SimplifiedGeometrySink_iface);
- ok(SUCCEEDED(hr), "Failed to simplify geometry, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
geometry_sink_check(&simplify_sink, D2D1_FILL_MODE_WINDING, 4, &expected_figures[24], 1);
geometry_sink_cleanup(&simplify_sink);
@@ -3790,14 +3790,14 @@ static void test_path_geometry(BOOL d3d11)
rotate_matrix(&matrix, M_PI / -4.0f);
scale_matrix(&matrix, 2.0f, 0.5f);
hr = ID2D1Factory_CreateTransformedGeometry(factory, (ID2D1Geometry *)geometry, &matrix, &transformed_geometry);
- ok(SUCCEEDED(hr), "Failed to create transformed geometry, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID2D1RenderTarget_BeginDraw(rt);
ID2D1RenderTarget_Clear(rt, &color);
ID2D1RenderTarget_FillGeometry(rt, (ID2D1Geometry *)geometry, (ID2D1Brush *)brush, NULL);
ID2D1RenderTarget_FillGeometry(rt, (ID2D1Geometry *)transformed_geometry, (ID2D1Brush *)brush, NULL);
hr = ID2D1RenderTarget_EndDraw(rt, NULL, NULL);
- ok(SUCCEEDED(hr), "Failed to end draw, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
match = compare_figure(&ctx, 0, 0, 160, 160, 0xff652e89, 64,
"7xoCngECngECngECngECngECngECngECnQEEnAEEnAEEnAEEnAEEmwEGmgEGmgEGmgEGmQEImAEI"
"lAEQiwEagQEjeyh2LHIwbjNsNmk4ZzplPGM+YUBfQl1DXURbRlpGWUhYSFdKVkpVS1VMVExUTFRM"
@@ -3834,9 +3834,9 @@ static void test_path_geometry(BOOL d3d11)
ID2D1PathGeometry_Release(geometry);
hr = ID2D1Factory_CreatePathGeometry(factory, &geometry);
- ok(SUCCEEDED(hr), "Failed to create path geometry, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = ID2D1PathGeometry_Open(geometry, &sink);
- ok(SUCCEEDED(hr), "Failed to open geometry sink, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
set_point(&point, 40.0f, 20.0f);
ID2D1GeometrySink_BeginFigure(sink, point, D2D1_FIGURE_BEGIN_FILLED);
@@ -3851,12 +3851,12 @@ static void test_path_geometry(BOOL d3d11)
ID2D1GeometrySink_EndFigure(sink, D2D1_FIGURE_END_CLOSED);
hr = ID2D1GeometrySink_Close(sink);
- ok(SUCCEEDED(hr), "Failed to close geometry sink, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = ID2D1PathGeometry_GetFigureCount(geometry, &count);
- ok(SUCCEEDED(hr), "Failed to get figure count, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ok(count == 2, "Got unexpected figure count %u.\n", count);
hr = ID2D1PathGeometry_GetSegmentCount(geometry, &count);
- ok(SUCCEEDED(hr), "Failed to get segment count, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ok(count == 6, "Got unexpected segment count %u.\n", count);
ID2D1GeometrySink_Release(sink);
@@ -3864,40 +3864,40 @@ static void test_path_geometry(BOOL d3d11)
ID2D1RenderTarget_Clear(rt, &color);
ID2D1RenderTarget_FillGeometry(rt, (ID2D1Geometry *)geometry, (ID2D1Brush *)brush, NULL);
hr = ID2D1RenderTarget_EndDraw(rt, NULL, NULL);
- ok(SUCCEEDED(hr), "Failed to end draw, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
match = compare_surface(&ctx, "a875e68e0cb9c055927b1b50b879f90b24e38470");
ok(match, "Surface does not match.\n");
ID2D1PathGeometry_Release(geometry);
hr = ID2D1Factory_CreatePathGeometry(factory, &geometry);
- ok(SUCCEEDED(hr), "Failed to create path geometry, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = ID2D1PathGeometry_Open(geometry, &sink);
- ok(SUCCEEDED(hr), "Failed to open geometry sink, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
set_point(&point, 40.0f, 20.0f);
ID2D1GeometrySink_BeginFigure(sink, point, D2D1_FIGURE_BEGIN_HOLLOW);
line_to(sink, 75.0f, 300.0f);
line_to(sink, 5.0f, 300.0f);
ID2D1GeometrySink_EndFigure(sink, D2D1_FIGURE_END_OPEN);
hr = ID2D1GeometrySink_Close(sink);
- ok(SUCCEEDED(hr), "Failed to close geometry sink, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID2D1GeometrySink_Release(sink);
hr = ID2D1PathGeometry_GetSegmentCount(geometry, &count);
- ok(SUCCEEDED(hr), "Failed to get segment count, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ok(count == 2, "Got unexpected segment count %u.\n", count);
geometry_sink_init(&simplify_sink);
hr = ID2D1PathGeometry_Simplify(geometry, D2D1_GEOMETRY_SIMPLIFICATION_OPTION_LINES,
NULL, 0.0f, &simplify_sink.ID2D1SimplifiedGeometrySink_iface);
- ok(SUCCEEDED(hr), "Failed to simplify geometry, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
geometry_sink_check(&simplify_sink, D2D1_FILL_MODE_ALTERNATE, 1, &expected_figures[28], 1);
geometry_sink_cleanup(&simplify_sink);
ID2D1PathGeometry_Release(geometry);
hr = ID2D1Factory_CreatePathGeometry(factory, &geometry);
- ok(hr == S_OK, "Got unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = ID2D1PathGeometry_Open(geometry, &sink);
- ok(hr == S_OK, "Got unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
set_point(&point, 20.0f, 80.0f);
ID2D1GeometrySink_BeginFigure(sink, point, D2D1_FIGURE_BEGIN_FILLED);
@@ -3924,12 +3924,12 @@ static void test_path_geometry(BOOL d3d11)
ID2D1GeometrySink_EndFigure(sink, D2D1_FIGURE_END_CLOSED);
hr = ID2D1GeometrySink_Close(sink);
- ok(hr == S_OK, "Got unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID2D1GeometrySink_Release(sink);
set_rect(&rect, 0.0f, 0.0f, 0.0f, 0.0f);
hr = ID2D1PathGeometry_GetBounds(geometry, NULL, &rect);
- ok(hr == S_OK, "Got unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
match = compare_rect(&rect, 20.0f, 20.0f, 180.0f, 180.0f, 0);
ok(match, "Got unexpected rectangle {%.8e, %.8e, %.8e, %.8e}.\n",
rect.left, rect.top, rect.right, rect.bottom);
@@ -3937,7 +3937,7 @@ static void test_path_geometry(BOOL d3d11)
geometry_sink_init(&simplify_sink);
hr = ID2D1PathGeometry_Simplify(geometry, D2D1_GEOMETRY_SIMPLIFICATION_OPTION_CUBICS_AND_LINES,
NULL, 0.0f, &simplify_sink.ID2D1SimplifiedGeometrySink_iface);
- ok(hr == S_OK, "Got unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
geometry_sink_check(&simplify_sink, D2D1_FILL_MODE_ALTERNATE, 4, &expected_figures[29], 1);
geometry_sink_cleanup(&simplify_sink);
@@ -4010,11 +4010,11 @@ static void test_rectangle_geometry(BOOL d3d11)
};
hr = D2D1CreateFactory(D2D1_FACTORY_TYPE_SINGLE_THREADED, &IID_ID2D1Factory, NULL, (void **)&factory);
- ok(SUCCEEDED(hr), "Failed to create factory, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
set_rect(&rect, 0.0f, 0.0f, 0.0f, 0.0f);
hr = ID2D1Factory_CreateRectangleGeometry(factory, &rect, &geometry);
- ok(SUCCEEDED(hr), "Failed to create geometry, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID2D1RectangleGeometry_GetRect(geometry, &rect2);
match = compare_rect(&rect2, 0.0f, 0.0f, 0.0f, 0.0f, 0);
ok(match, "Got unexpected rectangle {%.8e, %.8e, %.8e, %.8e}.\n",
@@ -4023,7 +4023,7 @@ static void test_rectangle_geometry(BOOL d3d11)
set_rect(&rect, 50.0f, 0.0f, 40.0f, 100.0f);
hr = ID2D1Factory_CreateRectangleGeometry(factory, &rect, &geometry);
- ok(SUCCEEDED(hr), "Failed to create geometry, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID2D1RectangleGeometry_GetRect(geometry, &rect2);
match = compare_rect(&rect2, 50.0f, 0.0f, 40.0f, 100.0f, 0);
ok(match, "Got unexpected rectangle {%.8e, %.8e, %.8e, %.8e}.\n",
@@ -4032,7 +4032,7 @@ static void test_rectangle_geometry(BOOL d3d11)
set_rect(&rect, 0.0f, 100.0f, 40.0f, 50.0f);
hr = ID2D1Factory_CreateRectangleGeometry(factory, &rect, &geometry);
- ok(SUCCEEDED(hr), "Failed to create geometry, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID2D1RectangleGeometry_GetRect(geometry, &rect2);
match = compare_rect(&rect2, 0.0f, 100.0f, 40.0f, 50.0f, 0);
ok(match, "Got unexpected rectangle {%.8e, %.8e, %.8e, %.8e}.\n",
@@ -4041,7 +4041,7 @@ static void test_rectangle_geometry(BOOL d3d11)
set_rect(&rect, 50.0f, 100.0f, 40.0f, 50.0f);
hr = ID2D1Factory_CreateRectangleGeometry(factory, &rect, &geometry);
- ok(SUCCEEDED(hr), "Failed to create geometry, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID2D1RectangleGeometry_GetRect(geometry, &rect2);
match = compare_rect(&rect2, 50.0f, 100.0f, 40.0f, 50.0f, 0);
ok(match, "Got unexpected rectangle {%.8e, %.8e, %.8e, %.8e}.\n",
@@ -4050,63 +4050,63 @@ static void test_rectangle_geometry(BOOL d3d11)
set_rect(&rect, 0.0f, 0.0f, 10.0f, 20.0f);
hr = ID2D1Factory_CreateRectangleGeometry(factory, &rect, &geometry);
- ok(SUCCEEDED(hr), "Failed to create geometry, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
/* Edge. */
contains = FALSE;
set_point(&point, 0.0f, 0.0f);
hr = ID2D1RectangleGeometry_FillContainsPoint(geometry, point, NULL, 0.0f, &contains);
- ok(SUCCEEDED(hr), "FillContainsPoint() failed, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ok(!!contains, "Got wrong hit test result %d.\n", contains);
/* Within tolerance limit around corner. */
contains = TRUE;
set_point(&point, -D2D1_DEFAULT_FLATTENING_TOLERANCE, 0.0f);
hr = ID2D1RectangleGeometry_FillContainsPoint(geometry, point, NULL, 0.0f, &contains);
- ok(SUCCEEDED(hr), "FillContainsPoint() failed, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ok(!contains, "Got wrong hit test result %d.\n", contains);
contains = FALSE;
set_point(&point, -D2D1_DEFAULT_FLATTENING_TOLERANCE + 0.01f, 0.0f);
hr = ID2D1RectangleGeometry_FillContainsPoint(geometry, point, NULL, 0.0f, &contains);
- ok(SUCCEEDED(hr), "FillContainsPoint() failed, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ok(!!contains, "Got wrong hit test result %d.\n", contains);
contains = TRUE;
set_point(&point, -D2D1_DEFAULT_FLATTENING_TOLERANCE - 0.01f, 0.0f);
hr = ID2D1RectangleGeometry_FillContainsPoint(geometry, point, NULL, 0.0f, &contains);
- ok(SUCCEEDED(hr), "FillContainsPoint() failed, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ok(!contains, "Got wrong hit test result %d.\n", contains);
contains = TRUE;
set_point(&point, -D2D1_DEFAULT_FLATTENING_TOLERANCE, -D2D1_DEFAULT_FLATTENING_TOLERANCE);
hr = ID2D1RectangleGeometry_FillContainsPoint(geometry, point, NULL, 0.0f, &contains);
- ok(SUCCEEDED(hr), "FillContainsPoint() failed, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ok(!contains, "Got wrong hit test result %d.\n", contains);
/* Inside. */
contains = FALSE;
set_point(&point, 5.0f, 5.0f);
hr = ID2D1RectangleGeometry_FillContainsPoint(geometry, point, NULL, 0.0f, &contains);
- ok(SUCCEEDED(hr), "FillContainsPoint() failed, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ok(!!contains, "Got wrong hit test result %d.\n", contains);
/* Test GetBounds() and Simplify(). */
hr = ID2D1RectangleGeometry_GetBounds(geometry, NULL, &rect);
- ok(SUCCEEDED(hr), "Failed to get bounds.\n");
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
match = compare_rect(&rect, 0.0f, 0.0f, 10.0f, 20.0f, 0);
ok(match, "Got unexpected bounds {%.8e, %.8e, %.8e, %.8e}.\n",
rect.left, rect.top, rect.right, rect.bottom);
geometry_sink_init(&sink);
hr = ID2D1RectangleGeometry_Simplify(geometry, D2D1_GEOMETRY_SIMPLIFICATION_OPTION_CUBICS_AND_LINES,
NULL, 0.0f, &sink.ID2D1SimplifiedGeometrySink_iface);
- ok(SUCCEEDED(hr), "Failed to simplify geometry, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
geometry_sink_check(&sink, D2D1_FILL_MODE_ALTERNATE, 1, &expected_figures[0], 0);
geometry_sink_cleanup(&sink);
geometry_sink_init(&sink);
hr = ID2D1RectangleGeometry_Simplify(geometry, D2D1_GEOMETRY_SIMPLIFICATION_OPTION_LINES,
NULL, 0.0f, &sink.ID2D1SimplifiedGeometrySink_iface);
- ok(SUCCEEDED(hr), "Failed to simplify geometry, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
geometry_sink_check(&sink, D2D1_FILL_MODE_ALTERNATE, 1, &expected_figures[0], 0);
geometry_sink_cleanup(&sink);
@@ -4115,14 +4115,14 @@ static void test_rectangle_geometry(BOOL d3d11)
scale_matrix(&matrix, 3.0f, 2.0f);
rotate_matrix(&matrix, M_PI / -5.0f);
hr = ID2D1RectangleGeometry_GetBounds(geometry, &matrix, &rect);
- ok(SUCCEEDED(hr), "Failed to get bounds.\n");
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
match = compare_rect(&rect, 2.00000000e+01f, 1.82442951e+01f, 7.95376282e+01f, 6.23606796e+01f, 0);
ok(match, "Got unexpected bounds {%.8e, %.8e, %.8e, %.8e}.\n",
rect.left, rect.top, rect.right, rect.bottom);
geometry_sink_init(&sink);
hr = ID2D1RectangleGeometry_Simplify(geometry, D2D1_GEOMETRY_SIMPLIFICATION_OPTION_CUBICS_AND_LINES,
&matrix, 0.0f, &sink.ID2D1SimplifiedGeometrySink_iface);
- ok(SUCCEEDED(hr), "Failed to simplify geometry, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
geometry_sink_check(&sink, D2D1_FILL_MODE_ALTERNATE, 1, &expected_figures[1], 1);
geometry_sink_cleanup(&sink);
@@ -4130,14 +4130,14 @@ static void test_rectangle_geometry(BOOL d3d11)
translate_matrix(&matrix, 25.0f, 15.0f);
scale_matrix(&matrix, 0.0f, 2.0f);
hr = ID2D1RectangleGeometry_GetBounds(geometry, &matrix, &rect);
- ok(SUCCEEDED(hr), "Failed to get bounds.\n");
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
match = compare_rect(&rect, 25.0f, 15.0f, 25.0f, 55.0f, 0);
ok(match, "Got unexpected bounds {%.8e, %.8e, %.8e, %.8e}.\n",
rect.left, rect.top, rect.right, rect.bottom);
geometry_sink_init(&sink);
hr = ID2D1RectangleGeometry_Simplify(geometry, D2D1_GEOMETRY_SIMPLIFICATION_OPTION_LINES,
&matrix, 0.0f, &sink.ID2D1SimplifiedGeometrySink_iface);
- ok(SUCCEEDED(hr), "Failed to simplify geometry, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
geometry_sink_check(&sink, D2D1_FILL_MODE_ALTERNATE, 1, &expected_figures[2], 0);
geometry_sink_cleanup(&sink);
@@ -4145,14 +4145,14 @@ static void test_rectangle_geometry(BOOL d3d11)
translate_matrix(&matrix, 30.0f, 45.0f);
scale_matrix(&matrix, 0.5f, 0.0f);
hr = ID2D1RectangleGeometry_GetBounds(geometry, &matrix, &rect);
- ok(SUCCEEDED(hr), "Failed to get bounds.\n");
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
match = compare_rect(&rect, 30.0f, 45.0f, 35.0f, 45.0f, 0);
ok(match, "Got unexpected bounds {%.8e, %.8e, %.8e, %.8e}.\n",
rect.left, rect.top, rect.right, rect.bottom);
geometry_sink_init(&sink);
hr = ID2D1RectangleGeometry_Simplify(geometry, D2D1_GEOMETRY_SIMPLIFICATION_OPTION_LINES,
&matrix, 0.0f, &sink.ID2D1SimplifiedGeometrySink_iface);
- ok(SUCCEEDED(hr), "Failed to simplify geometry, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
geometry_sink_check(&sink, D2D1_FILL_MODE_ALTERNATE, 1, &expected_figures[3], 0);
geometry_sink_cleanup(&sink);
@@ -4161,23 +4161,23 @@ static void test_rectangle_geometry(BOOL d3d11)
rotate_matrix(&matrix, M_PI / 3.0f);
translate_matrix(&matrix, 30.0f, 20.0f);
hr = ID2D1Factory_CreateTransformedGeometry(factory, (ID2D1Geometry *)geometry, &matrix, &transformed_geometry);
- ok(SUCCEEDED(hr), "Failed to create transformed geometry, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID2D1TransformedGeometry_GetBounds(transformed_geometry, NULL, &rect);
- ok(SUCCEEDED(hr), "Failed to get bounds.\n");
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
match = compare_rect(&rect, -7.85640717e+01f, 1.79903809e+02f, 1.07179594e+01f, 2.73205078e+02f, 1);
ok(match, "Got unexpected bounds {%.8e, %.8e, %.8e, %.8e}.\n",
rect.left, rect.top, rect.right, rect.bottom);
geometry_sink_init(&sink);
hr = ID2D1TransformedGeometry_Simplify(transformed_geometry, D2D1_GEOMETRY_SIMPLIFICATION_OPTION_CUBICS_AND_LINES,
NULL, 0.0f, &sink.ID2D1SimplifiedGeometrySink_iface);
- ok(SUCCEEDED(hr), "Failed to simplify geometry, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
geometry_sink_check(&sink, D2D1_FILL_MODE_ALTERNATE, 1, &expected_figures[4], 1);
geometry_sink_cleanup(&sink);
geometry_sink_init(&sink);
hr = ID2D1TransformedGeometry_Simplify(transformed_geometry, D2D1_GEOMETRY_SIMPLIFICATION_OPTION_LINES,
NULL, 0.0f, &sink.ID2D1SimplifiedGeometrySink_iface);
- ok(SUCCEEDED(hr), "Failed to simplify geometry, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
geometry_sink_check(&sink, D2D1_FILL_MODE_ALTERNATE, 1, &expected_figures[4], 1);
geometry_sink_cleanup(&sink);
@@ -4185,42 +4185,42 @@ static void test_rectangle_geometry(BOOL d3d11)
rotate_matrix(&matrix, M_PI / -3.0f);
scale_matrix(&matrix, 0.25f, 0.2f);
ID2D1TransformedGeometry_GetBounds(transformed_geometry, &matrix, &rect);
- ok(SUCCEEDED(hr), "Failed to get bounds.\n");
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
match = compare_rect(&rect, 30.0f, 20.0f, 40.0f, 40.0f, 2);
ok(match, "Got unexpected bounds {%.8e, %.8e, %.8e, %.8e}.\n",
rect.left, rect.top, rect.right, rect.bottom);
geometry_sink_init(&sink);
hr = ID2D1TransformedGeometry_Simplify(transformed_geometry, D2D1_GEOMETRY_SIMPLIFICATION_OPTION_LINES,
&matrix, 0.0f, &sink.ID2D1SimplifiedGeometrySink_iface);
- ok(SUCCEEDED(hr), "Failed to simplify geometry, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
geometry_sink_check(&sink, D2D1_FILL_MODE_ALTERNATE, 1, &expected_figures[5], 4);
geometry_sink_cleanup(&sink);
set_matrix_identity(&matrix);
scale_matrix(&matrix, 2.0f, 0.0f);
ID2D1TransformedGeometry_GetBounds(transformed_geometry, &matrix, &rect);
- ok(SUCCEEDED(hr), "Failed to get bounds.\n");
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
match = compare_rect(&rect, -1.57128143e+02f, 0.00000000e+00f, 2.14359188e+01f, 0.00000000e+00f, 1);
ok(match, "Got unexpected bounds {%.8e, %.8e, %.8e, %.8e}.\n",
rect.left, rect.top, rect.right, rect.bottom);
geometry_sink_init(&sink);
hr = ID2D1TransformedGeometry_Simplify(transformed_geometry, D2D1_GEOMETRY_SIMPLIFICATION_OPTION_CUBICS_AND_LINES,
&matrix, 0.0f, &sink.ID2D1SimplifiedGeometrySink_iface);
- ok(SUCCEEDED(hr), "Failed to simplify geometry, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
geometry_sink_check(&sink, D2D1_FILL_MODE_ALTERNATE, 1, &expected_figures[6], 1);
geometry_sink_cleanup(&sink);
set_matrix_identity(&matrix);
scale_matrix(&matrix, 0.0f, 0.5f);
ID2D1TransformedGeometry_GetBounds(transformed_geometry, &matrix, &rect);
- ok(SUCCEEDED(hr), "Failed to get bounds.\n");
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
match = compare_rect(&rect, 0.00000000e+00f, 8.99519043e+01f, 0.00000000e+00, 1.36602539e+02f, 1);
ok(match, "Got unexpected bounds {%.8e, %.8e, %.8e, %.8e}.\n",
rect.left, rect.top, rect.right, rect.bottom);
geometry_sink_init(&sink);
hr = ID2D1TransformedGeometry_Simplify(transformed_geometry, D2D1_GEOMETRY_SIMPLIFICATION_OPTION_CUBICS_AND_LINES,
&matrix, 0.0f, &sink.ID2D1SimplifiedGeometrySink_iface);
- ok(SUCCEEDED(hr), "Failed to simplify geometry, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
geometry_sink_check(&sink, D2D1_FILL_MODE_ALTERNATE, 1, &expected_figures[7], 1);
geometry_sink_cleanup(&sink);
@@ -4237,11 +4237,11 @@ static void test_rounded_rectangle_geometry(BOOL d3d11)
HRESULT hr;
hr = D2D1CreateFactory(D2D1_FACTORY_TYPE_SINGLE_THREADED, &IID_ID2D1Factory, NULL, (void **)&factory);
- ok(SUCCEEDED(hr), "Failed to create factory, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
set_rounded_rect(&rect, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f);
hr = ID2D1Factory_CreateRoundedRectangleGeometry(factory, &rect, &geometry);
- ok(SUCCEEDED(hr), "Failed to create geometry, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID2D1RoundedRectangleGeometry_GetRoundedRect(geometry, &rect2);
ok(!memcmp(&rect, &rect2, sizeof(rect)), "Got unexpected rectangle {%.8e, %.8e, %.8e, %.8e, %.8e, %.8e}.\n",
@@ -4325,10 +4325,10 @@ static void test_bitmap_formats(BOOL d3d11)
bitmap_desc.pixelFormat.alphaMode = j;
hr = ID2D1RenderTarget_CreateBitmap(rt, size, NULL, 0, &bitmap_desc, &bitmap);
if (bitmap_formats[i].mask & (1u << j))
- ok(hr == S_OK, "Got unexpected hr %#x, for format %#x/%#x.\n",
+ ok(hr == S_OK, "Got unexpected hr %#lx, for format %#x/%#x.\n",
hr, bitmap_formats[i].format, j);
else
- ok(hr == D2DERR_UNSUPPORTED_PIXEL_FORMAT, "Got unexpected hr %#x, for format %#x/%#x.\n",
+ ok(hr == D2DERR_UNSUPPORTED_PIXEL_FORMAT, "Got unexpected hr %#lx, for format %#x/%#x.\n",
hr, bitmap_formats[i].format, j);
if (SUCCEEDED(hr))
ID2D1Bitmap_Release(bitmap);
@@ -4374,22 +4374,22 @@ static void test_alpha_mode(BOOL d3d11)
bitmap_desc.dpiX = 96.0f / 40.0f;
bitmap_desc.dpiY = 96.0f / 30.0f;
hr = ID2D1RenderTarget_CreateBitmap(rt, size, bitmap_data, 4 * sizeof(*bitmap_data), &bitmap_desc, &bitmap);
- ok(SUCCEEDED(hr), "Failed to create bitmap, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = ID2D1RenderTarget_CreateBitmapBrush(rt, bitmap, NULL, NULL, &bitmap_brush);
- ok(SUCCEEDED(hr), "Failed to create brush, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID2D1BitmapBrush_SetInterpolationMode(bitmap_brush, D2D1_BITMAP_INTERPOLATION_MODE_NEAREST_NEIGHBOR);
ID2D1BitmapBrush_SetExtendModeX(bitmap_brush, D2D1_EXTEND_MODE_WRAP);
ID2D1BitmapBrush_SetExtendModeY(bitmap_brush, D2D1_EXTEND_MODE_WRAP);
set_color(&color, 0.0f, 1.0f, 0.0f, 0.75f);
hr = ID2D1RenderTarget_CreateSolidColorBrush(rt, &color, NULL, &color_brush);
- ok(SUCCEEDED(hr), "Failed to create brush, hr %#x.\n", hr);
+ ok(SUCCEEDED(hr), "Failed to create brush, hr %#lx.\n", hr);
ID2D1RenderTarget_BeginDraw(rt);
ID2D1RenderTarget_Clear(rt, NULL);
hr = ID2D1RenderTarget_EndDraw(rt, NULL, NULL);
- ok(SUCCEEDED(hr), "Failed to end draw, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
match = compare_surface(&ctx, "48c41aff3a130a17ee210866b2ab7d36763934d5");
ok(match, "Surface does not match.\n");
@@ -4397,7 +4397,7 @@ static void test_alpha_mode(BOOL d3d11)
set_color(&color, 1.0f, 0.0f, 0.0f, 0.25f);
ID2D1RenderTarget_Clear(rt, &color);
hr = ID2D1RenderTarget_EndDraw(rt, NULL, NULL);
- ok(SUCCEEDED(hr), "Failed to end draw, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
match = compare_surface(&ctx, "6487e683730fb5a77c1911388d00b04664c5c4e4");
ok(match, "Surface does not match.\n");
@@ -4405,7 +4405,7 @@ static void test_alpha_mode(BOOL d3d11)
set_color(&color, 0.0f, 0.0f, 1.0f, 0.75f);
ID2D1RenderTarget_Clear(rt, &color);
hr = ID2D1RenderTarget_EndDraw(rt, NULL, NULL);
- ok(SUCCEEDED(hr), "Failed to end draw, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
match = compare_surface(&ctx, "7a35ba09e43cbaf591388ff1ef8de56157630c98");
ok(match, "Surface does not match.\n");
@@ -4423,7 +4423,7 @@ static void test_alpha_mode(BOOL d3d11)
ID2D1Bitmap_Release(bitmap);
bitmap_desc.pixelFormat.alphaMode = D2D1_ALPHA_MODE_PREMULTIPLIED;
hr = ID2D1RenderTarget_CreateBitmap(rt, size, bitmap_data, 4 * sizeof(*bitmap_data), &bitmap_desc, &bitmap);
- ok(SUCCEEDED(hr), "Failed to create bitmap, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID2D1BitmapBrush_SetBitmap(bitmap_brush, bitmap);
set_rect(&rect, 0.0f, 120.0f, 160.0f, 240.0f);
@@ -4446,7 +4446,7 @@ static void test_alpha_mode(BOOL d3d11)
ID2D1RenderTarget_FillRectangle(rt, &rect, (ID2D1Brush *)color_brush);
hr = ID2D1RenderTarget_EndDraw(rt, NULL, NULL);
- ok(SUCCEEDED(hr), "Failed to end draw, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
match = compare_surface(&ctx, "14f8ac64b70966c7c3c6281c59aaecdb17c3b16a");
ok(match, "Surface does not match.\n");
@@ -4465,12 +4465,12 @@ static void test_alpha_mode(BOOL d3d11)
ID2D1Bitmap_Release(bitmap);
bitmap_desc.pixelFormat.alphaMode = D2D1_ALPHA_MODE_IGNORE;
hr = ID2D1RenderTarget_CreateBitmap(rt, size, bitmap_data, 4 * sizeof(*bitmap_data), &bitmap_desc, &bitmap);
- ok(SUCCEEDED(hr), "Failed to create bitmap, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID2D1BitmapBrush_SetBitmap(bitmap_brush, bitmap);
ID2D1BitmapBrush_Release(bitmap_brush);
hr = ID2D1RenderTarget_CreateBitmapBrush(rt, bitmap, NULL, NULL, &bitmap_brush);
- ok(SUCCEEDED(hr), "Failed to create brush, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID2D1BitmapBrush_SetInterpolationMode(bitmap_brush, D2D1_BITMAP_INTERPOLATION_MODE_NEAREST_NEIGHBOR);
ID2D1BitmapBrush_SetExtendModeX(bitmap_brush, D2D1_EXTEND_MODE_WRAP);
ID2D1BitmapBrush_SetExtendModeY(bitmap_brush, D2D1_EXTEND_MODE_WRAP);
@@ -4478,12 +4478,12 @@ static void test_alpha_mode(BOOL d3d11)
ID2D1SolidColorBrush_Release(color_brush);
set_color(&color, 0.0f, 1.0f, 0.0f, 0.75f);
hr = ID2D1RenderTarget_CreateSolidColorBrush(rt, &color, NULL, &color_brush);
- ok(SUCCEEDED(hr), "Failed to create brush, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID2D1RenderTarget_BeginDraw(rt);
ID2D1RenderTarget_Clear(rt, NULL);
hr = ID2D1RenderTarget_EndDraw(rt, NULL, NULL);
- ok(SUCCEEDED(hr), "Failed to end draw, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
match = compare_surface(&ctx, "b44510bf2d2e61a8d7c0ad862de49a471f1fd13f");
ok(match, "Surface does not match.\n");
@@ -4491,7 +4491,7 @@ static void test_alpha_mode(BOOL d3d11)
set_color(&color, 1.0f, 0.0f, 0.0f, 0.25f);
ID2D1RenderTarget_Clear(rt, &color);
hr = ID2D1RenderTarget_EndDraw(rt, NULL, NULL);
- ok(SUCCEEDED(hr), "Failed to end draw, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
match = compare_surface(&ctx, "2184f4a9198fc1de09ac85301b7a03eebadd9b81");
ok(match, "Surface does not match.\n");
@@ -4499,7 +4499,7 @@ static void test_alpha_mode(BOOL d3d11)
set_color(&color, 0.0f, 0.0f, 1.0f, 0.75f);
ID2D1RenderTarget_Clear(rt, &color);
hr = ID2D1RenderTarget_EndDraw(rt, NULL, NULL);
- ok(SUCCEEDED(hr), "Failed to end draw, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
match = compare_surface(&ctx, "6527ec83b4039c895b50f9b3e144fe0cf90d1889");
ok(match, "Surface does not match.\n");
@@ -4517,7 +4517,7 @@ static void test_alpha_mode(BOOL d3d11)
ID2D1Bitmap_Release(bitmap);
bitmap_desc.pixelFormat.alphaMode = D2D1_ALPHA_MODE_PREMULTIPLIED;
hr = ID2D1RenderTarget_CreateBitmap(rt, size, bitmap_data, 4 * sizeof(*bitmap_data), &bitmap_desc, &bitmap);
- ok(SUCCEEDED(hr), "Failed to create bitmap, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID2D1BitmapBrush_SetBitmap(bitmap_brush, bitmap);
set_rect(&rect, 0.0f, 120.0f, 160.0f, 240.0f);
@@ -4540,12 +4540,12 @@ static void test_alpha_mode(BOOL d3d11)
ID2D1RenderTarget_FillRectangle(rt, &rect, (ID2D1Brush *)color_brush);
hr = ID2D1RenderTarget_EndDraw(rt, NULL, NULL);
- ok(SUCCEEDED(hr), "Failed to end draw, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
match = compare_surface(&ctx, "465f5a3190d7bde408b3206b4be939fb22f8a3d6");
ok(match, "Surface does not match.\n");
refcount = ID2D1Bitmap_Release(bitmap);
- ok(refcount == 1, "Bitmap has %u references left.\n", refcount);
+ ok(refcount == 1, "Bitmap has %lu references left.\n", refcount);
ID2D1SolidColorBrush_Release(color_brush);
ID2D1BitmapBrush_Release(bitmap_brush);
ID2D1RenderTarget_Release(rt);
@@ -4579,18 +4579,18 @@ static void test_shared_bitmap(BOOL d3d11)
window2 = create_window();
swapchain2 = create_swapchain(ctx.device, window2, TRUE);
hr = IDXGISwapChain_GetBuffer(swapchain2, 0, &IID_IDXGISurface, (void **)&surface2);
- ok(SUCCEEDED(hr), "Failed to get buffer, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
CoInitializeEx(NULL, COINIT_APARTMENTTHREADED);
hr = CoCreateInstance(&CLSID_WICImagingFactory, NULL, CLSCTX_INPROC_SERVER,
&IID_IWICImagingFactory, (void **)&wic_factory);
- ok(SUCCEEDED(hr), "Failed to create WIC imaging factory, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = IWICImagingFactory_CreateBitmap(wic_factory, 640, 480,
&GUID_WICPixelFormat32bppPBGRA, WICBitmapCacheOnDemand, &wic_bitmap1);
- ok(SUCCEEDED(hr), "Failed to create bitmap, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = IWICImagingFactory_CreateBitmap(wic_factory, 640, 480,
&GUID_WICPixelFormat32bppPBGRA, WICBitmapCacheOnDemand, &wic_bitmap2);
- ok(SUCCEEDED(hr), "Failed to create bitmap, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
IWICImagingFactory_Release(wic_factory);
desc.type = D2D1_RENDER_TARGET_TYPE_DEFAULT;
@@ -4607,32 +4607,32 @@ static void test_shared_bitmap(BOOL d3d11)
bitmap_desc.dpiY = 96.0f;
hr = D2D1CreateFactory(D2D1_FACTORY_TYPE_SINGLE_THREADED, &IID_ID2D1Factory, NULL, (void **)&factory1);
- ok(SUCCEEDED(hr), "Failed to create factory, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = D2D1CreateFactory(D2D1_FACTORY_TYPE_SINGLE_THREADED, &IID_ID2D1Factory, NULL, (void **)&factory2);
- ok(SUCCEEDED(hr), "Failed to create factory, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
/* DXGI surface render targets with the same device and factory. */
hr = ID2D1Factory_CreateDxgiSurfaceRenderTarget(factory1, ctx.surface, &desc, &rt1);
- ok(SUCCEEDED(hr), "Failed to create render target, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = ID2D1RenderTarget_CreateBitmap(rt1, size, NULL, 0, &bitmap_desc, &bitmap1);
check_bitmap_surface(bitmap1, TRUE, 0);
- ok(SUCCEEDED(hr), "Failed to create bitmap, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = ID2D1Factory_CreateDxgiSurfaceRenderTarget(factory1, surface2, &desc, &rt2);
- ok(SUCCEEDED(hr), "Failed to create render target, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = ID2D1RenderTarget_CreateSharedBitmap(rt2, &IID_ID2D1Bitmap, bitmap1, NULL, &bitmap2);
- ok(SUCCEEDED(hr), "Failed to create bitmap, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
check_bitmap_surface(bitmap2, TRUE, 0);
ID2D1Bitmap_Release(bitmap2);
hr = ID2D1RenderTarget_CreateSharedBitmap(rt2, &IID_IUnknown, bitmap1, NULL, &bitmap2);
- ok(hr == E_INVALIDARG, "Got unexpected hr %#x.\n", hr);
+ ok(hr == E_INVALIDARG, "Got unexpected hr %#lx.\n", hr);
ID2D1RenderTarget_Release(rt2);
/* DXGI surface render targets with the same device but different factories. */
hr = ID2D1Factory_CreateDxgiSurfaceRenderTarget(factory2, surface2, &desc, &rt2);
- ok(SUCCEEDED(hr), "Failed to create render target, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = ID2D1RenderTarget_CreateSharedBitmap(rt2, &IID_ID2D1Bitmap, bitmap1, NULL, &bitmap2);
- ok(hr == D2DERR_WRONG_FACTORY, "Got unexpected hr %#x.\n", hr);
+ ok(hr == D2DERR_WRONG_FACTORY, "Got unexpected hr %#lx.\n", hr);
ID2D1RenderTarget_Release(rt2);
/* DXGI surface render targets with different devices but the same factory. */
@@ -4642,55 +4642,55 @@ static void test_shared_bitmap(BOOL d3d11)
ok(!!device2, "Failed to create device.\n");
swapchain2 = create_swapchain(device2, window2, TRUE);
hr = IDXGISwapChain_GetBuffer(swapchain2, 0, &IID_IDXGISurface, (void **)&surface2);
- ok(SUCCEEDED(hr), "Failed to get buffer, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = ID2D1Factory_CreateDxgiSurfaceRenderTarget(factory1, surface2, &desc, &rt2);
- ok(SUCCEEDED(hr), "Failed to create render target, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = ID2D1RenderTarget_CreateSharedBitmap(rt2, &IID_ID2D1Bitmap, bitmap1, NULL, &bitmap2);
- ok(hr == D2DERR_UNSUPPORTED_OPERATION, "Got unexpected hr %#x.\n", hr);
+ ok(hr == D2DERR_UNSUPPORTED_OPERATION, "Got unexpected hr %#lx.\n", hr);
ID2D1RenderTarget_Release(rt2);
/* DXGI surface render targets with different devices and different factories. */
hr = ID2D1Factory_CreateDxgiSurfaceRenderTarget(factory2, surface2, &desc, &rt2);
- ok(SUCCEEDED(hr), "Failed to create render target, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = ID2D1RenderTarget_CreateSharedBitmap(rt2, &IID_ID2D1Bitmap, bitmap1, NULL, &bitmap2);
- ok(hr == D2DERR_WRONG_FACTORY, "Got unexpected hr %#x.\n", hr);
+ ok(hr == D2DERR_WRONG_FACTORY, "Got unexpected hr %#lx.\n", hr);
ID2D1RenderTarget_Release(rt2);
/* DXGI surface render target and WIC bitmap render target, same factory. */
hr = ID2D1Factory_CreateWicBitmapRenderTarget(factory1, wic_bitmap2, &desc, &rt2);
- ok(SUCCEEDED(hr), "Failed to create render target, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = ID2D1RenderTarget_CreateSharedBitmap(rt2, &IID_ID2D1Bitmap, bitmap1, NULL, &bitmap2);
- ok(hr == D2DERR_UNSUPPORTED_OPERATION, "Got unexpected hr %#x.\n", hr);
+ ok(hr == D2DERR_UNSUPPORTED_OPERATION, "Got unexpected hr %#lx.\n", hr);
ID2D1RenderTarget_Release(rt2);
/* WIC bitmap render targets on different D2D factories. */
ID2D1Bitmap_Release(bitmap1);
ID2D1RenderTarget_Release(rt1);
hr = ID2D1Factory_CreateWicBitmapRenderTarget(factory1, wic_bitmap1, &desc, &rt1);
- ok(SUCCEEDED(hr), "Failed to create render target, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = ID2D1RenderTarget_CreateBitmap(rt1, size, NULL, 0, &bitmap_desc, &bitmap1);
- ok(SUCCEEDED(hr), "Failed to create bitmap, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = ID2D1RenderTarget_QueryInterface(rt1, &IID_ID2D1GdiInteropRenderTarget, (void **)&interop);
- ok(SUCCEEDED(hr), "Failed to get interop target, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = ID2D1GdiInteropRenderTarget_QueryInterface(interop, &IID_ID2D1RenderTarget, (void **)&rt3);
- ok(SUCCEEDED(hr), "Failed to get render target back, %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ok(rt3 == rt1, "Unexpected render target\n");
ID2D1RenderTarget_Release(rt3);
ID2D1GdiInteropRenderTarget_Release(interop);
hr = ID2D1Factory_CreateWicBitmapRenderTarget(factory2, wic_bitmap2, &desc, &rt2);
- ok(SUCCEEDED(hr), "Failed to create render target, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = ID2D1RenderTarget_CreateSharedBitmap(rt2, &IID_ID2D1Bitmap, bitmap1, NULL, &bitmap2);
- ok(hr == D2DERR_WRONG_FACTORY, "Got unexpected hr %#x.\n", hr);
+ ok(hr == D2DERR_WRONG_FACTORY, "Got unexpected hr %#lx.\n", hr);
ID2D1RenderTarget_Release(rt2);
/* WIC bitmap render targets on the same D2D factory. */
hr = ID2D1Factory_CreateWicBitmapRenderTarget(factory1, wic_bitmap2, &desc, &rt2);
- ok(SUCCEEDED(hr), "Failed to create render target, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = ID2D1RenderTarget_CreateSharedBitmap(rt2, &IID_ID2D1Bitmap, bitmap1, NULL, &bitmap2);
- ok(SUCCEEDED(hr), "Failed to create bitmap, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
check_bitmap_surface(bitmap2, FALSE, 0);
ID2D1Bitmap_Release(bitmap2);
ID2D1RenderTarget_Release(rt2);
@@ -4705,7 +4705,7 @@ static void test_shared_bitmap(BOOL d3d11)
desc.minLevel = D2D1_FEATURE_LEVEL_DEFAULT;
hr = ID2D1Factory_CreateDxgiSurfaceRenderTarget(factory1, surface2, &desc, &rt2);
- ok(SUCCEEDED(hr), "Failed to create render target, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
bitmap_desc.pixelFormat.format = DXGI_FORMAT_B8G8R8A8_UNORM;
bitmap_desc.pixelFormat.alphaMode = D2D1_ALPHA_MODE_PREMULTIPLIED;
@@ -4713,7 +4713,7 @@ static void test_shared_bitmap(BOOL d3d11)
bitmap_desc.dpiY = 0.0f;
hr = ID2D1RenderTarget_CreateSharedBitmap(rt2, &IID_IDXGISurface, surface2, &bitmap_desc, &bitmap2);
- ok(SUCCEEDED(hr) || broken(hr == E_INVALIDARG) /* vista */, "Failed to create bitmap, hr %#x.\n", hr);
+ ok(hr == S_OK || broken(hr == E_INVALIDARG) /* vista */, "Got unexpected hr %#lx.\n", hr);
if (SUCCEEDED(hr))
{
@@ -4745,7 +4745,7 @@ static void test_shared_bitmap(BOOL d3d11)
size = ID2D1Bitmap_GetPixelSize(bitmap2);
hr = IDXGISurface_GetDesc(surface2, &surface_desc);
- ok(SUCCEEDED(hr), "Failed to get surface description, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ok(size.width == surface_desc.Width && size.height == surface_desc.Height, "Got wrong bitmap size.\n");
check_bitmap_surface(bitmap2, TRUE, D2D1_BITMAP_OPTIONS_TARGET | D2D1_BITMAP_OPTIONS_CANNOT_DRAW);
@@ -4756,7 +4756,7 @@ static void test_shared_bitmap(BOOL d3d11)
if (IDXGISurface_QueryInterface(surface2, &IID_IDXGISurface1, (void **)&surface3) == S_OK)
{
hr = ID2D1RenderTarget_CreateSharedBitmap(rt2, &IID_IDXGISurface1, surface3, &bitmap_desc, &bitmap2);
- ok(SUCCEEDED(hr), "Failed to create bitmap, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID2D1Bitmap_Release(bitmap2);
IDXGISurface1_Release(surface3);
@@ -4768,7 +4768,7 @@ static void test_shared_bitmap(BOOL d3d11)
hr = ID2D1RenderTarget_CreateSharedBitmap(rt2, &IID_IDXGISurface, surface2, &bitmap_desc, &bitmap2);
todo_wine_if(i == 2 || i == 3 || i == 5 || i == 6)
- ok(hr == bitmap_format_tests[i].hr, "%u: unexpected hr %#x.\n", i, hr);
+ ok(hr == bitmap_format_tests[i].hr, "%u: Got unexpected hr %#lx.\n", i, hr);
if (SUCCEEDED(bitmap_format_tests[i].hr))
{
@@ -4836,7 +4836,7 @@ static void test_bitmap_updates(BOOL d3d11)
bitmap_desc.dpiX = 96.0f;
bitmap_desc.dpiY = 96.0f;
hr = ID2D1RenderTarget_CreateBitmap(rt, size, NULL, 0, &bitmap_desc, &bitmap);
- ok(SUCCEEDED(hr), "Failed to create bitmap, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
set_rect(&rect, 0.0f, 0.0f, 320.0f, 240.0f);
ID2D1RenderTarget_DrawBitmap(rt, bitmap, &rect, 1.0f,
@@ -4846,7 +4846,7 @@ static void test_bitmap_updates(BOOL d3d11)
bitmap_desc.pixelFormat.alphaMode = D2D1_ALPHA_MODE_IGNORE;
hr = ID2D1RenderTarget_CreateBitmap(rt, size, NULL, 0, &bitmap_desc, &bitmap);
- ok(SUCCEEDED(hr), "Failed to create bitmap, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
set_rect(&rect, 0.0f, 240.0f, 320.0f, 480.0f);
ID2D1RenderTarget_DrawBitmap(rt, bitmap, &rect, 1.0f,
@@ -4854,31 +4854,31 @@ static void test_bitmap_updates(BOOL d3d11)
set_rect_u(&dst_rect, 1, 1, 3, 3);
hr = ID2D1Bitmap_CopyFromMemory(bitmap, &dst_rect, bitmap_data, 4 * sizeof(*bitmap_data));
- ok(SUCCEEDED(hr), "Failed to update bitmap, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
set_rect_u(&dst_rect, 0, 3, 3, 4);
hr = ID2D1Bitmap_CopyFromMemory(bitmap, &dst_rect, &bitmap_data[6], 4 * sizeof(*bitmap_data));
- ok(SUCCEEDED(hr), "Failed to update bitmap, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
set_rect_u(&dst_rect, 0, 0, 4, 1);
hr = ID2D1Bitmap_CopyFromMemory(bitmap, &dst_rect, &bitmap_data[10], 4 * sizeof(*bitmap_data));
- ok(SUCCEEDED(hr), "Failed to update bitmap, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
set_rect_u(&dst_rect, 0, 1, 1, 3);
hr = ID2D1Bitmap_CopyFromMemory(bitmap, &dst_rect, &bitmap_data[2], sizeof(*bitmap_data));
- ok(SUCCEEDED(hr), "Failed to update bitmap, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
set_rect_u(&dst_rect, 4, 4, 3, 1);
hr = ID2D1Bitmap_CopyFromMemory(bitmap, &dst_rect, bitmap_data, sizeof(*bitmap_data));
- ok(SUCCEEDED(hr), "Failed to update bitmap, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
set_rect(&rect, 320.0f, 240.0f, 640.0f, 480.0f);
ID2D1RenderTarget_DrawBitmap(rt, bitmap, &rect, 1.0f,
D2D1_BITMAP_INTERPOLATION_MODE_NEAREST_NEIGHBOR, NULL);
hr = ID2D1Bitmap_CopyFromMemory(bitmap, NULL, bitmap_data, 4 * sizeof(*bitmap_data));
- ok(SUCCEEDED(hr), "Failed to update bitmap, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
set_rect(&rect, 320.0f, 0.0f, 640.0f, 240.0f);
ID2D1RenderTarget_DrawBitmap(rt, bitmap, &rect, 1.0f,
D2D1_BITMAP_INTERPOLATION_MODE_NEAREST_NEIGHBOR, NULL);
hr = ID2D1RenderTarget_EndDraw(rt, NULL, NULL);
- ok(SUCCEEDED(hr), "Failed to end draw, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
match = compare_surface(&ctx, "cb8136c91fbbdc76bb83b8c09edc1907b0a5d0a6");
ok(match, "Surface does not match.\n");
@@ -4924,7 +4924,7 @@ static void test_opacity_brush(BOOL d3d11)
set_color(&color, 0.0f, 1.0f, 0.0f, 0.8f);
hr = ID2D1RenderTarget_CreateSolidColorBrush(rt, &color, NULL, &color_brush);
- ok(SUCCEEDED(hr), "Failed to create color brush, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
set_size_u(&size, 4, 4);
bitmap_desc.pixelFormat.format = DXGI_FORMAT_B8G8R8A8_UNORM;
@@ -4932,12 +4932,12 @@ static void test_opacity_brush(BOOL d3d11)
bitmap_desc.dpiX = 96.0f;
bitmap_desc.dpiY = 96.0f;
hr = ID2D1RenderTarget_CreateBitmap(rt, size, bitmap_data, 4 * sizeof(*bitmap_data), &bitmap_desc, &bitmap);
- ok(SUCCEEDED(hr), "Failed to create bitmap, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = ID2D1RenderTarget_CreateBitmapBrush(rt, bitmap, NULL, NULL, &opacity_brush);
- ok(SUCCEEDED(hr), "Failed to create bitmap brush, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID2D1BitmapBrush_SetInterpolationMode(opacity_brush, D2D1_BITMAP_INTERPOLATION_MODE_NEAREST_NEIGHBOR);
refcount = ID2D1Bitmap_Release(bitmap);
- ok(refcount == 1, "Got unexpected refcount %u.\n", refcount);
+ ok(refcount == 1, "Got unexpected refcount %lu.\n", refcount);
set_size_u(&size, 1, 1);
bitmap_desc.pixelFormat.format = DXGI_FORMAT_B8G8R8A8_UNORM;
@@ -4945,12 +4945,12 @@ static void test_opacity_brush(BOOL d3d11)
bitmap_desc.dpiX = 96.0f;
bitmap_desc.dpiY = 96.0f;
hr = ID2D1RenderTarget_CreateBitmap(rt, size, &bitmap_data[2], sizeof(*bitmap_data), &bitmap_desc, &bitmap);
- ok(SUCCEEDED(hr), "Failed to create bitmap, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = ID2D1RenderTarget_CreateBitmapBrush(rt, bitmap, NULL, NULL, &bitmap_brush);
- ok(SUCCEEDED(hr), "Failed to create bitmap brush, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID2D1BitmapBrush_SetInterpolationMode(bitmap_brush, D2D1_BITMAP_INTERPOLATION_MODE_NEAREST_NEIGHBOR);
refcount = ID2D1Bitmap_Release(bitmap);
- ok(refcount == 1, "Got unexpected refcount %u.\n", refcount);
+ ok(refcount == 1, "Got unexpected refcount %lu.\n", refcount);
ID2D1RenderTarget_BeginDraw(rt);
@@ -5000,7 +5000,7 @@ static void test_opacity_brush(BOOL d3d11)
(ID2D1Brush *)bitmap_brush, (ID2D1Brush *)opacity_brush);
hr = ID2D1RenderTarget_EndDraw(rt, NULL, NULL);
- ok(hr == D2DERR_INCOMPATIBLE_BRUSH_TYPES, "Got unexpected hr %#x.\n", hr);
+ ok(hr == D2DERR_INCOMPATIBLE_BRUSH_TYPES, "Got unexpected hr %#lx.\n", hr);
match = compare_surface(&ctx, "7141c6c7b3decb91196428efb1856bcbf9872935");
ok(match, "Surface does not match.\n");
ID2D1RenderTarget_BeginDraw(rt);
@@ -5042,7 +5042,7 @@ static void test_opacity_brush(BOOL d3d11)
ID2D1RectangleGeometry_Release(geometry);
hr = ID2D1RenderTarget_EndDraw(rt, NULL, NULL);
- ok(SUCCEEDED(hr), "Failed to end draw, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
match = compare_surface(&ctx, "c3a5802d1750efa3e9122c1a92f6064df3872732");
ok(match, "Surface does not match.\n");
@@ -5080,7 +5080,7 @@ static void test_create_target(BOOL d3d11)
return;
hr = D2D1CreateFactory(D2D1_FACTORY_TYPE_SINGLE_THREADED, &IID_ID2D1Factory, NULL, (void **)&factory);
- ok(SUCCEEDED(hr), "Failed to create factory, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
for (i = 0; i < ARRAY_SIZE(create_dpi_tests); ++i)
{
@@ -5099,21 +5099,21 @@ static void test_create_target(BOOL d3d11)
desc.minLevel = D2D1_FEATURE_LEVEL_DEFAULT;
hr = ID2D1Factory_CreateDxgiSurfaceRenderTarget(factory, ctx.surface, &desc, &rt);
- ok(hr == create_dpi_tests[i].hr, "Wrong return code, hr %#x, expected %#x, test %u.\n", hr,
- create_dpi_tests[i].hr, i);
+ ok(hr == create_dpi_tests[i].hr, "Test %u: Got unexpect hr %#lx, expected %#lx.\n",
+ i, hr, create_dpi_tests[i].hr);
if (FAILED(hr))
continue;
hr = ID2D1RenderTarget_QueryInterface(rt, &IID_IUnknown, (void **)&unk);
- ok(SUCCEEDED(hr), "Failed to get IUnknown, hr %#x.\n", hr);
+ ok(hr == S_OK, "Test %u: Got unexpected hr %#lx.\n", i, hr);
ok(unk == (IUnknown *)rt, "Expected same interface pointer.\n");
IUnknown_Release(unk);
hr = ID2D1RenderTarget_QueryInterface(rt, &IID_ID2D1GdiInteropRenderTarget, (void **)&interop);
- ok(SUCCEEDED(hr), "Failed to get interop target, hr %#x.\n", hr);
+ ok(hr == S_OK, "Test %u: Got unexpected hr %#lx.\n", i, hr);
hr = ID2D1GdiInteropRenderTarget_QueryInterface(interop, &IID_ID2D1RenderTarget, (void **)&rt2);
- ok(SUCCEEDED(hr), "Failed to get render target back, %#x.\n", hr);
+ ok(hr == S_OK, "Test %u: Got unexpected hr %#lx.\n", i, hr);
ok(rt2 == rt, "Unexpected render target\n");
ID2D1RenderTarget_Release(rt2);
ID2D1GdiInteropRenderTarget_Release(interop);
@@ -5185,10 +5185,10 @@ static void test_draw_text_layout(BOOL d3d11)
hr = D2D1CreateFactory(D2D1_FACTORY_TYPE_SINGLE_THREADED, &IID_ID2D1Factory, NULL, (void **)&factory);
- ok(SUCCEEDED(hr), "Failed to create factory, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = D2D1CreateFactory(D2D1_FACTORY_TYPE_SINGLE_THREADED, &IID_ID2D1Factory, NULL, (void **)&factory2);
- ok(SUCCEEDED(hr), "Failed to create factory, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ok(factory != factory2, "got same factory\n");
desc.type = D2D1_RENDER_TARGET_TYPE_DEFAULT;
@@ -5200,33 +5200,33 @@ static void test_draw_text_layout(BOOL d3d11)
desc.minLevel = D2D1_FEATURE_LEVEL_DEFAULT;
hr = ID2D1Factory_CreateDxgiSurfaceRenderTarget(factory, ctx.surface, &desc, &rt);
- ok(SUCCEEDED(hr), "Failed to create a target, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = ID2D1Factory_CreateDxgiSurfaceRenderTarget(factory2, ctx.surface, &desc, &rt2);
- ok(SUCCEEDED(hr), "Failed to create a target, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = DWriteCreateFactory(DWRITE_FACTORY_TYPE_SHARED, &IID_IDWriteFactory, (IUnknown **)&dwrite_factory);
- ok(SUCCEEDED(hr), "Failed to create factory, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = IDWriteFactory_CreateTextFormat(dwrite_factory, L"Tahoma", NULL, DWRITE_FONT_WEIGHT_NORMAL,
DWRITE_FONT_STYLE_NORMAL, DWRITE_FONT_STRETCH_NORMAL, 10.0f, L"", &text_format);
- ok(SUCCEEDED(hr), "Failed to create text format, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = IDWriteFactory_CreateTextLayout(dwrite_factory, L"text", 4, text_format, 100.0f, 100.0f, &text_layout);
- ok(SUCCEEDED(hr), "Failed to create text layout, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
set_color(&color, 0.0f, 0.0f, 0.0f, 0.0f);
hr = ID2D1RenderTarget_CreateSolidColorBrush(rt, &color, NULL, &brush);
- ok(SUCCEEDED(hr), "Failed to create brush, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = ID2D1RenderTarget_CreateSolidColorBrush(rt2, &color, NULL, &brush2);
- ok(SUCCEEDED(hr), "Failed to create brush, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
/* effect brush is created from different factory */
range.startPosition = 0;
range.length = 4;
hr = IDWriteTextLayout_SetDrawingEffect(text_layout, (IUnknown*)brush2, range);
- ok(SUCCEEDED(hr), "Failed to set drawing effect, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID2D1RenderTarget_BeginDraw(rt);
@@ -5234,17 +5234,17 @@ static void test_draw_text_layout(BOOL d3d11)
ID2D1RenderTarget_DrawTextLayout(rt, origin, text_layout, (ID2D1Brush*)brush, D2D1_DRAW_TEXT_OPTIONS_NONE);
hr = ID2D1RenderTarget_EndDraw(rt, NULL, NULL);
- todo_wine ok(hr == D2DERR_WRONG_FACTORY, "Got unexpected hr %#x.\n", hr);
+ todo_wine ok(hr == D2DERR_WRONG_FACTORY, "Got unexpected hr %#lx.\n", hr);
/* Effect is d2d resource, but not a brush. */
set_rect(&rect, 0.0f, 0.0f, 10.0f, 10.0f);
hr = ID2D1Factory_CreateRectangleGeometry(factory, &rect, &geometry);
- ok(SUCCEEDED(hr), "Failed to geometry, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
range.startPosition = 0;
range.length = 4;
hr = IDWriteTextLayout_SetDrawingEffect(text_layout, (IUnknown*)geometry, range);
- ok(SUCCEEDED(hr), "Failed to set drawing effect, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID2D1RectangleGeometry_Release(geometry);
ID2D1RenderTarget_BeginDraw(rt);
@@ -5253,7 +5253,7 @@ static void test_draw_text_layout(BOOL d3d11)
ID2D1RenderTarget_DrawTextLayout(rt, origin, text_layout, (ID2D1Brush*)brush, D2D1_DRAW_TEXT_OPTIONS_NONE);
hr = ID2D1RenderTarget_EndDraw(rt, NULL, NULL);
- ok(SUCCEEDED(hr), "EndDraw() failed, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
for (i = 0; i < ARRAY_SIZE(antialias_mode_tests); ++i)
{
@@ -5263,7 +5263,7 @@ static void test_draw_text_layout(BOOL d3d11)
hr = IDWriteFactory_CreateCustomRenderingParams(dwrite_factory, 2.0f, 1.0f, 0.0f, DWRITE_PIXEL_GEOMETRY_FLAT,
antialias_mode_tests[i].rendering_mode, &rendering_params);
- ok(SUCCEEDED(hr), "Failed to create custom rendering params, hr %#x.\n", hr);
+ ok(hr == S_OK, "Test %u: Got unexpected hr %#lx.\n", i, hr);
ID2D1RenderTarget_SetTextRenderingParams(rt, rendering_params);
@@ -5272,7 +5272,7 @@ static void test_draw_text_layout(BOOL d3d11)
ID2D1RenderTarget_DrawTextLayout(rt, origin, text_layout, (ID2D1Brush *)brush, D2D1_DRAW_TEXT_OPTIONS_NONE);
hr = ID2D1RenderTarget_EndDraw(rt, NULL, NULL);
- ok(hr == antialias_mode_tests[i].hr, "%u: unexpected hr %#x.\n", i, hr);
+ ok(hr == antialias_mode_tests[i].hr, "Test %u: Got unexpected hr %#lx.\n", i, hr);
IDWriteRenderingParams_Release(rendering_params);
}
@@ -5343,7 +5343,7 @@ static void test_dc_target(BOOL d3d11)
release_test_context(&ctx);
hr = D2D1CreateFactory(D2D1_FACTORY_TYPE_SINGLE_THREADED, &IID_ID2D1Factory, NULL, (void **)&factory);
- ok(SUCCEEDED(hr), "Failed to create factory, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
for (i = 0; i < ARRAY_SIZE(invalid_formats); ++i)
{
@@ -5355,7 +5355,7 @@ static void test_dc_target(BOOL d3d11)
desc.minLevel = D2D1_FEATURE_LEVEL_DEFAULT;
hr = ID2D1Factory_CreateDCRenderTarget(factory, &desc, &rt);
- ok(hr == D2DERR_UNSUPPORTED_PIXEL_FORMAT, "Got unexpected hr %#x.\n", hr);
+ ok(hr == D2DERR_UNSUPPORTED_PIXEL_FORMAT, "Got unexpected hr %#lx.\n", hr);
}
desc.type = D2D1_RENDER_TARGET_TYPE_DEFAULT;
@@ -5366,16 +5366,16 @@ static void test_dc_target(BOOL d3d11)
desc.usage = D2D1_RENDER_TARGET_USAGE_NONE;
desc.minLevel = D2D1_FEATURE_LEVEL_DEFAULT;
hr = ID2D1Factory_CreateDCRenderTarget(factory, &desc, &rt);
- ok(SUCCEEDED(hr), "Failed to create target, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = ID2D1DCRenderTarget_QueryInterface(rt, &IID_ID2D1GdiInteropRenderTarget, (void **)&interop);
- ok(SUCCEEDED(hr), "Failed to get interop target, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = ID2D1GdiInteropRenderTarget_QueryInterface(interop, &IID_ID2D1RenderTarget, (void **)&rt3);
- ok(SUCCEEDED(hr), "Failed to get render target back, %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ok(rt3 == (ID2D1RenderTarget *)rt, "Unexpected render target\n");
ID2D1RenderTarget_Release(rt3);
hr = ID2D1GdiInteropRenderTarget_QueryInterface(interop, &IID_ID2D1DCRenderTarget, (void **)&rt2);
- ok(SUCCEEDED(hr), "Failed to get render target back, %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ok(rt2 == rt, "Unexpected render target\n");
ID2D1DCRenderTarget_Release(rt2);
ID2D1GdiInteropRenderTarget_Release(interop);
@@ -5391,18 +5391,18 @@ static void test_dc_target(BOOL d3d11)
/* object creation methods work without BindDC() */
set_color(&color, 0.0f, 0.0f, 0.0f, 0.0f);
hr = ID2D1DCRenderTarget_CreateSolidColorBrush(rt, &color, NULL, &brush);
- ok(SUCCEEDED(hr), "Failed to create a brush, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID2D1SolidColorBrush_Release(brush);
ID2D1DCRenderTarget_BeginDraw(rt);
hr = ID2D1DCRenderTarget_EndDraw(rt, NULL, NULL);
- ok(hr == D2DERR_WRONG_STATE, "Got unexpected hr %#x.\n", hr);
+ ok(hr == D2DERR_WRONG_STATE, "Got unexpected hr %#lx.\n", hr);
ID2D1DCRenderTarget_Release(rt);
/* BindDC() */
hr = ID2D1Factory_CreateDCRenderTarget(factory, &desc, &rt);
- ok(SUCCEEDED(hr), "Failed to create target, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
aa_mode = ID2D1DCRenderTarget_GetAntialiasMode(rt);
ok(aa_mode == D2D1_ANTIALIAS_MODE_PER_PRIMITIVE, "Got wrong default aa mode %d.\n", aa_mode);
@@ -5419,7 +5419,7 @@ static void test_dc_target(BOOL d3d11)
SetRect(&rect, 0, 0, 32, 32);
hr = ID2D1DCRenderTarget_BindDC(rt, NULL, &rect);
- ok(hr == E_INVALIDARG, "BindDC() returned %#x.\n", hr);
+ ok(hr == E_INVALIDARG, "Got unexpected hr %#lx.\n", hr);
/* Target properties are retained during BindDC() */
ID2D1DCRenderTarget_SetTags(rt, 1, 2);
@@ -5431,7 +5431,7 @@ static void test_dc_target(BOOL d3d11)
ID2D1DCRenderTarget_SetTransform(rt, &matrix);
hr = ID2D1DCRenderTarget_BindDC(rt, hdc, &rect);
- ok(hr == S_OK, "BindDC() returned %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID2D1DCRenderTarget_GetTags(rt, &t1, &t2);
ok(t1 == 1 && t2 == 2, "Got wrong tags.\n");
@@ -5460,10 +5460,10 @@ static void test_dc_target(BOOL d3d11)
ID2D1DCRenderTarget_Clear(rt, &color);
hr = ID2D1DCRenderTarget_EndDraw(rt, NULL, NULL);
- ok(SUCCEEDED(hr), "EndDraw() failed, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
clr = GetPixel(hdc, 0, 0);
- ok(clr == RGB(255, 0, 0), "Unexpected color 0x%08x.\n", clr);
+ ok(clr == RGB(255, 0, 0), "Got unexpected colour 0x%08lx.\n", clr);
hdc2 = CreateCompatibleDC(NULL);
ok(hdc2 != NULL, "Failed to create an HDC.\n");
@@ -5471,14 +5471,14 @@ static void test_dc_target(BOOL d3d11)
create_target_dibsection(hdc2, 16, 16);
hr = ID2D1DCRenderTarget_BindDC(rt, hdc2, &rect);
- ok(hr == S_OK, "BindDC() returned %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
clr = GetPixel(hdc2, 0, 0);
- ok(clr == 0, "Unexpected color 0x%08x.\n", clr);
+ ok(clr == 0, "Got unexpected colour 0x%08lx.\n", clr);
set_color(&color, 0.0f, 1.0f, 0.0f, 1.0f);
hr = ID2D1DCRenderTarget_CreateSolidColorBrush(rt, &color, NULL, &brush);
- ok(SUCCEEDED(hr), "Failed to create brush, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID2D1DCRenderTarget_BeginDraw(rt);
@@ -5488,19 +5488,19 @@ static void test_dc_target(BOOL d3d11)
ID2D1DCRenderTarget_FillRectangle(rt, &r, (ID2D1Brush*)brush);
hr = ID2D1DCRenderTarget_EndDraw(rt, NULL, NULL);
- ok(SUCCEEDED(hr), "EndDraw() failed, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID2D1SolidColorBrush_Release(brush);
clr = GetPixel(hdc2, 0, 0);
- ok(clr == RGB(0, 255, 0), "Unexpected color 0x%08x.\n", clr);
+ ok(clr == RGB(0, 255, 0), "Got unexpected colour 0x%08lx.\n", clr);
clr = GetPixel(hdc2, 10, 0);
- ok(clr == 0, "Unexpected color 0x%08x.\n", clr);
+ ok(clr == 0, "Got unexpected colour 0x%08lx.\n", clr);
/* Invalid DC. */
hr = ID2D1DCRenderTarget_BindDC(rt, (HDC)0xdeadbeef, &rect);
- todo_wine ok(hr == E_INVALIDARG, "Got unexpected hr %#x.\n", hr);
+ todo_wine ok(hr == E_INVALIDARG, "Got unexpected hr %#lx.\n", hr);
ID2D1DCRenderTarget_BeginDraw(rt);
@@ -5508,13 +5508,13 @@ static void test_dc_target(BOOL d3d11)
ID2D1DCRenderTarget_Clear(rt, &color);
hr = ID2D1DCRenderTarget_EndDraw(rt, NULL, NULL);
- ok(SUCCEEDED(hr), "EndDraw() failed, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
clr = GetPixel(hdc2, 0, 0);
- todo_wine ok(clr == RGB(255, 0, 0), "Got unexpected colour 0x%08x.\n", clr);
+ todo_wine ok(clr == RGB(255, 0, 0), "Got unexpected colour 0x%08lx.\n", clr);
hr = ID2D1DCRenderTarget_BindDC(rt, NULL, &rect);
- ok(hr == E_INVALIDARG, "BindDC() returned %#x.\n", hr);
+ ok(hr == E_INVALIDARG, "Got unexpected hr %#lx.\n", hr);
ID2D1DCRenderTarget_BeginDraw(rt);
@@ -5522,10 +5522,10 @@ static void test_dc_target(BOOL d3d11)
ID2D1DCRenderTarget_Clear(rt, &color);
hr = ID2D1DCRenderTarget_EndDraw(rt, NULL, NULL);
- ok(SUCCEEDED(hr), "EndDraw() failed, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
clr = GetPixel(hdc2, 0, 0);
- todo_wine ok(clr == RGB(0, 0, 255), "Got unexpected colour 0x%08x.\n", clr);
+ todo_wine ok(clr == RGB(0, 0, 255), "Got unexpected colour 0x%08lx.\n", clr);
DeleteDC(hdc);
DeleteDC(hdc2);
@@ -5550,7 +5550,7 @@ static void test_hwnd_target(BOOL d3d11)
release_test_context(&ctx);
hr = D2D1CreateFactory(D2D1_FACTORY_TYPE_SINGLE_THREADED, &IID_ID2D1Factory, NULL, (void **)&factory);
- ok(SUCCEEDED(hr), "Failed to create factory, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
desc.type = D2D1_RENDER_TARGET_TYPE_DEFAULT;
desc.pixelFormat.format = DXGI_FORMAT_B8G8R8A8_UNORM;
@@ -5566,25 +5566,25 @@ static void test_hwnd_target(BOOL d3d11)
hwnd_rt_desc.presentOptions = D2D1_PRESENT_OPTIONS_NONE;
hr = ID2D1Factory_CreateHwndRenderTarget(factory, &desc, &hwnd_rt_desc, &rt);
- ok(FAILED(hr), "Target creation should fail, hr %#x.\n", hr);
+ ok(hr != S_OK, "Got unexpected hr %#lx.\n", hr);
hwnd_rt_desc.hwnd = (HWND)0xdeadbeef;
hr = ID2D1Factory_CreateHwndRenderTarget(factory, &desc, &hwnd_rt_desc, &rt);
- ok(FAILED(hr), "Target creation should fail, hr %#x.\n", hr);
+ ok(hr != S_OK, "Got unexpected hr %#lx.\n", hr);
hwnd_rt_desc.hwnd = CreateWindowA("static", "d2d_test", 0, 0, 0, 0, 0, 0, 0, 0, 0);
ok(!!hwnd_rt_desc.hwnd, "Failed to create target window.\n");
hr = ID2D1Factory_CreateHwndRenderTarget(factory, &desc, &hwnd_rt_desc, &rt);
- ok(SUCCEEDED(hr), "Failed to create render target, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = ID2D1HwndRenderTarget_QueryInterface(rt, &IID_ID2D1GdiInteropRenderTarget, (void **)&interop);
- ok(SUCCEEDED(hr), "Failed to get interop target, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = ID2D1GdiInteropRenderTarget_QueryInterface(interop, &IID_ID2D1RenderTarget, (void **)&rt3);
- ok(SUCCEEDED(hr), "Failed to get render target back, %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ok(rt3 == (ID2D1RenderTarget *)rt, "Unexpected render target\n");
ID2D1RenderTarget_Release(rt3);
hr = ID2D1GdiInteropRenderTarget_QueryInterface(interop, &IID_ID2D1HwndRenderTarget, (void **)&rt2);
- ok(SUCCEEDED(hr), "Failed to get render target back, %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ok(rt2 == rt, "Unexpected render target\n");
ID2D1HwndRenderTarget_Release(rt2);
ID2D1GdiInteropRenderTarget_Release(interop);
@@ -5592,7 +5592,7 @@ static void test_hwnd_target(BOOL d3d11)
size.width = 128;
size.height = 64;
hr = ID2D1HwndRenderTarget_Resize(rt, &size);
- ok(SUCCEEDED(hr), "Failed to resize render target, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID2D1HwndRenderTarget_Release(rt);
@@ -5634,7 +5634,7 @@ static void test_compatible_target_size_(unsigned int line, ID2D1RenderTarget *r
{
hr = ID2D1RenderTarget_CreateCompatibleRenderTarget(rt, size_tests[i].size, size_tests[i].pixel_size,
NULL, D2D1_COMPATIBLE_RENDER_TARGET_OPTIONS_NONE, &bitmap_rt);
- ok_(__FILE__, line)(SUCCEEDED(hr), "%u: Failed to create render target, hr %#x.\n", i, hr);
+ ok_(__FILE__, line)(SUCCEEDED(hr), "%u: Failed to create render target, hr %#lx.\n", i, hr);
if (size_tests[i].pixel_size)
{
@@ -5671,7 +5671,7 @@ static void test_compatible_target_size_(unsigned int line, ID2D1RenderTarget *r
pixel_size.height = pixel_size.width = 0;
hr = ID2D1RenderTarget_CreateCompatibleRenderTarget(rt, NULL, &pixel_size, NULL,
D2D1_COMPATIBLE_RENDER_TARGET_OPTIONS_NONE, &bitmap_rt);
- ok_(__FILE__, line)(SUCCEEDED(hr), "Failed to create render target, hr %#x.\n", hr);
+ ok_(__FILE__, line)(SUCCEEDED(hr), "Failed to create render target, hr %#lx.\n", hr);
if (SUCCEEDED(ID2D1BitmapRenderTarget_QueryInterface(bitmap_rt, &IID_ID2D1DeviceContext, (void **)&context)))
{
@@ -5717,7 +5717,7 @@ static void test_bitmap_target(BOOL d3d11)
release_test_context(&ctx);
hr = D2D1CreateFactory(D2D1_FACTORY_TYPE_SINGLE_THREADED, &IID_ID2D1Factory, NULL, (void **)&factory);
- ok(SUCCEEDED(hr), "Failed to create factory, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
desc.type = D2D1_RENDER_TARGET_TYPE_DEFAULT;
desc.pixelFormat.format = DXGI_FORMAT_B8G8R8A8_UNORM;
@@ -5734,22 +5734,22 @@ static void test_bitmap_target(BOOL d3d11)
hwnd_rt_desc.presentOptions = D2D1_PRESENT_OPTIONS_NONE;
hr = ID2D1Factory_CreateHwndRenderTarget(factory, &desc, &hwnd_rt_desc, &hwnd_rt);
- ok(SUCCEEDED(hr), "Failed to create render target, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
test_compatible_target_size((ID2D1RenderTarget *)hwnd_rt);
hr = ID2D1HwndRenderTarget_CreateCompatibleRenderTarget(hwnd_rt, NULL, NULL, NULL,
D2D1_COMPATIBLE_RENDER_TARGET_OPTIONS_NONE, &rt);
- ok(SUCCEEDED(hr), "Failed to create render target, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = ID2D1BitmapRenderTarget_QueryInterface(rt, &IID_ID2D1GdiInteropRenderTarget, (void **)&interop);
- ok(SUCCEEDED(hr), "Failed to get interop target, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = ID2D1GdiInteropRenderTarget_QueryInterface(interop, &IID_ID2D1RenderTarget, (void **)&rt3);
- ok(SUCCEEDED(hr), "Failed to get render target back, %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ok(rt3 == (ID2D1RenderTarget *)rt, "Unexpected render target\n");
ID2D1RenderTarget_Release(rt3);
hr = ID2D1GdiInteropRenderTarget_QueryInterface(interop, &IID_ID2D1BitmapRenderTarget, (void **)&rt2);
- ok(SUCCEEDED(hr), "Failed to get render target back, %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ok(rt2 == rt, "Unexpected render target\n");
ID2D1BitmapRenderTarget_Release(rt2);
ID2D1GdiInteropRenderTarget_Release(interop);
@@ -5757,7 +5757,7 @@ static void test_bitmap_target(BOOL d3d11)
/* See if parent target is referenced. */
ID2D1HwndRenderTarget_AddRef(hwnd_rt);
refcount = ID2D1HwndRenderTarget_Release(hwnd_rt);
- ok(refcount == 1, "Target should not have been referenced, got %u.\n", refcount);
+ ok(refcount == 1, "Target should not have been referenced, got %lu.\n", refcount);
/* Size was not specified, should match parent. */
pixel_size = ID2D1HwndRenderTarget_GetPixelSize(hwnd_rt);
@@ -5778,7 +5778,7 @@ static void test_bitmap_target(BOOL d3d11)
set_size_u(&pixel_size, 32, 32);
hr = ID2D1HwndRenderTarget_CreateCompatibleRenderTarget(hwnd_rt, NULL, &pixel_size, NULL,
D2D1_COMPATIBLE_RENDER_TARGET_OPTIONS_NONE, &rt);
- ok(SUCCEEDED(hr), "Failed to create render target, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
pixel_size2 = ID2D1BitmapRenderTarget_GetPixelSize(rt);
ok(!memcmp(&pixel_size, &pixel_size2, sizeof(pixel_size)), "Got target pixel size mismatch.\n");
@@ -5792,7 +5792,7 @@ static void test_bitmap_target(BOOL d3d11)
set_size_u(&pixel_size, 128, 128);
hr = ID2D1HwndRenderTarget_CreateCompatibleRenderTarget(hwnd_rt, &size, &pixel_size, NULL,
D2D1_COMPATIBLE_RENDER_TARGET_OPTIONS_NONE, &rt);
- ok(SUCCEEDED(hr), "Failed to create render target, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
/* Doubled pixel size dimensions with the same DIP size give doubled dpi. */
ID2D1BitmapRenderTarget_GetDpi(rt, dpi2, dpi2 + 1);
@@ -5804,7 +5804,7 @@ static void test_bitmap_target(BOOL d3d11)
set_size_f(&size, 70.1f, 70.4f);
hr = ID2D1HwndRenderTarget_CreateCompatibleRenderTarget(hwnd_rt, &size, NULL, NULL,
D2D1_COMPATIBLE_RENDER_TARGET_OPTIONS_NONE, &rt);
- ok(SUCCEEDED(hr), "Failed to create render target, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID2D1BitmapRenderTarget_GetDpi(rt, dpi2, dpi2 + 1);
@@ -5822,9 +5822,9 @@ static void test_bitmap_target(BOOL d3d11)
/* Check if GetBitmap() returns same instance. */
hr = ID2D1BitmapRenderTarget_GetBitmap(rt, &bitmap);
- ok(SUCCEEDED(hr), "GetBitmap() failed, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = ID2D1BitmapRenderTarget_GetBitmap(rt, &bitmap2);
- ok(SUCCEEDED(hr), "GetBitmap() failed, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ok(bitmap == bitmap2, "Got different bitmap instances.\n");
/* Draw something, see if bitmap instance is retained. */
@@ -5832,18 +5832,18 @@ static void test_bitmap_target(BOOL d3d11)
set_color(&color, 1.0f, 1.0f, 0.0f, 1.0f);
ID2D1BitmapRenderTarget_Clear(rt, &color);
hr = ID2D1BitmapRenderTarget_EndDraw(rt, NULL, NULL);
- ok(SUCCEEDED(hr), "EndDraw() failed, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID2D1Bitmap_Release(bitmap2);
hr = ID2D1BitmapRenderTarget_GetBitmap(rt, &bitmap2);
- ok(SUCCEEDED(hr), "GetBitmap() failed, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ok(bitmap == bitmap2, "Got different bitmap instances.\n");
ID2D1Bitmap_Release(bitmap);
ID2D1Bitmap_Release(bitmap2);
refcount = ID2D1BitmapRenderTarget_Release(rt);
- ok(!refcount, "Target should be released, got %u.\n", refcount);
+ ok(!refcount, "Target should be released, got %lu.\n", refcount);
DestroyWindow(hwnd_rt_desc.hwnd);
@@ -5856,19 +5856,19 @@ static void test_bitmap_target(BOOL d3d11)
desc.usage = D2D1_RENDER_TARGET_USAGE_NONE;
desc.minLevel = D2D1_FEATURE_LEVEL_DEFAULT;
hr = ID2D1Factory_CreateDCRenderTarget(factory, &desc, &dc_rt);
- ok(SUCCEEDED(hr), "Failed to create target, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
test_compatible_target_size((ID2D1RenderTarget *)dc_rt);
hr = ID2D1DCRenderTarget_CreateCompatibleRenderTarget(dc_rt, NULL, NULL, NULL,
D2D1_COMPATIBLE_RENDER_TARGET_OPTIONS_NONE, &rt);
- ok(SUCCEEDED(hr), "Failed to create render target, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
pixel_size = ID2D1BitmapRenderTarget_GetPixelSize(rt);
ok(pixel_size.width == 0 && pixel_size.height == 0, "Got wrong size\n");
hr = ID2D1BitmapRenderTarget_GetBitmap(rt, &bitmap);
- ok(SUCCEEDED(hr), "GetBitmap() failed, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
pixel_size = ID2D1Bitmap_GetPixelSize(bitmap);
ok(pixel_size.width == 0 && pixel_size.height == 0, "Got wrong size\n");
ID2D1Bitmap_Release(bitmap);
@@ -5886,7 +5886,7 @@ static void test_desktop_dpi(BOOL d3d11)
HRESULT hr;
hr = D2D1CreateFactory(D2D1_FACTORY_TYPE_SINGLE_THREADED, &IID_ID2D1Factory, NULL, (void **)&factory);
- ok(SUCCEEDED(hr), "Failed to create factory, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
dpi_x = dpi_y = 0.0f;
ID2D1Factory_GetDesktopDpi(factory, &dpi_x, &dpi_y);
@@ -5924,7 +5924,7 @@ static void test_stroke_style(BOOL d3d11)
float dashes[2];
hr = D2D1CreateFactory(D2D1_FACTORY_TYPE_SINGLE_THREADED, &IID_ID2D1Factory, NULL, (void **)&factory);
- ok(SUCCEEDED(hr), "Failed to create factory, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
desc.startCap = D2D1_CAP_STYLE_SQUARE;
desc.endCap = D2D1_CAP_STYLE_ROUND;
@@ -5935,7 +5935,7 @@ static void test_stroke_style(BOOL d3d11)
desc.dashOffset = -1.0f;
hr = ID2D1Factory_CreateStrokeStyle(factory, &desc, NULL, 0, &style);
- ok(SUCCEEDED(hr), "Failed to create stroke style, %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
cap_style = ID2D1StrokeStyle_GetStartCap(style);
ok(cap_style == D2D1_CAP_STYLE_SQUARE, "Unexpected cap style %d.\n", cap_style);
@@ -5964,24 +5964,24 @@ static void test_stroke_style(BOOL d3d11)
ID2D1StrokeStyle_Release(style);
hr = ID2D1Factory_CreateStrokeStyle(factory, &desc, NULL, 0, &style);
- ok(hr == E_INVALIDARG, "Unexpected return value, %#x.\n", hr);
+ ok(hr == E_INVALIDARG, "Got unexpected hr %#lx.\n", hr);
hr = ID2D1Factory_CreateStrokeStyle(factory, &desc, dashes, 0, &style);
- ok(hr == E_INVALIDARG, "Unexpected return value, %#x.\n", hr);
+ ok(hr == E_INVALIDARG, "Got unexpected hr %#lx.\n", hr);
hr = ID2D1Factory_CreateStrokeStyle(factory, &desc, dashes, 1, &style);
- ok(hr == S_OK, "Unexpected return value, %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID2D1StrokeStyle_Release(style);
/* Builtin style, dashes are specified. */
desc.dashStyle = D2D1_DASH_STYLE_DOT;
hr = ID2D1Factory_CreateStrokeStyle(factory, &desc, dashes, 1, &style);
- ok(hr == E_INVALIDARG, "Unexpected return value, %#x.\n", hr);
+ ok(hr == E_INVALIDARG, "Got unexpected hr %#lx.\n", hr);
/* Invalid style. */
desc.dashStyle = 100;
hr = ID2D1Factory_CreateStrokeStyle(factory, &desc, NULL, 0, &style);
- ok(hr == E_INVALIDARG, "Unexpected return value, %#x.\n", hr);
+ ok(hr == E_INVALIDARG, "Got unexpected hr %#lx.\n", hr);
/* Test returned dash pattern for builtin styles. */
desc.startCap = D2D1_CAP_STYLE_SQUARE;
@@ -5999,7 +5999,7 @@ static void test_stroke_style(BOOL d3d11)
desc.dashStyle = dash_style_tests[i].dash_style;
hr = ID2D1Factory_CreateStrokeStyle(factory, &desc, NULL, 0, &style);
- ok(SUCCEEDED(hr), "Failed to create stroke style, %#x.\n", hr);
+ ok(hr == S_OK, "Test %u: Got unexpected hr %#lx.\n", i, hr);
dash_count = ID2D1StrokeStyle_GetDashesCount(style);
ok(dash_count == dash_style_tests[i].dash_count, "%u: unexpected dash count %u, expected %u.\n",
@@ -6029,7 +6029,7 @@ static void test_stroke_style(BOOL d3d11)
/* NULL dashes array, non-zero length. */
memset(&desc, 0, sizeof(desc));
hr = ID2D1Factory_CreateStrokeStyle(factory, &desc, NULL, 1, &style);
- ok(SUCCEEDED(hr), "Failed to create stroke style, %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
count = ID2D1StrokeStyle_GetDashesCount(style);
ok(count == 0, "Unexpected dashes count %u.\n", count);
@@ -6059,7 +6059,7 @@ static void test_gradient(BOOL d3d11)
stops2[1] = stops2[0];
hr = ID2D1RenderTarget_CreateGradientStopCollection(rt, stops2, 2, D2D1_GAMMA_2_2,
D2D1_EXTEND_MODE_CLAMP, &gradient);
- ok(SUCCEEDED(hr), "Failed to create stop collection, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
count = ID2D1GradientStopCollection_GetGradientStopCount(gradient);
ok(count == 2, "Unexpected stop count %u.\n", count);
@@ -6112,7 +6112,7 @@ static void test_draw_geometry(BOOL d3d11)
ID2D1RenderTarget_SetAntialiasMode(rt, D2D1_ANTIALIAS_MODE_ALIASED);
set_color(&color, 0.890f, 0.851f, 0.600f, 1.0f);
hr = ID2D1RenderTarget_CreateSolidColorBrush(rt, &color, NULL, &brush);
- ok(SUCCEEDED(hr), "Failed to create brush, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID2D1RenderTarget_BeginDraw(rt);
set_color(&color, 0.396f, 0.180f, 0.537f, 1.0f);
@@ -6149,7 +6149,7 @@ static void test_draw_geometry(BOOL d3d11)
ID2D1RenderTarget_DrawEllipse(rt, &ellipse, (ID2D1Brush *)brush, 10.0f, NULL);
hr = ID2D1RenderTarget_EndDraw(rt, NULL, NULL);
- ok(SUCCEEDED(hr), "Failed to end draw, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
match = compare_figure(&ctx, 0, 0, 160, 160, 0xff652e89, 0, "");
ok(match, "Figure does not match.\n");
@@ -6242,7 +6242,7 @@ static void test_draw_geometry(BOOL d3d11)
ID2D1RenderTarget_DrawRoundedRectangle(rt, &rounded_rect, (ID2D1Brush *)brush, 10.0f, NULL);
hr = ID2D1RenderTarget_EndDraw(rt, NULL, NULL);
- ok(SUCCEEDED(hr), "Failed to end draw, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
match = compare_figure(&ctx, 0, 0, 160, 160, 0xff652e89, 0, "iGIQjgEUjAEUjgEQiGIA");
todo_wine ok(match, "Figure does not match.\n");
@@ -6336,7 +6336,7 @@ static void test_draw_geometry(BOOL d3d11)
ID2D1RenderTarget_DrawRoundedRectangle(rt, &rounded_rect, (ID2D1Brush *)brush, 10.0f, NULL);
hr = ID2D1RenderTarget_EndDraw(rt, NULL, NULL);
- ok(SUCCEEDED(hr), "Failed to end draw, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
match = compare_figure(&ctx, 0, 0, 160, 160, 0xff652e89, 0, "iGIQjgEUjAEUjgEQiGIA");
todo_wine ok(match, "Figure does not match.\n");
@@ -6399,9 +6399,9 @@ static void test_draw_geometry(BOOL d3d11)
todo_wine ok(match, "Figure does not match.\n");
hr = ID2D1Factory_CreatePathGeometry(factory, &geometry);
- ok(SUCCEEDED(hr), "Failed to create path geometry, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = ID2D1PathGeometry_Open(geometry, &sink);
- ok(SUCCEEDED(hr), "Failed to open geometry sink, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
set_point(&point, 40.0f, 160.0f);
ID2D1GeometrySink_BeginFigure(sink, point, D2D1_FIGURE_BEGIN_FILLED);
@@ -6471,14 +6471,14 @@ static void test_draw_geometry(BOOL d3d11)
ID2D1GeometrySink_SetFillMode(sink, D2D1_FILL_MODE_ALTERNATE);
hr = ID2D1GeometrySink_Close(sink);
- ok(SUCCEEDED(hr), "Failed to close geometry sink, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID2D1GeometrySink_Release(sink);
ID2D1RenderTarget_BeginDraw(rt);
ID2D1RenderTarget_Clear(rt, &color);
ID2D1RenderTarget_DrawGeometry(rt, (ID2D1Geometry *)geometry, (ID2D1Brush *)brush, 5.0f, NULL);
hr = ID2D1RenderTarget_EndDraw(rt, NULL, NULL);
- ok(SUCCEEDED(hr), "Failed to end draw, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID2D1PathGeometry_Release(geometry);
match = compare_figure(&ctx, 0, 0, 160, 160, 0xff652e89, 0, "");
@@ -6550,11 +6550,11 @@ static void test_draw_geometry(BOOL d3d11)
set_rect(&rect, 20.0f, 80.0f, 60.0f, 240.0f);
hr = ID2D1Factory_CreateRectangleGeometry(factory, &rect, &rect_geometry[0]);
- ok(SUCCEEDED(hr), "Failed to create geometry, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
set_rect(&rect, -1.0f, -1.0f, 1.0f, 1.0f);
hr = ID2D1Factory_CreateRectangleGeometry(factory, &rect, &rect_geometry[1]);
- ok(SUCCEEDED(hr), "Failed to create geometry, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
set_matrix_identity(&matrix);
translate_matrix(&matrix, 160.0f, 640.0f);
@@ -6562,14 +6562,14 @@ static void test_draw_geometry(BOOL d3d11)
rotate_matrix(&matrix, M_PI / -5.0f);
hr = ID2D1Factory_CreateTransformedGeometry(factory,
(ID2D1Geometry *)rect_geometry[1], &matrix, &transformed_geometry[0]);
- ok(SUCCEEDED(hr), "Failed to create geometry, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
set_matrix_identity(&matrix);
scale_matrix(&matrix, 0.5f, 1.0f);
translate_matrix(&matrix, -80.0f, 0.0f);
hr = ID2D1Factory_CreateTransformedGeometry(factory,
(ID2D1Geometry *)transformed_geometry[0], &matrix, &transformed_geometry[1]);
- ok(SUCCEEDED(hr), "Failed to create geometry, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
set_matrix_identity(&matrix);
rotate_matrix(&matrix, M_PI / 2.0f);
@@ -6577,7 +6577,7 @@ static void test_draw_geometry(BOOL d3d11)
scale_matrix(&matrix, 2.0f, 0.25f);
hr = ID2D1Factory_CreateTransformedGeometry(factory,
(ID2D1Geometry *)transformed_geometry[1], &matrix, &transformed_geometry[2]);
- ok(SUCCEEDED(hr), "Failed to create geometry, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID2D1RenderTarget_BeginDraw(rt);
ID2D1RenderTarget_Clear(rt, &color);
@@ -6586,7 +6586,7 @@ static void test_draw_geometry(BOOL d3d11)
ID2D1RenderTarget_DrawGeometry(rt, (ID2D1Geometry *)transformed_geometry[1], (ID2D1Brush *)brush, 5.0f, NULL);
ID2D1RenderTarget_DrawGeometry(rt, (ID2D1Geometry *)transformed_geometry[2], (ID2D1Brush *)brush, 15.0f, NULL);
hr = ID2D1RenderTarget_EndDraw(rt, NULL, NULL);
- ok(SUCCEEDED(hr), "Failed to end draw, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID2D1TransformedGeometry_Release(transformed_geometry[2]);
ID2D1TransformedGeometry_Release(transformed_geometry[1]);
ID2D1TransformedGeometry_Release(transformed_geometry[0]);
@@ -6653,9 +6653,9 @@ static void test_draw_geometry(BOOL d3d11)
ok(match, "Figure does not match.\n");
hr = ID2D1Factory_CreatePathGeometry(factory, &geometry);
- ok(SUCCEEDED(hr), "Failed to create path geometry, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = ID2D1PathGeometry_Open(geometry, &sink);
- ok(SUCCEEDED(hr), "Failed to open geometry sink, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
set_point(&point, 20.0f, 80.0f);
ID2D1GeometrySink_BeginFigure(sink, point, D2D1_FIGURE_BEGIN_HOLLOW);
@@ -6754,14 +6754,14 @@ static void test_draw_geometry(BOOL d3d11)
ID2D1GeometrySink_EndFigure(sink, D2D1_FIGURE_END_OPEN);
hr = ID2D1GeometrySink_Close(sink);
- ok(SUCCEEDED(hr), "Failed to close geometry sink, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID2D1GeometrySink_Release(sink);
ID2D1RenderTarget_BeginDraw(rt);
ID2D1RenderTarget_Clear(rt, &color);
ID2D1RenderTarget_DrawGeometry(rt, (ID2D1Geometry *)geometry, (ID2D1Brush *)brush, 10.0f, NULL);
hr = ID2D1RenderTarget_EndDraw(rt, NULL, NULL);
- ok(SUCCEEDED(hr), "Failed to end draw, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID2D1PathGeometry_Release(geometry);
match = compare_figure(&ctx, 0, 0, 160, 160, 0xff652e89, 0,
@@ -6876,9 +6876,9 @@ static void test_draw_geometry(BOOL d3d11)
ok(match, "Figure does not match.\n");
hr = ID2D1Factory_CreatePathGeometry(factory, &geometry);
- ok(SUCCEEDED(hr), "Failed to create path geometry, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = ID2D1PathGeometry_Open(geometry, &sink);
- ok(SUCCEEDED(hr), "Failed to open geometry sink, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
set_point(&point, -0.402914f, 0.915514f);
ID2D1GeometrySink_BeginFigure(sink, point, D2D1_FIGURE_BEGIN_HOLLOW);
@@ -6897,7 +6897,7 @@ static void test_draw_geometry(BOOL d3d11)
ID2D1GeometrySink_EndFigure(sink, D2D1_FIGURE_END_CLOSED);
hr = ID2D1GeometrySink_Close(sink);
- ok(SUCCEEDED(hr), "Failed to close geometry sink, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID2D1GeometrySink_Release(sink);
set_matrix_identity(&matrix);
@@ -6905,7 +6905,7 @@ static void test_draw_geometry(BOOL d3d11)
scale_matrix(&matrix, 20.0f, 80.0f);
hr = ID2D1Factory_CreateTransformedGeometry(factory,
(ID2D1Geometry *)geometry, &matrix, &transformed_geometry[0]);
- ok(SUCCEEDED(hr), "Failed to create geometry, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
set_matrix_identity(&matrix);
translate_matrix(&matrix, 160.0f, 640.0f);
@@ -6913,7 +6913,7 @@ static void test_draw_geometry(BOOL d3d11)
rotate_matrix(&matrix, M_PI / -5.0f);
hr = ID2D1Factory_CreateTransformedGeometry(factory,
(ID2D1Geometry *)geometry, &matrix, &transformed_geometry[1]);
- ok(SUCCEEDED(hr), "Failed to create geometry, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID2D1PathGeometry_Release(geometry);
set_matrix_identity(&matrix);
@@ -6921,7 +6921,7 @@ static void test_draw_geometry(BOOL d3d11)
translate_matrix(&matrix, -80.0f, 0.0f);
hr = ID2D1Factory_CreateTransformedGeometry(factory,
(ID2D1Geometry *)transformed_geometry[1], &matrix, &transformed_geometry[2]);
- ok(SUCCEEDED(hr), "Failed to create geometry, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
set_matrix_identity(&matrix);
rotate_matrix(&matrix, M_PI / 2.0f);
@@ -6929,7 +6929,7 @@ static void test_draw_geometry(BOOL d3d11)
scale_matrix(&matrix, 2.0f, 0.25f);
hr = ID2D1Factory_CreateTransformedGeometry(factory,
(ID2D1Geometry *)transformed_geometry[2], &matrix, &transformed_geometry[3]);
- ok(SUCCEEDED(hr), "Failed to create geometry, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID2D1RenderTarget_BeginDraw(rt);
ID2D1RenderTarget_Clear(rt, &color);
@@ -6938,7 +6938,7 @@ static void test_draw_geometry(BOOL d3d11)
ID2D1RenderTarget_DrawGeometry(rt, (ID2D1Geometry *)transformed_geometry[2], (ID2D1Brush *)brush, 5.0f, NULL);
ID2D1RenderTarget_DrawGeometry(rt, (ID2D1Geometry *)transformed_geometry[3], (ID2D1Brush *)brush, 15.0f, NULL);
hr = ID2D1RenderTarget_EndDraw(rt, NULL, NULL);
- ok(SUCCEEDED(hr), "Failed to end draw, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID2D1TransformedGeometry_Release(transformed_geometry[3]);
ID2D1TransformedGeometry_Release(transformed_geometry[2]);
ID2D1TransformedGeometry_Release(transformed_geometry[1]);
@@ -6990,9 +6990,9 @@ static void test_draw_geometry(BOOL d3d11)
ok(match, "Figure does not match.\n");
hr = ID2D1Factory_CreatePathGeometry(factory, &geometry);
- ok(hr == S_OK, "Got unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = ID2D1PathGeometry_Open(geometry, &sink);
- ok(hr == S_OK, "Got unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
set_point(&point, 20.0f, 80.0f);
ID2D1GeometrySink_BeginFigure(sink, point, D2D1_FIGURE_BEGIN_HOLLOW);
@@ -7005,14 +7005,14 @@ static void test_draw_geometry(BOOL d3d11)
ID2D1GeometrySink_EndFigure(sink, D2D1_FIGURE_END_OPEN);
hr = ID2D1GeometrySink_Close(sink);
- ok(hr == S_OK, "Got unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID2D1GeometrySink_Release(sink);
ID2D1RenderTarget_BeginDraw(rt);
ID2D1RenderTarget_Clear(rt, &color);
ID2D1RenderTarget_DrawGeometry(rt, (ID2D1Geometry *)geometry, (ID2D1Brush *)brush, 10.0f, NULL);
hr = ID2D1RenderTarget_EndDraw(rt, NULL, NULL);
- ok(hr == S_OK, "Got unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID2D1PathGeometry_Release(geometry);
match = compare_figure(&ctx, 0, 0, 160, 160, 0xff652e89, 32,
@@ -7062,7 +7062,7 @@ static void test_fill_geometry(BOOL d3d11)
ID2D1RenderTarget_SetAntialiasMode(rt, D2D1_ANTIALIAS_MODE_ALIASED);
set_color(&color, 0.890f, 0.851f, 0.600f, 1.0f);
hr = ID2D1RenderTarget_CreateSolidColorBrush(rt, &color, NULL, &brush);
- ok(SUCCEEDED(hr), "Failed to create brush, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID2D1RenderTarget_BeginDraw(rt);
set_color(&color, 0.396f, 0.180f, 0.537f, 1.0f);
@@ -7087,7 +7087,7 @@ static void test_fill_geometry(BOOL d3d11)
ID2D1RenderTarget_FillEllipse(rt, &ellipse, (ID2D1Brush *)brush);
hr = ID2D1RenderTarget_EndDraw(rt, NULL, NULL);
- ok(SUCCEEDED(hr), "Failed to end draw, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
match = compare_figure(&ctx, 0, 160, 160, 160, 0xff652e89, 0, "gMgB");
ok(match, "Figure does not match.\n");
@@ -7145,7 +7145,7 @@ static void test_fill_geometry(BOOL d3d11)
ID2D1RenderTarget_FillRoundedRectangle(rt, &rounded_rect, (ID2D1Brush *)brush);
hr = ID2D1RenderTarget_EndDraw(rt, NULL, NULL);
- ok(SUCCEEDED(hr), "Failed to end draw, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
match = compare_figure(&ctx, 0, 0, 160, 160, 0xff652e89, 0, "gMgB");
ok(match, "Figure does not match.\n");
@@ -7215,7 +7215,7 @@ static void test_fill_geometry(BOOL d3d11)
ID2D1RenderTarget_FillRoundedRectangle(rt, &rounded_rect, (ID2D1Brush *)brush);
hr = ID2D1RenderTarget_EndDraw(rt, NULL, NULL);
- ok(SUCCEEDED(hr), "Failed to end draw, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
match = compare_figure(&ctx, 0, 0, 160, 160, 0xff652e89, 0, "gMgB");
ok(match, "Figure does not match.\n");
@@ -7254,9 +7254,9 @@ static void test_fill_geometry(BOOL d3d11)
ok(match, "Figure does not match.\n");
hr = ID2D1Factory_CreatePathGeometry(factory, &geometry);
- ok(SUCCEEDED(hr), "Failed to create path geometry, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = ID2D1PathGeometry_Open(geometry, &sink);
- ok(SUCCEEDED(hr), "Failed to open geometry sink, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
set_point(&point, 40.0f, 160.0f);
ID2D1GeometrySink_BeginFigure(sink, point, D2D1_FIGURE_BEGIN_FILLED);
@@ -7326,14 +7326,14 @@ static void test_fill_geometry(BOOL d3d11)
ID2D1GeometrySink_SetFillMode(sink, D2D1_FILL_MODE_ALTERNATE);
hr = ID2D1GeometrySink_Close(sink);
- ok(SUCCEEDED(hr), "Failed to close geometry sink, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID2D1GeometrySink_Release(sink);
ID2D1RenderTarget_BeginDraw(rt);
ID2D1RenderTarget_Clear(rt, &color);
ID2D1RenderTarget_FillGeometry(rt, (ID2D1Geometry *)geometry, (ID2D1Brush *)brush, NULL);
hr = ID2D1RenderTarget_EndDraw(rt, NULL, NULL);
- ok(SUCCEEDED(hr), "Failed to end draw, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID2D1PathGeometry_Release(geometry);
match = compare_figure(&ctx, 0, 0, 160, 160, 0xff652e89, 0, "gMgB");
@@ -7381,11 +7381,11 @@ static void test_fill_geometry(BOOL d3d11)
set_rect(&rect, 20.0f, 80.0f, 60.0f, 240.0f);
hr = ID2D1Factory_CreateRectangleGeometry(factory, &rect, &rect_geometry[0]);
- ok(SUCCEEDED(hr), "Failed to create geometry, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
set_rect(&rect, -1.0f, -1.0f, 1.0f, 1.0f);
hr = ID2D1Factory_CreateRectangleGeometry(factory, &rect, &rect_geometry[1]);
- ok(SUCCEEDED(hr), "Failed to create geometry, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
set_matrix_identity(&matrix);
translate_matrix(&matrix, 160.0f, 640.0f);
@@ -7393,14 +7393,14 @@ static void test_fill_geometry(BOOL d3d11)
rotate_matrix(&matrix, M_PI / -5.0f);
hr = ID2D1Factory_CreateTransformedGeometry(factory,
(ID2D1Geometry *)rect_geometry[1], &matrix, &transformed_geometry[0]);
- ok(SUCCEEDED(hr), "Failed to create geometry, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
set_matrix_identity(&matrix);
scale_matrix(&matrix, 0.5f, 1.0f);
translate_matrix(&matrix, -80.0f, 0.0f);
hr = ID2D1Factory_CreateTransformedGeometry(factory,
(ID2D1Geometry *)transformed_geometry[0], &matrix, &transformed_geometry[1]);
- ok(SUCCEEDED(hr), "Failed to create geometry, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
set_matrix_identity(&matrix);
rotate_matrix(&matrix, M_PI / 2.0f);
@@ -7408,7 +7408,7 @@ static void test_fill_geometry(BOOL d3d11)
scale_matrix(&matrix, 2.0f, 0.25f);
hr = ID2D1Factory_CreateTransformedGeometry(factory,
(ID2D1Geometry *)transformed_geometry[1], &matrix, &transformed_geometry[2]);
- ok(SUCCEEDED(hr), "Failed to create geometry, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID2D1RenderTarget_BeginDraw(rt);
ID2D1RenderTarget_Clear(rt, &color);
@@ -7417,7 +7417,7 @@ static void test_fill_geometry(BOOL d3d11)
ID2D1RenderTarget_FillGeometry(rt, (ID2D1Geometry *)transformed_geometry[1], (ID2D1Brush *)brush, NULL);
ID2D1RenderTarget_FillGeometry(rt, (ID2D1Geometry *)transformed_geometry[2], (ID2D1Brush *)brush, NULL);
hr = ID2D1RenderTarget_EndDraw(rt, NULL, NULL);
- ok(SUCCEEDED(hr), "Failed to end draw, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID2D1TransformedGeometry_Release(transformed_geometry[2]);
ID2D1TransformedGeometry_Release(transformed_geometry[1]);
ID2D1TransformedGeometry_Release(transformed_geometry[0]);
@@ -7463,9 +7463,9 @@ static void test_fill_geometry(BOOL d3d11)
ok(match, "Figure does not match.\n");
hr = ID2D1Factory_CreatePathGeometry(factory, &geometry);
- ok(SUCCEEDED(hr), "Failed to create path geometry, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = ID2D1PathGeometry_Open(geometry, &sink);
- ok(SUCCEEDED(hr), "Failed to open geometry sink, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
set_point(&point, 20.0f, 80.0f);
ID2D1GeometrySink_BeginFigure(sink, point, D2D1_FIGURE_BEGIN_FILLED);
@@ -7564,14 +7564,14 @@ static void test_fill_geometry(BOOL d3d11)
ID2D1GeometrySink_EndFigure(sink, D2D1_FIGURE_END_OPEN);
hr = ID2D1GeometrySink_Close(sink);
- ok(SUCCEEDED(hr), "Failed to close geometry sink, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID2D1GeometrySink_Release(sink);
ID2D1RenderTarget_BeginDraw(rt);
ID2D1RenderTarget_Clear(rt, &color);
ID2D1RenderTarget_FillGeometry(rt, (ID2D1Geometry *)geometry, (ID2D1Brush *)brush, NULL);
hr = ID2D1RenderTarget_EndDraw(rt, NULL, NULL);
- ok(SUCCEEDED(hr), "Failed to end draw, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID2D1PathGeometry_Release(geometry);
match = compare_figure(&ctx, 0, 0, 160, 160, 0xff652e89, 0,
@@ -7645,9 +7645,9 @@ static void test_fill_geometry(BOOL d3d11)
ok(match, "Figure does not match.\n");
hr = ID2D1Factory_CreatePathGeometry(factory, &geometry);
- ok(SUCCEEDED(hr), "Failed to create path geometry, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = ID2D1PathGeometry_Open(geometry, &sink);
- ok(SUCCEEDED(hr), "Failed to open geometry sink, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
set_point(&point, -0.402914f, 0.915514f);
ID2D1GeometrySink_BeginFigure(sink, point, D2D1_FIGURE_BEGIN_FILLED);
@@ -7666,7 +7666,7 @@ static void test_fill_geometry(BOOL d3d11)
ID2D1GeometrySink_EndFigure(sink, D2D1_FIGURE_END_CLOSED);
hr = ID2D1GeometrySink_Close(sink);
- ok(SUCCEEDED(hr), "Failed to close geometry sink, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID2D1GeometrySink_Release(sink);
set_matrix_identity(&matrix);
@@ -7674,7 +7674,7 @@ static void test_fill_geometry(BOOL d3d11)
scale_matrix(&matrix, 20.0f, 80.0f);
hr = ID2D1Factory_CreateTransformedGeometry(factory,
(ID2D1Geometry *)geometry, &matrix, &transformed_geometry[0]);
- ok(SUCCEEDED(hr), "Failed to create geometry, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
set_matrix_identity(&matrix);
translate_matrix(&matrix, 160.0f, 640.0f);
@@ -7682,7 +7682,7 @@ static void test_fill_geometry(BOOL d3d11)
rotate_matrix(&matrix, M_PI / -5.0f);
hr = ID2D1Factory_CreateTransformedGeometry(factory,
(ID2D1Geometry *)geometry, &matrix, &transformed_geometry[1]);
- ok(SUCCEEDED(hr), "Failed to create geometry, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID2D1PathGeometry_Release(geometry);
set_matrix_identity(&matrix);
@@ -7690,7 +7690,7 @@ static void test_fill_geometry(BOOL d3d11)
translate_matrix(&matrix, -80.0f, 0.0f);
hr = ID2D1Factory_CreateTransformedGeometry(factory,
(ID2D1Geometry *)transformed_geometry[1], &matrix, &transformed_geometry[2]);
- ok(SUCCEEDED(hr), "Failed to create geometry, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
set_matrix_identity(&matrix);
rotate_matrix(&matrix, M_PI / 2.0f);
@@ -7698,7 +7698,7 @@ static void test_fill_geometry(BOOL d3d11)
scale_matrix(&matrix, 2.0f, 0.25f);
hr = ID2D1Factory_CreateTransformedGeometry(factory,
(ID2D1Geometry *)transformed_geometry[2], &matrix, &transformed_geometry[3]);
- ok(SUCCEEDED(hr), "Failed to create geometry, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID2D1RenderTarget_BeginDraw(rt);
ID2D1RenderTarget_Clear(rt, &color);
@@ -7707,7 +7707,7 @@ static void test_fill_geometry(BOOL d3d11)
ID2D1RenderTarget_FillGeometry(rt, (ID2D1Geometry *)transformed_geometry[2], (ID2D1Brush *)brush, NULL);
ID2D1RenderTarget_FillGeometry(rt, (ID2D1Geometry *)transformed_geometry[3], (ID2D1Brush *)brush, NULL);
hr = ID2D1RenderTarget_EndDraw(rt, NULL, NULL);
- ok(SUCCEEDED(hr), "Failed to end draw, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID2D1TransformedGeometry_Release(transformed_geometry[3]);
ID2D1TransformedGeometry_Release(transformed_geometry[2]);
ID2D1TransformedGeometry_Release(transformed_geometry[1]);
@@ -7749,9 +7749,9 @@ static void test_fill_geometry(BOOL d3d11)
ok(match, "Figure does not match.\n");
hr = ID2D1Factory_CreatePathGeometry(factory, &geometry);
- ok(SUCCEEDED(hr), "Failed to create path geometry, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = ID2D1PathGeometry_Open(geometry, &sink);
- ok(SUCCEEDED(hr), "Failed to open geometry sink, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
set_point(&point, -0.402914f, 0.915514f);
ID2D1GeometrySink_BeginFigure(sink, point, D2D1_FIGURE_BEGIN_HOLLOW);
@@ -7770,7 +7770,7 @@ static void test_fill_geometry(BOOL d3d11)
ID2D1GeometrySink_EndFigure(sink, D2D1_FIGURE_END_CLOSED);
hr = ID2D1GeometrySink_Close(sink);
- ok(SUCCEEDED(hr), "Failed to close geometry sink, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID2D1GeometrySink_Release(sink);
set_matrix_identity(&matrix);
@@ -7778,7 +7778,7 @@ static void test_fill_geometry(BOOL d3d11)
scale_matrix(&matrix, 20.0f, 80.0f);
hr = ID2D1Factory_CreateTransformedGeometry(factory,
(ID2D1Geometry *)geometry, &matrix, &transformed_geometry[0]);
- ok(SUCCEEDED(hr), "Failed to create geometry, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
set_matrix_identity(&matrix);
translate_matrix(&matrix, 160.0f, 640.0f);
@@ -7786,7 +7786,7 @@ static void test_fill_geometry(BOOL d3d11)
rotate_matrix(&matrix, M_PI / -5.0f);
hr = ID2D1Factory_CreateTransformedGeometry(factory,
(ID2D1Geometry *)geometry, &matrix, &transformed_geometry[1]);
- ok(SUCCEEDED(hr), "Failed to create geometry, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID2D1PathGeometry_Release(geometry);
set_matrix_identity(&matrix);
@@ -7794,7 +7794,7 @@ static void test_fill_geometry(BOOL d3d11)
translate_matrix(&matrix, -80.0f, 0.0f);
hr = ID2D1Factory_CreateTransformedGeometry(factory,
(ID2D1Geometry *)transformed_geometry[1], &matrix, &transformed_geometry[2]);
- ok(SUCCEEDED(hr), "Failed to create geometry, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
set_matrix_identity(&matrix);
rotate_matrix(&matrix, M_PI / 2.0f);
@@ -7802,7 +7802,7 @@ static void test_fill_geometry(BOOL d3d11)
scale_matrix(&matrix, 2.0f, 0.25f);
hr = ID2D1Factory_CreateTransformedGeometry(factory,
(ID2D1Geometry *)transformed_geometry[2], &matrix, &transformed_geometry[3]);
- ok(SUCCEEDED(hr), "Failed to create geometry, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID2D1RenderTarget_BeginDraw(rt);
ID2D1RenderTarget_Clear(rt, &color);
@@ -7811,7 +7811,7 @@ static void test_fill_geometry(BOOL d3d11)
ID2D1RenderTarget_FillGeometry(rt, (ID2D1Geometry *)transformed_geometry[2], (ID2D1Brush *)brush, NULL);
ID2D1RenderTarget_FillGeometry(rt, (ID2D1Geometry *)transformed_geometry[3], (ID2D1Brush *)brush, NULL);
hr = ID2D1RenderTarget_EndDraw(rt, NULL, NULL);
- ok(SUCCEEDED(hr), "Failed to end draw, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID2D1TransformedGeometry_Release(transformed_geometry[3]);
ID2D1TransformedGeometry_Release(transformed_geometry[2]);
ID2D1TransformedGeometry_Release(transformed_geometry[1]);
@@ -7851,15 +7851,15 @@ static void test_gdi_interop(BOOL d3d11)
return;
hr = D2D1CreateFactory(D2D1_FACTORY_TYPE_SINGLE_THREADED, &IID_ID2D1Factory, NULL, (void **)&factory);
- ok(SUCCEEDED(hr), "Failed to create factory, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
CoInitializeEx(NULL, COINIT_APARTMENTTHREADED);
hr = CoCreateInstance(&CLSID_WICImagingFactory, NULL, CLSCTX_INPROC_SERVER,
&IID_IWICImagingFactory, (void **)&wic_factory);
- ok(SUCCEEDED(hr), "Failed to create WIC imaging factory, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = IWICImagingFactory_CreateBitmap(wic_factory, 16, 16,
&GUID_WICPixelFormat32bppPBGRA, WICBitmapCacheOnDemand, &wic_bitmap);
- ok(SUCCEEDED(hr), "Failed to create bitmap, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
IWICImagingFactory_Release(wic_factory);
/* WIC target, default usage */
@@ -7872,19 +7872,19 @@ static void test_gdi_interop(BOOL d3d11)
desc.minLevel = D2D1_FEATURE_LEVEL_DEFAULT;
hr = ID2D1Factory_CreateWicBitmapRenderTarget(factory, wic_bitmap, &desc, &rt);
- ok(SUCCEEDED(hr), "Failed to create render target, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = ID2D1RenderTarget_QueryInterface(rt, &IID_ID2D1GdiInteropRenderTarget, (void **)&interop);
- ok(SUCCEEDED(hr), "Failed to get gdi interop interface, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID2D1RenderTarget_BeginDraw(rt);
dc = (void *)0xdeadbeef;
hr = ID2D1GdiInteropRenderTarget_GetDC(interop, D2D1_DC_INITIALIZE_MODE_COPY, &dc);
- ok(FAILED(hr), "GetDC() was expected to fail, hr %#x.\n", hr);
+ ok(hr != S_OK, "Got unexpected hr %#lx.\n", hr);
todo_wine ok(!dc, "Got unexpected DC %p.\n", dc);
ID2D1GdiInteropRenderTarget_Release(interop);
hr = ID2D1RenderTarget_EndDraw(rt, NULL, NULL);
- ok(SUCCEEDED(hr), "Failed to end draw, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID2D1RenderTarget_Release(rt);
@@ -7892,25 +7892,25 @@ static void test_gdi_interop(BOOL d3d11)
desc.usage = D2D1_RENDER_TARGET_USAGE_GDI_COMPATIBLE;
hr = ID2D1Factory_CreateWicBitmapRenderTarget(factory, wic_bitmap, &desc, &rt);
- ok(SUCCEEDED(hr), "Failed to create render target, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = ID2D1RenderTarget_QueryInterface(rt, &IID_ID2D1GdiInteropRenderTarget, (void **)&interop);
- ok(SUCCEEDED(hr), "Failed to get gdi interop interface, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID2D1RenderTarget_BeginDraw(rt);
dc = NULL;
hr = ID2D1GdiInteropRenderTarget_GetDC(interop, D2D1_DC_INITIALIZE_MODE_COPY, &dc);
- ok(SUCCEEDED(hr), "GetDC() was expected to succeed, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ok(dc != NULL, "Expected NULL dc, got %p.\n", dc);
ID2D1GdiInteropRenderTarget_ReleaseDC(interop, NULL);
hr = ID2D1RenderTarget_EndDraw(rt, NULL, NULL);
- ok(SUCCEEDED(hr), "EndDraw() failed, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID2D1RenderTarget_BeginDraw(rt);
set_color(&color, 1.0f, 0.0f, 0.0f, 1.0f);
ID2D1RenderTarget_Clear(rt, &color);
hr = ID2D1RenderTarget_EndDraw(rt, NULL, NULL);
- ok(SUCCEEDED(hr), "EndDraw() failed, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
match = compare_wic_bitmap(wic_bitmap, "54034063dbc1c1bb61cb60ec57e4498678dc2b13");
ok(match, "Bitmap does not match.\n");
@@ -7919,37 +7919,37 @@ static void test_gdi_interop(BOOL d3d11)
ID2D1RenderTarget_BeginDraw(rt);
hr = ID2D1GdiInteropRenderTarget_GetDC(interop, D2D1_DC_INITIALIZE_MODE_COPY, &dc);
- ok(SUCCEEDED(hr), "GetDC() was expected to succeed, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
SetRect(&rect, 0, 0, 16, 16);
FillRect(dc, &rect, GetStockObject(BLACK_BRUSH));
ID2D1GdiInteropRenderTarget_ReleaseDC(interop, NULL);
hr = ID2D1RenderTarget_EndDraw(rt, NULL, NULL);
- ok(SUCCEEDED(hr), "EndDraw() failed, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
match = compare_wic_bitmap(wic_bitmap, "60cacbf3d72e1e7834203da608037b1bf83b40e8");
ok(match, "Bitmap does not match.\n");
/* Bitmap is locked at BeginDraw(). */
hr = IWICBitmap_Lock(wic_bitmap, NULL, WICBitmapLockRead, &wic_lock);
- ok(SUCCEEDED(hr), "Expected bitmap to be unlocked, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
IWICBitmapLock_Release(wic_lock);
ID2D1RenderTarget_BeginDraw(rt);
hr = IWICBitmap_Lock(wic_bitmap, NULL, WICBitmapLockRead, &wic_lock);
- todo_wine ok(hr == WINCODEC_ERR_ALREADYLOCKED, "Got unexpected hr %#x.\n", hr);
+ todo_wine ok(hr == WINCODEC_ERR_ALREADYLOCKED, "Got unexpected hr %#lx.\n", hr);
if (SUCCEEDED(hr))
IWICBitmapLock_Release(wic_lock);
hr = ID2D1RenderTarget_EndDraw(rt, NULL, NULL);
- ok(SUCCEEDED(hr), "EndDraw() failed, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
/* Lock before BeginDraw(). */
hr = IWICBitmap_Lock(wic_bitmap, NULL, WICBitmapLockRead, &wic_lock);
- ok(SUCCEEDED(hr), "Expected bitmap to be unlocked, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID2D1RenderTarget_BeginDraw(rt);
hr = ID2D1RenderTarget_EndDraw(rt, NULL, NULL);
- todo_wine ok(hr == WINCODEC_ERR_ALREADYLOCKED, "Got unexpected hr %#x.\n", hr);
+ todo_wine ok(hr == WINCODEC_ERR_ALREADYLOCKED, "Got unexpected hr %#lx.\n", hr);
IWICBitmapLock_Release(wic_lock);
ID2D1GdiInteropRenderTarget_Release(interop);
@@ -7979,7 +7979,7 @@ static void test_layer(BOOL d3d11)
ID2D1RenderTarget_SetAntialiasMode(rt, D2D1_ANTIALIAS_MODE_ALIASED);
hr = ID2D1RenderTarget_CreateLayer(rt, NULL, &layer);
- ok(SUCCEEDED(hr), "Failed to create layer, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID2D1Layer_GetFactory(layer, &layer_factory);
ok(layer_factory == factory, "Got unexpected layer factory %p, expected %p.\n", layer_factory, factory);
ID2D1Factory_Release(layer_factory);
@@ -7990,7 +7990,7 @@ static void test_layer(BOOL d3d11)
set_size_f(&size, 800.0f, 600.0f);
hr = ID2D1RenderTarget_CreateLayer(rt, &size, &layer);
- ok(SUCCEEDED(hr), "Failed to create layer, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
size = ID2D1Layer_GetSize(layer);
ok(size.width == 800.0f, "Got unexpected width %.8e.\n", size.width);
ok(size.height == 600.0f, "Got unexpected height %.8e.\n", size.height);
@@ -8023,12 +8023,12 @@ static void test_bezier_intersect(BOOL d3d11)
ID2D1RenderTarget_SetAntialiasMode(rt, D2D1_ANTIALIAS_MODE_ALIASED);
set_color(&color, 0.890f, 0.851f, 0.600f, 1.0f);
hr = ID2D1RenderTarget_CreateSolidColorBrush(rt, &color, NULL, &brush);
- ok(SUCCEEDED(hr), "Failed to create brush, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = ID2D1Factory_CreatePathGeometry(factory, &geometry);
- ok(SUCCEEDED(hr), "Failed to create path geometry, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = ID2D1PathGeometry_Open(geometry, &sink);
- ok(SUCCEEDED(hr), "Failed to open geometry sink, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
set_point(&point, 160.0f, 720.0f);
ID2D1GeometrySink_BeginFigure(sink, point, D2D1_FIGURE_BEGIN_FILLED);
@@ -8049,7 +8049,7 @@ static void test_bezier_intersect(BOOL d3d11)
ID2D1GeometrySink_EndFigure(sink, D2D1_FIGURE_END_CLOSED);
hr = ID2D1GeometrySink_Close(sink);
- ok(SUCCEEDED(hr), "Failed to close geometry sink, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID2D1GeometrySink_Release(sink);
ID2D1RenderTarget_BeginDraw(rt);
@@ -8057,7 +8057,7 @@ static void test_bezier_intersect(BOOL d3d11)
ID2D1RenderTarget_Clear(rt, &color);
ID2D1RenderTarget_FillGeometry(rt, (ID2D1Geometry *)geometry, (ID2D1Brush *)brush, NULL);
hr = ID2D1RenderTarget_EndDraw(rt, NULL, NULL);
- ok(SUCCEEDED(hr), "Failed to end draw, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID2D1PathGeometry_Release(geometry);
match = compare_figure(&ctx, 160, 120, 320, 240, 0xff652e89, 2048,
@@ -8087,9 +8087,9 @@ static void test_bezier_intersect(BOOL d3d11)
ok(match, "Figure does not match.\n");
hr = ID2D1Factory_CreatePathGeometry(factory, &geometry);
- ok(SUCCEEDED(hr), "Failed to create path geometry, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = ID2D1PathGeometry_Open(geometry, &sink);
- ok(SUCCEEDED(hr), "Failed to open geometry sink, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
set_point(&point, 240.0f, 720.0f);
ID2D1GeometrySink_BeginFigure(sink, point, D2D1_FIGURE_BEGIN_FILLED);
@@ -8100,14 +8100,14 @@ static void test_bezier_intersect(BOOL d3d11)
ID2D1GeometrySink_EndFigure(sink, D2D1_FIGURE_END_CLOSED);
hr = ID2D1GeometrySink_Close(sink);
- ok(SUCCEEDED(hr), "Failed to close geometry sink, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID2D1GeometrySink_Release(sink);
ID2D1RenderTarget_BeginDraw(rt);
ID2D1RenderTarget_Clear(rt, &color);
ID2D1RenderTarget_FillGeometry(rt, (ID2D1Geometry *)geometry, (ID2D1Brush *)brush, NULL);
hr = ID2D1RenderTarget_EndDraw(rt, NULL, NULL);
- ok(SUCCEEDED(hr), "Failed to end draw, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID2D1PathGeometry_Release(geometry);
match = compare_figure(&ctx, 160, 120, 320, 240, 0xff652e89, 2048,
@@ -8155,7 +8155,7 @@ static void test_create_device(BOOL d3d11)
}
hr = ID2D1Factory1_CreateDevice(factory, ctx.device, &device);
- ok(SUCCEEDED(hr), "Failed to get ID2D1Device, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID2D1Device_GetFactory(device, &factory2);
ok(factory2 == (ID2D1Factory *)factory, "Got unexpected factory %p, expected %p.\n", factory2, factory);
@@ -8165,11 +8165,11 @@ static void test_create_device(BOOL d3d11)
if (pD2D1CreateDevice)
{
hr = pD2D1CreateDevice(ctx.device, NULL, &device);
- ok(hr == S_OK, "Got unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID2D1Device_Release(device);
hr = pD2D1CreateDevice(ctx.device, &properties, &device);
- ok(hr == S_OK, "Got unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID2D1Device_Release(device);
}
else
@@ -8178,7 +8178,7 @@ static void test_create_device(BOOL d3d11)
release_test_context(&ctx);
refcount = ID2D1Factory1_Release(factory);
- ok(!refcount, "Factory has %u references left.\n", refcount);
+ ok(!refcount, "Factory has %lu references left.\n", refcount);
}
#define check_rt_bitmap_surface(r, s, o) check_rt_bitmap_surface_(__LINE__, r, s, o)
@@ -8207,7 +8207,7 @@ static void check_rt_bitmap_surface_(unsigned int line, ID2D1RenderTarget *rt, B
bitmap_desc.dpiX = 96.0f;
bitmap_desc.dpiY = 96.0f;
hr = ID2D1RenderTarget_CreateBitmap(rt, size, bitmap_data, sizeof(*bitmap_data), &bitmap_desc, &bitmap);
- ok_(__FILE__, line)(SUCCEEDED(hr), "Failed to create bitmap, hr %#x.\n", hr);
+ ok_(__FILE__, line)(hr == S_OK, "Failed to create bitmap, hr %#lx.\n", hr);
check_bitmap_surface_(line, bitmap, has_surface, options);
@@ -8216,19 +8216,19 @@ static void check_rt_bitmap_surface_(unsigned int line, ID2D1RenderTarget *rt, B
/* Zero sized bitmaps. */
set_size_u(&size, 0, 0);
hr = ID2D1RenderTarget_CreateBitmap(rt, size, NULL, 0, &bitmap_desc, &bitmap);
- ok_(__FILE__, line)(SUCCEEDED(hr), "Failed to create bitmap, hr %#x.\n", hr);
+ ok_(__FILE__, line)(hr == S_OK, "Failed to create bitmap, hr %#lx.\n", hr);
check_bitmap_surface_(line, bitmap, has_surface, options);
ID2D1Bitmap_Release(bitmap);
set_size_u(&size, 2, 0);
hr = ID2D1RenderTarget_CreateBitmap(rt, size, NULL, 0, &bitmap_desc, &bitmap);
- ok_(__FILE__, line)(SUCCEEDED(hr), "Failed to create bitmap, hr %#x.\n", hr);
+ ok_(__FILE__, line)(hr == S_OK, "Failed to create bitmap, hr %#lx.\n", hr);
check_bitmap_surface_(line, bitmap, has_surface, options);
ID2D1Bitmap_Release(bitmap);
set_size_u(&size, 0, 2);
hr = ID2D1RenderTarget_CreateBitmap(rt, size, NULL, 0, &bitmap_desc, &bitmap);
- ok_(__FILE__, line)(SUCCEEDED(hr), "Failed to create bitmap, hr %#x.\n", hr);
+ ok_(__FILE__, line)(hr == S_OK, "Failed to create bitmap, hr %#lx.\n", hr);
check_bitmap_surface_(line, bitmap, has_surface, options);
ID2D1Bitmap_Release(bitmap);
@@ -8237,15 +8237,15 @@ static void check_rt_bitmap_surface_(unsigned int line, ID2D1RenderTarget *rt, B
hr = CoCreateInstance(&CLSID_WICImagingFactory, NULL, CLSCTX_INPROC_SERVER,
&IID_IWICImagingFactory, (void **)&wic_factory);
- ok_(__FILE__, line)(SUCCEEDED(hr), "Failed to create WIC imaging factory, hr %#x.\n", hr);
+ ok_(__FILE__, line)(hr == S_OK, "Failed to create WIC imaging factory, hr %#lx.\n", hr);
hr = IWICImagingFactory_CreateBitmap(wic_factory, 16, 16,
&GUID_WICPixelFormat32bppPBGRA, WICBitmapCacheOnDemand, &wic_bitmap);
- ok_(__FILE__, line)(SUCCEEDED(hr), "Failed to create WIC bitmap, hr %#x.\n", hr);
+ ok_(__FILE__, line)(hr == S_OK, "Failed to create WIC bitmap, hr %#lx.\n", hr);
IWICImagingFactory_Release(wic_factory);
hr = ID2D1RenderTarget_CreateBitmapFromWicBitmap(rt, (IWICBitmapSource *)wic_bitmap, NULL, &bitmap);
- ok_(__FILE__, line)(SUCCEEDED(hr), "Failed to create bitmap from WIC source, hr %#x.\n", hr);
+ ok_(__FILE__, line)(hr == S_OK, "Failed to create bitmap from WIC source, hr %#lx.\n", hr);
check_bitmap_surface_(line, bitmap, has_surface, options);
@@ -8255,7 +8255,7 @@ static void check_rt_bitmap_surface_(unsigned int line, ID2D1RenderTarget *rt, B
/* Compatible target follows its parent. */
hr = ID2D1RenderTarget_QueryInterface(rt, &IID_ID2D1DeviceContext, (void **)&context);
- ok_(__FILE__, line)(SUCCEEDED(hr), "Failed to get device context, hr %#x.\n", hr);
+ ok_(__FILE__, line)(hr == S_OK, "Failed to get device context, hr %#lx.\n", hr);
dc_rt = NULL;
ID2D1RenderTarget_QueryInterface(rt, &IID_ID2D1DCRenderTarget, (void **)&dc_rt);
@@ -8289,10 +8289,10 @@ static void check_rt_bitmap_surface_(unsigned int line, ID2D1RenderTarget *rt, B
hr = ID2D1RenderTarget_CreateCompatibleRenderTarget(rt, NULL, NULL, NULL,
D2D1_COMPATIBLE_RENDER_TARGET_OPTIONS_NONE, &compatible_rt);
- ok_(__FILE__, line)(SUCCEEDED(hr), "Failed to create compatible render target, hr %#x.\n", hr);
+ ok_(__FILE__, line)(hr == S_OK, "Failed to create compatible render target, hr %#lx.\n", hr);
hr = ID2D1BitmapRenderTarget_QueryInterface(compatible_rt, &IID_ID2D1DeviceContext, (void **)&context2);
- ok_(__FILE__, line)(SUCCEEDED(hr), "Failed to get device context, hr %#x.\n", hr);
+ ok_(__FILE__, line)(hr == S_OK, "Failed to get device context, hr %#lx.\n", hr);
ID2D1DeviceContext_GetDevice(context2, &device2);
ok_(__FILE__, line)(device == device2, "Unexpected device.\n");
@@ -8302,12 +8302,12 @@ static void check_rt_bitmap_surface_(unsigned int line, ID2D1RenderTarget *rt, B
hr = ID2D1BitmapRenderTarget_CreateBitmap(compatible_rt, size,
bitmap_data, sizeof(*bitmap_data), &bitmap_desc, &bitmap);
- ok_(__FILE__, line)(SUCCEEDED(hr), "Failed to create bitmap, hr %#x.\n", hr);
+ ok_(__FILE__, line)(hr == S_OK, "Failed to create bitmap, hr %#lx.\n", hr);
check_bitmap_surface_(line, bitmap, has_surface, options);
ID2D1Bitmap_Release(bitmap);
hr = ID2D1BitmapRenderTarget_GetBitmap(compatible_rt, &bitmap);
- ok_(__FILE__, line)(SUCCEEDED(hr), "Failed to get compatible target bitmap, hr %#x.\n", hr);
+ ok_(__FILE__, line)(hr == S_OK, "Failed to get compatible target bitmap, hr %#lx.\n", hr);
bitmap2 = NULL;
ID2D1DeviceContext_GetTarget(context2, (ID2D1Image **)&bitmap2);
@@ -8324,7 +8324,7 @@ static void check_rt_bitmap_surface_(unsigned int line, ID2D1RenderTarget *rt, B
{
hr = ID2D1RenderTarget_CreateCompatibleRenderTarget(rt, NULL, NULL, NULL,
D2D1_COMPATIBLE_RENDER_TARGET_OPTIONS_NONE, &compatible_rt);
- ok_(__FILE__, line)(hr == WINCODEC_ERR_UNSUPPORTEDPIXELFORMAT, "Unexpected hr %#x.\n", hr);
+ ok_(__FILE__, line)(hr == WINCODEC_ERR_UNSUPPORTEDPIXELFORMAT, "Unexpected hr %#lx.\n", hr);
}
ID2D1DeviceContext_Release(context);
@@ -8355,13 +8355,13 @@ static IDXGISurface *create_surface(IDXGIDevice *dxgi_device, DXGI_FORMAT format
texture_desc.MiscFlags = 0;
hr = IDXGIDevice_QueryInterface(dxgi_device, &IID_ID3D10Device, (void **)&d3d_device);
- ok(SUCCEEDED(hr), "Failed to get device interface, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = ID3D10Device_CreateTexture2D(d3d_device, &texture_desc, NULL, &texture);
- ok(SUCCEEDED(hr), "Failed to create a texture, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = ID3D10Texture2D_QueryInterface(texture, &IID_IDXGISurface, (void **)&surface);
- ok(SUCCEEDED(hr), "Failed to get surface interface, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID3D10Device_Release(d3d_device);
ID3D10Texture2D_Release(texture);
@@ -8428,7 +8428,7 @@ static void test_bitmap_surface(BOOL d3d11)
/* DXGI target */
hr = ID2D1RenderTarget_QueryInterface(ctx.rt, &IID_ID2D1DeviceContext, (void **)&device_context);
- ok(SUCCEEDED(hr), "Failed to get device context, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
bitmap = NULL;
ID2D1DeviceContext_GetTarget(device_context, (ID2D1Image **)&bitmap);
@@ -8442,10 +8442,10 @@ static void test_bitmap_surface(BOOL d3d11)
/* Bitmap created from DXGI surface. */
hr = ID2D1Factory1_CreateDevice(factory, ctx.device, &device);
- ok(SUCCEEDED(hr), "Failed to get ID2D1Device, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = ID2D1Device_CreateDeviceContext(device, D2D1_DEVICE_CONTEXT_OPTIONS_NONE, &device_context);
- ok(SUCCEEDED(hr), "Failed to create device context, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
for (i = 0; i < ARRAY_SIZE(bitmap_format_tests); ++i)
{
@@ -8455,7 +8455,7 @@ static void test_bitmap_surface(BOOL d3d11)
hr = ID2D1DeviceContext_CreateBitmapFromDxgiSurface(device_context, ctx.surface, &bitmap_desc, &bitmap);
todo_wine_if(bitmap_format_tests[i].hr == WINCODEC_ERR_UNSUPPORTEDPIXELFORMAT)
- ok(hr == bitmap_format_tests[i].hr, "%u: unexpected hr %#x.\n", i, hr);
+ ok(hr == bitmap_format_tests[i].hr, "%u: Got unexpected hr %#lx.\n", i, hr);
if (SUCCEEDED(bitmap_format_tests[i].hr))
{
@@ -8474,8 +8474,8 @@ static void test_bitmap_surface(BOOL d3d11)
surface2 = create_surface(ctx.device, DXGI_FORMAT_A8_UNORM);
hr = ID2D1DeviceContext_CreateBitmapFromDxgiSurface(device_context, surface2, NULL, &bitmap);
- ok(SUCCEEDED(hr) || broken(hr == WINCODEC_ERR_UNSUPPORTEDPIXELFORMAT) /* Win7 */,
- "Failed to create a bitmap, hr %#x.\n", hr);
+ ok(hr == S_OK || broken(hr == WINCODEC_ERR_UNSUPPORTEDPIXELFORMAT) /* Win7 */,
+ "Got unexpected hr %#lx.\n", hr);
if (SUCCEEDED(hr))
{
@@ -8489,7 +8489,7 @@ static void test_bitmap_surface(BOOL d3d11)
IDXGISurface_Release(surface2);
hr = ID2D1DeviceContext_CreateBitmapFromDxgiSurface(device_context, ctx.surface, NULL, &bitmap);
- ok(SUCCEEDED(hr), "Failed to create a bitmap, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
pixel_format = ID2D1Bitmap1_GetPixelFormat(bitmap);
ok(pixel_format.alphaMode == D2D1_ALPHA_MODE_PREMULTIPLIED,
@@ -8511,14 +8511,14 @@ static void test_bitmap_surface(BOOL d3d11)
bitmap_desc.pixelFormat = ID2D1DeviceContext_GetPixelFormat(device_context);
size.width = size.height = 4;
hr = ID2D1DeviceContext_CreateBitmap(device_context, size, NULL, 0, &bitmap_desc, &bitmap);
- ok(SUCCEEDED(hr), "Failed to create a bitmap, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
check_bitmap_surface((ID2D1Bitmap *)bitmap, TRUE, D2D1_BITMAP_OPTIONS_NONE);
ID2D1DeviceContext_SetTags(device_context, 1, 2);
ID2D1DeviceContext_BeginDraw(device_context);
ID2D1DeviceContext_SetTarget(device_context, (ID2D1Image *)bitmap);
hr = ID2D1DeviceContext_EndDraw(device_context, &t1, &t2);
- ok(hr == D2DERR_INVALID_TARGET, "Unexpected hr %#x.\n", hr);
+ ok(hr == D2DERR_INVALID_TARGET, "Got unexpected hr %#lx.\n", hr);
ok(t1 == 1 && t2 == 2, "Unexpected tags %s:%s.\n", wine_dbgstr_longlong(t1), wine_dbgstr_longlong(t2));
ID2D1Bitmap1_Release(bitmap);
@@ -8529,7 +8529,7 @@ static void test_bitmap_surface(BOOL d3d11)
bitmap_desc.bitmapOptions = D2D1_BITMAP_OPTIONS_TARGET;
hr = ID2D1DeviceContext_CreateBitmap(device_context, size, NULL, 0, &bitmap_desc, &bitmap);
- ok(SUCCEEDED(hr), "Failed to create a bitmap, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
check_bitmap_surface((ID2D1Bitmap *)bitmap, TRUE, D2D1_BITMAP_OPTIONS_TARGET);
ID2D1DeviceContext_SetTarget(device_context, NULL);
ID2D1DeviceContext_SetTags(device_context, 3, 4);
@@ -8537,7 +8537,7 @@ static void test_bitmap_surface(BOOL d3d11)
ID2D1DeviceContext_BeginDraw(device_context);
ID2D1DeviceContext_SetTarget(device_context, (ID2D1Image *)bitmap);
hr = ID2D1DeviceContext_EndDraw(device_context, &t1, &t2);
- ok(SUCCEEDED(hr), "Failed to end draw, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ok(!t1 && !t2, "Unexpected tags %s:%s.\n", wine_dbgstr_longlong(t1), wine_dbgstr_longlong(t2));
ID2D1Bitmap1_Release(bitmap);
@@ -8555,10 +8555,10 @@ static void test_bitmap_surface(BOOL d3d11)
rt_desc.usage = D2D1_RENDER_TARGET_USAGE_NONE;
rt_desc.minLevel = D2D1_FEATURE_LEVEL_DEFAULT;
hr = ID2D1Factory1_CreateDCRenderTarget(factory, &rt_desc, (ID2D1DCRenderTarget **)&rt);
- ok(SUCCEEDED(hr), "Failed to create target, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = ID2D1RenderTarget_QueryInterface(rt, &IID_ID2D1DeviceContext, (void **)&device_context);
- ok(SUCCEEDED(hr), "Failed to get device context, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID2D1DeviceContext_GetTarget(device_context, (ID2D1Image **)&bitmap);
ok(!bitmap, "Unexpected target.\n");
@@ -8575,7 +8575,7 @@ static void test_bitmap_surface(BOOL d3d11)
ok(!!hwnd_rt_desc.hwnd, "Failed to create target window.\n");
hr = ID2D1Factory1_CreateHwndRenderTarget(factory, &rt_desc, &hwnd_rt_desc, (ID2D1HwndRenderTarget **)&rt);
- ok(SUCCEEDED(hr), "Failed to create render target, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
check_rt_bitmap_surface(rt, FALSE, D2D1_BITMAP_OPTIONS_NONE);
ID2D1RenderTarget_Release(rt);
@@ -8586,14 +8586,14 @@ static void test_bitmap_surface(BOOL d3d11)
hr = CoCreateInstance(&CLSID_WICImagingFactory, NULL, CLSCTX_INPROC_SERVER,
&IID_IWICImagingFactory, (void **)&wic_factory);
- ok(SUCCEEDED(hr), "Failed to create WIC imaging factory, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = IWICImagingFactory_CreateBitmap(wic_factory, 16, 16,
&GUID_WICPixelFormat32bppPBGRA, WICBitmapCacheOnDemand, &wic_bitmap);
- ok(SUCCEEDED(hr), "Failed to create bitmap, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
IWICImagingFactory_Release(wic_factory);
hr = ID2D1Factory1_CreateWicBitmapRenderTarget(factory, wic_bitmap, &rt_desc, &rt);
- ok(SUCCEEDED(hr), "Failed to create render target, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
check_rt_bitmap_surface(rt, FALSE, D2D1_BITMAP_OPTIONS_NONE);
ID2D1RenderTarget_Release(rt);
@@ -8637,10 +8637,10 @@ static void test_device_context(BOOL d3d11)
}
hr = ID2D1Factory1_CreateDevice(factory, ctx.device, &device);
- ok(SUCCEEDED(hr), "Failed to get ID2D1Device, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = ID2D1Device_CreateDeviceContext(device, D2D1_DEVICE_CONTEXT_OPTIONS_NONE, &device_context);
- ok(SUCCEEDED(hr), "Failed to create device context, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID2D1DeviceContext_GetDevice(device_context, &device2);
ok(device2 == device, "Unexpected device instance.\n");
@@ -8658,19 +8658,19 @@ static void test_device_context(BOOL d3d11)
/* DXGI target */
rt = ctx.rt;
hr = ID2D1RenderTarget_QueryInterface(rt, &IID_ID2D1DeviceContext, (void **)&device_context);
- ok(SUCCEEDED(hr), "Failed to get device context interface, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID2D1DeviceContext_GetTarget(device_context, (ID2D1Image **)&bitmap);
options = ID2D1Bitmap1_GetOptions(bitmap);
ok(options == (D2D1_BITMAP_OPTIONS_TARGET | D2D1_BITMAP_OPTIONS_CANNOT_DRAW),
"Unexpected bitmap options %#x.\n", options);
hr = ID2D1Bitmap1_GetSurface(bitmap, &surface2);
- ok(SUCCEEDED(hr), "Failed to get bitmap surface, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ok(surface2 == ctx.surface, "Unexpected surface instance.\n");
IDXGISurface_Release(surface2);
ID2D1DeviceContext_BeginDraw(device_context);
hr = ID2D1Bitmap1_GetSurface(bitmap, &surface2);
- ok(SUCCEEDED(hr), "Failed to get bitmap surface, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ok(surface2 == ctx.surface, "Unexpected surface instance.\n");
IDXGISurface_Release(surface2);
ID2D1DeviceContext_EndDraw(device_context, NULL, NULL);
@@ -8687,10 +8687,10 @@ static void test_device_context(BOOL d3d11)
hr = CoCreateInstance(&CLSID_WICImagingFactory, NULL, CLSCTX_INPROC_SERVER,
&IID_IWICImagingFactory, (void **)&wic_factory);
- ok(SUCCEEDED(hr), "Failed to create WIC imaging factory, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = IWICImagingFactory_CreateBitmap(wic_factory, 16, 16,
&GUID_WICPixelFormat32bppPBGRA, WICBitmapCacheOnDemand, &wic_bitmap);
- ok(SUCCEEDED(hr), "Failed to create bitmap, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
IWICImagingFactory_Release(wic_factory);
rt_desc.type = D2D1_RENDER_TARGET_TYPE_DEFAULT;
@@ -8701,16 +8701,16 @@ static void test_device_context(BOOL d3d11)
rt_desc.usage = D2D1_RENDER_TARGET_USAGE_NONE;
rt_desc.minLevel = D2D1_FEATURE_LEVEL_DEFAULT;
hr = ID2D1Factory1_CreateWicBitmapRenderTarget(factory, wic_bitmap, &rt_desc, &rt);
- ok(SUCCEEDED(hr), "Failed to create render target, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = ID2D1RenderTarget_QueryInterface(rt, &IID_ID2D1DeviceContext, (void **)&device_context);
- ok(SUCCEEDED(hr), "Failed to get device context interface, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID2D1DeviceContext_GetTarget(device_context, (ID2D1Image **)&bitmap);
options = ID2D1Bitmap1_GetOptions(bitmap);
ok(options == (D2D1_BITMAP_OPTIONS_TARGET | D2D1_BITMAP_OPTIONS_CANNOT_DRAW),
"Unexpected bitmap options %#x.\n", options);
hr = ID2D1Bitmap1_GetSurface(bitmap, &surface);
- todo_wine ok(hr == E_FAIL, "Got unexpected hr %#x.\n", hr);
+ todo_wine ok(hr == E_FAIL, "Got unexpected hr %#lx.\n", hr);
ID2D1Bitmap1_Release(bitmap);
ID2D1DeviceContext_SetTarget(device_context, NULL);
@@ -8731,16 +8731,16 @@ static void test_device_context(BOOL d3d11)
ok(!!hwnd_rt_desc.hwnd, "Failed to create target window.\n");
hr = ID2D1Factory1_CreateHwndRenderTarget(factory, &rt_desc, &hwnd_rt_desc, (ID2D1HwndRenderTarget **)&rt);
- ok(SUCCEEDED(hr), "Failed to create render target, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = ID2D1RenderTarget_QueryInterface(rt, &IID_ID2D1DeviceContext, (void **)&device_context);
- ok(SUCCEEDED(hr), "Failed to get device context interface, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID2D1DeviceContext_GetTarget(device_context, (ID2D1Image **)&bitmap);
options = ID2D1Bitmap1_GetOptions(bitmap);
ok(options == (D2D1_BITMAP_OPTIONS_TARGET | D2D1_BITMAP_OPTIONS_CANNOT_DRAW),
"Unexpected bitmap options %#x.\n", options);
hr = ID2D1Bitmap1_GetSurface(bitmap, &surface);
- ok(hr == D2DERR_INVALID_CALL, "Unexpected hr %#x.\n", hr);
+ ok(hr == D2DERR_INVALID_CALL, "Got unexpected hr %#lx.\n", hr);
ID2D1Bitmap1_Release(bitmap);
ID2D1DeviceContext_SetTarget(device_context, NULL);
@@ -8753,10 +8753,10 @@ static void test_device_context(BOOL d3d11)
/* DC target */
hr = ID2D1Factory1_CreateDCRenderTarget(factory, &rt_desc, &dc_rt);
- ok(SUCCEEDED(hr), "Failed to create target, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = ID2D1DCRenderTarget_QueryInterface(dc_rt, &IID_ID2D1DeviceContext, (void **)&device_context);
- ok(SUCCEEDED(hr), "Failed to get device context interface, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID2D1DeviceContext_GetTarget(device_context, (ID2D1Image **)&bitmap);
ok(bitmap == NULL, "Unexpected bitmap instance.\n");
@@ -8767,14 +8767,14 @@ static void test_device_context(BOOL d3d11)
SetRect(&rect, 0, 0, 16, 16);
hr = ID2D1DCRenderTarget_BindDC(dc_rt, hdc, &rect);
- ok(SUCCEEDED(hr), "BindDC() failed, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID2D1DeviceContext_GetTarget(device_context, (ID2D1Image **)&bitmap);
options = ID2D1Bitmap1_GetOptions(bitmap);
ok(options == (D2D1_BITMAP_OPTIONS_TARGET | D2D1_BITMAP_OPTIONS_CANNOT_DRAW | D2D1_BITMAP_OPTIONS_GDI_COMPATIBLE),
"Unexpected bitmap options %#x.\n", options);
hr = ID2D1Bitmap1_GetSurface(bitmap, &surface);
- ok(hr == D2DERR_INVALID_CALL, "Unexpected hr %#x.\n", hr);
+ ok(hr == D2DERR_INVALID_CALL, "Got unexpected hr %#lx.\n", hr);
ID2D1Bitmap1_Release(bitmap);
ID2D1DeviceContext_SetTarget(device_context, NULL);
@@ -8918,10 +8918,10 @@ static ID2D1DeviceContext *create_device_context(ID2D1Factory1 *factory, IDXGIDe
HRESULT hr;
hr = ID2D1Factory1_CreateDevice(factory, dxgi_device, &device);
- ok(SUCCEEDED(hr), "Failed to get ID2D1Device, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = ID2D1Device_CreateDeviceContext(device, D2D1_DEVICE_CONTEXT_OPTIONS_NONE, &device_context);
- ok(SUCCEEDED(hr), "Failed to create device context, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID2D1Device_Release(device);
return device_context;
@@ -8975,7 +8975,7 @@ static void test_command_list(BOOL d3d11)
ok(device_context != NULL, "Failed to create device context.\n");
hr = ID2D1DeviceContext_CreateCommandList(device_context, &command_list);
- todo_wine ok(hr == S_OK, "Got unexpected hr %#x.\n", hr);
+ todo_wine ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
if (FAILED(hr))
{
@@ -8988,7 +8988,7 @@ static void test_command_list(BOOL d3d11)
ID2D1DeviceContext_BeginDraw(device_context);
hr = ID2D1DeviceContext_QueryInterface(device_context, &IID_ID2D1RenderTarget, (void **)&rt);
- ok(SUCCEEDED(hr), "Failed to get rt interface, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
/* Test how resources are referenced by the list. */
@@ -8999,70 +8999,70 @@ static void test_command_list(BOOL d3d11)
bitmap_desc.dpiX = 96.0f;
bitmap_desc.dpiY = 96.0f;
hr = ID2D1RenderTarget_CreateBitmap(rt, size, bitmap_data, 4 * sizeof(*bitmap_data), &bitmap_desc, &bitmap);
- ok(SUCCEEDED(hr), "Failed to create bitmap, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID2D1RenderTarget_DrawBitmap(rt, bitmap, NULL, 0.25f, D2D1_BITMAP_INTERPOLATION_MODE_NEAREST_NEIGHBOR, NULL);
refcount = ID2D1Bitmap_Release(bitmap);
- ok(refcount == 1, "Got unexpected refcount %u.\n", refcount);
+ ok(refcount == 1, "Got unexpected refcount %lu.\n", refcount);
/* Solid color brush. */
set_color(&color, 0.0f, 0.0f, 0.0f, 0.0f);
hr = ID2D1RenderTarget_CreateSolidColorBrush(rt, &color, NULL, (ID2D1SolidColorBrush **)&brush);
- ok(SUCCEEDED(hr), "Failed to create a brush, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
set_rect(&rect, 0.0f, 0.0f, 16.0f, 16.0f);
ID2D1RenderTarget_FillRectangle(rt, &rect, brush);
refcount = ID2D1Brush_Release(brush);
- ok(refcount == 0, "Got unexpected refcount %u.\n", refcount);
+ ok(refcount == 0, "Got unexpected refcount %lu.\n", refcount);
/* Bitmap brush. */
hr = ID2D1RenderTarget_CreateBitmap(rt, size, bitmap_data, 4 * sizeof(*bitmap_data), &bitmap_desc, &bitmap);
- ok(SUCCEEDED(hr), "Failed to create bitmap, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = ID2D1RenderTarget_CreateBitmapBrush(rt, bitmap, NULL, NULL, (ID2D1BitmapBrush **)&brush);
- ok(SUCCEEDED(hr), "Failed to create bitmap brush, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
set_rect(&rect, 0.0f, 0.0f, 16.0f, 16.0f);
ID2D1RenderTarget_FillRectangle(rt, &rect, brush);
refcount = ID2D1Brush_Release(brush);
- ok(refcount == 0, "Got unexpected refcount %u.\n", refcount);
+ ok(refcount == 0, "Got unexpected refcount %lu.\n", refcount);
refcount = ID2D1Bitmap_Release(bitmap);
- ok(refcount == 1, "Got unexpected refcount %u.\n", refcount);
+ ok(refcount == 1, "Got unexpected refcount %lu.\n", refcount);
/* Linear gradient brush. */
hr = ID2D1RenderTarget_CreateGradientStopCollection(rt, stops, ARRAY_SIZE(stops),
D2D1_GAMMA_2_2, D2D1_EXTEND_MODE_CLAMP, &gradient);
- ok(SUCCEEDED(hr), "Failed to create stop collection, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
set_point(&linear_gradient_properties.startPoint, 320.0f, 0.0f);
set_point(&linear_gradient_properties.endPoint, 0.0f, 960.0f);
hr = ID2D1RenderTarget_CreateLinearGradientBrush(rt, &linear_gradient_properties, NULL, gradient,
(ID2D1LinearGradientBrush **)&brush);
- ok(SUCCEEDED(hr), "Failed to create brush, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
set_rect(&rect, -1.0f, -1.0f, 1.0f, 1.0f);
hr = ID2D1Factory1_CreateRectangleGeometry(factory, &rect, (ID2D1RectangleGeometry **)&geometry);
- ok(SUCCEEDED(hr), "Failed to create geometry, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID2D1RenderTarget_FillGeometry(rt, geometry, brush, NULL);
refcount = ID2D1Brush_Release(brush);
- ok(refcount == 0, "Got unexpected refcount %u.\n", refcount);
+ ok(refcount == 0, "Got unexpected refcount %lu.\n", refcount);
refcount = ID2D1Geometry_Release(geometry);
- ok(refcount == 1, "Got unexpected refcount %u.\n", refcount);
+ ok(refcount == 1, "Got unexpected refcount %lu.\n", refcount);
refcount = ID2D1GradientStopCollection_Release(gradient);
- ok(refcount == 1, "Got unexpected refcount %u.\n", refcount);
+ ok(refcount == 1, "Got unexpected refcount %lu.\n", refcount);
/* Radial gradient brush. */
hr = ID2D1RenderTarget_CreateGradientStopCollection(rt, stops, ARRAY_SIZE(stops),
D2D1_GAMMA_2_2, D2D1_EXTEND_MODE_CLAMP, &gradient);
- ok(SUCCEEDED(hr), "Failed to create stop collection, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
set_point(&radial_gradient_properties.center, 160.0f, 480.0f);
set_point(&radial_gradient_properties.gradientOriginOffset, 40.0f, -120.0f);
@@ -9070,39 +9070,39 @@ static void test_command_list(BOOL d3d11)
radial_gradient_properties.radiusY = 480.0f;
hr = ID2D1RenderTarget_CreateRadialGradientBrush(rt, &radial_gradient_properties, NULL, gradient,
(ID2D1RadialGradientBrush **)&brush);
- ok(SUCCEEDED(hr), "Failed to create brush, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
set_rect(&rect, -1.0f, -1.0f, 1.0f, 1.0f);
hr = ID2D1Factory1_CreateRectangleGeometry(factory, &rect, (ID2D1RectangleGeometry **)&geometry);
- ok(SUCCEEDED(hr), "Failed to create geometry, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID2D1RenderTarget_FillGeometry(rt, geometry, brush, NULL);
refcount = ID2D1Brush_Release(brush);
- ok(refcount == 0, "Got unexpected refcount %u.\n", refcount);
+ ok(refcount == 0, "Got unexpected refcount %lu.\n", refcount);
refcount = ID2D1Geometry_Release(geometry);
- ok(refcount == 1, "Got unexpected refcount %u.\n", refcount);
+ ok(refcount == 1, "Got unexpected refcount %lu.\n", refcount);
refcount = ID2D1GradientStopCollection_Release(gradient);
- ok(refcount == 1, "Got unexpected refcount %u.\n", refcount);
+ ok(refcount == 1, "Got unexpected refcount %lu.\n", refcount);
/* Geometry. */
set_rect(&rect, -1.0f, -1.0f, 1.0f, 1.0f);
hr = ID2D1Factory1_CreateRectangleGeometry(factory, &rect, (ID2D1RectangleGeometry **)&geometry);
- ok(SUCCEEDED(hr), "Failed to create geometry, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
set_color(&color, 0.0f, 0.0f, 0.0f, 0.0f);
hr = ID2D1RenderTarget_CreateSolidColorBrush(rt, &color, NULL, (ID2D1SolidColorBrush **)&brush);
- ok(SUCCEEDED(hr), "Failed to create a brush, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID2D1RenderTarget_FillGeometry(rt, geometry, brush, NULL);
refcount = ID2D1Brush_Release(brush);
- ok(refcount == 0, "Got unexpected refcount %u.\n", refcount);
+ ok(refcount == 0, "Got unexpected refcount %lu.\n", refcount);
refcount = ID2D1Geometry_Release(geometry);
- ok(refcount == 1, "Got unexpected refcount %u.\n", refcount);
+ ok(refcount == 1, "Got unexpected refcount %lu.\n", refcount);
/* Stroke style. */
stroke_desc.startCap = D2D1_CAP_STYLE_SQUARE;
@@ -9114,21 +9114,21 @@ static void test_command_list(BOOL d3d11)
stroke_desc.dashOffset = -1.0f;
hr = ID2D1Factory_CreateStrokeStyle((ID2D1Factory *)factory, &stroke_desc, NULL, 0, &stroke_style);
- ok(SUCCEEDED(hr), "Failed to create stroke style, %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
set_color(&color, 0.0f, 0.0f, 0.0f, 0.0f);
hr = ID2D1RenderTarget_CreateSolidColorBrush(rt, &color, NULL, (ID2D1SolidColorBrush **)&brush);
- ok(SUCCEEDED(hr), "Failed to create a brush, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
set_point(&p0, 100.0f, 160.0f);
set_point(&p1, 140.0f, 160.0f);
ID2D1RenderTarget_DrawLine(rt, p0, p1, brush, 1.0f, stroke_style);
refcount = ID2D1Brush_Release(brush);
- ok(refcount == 0, "Got unexpected refcount %u.\n", refcount);
+ ok(refcount == 0, "Got unexpected refcount %lu.\n", refcount);
refcount = ID2D1StrokeStyle_Release(stroke_style);
- ok(refcount == 1, "Got unexpected refcount %u.\n", refcount);
+ ok(refcount == 1, "Got unexpected refcount %lu.\n", refcount);
/* Close on attached list. */
ID2D1DeviceContext_GetTarget(device_context, &target);
@@ -9136,22 +9136,22 @@ static void test_command_list(BOOL d3d11)
ID2D1Image_Release(target);
hr = ID2D1CommandList_Close(command_list);
- ok(SUCCEEDED(hr), "Failed to close a list, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID2D1DeviceContext_GetTarget(device_context, &target);
ok(target == NULL, "Unexpected context target.\n");
hr = ID2D1CommandList_Close(command_list);
- ok(hr == D2DERR_WRONG_STATE, "Unexpected hr %#x.\n", hr);
+ ok(hr == D2DERR_WRONG_STATE, "Got unexpected hr %#lx.\n", hr);
ID2D1CommandList_Release(command_list);
/* Close empty list. */
hr = ID2D1DeviceContext_CreateCommandList(device_context, &command_list);
- ok(SUCCEEDED(hr), "Failed to create command list, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = ID2D1CommandList_Close(command_list);
- ok(SUCCEEDED(hr), "Failed to close a list, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID2D1CommandList_Release(command_list);
@@ -9160,7 +9160,7 @@ static void test_command_list(BOOL d3d11)
ok(device_context2 != NULL, "Failed to create device context.\n");
hr = ID2D1DeviceContext_CreateCommandList(device_context, &command_list);
- ok(SUCCEEDED(hr), "Failed to create command list, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID2D1DeviceContext_SetTarget(device_context2, (ID2D1Image *)command_list);
ID2D1DeviceContext_GetTarget(device_context2, &target);
@@ -9213,21 +9213,21 @@ static void test_max_bitmap_size(BOOL d3d11)
};
hr = D2D1CreateFactory(D2D1_FACTORY_TYPE_SINGLE_THREADED, &IID_ID2D1Factory, NULL, (void **)&factory);
- ok(SUCCEEDED(hr), "Failed to create factory, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
for (i = 0; i < ARRAY_SIZE(device_types); ++i)
{
if (FAILED(hr = D3D10CreateDevice1(NULL, device_types[i].type, NULL, D3D10_CREATE_DEVICE_BGRA_SUPPORT,
D3D10_FEATURE_LEVEL_10_0, D3D10_1_SDK_VERSION, &device)))
{
- skip("Failed to create %s d3d device, hr %#x.\n", device_types[i].name, hr);
+ skip("Failed to create %s d3d device, hr %#lx.\n", device_types[i].name, hr);
continue;
}
window = create_window();
swapchain = create_d3d10_swapchain(device, window, TRUE);
hr = IDXGISwapChain_GetBuffer(swapchain, 0, &IID_IDXGISurface, (void **)&surface);
- ok(SUCCEEDED(hr), "Failed to get buffer, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
for (j = 0; j < ARRAY_SIZE(target_types); ++j)
{
@@ -9244,8 +9244,7 @@ static void test_max_bitmap_size(BOOL d3d11)
desc.minLevel = D2D1_FEATURE_LEVEL_DEFAULT;
hr = ID2D1Factory_CreateDxgiSurfaceRenderTarget(factory, surface, &desc, &rt);
- ok(SUCCEEDED(hr), "%s/%s: failed to create render target, hr %#x.\n", device_types[i].name,
- target_types[j].name, hr);
+ ok(hr == S_OK, "%s/%s: Got unexpected hr %#lx.\n", device_types[i].name, target_types[j].name, hr);
bitmap_size = ID2D1RenderTarget_GetMaximumBitmapSize(rt);
ok(bitmap_size >= D3D10_REQ_TEXTURE2D_U_OR_V_DIMENSION, "%s/%s: unexpected bitmap size %u.\n",
@@ -9259,7 +9258,7 @@ static void test_max_bitmap_size(BOOL d3d11)
size.width = bitmap_size;
size.height = 1;
hr = ID2D1RenderTarget_CreateBitmap(rt, size, NULL, 0, &bitmap_desc, &bitmap);
- ok(SUCCEEDED(hr), "Failed to create a bitmap, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID2D1Bitmap_Release(bitmap);
ID2D1RenderTarget_Release(rt);
@@ -9277,8 +9276,8 @@ static void test_max_bitmap_size(BOOL d3d11)
texture_desc.MiscFlags = 0;
hr = ID3D10Device1_CreateTexture2D(device, &texture_desc, NULL, &texture);
- ok(SUCCEEDED(hr) || broken(hr == E_INVALIDARG && device_types[i].type == D3D10_DRIVER_TYPE_WARP) /* Vista */,
- "%s/%s: failed to create texture, hr %#x.\n", device_types[i].name, target_types[j].name, hr);
+ ok(hr == S_OK || broken(hr == E_INVALIDARG && device_types[i].type == D3D10_DRIVER_TYPE_WARP) /* Vista */,
+ "%s/%s: Got unexpected hr %#lx.\n", device_types[i].name, target_types[j].name, hr);
if (SUCCEEDED(hr))
ID3D10Texture2D_Release(texture);
}
@@ -9355,7 +9354,7 @@ static void test_dpi(BOOL d3d11)
bitmap_desc.colorContext = NULL;
hr = ID2D1DeviceContext_CreateBitmapFromDxgiSurface(device_context, ctx.surface, &bitmap_desc, &bitmap);
/* Native accepts negative DPI values for DXGI surface bitmap. */
- ok(hr == S_OK, "Test %u: Got unexpected hr %#x.\n", i, hr);
+ ok(hr == S_OK, "Test %u: Got unexpected hr %#lx.\n", i, hr);
ID2D1DeviceContext_SetDpi(device_context, dc_dpi_x, dc_dpi_y);
@@ -9370,7 +9369,7 @@ static void test_dpi(BOOL d3d11)
ID2D1DeviceContext_BeginDraw(device_context);
ID2D1DeviceContext_SetTarget(device_context, (ID2D1Image *)bitmap);
hr = ID2D1DeviceContext_EndDraw(device_context, NULL, NULL);
- ok(hr == S_OK, "Test %u: Got unexpected hr %#x.\n", i, hr);
+ ok(hr == S_OK, "Test %u: Got unexpected hr %#lx.\n", i, hr);
/* Device context DPI values aren't updated by SetTarget. */
ID2D1DeviceContext_GetDpi(device_context, &dpi_x, &dpi_y);
@@ -9384,7 +9383,7 @@ static void test_dpi(BOOL d3d11)
CoInitializeEx(NULL, COINIT_APARTMENTTHREADED);
hr = CoCreateInstance(&CLSID_WICImagingFactory, NULL, CLSCTX_INPROC_SERVER,
&IID_IWICImagingFactory, (void **)&wic_factory);
- ok(hr == S_OK, "Got unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
for (i = 0; i < ARRAY_SIZE(create_dpi_tests); ++i)
{
IWICBitmapSource *wic_bitmap_src;
@@ -9394,9 +9393,9 @@ static void test_dpi(BOOL d3d11)
hr = IWICImagingFactory_CreateBitmap(wic_factory, 16, 16,
&GUID_WICPixelFormat32bppPBGRA, WICBitmapCacheOnDemand, &wic_bitmap);
- ok(hr == S_OK, "Test %u: Got unexpected hr %#x.\n", i, hr);
+ ok(hr == S_OK, "Test %u: Got unexpected hr %#lx.\n", i, hr);
hr = IWICBitmap_QueryInterface(wic_bitmap, &IID_IWICBitmapSource, (void **)&wic_bitmap_src);
- ok(hr == S_OK, "Test %u: Got unexpected hr %#x.\n", i, hr);
+ ok(hr == S_OK, "Test %u: Got unexpected hr %#lx.\n", i, hr);
IWICBitmap_Release(wic_bitmap);
bitmap_desc.pixelFormat.format = DXGI_FORMAT_UNKNOWN;
@@ -9406,7 +9405,7 @@ static void test_dpi(BOOL d3d11)
bitmap_desc.bitmapOptions = D2D1_BITMAP_OPTIONS_TARGET | D2D1_BITMAP_OPTIONS_CANNOT_DRAW;
bitmap_desc.colorContext = NULL;
hr = ID2D1DeviceContext_CreateBitmapFromWicBitmap(device_context, wic_bitmap_src, &bitmap_desc, &bitmap);
- ok(hr == create_dpi_tests[i].hr, "Test %u: Got unexpected hr %#x, expected %#x.\n",
+ ok(hr == create_dpi_tests[i].hr, "Test %u: Got unexpected hr %#lx, expected %#lx.\n",
i, hr, create_dpi_tests[i].hr);
IWICBitmapSource_Release(wic_bitmap_src);
@@ -9433,7 +9432,7 @@ static void test_dpi(BOOL d3d11)
ID2D1DeviceContext_BeginDraw(device_context);
ID2D1DeviceContext_SetTarget(device_context, (ID2D1Image *)bitmap);
hr = ID2D1DeviceContext_EndDraw(device_context, NULL, NULL);
- ok(hr == S_OK, "Test %u: Got unexpected hr %#x.\n", i, hr);
+ ok(hr == S_OK, "Test %u: Got unexpected hr %#lx.\n", i, hr);
/* Device context DPI values aren't updated by SetTarget. */
ID2D1DeviceContext_GetDpi(device_context, &dpi_x, &dpi_y);
@@ -9459,7 +9458,7 @@ static void test_dpi(BOOL d3d11)
bitmap_desc.bitmapOptions = D2D1_BITMAP_OPTIONS_TARGET | D2D1_BITMAP_OPTIONS_CANNOT_DRAW;
bitmap_desc.colorContext = NULL;
hr = ID2D1DeviceContext_CreateBitmap(device_context, size, NULL, 0, &bitmap_desc, &bitmap);
- ok(hr == create_dpi_tests[i].hr, "Test %u: Got unexpected hr %#x, expected %#x.\n",
+ ok(hr == create_dpi_tests[i].hr, "Test %u: Got unexpected hr %#lx, expected %#lx.\n",
i, hr, create_dpi_tests[i].hr);
if (FAILED(hr))
@@ -9485,7 +9484,7 @@ static void test_dpi(BOOL d3d11)
ID2D1DeviceContext_BeginDraw(device_context);
ID2D1DeviceContext_SetTarget(device_context, (ID2D1Image *)bitmap);
hr = ID2D1DeviceContext_EndDraw(device_context, NULL, NULL);
- ok(hr == S_OK, "Test %u: Got unexpected hr %#x.\n", i, hr);
+ ok(hr == S_OK, "Test %u: Got unexpected hr %#lx.\n", i, hr);
/* Device context DPI values aren't updated by SetTarget. */
ID2D1DeviceContext_GetDpi(device_context, &dpi_x, &dpi_y);
@@ -9536,16 +9535,16 @@ static void test_wic_bitmap_format(BOOL d3d11)
hr = CoCreateInstance(&CLSID_WICImagingFactory, NULL, CLSCTX_INPROC_SERVER,
&IID_IWICImagingFactory, (void **)&wic_factory);
- ok(hr == S_OK, "Failed to create WIC imaging factory, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
for (i = 0; i < ARRAY_SIZE(tests); ++i)
{
hr = IWICImagingFactory_CreateBitmap(wic_factory, 16, 16,
tests[i].wic, WICBitmapCacheOnDemand, &wic_bitmap);
- ok(hr == S_OK, "%s: Failed to create WIC bitmap, hr %#x.\n", debugstr_guid(tests[i].wic), hr);
+ ok(hr == S_OK, "%s: Got unexpected hr %#lx.\n", debugstr_guid(tests[i].wic), hr);
hr = ID2D1RenderTarget_CreateBitmapFromWicBitmap(rt, (IWICBitmapSource *)wic_bitmap, NULL, &bitmap);
- ok(hr == S_OK, "%s: Failed to create bitmap from WIC source, hr %#x.\n", debugstr_guid(tests[i].wic), hr);
+ ok(hr == S_OK, "%s: Got unexpected hr %#lx.\n", debugstr_guid(tests[i].wic), hr);
format = ID2D1Bitmap_GetPixelFormat(bitmap);
ok(format.format == tests[i].d2d.format, "%s: Got unexpected DXGI format %#x.\n",
@@ -9740,22 +9739,22 @@ static void test_geometry_group(BOOL d3d11)
BOOL match;
hr = D2D1CreateFactory(D2D1_FACTORY_TYPE_SINGLE_THREADED, &IID_ID2D1Factory, NULL, (void **)&factory);
- ok(SUCCEEDED(hr), "Failed to create factory, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
set_rect(&rect, -1.0f, -1.0f, 1.0f, 1.0f);
hr = ID2D1Factory_CreateRectangleGeometry(factory, &rect, (ID2D1RectangleGeometry **)&geometries[0]);
- ok(SUCCEEDED(hr), "Failed to create geometry, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
set_rect(&rect, -2.0f, -2.0f, 0.0f, 2.0f);
hr = ID2D1Factory_CreateRectangleGeometry(factory, &rect, (ID2D1RectangleGeometry **)&geometries[1]);
- ok(SUCCEEDED(hr), "Failed to create geometry, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = ID2D1Factory_CreateGeometryGroup(factory, D2D1_FILL_MODE_ALTERNATE, geometries, 2, &group);
- ok(SUCCEEDED(hr), "Failed to create geometry group, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
set_rect(&rect, 0.0f, 0.0f, 0.0f, 0.0f);
hr = ID2D1GeometryGroup_GetBounds(group, NULL, &rect);
- ok(SUCCEEDED(hr), "Failed to get geometry group bounds, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
match = compare_rect(&rect, -2.0f, -2.0f, 1.0f, 2.0f, 0);
ok(match, "Got unexpected rectangle {%.8e, %.8e, %.8e, %.8e}.\n",
rect.left, rect.top, rect.right, rect.bottom);
@@ -9764,7 +9763,7 @@ static void test_geometry_group(BOOL d3d11)
translate_matrix(&matrix, 80.0f, 640.0f);
scale_matrix(&matrix, 2.0f, 0.5f);
hr = ID2D1GeometryGroup_GetBounds(group, &matrix, &rect);
- ok(SUCCEEDED(hr), "Failed to get geometry group bounds, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
match = compare_rect(&rect, 76.0f, 639.0f, 82.0f, 641.0f, 0);
ok(match, "Got unexpected rectangle {%.8e, %.8e, %.8e, %.8e}.\n",
rect.left, rect.top, rect.right, rect.bottom);
@@ -9795,10 +9794,10 @@ static void test_mt_factory(BOOL d3d11)
DWORD ret;
hr = D2D1CreateFactory(D2D1_FACTORY_TYPE_MULTI_THREADED + 1, &IID_ID2D1Factory, NULL, (void **)&factory);
- ok(hr == E_INVALIDARG, "Unexpected hr %#x.\n", hr);
+ ok(hr == E_INVALIDARG, "Got unexpected hr %#lx.\n", hr);
hr = D2D1CreateFactory(D2D1_FACTORY_TYPE_SINGLE_THREADED, &IID_ID2D1Factory, NULL, (void **)&factory);
- ok(SUCCEEDED(hr), "Failed to create factory, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = ID2D1Factory_QueryInterface(factory, &IID_ID2D1Multithread, (void **)&multithread);
if (hr == E_NOINTERFACE)
@@ -9807,7 +9806,7 @@ static void test_mt_factory(BOOL d3d11)
ID2D1Factory_Release(factory);
return;
}
- ok(SUCCEEDED(hr), "Failed to get interface, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ret = ID2D1Multithread_GetMultithreadProtected(multithread);
ok(!ret, "Unexpected return value.\n");
@@ -9822,10 +9821,10 @@ static void test_mt_factory(BOOL d3d11)
ID2D1Factory_Release(factory);
hr = D2D1CreateFactory(D2D1_FACTORY_TYPE_MULTI_THREADED, &IID_ID2D1Factory, NULL, (void **)&factory);
- ok(SUCCEEDED(hr), "Failed to create factory, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = ID2D1Factory_QueryInterface(factory, &IID_ID2D1Multithread, (void **)&multithread);
- ok(SUCCEEDED(hr), "Failed to get interface, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ret = ID2D1Multithread_GetMultithreadProtected(multithread);
ok(!!ret, "Unexpected return value.\n");
@@ -9887,7 +9886,7 @@ static void test_effect(BOOL d3d11)
}
hr = ID2D1RenderTarget_QueryInterface(ctx.rt, &IID_ID2D1DeviceContext, (void **)&context);
- ok(hr == S_OK, "Got unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
for (i = 0; i < ARRAY_SIZE(effect_tests); ++i)
{
@@ -9896,82 +9895,74 @@ static void test_effect(BOOL d3d11)
winetest_push_context("Test %u", i);
hr = ID2D1DeviceContext_CreateEffect(context, test->clsid, &effect);
- ok(hr == S_OK, "Got unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = ID2D1Effect_QueryInterface(effect, &IID_ID2D1Image, (void **)&image_a);
- ok(hr == S_OK, "Got unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID2D1Effect_GetOutput(effect, &image_b);
ok(image_b == image_a, "Got unexpected image_b %p, expected %p.\n", image_b, image_a);
ID2D1Image_Release(image_b);
ID2D1Image_Release(image_a);
hr = ID2D1Effect_GetValue(effect, 0xdeadbeef, D2D1_PROPERTY_TYPE_CLSID, (BYTE *)&clsid, sizeof(clsid));
- ok(hr == D2DERR_INVALID_PROPERTY, "Got unexpected hr %#x.\n", hr);
+ ok(hr == D2DERR_INVALID_PROPERTY, "Got unexpected hr %#lx.\n", hr);
hr = ID2D1Effect_GetValue(effect, D2D1_PROPERTY_CLSID, D2D1_PROPERTY_TYPE_CLSID, buffer, sizeof(clsid) + 1);
- ok(hr == E_INVALIDARG, "Got unexpected hr %#x.\n", hr);
+ ok(hr == E_INVALIDARG, "Got unexpected hr %#lx.\n", hr);
hr = ID2D1Effect_GetValue(effect, D2D1_PROPERTY_CLSID, D2D1_PROPERTY_TYPE_CLSID, buffer, sizeof(clsid) - 1);
- ok(hr == E_INVALIDARG, "Got unexpected hr %#x.\n", hr);
+ ok(hr == E_INVALIDARG, "Got unexpected hr %#lx.\n", hr);
hr = ID2D1Effect_GetValue(effect, D2D1_PROPERTY_CLSID, D2D1_PROPERTY_TYPE_CLSID, buffer, sizeof(clsid));
- ok(hr == S_OK, "Got unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = ID2D1Effect_GetValue(effect, D2D1_PROPERTY_DISPLAYNAME, D2D1_PROPERTY_TYPE_STRING, buffer, sizeof(buffer));
- todo_wine
- ok(hr == S_OK, "Got unexpected hr %#x.\n", hr);
+ todo_wine ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
str_size = (wcslen((WCHAR *)buffer) + 1) * sizeof(WCHAR);
hr = ID2D1Effect_GetValue(effect, D2D1_PROPERTY_DISPLAYNAME, D2D1_PROPERTY_TYPE_STRING, buffer, str_size);
- todo_wine
- ok(hr == S_OK, "Got unexpected hr %#x.\n", hr);
+ todo_wine ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = ID2D1Effect_GetValue(effect, D2D1_PROPERTY_DISPLAYNAME, D2D1_PROPERTY_TYPE_STRING, buffer, str_size - 1);
- todo_wine
- ok(hr == D2DERR_INSUFFICIENT_BUFFER, "Got unexpected hr %#x.\n", hr);
+ todo_wine ok(hr == D2DERR_INSUFFICIENT_BUFFER, "Got unexpected hr %#lx.\n", hr);
hr = ID2D1Effect_GetValue(effect, D2D1_PROPERTY_CLSID, 0xdeadbeef, (BYTE *)&clsid, sizeof(clsid));
- ok(hr == E_INVALIDARG, "Got unexpected hr %#x.\n", hr);
+ ok(hr == E_INVALIDARG, "Got unexpected hr %#lx.\n", hr);
hr = ID2D1Effect_GetValue(effect, D2D1_PROPERTY_CLSID, D2D1_PROPERTY_TYPE_UNKNOWN, (BYTE *)&clsid, sizeof(clsid));
- ok(hr == S_OK, "Got unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = ID2D1Effect_GetValue(effect, D2D1_PROPERTY_CLSID, D2D1_PROPERTY_TYPE_VECTOR4, (BYTE *)&clsid, sizeof(clsid));
- ok(hr == E_INVALIDARG, "Got unexpected hr %#x.\n", hr);
+ ok(hr == E_INVALIDARG, "Got unexpected hr %#lx.\n", hr);
hr = ID2D1Effect_GetValue(effect, D2D1_PROPERTY_CLSID, D2D1_PROPERTY_TYPE_VECTOR4, buffer, sizeof(buffer));
- ok(hr == E_INVALIDARG, "Got unexpected hr %#x.\n", hr);
+ ok(hr == E_INVALIDARG, "Got unexpected hr %#lx.\n", hr);
hr = ID2D1Effect_GetValue(effect, D2D1_PROPERTY_CLSID,
D2D1_PROPERTY_TYPE_CLSID, (BYTE *)&clsid, sizeof(clsid));
- ok(hr == S_OK, "Got unexpected hr %#x.\n", hr);
- if (hr == S_OK)
- ok(IsEqualGUID(&clsid, test->clsid), "Got unexpected clsid %s, expected %s.\n",
- debugstr_guid(&clsid), debugstr_guid(test->clsid));
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
+ ok(IsEqualGUID(&clsid, test->clsid), "Got unexpected clsid %s, expected %s.\n",
+ debugstr_guid(&clsid), debugstr_guid(test->clsid));
hr = ID2D1Effect_GetValue(effect, D2D1_PROPERTY_CACHED,
D2D1_PROPERTY_TYPE_BOOL, (BYTE *)&cached, sizeof(cached));
- todo_wine
- ok(hr == S_OK, "Got unexpected hr %#x.\n", hr);
+ todo_wine ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
if (hr == S_OK)
ok(cached == FALSE, "Got unexpected cached %d.\n", cached);
hr = ID2D1Effect_GetValue(effect, D2D1_PROPERTY_PRECISION,
D2D1_PROPERTY_TYPE_ENUM, (BYTE *)&precision, sizeof(precision));
- todo_wine
- ok(hr == S_OK, "Got unexpected hr %#x.\n", hr);
+ todo_wine ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
if (hr == S_OK)
ok(precision == D2D1_BUFFER_PRECISION_UNKNOWN, "Got unexpected precision %u.\n", precision);
hr = ID2D1Effect_GetValue(effect, D2D1_PROPERTY_MIN_INPUTS,
D2D1_PROPERTY_TYPE_UINT32, (BYTE *)&min_inputs, sizeof(min_inputs));
- ok(hr == S_OK, "Got unexpected hr %#x.\n", hr);
- if (hr == S_OK)
- ok(min_inputs == test->min_inputs, "Got unexpected min inputs %u, expected %u.\n",
- min_inputs, test->min_inputs);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
+ ok(min_inputs == test->min_inputs, "Got unexpected min inputs %u, expected %u.\n",
+ min_inputs, test->min_inputs);
hr = ID2D1Effect_GetValue(effect, D2D1_PROPERTY_MAX_INPUTS,
D2D1_PROPERTY_TYPE_UINT32, (BYTE *)&max_inputs, sizeof(max_inputs));
- ok(hr == S_OK, "Got unexpected hr %#x.\n", hr);
- if (hr == S_OK)
- ok(max_inputs == test->max_inputs, "Got unexpected max inputs %u, expected %u.\n",
- max_inputs, test->max_inputs);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
+ ok(max_inputs == test->max_inputs, "Got unexpected max inputs %u, expected %u.\n",
+ max_inputs, test->max_inputs);
input_count = ID2D1Effect_GetInputCount(effect);
- ok (input_count == test->default_input_count, "Got unexpected input count %u, expected %u.\n",
+ ok(input_count == test->default_input_count, "Got unexpected input count %u, expected %u.\n",
input_count, test->default_input_count);
input_count = (test->max_inputs < 16 ? test->max_inputs : 16);
@@ -9980,9 +9971,9 @@ static void test_effect(BOOL d3d11)
winetest_push_context("Input %u", j);
hr = ID2D1Effect_SetInputCount(effect, j);
if (j < test->min_inputs || j > test->max_inputs)
- ok(hr == E_INVALIDARG, "Got unexpected hr %#x.\n", hr);
+ ok(hr == E_INVALIDARG, "Got unexpected hr %#lx.\n", hr);
else
- ok(hr == S_OK, "Got unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
winetest_pop_context();
}
@@ -10001,7 +9992,7 @@ static void test_effect(BOOL d3d11)
bitmap_desc.dpiX = 96.0f;
bitmap_desc.dpiY = 96.0f;
hr = ID2D1RenderTarget_CreateBitmap(ctx.rt, size, NULL, 4, &bitmap_desc, &bitmap);
- ok(hr == S_OK, "Got unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID2D1Effect_SetInput(effect, 0, (ID2D1Image *)bitmap, FALSE);
for (j = 0; j < input_count + 4; ++j)
@@ -10120,10 +10111,10 @@ static void test_effect_2d_affine(BOOL d3d11)
}
hr = ID2D1RenderTarget_QueryInterface(ctx.rt, &IID_ID2D1DeviceContext, (void **)&context);
- ok(hr == S_OK, "Got unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = ID2D1DeviceContext_CreateEffect(context, &CLSID_D2D12DAffineTransform, &effect);
- ok(hr == S_OK, "Got unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
for (i = 0; i < ARRAY_SIZE(effect_2d_affine_tests); ++i)
{
@@ -10139,13 +10130,13 @@ static void test_effect_2d_affine(BOOL d3d11)
bitmap_desc.colorContext = NULL;
hr = ID2D1DeviceContext_CreateBitmap(context, input_size, test->img_data,
sizeof(*test->img_data) * test->img_width, &bitmap_desc, &bitmap);
- ok(hr == S_OK, "Got unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID2D1Effect_SetInput(effect, 0, (ID2D1Image *)bitmap, FALSE);
todo_wine
hr = ID2D1Effect_SetValue(effect, D2D1_2DAFFINETRANSFORM_PROP_TRANSFORM_MATRIX,
D2D1_PROPERTY_TYPE_MATRIX_3X2, (const BYTE *)test->matrix, sizeof(*test->matrix));
- ok(hr == S_OK, "Got unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID2D1Effect_GetOutput(effect, &output);
ID2D1DeviceContext_GetImageLocalBounds(context, output, &output_bounds);
@@ -10168,7 +10159,7 @@ static void test_effect_2d_affine(BOOL d3d11)
offset.y = 240.0f;
ID2D1DeviceContext_DrawImage(context, output, &offset, NULL, 0, 0);
hr = ID2D1DeviceContext_EndDraw(context, NULL, NULL);
- ok(hr == S_OK, "Got unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
x = offset.x + output_bounds.left - 2.0f;
y = offset.y + output_bounds.top - 2.0f;
@@ -10232,10 +10223,10 @@ static void test_effect_crop(BOOL d3d11)
}
hr = ID2D1RenderTarget_QueryInterface(ctx.rt, &IID_ID2D1DeviceContext, (void **)&context);
- ok(hr == S_OK, "Got unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = ID2D1DeviceContext_CreateEffect(context, &CLSID_D2D1Crop, &effect);
- ok(hr == S_OK, "Got unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
for (i = 0; i < ARRAY_SIZE(crop_effect_tests); ++i)
{
@@ -10251,12 +10242,12 @@ static void test_effect_crop(BOOL d3d11)
bitmap_desc.colorContext = NULL;
hr = ID2D1DeviceContext_CreateBitmap(context, input_size, image,
sizeof(*image) * 16, &bitmap_desc, &bitmap);
- ok(hr == S_OK, "Got unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID2D1Effect_SetInput(effect, 0, (ID2D1Image *)bitmap, FALSE);
hr = ID2D1Effect_SetValue(effect, D2D1_CROP_PROP_RECT, D2D1_PROPERTY_TYPE_VECTOR4,
(const BYTE *)&test->crop_rect, sizeof(test->crop_rect));
- ok(hr == S_OK, "Got unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID2D1Effect_GetOutput(effect, &output);
set_rect(&output_bounds, -1.0f, -1.0f, -1.0f, -1.0f);
@@ -10458,11 +10449,11 @@ static void test_stroke_contains_point(BOOL d3d11)
};
hr = D2D1CreateFactory(D2D1_FACTORY_TYPE_SINGLE_THREADED, &IID_ID2D1Factory, NULL, (void **)&factory);
- ok(hr == S_OK, "Got unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
set_rect(&rect, 0.0f, 0.0f, 10.0f, 20.0f);
hr = ID2D1Factory_CreateRectangleGeometry(factory, &rect, &rectangle);
- ok(hr == S_OK, "Got unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
for (i = 0; i < ARRAY_SIZE(rectangle_tests); ++i)
{
const struct contains_point_test *test = &rectangle_tests[i];
@@ -10472,7 +10463,7 @@ static void test_stroke_contains_point(BOOL d3d11)
contains = !test->contains;
hr = ID2D1RectangleGeometry_StrokeContainsPoint(rectangle, test->point, test->stroke_width,
NULL, test->matrix ? &test->transform : NULL, test->tolerance, &contains);
- ok(hr == S_OK, "Got unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ok(contains == test->contains, "Got unexpected result %#x.\n", contains);
winetest_pop_context();
@@ -10480,9 +10471,9 @@ static void test_stroke_contains_point(BOOL d3d11)
ID2D1RectangleGeometry_Release(rectangle);
hr = ID2D1Factory_CreatePathGeometry(factory, &path);
- ok(hr == S_OK, "Got unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = ID2D1PathGeometry_Open(path, &sink);
- ok(hr == S_OK, "Got unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
/* A limaçon. */
set_point(&point, 160.0f, 720.0f);
@@ -10524,7 +10515,7 @@ static void test_stroke_contains_point(BOOL d3d11)
ID2D1GeometrySink_EndFigure(sink, D2D1_FIGURE_END_OPEN);
hr = ID2D1GeometrySink_Close(sink);
- ok(hr == S_OK, "Got unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID2D1GeometrySink_Release(sink);
for (i = 0; i < ARRAY_SIZE(path_tests); ++i)
@@ -10536,7 +10527,7 @@ static void test_stroke_contains_point(BOOL d3d11)
contains = !test->contains;
hr = ID2D1PathGeometry_StrokeContainsPoint(path, test->point, test->stroke_width,
NULL, test->matrix ? &test->transform : NULL, test->tolerance, &contains);
- ok(hr == S_OK, "Got unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ok(contains == test->contains, "Got unexpected result %#x.\n", contains);
winetest_pop_context();
--
2.30.2
2
1
[PATCH 3/5] d2d1/tests: Declare "level" as D3D_FEATURE_LEVEL in create_d3d11_device().
by Henri Verbeet Feb. 3, 2022
by Henri Verbeet Feb. 3, 2022
Feb. 3, 2022
Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com>
---
dlls/d2d1/tests/d2d1.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dlls/d2d1/tests/d2d1.c b/dlls/d2d1/tests/d2d1.c
index 314d8b7ce60d..003aad605054 100644
--- a/dlls/d2d1/tests/d2d1.c
+++ b/dlls/d2d1/tests/d2d1.c
@@ -824,7 +824,7 @@ static ID3D10Device1 *create_d3d10_device(void)
static ID3D11Device *create_d3d11_device(void)
{
- DWORD level = D3D_FEATURE_LEVEL_11_0;
+ D3D_FEATURE_LEVEL level = D3D_FEATURE_LEVEL_11_0;
ID3D11Device *device;
if (SUCCEEDED(D3D11CreateDevice(NULL, D3D_DRIVER_TYPE_HARDWARE, NULL,
--
2.30.2
2
1
[PATCH 2/5] d2d1/tests: Pass the hash size as DWORD in compare_sha1().
by Henri Verbeet Feb. 3, 2022
by Henri Verbeet Feb. 3, 2022
Feb. 3, 2022
Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com>
---
dlls/d2d1/tests/d2d1.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/dlls/d2d1/tests/d2d1.c b/dlls/d2d1/tests/d2d1.c
index b0aa02ad2a90..314d8b7ce60d 100644
--- a/dlls/d2d1/tests/d2d1.c
+++ b/dlls/d2d1/tests/d2d1.c
@@ -536,6 +536,7 @@ static BOOL compare_sha1(void *data, unsigned int pitch, unsigned int bpp,
HCRYPTPROV provider;
BYTE hash_data[20];
HCRYPTHASH hash;
+ DWORD hash_size;
unsigned int i;
char sha1[41];
BOOL ret;
@@ -552,10 +553,10 @@ static BOOL compare_sha1(void *data, unsigned int pitch, unsigned int bpp,
}
ok(ret, "Failed to hash data.\n");
- i = sizeof(hash_data);
- ret = CryptGetHashParam(hash, HP_HASHVAL, hash_data, &i, 0);
+ hash_size = sizeof(hash_data);
+ ret = CryptGetHashParam(hash, HP_HASHVAL, hash_data, &hash_size, 0);
ok(ret, "Failed to get hash value.\n");
- ok(i == sizeof(hash_data), "Got unexpected hash size %u.\n", i);
+ ok(hash_size == sizeof(hash_data), "Got unexpected hash size %u.\n", hash_size);
ret = CryptDestroyHash(hash);
ok(ret, "Failed to destroy hash.\n");
--
2.30.2
2
1
Feb. 3, 2022
From: Eric Pouech <eric.pouech(a)gmail.com>
Signed-off-by: Eric Pouech <eric.pouech(a)gmail.com>
Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com>
---
dlls/d3d10_1/tests/Makefile.in | 1 -
dlls/d3d10_1/tests/d3d10_1.c | 104 ++++++++++++++++-----------------
2 files changed, 52 insertions(+), 53 deletions(-)
diff --git a/dlls/d3d10_1/tests/Makefile.in b/dlls/d3d10_1/tests/Makefile.in
index 97eaf324ff78..256bb407d414 100644
--- a/dlls/d3d10_1/tests/Makefile.in
+++ b/dlls/d3d10_1/tests/Makefile.in
@@ -1,4 +1,3 @@
-EXTRADEFS = -DWINE_NO_LONG_TYPES
TESTDLL = d3d10_1.dll
IMPORTS = d3d10_1 user32
diff --git a/dlls/d3d10_1/tests/d3d10_1.c b/dlls/d3d10_1/tests/d3d10_1.c
index 51da614d9d76..33abd919a031 100644
--- a/dlls/d3d10_1/tests/d3d10_1.c
+++ b/dlls/d3d10_1/tests/d3d10_1.c
@@ -87,7 +87,7 @@ static HRESULT check_interface_(unsigned int line, void *iface, REFIID iid, BOOL
hr = IUnknown_QueryInterface(unknown, iid, (void **)&out);
ok_(__FILE__, line)(hr == expected_hr || broken(is_broken && hr == broken_hr),
- "Got hr %#x, expected %#x.\n", hr, expected_hr);
+ "Got unexpected hr %#lx, expected %#lx.\n", hr, expected_hr);
if (SUCCEEDED(hr))
IUnknown_Release(out);
return hr;
@@ -128,18 +128,18 @@ static void test_create_device(void)
hr = D3D10CreateDevice1(NULL, D3D10_DRIVER_TYPE_HARDWARE, NULL, 0,
supported_feature_level, D3D10_1_SDK_VERSION, NULL);
- ok(hr == E_INVALIDARG, "Got unexpected hr %#x.\n", hr);
+ ok(hr == E_INVALIDARG, "Got unexpected hr %#lx.\n", hr);
device = (ID3D10Device1 *)0xdeadbeef;
hr = D3D10CreateDevice1(NULL, 0xffffffff, NULL, 0,
supported_feature_level, D3D10_1_SDK_VERSION, &device);
- todo_wine ok(hr == E_INVALIDARG, "D3D10CreateDevice1 returned %#x.\n", hr);
+ todo_wine ok(hr == E_INVALIDARG, "Got unexpected hr %#lx.\n", hr);
ok(!device, "Got unexpected device pointer %p.\n", device);
device = (ID3D10Device1 *)0xdeadbeef;
hr = D3D10CreateDevice1(NULL, D3D10_DRIVER_TYPE_HARDWARE, NULL, 0,
0, D3D10_1_SDK_VERSION, &device);
- ok(hr == E_INVALIDARG, "D3D10CreateDevice1 returned %#x.\n", hr);
+ ok(hr == E_INVALIDARG, "Got unexpected hr %#lx.\n", hr);
ok(!device, "Got unexpected device pointer %p.\n", device);
window = CreateWindowA("static", "d3d10_1_test", 0, 0, 0, 0, 0, 0, 0, 0, 0);
@@ -162,13 +162,13 @@ static void test_create_device(void)
hr = D3D10CreateDeviceAndSwapChain1(NULL, D3D10_DRIVER_TYPE_HARDWARE, NULL, 0,
supported_feature_level, D3D10_1_SDK_VERSION, &swapchain_desc, &swapchain, &device);
- ok(SUCCEEDED(hr), "D3D10CreateDeviceAndSwapChain1 failed %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
check_interface(swapchain, &IID_IDXGISwapChain1, TRUE, FALSE);
memset(&obtained_desc, 0, sizeof(obtained_desc));
hr = IDXGISwapChain_GetDesc(swapchain, &obtained_desc);
- ok(SUCCEEDED(hr), "GetDesc failed %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ok(obtained_desc.BufferDesc.Width == swapchain_desc.BufferDesc.Width,
"Got unexpected BufferDesc.Width %u.\n", obtained_desc.BufferDesc.Width);
ok(obtained_desc.BufferDesc.Height == swapchain_desc.BufferDesc.Height,
@@ -203,56 +203,56 @@ static void test_create_device(void)
"Got unexpected Flags %#x.\n", obtained_desc.Flags);
refcount = IDXGISwapChain_Release(swapchain);
- ok(!refcount, "Swapchain has %u references left.\n", refcount);
+ ok(!refcount, "Swapchain has %lu references left.\n", refcount);
feature_level = ID3D10Device1_GetFeatureLevel(device);
ok(feature_level == supported_feature_level, "Got feature level %#x, expected %#x.\n",
feature_level, supported_feature_level);
refcount = ID3D10Device1_Release(device);
- ok(!refcount, "Device has %u references left.\n", refcount);
+ ok(!refcount, "Device has %lu references left.\n", refcount);
hr = D3D10CreateDeviceAndSwapChain1(NULL, D3D10_DRIVER_TYPE_HARDWARE, NULL, 0,
supported_feature_level, D3D10_1_SDK_VERSION, NULL, NULL, &device);
- ok(SUCCEEDED(hr), "D3D10CreateDeviceAndSwapChain1 failed %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
refcount = ID3D10Device1_Release(device);
- ok(!refcount, "Device has %u references left.\n", refcount);
+ ok(!refcount, "Device has %lu references left.\n", refcount);
hr = D3D10CreateDeviceAndSwapChain1(NULL, D3D10_DRIVER_TYPE_HARDWARE, NULL, 0,
supported_feature_level, D3D10_1_SDK_VERSION, NULL, NULL, NULL);
- ok(hr == E_INVALIDARG, "Got unexpected hr %#x.\n", hr);
+ ok(hr == E_INVALIDARG, "Got unexpected hr %#lx.\n", hr);
hr = D3D10CreateDeviceAndSwapChain1(NULL, D3D10_DRIVER_TYPE_HARDWARE, NULL, 0,
supported_feature_level, D3D10_1_SDK_VERSION, &swapchain_desc, NULL, NULL);
- ok(hr == E_INVALIDARG, "Got unexpected hr %#x.\n", hr);
+ ok(hr == E_INVALIDARG, "Got unexpected hr %#lx.\n", hr);
swapchain = (IDXGISwapChain *)0xdeadbeef;
device = (ID3D10Device1 *)0xdeadbeef;
hr = D3D10CreateDeviceAndSwapChain1(NULL, D3D10_DRIVER_TYPE_HARDWARE, NULL, 0,
0, D3D10_1_SDK_VERSION, &swapchain_desc, &swapchain, &device);
- ok(hr == E_INVALIDARG, "Got unexpected hr %#x.\n", hr);
+ ok(hr == E_INVALIDARG, "Got unexpected hr %#lx.\n", hr);
ok(!swapchain, "Got unexpected swapchain pointer %p.\n", swapchain);
ok(!device, "Got unexpected device pointer %p.\n", device);
swapchain = (IDXGISwapChain *)0xdeadbeef;
hr = D3D10CreateDeviceAndSwapChain1(NULL, D3D10_DRIVER_TYPE_HARDWARE, NULL, 0,
supported_feature_level, D3D10_1_SDK_VERSION, &swapchain_desc, &swapchain, NULL);
- ok(hr == E_INVALIDARG, "Got unexpected hr %#x.\n", hr);
+ ok(hr == E_INVALIDARG, "Got unexpected hr %#lx.\n", hr);
ok(!swapchain, "Got unexpected swapchain pointer %p.\n", swapchain);
swapchain_desc.OutputWindow = NULL;
hr = D3D10CreateDeviceAndSwapChain1(NULL, D3D10_DRIVER_TYPE_HARDWARE, NULL, 0,
supported_feature_level, D3D10_1_SDK_VERSION, &swapchain_desc, NULL, &device);
- ok(SUCCEEDED(hr), "D3D10CreateDeviceAndSwapChain1 failed %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
refcount = ID3D10Device1_Release(device);
- ok(!refcount, "Device has %u references left.\n", refcount);
+ ok(!refcount, "Device has %lu references left.\n", refcount);
swapchain = (IDXGISwapChain *)0xdeadbeef;
device = (ID3D10Device1 *)0xdeadbeef;
swapchain_desc.OutputWindow = NULL;
hr = D3D10CreateDeviceAndSwapChain1(NULL, D3D10_DRIVER_TYPE_HARDWARE, NULL, 0,
supported_feature_level, D3D10_1_SDK_VERSION, &swapchain_desc, &swapchain, &device);
- ok(hr == DXGI_ERROR_INVALID_CALL, "D3D10CreateDeviceAndSwapChain1 returned %#x.\n", hr);
+ ok(hr == DXGI_ERROR_INVALID_CALL, "Got unexpected hr %#lx.\n", hr);
ok(!swapchain, "Got unexpected swapchain pointer %p.\n", swapchain);
ok(!device, "Got unexpected device pointer %p.\n", device);
@@ -262,7 +262,7 @@ static void test_create_device(void)
swapchain_desc.BufferDesc.Format = DXGI_FORMAT_BC5_UNORM;
hr = D3D10CreateDeviceAndSwapChain1(NULL, D3D10_DRIVER_TYPE_HARDWARE, NULL, 0,
supported_feature_level, D3D10_1_SDK_VERSION, &swapchain_desc, &swapchain, &device);
- ok(hr == E_INVALIDARG, "D3D10CreateDeviceAndSwapChain1 returned %#x.\n", hr);
+ ok(hr == E_INVALIDARG, "Got unexpected hr %#lx.\n", hr);
ok(!swapchain, "Got unexpected swapchain pointer %p.\n", swapchain);
ok(!device, "Got unexpected device pointer %p.\n", device);
@@ -317,7 +317,7 @@ static void test_device_interfaces(void)
IDXGIDevice_Release(dxgi_device);
refcount = ID3D10Device1_Release(device);
- ok(!refcount, "Device has %u references left.\n", refcount);
+ ok(!refcount, "Device has %lu references left.\n", refcount);
}
for (i = 0; i < ARRAY_SIZE(d3d10_feature_levels); ++i)
@@ -336,7 +336,7 @@ static void test_device_interfaces(void)
check_interface(device, &IID_ID3D10InfoQueue, TRUE, FALSE);
refcount = ID3D10Device1_Release(device);
- ok(!refcount, "Device has %u references left.\n", refcount);
+ ok(!refcount, "Device has %lu references left.\n", refcount);
}
}
@@ -366,10 +366,10 @@ static void test_create_shader_resource_view(void)
buffer_desc.MiscFlags = 0;
hr = ID3D10Device1_CreateBuffer(device, &buffer_desc, NULL, &buffer);
- ok(SUCCEEDED(hr), "Failed to create a buffer, hr %#x\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = ID3D10Device1_CreateShaderResourceView1(device, (ID3D10Resource *)buffer, NULL, &srview);
- ok(hr == E_INVALIDARG, "Got unexpected hr %#x.\n", hr);
+ ok(hr == E_INVALIDARG, "Got unexpected hr %#lx.\n", hr);
srv_desc.Format = DXGI_FORMAT_R32G32B32A32_FLOAT;
srv_desc.ViewDimension = D3D10_1_SRV_DIMENSION_BUFFER;
@@ -377,19 +377,19 @@ static void test_create_shader_resource_view(void)
U(srv_desc).Buffer.ElementWidth = 64;
hr = ID3D10Device1_CreateShaderResourceView1(device, NULL, &srv_desc, &srview);
- ok(hr == E_INVALIDARG, "Got unexpected hr %#x.\n", hr);
+ ok(hr == E_INVALIDARG, "Got unexpected hr %#lx.\n", hr);
expected_refcount = get_refcount((IUnknown *)device) + 1;
hr = ID3D10Device1_CreateShaderResourceView1(device, (ID3D10Resource *)buffer, &srv_desc, &srview);
- ok(SUCCEEDED(hr), "Failed to create a shader resource view, hr %#x\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
refcount = get_refcount((IUnknown *)device);
- ok(refcount >= expected_refcount, "Got unexpected refcount %u, expected >= %u.\n", refcount, expected_refcount);
+ ok(refcount >= expected_refcount, "Got unexpected refcount %lu, expected >= %lu.\n", refcount, expected_refcount);
tmp_device = NULL;
expected_refcount = refcount + 1;
ID3D10ShaderResourceView1_GetDevice(srview, &tmp_device);
ok(tmp_device == (ID3D10Device *)device, "Got unexpected device %p, expected %p.\n", tmp_device, device);
refcount = get_refcount((IUnknown *)device);
- ok(refcount == expected_refcount, "Got unexpected refcount %u, expected %u.\n", refcount, expected_refcount);
+ ok(refcount == expected_refcount, "Got unexpected refcount %lu, expected %lu.\n", refcount, expected_refcount);
ID3D10Device_Release(tmp_device);
check_interface(srview, &IID_ID3D10ShaderResourceView, TRUE, FALSE);
@@ -407,10 +407,10 @@ static void test_create_shader_resource_view(void)
buffer_desc.MiscFlags = 0;
hr = ID3D10Device1_CreateBuffer(device, &buffer_desc, NULL, &buffer);
- ok(SUCCEEDED(hr), "Failed to create a buffer, hr %#x\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = ID3D10Device1_CreateShaderResourceView1(device, (ID3D10Resource *)buffer, &srv_desc, &srview);
- ok(hr == E_INVALIDARG, "Got unexpected hr %#x.\n", hr);
+ ok(hr == E_INVALIDARG, "Got unexpected hr %#lx.\n", hr);
ID3D10Buffer_Release(buffer);
@@ -427,10 +427,10 @@ static void test_create_shader_resource_view(void)
texture_desc.MiscFlags = 0;
hr = ID3D10Device1_CreateTexture2D(device, &texture_desc, NULL, &texture);
- ok(SUCCEEDED(hr), "Failed to create a 2d texture, hr %#x\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = ID3D10Device1_CreateShaderResourceView1(device, (ID3D10Resource *)texture, NULL, &srview);
- ok(SUCCEEDED(hr), "Failed to create a shader resource view, hr %#x\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID3D10ShaderResourceView1_GetDesc1(srview, &srv_desc);
ok(srv_desc.Format == texture_desc.Format, "Got unexpected format %#x.\n", srv_desc.Format);
@@ -448,7 +448,7 @@ static void test_create_shader_resource_view(void)
ID3D10Texture2D_Release(texture);
refcount = ID3D10Device1_Release(device);
- ok(!refcount, "Device has %u references left.\n", refcount);
+ ok(!refcount, "Device has %lu references left.\n", refcount);
}
static void test_create_blend_state(void)
@@ -557,7 +557,7 @@ static void test_create_blend_state(void)
}
hr = ID3D10Device1_CreateBlendState1(device, NULL, &blend_state1);
- ok(hr == E_INVALIDARG, "Got unexpected hr %#x.\n", hr);
+ ok(hr == E_INVALIDARG, "Got unexpected hr %#lx.\n", hr);
memset(&desc, 0, sizeof(desc));
desc.AlphaToCoverageEnable = FALSE;
@@ -573,18 +573,18 @@ static void test_create_blend_state(void)
expected_refcount = get_refcount((IUnknown *)device) + 1;
hr = ID3D10Device1_CreateBlendState1(device, &desc, &blend_state1);
- ok(SUCCEEDED(hr), "Failed to create blend state, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = ID3D10Device1_CreateBlendState1(device, &desc, &blend_state2);
- ok(SUCCEEDED(hr), "Failed to create blend state, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ok(blend_state1 == blend_state2, "Got different blend state objects.\n");
refcount = get_refcount((IUnknown *)device);
- ok(refcount >= expected_refcount, "Got unexpected refcount %u, expected >= %u.\n", refcount, expected_refcount);
+ ok(refcount >= expected_refcount, "Got unexpected refcount %lu, expected >= %lu.\n", refcount, expected_refcount);
tmp = NULL;
expected_refcount = refcount + 1;
ID3D10BlendState1_GetDevice(blend_state1, &tmp);
ok(tmp == (ID3D10Device *)device, "Got unexpected device %p, expected %p.\n", tmp, device);
refcount = get_refcount((IUnknown *)device);
- ok(refcount == expected_refcount, "Got unexpected refcount %u, expected %u.\n", refcount, expected_refcount);
+ ok(refcount == expected_refcount, "Got unexpected refcount %lu, expected %lu.\n", refcount, expected_refcount);
ID3D10Device_Release(tmp);
ID3D10BlendState1_GetDesc1(blend_state1, &obtained_desc);
@@ -625,16 +625,16 @@ static void test_create_blend_state(void)
check_interface(blend_state1, &IID_ID3D11BlendState, TRUE, TRUE);
refcount = ID3D10BlendState1_Release(blend_state1);
- ok(refcount == 1, "Got unexpected refcount %u.\n", refcount);
+ ok(refcount == 1, "Got unexpected refcount %lu.\n", refcount);
refcount = ID3D10BlendState1_Release(blend_state2);
- ok(!refcount, "Blend state has %u references left.\n", refcount);
+ ok(!refcount, "Blend state has %lu references left.\n", refcount);
for (i = 0; i < ARRAY_SIZE(desc_conversion_tests); ++i)
{
const D3D10_BLEND_DESC1 *current_desc = &desc_conversion_tests[i];
hr = ID3D10Device1_CreateBlendState1(device, current_desc, &blend_state1);
- ok(SUCCEEDED(hr), "Failed to create blend state, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = ID3D10BlendState1_QueryInterface(blend_state1, &IID_ID3D10BlendState, (void **)&d3d10_blend_state);
ok(SUCCEEDED(hr), "Blend state should implement ID3D10BlendState.\n");
@@ -669,11 +669,11 @@ static void test_create_blend_state(void)
ID3D10BlendState_Release(d3d10_blend_state);
refcount = ID3D10BlendState1_Release(blend_state1);
- ok(!refcount, "Got unexpected refcount %u.\n", refcount);
+ ok(!refcount, "Got unexpected refcount %lu.\n", refcount);
}
refcount = ID3D10Device1_Release(device);
- ok(!refcount, "Device has %u references left.\n", refcount);
+ ok(!refcount, "Device has %lu references left.\n", refcount);
}
static void test_getdc(void)
@@ -708,47 +708,47 @@ static void test_getdc(void)
desc.CPUAccessFlags = 0;
desc.MiscFlags = 0;
hr = ID3D10Device1_CreateTexture2D(device, &desc, NULL, &texture);
- ok(SUCCEEDED(hr), "Failed to create texture, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = ID3D10Texture2D_QueryInterface(texture, &IID_IDXGISurface1, (void**)&surface1);
- ok(SUCCEEDED(hr), "Failed to get IDXGISurface1 interface, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = IDXGISurface1_GetDC(surface1, FALSE, &dc);
- todo_wine ok(hr == DXGI_ERROR_INVALID_CALL, "Got unexpected hr %#x.\n", hr);
+ todo_wine ok(hr == DXGI_ERROR_INVALID_CALL, "Got unexpected hr %#lx.\n", hr);
IDXGISurface1_Release(surface1);
ID3D10Texture2D_Release(texture);
desc.MiscFlags = D3D10_RESOURCE_MISC_GDI_COMPATIBLE;
hr = ID3D10Device1_CreateTexture2D(device, &desc, NULL, &texture);
- ok(SUCCEEDED(hr), "Failed to create texture, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = ID3D10Texture2D_QueryInterface(texture, &IID_IDXGISurface1, (void**)&surface1);
- ok(SUCCEEDED(hr), "Failed to get IDXGISurface1 interface, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = IDXGISurface1_ReleaseDC(surface1, NULL);
- todo_wine ok(hr == DXGI_ERROR_INVALID_CALL, "Got unexpected hr %#x.\n", hr);
+ todo_wine ok(hr == DXGI_ERROR_INVALID_CALL, "Got unexpected hr %#lx.\n", hr);
hr = IDXGISurface1_GetDC(surface1, FALSE, &dc);
- ok(SUCCEEDED(hr), "Failed to get DC, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
/* One more time. */
dc = (HDC)0xdeadbeef;
hr = IDXGISurface1_GetDC(surface1, FALSE, &dc);
- todo_wine ok(hr == DXGI_ERROR_INVALID_CALL, "Got unexpected hr %#x.\n", hr);
+ todo_wine ok(hr == DXGI_ERROR_INVALID_CALL, "Got unexpected hr %#lx.\n", hr);
ok(dc == (HDC)0xdeadbeef, "Got unexpected dc %p.\n", dc);
hr = IDXGISurface1_ReleaseDC(surface1, NULL);
- ok(SUCCEEDED(hr), "Failed to release DC, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = IDXGISurface1_ReleaseDC(surface1, NULL);
- todo_wine ok(hr == DXGI_ERROR_INVALID_CALL, "Got unexpected hr %#x.\n", hr);
+ todo_wine ok(hr == DXGI_ERROR_INVALID_CALL, "Got unexpected hr %#lx.\n", hr);
IDXGISurface1_Release(surface1);
ID3D10Texture2D_Release(texture);
refcount = ID3D10Device1_Release(device);
- ok(!refcount, "Device has %u references left.\n", refcount);
+ ok(!refcount, "Device has %lu references left.\n", refcount);
}
START_TEST(d3d10_1)
--
2.30.2
1
0