| 39 | class DummyDevice { |
| 40 | public: |
| 41 | DummyDevice(OSVR_PluginRegContext ctx) { |
| 42 | std::cout << "Constructing dummy device" << std::endl; |
| 43 | |
| 44 | /// Create an asynchronous (threaded) device |
| 45 | osvrDeviceAsyncInit( |
| 46 | ctx, "MyAsyncDevice", |
| 47 | &m_dev); // Puts an object in m_dev that knows it's a |
| 48 | // threaded device so osvrDeviceSendData knows |
| 49 | // that it needs to get a connection lock first. |
| 50 | |
| 51 | /// Sets the update callback |
| 52 | osvrDeviceRegisterUpdateCallback(m_dev, &DummyDevice::update, this); |
| 53 | } |
| 54 | |
| 55 | /// Trampoline: C-compatible callback bouncing into a member function. |
| 56 | /// Future enhancements to the C++ wrappers will make this tiny function |
nothing calls this directly
no test coverage detected