diff --git a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/features/settings/ui/MenuTag.java b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/features/settings/ui/MenuTag.java index ef7aca9f04..7abb91b425 100644 --- a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/features/settings/ui/MenuTag.java +++ b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/features/settings/ui/MenuTag.java @@ -5,9 +5,11 @@ public enum MenuTag CONFIG("config"), CONFIG_GENERAL("config_general"), CONFIG_INTERFACE("config_interface"), + CONFIG_AUDIO("audio"), CONFIG_PATHS("config_paths"), CONFIG_GAME_CUBE("config_gamecube"), CONFIG_WII("config_wii"), + CONFIG_ADVANCED("config_advanced"), WIIMOTE("wiimote"), WIIMOTE_EXTENSION("wiimote_extension"), GCPAD_TYPE("gc_pad_type"), diff --git a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/features/settings/ui/SettingsFragment.java b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/features/settings/ui/SettingsFragment.java index 0fdafbb890..0828ff39c3 100644 --- a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/features/settings/ui/SettingsFragment.java +++ b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/features/settings/ui/SettingsFragment.java @@ -38,9 +38,11 @@ public final class SettingsFragment extends Fragment implements SettingsFragment 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_AUDIO, R.string.audio_submenu); titles.put(MenuTag.CONFIG_PATHS, R.string.paths_submenu); titles.put(MenuTag.CONFIG_GAME_CUBE, R.string.gamecube_submenu); titles.put(MenuTag.CONFIG_WII, R.string.wii_submenu); + titles.put(MenuTag.CONFIG_ADVANCED, R.string.advanced_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); diff --git a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/features/settings/ui/SettingsFragmentPresenter.java b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/features/settings/ui/SettingsFragmentPresenter.java index d0db5c8a1c..261ed8a1ff 100644 --- a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/features/settings/ui/SettingsFragmentPresenter.java +++ b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/features/settings/ui/SettingsFragmentPresenter.java @@ -136,6 +136,10 @@ public final class SettingsFragmentPresenter addInterfaceSettings(sl); break; + case CONFIG_AUDIO: + addAudioSettings(sl); + break; + case CONFIG_PATHS: addPathsSettings(sl); break; @@ -148,6 +152,10 @@ public final class SettingsFragmentPresenter addWiiSettings(sl); break; + case CONFIG_ADVANCED: + addAdvancedSettings(sl); + break; + case GRAPHICS: addGraphicsSettings(sl); break; @@ -210,90 +218,47 @@ public final class SettingsFragmentPresenter { sl.add(new SubmenuSetting(null, null, R.string.general_submenu, 0, MenuTag.CONFIG_GENERAL)); sl.add(new SubmenuSetting(null, null, R.string.interface_submenu, 0, MenuTag.CONFIG_INTERFACE)); + sl.add(new SubmenuSetting(null, null, R.string.audio_submenu, 0, MenuTag.CONFIG_AUDIO)); sl.add(new SubmenuSetting(null, null, R.string.paths_submenu, 0, MenuTag.CONFIG_PATHS)); - sl.add(new SubmenuSetting(null, null, R.string.gamecube_submenu, 0, MenuTag.CONFIG_GAME_CUBE)); sl.add(new SubmenuSetting(null, null, R.string.wii_submenu, 0, MenuTag.CONFIG_WII)); + sl.add(new SubmenuSetting(null, null, R.string.advanced_submenu, 0, MenuTag.CONFIG_ADVANCED)); sl.add(new SubmenuSetting(null, null, R.string.debug_submenu, 0, MenuTag.DEBUG)); sl.add(new HeaderSetting(null, null, R.string.gametdb_thanks, 0)); } private void addGeneralSettings(ArrayList sl) { - Setting cpuCore = null; Setting dualCore = null; - Setting overclockEnable = null; - Setting overclock = null; - Setting speedLimit = null; - Setting audioStretch = null; - Setting audioVolume = null; Setting overrideRegionSettings = null; Setting autoDiscChange = null; + Setting speedLimit = null; Setting analytics = null; - Setting enableSaveState; + Setting enableSaveState = null; SettingSection coreSection = mSettings.getSection(Settings.SECTION_INI_CORE); - SettingSection dspSection = mSettings.getSection(Settings.SECTION_INI_DSP); SettingSection analyticsSection = mSettings.getSection(Settings.SECTION_ANALYTICS); - cpuCore = coreSection.getSetting(SettingsFile.KEY_CPU_CORE); dualCore = coreSection.getSetting(SettingsFile.KEY_DUAL_CORE); - overclockEnable = coreSection.getSetting(SettingsFile.KEY_OVERCLOCK_ENABLE); - overclock = coreSection.getSetting(SettingsFile.KEY_OVERCLOCK_PERCENT); - speedLimit = coreSection.getSetting(SettingsFile.KEY_SPEED_LIMIT); - audioStretch = coreSection.getSetting(SettingsFile.KEY_AUDIO_STRETCH); - audioVolume = dspSection.getSetting(SettingsFile.KEY_AUDIO_VOLUME); overrideRegionSettings = coreSection.getSetting(SettingsFile.KEY_OVERRIDE_REGION_SETTINGS); autoDiscChange = coreSection.getSetting(SettingsFile.KEY_AUTO_DISC_CHANGE); + speedLimit = coreSection.getSetting(SettingsFile.KEY_SPEED_LIMIT); analytics = analyticsSection.getSetting(SettingsFile.KEY_ANALYTICS_ENABLED); enableSaveState = coreSection.getSetting(SettingsFile.KEY_ENABLE_SAVE_STATES); - // TODO: Having different emuCoresEntries/emuCoresValues for each architecture is annoying. - // The proper solution would be to have one emuCoresEntries and one emuCoresValues - // and exclude the values that aren't present in PowerPC::AvailableCPUCores(). - int defaultCpuCore = NativeLibrary.DefaultCPUCore(); - int emuCoresEntries; - int emuCoresValues; - if (defaultCpuCore == 1) // x86-64 - { - emuCoresEntries = R.array.emuCoresEntriesX86_64; - emuCoresValues = R.array.emuCoresValuesX86_64; - } - else if (defaultCpuCore == 4) // AArch64 - { - emuCoresEntries = R.array.emuCoresEntriesARM64; - emuCoresValues = R.array.emuCoresValuesARM64; - } - else - { - emuCoresEntries = R.array.emuCoresEntriesGeneric; - emuCoresValues = R.array.emuCoresValuesGeneric; - } - sl.add(new SingleChoiceSetting(SettingsFile.KEY_CPU_CORE, Settings.SECTION_INI_CORE, - R.string.cpu_core, 0, emuCoresEntries, emuCoresValues, defaultCpuCore, cpuCore)); sl.add(new CheckBoxSetting(SettingsFile.KEY_DUAL_CORE, Settings.SECTION_INI_CORE, R.string.dual_core, R.string.dual_core_description, true, dualCore)); - sl.add(new CheckBoxSetting(SettingsFile.KEY_OVERCLOCK_ENABLE, Settings.SECTION_INI_CORE, - R.string.overclock_enable, R.string.overclock_enable_description, false, - overclockEnable)); - sl.add(new SliderSetting(SettingsFile.KEY_OVERCLOCK_PERCENT, Settings.SECTION_INI_CORE, - R.string.overclock_title, R.string.overclock_title_description, 400, "%", 100, - overclock)); - sl.add(new SliderSetting(SettingsFile.KEY_SPEED_LIMIT, Settings.SECTION_INI_CORE, - R.string.speed_limit, 0, 200, "%", 100, speedLimit)); - sl.add(new CheckBoxSetting(SettingsFile.KEY_AUDIO_STRETCH, Settings.SECTION_INI_CORE, - R.string.audio_stretch, R.string.audio_stretch_description, false, audioStretch)); - sl.add(new SliderSetting(SettingsFile.KEY_AUDIO_VOLUME, Settings.SECTION_INI_DSP, - R.string.audio_volume, 0, 100, "%", 100, audioVolume)); sl.add(new CheckBoxSetting(SettingsFile.KEY_OVERRIDE_REGION_SETTINGS, Settings.SECTION_INI_CORE, R.string.override_region_settings, 0, false, overrideRegionSettings)); sl.add(new CheckBoxSetting(SettingsFile.KEY_AUTO_DISC_CHANGE, Settings.SECTION_INI_CORE, R.string.auto_disc_change, 0, false, autoDiscChange)); + sl.add(new SliderSetting(SettingsFile.KEY_SPEED_LIMIT, Settings.SECTION_INI_CORE, + R.string.speed_limit, 0, 200, "%", 100, speedLimit)); + sl.add(new CheckBoxSetting(SettingsFile.KEY_ANALYTICS_ENABLED, Settings.SECTION_ANALYTICS, + R.string.analytics, 0, false, analytics)); sl.add(new CheckBoxSetting(SettingsFile.KEY_ENABLE_SAVE_STATES, Settings.SECTION_INI_CORE, R.string.enable_save_states, R.string.enable_save_states_description, false, enableSaveState)); - sl.add(new CheckBoxSetting(SettingsFile.KEY_ANALYTICS_ENABLED, Settings.SECTION_ANALYTICS, - R.string.analytics, 0, false, analytics)); } private void addInterfaceSettings(ArrayList sl) @@ -313,6 +278,22 @@ public final class SettingsFragmentPresenter onScreenDisplayMessages)); } + private void addAudioSettings(ArrayList sl) + { + Setting audioStretch = null; + Setting audioVolume = null; + + SettingSection coreSection = mSettings.getSection(Settings.SECTION_INI_CORE); + SettingSection dspSection = mSettings.getSection(Settings.SECTION_INI_DSP); + audioStretch = coreSection.getSetting(SettingsFile.KEY_AUDIO_STRETCH); + audioVolume = dspSection.getSetting(SettingsFile.KEY_AUDIO_VOLUME); + + sl.add(new CheckBoxSetting(SettingsFile.KEY_AUDIO_STRETCH, Settings.SECTION_INI_CORE, + R.string.audio_stretch, R.string.audio_stretch_description, false, audioStretch)); + sl.add(new SliderSetting(SettingsFile.KEY_AUDIO_VOLUME, Settings.SECTION_INI_DSP, + R.string.audio_volume, 0, 100, "%", 100, audioVolume)); + } + private void addPathsSettings(ArrayList sl) { Setting defaultISO = null; @@ -392,6 +373,48 @@ public final class SettingsFragmentPresenter R.string.wiimote_speaker, R.string.wiimote_speaker_description, true, wiimoteSpeaker)); } + private void addAdvancedSettings(ArrayList sl) + { + Setting cpuCore = null; + Setting overclockEnable = null; + Setting overclock = null; + + SettingSection coreSection = mSettings.getSection(Settings.SECTION_INI_CORE); + cpuCore = coreSection.getSetting(SettingsFile.KEY_CPU_CORE); + overclockEnable = coreSection.getSetting(SettingsFile.KEY_OVERCLOCK_ENABLE); + overclock = coreSection.getSetting(SettingsFile.KEY_OVERCLOCK_PERCENT); + + // TODO: Having different emuCoresEntries/emuCoresValues for each architecture is annoying. + // The proper solution would be to have one emuCoresEntries and one emuCoresValues + // and exclude the values that aren't present in PowerPC::AvailableCPUCores(). + int defaultCpuCore = NativeLibrary.DefaultCPUCore(); + int emuCoresEntries; + int emuCoresValues; + if (defaultCpuCore == 1) // x86-64 + { + emuCoresEntries = R.array.emuCoresEntriesX86_64; + emuCoresValues = R.array.emuCoresValuesX86_64; + } + else if (defaultCpuCore == 4) // AArch64 + { + emuCoresEntries = R.array.emuCoresEntriesARM64; + emuCoresValues = R.array.emuCoresValuesARM64; + } + else + { + emuCoresEntries = R.array.emuCoresEntriesGeneric; + emuCoresValues = R.array.emuCoresValuesGeneric; + } + sl.add(new SingleChoiceSetting(SettingsFile.KEY_CPU_CORE, Settings.SECTION_INI_CORE, + R.string.cpu_core, 0, emuCoresEntries, emuCoresValues, defaultCpuCore, cpuCore)); + sl.add(new CheckBoxSetting(SettingsFile.KEY_OVERCLOCK_ENABLE, Settings.SECTION_INI_CORE, + R.string.overclock_enable, R.string.overclock_enable_description, false, + overclockEnable)); + sl.add(new SliderSetting(SettingsFile.KEY_OVERCLOCK_PERCENT, Settings.SECTION_INI_CORE, + R.string.overclock_title, R.string.overclock_title_description, 400, "%", 100, + overclock)); + } + private void addGcPadSettings(ArrayList sl) { for (int i = 0; i < 4; i++) diff --git a/Source/Android/app/src/main/res/values/strings.xml b/Source/Android/app/src/main/res/values/strings.xml index df006410f1..fd37f0694a 100644 --- a/Source/Android/app/src/main/res/values/strings.xml +++ b/Source/Android/app/src/main/res/values/strings.xml @@ -123,14 +123,8 @@ General - CPU Core - %s Dual Core Split workload to two CPU cores instead of one. Increases speed. - Override Emulated CPU Clock Speed - Higher values can make variable-framerate games run at a higher framerate, requiring a powerful device. Lower values make games run at a lower framerate, increasing emulation speed, but reducing the emulated console\'s performance. - Emulated CPU Clock Speed - Adjusts the emulated CPU\'s clock rate if \"Override Emulated CPU Clock Speed\" is enabled. Speed Limit WARNING: Changing this from the default (100%) WILL break games and cause glitches. Please do not report bugs that occur with a non-default clock. GameCube @@ -142,8 +136,6 @@ Leave this on if you are using a DolphinBar for real Wiimote support. Wii Remote Speaker Enable sound output through the speaker on a real Wiimote (DolphinBar required). - Audio Stretching - Stretches audio to reduce stuttering. Increases latency. Allow Mismatched Region Settings Change Discs Automatically Enable Savestates @@ -153,7 +145,6 @@ Enable usage statistics reporting If authorized, Dolphin can collect data on its performance, feature usage, and configuration, as well as data on your system\'s hardware and operating system.\n\nNo private data is ever collected. This data helps us understand how people and emulated games use Dolphin and prioritize our efforts. It also helps us identify rare configurations that are causing bugs, performance and stability issues. This authorization can be revoked at any time through Dolphin\'s settings. Thanks to GameTDB.com for providing GameCube and Wii covers! - Audio Volume Interface @@ -162,6 +153,12 @@ Show On-Screen Display Messages Display messages over the emulation screen area. These messages include memory card writes, video backend and CPU information, and JIT cache clearing. + + Audio + Audio Stretching + Stretches audio to reduce stuttering. Increases latency. + Audio Volume + Paths Default ISO @@ -255,6 +252,14 @@ Compile Shaders Before Starting This causes a delay when launching games, but will reduce stuttering early on. + + Advanced + CPU Core + Override Emulated CPU Clock Speed + Higher values can make variable-framerate games run at a higher framerate, requiring a powerful device. Lower values make games run at a lower framerate, increasing emulation speed, but reducing the emulated console\'s performance. + Emulated CPU Clock Speed + Adjusts the emulated CPU\'s clock rate if \"Override Emulated CPU Clock Speed\" is enabled. + Debug Warning: These settings will slow emulation