ndk_motion.cpp: Use ALooper_pollOnce instead of ALooper_pollAll

ALooper_pollAll is deprecated in Android NDK 27.
This commit is contained in:
Reg Tiangha 2024-09-07 14:18:49 -06:00 committed by OpenSauce04
parent e6636469d8
commit 953919a62c

View file

@ -82,7 +82,7 @@ class NDKMotion final : public Input::MotionDevice {
} }
void Update() const { void Update() const {
ALooper_pollAll(0, nullptr, nullptr, nullptr); ALooper_pollOnce(0, nullptr, nullptr, nullptr);
ASensorEvent event{}; ASensorEvent event{};
std::optional<Vec3<float>> new_accel{}, new_rot{}; std::optional<Vec3<float>> new_accel{}, new_rot{};
while (ASensorEventQueue_getEvents(event_queue, &event, 1) > 0) { while (ASensorEventQueue_getEvents(event_queue, &event, 1) > 0) {