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
56c518af
Commit
56c518af
authored
Jun 29, 2012
by
Henri Verbeet
Committed by
Alexandre Julliard
Jun 29, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Use the device name stored in the adapter in wined3d_get_adapter_display_mode().
parent
2e167f68
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
46 additions
and
54 deletions
+46
-54
directx.c
dlls/wined3d/directx.c
+46
-54
No files found.
dlls/wined3d/directx.c
View file @
56c518af
...
...
@@ -3002,6 +3002,7 @@ HRESULT CDECL wined3d_get_adapter_display_mode(const struct wined3d *wined3d, UI
struct
wined3d_display_mode
*
mode
,
enum
wined3d_display_rotation
*
rotation
)
{
const
struct
wined3d_adapter
*
adapter
;
DEVMODEW
m
;
TRACE
(
"wined3d %p, adapter_idx %u, display_mode %p, rotation %p.
\n
"
,
wined3d
,
adapter_idx
,
mode
,
rotation
);
...
...
@@ -3011,67 +3012,58 @@ HRESULT CDECL wined3d_get_adapter_display_mode(const struct wined3d *wined3d, UI
adapter
=
&
wined3d
->
adapters
[
adapter_idx
];
if
(
!
adapter_idx
)
{
DEVMODEW
DevModeW
;
ZeroMemory
(
&
DevModeW
,
sizeof
(
DevModeW
));
DevModeW
.
dmSize
=
sizeof
(
DevModeW
);
memset
(
&
m
,
0
,
sizeof
(
m
));
m
.
dmSize
=
sizeof
(
m
);
EnumDisplaySettingsExW
(
NULL
,
ENUM_CURRENT_SETTINGS
,
&
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
;
mode
->
format_id
=
pixelformat_for_depth
(
DevModeW
.
dmBitsPerPel
);
EnumDisplaySettingsExW
(
adapter
->
DeviceName
,
ENUM_CURRENT_SETTINGS
,
&
m
,
0
);
mode
->
width
=
m
.
dmPelsWidth
;
mode
->
height
=
m
.
dmPelsHeight
;
mode
->
refresh_rate
=
DEFAULT_REFRESH_RATE
;
if
(
m
.
dmFields
&
DM_DISPLAYFREQUENCY
)
mode
->
refresh_rate
=
m
.
dmDisplayFrequency
;
mode
->
format_id
=
pixelformat_for_depth
(
m
.
dmBitsPerPel
);
/* Lie about the format. X11 can't change the color depth, and some
* apps are pretty angry if they SetDisplayMode from 24 to 16 bpp and
* find out that GetDisplayMode still returns 24 bpp. This should
* probably be
handled in winex11 instead. */
if
(
adapter
->
screen_format
&&
adapter
->
screen_format
!=
mode
->
format_id
)
{
WARN
(
"Overriding format %s with stored format %s.
\n
"
,
debug_d3dformat
(
mode
->
format_id
),
debug_d3dformat
(
adapter
->
screen_format
));
mode
->
format_id
=
adapter
->
screen_format
;
}
/* Lie about the format. X11 can't change the color depth, and some apps
* are pretty angry if they SetDisplayMode from 24 to 16 bpp and find out
* that GetDisplayMode still returns 24 bpp. This should probably be
*
handled in winex11 instead. */
if
(
adapter
->
screen_format
&&
adapter
->
screen_format
!=
mode
->
format_id
)
{
WARN
(
"Overriding format %s with stored format %s.
\n
"
,
debug_d3dformat
(
mode
->
format_id
),
debug_d3dformat
(
adapter
->
screen_format
));
mode
->
format_id
=
adapter
->
screen_format
;
}
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
(
!
(
m
.
dmFields
&
DM_DISPLAYFLAGS
))
mode
->
scanline_ordering
=
WINED3D_SCANLINE_ORDERING_UNKNOWN
;
else
if
(
m
.
u2
.
dmDisplayFlags
&
DM_INTERLACED
)
mode
->
scanline_ordering
=
WINED3D_SCANLINE_ORDERING_INTERLACED
;
else
mode
->
scanline_ordering
=
WINED3D_SCANLINE_ORDERING_PROGRESSIVE
;
if
(
rotation
)
if
(
rotation
)
{
switch
(
m
.
u1
.
s2
.
dmDisplayOrientation
)
{
switch
(
DevModeW
.
u1
.
s2
.
dmDisplayOrientation
)
{
case
DMDO_DEFAULT
:
*
rotation
=
WINED3D_DISPLAY_ROTATION_0
;
break
;
case
DMDO_90
:
*
rotation
=
WINED3D_DISPLAY_ROTATION_90
;
break
;
case
DMDO_180
:
*
rotation
=
WINED3D_DISPLAY_ROTATION_180
;
break
;
case
DMDO_270
:
*
rotation
=
WINED3D_DISPLAY_ROTATION_270
;
break
;
default:
FIXME
(
"Unhandled display rotation %#x.
\n
"
,
DevModeW
.
u1
.
s2
.
dmDisplayOrientation
);
*
rotation
=
WINED3D_DISPLAY_ROTATION_UNSPECIFIED
;
break
;
}
case
DMDO_DEFAULT
:
*
rotation
=
WINED3D_DISPLAY_ROTATION_0
;
break
;
case
DMDO_90
:
*
rotation
=
WINED3D_DISPLAY_ROTATION_90
;
break
;
case
DMDO_180
:
*
rotation
=
WINED3D_DISPLAY_ROTATION_180
;
break
;
case
DMDO_270
:
*
rotation
=
WINED3D_DISPLAY_ROTATION_270
;
break
;
default:
FIXME
(
"Unhandled display rotation %#x.
\n
"
,
m
.
u1
.
s2
.
dmDisplayOrientation
);
*
rotation
=
WINED3D_DISPLAY_ROTATION_UNSPECIFIED
;
break
;
}
}
else
{
FIXME
(
"Adapter not primary display.
\n
"
);
}
TRACE
(
"Returning %ux%u@%u %s %#x.
\n
"
,
mode
->
width
,
mode
->
height
,
mode
->
refresh_rate
,
debug_d3dformat
(
mode
->
format_id
),
...
...
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