Add a hidden option to not download infra-dns.json, instead use the file from assets

This commit is contained in:
Henrik Rydgård committed 2025-01-28 13:45:28 +01:00
1 parent 41b93c895c
commit 8818e440ad
4 files changed
+16 -1

No files matched your search

+12
View File
@@ -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;