nvda
7d9028a8 - HID braille display driver: handle case where a display has no input values in hits HID descriptor (#16969)

Commit
2 years ago
HID braille display driver: handle case where a display has no input values in hits HID descriptor (#16969) Summary of the issue: In PR #16916, NVDA asks the HID braille display for its configurable number of cells. However, with the merging of that pr, trying to use some HID braille displays fails and causes a traceback this is due to the fact that some HID braille displays have no input values (number of cells property for example) in their HID descriptor. Although pr #16916 handled this correctly at its own level, the underlying hwIo.hid.Hid inputValueCaps property did not check if the number of input value caps on the descriptor was 0 before trying to fetch them. Description of user facing changes None known as this driver is still rare and the only place I've seen it is a device with custom firmware. Description of development approach For the inputButtonCaps, inputValueCaps and outputValueCaps properties on hwIo.hid.Hid, if the number of value caps in the descriptor is 0, return the unfilled 0-length array, rather than trying to fetch 0 caps (which HidP_GetButtonCaps and friends) does not like. These 0-length arrays can still be treated as iterators, which will be empty.
Parents
Loading