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
b84334d2
Commit
b84334d2
authored
Jul 02, 2019
by
Zebediah Figura
Committed by
Alexandre Julliard
Jul 04, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
hidclass.sys: Create a mouse device interface for HID mouse devices.
Signed-off-by:
Zebediah Figura
<
zfigura@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
37d51cd1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
0 deletions
+17
-0
device.c
dlls/hidclass.sys/device.c
+9
-0
hid.h
dlls/hidclass.sys/hid.h
+3
-0
pnp.c
dlls/hidclass.sys/pnp.c
+5
-0
No files found.
dlls/hidclass.sys/device.c
View file @
b84334d2
...
...
@@ -33,6 +33,7 @@
#include "initguid.h"
#include "devguid.h"
#include "ntddmou.h"
WINE_DEFAULT_DEBUG_CHANNEL
(
hid
);
WINE_DECLARE_DEBUG_CHANNEL
(
hid_report
);
...
...
@@ -122,6 +123,14 @@ NTSTATUS HID_LinkDevice(DEVICE_OBJECT *device)
return
status
;
}
/* FIXME: This should probably be done in mouhid.sys. */
if
(
ext
->
preparseData
->
caps
.
UsagePage
==
HID_USAGE_PAGE_GENERIC
&&
ext
->
preparseData
->
caps
.
Usage
==
HID_USAGE_GENERIC_MOUSE
)
{
if
(
!
IoRegisterDeviceInterface
(
device
,
&
GUID_DEVINTERFACE_MOUSE
,
NULL
,
&
ext
->
mouse_link_name
))
ext
->
is_mouse
=
TRUE
;
}
return
STATUS_SUCCESS
;
error:
...
...
dlls/hidclass.sys/hid.h
View file @
b84334d2
...
...
@@ -55,6 +55,9 @@ typedef struct _BASE_DEVICE_EXTENSION {
KSPIN_LOCK
irp_queue_lock
;
LIST_ENTRY
irp_queue
;
BOOL
is_mouse
;
UNICODE_STRING
mouse_link_name
;
/* Minidriver Specific stuff will end up here */
}
BASE_DEVICE_EXTENSION
;
...
...
dlls/hidclass.sys/pnp.c
View file @
b84334d2
...
...
@@ -215,6 +215,9 @@ NTSTATUS PNP_RemoveDevice(minidriver *minidriver, DEVICE_OBJECT *device, IRP *ir
return
rc
;
}
if
(
ext
->
is_mouse
)
IoSetDeviceInterfaceState
(
&
ext
->
mouse_link_name
,
FALSE
);
if
(
irp
)
rc
=
minidriver
->
PNPDispatch
(
device
,
irp
);
HID_DeleteDevice
(
device
);
...
...
@@ -294,6 +297,8 @@ NTSTATUS WINAPI HID_PNP_Dispatch(DEVICE_OBJECT *device, IRP *irp)
rc
=
minidriver
->
PNPDispatch
(
device
,
irp
);
IoSetDeviceInterfaceState
(
&
ext
->
link_name
,
TRUE
);
if
(
ext
->
is_mouse
)
IoSetDeviceInterfaceState
(
&
ext
->
mouse_link_name
,
TRUE
);
return
rc
;
}
case
IRP_MN_REMOVE_DEVICE
:
...
...
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