X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=platform%2Flinux%2Fin_evdev.c;h=e6bdad1567203d2b2163c60b9bda85bd731d1899;hb=5d1672cbc089b88da0e08ad95432ce1407f2f552;hp=a51fe2deecda78e90171e98f9c67e2036d51ff46;hpb=afc00cad1fc7de678afbf0003b371f37876d8c09;p=picodrive.git diff --git a/platform/linux/in_evdev.c b/platform/linux/in_evdev.c index a51fe2d..e6bdad1 100644 --- a/platform/linux/in_evdev.c +++ b/platform/linux/in_evdev.c @@ -570,7 +570,9 @@ static void in_evdev_get_def_binds(int *binds) { int i; - for (i = 0; in_evdev_defbinds[i].bit != 0; i++) { + for (i = 0; ; i++) { + if (in_evdev_defbinds[i].bit == 0 && in_evdev_defbinds[i].code == 0) + break; binds[IN_BIND_OFFS(in_evdev_defbinds[i].code, in_evdev_defbinds[i].btype)] = 1 << in_evdev_defbinds[i].bit; }