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
0e5b847f
Commit
0e5b847f
authored
Jun 27, 2023
by
Rémi Bernon
Committed by
Alexandre Julliard
Jun 28, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
explorer: Use debugstr_devmodew helper to trace display mode.
Wine-Bug:
https://bugs.winehq.org/show_bug.cgi?id=55146
parent
8073c6be
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
8 deletions
+24
-8
desktop.c
programs/explorer/desktop.c
+24
-8
No files found.
programs/explorer/desktop.c
View file @
0e5b847f
...
...
@@ -918,29 +918,45 @@ static HMODULE load_graphics_driver( const WCHAR *driver, GUID *guid )
return
module
;
}
static
const
char
*
debugstr_devmodew
(
const
DEVMODEW
*
devmode
)
{
char
position
[
32
]
=
{
0
};
if
(
devmode
->
dmFields
&
DM_POSITION
)
{
snprintf
(
position
,
sizeof
(
position
),
" at (%d,%d)"
,
(
int
)
devmode
->
dmPosition
.
x
,
(
int
)
devmode
->
dmPosition
.
y
);
}
return
wine_dbg_sprintf
(
"%ux%u %ubits %uHz rotated %u degrees%s"
,
(
unsigned
int
)
devmode
->
dmPelsWidth
,
(
unsigned
int
)
devmode
->
dmPelsHeight
,
(
unsigned
int
)
devmode
->
dmBitsPerPel
,
(
unsigned
int
)
devmode
->
dmDisplayFrequency
,
(
unsigned
int
)
devmode
->
dmDisplayOrientation
*
90
,
position
);
}
static
void
initialize_display_settings
(
void
)
{
DISPLAY_DEVICEW
ddW
;
DEVMODEW
dmW
;
DWORD
i
=
0
;
/* Store current display mode in the registry */
ddW
.
cb
=
sizeof
(
ddW
);
memset
(
&
dmW
,
0
,
sizeof
(
dmW
));
dmW
.
dmSize
=
sizeof
(
dmW
);
while
(
EnumDisplayDevicesW
(
NULL
,
i
++
,
&
ddW
,
0
))
{
if
(
!
EnumDisplaySettingsExW
(
ddW
.
DeviceName
,
ENUM_CURRENT_SETTINGS
,
&
dmW
,
0
))
DEVMODEW
devmode
=
{.
dmSize
=
sizeof
(
DEVMODEW
)};
if
(
!
EnumDisplaySettingsExW
(
ddW
.
DeviceName
,
ENUM_CURRENT_SETTINGS
,
&
devmode
,
0
))
{
ERR
(
"Failed to query current display settings for %s.
\n
"
,
debugstr_w
(
ddW
.
DeviceName
)
);
continue
;
}
TRACE
(
"Device %s current display mode %lux%lu %luBits %luHz at %ld,%ld.
\n
"
,
debugstr_w
(
ddW
.
DeviceName
),
dmW
.
dmPelsWidth
,
dmW
.
dmPelsHeight
,
dmW
.
dmBitsPerPel
,
dmW
.
dmDisplayFrequency
,
dmW
.
dmPosition
.
x
,
dmW
.
dmPosition
.
y
);
TRACE
(
"Device %s current display mode %s.
\n
"
,
debugstr_w
(
ddW
.
DeviceName
),
debugstr_devmodew
(
&
devmode
)
);
if
(
ChangeDisplaySettingsExW
(
ddW
.
DeviceName
,
&
d
mW
,
0
,
if
(
ChangeDisplaySettingsExW
(
ddW
.
DeviceName
,
&
d
evmode
,
0
,
CDS_GLOBAL
|
CDS_NORESET
|
CDS_UPDATEREGISTRY
,
0
))
ERR
(
"Failed to initialize registry display settings for %s.
\n
"
,
debugstr_w
(
ddW
.
DeviceName
)
);
}
...
...
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