Merge pull request #142 from agustinmorantes/SameLEDs
Same joycon LEDs when joined (thanks agustinmorantes)
This commit is contained in:
commit
c53d00c545
3 changed files with 20 additions and 3 deletions
|
@ -151,6 +151,13 @@ namespace BetterJoyForCemu {
|
||||||
v.other = jc;
|
v.other = jc;
|
||||||
jc.other = v;
|
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.Dispose();
|
||||||
v.xin = null;
|
v.xin = null;
|
||||||
|
|
||||||
|
@ -184,6 +191,12 @@ namespace BetterJoyForCemu {
|
||||||
if (b.Tag == v.other)
|
if (b.Tag == v.other)
|
||||||
b.BackgroundImage = v.other.isLeft ? Properties.Resources.jc_left_s : Properties.Resources.jc_right_s;
|
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.other = null;
|
||||||
v.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">
|
<metadata name="btnTip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||||
<value>247, 17</value>
|
<value>247, 17</value>
|
||||||
</metadata>
|
</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">
|
<data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||||
<value>
|
<value>
|
||||||
AAABAAUAEBAAAAEAIABoBAAAVgAAABgYAAABACAAiAkAAL4EAAAgIAAAAQAgAKgQAABGDgAAMDAAAAEA
|
AAABAAUAEBAAAAEAIABoBAAAVgAAABgYAAABACAAiAkAAL4EAAAgIAAAAQAgAKgQAABGDgAAMDAAAAEA
|
||||||
|
|
|
@ -221,6 +221,13 @@ namespace BetterJoyForCemu {
|
||||||
temp.other = v;
|
temp.other = v;
|
||||||
v.other = temp;
|
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.Dispose();
|
||||||
temp.xin = null;
|
temp.xin = null;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue