Esempio n. 1
0
        // Note that this does not appear to work at this time. I probably need to have more infos.
        public void SetVibration(int left, int right)
        {
            int[] temp1, temp2;
            // my first clue that it doesnt work is that LEFT  and RIGHT _ARENT USED_
            // I should just look for C++ examples instead of trying to look for SlimDX examples

            var parameters = new EffectParameters
            {
                Duration              = 0x2710,
                Gain                  = 0x2710,
                SamplePeriod          = 0,
                TriggerButton         = 0,
                TriggerRepeatInterval = 0x2710,
                Flags                 = EffectFlags.None
            };

            parameters.GetAxes(out temp1, out temp2);
            parameters.SetAxes(temp1, temp2);
            var effect = new Effect(joystick, EffectGuid.ConstantForce);

            effect.SetParameters(parameters);
            effect.Start(1);
        }
Esempio n. 2
0
		// Note that this does not appear to work at this time. I probably need to have more infos.
		public void SetVibration(int left, int right)
		{
			int[] temp1, temp2;
			// my first clue that it doesnt work is that LEFT  and RIGHT _ARENT USED_
			// I should just look for C++ examples instead of trying to look for SlimDX examples

			var parameters = new EffectParameters
				{
					Duration = 0x2710,
					Gain = 0x2710,
					SamplePeriod = 0,
					TriggerButton = 0,
					TriggerRepeatInterval = 0x2710,
					Flags = EffectFlags.None
				};
			parameters.GetAxes(out temp1, out temp2);
			parameters.SetAxes(temp1, temp2);
			var effect = new Effect(joystick, EffectGuid.ConstantForce);
			effect.SetParameters(parameters);
			effect.Start(1);
		}