Skip to content
Permalink
Browse files

Android: Don't copy global INIs into game INIs

See the source code comment in the next commit for why this is bad.
  • Loading branch information...
JosJuice committed Jun 17, 2019
1 parent 0a7395b commit 7652023407679cb5c9723ca006c1f88f847ae8db
@@ -97,31 +97,23 @@ public void loadSettings(SettingsActivityView view)
{
sections = new Settings.SettingsSectionMap();

HashSet<String> filesToExclude = new HashSet<>();
if (!TextUtils.isEmpty(gameId))
if (TextUtils.isEmpty(gameId))
{
// for per-game settings, don't load the WiiMoteNew.ini settings
filesToExclude.add(SettingsFile.FILE_NAME_WIIMOTE);
loadDolphinSettings(view);
}

loadDolphinSettings(view, filesToExclude);

if (!TextUtils.isEmpty(gameId))
else
{
loadGenericGameSettings(gameId, view);
loadCustomGameSettings(gameId, view);
}
}

private void loadDolphinSettings(SettingsActivityView view, HashSet<String> filesToExclude)
private void loadDolphinSettings(SettingsActivityView view)
{
for (Map.Entry<String, List<String>> entry : configFileSectionsMap.entrySet())
{
String fileName = entry.getKey();
if (filesToExclude == null || !filesToExclude.contains(fileName))
{
sections.putAll(SettingsFile.readFile(fileName, view));
}
sections.putAll(SettingsFile.readFile(fileName, view));
}
}

0 comments on commit 7652023

Please sign in to comment.
You can’t perform that action at this time.