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
8a9c34ed
Commit
8a9c34ed
authored
Sep 14, 2022
by
Rémi Bernon
Committed by
Alexandre Julliard
Nov 01, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
win32u: Add a BOOL force parameter to update_display_cache.
And call it recursively with force = TRUE instead of calling graphics driver pUpdateDisplayDevices separately.
parent
d75f6514
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
15 deletions
+17
-15
sysparams.c
dlls/win32u/sysparams.c
+17
-15
No files found.
dlls/win32u/sysparams.c
View file @
8a9c34ed
...
...
@@ -1512,7 +1512,7 @@ static BOOL update_display_cache_from_registry(void)
return
ret
;
}
static
BOOL
update_display_cache
(
void
)
static
BOOL
update_display_cache
(
BOOL
force
)
{
HWINSTA
winstation
=
NtUserGetProcessWindowStation
();
struct
device_manager_ctx
ctx
=
{
0
};
...
...
@@ -1529,17 +1529,7 @@ static BOOL update_display_cache(void)
return
TRUE
;
}
user_driver
->
pUpdateDisplayDevices
(
&
device_manager
,
FALSE
,
&
ctx
);
release_display_manager_ctx
(
&
ctx
);
if
(
update_display_cache_from_registry
())
return
TRUE
;
if
(
ctx
.
gpu_count
)
{
ERR
(
"driver reported devices, but we failed to read them
\n
"
);
return
FALSE
;
}
if
(
!
user_driver
->
pUpdateDisplayDevices
(
&
device_manager
,
TRUE
,
&
ctx
))
if
(
!
user_driver
->
pUpdateDisplayDevices
(
&
device_manager
,
force
,
&
ctx
)
&&
force
)
{
static
const
DEVMODEW
modes
[]
=
{
...
...
@@ -1578,15 +1568,27 @@ static BOOL update_display_cache(void)
if
(
!
update_display_cache_from_registry
())
{
ERR
(
"failed to read display config
\n
"
);
return
FALSE
;
if
(
force
)
{
ERR
(
"Failed to read display config.
\n
"
);
return
FALSE
;
}
if
(
ctx
.
gpu_count
)
{
ERR
(
"Driver reported devices, but we failed to read them.
\n
"
);
return
FALSE
;
}
return
update_display_cache
(
TRUE
);
}
return
TRUE
;
}
static
BOOL
lock_display_devices
(
void
)
{
if
(
!
update_display_cache
())
return
FALSE
;
if
(
!
update_display_cache
(
FALSE
))
return
FALSE
;
pthread_mutex_lock
(
&
display_lock
);
return
TRUE
;
}
...
...
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