mirror of
https://github.com/jkocon/g-helper.git
synced 2026-02-23 13:00:52 +01:00
AsusHID tweaks
This commit is contained in:
@@ -17,11 +17,10 @@ public static class AsusHid
|
||||
public static HidStream FindHidStream(byte reportId, int minFeatureLength = 1)
|
||||
{
|
||||
HidDeviceLoader loader = new HidDeviceLoader();
|
||||
var deviceList = loader.GetDevices(ASUS_ID).Where(device => deviceIds.Contains(device.ProductID));
|
||||
|
||||
foreach (var device in deviceList) if (device.CanOpen)
|
||||
{
|
||||
try
|
||||
{
|
||||
var deviceList = loader.GetDevices(ASUS_ID).Where(device => deviceIds.Contains(device.ProductID) && device.CanOpen);
|
||||
foreach (var device in deviceList)
|
||||
{
|
||||
var config = new OpenConfiguration();
|
||||
config.SetOption(OpenOption.Interruptible, false);
|
||||
@@ -41,11 +40,11 @@ public static class AsusHid
|
||||
hidStream.Close();
|
||||
hidStream.Dispose();
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Debug.WriteLine($"Error accessing HID device: {ex.Message}");
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user