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
194ee40e
Commit
194ee40e
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: Use the device name stored in the adapter in wined3d_get_adapter_mode_count().
parent
e9d0367d
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
19 deletions
+12
-19
directx.c
dlls/wined3d/directx.c
+12
-19
No files found.
dlls/wined3d/directx.c
View file @
194ee40e
...
...
@@ -2894,30 +2894,30 @@ HMONITOR CDECL wined3d_get_adapter_monitor(const struct wined3d *wined3d, UINT a
UINT
CDECL
wined3d_get_adapter_mode_count
(
const
struct
wined3d
*
wined3d
,
UINT
adapter_idx
,
enum
wined3d_format_id
format_id
)
{
const
struct
wined3d_adapter
*
adapter
;
const
struct
wined3d_format
*
format
;
unsigned
int
i
=
0
;
unsigned
int
j
=
0
;
UINT
format_bits
;
DEVMODEW
mode
;
TRACE
(
"wined3d %p, adapter_idx %u, format %s.
\n
"
,
wined3d
,
adapter_idx
,
debug_d3dformat
(
format_id
));
if
(
adapter_idx
>=
wined3d
->
adapter_count
)
return
0
;
/* TODO: Store modes per adapter and read it from the adapter structure */
if
(
!
adapter_idx
)
{
const
struct
wined3d_format
*
format
=
wined3d_get_format
(
&
wined3d
->
adapters
[
adapter_idx
].
gl_info
,
format_id
);
UINT
format_bits
=
format
->
byte_count
*
CHAR_BIT
;
unsigned
int
i
=
0
;
unsigned
int
j
=
0
;
DEVMODEW
mode
;
adapter
=
&
wined3d
->
adapters
[
adapter_idx
];
format
=
wined3d_get_format
(
&
adapter
->
gl_info
,
format_id
);
format_bits
=
format
->
byte_count
*
CHAR_BIT
;
memset
(
&
mode
,
0
,
sizeof
(
mode
));
mode
.
dmSize
=
sizeof
(
mode
);
while
(
EnumDisplaySettingsExW
(
NULL
,
j
,
&
mode
,
0
))
while
(
EnumDisplaySettingsExW
(
adapter
->
DeviceName
,
j
++
,
&
mode
,
0
))
{
++
j
;
if
(
format_id
==
WINED3DFMT_UNKNOWN
)
{
/* This is for D3D8, do not enumerate P8 here
*/
/* This is for d3d8, do not enumerate P8 here.
*/
if
(
mode
.
dmBitsPerPel
==
32
||
mode
.
dmBitsPerPel
==
16
)
++
i
;
}
else
if
(
mode
.
dmBitsPerPel
==
format_bits
)
...
...
@@ -2929,13 +2929,6 @@ UINT CDECL wined3d_get_adapter_mode_count(const struct wined3d *wined3d, UINT ad
TRACE
(
"Returning %u matching modes (out of %u total) for adapter %u.
\n
"
,
i
,
j
,
adapter_idx
);
return
i
;
}
else
{
FIXME
(
"Adapter not primary display.
\n
"
);
}
return
0
;
}
/* Note: dx9 supplies a format. Calls from d3d8 supply 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