mirror of
https://github.com/X11Libre/xf86-input-evdev.git
synced 2026-03-26 02:38:35 +00:00
make sure to clear all axis_map entries
don't use uninitialized axis_map entries, ie axis_map[ABS_PRESSURE] Signed-off-by: Jeremy Jay <dinkumator@gmail.com> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
committed by
Peter Hutterer
parent
7ac0c4456d
commit
740dc202f7
@@ -1156,12 +1156,17 @@ EvdevInitButtonMapping(InputInfoPtr pInfo)
|
||||
static int
|
||||
EvdevInit(DeviceIntPtr device)
|
||||
{
|
||||
int i;
|
||||
InputInfoPtr pInfo;
|
||||
EvdevPtr pEvdev;
|
||||
|
||||
pInfo = device->public.devicePrivate;
|
||||
pEvdev = pInfo->private;
|
||||
|
||||
/* clear all axis_map entries */
|
||||
for(i = 0; i < max(ABS_CNT,REL_CNT); i++)
|
||||
pEvdev->axis_map[i]=-1;
|
||||
|
||||
if (pEvdev->flags & EVDEV_KEYBOARD_EVENTS)
|
||||
EvdevAddKeyClass(device);
|
||||
if (pEvdev->flags & EVDEV_BUTTON_EVENTS)
|
||||
|
||||
Reference in New Issue
Block a user