diff --git a/ChangeAppSettings.sh b/ChangeAppSettings.sh index 42a5a2606..d5b701d6f 100755 --- a/ChangeAppSettings.sh +++ b/ChangeAppSettings.sh @@ -610,7 +610,7 @@ AppShortName=`echo $AppName | sed 's/ //g'` DataPath="$AppFullName" AppFullNameUnderscored=`echo $AppFullName | sed 's/[.]/_/g'` AppSharedLibrariesPath=/data/data/$AppFullName/lib -ScreenOrientation1=portrait +ScreenOrientation1=sensorPortrait HorizontalOrientation=false UsingSdl13=false @@ -619,7 +619,7 @@ if [ "$LibSdlVersion" = "1.3" ] ; then fi if [ "$ScreenOrientation" = "h" ] ; then - ScreenOrientation1=landscape + ScreenOrientation1=sensorLandscape HorizontalOrientation=true fi diff --git a/project/AndroidManifestTemplate.xml b/project/AndroidManifestTemplate.xml index 9e2f38b50..f1be04f96 100644 --- a/project/AndroidManifestTemplate.xml +++ b/project/AndroidManifestTemplate.xml @@ -11,8 +11,8 @@ > @@ -22,7 +22,7 @@ - + diff --git a/project/jni/sdl-1.3/src/video/android/SDL_androidvideo.c b/project/jni/sdl-1.3/src/video/android/SDL_androidvideo.c index dab1d8175..85e36972d 100644 --- a/project/jni/sdl-1.3/src/video/android/SDL_androidvideo.c +++ b/project/jni/sdl-1.3/src/video/android/SDL_androidvideo.c @@ -270,7 +270,7 @@ JNIEXPORT void JNICALL JAVA_EXPORT_NAME(DemoRenderer_nativeInitJavaCallbacks) ( JNIEnv* env, jobject thiz ) { JavaEnv = env; - JavaRenderer = thiz; + JavaRenderer = (*JavaEnv)->NewGlobalRef( JavaEnv, thiz ); JavaRendererClass = (*JavaEnv)->GetObjectClass(JavaEnv, thiz); JavaSwapBuffers = (*JavaEnv)->GetMethodID(JavaEnv, JavaRendererClass, "swapBuffers", "()I"); diff --git a/project/project.properties b/project/project.properties index 2cc58faf4..8da376af8 100644 --- a/project/project.properties +++ b/project/project.properties @@ -8,4 +8,4 @@ # project structure. # Project target. -target=android-12 +target=android-15 diff --git a/readme.txt b/readme.txt index 6932e4cc9..89acf804c 100644 --- a/readme.txt +++ b/readme.txt @@ -8,7 +8,7 @@ Also this port is developed very slowly, although the same is true for an offici Installation ============ -This project should be compiled with Android 3.1 SDK (API level 12) and NDK r8, r7c, r6 or r5c, +This project should be compiled with Android 3.1 SDK (API level 15) and NDK r8, r7c, r6 or r5c, google for them and install them as described in their docs. You'll need to install Java Ant too. The application will run on Android OS 1.6 and above, don't mind the 3.1 dependency. @@ -28,12 +28,12 @@ Launch commands rm project/jni/application/src ln -s ballfield project/jni/application/src ./ChangeAppSettings.sh -a - android update project -p project -t android-12 + android update project -p project -t android-15 Then edit file build.sh if needed to add NDK dir to your PATH, then launch it. It will compile a bunch of libs under project/libs/armeabi, create file project/bin/DemoActivity-debug.apk and install it on your device or emulator. Then you can test it by launching Ballfield icon from Android applications menu. -It's designed for 320x240, so if you have smaller screen it will be resized. +It's designed for 320x240, so if you have bigger screen it will be resized. The game enforces horizontal screen orientation, you may slide-open your keyboard if you have it and use it for additional keys - the device will just keep current screen orientation.