diff --git a/libs/vkd3d/device.c b/libs/vkd3d/device.c index 859600ac..3f63e604 100644 --- a/libs/vkd3d/device.c +++ b/libs/vkd3d/device.c @@ -2563,7 +2563,7 @@ static HRESULT device_worker_stop(struct d3d12_device *device) static ULONG STDMETHODCALLTYPE d3d12_device_Release(ID3D12Device5 *iface) { struct d3d12_device *device = impl_from_ID3D12Device5(iface); - unsigned int refcount = InterlockedDecrement((LONG *)&device->refcount); + unsigned int refcount = vkd3d_atomic_decrement_u32(&device->refcount); TRACE("%p decreasing refcount to %u.\n", device, refcount);