diff --git a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/features/settings/ui/SettingsActivity.java b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/features/settings/ui/SettingsActivity.java index 78b8ef2d1f4a..4d5ee630ac7e 100644 --- a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/features/settings/ui/SettingsActivity.java +++ b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/features/settings/ui/SettingsActivity.java @@ -18,6 +18,9 @@ import org.dolphinemu.dolphinemu.utils.DirectoryInitialization; import org.dolphinemu.dolphinemu.utils.DirectoryStateReceiver; +import java.util.HashMap; +import java.util.Map; + public final class SettingsActivity extends AppCompatActivity implements SettingsActivityView { private static final String ARG_MENU_TAG = "menu_tag"; @@ -27,6 +30,36 @@ public final class SettingsActivity extends AppCompatActivity implements Setting private ProgressDialog dialog; + private static final Map titles = new HashMap<>(); + + static + { + titles.put(MenuTag.CONFIG, R.string.preferences_settings); + titles.put(MenuTag.CONFIG_GENERAL, R.string.general_submenu); + titles.put(MenuTag.CONFIG_INTERFACE, R.string.interface_submenu); + titles.put(MenuTag.CONFIG_GAME_CUBE, R.string.gamecube_submenu); + titles.put(MenuTag.CONFIG_WII, R.string.wii_submenu); + titles.put(MenuTag.WIIMOTE, R.string.grid_menu_wiimote_settings); + titles.put(MenuTag.WIIMOTE_EXTENSION, R.string.wiimote_extensions); + titles.put(MenuTag.GCPAD_TYPE, R.string.grid_menu_gcpad_settings); + titles.put(MenuTag.GRAPHICS, R.string.grid_menu_graphics_settings); + titles.put(MenuTag.HACKS, R.string.hacks_submenu); + titles.put(MenuTag.ENHANCEMENTS, R.string.enhancements_submenu); + titles.put(MenuTag.STEREOSCOPY, R.string.stereoscopy_submenu); + titles.put(MenuTag.GCPAD_1, R.string.controller_0); + titles.put(MenuTag.GCPAD_2, R.string.controller_1); + titles.put(MenuTag.GCPAD_3, R.string.controller_2); + titles.put(MenuTag.GCPAD_4, R.string.controller_3); + titles.put(MenuTag.WIIMOTE_1, R.string.wiimote_4); + titles.put(MenuTag.WIIMOTE_2, R.string.wiimote_5); + titles.put(MenuTag.WIIMOTE_3, R.string.wiimote_6); + titles.put(MenuTag.WIIMOTE_4, R.string.wiimote_7); + titles.put(MenuTag.WIIMOTE_EXTENSION_1, R.string.wiimote_extension_4); + titles.put(MenuTag.WIIMOTE_EXTENSION_2, R.string.wiimote_extension_5); + titles.put(MenuTag.WIIMOTE_EXTENSION_3, R.string.wiimote_extension_6); + titles.put(MenuTag.WIIMOTE_EXTENSION_4, R.string.wiimote_extension_7); + } + public static void launch(Context context, MenuTag menuTag, String gameId) { Intent settings = new Intent(context, SettingsActivity.class); @@ -94,6 +127,13 @@ protected void onStop() @Override public void onBackPressed() { + Intent launcher = getIntent(); + MenuTag menuTag = (MenuTag) launcher.getSerializableExtra(ARG_MENU_TAG); + if (titles.containsKey(menuTag)) + { + setTitle(titles.get(menuTag)); + } + mPresenter.onBackPressed(); } @@ -122,6 +162,11 @@ public void showSettingsFragment(MenuTag menuTag, Bundle extras, boolean addToSt FRAGMENT_TAG); transaction.commit(); + + if (titles.containsKey(menuTag)) + { + setTitle(titles.get(menuTag)); + } } private boolean areSystemAnimationsEnabled() diff --git a/Source/Android/app/src/main/res/values/strings.xml b/Source/Android/app/src/main/res/values/strings.xml index 7527bfb97a7b..5b5251eb78bc 100644 --- a/Source/Android/app/src/main/res/values/strings.xml +++ b/Source/Android/app/src/main/res/values/strings.xml @@ -31,6 +31,15 @@ Wii Remote 4 + + Wii Remote Extension 1 + Wii Remote Extension 2 + Wii Remote Extension 3 + Wii Remote Extension 4 + + Extension Choose and bind the Wii Remote extension. IR