Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
4ca6d95a
Commit
4ca6d95a
authored
Jul 13, 2023
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ddrawex: Use nameless unions/structs.
parent
5eab460c
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
17 deletions
+16
-17
ddraw.c
dlls/ddrawex/ddraw.c
+16
-17
No files found.
dlls/ddrawex/ddraw.c
View file @
4ca6d95a
...
...
@@ -17,7 +17,6 @@
*/
#define COBJMACROS
#define NONAMELESSUNION
#include <stdarg.h>
#include "windef.h"
...
...
@@ -387,21 +386,21 @@ void DDSD_to_DDSD2(const DDSURFACEDESC *in, DDSURFACEDESC2 *out)
out
->
dwFlags
=
in
->
dwFlags
;
if
(
in
->
dwFlags
&
DDSD_WIDTH
)
out
->
dwWidth
=
in
->
dwWidth
;
if
(
in
->
dwFlags
&
DDSD_HEIGHT
)
out
->
dwHeight
=
in
->
dwHeight
;
if
(
in
->
dwFlags
&
DDSD_PIXELFORMAT
)
out
->
u4
.
ddpfPixelFormat
=
in
->
ddpfPixelFormat
;
if
(
in
->
dwFlags
&
DDSD_PIXELFORMAT
)
out
->
ddpfPixelFormat
=
in
->
ddpfPixelFormat
;
if
(
in
->
dwFlags
&
DDSD_CAPS
)
out
->
ddsCaps
.
dwCaps
=
in
->
ddsCaps
.
dwCaps
;
if
(
in
->
dwFlags
&
DDSD_PITCH
)
out
->
u1
.
lPitch
=
in
->
u1
.
lPitch
;
if
(
in
->
dwFlags
&
DDSD_BACKBUFFERCOUNT
)
out
->
u5
.
dwBackBufferCount
=
in
->
dwBackBufferCount
;
if
(
in
->
dwFlags
&
DDSD_ZBUFFERBITDEPTH
)
out
->
u2
.
dwMipMapCount
=
in
->
u2
.
dwZBufferBitDepth
;
/* same union */
if
(
in
->
dwFlags
&
DDSD_PITCH
)
out
->
lPitch
=
in
->
lPitch
;
if
(
in
->
dwFlags
&
DDSD_BACKBUFFERCOUNT
)
out
->
dwBackBufferCount
=
in
->
dwBackBufferCount
;
if
(
in
->
dwFlags
&
DDSD_ZBUFFERBITDEPTH
)
out
->
dwMipMapCount
=
in
->
dwZBufferBitDepth
;
/* same union */
if
(
in
->
dwFlags
&
DDSD_ALPHABITDEPTH
)
out
->
dwAlphaBitDepth
=
in
->
dwAlphaBitDepth
;
/* DDraw(native, and wine) does not set the DDSD_LPSURFACE, so always copy */
out
->
lpSurface
=
in
->
lpSurface
;
if
(
in
->
dwFlags
&
DDSD_CKDESTOVERLAY
)
out
->
u3
.
ddckCKDestOverlay
=
in
->
ddckCKDestOverlay
;
if
(
in
->
dwFlags
&
DDSD_CKDESTOVERLAY
)
out
->
ddckCKDestOverlay
=
in
->
ddckCKDestOverlay
;
if
(
in
->
dwFlags
&
DDSD_CKDESTBLT
)
out
->
ddckCKDestBlt
=
in
->
ddckCKDestBlt
;
if
(
in
->
dwFlags
&
DDSD_CKSRCOVERLAY
)
out
->
ddckCKSrcOverlay
=
in
->
ddckCKSrcOverlay
;
if
(
in
->
dwFlags
&
DDSD_CKSRCBLT
)
out
->
ddckCKSrcBlt
=
in
->
ddckCKSrcBlt
;
if
(
in
->
dwFlags
&
DDSD_MIPMAPCOUNT
)
out
->
u2
.
dwMipMapCount
=
in
->
u2
.
dwMipMapCount
;
if
(
in
->
dwFlags
&
DDSD_REFRESHRATE
)
out
->
u2
.
dwRefreshRate
=
in
->
u2
.
dwRefreshRate
;
if
(
in
->
dwFlags
&
DDSD_LINEARSIZE
)
out
->
u1
.
dwLinearSize
=
in
->
u1
.
dwLinearSize
;
if
(
in
->
dwFlags
&
DDSD_MIPMAPCOUNT
)
out
->
dwMipMapCount
=
in
->
dwMipMapCount
;
if
(
in
->
dwFlags
&
DDSD_REFRESHRATE
)
out
->
dwRefreshRate
=
in
->
dwRefreshRate
;
if
(
in
->
dwFlags
&
DDSD_LINEARSIZE
)
out
->
dwLinearSize
=
in
->
dwLinearSize
;
/* Does not exist in DDSURFACEDESC:
* DDSD_TEXTURESTAGE, DDSD_FVF, DDSD_SRCVBHANDLE,
*/
...
...
@@ -414,21 +413,21 @@ void DDSD2_to_DDSD(const DDSURFACEDESC2 *in, DDSURFACEDESC *out)
out
->
dwFlags
=
in
->
dwFlags
;
if
(
in
->
dwFlags
&
DDSD_WIDTH
)
out
->
dwWidth
=
in
->
dwWidth
;
if
(
in
->
dwFlags
&
DDSD_HEIGHT
)
out
->
dwHeight
=
in
->
dwHeight
;
if
(
in
->
dwFlags
&
DDSD_PIXELFORMAT
)
out
->
ddpfPixelFormat
=
in
->
u4
.
ddpfPixelFormat
;
if
(
in
->
dwFlags
&
DDSD_PIXELFORMAT
)
out
->
ddpfPixelFormat
=
in
->
ddpfPixelFormat
;
if
(
in
->
dwFlags
&
DDSD_CAPS
)
out
->
ddsCaps
.
dwCaps
=
in
->
ddsCaps
.
dwCaps
;
if
(
in
->
dwFlags
&
DDSD_PITCH
)
out
->
u1
.
lPitch
=
in
->
u1
.
lPitch
;
if
(
in
->
dwFlags
&
DDSD_BACKBUFFERCOUNT
)
out
->
dwBackBufferCount
=
in
->
u5
.
dwBackBufferCount
;
if
(
in
->
dwFlags
&
DDSD_ZBUFFERBITDEPTH
)
out
->
u2
.
dwZBufferBitDepth
=
in
->
u2
.
dwMipMapCount
;
/* same union */
if
(
in
->
dwFlags
&
DDSD_PITCH
)
out
->
lPitch
=
in
->
lPitch
;
if
(
in
->
dwFlags
&
DDSD_BACKBUFFERCOUNT
)
out
->
dwBackBufferCount
=
in
->
dwBackBufferCount
;
if
(
in
->
dwFlags
&
DDSD_ZBUFFERBITDEPTH
)
out
->
dwZBufferBitDepth
=
in
->
dwMipMapCount
;
/* same union */
if
(
in
->
dwFlags
&
DDSD_ALPHABITDEPTH
)
out
->
dwAlphaBitDepth
=
in
->
dwAlphaBitDepth
;
/* DDraw(native, and wine) does not set the DDSD_LPSURFACE, so always copy */
out
->
lpSurface
=
in
->
lpSurface
;
if
(
in
->
dwFlags
&
DDSD_CKDESTOVERLAY
)
out
->
ddckCKDestOverlay
=
in
->
u3
.
ddckCKDestOverlay
;
if
(
in
->
dwFlags
&
DDSD_CKDESTOVERLAY
)
out
->
ddckCKDestOverlay
=
in
->
ddckCKDestOverlay
;
if
(
in
->
dwFlags
&
DDSD_CKDESTBLT
)
out
->
ddckCKDestBlt
=
in
->
ddckCKDestBlt
;
if
(
in
->
dwFlags
&
DDSD_CKSRCOVERLAY
)
out
->
ddckCKSrcOverlay
=
in
->
ddckCKSrcOverlay
;
if
(
in
->
dwFlags
&
DDSD_CKSRCBLT
)
out
->
ddckCKSrcBlt
=
in
->
ddckCKSrcBlt
;
if
(
in
->
dwFlags
&
DDSD_MIPMAPCOUNT
)
out
->
u2
.
dwMipMapCount
=
in
->
u2
.
dwMipMapCount
;
if
(
in
->
dwFlags
&
DDSD_REFRESHRATE
)
out
->
u2
.
dwRefreshRate
=
in
->
u2
.
dwRefreshRate
;
if
(
in
->
dwFlags
&
DDSD_LINEARSIZE
)
out
->
u1
.
dwLinearSize
=
in
->
u1
.
dwLinearSize
;
if
(
in
->
dwFlags
&
DDSD_MIPMAPCOUNT
)
out
->
dwMipMapCount
=
in
->
dwMipMapCount
;
if
(
in
->
dwFlags
&
DDSD_REFRESHRATE
)
out
->
dwRefreshRate
=
in
->
dwRefreshRate
;
if
(
in
->
dwFlags
&
DDSD_LINEARSIZE
)
out
->
dwLinearSize
=
in
->
dwLinearSize
;
/* Does not exist in DDSURFACEDESC:
* DDSD_TEXTURESTAGE, DDSD_FVF, DDSD_SRCVBHANDLE,
*/
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment