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

Function SDL_SensorQuit

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

Source from the content-addressed store, hash-verified

437}
438
439void
440SDL_SensorQuit(void)
441{
442 int i;
443
444 /* Make sure we're not getting called in the middle of updating sensors */
445 SDL_assert(!SDL_updating_sensor);
446
447 SDL_LockSensors();
448
449 /* Stop the event polling */
450 while (SDL_sensors) {
451 SDL_sensors->ref_count = 1;
452 SDL_SensorClose(SDL_sensors);
453 }
454
455 /* Quit the sensor setup */
456 for (i = 0; i < SDL_arraysize(SDL_sensor_drivers); ++i) {
457 SDL_sensor_drivers[i]->Quit();
458 }
459
460 SDL_UnlockSensors();
461
462#if !SDL_EVENTS_DISABLED
463 SDL_QuitSubSystem(SDL_INIT_EVENTS);
464#endif
465
466 if (SDL_sensor_lock) {
467 SDL_DestroyMutex(SDL_sensor_lock);
468 SDL_sensor_lock = NULL;
469 }
470}
471
472
473/* These are global for SDL_syssensor.c and SDL_events.c */

Callers 1

SDL_QuitSubSystemFunction · 0.85

Calls 5

SDL_LockSensorsFunction · 0.85
SDL_SensorCloseFunction · 0.85
SDL_UnlockSensorsFunction · 0.85
SDL_QuitSubSystemFunction · 0.85
SDL_DestroyMutexFunction · 0.50

Tested by

no test coverage detected