From 5aca143eba6124fb219a72b6adbbb79efc9bd3c1 Mon Sep 17 00:00:00 2001 From: Alibek Omarov Date: Thu, 24 Apr 2025 21:46:43 +0300 Subject: [PATCH] engine: disable Android-specific library loader under Termux --- common/defaults.h | 2 +- engine/platform/android/lib_android.h | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/common/defaults.h b/common/defaults.h index 3267a950..8a35419f 100644 --- a/common/defaults.h +++ b/common/defaults.h @@ -158,7 +158,7 @@ Default build-depended cvar and constant values #define DEFAULT_M_IGNORE "1" #endif // !XASH_MOBILE_PLATFORM && !XASH_NSWITCH -#if XASH_ANDROID || XASH_IOS || XASH_EMSCRIPTEN +#if (XASH_ANDROID && !XASH_TERMUX) || XASH_IOS || XASH_EMSCRIPTEN // this means that libraries are provided with engine, but not in game data // You need add library loading code to library.c when adding new platform #define XASH_INTERNAL_GAMELIBS diff --git a/engine/platform/android/lib_android.h b/engine/platform/android/lib_android.h index 5bead1f3..ad2c6f8e 100644 --- a/engine/platform/android/lib_android.h +++ b/engine/platform/android/lib_android.h @@ -17,7 +17,10 @@ GNU General Public License for more details. #ifndef ANDROID_LIB_H #define ANDROID_LIB_H +#if !XASH_TERMUX #define Platform_POSIX_LoadLibrary( x ) ANDROID_LoadLibrary(( x )) +#endif // !XASH_TERMUX + #define Platform_POSIX_GetProcAddress( x, y ) ANDROID_GetProcAddress(( x ), ( y )) void *ANDROID_LoadLibrary( const char *dllname );