diff --git a/android/gradle.properties b/android/gradle.properties new file mode 100644 index 0000000000..8bd86f6805 --- /dev/null +++ b/android/gradle.properties @@ -0,0 +1 @@ +org.gradle.jvmargs=-Xmx1536M diff --git a/android/src/org/ppsspp/ppsspp/InputDeviceState.java b/android/src/org/ppsspp/ppsspp/InputDeviceState.java index 23bcaeaf24..09381dbd71 100644 --- a/android/src/org/ppsspp/ppsspp/InputDeviceState.java +++ b/android/src/org/ppsspp/ppsspp/InputDeviceState.java @@ -48,23 +48,7 @@ public class InputDeviceState { } NativeApp.sendMessage("inputDeviceConnected", device.getName()); } - - public static float ProcessAxis(InputDevice.MotionRange range, float axisvalue) { - float absaxisvalue = Math.abs(axisvalue); - float deadzone = range.getFlat(); - if (absaxisvalue <= deadzone) { - return 0.0f; - } - float normalizedvalue; - if (axisvalue < 0.0f) { - normalizedvalue = absaxisvalue / range.getMin(); - } else { - normalizedvalue = absaxisvalue / range.getMax(); - } - return normalizedvalue; - } - public boolean onKeyDown(KeyEvent event) { int keyCode = event.getKeyCode(); boolean repeat = event.getRepeatCount() > 0; @@ -84,7 +68,6 @@ public class InputDeviceState { for (int i = 0; i < mAxes.length; i++) { int axisId = mAxes[i]; float value = event.getAxisValue(axisId); - // TODO: Use processAxis or move that to the C++ code NativeApp.joystickAxis(deviceId, axisId, value); } NativeApp.endJoystickEvent(); diff --git a/android/src/org/ppsspp/ppsspp/NativeActivity.java b/android/src/org/ppsspp/ppsspp/NativeActivity.java index 286d398ef9..4f88c62828 100644 --- a/android/src/org/ppsspp/ppsspp/NativeActivity.java +++ b/android/src/org/ppsspp/ppsspp/NativeActivity.java @@ -348,7 +348,7 @@ public class NativeActivity extends Activity implements SurfaceHolder.Callback { Log.i(TAG, "Starting the render loop: " + mSurface); // Start emulation using the provided Surface. if (!runEGLRenderLoop(mSurface)) { - // TODO: Add an alert dialog or something + // Shouldn't happen. Log.e(TAG, "Failed to start up OpenGL"); } Log.i(TAG, "Left the render loop: " + mSurface); @@ -507,7 +507,6 @@ public class NativeActivity extends Activity implements SurfaceHolder.Callback { Log.w(TAG, "Joined render loop thread."); mRenderLoopThread = null; } catch (InterruptedException e) { - // TODO Auto-generated catch block e.printStackTrace(); } } @@ -866,7 +865,6 @@ public class NativeActivity extends Activity implements SurfaceHolder.Callback { // Fall through default: // send the rest of the keys through. - // TODO: get rid of the three special cases above by adjusting the native side of the code. // Log.d(TAG, "Key down: " + keyCode + ", KeyEvent: " + event); return NativeApp.keyUp(0, keyCode); } diff --git a/android/src/org/ppsspp/ppsspp/NativeGLView.java b/android/src/org/ppsspp/ppsspp/NativeGLView.java index 9e430bc34a..68c8a5082c 100644 --- a/android/src/org/ppsspp/ppsspp/NativeGLView.java +++ b/android/src/org/ppsspp/ppsspp/NativeGLView.java @@ -37,24 +37,6 @@ public class NativeGLView extends GLSurfaceView implements SensorEventListener, super(activity); mActivity = activity; - /*// TODO: This would be nice. - if (Build.VERSION.SDK_INT >= 11) { - try { - Method method_setPreserveEGLContextOnPause = GLSurfaceView.class.getMethod( - "setPreserveEGLContextOnPause", new Class[] { Boolean.class }); - Log.i(TAG, "Invoking setPreserveEGLContextOnPause"); - method_setPreserveEGLContextOnPause.invoke(this, true); - } catch (NoSuchMethodException e) { - e.printStackTrace(); - } catch (IllegalArgumentException e) { - e.printStackTrace(); - } catch (IllegalAccessException e) { - e.printStackTrace(); - } catch (InvocationTargetException e) { - e.printStackTrace(); - } - }*/ - mSensorManager = (SensorManager)activity.getSystemService(Activity.SENSOR_SERVICE); mAccelerometer = mSensorManager.getDefaultSensor(Sensor.TYPE_ACCELEROMETER); diff --git a/android/src/org/ppsspp/ppsspp/NativeSurfaceView.java b/android/src/org/ppsspp/ppsspp/NativeSurfaceView.java index fc621b5e12..2d53328573 100644 --- a/android/src/org/ppsspp/ppsspp/NativeSurfaceView.java +++ b/android/src/org/ppsspp/ppsspp/NativeSurfaceView.java @@ -126,9 +126,8 @@ public class NativeSurfaceView extends SurfaceView implements SensorEventListene mSensorManager.registerListener(this, mAccelerometer, SensorManager.SENSOR_DELAY_GAME); if (mController != null) { mController.onResume(); - // According to the docs, the Moga's state can be inconsistent here. - // We should do a one time poll. TODO + // Should we do a one time poll? } } diff --git a/android/src/org/ppsspp/ppsspp/SimpleFileChooser.java b/android/src/org/ppsspp/ppsspp/SimpleFileChooser.java index 7c814670dc..9e73fbb119 100644 --- a/android/src/org/ppsspp/ppsspp/SimpleFileChooser.java +++ b/android/src/org/ppsspp/ppsspp/SimpleFileChooser.java @@ -13,7 +13,6 @@ import android.os.Environment; /** * Simple dialog to pick file. - * TODO: Use GameBrowser from MainScreen.cpp instead. Then remove this class. */ public class SimpleFileChooser {