From fae376b8317603784648114b18bcc24046a3d195 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kamil=20Trzci=C5=84ski?= Date: Thu, 5 Jan 2023 20:43:26 +0100 Subject: [PATCH] Revert "SteamController: Force to reconnect X360 controller on Resume" This reverts commit 82a9f63358debc96877ab0835cc84876c8b07d91. --- RELEASE.md | 1 - SteamController/Devices/Xbox360Controller.cs | 18 ------------------ 2 files changed, 19 deletions(-) diff --git a/RELEASE.md b/RELEASE.md index 70cb405..aad085e 100644 --- a/RELEASE.md +++ b/RELEASE.md @@ -23,5 +23,4 @@ - GPU detection will log errors to `Sentry.io` - Support SMU of Vangogh GPU shipped with BIOS 113 - Fix Steam Game detection when in X360 controller mode -- Force to reconnect X360 controller on Resume - Hold-press Guide button for 100ms in X360 mode diff --git a/SteamController/Devices/Xbox360Controller.cs b/SteamController/Devices/Xbox360Controller.cs index 73030a7..257ec1d 100644 --- a/SteamController/Devices/Xbox360Controller.cs +++ b/SteamController/Devices/Xbox360Controller.cs @@ -1,4 +1,3 @@ -using Microsoft.Win32; using Nefarius.ViGEm.Client; using Nefarius.ViGEm.Client.Exceptions; using Nefarius.ViGEm.Client.Targets; @@ -22,30 +21,13 @@ namespace SteamController.Devices public Xbox360Controller() { - Microsoft.Win32.SystemEvents.PowerModeChanged += SystemEvents_PowerModeChanged; - } - - ~Xbox360Controller() - { - Dispose(); } public void Dispose() { - GC.SuppressFinalize(this); - Microsoft.Win32.SystemEvents.PowerModeChanged -= SystemEvents_PowerModeChanged; using (client) { } } - private void SystemEvents_PowerModeChanged(object sender, PowerModeChangedEventArgs e) - { - if (e.Mode == Microsoft.Win32.PowerModes.Resume) - { - // Force to reconnect device on resume - lock (this) { Fail(); } - } - } - internal bool Tick() { if (this.device is not null)