diff --git a/BizHawk.Client.EmuHawk/Input/GamePad.cs b/BizHawk.Client.EmuHawk/Input/GamePad.cs index 3c3705bd50..7b6a5e9d34 100644 --- a/BizHawk.Client.EmuHawk/Input/GamePad.cs +++ b/BizHawk.Client.EmuHawk/Input/GamePad.cs @@ -1,4 +1,5 @@ using System; +using System.Linq; using System.Collections.Generic; using SlimDX; using SlimDX.DirectInput; @@ -42,7 +43,7 @@ namespace BizHawk.Client.EmuHawk public static void UpdateAll() { - foreach (var device in Devices) + foreach (var device in Devices.ToList()) device.Update(); } diff --git a/BizHawk.Client.EmuHawk/Input/GamePad360.cs b/BizHawk.Client.EmuHawk/Input/GamePad360.cs index 552c6d2b89..76736157a0 100644 --- a/BizHawk.Client.EmuHawk/Input/GamePad360.cs +++ b/BizHawk.Client.EmuHawk/Input/GamePad360.cs @@ -1,4 +1,5 @@ using System; +using System.Linq; using System.Runtime.InteropServices; using System.Collections.Generic; using SlimDX.XInput; @@ -96,7 +97,7 @@ namespace BizHawk.Client.EmuHawk public static void UpdateAll() { if(IsAvailable) - foreach (var device in Devices) + foreach (var device in Devices.ToList()) device.Update(); }