More options to the build system, fixed default setting not applied for the 4:3 screen ratio
This commit is contained in:
@@ -690,7 +690,9 @@ echo CompiledLibraries=\"$CompiledLibraries\" >> AndroidAppSettings.cfg
|
||||
echo CustomBuildScript=$CustomBuildScript >> AndroidAppSettings.cfg
|
||||
echo AppCflags=\'$AppCflags\' >> AndroidAppSettings.cfg
|
||||
echo AppLdflags=\'$AppLdflags\' >> AndroidAppSettings.cfg
|
||||
echo AppOverlapsSystemHeaders=$AppOverlapsSystemHeaders >> AndroidAppSettings.cfg
|
||||
echo AppSubdirsBuild=\'$AppSubdirsBuild\' >> AndroidAppSettings.cfg
|
||||
echo AppBuildExclude=\'$AppBuildExclude\' >> AndroidAppSettings.cfg
|
||||
echo AppCmdline=\'$AppCmdline\' >> AndroidAppSettings.cfg
|
||||
echo ReadmeText=\'$ReadmeText\' >> AndroidAppSettings.cfg
|
||||
echo MinimumScreenSize=$MinimumScreenSize >> AndroidAppSettings.cfg
|
||||
@@ -725,9 +727,9 @@ else
|
||||
fi
|
||||
|
||||
if [ "$SdlVideoResizeKeepAspect" = "y" ] ; then
|
||||
SdlVideoResizeKeepAspect=1
|
||||
SdlVideoResizeKeepAspect=true
|
||||
else
|
||||
SdlVideoResizeKeepAspect=0
|
||||
SdlVideoResizeKeepAspect=false
|
||||
fi
|
||||
|
||||
if [ "$InhibitSuspend" = "y" ] ; then
|
||||
@@ -961,6 +963,7 @@ cat project/src/Globals.java | \
|
||||
sed "s/public static boolean CompatibilityHacksStaticInit = .*;/public static boolean CompatibilityHacksStaticInit = $CompatibilityHacksStaticInit;/" | \
|
||||
sed "s/public static boolean CompatibilityHacksTextInputEmulatesHwKeyboard = .*;/public static boolean CompatibilityHacksTextInputEmulatesHwKeyboard = $CompatibilityHacksTextInputEmulatesHwKeyboard;/" | \
|
||||
sed "s/public static boolean HorizontalOrientation = .*;/public static boolean HorizontalOrientation = $HorizontalOrientation;/" | \
|
||||
sed "s^public static boolean KeepAspectRatioDefaultSetting = .*^public static boolean KeepAspectRatioDefaultSetting = $SdlVideoResizeKeepAspect;^" | \
|
||||
sed "s/public static boolean InhibitSuspend = .*;/public static boolean InhibitSuspend = $InhibitSuspend;/" | \
|
||||
sed "s/public static boolean AppUsesMouse = .*;/public static boolean AppUsesMouse = $AppUsesMouse;/" | \
|
||||
sed "s/public static boolean AppNeedsTwoButtonMouse = .*;/public static boolean AppNeedsTwoButtonMouse = $AppNeedsTwoButtonMouse;/" | \
|
||||
@@ -997,12 +1000,13 @@ cat project/jni/SettingsTemplate.mk | \
|
||||
sed "s/SDL_JAVA_PACKAGE_PATH := .*/SDL_JAVA_PACKAGE_PATH := $AppFullNameUnderscored/" | \
|
||||
sed "s^SDL_CURDIR_PATH := .*^SDL_CURDIR_PATH := $DataPath^" | \
|
||||
sed "s^SDL_VIDEO_RENDER_RESIZE := .*^SDL_VIDEO_RENDER_RESIZE := $SdlVideoResize^" | \
|
||||
sed "s^SDL_VIDEO_RENDER_RESIZE_KEEP_ASPECT := .*^SDL_VIDEO_RENDER_RESIZE_KEEP_ASPECT := $SdlVideoResizeKeepAspect^" | \
|
||||
sed "s^COMPILED_LIBRARIES := .*^COMPILED_LIBRARIES := $CompiledLibraries^" | \
|
||||
sed "s^APPLICATION_ADDITIONAL_CFLAGS :=.*^APPLICATION_ADDITIONAL_CFLAGS := $AppCflags^" | \
|
||||
sed "s^APPLICATION_ADDITIONAL_LDFLAGS :=.*^APPLICATION_ADDITIONAL_LDFLAGS := $AppLdflags^" | \
|
||||
sed "s^APPLICATION_OVERLAPS_SYSTEM_HEADERS :=.*^APPLICATION_OVERLAPS_SYSTEM_HEADERS := $AppOverlapsSystemHeaders^" | \
|
||||
sed "s^SDL_ADDITIONAL_CFLAGS :=.*^SDL_ADDITIONAL_CFLAGS := $RedefinedKeycodes $RedefinedKeycodesScreenKb $CompatibilityHacksPreventAudioChopping $CompatibilityHacksAppIgnoresAudioBufferSize^" | \
|
||||
sed "s^APPLICATION_SUBDIRS_BUILD :=.*^APPLICATION_SUBDIRS_BUILD := $AppSubdirsBuild^" | \
|
||||
sed "s^APPLICATION_BUILD_EXCLUDE :=.*^APPLICATION_BUILD_EXCLUDE := $AppBuildExclude^" | \
|
||||
sed "s^APPLICATION_CUSTOM_BUILD_SCRIPT :=.*^APPLICATION_CUSTOM_BUILD_SCRIPT := $CustomBuildScript^" | \
|
||||
sed "s^SDL_VERSION :=.*^SDL_VERSION := $LibSdlVersion^" >> \
|
||||
project/jni/Settings.mk
|
||||
|
||||
@@ -42,6 +42,7 @@ class Globals
|
||||
public static boolean CompatibilityHacksStaticInit = false;
|
||||
public static boolean CompatibilityHacksTextInputEmulatesHwKeyboard = false;
|
||||
public static boolean HorizontalOrientation = true;
|
||||
public static boolean KeepAspectRatioDefaultSetting = false;
|
||||
public static boolean InhibitSuspend = false;
|
||||
public static String ReadmeText = "^You may press \"Home\" now - the data will be downloaded in background".replace("^","\n");
|
||||
public static String CommandLine = "";
|
||||
@@ -96,7 +97,7 @@ class Globals
|
||||
public static int RelativeMouseMovementSpeed = 2;
|
||||
public static int RelativeMouseMovementAccel = 0;
|
||||
public static int ShowScreenUnderFinger = Mouse.ZOOM_NONE;
|
||||
public static boolean KeepAspectRatio = false;
|
||||
public static boolean KeepAspectRatio = KeepAspectRatioDefaultSetting;
|
||||
public static int ClickScreenPressure = 0;
|
||||
public static int ClickScreenTouchspotSize = 0;
|
||||
public static int RemapHwKeycode[] = new int[SDL_Keys.JAVA_KEYCODE_LAST];
|
||||
|
||||
@@ -28,16 +28,18 @@ SDL_TRACKBALL_KEYUP_DELAY := 1
|
||||
# resized in HW-accelerated way, however it eats a tiny bit of CPU
|
||||
SDL_VIDEO_RENDER_RESIZE := 1
|
||||
|
||||
SDL_VIDEO_RENDER_RESIZE_KEEP_ASPECT := 0
|
||||
|
||||
COMPILED_LIBRARIES := tremor ogg
|
||||
|
||||
APPLICATION_ADDITIONAL_CFLAGS := -finline-functions -O2 -DTREMOR=1 -DBUILD_TYPE=LINUX32 -DTARGET_LNX=1 -Werror=strict-aliasing -Werror=cast-align -Werror=pointer-arith -Werror=address
|
||||
|
||||
APPLICATION_ADDITIONAL_LDFLAGS := -ltremor
|
||||
|
||||
APPLICATION_OVERLAPS_SYSTEM_HEADERS := n
|
||||
|
||||
APPLICATION_SUBDIRS_BUILD := src/*
|
||||
|
||||
APPLICATION_BUILD_EXCLUDE :=
|
||||
|
||||
APPLICATION_CUSTOM_BUILD_SCRIPT :=
|
||||
|
||||
SDL_ADDITIONAL_CFLAGS := -DSDL_ANDROID_KEYCODE_MOUSE=UNKNOWN -DSDL_ANDROID_KEYCODE_0=LCTRL -DSDL_ANDROID_KEYCODE_1=LALT -DSDL_ANDROID_KEYCODE_2=SPACE -DSDL_ANDROID_KEYCODE_3=RETURN -DSDL_ANDROID_KEYCODE_4=RETURN
|
||||
|
||||
@@ -18,17 +18,22 @@ LOCAL_SRC_FILES := $(filter %.c %.cpp, $(APP_SUBDIRS))
|
||||
APP_SUBDIRS := $(filter-out %.c %.cpp, $(APP_SUBDIRS))
|
||||
LOCAL_SRC_FILES += $(foreach F, $(APP_SUBDIRS), $(addprefix $(F)/,$(notdir $(wildcard $(LOCAL_PATH)/$(F)/*.cpp))))
|
||||
LOCAL_SRC_FILES += $(foreach F, $(APP_SUBDIRS), $(addprefix $(F)/,$(notdir $(wildcard $(LOCAL_PATH)/$(F)/*.c))))
|
||||
LOCAL_SRC_FILES := $(filter-out $(addprefix $(APPDIR)/, $(APPLICATION_BUILD_EXCLUDE)), $(LOCAL_SRC_FILES))
|
||||
|
||||
# Disabled because they give slight overhead, add "-frtti -fexceptions" to the AppCflags inside AndroidAppSettings.cfg if you need them
|
||||
# If you use setEnvironment.sh you may write "env CXXFLAGS='-frtti -fexceptions' ../setEnvironment.sh ./configure".
|
||||
#LOCAL_CPP_FEATURES := exceptions rtti
|
||||
|
||||
LOCAL_CFLAGS :=
|
||||
LOCAL_C_INCLUDES :=
|
||||
LOCAL_C_INCLUDES := $(foreach D, $(APP_SUBDIRS), $(LOCAL_PATH)/$(D))
|
||||
|
||||
LOCAL_C_INCLUDES += $(foreach D, $(APP_SUBDIRS), $(LOCAL_PATH)/$(D)) \
|
||||
$(LOCAL_PATH)/../sdl-$(SDL_VERSION)/include \
|
||||
$(foreach L, $(COMPILED_LIBRARIES), $(LOCAL_PATH)/../$(L)/include) \
|
||||
ifeq ($(APPLICATION_OVERLAPS_SYSTEM_HEADERS),y)
|
||||
LOCAL_CFLAGS += $(foreach D, $(LOCAL_C_INCLUDES), -iquote$(D))
|
||||
LOCAL_C_INCLUDES :=
|
||||
endif
|
||||
|
||||
LOCAL_C_INCLUDES += $(LOCAL_PATH)/../sdl-$(SDL_VERSION)/include
|
||||
LOCAL_C_INCLUDES += $(foreach L, $(COMPILED_LIBRARIES), $(LOCAL_PATH)/../$(L)/include)
|
||||
|
||||
LOCAL_CFLAGS += $(APPLICATION_ADDITIONAL_CFLAGS)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user