diff --git a/BetterJoyForCemu/App.config b/BetterJoyForCemu/App.config index b3dad1f..aa0ad43 100644 --- a/BetterJoyForCemu/App.config +++ b/BetterJoyForCemu/App.config @@ -72,8 +72,14 @@ - - + + + + + + + + diff --git a/BetterJoyForCemu/Joycon.cs b/BetterJoyForCemu/Joycon.cs index 3af46b9..15269ae 100644 --- a/BetterJoyForCemu/Joycon.cs +++ b/BetterJoyForCemu/Joycon.cs @@ -834,14 +834,15 @@ namespace BetterJoyForCemu { stick_precal[0] = (UInt16)(stick_raw[0] | ((stick_raw[1] & 0xf) << 8)); stick_precal[1] = (UInt16)((stick_raw[1] >> 4) | (stick_raw[2] << 4)); - ushort[] cal = form.nonOriginal ? new ushort[6] { 2048, 2048, 2048, 2048, 2048, 2048 } : stick_cal; - ushort dz = form.nonOriginal ? (ushort)200 : deadzone; + ushort[] cal = form.useControllerStickCalibration ? stick_cal : new ushort[6] { 2048, 2048, 2048, 2048, 2048, 2048 }; + ushort dz = form.useControllerStickCalibration ? deadzone : (ushort)200; stick = CenterSticks(stick_precal, cal, dz); if (isPro) { stick2_precal[0] = (UInt16)(stick2_raw[0] | ((stick2_raw[1] & 0xf) << 8)); stick2_precal[1] = (UInt16)((stick2_raw[1] >> 4) | (stick2_raw[2] << 4)); - stick2 = CenterSticks(stick2_precal, form.nonOriginal ? cal : stick2_cal, deadzone2); + ushort dz2 = form.useControllerStickCalibration ? deadzone2 : (ushort)200; + stick2 = CenterSticks(stick2_precal, form.useControllerStickCalibration ? stick2_cal : cal, dz2); } // Read other Joycon's sticks diff --git a/BetterJoyForCemu/MainForm.cs b/BetterJoyForCemu/MainForm.cs index 5102287..70e9216 100644 --- a/BetterJoyForCemu/MainForm.cs +++ b/BetterJoyForCemu/MainForm.cs @@ -15,6 +15,7 @@ using System.Xml.Linq; namespace BetterJoyForCemu { public partial class MainForm : Form { + public bool useControllerStickCalibration; public bool nonOriginal = Boolean.Parse(ConfigurationManager.AppSettings["NonOriginalController"]); public bool allowCalibration = Boolean.Parse(ConfigurationManager.AppSettings["AllowCalibration"]); public List