From 412ab7e1aabca47bcdcd6f323db5d18edc864d3c Mon Sep 17 00:00:00 2001 From: Sylvain Becker Date: Fri, 18 Oct 2019 14:23:37 +0200 Subject: [PATCH] Fixed bug 4829 - Sensor events incorrectly disabled --- src/sensor/SDL_sensor.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sensor/SDL_sensor.c b/src/sensor/SDL_sensor.c index 35bac950a..9caaf6f6f 100644 --- a/src/sensor/SDL_sensor.c +++ b/src/sensor/SDL_sensor.c @@ -486,7 +486,7 @@ SDL_PrivateSensorUpdate(SDL_Sensor *sensor, float *data, int num_values) /* Post the event, if desired */ posted = 0; #if !SDL_EVENTS_DISABLED - if (SDL_GetEventState(SDL_JOYAXISMOTION) == SDL_ENABLE) { + if (SDL_GetEventState(SDL_SENSORUPDATE) == SDL_ENABLE) { SDL_Event event; event.type = SDL_SENSORUPDATE; event.sensor.which = sensor->instance_id;