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
56314026
Commit
56314026
authored
May 08, 2018
by
Aric Stewart
Committed by
Alexandre Julliard
May 08, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winebus: Properly identify SDL joysticks index when hot-plugged.
Signed-off-by:
Aric Stewart
<
aric@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
17574518
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
bus_sdl.c
dlls/winebus.sys/bus_sdl.c
+5
-5
No files found.
dlls/winebus.sys/bus_sdl.c
View file @
56314026
...
...
@@ -817,7 +817,7 @@ static void try_add_device(SDL_JoystickID index)
if
(
map_controllers
&&
pSDL_IsGameController
(
index
))
controller
=
pSDL_GameControllerOpen
(
index
);
id
=
index
;
id
=
pSDL_JoystickInstanceID
(
joystick
)
;
if
(
controller
)
{
vid
=
VID_MICROSOFT
;
...
...
@@ -846,7 +846,7 @@ static void try_add_device(SDL_JoystickID index)
if
(
controller
)
{
TRACE
(
"Found sdl game controller %i (vid %04x, pid %04x, version %u, serial %s)
\n
"
,
i
ndex
,
vid
,
pid
,
version
,
debugstr_w
(
serial
));
i
d
,
vid
,
pid
,
version
,
debugstr_w
(
serial
));
is_xbox_gamepad
=
TRUE
;
}
else
...
...
@@ -854,14 +854,14 @@ static void try_add_device(SDL_JoystickID index)
int
button_count
,
axis_count
;
TRACE
(
"Found sdl device %i (vid %04x, pid %04x, version %u, serial %s)
\n
"
,
i
ndex
,
vid
,
pid
,
version
,
debugstr_w
(
serial
));
i
d
,
vid
,
pid
,
version
,
debugstr_w
(
serial
));
axis_count
=
pSDL_JoystickNumAxes
(
joystick
);
button_count
=
pSDL_JoystickNumAxes
(
joystick
);
is_xbox_gamepad
=
(
axis_count
==
6
&&
button_count
>=
14
);
}
device
=
bus_create_hid_device
(
sdl_driver_obj
,
sdl_busidW
,
vid
,
pid
,
version
,
0
,
serial
,
is_xbox_gamepad
,
&
GUID_DEVCLASS_SDL
,
&
sdl_vtbl
,
sizeof
(
struct
platform_private
));
device
=
bus_create_hid_device
(
sdl_driver_obj
,
sdl_busidW
,
vid
,
pid
,
version
,
id
,
serial
,
is_xbox_gamepad
,
&
GUID_DEVCLASS_SDL
,
&
sdl_vtbl
,
sizeof
(
struct
platform_private
));
if
(
device
)
{
...
...
@@ -885,7 +885,7 @@ static void try_add_device(SDL_JoystickID index)
}
else
{
WARN
(
"Ignoring device %i
\n
"
,
i
ndex
);
WARN
(
"Ignoring device %i
\n
"
,
i
d
);
}
}
...
...
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