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
5b8daeca
Commit
5b8daeca
authored
Oct 01, 2021
by
Rémi Bernon
Committed by
Alexandre Julliard
Oct 01, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dinput: Implement HID joystick IDirectInputDevice8_EnumEffects.
Signed-off-by:
Rémi Bernon
<
rbernon@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
84e58612
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
62 additions
and
1 deletion
+62
-1
joystick_hid.c
dlls/dinput/joystick_hid.c
+62
-1
No files found.
dlls/dinput/joystick_hid.c
View file @
5b8daeca
...
...
@@ -818,10 +818,71 @@ static HRESULT WINAPI hid_joystick_CreateEffect( IDirectInputDevice8W *iface, co
static
HRESULT
WINAPI
hid_joystick_EnumEffects
(
IDirectInputDevice8W
*
iface
,
LPDIENUMEFFECTSCALLBACKW
callback
,
void
*
context
,
DWORD
type
)
{
FIXME
(
"iface %p, callback %p, context %p, type %#x stub!
\n
"
,
iface
,
callback
,
context
,
type
);
DIEFFECTINFOW
info
=
{.
dwSize
=
sizeof
(
info
)};
HRESULT
hr
;
TRACE
(
"iface %p, callback %p, context %p, type %#x.
\n
"
,
iface
,
callback
,
context
,
type
);
if
(
!
callback
)
return
DIERR_INVALIDPARAM
;
type
=
DIEFT_GETTYPE
(
type
);
if
(
type
==
DIEFT_ALL
||
type
==
DIEFT_CONSTANTFORCE
)
{
hr
=
IDirectInputDevice8_GetEffectInfo
(
iface
,
&
info
,
&
GUID_ConstantForce
);
if
(
FAILED
(
hr
)
&&
hr
!=
DIERR_DEVICENOTREG
)
return
hr
;
if
(
hr
==
DI_OK
&&
callback
(
&
info
,
context
)
==
DIENUM_STOP
)
return
DI_OK
;
}
if
(
type
==
DIEFT_ALL
||
type
==
DIEFT_RAMPFORCE
)
{
hr
=
IDirectInputDevice8_GetEffectInfo
(
iface
,
&
info
,
&
GUID_RampForce
);
if
(
FAILED
(
hr
)
&&
hr
!=
DIERR_DEVICENOTREG
)
return
hr
;
if
(
hr
==
DI_OK
&&
callback
(
&
info
,
context
)
==
DIENUM_STOP
)
return
DI_OK
;
}
if
(
type
==
DIEFT_ALL
||
type
==
DIEFT_PERIODIC
)
{
hr
=
IDirectInputDevice8_GetEffectInfo
(
iface
,
&
info
,
&
GUID_Square
);
if
(
FAILED
(
hr
)
&&
hr
!=
DIERR_DEVICENOTREG
)
return
hr
;
if
(
hr
==
DI_OK
&&
callback
(
&
info
,
context
)
==
DIENUM_STOP
)
return
DI_OK
;
hr
=
IDirectInputDevice8_GetEffectInfo
(
iface
,
&
info
,
&
GUID_Sine
);
if
(
FAILED
(
hr
)
&&
hr
!=
DIERR_DEVICENOTREG
)
return
hr
;
if
(
hr
==
DI_OK
&&
callback
(
&
info
,
context
)
==
DIENUM_STOP
)
return
DI_OK
;
hr
=
IDirectInputDevice8_GetEffectInfo
(
iface
,
&
info
,
&
GUID_Triangle
);
if
(
FAILED
(
hr
)
&&
hr
!=
DIERR_DEVICENOTREG
)
return
hr
;
if
(
hr
==
DI_OK
&&
callback
(
&
info
,
context
)
==
DIENUM_STOP
)
return
DI_OK
;
hr
=
IDirectInputDevice8_GetEffectInfo
(
iface
,
&
info
,
&
GUID_SawtoothUp
);
if
(
FAILED
(
hr
)
&&
hr
!=
DIERR_DEVICENOTREG
)
return
hr
;
if
(
hr
==
DI_OK
&&
callback
(
&
info
,
context
)
==
DIENUM_STOP
)
return
DI_OK
;
hr
=
IDirectInputDevice8_GetEffectInfo
(
iface
,
&
info
,
&
GUID_SawtoothDown
);
if
(
FAILED
(
hr
)
&&
hr
!=
DIERR_DEVICENOTREG
)
return
hr
;
if
(
hr
==
DI_OK
&&
callback
(
&
info
,
context
)
==
DIENUM_STOP
)
return
DI_OK
;
}
if
(
type
==
DIEFT_ALL
||
type
==
DIEFT_CONDITION
)
{
hr
=
IDirectInputDevice8_GetEffectInfo
(
iface
,
&
info
,
&
GUID_Spring
);
if
(
FAILED
(
hr
)
&&
hr
!=
DIERR_DEVICENOTREG
)
return
hr
;
if
(
hr
==
DI_OK
&&
callback
(
&
info
,
context
)
==
DIENUM_STOP
)
return
DI_OK
;
hr
=
IDirectInputDevice8_GetEffectInfo
(
iface
,
&
info
,
&
GUID_Damper
);
if
(
FAILED
(
hr
)
&&
hr
!=
DIERR_DEVICENOTREG
)
return
hr
;
if
(
hr
==
DI_OK
&&
callback
(
&
info
,
context
)
==
DIENUM_STOP
)
return
DI_OK
;
hr
=
IDirectInputDevice8_GetEffectInfo
(
iface
,
&
info
,
&
GUID_Inertia
);
if
(
FAILED
(
hr
)
&&
hr
!=
DIERR_DEVICENOTREG
)
return
hr
;
if
(
hr
==
DI_OK
&&
callback
(
&
info
,
context
)
==
DIENUM_STOP
)
return
DI_OK
;
hr
=
IDirectInputDevice8_GetEffectInfo
(
iface
,
&
info
,
&
GUID_Friction
);
if
(
FAILED
(
hr
)
&&
hr
!=
DIERR_DEVICENOTREG
)
return
hr
;
if
(
hr
==
DI_OK
&&
callback
(
&
info
,
context
)
==
DIENUM_STOP
)
return
DI_OK
;
}
return
DI_OK
;
}
...
...
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