24 import android.os.Bundle; |
24 import android.os.Bundle; |
25 import android.os.Handler; |
25 import android.os.Handler; |
26 import android.os.Message; |
26 import android.os.Message; |
27 import android.util.Log; |
27 import android.util.Log; |
28 import android.view.KeyEvent; |
28 import android.view.KeyEvent; |
29 import android.view.MotionEvent; |
|
30 import android.view.SurfaceHolder; |
29 import android.view.SurfaceHolder; |
31 import android.view.SurfaceView; |
30 import android.view.SurfaceView; |
32 import android.view.View; |
31 import android.view.View; |
33 |
32 |
34 /** |
33 /** |
272 surfaceWidth = width; |
271 surfaceWidth = width; |
273 surfaceHeight = height; |
272 surfaceHeight = height; |
274 } |
273 } |
275 |
274 |
276 public void run() { |
275 public void run() { |
277 // Runs SDL_main() |
276 //Set up the IPC socket server to communicate with the engine |
278 |
|
279 EngineProtocolNetwork ipc = new EngineProtocolNetwork(config); |
277 EngineProtocolNetwork ipc = new EngineProtocolNetwork(config); |
280 |
278 |
281 String path = Utils.getDownloadPath(SDLActivity.mSingleton); |
279 String path = Utils.getDownloadPath(SDLActivity.mSingleton);//This represents the data directory |
282 //path = path.substring(0, path.length()-1);//remove the trailing '/' |
280 path = path.substring(0, path.length()-1);//remove the trailing '/' |
283 |
281 |
|
282 |
|
283 // Runs SDL_main() with added parameters |
284 SDLActivity.nativeInit(new String[] { String.valueOf(ipc.port), |
284 SDLActivity.nativeInit(new String[] { String.valueOf(ipc.port), |
285 String.valueOf(surfaceWidth), String.valueOf(surfaceHeight), |
285 String.valueOf(surfaceWidth), String.valueOf(surfaceHeight), |
286 "0", "null", "xeli", "1", "1", "1", "0", "", path }); |
286 "0", "null", "xeli", "1", "1", "1", "0", "", path }); |
287 |
287 |
288 // Log.v("SDL", "SDL thread terminated"); |
288 // Log.v("SDL", "SDL thread terminated"); |