mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-27 19:59:03 +00:00
Android: Use ALooper_pollOnce instead of ALooper_pollAll
ALooper_pollAll is deprecated and it will be removed in NDK r27
This commit is contained in:
parent
4f05365c4e
commit
71e1f724f6
Notes:
sideshowbarker
2024-07-17 06:35:16 +09:00
Author: https://github.com/Olekoop
Commit: 71e1f724f6
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/454
Reviewed-by: https://github.com/ADKaster ✅
1 changed files with 4 additions and 1 deletions
|
@ -170,7 +170,10 @@ size_t ALooperEventLoopImplementation::pump(Core::EventLoopImplementation::PumpM
|
||||||
auto num_events = Core::ThreadEventQueue::current().process();
|
auto num_events = Core::ThreadEventQueue::current().process();
|
||||||
|
|
||||||
int timeout_ms = mode == Core::EventLoopImplementation::PumpMode::WaitForEvents ? -1 : 0;
|
int timeout_ms = mode == Core::EventLoopImplementation::PumpMode::WaitForEvents ? -1 : 0;
|
||||||
auto ret = ALooper_pollAll(timeout_ms, nullptr, nullptr, nullptr);
|
int ret;
|
||||||
|
do {
|
||||||
|
ret = ALooper_pollOnce(timeout_ms, nullptr, nullptr, nullptr);
|
||||||
|
} while (ret == ALOOPER_POLL_CALLBACK);
|
||||||
|
|
||||||
// We don't expect any non-callback FDs to be ready
|
// We don't expect any non-callback FDs to be ready
|
||||||
VERIFY(ret <= 0);
|
VERIFY(ret <= 0);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue