From f77d22837c0d2e8d0582cd1e8f077a88fa6ebd9b Mon Sep 17 00:00:00 2001 From: ocornut Date: Mon, 4 Nov 2024 14:24:54 +0100 Subject: [PATCH] Examples: Android+OpenGL: Using ALooper_pollOnce() instead of ALooper_pollAll(). (#8013) --- docs/CHANGELOG.txt | 4 +++- examples/example_android_opengl3/main.cpp | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/docs/CHANGELOG.txt b/docs/CHANGELOG.txt index 026448b76..02297a64b 100644 --- a/docs/CHANGELOG.txt +++ b/docs/CHANGELOG.txt @@ -60,7 +60,9 @@ Other changes: actual include. (#8095, #7967, #3190) [@sev-] - Backends: SDL2, SDL3: SDL_EVENT_MOUSE_WHEEL event doesn't require dividing by 100.0f on Emscripten target. (#4019, #6096, #1463) -- Examples: Added SDL3+Vulkan example. (#8084, #8085) +- Examples: SDL3+Vulkan: Added example. (#8084, #8085) +- Examples: Android+OpenGL: Using ALooper_pollOnce() instead of ALooper_pollAll() + which has been deprecated. (#8013) [@feather179] ----------------------------------------------------------------------- VERSION 1.91.4 (Released 2024-10-18) diff --git a/examples/example_android_opengl3/main.cpp b/examples/example_android_opengl3/main.cpp index e0ad5f936..42aa622f7 100644 --- a/examples/example_android_opengl3/main.cpp +++ b/examples/example_android_opengl3/main.cpp @@ -68,7 +68,7 @@ void android_main(struct android_app* app) struct android_poll_source* out_data; // Poll all events. If the app is not visible, this loop blocks until g_Initialized == true. - while (ALooper_pollAll(g_Initialized ? 0 : -1, nullptr, &out_events, (void**)&out_data) >= 0) + while (ALooper_pollOnce(g_Initialized ? 0 : -1, nullptr, &out_events, (void**)&out_data) >= 0) { // Process one event if (out_data != nullptr)