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
e928f554
Commit
e928f554
authored
Mar 07, 2015
by
Francois Gouget
Committed by
Alexandre Julliard
Mar 08, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ddraw/tests: Fix compilation on systems that don't support nameless unions.
parent
09cd7cf3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
19 additions
and
19 deletions
+19
-19
ddraw4.c
dlls/ddraw/tests/ddraw4.c
+9
-9
ddraw7.c
dlls/ddraw/tests/ddraw7.c
+9
-9
visual.c
dlls/ddraw/tests/visual.c
+1
-1
No files found.
dlls/ddraw/tests/ddraw4.c
View file @
e928f554
...
...
@@ -2013,7 +2013,7 @@ static void test_ck_complex(void)
surface_desc
.
dwSize
=
sizeof
(
surface_desc
);
surface_desc
.
dwFlags
=
DDSD_CAPS
|
DDSD_BACKBUFFERCOUNT
;
surface_desc
.
ddsCaps
.
dwCaps
=
DDSCAPS_PRIMARYSURFACE
|
DDSCAPS_COMPLEX
|
DDSCAPS_FLIP
;
surface_desc
.
dwBackBufferCount
=
1
;
U5
(
surface_desc
)
.
dwBackBufferCount
=
1
;
hr
=
IDirectDraw4_CreateSurface
(
ddraw
,
&
surface_desc
,
&
surface
,
NULL
);
ok
(
SUCCEEDED
(
hr
),
"Failed to create surface, hr %#x.
\n
"
,
hr
);
...
...
@@ -4220,7 +4220,7 @@ static void test_coop_level_activateapp(void)
memset
(
&
ddsd
,
0
,
sizeof
(
ddsd
));
ddsd
.
dwSize
=
sizeof
(
ddsd
);
ddsd
.
dwFlags
=
DDSD_CAPS
|
DDSD_BACKBUFFERCOUNT
;
ddsd
.
dwBackBufferCount
=
1
;
U5
(
ddsd
)
.
dwBackBufferCount
=
1
;
ddsd
.
ddsCaps
.
dwCaps
=
DDSCAPS_PRIMARYSURFACE
|
DDSCAPS_COMPLEX
|
DDSCAPS_FLIP
;
hr
=
IDirectDraw4_CreateSurface
(
ddraw
,
&
ddsd
,
&
surface
,
NULL
);
ok
(
SUCCEEDED
(
hr
),
"Failed to create surface, hr %#x.
\n
"
,
hr
);
...
...
@@ -5234,7 +5234,7 @@ static void test_primary_caps(void)
if
(
test_data
[
i
].
back_buffer_count
!=
~
0u
)
surface_desc
.
dwFlags
|=
DDSD_BACKBUFFERCOUNT
;
surface_desc
.
ddsCaps
.
dwCaps
=
test_data
[
i
].
caps_in
;
surface_desc
.
dwBackBufferCount
=
test_data
[
i
].
back_buffer_count
;
U5
(
surface_desc
)
.
dwBackBufferCount
=
test_data
[
i
].
back_buffer_count
;
hr
=
IDirectDraw4_CreateSurface
(
ddraw
,
&
surface_desc
,
&
surface
,
NULL
);
ok
(
hr
==
test_data
[
i
].
hr
,
"Test %u: Got unexpected hr %#x, expected %#x.
\n
"
,
i
,
hr
,
test_data
[
i
].
hr
);
if
(
FAILED
(
hr
))
...
...
@@ -5528,7 +5528,7 @@ static void test_flip(void)
surface_desc
.
dwSize
=
sizeof
(
surface_desc
);
surface_desc
.
dwFlags
=
DDSD_CAPS
|
DDSD_BACKBUFFERCOUNT
;
surface_desc
.
ddsCaps
.
dwCaps
=
DDSCAPS_PRIMARYSURFACE
|
DDSCAPS_COMPLEX
|
DDSCAPS_FLIP
;
surface_desc
.
dwBackBufferCount
=
3
;
U5
(
surface_desc
)
.
dwBackBufferCount
=
3
;
hr
=
IDirectDraw4_CreateSurface
(
ddraw
,
&
surface_desc
,
&
primary
,
NULL
);
ok
(
SUCCEEDED
(
hr
),
"Failed to create surface, hr %#x.
\n
"
,
hr
);
...
...
@@ -5547,7 +5547,7 @@ static void test_flip(void)
surface_desc
.
dwSize
=
sizeof
(
surface_desc
);
hr
=
IDirectDrawSurface4_GetSurfaceDesc
(
backbuffer1
,
&
surface_desc
);
ok
(
SUCCEEDED
(
hr
),
"Failed to get surface desc, hr %#x.
\n
"
,
hr
);
ok
(
!
surface_desc
.
dwBackBufferCount
,
"Got unexpected back buffer count %u.
\n
"
,
surface_desc
.
dwBackBufferCount
);
ok
(
!
U5
(
surface_desc
).
dwBackBufferCount
,
"Got unexpected back buffer count %u.
\n
"
,
U5
(
surface_desc
)
.
dwBackBufferCount
);
ok
((
surface_desc
.
ddsCaps
.
dwCaps
&
~
placement
)
==
(
DDSCAPS_FLIP
|
DDSCAPS_COMPLEX
|
DDSCAPS_BACKBUFFER
),
"Got unexpected caps %#x.
\n
"
,
surface_desc
.
ddsCaps
.
dwCaps
);
...
...
@@ -5557,7 +5557,7 @@ static void test_flip(void)
surface_desc
.
dwSize
=
sizeof
(
surface_desc
);
hr
=
IDirectDrawSurface4_GetSurfaceDesc
(
backbuffer2
,
&
surface_desc
);
ok
(
SUCCEEDED
(
hr
),
"Failed to get surface desc, hr %#x.
\n
"
,
hr
);
ok
(
!
surface_desc
.
dwBackBufferCount
,
"Got unexpected back buffer count %u.
\n
"
,
surface_desc
.
dwBackBufferCount
);
ok
(
!
U5
(
surface_desc
).
dwBackBufferCount
,
"Got unexpected back buffer count %u.
\n
"
,
U5
(
surface_desc
)
.
dwBackBufferCount
);
ok
((
surface_desc
.
ddsCaps
.
dwCaps
&
~
placement
)
==
(
DDSCAPS_FLIP
|
DDSCAPS_COMPLEX
),
"Got unexpected caps %#x.
\n
"
,
surface_desc
.
ddsCaps
.
dwCaps
);
...
...
@@ -5567,7 +5567,7 @@ static void test_flip(void)
surface_desc
.
dwSize
=
sizeof
(
surface_desc
);
hr
=
IDirectDrawSurface4_GetSurfaceDesc
(
backbuffer3
,
&
surface_desc
);
ok
(
SUCCEEDED
(
hr
),
"Failed to get surface desc, hr %#x.
\n
"
,
hr
);
ok
(
!
surface_desc
.
dwBackBufferCount
,
"Got unexpected back buffer count %u.
\n
"
,
surface_desc
.
dwBackBufferCount
);
ok
(
!
U5
(
surface_desc
).
dwBackBufferCount
,
"Got unexpected back buffer count %u.
\n
"
,
U5
(
surface_desc
)
.
dwBackBufferCount
);
ok
((
surface_desc
.
ddsCaps
.
dwCaps
&
~
placement
)
==
(
DDSCAPS_FLIP
|
DDSCAPS_COMPLEX
),
"Got unexpected caps %#x.
\n
"
,
surface_desc
.
ddsCaps
.
dwCaps
);
...
...
@@ -6153,7 +6153,7 @@ static void test_primary_palette(void)
surface_desc
.
dwSize
=
sizeof
(
surface_desc
);
surface_desc
.
dwFlags
=
DDSD_CAPS
|
DDSD_BACKBUFFERCOUNT
;
surface_desc
.
ddsCaps
.
dwCaps
=
DDSCAPS_PRIMARYSURFACE
|
DDSCAPS_COMPLEX
|
DDSCAPS_FLIP
;
surface_desc
.
dwBackBufferCount
=
1
;
U5
(
surface_desc
)
.
dwBackBufferCount
=
1
;
hr
=
IDirectDraw4_CreateSurface
(
ddraw
,
&
surface_desc
,
&
primary
,
NULL
);
ok
(
SUCCEEDED
(
hr
),
"Failed to create surface, hr %#x.
\n
"
,
hr
);
hr
=
IDirectDrawSurface4_GetAttachedSurface
(
primary
,
&
surface_caps
,
&
backbuffer
);
...
...
@@ -7923,7 +7923,7 @@ static void test_lost_device(void)
surface_desc
.
dwSize
=
sizeof
(
surface_desc
);
surface_desc
.
dwFlags
=
DDSD_CAPS
|
DDSD_BACKBUFFERCOUNT
;
surface_desc
.
ddsCaps
.
dwCaps
=
DDSCAPS_PRIMARYSURFACE
|
DDSCAPS_COMPLEX
|
DDSCAPS_FLIP
;
surface_desc
.
dwBackBufferCount
=
1
;
U5
(
surface_desc
)
.
dwBackBufferCount
=
1
;
hr
=
IDirectDraw4_CreateSurface
(
ddraw
,
&
surface_desc
,
&
surface
,
NULL
);
ok
(
SUCCEEDED
(
hr
),
"Failed to create surface, hr %#x.
\n
"
,
hr
);
...
...
dlls/ddraw/tests/ddraw7.c
View file @
e928f554
...
...
@@ -1690,7 +1690,7 @@ static void test_ck_complex(void)
surface_desc
.
dwSize
=
sizeof
(
surface_desc
);
surface_desc
.
dwFlags
=
DDSD_CAPS
|
DDSD_BACKBUFFERCOUNT
;
surface_desc
.
ddsCaps
.
dwCaps
=
DDSCAPS_PRIMARYSURFACE
|
DDSCAPS_COMPLEX
|
DDSCAPS_FLIP
;
surface_desc
.
dwBackBufferCount
=
1
;
U5
(
surface_desc
)
.
dwBackBufferCount
=
1
;
hr
=
IDirectDraw7_CreateSurface
(
ddraw
,
&
surface_desc
,
&
surface
,
NULL
);
ok
(
SUCCEEDED
(
hr
),
"Failed to create surface, hr %#x.
\n
"
,
hr
);
...
...
@@ -3988,7 +3988,7 @@ static void test_coop_level_activateapp(void)
memset
(
&
ddsd
,
0
,
sizeof
(
ddsd
));
ddsd
.
dwSize
=
sizeof
(
ddsd
);
ddsd
.
dwFlags
=
DDSD_CAPS
|
DDSD_BACKBUFFERCOUNT
;
ddsd
.
dwBackBufferCount
=
1
;
U5
(
ddsd
)
.
dwBackBufferCount
=
1
;
ddsd
.
ddsCaps
.
dwCaps
=
DDSCAPS_PRIMARYSURFACE
|
DDSCAPS_COMPLEX
|
DDSCAPS_FLIP
;
hr
=
IDirectDraw7_CreateSurface
(
ddraw
,
&
ddsd
,
&
surface
,
NULL
);
ok
(
SUCCEEDED
(
hr
),
"Failed to create surface, hr %#x.
\n
"
,
hr
);
...
...
@@ -5009,7 +5009,7 @@ static void test_primary_caps(void)
if
(
test_data
[
i
].
back_buffer_count
!=
~
0u
)
surface_desc
.
dwFlags
|=
DDSD_BACKBUFFERCOUNT
;
surface_desc
.
ddsCaps
.
dwCaps
=
test_data
[
i
].
caps_in
;
surface_desc
.
dwBackBufferCount
=
test_data
[
i
].
back_buffer_count
;
U5
(
surface_desc
)
.
dwBackBufferCount
=
test_data
[
i
].
back_buffer_count
;
hr
=
IDirectDraw7_CreateSurface
(
ddraw
,
&
surface_desc
,
&
surface
,
NULL
);
ok
(
hr
==
test_data
[
i
].
hr
,
"Test %u: Got unexpected hr %#x, expected %#x.
\n
"
,
i
,
hr
,
test_data
[
i
].
hr
);
if
(
FAILED
(
hr
))
...
...
@@ -5369,7 +5369,7 @@ static void test_flip(void)
surface_desc
.
dwSize
=
sizeof
(
surface_desc
);
surface_desc
.
dwFlags
=
DDSD_CAPS
|
DDSD_BACKBUFFERCOUNT
;
surface_desc
.
ddsCaps
.
dwCaps
=
DDSCAPS_PRIMARYSURFACE
|
DDSCAPS_COMPLEX
|
DDSCAPS_FLIP
;
surface_desc
.
dwBackBufferCount
=
3
;
U5
(
surface_desc
)
.
dwBackBufferCount
=
3
;
hr
=
IDirectDraw7_CreateSurface
(
ddraw
,
&
surface_desc
,
&
primary
,
NULL
);
ok
(
SUCCEEDED
(
hr
),
"Failed to create surface, hr %#x.
\n
"
,
hr
);
...
...
@@ -5388,7 +5388,7 @@ static void test_flip(void)
surface_desc
.
dwSize
=
sizeof
(
surface_desc
);
hr
=
IDirectDrawSurface7_GetSurfaceDesc
(
backbuffer1
,
&
surface_desc
);
ok
(
SUCCEEDED
(
hr
),
"Failed to get surface desc, hr %#x.
\n
"
,
hr
);
ok
(
!
surface_desc
.
dwBackBufferCount
,
"Got unexpected back buffer count %u.
\n
"
,
surface_desc
.
dwBackBufferCount
);
ok
(
!
U5
(
surface_desc
).
dwBackBufferCount
,
"Got unexpected back buffer count %u.
\n
"
,
U5
(
surface_desc
)
.
dwBackBufferCount
);
ok
((
surface_desc
.
ddsCaps
.
dwCaps
&
~
placement
)
==
(
DDSCAPS_FLIP
|
DDSCAPS_COMPLEX
|
DDSCAPS_BACKBUFFER
),
"Got unexpected caps %#x.
\n
"
,
surface_desc
.
ddsCaps
.
dwCaps
);
...
...
@@ -5398,7 +5398,7 @@ static void test_flip(void)
surface_desc
.
dwSize
=
sizeof
(
surface_desc
);
hr
=
IDirectDrawSurface7_GetSurfaceDesc
(
backbuffer2
,
&
surface_desc
);
ok
(
SUCCEEDED
(
hr
),
"Failed to get surface desc, hr %#x.
\n
"
,
hr
);
ok
(
!
surface_desc
.
dwBackBufferCount
,
"Got unexpected back buffer count %u.
\n
"
,
surface_desc
.
dwBackBufferCount
);
ok
(
!
U5
(
surface_desc
).
dwBackBufferCount
,
"Got unexpected back buffer count %u.
\n
"
,
U5
(
surface_desc
)
.
dwBackBufferCount
);
ok
((
surface_desc
.
ddsCaps
.
dwCaps
&
~
placement
)
==
(
DDSCAPS_FLIP
|
DDSCAPS_COMPLEX
),
"Got unexpected caps %#x.
\n
"
,
surface_desc
.
ddsCaps
.
dwCaps
);
...
...
@@ -5408,7 +5408,7 @@ static void test_flip(void)
surface_desc
.
dwSize
=
sizeof
(
surface_desc
);
hr
=
IDirectDrawSurface7_GetSurfaceDesc
(
backbuffer3
,
&
surface_desc
);
ok
(
SUCCEEDED
(
hr
),
"Failed to get surface desc, hr %#x.
\n
"
,
hr
);
ok
(
!
surface_desc
.
dwBackBufferCount
,
"Got unexpected back buffer count %u.
\n
"
,
surface_desc
.
dwBackBufferCount
);
ok
(
!
U5
(
surface_desc
).
dwBackBufferCount
,
"Got unexpected back buffer count %u.
\n
"
,
U5
(
surface_desc
)
.
dwBackBufferCount
);
ok
((
surface_desc
.
ddsCaps
.
dwCaps
&
~
placement
)
==
(
DDSCAPS_FLIP
|
DDSCAPS_COMPLEX
),
"Got unexpected caps %#x.
\n
"
,
surface_desc
.
ddsCaps
.
dwCaps
);
...
...
@@ -5993,7 +5993,7 @@ static void test_primary_palette(void)
surface_desc
.
dwSize
=
sizeof
(
surface_desc
);
surface_desc
.
dwFlags
=
DDSD_CAPS
|
DDSD_BACKBUFFERCOUNT
;
surface_desc
.
ddsCaps
.
dwCaps
=
DDSCAPS_PRIMARYSURFACE
|
DDSCAPS_COMPLEX
|
DDSCAPS_FLIP
;
surface_desc
.
dwBackBufferCount
=
1
;
U5
(
surface_desc
)
.
dwBackBufferCount
=
1
;
hr
=
IDirectDraw7_CreateSurface
(
ddraw
,
&
surface_desc
,
&
primary
,
NULL
);
ok
(
SUCCEEDED
(
hr
),
"Failed to create surface, hr %#x.
\n
"
,
hr
);
hr
=
IDirectDrawSurface7_GetAttachedSurface
(
primary
,
&
surface_caps
,
&
backbuffer
);
...
...
@@ -7644,7 +7644,7 @@ static void test_lost_device(void)
surface_desc
.
dwSize
=
sizeof
(
surface_desc
);
surface_desc
.
dwFlags
=
DDSD_CAPS
|
DDSD_BACKBUFFERCOUNT
;
surface_desc
.
ddsCaps
.
dwCaps
=
DDSCAPS_PRIMARYSURFACE
|
DDSCAPS_COMPLEX
|
DDSCAPS_FLIP
;
surface_desc
.
dwBackBufferCount
=
1
;
U5
(
surface_desc
)
.
dwBackBufferCount
=
1
;
hr
=
IDirectDraw7_CreateSurface
(
ddraw
,
&
surface_desc
,
&
surface
,
NULL
);
ok
(
SUCCEEDED
(
hr
),
"Failed to create surface, hr %#x.
\n
"
,
hr
);
...
...
dlls/ddraw/tests/visual.c
View file @
e928f554
...
...
@@ -130,7 +130,7 @@ static BOOL createObjects(void)
ddsd
.
dwSize
=
sizeof
(
ddsd
);
ddsd
.
dwFlags
=
DDSD_CAPS
;
ddsd
.
ddsCaps
.
dwCaps
=
DDSCAPS_PRIMARYSURFACE
|
DDSCAPS_3DDEVICE
;
ddsd
.
dwBackBufferCount
=
1
;
U5
(
ddsd
)
.
dwBackBufferCount
=
1
;
hr
=
IDirectDraw7_CreateSurface
(
DirectDraw
,
&
ddsd
,
&
Surface
,
NULL
);
if
(
FAILED
(
hr
))
goto
err
;
...
...
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