Exemple #1
0
        /// <summary>
        /// Find a joystick, and if connected - poll it for latest Joystick SubState.
        /// May return null if no joystick found.
        /// </summary>
        /// <returns></returns>
        public async Task <IJoystickSubState> PollJoystick()
        {
            bool haveAJoystick = await FindOrCheck();

            if (haveAJoystick)
            {
                IJoystickSubState jss = joystick.GetJoystickSubState();
                return(jss);
            }
            else
            {
                return(null);
            }
        }