From 409fbc5d1424d9cf909a278f4cfa69b025a75d4f Mon Sep 17 00:00:00 2001 From: Sandy <1013356+bwrsandman@users.noreply.github.com> Date: Fri, 2 Aug 2024 18:38:56 -0400 Subject: [PATCH] Replace ALooper_pollAll with ALooper_pollOnce (#3334) --- examples/common/entry/entry_android.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/examples/common/entry/entry_android.cpp b/examples/common/entry/entry_android.cpp index 58c54340ac..d9549460ea 100644 --- a/examples/common/entry/entry_android.cpp +++ b/examples/common/entry/entry_android.cpp @@ -189,9 +189,10 @@ namespace entry while (0 == m_app->destroyRequested) { - int32_t num; android_poll_source* source; - /*int32_t id =*/ ALooper_pollAll(-1, NULL, &num, (void**)&source); + int32_t result = ALooper_pollOnce(-1, NULL, NULL, reinterpret_cast(&source)); + + BX_ASSERT(ALOOPER_POLL_ERROR != result, "ALooper_pollOnce returned an error."); if (NULL != source) {