Use ALooper_pollOnce() instead of ALooper_pollAll()

The structure of the existing loop makes the inner loop of the previous commit unnecessary.
This commit is contained in:
Sam Lantinga 2024-05-16 07:53:18 -07:00
parent 7843579358
commit 558630d59c

View File

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