[PATCH 5/5] dinput: Support DIPROP_FFGAIN for OSX joysticks
Andrew Eikum
aeikum at codeweavers.com
Tue May 21 14:36:48 CDT 2013
---
dlls/dinput/joystick_osx.c | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
diff --git a/dlls/dinput/joystick_osx.c b/dlls/dinput/joystick_osx.c
index 347d04e..0a158a6 100644
--- a/dlls/dinput/joystick_osx.c
+++ b/dlls/dinput/joystick_osx.c
@@ -1102,6 +1102,18 @@ static HRESULT osx_set_autocenter(JoystickImpl *This,
return hr;
}
+static HRESULT osx_set_ffgain(JoystickImpl *This, const DIPROPDWORD *header)
+{
+ UInt32 v;
+ HRESULT hr;
+ if(!This->ff)
+ return DIERR_UNSUPPORTED;
+ v = header->dwData;
+ hr = FFDeviceSetForceFeedbackProperty(This->ff, FFPROP_FFGAIN, &v);
+ TRACE("returning: %08x\n", hr);
+ return hr;
+}
+
static HRESULT WINAPI JoystickWImpl_SetProperty(IDirectInputDevice8W *iface,
const GUID *prop, const DIPROPHEADER *header)
{
@@ -1111,6 +1123,8 @@ static HRESULT WINAPI JoystickWImpl_SetProperty(IDirectInputDevice8W *iface,
{
case (DWORD_PTR)DIPROP_AUTOCENTER:
return osx_set_autocenter(This, (const DIPROPDWORD *)header);
+ case (DWORD_PTR)DIPROP_FFGAIN:
+ return osx_set_ffgain(This, (const DIPROPDWORD *)header);
}
return JoystickWGenericImpl_SetProperty(iface, prop, header);
@@ -1125,6 +1139,8 @@ static HRESULT WINAPI JoystickAImpl_SetProperty(IDirectInputDevice8A *iface,
{
case (DWORD_PTR)DIPROP_AUTOCENTER:
return osx_set_autocenter(This, (const DIPROPDWORD *)header);
+ case (DWORD_PTR)DIPROP_FFGAIN:
+ return osx_set_ffgain(This, (const DIPROPDWORD *)header);
}
return JoystickAGenericImpl_SetProperty(iface, prop, header);
--
1.8.2.3
More information about the wine-patches
mailing list