Android: Don't copy global INIs into game INIs
See the source code comment in the next commit for why this is bad.
This commit is contained in:
parent
0a7395bfba
commit
7652023407
|
@ -97,31 +97,23 @@ public class Settings
|
||||||
{
|
{
|
||||||
sections = new Settings.SettingsSectionMap();
|
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
|
loadDolphinSettings(view);
|
||||||
filesToExclude.add(SettingsFile.FILE_NAME_WIIMOTE);
|
|
||||||
}
|
}
|
||||||
|
else
|
||||||
loadDolphinSettings(view, filesToExclude);
|
|
||||||
|
|
||||||
if (!TextUtils.isEmpty(gameId))
|
|
||||||
{
|
{
|
||||||
loadGenericGameSettings(gameId, view);
|
loadGenericGameSettings(gameId, view);
|
||||||
loadCustomGameSettings(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())
|
for (Map.Entry<String, List<String>> entry : configFileSectionsMap.entrySet())
|
||||||
{
|
{
|
||||||
String fileName = entry.getKey();
|
String fileName = entry.getKey();
|
||||||
if (filesToExclude == null || !filesToExclude.contains(fileName))
|
sections.putAll(SettingsFile.readFile(fileName, view));
|
||||||
{
|
|
||||||
sections.putAll(SettingsFile.readFile(fileName, view));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue