mirror of
https://github.com/RaySollium99/libpicofe.git
synced 2025-09-07 07:38:04 -04:00
input: detect dead devices, always set keynames
git-svn-id: file:///home/notaz/opt/svn/PicoDrive/platform@925 be3aeb3a-fb24-0410-a615-afba39da0efa
This commit is contained in:
parent
23fb16c8be
commit
090c1b1a30
1 changed files with 7 additions and 4 deletions
|
@ -261,9 +261,11 @@ static void in_evdev_free(void *drv_data)
|
||||||
free(dev);
|
free(dev);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int in_evdev_get_bind_count(void)
|
static const char * const *
|
||||||
|
in_evdev_get_key_names(int *count)
|
||||||
{
|
{
|
||||||
return KEY_CNT;
|
*count = KEY_CNT;
|
||||||
|
return in_evdev_keys;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void or_binds(const int *binds, int key, int *result)
|
static void or_binds(const int *binds, int key, int *result)
|
||||||
|
@ -408,7 +410,8 @@ static int in_evdev_update_keycode(void *data, int *is_down)
|
||||||
if (rd < (int) sizeof(ev)) {
|
if (rd < (int) sizeof(ev)) {
|
||||||
if (errno != EAGAIN) {
|
if (errno != EAGAIN) {
|
||||||
perror("in_evdev: error reading");
|
perror("in_evdev: error reading");
|
||||||
sleep(1);
|
//sleep(1);
|
||||||
|
ret_kc = -2;
|
||||||
}
|
}
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
|
@ -621,7 +624,7 @@ void in_evdev_init(void *vdrv)
|
||||||
drv->prefix = in_evdev_prefix;
|
drv->prefix = in_evdev_prefix;
|
||||||
drv->probe = in_evdev_probe;
|
drv->probe = in_evdev_probe;
|
||||||
drv->free = in_evdev_free;
|
drv->free = in_evdev_free;
|
||||||
drv->get_bind_count = in_evdev_get_bind_count;
|
drv->get_key_names = in_evdev_get_key_names;
|
||||||
drv->get_def_binds = in_evdev_get_def_binds;
|
drv->get_def_binds = in_evdev_get_def_binds;
|
||||||
drv->clean_binds = in_evdev_clean_binds;
|
drv->clean_binds = in_evdev_clean_binds;
|
||||||
drv->set_config = in_evdev_set_config;
|
drv->set_config = in_evdev_set_config;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue