Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ UpdateDeviceList()

void ReLogic.Peripherals.RGB.SteelSeries.SteelSeriesDeviceGroup.UpdateDeviceList ( List< RgbDevice > deviceList)
inlineprivate

Definition at line 169 of file SteelSeriesDeviceGroup.cs.

170 {
171 foreach (RgbDevice device in deviceList)
172 {
173 if (!(device is IGameSenseDevice gameSenseDevice))
174 {
175 continue;
176 }
177 List<JObject> list = gameSenseDevice.TryGetEventUpdateRequest();
178 if (list == null)
179 {
180 continue;
181 }
182 for (int i = 0; i < list.Count; i++)
183 {
185 if (jObject != null)
186 {
187 jObject.Add("game", JToken.op_Implicit(_gameSenseConnection.GameName));
188 string fullEventJson = ((JToken)jObject).ToString((Formatting)0, Array.Empty<JsonConverter>());
190 }
191 }
192 }
193 foreach (IGameSenseUpdater miscEvent in _miscEvents)
194 {
195 List<JObject> list2 = miscEvent.TryGetEventUpdateRequest();
196 if (list2 == null)
197 {
198 continue;
199 }
200 for (int j = 0; j < list2.Count; j++)
201 {
203 if (jObject2 != null)
204 {
205 jObject2.Add("game", JToken.op_Implicit(_gameSenseConnection.GameName));
206 string fullEventJson2 = ((JToken)jObject2).ToString((Formatting)0, Array.Empty<JsonConverter>());
208 }
209 }
210 }
211 }
void Add(TKey key, TValue value)

References ReLogic.Peripherals.RGB.SteelSeries.SteelSeriesDeviceGroup._gameSenseConnection, ReLogic.Peripherals.RGB.SteelSeries.SteelSeriesDeviceGroup._miscEvents, System.Collections.Generic.Dictionary< TKey, TValue >.Add(), System.Collections.Generic.Dictionary< TKey, TValue >.Count, ReLogic.Peripherals.RGB.SteelSeries.GameSenseConnection.GameName, System.list, and ReLogic.Peripherals.RGB.SteelSeries.GameSenseConnection.SendEvent().

Referenced by ReLogic.Peripherals.RGB.SteelSeries.SteelSeriesDeviceGroup.SendRelevantChangesToGameSense().