0
\$\begingroup\$

I am using a simple code to read input from a DirectInput device. I would like to add force feedback to the device, however when I run this test, I cannot find any ForceFeedbackActuator, however my device supports rumble effects.

public void Test(Joystick joystick)
{
    joystick.SetCooperativeLevel(new WindowInteropHelper(Application.Current.MainWindow).Handle, CooperativeLevel.Background | CooperativeLevel.Exclusive);
    joystick.Properties.AxisMode = DeviceAxisMode.Absolute;
    joystick.Properties.AutoCenter = false;
    joystick.Acquire();

    foreach (var deviceObjectInstance in joystick.GetObjects())
    {
        if (deviceObjectInstance.ObjectId.Flags.HasFlag(DeviceObjectTypeFlags.ForceFeedbackActuator))
        {
        }
    }
}

I checked the Microsoft specification but found nothing so far.

However my driver is null as well:

deviceInstance.ForceFeedbackDriverGuid

But this can be set from registry HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\MediaProperties\PrivateProperties\Joystick\OEM adding a new CLSID value for the current device.

Any help is appreciated.

\$\endgroup\$
3
  • \$\begingroup\$ How's the enumeration under XInput? Is this a feature for your controller that is only supported on the latter toolkit? Looks like everything else you are doing should is fine. \$\endgroup\$ – ErnieDingo Mar 20 '18 at 21:58
  • \$\begingroup\$ I am using a Logitech F510, which can be used as XInput or DirectInput device. I cannot make this code work in either mode. \$\endgroup\$ – Csutorasa Mar 21 '18 at 20:16
  • \$\begingroup\$ Hmmm then in that case there are a couple and overly lengthy options. 1 would be to build a test harness in c++ to test that sharpdx is not supporting correctly your controller. If so then a ticket can be raised on the git hub issues. If not then you know it maybe something deeper with directx or driver. I assume you have some current directx 11 which works anyway which may point to a sharpdx issue \$\endgroup\$ – ErnieDingo Mar 21 '18 at 20:33
-1
\$\begingroup\$

The CLSID i have used is invalid. I installed the official software of the device, and actuators are available now.

\$\endgroup\$
2
  • \$\begingroup\$ If this is the answer to your question, please mark it as the accepted answer :) And when you're done, please flag this comment as no longer needed, I'll remove it. \$\endgroup\$ – Vaillancourt Mar 27 '18 at 13:20
  • \$\begingroup\$ I do not know how to mark it no longer needed. It is the accepted answer. \$\endgroup\$ – Csutorasa Mar 31 '18 at 17:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.