From 22661fd446953d9b779f291006a48645a6833d38 Mon Sep 17 00:00:00 2001 From: Alibek Omarov Date: Thu, 24 Apr 2025 21:40:35 +0300 Subject: [PATCH] public: define XASH_TERMUX if __TERMUX__ is defined. Do not enable XASH_MOBILE_PLATFORM for it --- public/build.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/public/build.h b/public/build.h index 24fd9d5b..11c16085 100644 --- a/public/build.h +++ b/public/build.h @@ -82,6 +82,7 @@ Then you can use another oneliner to query all variables: #undef XASH_RISCV_SOFTFP #undef XASH_SERENITY #undef XASH_SUNOS +#undef XASH_TERMUX #undef XASH_WIN32 #undef XASH_X86 #undef XASH_NSWITCH @@ -105,6 +106,9 @@ Then you can use another oneliner to query all variables: #if defined __linux__ #if defined __ANDROID__ #define XASH_ANDROID 1 + #if defined __TERMUX__ + #define XASH_TERMUX 1 + #endif #endif #define XASH_LINUX 1 #elif defined __FreeBSD__ @@ -143,7 +147,7 @@ Then you can use another oneliner to query all variables: // but we still need XASH_MOBILE_PLATFORM for the engine. // So this macro is defined entirely in build-system: see main wscript // HLSDK/PrimeXT/other SDKs users note: you may ignore this macro -#if XASH_ANDROID || XASH_IOS || XASH_NSWITCH || XASH_PSVITA || XASH_SAILFISH +#if ( XASH_ANDROID && !XASH_TERMUX ) || XASH_IOS || XASH_NSWITCH || XASH_PSVITA || XASH_SAILFISH #define XASH_MOBILE_PLATFORM 1 #endif