Revert changes to SDL_androidsensor.c

This commit is contained in:
Anonymous Maarten
2024-05-16 16:47:25 +02:00
parent 88980aeb21
commit 027856b9fa

View File

@@ -69,10 +69,8 @@ static int SDLCALL SDL_ANDROID_SensorThread(void *data)
while (SDL_AtomicGet(&ctx->running)) { while (SDL_AtomicGet(&ctx->running)) {
Uint64 timestamp = SDL_GetTicksNS(); Uint64 timestamp = SDL_GetTicksNS();
int poll_result;
poll_result = ALooper_pollOnce(-1, NULL, &events, (void **)&source); if (ALooper_pollAll(-1, NULL, &events, (void **)&source) == LOOPER_ID_USER) {
if (poll_result == LOOPER_ID_USER) {
SDL_LockSensors(); SDL_LockSensors();
for (i = 0; i < SDL_sensors_count; ++i) { for (i = 0; i < SDL_sensors_count; ++i) {
if (!SDL_sensors[i].event_queue) { if (!SDL_sensors[i].event_queue) {