mirror of https://github.com/libsdl-org/SDL
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:
parent
7843579358
commit
558630d59c
|
@ -70,7 +70,7 @@ 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();
|
||||||
|
|
||||||
if (ALooper_pollAll(-1, NULL, &events, (void **)&source) == LOOPER_ID_USER) {
|
if (ALooper_pollOnce(-1, NULL, &events, (void **)&source) == 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) {
|
||||||
|
|
Loading…
Reference in New Issue