Merge branch 'sdl_android' of github.com:pelya/commandergenius into sdl_android
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
install_apk=false
|
||||
run_apk=false
|
||||
sign_apk=false
|
||||
build_release=false
|
||||
build_release=true
|
||||
|
||||
if [ "$#" -gt 0 -a "$1" = "-s" ]; then
|
||||
shift
|
||||
@@ -27,12 +27,19 @@ if [ "$#" -gt 0 -a "$1" = "release" ]; then
|
||||
build_release=true
|
||||
fi
|
||||
|
||||
if [ "$#" -gt 0 -a "$1" = "debug" ]; then
|
||||
shift
|
||||
build_release=false
|
||||
fi
|
||||
|
||||
if [ "$#" -gt 0 -a "$1" = "-h" ]; then
|
||||
echo "Usage: $0 [-s] [-i] [-r] [release]"
|
||||
echo " -s: sign APK file after building"
|
||||
echo " -i: install APK file to device after building"
|
||||
echo " -r: run APK file on device after building"
|
||||
echo " release: build release package instead of debug"
|
||||
echo " debug: build debug package"
|
||||
echo " release: build release package (default)"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
[ -e project/local.properties ] || {
|
||||
|
||||
@@ -25,23 +25,6 @@ echo "===== libSDL on Android configuration ====="
|
||||
echo
|
||||
echo "If you will supply empty string as answer the previous value will be used"
|
||||
|
||||
if [ -z "$Debuggable" -o -z "$AUTO" ]; then
|
||||
echo
|
||||
echo -n "Debuggable Build? (y) or (n): ($Debuggable): "
|
||||
read var
|
||||
if [ -n "$var" ] ; then
|
||||
|
||||
if [ "$var" = "y" ] ; then
|
||||
Debuggable="true"
|
||||
else
|
||||
Debuggable="false"
|
||||
fi
|
||||
|
||||
CHANGED=1
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
if [ -z "$LibSdlVersion" -o -z "$AUTO" ]; then
|
||||
echo
|
||||
echo -n "libSDL version to use (1.2, 1.3, or 2.0) ($LibSdlVersion): "
|
||||
@@ -783,9 +766,6 @@ echo "# The application settings for Android libSDL port" >> AndroidAppSettings.
|
||||
echo >> AndroidAppSettings.cfg
|
||||
echo AppSettingVersion=$CHANGE_APP_SETTINGS_VERSION >> AndroidAppSettings.cfg
|
||||
echo >> AndroidAppSettings.cfg
|
||||
echo "# Debuggable Build? (y) or (n):" >> AndroidAppSettings.cfg
|
||||
echo Debuggable=$Debuggable >> AndroidAppSettings.cfg
|
||||
echo >> AndroidAppSettings.cfg
|
||||
echo "# libSDL version to use (1.2 or 1.3, specify 1.3 for SDL2)" >> AndroidAppSettings.cfg
|
||||
echo LibSdlVersion=$LibSdlVersion >> AndroidAppSettings.cfg
|
||||
echo >> AndroidAppSettings.cfg
|
||||
@@ -1312,7 +1292,6 @@ echo Patching project/AndroidManifest.xml
|
||||
cat project/AndroidManifestTemplate.xml | \
|
||||
sed "s/package=.*/package=\"$AppFullName\"/" | \
|
||||
sed "s/android:screenOrientation=.*/android:screenOrientation=\"$ScreenOrientation1\"/" | \
|
||||
sed "s/android:debuggable=.*/android:debuggable=\"$Debuggable\"/" | \
|
||||
sed "s^android:versionCode=.*^android:versionCode=\"$AppVersionCode\"^" | \
|
||||
sed "s^android:versionName=.*^android:versionName=\"$AppVersionName\"^" > \
|
||||
project/AndroidManifest.xml
|
||||
|
||||
@@ -47,7 +47,7 @@ SwVideoMode=y
|
||||
SdlVideoResize=y
|
||||
|
||||
# Application resizing will keep 4:3 aspect ratio, with black bars at sides (y)/(n)
|
||||
SdlVideoResizeKeepAspect=n
|
||||
SdlVideoResizeKeepAspect=y
|
||||
|
||||
CompatibilityHacksProperUsageOfSDL_UpdateRects=y
|
||||
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
----------------------------------------------------------*/
|
||||
|
||||
#define SCREEN_W 640
|
||||
#define SCREEN_H 480
|
||||
#define SCREEN_H 256
|
||||
|
||||
|
||||
#define BALLS 300
|
||||
|
||||
Submodule project/jni/application/openarena/engine updated: 07c011b6cc...30e98be358
Submodule project/jni/application/openarena/vm updated: 4b83db91ab...278f045202
Submodule project/jni/application/teeworlds/src updated: 34b64249c4...e5489c8c08
@@ -170,10 +170,10 @@ MultiABI=y
|
||||
AppMinimumRAM=0
|
||||
|
||||
# Application version code (integer)
|
||||
AppVersionCode=07003
|
||||
AppVersionCode=07004
|
||||
|
||||
# Application user-visible version name (string)
|
||||
AppVersionName="0.7.0.03"
|
||||
AppVersionName="0.7.0.04"
|
||||
|
||||
# Reset SDL config when updating application to the new version (y) / (n)
|
||||
ResetSdlConfigForThisVersion=n
|
||||
|
||||
+1516
-1515
File diff suppressed because it is too large
Load Diff
Submodule project/jni/application/xserver/xserver updated: 0669077a6d...fe78614169
@@ -390,7 +390,14 @@ SDL_Surface *ANDROID_SetVideoMode(_THIS, SDL_Surface *current,
|
||||
SDL_ANDROID_ForceClearScreenRectAmount = 0;
|
||||
if( SDL_ANDROID_ScreenKeep43Ratio )
|
||||
{
|
||||
SDL_ANDROID_sWindowWidth = (SDL_ANDROID_sFakeWindowWidth * SDL_ANDROID_sRealWindowHeight) / SDL_ANDROID_sFakeWindowHeight;
|
||||
if( (float)width / (float)height < (float)SDL_ANDROID_sWindowWidth / (float)SDL_ANDROID_sWindowHeight )
|
||||
SDL_ANDROID_sWindowWidth = (SDL_ANDROID_sFakeWindowWidth * SDL_ANDROID_sRealWindowHeight) / SDL_ANDROID_sFakeWindowHeight;
|
||||
else
|
||||
// Force 4:3 ratio, with black borders at the left/right,
|
||||
// this is needede for Uae4all2, which has 640x256 video mode,
|
||||
// and expects those 256 pixels to stretch 2x height like on a TV interlaced display.
|
||||
SDL_ANDROID_sWindowWidth = SDL_ANDROID_sWindowHeight * 4 / 3;
|
||||
|
||||
SDL_ANDROID_TouchscreenCalibrationWidth = SDL_ANDROID_sWindowWidth;
|
||||
SDL_ANDROID_ForceClearScreenRectAmount = 2;
|
||||
}
|
||||
|
||||
+7
-6
@@ -361,10 +361,10 @@ while( SDL_PollEvent(&evt) )
|
||||
Quick guide to debug native code
|
||||
================================
|
||||
|
||||
The debugging of multi-threaded apps is not supported with NDK r4 or r4b, you'll need NDK r5c
|
||||
and Android 2.3 emulator or device.
|
||||
To debug your application go to "project" dir and launch command
|
||||
ndk-gdb --verbose --start --force
|
||||
You need compile your app with debug enabled to be able to debug native code:
|
||||
./build.sh debug
|
||||
To debug your application - launch it, go to "project" dir and launch command
|
||||
ndk-gdb
|
||||
then you can run usual GDB commands, like:
|
||||
cont - continue execution.
|
||||
info threads - list all threads, there will usually be like 11 of them with thread 10 being your main thread.
|
||||
@@ -395,12 +395,13 @@ I/DEBUG ( 51): #03 pc 0002ca00 /data/data/de.schwardtnet.alienbla
|
||||
I/DEBUG ( 51): #04 pc 00028b6e /data/data/de.schwardtnet.alienblaster/lib/libsdl.so
|
||||
I/DEBUG ( 51): #05 pc 0002d080 /data/data/de.schwardtnet.alienblaster/lib/libsdl.so
|
||||
|
||||
2. Go to project/bin/ndk/local/armeabi dir, find there the library mentioned in stacktrace
|
||||
2. Go to project/bin/ndk/local/armeabi or armeabi-v7a dir, find there the library mentioned in stacktrace
|
||||
(libsdl.so in our example), copy the address of the first line of stacktrace (0002ca00), and execute command
|
||||
|
||||
<your NDK path>/toolchains/arm-linux-androideabi-4.4.3/prebuilt/linux-x86/bin/arm-linux-androideabi-gdb libsdl.so -ex "list *0x0002ca00" -ex "list *0x00028b6e" -ex "list *0x0002d080"
|
||||
<your NDK path>/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86_64/bin/arm-linux-androideabi-gdb libsdl.so -ex "list *0x0002ca00" -ex "list *0x00028b6e" -ex "list *0x0002d080"
|
||||
|
||||
It will output the exact line in your source where the application crashed, and some stack trace if available.
|
||||
You may also try to use ndk-stack script to do that for you.
|
||||
|
||||
If your application does not work for unknown reasons, there may be the case when it exports some symbol
|
||||
that clash with exports from system libraries - run checkExports.sh to check this.
|
||||
|
||||
Reference in New Issue
Block a user