mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-12-01 02:03:47 +01:00
Add a hidden option to not download infra-dns.json, instead use the file from assets
This commit is contained in:
1 parent
41b93c895c
commit
8818e440ad
4 files changed
+16
-1
No files matched your search
@@ -342,6 +342,18 @@ bool PollInfraJsonDownload(std::string *jsonOutput) {
|
||||
return true;
|
||||
}
|
||||
|
||||
if (!g_Config.bDontDownloadInfraJson) {
|
||||
NOTICE_LOG(Log::sceNet, "As specified by the ini setting DontDownloadInfraJson, using infra-dns.json from /assets");
|
||||
size_t jsonSize = 0;
|
||||
std::unique_ptr<uint8_t[]> jsonStr(g_VFS.ReadFile("infra-dns.json", &jsonSize));
|
||||
if (!jsonStr) {
|
||||
jsonOutput->clear();
|
||||
return true; // A clear output but returning true means something vent very wrong.
|
||||
}
|
||||
*jsonOutput = std::string((const char *)jsonStr.get(), jsonSize);
|
||||
return true;
|
||||
}
|
||||
|
||||
if (!g_infraDL) {
|
||||
INFO_LOG(Log::sceNet, "No json download going on");
|
||||
return false;
|
||||
|
||||
Reference in new issue
Block a user