Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
081f3904
Commit
081f3904
authored
Aug 29, 2011
by
Stefan Dösinger
Committed by
Alexandre Julliard
Sep 12, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ddraw: Use a Z format suported by the driver in the visual test.
parent
0cea1703
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
5 deletions
+18
-5
visual.c
dlls/ddraw/tests/visual.c
+18
-5
No files found.
dlls/ddraw/tests/visual.c
View file @
081f3904
...
@@ -54,13 +54,24 @@ static BOOL color_match(D3DCOLOR c1, D3DCOLOR c2, BYTE max_diff)
...
@@ -54,13 +54,24 @@ static BOOL color_match(D3DCOLOR c1, D3DCOLOR c2, BYTE max_diff)
return
TRUE
;
return
TRUE
;
}
}
static
HRESULT
WINAPI
enum_z_fmt
(
DDPIXELFORMAT
*
fmt
,
void
*
ctx
)
{
DDPIXELFORMAT
*
zfmt
=
ctx
;
if
(
U1
(
fmt
)
->
dwZBufferBitDepth
>
U1
(
zfmt
)
->
dwZBufferBitDepth
)
{
*
zfmt
=
*
fmt
;
}
return
DDENUMRET_OK
;
}
static
BOOL
createObjects
(
void
)
static
BOOL
createObjects
(
void
)
{
{
HRESULT
hr
;
HRESULT
hr
;
HMODULE
hmod
=
GetModuleHandleA
(
"ddraw.dll"
);
HMODULE
hmod
=
GetModuleHandleA
(
"ddraw.dll"
);
WNDCLASS
wc
=
{
0
};
WNDCLASS
wc
=
{
0
};
DDSURFACEDESC2
ddsd
;
DDSURFACEDESC2
ddsd
;
DDPIXELFORMAT
zfmt
;
if
(
!
hmod
)
return
FALSE
;
if
(
!
hmod
)
return
FALSE
;
pDirectDrawCreateEx
=
(
void
*
)
GetProcAddress
(
hmod
,
"DirectDrawCreateEx"
);
pDirectDrawCreateEx
=
(
void
*
)
GetProcAddress
(
hmod
,
"DirectDrawCreateEx"
);
...
@@ -106,14 +117,16 @@ static BOOL createObjects(void)
...
@@ -106,14 +117,16 @@ static BOOL createObjects(void)
hr
=
IDirectDraw7_CreateSurface
(
DirectDraw
,
&
ddsd
,
&
Surface
,
NULL
);
hr
=
IDirectDraw7_CreateSurface
(
DirectDraw
,
&
ddsd
,
&
Surface
,
NULL
);
if
(
FAILED
(
hr
))
goto
err
;
if
(
FAILED
(
hr
))
goto
err
;
memset
(
&
zfmt
,
0
,
sizeof
(
zfmt
));
hr
=
IDirect3D7_EnumZBufferFormats
(
Direct3D
,
&
IID_IDirect3DTnLHalDevice
,
enum_z_fmt
,
&
zfmt
);
if
(
FAILED
(
hr
))
goto
err
;
if
(
zfmt
.
dwSize
==
0
)
goto
err
;
memset
(
&
ddsd
,
0
,
sizeof
(
ddsd
));
memset
(
&
ddsd
,
0
,
sizeof
(
ddsd
));
ddsd
.
dwSize
=
sizeof
(
ddsd
);
ddsd
.
dwSize
=
sizeof
(
ddsd
);
ddsd
.
dwFlags
=
DDSD_CAPS
|
DDSD_WIDTH
|
DDSD_HEIGHT
|
DDSD_PIXELFORMAT
;
ddsd
.
dwFlags
=
DDSD_CAPS
|
DDSD_WIDTH
|
DDSD_HEIGHT
|
DDSD_PIXELFORMAT
;
ddsd
.
ddsCaps
.
dwCaps
=
DDSCAPS_ZBUFFER
;
ddsd
.
ddsCaps
.
dwCaps
=
DDSCAPS_ZBUFFER
;
U4
(
ddsd
).
ddpfPixelFormat
.
dwSize
=
sizeof
(
U4
(
ddsd
).
ddpfPixelFormat
);
U4
(
ddsd
).
ddpfPixelFormat
=
zfmt
;
U4
(
ddsd
).
ddpfPixelFormat
.
dwFlags
=
DDPF_ZBUFFER
;
U1
(
U4
(
ddsd
).
ddpfPixelFormat
).
dwZBufferBitDepth
=
32
;
U3
(
U4
(
ddsd
).
ddpfPixelFormat
).
dwZBitMask
=
0x00ffffff
;
ddsd
.
dwWidth
=
640
;
ddsd
.
dwWidth
=
640
;
ddsd
.
dwHeight
=
480
;
ddsd
.
dwHeight
=
480
;
hr
=
IDirectDraw7_CreateSurface
(
DirectDraw
,
&
ddsd
,
&
depth_buffer
,
NULL
);
hr
=
IDirectDraw7_CreateSurface
(
DirectDraw
,
&
ddsd
,
&
depth_buffer
,
NULL
);
...
...
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