From 041cbdc41d19b9629ea30e417eac3bc545d1b887 Mon Sep 17 00:00:00 2001 From: rw-r-r-0644 Date: Wed, 2 Dec 2020 16:19:23 +0100 Subject: [PATCH] Enable tmd hash check --- source/ApplicationState.cpp | 7 ++++++- source/InstallerService.cpp | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/source/ApplicationState.cpp b/source/ApplicationState.cpp index fdefaea..d6eade6 100644 --- a/source/ApplicationState.cpp +++ b/source/ApplicationState.cpp @@ -48,6 +48,11 @@ void ApplicationState::changeState(eGameState newState) { 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("cos.xml", this->cosPatchPossible, this->cosAlreadyPatched); showCheckResult("safe.rpx", true, this->rpxAlreadyPatched); @@ -279,7 +284,7 @@ void ApplicationState::checkPatchPossible() { 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; changeState(STATE_CHECK_COLDBOOT_STATUS); diff --git a/source/InstallerService.cpp b/source/InstallerService.cpp index b25d621..63691bb 100644 --- a/source/InstallerService.cpp +++ b/source/InstallerService.cpp @@ -722,7 +722,7 @@ InstallerService::eResults InstallerService::checkFSTAlreadyValid(const std::str } 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); }