/// <summary> /// supports polling requests for latest Joystick SubState. /// </summary> /// <returns></returns> public IJoystickSubState GetJoystickSubState() { lock (jssLock) { if (jssCurrent != null && !jssCurrent.Equals(jssLast)) // only do something if the joystick state changed { jssLast = (IJoystickSubState)jssCurrent.Clone(); jssLast.IsNew = true; } } return(jssLast); }