dxgi: Build without -DWINE_NO_LONG_TYPES.

Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Eric Pouech 2022-03-18 16:59:31 +01:00 committed by Alexandre Julliard
parent 51b05581bc
commit ee2ef012f7
8 changed files with 63 additions and 64 deletions

View file

@ -1,4 +1,3 @@
EXTRADEFS = -DWINE_NO_LONG_TYPES
MODULE = dxgi.dll MODULE = dxgi.dll
IMPORTLIB = dxgi IMPORTLIB = dxgi
IMPORTS = gdi32 dxguid uuid wined3d user32 win32u IMPORTS = gdi32 dxguid uuid wined3d user32 win32u

View file

@ -55,7 +55,7 @@ static ULONG STDMETHODCALLTYPE dxgi_adapter_AddRef(IWineDXGIAdapter *iface)
struct dxgi_adapter *adapter = impl_from_IWineDXGIAdapter(iface); struct dxgi_adapter *adapter = impl_from_IWineDXGIAdapter(iface);
ULONG refcount = InterlockedIncrement(&adapter->refcount); ULONG refcount = InterlockedIncrement(&adapter->refcount);
TRACE("%p increasing refcount to %u.\n", iface, refcount); TRACE("%p increasing refcount to %lu.\n", iface, refcount);
return refcount; return refcount;
} }
@ -65,7 +65,7 @@ static ULONG STDMETHODCALLTYPE dxgi_adapter_Release(IWineDXGIAdapter *iface)
struct dxgi_adapter *adapter = impl_from_IWineDXGIAdapter(iface); struct dxgi_adapter *adapter = impl_from_IWineDXGIAdapter(iface);
ULONG refcount = InterlockedDecrement(&adapter->refcount); ULONG refcount = InterlockedDecrement(&adapter->refcount);
TRACE("%p decreasing refcount to %u.\n", iface, refcount); TRACE("%p decreasing refcount to %lu.\n", iface, refcount);
if (!refcount) if (!refcount)
{ {
@ -165,7 +165,7 @@ static HRESULT dxgi_adapter_get_desc(struct dxgi_adapter *adapter, DXGI_ADAPTER_
if (!MultiByteToWideChar(CP_ACP, 0, description, -1, desc->Description, ARRAY_SIZE(description))) if (!MultiByteToWideChar(CP_ACP, 0, description, -1, desc->Description, ARRAY_SIZE(description)))
{ {
DWORD err = GetLastError(); DWORD err = GetLastError();
ERR("Failed to translate description %s (%#x).\n", debugstr_a(description), err); ERR("Failed to translate description %s (%#lx).\n", debugstr_a(description), err);
hr = E_FAIL; hr = E_FAIL;
} }
@ -285,7 +285,7 @@ static HRESULT STDMETHODCALLTYPE dxgi_adapter_RegisterHardwareContentProtectionT
static void STDMETHODCALLTYPE dxgi_adapter_UnregisterHardwareContentProtectionTeardownStatus( static void STDMETHODCALLTYPE dxgi_adapter_UnregisterHardwareContentProtectionTeardownStatus(
IWineDXGIAdapter *iface, DWORD cookie) IWineDXGIAdapter *iface, DWORD cookie)
{ {
FIXME("iface %p, cookie %#x stub!\n", iface, cookie); FIXME("iface %p, cookie %#lx stub!\n", iface, cookie);
} }
static HRESULT STDMETHODCALLTYPE dxgi_adapter_QueryVideoMemoryInfo(IWineDXGIAdapter *iface, static HRESULT STDMETHODCALLTYPE dxgi_adapter_QueryVideoMemoryInfo(IWineDXGIAdapter *iface,
@ -354,7 +354,7 @@ static HRESULT STDMETHODCALLTYPE dxgi_adapter_RegisterVideoMemoryBudgetChangeNot
static void STDMETHODCALLTYPE dxgi_adapter_UnregisterVideoMemoryBudgetChangeNotification( static void STDMETHODCALLTYPE dxgi_adapter_UnregisterVideoMemoryBudgetChangeNotification(
IWineDXGIAdapter *iface, DWORD cookie) IWineDXGIAdapter *iface, DWORD cookie)
{ {
FIXME("iface %p, cookie %#x stub!\n", iface, cookie); FIXME("iface %p, cookie %#lx stub!\n", iface, cookie);
} }
static HRESULT STDMETHODCALLTYPE dxgi_adapter_GetDesc3(IWineDXGIAdapter *iface, DXGI_ADAPTER_DESC3 *desc) static HRESULT STDMETHODCALLTYPE dxgi_adapter_GetDesc3(IWineDXGIAdapter *iface, DXGI_ADAPTER_DESC3 *desc)
@ -431,7 +431,7 @@ struct dxgi_adapter *unsafe_impl_from_IDXGIAdapter(IDXGIAdapter *iface)
return NULL; return NULL;
if (FAILED(hr = IDXGIAdapter_QueryInterface(iface, &IID_IWineDXGIAdapter, (void **)&wine_adapter))) if (FAILED(hr = IDXGIAdapter_QueryInterface(iface, &IID_IWineDXGIAdapter, (void **)&wine_adapter)))
{ {
ERR("Failed to get IWineDXGIAdapter interface, hr %#x.\n", hr); ERR("Failed to get IWineDXGIAdapter interface, hr %#lx.\n", hr);
return NULL; return NULL;
} }
assert(wine_adapter->lpVtbl == &dxgi_adapter_vtbl); assert(wine_adapter->lpVtbl == &dxgi_adapter_vtbl);

View file

@ -71,7 +71,7 @@ static ULONG STDMETHODCALLTYPE dxgi_device_AddRef(IWineDXGIDevice *iface)
struct dxgi_device *device = impl_from_IWineDXGIDevice(iface); struct dxgi_device *device = impl_from_IWineDXGIDevice(iface);
ULONG refcount = InterlockedIncrement(&device->refcount); ULONG refcount = InterlockedIncrement(&device->refcount);
TRACE("%p increasing refcount to %u\n", device, refcount); TRACE("%p increasing refcount to %lu\n", device, refcount);
return refcount; return refcount;
} }
@ -81,7 +81,7 @@ static ULONG STDMETHODCALLTYPE dxgi_device_Release(IWineDXGIDevice *iface)
struct dxgi_device *device = impl_from_IWineDXGIDevice(iface); struct dxgi_device *device = impl_from_IWineDXGIDevice(iface);
ULONG refcount = InterlockedDecrement(&device->refcount); ULONG refcount = InterlockedDecrement(&device->refcount);
TRACE("%p decreasing refcount to %u.\n", device, refcount); TRACE("%p decreasing refcount to %lu.\n", device, refcount);
if (!refcount) if (!refcount)
{ {
@ -141,7 +141,7 @@ static HRESULT STDMETHODCALLTYPE dxgi_device_GetParent(IWineDXGIDevice *iface, R
hr = IWineDXGIDevice_GetAdapter(iface, &adapter); hr = IWineDXGIDevice_GetAdapter(iface, &adapter);
if (FAILED(hr)) if (FAILED(hr))
{ {
ERR("Failed to get adapter, hr %#x.\n", hr); ERR("Failed to get adapter, hr %#lx.\n", hr);
return hr; return hr;
} }
@ -209,7 +209,7 @@ static HRESULT STDMETHODCALLTYPE dxgi_device_CreateSurface(IWineDXGIDevice *ifac
if (FAILED(hr = device_parent->ops->create_swapchain_texture(device_parent, if (FAILED(hr = device_parent->ops->create_swapchain_texture(device_parent,
NULL, &surface_desc, 0, &wined3d_texture))) NULL, &surface_desc, 0, &wined3d_texture)))
{ {
ERR("Failed to create surface, hr %#x.\n", hr); ERR("Failed to create surface, hr %#lx.\n", hr);
goto fail; goto fail;
} }
@ -344,7 +344,7 @@ static HRESULT STDMETHODCALLTYPE dxgi_device_create_surface(IWineDXGIDevice *ifa
if (FAILED(hr = dxgi_surface_init(object, (IDXGIDevice *)iface, outer, wined3d_texture))) if (FAILED(hr = dxgi_surface_init(object, (IDXGIDevice *)iface, outer, wined3d_texture)))
{ {
WARN("Failed to initialize surface, hr %#x.\n", hr); WARN("Failed to initialize surface, hr %#lx.\n", hr);
heap_free(object); heap_free(object);
return hr; return hr;
} }
@ -440,7 +440,7 @@ static HRESULT STDMETHODCALLTYPE dxgi_swapchain_factory_create_swapchain(IWineDX
if (FAILED(hr = dxgi_get_output_from_window(&dxgi_factory->IWineDXGIFactory_iface, window, &containing_output))) if (FAILED(hr = dxgi_get_output_from_window(&dxgi_factory->IWineDXGIFactory_iface, window, &containing_output)))
{ {
WARN("Failed to get output from window %p, hr %#x.\n", window, hr); WARN("Failed to get output from window %p, hr %#lx.\n", window, hr);
return hr; return hr;
} }
@ -458,7 +458,7 @@ static HRESULT STDMETHODCALLTYPE dxgi_swapchain_factory_create_swapchain(IWineDX
if (FAILED(hr = d3d11_swapchain_init(object, device, &wined3d_desc))) if (FAILED(hr = d3d11_swapchain_init(object, device, &wined3d_desc)))
{ {
WARN("Failed to initialise swapchain, hr %#x.\n", hr); WARN("Failed to initialise swapchain, hr %#lx.\n", hr);
heap_free(object); heap_free(object);
return hr; return hr;
} }
@ -517,7 +517,7 @@ HRESULT dxgi_device_init(struct dxgi_device *device, struct dxgi_device_layer *l
if (FAILED(hr = layer->create(layer->id, &layer_base, 0, if (FAILED(hr = layer->create(layer->id, &layer_base, 0,
device, &IID_IUnknown, (void **)&device->child_layer))) device, &IID_IUnknown, (void **)&device->child_layer)))
{ {
WARN("Failed to create device, returning %#x.\n", hr); WARN("Failed to create device, returning %#lx.\n", hr);
wined3d_private_store_cleanup(&device->private_store); wined3d_private_store_cleanup(&device->private_store);
wined3d_mutex_unlock(); wined3d_mutex_unlock();
return hr; return hr;
@ -540,7 +540,7 @@ HRESULT dxgi_device_init(struct dxgi_device *device, struct dxgi_device_layer *l
(const enum wined3d_feature_level *)feature_levels, level_count, (const enum wined3d_feature_level *)feature_levels, level_count,
wined3d_device_parent, &device->wined3d_device))) wined3d_device_parent, &device->wined3d_device)))
{ {
WARN("Failed to create a wined3d device, returning %#x.\n", hr); WARN("Failed to create a wined3d device, returning %#lx.\n", hr);
IUnknown_Release(device->child_layer); IUnknown_Release(device->child_layer);
wined3d_private_store_cleanup(&device->private_store); wined3d_private_store_cleanup(&device->private_store);
wined3d_mutex_unlock(); wined3d_mutex_unlock();
@ -579,7 +579,7 @@ HRESULT dxgi_device_init(struct dxgi_device *device, struct dxgi_device_layer *l
if (FAILED(hr = d3d11_swapchain_init(swapchain, device, &swapchain_desc))) if (FAILED(hr = d3d11_swapchain_init(swapchain, device, &swapchain_desc)))
{ {
WARN("Failed to initialize swapchain, hr %#x.\n", hr); WARN("Failed to initialize swapchain, hr %#lx.\n", hr);
heap_free(swapchain); heap_free(swapchain);
wined3d_device_decref(device->wined3d_device); wined3d_device_decref(device->wined3d_device);
IUnknown_Release(device->child_layer); IUnknown_Release(device->child_layer);

View file

@ -118,7 +118,7 @@ static HRESULT register_d3d10core_layers(HMODULE d3d10core)
hr = d3d11core_register_layers(); hr = d3d11core_register_layers();
if (FAILED(hr)) if (FAILED(hr))
{ {
ERR("Failed to register d3d11 layers, returning %#x.\n", hr); ERR("Failed to register d3d11 layers, returning %#lx.\n", hr);
FreeLibrary(mod); FreeLibrary(mod);
wined3d_mutex_unlock(); wined3d_mutex_unlock();
return hr; return hr;
@ -154,7 +154,7 @@ HRESULT WINAPI DXGID3D10CreateDevice(HMODULE d3d10core, IDXGIFactory *factory, I
hr = register_d3d10core_layers(d3d10core); hr = register_d3d10core_layers(d3d10core);
if (FAILED(hr)) if (FAILED(hr))
{ {
ERR("Failed to register d3d10core layers, returning %#x.\n", hr); ERR("Failed to register d3d10core layers, returning %#lx.\n", hr);
return hr; return hr;
} }
@ -194,7 +194,7 @@ HRESULT WINAPI DXGID3D10CreateDevice(HMODULE d3d10core, IDXGIFactory *factory, I
hr = dxgi_device_init(dxgi_device, &d3d10_layer, factory, adapter, feature_levels, level_count); hr = dxgi_device_init(dxgi_device, &d3d10_layer, factory, adapter, feature_levels, level_count);
if (FAILED(hr)) if (FAILED(hr))
{ {
WARN("Failed to initialize device, hr %#x.\n", hr); WARN("Failed to initialize device, hr %#lx.\n", hr);
heap_free(dxgi_device); heap_free(dxgi_device);
*device = NULL; *device = NULL;
return hr; return hr;

View file

@ -60,7 +60,7 @@ static ULONG STDMETHODCALLTYPE dxgi_factory_AddRef(IWineDXGIFactory *iface)
struct dxgi_factory *factory = impl_from_IWineDXGIFactory(iface); struct dxgi_factory *factory = impl_from_IWineDXGIFactory(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;
} }
@ -70,7 +70,7 @@ static ULONG STDMETHODCALLTYPE dxgi_factory_Release(IWineDXGIFactory *iface)
struct dxgi_factory *factory = impl_from_IWineDXGIFactory(iface); struct dxgi_factory *factory = impl_from_IWineDXGIFactory(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)
{ {
@ -353,7 +353,7 @@ static HRESULT STDMETHODCALLTYPE dxgi_factory_RegisterStereoStatusEvent(IWineDXG
static void STDMETHODCALLTYPE dxgi_factory_UnregisterStereoStatus(IWineDXGIFactory *iface, DWORD cookie) static void STDMETHODCALLTYPE dxgi_factory_UnregisterStereoStatus(IWineDXGIFactory *iface, DWORD cookie)
{ {
FIXME("iface %p, cookie %#x stub!\n", iface, cookie); FIXME("iface %p, cookie %#lx stub!\n", iface, cookie);
} }
static HRESULT STDMETHODCALLTYPE dxgi_factory_RegisterStereoStatusWindow(IWineDXGIFactory *iface, static HRESULT STDMETHODCALLTYPE dxgi_factory_RegisterStereoStatusWindow(IWineDXGIFactory *iface,
@ -375,7 +375,7 @@ static HRESULT STDMETHODCALLTYPE dxgi_factory_RegisterOcclusionStatusEvent(IWine
static void STDMETHODCALLTYPE dxgi_factory_UnregisterOcclusionStatus(IWineDXGIFactory *iface, DWORD cookie) static void STDMETHODCALLTYPE dxgi_factory_UnregisterOcclusionStatus(IWineDXGIFactory *iface, DWORD cookie)
{ {
FIXME("iface %p, cookie %#x stub!\n", iface, cookie); FIXME("iface %p, cookie %#lx stub!\n", iface, cookie);
} }
static HRESULT STDMETHODCALLTYPE dxgi_factory_CreateSwapChainForComposition(IWineDXGIFactory *iface, static HRESULT STDMETHODCALLTYPE dxgi_factory_CreateSwapChainForComposition(IWineDXGIFactory *iface,
@ -402,7 +402,7 @@ static HRESULT STDMETHODCALLTYPE dxgi_factory_EnumAdapterByLuid(IWineDXGIFactory
IDXGIAdapter1 *adapter1; IDXGIAdapter1 *adapter1;
HRESULT hr; HRESULT hr;
TRACE("iface %p, luid %08x:%08x, iid %s, adapter %p.\n", TRACE("iface %p, luid %08lx:%08lx, iid %s, adapter %p.\n",
iface, luid.HighPart, luid.LowPart, debugstr_guid(iid), adapter); iface, luid.HighPart, luid.LowPart, debugstr_guid(iid), adapter);
if (!adapter) if (!adapter)
@ -413,7 +413,7 @@ static HRESULT STDMETHODCALLTYPE dxgi_factory_EnumAdapterByLuid(IWineDXGIFactory
{ {
if (FAILED(hr = IDXGIAdapter1_GetDesc1(adapter1, &desc))) if (FAILED(hr = IDXGIAdapter1_GetDesc1(adapter1, &desc)))
{ {
WARN("Failed to get adapter %u desc, hr %#x.\n", adapter_index, hr); WARN("Failed to get adapter %u desc, hr %#lx.\n", adapter_index, hr);
++adapter_index; ++adapter_index;
continue; continue;
} }
@ -430,7 +430,7 @@ static HRESULT STDMETHODCALLTYPE dxgi_factory_EnumAdapterByLuid(IWineDXGIFactory
++adapter_index; ++adapter_index;
} }
if (hr != DXGI_ERROR_NOT_FOUND) if (hr != DXGI_ERROR_NOT_FOUND)
WARN("Failed to enumerate adapters, hr %#x.\n", hr); WARN("Failed to enumerate adapters, hr %#lx.\n", hr);
WARN("Adapter could not be found.\n"); WARN("Adapter could not be found.\n");
return DXGI_ERROR_NOT_FOUND; return DXGI_ERROR_NOT_FOUND;
@ -495,7 +495,7 @@ static HRESULT STDMETHODCALLTYPE dxgi_factory_RegisterAdaptersChangedEvent(IWine
static HRESULT STDMETHODCALLTYPE dxgi_factory_UnregisterAdaptersChangedEvent(IWineDXGIFactory *iface, static HRESULT STDMETHODCALLTYPE dxgi_factory_UnregisterAdaptersChangedEvent(IWineDXGIFactory *iface,
DWORD cookie) DWORD cookie)
{ {
FIXME("iface %p, cookie %#x stub!\n", iface, cookie); FIXME("iface %p, cookie %#lx stub!\n", iface, cookie);
return E_NOTIMPL; return E_NOTIMPL;
} }
@ -553,7 +553,7 @@ struct dxgi_factory *unsafe_impl_from_IDXGIFactory(IDXGIFactory *iface)
return NULL; return NULL;
if (FAILED(hr = IDXGIFactory_QueryInterface(iface, &IID_IWineDXGIFactory, (void **)&wine_factory))) if (FAILED(hr = IDXGIFactory_QueryInterface(iface, &IID_IWineDXGIFactory, (void **)&wine_factory)))
{ {
ERR("Failed to get IWineDXGIFactory interface, hr %#x.\n", hr); ERR("Failed to get IWineDXGIFactory interface, hr %#lx.\n", hr);
return NULL; return NULL;
} }
assert(wine_factory->lpVtbl == &dxgi_factory_vtbl); assert(wine_factory->lpVtbl == &dxgi_factory_vtbl);
@ -592,7 +592,7 @@ HRESULT dxgi_factory_create(REFIID riid, void **factory, BOOL extended)
if (FAILED(hr = dxgi_factory_init(object, extended))) if (FAILED(hr = dxgi_factory_init(object, extended)))
{ {
WARN("Failed to initialize factory, hr %#x.\n", hr); WARN("Failed to initialize factory, hr %#lx.\n", hr);
heap_free(object); heap_free(object);
return hr; return hr;
} }

View file

@ -146,7 +146,7 @@ static HRESULT dxgi_output_get_display_mode_list(struct dxgi_output *output,
if (FAILED(hr = wined3d_output_get_mode(output->wined3d_output, wined3d_format, if (FAILED(hr = wined3d_output_get_mode(output->wined3d_output, wined3d_format,
WINED3D_SCANLINE_ORDERING_UNKNOWN, i, &mode))) WINED3D_SCANLINE_ORDERING_UNKNOWN, i, &mode)))
{ {
WARN("Failed to get output mode %u, hr %#x.\n", i, hr); WARN("Failed to get output mode %u, hr %#lx.\n", i, hr);
wined3d_mutex_unlock(); wined3d_mutex_unlock();
return hr; return hr;
} }
@ -220,7 +220,7 @@ static ULONG STDMETHODCALLTYPE dxgi_output_AddRef(IDXGIOutput6 *iface)
struct dxgi_output *output = impl_from_IDXGIOutput6(iface); struct dxgi_output *output = impl_from_IDXGIOutput6(iface);
ULONG refcount = InterlockedIncrement(&output->refcount); ULONG refcount = InterlockedIncrement(&output->refcount);
TRACE("%p increasing refcount to %u.\n", output, refcount); TRACE("%p increasing refcount to %lu.\n", output, refcount);
return refcount; return refcount;
} }
@ -230,7 +230,7 @@ static ULONG STDMETHODCALLTYPE dxgi_output_Release(IDXGIOutput6 *iface)
struct dxgi_output *output = impl_from_IDXGIOutput6(iface); struct dxgi_output *output = impl_from_IDXGIOutput6(iface);
ULONG refcount = InterlockedDecrement(&output->refcount); ULONG refcount = InterlockedDecrement(&output->refcount);
TRACE("%p decreasing refcount to %u.\n", output, refcount); TRACE("%p decreasing refcount to %lu.\n", output, refcount);
if (!refcount) if (!refcount)
{ {
@ -303,7 +303,7 @@ static HRESULT STDMETHODCALLTYPE dxgi_output_GetDesc(IDXGIOutput6 *iface, DXGI_O
hr = wined3d_output_get_desc(output->wined3d_output, &wined3d_desc); hr = wined3d_output_get_desc(output->wined3d_output, &wined3d_desc);
if (FAILED(hr)) if (FAILED(hr))
{ {
WARN("Failed to get output desc, hr %#x.\n", hr); WARN("Failed to get output desc, hr %#lx.\n", hr);
wined3d_mutex_unlock(); wined3d_mutex_unlock();
return hr; return hr;
} }
@ -311,7 +311,7 @@ static HRESULT STDMETHODCALLTYPE dxgi_output_GetDesc(IDXGIOutput6 *iface, DXGI_O
hr = wined3d_output_get_display_mode(output->wined3d_output, &mode, &rotation); hr = wined3d_output_get_display_mode(output->wined3d_output, &mode, &rotation);
if (FAILED(hr)) if (FAILED(hr))
{ {
WARN("Failed to get output display mode, hr %#x.\n", hr); WARN("Failed to get output display mode, hr %#lx.\n", hr);
wined3d_mutex_unlock(); wined3d_mutex_unlock();
return hr; return hr;
} }
@ -610,7 +610,7 @@ static HRESULT STDMETHODCALLTYPE dxgi_output_GetDesc1(IDXGIOutput6 *iface,
hr = wined3d_output_get_desc(output->wined3d_output, &wined3d_desc); hr = wined3d_output_get_desc(output->wined3d_output, &wined3d_desc);
if (FAILED(hr)) if (FAILED(hr))
{ {
WARN("Failed to get output desc, hr %#x.\n", hr); WARN("Failed to get output desc, hr %#lx.\n", hr);
wined3d_mutex_unlock(); wined3d_mutex_unlock();
return hr; return hr;
} }
@ -618,7 +618,7 @@ static HRESULT STDMETHODCALLTYPE dxgi_output_GetDesc1(IDXGIOutput6 *iface,
hr = wined3d_output_get_display_mode(output->wined3d_output, &mode, &rotation); hr = wined3d_output_get_display_mode(output->wined3d_output, &mode, &rotation);
if (FAILED(hr)) if (FAILED(hr))
{ {
WARN("Failed to get output display mode, hr %#x.\n", hr); WARN("Failed to get output display mode, hr %#lx.\n", hr);
wined3d_mutex_unlock(); wined3d_mutex_unlock();
return hr; return hr;
} }
@ -626,7 +626,7 @@ static HRESULT STDMETHODCALLTYPE dxgi_output_GetDesc1(IDXGIOutput6 *iface,
if (FAILED(hr)) if (FAILED(hr))
{ {
WARN("Failed to get output desc, hr %#x.\n", hr); WARN("Failed to get output desc, hr %#lx.\n", hr);
return hr; return hr;
} }

View file

@ -56,7 +56,7 @@ static ULONG STDMETHODCALLTYPE dxgi_surface_inner_AddRef(IUnknown *iface)
struct dxgi_surface *surface = impl_from_IUnknown(iface); struct dxgi_surface *surface = impl_from_IUnknown(iface);
ULONG refcount = InterlockedIncrement(&surface->refcount); ULONG refcount = InterlockedIncrement(&surface->refcount);
TRACE("%p increasing refcount to %u.\n", surface, refcount); TRACE("%p increasing refcount to %lu.\n", surface, refcount);
return refcount; return refcount;
} }
@ -66,7 +66,7 @@ static ULONG STDMETHODCALLTYPE dxgi_surface_inner_Release(IUnknown *iface)
struct dxgi_surface *surface = impl_from_IUnknown(iface); struct dxgi_surface *surface = impl_from_IUnknown(iface);
ULONG refcount = InterlockedDecrement(&surface->refcount); ULONG refcount = InterlockedDecrement(&surface->refcount);
TRACE("%p decreasing refcount to %u.\n", surface, refcount); TRACE("%p decreasing refcount to %lu.\n", surface, refcount);
if (!refcount) if (!refcount)
{ {

View file

@ -123,7 +123,7 @@ HRESULT dxgi_get_output_from_window(IWineDXGIFactory *factory, HWND window, IDXG
{ {
if (FAILED(hr = IDXGIOutput_GetDesc(output, &desc))) if (FAILED(hr = IDXGIOutput_GetDesc(output, &desc)))
{ {
WARN("Adapter %u output %u: Failed to get output desc, hr %#x.\n", adapter_idx, WARN("Adapter %u output %u: Failed to get output desc, hr %#lx.\n", adapter_idx,
output_idx, hr); output_idx, hr);
IDXGIOutput_Release(output); IDXGIOutput_Release(output);
continue; continue;
@ -142,7 +142,7 @@ HRESULT dxgi_get_output_from_window(IWineDXGIFactory *factory, HWND window, IDXG
} }
if (hr != DXGI_ERROR_NOT_FOUND) if (hr != DXGI_ERROR_NOT_FOUND)
WARN("Failed to enumerate outputs, hr %#x.\n", hr); WARN("Failed to enumerate outputs, hr %#lx.\n", hr);
WARN("Output could not be found.\n"); WARN("Output could not be found.\n");
return DXGI_ERROR_NOT_FOUND; return DXGI_ERROR_NOT_FOUND;
@ -213,7 +213,7 @@ static ULONG STDMETHODCALLTYPE d3d11_swapchain_AddRef(IDXGISwapChain1 *iface)
struct d3d11_swapchain *swapchain = d3d11_swapchain_from_IDXGISwapChain1(iface); struct d3d11_swapchain *swapchain = d3d11_swapchain_from_IDXGISwapChain1(iface);
ULONG refcount = InterlockedIncrement(&swapchain->refcount); ULONG refcount = InterlockedIncrement(&swapchain->refcount);
TRACE("%p increasing refcount to %u.\n", swapchain, refcount); TRACE("%p increasing refcount to %lu.\n", swapchain, refcount);
if (refcount == 1) if (refcount == 1)
wined3d_swapchain_incref(swapchain->wined3d_swapchain); wined3d_swapchain_incref(swapchain->wined3d_swapchain);
@ -226,7 +226,7 @@ static ULONG STDMETHODCALLTYPE d3d11_swapchain_Release(IDXGISwapChain1 *iface)
struct d3d11_swapchain *swapchain = d3d11_swapchain_from_IDXGISwapChain1(iface); struct d3d11_swapchain *swapchain = d3d11_swapchain_from_IDXGISwapChain1(iface);
ULONG refcount = InterlockedDecrement(&swapchain->refcount); ULONG refcount = InterlockedDecrement(&swapchain->refcount);
TRACE("%p decreasing refcount to %u.\n", swapchain, refcount); TRACE("%p decreasing refcount to %lu.\n", swapchain, refcount);
if (!refcount) if (!refcount)
{ {
@ -399,7 +399,7 @@ static HRESULT STDMETHODCALLTYPE DECLSPEC_HOTPATCH d3d11_swapchain_SetFullscreen
} }
else if (FAILED(hr = IDXGISwapChain1_GetContainingOutput(iface, &target))) else if (FAILED(hr = IDXGISwapChain1_GetContainingOutput(iface, &target)))
{ {
WARN("Failed to get target output for swapchain, hr %#x.\n", hr); WARN("Failed to get target output for swapchain, hr %#lx.\n", hr);
return hr; return hr;
} }
dxgi_output = unsafe_impl_from_IDXGIOutput(target); dxgi_output = unsafe_impl_from_IDXGIOutput(target);
@ -849,7 +849,7 @@ HRESULT d3d11_swapchain_init(struct d3d11_swapchain *swapchain, struct dxgi_devi
if (FAILED(hr = IWineDXGIAdapter_GetParent(device->adapter, if (FAILED(hr = IWineDXGIAdapter_GetParent(device->adapter,
&IID_IWineDXGIFactory, (void **)&swapchain->factory))) &IID_IWineDXGIFactory, (void **)&swapchain->factory)))
{ {
WARN("Failed to get adapter parent, hr %#x.\n", hr); WARN("Failed to get adapter parent, hr %#lx.\n", hr);
return hr; return hr;
} }
IWineDXGIDevice_AddRef(swapchain->device = &device->IWineDXGIDevice_iface); IWineDXGIDevice_AddRef(swapchain->device = &device->IWineDXGIDevice_iface);
@ -874,7 +874,7 @@ HRESULT d3d11_swapchain_init(struct d3d11_swapchain *swapchain, struct dxgi_devi
if (FAILED(hr = wined3d_swapchain_create(device->wined3d_device, desc, &swapchain->state_parent, if (FAILED(hr = wined3d_swapchain_create(device->wined3d_device, desc, &swapchain->state_parent,
swapchain, &d3d11_swapchain_wined3d_parent_ops, &swapchain->wined3d_swapchain))) swapchain, &d3d11_swapchain_wined3d_parent_ops, &swapchain->wined3d_swapchain)))
{ {
WARN("Failed to create wined3d swapchain, hr %#x.\n", hr); WARN("Failed to create wined3d swapchain, hr %#lx.\n", hr);
goto cleanup; goto cleanup;
} }
@ -889,14 +889,14 @@ HRESULT d3d11_swapchain_init(struct d3d11_swapchain *swapchain, struct dxgi_devi
if (FAILED(hr = IDXGISwapChain1_GetContainingOutput(&swapchain->IDXGISwapChain1_iface, if (FAILED(hr = IDXGISwapChain1_GetContainingOutput(&swapchain->IDXGISwapChain1_iface,
&swapchain->target))) &swapchain->target)))
{ {
WARN("Failed to get target output for fullscreen swapchain, hr %#x.\n", hr); WARN("Failed to get target output for fullscreen swapchain, hr %#lx.\n", hr);
wined3d_swapchain_decref(swapchain->wined3d_swapchain); wined3d_swapchain_decref(swapchain->wined3d_swapchain);
goto cleanup; goto cleanup;
} }
if (FAILED(hr = wined3d_swapchain_state_set_fullscreen(state, desc, NULL))) if (FAILED(hr = wined3d_swapchain_state_set_fullscreen(state, desc, NULL)))
{ {
WARN("Failed to set fullscreen state, hr %#x.\n", hr); WARN("Failed to set fullscreen state, hr %#lx.\n", hr);
IDXGIOutput_Release(swapchain->target); IDXGIOutput_Release(swapchain->target);
wined3d_swapchain_decref(swapchain->wined3d_swapchain); wined3d_swapchain_decref(swapchain->wined3d_swapchain);
goto cleanup; goto cleanup;
@ -1537,7 +1537,7 @@ static HRESULT d3d12_swapchain_create_buffers(struct d3d12_swapchain *swapchain,
if (FAILED(hr = vkd3d_create_image_resource(device, &resource_info, &swapchain->buffers[i]))) if (FAILED(hr = vkd3d_create_image_resource(device, &resource_info, &swapchain->buffers[i])))
{ {
WARN("Failed to create vkd3d resource for Vulkan image %u, hr %#x.\n", i, hr); WARN("Failed to create vkd3d resource for Vulkan image %u, hr %#lx.\n", i, hr);
return hr; return hr;
} }
@ -1769,7 +1769,7 @@ static HRESULT d3d12_swapchain_recreate_vulkan_swapchain(struct d3d12_swapchain
} }
else else
{ {
ERR("Failed to recreate Vulkan swapchain, hr %#x.\n", hr); ERR("Failed to recreate Vulkan swapchain, hr %#lx.\n", hr);
} }
return hr; return hr;
@ -1811,7 +1811,7 @@ static ULONG STDMETHODCALLTYPE d3d12_swapchain_AddRef(IDXGISwapChain4 *iface)
struct d3d12_swapchain *swapchain = d3d12_swapchain_from_IDXGISwapChain4(iface); struct d3d12_swapchain *swapchain = d3d12_swapchain_from_IDXGISwapChain4(iface);
ULONG refcount = InterlockedIncrement(&swapchain->refcount); ULONG refcount = InterlockedIncrement(&swapchain->refcount);
TRACE("%p increasing refcount to %u.\n", swapchain, refcount); TRACE("%p increasing refcount to %lu.\n", swapchain, refcount);
return refcount; return refcount;
} }
@ -1865,7 +1865,7 @@ static ULONG STDMETHODCALLTYPE d3d12_swapchain_Release(IDXGISwapChain4 *iface)
struct d3d12_swapchain *swapchain = d3d12_swapchain_from_IDXGISwapChain4(iface); struct d3d12_swapchain *swapchain = d3d12_swapchain_from_IDXGISwapChain4(iface);
ULONG refcount = InterlockedDecrement(&swapchain->refcount); ULONG refcount = InterlockedDecrement(&swapchain->refcount);
TRACE("%p decreasing refcount to %u.\n", swapchain, refcount); TRACE("%p decreasing refcount to %lu.\n", swapchain, refcount);
if (!refcount) if (!refcount)
{ {
@ -2106,14 +2106,14 @@ static HRESULT d3d12_swapchain_present(struct d3d12_swapchain *swapchain,
if (FAILED(hr = ID3D12CommandQueue_Signal(swapchain->command_queue, if (FAILED(hr = ID3D12CommandQueue_Signal(swapchain->command_queue,
swapchain->frame_latency_fence, swapchain->frame_number))) swapchain->frame_latency_fence, swapchain->frame_number)))
{ {
ERR("Failed to signal frame latency fence, hr %#x.\n", hr); ERR("Failed to signal frame latency fence, hr %#lx.\n", hr);
return hr; return hr;
} }
if (FAILED(hr = ID3D12Fence_SetEventOnCompletion(swapchain->frame_latency_fence, if (FAILED(hr = ID3D12Fence_SetEventOnCompletion(swapchain->frame_latency_fence,
swapchain->frame_number - swapchain->frame_latency, frame_latency_event))) swapchain->frame_number - swapchain->frame_latency, frame_latency_event)))
{ {
ERR("Failed to enqueue frame latency event, hr %#x.\n", hr); ERR("Failed to enqueue frame latency event, hr %#lx.\n", hr);
return hr; return hr;
} }
} }
@ -2189,7 +2189,7 @@ static HRESULT STDMETHODCALLTYPE DECLSPEC_HOTPATCH d3d12_swapchain_SetFullscreen
} }
else if (FAILED(hr = IDXGISwapChain4_GetContainingOutput(iface, &target))) else if (FAILED(hr = IDXGISwapChain4_GetContainingOutput(iface, &target)))
{ {
WARN("Failed to get target output for swapchain, hr %#x.\n", hr); WARN("Failed to get target output for swapchain, hr %#lx.\n", hr);
return hr; return hr;
} }
@ -2312,7 +2312,7 @@ static HRESULT d3d12_swapchain_resize_buffers(struct d3d12_swapchain *swapchain,
ID3D12Resource_AddRef(swapchain->buffers[i]); ID3D12Resource_AddRef(swapchain->buffers[i]);
if ((refcount = ID3D12Resource_Release(swapchain->buffers[i]))) if ((refcount = ID3D12Resource_Release(swapchain->buffers[i])))
{ {
WARN("Buffer %p has %u references left.\n", swapchain->buffers[i], refcount); WARN("Buffer %p has %lu references left.\n", swapchain->buffers[i], refcount);
return DXGI_ERROR_INVALID_CALL; return DXGI_ERROR_INVALID_CALL;
} }
} }
@ -2328,7 +2328,7 @@ static HRESULT d3d12_swapchain_resize_buffers(struct d3d12_swapchain *swapchain,
if (!GetClientRect(swapchain->window, &client_rect)) if (!GetClientRect(swapchain->window, &client_rect))
{ {
WARN("Failed to get client rect, last error %#x.\n", GetLastError()); WARN("Failed to get client rect, last error %#lx.\n", GetLastError());
return DXGI_ERROR_INVALID_CALL; return DXGI_ERROR_INVALID_CALL;
} }
@ -2397,13 +2397,13 @@ static HRESULT STDMETHODCALLTYPE d3d12_swapchain_GetContainingOutput(IDXGISwapCh
if (FAILED(hr = IUnknown_QueryInterface(device_parent, &IID_IDXGIAdapter, (void **)&adapter))) if (FAILED(hr = IUnknown_QueryInterface(device_parent, &IID_IDXGIAdapter, (void **)&adapter)))
{ {
WARN("Failed to get adapter, hr %#x.\n", hr); WARN("Failed to get adapter, hr %#lx.\n", hr);
return hr; return hr;
} }
if (FAILED(hr = IDXGIAdapter_GetParent(adapter, &IID_IWineDXGIFactory, (void **)&factory))) if (FAILED(hr = IDXGIAdapter_GetParent(adapter, &IID_IWineDXGIFactory, (void **)&factory)))
{ {
WARN("Failed to get factory, hr %#x.\n", hr); WARN("Failed to get factory, hr %#lx.\n", hr);
IDXGIAdapter_Release(adapter); IDXGIAdapter_Release(adapter);
return hr; return hr;
} }
@ -2921,7 +2921,7 @@ static HRESULT d3d12_swapchain_init(struct d3d12_swapchain *swapchain, IWineDXGI
if (FAILED(hr = dxgi_get_output_from_window(factory, window, &output))) if (FAILED(hr = dxgi_get_output_from_window(factory, window, &output)))
{ {
WARN("Failed to get output from window %p, hr %#x.\n", window, hr); WARN("Failed to get output from window %p, hr %#lx.\n", window, hr);
return hr; return hr;
} }
@ -3047,7 +3047,7 @@ static HRESULT d3d12_swapchain_init(struct d3d12_swapchain *swapchain, IWineDXGI
if (FAILED(hr = ID3D12Device_CreateFence(device, DXGI_MAX_SWAP_CHAIN_BUFFERS, if (FAILED(hr = ID3D12Device_CreateFence(device, DXGI_MAX_SWAP_CHAIN_BUFFERS,
0, &IID_ID3D12Fence, (void **)&swapchain->frame_latency_fence))) 0, &IID_ID3D12Fence, (void **)&swapchain->frame_latency_fence)))
{ {
WARN("Failed to create frame latency fence, hr %#x.\n", hr); WARN("Failed to create frame latency fence, hr %#lx.\n", hr);
d3d12_swapchain_destroy(swapchain); d3d12_swapchain_destroy(swapchain);
return hr; return hr;
} }
@ -3055,7 +3055,7 @@ static HRESULT d3d12_swapchain_init(struct d3d12_swapchain *swapchain, IWineDXGI
if (!(swapchain->frame_latency_event = CreateEventW(NULL, FALSE, TRUE, NULL))) if (!(swapchain->frame_latency_event = CreateEventW(NULL, FALSE, TRUE, NULL)))
{ {
hr = HRESULT_FROM_WIN32(GetLastError()); hr = HRESULT_FROM_WIN32(GetLastError());
WARN("Failed to create frame latency event, hr %#x.\n", hr); WARN("Failed to create frame latency event, hr %#lx.\n", hr);
d3d12_swapchain_destroy(swapchain); d3d12_swapchain_destroy(swapchain);
return hr; return hr;
} }
@ -3090,7 +3090,7 @@ HRESULT d3d12_swapchain_create(IWineDXGIFactory *factory, ID3D12CommandQueue *qu
if (FAILED(hr = ID3D12CommandQueue_GetDevice(queue, &IID_ID3D12Device, (void **)&device))) if (FAILED(hr = ID3D12CommandQueue_GetDevice(queue, &IID_ID3D12Device, (void **)&device)))
{ {
ERR("Failed to get D3D12 device, hr %#x.\n", hr); ERR("Failed to get d3d12 device, hr %#lx.\n", hr);
heap_free(object); heap_free(object);
return hr; return hr;
} }