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
ec3ffba7
Commit
ec3ffba7
authored
Nov 09, 2021
by
Rémi Bernon
Committed by
Alexandre Julliard
Nov 09, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dinput: Fix HID joystick GetEffectInfo / GetCapabilities flags.
Signed-off-by:
Rémi Bernon
<
rbernon@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
21fad447
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
33 deletions
+9
-33
joystick_hid.c
dlls/dinput/joystick_hid.c
+9
-26
hid.c
dlls/dinput8/tests/hid.c
+0
-7
No files found.
dlls/dinput/joystick_hid.c
View file @
ec3ffba7
...
...
@@ -859,8 +859,6 @@ static HRESULT hid_joystick_get_effect_info( IDirectInputDevice8W *iface, DIEFFE
type
|=
DIEFT_STARTDELAY
;
info
->
dwDynamicParams
|=
DIEP_STARTDELAY
;
}
if
(
effect_update
->
trigger_button_caps
)
info
->
dwDynamicParams
|=
DIEP_TRIGGERBUTTON
;
if
(
effect_update
->
trigger_repeat_interval_caps
)
info
->
dwDynamicParams
|=
DIEP_TRIGGERREPEATINTERVAL
;
if
(
effect_update
->
direction_coll
)
info
->
dwDynamicParams
|=
DIEP_DIRECTION
;
if
(
effect_update
->
axes_coll
)
info
->
dwDynamicParams
|=
DIEP_AXES
;
...
...
@@ -882,7 +880,7 @@ static HRESULT hid_joystick_get_effect_info( IDirectInputDevice8W *iface, DIEFFE
}
}
if
((
type
==
DIEFT_PERIODIC
)
&&
(
collection
=
set_periodic
->
collection
))
if
((
type
&
DIEFT_PERIODIC
)
&&
(
collection
=
set_periodic
->
collection
))
{
if
(
set_periodic
->
magnitude_caps
)
info
->
dwDynamicParams
|=
DIEP_TYPESPECIFICPARAMS
;
if
(
set_periodic
->
offset_caps
)
info
->
dwDynamicParams
|=
DIEP_TYPESPECIFICPARAMS
;
...
...
@@ -890,39 +888,27 @@ static HRESULT hid_joystick_get_effect_info( IDirectInputDevice8W *iface, DIEFFE
if
(
set_periodic
->
phase_caps
)
info
->
dwDynamicParams
|=
DIEP_TYPESPECIFICPARAMS
;
}
if
((
type
==
DIEFT_PERIODIC
||
type
==
DIEFT_RAMPFORCE
||
type
==
DIEFT_CONSTANTFORCE
)
&&
(
collection
=
set_envelope
->
collection
))
if
((
type
&
(
DIEFT_PERIODIC
|
DIEFT_RAMPFORCE
|
DIEFT_CONSTANTFORCE
))
&&
(
collection
=
set_envelope
->
collection
))
{
info
->
dwDynamicParams
|=
DIEP_ENVELOPE
;
if
(
set_envelope
->
attack_level_caps
)
type
|=
DIEFT_FFATTACK
;
if
(
set_envelope
->
attack_time_caps
)
type
|=
DIEFT_FFATTACK
;
if
(
set_envelope
->
fade_level_caps
)
type
|=
DIEFT_FFFADE
;
if
(
set_envelope
->
fade_time_caps
)
type
|=
DIEFT_FFFADE
;
if
(
effect_update
->
trigger_button_caps
)
info
->
dwDynamicParams
|=
DIEP_TRIGGERBUTTON
;
if
(
effect_update
->
trigger_repeat_interval_caps
)
info
->
dwDynamicParams
|=
DIEP_TRIGGERREPEATINTERVAL
;
}
if
((
collection
=
set_condition
->
collection
)
&&
(
type
==
DIEFT_CONDITION
))
if
((
type
&
DIEFT_CONDITION
)
&&
(
collection
=
set_condition
->
collection
))
{
if
(
set_condition
->
center_point_offset_caps
)
info
->
dwDynamicParams
|=
DIEP_TYPESPECIFICPARAMS
;
if
(
set_condition
->
positive_coefficient_caps
)
{
info
->
dwDynamicParams
|=
DIEP_TYPESPECIFICPARAMS
;
type
|=
DIEFT_POSNEGCOEFFICIENTS
;
}
if
(
set_condition
->
negative_coefficient_caps
)
{
if
(
set_condition
->
positive_coefficient_caps
||
set_condition
->
negative_coefficient_caps
)
info
->
dwDynamicParams
|=
DIEP_TYPESPECIFICPARAMS
;
type
|=
DIEFT_POSNEGCOEFFICIENTS
;
}
if
(
set_condition
->
positive_saturation_caps
)
{
info
->
dwDynamicParams
|=
DIEP_TYPESPECIFICPARAMS
;
type
|=
DIEFT_SATURATION
|
DIEFT_POSNEGSATURATION
;
}
if
(
set_condition
->
negative_saturation_caps
)
if
(
set_condition
->
positive_saturation_caps
||
set_condition
->
negative_saturation_caps
)
{
info
->
dwDynamicParams
|=
DIEP_TYPESPECIFICPARAMS
;
type
|=
DIEFT_SATURATION
|
DIEFT_POSNEGSATURATION
;
type
|=
DIEFT_SATURATION
;
}
if
(
set_condition
->
dead_band_caps
)
{
...
...
@@ -1841,12 +1827,9 @@ HRESULT hid_joystick_create_device( IDirectInputImpl *dinput, const GUID *guid,
if
(
impl
->
pid_set_envelope
.
fade_level_caps
||
impl
->
pid_set_envelope
.
fade_time_caps
)
impl
->
base
.
caps
.
dwFlags
|=
DIDC_FFFADE
;
if
(
impl
->
pid_set_condition
.
positive_coefficient_caps
||
impl
->
pid_set_condition
.
negative_coefficient_caps
)
impl
->
base
.
caps
.
dwFlags
|=
DIDC_POSNEGCOEFFICIENTS
;
if
(
impl
->
pid_set_condition
.
positive_saturation_caps
||
impl
->
pid_set_condition
.
negative_saturation_caps
)
impl
->
base
.
caps
.
dwFlags
|=
DIDC_SATURATION
|
DIDC_POSNEGSATURATION
;
impl
->
base
.
caps
.
dwFlags
|=
DIDC_SATURATION
;
if
(
impl
->
pid_set_condition
.
dead_band_caps
)
impl
->
base
.
caps
.
dwFlags
|=
DIDC_DEADBAND
;
impl
->
base
.
caps
.
dwFFSamplePeriod
=
1000000
;
...
...
dlls/dinput8/tests/hid.c
View file @
ec3ffba7
...
...
@@ -3388,11 +3388,8 @@ static BOOL CALLBACK check_effects( const DIEFFECTINFOW *effect, void *args )
check_member
(
*
effect
,
*
exp
,
"%u"
,
dwSize
);
check_member_guid
(
*
effect
,
*
exp
,
guid
);
todo_wine
check_member
(
*
effect
,
*
exp
,
"%#x"
,
dwEffType
);
todo_wine
check_member
(
*
effect
,
*
exp
,
"%#x"
,
dwStaticParams
);
todo_wine
check_member
(
*
effect
,
*
exp
,
"%#x"
,
dwDynamicParams
);
check_member_wstr
(
*
effect
,
*
exp
,
tszName
);
...
...
@@ -7289,7 +7286,6 @@ static void test_force_feedback_joystick( void )
hr
=
IDirectInputDevice8_GetCapabilities
(
device
,
&
caps
);
ok
(
hr
==
DI_OK
,
"GetCapabilities returned %#x
\n
"
,
hr
);
check_member
(
caps
,
expect_caps
,
"%d"
,
dwSize
);
todo_wine
check_member
(
caps
,
expect_caps
,
"%#x"
,
dwFlags
);
check_member
(
caps
,
expect_caps
,
"%#x"
,
dwDevType
);
check_member
(
caps
,
expect_caps
,
"%d"
,
dwAxes
);
...
...
@@ -7332,11 +7328,8 @@ static void test_force_feedback_joystick( void )
hr
=
IDirectInputDevice8_GetEffectInfo
(
device
,
&
effectinfo
,
&
GUID_Sine
);
ok
(
hr
==
DI_OK
,
"GetEffectInfo returned %#x
\n
"
,
hr
);
check_member_guid
(
effectinfo
,
expect_effects
[
1
],
guid
);
todo_wine
check_member
(
effectinfo
,
expect_effects
[
1
],
"%#x"
,
dwEffType
);
todo_wine
check_member
(
effectinfo
,
expect_effects
[
1
],
"%#x"
,
dwStaticParams
);
todo_wine
check_member
(
effectinfo
,
expect_effects
[
1
],
"%#x"
,
dwDynamicParams
);
check_member_wstr
(
effectinfo
,
expect_effects
[
1
],
tszName
);
...
...
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