From 40278c9d1bb28c273c48173f35ff345918667490 Mon Sep 17 00:00:00 2001 From: Travis Nickles Date: Sat, 16 Feb 2019 15:49:36 -0600 Subject: [PATCH] Use enumerator for settings iteration --- DS4Windows/DS4Control/Mapping.cs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/DS4Windows/DS4Control/Mapping.cs b/DS4Windows/DS4Control/Mapping.cs index dc2a2ec..76bfd70 100644 --- a/DS4Windows/DS4Control/Mapping.cs +++ b/DS4Windows/DS4Control/Mapping.cs @@ -1205,9 +1205,11 @@ namespace DS4Windows DS4Controls usingExtra = DS4Controls.None; List tempSettingsList = getDS4CSettings(device); //foreach (DS4ControlSettings dcs in getDS4CSettings(device)) - for (int settingIndex = 0, arlen = tempSettingsList.Count; settingIndex < arlen; settingIndex++) + //for (int settingIndex = 0, arlen = tempSettingsList.Count; settingIndex < arlen; settingIndex++) + for (var settingEnum = tempSettingsList.GetEnumerator(); settingEnum.MoveNext();) { - DS4ControlSettings dcs = tempSettingsList[settingIndex]; + //DS4ControlSettings dcs = tempSettingsList[settingIndex]; + DS4ControlSettings dcs = settingEnum.Current; object action = null; DS4ControlSettings.ActionType actionType = 0; DS4KeyType keyType = DS4KeyType.None;