From 42f8562e5c7acfb6b697672f419f0f28366a5261 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Tue, 19 Nov 2013 19:28:10 -0500 Subject: [PATCH] [Android] Basic Wiimote binding settings now implemented. --- Source/Android/res/values-ja/strings.xml | 31 +- Source/Android/res/values/strings.xml | 39 +- Source/Android/res/xml/input_prefs.xml | 600 ++++++++++++++++++ .../settings/input/InputConfigFragment.java | 24 +- 4 files changed, 685 insertions(+), 9 deletions(-) diff --git a/Source/Android/res/values-ja/strings.xml b/Source/Android/res/values-ja/strings.xml index 2415e704bf..5b71679efd 100644 --- a/Source/Android/res/values-ja/strings.xml +++ b/Source/Android/res/values-ja/strings.xml @@ -45,14 +45,20 @@ 入力 入力オーバーレイレイアウト 入力オーバーレイのためのボタンのレイアウト。 - ゲームキューブの入力バインディング + ゲームキューブコントローラの入力バインディング コントローラ1 コントローラ2 コントローラ3 コントローラ4 コントローラを有効 + Wiiリモコンの入力バインディング + Wiiリモコン1 + Wiiリモコン2 + Wiiリモコン3 + Wiiリモコン4 入力バインディング %1$sにバインドするための入力を移動または押してください。 + Aボタン Bボタン スタートボタン @@ -73,6 +79,29 @@ C-スティック: → 左のトリガー 右のトリガー + + ボタン1 + ボタン2 + ボタン+ + ボタン- + ホームボタン + IR ↑ + IR ↓ + IR ← + IR → + IR前方 + IR後方 + スイング ↑ + スイング ↓ + スイング ← + スイング → + 前方を傾 + 後方を傾 + 左を傾 + 右を傾 + Xを振る + Yを振る + Zを振る Interpreter diff --git a/Source/Android/res/values/strings.xml b/Source/Android/res/values/strings.xml index ada8417fbf..86cba61763 100644 --- a/Source/Android/res/values/strings.xml +++ b/Source/Android/res/values/strings.xml @@ -45,14 +45,21 @@ Input Input Overlay Layout Button layout for the input overlay. - Gamecube Input Bindings + Gamecube Controller Bindings Controller 1 Controller 2 Controller 3 Controller 4 Enable controller + Wiimote Bindings + Wiimote 1 + Wiimote 2 + Wiimote 3 + Wiimote 4 + Enable Wiimote Input Binding Press or move an input to bind it to %1$s. + Button A Button B Button Start @@ -73,6 +80,29 @@ C Stick Right Trigger L Trigger R + + Button 1 + Button 2 + Button + + Button - + Button Home + IR Up + IR Down + IR Left + IR Right + IR Forward + IR Backward + Swing Up + Swing Down + Swing Left + Swing Right + Tilt Forward + Tilt Backward + Tilt Left + Tilt Right + Shake X + Shake Y + Shake Z Interpreter @@ -96,7 +126,7 @@ %s Show FPS Show the number of frames rendered per second as a measure of emulation speed. - + Enhancements Internal Resolution Specifies the resolution used to render at. A high resolution will improve visual quality a lot but is also quite heavy on performance and might cause glitches in certain games. @@ -112,7 +142,7 @@ Force texture filtering even if the emulated game explicitly disabled it. Improves texture quality slightly but causes glitches in some games. Disable Fog Makes distant objects more visible by removing fog, thus increasing the overall detail. Disabling fog will break some games which rely on proper fog emulation. - + Hacks Embedded Frame Buffer Skip EFB Access from CPU @@ -140,13 +170,12 @@ Disables emulation of a hardware feature called destination alpha, which is used in many games for various effects. Fast Depth Calculation Uses a less accurate algorithm to calculate depth values. - + Yes No Cancel Disabled Other - diff --git a/Source/Android/res/xml/input_prefs.xml b/Source/Android/res/xml/input_prefs.xml index 439d80ebe3..22cf0117e9 100644 --- a/Source/Android/res/xml/input_prefs.xml +++ b/Source/Android/res/xml/input_prefs.xml @@ -7,6 +7,7 @@ android:summary="@string/input_overlay_layout_desc" android:title="@string/input_overlay_layout"/> + @@ -439,4 +440,603 @@ android:title="@string/trigger_right" /> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Source/Android/src/org/dolphinemu/dolphinemu/settings/input/InputConfigFragment.java b/Source/Android/src/org/dolphinemu/dolphinemu/settings/input/InputConfigFragment.java index 3544010604..b71baba565 100644 --- a/Source/Android/src/org/dolphinemu/dolphinemu/settings/input/InputConfigFragment.java +++ b/Source/Android/src/org/dolphinemu/dolphinemu/settings/input/InputConfigFragment.java @@ -36,7 +36,7 @@ public final class InputConfigFragment extends PreferenceFragment // Set the summary messages of the preferences to whatever binding // is currently set within the Dolphin config. - final String[] keys = + final String[] gamecubeKeys = { "InputA", "InputB", "InputX", "InputY", "InputZ", "InputStart", "DPadUp", "DPadDown", "DPadLeft", "DPadRight", @@ -45,10 +45,28 @@ public final class InputConfigFragment extends PreferenceFragment "InputL", "InputR" }; - // Loop through the keys for all 4 GameCube controllers. + final String[] wiimoteKeys = + { + "WiimoteInputA", "WiimoteInputB", "WiimoteInputOne", "WiimoteInputTwo", "WiimoteInputPlus", "WiimoteInputMinus", "WiimoteInputHome", + "WiimoteIRUp", "WiimoteIRDown", "WiimoteIRLeft", "WiimoteIRRight", "WiimoteIRForward", "WiimoteIRBackward", + "WiimoteSwingUp", "WiimoteSwingDown", "WiimoteSwingLeft", "WiimoteSwingRight", + "WiimoteTiltForward", "WiimoteTiltBackward", "WiimoteTiltLeft", "WiimoteTiltRight", + "WiimoteShakeX", "WiimoteShakeY", "WiimoteShakeZ", + "WiimoteDPadUp", "WiimoteDPadDown", "WiimoteDPadLeft", "WiimoteDPadRight" + }; + for (int i = 1; i <= 4; i++) { - for (String key : keys) + // Loop through the keys for all 4 GameCube controllers. + for (String key : gamecubeKeys) + { + final String binding = NativeLibrary.GetConfig("Dolphin.ini", "Android", key+"_"+i, "None"); + final Preference pref = findPreference(key+"_"+i); + pref.setSummary(binding); + } + + // Loop through the keys for the Wiimote + for (String key : wiimoteKeys) { final String binding = NativeLibrary.GetConfig("Dolphin.ini", "Android", key+"_"+i, "None"); final Preference pref = findPreference(key+"_"+i);