mirror of
https://github.com/cemu-project/DS4Windows.git
synced 2024-11-26 02:54:20 +01:00
Use struct reference rather than copy
This commit is contained in:
parent
d609453f12
commit
f828eb888c
@ -43,12 +43,12 @@ namespace DS4Windows
|
||||
{
|
||||
byte alphacolor = Math.Max(red, Math.Max(green, blue));
|
||||
Color reg = Color.FromArgb(red, green, blue);
|
||||
Color full = HuetoRGB(reg.GetHue(), reg.GetBrightness(), reg);
|
||||
Color full = HuetoRGB(reg.GetHue(), reg.GetBrightness(), ref reg);
|
||||
return Color.FromArgb((alphacolor > 205 ? 255 : (alphacolor + 50)), full);
|
||||
}
|
||||
}
|
||||
|
||||
private Color HuetoRGB(float hue, float light, Color rgb)
|
||||
private Color HuetoRGB(float hue, float light, ref Color rgb)
|
||||
{
|
||||
float L = (float)Math.Max(.5, light);
|
||||
float C = (1 - Math.Abs(2 * L - 1));
|
||||
|
Loading…
Reference in New Issue
Block a user