X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=linux%2Fin_evdev.c;h=aca15ad424c0f2f8618ec1282f74847755652d60;hb=HEAD;hp=08e35965ac75a432524f66458b56e2d5d0b27619;hpb=c19e28f62660cdaed26698234cff9c084517b34c;p=libpicofe.git diff --git a/linux/in_evdev.c b/linux/in_evdev.c index 08e3596..aca15ad 100644 --- a/linux/in_evdev.c +++ b/linux/in_evdev.c @@ -17,7 +17,11 @@ #include #include #include +#ifdef __FreeBSD__ +#include +#else #include +#endif #include #include "../input.h" @@ -259,6 +263,7 @@ static void in_evdev_probe(const in_drv_t *drv) no_abs: if (count == 0 && !have_abs) { + free(dev->kbits); free(dev); goto skip; } @@ -290,9 +295,13 @@ static void in_evdev_free(void *drv_data) } static const char * const * -in_evdev_get_key_names(int *count) +in_evdev_get_key_names(const in_drv_t *drv, int *count) { + const struct in_pdata *pdata = drv->pdata; *count = KEY_CNT; + + if (pdata->key_names) + return pdata->key_names; return in_evdev_keys; }