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
38bef31f
Commit
38bef31f
authored
Oct 20, 2022
by
Rémi Bernon
Committed by
Alexandre Julliard
Nov 03, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
win32u: Read mode from the registry if GetCurrentDisplaySettings fails.
parent
6ecffdad
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
3 deletions
+23
-3
driver.c
dlls/win32u/driver.c
+1
-1
sysparams.c
dlls/win32u/sysparams.c
+22
-2
No files found.
dlls/win32u/driver.c
View file @
38bef31f
...
...
@@ -761,7 +761,7 @@ static LONG nulldrv_ChangeDisplaySettings( LPDEVMODEW displays, LPCWSTR primary_
static
BOOL
nulldrv_GetCurrentDisplaySettings
(
LPCWSTR
name
,
BOOL
is_primary
,
LPDEVMODEW
mode
)
{
return
FALSE
;
return
FALSE
;
/* use default implementation */
}
static
BOOL
nulldrv_UpdateDisplayDevices
(
const
struct
gdi_device_manager
*
manager
,
BOOL
force
,
void
*
param
)
...
...
dlls/win32u/sysparams.c
View file @
38bef31f
...
...
@@ -506,7 +506,26 @@ static BOOL adapter_set_registry_settings( const struct adapter *adapter, const
static
BOOL
adapter_get_current_settings
(
const
struct
adapter
*
adapter
,
DEVMODEW
*
mode
)
{
BOOL
is_primary
=
!!
(
adapter
->
dev
.
state_flags
&
DISPLAY_DEVICE_PRIMARY_DEVICE
);
return
user_driver
->
pGetCurrentDisplaySettings
(
adapter
->
dev
.
device_name
,
is_primary
,
mode
);
HANDLE
mutex
;
HKEY
hkey
;
BOOL
ret
;
if
((
ret
=
user_driver
->
pGetCurrentDisplaySettings
(
adapter
->
dev
.
device_name
,
is_primary
,
mode
)))
return
TRUE
;
/* default implementation: read current display settings from the registry. */
mutex
=
get_display_device_init_mutex
();
if
(
!
config_key
&&
!
(
config_key
=
reg_open_key
(
NULL
,
config_keyW
,
sizeof
(
config_keyW
)
)))
ret
=
FALSE
;
else
if
(
!
(
hkey
=
reg_open_key
(
config_key
,
adapter
->
config_key
,
lstrlenW
(
adapter
->
config_key
)
*
sizeof
(
WCHAR
)
)))
ret
=
FALSE
;
else
{
ret
=
read_adapter_mode
(
hkey
,
ENUM_CURRENT_SETTINGS
,
mode
);
NtClose
(
hkey
);
}
release_display_device_init_mutex
(
mutex
);
return
ret
;
}
static
BOOL
adapter_set_current_settings
(
const
struct
adapter
*
adapter
,
const
DEVMODEW
*
mode
)
...
...
@@ -2511,7 +2530,8 @@ static LONG apply_display_settings( const WCHAR *devname, const DEVMODEW *devmod
if
((
adapter
=
find_adapter
(
NULL
)))
{
DEVMODEW
current_mode
=
{.
dmSize
=
sizeof
(
DEVMODEW
)};
adapter_get_current_settings
(
adapter
,
&
current_mode
);
if
(
!
adapter_get_current_settings
(
adapter
,
&
current_mode
))
WARN
(
"Failed to get primary adapter current display settings.
\n
"
);
adapter_release
(
adapter
);
send_notify_message
(
NtUserGetDesktopWindow
(),
WM_DISPLAYCHANGE
,
current_mode
.
dmBitsPerPel
,
...
...
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