From a56d4b63d840d4ffcba5f172cd4daa66a97fdb1d Mon Sep 17 00:00:00 2001 From: cnlohr Date: Mon, 6 May 2024 14:25:55 -0700 Subject: [PATCH] Fix build for Android 34 / NDK 27 (Beta) and up. --- CNFGEGLDriver.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/CNFGEGLDriver.c b/CNFGEGLDriver.c index 047efce..7924a6a 100644 --- a/CNFGEGLDriver.c +++ b/CNFGEGLDriver.c @@ -199,7 +199,7 @@ int CNFGSetup( const char * WindowName, int w, int h ) while( !OGLESStarted ) { struct android_poll_source* source; - if (ALooper_pollAll( 0, 0, &events, (void**)&source) >= 0) + if (ALooper_pollOnce( 0, 0, &events, (void**)&source) >= 0) { if (source != NULL) source->process(gapp, source); } @@ -433,7 +433,7 @@ int CNFGHandleInput() #ifdef ANDROID int events; struct android_poll_source* source; - while( ALooper_pollAll( 0, 0, &events, (void**)&source) >= 0 ) + while( ALooper_pollOnce( 0, 0, &events, (void**)&source) >= 0 ) { if (source != NULL) { @@ -473,8 +473,8 @@ void handle_cmd(struct android_app* app, int32_t cmd) { case APP_CMD_DESTROY: //This gets called initially after back. - if( !HandleDestroy() ) - ANativeActivity_finish( gapp->activity ); + HandleDestroy(); + ANativeActivity_finish( gapp->activity ); break; case APP_CMD_INIT_WINDOW: //When returning from a back button suspension, this isn't called.