Skip to content

Commit

Permalink
Added new device ID for XGM 4090 #299 (comment)
Browse files Browse the repository at this point in the history
  • Loading branch information
seerge committed Jul 12, 2024
1 parent 2ed6f1f commit 675317d
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions app/USB/XGM.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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();

Check warning on line 16 in app/USB/XGM.cs

View workflow job for this annotation

GitHub Actions / build

'HidDeviceLoader' is obsolete
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)
{
Expand Down

0 comments on commit 675317d

Please sign in to comment.