virtual void onDeviceDisconnected(const openni::DeviceInfo* pInfo) { if (strcmp(pInfo->getUri(), g_device.getDeviceInfo().getUri()) == 0) { setErrorState("Device disconnected!"); } }
virtual void onDeviceStateChanged(const openni::DeviceInfo* pInfo, openni::DeviceState errorState) { if (strcmp(pInfo->getUri(), g_device.getDeviceInfo().getUri()) == 0) { if (errorState != 0) { setErrorState("Device is in error state! (error %d)", errorState); } else { setErrorState(""); } } }