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
0881d42e
Commit
0881d42e
authored
May 15, 2022
by
Zebediah Figura
Committed by
Alexandre Julliard
Jun 02, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
user32: Factor out raw input device enumeration.
Signed-off-by:
Zebediah Figura
<
zfigura@codeweavers.com
>
parent
879ef361
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
32 deletions
+17
-32
rawinput.c
dlls/user32/rawinput.c
+17
-32
No files found.
dlls/user32/rawinput.c
View file @
0881d42e
...
...
@@ -232,13 +232,24 @@ fail:
return
NULL
;
}
void
rawinput_update_device_list
(
void
)
static
void
enumerate_devices
(
DWORD
type
,
const
GUID
*
guid
)
{
SP_DEVICE_INTERFACE_DATA
iface
=
{
sizeof
(
iface
)
};
struct
device
*
device
;
SP_DEVICE_INTERFACE_DATA
iface
=
{
sizeof
(
iface
)};
HDEVINFO
set
;
DWORD
idx
;
set
=
SetupDiGetClassDevsW
(
guid
,
NULL
,
NULL
,
DIGCF_DEVICEINTERFACE
|
DIGCF_PRESENT
);
for
(
idx
=
0
;
SetupDiEnumDeviceInterfaces
(
set
,
NULL
,
&
GUID_DEVINTERFACE_HID
,
idx
,
&
iface
);
++
idx
)
add_device
(
set
,
&
iface
,
type
);
SetupDiDestroyDeviceInfoList
(
set
);
}
void
rawinput_update_device_list
(
void
)
{
DWORD
idx
;
TRACE
(
"
\n
"
);
EnterCriticalSection
(
&
rawinput_devices_cs
);
...
...
@@ -252,35 +263,9 @@ void rawinput_update_device_list(void)
}
rawinput_devices_count
=
0
;
set
=
SetupDiGetClassDevsW
(
&
GUID_DEVINTERFACE_HID
,
NULL
,
NULL
,
DIGCF_DEVICEINTERFACE
|
DIGCF_PRESENT
);
for
(
idx
=
0
;
SetupDiEnumDeviceInterfaces
(
set
,
NULL
,
&
GUID_DEVINTERFACE_HID
,
idx
,
&
iface
);
++
idx
)
{
if
(
!
(
device
=
add_device
(
set
,
&
iface
,
RIM_TYPEHID
)))
continue
;
}
SetupDiDestroyDeviceInfoList
(
set
);
set
=
SetupDiGetClassDevsW
(
&
GUID_DEVINTERFACE_MOUSE
,
NULL
,
NULL
,
DIGCF_DEVICEINTERFACE
|
DIGCF_PRESENT
);
for
(
idx
=
0
;
SetupDiEnumDeviceInterfaces
(
set
,
NULL
,
&
GUID_DEVINTERFACE_MOUSE
,
idx
,
&
iface
);
++
idx
)
{
if
(
!
(
device
=
add_device
(
set
,
&
iface
,
RIM_TYPEMOUSE
)))
continue
;
}
SetupDiDestroyDeviceInfoList
(
set
);
set
=
SetupDiGetClassDevsW
(
&
GUID_DEVINTERFACE_KEYBOARD
,
NULL
,
NULL
,
DIGCF_DEVICEINTERFACE
|
DIGCF_PRESENT
);
for
(
idx
=
0
;
SetupDiEnumDeviceInterfaces
(
set
,
NULL
,
&
GUID_DEVINTERFACE_KEYBOARD
,
idx
,
&
iface
);
++
idx
)
{
if
(
!
(
device
=
add_device
(
set
,
&
iface
,
RIM_TYPEHID
)))
continue
;
}
SetupDiDestroyDeviceInfoList
(
set
);
enumerate_devices
(
RIM_TYPEHID
,
&
GUID_DEVINTERFACE_HID
);
enumerate_devices
(
RIM_TYPEMOUSE
,
&
GUID_DEVINTERFACE_MOUSE
);
enumerate_devices
(
RIM_TYPEKEYBOARD
,
&
GUID_DEVINTERFACE_KEYBOARD
);
LeaveCriticalSection
(
&
rawinput_devices_cs
);
}
...
...
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