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
8f0f2fab
Commit
8f0f2fab
authored
Oct 04, 2021
by
Rémi Bernon
Committed by
Alexandre Julliard
Oct 04, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winebus.sys: Implement PID effect control for SDL devices.
Signed-off-by:
Rémi Bernon
<
rbernon@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
ac035365
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
2 deletions
+22
-2
bus_sdl.c
dlls/winebus.sys/bus_sdl.c
+22
-2
No files found.
dlls/winebus.sys/bus_sdl.c
View file @
8f0f2fab
...
...
@@ -104,6 +104,7 @@ MAKE_FUNCPTR(SDL_HapticRumbleSupported);
MAKE_FUNCPTR
(
SDL_HapticRunEffect
);
MAKE_FUNCPTR
(
SDL_HapticSetGain
);
MAKE_FUNCPTR
(
SDL_HapticStopAll
);
MAKE_FUNCPTR
(
SDL_HapticStopEffect
);
MAKE_FUNCPTR
(
SDL_HapticUnpause
);
MAKE_FUNCPTR
(
SDL_JoystickIsHaptic
);
MAKE_FUNCPTR
(
SDL_GameControllerAddMapping
);
...
...
@@ -447,9 +448,27 @@ static NTSTATUS sdl_device_physical_device_control(struct unix_device *iface, US
static
NTSTATUS
sdl_device_physical_effect_control
(
struct
unix_device
*
iface
,
BYTE
index
,
USAGE
control
,
BYTE
iterations
)
{
FIXME
(
"iface %p, index %u, control %04x, iterations %u stub!
\n
"
,
iface
,
index
,
control
,
iterations
);
struct
sdl_device
*
impl
=
impl_from_unix_device
(
iface
);
int
id
=
impl
->
effect_ids
[
index
];
return
STATUS_NOT_IMPLEMENTED
;
TRACE
(
"iface %p, index %u, control %04x, iterations %u.
\n
"
,
iface
,
index
,
control
,
iterations
);
if
(
impl
->
effect_ids
[
index
]
<
0
)
return
STATUS_UNSUCCESSFUL
;
switch
(
control
)
{
case
PID_USAGE_OP_EFFECT_START_SOLO
:
pSDL_HapticStopAll
(
impl
->
sdl_haptic
);
/* fallthrough */
case
PID_USAGE_OP_EFFECT_START
:
pSDL_HapticRunEffect
(
impl
->
sdl_haptic
,
id
,
iterations
);
break
;
case
PID_USAGE_OP_EFFECT_STOP
:
pSDL_HapticStopEffect
(
impl
->
sdl_haptic
,
id
);
break
;
}
return
STATUS_SUCCESS
;
}
static
const
struct
hid_device_vtbl
sdl_device_vtbl
=
...
...
@@ -721,6 +740,7 @@ NTSTATUS sdl_bus_init(void *args)
LOAD_FUNCPTR
(
SDL_HapticRunEffect
);
LOAD_FUNCPTR
(
SDL_HapticSetGain
);
LOAD_FUNCPTR
(
SDL_HapticStopAll
);
LOAD_FUNCPTR
(
SDL_HapticStopEffect
);
LOAD_FUNCPTR
(
SDL_HapticUnpause
);
LOAD_FUNCPTR
(
SDL_JoystickIsHaptic
);
LOAD_FUNCPTR
(
SDL_GameControllerAddMapping
);
...
...
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