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
b6bdb428
Commit
b6bdb428
authored
Jun 28, 2012
by
Henri Verbeet
Committed by
Alexandre Julliard
Jun 28, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Avoid a redundant call to EnumDisplaySettingsExW() in wined3d_enum_adapter_modes().
parent
91f02018
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
26 deletions
+14
-26
directx.c
dlls/wined3d/directx.c
+14
-26
No files found.
dlls/wined3d/directx.c
View file @
b6bdb428
...
...
@@ -2954,7 +2954,6 @@ HRESULT CDECL wined3d_enum_adapter_modes(const struct wined3d *wined3d, UINT ada
const
struct
wined3d_format
*
format
=
wined3d_get_format
(
&
wined3d
->
adapters
[
adapter_idx
].
gl_info
,
format_id
);
UINT
format_bits
=
format
->
byte_count
*
CHAR_BIT
;
DEVMODEW
DevModeW
;
int
ModeIdx
=
0
;
UINT
i
=
0
;
int
j
=
0
;
...
...
@@ -2983,34 +2982,23 @@ HRESULT CDECL wined3d_enum_adapter_modes(const struct wined3d *wined3d, UINT ada
}
}
ModeIdx
=
j
-
1
;
mode
->
width
=
DevModeW
.
dmPelsWidth
;
mode
->
height
=
DevModeW
.
dmPelsHeight
;
mode
->
refresh_rate
=
DEFAULT_REFRESH_RATE
;
if
(
DevModeW
.
dmFields
&
DM_DISPLAYFREQUENCY
)
mode
->
refresh_rate
=
DevModeW
.
dmDisplayFrequency
;
/* Now get the display mode via the calculated index */
if
(
EnumDisplaySettingsExW
(
NULL
,
ModeIdx
,
&
DevModeW
,
0
))
{
mode
->
width
=
DevModeW
.
dmPelsWidth
;
mode
->
height
=
DevModeW
.
dmPelsHeight
;
mode
->
refresh_rate
=
DEFAULT_REFRESH_RATE
;
if
(
DevModeW
.
dmFields
&
DM_DISPLAYFREQUENCY
)
mode
->
refresh_rate
=
DevModeW
.
dmDisplayFrequency
;
if
(
format_id
==
WINED3DFMT_UNKNOWN
)
mode
->
format_id
=
pixelformat_for_depth
(
DevModeW
.
dmBitsPerPel
);
else
mode
->
format_id
=
format_id
;
if
(
format_id
==
WINED3DFMT_UNKNOWN
)
mode
->
format_id
=
pixelformat_for_depth
(
DevModeW
.
dmBitsPerPel
);
else
mode
->
format_id
=
format_id
;
if
(
!
(
DevModeW
.
dmFields
&
DM_DISPLAYFLAGS
))
mode
->
scanline_ordering
=
WINED3D_SCANLINE_ORDERING_UNKNOWN
;
else
if
(
DevModeW
.
u2
.
dmDisplayFlags
&
DM_INTERLACED
)
mode
->
scanline_ordering
=
WINED3D_SCANLINE_ORDERING_INTERLACED
;
else
mode
->
scanline_ordering
=
WINED3D_SCANLINE_ORDERING_PROGRESSIVE
;
}
if
(
!
(
DevModeW
.
dmFields
&
DM_DISPLAYFLAGS
))
mode
->
scanline_ordering
=
WINED3D_SCANLINE_ORDERING_UNKNOWN
;
else
if
(
DevModeW
.
u2
.
dmDisplayFlags
&
DM_INTERLACED
)
mode
->
scanline_ordering
=
WINED3D_SCANLINE_ORDERING_INTERLACED
;
else
{
TRACE
(
"Requested mode %u out of range.
\n
"
,
mode_idx
);
return
WINED3DERR_INVALIDCALL
;
}
mode
->
scanline_ordering
=
WINED3D_SCANLINE_ORDERING_PROGRESSIVE
;
TRACE
(
"%ux%u@%u %u bpp, %s %#x.
\n
"
,
mode
->
width
,
mode
->
height
,
mode
->
refresh_rate
,
DevModeW
.
dmBitsPerPel
,
debug_d3dformat
(
mode
->
format_id
),
mode
->
scanline_ordering
);
...
...
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