mirror of
https://github.com/reactos/wine.git
synced 2024-11-24 20:30:01 +00:00
ddraw: Get rid of copy_to_surfacedesc2().
This commit is contained in:
parent
69ebf9de54
commit
82d5f36c8b
@ -608,18 +608,6 @@ struct member_info
|
||||
|
||||
#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;
|
||||
|
||||
#endif
|
||||
|
@ -5620,7 +5620,7 @@ HRESULT ddraw_surface_create(struct ddraw *ddraw, const DDSURFACEDESC2 *surface_
|
||||
return E_OUTOFMEMORY;
|
||||
|
||||
texture->version = version;
|
||||
copy_to_surfacedesc2(&texture->surface_desc, surface_desc);
|
||||
texture->surface_desc = *surface_desc;
|
||||
desc = &texture->surface_desc;
|
||||
|
||||
/* Ensure DDSD_CAPS is always set. */
|
||||
|
Loading…
Reference in New Issue
Block a user