project_files/Android-build/SDL-android-project/src/org/hedgewars/mobile/SDLActivity.java
equal
deleted
inserted
replaced
327 config = _config; |
327 config = _config; |
328 } |
328 } |
329 |
329 |
330 // Called when we have a valid drawing surface |
330 // Called when we have a valid drawing surface |
331 public void surfaceCreated(SurfaceHolder holder) { |
331 public void surfaceCreated(SurfaceHolder holder) { |
332 // Log.v("SDL", "surfaceCreated()"); |
332 Log.v("SDL", "surfaceCreated()"); |
333 |
333 |
334 enableSensor(Sensor.TYPE_ACCELEROMETER, true); |
334 //enableSensor(Sensor.TYPE_ACCELEROMETER, true); |
335 } |
335 } |
336 |
336 |
337 // Called when we lose the surface |
337 // Called when we lose the surface |
338 public void surfaceDestroyed(SurfaceHolder holder) { |
338 public void surfaceDestroyed(SurfaceHolder holder) { |
339 // Log.v("SDL", "surfaceDestroyed()"); |
339 Log.v("SDL", "surfaceDestroyed()"); |
340 |
340 |
341 // Send a quit message to the application |
341 // Send a quit message to the application |
342 SDLActivity.nativeQuit(); |
342 SDLActivity.nativeQuit(); |
343 |
343 |
344 // Now wait for the SDL thread to quit |
344 // Now wait for the SDL thread to quit |
351 mSDLThread = null; |
351 mSDLThread = null; |
352 |
352 |
353 // Log.v("SDL", "Finished waiting for SDL thread"); |
353 // Log.v("SDL", "Finished waiting for SDL thread"); |
354 } |
354 } |
355 |
355 |
356 enableSensor(Sensor.TYPE_ACCELEROMETER, false); |
356 //enableSensor(Sensor.TYPE_ACCELEROMETER, false); |
357 } |
357 } |
358 |
358 |
359 // Called when the surface is resized |
359 // Called when the surface is resized |
360 public void surfaceChanged(SurfaceHolder holder, int format, int width, |
360 public void surfaceChanged(SurfaceHolder holder, int format, int width, |
361 int height) { |
361 int height) { |