Skip to content
Permalink
Browse files

Merge pull request #8439 from JosJuice/android-native-motion-controls

Android: Native motion controls
  • Loading branch information
Helios747 committed Nov 27, 2019
2 parents 34a1df1 + 2d4a3f4 commit 155016531fb970f45d46a97b4397d9990e2b494e
@@ -4,6 +4,12 @@
<uses-feature
android:name="android.hardware.touchscreen"
android:required="false"/>
<uses-feature
android:name="android.hardware.sensor.accelerometer"
android:required="false"/>
<uses-feature
android:name="android.hardware.sensor.gyroscope"
android:required="false"/>
<uses-feature
android:name="android.hardware.gamepad"
android:required="false"/>
@@ -99,7 +99,7 @@ Guitar/Stick/Down = `Axis 411`
Guitar/Stick/Left = `Axis 412`
Guitar/Stick/Right = `Axis 413`
Guitar/Stick/Radius = 100,000000
Guitar/Whammy/Bar = `Axis = 414`
Guitar/Whammy/Bar = `Axis 414`
Drums/Buttons/- = `Button 500`
Drums/Buttons/+ = `Button 501`
Drums/Pads/Red = `Button 502`
@@ -135,6 +135,18 @@ Turntable/Stick/Radius = 100,000000
Turntable/Effect/Dial = `Axis 621`
Turntable/Crossfade/Left = `Axis 623`
Turntable/Crossfade/Right = `Axis 624`
IMUAccelerometer/Left = `Axis 625`
IMUAccelerometer/Right = `Axis 626`
IMUAccelerometer/Forward = `Axis 627`
IMUAccelerometer/Backward = `Axis 628`
IMUAccelerometer/Up = `Axis 629`
IMUAccelerometer/Down = `Axis 630`
IMUGyroscope/Pitch Up = `Axis 631`
IMUGyroscope/Pitch Down = `Axis 632`
IMUGyroscope/Roll Left = `Axis 633`
IMUGyroscope/Roll Right = `Axis 634`
IMUGyroscope/Yaw Left = `Axis 635`
IMUGyroscope/Yaw Right = `Axis 636`
Source = 1
Rumble/Motor = `Rumble 700`
[Wiimote2]
@@ -238,7 +250,7 @@ Guitar/Stick/Down = `Axis 411`
Guitar/Stick/Left = `Axis 412`
Guitar/Stick/Right = `Axis 413`
Guitar/Stick/Radius = 100,000000
Guitar/Whammy/Bar = `Axis = 414`
Guitar/Whammy/Bar = `Axis 414`
Drums/Buttons/- = `Button 500`
Drums/Buttons/+ = `Button 501`
Drums/Pads/Red = `Button 502`
@@ -274,6 +286,18 @@ Turntable/Stick/Radius = 100,000000
Turntable/Effect/Dial = `Axis 621`
Turntable/Crossfade/Left = `Axis 623`
Turntable/Crossfade/Right = `Axis 624`
IMUAccelerometer/Left = `Axis 625`
IMUAccelerometer/Right = `Axis 626`
IMUAccelerometer/Forward = `Axis 627`
IMUAccelerometer/Backward = `Axis 628`
IMUAccelerometer/Up = `Axis 629`
IMUAccelerometer/Down = `Axis 630`
IMUGyroscope/Pitch Up = `Axis 631`
IMUGyroscope/Pitch Down = `Axis 632`
IMUGyroscope/Roll Left = `Axis 633`
IMUGyroscope/Roll Right = `Axis 634`
IMUGyroscope/Yaw Left = `Axis 635`
IMUGyroscope/Yaw Right = `Axis 636`
Source = 0
Rumble/Motor = `Rumble 700`
[Wiimote3]
@@ -377,7 +401,7 @@ Guitar/Stick/Down = `Axis 411`
Guitar/Stick/Left = `Axis 412`
Guitar/Stick/Right = `Axis 413`
Guitar/Stick/Radius = 100,000000
Guitar/Whammy/Bar = `Axis = 414`
Guitar/Whammy/Bar = `Axis 414`
Drums/Buttons/- = `Button 500`
Drums/Buttons/+ = `Button 501`
Drums/Pads/Red = `Button 502`
@@ -413,6 +437,18 @@ Turntable/Stick/Radius = 100,000000
Turntable/Effect/Dial = `Axis 621`
Turntable/Crossfade/Left = `Axis 623`
Turntable/Crossfade/Right = `Axis 624`
IMUAccelerometer/Left = `Axis 625`
IMUAccelerometer/Right = `Axis 626`
IMUAccelerometer/Forward = `Axis 627`
IMUAccelerometer/Backward = `Axis 628`
IMUAccelerometer/Up = `Axis 629`
IMUAccelerometer/Down = `Axis 630`
IMUGyroscope/Pitch Up = `Axis 631`
IMUGyroscope/Pitch Down = `Axis 632`
IMUGyroscope/Roll Left = `Axis 633`
IMUGyroscope/Roll Right = `Axis 634`
IMUGyroscope/Yaw Left = `Axis 635`
IMUGyroscope/Yaw Right = `Axis 636`
Source = 0
Rumble/Motor = `Rumble 700`
[Wiimote4]
@@ -516,7 +552,7 @@ Guitar/Stick/Down = `Axis 411`
Guitar/Stick/Left = `Axis 412`
Guitar/Stick/Right = `Axis 413`
Guitar/Stick/Radius = 100,000000
Guitar/Whammy/Bar = `Axis = 414`
Guitar/Whammy/Bar = `Axis 414`
Drums/Buttons/- = `Button 500`
Drums/Buttons/+ = `Button 501`
Drums/Pads/Red = `Button 502`
@@ -552,5 +588,17 @@ Turntable/Stick/Radius = 100,000000
Turntable/Effect/Dial = `Axis 621`
Turntable/Crossfade/Left = `Axis 623`
Turntable/Crossfade/Right = `Axis 624`
IMUAccelerometer/Left = `Axis 625`
IMUAccelerometer/Right = `Axis 626`
IMUAccelerometer/Forward = `Axis 627`
IMUAccelerometer/Backward = `Axis 628`
IMUAccelerometer/Up = `Axis 629`
IMUAccelerometer/Down = `Axis 630`
IMUGyroscope/Pitch Up = `Axis 631`
IMUGyroscope/Pitch Down = `Axis 632`
IMUGyroscope/Roll Left = `Axis 633`
IMUGyroscope/Roll Right = `Axis 634`
IMUGyroscope/Yaw Left = `Axis 635`
IMUGyroscope/Yaw Right = `Axis 636`
Source = 0
Rumble/Motor = `Rumble 700`
@@ -99,7 +99,7 @@ Guitar/Stick/Down = `Axis 411`
Guitar/Stick/Left = `Axis 412`
Guitar/Stick/Right = `Axis 413`
Guitar/Stick/Radius = 100,000000
Guitar/Whammy/Bar = `Axis = 414`
Guitar/Whammy/Bar = `Axis 414`
Drums/Buttons/- = `Button 500`
Drums/Buttons/+ = `Button 501`
Drums/Pads/Red = `Button 502`
@@ -135,4 +135,16 @@ Turntable/Stick/Radius = 100,000000
Turntable/Effect/Dial = `Axis 621`
Turntable/Crossfade/Left = `Axis 623`
Turntable/Crossfade/Right = `Axis 624`
IMUAccelerometer/Left = `Axis 625`
IMUAccelerometer/Right = `Axis 626`
IMUAccelerometer/Forward = `Axis 627`
IMUAccelerometer/Backward = `Axis 628`
IMUAccelerometer/Up = `Axis 629`
IMUAccelerometer/Down = `Axis 630`
IMUGyroscope/Pitch Up = `Axis 631`
IMUGyroscope/Pitch Down = `Axis 632`
IMUGyroscope/Roll Left = `Axis 633`
IMUGyroscope/Roll Right = `Axis 634`
IMUGyroscope/Yaw Left = `Axis 635`
IMUGyroscope/Yaw Right = `Axis 636`
Rumble/Motor = `Rumble 700`
@@ -196,6 +196,18 @@ public static EmulationActivity getEmulationActivity()
public static final int TURNTABLE_CROSSFADE = 622;
public static final int TURNTABLE_CROSSFADE_LEFT = 623;
public static final int TURNTABLE_CROSSFADE_RIGHT = 624;
public static final int WIIMOTE_ACCEL_LEFT = 625;
public static final int WIIMOTE_ACCEL_RIGHT = 626;
public static final int WIIMOTE_ACCEL_FORWARD = 627;
public static final int WIIMOTE_ACCEL_BACKWARD = 628;
public static final int WIIMOTE_ACCEL_UP = 629;
public static final int WIIMOTE_ACCEL_DOWN = 630;
public static final int WIIMOTE_GYRO_PITCH_UP = 631;
public static final int WIIMOTE_GYRO_PITCH_DOWN = 632;
public static final int WIIMOTE_GYRO_ROLL_LEFT = 633;
public static final int WIIMOTE_GYRO_ROLL_RIGHT = 634;
public static final int WIIMOTE_GYRO_YAW_LEFT = 635;
public static final int WIIMOTE_GYRO_YAW_RIGHT = 636;
}

/**
@@ -254,6 +266,9 @@ public static void rumble(int padID, double state)
Rumble.checkRumble(padID, state);
}

public static native void SetMotionSensorsEnabled(boolean accelerometerEnabled,
boolean gyroscopeEnabled);

public static native void NewGameIniFile();

public static native void LoadGameIniFile(String gameId);

0 comments on commit 1550165

Please sign in to comment.
You can’t perform that action at this time.