소스 검색

Use SDL_test + don't use macros

The structure of the existing loop makes the inner loop of the previous commit unnecessary.

Manual backport of 558630d59c2db73ac7c0c0cae000e4bee6ef42cf
Anonymous Maarten 1 년 전
부모
커밋
62f35ab1b6
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      src/sensor/android/SDL_androidsensor.c

+ 1 - 1
src/sensor/android/SDL_androidsensor.c

@@ -161,7 +161,7 @@ static void SDL_ANDROID_SensorUpdate(SDL_Sensor *sensor)
     ASensorEvent event;
     struct android_poll_source *source;
 
-    if (ALooper_pollAll(0, NULL, &events, (void **)&source) == LOOPER_ID_USER) {
+    if (ALooper_pollOnce(0, NULL, &events, (void **)&source) == LOOPER_ID_USER) {
         SDL_zero(event);
         while (ASensorEventQueue_getEvents(sensor->hwdata->eventqueue, &event, 1) > 0) {
             SDL_PrivateSensorUpdate(sensor, 0, event.data, SDL_arraysize(event.data));