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
8804a972
Commit
8804a972
authored
Nov 30, 2007
by
Stefan Dösinger
Committed by
Alexandre Julliard
Dec 03, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Unify bpp to format conversion.
parent
3cc253c5
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
27 deletions
+5
-27
directx.c
dlls/wined3d/directx.c
+3
-25
utils.c
dlls/wined3d/utils.c
+2
-2
No files found.
dlls/wined3d/directx.c
View file @
8804a972
...
...
@@ -1410,23 +1410,8 @@ static HRESULT WINAPI IWineD3DImpl_EnumAdapterModes(IWineD3D *iface, UINT Adapte
if
(
DevModeW
.
dmFields
&
DM_DISPLAYFREQUENCY
)
pMode
->
RefreshRate
=
DevModeW
.
dmDisplayFrequency
;
if
(
Format
==
WINED3DFMT_UNKNOWN
)
{
switch
(
DevModeW
.
dmBitsPerPel
)
{
case
8
:
pMode
->
Format
=
WINED3DFMT_P8
;
break
;
case
16
:
pMode
->
Format
=
WINED3DFMT_R5G6B5
;
break
;
case
32
:
pMode
->
Format
=
WINED3DFMT_X8R8G8B8
;
break
;
default
:
pMode
->
Format
=
WINED3DFMT_UNKNOWN
;
ERR
(
"Unhandled bit depth (%u) in mode list!
\n
"
,
DevModeW
.
dmBitsPerPel
);
}
if
(
Format
==
WINED3DFMT_UNKNOWN
)
{
pMode
->
Format
=
pixelformat_for_depth
(
DevModeW
.
dmBitsPerPel
);
}
else
{
pMode
->
Format
=
Format
;
}
...
...
@@ -1479,14 +1464,7 @@ static HRESULT WINAPI IWineD3DImpl_GetAdapterDisplayMode(IWineD3D *iface, UINT A
pMode
->
RefreshRate
=
DevModeW
.
dmDisplayFrequency
;
}
switch
(
bpp
)
{
case
8
:
pMode
->
Format
=
WINED3DFMT_R3G3B2
;
break
;
case
16
:
pMode
->
Format
=
WINED3DFMT_R5G6B5
;
break
;
case
24
:
pMode
->
Format
=
WINED3DFMT_X8R8G8B8
;
break
;
/* Robots needs 24bit to be X8R8G8B8 */
case
32
:
pMode
->
Format
=
WINED3DFMT_X8R8G8B8
;
break
;
/* EVE online and the Fur demo need 32bit AdapterDisplatMode to return X8R8G8B8 */
default
:
pMode
->
Format
=
WINED3DFMT_UNKNOWN
;
}
pMode
->
Format
=
pixelformat_for_depth
(
bpp
);
}
else
{
FIXME_
(
d3d_caps
)(
"Adapter not primary display
\n
"
);
}
...
...
dlls/wined3d/utils.c
View file @
8804a972
...
...
@@ -2697,8 +2697,8 @@ WINED3DFORMAT pixelformat_for_depth(DWORD depth) {
case
8
:
return
WINED3DFMT_P8
;
case
15
:
return
WINED3DFMT_X1R5G5B5
;
case
16
:
return
WINED3DFMT_R5G6B5
;
case
24
:
return
WINED3DFMT_
R8G8B8
;
case
32
:
return
WINED3DFMT_X8R8G8B8
;
case
24
:
return
WINED3DFMT_
X8R8G8B8
;
/* Robots needs 24bit to be X8R8G8B8 */
case
32
:
return
WINED3DFMT_X8R8G8B8
;
/* EVE online and the Fur demo need 32bit AdapterDisplatMode to return X8R8G8B8 */
default:
return
WINED3DFMT_UNKNOWN
;
}
}
...
...
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