MCPcopy Create free account
hub / github.com/RavEngine/RavEngine / SDL_PrivateSensorValid

Function SDL_PrivateSensorValid

deps/SDL2/src/sensor/SDL_sensor.c:304–317  ·  view source on GitHub ↗

* Checks to make sure the sensor is valid. */

Source from the content-addressed store, hash-verified

302 * Checks to make sure the sensor is valid.
303 */
304static int
305SDL_PrivateSensorValid(SDL_Sensor * sensor)
306{
307 int valid;
308
309 if (sensor == NULL) {
310 SDL_SetError("Sensor hasn't been opened yet");
311 valid = 0;
312 } else {
313 valid = 1;
314 }
315
316 return valid;
317}
318
319/*
320 * Get the friendly name of this sensor

Callers 6

SDL_SensorGetNameFunction · 0.85
SDL_SensorGetTypeFunction · 0.85
SDL_SensorGetInstanceIDFunction · 0.85
SDL_SensorGetDataFunction · 0.85
SDL_SensorCloseFunction · 0.85

Calls 1

SDL_SetErrorFunction · 0.85

Tested by

no test coverage detected