mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-09-30 06:58:30 +00:00
Removed SDL_EVENTS_DISABLED
Events are a core part of the SDL API, and shouldn't be disabled
This commit is contained in:
@@ -24,9 +24,7 @@
|
||||
|
||||
#include "SDL_syssensor.h"
|
||||
|
||||
#ifndef SDL_EVENTS_DISABLED
|
||||
#include "../events/SDL_events_c.h"
|
||||
#endif
|
||||
#include "../joystick/SDL_gamepad_c.h"
|
||||
|
||||
static SDL_SensorDriver *SDL_sensor_drivers[] = {
|
||||
@@ -132,11 +130,9 @@ int SDL_InitSensors(void)
|
||||
SDL_sensor_lock = SDL_CreateMutex();
|
||||
}
|
||||
|
||||
#ifndef SDL_EVENTS_DISABLED
|
||||
if (SDL_InitSubSystem(SDL_INIT_EVENTS) < 0) {
|
||||
return -1;
|
||||
}
|
||||
#endif /* !SDL_EVENTS_DISABLED */
|
||||
|
||||
SDL_LockSensors();
|
||||
|
||||
@@ -553,9 +549,7 @@ void SDL_QuitSensors(void)
|
||||
SDL_sensor_drivers[i]->Quit();
|
||||
}
|
||||
|
||||
#ifndef SDL_EVENTS_DISABLED
|
||||
SDL_QuitSubSystem(SDL_INIT_EVENTS);
|
||||
#endif
|
||||
|
||||
SDL_sensors_initialized = SDL_FALSE;
|
||||
|
||||
@@ -578,7 +572,6 @@ int SDL_SendSensorUpdate(Uint64 timestamp, SDL_Sensor *sensor, Uint64 sensor_tim
|
||||
|
||||
/* Post the event, if desired */
|
||||
posted = 0;
|
||||
#ifndef SDL_EVENTS_DISABLED
|
||||
if (SDL_EventEnabled(SDL_EVENT_SENSOR_UPDATE)) {
|
||||
SDL_Event event;
|
||||
event.type = SDL_EVENT_SENSOR_UPDATE;
|
||||
@@ -590,7 +583,6 @@ int SDL_SendSensorUpdate(Uint64 timestamp, SDL_Sensor *sensor, Uint64 sensor_tim
|
||||
event.sensor.sensor_timestamp = sensor_timestamp;
|
||||
posted = SDL_PushEvent(&event) == 1;
|
||||
}
|
||||
#endif /* !SDL_EVENTS_DISABLED */
|
||||
|
||||
SDL_GamepadSensorWatcher(timestamp, sensor->instance_id, sensor_timestamp, data, num_values);
|
||||
|
||||
|
Reference in New Issue
Block a user