Android Interface submenu: Add Show OSD Messages

This commit is contained in:
Ryan Meredith 2018-03-23 11:36:11 -04:00
parent 25179258b7
commit c2355d4f63
4 changed files with 7 additions and 0 deletions

View File

@ -246,12 +246,15 @@ public final class SettingsFragmentPresenter
private void addInterfaceSettings(ArrayList<SettingsItem> sl) private void addInterfaceSettings(ArrayList<SettingsItem> sl)
{ {
Setting usePanicHandlers = null; Setting usePanicHandlers = null;
Setting onScreenDisplayMessages = null;
if (!mSettings.get(SettingsFile.SETTINGS_DOLPHIN).isEmpty()) if (!mSettings.get(SettingsFile.SETTINGS_DOLPHIN).isEmpty())
{ {
usePanicHandlers = mSettings.get(SettingsFile.SETTINGS_DOLPHIN).get(SettingsFile.SECTION_INTERFACE).getSetting(SettingsFile.KEY_USE_PANIC_HANDLERS); usePanicHandlers = mSettings.get(SettingsFile.SETTINGS_DOLPHIN).get(SettingsFile.SECTION_INTERFACE).getSetting(SettingsFile.KEY_USE_PANIC_HANDLERS);
onScreenDisplayMessages = mSettings.get(SettingsFile.SETTINGS_DOLPHIN).get(SettingsFile.SECTION_INTERFACE).getSetting(SettingsFile.KEY_OSD_MESSAGES);
} }
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)); 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));
sl.add(new CheckBoxSetting(SettingsFile.KEY_OSD_MESSAGES, SettingsFile.SECTION_INTERFACE, SettingsFile.SETTINGS_DOLPHIN, R.string.osd_messages, R.string.osd_messages_description, true, onScreenDisplayMessages));
} }
private void addGcPadSettings(ArrayList<SettingsItem> sl) private void addGcPadSettings(ArrayList<SettingsItem> sl)

View File

@ -88,6 +88,7 @@ public final class SettingsFile
public static final String KEY_SLOT_B_DEVICE = "SlotB"; public static final String KEY_SLOT_B_DEVICE = "SlotB";
public static final String KEY_USE_PANIC_HANDLERS = "UsePanicHandlers"; public static final String KEY_USE_PANIC_HANDLERS = "UsePanicHandlers";
public static final String KEY_OSD_MESSAGES = "OnScreenDisplayMessages";
public static final String KEY_SHOW_FPS = "ShowFPS"; public static final String KEY_SHOW_FPS = "ShowFPS";
public static final String KEY_INTERNAL_RES = "InternalResolution"; public static final String KEY_INTERNAL_RES = "InternalResolution";

View File

@ -131,6 +131,8 @@
<string name="interface_submenu">Interface</string> <string name="interface_submenu">Interface</string>
<string name="panic_handlers">Use Panic Handlers</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> <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>
<string name="osd_messages">Show On-Screen Display Messages</string>
<string name="osd_messages_description">Display messages over the emulation screen area. These messages include memory card writes, video backend and CPU information, and JIT cache clearing.</string>
<!-- Video Preference Fragment --> <!-- Video Preference Fragment -->
<string name="video_backend">Video Backend</string> <string name="video_backend">Video Backend</string>

View File

@ -807,6 +807,7 @@ void SConfig::LoadDefaults()
m_audio_stretch = false; m_audio_stretch = false;
m_audio_stretch_max_latency = 80; m_audio_stretch_max_latency = 80;
bUsePanicHandlers = true; bUsePanicHandlers = true;
bOnScreenDisplayMessages = true;
iPosX = INT_MIN; iPosX = INT_MIN;
iPosY = INT_MIN; iPosY = INT_MIN;