From f6e43761b71a310d26c9fa40cdd241e9c1baaa5e Mon Sep 17 00:00:00 2001 From: Hyper <34012267+hyperbx@users.noreply.github.com> Date: Tue, 28 Jan 2025 22:22:36 +0000 Subject: [PATCH] Added checks for unpatched XEX and XEXP for game detection (#234) --- UnleashedRecomp/install/installer.cpp | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/UnleashedRecomp/install/installer.cpp b/UnleashedRecomp/install/installer.cpp index 923abbf..8e077d8 100644 --- a/UnleashedRecomp/install/installer.cpp +++ b/UnleashedRecomp/install/installer.cpp @@ -201,7 +201,17 @@ static DLC detectDLC(const std::filesystem::path &sourcePath, VirtualFileSystem bool Installer::checkGameInstall(const std::filesystem::path &baseDirectory, std::filesystem::path &modulePath) { modulePath = baseDirectory / PatchedDirectory / GameExecutableFile; - return std::filesystem::exists(modulePath); + + if (!std::filesystem::exists(modulePath)) + return false; + + if (!std::filesystem::exists(baseDirectory / UpdateDirectory / UpdateExecutablePatchFile)) + return false; + + if (!std::filesystem::exists(baseDirectory / GameDirectory / GameExecutableFile)) + return false; + + return true; } bool Installer::checkDLCInstall(const std::filesystem::path &baseDirectory, DLC dlc)