diff --git a/ANX.Framework.sln b/ANX.Framework.sln index 10a51213..a9bf8ee3 100644 --- a/ANX.Framework.sln +++ b/ANX.Framework.sln @@ -44,6 +44,10 @@ EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WindowsGame", "Samples\WindowsGame\WindowsGame.csproj", "{A08575E0-7B21-4822-9D4C-6B9EEB7EFFF7}" EndProject Global + GlobalSection(SubversionScc) = preSolution + Svn-Managed = True + Manager = AnkhSVN - Subversion Support for Visual Studio + EndGlobalSection GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU Debug|Mixed Platforms = Debug|Mixed Platforms diff --git a/ANX.InputSystem.Windows.XInput/XInput.cs b/ANX.InputSystem.Windows.XInput/XInput.cs index 87764300..5b918145 100644 --- a/ANX.InputSystem.Windows.XInput/XInput.cs +++ b/ANX.InputSystem.Windows.XInput/XInput.cs @@ -118,7 +118,16 @@ namespace ANX.InputSystem.Windows.XInput public bool SetVibration(PlayerIndex playerIndex, float leftMotor, float rightMotor) { - throw new NotImplementedException(); + if (controller[(int)playerIndex].IsConnected) + { + Vibration vib = new Vibration(); + vib.LeftMotorSpeed = Convert.ToInt16(leftMotor * short.MaxValue); + vib.RightMotorSpeed = Convert.ToInt16(rightMotor * short.MaxValue); + controller[(int)playerIndex].SetVibration(vib); + return true; + } + return false; + } } }