Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added Manual Stick Calibration #920

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions BetterJoyForCemu/App.config
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
<!-- When enabled, can only calibrate one controller at a time.-->
<!-- Default: false -->
<add key="AllowCalibration" value="false" />
<add key="ManualStickCal" value="false" />
<!-- Default calibration; used for third party controller -->
<add key="acc_sensiti" value="16384,16384,16384"/>
<add key="gyr_sensiti" value="18642,18642,18642"/>
Expand Down
2 changes: 1 addition & 1 deletion BetterJoyForCemu/Joycon.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1169,7 +1169,7 @@ private struct Rumble {
}

private void dump_calibration_data() {
if (isSnes || thirdParty) {
if (isSnes || thirdParty || form.ManualStickCal) {
short[] temp = (short[])ConfigurationManager.AppSettings["acc_sensiti"].Split(',').Select(s => short.Parse(s)).ToArray();
acc_sensiti[0] = temp[0]; acc_sensiti[1] = temp[1]; acc_sensiti[2] = temp[2];
temp = (short[])ConfigurationManager.AppSettings["gyr_sensiti"].Split(',').Select(s => short.Parse(s)).ToArray();
Expand Down
1 change: 1 addition & 0 deletions BetterJoyForCemu/MainForm.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
namespace BetterJoyForCemu {
public partial class MainForm : Form {
public bool allowCalibration = Boolean.Parse(ConfigurationManager.AppSettings["AllowCalibration"]);
public bool ManualStickCal = Boolean.Parse(ConfigurationManager.AppSettings["ManualStickCal"]);
public List<Button> con, loc;
public bool calibrate;
public List<KeyValuePair<string, float[]>> caliData;
Expand Down