/* Find the SDL_Sensor that owns this instance id  */
SDL_Sensor* SDL_SensorFromInstanceID(SDL_SensorID instance_id)
/* Find the SDL_Sensor that owns this instance id  */
SDL_Sensor* SDL_SensorFromInstanceID(SDL_SensorID instance_id)
{
    SDL_Sensor *sensor;
    SDL_LockSensors();
    for (sensor = SDL_sensors; sensor; sensor = sensor->next) {
        if (sensor->instance_id == instance_id) {
            break;
        }
    }
    SDL_UnlockSensors();
    return sensor;
}