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
d24dcb1e
Commit
d24dcb1e
authored
Jun 11, 2023
by
Tatsuyuki Ishi
Committed by
Alexandre Julliard
Jun 12, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
win32u: Cleanup naming and log messages for QueryDisplayConfig.
Signed-off-by:
Tatsuyuki Ishi
<
ishitatsuyuki@gmail.com
>
parent
c2c9112b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
29 additions
and
28 deletions
+29
-28
sysparams.c
dlls/win32u/sysparams.c
+26
-25
ntuser.h
include/ntuser.h
+3
-3
No files found.
dlls/win32u/sysparams.c
View file @
d24dcb1e
...
...
@@ -2239,7 +2239,7 @@ static void set_path_target_info( DISPLAYCONFIG_PATH_TARGET_INFO *info, const LU
static
void
set_mode_source_info
(
DISPLAYCONFIG_MODE_INFO
*
info
,
const
LUID
*
gpu_luid
,
UINT32
source_id
,
const
DEVMODEW
*
devmode
)
{
DISPLAYCONFIG_SOURCE_MODE
*
mode
=
&
(
info
->
sourceMode
)
;
DISPLAYCONFIG_SOURCE_MODE
*
mode
=
&
info
->
sourceMode
;
info
->
infoType
=
DISPLAYCONFIG_MODE_INFO_TYPE_SOURCE
;
info
->
adapterId
=
*
gpu_luid
;
...
...
@@ -2268,15 +2268,15 @@ static void set_path_source_info( DISPLAYCONFIG_PATH_SOURCE_INFO *info, const LU
info
->
statusFlags
=
DISPLAYCONFIG_SOURCE_IN_USE
;
}
static
BOOL
source_mode_exists
(
const
DISPLAYCONFIG_MODE_INFO
*
mode
info
,
UINT32
num_modes
,
static
BOOL
source_mode_exists
(
const
DISPLAYCONFIG_MODE_INFO
*
mode
s
,
UINT32
modes_count
,
UINT32
source_id
,
UINT32
*
found_mode_index
)
{
UINT32
i
;
for
(
i
=
0
;
i
<
num_modes
;
i
++
)
for
(
i
=
0
;
i
<
modes_count
;
i
++
)
{
if
(
mode
info
[
i
].
infoType
==
DISPLAYCONFIG_MODE_INFO_TYPE_SOURCE
&&
mode
info
[
i
].
id
==
source_id
)
if
(
mode
s
[
i
].
infoType
==
DISPLAYCONFIG_MODE_INFO_TYPE_SOURCE
&&
mode
s
[
i
].
id
==
source_id
)
{
*
found_mode_index
=
i
;
return
TRUE
;
...
...
@@ -2288,9 +2288,9 @@ static BOOL source_mode_exists( const DISPLAYCONFIG_MODE_INFO *modeinfo, UINT32
/***********************************************************************
* NtUserQueryDisplayConfig (win32u.@)
*/
LONG
WINAPI
NtUserQueryDisplayConfig
(
UINT32
flags
,
UINT32
*
numpathelements
,
DISPLAYCONFIG_PATH_INFO
*
pathinfo
,
UINT32
*
numinfoelements
,
DISPLAYCONFIG_MODE_INFO
*
modeinfo
,
DISPLAYCONFIG_TOPOLOGY_ID
*
topologyid
)
LONG
WINAPI
NtUserQueryDisplayConfig
(
UINT32
flags
,
UINT32
*
paths_count
,
DISPLAYCONFIG_PATH_INFO
*
paths
,
UINT32
*
modes_count
,
DISPLAYCONFIG_MODE_INFO
*
modes
,
DISPLAYCONFIG_TOPOLOGY_ID
*
topology
_
id
)
{
ULONG
adapter_index
;
LONG
ret
;
...
...
@@ -2299,12 +2299,13 @@ LONG WINAPI NtUserQueryDisplayConfig( UINT32 flags, UINT32 *numpathelements, DIS
DEVMODEW
devmode
;
struct
monitor
*
monitor
;
FIXME
(
"(%08x %p %p %p %p %p): semi-stub
\n
"
,
flags
,
numpathelements
,
pathinfo
,
numinfoelements
,
modeinfo
,
topologyid
);
FIXME
(
"flags %#x, paths_count %p, paths %p, modes_count %p, modes %p, topology_id %p semi-stub
\n
"
,
flags
,
paths_count
,
paths
,
modes_count
,
modes
,
topology_id
);
if
(
!
numpathelements
||
!
numinfoelements
)
if
(
!
paths_count
||
!
modes_count
)
return
ERROR_INVALID_PARAMETER
;
if
(
!*
numpathelements
||
!*
numinfoelements
)
if
(
!*
paths_count
||
!*
modes_count
)
return
ERROR_INVALID_PARAMETER
;
if
(
flags
!=
QDC_ALL_PATHS
&&
...
...
@@ -2312,17 +2313,17 @@ LONG WINAPI NtUserQueryDisplayConfig( UINT32 flags, UINT32 *numpathelements, DIS
flags
!=
QDC_DATABASE_CURRENT
)
return
ERROR_INVALID_PARAMETER
;
if
(((
flags
==
QDC_DATABASE_CURRENT
)
&&
!
topologyid
)
||
((
flags
!=
QDC_DATABASE_CURRENT
)
&&
topologyid
))
if
(((
flags
==
QDC_DATABASE_CURRENT
)
&&
!
topology
_
id
)
||
((
flags
!=
QDC_DATABASE_CURRENT
)
&&
topology
_
id
))
return
ERROR_INVALID_PARAMETER
;
if
(
flags
!=
QDC_ONLY_ACTIVE_PATHS
)
FIXME
(
"only returning active paths
\n
"
);
if
(
topologyid
)
if
(
topology
_
id
)
{
FIXME
(
"setting toplogyid to DISPLAYCONFIG_TOPOLOGY_INTERNAL
\n
"
);
*
topologyid
=
DISPLAYCONFIG_TOPOLOGY_INTERNAL
;
*
topology
_
id
=
DISPLAYCONFIG_TOPOLOGY_INTERNAL
;
}
if
(
!
lock_display_devices
())
...
...
@@ -2346,18 +2347,18 @@ LONG WINAPI NtUserQueryDisplayConfig( UINT32 flags, UINT32 *numpathelements, DIS
goto
done
;
}
if
(
path_index
==
*
numpathelements
||
mode_index
==
*
numinfoelements
)
if
(
path_index
==
*
paths_count
||
mode_index
==
*
modes_count
)
{
ret
=
ERROR_INSUFFICIENT_BUFFER
;
goto
done
;
}
path
info
[
path_index
].
flags
=
DISPLAYCONFIG_PATH_ACTIVE
;
set_mode_target_info
(
&
mode
info
[
mode_index
],
gpu_luid
,
output_id
,
flags
,
&
devmode
);
set_path_target_info
(
&
(
pathinfo
[
path_index
].
targetInfo
)
,
gpu_luid
,
output_id
,
mode_index
,
&
devmode
);
path
s
[
path_index
].
flags
=
DISPLAYCONFIG_PATH_ACTIVE
;
set_mode_target_info
(
&
mode
s
[
mode_index
],
gpu_luid
,
output_id
,
flags
,
&
devmode
);
set_path_target_info
(
&
paths
[
path_index
].
targetInfo
,
gpu_luid
,
output_id
,
mode_index
,
&
devmode
);
mode_index
++
;
if
(
mode_index
==
*
numinfoelements
)
if
(
mode_index
==
*
modes_count
)
{
ret
=
ERROR_INSUFFICIENT_BUFFER
;
goto
done
;
...
...
@@ -2366,18 +2367,18 @@ LONG WINAPI NtUserQueryDisplayConfig( UINT32 flags, UINT32 *numpathelements, DIS
/* Multiple targets can be driven by the same source, ensure a mode
* hasn't already been added for this source.
*/
if
(
!
source_mode_exists
(
mode
info
,
mode_index
,
adapter_index
,
&
source_mode_index
))
if
(
!
source_mode_exists
(
mode
s
,
mode_index
,
adapter_index
,
&
source_mode_index
))
{
set_mode_source_info
(
&
mode
info
[
mode_index
],
gpu_luid
,
adapter_index
,
&
devmode
);
set_mode_source_info
(
&
mode
s
[
mode_index
],
gpu_luid
,
adapter_index
,
&
devmode
);
source_mode_index
=
mode_index
;
mode_index
++
;
}
set_path_source_info
(
&
(
pathinfo
[
path_index
].
sourceInfo
)
,
gpu_luid
,
adapter_index
,
source_mode_index
);
set_path_source_info
(
&
paths
[
path_index
].
sourceInfo
,
gpu_luid
,
adapter_index
,
source_mode_index
);
path_index
++
;
}
*
numpathelements
=
path_index
;
*
numinfoelements
=
mode_index
;
*
paths_count
=
path_index
;
*
modes_count
=
mode_index
;
ret
=
ERROR_SUCCESS
;
done:
...
...
include/ntuser.h
View file @
d24dcb1e
...
...
@@ -843,9 +843,9 @@ BOOL WINAPI NtUserPerMonitorDPIPhysicalToLogicalPoint( HWND hwnd, POINT *pt )
BOOL
WINAPI
NtUserPostMessage
(
HWND
hwnd
,
UINT
msg
,
WPARAM
wparam
,
LPARAM
lparam
);
BOOL
WINAPI
NtUserPostThreadMessage
(
DWORD
thread
,
UINT
msg
,
WPARAM
wparam
,
LPARAM
lparam
);
BOOL
WINAPI
NtUserPrintWindow
(
HWND
hwnd
,
HDC
hdc
,
UINT
flags
);
LONG
WINAPI
NtUserQueryDisplayConfig
(
UINT32
flags
,
UINT32
*
numpathelements
,
DISPLAYCONFIG_PATH_INFO
*
pathinfo
,
UINT32
*
numinfoelements
,
DISPLAYCONFIG_MODE_INFO
*
modeinfo
,
DISPLAYCONFIG_TOPOLOGY_ID
*
topology
id
);
LONG
WINAPI
NtUserQueryDisplayConfig
(
UINT32
flags
,
UINT32
*
paths_count
,
DISPLAYCONFIG_PATH_INFO
*
paths
,
UINT32
*
modes_count
,
DISPLAYCONFIG_MODE_INFO
*
modes
,
DISPLAYCONFIG_TOPOLOGY_ID
*
topology_
id
);
UINT_PTR
WINAPI
NtUserQueryInputContext
(
HIMC
handle
,
UINT
attr
);
HWND
WINAPI
NtUserRealChildWindowFromPoint
(
HWND
parent
,
LONG
x
,
LONG
y
);
BOOL
WINAPI
NtUserRedrawWindow
(
HWND
hwnd
,
const
RECT
*
rect
,
HRGN
hrgn
,
UINT
flags
);
...
...
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