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
3ad0c002
Commit
3ad0c002
authored
Oct 27, 2021
by
Rémi Bernon
Committed by
Alexandre Julliard
Oct 27, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winebus.sys: Drop the hid_report channel.
Signed-off-by:
Rémi Bernon
<
rbernon@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
b7e23884
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
19 deletions
+14
-19
bus_sdl.c
dlls/winebus.sys/bus_sdl.c
+1
-3
bus_udev.c
dlls/winebus.sys/bus_udev.c
+10
-12
main.c
dlls/winebus.sys/main.c
+3
-4
No files found.
dlls/winebus.sys/bus_sdl.c
View file @
3ad0c002
...
...
@@ -59,8 +59,6 @@ WINE_DEFAULT_DEBUG_CHANNEL(plugplay);
#ifdef SONAME_LIBSDL2
WINE_DECLARE_DEBUG_CHANNEL
(
hid_report
);
static
pthread_mutex_t
sdl_cs
=
PTHREAD_MUTEX_INITIALIZER
;
static
struct
sdl_bus_options
options
;
...
...
@@ -847,7 +845,7 @@ static void process_device_event(SDL_Event *event)
struct
sdl_device
*
impl
;
SDL_JoystickID
id
;
TRACE
_
(
hid_report
)
(
"Received action %x
\n
"
,
event
->
type
);
TRACE
(
"Received action %x
\n
"
,
event
->
type
);
pthread_mutex_lock
(
&
sdl_cs
);
...
...
dlls/winebus.sys/bus_udev.c
View file @
3ad0c002
...
...
@@ -101,8 +101,6 @@ WINE_DEFAULT_DEBUG_CHANNEL(plugplay);
#ifdef HAVE_UDEV
WINE_DECLARE_DEBUG_CHANNEL
(
hid_report
);
static
pthread_mutex_t
udev_cs
=
PTHREAD_MUTEX_INITIALIZER
;
static
struct
udev
*
udev_context
=
NULL
;
...
...
@@ -344,9 +342,9 @@ static void hidraw_device_read_report(struct unix_device *iface)
int
size
=
read
(
impl
->
base
.
device_fd
,
report_buffer
,
sizeof
(
report_buffer
));
if
(
size
==
-
1
)
TRACE
_
(
hid_report
)
(
"Read failed. Likely an unplugged device %d %s
\n
"
,
errno
,
strerror
(
errno
));
TRACE
(
"Read failed. Likely an unplugged device %d %s
\n
"
,
errno
,
strerror
(
errno
));
else
if
(
size
==
0
)
TRACE
_
(
hid_report
)
(
"Failed to read report
\n
"
);
TRACE
(
"Failed to read report
\n
"
);
else
{
/* As described in the Linux kernel driver, when connected over bluetooth, DS4 controllers
...
...
@@ -380,7 +378,7 @@ static void hidraw_device_set_output_report(struct unix_device *iface, HID_XFER_
if
((
buffer
[
0
]
=
packet
->
reportId
))
count
=
write
(
impl
->
base
.
device_fd
,
packet
->
reportBuffer
,
length
);
else
if
(
length
>
sizeof
(
buffer
)
-
1
)
ERR
_
(
hid_report
)
(
"id %d length %u >= 8192, cannot write
\n
"
,
packet
->
reportId
,
length
);
ERR
(
"id %d length %u >= 8192, cannot write
\n
"
,
packet
->
reportId
,
length
);
else
{
memcpy
(
buffer
+
1
,
packet
->
reportBuffer
,
length
);
...
...
@@ -394,7 +392,7 @@ static void hidraw_device_set_output_report(struct unix_device *iface, HID_XFER_
}
else
{
ERR
_
(
hid_report
)
(
"id %d write failed error: %d %s
\n
"
,
packet
->
reportId
,
errno
,
strerror
(
errno
));
ERR
(
"id %d write failed error: %d %s
\n
"
,
packet
->
reportId
,
errno
,
strerror
(
errno
));
io
->
Information
=
0
;
io
->
Status
=
STATUS_UNSUCCESSFUL
;
}
...
...
@@ -412,7 +410,7 @@ static void hidraw_device_get_feature_report(struct unix_device *iface, HID_XFER
if
((
buffer
[
0
]
=
packet
->
reportId
)
&&
length
<=
0x1fff
)
count
=
ioctl
(
impl
->
base
.
device_fd
,
HIDIOCGFEATURE
(
length
),
packet
->
reportBuffer
);
else
if
(
length
>
sizeof
(
buffer
)
-
1
)
ERR
_
(
hid_report
)
(
"id %d length %u >= 8192, cannot read
\n
"
,
packet
->
reportId
,
length
);
ERR
(
"id %d length %u >= 8192, cannot read
\n
"
,
packet
->
reportId
,
length
);
else
{
count
=
ioctl
(
impl
->
base
.
device_fd
,
HIDIOCGFEATURE
(
length
+
1
),
buffer
);
...
...
@@ -426,7 +424,7 @@ static void hidraw_device_get_feature_report(struct unix_device *iface, HID_XFER
}
else
{
ERR
_
(
hid_report
)
(
"id %d read failed, error: %d %s
\n
"
,
packet
->
reportId
,
errno
,
strerror
(
errno
));
ERR
(
"id %d read failed, error: %d %s
\n
"
,
packet
->
reportId
,
errno
,
strerror
(
errno
));
io
->
Information
=
0
;
io
->
Status
=
STATUS_UNSUCCESSFUL
;
}
...
...
@@ -448,7 +446,7 @@ static void hidraw_device_set_feature_report(struct unix_device *iface, HID_XFER
if
((
buffer
[
0
]
=
packet
->
reportId
)
&&
length
<=
0x1fff
)
count
=
ioctl
(
impl
->
base
.
device_fd
,
HIDIOCSFEATURE
(
length
),
packet
->
reportBuffer
);
else
if
(
length
>
sizeof
(
buffer
)
-
1
)
ERR
_
(
hid_report
)
(
"id %d length %u >= 8192, cannot write
\n
"
,
packet
->
reportId
,
length
);
ERR
(
"id %d length %u >= 8192, cannot write
\n
"
,
packet
->
reportId
,
length
);
else
{
memcpy
(
buffer
+
1
,
packet
->
reportBuffer
,
length
);
...
...
@@ -462,7 +460,7 @@ static void hidraw_device_set_feature_report(struct unix_device *iface, HID_XFER
}
else
{
ERR
_
(
hid_report
)
(
"id %d write failed, error: %d %s
\n
"
,
packet
->
reportId
,
errno
,
strerror
(
errno
));
ERR
(
"id %d write failed, error: %d %s
\n
"
,
packet
->
reportId
,
errno
,
strerror
(
errno
));
io
->
Information
=
0
;
io
->
Status
=
STATUS_UNSUCCESSFUL
;
}
...
...
@@ -802,9 +800,9 @@ static void lnxev_device_read_report(struct unix_device *iface)
size
=
read
(
impl
->
base
.
device_fd
,
&
ie
,
sizeof
(
ie
));
if
(
size
==
-
1
)
TRACE
_
(
hid_report
)
(
"Read failed. Likely an unplugged device
\n
"
);
TRACE
(
"Read failed. Likely an unplugged device
\n
"
);
else
if
(
size
==
0
)
TRACE
_
(
hid_report
)
(
"Failed to read report
\n
"
);
TRACE
(
"Failed to read report
\n
"
);
else
if
(
set_report_from_event
(
iface
,
&
ie
))
bus_event_queue_input_report
(
&
event_queue
,
iface
,
state
->
report_buf
,
state
->
report_len
);
}
...
...
dlls/winebus.sys/main.c
View file @
3ad0c002
...
...
@@ -41,7 +41,6 @@
#include "unixlib.h"
WINE_DEFAULT_DEBUG_CHANNEL
(
plugplay
);
WINE_DECLARE_DEBUG_CHANNEL
(
hid_report
);
static
DRIVER_OBJECT
*
driver_obj
;
...
...
@@ -1045,21 +1044,21 @@ static NTSTATUS WINAPI hid_internal_dispatch(DEVICE_OBJECT *device, IRP *irp)
case
IOCTL_HID_WRITE_REPORT
:
{
HID_XFER_PACKET
*
packet
=
(
HID_XFER_PACKET
*
)(
irp
->
UserBuffer
);
TRACE
_
(
hid_report
)
(
"IOCTL_HID_WRITE_REPORT / IOCTL_HID_SET_OUTPUT_REPORT
\n
"
);
TRACE
(
"IOCTL_HID_WRITE_REPORT / IOCTL_HID_SET_OUTPUT_REPORT
\n
"
);
unix_device_set_output_report
(
device
,
packet
,
&
irp
->
IoStatus
);
break
;
}
case
IOCTL_HID_GET_FEATURE
:
{
HID_XFER_PACKET
*
packet
=
(
HID_XFER_PACKET
*
)(
irp
->
UserBuffer
);
TRACE
_
(
hid_report
)
(
"IOCTL_HID_GET_FEATURE
\n
"
);
TRACE
(
"IOCTL_HID_GET_FEATURE
\n
"
);
unix_device_get_feature_report
(
device
,
packet
,
&
irp
->
IoStatus
);
break
;
}
case
IOCTL_HID_SET_FEATURE
:
{
HID_XFER_PACKET
*
packet
=
(
HID_XFER_PACKET
*
)(
irp
->
UserBuffer
);
TRACE
_
(
hid_report
)
(
"IOCTL_HID_SET_FEATURE
\n
"
);
TRACE
(
"IOCTL_HID_SET_FEATURE
\n
"
);
unix_device_set_feature_report
(
device
,
packet
,
&
irp
->
IoStatus
);
break
;
}
...
...
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