diff --git a/shell/android-studio/flycast/src/main/AndroidManifest.xml b/shell/android-studio/flycast/src/main/AndroidManifest.xml index 5a8531110..63c30b1fd 100644 --- a/shell/android-studio/flycast/src/main/AndroidManifest.xml +++ b/shell/android-studio/flycast/src/main/AndroidManifest.xml @@ -42,6 +42,7 @@ android:banner="@drawable/ic_banner" android:logo="@drawable/ic_banner" android:hardwareAccelerated="true" + android:appCategory="game" android:isGame="true" android:requestLegacyExternalStorage="true"> diff --git a/shell/android-studio/flycast/src/main/java/com/reicast/emulator/Emulator.java b/shell/android-studio/flycast/src/main/java/com/reicast/emulator/Emulator.java index aec3738c5..e50803f99 100644 --- a/shell/android-studio/flycast/src/main/java/com/reicast/emulator/Emulator.java +++ b/shell/android-studio/flycast/src/main/java/com/reicast/emulator/Emulator.java @@ -24,13 +24,13 @@ public class Emulator extends Application { public static int vibrationDuration = 20; - public static int maple_devices[] = { + public static int[] maple_devices = { MDT_None, MDT_None, MDT_None, MDT_None }; - public static int maple_expansion_devices[][] = { + public static int[][] maple_expansion_devices = { { MDT_None, MDT_None }, { MDT_None, MDT_None }, { MDT_None, MDT_None }, @@ -67,9 +67,9 @@ public class Emulator extends Application { public static boolean micPluggedIn() { JNIdc.getControllers(maple_devices, maple_expansion_devices); - for (int i = 0; i < maple_expansion_devices.length; i++) - if (maple_expansion_devices[i][0] == MDT_Microphone - || maple_expansion_devices[i][1] == MDT_Microphone) + for (int[] maple_expansion_device : maple_expansion_devices) + if (maple_expansion_device[0] == MDT_Microphone + || maple_expansion_device[1] == MDT_Microphone) return true; return false; } diff --git a/shell/android-studio/flycast/src/main/java/com/reicast/emulator/emu/NativeGLView.java b/shell/android-studio/flycast/src/main/java/com/reicast/emulator/emu/NativeGLView.java index d7fd2aea0..171230508 100644 --- a/shell/android-studio/flycast/src/main/java/com/reicast/emulator/emu/NativeGLView.java +++ b/shell/android-studio/flycast/src/main/java/com/reicast/emulator/emu/NativeGLView.java @@ -29,7 +29,6 @@ public class NativeGLView extends SurfaceView implements SurfaceHolder.Callback vjoyDelegate.restoreCustomVjoyValues(vjoy_d_cached); } - @TargetApi(Build.VERSION_CODES.HONEYCOMB) public NativeGLView(Context context) { this(context, null); } diff --git a/shell/android-studio/flycast/src/main/java/com/reicast/emulator/periph/InputDeviceManager.java b/shell/android-studio/flycast/src/main/java/com/reicast/emulator/periph/InputDeviceManager.java index 6ef55d83f..1afe85249 100644 --- a/shell/android-studio/flycast/src/main/java/com/reicast/emulator/periph/InputDeviceManager.java +++ b/shell/android-studio/flycast/src/main/java/com/reicast/emulator/periph/InputDeviceManager.java @@ -111,7 +111,7 @@ public final class InputDeviceManager implements InputManager.InputDeviceListene public native boolean joystickAxisEvent(int id, int button, int value); public native void mouseEvent(int xpos, int ypos, int buttons); public native void mouseScrollEvent(int scrollValue); - private native void joystickAdded(int id, String name, int maple_port, String uniqueId, int fullAxes[], int halfAxes[]); + private native void joystickAdded(int id, String name, int maple_port, String uniqueId, int[] fullAxes, int[] halfAxes); private native void joystickRemoved(int id); public native boolean keyboardEvent(int key, boolean pressed); public native void keyboardText(int c);