From d9b615ce2df91865c56c3878335fc2f1b8cd3819 Mon Sep 17 00:00:00 2001 From: Serge <5920850+seerge@users.noreply.github.com> Date: Mon, 20 Nov 2023 16:16:38 +0100 Subject: [PATCH] Z13 fix https://github.com/seerge/g-helper/issues/1622 --- app/USB/AsusHid.cs | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/app/USB/AsusHid.cs b/app/USB/AsusHid.cs index dbad78e3..60202ff6 100644 --- a/app/USB/AsusHid.cs +++ b/app/USB/AsusHid.cs @@ -38,7 +38,16 @@ public static class AsusHid { try { - return FindDevices(reportId)?.FirstOrDefault()?.Open(); + var devices = FindDevices(reportId); + if (devices is null) return null; + + if (AppConfig.IsZ13()) + { + var z13 = devices.Where(device => device.ProductID == 0x1a30).FirstOrDefault(); + if (z13 is not null) return z13.Open(); + } + + return devices.FirstOrDefault()?.Open(); } catch (Exception ex) {