Skip to content

Commit 558630d

Browse files
committed
Use ALooper_pollOnce() instead of ALooper_pollAll()
The structure of the existing loop makes the inner loop of the previous commit unnecessary.
1 parent 7843579 commit 558630d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/sensor/android/SDL_androidsensor.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ static int SDLCALL SDL_ANDROID_SensorThread(void *data)
7070
while (SDL_AtomicGet(&ctx->running)) {
7171
Uint64 timestamp = SDL_GetTicksNS();
7272

73-
if (ALooper_pollAll(-1, NULL, &events, (void **)&source) == LOOPER_ID_USER) {
73+
if (ALooper_pollOnce(-1, NULL, &events, (void **)&source) == LOOPER_ID_USER) {
7474
SDL_LockSensors();
7575
for (i = 0; i < SDL_sensors_count; ++i) {
7676
if (!SDL_sensors[i].event_queue) {

0 commit comments

Comments
 (0)