Comment out lightbar color changing from virtual DS4

Seemed to contribute to infinite rumble for some people
but can't verify anything on my end
This commit is contained in:
Travis Nickles 2020-03-25 20:20:51 -05:00
parent 0717ba1212
commit b614366ec7

View File

@ -413,57 +413,58 @@ namespace DS4Windows
int devIndex = index; int devIndex = index;
tempDS4.cont.FeedbackReceived += (sender, args) => tempDS4.cont.FeedbackReceived += (sender, args) =>
{ {
bool useRumble = false; bool useLight = false; //bool useRumble = false; bool useLight = false;
byte largeMotor = args.LargeMotor; byte largeMotor = args.LargeMotor;
byte smallMotor = args.SmallMotor; byte smallMotor = args.SmallMotor;
DS4Color color = new DS4Color(args.LightbarColor.Red, SetDevRumble(device, largeMotor, smallMotor, devIndex);
args.LightbarColor.Green, //DS4Color color = new DS4Color(args.LightbarColor.Red,
args.LightbarColor.Blue); // args.LightbarColor.Green,
/*Console.WriteLine("IN EVENT"); // args.LightbarColor.Blue);
Console.WriteLine("Rumble ({0}, {1}) | Light ({2}, {3}, {4}) {5}", ///*Console.WriteLine("IN EVENT");
largeMotor, smallMotor, color.red, color.green, color.blue, DateTime.Now.ToLongTimeString()); //Console.WriteLine("Rumble ({0}, {1}) | Light ({2}, {3}, {4}) {5}",
*/ // largeMotor, smallMotor, color.red, color.green, color.blue, DateTime.Now.ToLongTimeString());
if (largeMotor != 0 || smallMotor != 0) // */
{ //if (largeMotor != 0 || smallMotor != 0)
useRumble = true; //{
} // useRumble = true;
//}
if (color.red != 0 || color.green != 0 || color.blue != 0) //if (color.red != 0 || color.green != 0 || color.blue != 0)
{ //{
useLight = true; // useLight = true;
} //}
if (!useRumble && !useLight) //if (!useRumble && !useLight)
{ //{
//Console.WriteLine("Fallback"); // //Console.WriteLine("Fallback");
if (device.LeftHeavySlowRumble != 0 || device.RightLightFastRumble != 0) // if (device.LeftHeavySlowRumble != 0 || device.RightLightFastRumble != 0)
{ // {
useRumble = true; // useRumble = true;
} // }
/*else if (device.LightBarColor.red != 0 || // /*else if (device.LightBarColor.red != 0 ||
device.LightBarColor.green != 0 || // device.LightBarColor.green != 0 ||
device.LightBarColor.blue != 0) // device.LightBarColor.blue != 0)
{ // {
useLight = true; // useLight = true;
} // }
*/ // */
} //}
if (useRumble) //if (useRumble)
{ //{
//Console.WriteLine("Perform rumble"); // //Console.WriteLine("Perform rumble");
SetDevRumble(device, largeMotor, smallMotor, devIndex); // SetDevRumble(device, largeMotor, smallMotor, devIndex);
} //}
if (useLight) //if (useLight)
{ //{
//Console.WriteLine("Change lightbar color"); // //Console.WriteLine("Change lightbar color");
DS4HapticState haptics = new DS4HapticState // DS4HapticState haptics = new DS4HapticState
{ // {
LightBarColor = color, // LightBarColor = color,
}; // };
device.SetHapticState(ref haptics); // device.SetHapticState(ref haptics);
} //}
//Console.WriteLine(); //Console.WriteLine();
}; };