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
8949f570
Commit
8949f570
authored
Jul 14, 2020
by
Brendan Shanks
Committed by
Alexandre Julliard
Jul 17, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
user32: Handle GET_SOURCE_NAME in DisplayConfigGetDeviceInfo().
Signed-off-by:
Brendan Shanks
<
bshanks@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
27ed9c95
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
46 additions
and
4 deletions
+46
-4
sysparams.c
dlls/user32/sysparams.c
+46
-2
monitor.c
dlls/user32/tests/monitor.c
+0
-2
No files found.
dlls/user32/sysparams.c
View file @
8949f570
...
...
@@ -4815,23 +4815,67 @@ done:
*/
LONG
WINAPI
DisplayConfigGetDeviceInfo
(
DISPLAYCONFIG_DEVICE_INFO_HEADER
*
packet
)
{
LONG
ret
=
ERROR_GEN_FAILURE
;
HANDLE
mutex
;
HDEVINFO
devinfo
;
SP_DEVINFO_DATA
device_data
=
{
sizeof
(
device_data
)};
DWORD
index
=
0
,
type
;
LUID
gpu_luid
;
TRACE
(
"(%p)
\n
"
,
packet
);
if
(
!
packet
||
packet
->
size
<
sizeof
(
*
packet
))
return
ERROR_GEN_FAILURE
;
wait_graphics_driver_ready
();
switch
(
packet
->
type
)
{
case
DISPLAYCONFIG_DEVICE_INFO_GET_SOURCE_NAME
:
{
DISPLAYCONFIG_SOURCE_DEVICE_NAME
*
source_name
=
(
DISPLAYCONFIG_SOURCE_DEVICE_NAME
*
)
packet
;
WCHAR
device_name
[
CCHDEVICENAME
];
LONG
source_id
;
FIXME
(
"DISPLAYCONFIG_DEVICE_INFO_GET_SOURCE_NAME: stub
\n
"
);
TRACE
(
"DISPLAYCONFIG_DEVICE_INFO_GET_SOURCE_NAME
\n
"
);
if
(
packet
->
size
<
sizeof
(
*
source_name
))
return
ERROR_INVALID_PARAMETER
;
return
ERROR_NOT_SUPPORTED
;
mutex
=
get_display_device_init_mutex
();
devinfo
=
SetupDiGetClassDevsW
(
&
GUID_DEVCLASS_MONITOR
,
DISPLAY
,
NULL
,
DIGCF_PRESENT
);
if
(
devinfo
==
INVALID_HANDLE_VALUE
)
{
release_display_device_init_mutex
(
mutex
);
return
ret
;
}
while
(
SetupDiEnumDeviceInfo
(
devinfo
,
index
++
,
&
device_data
))
{
if
(
!
SetupDiGetDevicePropertyW
(
devinfo
,
&
device_data
,
&
DEVPROPKEY_MONITOR_GPU_LUID
,
&
type
,
(
BYTE
*
)
&
gpu_luid
,
sizeof
(
gpu_luid
),
NULL
,
0
))
continue
;
if
((
source_name
->
header
.
adapterId
.
LowPart
!=
gpu_luid
.
LowPart
)
||
(
source_name
->
header
.
adapterId
.
HighPart
!=
gpu_luid
.
HighPart
))
continue
;
/* QueryDisplayConfig() derives the source ID from the adapter name. */
if
(
!
SetupDiGetDevicePropertyW
(
devinfo
,
&
device_data
,
&
WINE_DEVPROPKEY_MONITOR_ADAPTERNAME
,
&
type
,
(
BYTE
*
)
device_name
,
sizeof
(
device_name
),
NULL
,
0
))
continue
;
source_id
=
strtolW
(
device_name
+
ARRAY_SIZE
(
ADAPTER_PREFIX
),
NULL
,
10
);
source_id
--
;
if
(
source_name
->
header
.
id
!=
source_id
)
continue
;
lstrcpyW
(
source_name
->
viewGdiDeviceName
,
device_name
);
ret
=
ERROR_SUCCESS
;
break
;
}
SetupDiDestroyDeviceInfoList
(
devinfo
);
release_display_device_init_mutex
(
mutex
);
return
ret
;
}
case
DISPLAYCONFIG_DEVICE_INFO_GET_TARGET_NAME
:
{
...
...
dlls/user32/tests/monitor.c
View file @
8949f570
...
...
@@ -1300,7 +1300,6 @@ static void test_QueryDisplayConfig_result(UINT32 flags,
for
(
i
=
0
;
i
<
paths
;
i
++
)
{
todo_wine
{
source_name
.
header
.
type
=
DISPLAYCONFIG_DEVICE_INFO_GET_SOURCE_NAME
;
source_name
.
header
.
size
=
sizeof
(
source_name
);
source_name
.
header
.
adapterId
=
pi
[
i
].
sourceInfo
.
adapterId
;
...
...
@@ -1309,7 +1308,6 @@ static void test_QueryDisplayConfig_result(UINT32 flags,
ret
=
pDisplayConfigGetDeviceInfo
(
&
source_name
.
header
);
ok
(
!
ret
,
"Expected 0, got %d
\n
"
,
ret
);
ok
(
source_name
.
viewGdiDeviceName
[
0
]
!=
'\0'
,
"Expected GDI device name, got empty string
\n
"
);
}
todo_wine
{
target_name
.
header
.
type
=
DISPLAYCONFIG_DEVICE_INFO_GET_TARGET_NAME
;
...
...
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