From 4c1ef2b63cb216026c1be725ed4c00220e76f3e1 Mon Sep 17 00:00:00 2001 From: Travis Nickles Date: Thu, 1 Nov 2018 14:11:53 -0500 Subject: [PATCH 1/3] Don't persist current blank state. Method should probably be renamed Related to issue #474 --- DS4Windows/DS4Control/ControlService.cs | 1 - 1 file changed, 1 deletion(-) diff --git a/DS4Windows/DS4Control/ControlService.cs b/DS4Windows/DS4Control/ControlService.cs index 9cb28d4..855bdf9 100644 --- a/DS4Windows/DS4Control/ControlService.cs +++ b/DS4Windows/DS4Control/ControlService.cs @@ -1031,7 +1031,6 @@ namespace DS4Windows // Use Task to reset device synth state and commit it Task.Run(() => { - Mapping.deviceState[ind].SavePrevious(true); Mapping.Commit(ind); }).Wait(); From b9b89be55486fb1949b334a697a380473c8923f6 Mon Sep 17 00:00:00 2001 From: Travis Nickles Date: Thu, 1 Nov 2018 14:13:10 -0500 Subject: [PATCH 2/3] Renamed method to make meaning more clear --- DS4Windows/DS4Control/Mapping.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/DS4Windows/DS4Control/Mapping.cs b/DS4Windows/DS4Control/Mapping.cs index 4601a7f..32671b7 100644 --- a/DS4Windows/DS4Control/Mapping.cs +++ b/DS4Windows/DS4Control/Mapping.cs @@ -32,7 +32,7 @@ namespace DS4Windows } public Dictionary keyPresses = new Dictionary(); - public void SavePrevious(bool performClear) + public void SaveToPrevious(bool performClear) { previousClicks = currentClicks; if (performClear) @@ -367,9 +367,9 @@ namespace DS4Windows } } } - globalState.SavePrevious(false); + globalState.SaveToPrevious(false); } - state.SavePrevious(true); + state.SaveToPrevious(true); } public enum Click { None, Left, Middle, Right, Fourth, Fifth, WUP, WDOWN }; From 0eac27c8d1c98ea953925e3aa9c638faa24cadb6 Mon Sep 17 00:00:00 2001 From: Travis Nickles Date: Thu, 1 Nov 2018 15:53:32 -0500 Subject: [PATCH 3/3] Fixed bad copy pasta. I swear this was corrected previously. VS at fault again? --- DS4Windows/DS4Forms/DS4Form.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DS4Windows/DS4Forms/DS4Form.cs b/DS4Windows/DS4Forms/DS4Form.cs index dda0fa0..cd6ca62 100644 --- a/DS4Windows/DS4Forms/DS4Form.cs +++ b/DS4Windows/DS4Forms/DS4Form.cs @@ -2178,7 +2178,7 @@ Properties.Resources.DS4Update, MessageBoxButtons.YesNo, MessageBoxIcon.Question } else { - ScpDevice.UnregisterNotify(Handle); + ScpDevice.UnregisterNotify(regHandle); } } else if (userClosing && closeMini && !contextclose)