コード例 #1
0
        // -------------------
        public GamepadProfile GetProfile(string deviceName)
        {
            for (int i = 0; i < this.profileList.Count; ++i)
            {
                GamepadProfile profile = this.profileList[i];
                if (profile.IsCompatible(deviceName))
                {
                    return(profile);
                }
            }

            return(null);
        }
コード例 #2
0
 // -------------------
 public void GetCompatibleProfiles(string deviceName, List <GamepadProfile> targetList)
 {
     for (int i = 0; i < this.profileList.Count; ++i)
     {
         GamepadProfile profile = this.profileList[i];
         if (profile.IsCompatible(deviceName))
         {
             if (!targetList.Contains(profile))
             {
                 targetList.Add(profile);
             }
         }
     }
 }