Skip to content

Commit

Permalink
Fixed gyro in single joycon mode.
Browse files Browse the repository at this point in the history
Added tooltip on button.
  • Loading branch information
Davidobot committed Aug 23, 2018
1 parent 37aba95 commit 68b6928
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 0 deletions.
12 changes: 12 additions & 0 deletions BetterJoyForCemu/Joycon.cs
Original file line number Diff line number Diff line change
Expand Up @@ -657,6 +657,18 @@ private void ExtractIMUValues(byte[] report_buf, int n = 0) {
break;
}
}

if (other == null && !isPro) { // single joycon mode; Z do not swap, rest do
if (isLeft) {
acc_g.X = -acc_g.X;
gyr_g.X = -gyr_g.X;
} else {
gyr_g.Y = -gyr_g.Y;
}

float temp = acc_g.X; acc_g.X = acc_g.Y; acc_g.Y = temp;
temp = gyr_g.X; gyr_g.X = gyr_g.Y; gyr_g.Y = temp;
}
}

public void Begin() {
Expand Down
3 changes: 3 additions & 0 deletions BetterJoyForCemu/MainForm.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions BetterJoyForCemu/MainForm.resx
Original file line number Diff line number Diff line change
Expand Up @@ -762,6 +762,9 @@
CICCwhBGEQAFhSHM/wf9FHIvlrkdFwAAAABJRU5ErkJggg==
</value>
</data>
<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="$this.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
Expand Down

0 comments on commit 68b6928

Please sign in to comment.