From dc9b7648f780c85cf2cd2fd45744e180019c2f3b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kamil=20Trzci=C5=84ski?= Date: Mon, 5 Dec 2022 18:42:22 +0100 Subject: [PATCH] PowerControl reads input every 50ms instead of 250ms --- PowerControl/Controller.cs | 8 +++----- RELEASE.md | 1 + 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/PowerControl/Controller.cs b/PowerControl/Controller.cs index 172122f..72c0182 100644 --- a/PowerControl/Controller.cs +++ b/PowerControl/Controller.cs @@ -137,7 +137,7 @@ namespace PowerControl if (Settings.Default.EnableNeptuneController) { neptuneTimer = new System.Windows.Forms.Timer(components); - neptuneTimer.Interval = 1000 / 30; + neptuneTimer.Interval = 1000 / 60; neptuneTimer.Tick += NeptuneTimer_Tick; neptuneTimer.Enabled = true; @@ -207,10 +207,8 @@ namespace PowerControl } // Consume only some events to avoid under-running SWICD - if (neptuneDeviceState.buttons5.HasFlag(SDCButton5.BTN_QUICK_ACCESS)) - Thread.Sleep(1000 / 30); - else - Thread.Sleep(250); + if (!neptuneDeviceState.buttons5.HasFlag(SDCButton5.BTN_QUICK_ACCESS)) + Thread.Sleep(50); } private void dismissNeptuneInput() diff --git a/RELEASE.md b/RELEASE.md index d178571..fc3f013 100644 --- a/RELEASE.md +++ b/RELEASE.md @@ -29,3 +29,4 @@ It does help this project on being supported. - Scale haptic intensity - Add haptic style setting (disabled, weak, strong) - Merge `X360 with Haptic` into `X360` profile +- Improve responsiveness of PowerControl (read input more frequently)