FIXED: Android 32bit build issues, expanded supported SDKs

This commit is contained in:
mschiller890
2026-03-20 12:57:55 +01:00
parent 017d908c54
commit a51f47a108
8 changed files with 13 additions and 10 deletions

View File

@@ -6,8 +6,8 @@
android:installLocation="preferExternal"> android:installLocation="preferExternal">
<!-- This is the platform API where NativeActivity was introduced. --> <!-- This is the platform API where NativeActivity was introduced. -->
<uses-sdk android:minSdkVersion="24" <uses-sdk android:minSdkVersion="19"
android:targetSdkVersion="24" /> android:targetSdkVersion="36" />
<!-- uses-feature android:name="android.hardware.touchscreen.multitouch" android:required="true"/ --> <!-- uses-feature android:name="android.hardware.touchscreen.multitouch" android:required="true"/ -->

View File

@@ -1,4 +1,4 @@
APP_PLATFORM := android-21 APP_PLATFORM := android-19
APP_STL := gnustl_static APP_STL := gnustl_static
APP_OPTIM := release APP_OPTIM := release
APP_ABI := arm64-v8a APP_ABI := arm64-v8a

View File

@@ -5,8 +5,8 @@
android:versionName="0.6.1-alpha-0.0.3"> android:versionName="0.6.1-alpha-0.0.3">
<uses-sdk <uses-sdk
android:minSdkVersion="24" android:minSdkVersion="19"
android:targetSdkVersion="28"/> android:targetSdkVersion="36"/>
<uses-feature <uses-feature
android:name="android.hardware.touchscreen.multitouch" android:name="android.hardware.touchscreen.multitouch"

View File

@@ -1,4 +1,4 @@
APP_PLATFORM := android-9 APP_PLATFORM := android-19
APP_STL := gnustl_static APP_STL := gnustl_static
APP_OPTIM := release APP_OPTIM := release
APP_ABI := armeabi-v7a APP_ABI := armeabi-v7a

View File

@@ -202,6 +202,8 @@ public:
LOGI("initConsts: screenWidth=%d, calling getScreenHeight\n", _screenWidth); LOGI("initConsts: screenWidth=%d, calling getScreenHeight\n", _screenWidth);
_screenHeight = env->CallIntMethod(instance, fHeight); _screenHeight = env->CallIntMethod(instance, fHeight);
LOGI("initConsts: screenHeight=%d, done\n", _screenHeight); LOGI("initConsts: screenHeight=%d, done\n", _screenHeight);
return 1;
} }
void tick() { void tick() {
@@ -536,7 +538,7 @@ public:
static __inline bool isSquare(int n) { static __inline bool isSquare(int n) {
int L = n & 0xf; 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; int t = (int) sqrt((double) n) + 0.5;
return t*t == n; return t*t == n;

View File

@@ -1,6 +1,7 @@
#include "OptionsFile.h" #include "OptionsFile.h"
#include <stdio.h> #include <stdio.h>
#include <string.h> #include <string.h>
#include <errno.h>
#include <platform/log.h> #include <platform/log.h>
OptionsFile::OptionsFile() { OptionsFile::OptionsFile() {

View File

@@ -30,6 +30,7 @@
#else #else
#include <sys/stat.h> #include <sys/stat.h>
#include <sys/types.h> #include <sys/types.h>
#include <errno.h>
#endif #endif
#ifndef STANDALONE_SERVER #ifndef STANDALONE_SERVER

View File

@@ -7,8 +7,7 @@
//#include "main_android_java.h" //#include "main_android_java.h"
#include "platform/input/Multitouch.h" #include "platform/input/Multitouch.h"
#include <unistd.h> #include <unistd.h>
#include <sys/syscall.h> #include <pthread.h>
#define gettid() ((int)syscall(SYS_gettid))
// Horrible, I know. / A // Horrible, I know. / A
#ifndef MAIN_CLASS #ifndef MAIN_CLASS
@@ -145,7 +144,7 @@ Java_com_mojang_minecraftpe_GLRenderer_nativeOnSurfaceCreated(JNIEnv* env) {
JNIEXPORT void JNICALL JNIEXPORT void JNICALL
Java_com_mojang_minecraftpe_GLRenderer_nativeOnSurfaceChanged(JNIEnv* env, jclass cls, jint w, jint h) { 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) { if (gApp) {
gApp->setSize(w, h); gApp->setSize(w, h);