SDL_GetSensors() follows the SDL_GetStringRule

This commit is contained in:
Sam Lantinga 2024-07-18 22:10:29 -07:00
parent 4f8c348402
commit 856d598d6e
6 changed files with 10 additions and 15 deletions

View file

@ -170,7 +170,7 @@ SDL_bool SDL_SensorsOpened(void)
return opened;
}
SDL_SensorID *SDL_GetSensors(int *count)
const SDL_SensorID *SDL_GetSensors(int *count)
{
int i, num_sensors, device_index;
int sensor_index = 0, total_sensors = 0;
@ -207,7 +207,7 @@ SDL_SensorID *SDL_GetSensors(int *count)
}
SDL_UnlockSensors();
return sensors;
return SDL_FreeLater(sensors);
}
/*