mirror of
https://github.com/jkocon/g-helper.git
synced 2026-02-23 13:00:52 +01:00
Input listener for S17 https://github.com/seerge/g-helper/issues/2247
This commit is contained in:
@@ -454,6 +454,11 @@ public static class AppConfig
|
|||||||
return ContainsModel("Z13");
|
return ContainsModel("Z13");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static bool IsS17()
|
||||||
|
{
|
||||||
|
return ContainsModel("S17");
|
||||||
|
}
|
||||||
|
|
||||||
public static bool HasTabletMode()
|
public static bool HasTabletMode()
|
||||||
{
|
{
|
||||||
return ContainsModel("X16") || ContainsModel("X13");
|
return ContainsModel("X16") || ContainsModel("X13");
|
||||||
|
|||||||
@@ -47,6 +47,15 @@ public static class AsusHid
|
|||||||
if (z13 is not null) return z13.Open();
|
if (z13 is not null) return z13.Open();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (AppConfig.IsS17())
|
||||||
|
{
|
||||||
|
var s17 = devices.Where(device => device.ProductID == 0x18c6).FirstOrDefault();
|
||||||
|
if (s17 is not null) return s17.Open();
|
||||||
|
}
|
||||||
|
|
||||||
|
foreach (var device in devices)
|
||||||
|
Logger.WriteLine($"Input available: {device.DevicePath} {device.ProductID.ToString("X")} {device.GetMaxFeatureReportLength()}");
|
||||||
|
|
||||||
return devices.FirstOrDefault()?.Open();
|
return devices.FirstOrDefault()?.Open();
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
|
|||||||
Reference in New Issue
Block a user