Actually make the sensors magical!

main
Sam Lantinga 2023-08-08 22:34:24 -07:00
parent 690eae7d22
commit d9f09e77f2
1 changed files with 1 additions and 0 deletions

View File

@ -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);