mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-09-06 03:18:13 +00:00
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 558630d59c
This commit is contained in:
@@ -161,7 +161,7 @@ static void SDL_ANDROID_SensorUpdate(SDL_Sensor *sensor)
|
|||||||
ASensorEvent event;
|
ASensorEvent event;
|
||||||
struct android_poll_source *source;
|
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);
|
SDL_zero(event);
|
||||||
while (ASensorEventQueue_getEvents(sensor->hwdata->eventqueue, &event, 1) > 0) {
|
while (ASensorEventQueue_getEvents(sensor->hwdata->eventqueue, &event, 1) > 0) {
|
||||||
SDL_PrivateSensorUpdate(sensor, 0, event.data, SDL_arraysize(event.data));
|
SDL_PrivateSensorUpdate(sensor, 0, event.data, SDL_arraysize(event.data));
|
||||||
|
Reference in New Issue
Block a user