mirror of
https://github.com/hrydgard/ppsspp.git
synced 2025-02-01 19:23:04 +00:00
Merge pull request #1810 from makotech222/max-recent
Allow changing of MAX_RECENT in config file
This commit is contained in:
commit
50f8466ee8
@ -25,7 +25,6 @@
|
||||
|
||||
Config g_Config;
|
||||
|
||||
#define MAX_RECENT 12
|
||||
|
||||
#ifdef IOS
|
||||
extern bool isJailed;
|
||||
@ -64,6 +63,7 @@ void Config::Load(const char *iniFileName)
|
||||
general->Get("ShowDebuggerOnLoad", &bShowDebuggerOnLoad, false);
|
||||
general->Get("Language", &languageIni, "en_US");
|
||||
general->Get("NumWorkerThreads", &iNumWorkerThreads, cpu_info.num_cores);
|
||||
general->Get("MaxRecent", &iMaxRecent, 12);
|
||||
|
||||
// "default" means let emulator decide, "" means disable.
|
||||
general->Get("ReportHost", &sReportHost, "default");
|
||||
@ -72,8 +72,8 @@ void Config::Load(const char *iniFileName)
|
||||
general->Get("WindowY", &iWindowY, 100);
|
||||
general->Get("AutoSaveSymbolMap", &bAutoSaveSymbolMap, false);
|
||||
|
||||
if (recentIsos.size() > MAX_RECENT)
|
||||
recentIsos.resize(MAX_RECENT);
|
||||
if (recentIsos.size() > iMaxRecent)
|
||||
recentIsos.resize(iMaxRecent);
|
||||
|
||||
IniFile::Section *cpu = iniFile.GetOrCreateSection("CPU");
|
||||
#ifdef IOS
|
||||
@ -181,6 +181,7 @@ void Config::Save()
|
||||
general->Set("AutoSaveSymbolMap", bAutoSaveSymbolMap);
|
||||
general->Set("Language", languageIni);
|
||||
general->Set("NumWorkerThreads", iNumWorkerThreads);
|
||||
general->Set("MaxRecent", iMaxRecent);
|
||||
|
||||
IniFile::Section *cpu = iniFile.GetOrCreateSection("CPU");
|
||||
cpu->Set("Jit", bJit);
|
||||
@ -251,14 +252,14 @@ void Config::AddRecent(const std::string &file) {
|
||||
if (*str == file) {
|
||||
recentIsos.erase(str);
|
||||
recentIsos.insert(recentIsos.begin(), file);
|
||||
if (recentIsos.size() > MAX_RECENT)
|
||||
recentIsos.resize(MAX_RECENT);
|
||||
if (recentIsos.size() > iMaxRecent)
|
||||
recentIsos.resize(iMaxRecent);
|
||||
return;
|
||||
}
|
||||
}
|
||||
recentIsos.insert(recentIsos.begin(), file);
|
||||
if (recentIsos.size() > MAX_RECENT)
|
||||
recentIsos.resize(MAX_RECENT);
|
||||
if (recentIsos.size() > iMaxRecent)
|
||||
recentIsos.resize(iMaxRecent);
|
||||
}
|
||||
|
||||
void Config::CleanRecent() {
|
||||
|
@ -79,6 +79,7 @@ public:
|
||||
int iTexScalingType; // 0 = xBRZ, 1 = Hybrid
|
||||
bool bTexDeposterize;
|
||||
int iFpsLimit;
|
||||
int iMaxRecent;
|
||||
|
||||
// Sound
|
||||
bool bEnableSound;
|
||||
|
Loading…
x
Reference in New Issue
Block a user