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
7032b417
Commit
7032b417
authored
Sep 16, 2021
by
Rémi Bernon
Committed by
Alexandre Julliard
Sep 16, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winebus.sys: Move is_xbox_gamepad to unixlib.c.
Signed-off-by:
Rémi Bernon
<
rbernon@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
2a2fc11d
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
21 additions
and
41 deletions
+21
-41
bus.h
dlls/winebus.sys/bus.h
+0
-3
main.c
dlls/winebus.sys/main.c
+0
-38
unix_private.h
dlls/winebus.sys/unix_private.h
+2
-0
unixlib.c
dlls/winebus.sys/unixlib.c
+19
-0
No files found.
dlls/winebus.sys/bus.h
View file @
7032b417
...
...
@@ -27,7 +27,4 @@
#include "unixlib.h"
/* General Bus Functions */
BOOL
is_xbox_gamepad
(
WORD
vid
,
WORD
pid
)
DECLSPEC_HIDDEN
;
extern
HANDLE
driver_key
DECLSPEC_HIDDEN
;
dlls/winebus.sys/main.c
View file @
7032b417
...
...
@@ -57,31 +57,6 @@ __ASM_STDCALL_FUNC( wrap_fastcall_func1, 8,
#endif
struct
product_desc
{
WORD
vid
;
WORD
pid
;
};
#define VID_MICROSOFT 0x045e
static
const
struct
product_desc
XBOX_CONTROLLERS
[]
=
{
{
VID_MICROSOFT
,
0x0202
},
/* Xbox Controller */
{
VID_MICROSOFT
,
0x0285
},
/* Xbox Controller S */
{
VID_MICROSOFT
,
0x0289
},
/* Xbox Controller S */
{
VID_MICROSOFT
,
0x028e
},
/* Xbox360 Controller */
{
VID_MICROSOFT
,
0x028f
},
/* Xbox360 Wireless Controller */
{
VID_MICROSOFT
,
0x02d1
},
/* Xbox One Controller */
{
VID_MICROSOFT
,
0x02dd
},
/* Xbox One Controller (Covert Forces/Firmware 2015) */
{
VID_MICROSOFT
,
0x02e0
},
/* Xbox One X Controller */
{
VID_MICROSOFT
,
0x02e3
},
/* Xbox One Elite Controller */
{
VID_MICROSOFT
,
0x02e6
},
/* Wireless XBox Controller Dongle */
{
VID_MICROSOFT
,
0x02ea
},
/* Xbox One S Controller */
{
VID_MICROSOFT
,
0x02fd
},
/* Xbox One S Controller (Firmware 2017) */
{
VID_MICROSOFT
,
0x0719
},
/* Xbox 360 Wireless Adapter */
};
static
DRIVER_OBJECT
*
driver_obj
;
static
DEVICE_OBJECT
*
mouse_obj
;
...
...
@@ -1021,19 +996,6 @@ static NTSTATUS WINAPI hid_internal_dispatch(DEVICE_OBJECT *device, IRP *irp)
return
status
;
}
BOOL
is_xbox_gamepad
(
WORD
vid
,
WORD
pid
)
{
int
i
;
if
(
vid
!=
VID_MICROSOFT
)
return
FALSE
;
for
(
i
=
0
;
i
<
ARRAY_SIZE
(
XBOX_CONTROLLERS
);
i
++
)
if
(
pid
==
XBOX_CONTROLLERS
[
i
].
pid
)
return
TRUE
;
return
FALSE
;
}
static
NTSTATUS
WINAPI
driver_add_device
(
DRIVER_OBJECT
*
driver
,
DEVICE_OBJECT
*
pdo
)
{
NTSTATUS
ret
;
...
...
dlls/winebus.sys/unix_private.h
View file @
7032b417
...
...
@@ -89,4 +89,6 @@ extern BOOL hid_descriptor_add_axes(struct hid_descriptor *desc, BYTE count, USA
extern
BOOL
hid_descriptor_add_haptics
(
struct
hid_descriptor
*
desc
)
DECLSPEC_HIDDEN
;
BOOL
is_xbox_gamepad
(
WORD
vid
,
WORD
pid
)
DECLSPEC_HIDDEN
;
#endif
/* __WINEBUS_UNIX_PRIVATE_H */
dlls/winebus.sys/unixlib.c
View file @
7032b417
...
...
@@ -34,6 +34,25 @@
WINE_DEFAULT_DEBUG_CHANNEL
(
plugplay
);
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
==
0x0719
)
return
TRUE
;
/* Xbox 360 Wireless Adapter */
return
FALSE
;
}
struct
mouse_device
{
struct
unix_device
unix_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