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
ee13cc49
Commit
ee13cc49
authored
Mar 21, 2008
by
Stefan Dösinger
Committed by
Alexandre Julliard
Mar 27, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ddraw: Some EnumZBufferFormat fixes.
parent
8662bd75
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
43 additions
and
9 deletions
+43
-9
direct3d.c
dlls/ddraw/direct3d.c
+43
-9
No files found.
dlls/ddraw/direct3d.c
View file @
ee13cc49
...
...
@@ -1132,6 +1132,7 @@ IDirect3DImpl_7_EnumZBufferFormats(IDirect3D7 *iface,
HRESULT
hr
;
int
i
;
WINED3DDISPLAYMODE
d3ddm
;
WINED3DDEVTYPE
type
;
/* Order matters. Specifically, BattleZone II (full version) expects the
* 16-bit depth formats to be listed before the 24 and 32 ones. */
...
...
@@ -1146,23 +1147,56 @@ IDirect3DImpl_7_EnumZBufferFormats(IDirect3D7 *iface,
TRACE
(
"(%p)->(%s,%p,%p): Relay
\n
"
,
iface
,
debugstr_guid
(
refiidDevice
),
Callback
,
Context
);
if
(
IWineD3D_GetAdapterDisplayMode
(
This
->
wineD3D
,
WINED3DADAPTER_DEFAULT
,
&
d3ddm
)
!=
WINED3D_OK
)
{
ERR
(
"Unable to retrieve a default display mode for quering the z-buffer formats!
\n
"
);
return
DDERR_INVALIDPARAMS
;
}
if
(
!
Callback
)
return
DDERR_INVALIDPARAMS
;
if
(
IsEqualGUID
(
refiidDevice
,
&
IID_IDirect3DHALDevice
)
||
IsEqualGUID
(
refiidDevice
,
&
IID_IDirect3DTnLHalDevice
)
||
IsEqualGUID
(
refiidDevice
,
&
IID_D3DDEVICE_WineD3D
))
{
TRACE
(
"Asked for HAL device
\n
"
);
type
=
WINED3DDEVTYPE_HAL
;
}
else
if
(
IsEqualGUID
(
refiidDevice
,
&
IID_IDirect3DRGBDevice
)
||
IsEqualGUID
(
refiidDevice
,
&
IID_IDirect3DMMXDevice
))
{
TRACE
(
"Asked for SW device
\n
"
);
type
=
WINED3DDEVTYPE_SW
;
}
else
if
(
IsEqualGUID
(
refiidDevice
,
&
IID_IDirect3DRefDevice
))
{
TRACE
(
"Asked for REF device
\n
"
);
type
=
WINED3DDEVTYPE_REF
;
}
else
if
(
IsEqualGUID
(
refiidDevice
,
&
IID_IDirect3DNullDevice
))
{
TRACE
(
"Asked for NULLREF device
\n
"
);
type
=
WINED3DDEVTYPE_NULLREF
;
}
else
{
FIXME
(
"Unexpected device GUID %s
\n
"
,
debugstr_guid
(
refiidDevice
));
type
=
WINED3DDEVTYPE_HAL
;
}
EnterCriticalSection
(
&
ddraw_cs
);
for
(
i
=
0
;
i
<
sizeof
(
FormatList
)
/
sizeof
(
WINED3DFORMAT
);
i
++
)
/* We need an adapter format from somewhere to please wined3d and WGL. Use the current display mode.
* So far all cards offer the same depth stencil format for all modes, but if some do not and apps
* do not like that we'll have to find some workaround, like iterating over all imaginable formats
* and collecting all the depth stencil formats we can get
*/
hr
=
IWineD3DDevice_GetDisplayMode
(
This
->
wineD3DDevice
,
0
/* swapchain 0 */
,
&
d3ddm
);
for
(
i
=
0
;
i
<
(
sizeof
(
FormatList
)
/
sizeof
(
FormatList
[
0
]));
i
++
)
{
hr
=
IWineD3D_CheckDeviceFormat
(
This
->
wineD3D
,
0
/* Adapter */
,
0
/* DeviceType */
,
WINED3DADAPTER_DEFAULT
/* Adapter */
,
type
/* DeviceType */
,
d3ddm
.
Format
/* AdapterFormat */
,
WINED3DUSAGE_DEPTHSTENCIL
/* Usage */
,
WINED3DRTYPE_SURFACE
/* ResourceType */
,
WINED3DRTYPE_SURFACE
,
FormatList
[
i
]);
if
(
hr
==
D3D_OK
)
{
...
...
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