From d11b15d073a5843f1f935dae9d280986d67c8266 Mon Sep 17 00:00:00 2001 From: jays2kings Date: Sun, 8 Jun 2014 19:41:36 -0400 Subject: [PATCH] DS4Windows no longer crashes if no source games are installed (ie shinra's crash) Auto profile has more ways to add programs, add origin games if installed, and start menu programs You can also add by shortcuts (.lnk) Auto Profiles now work by the foreground program DS4Windows no longer checks for driver at start, will help speed up DS4's connection when starting up with windows. Welcome to DS4Windows Window is now an option in the Settings Tab, will automatically show up if mine or DSDCS was never started before. Touchpad scrolling reworked via electrobrains newest build Idle Timeout has a checkbox, also small UI fixes --- DS4Control/Mouse.cs | 3 +- DS4Control/MouseWheel.cs | 4 +- DS4Control/ScpUtil.cs | 3 +- DS4Tool/DS4Tool.csproj | 11 + DS4Tool/Options.Designer.cs | 440 ++++++++++++++++++++--------------- DS4Tool/Options.cs | 113 +++++---- DS4Tool/ScpForm.Designer.cs | 223 +++++++++--------- DS4Tool/ScpForm.cs | 119 ++++++++-- DS4Tool/WelcomeDialog.cs | 4 +- DS4Tool/WinProgs.Designer.cs | 78 +++++-- DS4Tool/WinProgs.cs | 273 ++++++++++++++++++---- DS4Tool/WinProgs.resx | 3 + 12 files changed, 834 insertions(+), 440 deletions(-) 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 + +