Переглянути джерело

Examples: Android+OpenGL: Using ALooper_pollOnce() instead of ALooper_pollAll(). (#8013)

ocornut 8 місяців тому
батько
коміт
f77d22837c
2 змінених файлів з 4 додано та 2 видалено
  1. 3 1
      docs/CHANGELOG.txt
  2. 1 1
      examples/example_android_opengl3/main.cpp

+ 3 - 1
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)

+ 1 - 1
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)