From a51f47a108382a5bd03055d1813255d943adb48c Mon Sep 17 00:00:00 2001 From: mschiller890 Date: Fri, 20 Mar 2026 12:57:55 +0100 Subject: [PATCH] FIXED: Android 32bit build issues, expanded supported SDKs --- project/android/AndroidManifest.xml | 4 ++-- project/android/jni/Application.mk | 2 +- project/android_java/AndroidManifest.xml | 4 ++-- project/android_java/jni/Application.mk | 2 +- src/AppPlatform_android.h | 4 +++- src/client/OptionsFile.cpp | 1 + src/client/player/LocalPlayer.cpp | 1 + src/main_android_java.cpp | 5 ++--- 8 files changed, 13 insertions(+), 10 deletions(-) diff --git a/project/android/AndroidManifest.xml b/project/android/AndroidManifest.xml index 0dfca86..7b97a02 100755 --- a/project/android/AndroidManifest.xml +++ b/project/android/AndroidManifest.xml @@ -6,8 +6,8 @@ android:installLocation="preferExternal"> - + diff --git a/project/android/jni/Application.mk b/project/android/jni/Application.mk index 2ea6b29..b3d73ad 100755 --- a/project/android/jni/Application.mk +++ b/project/android/jni/Application.mk @@ -1,4 +1,4 @@ -APP_PLATFORM := android-21 +APP_PLATFORM := android-19 APP_STL := gnustl_static APP_OPTIM := release APP_ABI := arm64-v8a diff --git a/project/android_java/AndroidManifest.xml b/project/android_java/AndroidManifest.xml index 7127054..3859e3c 100755 --- a/project/android_java/AndroidManifest.xml +++ b/project/android_java/AndroidManifest.xml @@ -5,8 +5,8 @@ android:versionName="0.6.1-alpha-0.0.3"> + android:minSdkVersion="19" + android:targetSdkVersion="36"/> CallIntMethod(instance, fHeight); LOGI("initConsts: screenHeight=%d, done\n", _screenHeight); + + return 1; } void tick() { @@ -536,7 +538,7 @@ public: static __inline bool isSquare(int n) { int L = n & 0xf; - if ((1 << L) & 0x213 == 0) return false; + if (((1 << L) & 0x213) == 0) return false; int t = (int) sqrt((double) n) + 0.5; return t*t == n; diff --git a/src/client/OptionsFile.cpp b/src/client/OptionsFile.cpp index a227471..3bd9a4a 100755 --- a/src/client/OptionsFile.cpp +++ b/src/client/OptionsFile.cpp @@ -1,6 +1,7 @@ #include "OptionsFile.h" #include #include +#include #include OptionsFile::OptionsFile() { diff --git a/src/client/player/LocalPlayer.cpp b/src/client/player/LocalPlayer.cpp index 5c7f65e..a325a37 100755 --- a/src/client/player/LocalPlayer.cpp +++ b/src/client/player/LocalPlayer.cpp @@ -30,6 +30,7 @@ #else #include #include +#include #endif #ifndef STANDALONE_SERVER diff --git a/src/main_android_java.cpp b/src/main_android_java.cpp index 28ed165..e6d91df 100755 --- a/src/main_android_java.cpp +++ b/src/main_android_java.cpp @@ -7,8 +7,7 @@ //#include "main_android_java.h" #include "platform/input/Multitouch.h" #include -#include -#define gettid() ((int)syscall(SYS_gettid)) +#include // Horrible, I know. / A #ifndef MAIN_CLASS @@ -145,7 +144,7 @@ Java_com_mojang_minecraftpe_GLRenderer_nativeOnSurfaceCreated(JNIEnv* env) { JNIEXPORT void JNICALL Java_com_mojang_minecraftpe_GLRenderer_nativeOnSurfaceChanged(JNIEnv* env, jclass cls, jint w, jint h) { - LOGI("@nativeOnSurfaceChanged: %p\n", pthread_self()); + LOGI("@nativeOnSurfaceChanged: %lu\n", (unsigned long)pthread_self()); if (gApp) { gApp->setSize(w, h);