Skip to content

Commit 68b6928

Browse files
committed
Fixed gyro in single joycon mode.
Added tooltip on button.
1 parent 37aba95 commit 68b6928

3 files changed

Lines changed: 18 additions & 0 deletions

File tree

BetterJoyForCemu/Joycon.cs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -657,6 +657,18 @@ private void ExtractIMUValues(byte[] report_buf, int n = 0) {
657657
break;
658658
}
659659
}
660+
661+
if (other == null && !isPro) { // single joycon mode; Z do not swap, rest do
662+
if (isLeft) {
663+
acc_g.X = -acc_g.X;
664+
gyr_g.X = -gyr_g.X;
665+
} else {
666+
gyr_g.Y = -gyr_g.Y;
667+
}
668+
669+
float temp = acc_g.X; acc_g.X = acc_g.Y; acc_g.Y = temp;
670+
temp = gyr_g.X; gyr_g.X = gyr_g.Y; gyr_g.Y = temp;
671+
}
660672
}
661673

662674
public void Begin() {

BetterJoyForCemu/MainForm.Designer.cs

Lines changed: 3 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

BetterJoyForCemu/MainForm.resx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -762,6 +762,9 @@
762762
CICCwhBGEQAFhSHM/wf9FHIvlrkdFwAAAABJRU5ErkJggg==
763763
</value>
764764
</data>
765+
<metadata name="btnTip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
766+
<value>247, 17</value>
767+
</metadata>
765768
<metadata name="$this.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
766769
<value>True</value>
767770
</metadata>

0 commit comments

Comments
 (0)