mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-11-25 15:23:35 +01:00
Background thread for icon loading, show in game list. Switch to GNU STL in Android port.
This commit is contained in:
1 parent
5828fe5728
commit
e3fb88de68
16 files changed
+204
-118
No files matched your search
@@ -16,6 +16,7 @@
|
||||
// https://github.com/hrydgard/ppsspp and http://www.ppsspp.org/.
|
||||
|
||||
|
||||
#include "Common/FileUtil.h"
|
||||
#include "Config.h"
|
||||
#include "IniFile.h"
|
||||
#include "HLE/sceUtility.h"
|
||||
@@ -122,6 +123,7 @@ void Config::Load(const char *iniFileName)
|
||||
pspConfig->Get("TimeFormat", &itimeformat, PSP_SYSTEMPARAM_TIME_FORMAT_24HR);
|
||||
pspConfig->Get("EncryptSave", &bEncryptSave, true);
|
||||
|
||||
CleanRecent();
|
||||
// Ephemeral settings
|
||||
bDrawWireframe = false;
|
||||
}
|
||||
@@ -129,6 +131,7 @@ void Config::Load(const char *iniFileName)
|
||||
void Config::Save()
|
||||
{
|
||||
if (iniFilename_.size() && g_Config.bSaveSettings) {
|
||||
CleanRecent();
|
||||
IniFile iniFile;
|
||||
if (!iniFile.Load(iniFilename_.c_str())) {
|
||||
ERROR_LOG(LOADER, "Error saving config - can't read ini %s", iniFilename_.c_str());
|
||||
@@ -210,3 +213,13 @@ void Config::AddRecent(const std::string &file) {
|
||||
if (recentIsos.size() > MAX_RECENT)
|
||||
recentIsos.resize(MAX_RECENT);
|
||||
}
|
||||
|
||||
void Config::CleanRecent() {
|
||||
std::vector<std::string> cleanedRecent;
|
||||
for (size_t i = 0; i < recentIsos.size(); i++) {
|
||||
if (File::Exists(recentIsos[i]))
|
||||
cleanedRecent.push_back(recentIsos[i]);
|
||||
}
|
||||
recentIsos = cleanedRecent;
|
||||
|
||||
}
|
||||
Reference in new issue
Block a user