mirror of
https://github.com/cemu-project/DS4Windows.git
synced 2025-01-11 15:59:08 +01:00
Fix index out of bounds problem
This commit is contained in:
parent
3e4a5c0562
commit
064b478683
@ -243,8 +243,9 @@ namespace DS4Windows
|
||||
else if (device.getBattery() <= getFlashAt(deviceNum) && getFlashType(deviceNum) == 0 && !defaultLight && !device.isCharging())
|
||||
{
|
||||
int level = device.getBattery() / 10;
|
||||
//if (level >= 10)
|
||||
//level = 0; // all values of ~0% or >~100% are rendered the same
|
||||
if (level >= 10)
|
||||
level = 0; // all values of ~0% or >~100% are rendered the same
|
||||
|
||||
haptics.LightBarFlashDurationOn = BatteryIndicatorDurations[level, 0];
|
||||
haptics.LightBarFlashDurationOff = BatteryIndicatorDurations[level, 1];
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user