mirror of
https://github.com/libsdl-org/SDL.git
synced 2024-11-23 10:53:27 +08:00
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)) {
|
||||
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) {
|
||||
|
Loading…
Reference in New Issue
Block a user