mirror of
https://github.com/ayufan/steam-deck-tools.git
synced 2026-04-05 14:25:40 +00:00
Update hidapi.net to properly Dispose() device
This commit is contained in:
parent
d362eb41f5
commit
49f86225cb
3 changed files with 11 additions and 9 deletions
|
|
@ -1,18 +1,11 @@
|
|||
using CommonHelpers;
|
||||
using ExternalHelpers;
|
||||
using Microsoft.VisualBasic.Logging;
|
||||
using Microsoft.Win32;
|
||||
using hidapi;
|
||||
using PowerControl.External;
|
||||
using PowerControl.Helpers;
|
||||
using RTSSSharedMemoryNET;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Diagnostics;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using static System.Windows.Forms.AxHost;
|
||||
|
||||
namespace PowerControl
|
||||
{
|
||||
|
|
@ -201,7 +194,7 @@ namespace PowerControl
|
|||
updateOSD();
|
||||
}
|
||||
|
||||
private void NeptuneDevice_OnInputReceived(object? sender, hidapi.HidDeviceInputReceivedEventArgs e)
|
||||
private Task NeptuneDevice_OnInputReceived(hidapi.HidDeviceInputReceivedEventArgs e)
|
||||
{
|
||||
var input = SDCInput.FromBuffer(e.Buffer);
|
||||
|
||||
|
|
@ -224,6 +217,8 @@ namespace PowerControl
|
|||
// Consume only some events to avoid under-running SWICD
|
||||
if (!neptuneDeviceState.buttons5.HasFlag(SDCButton5.BTN_QUICK_ACCESS))
|
||||
Thread.Sleep(50);
|
||||
|
||||
return new Task(() => { });
|
||||
}
|
||||
|
||||
private void dismissNeptuneInput()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue