Same joycon LEDs when joined
This commit is contained in:
parent
d40778aca5
commit
d21957c574
3 changed files with 20 additions and 3 deletions
|
@ -150,6 +150,13 @@ namespace BetterJoyForCemu {
|
|||
v.other = jc;
|
||||
jc.other = v;
|
||||
|
||||
//Set both Joycon LEDs to the one with the lowest ID
|
||||
byte led = jc.LED <= v.LED ? jc.LED : v.LED;
|
||||
jc.LED = led;
|
||||
v.LED = led;
|
||||
jc.SetLED(led);
|
||||
v.SetLED(led);
|
||||
|
||||
v.xin.Dispose();
|
||||
v.xin = null;
|
||||
|
||||
|
@ -183,6 +190,12 @@ namespace BetterJoyForCemu {
|
|||
if (b.Tag == v.other)
|
||||
b.BackgroundImage = v.other.isLeft ? Properties.Resources.jc_left_s : Properties.Resources.jc_right_s;
|
||||
|
||||
//Set original Joycon LEDs
|
||||
v.other.LED = (byte)(0x1 << v.other.PadId);
|
||||
v.LED = (byte)(0x1 << v.PadId);
|
||||
v.other.SetLED(v.other.LED);
|
||||
v.SetLED(v.LED);
|
||||
|
||||
v.other.other = null;
|
||||
v.other = null;
|
||||
}
|
||||
|
|
|
@ -765,9 +765,6 @@
|
|||
<metadata name="btnTip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>247, 17</value>
|
||||
</metadata>
|
||||
<metadata name="btnTip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>247, 17</value>
|
||||
</metadata>
|
||||
<data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
AAABAAUAEBAAAAEAIABoBAAAVgAAABgYAAABACAAiAkAAL4EAAAgIAAAAQAgAKgQAABGDgAAMDAAAAEA
|
||||
|
|
|
@ -221,6 +221,13 @@ namespace BetterJoyForCemu {
|
|||
temp.other = v;
|
||||
v.other = temp;
|
||||
|
||||
//Set both Joycon LEDs to the one with the lowest ID
|
||||
byte led = temp.LED <= v.LED ? temp.LED : v.LED;
|
||||
temp.LED = led;
|
||||
v.LED = led;
|
||||
temp.SetLED(led);
|
||||
v.SetLED(led);
|
||||
|
||||
temp.xin.Dispose();
|
||||
temp.xin = null;
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue