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
8531f23a
Commit
8531f23a
authored
Mar 03, 2023
by
Rémi Bernon
Committed by
Alexandre Julliard
Mar 03, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
win32u: Return the current display mode depth with nulldrv.
parent
2a6b80b5
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
3 deletions
+12
-3
driver.c
dlls/win32u/driver.c
+1
-1
sysparams.c
dlls/win32u/sysparams.c
+11
-2
No files found.
dlls/win32u/driver.c
View file @
8531f23a
...
...
@@ -761,7 +761,7 @@ static BOOL nulldrv_GetCurrentDisplaySettings( LPCWSTR name, BOOL is_primary, LP
static
INT
nulldrv_GetDisplayDepth
(
LPCWSTR
name
,
BOOL
is_primary
)
{
return
32
;
return
-
1
;
/* use default implementation */
}
static
BOOL
nulldrv_UpdateDisplayDevices
(
const
struct
gdi_device_manager
*
manager
,
BOOL
force
,
void
*
param
)
...
...
dlls/win32u/sysparams.c
View file @
8531f23a
...
...
@@ -2727,6 +2727,7 @@ static unsigned int active_monitor_count(void)
INT
get_display_depth
(
UNICODE_STRING
*
name
)
{
struct
display_device
*
device
;
BOOL
is_primary
;
INT
depth
;
if
(
!
lock_display_devices
())
...
...
@@ -2743,8 +2744,16 @@ INT get_display_depth( UNICODE_STRING *name )
return
32
;
}
depth
=
user_driver
->
pGetDisplayDepth
(
device
->
device_name
,
!!
(
device
->
state_flags
&
DISPLAY_DEVICE_PRIMARY_DEVICE
)
);
is_primary
=
!!
(
device
->
state_flags
&
DISPLAY_DEVICE_PRIMARY_DEVICE
);
if
((
depth
=
user_driver
->
pGetDisplayDepth
(
device
->
device_name
,
is_primary
))
<
0
)
{
struct
adapter
*
adapter
=
CONTAINING_RECORD
(
device
,
struct
adapter
,
dev
);
DEVMODEW
current_mode
=
{.
dmSize
=
sizeof
(
DEVMODEW
)};
if
(
!
adapter_get_current_settings
(
adapter
,
&
current_mode
))
depth
=
32
;
else
depth
=
current_mode
.
dmBitsPerPel
;
}
unlock_display_devices
();
return
depth
;
}
...
...
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