android: misc changes (#876)
* android: add appCategory attribute * android: remove unnecessary @TargetApi * android: replace 'for' loop with enhanced 'for' * android: use java-style array declaration
This commit is contained in:
parent
4bbf5c562e
commit
cbffc5cade
|
@ -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">
|
||||
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue