| 190 | } |
| 191 | |
| 192 | SDL_SensorID |
| 193 | SDL_SensorGetDeviceInstanceID(int device_index) |
| 194 | { |
| 195 | SDL_SensorDriver *driver; |
| 196 | SDL_SensorID instance_id = -1; |
| 197 | |
| 198 | SDL_LockSensors(); |
| 199 | if (SDL_GetDriverAndSensorIndex(device_index, &driver, &device_index)) { |
| 200 | instance_id = driver->GetDeviceInstanceID(device_index); |
| 201 | } |
| 202 | SDL_UnlockSensors(); |
| 203 | |
| 204 | return instance_id; |
| 205 | } |
| 206 | |
| 207 | /* |
| 208 | * Open a sensor for use - the index passed as an argument refers to |