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
b5d58ff6
Commit
b5d58ff6
authored
Jun 11, 2020
by
Zhiyi Zhang
Committed by
Alexandre Julliard
Jun 11, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
explorer: Initialize registry display settings for all adapters.
Signed-off-by:
Zhiyi Zhang
<
zzhang@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
ce4083ec
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
6 deletions
+23
-6
desktop.c
programs/explorer/desktop.c
+23
-6
No files found.
programs/explorer/desktop.c
View file @
b5d58ff6
...
@@ -22,6 +22,8 @@
...
@@ -22,6 +22,8 @@
#include <stdio.h>
#include <stdio.h>
#define COBJMACROS
#define COBJMACROS
#define NONAMELESSUNION
#define NONAMELESSSTRUCT
#define OEMRESOURCE
#define OEMRESOURCE
#include <windows.h>
#include <windows.h>
#include <rpc.h>
#include <rpc.h>
...
@@ -881,16 +883,31 @@ static HMODULE load_graphics_driver( const WCHAR *driver, const GUID *guid )
...
@@ -881,16 +883,31 @@ static HMODULE load_graphics_driver( const WCHAR *driver, const GUID *guid )
static
void
initialize_display_settings
(
void
)
static
void
initialize_display_settings
(
void
)
{
{
DISPLAY_DEVICEW
ddW
;
DEVMODEW
dmW
;
DEVMODEW
dmW
;
DWORD
i
=
0
;
/* Store current display mode in the registry */
/* Store current display mode in the registry */
if
(
EnumDisplaySettingsExW
(
NULL
,
ENUM_CURRENT_SETTINGS
,
&
dmW
,
0
))
ddW
.
cb
=
sizeof
(
ddW
);
dmW
.
dmSize
=
sizeof
(
dmW
);
while
(
EnumDisplayDevicesW
(
NULL
,
i
++
,
&
ddW
,
0
))
{
{
WINE_TRACE
(
"Current display mode %ux%u %u bpp %u Hz
\n
"
,
dmW
.
dmPelsWidth
,
if
(
!
EnumDisplaySettingsExW
(
ddW
.
DeviceName
,
ENUM_CURRENT_SETTINGS
,
&
dmW
,
0
))
dmW
.
dmPelsHeight
,
dmW
.
dmBitsPerPel
,
dmW
.
dmDisplayFrequency
);
{
ChangeDisplaySettingsExW
(
NULL
,
&
dmW
,
0
,
WINE_ERR
(
"Failed to query current display settings for %s.
\n
"
,
CDS_GLOBAL
|
CDS_NORESET
|
CDS_UPDATEREGISTRY
,
wine_dbgstr_w
(
ddW
.
DeviceName
)
);
NULL
);
continue
;
}
WINE_TRACE
(
"Device %s current display mode %ux%u %uBits %uHz at %d,%d.
\n
"
,
wine_dbgstr_w
(
ddW
.
DeviceName
),
dmW
.
dmPelsWidth
,
dmW
.
dmPelsHeight
,
dmW
.
dmBitsPerPel
,
dmW
.
dmDisplayFrequency
,
dmW
.
u1
.
s2
.
dmPosition
.
x
,
dmW
.
u1
.
s2
.
dmPosition
.
y
);
if
(
ChangeDisplaySettingsExW
(
ddW
.
DeviceName
,
&
dmW
,
0
,
CDS_GLOBAL
|
CDS_NORESET
|
CDS_UPDATEREGISTRY
,
0
))
WINE_ERR
(
"Failed to initialize registry display settings for %s.
\n
"
,
wine_dbgstr_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