Skip to content

Commit

Permalink
[Windows] Fix crash when a HID device has no input reports (#205)
Browse files Browse the repository at this point in the history
  • Loading branch information
sigprof committed Jul 17, 2020
1 parent 73d7b7e commit 16717d2
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions windows/QMK Toolbox/MainWindow.cs
Original file line number Diff line number Diff line change
Expand Up @@ -437,6 +437,7 @@ private void UpdateHidDevices(bool disconnected)
private static IEnumerable<HidDevice> GetListableDevices() =>
HidDevices.Enumerate()
.Where(d => d.IsConnected)
.Where(device => device.Capabilities.InputReportByteLength > 0)
.Where(device => (ushort)device.Capabilities.UsagePage == Flashing.ConsoleUsagePage)
.Where(device => (ushort)device.Capabilities.Usage == Flashing.ConsoleUsage);

Expand Down

0 comments on commit 16717d2

Please sign in to comment.