| 400 | } |
| 401 | |
| 402 | void register_uri(std::string uri) { |
| 403 | OniDeviceInfo info; |
| 404 | strncpy(info.uri, uri.c_str(), ONI_MAX_STR); |
| 405 | strncpy(info.vendor, "Microsoft", ONI_MAX_STR); |
| 406 | //strncpy(info.name, "Kinect 2", ONI_MAX_STR); // XXX, NiTE does not accept new name |
| 407 | strncpy(info.name, "Kinect", ONI_MAX_STR); |
| 408 | if (devices.find(info) == devices.end()) { |
| 409 | WriteMessage("Driver: register new uri: " + uri); |
| 410 | devices[info] = NULL; |
| 411 | deviceConnected(&info); |
| 412 | deviceStateChanged(&info, 0); |
| 413 | } |
| 414 | } |
| 415 | |
| 416 | public: |
| 417 | Driver(OniDriverServices* pDriverServices) : DriverBase(pDriverServices), |