Commit 82d5f36c authored by Henri Verbeet's avatar Henri Verbeet Committed by Alexandre Julliard

ddraw: Get rid of copy_to_surfacedesc2().

parent 69ebf9de
...@@ -608,18 +608,6 @@ struct member_info ...@@ -608,18 +608,6 @@ struct member_info
#define DD_STRUCT_COPY_BYSIZE(to,from) DD_STRUCT_COPY_BYSIZE_(to,from,(from)->dwSize) #define DD_STRUCT_COPY_BYSIZE(to,from) DD_STRUCT_COPY_BYSIZE_(to,from,(from)->dwSize)
#define SIZEOF_END_PADDING(type, last_field) \
(sizeof(type) - offsetof(type, last_field) - sizeof(((type *)0)->last_field))
static inline void copy_to_surfacedesc2(DDSURFACEDESC2 *to, const DDSURFACEDESC2 *from)
{
DWORD from_size = from->dwSize;
if (from_size == sizeof(DDSURFACEDESC))
from_size -= SIZEOF_END_PADDING(DDSURFACEDESC, ddsCaps);
to->dwSize = sizeof(DDSURFACEDESC2); /* for struct copy */
DD_STRUCT_COPY_BYSIZE_(to, from, from_size);
}
HRESULT hr_ddraw_from_wined3d(HRESULT hr) DECLSPEC_HIDDEN; HRESULT hr_ddraw_from_wined3d(HRESULT hr) DECLSPEC_HIDDEN;
#endif #endif
...@@ -5620,7 +5620,7 @@ HRESULT ddraw_surface_create(struct ddraw *ddraw, const DDSURFACEDESC2 *surface_ ...@@ -5620,7 +5620,7 @@ HRESULT ddraw_surface_create(struct ddraw *ddraw, const DDSURFACEDESC2 *surface_
return E_OUTOFMEMORY; return E_OUTOFMEMORY;
texture->version = version; texture->version = version;
copy_to_surfacedesc2(&texture->surface_desc, surface_desc); texture->surface_desc = *surface_desc;
desc = &texture->surface_desc; desc = &texture->surface_desc;
/* Ensure DDSD_CAPS is always set. */ /* Ensure DDSD_CAPS is always set. */
......
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