This commit is contained in:
Serge
2024-07-12 10:37:54 +02:00
parent 2ed6f1fefb
commit 675317dcc1

View File

@@ -7,15 +7,16 @@ namespace GHelper.USB
{
public static class XGM
{
const int XGM_ID = 0x1970;
const int ASUS_ID = 0x0b05;
static int[] deviceIds = { 0x1970, 0x1a9a};
public static void Write(byte[] data)
{
HidDeviceLoader loader = new HidDeviceLoader();
try
{
HidDevice device = loader.GetDevices(ASUS_ID, XGM_ID).Where(device => device.CanOpen && device.GetMaxFeatureReportLength() >= 300).FirstOrDefault();
HidDevice device = loader.GetDevices(ASUS_ID).Where(device => deviceIds.Contains(device.ProductID) && device.CanOpen && device.GetMaxFeatureReportLength() >= 300).FirstOrDefault();
if (device is null)
{