Browse Source

Fixed a bug where it would not compile on windows and fixed the androidBackButton callback to pass in state

Tim Newell 12 years ago
parent
commit
c33d37e66a
2 changed files with 7 additions and 2 deletions
  1. 4 0
      engine/compilers/android/jni/Android.mk
  2. 3 2
      main.cs

+ 4 - 0
engine/compilers/android/jni/Android.mk

@@ -13,6 +13,10 @@
 # limitations under the License.
 #
 
+#required for compiling on windows
+NDK_APP_SHORT_COMMANDS  := true
+LOCAL_SHORT_COMMANDS  := true
+
 MY_LOCAL_PATH := $(call my-dir)
 
 LOCAL_PATH := $(MY_LOCAL_PATH)

+ 3 - 2
main.cs

@@ -67,10 +67,11 @@ function onExit()
     ModuleDatabase.unloadExplicit( "AppCore" );
 }
 
-function androidBackButton()
+function androidBackButton(%val)
 {
 	//You will want to change this for your game.  Android users expect the 
 	//back button to go back until you reach main menu then it should quit app
-	quit();
+	if (%val)
+		quit();
 
 }