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
13d8571b
Commit
13d8571b
authored
Jan 14, 2024
by
Rémi Bernon
Committed by
Alexandre Julliard
Jan 18, 2024
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winebus: Move device identification helpers to unixlib.h.
parent
814d2c17
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
40 additions
and
44 deletions
+40
-44
unix_private.h
dlls/winebus.sys/unix_private.h
+0
-4
unixlib.c
dlls/winebus.sys/unixlib.c
+0
-40
unixlib.h
dlls/winebus.sys/unixlib.h
+40
-0
No files found.
dlls/winebus.sys/unix_private.h
View file @
13d8571b
...
...
@@ -266,8 +266,4 @@ extern void hid_device_drop_report(struct unix_device *iface);
extern
void
hid_device_set_effect_state
(
struct
unix_device
*
iface
,
BYTE
index
,
BYTE
flags
);
BOOL
is_xbox_gamepad
(
WORD
vid
,
WORD
pid
);
BOOL
is_dualshock4_gamepad
(
WORD
vid
,
WORD
pid
);
BOOL
is_dualsense_gamepad
(
WORD
vid
,
WORD
pid
);
#endif
/* __WINEBUS_UNIX_PRIVATE_H */
dlls/winebus.sys/unixlib.c
View file @
13d8571b
...
...
@@ -38,46 +38,6 @@
#include "unix_private.h"
BOOL
is_xbox_gamepad
(
WORD
vid
,
WORD
pid
)
{
if
(
vid
!=
0x045e
)
return
FALSE
;
if
(
pid
==
0x0202
)
return
TRUE
;
/* Xbox Controller */
if
(
pid
==
0x0285
)
return
TRUE
;
/* Xbox Controller S */
if
(
pid
==
0x0289
)
return
TRUE
;
/* Xbox Controller S */
if
(
pid
==
0x028e
)
return
TRUE
;
/* Xbox360 Controller */
if
(
pid
==
0x028f
)
return
TRUE
;
/* Xbox360 Wireless Controller */
if
(
pid
==
0x02d1
)
return
TRUE
;
/* Xbox One Controller */
if
(
pid
==
0x02dd
)
return
TRUE
;
/* Xbox One Controller (Covert Forces/Firmware 2015) */
if
(
pid
==
0x02e0
)
return
TRUE
;
/* Xbox One X Controller */
if
(
pid
==
0x02e3
)
return
TRUE
;
/* Xbox One Elite Controller */
if
(
pid
==
0x02e6
)
return
TRUE
;
/* Wireless XBox Controller Dongle */
if
(
pid
==
0x02ea
)
return
TRUE
;
/* Xbox One S Controller */
if
(
pid
==
0x02fd
)
return
TRUE
;
/* Xbox One S Controller (Firmware 2017) */
if
(
pid
==
0x0b00
)
return
TRUE
;
/* Xbox Elite 2 */
if
(
pid
==
0x0b05
)
return
TRUE
;
/* Xbox Elite 2 Wireless */
if
(
pid
==
0x0b12
)
return
TRUE
;
/* Xbox Series */
if
(
pid
==
0x0b13
)
return
TRUE
;
/* Xbox Series Wireless */
if
(
pid
==
0x0719
)
return
TRUE
;
/* Xbox 360 Wireless Adapter */
return
FALSE
;
}
BOOL
is_dualshock4_gamepad
(
WORD
vid
,
WORD
pid
)
{
if
(
vid
!=
0x054c
)
return
FALSE
;
if
(
pid
==
0x05c4
)
return
TRUE
;
/* DualShock 4 [CUH-ZCT1x] */
if
(
pid
==
0x09cc
)
return
TRUE
;
/* DualShock 4 [CUH-ZCT2x] */
if
(
pid
==
0x0ba0
)
return
TRUE
;
/* Dualshock 4 Wireless Adaptor */
return
FALSE
;
}
BOOL
is_dualsense_gamepad
(
WORD
vid
,
WORD
pid
)
{
if
(
vid
!=
0x054c
)
return
FALSE
;
if
(
pid
==
0x0ce6
)
return
TRUE
;
/* DualSense */
if
(
pid
==
0x0df2
)
return
TRUE
;
/* DualSense Edge */
return
FALSE
;
}
struct
mouse_device
{
struct
unix_device
unix_device
;
...
...
dlls/winebus.sys/unixlib.h
View file @
13d8571b
...
...
@@ -152,4 +152,44 @@ static inline const char *debugstr_device_desc(struct device_desc *desc)
desc
->
vid
,
desc
->
pid
,
desc
->
version
,
desc
->
input
,
desc
->
uid
,
desc
->
is_gamepad
,
desc
->
is_hidraw
);
}
static
inline
BOOL
is_xbox_gamepad
(
WORD
vid
,
WORD
pid
)
{
if
(
vid
!=
0x045e
)
return
FALSE
;
if
(
pid
==
0x0202
)
return
TRUE
;
/* Xbox Controller */
if
(
pid
==
0x0285
)
return
TRUE
;
/* Xbox Controller S */
if
(
pid
==
0x0289
)
return
TRUE
;
/* Xbox Controller S */
if
(
pid
==
0x028e
)
return
TRUE
;
/* Xbox360 Controller */
if
(
pid
==
0x028f
)
return
TRUE
;
/* Xbox360 Wireless Controller */
if
(
pid
==
0x02d1
)
return
TRUE
;
/* Xbox One Controller */
if
(
pid
==
0x02dd
)
return
TRUE
;
/* Xbox One Controller (Covert Forces/Firmware 2015) */
if
(
pid
==
0x02e0
)
return
TRUE
;
/* Xbox One X Controller */
if
(
pid
==
0x02e3
)
return
TRUE
;
/* Xbox One Elite Controller */
if
(
pid
==
0x02e6
)
return
TRUE
;
/* Wireless XBox Controller Dongle */
if
(
pid
==
0x02ea
)
return
TRUE
;
/* Xbox One S Controller */
if
(
pid
==
0x02fd
)
return
TRUE
;
/* Xbox One S Controller (Firmware 2017) */
if
(
pid
==
0x0b00
)
return
TRUE
;
/* Xbox Elite 2 */
if
(
pid
==
0x0b05
)
return
TRUE
;
/* Xbox Elite 2 Wireless */
if
(
pid
==
0x0b12
)
return
TRUE
;
/* Xbox Series */
if
(
pid
==
0x0b13
)
return
TRUE
;
/* Xbox Series Wireless */
if
(
pid
==
0x0719
)
return
TRUE
;
/* Xbox 360 Wireless Adapter */
return
FALSE
;
}
static
inline
BOOL
is_dualshock4_gamepad
(
WORD
vid
,
WORD
pid
)
{
if
(
vid
!=
0x054c
)
return
FALSE
;
if
(
pid
==
0x05c4
)
return
TRUE
;
/* DualShock 4 [CUH-ZCT1x] */
if
(
pid
==
0x09cc
)
return
TRUE
;
/* DualShock 4 [CUH-ZCT2x] */
if
(
pid
==
0x0ba0
)
return
TRUE
;
/* Dualshock 4 Wireless Adaptor */
return
FALSE
;
}
static
inline
BOOL
is_dualsense_gamepad
(
WORD
vid
,
WORD
pid
)
{
if
(
vid
!=
0x054c
)
return
FALSE
;
if
(
pid
==
0x0ce6
)
return
TRUE
;
/* DualSense */
if
(
pid
==
0x0df2
)
return
TRUE
;
/* DualSense Edge */
return
FALSE
;
}
#endif
/* __WINEBUS_UNIXLIB_H */
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