Skip to content

Commit

Permalink
Fixed crashes and duplicate entries for Mouse/keyboard emulation and …
Browse files Browse the repository at this point in the history
…VCs, respectively.
  • Loading branch information
cbrauers committed Jun 1, 2024
1 parent 29711fb commit 55eac8a
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions VKB/VKBConnectionHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ public void Startup(Object sender, EventArgs e)
DeviceList.Local.Changed += DevicesChanged;
foreach (HidDevice dev in DevList)
{
Devices.Add(new VKBDevice(dev));
if (dev.GetReportDescriptor().FeatureReports.Count() > 0)
Devices.Add(new VKBDevice(dev));
}
}
public void DevicesChanged(Object sender, EventArgs e)
Expand All @@ -38,7 +39,8 @@ public void DevicesChanged(Object sender, EventArgs e)
{
if(Devices.Find(d => d.HidDev == dev) == null)
{
Devices.Add(new VKBDevice(dev));
if (dev.GetReportDescriptor().FeatureReports.Count() > 0)
Devices.Add(new VKBDevice(dev));
}
}
}
Expand Down

0 comments on commit 55eac8a

Please sign in to comment.