소스 검색

Actually make the sensors magical!

Sam Lantinga 2 년 전
부모
커밋
d9f09e77f2
1개의 변경된 파일1개의 추가작업 그리고 0개의 파일을 삭제
  1. 1 0
      src/sensor/SDL_sensor.c

+ 1 - 0
src/sensor/SDL_sensor.c

@@ -344,6 +344,7 @@ SDL_Sensor *SDL_OpenSensor(SDL_SensorID instance_id)
         SDL_UnlockSensors();
         SDL_UnlockSensors();
         return NULL;
         return NULL;
     }
     }
+    sensor->magic = &SDL_sensor_magic;
     sensor->driver = driver;
     sensor->driver = driver;
     sensor->instance_id = instance_id;
     sensor->instance_id = instance_id;
     sensor->type = driver->GetDeviceType(device_index);
     sensor->type = driver->GetDeviceType(device_index);