mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-11-25 07:13:34 +01:00
Support pinning paths in the game browser.
For example, you might have games in multiple places, internal and external storage, or a projects directory in addition to regular games, etc.
This commit is contained in:
1 parent
dcee781ae8
commit
4ed419d4d5
3 files changed
+129
-7
No files matched your search
+15
-1
@@ -131,6 +131,12 @@ void Config::Load(const char *iniFileName, const char *controllerIniFilename) {
|
||||
}
|
||||
}
|
||||
|
||||
auto pinnedPaths = iniFile.GetOrCreateSection("PinnedPaths")->ToMap();
|
||||
vPinnedPaths.clear();
|
||||
for (auto it = pinnedPaths.begin(), end = pinnedPaths.end(); it != end; ++it) {
|
||||
vPinnedPaths.push_back(it->second);
|
||||
}
|
||||
|
||||
IniFile::Section *cpu = iniFile.GetOrCreateSection("CPU");
|
||||
#ifdef IOS
|
||||
cpu->Get("Jit", &bJit, iosCanUseJit);
|
||||
@@ -464,6 +470,14 @@ void Config::Save() {
|
||||
}
|
||||
}
|
||||
|
||||
IniFile::Section *pinnedPaths = iniFile.GetOrCreateSection("PinnedPaths");
|
||||
pinnedPaths->Clear();
|
||||
for (size_t i = 0; i < vPinnedPaths.size(); ++i) {
|
||||
char keyName[64];
|
||||
snprintf(keyName, sizeof(keyName), "Path%d", i);
|
||||
pinnedPaths->Set(keyName, vPinnedPaths[i]);
|
||||
}
|
||||
|
||||
IniFile::Section *cpu = iniFile.GetOrCreateSection("CPU");
|
||||
cpu->Set("Jit", bJit);
|
||||
cpu->Set("SeparateCPUThread", bSeparateCPUThread);
|
||||
@@ -804,4 +818,4 @@ void Config::ResetControlLayout() {
|
||||
g_Config.fAnalogStickX = -1.0;
|
||||
g_Config.fAnalogStickY = -1.0;
|
||||
g_Config.fAnalogStickScale = defaultScale;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user