case IN_CFG_KEY_NAMES:
return -1; /* not implemented */
default:
+ if (!dev->probed)
+ return -1;
+
return DRV(dev->drv_id).get_config(dev->drv_data, what, ival);
}
/* have_async_devs means we will have to do all reads async anyway.. */
if (!in_have_async_devs) {
for (i = 0; i < in_dev_count; i++) {
- if (in_devices[i].probed)
- DRV(in_devices[i].drv_id).set_config(in_devices[i].drv_data,
- IN_CFG_BLOCKING, is_blocking);
+ if (!in_devices[i].probed)
+ continue;
+
+ DRV(in_devices[i].drv_id).set_config(
+ in_devices[i].drv_data, IN_CFG_BLOCKING,
+ is_blocking);
}
}
int ret, count, *binds, *def_binds;
in_dev_t *dev = &in_devices[i];
- if (dev->binds == NULL || dev->drv_data == NULL)
+ if (dev->binds == NULL || !dev->probed)
continue;
count = dev->key_count;
if (dev_id < 0)\r
dev_name = "(all devices)";\r
else\r
- dev_name = in_get_dev_name(dev_id, 1, 1);\r
+ dev_name = in_get_dev_name(dev_id, 0, 1);\r
w = strlen(dev_name) * me_mfont_w;\r
if (w < 30 * me_mfont_w)\r
w = 30 * me_mfont_w;\r
for (i = 0, dev_id--; i < IN_MAX_DEVS + 1; i++, dev_id--) {\r
if (dev_id < -1)\r
dev_id = IN_MAX_DEVS - 1;\r
- if (dev_id == -1 || in_get_dev_name(dev_id, 1, 0) != NULL)\r
+ if (dev_id == -1 || in_get_dev_name(dev_id, 0, 0) != NULL)\r
break;\r
}\r
continue;\r
for (i = 0, dev_id++; i < IN_MAX_DEVS; i++, dev_id++) {\r
if (dev_id >= IN_MAX_DEVS)\r
dev_id = -1;\r
- if (dev_id == -1 || in_get_dev_name(dev_id, 1, 0) != NULL)\r
+ if (dev_id == -1 || in_get_dev_name(dev_id, 0, 0) != NULL)\r
break;\r
}\r
continue;\r