mirror of
https://github.com/cemu-project/DS4Windows.git
synced 2024-11-26 02:54:20 +01:00
Found faster way to iterate over a ValueCollection
This commit is contained in:
parent
50109282f4
commit
cd6742cf56
@ -40,9 +40,11 @@ namespace DS4Windows
|
||||
|
||||
//foreach (KeyPresses kp in keyPresses.Values)
|
||||
Dictionary<ushort, KeyPresses>.ValueCollection keyValues = keyPresses.Values;
|
||||
for (int i = 0, kpCount = keyValues.Count; i < kpCount; i++)
|
||||
for (var keyEnum = keyValues.GetEnumerator(); keyEnum.MoveNext();)
|
||||
//for (int i = 0, kpCount = keyValues.Count; i < kpCount; i++)
|
||||
{
|
||||
KeyPresses kp = keyValues.ElementAt(i);
|
||||
//KeyPresses kp = keyValues.ElementAt(i);
|
||||
KeyPresses kp = keyEnum.Current;
|
||||
kp.previous = kp.current;
|
||||
if (performClear)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user