fixed Data path hedgeroid
authorXeli
Tue, 05 Jul 2011 23:29:32 +0200
branchhedgeroid
changeset 5406 a3f98a8a0b80
parent 5403 eae5ddde962a
child 5408 1c2f0dfbe759
fixed Data path
project_files/Android-build/SDL-android-project/src/org/hedgewars/mobile/DownloadService.java
project_files/Android-build/SDL-android-project/src/org/hedgewars/mobile/SDLActivity.java
--- a/project_files/Android-build/SDL-android-project/src/org/hedgewars/mobile/DownloadService.java	Tue Jul 05 23:29:08 2011 +0200
+++ b/project_files/Android-build/SDL-android-project/src/org/hedgewars/mobile/DownloadService.java	Tue Jul 05 23:29:32 2011 +0200
@@ -162,7 +162,7 @@
 	public static String getDownloadPath(Context c){
 		File f =  c.getExternalCacheDir();
 		if(f != null){
-			return f.getAbsolutePath();
+			return f.getAbsolutePath() + '/';
 		}else{
 			Toast.makeText(c, R.string.sdcard_not_mounted, Toast.LENGTH_LONG);
 			return null;
--- a/project_files/Android-build/SDL-android-project/src/org/hedgewars/mobile/SDLActivity.java	Tue Jul 05 23:29:08 2011 +0200
+++ b/project_files/Android-build/SDL-android-project/src/org/hedgewars/mobile/SDLActivity.java	Tue Jul 05 23:29:32 2011 +0200
@@ -34,7 +34,7 @@
 public class SDLActivity extends Activity {
 
 	// Main components
-	private static SDLActivity mSingleton;
+	public static SDLActivity mSingleton;
 	public static SDLSurface mSurface;
 
 	// Audio
@@ -236,8 +236,10 @@
 	}
 	public void run() {
 		// Runs SDL_main()
+
+		String path = DownloadService.getDownloadPath(SDLActivity.mSingleton) + "Data";
 		
-		SDLActivity.nativeInit(new String[]{ "0", String.valueOf(surfaceWidth), String.valueOf(surfaceHeight), "0", "null", "xeli", "1", "1", "1", "0", "/sdcard/Android/data/org.xeli.dataapk/files/Data", "/sdcard/Data"});
+		SDLActivity.nativeInit(new String[]{ "0", String.valueOf(surfaceWidth), String.valueOf(surfaceHeight), "0", "null", "xeli", "1", "1", "1", "0", "/sdcard/bla.hwd", path});
 
 		//Log.v("SDL", "SDL thread terminated");
 	}