mirror of
https://github.com/Lime3DS/Lime3DS.git
synced 2024-11-01 07:55:07 +01:00
ndk_motion.cpp: Use ALooper_pollOnce instead of ALooper_pollAll
ALooper_pollAll is deprecated in Android NDK 27.
This commit is contained in:
parent
e6636469d8
commit
953919a62c
@ -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) {
|
||||||
|
Loading…
Reference in New Issue
Block a user