Enable tmd hash check

This commit is contained in:
rw-r-r-0644 2020-12-02 16:19:23 +01:00 committed by Maschell
parent d652f5a2eb
commit 041cbdc41d
2 changed files with 7 additions and 2 deletions

View File

@ -48,6 +48,11 @@ void ApplicationState::changeState(eGameState newState) {
menu.addText("[ ] " + name + "can NOT be patched!"); menu.addText("[ ] " + name + "can NOT be patched!");
} }
}; };
if (this->tmdValid) {
menu.addText("[ X ] title.tmd is valid!");
} else {
menu.addText("[ ] title.tmd is NOT valid!");
}
showCheckResult("title.fst", this->fstPatchPossible, this->fstAlreadyPatched); showCheckResult("title.fst", this->fstPatchPossible, this->fstAlreadyPatched);
showCheckResult("cos.xml", this->cosPatchPossible, this->cosAlreadyPatched); showCheckResult("cos.xml", this->cosPatchPossible, this->cosAlreadyPatched);
showCheckResult("safe.rpx", true, this->rpxAlreadyPatched); showCheckResult("safe.rpx", true, this->rpxAlreadyPatched);
@ -279,7 +284,7 @@ void ApplicationState::checkPatchPossible() {
DEBUG_FUNCTION_LINE("ERROR: %s", InstallerService::ErrorMessage(result).c_str()); DEBUG_FUNCTION_LINE("ERROR: %s", InstallerService::ErrorMessage(result).c_str());
} }
this->installPossible = this->fstPatchPossible && this->cosPatchPossible; this->installPossible = this->fstPatchPossible && this->cosPatchPossible && this->tmdValid;
this->alreadyInstalled = this->fstAlreadyPatched && this->rpxAlreadyPatched && this->cosAlreadyPatched; this->alreadyInstalled = this->fstAlreadyPatched && this->rpxAlreadyPatched && this->cosAlreadyPatched;
changeState(STATE_CHECK_COLDBOOT_STATUS); changeState(STATE_CHECK_COLDBOOT_STATUS);

View File

@ -722,7 +722,7 @@ InstallerService::eResults InstallerService::checkFSTAlreadyValid(const std::str
} }
InstallerService::eResults InstallerService::checkTMDValid(const std::string &path, const std::string &hash) { InstallerService::eResults InstallerService::checkTMDValid(const std::string &path, const std::string &hash) {
std::string filePath = path + "/code/title.fst"; std::string filePath = path + "/code/title.tmd";
return checkFileHash(filePath, hash); return checkFileHash(filePath, hash);
} }