Commit 0201606b authored by Eric Pouech's avatar Eric Pouech Committed by Alexandre Julliard

d2d1: Build without -DWINE_NO_LONG_TYPES.

parent 2c6fd7b6
EXTRADEFS = -DWINE_NO_LONG_TYPES
MODULE = d2d1.dll MODULE = d2d1.dll
IMPORTLIB = d2d1 IMPORTLIB = d2d1
IMPORTS = d3d10_1 dxguid uuid gdi32 user32 advapi32 IMPORTS = d3d10_1 dxguid uuid gdi32 user32 advapi32
......
...@@ -52,7 +52,7 @@ static ULONG STDMETHODCALLTYPE d2d_bitmap_AddRef(ID2D1Bitmap1 *iface) ...@@ -52,7 +52,7 @@ static ULONG STDMETHODCALLTYPE d2d_bitmap_AddRef(ID2D1Bitmap1 *iface)
struct d2d_bitmap *bitmap = impl_from_ID2D1Bitmap1(iface); struct d2d_bitmap *bitmap = impl_from_ID2D1Bitmap1(iface);
ULONG refcount = InterlockedIncrement(&bitmap->refcount); ULONG refcount = InterlockedIncrement(&bitmap->refcount);
TRACE("%p increasing refcount to %u.\n", iface, refcount); TRACE("%p increasing refcount to %lu.\n", iface, refcount);
return refcount; return refcount;
} }
...@@ -62,7 +62,7 @@ static ULONG STDMETHODCALLTYPE d2d_bitmap_Release(ID2D1Bitmap1 *iface) ...@@ -62,7 +62,7 @@ static ULONG STDMETHODCALLTYPE d2d_bitmap_Release(ID2D1Bitmap1 *iface)
struct d2d_bitmap *bitmap = impl_from_ID2D1Bitmap1(iface); struct d2d_bitmap *bitmap = impl_from_ID2D1Bitmap1(iface);
ULONG refcount = InterlockedDecrement(&bitmap->refcount); ULONG refcount = InterlockedDecrement(&bitmap->refcount);
TRACE("%p decreasing refcount to %u.\n", iface, refcount); TRACE("%p decreasing refcount to %lu.\n", iface, refcount);
if (!refcount) if (!refcount)
{ {
...@@ -295,13 +295,13 @@ static void d2d_bitmap_init(struct d2d_bitmap *bitmap, struct d2d_device_context ...@@ -295,13 +295,13 @@ static void d2d_bitmap_init(struct d2d_bitmap *bitmap, struct d2d_device_context
if (bitmap->options & D2D1_BITMAP_OPTIONS_TARGET) if (bitmap->options & D2D1_BITMAP_OPTIONS_TARGET)
{ {
if (FAILED(hr = ID3D11Device_CreateRenderTargetView(d3d_device, resource, NULL, &bitmap->rtv))) if (FAILED(hr = ID3D11Device_CreateRenderTargetView(d3d_device, resource, NULL, &bitmap->rtv)))
WARN("Failed to create RTV, hr %#x.\n", hr); WARN("Failed to create RTV, hr %#lx.\n", hr);
} }
if (!(bitmap->options & D2D1_BITMAP_OPTIONS_CANNOT_DRAW)) if (!(bitmap->options & D2D1_BITMAP_OPTIONS_CANNOT_DRAW))
{ {
if (FAILED(hr = ID3D11Device_CreateShaderResourceView(d3d_device, resource, NULL, &bitmap->srv))) if (FAILED(hr = ID3D11Device_CreateShaderResourceView(d3d_device, resource, NULL, &bitmap->srv)))
WARN("Failed to create SRV, hr %#x.\n", hr); WARN("Failed to create SRV, hr %#lx.\n", hr);
} }
ID3D11Device_Release(d3d_device); ID3D11Device_Release(d3d_device);
...@@ -366,7 +366,7 @@ HRESULT d2d_bitmap_create(struct d2d_device_context *context, D2D1_SIZE_U size, ...@@ -366,7 +366,7 @@ HRESULT d2d_bitmap_create(struct d2d_device_context *context, D2D1_SIZE_U size,
if (FAILED(hr = ID3D11Device1_CreateTexture2D(context->d3d_device, &texture_desc, if (FAILED(hr = ID3D11Device1_CreateTexture2D(context->d3d_device, &texture_desc,
src_data ? &resource_data : NULL, &texture))) src_data ? &resource_data : NULL, &texture)))
{ {
ERR("Failed to create texture, hr %#x.\n", hr); ERR("Failed to create texture, hr %#lx.\n", hr);
return hr; return hr;
} }
...@@ -468,7 +468,7 @@ HRESULT d2d_bitmap_create_shared(struct d2d_device_context *context, REFIID iid, ...@@ -468,7 +468,7 @@ HRESULT d2d_bitmap_create_shared(struct d2d_device_context *context, REFIID iid,
if (FAILED(hr = IDXGISurface_GetDesc(surface, &surface_desc))) if (FAILED(hr = IDXGISurface_GetDesc(surface, &surface_desc)))
{ {
WARN("Failed to get surface desc, hr %#x.\n", hr); WARN("Failed to get surface desc, hr %#lx.\n", hr);
ID3D11Resource_Release(resource); ID3D11Resource_Release(resource);
return hr; return hr;
} }
...@@ -536,7 +536,7 @@ HRESULT d2d_bitmap_create_from_wic_bitmap(struct d2d_device_context *context, IW ...@@ -536,7 +536,7 @@ HRESULT d2d_bitmap_create_from_wic_bitmap(struct d2d_device_context *context, IW
if (FAILED(hr = IWICBitmapSource_GetSize(bitmap_source, &size.width, &size.height))) if (FAILED(hr = IWICBitmapSource_GetSize(bitmap_source, &size.width, &size.height)))
{ {
WARN("Failed to get bitmap size, hr %#x.\n", hr); WARN("Failed to get bitmap size, hr %#lx.\n", hr);
return hr; return hr;
} }
...@@ -556,7 +556,7 @@ HRESULT d2d_bitmap_create_from_wic_bitmap(struct d2d_device_context *context, IW ...@@ -556,7 +556,7 @@ HRESULT d2d_bitmap_create_from_wic_bitmap(struct d2d_device_context *context, IW
if (FAILED(hr = IWICBitmapSource_GetPixelFormat(bitmap_source, &wic_format))) if (FAILED(hr = IWICBitmapSource_GetPixelFormat(bitmap_source, &wic_format)))
{ {
WARN("Failed to get bitmap format, hr %#x.\n", hr); WARN("Failed to get bitmap format, hr %#lx.\n", hr);
return hr; return hr;
} }
...@@ -605,7 +605,7 @@ HRESULT d2d_bitmap_create_from_wic_bitmap(struct d2d_device_context *context, IW ...@@ -605,7 +605,7 @@ HRESULT d2d_bitmap_create_from_wic_bitmap(struct d2d_device_context *context, IW
rect.Height = size.height; rect.Height = size.height;
if (FAILED(hr = IWICBitmapSource_CopyPixels(bitmap_source, &rect, pitch, data_size, data))) if (FAILED(hr = IWICBitmapSource_CopyPixels(bitmap_source, &rect, pitch, data_size, data)))
{ {
WARN("Failed to copy bitmap pixels, hr %#x.\n", hr); WARN("Failed to copy bitmap pixels, hr %#lx.\n", hr);
heap_free(data); heap_free(data);
return hr; return hr;
} }
......
...@@ -51,7 +51,7 @@ static ULONG STDMETHODCALLTYPE d2d_bitmap_render_target_AddRef(ID2D1BitmapRender ...@@ -51,7 +51,7 @@ static ULONG STDMETHODCALLTYPE d2d_bitmap_render_target_AddRef(ID2D1BitmapRender
struct d2d_bitmap_render_target *render_target = impl_from_ID2D1BitmapRenderTarget(iface); struct d2d_bitmap_render_target *render_target = impl_from_ID2D1BitmapRenderTarget(iface);
ULONG refcount = InterlockedIncrement(&render_target->refcount); ULONG refcount = InterlockedIncrement(&render_target->refcount);
TRACE("%p increasing refcount to %u.\n", iface, refcount); TRACE("%p increasing refcount to %lu.\n", iface, refcount);
return refcount; return refcount;
} }
...@@ -61,7 +61,7 @@ static ULONG STDMETHODCALLTYPE d2d_bitmap_render_target_Release(ID2D1BitmapRende ...@@ -61,7 +61,7 @@ static ULONG STDMETHODCALLTYPE d2d_bitmap_render_target_Release(ID2D1BitmapRende
struct d2d_bitmap_render_target *render_target = impl_from_ID2D1BitmapRenderTarget(iface); struct d2d_bitmap_render_target *render_target = impl_from_ID2D1BitmapRenderTarget(iface);
ULONG refcount = InterlockedDecrement(&render_target->refcount); ULONG refcount = InterlockedDecrement(&render_target->refcount);
TRACE("%p decreasing refcount to %u.\n", iface, refcount); TRACE("%p decreasing refcount to %lu.\n", iface, refcount);
if (!refcount) if (!refcount)
{ {
...@@ -787,7 +787,7 @@ HRESULT d2d_bitmap_render_target_init(struct d2d_bitmap_render_target *render_ta ...@@ -787,7 +787,7 @@ HRESULT d2d_bitmap_render_target_init(struct d2d_bitmap_render_target *render_ta
parent_target->ops ? &d2d_bitmap_render_target_ops : NULL, parent_target->ops ? &d2d_bitmap_render_target_ops : NULL,
&dxgi_rt_desc, (void **)&render_target->dxgi_inner))) &dxgi_rt_desc, (void **)&render_target->dxgi_inner)))
{ {
WARN("Failed to create DXGI surface render target, hr %#x.\n", hr); WARN("Failed to create DXGI surface render target, hr %#lx.\n", hr);
return hr; return hr;
} }
...@@ -798,7 +798,7 @@ HRESULT d2d_bitmap_render_target_init(struct d2d_bitmap_render_target *render_ta ...@@ -798,7 +798,7 @@ HRESULT d2d_bitmap_render_target_init(struct d2d_bitmap_render_target *render_ta
if (FAILED(hr = IUnknown_QueryInterface(render_target->dxgi_inner, if (FAILED(hr = IUnknown_QueryInterface(render_target->dxgi_inner,
&IID_ID2D1RenderTarget, (void **)&render_target->dxgi_target))) &IID_ID2D1RenderTarget, (void **)&render_target->dxgi_target)))
{ {
WARN("Failed to retrieve ID2D1RenderTarget interface, hr %#x.\n", hr); WARN("Failed to retrieve ID2D1RenderTarget interface, hr %#lx.\n", hr);
IUnknown_Release(render_target->dxgi_inner); IUnknown_Release(render_target->dxgi_inner);
return hr; return hr;
} }
...@@ -816,7 +816,7 @@ HRESULT d2d_bitmap_render_target_init(struct d2d_bitmap_render_target *render_ta ...@@ -816,7 +816,7 @@ HRESULT d2d_bitmap_render_target_init(struct d2d_bitmap_render_target *render_ta
ID2D1DeviceContext_Release(context); ID2D1DeviceContext_Release(context);
if (FAILED(hr)) if (FAILED(hr))
{ {
WARN("Failed to create target bitmap, hr %#x.\n", hr); WARN("Failed to create target bitmap, hr %#lx.\n", hr);
IUnknown_Release(render_target->dxgi_inner); IUnknown_Release(render_target->dxgi_inner);
return hr; return hr;
} }
......
...@@ -50,7 +50,7 @@ static ULONG STDMETHODCALLTYPE d2d_gradient_AddRef(ID2D1GradientStopCollection * ...@@ -50,7 +50,7 @@ static ULONG STDMETHODCALLTYPE d2d_gradient_AddRef(ID2D1GradientStopCollection *
struct d2d_gradient *gradient = impl_from_ID2D1GradientStopCollection(iface); struct d2d_gradient *gradient = impl_from_ID2D1GradientStopCollection(iface);
ULONG refcount = InterlockedIncrement(&gradient->refcount); ULONG refcount = InterlockedIncrement(&gradient->refcount);
TRACE("%p increasing refcount to %u.\n", iface, refcount); TRACE("%p increasing refcount to %lu.\n", iface, refcount);
return refcount; return refcount;
} }
...@@ -60,7 +60,7 @@ static ULONG STDMETHODCALLTYPE d2d_gradient_Release(ID2D1GradientStopCollection ...@@ -60,7 +60,7 @@ static ULONG STDMETHODCALLTYPE d2d_gradient_Release(ID2D1GradientStopCollection
struct d2d_gradient *gradient = impl_from_ID2D1GradientStopCollection(iface); struct d2d_gradient *gradient = impl_from_ID2D1GradientStopCollection(iface);
ULONG refcount = InterlockedDecrement(&gradient->refcount); ULONG refcount = InterlockedDecrement(&gradient->refcount);
TRACE("%p decreasing refcount to %u.\n", iface, refcount); TRACE("%p decreasing refcount to %lu.\n", iface, refcount);
if (!refcount) if (!refcount)
{ {
...@@ -170,7 +170,7 @@ HRESULT d2d_gradient_create(ID2D1Factory *factory, ID3D11Device1 *device, const ...@@ -170,7 +170,7 @@ HRESULT d2d_gradient_create(ID2D1Factory *factory, ID3D11Device1 *device, const
heap_free(data); heap_free(data);
if (FAILED(hr)) if (FAILED(hr))
{ {
ERR("Failed to create buffer, hr %#x.\n", hr); ERR("Failed to create buffer, hr %#lx.\n", hr);
return hr; return hr;
} }
...@@ -183,7 +183,7 @@ HRESULT d2d_gradient_create(ID2D1Factory *factory, ID3D11Device1 *device, const ...@@ -183,7 +183,7 @@ HRESULT d2d_gradient_create(ID2D1Factory *factory, ID3D11Device1 *device, const
ID3D11Buffer_Release(buffer); ID3D11Buffer_Release(buffer);
if (FAILED(hr)) if (FAILED(hr))
{ {
ERR("Failed to create view, hr %#x.\n", hr); ERR("Failed to create view, hr %#lx.\n", hr);
return hr; return hr;
} }
...@@ -288,7 +288,7 @@ static ULONG STDMETHODCALLTYPE d2d_solid_color_brush_AddRef(ID2D1SolidColorBrush ...@@ -288,7 +288,7 @@ static ULONG STDMETHODCALLTYPE d2d_solid_color_brush_AddRef(ID2D1SolidColorBrush
struct d2d_brush *brush = impl_from_ID2D1SolidColorBrush(iface); struct d2d_brush *brush = impl_from_ID2D1SolidColorBrush(iface);
ULONG refcount = InterlockedIncrement(&brush->refcount); ULONG refcount = InterlockedIncrement(&brush->refcount);
TRACE("%p increasing refcount to %u.\n", iface, refcount); TRACE("%p increasing refcount to %lu.\n", iface, refcount);
return refcount; return refcount;
} }
...@@ -298,7 +298,7 @@ static ULONG STDMETHODCALLTYPE d2d_solid_color_brush_Release(ID2D1SolidColorBrus ...@@ -298,7 +298,7 @@ static ULONG STDMETHODCALLTYPE d2d_solid_color_brush_Release(ID2D1SolidColorBrus
struct d2d_brush *brush = impl_from_ID2D1SolidColorBrush(iface); struct d2d_brush *brush = impl_from_ID2D1SolidColorBrush(iface);
ULONG refcount = InterlockedDecrement(&brush->refcount); ULONG refcount = InterlockedDecrement(&brush->refcount);
TRACE("%p decreasing refcount to %u.\n", iface, refcount); TRACE("%p decreasing refcount to %lu.\n", iface, refcount);
if (!refcount) if (!refcount)
d2d_brush_destroy(brush); d2d_brush_destroy(brush);
...@@ -431,7 +431,7 @@ static ULONG STDMETHODCALLTYPE d2d_linear_gradient_brush_AddRef(ID2D1LinearGradi ...@@ -431,7 +431,7 @@ static ULONG STDMETHODCALLTYPE d2d_linear_gradient_brush_AddRef(ID2D1LinearGradi
struct d2d_brush *brush = impl_from_ID2D1LinearGradientBrush(iface); struct d2d_brush *brush = impl_from_ID2D1LinearGradientBrush(iface);
ULONG refcount = InterlockedIncrement(&brush->refcount); ULONG refcount = InterlockedIncrement(&brush->refcount);
TRACE("%p increasing refcount to %u.\n", iface, refcount); TRACE("%p increasing refcount to %lu.\n", iface, refcount);
return refcount; return refcount;
} }
...@@ -441,7 +441,7 @@ static ULONG STDMETHODCALLTYPE d2d_linear_gradient_brush_Release(ID2D1LinearGrad ...@@ -441,7 +441,7 @@ static ULONG STDMETHODCALLTYPE d2d_linear_gradient_brush_Release(ID2D1LinearGrad
struct d2d_brush *brush = impl_from_ID2D1LinearGradientBrush(iface); struct d2d_brush *brush = impl_from_ID2D1LinearGradientBrush(iface);
ULONG refcount = InterlockedDecrement(&brush->refcount); ULONG refcount = InterlockedDecrement(&brush->refcount);
TRACE("%p decreasing refcount to %u.\n", iface, refcount); TRACE("%p decreasing refcount to %lu.\n", iface, refcount);
if (!refcount) if (!refcount)
{ {
...@@ -618,7 +618,7 @@ static ULONG STDMETHODCALLTYPE d2d_radial_gradient_brush_AddRef(ID2D1RadialGradi ...@@ -618,7 +618,7 @@ static ULONG STDMETHODCALLTYPE d2d_radial_gradient_brush_AddRef(ID2D1RadialGradi
struct d2d_brush *brush = impl_from_ID2D1RadialGradientBrush(iface); struct d2d_brush *brush = impl_from_ID2D1RadialGradientBrush(iface);
ULONG refcount = InterlockedIncrement(&brush->refcount); ULONG refcount = InterlockedIncrement(&brush->refcount);
TRACE("%p increasing refcount to %u.\n", iface, refcount); TRACE("%p increasing refcount to %lu.\n", iface, refcount);
return refcount; return refcount;
} }
...@@ -628,7 +628,7 @@ static ULONG STDMETHODCALLTYPE d2d_radial_gradient_brush_Release(ID2D1RadialGrad ...@@ -628,7 +628,7 @@ static ULONG STDMETHODCALLTYPE d2d_radial_gradient_brush_Release(ID2D1RadialGrad
struct d2d_brush *brush = impl_from_ID2D1RadialGradientBrush(iface); struct d2d_brush *brush = impl_from_ID2D1RadialGradientBrush(iface);
ULONG refcount = InterlockedDecrement(&brush->refcount); ULONG refcount = InterlockedDecrement(&brush->refcount);
TRACE("%p decreasing refcount to %u.\n", iface, refcount); TRACE("%p decreasing refcount to %lu.\n", iface, refcount);
if (!refcount) if (!refcount)
{ {
...@@ -851,7 +851,7 @@ static ULONG STDMETHODCALLTYPE d2d_bitmap_brush_AddRef(ID2D1BitmapBrush1 *iface) ...@@ -851,7 +851,7 @@ static ULONG STDMETHODCALLTYPE d2d_bitmap_brush_AddRef(ID2D1BitmapBrush1 *iface)
struct d2d_brush *brush = impl_from_ID2D1BitmapBrush1(iface); struct d2d_brush *brush = impl_from_ID2D1BitmapBrush1(iface);
ULONG refcount = InterlockedIncrement(&brush->refcount); ULONG refcount = InterlockedIncrement(&brush->refcount);
TRACE("%p increasing refcount to %u.\n", iface, refcount); TRACE("%p increasing refcount to %lu.\n", iface, refcount);
return refcount; return refcount;
} }
...@@ -861,7 +861,7 @@ static ULONG STDMETHODCALLTYPE d2d_bitmap_brush_Release(ID2D1BitmapBrush1 *iface ...@@ -861,7 +861,7 @@ static ULONG STDMETHODCALLTYPE d2d_bitmap_brush_Release(ID2D1BitmapBrush1 *iface
struct d2d_brush *brush = impl_from_ID2D1BitmapBrush1(iface); struct d2d_brush *brush = impl_from_ID2D1BitmapBrush1(iface);
ULONG refcount = InterlockedDecrement(&brush->refcount); ULONG refcount = InterlockedDecrement(&brush->refcount);
TRACE("%p decreasing refcount to %u.\n", iface, refcount); TRACE("%p decreasing refcount to %lu.\n", iface, refcount);
if (!refcount) if (!refcount)
{ {
...@@ -1281,7 +1281,7 @@ static void d2d_brush_bind_bitmap(struct d2d_brush *brush, struct d2d_device_con ...@@ -1281,7 +1281,7 @@ static void d2d_brush_bind_bitmap(struct d2d_brush *brush, struct d2d_device_con
sampler_desc.MaxLOD = 0.0f; sampler_desc.MaxLOD = 0.0f;
if (FAILED(hr = ID3D11Device1_CreateSamplerState(context->d3d_device, &sampler_desc, sampler_state))) if (FAILED(hr = ID3D11Device1_CreateSamplerState(context->d3d_device, &sampler_desc, sampler_state)))
ERR("Failed to create sampler state, hr %#x.\n", hr); ERR("Failed to create sampler state, hr %#lx.\n", hr);
} }
ID3D11DeviceContext_PSSetSamplers(d3d_context, brush_idx, 1, sampler_state); ID3D11DeviceContext_PSSetSamplers(d3d_context, brush_idx, 1, sampler_state);
......
...@@ -39,7 +39,7 @@ static HRESULT d2d_dc_render_target_present(IUnknown *outer_unknown) ...@@ -39,7 +39,7 @@ static HRESULT d2d_dc_render_target_present(IUnknown *outer_unknown)
if (FAILED(hr = IDXGISurface1_GetDC(render_target->dxgi_surface, FALSE, &src_hdc))) if (FAILED(hr = IDXGISurface1_GetDC(render_target->dxgi_surface, FALSE, &src_hdc)))
{ {
WARN("GetDC() failed, %#x.\n", hr); WARN("GetDC() failed, %#lx.\n", hr);
return S_OK; return S_OK;
} }
...@@ -81,7 +81,7 @@ static ULONG STDMETHODCALLTYPE d2d_dc_render_target_AddRef(ID2D1DCRenderTarget * ...@@ -81,7 +81,7 @@ static ULONG STDMETHODCALLTYPE d2d_dc_render_target_AddRef(ID2D1DCRenderTarget *
struct d2d_dc_render_target *render_target = impl_from_ID2D1DCRenderTarget(iface); struct d2d_dc_render_target *render_target = impl_from_ID2D1DCRenderTarget(iface);
ULONG refcount = InterlockedIncrement(&render_target->refcount); ULONG refcount = InterlockedIncrement(&render_target->refcount);
TRACE("%p increasing refcount to %u.\n", iface, refcount); TRACE("%p increasing refcount to %lu.\n", iface, refcount);
return refcount; return refcount;
} }
...@@ -91,7 +91,7 @@ static ULONG STDMETHODCALLTYPE d2d_dc_render_target_Release(ID2D1DCRenderTarget ...@@ -91,7 +91,7 @@ static ULONG STDMETHODCALLTYPE d2d_dc_render_target_Release(ID2D1DCRenderTarget
struct d2d_dc_render_target *render_target = impl_from_ID2D1DCRenderTarget(iface); struct d2d_dc_render_target *render_target = impl_from_ID2D1DCRenderTarget(iface);
ULONG refcount = InterlockedDecrement(&render_target->refcount); ULONG refcount = InterlockedDecrement(&render_target->refcount);
TRACE("%p decreasing refcount to %u.\n", iface, refcount); TRACE("%p decreasing refcount to %lu.\n", iface, refcount);
if (!refcount) if (!refcount)
{ {
...@@ -709,7 +709,7 @@ static HRESULT STDMETHODCALLTYPE d2d_dc_render_target_BindDC(ID2D1DCRenderTarget ...@@ -709,7 +709,7 @@ static HRESULT STDMETHODCALLTYPE d2d_dc_render_target_BindDC(ID2D1DCRenderTarget
if (FAILED(hr = ID2D1DeviceContext_CreateBitmap(context, bitmap_size, NULL, 0, &bitmap_desc, if (FAILED(hr = ID2D1DeviceContext_CreateBitmap(context, bitmap_size, NULL, 0, &bitmap_desc,
(ID2D1Bitmap1 **)&bitmap))) (ID2D1Bitmap1 **)&bitmap)))
{ {
WARN("Failed to create target bitmap, hr %#x.\n", hr); WARN("Failed to create target bitmap, hr %#lx.\n", hr);
ID2D1DeviceContext_Release(context); ID2D1DeviceContext_Release(context);
return hr; return hr;
} }
...@@ -826,7 +826,7 @@ HRESULT d2d_dc_render_target_init(struct d2d_dc_render_target *render_target, ID ...@@ -826,7 +826,7 @@ HRESULT d2d_dc_render_target_init(struct d2d_dc_render_target *render_target, ID
if (FAILED(hr = ID3D10Device1_QueryInterface(d3d_device, &IID_IDXGIDevice, (void **)&dxgi_device))) if (FAILED(hr = ID3D10Device1_QueryInterface(d3d_device, &IID_IDXGIDevice, (void **)&dxgi_device)))
{ {
WARN("Failed to get DXGI device interface, hr %#x.\n", hr); WARN("Failed to get DXGI device interface, hr %#lx.\n", hr);
return hr; return hr;
} }
...@@ -834,7 +834,7 @@ HRESULT d2d_dc_render_target_init(struct d2d_dc_render_target *render_target, ID ...@@ -834,7 +834,7 @@ HRESULT d2d_dc_render_target_init(struct d2d_dc_render_target *render_target, ID
IDXGIDevice_Release(dxgi_device); IDXGIDevice_Release(dxgi_device);
if (FAILED(hr)) if (FAILED(hr))
{ {
WARN("Failed to create D2D device, hr %#x.\n", hr); WARN("Failed to create D2D device, hr %#lx.\n", hr);
return hr; return hr;
} }
...@@ -843,14 +843,14 @@ HRESULT d2d_dc_render_target_init(struct d2d_dc_render_target *render_target, ID ...@@ -843,14 +843,14 @@ HRESULT d2d_dc_render_target_init(struct d2d_dc_render_target *render_target, ID
ID2D1Device_Release(device); ID2D1Device_Release(device);
if (FAILED(hr)) if (FAILED(hr))
{ {
WARN("Failed to create DXGI surface render target, hr %#x.\n", hr); WARN("Failed to create DXGI surface render target, hr %#lx.\n", hr);
return hr; return hr;
} }
if (FAILED(hr = IUnknown_QueryInterface(render_target->dxgi_inner, if (FAILED(hr = IUnknown_QueryInterface(render_target->dxgi_inner,
&IID_ID2D1RenderTarget, (void **)&render_target->dxgi_target))) &IID_ID2D1RenderTarget, (void **)&render_target->dxgi_target)))
{ {
WARN("Failed to retrieve ID2D1RenderTarget interface, hr %#x.\n", hr); WARN("Failed to retrieve ID2D1RenderTarget interface, hr %#lx.\n", hr);
IUnknown_Release(render_target->dxgi_inner); IUnknown_Release(render_target->dxgi_inner);
return hr; return hr;
} }
......
...@@ -242,7 +242,7 @@ static ULONG STDMETHODCALLTYPE d2d_device_context_inner_AddRef(IUnknown *iface) ...@@ -242,7 +242,7 @@ static ULONG STDMETHODCALLTYPE d2d_device_context_inner_AddRef(IUnknown *iface)
struct d2d_device_context *context = impl_from_IUnknown(iface); struct d2d_device_context *context = impl_from_IUnknown(iface);
ULONG refcount = InterlockedIncrement(&context->refcount); ULONG refcount = InterlockedIncrement(&context->refcount);
TRACE("%p increasing refcount to %u.\n", iface, refcount); TRACE("%p increasing refcount to %lu.\n", iface, refcount);
return refcount; return refcount;
} }
...@@ -252,7 +252,7 @@ static ULONG STDMETHODCALLTYPE d2d_device_context_inner_Release(IUnknown *iface) ...@@ -252,7 +252,7 @@ static ULONG STDMETHODCALLTYPE d2d_device_context_inner_Release(IUnknown *iface)
struct d2d_device_context *context = impl_from_IUnknown(iface); struct d2d_device_context *context = impl_from_IUnknown(iface);
ULONG refcount = InterlockedDecrement(&context->refcount); ULONG refcount = InterlockedDecrement(&context->refcount);
TRACE("%p decreasing refcount to %u.\n", iface, refcount); TRACE("%p decreasing refcount to %lu.\n", iface, refcount);
if (!refcount) if (!refcount)
{ {
...@@ -519,7 +519,7 @@ static HRESULT STDMETHODCALLTYPE d2d_device_context_CreateCompatibleRenderTarget ...@@ -519,7 +519,7 @@ static HRESULT STDMETHODCALLTYPE d2d_device_context_CreateCompatibleRenderTarget
if (FAILED(hr = d2d_bitmap_render_target_init(object, render_target, size, pixel_size, if (FAILED(hr = d2d_bitmap_render_target_init(object, render_target, size, pixel_size,
format, options))) format, options)))
{ {
WARN("Failed to initialize render target, hr %#x.\n", hr); WARN("Failed to initialise render target, hr %#lx.\n", hr);
heap_free(object); heap_free(object);
return hr; return hr;
} }
...@@ -572,13 +572,13 @@ static void STDMETHODCALLTYPE d2d_device_context_DrawLine(ID2D1DeviceContext *if ...@@ -572,13 +572,13 @@ static void STDMETHODCALLTYPE d2d_device_context_DrawLine(ID2D1DeviceContext *if
if (FAILED(hr = ID2D1Factory_CreatePathGeometry(render_target->factory, &geometry))) if (FAILED(hr = ID2D1Factory_CreatePathGeometry(render_target->factory, &geometry)))
{ {
WARN("Failed to create path geometry, %#x.\n", hr); WARN("Failed to create path geometry, hr %#lx.\n", hr);
return; return;
} }
if (FAILED(hr = ID2D1PathGeometry_Open(geometry, &sink))) if (FAILED(hr = ID2D1PathGeometry_Open(geometry, &sink)))
{ {
WARN("Open() failed, %#x.\n", hr); WARN("Failed to open geometry sink, hr %#lx.\n", hr);
ID2D1PathGeometry_Release(geometry); ID2D1PathGeometry_Release(geometry);
return; return;
} }
...@@ -587,7 +587,7 @@ static void STDMETHODCALLTYPE d2d_device_context_DrawLine(ID2D1DeviceContext *if ...@@ -587,7 +587,7 @@ static void STDMETHODCALLTYPE d2d_device_context_DrawLine(ID2D1DeviceContext *if
ID2D1GeometrySink_AddLine(sink, p1); ID2D1GeometrySink_AddLine(sink, p1);
ID2D1GeometrySink_EndFigure(sink, D2D1_FIGURE_END_OPEN); ID2D1GeometrySink_EndFigure(sink, D2D1_FIGURE_END_OPEN);
if (FAILED(hr = ID2D1GeometrySink_Close(sink))) if (FAILED(hr = ID2D1GeometrySink_Close(sink)))
WARN("Close() failed, %#x.\n", hr); WARN("Failed to close geometry sink, hr %#lx.\n", hr);
ID2D1GeometrySink_Release(sink); ID2D1GeometrySink_Release(sink);
ID2D1DeviceContext_DrawGeometry(iface, (ID2D1Geometry *)geometry, brush, stroke_width, stroke_style); ID2D1DeviceContext_DrawGeometry(iface, (ID2D1Geometry *)geometry, brush, stroke_width, stroke_style);
...@@ -606,7 +606,7 @@ static void STDMETHODCALLTYPE d2d_device_context_DrawRectangle(ID2D1DeviceContex ...@@ -606,7 +606,7 @@ static void STDMETHODCALLTYPE d2d_device_context_DrawRectangle(ID2D1DeviceContex
if (FAILED(hr = ID2D1Factory_CreateRectangleGeometry(render_target->factory, rect, &geometry))) if (FAILED(hr = ID2D1Factory_CreateRectangleGeometry(render_target->factory, rect, &geometry)))
{ {
ERR("Failed to create geometry, hr %#x.\n", hr); ERR("Failed to create geometry, hr %#lx.\n", hr);
return; return;
} }
...@@ -625,7 +625,7 @@ static void STDMETHODCALLTYPE d2d_device_context_FillRectangle(ID2D1DeviceContex ...@@ -625,7 +625,7 @@ static void STDMETHODCALLTYPE d2d_device_context_FillRectangle(ID2D1DeviceContex
if (FAILED(hr = ID2D1Factory_CreateRectangleGeometry(render_target->factory, rect, &geometry))) if (FAILED(hr = ID2D1Factory_CreateRectangleGeometry(render_target->factory, rect, &geometry)))
{ {
ERR("Failed to create geometry, hr %#x.\n", hr); ERR("Failed to create geometry, hr %#lx.\n", hr);
return; return;
} }
...@@ -645,7 +645,7 @@ static void STDMETHODCALLTYPE d2d_device_context_DrawRoundedRectangle(ID2D1Devic ...@@ -645,7 +645,7 @@ static void STDMETHODCALLTYPE d2d_device_context_DrawRoundedRectangle(ID2D1Devic
if (FAILED(hr = ID2D1Factory_CreateRoundedRectangleGeometry(render_target->factory, rect, &geometry))) if (FAILED(hr = ID2D1Factory_CreateRoundedRectangleGeometry(render_target->factory, rect, &geometry)))
{ {
ERR("Failed to create geometry, hr %#x.\n", hr); ERR("Failed to create geometry, hr %#lx.\n", hr);
return; return;
} }
...@@ -664,7 +664,7 @@ static void STDMETHODCALLTYPE d2d_device_context_FillRoundedRectangle(ID2D1Devic ...@@ -664,7 +664,7 @@ static void STDMETHODCALLTYPE d2d_device_context_FillRoundedRectangle(ID2D1Devic
if (FAILED(hr = ID2D1Factory_CreateRoundedRectangleGeometry(render_target->factory, rect, &geometry))) if (FAILED(hr = ID2D1Factory_CreateRoundedRectangleGeometry(render_target->factory, rect, &geometry)))
{ {
ERR("Failed to create geometry, hr %#x.\n", hr); ERR("Failed to create geometry, hr %#lx.\n", hr);
return; return;
} }
...@@ -684,7 +684,7 @@ static void STDMETHODCALLTYPE d2d_device_context_DrawEllipse(ID2D1DeviceContext ...@@ -684,7 +684,7 @@ static void STDMETHODCALLTYPE d2d_device_context_DrawEllipse(ID2D1DeviceContext
if (FAILED(hr = ID2D1Factory_CreateEllipseGeometry(render_target->factory, ellipse, &geometry))) if (FAILED(hr = ID2D1Factory_CreateEllipseGeometry(render_target->factory, ellipse, &geometry)))
{ {
ERR("Failed to create geometry, hr %#x.\n", hr); ERR("Failed to create geometry, hr %#lx.\n", hr);
return; return;
} }
...@@ -703,7 +703,7 @@ static void STDMETHODCALLTYPE d2d_device_context_FillEllipse(ID2D1DeviceContext ...@@ -703,7 +703,7 @@ static void STDMETHODCALLTYPE d2d_device_context_FillEllipse(ID2D1DeviceContext
if (FAILED(hr = ID2D1Factory_CreateEllipseGeometry(render_target->factory, ellipse, &geometry))) if (FAILED(hr = ID2D1Factory_CreateEllipseGeometry(render_target->factory, ellipse, &geometry)))
{ {
ERR("Failed to create geometry, hr %#x.\n", hr); ERR("Failed to create geometry, hr %#lx.\n", hr);
return; return;
} }
...@@ -724,7 +724,7 @@ static HRESULT d2d_device_context_update_ps_cb(struct d2d_device_context *contex ...@@ -724,7 +724,7 @@ static HRESULT d2d_device_context_update_ps_cb(struct d2d_device_context *contex
if (FAILED(hr = ID3D11DeviceContext_Map(d3d_context, (ID3D11Resource *)context->ps_cb, if (FAILED(hr = ID3D11DeviceContext_Map(d3d_context, (ID3D11Resource *)context->ps_cb,
0, D3D11_MAP_WRITE_DISCARD, 0, &map_desc))) 0, D3D11_MAP_WRITE_DISCARD, 0, &map_desc)))
{ {
WARN("Failed to map constant buffer, hr %#x.\n", hr); WARN("Failed to map constant buffer, hr %#lx.\n", hr);
ID3D11DeviceContext_Release(d3d_context); ID3D11DeviceContext_Release(d3d_context);
return hr; return hr;
} }
...@@ -760,7 +760,7 @@ static HRESULT d2d_device_context_update_vs_cb(struct d2d_device_context *contex ...@@ -760,7 +760,7 @@ static HRESULT d2d_device_context_update_vs_cb(struct d2d_device_context *contex
if (FAILED(hr = ID3D11DeviceContext_Map(d3d_context, (ID3D11Resource *)context->vs_cb, if (FAILED(hr = ID3D11DeviceContext_Map(d3d_context, (ID3D11Resource *)context->vs_cb,
0, D3D11_MAP_WRITE_DISCARD, 0, &map_desc))) 0, D3D11_MAP_WRITE_DISCARD, 0, &map_desc)))
{ {
WARN("Failed to map constant buffer, hr %#x.\n", hr); WARN("Failed to map constant buffer, hr %#lx.\n", hr);
ID3D11DeviceContext_Release(d3d_context); ID3D11DeviceContext_Release(d3d_context);
return hr; return hr;
} }
...@@ -805,13 +805,13 @@ static void d2d_device_context_draw_geometry(struct d2d_device_context *render_t ...@@ -805,13 +805,13 @@ static void d2d_device_context_draw_geometry(struct d2d_device_context *render_t
if (FAILED(hr = d2d_device_context_update_vs_cb(render_target, &geometry->transform, stroke_width))) if (FAILED(hr = d2d_device_context_update_vs_cb(render_target, &geometry->transform, stroke_width)))
{ {
WARN("Failed to update vs constant buffer, hr %#x.\n", hr); WARN("Failed to update vs constant buffer, hr %#lx.\n", hr);
return; return;
} }
if (FAILED(hr = d2d_device_context_update_ps_cb(render_target, brush, NULL, TRUE, FALSE))) if (FAILED(hr = d2d_device_context_update_ps_cb(render_target, brush, NULL, TRUE, FALSE)))
{ {
WARN("Failed to update ps constant buffer, hr %#x.\n", hr); WARN("Failed to update ps constant buffer, hr %#lx.\n", hr);
return; return;
} }
...@@ -830,7 +830,7 @@ static void d2d_device_context_draw_geometry(struct d2d_device_context *render_t ...@@ -830,7 +830,7 @@ static void d2d_device_context_draw_geometry(struct d2d_device_context *render_t
if (FAILED(hr = ID3D11Device1_CreateBuffer(render_target->d3d_device, &buffer_desc, &buffer_data, &ib))) if (FAILED(hr = ID3D11Device1_CreateBuffer(render_target->d3d_device, &buffer_desc, &buffer_data, &ib)))
{ {
WARN("Failed to create index buffer, hr %#x.\n", hr); WARN("Failed to create index buffer, hr %#lx.\n", hr);
return; return;
} }
...@@ -840,7 +840,7 @@ static void d2d_device_context_draw_geometry(struct d2d_device_context *render_t ...@@ -840,7 +840,7 @@ static void d2d_device_context_draw_geometry(struct d2d_device_context *render_t
if (FAILED(hr = ID3D11Device1_CreateBuffer(render_target->d3d_device, &buffer_desc, &buffer_data, &vb))) if (FAILED(hr = ID3D11Device1_CreateBuffer(render_target->d3d_device, &buffer_desc, &buffer_data, &vb)))
{ {
ERR("Failed to create vertex buffer, hr %#x.\n", hr); ERR("Failed to create vertex buffer, hr %#lx.\n", hr);
ID3D11Buffer_Release(ib); ID3D11Buffer_Release(ib);
return; return;
} }
...@@ -860,7 +860,7 @@ static void d2d_device_context_draw_geometry(struct d2d_device_context *render_t ...@@ -860,7 +860,7 @@ static void d2d_device_context_draw_geometry(struct d2d_device_context *render_t
if (FAILED(hr = ID3D11Device1_CreateBuffer(render_target->d3d_device, &buffer_desc, &buffer_data, &ib))) if (FAILED(hr = ID3D11Device1_CreateBuffer(render_target->d3d_device, &buffer_desc, &buffer_data, &ib)))
{ {
WARN("Failed to create beziers index buffer, hr %#x.\n", hr); WARN("Failed to create curves index buffer, hr %#lx.\n", hr);
return; return;
} }
...@@ -870,7 +870,7 @@ static void d2d_device_context_draw_geometry(struct d2d_device_context *render_t ...@@ -870,7 +870,7 @@ static void d2d_device_context_draw_geometry(struct d2d_device_context *render_t
if (FAILED(hr = ID3D11Device1_CreateBuffer(render_target->d3d_device, &buffer_desc, &buffer_data, &vb))) if (FAILED(hr = ID3D11Device1_CreateBuffer(render_target->d3d_device, &buffer_desc, &buffer_data, &vb)))
{ {
ERR("Failed to create beziers vertex buffer, hr %#x.\n", hr); ERR("Failed to create curves vertex buffer, hr %#lx.\n", hr);
ID3D11Buffer_Release(ib); ID3D11Buffer_Release(ib);
return; return;
} }
...@@ -891,7 +891,7 @@ static void d2d_device_context_draw_geometry(struct d2d_device_context *render_t ...@@ -891,7 +891,7 @@ static void d2d_device_context_draw_geometry(struct d2d_device_context *render_t
if (FAILED(hr = ID3D11Device1_CreateBuffer(render_target->d3d_device, &buffer_desc, &buffer_data, &ib))) if (FAILED(hr = ID3D11Device1_CreateBuffer(render_target->d3d_device, &buffer_desc, &buffer_data, &ib)))
{ {
WARN("Failed to create arcs index buffer, hr %#x.\n", hr); WARN("Failed to create arcs index buffer, hr %#lx.\n", hr);
return; return;
} }
...@@ -901,7 +901,7 @@ static void d2d_device_context_draw_geometry(struct d2d_device_context *render_t ...@@ -901,7 +901,7 @@ static void d2d_device_context_draw_geometry(struct d2d_device_context *render_t
if (FAILED(hr = ID3D11Device1_CreateBuffer(render_target->d3d_device, &buffer_desc, &buffer_data, &vb))) if (FAILED(hr = ID3D11Device1_CreateBuffer(render_target->d3d_device, &buffer_desc, &buffer_data, &vb)))
{ {
ERR("Failed to create arcs vertex buffer, hr %#x.\n", hr); ERR("Failed to create arcs vertex buffer, hr %#lx.\n", hr);
ID3D11Buffer_Release(ib); ID3D11Buffer_Release(ib);
return; return;
} }
...@@ -949,13 +949,13 @@ static void d2d_device_context_fill_geometry(struct d2d_device_context *render_t ...@@ -949,13 +949,13 @@ static void d2d_device_context_fill_geometry(struct d2d_device_context *render_t
if (FAILED(hr = d2d_device_context_update_vs_cb(render_target, &geometry->transform, 0.0f))) if (FAILED(hr = d2d_device_context_update_vs_cb(render_target, &geometry->transform, 0.0f)))
{ {
WARN("Failed to update vs constant buffer, hr %#x.\n", hr); WARN("Failed to update vs constant buffer, hr %#lx.\n", hr);
return; return;
} }
if (FAILED(hr = d2d_device_context_update_ps_cb(render_target, brush, opacity_brush, FALSE, FALSE))) if (FAILED(hr = d2d_device_context_update_ps_cb(render_target, brush, opacity_brush, FALSE, FALSE)))
{ {
WARN("Failed to update ps constant buffer, hr %#x.\n", hr); WARN("Failed to update ps constant buffer, hr %#lx.\n", hr);
return; return;
} }
...@@ -967,7 +967,7 @@ static void d2d_device_context_fill_geometry(struct d2d_device_context *render_t ...@@ -967,7 +967,7 @@ static void d2d_device_context_fill_geometry(struct d2d_device_context *render_t
if (FAILED(hr = ID3D11Device1_CreateBuffer(render_target->d3d_device, &buffer_desc, &buffer_data, &ib))) if (FAILED(hr = ID3D11Device1_CreateBuffer(render_target->d3d_device, &buffer_desc, &buffer_data, &ib)))
{ {
WARN("Failed to create index buffer, hr %#x.\n", hr); WARN("Failed to create index buffer, hr %#lx.\n", hr);
return; return;
} }
...@@ -977,7 +977,7 @@ static void d2d_device_context_fill_geometry(struct d2d_device_context *render_t ...@@ -977,7 +977,7 @@ static void d2d_device_context_fill_geometry(struct d2d_device_context *render_t
if (FAILED(hr = ID3D11Device1_CreateBuffer(render_target->d3d_device, &buffer_desc, &buffer_data, &vb))) if (FAILED(hr = ID3D11Device1_CreateBuffer(render_target->d3d_device, &buffer_desc, &buffer_data, &vb)))
{ {
ERR("Failed to create vertex buffer, hr %#x.\n", hr); ERR("Failed to create vertex buffer, hr %#lx.\n", hr);
ID3D11Buffer_Release(ib); ID3D11Buffer_Release(ib);
return; return;
} }
...@@ -997,7 +997,7 @@ static void d2d_device_context_fill_geometry(struct d2d_device_context *render_t ...@@ -997,7 +997,7 @@ static void d2d_device_context_fill_geometry(struct d2d_device_context *render_t
if (FAILED(hr = ID3D11Device1_CreateBuffer(render_target->d3d_device, &buffer_desc, &buffer_data, &vb))) if (FAILED(hr = ID3D11Device1_CreateBuffer(render_target->d3d_device, &buffer_desc, &buffer_data, &vb)))
{ {
ERR("Failed to create beziers vertex buffer, hr %#x.\n", hr); ERR("Failed to create curves vertex buffer, hr %#lx.\n", hr);
return; return;
} }
...@@ -1015,7 +1015,7 @@ static void d2d_device_context_fill_geometry(struct d2d_device_context *render_t ...@@ -1015,7 +1015,7 @@ static void d2d_device_context_fill_geometry(struct d2d_device_context *render_t
if (FAILED(hr = ID3D11Device1_CreateBuffer(render_target->d3d_device, &buffer_desc, &buffer_data, &vb))) if (FAILED(hr = ID3D11Device1_CreateBuffer(render_target->d3d_device, &buffer_desc, &buffer_data, &vb)))
{ {
ERR("Failed to create arc vertex buffer, hr %#x.\n", hr); ERR("Failed to create arc vertex buffer, hr %#lx.\n", hr);
return; return;
} }
...@@ -1123,7 +1123,7 @@ static void d2d_device_context_draw_bitmap(struct d2d_device_context *context, I ...@@ -1123,7 +1123,7 @@ static void d2d_device_context_draw_bitmap(struct d2d_device_context *context, I
if (FAILED(hr = d2d_bitmap_brush_create(context->factory, bitmap, &bitmap_brush_desc, &brush_desc, &brush))) if (FAILED(hr = d2d_bitmap_brush_create(context->factory, bitmap, &bitmap_brush_desc, &brush_desc, &brush)))
{ {
ERR("Failed to create bitmap brush, hr %#x.\n", hr); ERR("Failed to create bitmap brush, hr %#lx.\n", hr);
return; return;
} }
...@@ -1170,7 +1170,7 @@ static void STDMETHODCALLTYPE d2d_device_context_DrawText(ID2D1DeviceContext *if ...@@ -1170,7 +1170,7 @@ static void STDMETHODCALLTYPE d2d_device_context_DrawText(ID2D1DeviceContext *if
if (FAILED(hr = DWriteCreateFactory(DWRITE_FACTORY_TYPE_SHARED, if (FAILED(hr = DWriteCreateFactory(DWRITE_FACTORY_TYPE_SHARED,
&IID_IDWriteFactory, (IUnknown **)&dwrite_factory))) &IID_IDWriteFactory, (IUnknown **)&dwrite_factory)))
{ {
ERR("Failed to create dwrite factory, hr %#x.\n", hr); ERR("Failed to create dwrite factory, hr %#lx.\n", hr);
return; return;
} }
...@@ -1186,7 +1186,7 @@ static void STDMETHODCALLTYPE d2d_device_context_DrawText(ID2D1DeviceContext *if ...@@ -1186,7 +1186,7 @@ static void STDMETHODCALLTYPE d2d_device_context_DrawText(ID2D1DeviceContext *if
IDWriteFactory_Release(dwrite_factory); IDWriteFactory_Release(dwrite_factory);
if (FAILED(hr)) if (FAILED(hr))
{ {
ERR("Failed to create text layout, hr %#x.\n", hr); ERR("Failed to create text layout, hr %#lx.\n", hr);
return; return;
} }
...@@ -1210,7 +1210,7 @@ static void STDMETHODCALLTYPE d2d_device_context_DrawTextLayout(ID2D1DeviceConte ...@@ -1210,7 +1210,7 @@ static void STDMETHODCALLTYPE d2d_device_context_DrawTextLayout(ID2D1DeviceConte
if (FAILED(hr = IDWriteTextLayout_Draw(layout, if (FAILED(hr = IDWriteTextLayout_Draw(layout,
&ctx, &render_target->IDWriteTextRenderer_iface, origin.x, origin.y))) &ctx, &render_target->IDWriteTextRenderer_iface, origin.x, origin.y)))
FIXME("Failed to draw text layout, hr %#x.\n", hr); FIXME("Failed to draw text layout, hr %#lx.\n", hr);
} }
static D2D1_ANTIALIAS_MODE d2d_device_context_set_aa_mode_from_text_aa_mode(struct d2d_device_context *rt) static D2D1_ANTIALIAS_MODE d2d_device_context_set_aa_mode_from_text_aa_mode(struct d2d_device_context *rt)
...@@ -1232,13 +1232,13 @@ static void d2d_device_context_draw_glyph_run_outline(struct d2d_device_context ...@@ -1232,13 +1232,13 @@ static void d2d_device_context_draw_glyph_run_outline(struct d2d_device_context
if (FAILED(hr = ID2D1Factory_CreatePathGeometry(render_target->factory, &geometry))) if (FAILED(hr = ID2D1Factory_CreatePathGeometry(render_target->factory, &geometry)))
{ {
ERR("Failed to create geometry, hr %#x.\n", hr); ERR("Failed to create geometry, hr %#lx.\n", hr);
return; return;
} }
if (FAILED(hr = ID2D1PathGeometry_Open(geometry, &sink))) if (FAILED(hr = ID2D1PathGeometry_Open(geometry, &sink)))
{ {
ERR("Failed to open geometry sink, hr %#x.\n", hr); ERR("Failed to open geometry sink, hr %#lx.\n", hr);
ID2D1PathGeometry_Release(geometry); ID2D1PathGeometry_Release(geometry);
return; return;
} }
...@@ -1247,14 +1247,14 @@ static void d2d_device_context_draw_glyph_run_outline(struct d2d_device_context ...@@ -1247,14 +1247,14 @@ static void d2d_device_context_draw_glyph_run_outline(struct d2d_device_context
glyph_run->glyphIndices, glyph_run->glyphAdvances, glyph_run->glyphOffsets, glyph_run->glyphCount, glyph_run->glyphIndices, glyph_run->glyphAdvances, glyph_run->glyphOffsets, glyph_run->glyphCount,
glyph_run->isSideways, glyph_run->bidiLevel & 1, (IDWriteGeometrySink *)sink))) glyph_run->isSideways, glyph_run->bidiLevel & 1, (IDWriteGeometrySink *)sink)))
{ {
ERR("Failed to get glyph run outline, hr %#x.\n", hr); ERR("Failed to get glyph run outline, hr %#lx.\n", hr);
ID2D1GeometrySink_Release(sink); ID2D1GeometrySink_Release(sink);
ID2D1PathGeometry_Release(geometry); ID2D1PathGeometry_Release(geometry);
return; return;
} }
if (FAILED(hr = ID2D1GeometrySink_Close(sink))) if (FAILED(hr = ID2D1GeometrySink_Close(sink)))
ERR("Failed to close geometry sink, hr %#x.\n", hr); ERR("Failed to close geometry sink, hr %#lx.\n", hr);
ID2D1GeometrySink_Release(sink); ID2D1GeometrySink_Release(sink);
transform = &render_target->drawing_state.transform; transform = &render_target->drawing_state.transform;
...@@ -1295,7 +1295,7 @@ static void d2d_device_context_draw_glyph_run_bitmap(struct d2d_device_context * ...@@ -1295,7 +1295,7 @@ static void d2d_device_context_draw_glyph_run_bitmap(struct d2d_device_context *
if (FAILED(hr = DWriteCreateFactory(DWRITE_FACTORY_TYPE_SHARED, if (FAILED(hr = DWriteCreateFactory(DWRITE_FACTORY_TYPE_SHARED,
&IID_IDWriteFactory2, (IUnknown **)&dwrite_factory))) &IID_IDWriteFactory2, (IUnknown **)&dwrite_factory)))
{ {
ERR("Failed to create dwrite factory, hr %#x.\n", hr); ERR("Failed to create dwrite factory, hr %#lx.\n", hr);
return; return;
} }
...@@ -1317,7 +1317,7 @@ static void d2d_device_context_draw_glyph_run_bitmap(struct d2d_device_context * ...@@ -1317,7 +1317,7 @@ static void d2d_device_context_draw_glyph_run_bitmap(struct d2d_device_context *
IDWriteFactory2_Release(dwrite_factory); IDWriteFactory2_Release(dwrite_factory);
if (FAILED(hr)) if (FAILED(hr))
{ {
ERR("Failed to create glyph run analysis, hr %#x.\n", hr); ERR("Failed to create glyph run analysis, hr %#lx.\n", hr);
return; return;
} }
...@@ -1328,7 +1328,7 @@ static void d2d_device_context_draw_glyph_run_bitmap(struct d2d_device_context * ...@@ -1328,7 +1328,7 @@ static void d2d_device_context_draw_glyph_run_bitmap(struct d2d_device_context *
if (FAILED(hr = IDWriteGlyphRunAnalysis_GetAlphaTextureBounds(analysis, texture_type, &bounds))) if (FAILED(hr = IDWriteGlyphRunAnalysis_GetAlphaTextureBounds(analysis, texture_type, &bounds)))
{ {
ERR("Failed to get alpha texture bounds, hr %#x.\n", hr); ERR("Failed to get alpha texture bounds, hr %#lx.\n", hr);
goto done; goto done;
} }
...@@ -1351,7 +1351,7 @@ static void d2d_device_context_draw_glyph_run_bitmap(struct d2d_device_context * ...@@ -1351,7 +1351,7 @@ static void d2d_device_context_draw_glyph_run_bitmap(struct d2d_device_context *
if (FAILED(hr = IDWriteGlyphRunAnalysis_CreateAlphaTexture(analysis, if (FAILED(hr = IDWriteGlyphRunAnalysis_CreateAlphaTexture(analysis,
texture_type, &bounds, opacity_values, opacity_values_size))) texture_type, &bounds, opacity_values, opacity_values_size)))
{ {
ERR("Failed to create alpha texture, hr %#x.\n", hr); ERR("Failed to create alpha texture, hr %#lx.\n", hr);
goto done; goto done;
} }
...@@ -1364,7 +1364,7 @@ static void d2d_device_context_draw_glyph_run_bitmap(struct d2d_device_context * ...@@ -1364,7 +1364,7 @@ static void d2d_device_context_draw_glyph_run_bitmap(struct d2d_device_context *
if (FAILED(hr = d2d_device_context_CreateBitmap(&render_target->ID2D1DeviceContext_iface, if (FAILED(hr = d2d_device_context_CreateBitmap(&render_target->ID2D1DeviceContext_iface,
bitmap_size, opacity_values, bitmap_size.width, &bitmap_desc, &opacity_bitmap))) bitmap_size, opacity_values, bitmap_size.width, &bitmap_desc, &opacity_bitmap)))
{ {
ERR("Failed to create opacity bitmap, hr %#x.\n", hr); ERR("Failed to create opacity bitmap, hr %#lx.\n", hr);
goto done; goto done;
} }
...@@ -1381,13 +1381,13 @@ static void d2d_device_context_draw_glyph_run_bitmap(struct d2d_device_context * ...@@ -1381,13 +1381,13 @@ static void d2d_device_context_draw_glyph_run_bitmap(struct d2d_device_context *
if (FAILED(hr = d2d_device_context_CreateBitmapBrush(&render_target->ID2D1DeviceContext_iface, if (FAILED(hr = d2d_device_context_CreateBitmapBrush(&render_target->ID2D1DeviceContext_iface,
opacity_bitmap, NULL, &brush_desc, &opacity_brush))) opacity_bitmap, NULL, &brush_desc, &opacity_brush)))
{ {
ERR("Failed to create opacity bitmap brush, hr %#x.\n", hr); ERR("Failed to create opacity bitmap brush, hr %#lx.\n", hr);
goto done; goto done;
} }
if (FAILED(hr = ID2D1Factory_CreateRectangleGeometry(render_target->factory, &run_rect, &geometry))) if (FAILED(hr = ID2D1Factory_CreateRectangleGeometry(render_target->factory, &run_rect, &geometry)))
{ {
ERR("Failed to create geometry, hr %#x.\n", hr); ERR("Failed to create geometry, hr %#lx.\n", hr);
goto done; goto done;
} }
...@@ -1634,7 +1634,7 @@ static void STDMETHODCALLTYPE d2d_device_context_Clear(ID2D1DeviceContext *iface ...@@ -1634,7 +1634,7 @@ static void STDMETHODCALLTYPE d2d_device_context_Clear(ID2D1DeviceContext *iface
if (FAILED(hr = ID3D11DeviceContext_Map(d3d_context, (ID3D11Resource *)render_target->vs_cb, if (FAILED(hr = ID3D11DeviceContext_Map(d3d_context, (ID3D11Resource *)render_target->vs_cb,
0, D3D11_MAP_WRITE_DISCARD, 0, &map_desc))) 0, D3D11_MAP_WRITE_DISCARD, 0, &map_desc)))
{ {
WARN("Failed to map vs constant buffer, hr %#x.\n", hr); WARN("Failed to map vs constant buffer, hr %#lx.\n", hr);
ID3D11DeviceContext_Release(d3d_context); ID3D11DeviceContext_Release(d3d_context);
return; return;
} }
...@@ -1662,7 +1662,7 @@ static void STDMETHODCALLTYPE d2d_device_context_Clear(ID2D1DeviceContext *iface ...@@ -1662,7 +1662,7 @@ static void STDMETHODCALLTYPE d2d_device_context_Clear(ID2D1DeviceContext *iface
if (FAILED(hr = ID3D11DeviceContext_Map(d3d_context, (ID3D11Resource *)render_target->ps_cb, if (FAILED(hr = ID3D11DeviceContext_Map(d3d_context, (ID3D11Resource *)render_target->ps_cb,
0, D3D11_MAP_WRITE_DISCARD, 0, &map_desc))) 0, D3D11_MAP_WRITE_DISCARD, 0, &map_desc)))
{ {
WARN("Failed to map ps constant buffer, hr %#x.\n", hr); WARN("Failed to map ps constant buffer, hr %#lx.\n", hr);
ID3D11DeviceContext_Release(d3d_context); ID3D11DeviceContext_Release(d3d_context);
return; return;
} }
...@@ -1869,7 +1869,7 @@ static HRESULT STDMETHODCALLTYPE d2d_device_context_CreateBitmapFromDxgiSurface( ...@@ -1869,7 +1869,7 @@ static HRESULT STDMETHODCALLTYPE d2d_device_context_CreateBitmapFromDxgiSurface(
if (FAILED(hr = IDXGISurface_GetDesc(surface, &surface_desc))) if (FAILED(hr = IDXGISurface_GetDesc(surface, &surface_desc)))
{ {
WARN("Failed to get surface desc, hr %#x.\n", hr); WARN("Failed to get surface desc, hr %#lx.\n", hr);
return hr; return hr;
} }
...@@ -1900,7 +1900,7 @@ static HRESULT STDMETHODCALLTYPE d2d_device_context_CreateEffect(ID2D1DeviceCont ...@@ -1900,7 +1900,7 @@ static HRESULT STDMETHODCALLTYPE d2d_device_context_CreateEffect(ID2D1DeviceCont
if (FAILED(hr = d2d_effect_init(object, context->factory, effect_id))) if (FAILED(hr = d2d_effect_init(object, context->factory, effect_id)))
{ {
WARN("Failed to initialize effect, hr %#x.\n", hr); WARN("Failed to initialise effect, hr %#lx.\n", hr);
heap_free(object); heap_free(object);
return hr; return hr;
} }
...@@ -2081,7 +2081,7 @@ static void STDMETHODCALLTYPE d2d_device_context_SetTarget(ID2D1DeviceContext *i ...@@ -2081,7 +2081,7 @@ static void STDMETHODCALLTYPE d2d_device_context_SetTarget(ID2D1DeviceContext *i
blend_desc.RenderTarget[0].BlendOpAlpha = D3D11_BLEND_OP_ADD; blend_desc.RenderTarget[0].BlendOpAlpha = D3D11_BLEND_OP_ADD;
blend_desc.RenderTarget[0].RenderTargetWriteMask = D3D11_COLOR_WRITE_ENABLE_ALL; blend_desc.RenderTarget[0].RenderTargetWriteMask = D3D11_COLOR_WRITE_ENABLE_ALL;
if (FAILED(hr = ID3D11Device1_CreateBlendState(context->d3d_device, &blend_desc, &context->bs))) if (FAILED(hr = ID3D11Device1_CreateBlendState(context->d3d_device, &blend_desc, &context->bs)))
WARN("Failed to create blend state, hr %#x.\n", hr); WARN("Failed to create blend state, hr %#lx.\n", hr);
} }
static void STDMETHODCALLTYPE d2d_device_context_GetTarget(ID2D1DeviceContext *iface, ID2D1Image **target) static void STDMETHODCALLTYPE d2d_device_context_GetTarget(ID2D1DeviceContext *iface, ID2D1Image **target)
...@@ -2207,7 +2207,7 @@ static void STDMETHODCALLTYPE d2d_device_context_ID2D1DeviceContext_DrawGlyphRun ...@@ -2207,7 +2207,7 @@ static void STDMETHODCALLTYPE d2d_device_context_ID2D1DeviceContext_DrawGlyphRun
max(context->desc.dpiX, context->desc.dpiY) / 96.0f, max(context->desc.dpiX, context->desc.dpiY) / 96.0f,
measuring_mode, rendering_params, &rendering_mode))) measuring_mode, rendering_params, &rendering_mode)))
{ {
ERR("Failed to get recommended rendering mode, hr %#x.\n", hr); ERR("Failed to get recommended rendering mode, hr %#lx.\n", hr);
rendering_mode = DWRITE_RENDERING_MODE_OUTLINE; rendering_mode = DWRITE_RENDERING_MODE_OUTLINE;
} }
} }
...@@ -2533,7 +2533,7 @@ static HRESULT STDMETHODCALLTYPE d2d_text_renderer_DrawGlyphRun(IDWriteTextRende ...@@ -2533,7 +2533,7 @@ static HRESULT STDMETHODCALLTYPE d2d_text_renderer_DrawGlyphRun(IDWriteTextRende
if (FAILED(hr = DWriteCreateFactory(DWRITE_FACTORY_TYPE_SHARED, &IID_IDWriteFactory2, if (FAILED(hr = DWriteCreateFactory(DWRITE_FACTORY_TYPE_SHARED, &IID_IDWriteFactory2,
(IUnknown **)&dwrite_factory))) (IUnknown **)&dwrite_factory)))
{ {
ERR("Failed to create dwrite factory, hr %#x.\n", hr); ERR("Failed to create dwrite factory, hr %#lx.\n", hr);
ID2D1Brush_Release(brush); ID2D1Brush_Release(brush);
return hr; return hr;
} }
...@@ -2543,7 +2543,7 @@ static HRESULT STDMETHODCALLTYPE d2d_text_renderer_DrawGlyphRun(IDWriteTextRende ...@@ -2543,7 +2543,7 @@ static HRESULT STDMETHODCALLTYPE d2d_text_renderer_DrawGlyphRun(IDWriteTextRende
IDWriteFactory2_Release(dwrite_factory); IDWriteFactory2_Release(dwrite_factory);
if (FAILED(hr)) if (FAILED(hr))
{ {
ERR("Failed to create color glyph run enumerator, hr %#x.\n", hr); ERR("Failed to create colour glyph run enumerator, hr %#lx.\n", hr);
ID2D1Brush_Release(brush); ID2D1Brush_Release(brush);
return hr; return hr;
} }
...@@ -2557,7 +2557,7 @@ static HRESULT STDMETHODCALLTYPE d2d_text_renderer_DrawGlyphRun(IDWriteTextRende ...@@ -2557,7 +2557,7 @@ static HRESULT STDMETHODCALLTYPE d2d_text_renderer_DrawGlyphRun(IDWriteTextRende
if (FAILED(hr = IDWriteColorGlyphRunEnumerator_MoveNext(layers, &has_run))) if (FAILED(hr = IDWriteColorGlyphRunEnumerator_MoveNext(layers, &has_run)))
{ {
ERR("Failed to switch color glyph layer, hr %#x.\n", hr); ERR("Failed to switch colour glyph layer, hr %#lx.\n", hr);
break; break;
} }
...@@ -2566,7 +2566,7 @@ static HRESULT STDMETHODCALLTYPE d2d_text_renderer_DrawGlyphRun(IDWriteTextRende ...@@ -2566,7 +2566,7 @@ static HRESULT STDMETHODCALLTYPE d2d_text_renderer_DrawGlyphRun(IDWriteTextRende
if (FAILED(hr = IDWriteColorGlyphRunEnumerator_GetCurrentRun(layers, &color_run))) if (FAILED(hr = IDWriteColorGlyphRunEnumerator_GetCurrentRun(layers, &color_run)))
{ {
ERR("Failed to get current color run, hr %#x.\n", hr); ERR("Failed to get current colour run, hr %#lx.\n", hr);
break; break;
} }
...@@ -2577,7 +2577,7 @@ static HRESULT STDMETHODCALLTYPE d2d_text_renderer_DrawGlyphRun(IDWriteTextRende ...@@ -2577,7 +2577,7 @@ static HRESULT STDMETHODCALLTYPE d2d_text_renderer_DrawGlyphRun(IDWriteTextRende
if (FAILED(hr = d2d_device_context_CreateSolidColorBrush(&render_target->ID2D1DeviceContext_iface, if (FAILED(hr = d2d_device_context_CreateSolidColorBrush(&render_target->ID2D1DeviceContext_iface,
&color_run->runColor, NULL, (ID2D1SolidColorBrush **)&color_brush))) &color_run->runColor, NULL, (ID2D1SolidColorBrush **)&color_brush)))
{ {
ERR("Failed to create solid color brush, hr %#x.\n", hr); ERR("Failed to create solid colour brush, hr %#lx.\n", hr);
break; break;
} }
} }
...@@ -2751,7 +2751,7 @@ static HRESULT d2d_device_context_get_surface(struct d2d_device_context *render_ ...@@ -2751,7 +2751,7 @@ static HRESULT d2d_device_context_get_surface(struct d2d_device_context *render_
if (FAILED(hr)) if (FAILED(hr))
{ {
*surface = NULL; *surface = NULL;
WARN("Failed to get DXGI surface, %#x.\n", hr); WARN("Failed to get DXGI surface, %#lx.\n", hr);
return hr; return hr;
} }
...@@ -3881,7 +3881,7 @@ static HRESULT d2d_device_context_init(struct d2d_device_context *render_target, ...@@ -3881,7 +3881,7 @@ static HRESULT d2d_device_context_init(struct d2d_device_context *render_target,
if (FAILED(hr = IDXGIDevice_QueryInterface(device_impl->dxgi_device, if (FAILED(hr = IDXGIDevice_QueryInterface(device_impl->dxgi_device,
&IID_ID3D11Device1, (void **)&render_target->d3d_device))) &IID_ID3D11Device1, (void **)&render_target->d3d_device)))
{ {
WARN("Failed to query ID3D11Device1 interface, hr %#x.\n", hr); WARN("Failed to query ID3D11Device1 interface, hr %#lx.\n", hr);
goto err; goto err;
} }
...@@ -3889,7 +3889,7 @@ static HRESULT d2d_device_context_init(struct d2d_device_context *render_target, ...@@ -3889,7 +3889,7 @@ static HRESULT d2d_device_context_init(struct d2d_device_context *render_target,
0, &feature_levels, 1, D3D11_SDK_VERSION, &IID_ID3D11Device1, NULL, 0, &feature_levels, 1, D3D11_SDK_VERSION, &IID_ID3D11Device1, NULL,
&render_target->d3d_state))) &render_target->d3d_state)))
{ {
WARN("Failed to create device context state, hr %#x.\n", hr); WARN("Failed to create device context state, hr %#lx.\n", hr);
goto err; goto err;
} }
...@@ -3900,14 +3900,14 @@ static HRESULT d2d_device_context_init(struct d2d_device_context *render_target, ...@@ -3900,14 +3900,14 @@ static HRESULT d2d_device_context_init(struct d2d_device_context *render_target,
if (FAILED(hr = ID3D11Device1_CreateInputLayout(render_target->d3d_device, si->il_desc, si->il_element_count, if (FAILED(hr = ID3D11Device1_CreateInputLayout(render_target->d3d_device, si->il_desc, si->il_element_count,
si->vs_code, si->vs_code_size, &render_target->shape_resources[si->shape_type].il))) si->vs_code, si->vs_code_size, &render_target->shape_resources[si->shape_type].il)))
{ {
WARN("Failed to create input layout for shape type %#x, hr %#x.\n", si->shape_type, hr); WARN("Failed to create input layout for shape type %#x, hr %#lx.\n", si->shape_type, hr);
goto err; goto err;
} }
if (FAILED(hr = ID3D11Device1_CreateVertexShader(render_target->d3d_device, si->vs_code, if (FAILED(hr = ID3D11Device1_CreateVertexShader(render_target->d3d_device, si->vs_code,
si->vs_code_size, NULL, &render_target->shape_resources[si->shape_type].vs))) si->vs_code_size, NULL, &render_target->shape_resources[si->shape_type].vs)))
{ {
WARN("Failed to create vertex shader for shape type %#x, hr %#x.\n", si->shape_type, hr); WARN("Failed to create vertex shader for shape type %#x, hr %#lx.\n", si->shape_type, hr);
goto err; goto err;
} }
...@@ -3922,14 +3922,14 @@ static HRESULT d2d_device_context_init(struct d2d_device_context *render_target, ...@@ -3922,14 +3922,14 @@ static HRESULT d2d_device_context_init(struct d2d_device_context *render_target,
if (FAILED(hr = ID3D11Device1_CreateBuffer(render_target->d3d_device, &buffer_desc, NULL, if (FAILED(hr = ID3D11Device1_CreateBuffer(render_target->d3d_device, &buffer_desc, NULL,
&render_target->vs_cb))) &render_target->vs_cb)))
{ {
WARN("Failed to create constant buffer, hr %#x.\n", hr); WARN("Failed to create constant buffer, hr %#lx.\n", hr);
goto err; goto err;
} }
if (FAILED(hr = ID3D11Device1_CreatePixelShader(render_target->d3d_device, if (FAILED(hr = ID3D11Device1_CreatePixelShader(render_target->d3d_device,
ps_code, sizeof(ps_code), NULL, &render_target->ps))) ps_code, sizeof(ps_code), NULL, &render_target->ps)))
{ {
WARN("Failed to create pixel shader, hr %#x.\n", hr); WARN("Failed to create pixel shader, hr %#lx.\n", hr);
goto err; goto err;
} }
...@@ -3942,7 +3942,7 @@ static HRESULT d2d_device_context_init(struct d2d_device_context *render_target, ...@@ -3942,7 +3942,7 @@ static HRESULT d2d_device_context_init(struct d2d_device_context *render_target,
if (FAILED(hr = ID3D11Device1_CreateBuffer(render_target->d3d_device, &buffer_desc, NULL, if (FAILED(hr = ID3D11Device1_CreateBuffer(render_target->d3d_device, &buffer_desc, NULL,
&render_target->ps_cb))) &render_target->ps_cb)))
{ {
WARN("Failed to create constant buffer, hr %#x.\n", hr); WARN("Failed to create constant buffer, hr %#lx.\n", hr);
goto err; goto err;
} }
...@@ -3959,7 +3959,7 @@ static HRESULT d2d_device_context_init(struct d2d_device_context *render_target, ...@@ -3959,7 +3959,7 @@ static HRESULT d2d_device_context_init(struct d2d_device_context *render_target,
if (FAILED(hr = ID3D11Device1_CreateBuffer(render_target->d3d_device, if (FAILED(hr = ID3D11Device1_CreateBuffer(render_target->d3d_device,
&buffer_desc, &buffer_data, &render_target->ib))) &buffer_desc, &buffer_data, &render_target->ib)))
{ {
WARN("Failed to create clear index buffer, hr %#x.\n", hr); WARN("Failed to create clear index buffer, hr %#lx.\n", hr);
goto err; goto err;
} }
...@@ -3971,7 +3971,7 @@ static HRESULT d2d_device_context_init(struct d2d_device_context *render_target, ...@@ -3971,7 +3971,7 @@ static HRESULT d2d_device_context_init(struct d2d_device_context *render_target,
if (FAILED(hr = ID3D11Device1_CreateBuffer(render_target->d3d_device, if (FAILED(hr = ID3D11Device1_CreateBuffer(render_target->d3d_device,
&buffer_desc, &buffer_data, &render_target->vb))) &buffer_desc, &buffer_data, &render_target->vb)))
{ {
WARN("Failed to create clear vertex buffer, hr %#x.\n", hr); WARN("Failed to create clear vertex buffer, hr %#lx.\n", hr);
goto err; goto err;
} }
...@@ -3987,14 +3987,14 @@ static HRESULT d2d_device_context_init(struct d2d_device_context *render_target, ...@@ -3987,14 +3987,14 @@ static HRESULT d2d_device_context_init(struct d2d_device_context *render_target,
rs_desc.AntialiasedLineEnable = FALSE; rs_desc.AntialiasedLineEnable = FALSE;
if (FAILED(hr = ID3D11Device1_CreateRasterizerState(render_target->d3d_device, &rs_desc, &render_target->rs))) if (FAILED(hr = ID3D11Device1_CreateRasterizerState(render_target->d3d_device, &rs_desc, &render_target->rs)))
{ {
WARN("Failed to create clear rasterizer state, hr %#x.\n", hr); WARN("Failed to create clear rasteriser state, hr %#lx.\n", hr);
goto err; goto err;
} }
if (FAILED(hr = DWriteCreateFactory(DWRITE_FACTORY_TYPE_SHARED, if (FAILED(hr = DWriteCreateFactory(DWRITE_FACTORY_TYPE_SHARED,
&IID_IDWriteFactory, (IUnknown **)&dwrite_factory))) &IID_IDWriteFactory, (IUnknown **)&dwrite_factory)))
{ {
ERR("Failed to create dwrite factory, hr %#x.\n", hr); ERR("Failed to create dwrite factory, hr %#lx.\n", hr);
goto err; goto err;
} }
...@@ -4002,7 +4002,7 @@ static HRESULT d2d_device_context_init(struct d2d_device_context *render_target, ...@@ -4002,7 +4002,7 @@ static HRESULT d2d_device_context_init(struct d2d_device_context *render_target,
IDWriteFactory_Release(dwrite_factory); IDWriteFactory_Release(dwrite_factory);
if (FAILED(hr)) if (FAILED(hr))
{ {
ERR("Failed to create default text rendering parameters, hr %#x.\n", hr); ERR("Failed to create default text rendering parameters, hr %#lx.\n", hr);
goto err; goto err;
} }
...@@ -4082,7 +4082,7 @@ HRESULT d2d_d3d_create_render_target(ID2D1Device *device, IDXGISurface *surface, ...@@ -4082,7 +4082,7 @@ HRESULT d2d_d3d_create_render_target(ID2D1Device *device, IDXGISurface *surface,
if (FAILED(hr = d2d_device_context_init(object, device, outer_unknown, ops))) if (FAILED(hr = d2d_device_context_init(object, device, outer_unknown, ops)))
{ {
WARN("Failed to initialize render target, hr %#x.\n", hr); WARN("Failed to initialise render target, hr %#lx.\n", hr);
heap_free(object); heap_free(object);
return hr; return hr;
} }
...@@ -4098,7 +4098,7 @@ HRESULT d2d_d3d_create_render_target(ID2D1Device *device, IDXGISurface *surface, ...@@ -4098,7 +4098,7 @@ HRESULT d2d_d3d_create_render_target(ID2D1Device *device, IDXGISurface *surface,
if (FAILED(hr = ID2D1DeviceContext_CreateBitmapFromDxgiSurface(&object->ID2D1DeviceContext_iface, if (FAILED(hr = ID2D1DeviceContext_CreateBitmapFromDxgiSurface(&object->ID2D1DeviceContext_iface,
surface, &bitmap_desc, &bitmap))) surface, &bitmap_desc, &bitmap)))
{ {
WARN("Failed to create target bitmap, hr %#x.\n", hr); WARN("Failed to create target bitmap, hr %#lx.\n", hr);
IUnknown_Release(&object->IUnknown_iface); IUnknown_Release(&object->IUnknown_iface);
heap_free(object); heap_free(object);
return hr; return hr;
...@@ -4140,7 +4140,7 @@ static ULONG WINAPI d2d_device_AddRef(ID2D1Device *iface) ...@@ -4140,7 +4140,7 @@ static ULONG WINAPI d2d_device_AddRef(ID2D1Device *iface)
struct d2d_device *device = impl_from_ID2D1Device(iface); struct d2d_device *device = impl_from_ID2D1Device(iface);
ULONG refcount = InterlockedIncrement(&device->refcount); ULONG refcount = InterlockedIncrement(&device->refcount);
TRACE("%p increasing refcount to %u.\n", iface, refcount); TRACE("%p increasing refcount to %lu.\n", iface, refcount);
return refcount; return refcount;
} }
...@@ -4150,7 +4150,7 @@ static ULONG WINAPI d2d_device_Release(ID2D1Device *iface) ...@@ -4150,7 +4150,7 @@ static ULONG WINAPI d2d_device_Release(ID2D1Device *iface)
struct d2d_device *device = impl_from_ID2D1Device(iface); struct d2d_device *device = impl_from_ID2D1Device(iface);
ULONG refcount = InterlockedDecrement(&device->refcount); ULONG refcount = InterlockedDecrement(&device->refcount);
TRACE("%p decreasing refcount to %u.\n", iface, refcount); TRACE("%p decreasing refcount to %lu.\n", iface, refcount);
if (!refcount) if (!refcount)
{ {
...@@ -4188,7 +4188,7 @@ static HRESULT WINAPI d2d_device_CreateDeviceContext(ID2D1Device *iface, D2D1_DE ...@@ -4188,7 +4188,7 @@ static HRESULT WINAPI d2d_device_CreateDeviceContext(ID2D1Device *iface, D2D1_DE
if (FAILED(hr = d2d_device_context_init(object, iface, NULL, NULL))) if (FAILED(hr = d2d_device_context_init(object, iface, NULL, NULL)))
{ {
WARN("Failed to initialize device context, hr %#x.\n", hr); WARN("Failed to initialise device context, hr %#lx.\n", hr);
heap_free(object); heap_free(object);
return hr; return hr;
} }
......
...@@ -79,7 +79,7 @@ static ULONG STDMETHODCALLTYPE d2d_effect_AddRef(ID2D1Effect *iface) ...@@ -79,7 +79,7 @@ static ULONG STDMETHODCALLTYPE d2d_effect_AddRef(ID2D1Effect *iface)
struct d2d_effect *effect = impl_from_ID2D1Effect(iface); struct d2d_effect *effect = impl_from_ID2D1Effect(iface);
ULONG refcount = InterlockedIncrement(&effect->refcount); ULONG refcount = InterlockedIncrement(&effect->refcount);
TRACE("%p increasing refcount to %u.\n", iface, refcount); TRACE("%p increasing refcount to %lu.\n", iface, refcount);
return refcount; return refcount;
} }
...@@ -89,7 +89,7 @@ static ULONG STDMETHODCALLTYPE d2d_effect_Release(ID2D1Effect *iface) ...@@ -89,7 +89,7 @@ static ULONG STDMETHODCALLTYPE d2d_effect_Release(ID2D1Effect *iface)
struct d2d_effect *effect = impl_from_ID2D1Effect(iface); struct d2d_effect *effect = impl_from_ID2D1Effect(iface);
ULONG refcount = InterlockedDecrement(&effect->refcount); ULONG refcount = InterlockedDecrement(&effect->refcount);
TRACE("%p decreasing refcount to %u.\n", iface, refcount); TRACE("%p decreasing refcount to %lu.\n", iface, refcount);
if (!refcount) if (!refcount)
{ {
......
...@@ -102,7 +102,7 @@ static ULONG STDMETHODCALLTYPE d2d_factory_AddRef(ID2D1Factory2 *iface) ...@@ -102,7 +102,7 @@ static ULONG STDMETHODCALLTYPE d2d_factory_AddRef(ID2D1Factory2 *iface)
struct d2d_factory *factory = impl_from_ID2D1Factory2(iface); struct d2d_factory *factory = impl_from_ID2D1Factory2(iface);
ULONG refcount = InterlockedIncrement(&factory->refcount); ULONG refcount = InterlockedIncrement(&factory->refcount);
TRACE("%p increasing refcount to %u.\n", iface, refcount); TRACE("%p increasing refcount to %lu.\n", iface, refcount);
return refcount; return refcount;
} }
...@@ -112,7 +112,7 @@ static ULONG STDMETHODCALLTYPE d2d_factory_Release(ID2D1Factory2 *iface) ...@@ -112,7 +112,7 @@ static ULONG STDMETHODCALLTYPE d2d_factory_Release(ID2D1Factory2 *iface)
struct d2d_factory *factory = impl_from_ID2D1Factory2(iface); struct d2d_factory *factory = impl_from_ID2D1Factory2(iface);
ULONG refcount = InterlockedDecrement(&factory->refcount); ULONG refcount = InterlockedDecrement(&factory->refcount);
TRACE("%p decreasing refcount to %u.\n", iface, refcount); TRACE("%p decreasing refcount to %lu.\n", iface, refcount);
if (!refcount) if (!refcount)
{ {
...@@ -157,7 +157,7 @@ static HRESULT STDMETHODCALLTYPE d2d_factory_CreateRectangleGeometry(ID2D1Factor ...@@ -157,7 +157,7 @@ static HRESULT STDMETHODCALLTYPE d2d_factory_CreateRectangleGeometry(ID2D1Factor
if (FAILED(hr = d2d_rectangle_geometry_init(object, (ID2D1Factory *)iface, rect))) if (FAILED(hr = d2d_rectangle_geometry_init(object, (ID2D1Factory *)iface, rect)))
{ {
WARN("Failed to initialize rectangle geometry, hr %#x.\n", hr); WARN("Failed to initialise rectangle geometry, hr %#lx.\n", hr);
heap_free(object); heap_free(object);
return hr; return hr;
} }
...@@ -181,7 +181,7 @@ static HRESULT STDMETHODCALLTYPE d2d_factory_CreateRoundedRectangleGeometry(ID2D ...@@ -181,7 +181,7 @@ static HRESULT STDMETHODCALLTYPE d2d_factory_CreateRoundedRectangleGeometry(ID2D
if (FAILED(hr = d2d_rounded_rectangle_geometry_init(object, (ID2D1Factory *)iface, rounded_rect))) if (FAILED(hr = d2d_rounded_rectangle_geometry_init(object, (ID2D1Factory *)iface, rounded_rect)))
{ {
WARN("Failed to initialize rounded rectangle geometry, hr %#x.\n", hr); WARN("Failed to initialise rounded rectangle geometry, hr %#lx.\n", hr);
heap_free(object); heap_free(object);
return hr; return hr;
} }
...@@ -205,7 +205,7 @@ static HRESULT STDMETHODCALLTYPE d2d_factory_CreateEllipseGeometry(ID2D1Factory2 ...@@ -205,7 +205,7 @@ static HRESULT STDMETHODCALLTYPE d2d_factory_CreateEllipseGeometry(ID2D1Factory2
if (FAILED(hr = d2d_ellipse_geometry_init(object, (ID2D1Factory *)iface, ellipse))) if (FAILED(hr = d2d_ellipse_geometry_init(object, (ID2D1Factory *)iface, ellipse)))
{ {
WARN("Failed to initialize ellipse geometry, hr %#x.\n", hr); WARN("Failed to initialise ellipse geometry, hr %#lx.\n", hr);
heap_free(object); heap_free(object);
return hr; return hr;
} }
...@@ -230,7 +230,7 @@ static HRESULT STDMETHODCALLTYPE d2d_factory_CreateGeometryGroup(ID2D1Factory2 * ...@@ -230,7 +230,7 @@ static HRESULT STDMETHODCALLTYPE d2d_factory_CreateGeometryGroup(ID2D1Factory2 *
if (FAILED(hr = d2d_geometry_group_init(object, (ID2D1Factory *)iface, fill_mode, geometries, geometry_count))) if (FAILED(hr = d2d_geometry_group_init(object, (ID2D1Factory *)iface, fill_mode, geometries, geometry_count)))
{ {
WARN("Failed to initialize geometry group, hr %#x.\n", hr); WARN("Failed to initialise geometry group, hr %#lx.\n", hr);
heap_free(object); heap_free(object);
return hr; return hr;
} }
...@@ -303,7 +303,7 @@ static HRESULT STDMETHODCALLTYPE d2d_factory_CreateStrokeStyle(ID2D1Factory2 *if ...@@ -303,7 +303,7 @@ static HRESULT STDMETHODCALLTYPE d2d_factory_CreateStrokeStyle(ID2D1Factory2 *if
if (FAILED(hr = d2d_stroke_style_init(object, (ID2D1Factory *)iface, &desc1, dashes, dash_count))) if (FAILED(hr = d2d_stroke_style_init(object, (ID2D1Factory *)iface, &desc1, dashes, dash_count)))
{ {
WARN("Failed to initialize stroke style, hr %#x.\n", hr); WARN("Failed to initialise stroke style, hr %#lx.\n", hr);
heap_free(object); heap_free(object);
return hr; return hr;
} }
...@@ -348,7 +348,7 @@ static HRESULT d2d_factory_get_device(struct d2d_factory *factory, ID3D10Device1 ...@@ -348,7 +348,7 @@ static HRESULT d2d_factory_get_device(struct d2d_factory *factory, ID3D10Device1
if (!factory->device && FAILED(hr = D3D10CreateDevice1(NULL, D3D10_DRIVER_TYPE_HARDWARE, NULL, D3D10_CREATE_DEVICE_BGRA_SUPPORT, if (!factory->device && FAILED(hr = D3D10CreateDevice1(NULL, D3D10_DRIVER_TYPE_HARDWARE, NULL, D3D10_CREATE_DEVICE_BGRA_SUPPORT,
D3D10_FEATURE_LEVEL_10_0, D3D10_1_SDK_VERSION, &factory->device))) D3D10_FEATURE_LEVEL_10_0, D3D10_1_SDK_VERSION, &factory->device)))
WARN("Failed to create device, hr %#x.\n", hr); WARN("Failed to create device, hr %#lx.\n", hr);
*device = factory->device; *device = factory->device;
return hr; return hr;
...@@ -375,7 +375,7 @@ static HRESULT STDMETHODCALLTYPE d2d_factory_CreateWicBitmapRenderTarget(ID2D1Fa ...@@ -375,7 +375,7 @@ static HRESULT STDMETHODCALLTYPE d2d_factory_CreateWicBitmapRenderTarget(ID2D1Fa
if (FAILED(hr = d2d_wic_render_target_init(object, (ID2D1Factory1 *)iface, device, target, desc))) if (FAILED(hr = d2d_wic_render_target_init(object, (ID2D1Factory1 *)iface, device, target, desc)))
{ {
WARN("Failed to initialize render target, hr %#x.\n", hr); WARN("Failed to initialise render target, hr %#lx.\n", hr);
heap_free(object); heap_free(object);
return hr; return hr;
} }
...@@ -405,7 +405,7 @@ static HRESULT STDMETHODCALLTYPE d2d_factory_CreateHwndRenderTarget(ID2D1Factory ...@@ -405,7 +405,7 @@ static HRESULT STDMETHODCALLTYPE d2d_factory_CreateHwndRenderTarget(ID2D1Factory
if (FAILED(hr = d2d_hwnd_render_target_init(object, (ID2D1Factory1 *)iface, device, desc, hwnd_rt_desc))) if (FAILED(hr = d2d_hwnd_render_target_init(object, (ID2D1Factory1 *)iface, device, desc, hwnd_rt_desc)))
{ {
WARN("Failed to initialize render target, hr %#x.\n", hr); WARN("Failed to initialise render target, hr %#lx.\n", hr);
heap_free(object); heap_free(object);
return hr; return hr;
} }
...@@ -427,7 +427,7 @@ static HRESULT STDMETHODCALLTYPE d2d_factory_CreateDxgiSurfaceRenderTarget(ID2D1 ...@@ -427,7 +427,7 @@ static HRESULT STDMETHODCALLTYPE d2d_factory_CreateDxgiSurfaceRenderTarget(ID2D1
if (FAILED(hr = IDXGISurface_GetDevice(surface, &IID_IDXGIDevice, (void **)&dxgi_device))) if (FAILED(hr = IDXGISurface_GetDevice(surface, &IID_IDXGIDevice, (void **)&dxgi_device)))
{ {
WARN("Failed to get DXGI device, hr %#x.\n", hr); WARN("Failed to get DXGI device, hr %#lx.\n", hr);
return hr; return hr;
} }
...@@ -435,7 +435,7 @@ static HRESULT STDMETHODCALLTYPE d2d_factory_CreateDxgiSurfaceRenderTarget(ID2D1 ...@@ -435,7 +435,7 @@ static HRESULT STDMETHODCALLTYPE d2d_factory_CreateDxgiSurfaceRenderTarget(ID2D1
IDXGIDevice_Release(dxgi_device); IDXGIDevice_Release(dxgi_device);
if (FAILED(hr)) if (FAILED(hr))
{ {
WARN("Failed to create D2D device, hr %#x.\n", hr); WARN("Failed to create D2D device, hr %#lx.\n", hr);
return hr; return hr;
} }
...@@ -462,7 +462,7 @@ static HRESULT STDMETHODCALLTYPE d2d_factory_CreateDCRenderTarget(ID2D1Factory2 ...@@ -462,7 +462,7 @@ static HRESULT STDMETHODCALLTYPE d2d_factory_CreateDCRenderTarget(ID2D1Factory2
if (FAILED(hr = d2d_dc_render_target_init(object, (ID2D1Factory1 *)iface, device, desc))) if (FAILED(hr = d2d_dc_render_target_init(object, (ID2D1Factory1 *)iface, device, desc)))
{ {
WARN("Failed to initialize render target, hr %#x.\n", hr); WARN("Failed to initialise render target, hr %#lx.\n", hr);
heap_free(object); heap_free(object);
return hr; return hr;
} }
...@@ -507,7 +507,7 @@ static HRESULT STDMETHODCALLTYPE d2d_factory_CreateStrokeStyle1(ID2D1Factory2 *i ...@@ -507,7 +507,7 @@ static HRESULT STDMETHODCALLTYPE d2d_factory_CreateStrokeStyle1(ID2D1Factory2 *i
if (FAILED(hr = d2d_stroke_style_init(object, (ID2D1Factory *)iface, if (FAILED(hr = d2d_stroke_style_init(object, (ID2D1Factory *)iface,
desc, dashes, dash_count))) desc, dashes, dash_count)))
{ {
WARN("Failed to initialize stroke style, hr %#x.\n", hr); WARN("Failed to initialise stroke style, hr %#lx.\n", hr);
heap_free(object); heap_free(object);
return hr; return hr;
} }
......
...@@ -3384,7 +3384,7 @@ static ULONG STDMETHODCALLTYPE d2d_path_geometry_AddRef(ID2D1PathGeometry *iface ...@@ -3384,7 +3384,7 @@ static ULONG STDMETHODCALLTYPE d2d_path_geometry_AddRef(ID2D1PathGeometry *iface
struct d2d_geometry *geometry = impl_from_ID2D1PathGeometry(iface); struct d2d_geometry *geometry = impl_from_ID2D1PathGeometry(iface);
ULONG refcount = InterlockedIncrement(&geometry->refcount); ULONG refcount = InterlockedIncrement(&geometry->refcount);
TRACE("%p increasing refcount to %u.\n", iface, refcount); TRACE("%p increasing refcount to %lu.\n", iface, refcount);
return refcount; return refcount;
} }
...@@ -3394,7 +3394,7 @@ static ULONG STDMETHODCALLTYPE d2d_path_geometry_Release(ID2D1PathGeometry *ifac ...@@ -3394,7 +3394,7 @@ static ULONG STDMETHODCALLTYPE d2d_path_geometry_Release(ID2D1PathGeometry *ifac
struct d2d_geometry *geometry = impl_from_ID2D1PathGeometry(iface); struct d2d_geometry *geometry = impl_from_ID2D1PathGeometry(iface);
ULONG refcount = InterlockedDecrement(&geometry->refcount); ULONG refcount = InterlockedDecrement(&geometry->refcount);
TRACE("%p decreasing refcount to %u.\n", iface, refcount); TRACE("%p decreasing refcount to %lu.\n", iface, refcount);
if (!refcount) if (!refcount)
{ {
...@@ -3974,7 +3974,7 @@ static ULONG STDMETHODCALLTYPE d2d_ellipse_geometry_AddRef(ID2D1EllipseGeometry ...@@ -3974,7 +3974,7 @@ static ULONG STDMETHODCALLTYPE d2d_ellipse_geometry_AddRef(ID2D1EllipseGeometry
struct d2d_geometry *geometry = impl_from_ID2D1EllipseGeometry(iface); struct d2d_geometry *geometry = impl_from_ID2D1EllipseGeometry(iface);
ULONG refcount = InterlockedIncrement(&geometry->refcount); ULONG refcount = InterlockedIncrement(&geometry->refcount);
TRACE("%p increasing refcount to %u.\n", iface, refcount); TRACE("%p increasing refcount to %lu.\n", iface, refcount);
return refcount; return refcount;
} }
...@@ -3984,7 +3984,7 @@ static ULONG STDMETHODCALLTYPE d2d_ellipse_geometry_Release(ID2D1EllipseGeometry ...@@ -3984,7 +3984,7 @@ static ULONG STDMETHODCALLTYPE d2d_ellipse_geometry_Release(ID2D1EllipseGeometry
struct d2d_geometry *geometry = impl_from_ID2D1EllipseGeometry(iface); struct d2d_geometry *geometry = impl_from_ID2D1EllipseGeometry(iface);
ULONG refcount = InterlockedDecrement(&geometry->refcount); ULONG refcount = InterlockedDecrement(&geometry->refcount);
TRACE("%p decreasing refcount to %u.\n", iface, refcount); TRACE("%p decreasing refcount to %lu.\n", iface, refcount);
if (!refcount) if (!refcount)
{ {
...@@ -4246,7 +4246,7 @@ static ULONG STDMETHODCALLTYPE d2d_rectangle_geometry_AddRef(ID2D1RectangleGeome ...@@ -4246,7 +4246,7 @@ static ULONG STDMETHODCALLTYPE d2d_rectangle_geometry_AddRef(ID2D1RectangleGeome
struct d2d_geometry *geometry = impl_from_ID2D1RectangleGeometry(iface); struct d2d_geometry *geometry = impl_from_ID2D1RectangleGeometry(iface);
ULONG refcount = InterlockedIncrement(&geometry->refcount); ULONG refcount = InterlockedIncrement(&geometry->refcount);
TRACE("%p increasing refcount to %u.\n", iface, refcount); TRACE("%p increasing refcount to %lu.\n", iface, refcount);
return refcount; return refcount;
} }
...@@ -4256,7 +4256,7 @@ static ULONG STDMETHODCALLTYPE d2d_rectangle_geometry_Release(ID2D1RectangleGeom ...@@ -4256,7 +4256,7 @@ static ULONG STDMETHODCALLTYPE d2d_rectangle_geometry_Release(ID2D1RectangleGeom
struct d2d_geometry *geometry = impl_from_ID2D1RectangleGeometry(iface); struct d2d_geometry *geometry = impl_from_ID2D1RectangleGeometry(iface);
ULONG refcount = InterlockedDecrement(&geometry->refcount); ULONG refcount = InterlockedDecrement(&geometry->refcount);
TRACE("%p decreasing refcount to %u.\n", iface, refcount); TRACE("%p decreasing refcount to %lu.\n", iface, refcount);
if (!refcount) if (!refcount)
{ {
...@@ -4662,7 +4662,7 @@ static ULONG STDMETHODCALLTYPE d2d_rounded_rectangle_geometry_AddRef(ID2D1Rounde ...@@ -4662,7 +4662,7 @@ static ULONG STDMETHODCALLTYPE d2d_rounded_rectangle_geometry_AddRef(ID2D1Rounde
struct d2d_geometry *geometry = impl_from_ID2D1RoundedRectangleGeometry(iface); struct d2d_geometry *geometry = impl_from_ID2D1RoundedRectangleGeometry(iface);
ULONG refcount = InterlockedIncrement(&geometry->refcount); ULONG refcount = InterlockedIncrement(&geometry->refcount);
TRACE("%p increasing refcount to %u.\n", iface, refcount); TRACE("%p increasing refcount to %lu.\n", iface, refcount);
return refcount; return refcount;
} }
...@@ -4672,7 +4672,7 @@ static ULONG STDMETHODCALLTYPE d2d_rounded_rectangle_geometry_Release(ID2D1Round ...@@ -4672,7 +4672,7 @@ static ULONG STDMETHODCALLTYPE d2d_rounded_rectangle_geometry_Release(ID2D1Round
struct d2d_geometry *geometry = impl_from_ID2D1RoundedRectangleGeometry(iface); struct d2d_geometry *geometry = impl_from_ID2D1RoundedRectangleGeometry(iface);
ULONG refcount = InterlockedDecrement(&geometry->refcount); ULONG refcount = InterlockedDecrement(&geometry->refcount);
TRACE("%p decreasing refcount to %u.\n", iface, refcount); TRACE("%p decreasing refcount to %lu.\n", iface, refcount);
if (!refcount) if (!refcount)
{ {
...@@ -4958,7 +4958,7 @@ static ULONG STDMETHODCALLTYPE d2d_transformed_geometry_AddRef(ID2D1TransformedG ...@@ -4958,7 +4958,7 @@ static ULONG STDMETHODCALLTYPE d2d_transformed_geometry_AddRef(ID2D1TransformedG
struct d2d_geometry *geometry = impl_from_ID2D1TransformedGeometry(iface); struct d2d_geometry *geometry = impl_from_ID2D1TransformedGeometry(iface);
ULONG refcount = InterlockedIncrement(&geometry->refcount); ULONG refcount = InterlockedIncrement(&geometry->refcount);
TRACE("%p increasing refcount to %u.\n", iface, refcount); TRACE("%p increasing refcount to %lu.\n", iface, refcount);
return refcount; return refcount;
} }
...@@ -4968,7 +4968,7 @@ static ULONG STDMETHODCALLTYPE d2d_transformed_geometry_Release(ID2D1Transformed ...@@ -4968,7 +4968,7 @@ static ULONG STDMETHODCALLTYPE d2d_transformed_geometry_Release(ID2D1Transformed
struct d2d_geometry *geometry = impl_from_ID2D1TransformedGeometry(iface); struct d2d_geometry *geometry = impl_from_ID2D1TransformedGeometry(iface);
ULONG refcount = InterlockedDecrement(&geometry->refcount); ULONG refcount = InterlockedDecrement(&geometry->refcount);
TRACE("%p decreasing refcount to %u.\n", iface, refcount); TRACE("%p decreasing refcount to %lu.\n", iface, refcount);
if (!refcount) if (!refcount)
{ {
...@@ -5238,7 +5238,7 @@ static ULONG STDMETHODCALLTYPE d2d_geometry_group_AddRef(ID2D1GeometryGroup *ifa ...@@ -5238,7 +5238,7 @@ static ULONG STDMETHODCALLTYPE d2d_geometry_group_AddRef(ID2D1GeometryGroup *ifa
struct d2d_geometry *geometry = impl_from_ID2D1GeometryGroup(iface); struct d2d_geometry *geometry = impl_from_ID2D1GeometryGroup(iface);
ULONG refcount = InterlockedIncrement(&geometry->refcount); ULONG refcount = InterlockedIncrement(&geometry->refcount);
TRACE("%p increasing refcount to %u.\n", iface, refcount); TRACE("%p increasing refcount to %lu.\n", iface, refcount);
return refcount; return refcount;
} }
...@@ -5249,7 +5249,7 @@ static ULONG STDMETHODCALLTYPE d2d_geometry_group_Release(ID2D1GeometryGroup *if ...@@ -5249,7 +5249,7 @@ static ULONG STDMETHODCALLTYPE d2d_geometry_group_Release(ID2D1GeometryGroup *if
ULONG refcount = InterlockedDecrement(&geometry->refcount); ULONG refcount = InterlockedDecrement(&geometry->refcount);
unsigned int i; unsigned int i;
TRACE("%p decreasing refcount to %u.\n", iface, refcount); TRACE("%p decreasing refcount to %lu.\n", iface, refcount);
if (!refcount) if (!refcount)
{ {
......
...@@ -32,7 +32,7 @@ static HRESULT d2d_hwnd_render_target_present(IUnknown *outer_unknown) ...@@ -32,7 +32,7 @@ static HRESULT d2d_hwnd_render_target_present(IUnknown *outer_unknown)
HRESULT hr; HRESULT hr;
if (FAILED(hr = IDXGISwapChain_Present(render_target->swapchain, render_target->sync_interval, 0))) if (FAILED(hr = IDXGISwapChain_Present(render_target->swapchain, render_target->sync_interval, 0)))
WARN("Present failed, %#x.\n", hr); WARN("Present failed, %#lx.\n", hr);
return S_OK; return S_OK;
} }
...@@ -67,7 +67,7 @@ static ULONG STDMETHODCALLTYPE d2d_hwnd_render_target_AddRef(ID2D1HwndRenderTarg ...@@ -67,7 +67,7 @@ static ULONG STDMETHODCALLTYPE d2d_hwnd_render_target_AddRef(ID2D1HwndRenderTarg
struct d2d_hwnd_render_target *render_target = impl_from_ID2D1HwndRenderTarget(iface); struct d2d_hwnd_render_target *render_target = impl_from_ID2D1HwndRenderTarget(iface);
ULONG refcount = InterlockedIncrement(&render_target->refcount); ULONG refcount = InterlockedIncrement(&render_target->refcount);
TRACE("%p increasing refcount to %u.\n", iface, refcount); TRACE("%p increasing refcount to %lu.\n", iface, refcount);
return refcount; return refcount;
} }
...@@ -77,7 +77,7 @@ static ULONG STDMETHODCALLTYPE d2d_hwnd_render_target_Release(ID2D1HwndRenderTar ...@@ -77,7 +77,7 @@ static ULONG STDMETHODCALLTYPE d2d_hwnd_render_target_Release(ID2D1HwndRenderTar
struct d2d_hwnd_render_target *render_target = impl_from_ID2D1HwndRenderTarget(iface); struct d2d_hwnd_render_target *render_target = impl_from_ID2D1HwndRenderTarget(iface);
ULONG refcount = InterlockedDecrement(&render_target->refcount); ULONG refcount = InterlockedDecrement(&render_target->refcount);
TRACE("%p decreasing refcount to %u.\n", iface, refcount); TRACE("%p decreasing refcount to %lu.\n", iface, refcount);
if (!refcount) if (!refcount)
{ {
...@@ -687,7 +687,7 @@ static HRESULT STDMETHODCALLTYPE d2d_hwnd_render_target_Resize(ID2D1HwndRenderTa ...@@ -687,7 +687,7 @@ static HRESULT STDMETHODCALLTYPE d2d_hwnd_render_target_Resize(ID2D1HwndRenderTa
if (FAILED(hr = IDXGISwapChain_GetBuffer(render_target->swapchain, 0, &IID_IDXGISurface1, if (FAILED(hr = IDXGISwapChain_GetBuffer(render_target->swapchain, 0, &IID_IDXGISurface1,
(void **)&dxgi_surface))) (void **)&dxgi_surface)))
{ {
WARN("Failed to get buffer, hr %#x.\n", hr); WARN("Failed to get buffer, hr %#lx.\n", hr);
ID2D1DeviceContext_Release(context); ID2D1DeviceContext_Release(context);
return hr; return hr;
} }
...@@ -696,7 +696,7 @@ static HRESULT STDMETHODCALLTYPE d2d_hwnd_render_target_Resize(ID2D1HwndRenderTa ...@@ -696,7 +696,7 @@ static HRESULT STDMETHODCALLTYPE d2d_hwnd_render_target_Resize(ID2D1HwndRenderTa
IDXGISurface1_Release(dxgi_surface); IDXGISurface1_Release(dxgi_surface);
if (FAILED(hr)) if (FAILED(hr))
{ {
WARN("Failed to create target bitmap, hr %#x.\n", hr); WARN("Failed to create target bitmap, hr %#lx.\n", hr);
ID2D1DeviceContext_Release(context); ID2D1DeviceContext_Release(context);
return hr; return hr;
} }
...@@ -810,7 +810,7 @@ HRESULT d2d_hwnd_render_target_init(struct d2d_hwnd_render_target *render_target ...@@ -810,7 +810,7 @@ HRESULT d2d_hwnd_render_target_init(struct d2d_hwnd_render_target *render_target
if (FAILED(hr = ID3D10Device1_QueryInterface(d3d_device, &IID_IDXGIDevice, (void **)&dxgi_device))) if (FAILED(hr = ID3D10Device1_QueryInterface(d3d_device, &IID_IDXGIDevice, (void **)&dxgi_device)))
{ {
WARN("Failed to get IDXGIDevice interface, hr %#x.\n", hr); WARN("Failed to get IDXGIDevice interface, hr %#lx.\n", hr);
return hr; return hr;
} }
...@@ -818,7 +818,7 @@ HRESULT d2d_hwnd_render_target_init(struct d2d_hwnd_render_target *render_target ...@@ -818,7 +818,7 @@ HRESULT d2d_hwnd_render_target_init(struct d2d_hwnd_render_target *render_target
IDXGIDevice_Release(dxgi_device); IDXGIDevice_Release(dxgi_device);
if (FAILED(hr)) if (FAILED(hr))
{ {
WARN("Failed to get IDXGIAdapter interface, hr %#x.\n", hr); WARN("Failed to get IDXGIAdapter interface, hr %#lx.\n", hr);
return hr; return hr;
} }
...@@ -826,7 +826,7 @@ HRESULT d2d_hwnd_render_target_init(struct d2d_hwnd_render_target *render_target ...@@ -826,7 +826,7 @@ HRESULT d2d_hwnd_render_target_init(struct d2d_hwnd_render_target *render_target
IDXGIAdapter_Release(dxgi_adapter); IDXGIAdapter_Release(dxgi_adapter);
if (FAILED(hr)) if (FAILED(hr))
{ {
WARN("Failed to get IDXGIFactory interface, hr %#x.\n", hr); WARN("Failed to get IDXGIFactory interface, hr %#lx.\n", hr);
return hr; return hr;
} }
...@@ -861,13 +861,13 @@ HRESULT d2d_hwnd_render_target_init(struct d2d_hwnd_render_target *render_target ...@@ -861,13 +861,13 @@ HRESULT d2d_hwnd_render_target_init(struct d2d_hwnd_render_target *render_target
IDXGIFactory_Release(dxgi_factory); IDXGIFactory_Release(dxgi_factory);
if (FAILED(hr)) if (FAILED(hr))
{ {
WARN("Failed to create a swapchain, hr %#x.\n", hr); WARN("Failed to create a swapchain, hr %#lx.\n", hr);
return hr; return hr;
} }
if (FAILED(hr = IDXGISwapChain_GetBuffer(render_target->swapchain, 0, &IID_IDXGISurface, (void **)&dxgi_surface))) if (FAILED(hr = IDXGISwapChain_GetBuffer(render_target->swapchain, 0, &IID_IDXGISurface, (void **)&dxgi_surface)))
{ {
WARN("Failed to get buffer, hr %#x.\n", hr); WARN("Failed to get buffer, hr %#lx.\n", hr);
IDXGISwapChain_Release(render_target->swapchain); IDXGISwapChain_Release(render_target->swapchain);
return hr; return hr;
} }
...@@ -876,7 +876,7 @@ HRESULT d2d_hwnd_render_target_init(struct d2d_hwnd_render_target *render_target ...@@ -876,7 +876,7 @@ HRESULT d2d_hwnd_render_target_init(struct d2d_hwnd_render_target *render_target
if (FAILED(hr = IDXGISurface_GetDevice(dxgi_surface, &IID_IDXGIDevice, (void **)&dxgi_device))) if (FAILED(hr = IDXGISurface_GetDevice(dxgi_surface, &IID_IDXGIDevice, (void **)&dxgi_device)))
{ {
WARN("Failed to get DXGI device, hr %#X.\n", hr); WARN("Failed to get DXGI device, hr %#lx.\n", hr);
IDXGISurface_Release(dxgi_surface); IDXGISurface_Release(dxgi_surface);
IDXGISwapChain_Release(render_target->swapchain); IDXGISwapChain_Release(render_target->swapchain);
return hr; return hr;
...@@ -886,7 +886,7 @@ HRESULT d2d_hwnd_render_target_init(struct d2d_hwnd_render_target *render_target ...@@ -886,7 +886,7 @@ HRESULT d2d_hwnd_render_target_init(struct d2d_hwnd_render_target *render_target
IDXGIDevice_Release(dxgi_device); IDXGIDevice_Release(dxgi_device);
if (FAILED(hr)) if (FAILED(hr))
{ {
WARN("Failed to create D2D device, hr %#X.\n", hr); WARN("Failed to create D2D device, hr %#lx.\n", hr);
IDXGISurface_Release(dxgi_surface); IDXGISurface_Release(dxgi_surface);
IDXGISwapChain_Release(render_target->swapchain); IDXGISwapChain_Release(render_target->swapchain);
return hr; return hr;
...@@ -899,7 +899,7 @@ HRESULT d2d_hwnd_render_target_init(struct d2d_hwnd_render_target *render_target ...@@ -899,7 +899,7 @@ HRESULT d2d_hwnd_render_target_init(struct d2d_hwnd_render_target *render_target
ID2D1Device_Release(device); ID2D1Device_Release(device);
if (FAILED(hr)) if (FAILED(hr))
{ {
WARN("Failed to create DXGI surface render target, hr %#x.\n", hr); WARN("Failed to create DXGI surface render target, hr %#lx.\n", hr);
IDXGISwapChain_Release(render_target->swapchain); IDXGISwapChain_Release(render_target->swapchain);
return hr; return hr;
} }
...@@ -907,7 +907,7 @@ HRESULT d2d_hwnd_render_target_init(struct d2d_hwnd_render_target *render_target ...@@ -907,7 +907,7 @@ HRESULT d2d_hwnd_render_target_init(struct d2d_hwnd_render_target *render_target
if (FAILED(hr = IUnknown_QueryInterface(render_target->dxgi_inner, if (FAILED(hr = IUnknown_QueryInterface(render_target->dxgi_inner,
&IID_ID2D1RenderTarget, (void **)&render_target->dxgi_target))) &IID_ID2D1RenderTarget, (void **)&render_target->dxgi_target)))
{ {
WARN("Failed to retrieve ID2D1RenderTarget interface, hr %#x.\n", hr); WARN("Failed to retrieve ID2D1RenderTarget interface, hr %#lx.\n", hr);
IUnknown_Release(render_target->dxgi_inner); IUnknown_Release(render_target->dxgi_inner);
IDXGISwapChain_Release(render_target->swapchain); IDXGISwapChain_Release(render_target->swapchain);
return hr; return hr;
......
...@@ -49,7 +49,7 @@ static ULONG STDMETHODCALLTYPE d2d_layer_AddRef(ID2D1Layer *iface) ...@@ -49,7 +49,7 @@ static ULONG STDMETHODCALLTYPE d2d_layer_AddRef(ID2D1Layer *iface)
struct d2d_layer *layer = impl_from_ID2D1Layer(iface); struct d2d_layer *layer = impl_from_ID2D1Layer(iface);
ULONG refcount = InterlockedIncrement(&layer->refcount); ULONG refcount = InterlockedIncrement(&layer->refcount);
TRACE("%p increasing refcount to %u.\n", iface, refcount); TRACE("%p increasing refcount to %lu.\n", iface, refcount);
return refcount; return refcount;
} }
...@@ -59,7 +59,7 @@ static ULONG STDMETHODCALLTYPE d2d_layer_Release(ID2D1Layer *iface) ...@@ -59,7 +59,7 @@ static ULONG STDMETHODCALLTYPE d2d_layer_Release(ID2D1Layer *iface)
struct d2d_layer *layer = impl_from_ID2D1Layer(iface); struct d2d_layer *layer = impl_from_ID2D1Layer(iface);
ULONG refcount = InterlockedDecrement(&layer->refcount); ULONG refcount = InterlockedDecrement(&layer->refcount);
TRACE("%p decreasing refcount to %u.\n", iface, refcount); TRACE("%p decreasing refcount to %lu.\n", iface, refcount);
if (!refcount) if (!refcount)
{ {
......
...@@ -49,7 +49,7 @@ static ULONG STDMETHODCALLTYPE d2d_mesh_AddRef(ID2D1Mesh *iface) ...@@ -49,7 +49,7 @@ static ULONG STDMETHODCALLTYPE d2d_mesh_AddRef(ID2D1Mesh *iface)
struct d2d_mesh *mesh = impl_from_ID2D1Mesh(iface); struct d2d_mesh *mesh = impl_from_ID2D1Mesh(iface);
ULONG refcount = InterlockedIncrement(&mesh->refcount); ULONG refcount = InterlockedIncrement(&mesh->refcount);
TRACE("%p increasing refcount to %u.\n", iface, refcount); TRACE("%p increasing refcount to %lu.\n", iface, refcount);
return refcount; return refcount;
} }
...@@ -59,7 +59,7 @@ static ULONG STDMETHODCALLTYPE d2d_mesh_Release(ID2D1Mesh *iface) ...@@ -59,7 +59,7 @@ static ULONG STDMETHODCALLTYPE d2d_mesh_Release(ID2D1Mesh *iface)
struct d2d_mesh *mesh = impl_from_ID2D1Mesh(iface); struct d2d_mesh *mesh = impl_from_ID2D1Mesh(iface);
ULONG refcount = InterlockedDecrement(&mesh->refcount); ULONG refcount = InterlockedDecrement(&mesh->refcount);
TRACE("%p decreasing refcount to %u.\n", iface, refcount); TRACE("%p decreasing refcount to %lu.\n", iface, refcount);
if (!refcount) if (!refcount)
{ {
......
...@@ -50,7 +50,7 @@ static ULONG STDMETHODCALLTYPE d2d_state_block_AddRef(ID2D1DrawingStateBlock1 *i ...@@ -50,7 +50,7 @@ static ULONG STDMETHODCALLTYPE d2d_state_block_AddRef(ID2D1DrawingStateBlock1 *i
struct d2d_state_block *state_block = impl_from_ID2D1DrawingStateBlock1(iface); struct d2d_state_block *state_block = impl_from_ID2D1DrawingStateBlock1(iface);
ULONG refcount = InterlockedIncrement(&state_block->refcount); ULONG refcount = InterlockedIncrement(&state_block->refcount);
TRACE("%p increasing refcount to %u.\n", iface, refcount); TRACE("%p increasing refcount to %lu.\n", iface, refcount);
return refcount; return refcount;
} }
...@@ -60,7 +60,7 @@ static ULONG STDMETHODCALLTYPE d2d_state_block_Release(ID2D1DrawingStateBlock1 * ...@@ -60,7 +60,7 @@ static ULONG STDMETHODCALLTYPE d2d_state_block_Release(ID2D1DrawingStateBlock1 *
struct d2d_state_block *state_block = impl_from_ID2D1DrawingStateBlock1(iface); struct d2d_state_block *state_block = impl_from_ID2D1DrawingStateBlock1(iface);
ULONG refcount = InterlockedDecrement(&state_block->refcount); ULONG refcount = InterlockedDecrement(&state_block->refcount);
TRACE("%p decreasing refcount to %u.\n", iface, refcount); TRACE("%p decreasing refcount to %lu.\n", iface, refcount);
if (!refcount) if (!refcount)
{ {
......
...@@ -49,7 +49,7 @@ static ULONG STDMETHODCALLTYPE d2d_stroke_style_AddRef(ID2D1StrokeStyle1 *iface) ...@@ -49,7 +49,7 @@ static ULONG STDMETHODCALLTYPE d2d_stroke_style_AddRef(ID2D1StrokeStyle1 *iface)
struct d2d_stroke_style *style = impl_from_ID2D1StrokeStyle1(iface); struct d2d_stroke_style *style = impl_from_ID2D1StrokeStyle1(iface);
ULONG refcount = InterlockedIncrement(&style->refcount); ULONG refcount = InterlockedIncrement(&style->refcount);
TRACE("%p increasing refcount to %u.\n", iface, refcount); TRACE("%p increasing refcount to %lu.\n", iface, refcount);
return refcount; return refcount;
} }
...@@ -59,7 +59,7 @@ static ULONG STDMETHODCALLTYPE d2d_stroke_style_Release(ID2D1StrokeStyle1 *iface ...@@ -59,7 +59,7 @@ static ULONG STDMETHODCALLTYPE d2d_stroke_style_Release(ID2D1StrokeStyle1 *iface
struct d2d_stroke_style *style = impl_from_ID2D1StrokeStyle1(iface); struct d2d_stroke_style *style = impl_from_ID2D1StrokeStyle1(iface);
ULONG refcount = InterlockedDecrement(&style->refcount); ULONG refcount = InterlockedDecrement(&style->refcount);
TRACE("%p decreasing refcount to %u.\n", iface, refcount); TRACE("%p decreasing refcount to %lu.\n", iface, refcount);
if (!refcount) if (!refcount)
{ {
......
...@@ -43,7 +43,7 @@ static HRESULT d2d_wic_render_target_present(IUnknown *outer_unknown) ...@@ -43,7 +43,7 @@ static HRESULT d2d_wic_render_target_present(IUnknown *outer_unknown)
if (FAILED(hr = IDXGISurface_QueryInterface(render_target->dxgi_surface, if (FAILED(hr = IDXGISurface_QueryInterface(render_target->dxgi_surface,
&IID_ID3D10Resource, (void **)&src_resource))) &IID_ID3D10Resource, (void **)&src_resource)))
{ {
ERR("Failed to get source resource interface, hr %#x.\n", hr); ERR("Failed to get source resource interface, hr %#lx.\n", hr);
goto end; goto end;
} }
...@@ -58,27 +58,27 @@ static HRESULT d2d_wic_render_target_present(IUnknown *outer_unknown) ...@@ -58,27 +58,27 @@ static HRESULT d2d_wic_render_target_present(IUnknown *outer_unknown)
dst_rect.Height = render_target->height; dst_rect.Height = render_target->height;
if (FAILED(hr = IWICBitmap_Lock(render_target->bitmap, &dst_rect, WICBitmapLockWrite, &bitmap_lock))) if (FAILED(hr = IWICBitmap_Lock(render_target->bitmap, &dst_rect, WICBitmapLockWrite, &bitmap_lock)))
{ {
ERR("Failed to lock destination bitmap, hr %#x.\n", hr); ERR("Failed to lock destination bitmap, hr %#lx.\n", hr);
goto end; goto end;
} }
if (FAILED(hr = IWICBitmapLock_GetDataPointer(bitmap_lock, &dst_size, &dst))) if (FAILED(hr = IWICBitmapLock_GetDataPointer(bitmap_lock, &dst_size, &dst)))
{ {
ERR("Failed to get data pointer, hr %#x.\n", hr); ERR("Failed to get data pointer, hr %#lx.\n", hr);
IWICBitmapLock_Release(bitmap_lock); IWICBitmapLock_Release(bitmap_lock);
goto end; goto end;
} }
if (FAILED(hr = IWICBitmapLock_GetStride(bitmap_lock, &dst_pitch))) if (FAILED(hr = IWICBitmapLock_GetStride(bitmap_lock, &dst_pitch)))
{ {
ERR("Failed to get stride, hr %#x.\n", hr); ERR("Failed to get stride, hr %#lx.\n", hr);
IWICBitmapLock_Release(bitmap_lock); IWICBitmapLock_Release(bitmap_lock);
goto end; goto end;
} }
if (FAILED(hr = ID3D10Texture2D_Map(render_target->readback_texture, 0, D3D10_MAP_READ, 0, &mapped_texture))) if (FAILED(hr = ID3D10Texture2D_Map(render_target->readback_texture, 0, D3D10_MAP_READ, 0, &mapped_texture)))
{ {
ERR("Failed to map readback texture, hr %#x.\n", hr); ERR("Failed to map readback texture, hr %#lx.\n", hr);
IWICBitmapLock_Release(bitmap_lock); IWICBitmapLock_Release(bitmap_lock);
goto end; goto end;
} }
...@@ -113,7 +113,7 @@ static ULONG STDMETHODCALLTYPE d2d_wic_render_target_AddRef(IUnknown *iface) ...@@ -113,7 +113,7 @@ static ULONG STDMETHODCALLTYPE d2d_wic_render_target_AddRef(IUnknown *iface)
struct d2d_wic_render_target *render_target = impl_from_IUnknown(iface); struct d2d_wic_render_target *render_target = impl_from_IUnknown(iface);
ULONG refcount = InterlockedIncrement(&render_target->refcount); ULONG refcount = InterlockedIncrement(&render_target->refcount);
TRACE("%p increasing refcount to %u.\n", iface, refcount); TRACE("%p increasing refcount to %lu.\n", iface, refcount);
return refcount; return refcount;
} }
...@@ -123,7 +123,7 @@ static ULONG STDMETHODCALLTYPE d2d_wic_render_target_Release(IUnknown *iface) ...@@ -123,7 +123,7 @@ static ULONG STDMETHODCALLTYPE d2d_wic_render_target_Release(IUnknown *iface)
struct d2d_wic_render_target *render_target = impl_from_IUnknown(iface); struct d2d_wic_render_target *render_target = impl_from_IUnknown(iface);
ULONG refcount = InterlockedDecrement(&render_target->refcount); ULONG refcount = InterlockedDecrement(&render_target->refcount);
TRACE("%p decreasing refcount to %u.\n", iface, refcount); TRACE("%p decreasing refcount to %lu.\n", iface, refcount);
if (!refcount) if (!refcount)
{ {
...@@ -162,7 +162,7 @@ HRESULT d2d_wic_render_target_init(struct d2d_wic_render_target *render_target, ...@@ -162,7 +162,7 @@ HRESULT d2d_wic_render_target_init(struct d2d_wic_render_target *render_target,
if (FAILED(hr = IWICBitmap_GetSize(bitmap, &render_target->width, &render_target->height))) if (FAILED(hr = IWICBitmap_GetSize(bitmap, &render_target->width, &render_target->height)))
{ {
WARN("Failed to get bitmap dimensions, hr %#x.\n", hr); WARN("Failed to get bitmap dimensions, hr %#lx.\n", hr);
return hr; return hr;
} }
...@@ -178,7 +178,7 @@ HRESULT d2d_wic_render_target_init(struct d2d_wic_render_target *render_target, ...@@ -178,7 +178,7 @@ HRESULT d2d_wic_render_target_init(struct d2d_wic_render_target *render_target,
if (FAILED(hr = IWICBitmap_GetPixelFormat(bitmap, &bitmap_format))) if (FAILED(hr = IWICBitmap_GetPixelFormat(bitmap, &bitmap_format)))
{ {
WARN("Failed to get bitmap format, hr %#x.\n", hr); WARN("Failed to get bitmap format, hr %#lx.\n", hr);
return hr; return hr;
} }
...@@ -215,7 +215,7 @@ HRESULT d2d_wic_render_target_init(struct d2d_wic_render_target *render_target, ...@@ -215,7 +215,7 @@ HRESULT d2d_wic_render_target_init(struct d2d_wic_render_target *render_target,
if (FAILED(hr = ID3D10Device1_CreateTexture2D(d3d_device, &texture_desc, NULL, &texture))) if (FAILED(hr = ID3D10Device1_CreateTexture2D(d3d_device, &texture_desc, NULL, &texture)))
{ {
WARN("Failed to create texture, hr %#x.\n", hr); WARN("Failed to create texture, hr %#lx.\n", hr);
return hr; return hr;
} }
...@@ -223,7 +223,7 @@ HRESULT d2d_wic_render_target_init(struct d2d_wic_render_target *render_target, ...@@ -223,7 +223,7 @@ HRESULT d2d_wic_render_target_init(struct d2d_wic_render_target *render_target,
ID3D10Texture2D_Release(texture); ID3D10Texture2D_Release(texture);
if (FAILED(hr)) if (FAILED(hr))
{ {
WARN("Failed to get DXGI surface interface, hr %#x.\n", hr); WARN("Failed to get DXGI surface interface, hr %#lx.\n", hr);
return hr; return hr;
} }
...@@ -234,14 +234,14 @@ HRESULT d2d_wic_render_target_init(struct d2d_wic_render_target *render_target, ...@@ -234,14 +234,14 @@ HRESULT d2d_wic_render_target_init(struct d2d_wic_render_target *render_target,
if (FAILED(hr = ID3D10Device1_CreateTexture2D(d3d_device, &texture_desc, NULL, &render_target->readback_texture))) if (FAILED(hr = ID3D10Device1_CreateTexture2D(d3d_device, &texture_desc, NULL, &render_target->readback_texture)))
{ {
WARN("Failed to create readback texture, hr %#x.\n", hr); WARN("Failed to create readback texture, hr %#lx.\n", hr);
IDXGISurface_Release(render_target->dxgi_surface); IDXGISurface_Release(render_target->dxgi_surface);
return hr; return hr;
} }
if (FAILED(hr = ID3D10Device1_QueryInterface(d3d_device, &IID_IDXGIDevice, (void **)&dxgi_device))) if (FAILED(hr = ID3D10Device1_QueryInterface(d3d_device, &IID_IDXGIDevice, (void **)&dxgi_device)))
{ {
WARN("Failed to get DXGI device, hr %#x.\n", hr); WARN("Failed to get DXGI device, hr %#lx.\n", hr);
IDXGISurface_Release(render_target->dxgi_surface); IDXGISurface_Release(render_target->dxgi_surface);
return hr; return hr;
} }
...@@ -250,7 +250,7 @@ HRESULT d2d_wic_render_target_init(struct d2d_wic_render_target *render_target, ...@@ -250,7 +250,7 @@ HRESULT d2d_wic_render_target_init(struct d2d_wic_render_target *render_target,
IDXGIDevice_Release(dxgi_device); IDXGIDevice_Release(dxgi_device);
if (FAILED(hr)) if (FAILED(hr))
{ {
WARN("Failed to create D2D device, hr %#x.\n", hr); WARN("Failed to create D2D device, hr %#lx.\n", hr);
IDXGISurface_Release(render_target->dxgi_surface); IDXGISurface_Release(render_target->dxgi_surface);
return hr; return hr;
} }
...@@ -260,7 +260,7 @@ HRESULT d2d_wic_render_target_init(struct d2d_wic_render_target *render_target, ...@@ -260,7 +260,7 @@ HRESULT d2d_wic_render_target_init(struct d2d_wic_render_target *render_target,
ID2D1Device_Release(device); ID2D1Device_Release(device);
if (FAILED(hr)) if (FAILED(hr))
{ {
WARN("Failed to create DXGI surface render target, hr %#x.\n", hr); WARN("Failed to create DXGI surface render target, hr %#lx.\n", hr);
ID3D10Texture2D_Release(render_target->readback_texture); ID3D10Texture2D_Release(render_target->readback_texture);
IDXGISurface_Release(render_target->dxgi_surface); IDXGISurface_Release(render_target->dxgi_surface);
return hr; return hr;
...@@ -269,7 +269,7 @@ HRESULT d2d_wic_render_target_init(struct d2d_wic_render_target *render_target, ...@@ -269,7 +269,7 @@ HRESULT d2d_wic_render_target_init(struct d2d_wic_render_target *render_target,
if (FAILED(hr = IUnknown_QueryInterface(render_target->dxgi_inner, if (FAILED(hr = IUnknown_QueryInterface(render_target->dxgi_inner,
&IID_ID2D1RenderTarget, (void **)&render_target->dxgi_target))) &IID_ID2D1RenderTarget, (void **)&render_target->dxgi_target)))
{ {
WARN("Failed to retrieve ID2D1RenderTarget interface, hr %#x.\n", hr); WARN("Failed to retrieve ID2D1RenderTarget interface, hr %#lx.\n", hr);
IUnknown_Release(render_target->dxgi_inner); IUnknown_Release(render_target->dxgi_inner);
ID3D10Texture2D_Release(render_target->readback_texture); ID3D10Texture2D_Release(render_target->readback_texture);
IDXGISurface_Release(render_target->dxgi_surface); IDXGISurface_Release(render_target->dxgi_surface);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment