mirror of
https://github.com/cemu-project/DS4Windows.git
synced 2025-02-02 18:12:32 +01:00
Found issue with IEnumerable in this case. Use temp list instead.
This commit is contained in:
parent
83c7bb7740
commit
6716291a95
@ -36,14 +36,15 @@ namespace DS4Windows
|
||||
// Sort Bluetooth first in case USB is also connected on the same controller.
|
||||
hDevices = hDevices.OrderBy<HidDevice, ConnectionType>((HidDevice d) => { return DS4Device.HidConnectionType(d); });
|
||||
|
||||
int devCount = hDevices.Count();
|
||||
List<HidDevice> tempList = hDevices.ToList();
|
||||
int devCount = tempList.Count();
|
||||
string devicePlural = "device" + (devCount == 0 || devCount > 1 ? "s" : "");
|
||||
//Log.LogToGui("Found " + devCount + " possible " + devicePlural + ". Examining " + devicePlural + ".", false);
|
||||
|
||||
for (int i = 0; i < devCount; i++)
|
||||
//foreach (HidDevice hDevice in hDevices)
|
||||
{
|
||||
HidDevice hDevice = hDevices.ElementAt<HidDevice>(i);
|
||||
HidDevice hDevice = tempList[i];
|
||||
if (DevicePaths.Contains(hDevice.DevicePath))
|
||||
continue; // BT/USB endpoint already open once
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user