Add Wiimote support to the Android backend.

Not actually wired up to the Android UI for configuration.
This commit is contained in:
Ryan Houdek
2015-07-21 21:28:32 -05:00
parent c8d1824eb0
commit a8227ad9b1
6 changed files with 193 additions and 26 deletions

View File

@ -0,0 +1,84 @@
[Wiimote1]
Device = Android/4/Touchscreen
Buttons/A = `Button 22`
Buttons/B = `Button 23`
Buttons/1 = `Button 27`
Buttons/2 = `Button 28`
Buttons/- = `Button 24`
Buttons/+ = `Button 25`
Buttons/Home = `Button 26`
IR/Up =
IR/Down =
IR/Left =
IR/Right =
Shake/X =
Shake/Y =
Shake/Z =
D-Pad/Up = `Button 29`
D-Pad/Down = `Button 30`
D-Pad/Left = `Button 31`
D-Pad/Right = `Button 32`
Source = 1
[Wiimote2]
Device = Android/5/Touchscreen
Buttons/A = `Button 22`
Buttons/B = `Button 23`
Buttons/1 = `Button 27`
Buttons/2 = `Button 28`
Buttons/- = `Button 24`
Buttons/+ = `Button 25`
Buttons/Home = `Button 26`
IR/Up =
IR/Down =
IR/Left =
IR/Right =
Shake/X =
Shake/Y =
Shake/Z =
D-Pad/Up = `Button 29`
D-Pad/Down = `Button 30`
D-Pad/Left = `Button 31`
D-Pad/Right = `Button 32`
Source = 1
[Wiimote3]
Device = Android/6/Touchscreen
Buttons/A = `Button 22`
Buttons/B = `Button 23`
Buttons/1 = `Button 27`
Buttons/2 = `Button 28`
Buttons/- = `Button 24`
Buttons/+ = `Button 25`
Buttons/Home = `Button 26`
IR/Up =
IR/Down =
IR/Left =
IR/Right =
Shake/X =
Shake/Y =
Shake/Z =
D-Pad/Up = `Button 29`
D-Pad/Down = `Button 30`
D-Pad/Left = `Button 31`
D-Pad/Right = `Button 32`
Source = 1
[Wiimote4]
Device = Android/7/Touchscreen
Buttons/A = `Button 22`
Buttons/B = `Button 23`
Buttons/1 = `Button 27`
Buttons/2 = `Button 28`
Buttons/- = `Button 24`
Buttons/+ = `Button 25`
Buttons/Home = `Button 26`
IR/Up =
IR/Down =
IR/Left =
IR/Right =
Shake/X =
Shake/Y =
Shake/Z =
D-Pad/Up = `Button 29`
D-Pad/Down = `Button 30`
D-Pad/Left = `Button 31`
D-Pad/Right = `Button 32`
Source = 1

View File

@ -25,28 +25,39 @@ public final class NativeLibrary
*/
public static final class ButtonType
{
public static final int BUTTON_A = 0;
public static final int BUTTON_B = 1;
public static final int BUTTON_START = 2;
public static final int BUTTON_X = 3;
public static final int BUTTON_Y = 4;
public static final int BUTTON_Z = 5;
public static final int BUTTON_UP = 6;
public static final int BUTTON_DOWN = 7;
public static final int BUTTON_LEFT = 8;
public static final int BUTTON_RIGHT = 9;
public static final int STICK_MAIN = 10;
public static final int STICK_MAIN_UP = 11;
public static final int STICK_MAIN_DOWN = 12;
public static final int STICK_MAIN_LEFT = 13;
public static final int STICK_MAIN_RIGHT = 14;
public static final int STICK_C = 15;
public static final int STICK_C_UP = 16;
public static final int STICK_C_DOWN = 17;
public static final int STICK_C_LEFT = 18;
public static final int STICK_C_RIGHT = 19;
public static final int TRIGGER_L = 20;
public static final int TRIGGER_R = 21;
public static final int BUTTON_A = 0;
public static final int BUTTON_B = 1;
public static final int BUTTON_START = 2;
public static final int BUTTON_X = 3;
public static final int BUTTON_Y = 4;
public static final int BUTTON_Z = 5;
public static final int BUTTON_UP = 6;
public static final int BUTTON_DOWN = 7;
public static final int BUTTON_LEFT = 8;
public static final int BUTTON_RIGHT = 9;
public static final int STICK_MAIN = 10;
public static final int STICK_MAIN_UP = 11;
public static final int STICK_MAIN_DOWN = 12;
public static final int STICK_MAIN_LEFT = 13;
public static final int STICK_MAIN_RIGHT = 14;
public static final int STICK_C = 15;
public static final int STICK_C_UP = 16;
public static final int STICK_C_DOWN = 17;
public static final int STICK_C_LEFT = 18;
public static final int STICK_C_RIGHT = 19;
public static final int TRIGGER_L = 20;
public static final int TRIGGER_R = 21;
public static final int WIIMOTE_BUTTON_A = 22;
public static final int WIIMOTE_BUTTON_B = 23;
public static final int WIIMOTE_BUTTON_MINUS = 24;
public static final int WIIMOTE_BUTTON_PLUS = 25;
public static final int WIIMOTE_BUTTON_HOME = 26;
public static final int WIIMOTE_BUTTON_1 = 27;
public static final int WIIMOTE_BUTTON_2 = 28;
public static final int WIIMOTE_UP = 29;
public static final int WIIMOTE_DOWN = 30;
public static final int WIIMOTE_LEFT = 31;
public static final int WIIMOTE_RIGHT = 32;
}
/**

View File

@ -61,6 +61,7 @@ public final class AssetCopyService extends IntentService
// Always copy over the GCPad config in case of change or corruption.
// Not a user configurable file.
copyAsset("GCPadNew.ini", ConfigDir + File.separator + "GCPadNew.ini");
copyAsset("WiimoteNew.ini", ConfigDir + File.separator + "WiimoteNew.ini");
// Load the configuration keys set in the Dolphin ini and gfx ini files
// into the application's shared preferences.