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
1285bbfa
Commit
1285bbfa
authored
Oct 06, 2021
by
Rémi Bernon
Committed by
Alexandre Julliard
Oct 06, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dinput: Add DIDFT_FFACTUATOR flag on PID effect axes.
Signed-off-by:
Rémi Bernon
<
rbernon@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
e9539722
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
3 deletions
+21
-3
joystick_hid.c
dlls/dinput/joystick_hid.c
+18
-0
hid.c
dlls/dinput8/tests/hid.c
+3
-3
No files found.
dlls/dinput/joystick_hid.c
View file @
1285bbfa
...
...
@@ -255,6 +255,23 @@ static BOOL enum_object( struct hid_joystick *impl, const DIPROPHEADER *filter,
return
DIENUM_CONTINUE
;
}
static
void
check_pid_effect_axis_caps
(
struct
hid_joystick
*
impl
,
DIDEVICEOBJECTINSTANCEW
*
instance
)
{
struct
pid_effect_update
*
effect_update
=
&
impl
->
pid_effect_update
;
ULONG
i
;
for
(
i
=
0
;
i
<
effect_update
->
axis_count
;
++
i
)
{
if
(
effect_update
->
axis_caps
[
i
]
->
usage_page
!=
instance
->
wUsagePage
)
continue
;
if
(
effect_update
->
axis_caps
[
i
]
->
usage_min
>
instance
->
wUsage
)
continue
;
if
(
effect_update
->
axis_caps
[
i
]
->
usage_max
>=
instance
->
wUsage
)
break
;
}
if
(
i
==
effect_update
->
axis_count
)
return
;
instance
->
dwType
|=
DIDFT_FFACTUATOR
;
instance
->
dwFlags
|=
DIDOI_FFACTUATOR
;
}
static
void
set_axis_type
(
DIDEVICEOBJECTINSTANCEW
*
instance
,
BOOL
*
seen
,
DWORD
i
,
DWORD
*
count
)
{
if
(
!
seen
[
i
])
instance
->
dwType
=
DIDFT_ABSAXIS
|
DIDFT_MAKEINSTANCE
(
i
);
...
...
@@ -331,6 +348,7 @@ static BOOL enum_objects( struct hid_joystick *impl, const DIPROPHEADER *header,
instance
.
guidType
=
*
object_usage_to_guid
(
instance
.
wUsagePage
,
instance
.
wUsage
);
instance
.
wReportId
=
caps
->
report_id
;
instance
.
wCollectionNumber
=
caps
->
link_collection
;
check_pid_effect_axis_caps
(
impl
,
&
instance
);
ret
=
enum_object
(
impl
,
&
filter
,
flags
,
callback
,
caps
,
&
instance
,
data
);
if
(
ret
!=
DIENUM_CONTINUE
)
return
ret
;
value_ofs
+=
sizeof
(
LONG
);
...
...
dlls/dinput8/tests/hid.c
View file @
1285bbfa
...
...
@@ -6392,9 +6392,9 @@ static void test_force_feedback_joystick( void )
};
const
struct
check_objects_todos
objects_todos
[
ARRAY_SIZE
(
expect_objects
)]
=
{
{
.
type
=
TRUE
,
.
flags
=
TRUE
},
{
.
type
=
TRUE
,
.
flags
=
TRUE
},
{
.
type
=
TRUE
,
.
flags
=
TRUE
},
{},
{},
{},
{.
type
=
TRUE
,
.
flags
=
TRUE
},
{.
type
=
TRUE
,
.
flags
=
TRUE
},
{},
...
...
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