Guest User

Untitled

a guest
Mar 20th, 2018
102
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.51 KB | None | 0 0
  1. public void Test(Joystick joystick)
  2. {
  3. joystick.SetCooperativeLevel(new WindowInteropHelper(Application.Current.MainWindow).Handle, CooperativeLevel.Background | CooperativeLevel.Exclusive);
  4. joystick.Properties.AxisMode = DeviceAxisMode.Absolute;
  5. joystick.Properties.AutoCenter = false;
  6. joystick.Acquire();
  7.  
  8. foreach (var deviceObjectInstance in joystick.GetObjects())
  9. {
  10. if (deviceObjectInstance.ObjectId.Flags.HasFlag(DeviceObjectTypeFlags.ForceFeedbackActuator))
  11. {
  12. }
  13. }
  14. }
Add Comment
Please, Sign In to add comment