mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-10-18 00:40:30 +02:00
Theme: Avoid checking the ui_atlas multiple times
This commit is contained in:
1 parent
4e9e767e41
commit
98780ba603
2 files changed
+19
-6
No files matched your search
+12
-6
@@ -140,14 +140,20 @@ static void LoadThemeInfo(const std::vector<Path> &directories) {
|
||||
std::string tmpPath;
|
||||
section.Get("UIAtlas", &tmpPath, "");
|
||||
if (!tmpPath.empty()) {
|
||||
tmpPath = (path / tmpPath).ToString();
|
||||
|
||||
File::FileInfo tmpInfo;
|
||||
if (g_VFS.GetFileInfo((tmpPath + ".meta").c_str(), &tmpInfo) && g_VFS.GetFileInfo((tmpPath + ".zim").c_str(), &tmpInfo)) {
|
||||
info.sUIAtlas = tmpPath;
|
||||
if (tmpPath == "../ui_atlas") {
|
||||
// Do nothing.
|
||||
} else {
|
||||
// WARNING: Note that the below appears to be entirely broken. ..-navigation doesn't work on zip VFS.
|
||||
INFO_LOG(Log::System, "Checking %s", tmpPath.c_str());
|
||||
tmpPath = (path / tmpPath).ToString();
|
||||
if (g_VFS.Exists((tmpPath + ".meta").c_str()) && g_VFS.Exists((tmpPath + ".zim").c_str())) {
|
||||
// INFO_LOG(Log::System, "%s exists", tmpPath.c_str());
|
||||
info.sUIAtlas = tmpPath;
|
||||
} else {
|
||||
INFO_LOG(Log::System, "%s.meta/zim doesn't exist, not overriding atlas", tmpPath.c_str());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
appendTheme(info);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user