Android: Android INI section

This commit is contained in:
Ryan Meredith 2020-06-14 10:54:08 -04:00
parent 9f5e6edc34
commit bebeb935a5
2 changed files with 9 additions and 6 deletions

View File

@ -17,6 +17,7 @@ import java.util.TreeMap;
public class Settings
{
public static final String SECTION_INI_ANDROID = "Android";
public static final String SECTION_INI_GENERAL = "General";
public static final String SECTION_INI_CORE = "Core";
public static final String SECTION_INI_INTERFACE = "Interface";
@ -49,9 +50,10 @@ public class Settings
static
{
configFileSectionsMap.put(SettingsFile.FILE_NAME_DOLPHIN,
Arrays.asList(SECTION_INI_GENERAL, SECTION_INI_CORE, SECTION_INI_INTERFACE,
SECTION_INI_DSP,
SECTION_BINDINGS, SECTION_ANALYTICS, SECTION_DEBUG));
Arrays
.asList(SECTION_INI_ANDROID, SECTION_INI_GENERAL, SECTION_INI_CORE,
SECTION_INI_INTERFACE,
SECTION_INI_DSP, SECTION_BINDINGS, SECTION_ANALYTICS, SECTION_DEBUG));
configFileSectionsMap.put(SettingsFile.FILE_NAME_GFX,
Arrays.asList(SECTION_GFX_SETTINGS, SECTION_GFX_ENHANCEMENTS, SECTION_GFX_HACKS,
SECTION_STEREOSCOPY));
@ -189,7 +191,7 @@ public class Settings
if (modifiedSettings.contains(SettingsFile.KEY_DSP_ENGINE))
{
switch (NativeLibrary
.GetConfig(SettingsFile.FILE_NAME_DOLPHIN + ".ini", Settings.SECTION_INI_DSP,
.GetConfig(SettingsFile.FILE_NAME_DOLPHIN + ".ini", Settings.SECTION_INI_ANDROID,
SettingsFile.KEY_DSP_ENGINE, DSP_HLE))
{
case DSP_HLE:

View File

@ -284,9 +284,10 @@ public final class SettingsFragmentPresenter
Setting audioStretch = null;
Setting audioVolume = null;
SettingSection androidSection = mSettings.getSection(Settings.SECTION_INI_ANDROID);
SettingSection coreSection = mSettings.getSection(Settings.SECTION_INI_CORE);
SettingSection dspSection = mSettings.getSection(Settings.SECTION_INI_DSP);
dspEmulationEngine = dspSection.getSetting(SettingsFile.KEY_DSP_ENGINE);
dspEmulationEngine = androidSection.getSetting(SettingsFile.KEY_DSP_ENGINE);
audioStretch = coreSection.getSetting(SettingsFile.KEY_AUDIO_STRETCH);
audioVolume = dspSection.getSetting(SettingsFile.KEY_AUDIO_VOLUME);
@ -306,7 +307,7 @@ public final class SettingsFragmentPresenter
}
// DSP Emulation Engine controls two settings.
// DSP Emulation Engine is read by Settings.saveSettings to modify the relevant settings.
sl.add(new SingleChoiceSetting(SettingsFile.KEY_DSP_ENGINE, Settings.SECTION_INI_DSP,
sl.add(new SingleChoiceSetting(SettingsFile.KEY_DSP_ENGINE, Settings.SECTION_INI_ANDROID,
R.string.dsp_emulation_engine, 0, dspEngineEntries, dspEngineValues, 0,
dspEmulationEngine));
sl.add(new CheckBoxSetting(SettingsFile.KEY_AUDIO_STRETCH, Settings.SECTION_INI_CORE,