From 88980aeb215f574c4c19bcaa2dca0785c8171c43 Mon Sep 17 00:00:00 2001 From: Anonymous Maarten Date: Thu, 16 May 2024 16:43:53 +0200 Subject: [PATCH] android+test: testcamera needs CAMERA permissions --- src/sensor/android/SDL_androidsensor.c | 4 +++- test/android/cmake/AndroidManifest.xml.cmake | 4 ++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/sensor/android/SDL_androidsensor.c b/src/sensor/android/SDL_androidsensor.c index eb46dd5e0..7720ccc25 100644 --- a/src/sensor/android/SDL_androidsensor.c +++ b/src/sensor/android/SDL_androidsensor.c @@ -69,8 +69,10 @@ static int SDLCALL SDL_ANDROID_SensorThread(void *data) while (SDL_AtomicGet(&ctx->running)) { Uint64 timestamp = SDL_GetTicksNS(); + int poll_result; - if (ALooper_pollAll(-1, NULL, &events, (void **)&source) == LOOPER_ID_USER) { + poll_result = ALooper_pollOnce(-1, NULL, &events, (void **)&source); + if (poll_result == LOOPER_ID_USER) { SDL_LockSensors(); for (i = 0; i < SDL_sensors_count; ++i) { if (!SDL_sensors[i].event_queue) { diff --git a/test/android/cmake/AndroidManifest.xml.cmake b/test/android/cmake/AndroidManifest.xml.cmake index ae2ead0c2..a9fc3d568 100644 --- a/test/android/cmake/AndroidManifest.xml.cmake +++ b/test/android/cmake/AndroidManifest.xml.cmake @@ -33,6 +33,10 @@ + + + +