mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-09-08 04:18:14 +00:00
Added a dummy sensor driver
This commit is contained in:
@@ -33,12 +33,12 @@
|
||||
#endif
|
||||
|
||||
static SDL_SensorDriver *SDL_sensor_drivers[] = {
|
||||
#if 0 //defined(__IPHONEOS__) || defined(__TVOS__)
|
||||
&SDL_IOS_SensorDriver,
|
||||
#endif
|
||||
#ifdef SDL_SENSOR_ANDROID
|
||||
&SDL_ANDROID_SensorDriver,
|
||||
#endif
|
||||
#if defined(SDL_SENSOR_DUMMY) || defined(SDL_SENSOR_DISABLED)
|
||||
&SDL_DUMMY_SensorDriver
|
||||
#endif
|
||||
};
|
||||
static SDL_Sensor *SDL_sensors = NULL;
|
||||
static SDL_bool SDL_updating_sensor = SDL_FALSE;
|
||||
@@ -78,11 +78,6 @@ SDL_SensorInit(void)
|
||||
}
|
||||
#endif /* !SDL_EVENTS_DISABLED */
|
||||
|
||||
if (SDL_arraysize(SDL_sensor_drivers) == 0) {
|
||||
/* What should we return here? We'll just return 0 with no sensors for now. */
|
||||
status = 0;
|
||||
}
|
||||
|
||||
status = -1;
|
||||
for (i = 0; i < SDL_arraysize(SDL_sensor_drivers); ++i) {
|
||||
if (SDL_sensor_drivers[i]->Init() >= 0) {
|
||||
|
Reference in New Issue
Block a user