-#ifdef IN_GP2X
- in_gp2x_init(&in_drivers[IN_DRVID_GP2X]);
-#endif
-#ifdef IN_EVDEV
- in_evdev_init(&in_drivers[IN_DRVID_EVDEV]);
-#endif
-#ifdef IN_VK
- in_vk_init(&in_drivers[IN_DRVID_VK]);
-#endif
+ memcpy(&new_drivers[in_driver_count], drv, sizeof(new_drivers[0]));
+
+ CHECK_ADD_STUB(new_drivers[in_driver_count], free);
+ CHECK_ADD_STUB(new_drivers[in_driver_count], get_def_binds);
+ CHECK_ADD_STUB(new_drivers[in_driver_count], clean_binds);
+ CHECK_ADD_STUB(new_drivers[in_driver_count], get_config);
+ CHECK_ADD_STUB(new_drivers[in_driver_count], set_config);
+ CHECK_ADD_STUB(new_drivers[in_driver_count], update_keycode);
+ CHECK_ADD_STUB(new_drivers[in_driver_count], menu_translate);
+ CHECK_ADD_STUB(new_drivers[in_driver_count], get_key_code);
+ CHECK_ADD_STUB(new_drivers[in_driver_count], get_key_name);
+ in_drivers = new_drivers;
+ in_driver_count = count_new;
+
+ return 0;
+}
+
+void in_init(void)
+{
+ in_drivers = NULL;
+ memset(in_devices, 0, sizeof(in_devices));
+ in_driver_count = 0;
+ in_dev_count = 0;