From 565c7b7ea40f31a5512ffc9f8b98aa4b66d0d0c6 Mon Sep 17 00:00:00 2001 From: jdfeng Date: Sat, 21 Apr 2018 19:52:46 -0700 Subject: [PATCH 1/8] Add VID + PID for Hori PS4 Mini --- DS4Windows/DS4Library/DS4Devices.cs | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/DS4Windows/DS4Library/DS4Devices.cs b/DS4Windows/DS4Library/DS4Devices.cs index f3c7563..4ff8d6e 100644 --- a/DS4Windows/DS4Library/DS4Devices.cs +++ b/DS4Windows/DS4Library/DS4Devices.cs @@ -31,12 +31,16 @@ namespace DS4Windows internal const int SONY_VID = 0x054C; internal const int RAZER_VID = 0x1532; internal const int NACON_VID = 0x146B; + internal const int HORI_VID = 0x0F0D; private static VidPidInfo[] knownDevices = { - new VidPidInfo(SONY_VID, 0xBA0), new VidPidInfo(SONY_VID, 0x5C4), - new VidPidInfo(SONY_VID, 0x09CC), new VidPidInfo(RAZER_VID, 0x1000), - new VidPidInfo(NACON_VID, 0x0D01) + new VidPidInfo(SONY_VID, 0xBA0), + new VidPidInfo(SONY_VID, 0x5C4), + new VidPidInfo(SONY_VID, 0x09CC), + new VidPidInfo(RAZER_VID, 0x1000), + new VidPidInfo(NACON_VID, 0x0D01), + new VidPidInfo(HORI_VID, 0x00EE) // Hori PS4 Mini Wired Gamepad }; private static string devicePathToInstanceId(string devicePath) From 2f526fa60dd90462da198162669a27335fd634ba Mon Sep 17 00:00:00 2001 From: Travis Nickles Date: Sun, 6 May 2018 21:31:18 -0500 Subject: [PATCH 2/8] Remove unneeded call --- DS4Windows/DS4Library/DS4Device.cs | 7 ------- 1 file changed, 7 deletions(-) diff --git a/DS4Windows/DS4Library/DS4Device.cs b/DS4Windows/DS4Library/DS4Device.cs index 9ebf68d..669823b 100644 --- a/DS4Windows/DS4Library/DS4Device.cs +++ b/DS4Windows/DS4Library/DS4Device.cs @@ -792,16 +792,12 @@ namespace DS4Windows } sendOutputReport(true, true); // Kick Windows into noticing the disconnection. - StopOutputUpdate(); isDisconnecting = true; uiContext.Send(new SendOrPostCallback(delegate (object state4) { Removal?.Invoke(this, EventArgs.Empty); }), null); - //System.Threading.Tasks.Task.Factory.StartNew(() => { Removal?.Invoke(this, EventArgs.Empty); }); - //Removal?.Invoke(this, EventArgs.Empty); - timeoutExecuted = true; return; } @@ -832,9 +828,6 @@ namespace DS4Windows Removal?.Invoke(this, EventArgs.Empty); }), null); - //System.Threading.Tasks.Task.Factory.StartNew(() => { Removal?.Invoke(this, EventArgs.Empty); }); - //Removal?.Invoke(this, EventArgs.Empty); - timeoutExecuted = true; return; } From 3d8e2aa16e3cac245550d495e2000a98216e8475 Mon Sep 17 00:00:00 2001 From: Travis Nickles Date: Sun, 6 May 2018 21:35:17 -0500 Subject: [PATCH 3/8] Removed MakerSupport link from About dialog --- DS4Windows/DS4Forms/Hotkeys.Designer.cs | 26 ++++++++---------------- DS4Windows/DS4Forms/Hotkeys.cs | 5 ----- DS4Windows/DS4Forms/Hotkeys.resx | 27 ------------------------- 3 files changed, 8 insertions(+), 50 deletions(-) diff --git a/DS4Windows/DS4Forms/Hotkeys.Designer.cs b/DS4Windows/DS4Forms/Hotkeys.Designer.cs index b24dae5..0131b79 100644 --- a/DS4Windows/DS4Forms/Hotkeys.Designer.cs +++ b/DS4Windows/DS4Forms/Hotkeys.Designer.cs @@ -40,6 +40,7 @@ this.tPHotkeys = new System.Windows.Forms.TabPage(); this.lbHotkeys = new System.Windows.Forms.Label(); this.tPCredits = new System.Windows.Forms.TabPage(); + this.linkCurrentSite = new System.Windows.Forms.LinkLabel(); this.linkTeokp = new System.Windows.Forms.LinkLabel(); this.linkKiliansch = new System.Windows.Forms.LinkLabel(); this.linkChamilsaan = new System.Windows.Forms.LinkLabel(); @@ -89,8 +90,6 @@ this.coinTP = new System.Windows.Forms.TabPage(); this.flowLayoutPanel1 = new System.Windows.Forms.FlowLayoutPanel(); this.textBox2 = new System.Windows.Forms.TextBox(); - this.makerSupportLinkLabel = new System.Windows.Forms.LinkLabel(); - this.linkCurrentSite = new System.Windows.Forms.LinkLabel(); this.tCAbout.SuspendLayout(); this.tPHotkeys.SuspendLayout(); this.tPCredits.SuspendLayout(); @@ -186,6 +185,13 @@ this.tPCredits.Name = "tPCredits"; this.tPCredits.UseVisualStyleBackColor = true; // + // linkCurrentSite + // + resources.ApplyResources(this.linkCurrentSite, "linkCurrentSite"); + this.linkCurrentSite.Name = "linkCurrentSite"; + this.linkCurrentSite.TabStop = true; + this.linkCurrentSite.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.LinkCurrentSite_LinkClicked); + // // linkTeokp // resources.ApplyResources(this.linkTeokp, "linkTeokp"); @@ -476,7 +482,6 @@ resources.ApplyResources(this.flowLayoutPanel1, "flowLayoutPanel1"); this.flowLayoutPanel1.Controls.Add(this.textBox2); this.flowLayoutPanel1.Controls.Add(this.linkDonate); - this.flowLayoutPanel1.Controls.Add(this.makerSupportLinkLabel); this.flowLayoutPanel1.Name = "flowLayoutPanel1"; // // textBox2 @@ -486,20 +491,6 @@ this.textBox2.Name = "textBox2"; this.textBox2.ReadOnly = true; // - // makerSupportLinkLabel - // - resources.ApplyResources(this.makerSupportLinkLabel, "makerSupportLinkLabel"); - this.makerSupportLinkLabel.Name = "makerSupportLinkLabel"; - this.makerSupportLinkLabel.TabStop = true; - this.makerSupportLinkLabel.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.MakerSupportLinkLabel_LinkClicked); - // - // linkCurrentSite - // - resources.ApplyResources(this.linkCurrentSite, "linkCurrentSite"); - this.linkCurrentSite.Name = "linkCurrentSite"; - this.linkCurrentSite.TabStop = true; - this.linkCurrentSite.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.LinkCurrentSite_LinkClicked); - // // Hotkeys // resources.ApplyResources(this, "$this"); @@ -583,7 +574,6 @@ private System.Windows.Forms.Label lbpt; private System.Windows.Forms.Label lbPortugueseT; private System.Windows.Forms.LinkLabel linkTeokp; - private System.Windows.Forms.LinkLabel makerSupportLinkLabel; private System.Windows.Forms.TabPage coinTP; private System.Windows.Forms.FlowLayoutPanel flowLayoutPanel1; private System.Windows.Forms.TextBox textBox2; diff --git a/DS4Windows/DS4Forms/Hotkeys.cs b/DS4Windows/DS4Forms/Hotkeys.cs index 27730e3..579ce6d 100644 --- a/DS4Windows/DS4Forms/Hotkeys.cs +++ b/DS4Windows/DS4Forms/Hotkeys.cs @@ -117,11 +117,6 @@ namespace DS4Windows Process.Start("https://github.com/teokp"); } - private void MakerSupportLinkLabel_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e) - { - Process.Start("https://www.makersupport.com/Ryochan7"); - } - private void LinkCurrentSite_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e) { Process.Start("https://ryochan7.github.io/ds4windows-site/"); diff --git a/DS4Windows/DS4Forms/Hotkeys.resx b/DS4Windows/DS4Forms/Hotkeys.resx index 241cc2c..813e11c 100644 --- a/DS4Windows/DS4Forms/Hotkeys.resx +++ b/DS4Windows/DS4Forms/Hotkeys.resx @@ -1930,33 +1930,6 @@ Monero: 49RvRMiMewaeez1Y2auxHmfMaAUYfhUpBem4ohzRJd9b5acPcxzh1icjnhZfjnYd1S7NQ57r 0 - - 3, 108 - - - 3, 0, 3, 3 - - - 74, 14 - - - 25 - - - MakerSupport - - - makerSupportLinkLabel - - - System.Windows.Forms.LinkLabel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - flowLayoutPanel1 - - - 2 - Fill From a6b9fb0f4e4f07fb8887335e98797f89cd91a69a Mon Sep 17 00:00:00 2001 From: Travis Nickles Date: Mon, 7 May 2018 01:59:11 -0500 Subject: [PATCH 4/8] Re-added unneeded call. .NET causes performance degradation without it --- DS4Windows/DS4Library/DS4Device.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/DS4Windows/DS4Library/DS4Device.cs b/DS4Windows/DS4Library/DS4Device.cs index 669823b..71b3800 100644 --- a/DS4Windows/DS4Library/DS4Device.cs +++ b/DS4Windows/DS4Library/DS4Device.cs @@ -792,6 +792,7 @@ namespace DS4Windows } sendOutputReport(true, true); // Kick Windows into noticing the disconnection. + StopOutputUpdate(); isDisconnecting = true; uiContext.Send(new SendOrPostCallback(delegate (object state4) { From 07878dafc378a1cade1f06e39d6585d81fda16b1 Mon Sep 17 00:00:00 2001 From: Travis Nickles Date: Sat, 12 May 2018 21:46:48 -0500 Subject: [PATCH 5/8] Changed axis to button mapping routine. Now always take rotation angle into account Related to issue #282 --- DS4Windows/DS4Control/Mapping.cs | 96 ++++++-------------------------- 1 file changed, 16 insertions(+), 80 deletions(-) diff --git a/DS4Windows/DS4Control/Mapping.cs b/DS4Windows/DS4Control/Mapping.cs index 6e453b8..133c607 100644 --- a/DS4Windows/DS4Control/Mapping.cs +++ b/DS4Windows/DS4Control/Mapping.cs @@ -3124,114 +3124,50 @@ namespace DS4Windows { case DS4Controls.LXNeg: { - if (!analog) - { - double angle = cState.LSAngle; - result = cState.LX < 127 && (angle >= 210 && angle <= 330); - } - else - { - result = cState.LX < 127; - } - + double angle = cState.LSAngle; + result = cState.LX < 127 && (angle >= 210 && angle <= 330); break; } case DS4Controls.LYNeg: { - if (!analog) - { - double angle = cState.LSAngle; - result = cState.LY < 127 && (angle >= 300 || angle <= 60); - } - else - { - result = cState.LY < 127; - } - + double angle = cState.LSAngle; + result = cState.LY < 127 && (angle >= 300 || angle <= 60); break; } case DS4Controls.RXNeg: { - if (!analog) - { - double angle = cState.RSAngle; - result = cState.RX < 127 && (angle >= 210 && angle <= 330); - } - else - { - result = cState.RX < 127; - } - + double angle = cState.RSAngle; + result = cState.RX < 127 && (angle >= 210 && angle <= 330); break; } case DS4Controls.RYNeg: { - if (!analog) - { - double angle = cState.RSAngle; - result = cState.RY < 127 && (angle >= 300 || angle <= 60); - } - else - { - result = cState.RY < 127; - } - + double angle = cState.RSAngle; + result = cState.RY < 127 && (angle >= 300 || angle <= 60); break; } case DS4Controls.LXPos: { - if (!analog) - { - double angle = cState.LSAngle; - result = cState.LX > 127 && (angle >= 30 && angle <= 150); - } - else - { - result = cState.LX > 127; - } - + double angle = cState.LSAngle; + result = cState.LX > 127 && (angle >= 30 && angle <= 150); break; } case DS4Controls.LYPos: { - if (!analog) - { - double angle = cState.LSAngle; - result = cState.LY > 127 && (angle >= 120 && angle <= 240); - } - else - { - result = cState.LY > 127; - } - + double angle = cState.LSAngle; + result = cState.LY > 127 && (angle >= 120 && angle <= 240); break; } case DS4Controls.RXPos: { - if (!analog) - { - double angle = cState.RSAngle; - result = cState.RX > 127 && (angle >= 30 && angle <= 150); - } - else - { - result = cState.RX > 127; - } - + double angle = cState.RSAngle; + result = cState.RX > 127 && (angle >= 30 && angle <= 150); break; } case DS4Controls.RYPos: { - if (!analog) - { - double angle = cState.RSAngle; - result = cState.RY > 127 && (angle >= 120 && angle <= 240); - } - else - { - result = cState.RY > 127; - } - + double angle = cState.RSAngle; + result = cState.RY > 127 && (angle >= 120 && angle <= 240); break; } default: break; From ffc2e458542fcb7233df6eaaaae46a69b2d1c09c Mon Sep 17 00:00:00 2001 From: Travis Nickles Date: Sun, 13 May 2018 12:59:13 -0500 Subject: [PATCH 6/8] Fixed failed to unplug message from appearing when switching profiles using SONYWA --- DS4Windows/DS4Control/ScpUtil.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DS4Windows/DS4Control/ScpUtil.cs b/DS4Windows/DS4Control/ScpUtil.cs index 10150d2..2628b73 100644 --- a/DS4Windows/DS4Control/ScpUtil.cs +++ b/DS4Windows/DS4Control/ScpUtil.cs @@ -2835,7 +2835,7 @@ namespace DS4Windows if (postLoad && device < 4) { DS4Device tempDev = control.DS4Controllers[device]; - if (tempDev != null) + if (tempDev != null && tempDev.isSynced()) { tempDev.queueEvent(() => { From 3cd99122892fe35b33534934c810f3641f32aab4 Mon Sep 17 00:00:00 2001 From: Travis Nickles Date: Sun, 20 May 2018 02:18:28 -0500 Subject: [PATCH 7/8] Changed parameters for touchpad jitter compensation --- DS4Windows/DS4Control/MouseCursor.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/DS4Windows/DS4Control/MouseCursor.cs b/DS4Windows/DS4Control/MouseCursor.cs index 1615350..e437403 100644 --- a/DS4Windows/DS4Control/MouseCursor.cs +++ b/DS4Windows/DS4Control/MouseCursor.cs @@ -251,15 +251,15 @@ namespace DS4Windows if (jitterCompenstation) { double absX = Math.Abs(xMotion); - if (absX <= normX * 0.34) + if (absX <= normX * 0.15) { - xMotion = signX * Math.Pow(absX / 0.34f, 1.44) * 0.34; + xMotion = signX * Math.Pow(absX / 0.15f, 1.408) * 0.15; } double absY = Math.Abs(yMotion); - if (absY <= normY * 0.34) + if (absY <= normY * 0.15) { - yMotion = signY * Math.Pow(absY / 0.34f, 1.44) * 0.34; + yMotion = signY * Math.Pow(absY / 0.15f, 1.408) * 0.15; } } From c18b8d4fc0c18ff83bd1ef96bcf9d69be91d0101 Mon Sep 17 00:00:00 2001 From: Travis Nickles Date: Thu, 24 May 2018 13:58:41 -0500 Subject: [PATCH 8/8] Version 1.4.119 --- DS4Windows/Properties/AssemblyInfo.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/DS4Windows/Properties/AssemblyInfo.cs b/DS4Windows/Properties/AssemblyInfo.cs index 4374272..a05de02 100644 --- a/DS4Windows/Properties/AssemblyInfo.cs +++ b/DS4Windows/Properties/AssemblyInfo.cs @@ -33,7 +33,7 @@ using System.Runtime.InteropServices; // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.4.118")] -[assembly: AssemblyFileVersion("1.4.118")] +[assembly: AssemblyVersion("1.4.119")] +[assembly: AssemblyFileVersion("1.4.119")] [assembly: NeutralResourcesLanguage("en")]