Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,17 @@ else {

android {
namespace 'org.tuxpaint'
compileSdkVersion 34
compileSdkVersion 35
defaultConfig {
minSdkVersion 21
targetSdkVersion 34
targetSdkVersion 35
externalNativeBuild {
ndkBuild {
arguments "APP_PLATFORM=android-21"
arguments "NDK_DEBUG=0"
abiFilters 'arm64-v8a'
// Add 16KB page size alignment support - use ldFlags instead of cFlags
arguments "APP_LDFLAGS+=-Wl,-z,max-page-size=16384"
}
}
}
Expand Down
7 changes: 5 additions & 2 deletions app/src/main/jni/Application.mk
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
APP_ABI := arm64-v8a
APP_PLATFORM := android-16
APP_CFLAGS += -Wno-error=format-security
APP_CFLAGS += -Wno-error=format-security -Wno-error=cast-function-type-strict -Wno-error
APP_STL := c++_shared
APP_CPPFLAGS += -fexceptions
APP_CPPFLAGS += -fexceptions -Wno-error=cast-function-type-strict -Wno-error
APP_CXXFLAGS += -Wno-error=cast-function-type-strict -Wno-error
APP_ALLOW_MISSING_DEPS := true
# Add 16KB page size alignment support for Google Play Store 2025 requirements
APP_LDFLAGS += -Wl,-z,max-page-size=16384

Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ static void SDL_ANDROID_SensorUpdate(SDL_Sensor *sensor)
ASensorEvent event;
struct android_poll_source *source;

if (ALooper_pollAll(0, NULL, &events, (void **)&source) == LOOPER_ID_USER) {
if (ALooper_pollOnce(0, NULL, &events, (void **)&source) == LOOPER_ID_USER) {
SDL_zero(event);
while (ASensorEventQueue_getEvents(sensor->hwdata->eventqueue, &event, 1) > 0) {
SDL_PrivateSensorUpdate(sensor, 0, event.data, SDL_arraysize(event.data));
Expand Down
4 changes: 3 additions & 1 deletion app/src/main/jni/SDL2_ttf/external/harfbuzz/Android.mk
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,9 @@ LOCAL_C_INCLUDES = \
LOCAL_STATIC_LIBRARIES += freetype

#LOCAL_CFLAGS += -DHB_NO_MT -DHAVE_OT -DHAVE_UCDN -fPIC
LOCAL_CFLAGS += -DHAVE_CONFIG_H -fPIC
LOCAL_CFLAGS += -DHAVE_CONFIG_H -fPIC -Wno-cast-function-type-strict -Wno-error -Wno-cast-function-type -w
LOCAL_CXXFLAGS += -Wno-cast-function-type-strict -Wno-error -Wno-cast-function-type -Wno-cast-function-type-strict -w
LOCAL_CPPFLAGS += -Wno-cast-function-type-strict -Wno-error -Wno-cast-function-type -w

LOCAL_EXPORT_C_INCLUDES = $(LOCAL_PATH)/src/

Expand Down
1 change: 1 addition & 0 deletions app/src/main/jni/cairo-1.14.0/Android.mk
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ LOCAL_CFLAGS := \
-D_REENTRANT \
-DCAIRO_NO_MUTEX=1 \
-Wno-attributes \
-Wno-error=int-conversion \
$(NULL)

LOCAL_C_INCLUDES := \
Expand Down
4 changes: 3 additions & 1 deletion app/src/main/jni/glib-2.77.0/Android.mk
Original file line number Diff line number Diff line change
Expand Up @@ -477,7 +477,9 @@ LOCAL_CFLAGS := \
-DGIO_COMPILATION \
-DGIO_MODULE_DIR=\"/mnt/sdcard/Android/data/org.tuxpaint/files/glib\" \
-DXDG_PREFIX=_gio_xdg \
-marm \
-UHAVE_STRERROR_R \
-USTRERROR_R_CHAR_P \
-Wno-error=int-conversion \
$(NULL)

LOCAL_SHARED_LIBRARIES := \
Expand Down
14 changes: 14 additions & 0 deletions app/src/main/jni/tuxpaint/Android.mk
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,13 @@ MY_DEFS := \
-DHAVE_STRCASESTR \
$(MY_NOSOUNDFLAG) $(MY_NOSVGFLAG) $(MY_NOPANGOFLAG)

LOCAL_C_INCLUDES := \
$(LOCAL_PATH)/../SDL2/src/events \
$(LOCAL_PATH)/../libimagequant \
$(LOCAL_PATH)/src/mouse \
$(LOCAL_PATH)/../fribidi-1.0.13 \
$(NULL)

LOCAL_CFLAGS := \
$(MY_CFLAGS) \
$(MY_DEFS)
Expand All @@ -86,6 +93,11 @@ LOCAL_LDLIBS := \
-lz -llog -lGLESv1_CM -lGLESv2 -landroid \
$(NULL)

# Add 16KB page size alignment support for Google Play Store 2025 requirements
LOCAL_LDFLAGS := \
-Wl,-z,max-page-size=16384 \
$(NULL)

LOCAL_SHARED_LIBRARIES := SDL2 SDL2_image SDL2_mixer SDL2_ttf SDL2_Pango tuxpaint_intl tuxpaint_fribidi tuxpaint_png tuxpaint_rsvg tuxpaint_cairo tp_android_assets_fopen libimagequant SDL2_gfx tuxpaint_pango tuxpaint_fontconfig tuxpaint_glib tuxpaint_xml2

include $(BUILD_SHARED_LIBRARY)
Expand All @@ -98,6 +110,8 @@ $(foreach _magic, $(MAGIC_NAMES),\
$(eval LOCAL_MODULE := $(_magic))\
$(eval LOCAL_C_INCLUDES := $(LOCAL_PATH)/src $(LOCAL_PATH)/../SDL2_gfx-1.0.4/)\
$(eval MAGIC_CFLAGS:=-g3 -O2 -fno-common -W -Wstrict-prototypes -Wmissing-prototypes -Wall)\
$(eval LOCAL_CFLAGS := $(MAGIC_CFLAGS))\
$(eval LOCAL_LDFLAGS := -Wl,-z,max-page-size=16384)\
$(eval LOCAL_SRC_FILES := magic/src/$(_magic).c)\
$(eval LOCAL_SHARED_LIBRARIES := SDL2 SDL2_image SDL2_mixer SDL2_ttf tuxpaint_intl SDL2_gfx)\
$(eval include $(BUILD_SHARED_LIBRARY))\
Expand Down
2 changes: 2 additions & 0 deletions app/src/main/jni/tuxpaint/src/i18n.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@
#include <string.h>
#include <libintl.h>
#include <locale.h>
#include "SDL2/SDL.h"
#include "../../../SDL2/src/core/android/SDL_android.h"
#include "platform.h"
#include "i18n.h"
#include "debug.h"
Expand Down
5 changes: 3 additions & 2 deletions app/src/main/jni/tuxpaint/src/tuxpaint.c
Original file line number Diff line number Diff line change
Expand Up @@ -409,6 +409,7 @@ int iswprint(wchar_t wc)
#include <sys/stat.h>

#include "SDL2/SDL.h"
#include "SDL_mouse_c.h"
#include "SDL2/SDL_thread.h"

#if defined(__MACOS__)
Expand Down Expand Up @@ -31871,15 +31872,15 @@ static void convert_motion_to_wheel(SDL_Event event)
{
while (motion_dy - high > 0)
{
SDL_SendMouseWheel(NULL, event.motion.which, 0, 1);
SDL_SendMouseWheel(NULL, event.motion.which, 0.0f, 1.0f, SDL_MOUSEWHEEL_NORMAL);
motion_dy -= high;
}
}
else
{
while (motion_dy + high < 0)
{
SDL_SendMouseWheel(NULL, event.motion.which, 0, -1);
SDL_SendMouseWheel(NULL, event.motion.which, 0.0f, -1.0f, SDL_MOUSEWHEEL_NORMAL);
motion_dy += high;
}
}
Expand Down
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ buildscript {
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:8.2.1'
classpath 'com.android.tools.build:gradle:8.7.3'

// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
Expand Down
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#Mon Nov 13 22:58:21 EST 2023
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.2-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.9-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists