From: notaz Date: Thu, 9 Dec 2010 23:06:19 +0000 (+0000) Subject: in_evdev: don't stop on bit0 X-Git-Tag: v1.85~146 X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2c0838c78c765558b94fa3a8e1796685e55fda2f;p=picodrive.git in_evdev: don't stop on bit0 git-svn-id: file:///home/notaz/opt/svn/PicoDrive@911 be3aeb3a-fb24-0410-a615-afba39da0efa --- diff --git a/platform/linux/in_evdev.c b/platform/linux/in_evdev.c index a51fe2de..e6bdad15 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; }