Skip to content

Commit

Permalink
Use ALooper_pollOnce instead of ALooper_pollAll
Browse files Browse the repository at this point in the history
pollAll is marked for deletion in AOSP so it won't eventually be
callable in future NDKs. There should be no practical differences
except that we should be free of
android/ndk#2020
  • Loading branch information
svillar committed Oct 29, 2024
1 parent 620a922 commit 8eb9be3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/src/main/cpp/native-lib.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ android_main(android_app *aAppState) {
android_poll_source *pSource;

// Loop until all events are read. If the activity is paused use a blocking call to read events.
while (ALooper_pollAll(computeALooperTimeout(), nullptr, &events, (void **) &pSource) >= 0) {
while (ALooper_pollOnce(computeALooperTimeout(), nullptr, &events, (void **) &pSource) >= 0) {
// Process event.
if (pSource) {
pSource->process(aAppState, pSource);
Expand Down

0 comments on commit 8eb9be3

Please sign in to comment.