Merge pull request #5439 from SeannyM/crash-fix

Android: Initialize video backend setting on first run
This commit is contained in:
Markus Wick 2017-05-18 15:15:05 +02:00 committed by GitHub
commit ec7c4ff92e

View File

@ -260,6 +260,13 @@ public final class SettingsFragmentPresenter
mView.passSettingsToActivity(mSettings);
}
if (mSettings.get(SettingsFile.SETTINGS_DOLPHIN).isEmpty())
{
mSettings.get(SettingsFile.SETTINGS_DOLPHIN).put(SettingsFile.SECTION_CORE, new SettingSection(SettingsFile.SECTION_CORE));
mView.passSettingsToActivity(mSettings);
}
sl.add(new SingleChoiceSetting(SettingsFile.KEY_VIDEO_BACKEND_INDEX, SettingsFile.SECTION_CORE, SettingsFile.SETTINGS_DOLPHIN, R.string.video_backend, R.string.video_backend_descrip, R.array.videoBackendEntries, R.array.videoBackendValues, 0, videoBackend));
sl.add(new CheckBoxSetting(SettingsFile.KEY_SHOW_FPS, SettingsFile.SECTION_GFX_SETTINGS, SettingsFile.SETTINGS_GFX, R.string.show_fps, 0, true, showFps));