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
41d1529b
Commit
41d1529b
authored
Nov 14, 1998
by
Marcus Meissner
Committed by
Alexandre Julliard
Nov 14, 1998
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Do not enumerate D3D devices we can't handle anyway.
Return bitmasks for hi/truecolor depths in EnumDisplayModes.
parent
30c112e6
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
28 additions
and
2 deletions
+28
-2
ddraw.c
graphics/ddraw.c
+28
-2
No files found.
graphics/ddraw.c
View file @
41d1529b
...
...
@@ -1401,12 +1401,15 @@ static HRESULT WINAPI IDirect3D2_EnumDevices(
D3DDEVICEDESC
d1
,
d2
;
FIXME
(
ddraw
,
"(%p)->(%p,%p),stub!
\n
"
,
this
,
cb
,
context
);
#if 0
d1.dwSize = sizeof(d1);
d1.dwFlags = 0;
d2.dwSize = sizeof(d2);
d2.dwFlags = 0;
cb((void*)&IID_IDirect3DHALDevice,"WINE Direct3D HAL","direct3d",&d1,&d2,context);
#endif
return
0
;
}
...
...
@@ -2070,22 +2073,44 @@ static HRESULT WINAPI IDirectDraw2_EnumDisplayModes(
ddsfd
.
ddpfPixelFormat
.
dwFourCC
=
0
;
ddsfd
.
ddpfPixelFormat
.
dwFlags
=
DDPF_RGB
;
ddsfd
.
ddpfPixelFormat
.
x
.
dwRGBBitCount
=
depths
[
i
];
/* FIXME: those masks would have to be set in depth > 8 */
if
(
depths
[
i
]
==
8
)
{
ddsfd
.
ddpfPixelFormat
.
y
.
dwRBitMask
=
0
;
ddsfd
.
ddpfPixelFormat
.
z
.
dwGBitMask
=
0
;
ddsfd
.
ddpfPixelFormat
.
xx
.
dwBBitMask
=
0
;
ddsfd
.
ddpfPixelFormat
.
xy
.
dwRGBAlphaBitMask
=
0
;
if
(
depths
[
i
]
==
8
)
{
ddsfd
.
ddsCaps
.
dwCaps
=
DDSCAPS_PALETTE
;
ddsfd
.
ddpfPixelFormat
.
dwFlags
|=
DDPF_PALETTEINDEXED8
;
}
else
{
ddsfd
.
ddpfPixelFormat
.
xy
.
dwRGBAlphaBitMask
=
0
;
/* FIXME: We should query those from X itself */
switch
(
depths
[
i
])
{
case
16
:
ddsfd
.
ddpfPixelFormat
.
y
.
dwRBitMask
=
0x000f
;
ddsfd
.
ddpfPixelFormat
.
z
.
dwGBitMask
=
0x00f0
;
ddsfd
.
ddpfPixelFormat
.
xx
.
dwBBitMask
=
0x0f00
;
break
;
case
24
:
ddsfd
.
ddpfPixelFormat
.
y
.
dwRBitMask
=
0x000000ff
;
ddsfd
.
ddpfPixelFormat
.
z
.
dwGBitMask
=
0x0000ff00
;
ddsfd
.
ddpfPixelFormat
.
xx
.
dwBBitMask
=
0x00ff0000
;
break
;
case
32
:
ddsfd
.
ddpfPixelFormat
.
y
.
dwRBitMask
=
0x000000ff
;
ddsfd
.
ddpfPixelFormat
.
z
.
dwGBitMask
=
0x0000ff00
;
ddsfd
.
ddpfPixelFormat
.
xx
.
dwBBitMask
=
0x00ff0000
;
break
;
}
}
ddsfd
.
dwWidth
=
screenWidth
;
ddsfd
.
dwHeight
=
screenHeight
;
TRACE
(
ddraw
,
" enumerating (%ldx%ldx%d)
\n
"
,
ddsfd
.
dwWidth
,
ddsfd
.
dwHeight
,
depths
[
i
]);
if
(
!
modescb
(
&
ddsfd
,
context
))
return
0
;
for
(
j
=
0
;
j
<
sizeof
(
modes
)
/
sizeof
(
modes
[
0
]);
j
++
)
{
ddsfd
.
dwWidth
=
modes
[
i
].
w
;
ddsfd
.
dwHeight
=
modes
[
i
].
h
;
TRACE
(
ddraw
,
" enumerating (%ldx%ldx%d)
\n
"
,
ddsfd
.
dwWidth
,
ddsfd
.
dwHeight
,
depths
[
i
]);
if
(
!
modescb
(
&
ddsfd
,
context
))
return
0
;
}
...
...
@@ -2094,6 +2119,7 @@ static HRESULT WINAPI IDirectDraw2_EnumDisplayModes(
ddsfd
.
dwHeight
=
200
;
ddsfd
.
dwWidth
=
320
;
TRACE
(
ddraw
,
" enumerating (320x200x%d)
\n
"
,
depths
[
i
]);
if
(
!
modescb
(
&
ddsfd
,
context
))
return
0
;
}
}
...
...
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