mirror of
https://github.com/cemu-project/DS4Windows.git
synced 2024-11-25 18:46:58 +01:00
Enforce lightbar mode setting
This commit is contained in:
parent
fcb081ee5d
commit
6442030926
@ -45,7 +45,8 @@ namespace DS4Windows
|
||||
bool useForceLight = forcelight[deviceNum];
|
||||
LightbarSettingInfo lightbarSettingInfo = getLightbarSettingsInfo(deviceNum);
|
||||
LightbarDS4WinInfo lightModeInfo = lightbarSettingInfo.ds4winSettings;
|
||||
if (!defaultLight && !useForceLight && lightbarSettingInfo.mode == LightbarMode.DS4Win)
|
||||
bool useLightRoutine = lightbarSettingInfo.mode == LightbarMode.DS4Win;
|
||||
if (!defaultLight && !useForceLight && useLightRoutine)
|
||||
{
|
||||
if (lightModeInfo.useCustomLed)
|
||||
{
|
||||
@ -256,17 +257,25 @@ namespace DS4Windows
|
||||
else if (useForceLight)
|
||||
{
|
||||
color = forcedColor[deviceNum];
|
||||
useLightRoutine = true;
|
||||
}
|
||||
else if (shuttingdown)
|
||||
{
|
||||
color = new DS4Color(0, 0, 0);
|
||||
useLightRoutine = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (device.getConnectionType() == ConnectionType.BT)
|
||||
color = new DS4Color(32, 64, 64);
|
||||
else
|
||||
color = new DS4Color(0, 0, 0);
|
||||
|
||||
useLightRoutine = true;
|
||||
}
|
||||
|
||||
if (useLightRoutine)
|
||||
{
|
||||
bool distanceprofile = DistanceProfiles[deviceNum] || tempprofileDistance[deviceNum];
|
||||
//distanceprofile = (ProfilePath[deviceNum].ToLower().Contains("distance") || tempprofilename[deviceNum].ToLower().Contains("distance"));
|
||||
if (distanceprofile && !defaultLight)
|
||||
@ -280,7 +289,6 @@ namespace DS4Windows
|
||||
DS4Color redCol = new DS4Color(255, 0, 0);
|
||||
color = getTransitionedColor(ref maxCol, ref redCol, rumble);
|
||||
}
|
||||
|
||||
else
|
||||
{
|
||||
DS4Color maxCol = new DS4Color(max, max, 0);
|
||||
@ -290,7 +298,6 @@ namespace DS4Windows
|
||||
color = getTransitionedColor(ref color, ref tempCol,
|
||||
device.getLeftHeavySlowRumble());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
DS4HapticState haptics = new DS4HapticState
|
||||
@ -338,6 +345,7 @@ namespace DS4Windows
|
||||
device.SetHapticState(ref haptics);
|
||||
//device.pushHapticState(ref haptics);
|
||||
}
|
||||
}
|
||||
|
||||
public static bool defaultLight = false, shuttingdown = false;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user