From 81635e08615864d3a5071b85a35c268eb2526fe2 Mon Sep 17 00:00:00 2001 From: Cameron Beeley Date: Fri, 10 Jul 2026 23:13:09 +0100 Subject: [PATCH] Remove assigned-but-never-read gyro-toggle fields and unused catch variable Mouse.currentToggleGyroMouse/currentToggleGyroStick are written in ResetToggleGyroModes but never read anywhere; remove the fields and their writes. Also drop the unused exception variable in ScpUtil's Profiles.xml load catch (CS0168). No behavior change. --- DS4Windows/DS4Control/Mouse.cs | 4 ---- DS4Windows/DS4Control/ScpUtil.cs | 2 +- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/DS4Windows/DS4Control/Mouse.cs b/DS4Windows/DS4Control/Mouse.cs index a4e7fe3..5dbc49b 100644 --- a/DS4Windows/DS4Control/Mouse.cs +++ b/DS4Windows/DS4Control/Mouse.cs @@ -151,8 +151,6 @@ public void ResetTouchStickAccel(double friction) public void ResetToggleGyroModes() { currentToggleGyroControls = false; - currentToggleGyroMouse = false; - currentToggleGyroStick = false; previousGyroControlsTriggerActivated = false; previousGyroMouseTriggerActivated = false; @@ -223,8 +221,6 @@ public bool TouchEnded } bool currentToggleGyroControls = false; - bool currentToggleGyroMouse = false; - bool currentToggleGyroStick = false; bool previousUnchangedTouchJoyFrame = false; int previousTouchDX = 0; diff --git a/DS4Windows/DS4Control/ScpUtil.cs b/DS4Windows/DS4Control/ScpUtil.cs index 790419c..446869b 100644 --- a/DS4Windows/DS4Control/ScpUtil.cs +++ b/DS4Windows/DS4Control/ScpUtil.cs @@ -8505,7 +8505,7 @@ public bool Load() PostProcessLoad(); } - catch (InvalidOperationException e) + catch (InvalidOperationException) { AppLogger.LogToGui("Failed to load Profiles.xml.", false); loaded = false;