wacom: allow 4 bytes for width/height

Intuos Paper needs more than 16 bits

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
pull/93/head
Peter Hutterer 2018-02-14 15:52:34 +10:00
parent 138497a73b
commit 67b4d2b8fe
1 changed files with 2 additions and 2 deletions

View File

@ -457,9 +457,9 @@ class WacomProtocolBase(WacomProtocolLowLevelComm):
rdesc = wacom_live_rdesc_template[:]
for i, v in enumerate(rdesc):
if v == 'width':
rdesc[i] = [0x26, list(int.to_bytes(w, 2, 'little', signed=True))]
rdesc[i] = [0x26, list(int.to_bytes(w, 4, 'little', signed=True))]
elif v == 'height':
rdesc[i] = [0x26, list(int.to_bytes(h, 2, 'little', signed=True))]
rdesc[i] = [0x26, list(int.to_bytes(h, 4, 'little', signed=True))]
uhid_device = UHIDDevice(fd)
uhid_device.rdesc = list(flatten(rdesc))