diff --git a/DS4Control/Mouse.cs b/DS4Control/Mouse.cs index 91c7563..e925292 100644 --- a/DS4Control/Mouse.cs +++ b/DS4Control/Mouse.cs @@ -33,8 +33,7 @@ namespace DS4Control public virtual void touchesMoved(object sender, TouchpadEventArgs arg) { cursor.touchesMoved(arg); - if (Math.Abs(firstTouch.hwY - arg.touches[0].hwY) > 5) - wheel.touchesMoved(arg); + wheel.touchesMoved(arg); if (Math.Abs(firstTouch.hwY - arg.touches[0].hwY) < 50) if (arg.touches.Length == 2) if (arg.touches[0].hwX - firstTouch.hwX > 200 && !slideleft) diff --git a/DS4Control/MouseWheel.cs b/DS4Control/MouseWheel.cs index 39dce1f..ad9c4ca 100644 --- a/DS4Control/MouseWheel.cs +++ b/DS4Control/MouseWheel.cs @@ -33,8 +33,8 @@ namespace DS4Control Touch T1 = arg.touches[1]; //mouse wheel 120 == 1 wheel click according to Windows API - int lastMidX = (lastT0.hwX + lastT1.hwX) / 2, lastMidY = (lastT0.hwY + lastT1.hwY) / 2, - currentMidX = (T0.hwX + T1.hwX) / 2, currentMidY = (T0.hwY + T1.hwY) / 2; + double lastMidX = (lastT0.hwX + lastT1.hwX) / 2d, lastMidY = (lastT0.hwY + lastT1.hwY) / 2d, + currentMidX = (T0.hwX + T1.hwX) / 2d, currentMidY = (T0.hwY + T1.hwY) / 2d; double coefficient = Global.getScrollSensitivity(deviceNumber); // Adjust for touch distance: "standard" distance is 960 pixels, i.e. half the width. Scroll farther if fingers are farther apart, and vice versa, in linear proportion. double touchXDistance = T1.hwX - T0.hwX, touchYDistance = T1.hwY - T0.hwY, touchDistance = Math.Sqrt(touchXDistance * touchXDistance + touchYDistance * touchYDistance); diff --git a/DS4Control/ScpUtil.cs b/DS4Control/ScpUtil.cs index 9657752..39835d9 100644 --- a/DS4Control/ScpUtil.cs +++ b/DS4Control/ScpUtil.cs @@ -81,6 +81,7 @@ namespace DS4Control { protected static BackingStore m_Config = new BackingStore(); protected static Int32 m_IdleTimeout = 600000; + //public static string appdatapath = Directory.GetParent(Assembly.GetExecutingAssembly().Location).FullName; public static string appdatapath = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) + "\\DS4Tool"; public static event EventHandler ControllerStatusChange; // called when a controller is added/removed/battery or touchpad mode changes/etc. public static void ControllerStatusChanged(object sender) @@ -533,7 +534,7 @@ namespace DS4Control public class BackingStore { - protected String m_Profile = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) + "\\DS4Tool\\Profiles.xml"; + protected String m_Profile = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) + "\\DS4Tool" + "\\Profiles.xml"; protected XmlDocument m_Xdoc = new XmlDocument(); //fifth value used to for options, not fifth controller public int[] buttonMouseSensitivity = { 25, 25, 25, 25, 25 }; diff --git a/DS4Tool/DS4Tool.csproj b/DS4Tool/DS4Tool.csproj index 712e117..515976b 100644 --- a/DS4Tool/DS4Tool.csproj +++ b/DS4Tool/DS4Tool.csproj @@ -250,6 +250,17 @@ true + + + {F935DC20-1CF0-11D0-ADB9-00C04FD58A0B} + 1 + 0 + 0 + tlbimp + False + True + +