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
5f8f6c34
Commit
5f8f6c34
authored
Jul 23, 2022
by
Ivo Ivanov
Committed by
Alexandre Julliard
Nov 25, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
windows.gaming.input: Implement IForceFeedbackMotor_get_SupportedAxes.
parent
cd75ed18
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
33 additions
and
6 deletions
+33
-6
force_feedback.c
dlls/dinput/tests/force_feedback.c
+9
-4
force_feedback.c
dlls/windows.gaming.input/force_feedback.c
+24
-2
No files found.
dlls/dinput/tests/force_feedback.c
View file @
5f8f6c34
...
...
@@ -5735,10 +5735,10 @@ static void test_windows_gaming_input(void)
EventRegistrationToken
controller_added_token
;
IPeriodicForceEffectFactory
*
periodic_factory
;
struct
bool_async_handler
bool_async_handler
;
ForceFeedbackEffectAxes
supported_axes
,
axes
;
IVectorView_ForceFeedbackMotor
*
motors_view
;
IConditionForceEffect
*
condition_effect
;
ConditionForceEffectKind
condition_kind
;
ForceFeedbackEffectAxes
supported_axes
;
IActivationFactory
*
activation_factory
;
IPeriodicForceEffect
*
periodic_effect
;
IConstantForceEffect
*
constant_effect
;
...
...
@@ -5856,12 +5856,17 @@ static void test_windows_gaming_input(void)
ok
(
hr
==
S_OK
,
"get_IsEnabled returned %#lx
\n
"
,
hr
);
ok
(
enabled
==
TRUE
,
"got enabled %u
\n
"
,
enabled
);
/* SupportedAxes always returns ForceFeedbackEffectAxes_X on Windows,
* no matter which axis is available for FFB in the Set Effects report,
* or whether a X axis is declared at all.
*/
supported_axes
=
0xdeadbeef
;
hr
=
IForceFeedbackMotor_get_SupportedAxes
(
motor
,
&
supported_axes
);
todo_wine
ok
(
hr
==
S_OK
,
"get_SupportedAxes returned %#lx
\n
"
,
hr
);
todo_wine
ok
(
supported_axes
==
ForceFeedbackEffectAxes_X
,
"got axes %#x
\n
"
,
supported_axes
);
axes
=
ForceFeedbackEffectAxes_X
|
ForceFeedbackEffectAxes_Y
|
ForceFeedbackEffectAxes_Z
;
ok
(
supported_axes
==
axes
||
broken
(
supported_axes
==
ForceFeedbackEffectAxes_X
),
"got axes %#x
\n
"
,
supported_axes
);
set_hid_expect
(
file
,
&
expect_pause
,
sizeof
(
expect_pause
)
);
hr
=
IForceFeedbackMotor_PauseAllEffects
(
motor
);
...
...
dlls/windows.gaming.input/force_feedback.c
View file @
5f8f6c34
...
...
@@ -532,10 +532,32 @@ static HRESULT WINAPI motor_get_IsEnabled( IForceFeedbackMotor *iface, BOOLEAN *
return
hr
;
}
static
BOOL
CALLBACK
check_ffb_axes
(
const
DIDEVICEOBJECTINSTANCEW
*
obj
,
void
*
args
)
{
ForceFeedbackEffectAxes
*
value
=
args
;
if
(
obj
->
dwType
&
DIDFT_FFACTUATOR
)
{
if
(
IsEqualIID
(
&
obj
->
guidType
,
&
GUID_XAxis
))
*
value
|=
ForceFeedbackEffectAxes_X
;
else
if
(
IsEqualIID
(
&
obj
->
guidType
,
&
GUID_YAxis
))
*
value
|=
ForceFeedbackEffectAxes_Y
;
else
if
(
IsEqualIID
(
&
obj
->
guidType
,
&
GUID_ZAxis
))
*
value
|=
ForceFeedbackEffectAxes_Z
;
}
return
DIENUM_CONTINUE
;
}
static
HRESULT
WINAPI
motor_get_SupportedAxes
(
IForceFeedbackMotor
*
iface
,
enum
ForceFeedbackEffectAxes
*
value
)
{
FIXME
(
"iface %p, value %p stub!
\n
"
,
iface
,
value
);
return
E_NOTIMPL
;
struct
motor
*
impl
=
impl_from_IForceFeedbackMotor
(
iface
);
HRESULT
hr
;
TRACE
(
"iface %p, value %p.
\n
"
,
iface
,
value
);
*
value
=
ForceFeedbackEffectAxes_None
;
if
(
FAILED
(
hr
=
IDirectInputDevice8_EnumObjects
(
impl
->
device
,
check_ffb_axes
,
value
,
DIDFT_AXIS
)))
*
value
=
ForceFeedbackEffectAxes_None
;
return
hr
;
}
static
HRESULT
WINAPI
motor_load_effect_async
(
IUnknown
*
invoker
,
IUnknown
*
param
,
PROPVARIANT
*
result
)
...
...
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