mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-05-28 14:02:38 +00:00
Merge pull request #2773 from sigmabeta/android_wiimote_main
Android: Add Wiimote support, including configuration UI.
This commit is contained in:
commit
e805e05ff5
7 changed files with 505 additions and 27 deletions
84
Source/Android/app/src/main/assets/WiimoteNew.ini
Normal file
84
Source/Android/app/src/main/assets/WiimoteNew.ini
Normal 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
|
|
@ -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;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -569,6 +569,317 @@
|
|||
</PreferenceScreen>
|
||||
</PreferenceScreen>
|
||||
|
||||
<!-- Wiimote Bindings -->
|
||||
<PreferenceScreen
|
||||
android:key="wiimote_bindings"
|
||||
android:title="@string/wiimote_bindings">
|
||||
|
||||
<PreferenceScreen
|
||||
android:key="wiimote_bindings_4"
|
||||
android:title="@string/controller_0">
|
||||
|
||||
<CheckBoxPreference
|
||||
android:key="enableWiimote1"
|
||||
android:title="@string/enable_wiimote"/>
|
||||
|
||||
<org.dolphinemu.dolphinemu.utils.InputBindingPreference
|
||||
android:dependency="enableWiimote1"
|
||||
android:key="WiimoteA_4"
|
||||
android:summary="%s"
|
||||
android:title="@string/button_a"/>
|
||||
|
||||
<org.dolphinemu.dolphinemu.utils.InputBindingPreference
|
||||
android:dependency="enableWiimote1"
|
||||
android:key="WiimoteB_4"
|
||||
android:summary="%s"
|
||||
android:title="@string/button_b"/>
|
||||
|
||||
<org.dolphinemu.dolphinemu.utils.InputBindingPreference
|
||||
android:dependency="enableWiimote1"
|
||||
android:key="WiimoteMinus_4"
|
||||
android:summary="%s"
|
||||
android:title="@string/button_minus"/>
|
||||
|
||||
<org.dolphinemu.dolphinemu.utils.InputBindingPreference
|
||||
android:dependency="enableWiimote1"
|
||||
android:key="WiimotePlus_4"
|
||||
android:summary="%s"
|
||||
android:title="@string/button_plus"/>
|
||||
|
||||
<org.dolphinemu.dolphinemu.utils.InputBindingPreference
|
||||
android:dependency="enableWiimote1"
|
||||
android:key="WiimoteHome_4"
|
||||
android:summary="%s"
|
||||
android:title="@string/button_home"/>
|
||||
|
||||
<org.dolphinemu.dolphinemu.utils.InputBindingPreference
|
||||
android:dependency="enableWiimote1"
|
||||
android:key="Wiimote1_4"
|
||||
android:summary="%s"
|
||||
android:title="@string/button_one"/>
|
||||
|
||||
<org.dolphinemu.dolphinemu.utils.InputBindingPreference
|
||||
android:dependency="enableWiimote1"
|
||||
android:key="Wiimote2_4"
|
||||
android:summary="%s"
|
||||
android:title="@string/button_two"/>
|
||||
|
||||
<org.dolphinemu.dolphinemu.utils.InputBindingPreference
|
||||
android:dependency="enableWiimote1"
|
||||
android:key="WiimoteUp_4"
|
||||
android:summary="%s"
|
||||
android:title="@string/dpad_up"/>
|
||||
|
||||
<org.dolphinemu.dolphinemu.utils.InputBindingPreference
|
||||
android:dependency="enableWiimote1"
|
||||
android:key="WiimoteDown_4"
|
||||
android:summary="%s"
|
||||
android:title="@string/dpad_down"/>
|
||||
|
||||
<org.dolphinemu.dolphinemu.utils.InputBindingPreference
|
||||
android:dependency="enableWiimote1"
|
||||
android:key="WiimoteLeft_4"
|
||||
android:summary="%s"
|
||||
android:title="@string/dpad_left"/>
|
||||
|
||||
<org.dolphinemu.dolphinemu.utils.InputBindingPreference
|
||||
android:dependency="enableWiimote1"
|
||||
android:key="WiimoteRight_4"
|
||||
android:summary="%s"
|
||||
android:title="@string/dpad_right"/>
|
||||
|
||||
</PreferenceScreen>
|
||||
|
||||
<PreferenceScreen
|
||||
android:key="wiimote_bindings_5"
|
||||
android:title="@string/controller_1">
|
||||
|
||||
<CheckBoxPreference
|
||||
android:key="enableWiimote2"
|
||||
android:title="@string/enable_wiimote"/>
|
||||
|
||||
<org.dolphinemu.dolphinemu.utils.InputBindingPreference
|
||||
android:dependency="enableWiimote2"
|
||||
android:key="WiimoteA_5"
|
||||
android:summary="%s"
|
||||
android:title="@string/button_a"/>
|
||||
|
||||
<org.dolphinemu.dolphinemu.utils.InputBindingPreference
|
||||
android:dependency="enableWiimote2"
|
||||
android:key="WiimoteB_5"
|
||||
android:summary="%s"
|
||||
android:title="@string/button_b"/>
|
||||
|
||||
<org.dolphinemu.dolphinemu.utils.InputBindingPreference
|
||||
android:dependency="enableWiimote2"
|
||||
android:key="WiimoteMinus_5"
|
||||
android:summary="%s"
|
||||
android:title="@string/button_minus"/>
|
||||
|
||||
<org.dolphinemu.dolphinemu.utils.InputBindingPreference
|
||||
android:dependency="enableWiimote2"
|
||||
android:key="WiimotePlus_5"
|
||||
android:summary="%s"
|
||||
android:title="@string/button_plus"/>
|
||||
|
||||
<org.dolphinemu.dolphinemu.utils.InputBindingPreference
|
||||
android:dependency="enableWiimote2"
|
||||
android:key="WiimoteHome_5"
|
||||
android:summary="%s"
|
||||
android:title="@string/button_home"/>
|
||||
|
||||
<org.dolphinemu.dolphinemu.utils.InputBindingPreference
|
||||
android:dependency="enableWiimote2"
|
||||
android:key="Wiimote2_5"
|
||||
android:summary="%s"
|
||||
android:title="@string/button_one"/>
|
||||
|
||||
<org.dolphinemu.dolphinemu.utils.InputBindingPreference
|
||||
android:dependency="enableWiimote2"
|
||||
android:key="Wiimote2_5"
|
||||
android:summary="%s"
|
||||
android:title="@string/button_two"/>
|
||||
|
||||
<org.dolphinemu.dolphinemu.utils.InputBindingPreference
|
||||
android:dependency="enableWiimote2"
|
||||
android:key="WiimoteUp_5"
|
||||
android:summary="%s"
|
||||
android:title="@string/dpad_up"/>
|
||||
|
||||
<org.dolphinemu.dolphinemu.utils.InputBindingPreference
|
||||
android:dependency="enableWiimote2"
|
||||
android:key="WiimoteDown_5"
|
||||
android:summary="%s"
|
||||
android:title="@string/dpad_down"/>
|
||||
|
||||
<org.dolphinemu.dolphinemu.utils.InputBindingPreference
|
||||
android:dependency="enableWiimote2"
|
||||
android:key="WiimoteLeft_5"
|
||||
android:summary="%s"
|
||||
android:title="@string/dpad_left"/>
|
||||
|
||||
<org.dolphinemu.dolphinemu.utils.InputBindingPreference
|
||||
android:dependency="enableWiimote2"
|
||||
android:key="WiimoteRight_5"
|
||||
android:summary="%s"
|
||||
android:title="@string/dpad_right"/>
|
||||
|
||||
</PreferenceScreen>
|
||||
|
||||
<PreferenceScreen
|
||||
android:key="wiimote_bindings_6"
|
||||
android:title="@string/controller_2">
|
||||
|
||||
<CheckBoxPreference
|
||||
android:key="enableWiimote3"
|
||||
android:title="@string/enable_wiimote"/>
|
||||
|
||||
<org.dolphinemu.dolphinemu.utils.InputBindingPreference
|
||||
android:dependency="enableWiimote3"
|
||||
android:key="WiimoteA_6"
|
||||
android:summary="%s"
|
||||
android:title="@string/button_a"/>
|
||||
|
||||
<org.dolphinemu.dolphinemu.utils.InputBindingPreference
|
||||
android:dependency="enableWiimote3"
|
||||
android:key="WiimoteB_6"
|
||||
android:summary="%s"
|
||||
android:title="@string/button_b"/>
|
||||
|
||||
<org.dolphinemu.dolphinemu.utils.InputBindingPreference
|
||||
android:dependency="enableWiimote3"
|
||||
android:key="WiimoteMinus_6"
|
||||
android:summary="%s"
|
||||
android:title="@string/button_minus"/>
|
||||
|
||||
<org.dolphinemu.dolphinemu.utils.InputBindingPreference
|
||||
android:dependency="enableWiimote3"
|
||||
android:key="WiimotePlus_6"
|
||||
android:summary="%s"
|
||||
android:title="@string/button_plus"/>
|
||||
|
||||
<org.dolphinemu.dolphinemu.utils.InputBindingPreference
|
||||
android:dependency="enableWiimote3"
|
||||
android:key="WiimoteHome_6"
|
||||
android:summary="%s"
|
||||
android:title="@string/button_home"/>
|
||||
|
||||
<org.dolphinemu.dolphinemu.utils.InputBindingPreference
|
||||
android:dependency="enableWiimote3"
|
||||
android:key="Wiimote3_6"
|
||||
android:summary="%s"
|
||||
android:title="@string/button_one"/>
|
||||
|
||||
<org.dolphinemu.dolphinemu.utils.InputBindingPreference
|
||||
android:dependency="enableWiimote3"
|
||||
android:key="Wiimote2_6"
|
||||
android:summary="%s"
|
||||
android:title="@string/button_two"/>
|
||||
|
||||
<org.dolphinemu.dolphinemu.utils.InputBindingPreference
|
||||
android:dependency="enableWiimote3"
|
||||
android:key="WiimoteUp_6"
|
||||
android:summary="%s"
|
||||
android:title="@string/dpad_up"/>
|
||||
|
||||
<org.dolphinemu.dolphinemu.utils.InputBindingPreference
|
||||
android:dependency="enableWiimote3"
|
||||
android:key="WiimoteDown_6"
|
||||
android:summary="%s"
|
||||
android:title="@string/dpad_down"/>
|
||||
|
||||
<org.dolphinemu.dolphinemu.utils.InputBindingPreference
|
||||
android:dependency="enableWiimote3"
|
||||
android:key="WiimoteLeft_6"
|
||||
android:summary="%s"
|
||||
android:title="@string/dpad_left"/>
|
||||
|
||||
<org.dolphinemu.dolphinemu.utils.InputBindingPreference
|
||||
android:dependency="enableWiimote3"
|
||||
android:key="WiimoteRight_6"
|
||||
android:summary="%s"
|
||||
android:title="@string/dpad_right"/>
|
||||
|
||||
</PreferenceScreen>
|
||||
|
||||
<PreferenceScreen
|
||||
android:key="wiimote_bindings_7"
|
||||
android:title="@string/controller_3">
|
||||
|
||||
<CheckBoxPreference
|
||||
android:key="enableWiimote4"
|
||||
android:title="@string/enable_wiimote"/>
|
||||
|
||||
<org.dolphinemu.dolphinemu.utils.InputBindingPreference
|
||||
android:dependency="enableWiimote4"
|
||||
android:key="WiimoteA_7"
|
||||
android:summary="%s"
|
||||
android:title="@string/button_a"/>
|
||||
|
||||
<org.dolphinemu.dolphinemu.utils.InputBindingPreference
|
||||
android:dependency="enableWiimote4"
|
||||
android:key="WiimoteB_7"
|
||||
android:summary="%s"
|
||||
android:title="@string/button_b"/>
|
||||
|
||||
<org.dolphinemu.dolphinemu.utils.InputBindingPreference
|
||||
android:dependency="enableWiimote4"
|
||||
android:key="WiimoteMinus_7"
|
||||
android:summary="%s"
|
||||
android:title="@string/button_minus"/>
|
||||
|
||||
<org.dolphinemu.dolphinemu.utils.InputBindingPreference
|
||||
android:dependency="enableWiimote4"
|
||||
android:key="WiimotePlus_7"
|
||||
android:summary="%s"
|
||||
android:title="@string/button_plus"/>
|
||||
|
||||
<org.dolphinemu.dolphinemu.utils.InputBindingPreference
|
||||
android:dependency="enableWiimote4"
|
||||
android:key="WiimoteHome_7"
|
||||
android:summary="%s"
|
||||
android:title="@string/button_home"/>
|
||||
|
||||
<org.dolphinemu.dolphinemu.utils.InputBindingPreference
|
||||
android:dependency="enableWiimote4"
|
||||
android:key="Wiimote4_7"
|
||||
android:summary="%s"
|
||||
android:title="@string/button_one"/>
|
||||
|
||||
<org.dolphinemu.dolphinemu.utils.InputBindingPreference
|
||||
android:dependency="enableWiimote4"
|
||||
android:key="Wiimote2_7"
|
||||
android:summary="%s"
|
||||
android:title="@string/button_two"/>
|
||||
|
||||
<org.dolphinemu.dolphinemu.utils.InputBindingPreference
|
||||
android:dependency="enableWiimote4"
|
||||
android:key="WiimoteUp_7"
|
||||
android:summary="%s"
|
||||
android:title="@string/dpad_up"/>
|
||||
|
||||
<org.dolphinemu.dolphinemu.utils.InputBindingPreference
|
||||
android:dependency="enableWiimote4"
|
||||
android:key="WiimoteDown_7"
|
||||
android:summary="%s"
|
||||
android:title="@string/dpad_down"/>
|
||||
|
||||
<org.dolphinemu.dolphinemu.utils.InputBindingPreference
|
||||
android:dependency="enableWiimote4"
|
||||
android:key="WiimoteLeft_7"
|
||||
android:summary="%s"
|
||||
android:title="@string/dpad_left"/>
|
||||
|
||||
<org.dolphinemu.dolphinemu.utils.InputBindingPreference
|
||||
android:dependency="enableWiimote4"
|
||||
android:key="WiimoteRight_7"
|
||||
android:summary="%s"
|
||||
android:title="@string/dpad_right"/>
|
||||
|
||||
</PreferenceScreen>
|
||||
|
||||
</PreferenceScreen>
|
||||
|
||||
</PreferenceCategory>
|
||||
|
||||
<PreferenceCategory
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue