* (at your option):
* - GNU GPL, version 2 or later.
* - GNU LGPL, version 2.1 or later.
+ * - MAME license.
* See the COPYING file in the top-level directory.
*/
#include "plat.h"
#include "lprintf.h"
-#ifdef IN_GP2X
-#error needs update: in_gp2x_init in_gp2x_update
-#include "../gp2x/in_gp2x.h"
-#endif
#ifdef IN_VK
#error needs update: in_vk_init in_vk_update
#include "../win32/in_vk.h"
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;