Merge pull request #19022 from hrydgard/minor-fixes

Some logging fixes
This commit is contained in:
Henrik Rydgård authored and GitHub committed 2024-04-09 19:16:12 +02:00
commit c6d2fba2f1
2 files changed
+13 -5

No files matched your search

+3 -4
View File
@@ -2602,16 +2602,15 @@ int __IoIoctl(u32 id, u32 cmd, u32 indataPtr, u32 inlen, u32 outdataPtr, u32 out
pspFileSystem.ReadFile(f->handle, pgd_header, 0x90);
f->pgdInfo = pgd_open(pgd_header, 2, key_ptr);
if (!f->pgdInfo) {
ERROR_LOG(SCEIO, "Not a valid PGD file. Examining.");
f->npdrm = false;
pspFileSystem.SeekFile(f->handle, (s32)0, FILEMOVE_BEGIN);
if (memcmp(pgd_header, pgd_magic, 4) == 0) {
ERROR_LOG(SCEIO, "File is PGD file, but there's likely a key mismatch. Returning error.");
ERROR_LOG(SCEIO, "%s is PGD file, but there's likely a key mismatch. Returning error.", f->fullpath.c_str());
// File is PGD file, but key mismatch
return ERROR_PGD_INVALID_HEADER;
} else {
WARN_LOG(SCEIO, "File is not encrypted, proceeding.");
// File is decrypted.
INFO_LOG(SCEIO, "%s is not an encrypted PGD file as was expected. Proceeding.", f->fullpath.c_str());
// File is not encrypted.
return 0;
}
} else {
+10 -1
View File
@@ -28,7 +28,16 @@ std::vector<uint8_t> CompileShaderToBytecodeD3D11(const char *code, size_t codeS
errors = std::string((const char *)errorMsgs->GetBufferPointer(), errorMsgs->GetBufferSize());
std::string numberedCode = LineNumberString(code);
if (SUCCEEDED(result)) {
WARN_LOG(G3D, "%s: %s", "warnings", errors.c_str());
std::vector<std::string_view> lines;
SplitString(errors, '\n', lines);
for (auto &line : lines) {
auto trimmed = StripSpaces(line);
// Ignore the useless warning about taking the power of negative numbers.
if (trimmed.find("pow(f, e) will not work for negative f") != std::string::npos) {
continue;
}
WARN_LOG(G3D, "%.*s", (int)trimmed.length(), trimmed.data());
}
} else {
ERROR_LOG(G3D, "%s: %s\n\n%s", "errors", errors.c_str(), numberedCode.c_str());
}