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
ee0aad5c
Commit
ee0aad5c
authored
Apr 11, 2024
by
Rémi Bernon
Committed by
Alexandre Julliard
Apr 15, 2024
1
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
win32u: Keep the primary current mode in the device manager context.
parent
72e42962
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
22 deletions
+13
-22
sysparams.c
dlls/win32u/sysparams.c
+13
-22
No files found.
dlls/win32u/sysparams.c
View file @
ee0aad5c
...
@@ -924,9 +924,7 @@ struct device_manager_ctx
...
@@ -924,9 +924,7 @@ struct device_manager_ctx
HKEY
source_key
;
HKEY
source_key
;
/* for the virtual desktop settings */
/* for the virtual desktop settings */
BOOL
is_primary
;
BOOL
is_primary
;
UINT
primary_bpp
;
DEVMODEW
primary
;
UINT
primary_width
;
UINT
primary_height
;
};
};
static
void
link_device
(
const
char
*
instance
,
const
char
*
class
)
static
void
link_device
(
const
char
*
instance
,
const
char
*
class
)
...
@@ -1828,13 +1826,7 @@ static void desktop_add_monitor( const struct gdi_monitor *monitor, void *param
...
@@ -1828,13 +1826,7 @@ static void desktop_add_monitor( const struct gdi_monitor *monitor, void *param
static
void
desktop_add_mode
(
const
DEVMODEW
*
mode
,
BOOL
current
,
void
*
param
)
static
void
desktop_add_mode
(
const
DEVMODEW
*
mode
,
BOOL
current
,
void
*
param
)
{
{
struct
device_manager_ctx
*
ctx
=
param
;
struct
device_manager_ctx
*
ctx
=
param
;
if
(
ctx
->
is_primary
&&
current
)
ctx
->
primary
=
*
mode
;
if
(
ctx
->
is_primary
&&
current
)
{
ctx
->
primary_bpp
=
mode
->
dmBitsPerPel
;
ctx
->
primary_width
=
mode
->
dmPelsWidth
;
ctx
->
primary_height
=
mode
->
dmPelsHeight
;
}
}
}
static
const
struct
gdi_device_manager
desktop_device_manager
=
static
const
struct
gdi_device_manager
desktop_device_manager
=
...
@@ -1891,20 +1883,16 @@ static BOOL desktop_update_display_devices( BOOL force, struct device_manager_ct
...
@@ -1891,20 +1883,16 @@ static BOOL desktop_update_display_devices( BOOL force, struct device_manager_ct
struct
device_manager_ctx
desktop_ctx
=
{
0
};
struct
device_manager_ctx
desktop_ctx
=
{
0
};
UINT
screen_width
,
screen_height
,
max_width
,
max_height
;
UINT
screen_width
,
screen_height
,
max_width
,
max_height
;
unsigned
int
depths
[]
=
{
8
,
16
,
0
};
unsigned
int
depths
[]
=
{
8
,
16
,
0
};
DEVMODEW
current
,
mode
=
DEVMODEW
current
;
{
.
dmFields
=
DM_DISPLAYORIENTATION
|
DM_BITSPERPEL
|
DM_PELSWIDTH
|
DM_PELSHEIGHT
|
DM_DISPLAYFLAGS
|
DM_DISPLAYFREQUENCY
,
.
dmDisplayFrequency
=
60
,
};
UINT
i
,
j
;
UINT
i
,
j
;
if
(
!
force
)
return
TRUE
;
if
(
!
force
)
return
TRUE
;
/* in virtual desktop mode, read the device list from the user driver but expose virtual devices */
/* in virtual desktop mode, read the device list from the user driver but expose virtual devices */
if
(
!
update_display_devices
(
&
desktop_device_manager
,
TRUE
,
&
desktop_ctx
))
return
FALSE
;
if
(
!
update_display_devices
(
&
desktop_device_manager
,
TRUE
,
&
desktop_ctx
))
return
FALSE
;
max_width
=
desktop_ctx
.
primary
_w
idth
;
max_width
=
desktop_ctx
.
primary
.
dmPelsW
idth
;
max_height
=
desktop_ctx
.
primary
_h
eight
;
max_height
=
desktop_ctx
.
primary
.
dmPelsH
eight
;
depths
[
ARRAY_SIZE
(
depths
)
-
1
]
=
desktop_ctx
.
primary
_bpp
;
depths
[
ARRAY_SIZE
(
depths
)
-
1
]
=
desktop_ctx
.
primary
.
dmBitsPerPel
;
if
(
!
get_default_desktop_size
(
&
screen_width
,
&
screen_height
))
if
(
!
get_default_desktop_size
(
&
screen_width
,
&
screen_height
))
{
{
...
@@ -1916,9 +1904,7 @@ static BOOL desktop_update_display_devices( BOOL force, struct device_manager_ct
...
@@ -1916,9 +1904,7 @@ static BOOL desktop_update_display_devices( BOOL force, struct device_manager_ct
add_source
(
"Default"
,
source_flags
,
ctx
);
add_source
(
"Default"
,
source_flags
,
ctx
);
if
(
!
read_source_mode
(
ctx
->
source_key
,
ENUM_CURRENT_SETTINGS
,
&
current
))
if
(
!
read_source_mode
(
ctx
->
source_key
,
ENUM_CURRENT_SETTINGS
,
&
current
))
{
{
current
=
mode
;
current
=
desktop_ctx
.
primary
;
current
.
dmFields
|=
DM_POSITION
;
current
.
dmBitsPerPel
=
desktop_ctx
.
primary_bpp
;
current
.
dmPelsWidth
=
screen_width
;
current
.
dmPelsWidth
=
screen_width
;
current
.
dmPelsHeight
=
screen_height
;
current
.
dmPelsHeight
=
screen_height
;
}
}
...
@@ -1931,7 +1917,12 @@ static BOOL desktop_update_display_devices( BOOL force, struct device_manager_ct
...
@@ -1931,7 +1917,12 @@ static BOOL desktop_update_display_devices( BOOL force, struct device_manager_ct
for
(
i
=
0
;
i
<
ARRAY_SIZE
(
depths
);
++
i
)
for
(
i
=
0
;
i
<
ARRAY_SIZE
(
depths
);
++
i
)
{
{
mode
.
dmBitsPerPel
=
depths
[
i
];
DEVMODEW
mode
=
{
.
dmFields
=
DM_DISPLAYORIENTATION
|
DM_BITSPERPEL
|
DM_PELSWIDTH
|
DM_PELSHEIGHT
|
DM_DISPLAYFLAGS
|
DM_DISPLAYFREQUENCY
,
.
dmDisplayFrequency
=
60
,
.
dmBitsPerPel
=
depths
[
i
],
};
for
(
j
=
0
;
j
<
ARRAY_SIZE
(
screen_sizes
);
++
j
)
for
(
j
=
0
;
j
<
ARRAY_SIZE
(
screen_sizes
);
++
j
)
{
{
...
...
Vitaly Lipatov
@lav
mentioned in commit
b918ce9e
·
May 08, 2024
mentioned in commit
b918ce9e
mentioned in commit b918ce9e7694da29231b73dcb228074d36d15761
Toggle commit list
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