mirror of
https://github.com/cemu-project/DS4Windows.git
synced 2025-01-23 05:31:12 +01:00
Fix index out of bounds error
This commit is contained in:
parent
59d30bcf3a
commit
aa0e0fce50
@ -1105,12 +1105,13 @@ namespace DS4Windows
|
||||
new DS4Color(Color.Black),
|
||||
new DS4Color(Color.Black)
|
||||
};
|
||||
public bool[] useCustomLeds = new bool[] { false, false, false, false };
|
||||
public bool[] useCustomLeds = new bool[] { false, false, false, false, false };
|
||||
public DS4Color[] m_CustomLeds = new DS4Color[]
|
||||
{
|
||||
new DS4Color(Color.Black),
|
||||
new DS4Color(Color.Black),
|
||||
new DS4Color(Color.Black),
|
||||
new DS4Color(Color.Black),
|
||||
new DS4Color(Color.Black)
|
||||
};
|
||||
public int[] chargingType = { 0, 0, 0, 0, 0 };
|
||||
@ -2697,7 +2698,7 @@ namespace DS4Windows
|
||||
bool.TryParse(ss[0], out useCustomLeds[i]);
|
||||
DS4Color.TryParse(ss[1], ref m_CustomLeds[i]);
|
||||
}
|
||||
catch { missingSetting = true; }
|
||||
catch { useCustomLeds[i] = false; m_CustomLeds[i] = new DS4Color(Color.Black); missingSetting = true; }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user