summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/evdev.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/evdev.c b/src/evdev.c
index 9d3409f..6b22a8f 100644
--- a/src/evdev.c
+++ b/src/evdev.c
@@ -1115,9 +1115,7 @@ EvdevAddButtonClass(DeviceIntPtr device)
pInfo = device->public.devicePrivate;
pEvdev = pInfo->private;
- /* FIXME: count number of actual buttons */
- if (!InitButtonClassDeviceStruct(device, ArrayLength(pEvdev->btnmap),
- pEvdev->btnmap))
+ if (!InitButtonClassDeviceStruct(device, pEvdev->num_buttons, pEvdev->btnmap))
return !Success;
return Success;