PowerControl reads input every 50ms instead of 250ms

This commit is contained in:
Kamil Trzciński 2022-12-05 18:42:22 +01:00
parent eaec34d950
commit dc9b7648f7
2 changed files with 4 additions and 5 deletions

View file

@ -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()

View file

@ -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)