project_files/Android-build/SDL-android-project/src/org/hedgewars/mobile/SDLActivity.java
branchhedgeroid
changeset 5406 a3f98a8a0b80
parent 5389 b3cc5b4099f1
child 5416 26a36326d199
equal deleted inserted replaced
5403:eae5ddde962a 5406:a3f98a8a0b80
    32     SDL Activity
    32     SDL Activity
    33  */
    33  */
    34 public class SDLActivity extends Activity {
    34 public class SDLActivity extends Activity {
    35 
    35 
    36 	// Main components
    36 	// Main components
    37 	private static SDLActivity mSingleton;
    37 	public static SDLActivity mSingleton;
    38 	public static SDLSurface mSurface;
    38 	public static SDLSurface mSurface;
    39 
    39 
    40 	// Audio
    40 	// Audio
    41 	private static Thread mAudioThread;
    41 	private static Thread mAudioThread;
    42 	private static AudioTrack mAudioTrack;
    42 	private static AudioTrack mAudioTrack;
   234 		surfaceWidth = width;
   234 		surfaceWidth = width;
   235 		surfaceHeight = height;
   235 		surfaceHeight = height;
   236 	}
   236 	}
   237 	public void run() {
   237 	public void run() {
   238 		// Runs SDL_main()
   238 		// Runs SDL_main()
       
   239 
       
   240 		String path = DownloadService.getDownloadPath(SDLActivity.mSingleton) + "Data";
   239 		
   241 		
   240 		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"});
   242 		SDLActivity.nativeInit(new String[]{ "0", String.valueOf(surfaceWidth), String.valueOf(surfaceHeight), "0", "null", "xeli", "1", "1", "1", "0", "/sdcard/bla.hwd", path});
   241 
   243 
   242 		//Log.v("SDL", "SDL thread terminated");
   244 		//Log.v("SDL", "SDL thread terminated");
   243 	}
   245 	}
   244 }
   246 }
   245 
   247