Permalink
Browse files

Android: Initial implementation of Interface submenu

  • Loading branch information...
Ebola16 committed Mar 23, 2018
1 parent 54a6b0f commit 25179258b78b75f3cdf3f062197408db1076019d
@@ -120,7 +120,15 @@ private void loadSettingsList()
switch (mMenuTag)
{
case SettingsFile.FILE_NAME_DOLPHIN:
addCoreSettings(sl);
addConfigSettings(sl);
break;
case SettingsFile.SECTION_CONFIG_GENERAL:
addGeneralSettings(sl);
break;
case SettingsFile.SECTION_CONFIG_INTERFACE:
addInterfaceSettings(sl);
break;
case SettingsFile.FILE_NAME_GFX:
@@ -168,7 +176,13 @@ private void loadSettingsList()
mView.showSettingsList(mSettingsList);
}
private void addCoreSettings(ArrayList<SettingsItem> sl)
private void addConfigSettings(ArrayList<SettingsItem> sl)
{
sl.add(new SubmenuSetting(null, null, R.string.general_submenu, 0, SettingsFile.SECTION_CONFIG_GENERAL));
sl.add(new SubmenuSetting(null, null, R.string.interface_submenu, 0, SettingsFile.SECTION_CONFIG_INTERFACE));
}
private void addGeneralSettings(ArrayList<SettingsItem> sl)
{
Setting cpuCore = null;
Setting dualCore = null;
@@ -229,6 +243,17 @@ else if (defaultCpuCore == 4) // AArch64
sl.add(new CheckBoxSetting(SettingsFile.KEY_AUDIO_STRETCH, SettingsFile.SECTION_CORE, SettingsFile.SETTINGS_DOLPHIN, R.string.audio_stretch, R.string.audio_stretch_description, false, audioStretch));
}
private void addInterfaceSettings(ArrayList<SettingsItem> sl)
{
Setting usePanicHandlers = null;
if (!mSettings.get(SettingsFile.SETTINGS_DOLPHIN).isEmpty())
{
usePanicHandlers = mSettings.get(SettingsFile.SETTINGS_DOLPHIN).get(SettingsFile.SECTION_INTERFACE).getSetting(SettingsFile.KEY_USE_PANIC_HANDLERS);
}
sl.add(new CheckBoxSetting(SettingsFile.KEY_USE_PANIC_HANDLERS, SettingsFile.SECTION_INTERFACE, SettingsFile.SETTINGS_DOLPHIN, R.string.panic_handlers, R.string.panic_handlers_description, true, usePanicHandlers));
}
private void addGcPadSettings(ArrayList<SettingsItem> sl)
{
if (!mSettings.get(SettingsFile.SETTINGS_DOLPHIN).isEmpty())
@@ -283,8 +308,8 @@ private void addGraphicsSettings(ArrayList<SettingsItem> sl)
sl.add(new SingleChoiceSetting(SettingsFile.KEY_SHADER_COMPILATION_MODE, SettingsFile.SECTION_GFX_SETTINGS, SettingsFile.SETTINGS_GFX, R.string.shader_compilation_mode, R.string.shader_compilation_mode_descrip, R.array.shaderCompilationModeEntries, R.array.shaderCompilationModeValues, 0, shaderCompilationMode));
sl.add(new CheckBoxSetting(SettingsFile.KEY_WAIT_FOR_SHADERS, SettingsFile.SECTION_GFX_SETTINGS, SettingsFile.SETTINGS_GFX, R.string.wait_for_shaders, 0, false, waitForShaders));
sl.add(new SubmenuSetting(null, null, R.string.enhancements, 0, SettingsFile.SECTION_GFX_ENHANCEMENTS));
sl.add(new SubmenuSetting(null, null, R.string.hacks, 0, SettingsFile.SECTION_GFX_HACKS));
sl.add(new SubmenuSetting(null, null, R.string.enhancements_submenu, 0, SettingsFile.SECTION_GFX_ENHANCEMENTS));
sl.add(new SubmenuSetting(null, null, R.string.hacks_submenu, 0, SettingsFile.SECTION_GFX_HACKS));
}
private void addEnhanceSettings(ArrayList<SettingsItem> sl)
@@ -63,6 +63,10 @@ public SettingSection get(Object key)
public static final String FILE_NAME_WIIMOTE = "WiimoteNew";
public static final String SECTION_CORE = "Core";
public static final String SECTION_INTERFACE = "Interface";
public static final String SECTION_CONFIG_GENERAL = "General";
public static final String SECTION_CONFIG_INTERFACE = "Interface";
public static final String SECTION_GFX_SETTINGS = "Settings";
public static final String SECTION_GFX_ENHANCEMENTS = "Enhancements";
@@ -83,6 +87,8 @@ public SettingSection get(Object key)
public static final String KEY_SLOT_A_DEVICE = "SlotA";
public static final String KEY_SLOT_B_DEVICE = "SlotB";
public static final String KEY_USE_PANIC_HANDLERS = "UsePanicHandlers";
public static final String KEY_SHOW_FPS = "ShowFPS";
public static final String KEY_INTERNAL_RES = "InternalResolution";
public static final String KEY_FSAA = "MSAA";
@@ -108,7 +108,8 @@
<string name="turntable_effect_dial">Dial</string>
<string name="turntable_crossfade">Crossfade</string>
<!-- CPU Preference Fragment -->
<!-- General Preference Fragment -->
<string name="general_submenu">General</string>
<string name="cpu_core">CPU Core</string>
<string name="cpu_core_desc">%s</string>
<string name="dual_core">Dual Core</string>
@@ -126,13 +127,18 @@
<string name="audio_stretch">Audio Stretching</string>
<string name="audio_stretch_description">Stretches audio to reduce stuttering. Increases latency.</string>
<!-- Interface Preference Fragment -->
<string name="interface_submenu">Interface</string>
<string name="panic_handlers">Use Panic Handlers</string>
<string name="panic_handlers_description">Show a message box when a potentially serious error has occurred. Disabling this may avoid annoying and non-fatal messages, but it may result in major crashes having no explanation at all.</string>
<!-- Video Preference Fragment -->
<string name="video_backend">Video Backend</string>
<string name="video_backend_descrip">Select the API used for graphics rendering.</string>
<string name="show_fps">Show FPS</string>
<string name="show_fps_descrip">Show the number of frames rendered per second as a measure of emulation speed.</string>
<string name="enhancements">Enhancements</string>
<string name="enhancements_submenu">Enhancements</string>
<string name="internal_resolution">Internal Resolution</string>
<string name="internal_resolution_descrip">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.</string>
<string name="FSAA">Full-scene Anti-aliasing</string>
@@ -162,7 +168,7 @@
<string name="sterescopy_swap_eyes">Swap Eyes</string>
<string name="sterescopy_swap_eyes_descrip">Swap the left and right eye, mostly useful if you want to view side-by-side cross-eyed.</string>
<string name="hacks">Hacks</string>
<string name="hacks_submenu">Hacks</string>
<string name="embedded_frame_buffer">Embedded Frame Buffer</string>
<string name="skip_efb_access">Skip EFB Access from CPU</string>
<string name="skip_efb_access_descrip">Ignore any requests from the CPU to read/write to the EFB.</string>
@@ -806,6 +806,7 @@ void SConfig::LoadDefaults()
iLatency = 20;
m_audio_stretch = false;
m_audio_stretch_max_latency = 80;
bUsePanicHandlers = true;
iPosX = INT_MIN;
iPosY = INT_MIN;

0 comments on commit 2517925

Please sign in to comment.