From 62d5dccd911a8512cd2005350e85ed507c0e0c6b Mon Sep 17 00:00:00 2001 From: mateusfavarin Date: Sun, 21 Jul 2024 01:45:41 -0300 Subject: [PATCH] Fix launcher bios read --- tools/Launcher/updater.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tools/Launcher/updater.cpp b/tools/Launcher/updater.cpp index d9e6046c9..e830831cf 100644 --- a/tools/Launcher/updater.cpp +++ b/tools/Launcher/updater.cpp @@ -27,7 +27,7 @@ bool Updater::IsValidBios(const std::string& path) { std::vector v; IO::ReadBinaryFile(v, path); - return v.size() == static_cast(0x100000); + return v.size() == static_cast(0x80000); } bool Updater::CheckForUpdates(std::string& status, const std::string& currVersion) @@ -36,7 +36,7 @@ bool Updater::CheckForUpdates(std::string& status, const std::string& currVersio { std::string version; Requests::CheckUpdates(version); - if (currVersion != version) + if (currVersion != version || !std::filesystem::exists(GetPatchedGamePath(currVersion))) { m_updateAvailable = true; m_versionAvailable = version; @@ -57,7 +57,7 @@ bool Updater::Update(std::string& status, std::string& currVersion, const std::s status = "Downloading Duckstation..."; std::filesystem::create_directory(g_duckFolder); const std::string duckArchive = "duckstation.zip"; - if (!Requests::DownloadFile("github.com", "/stenzek/duckstation/releases/download/latest/duckstation-windows-x64-release.zip", g_duckFolder + duckArchive)) + if (!Requests::DownloadFile("github.com", "/stenzek/duckstation/releases/download/preview/duckstation-windows-x64-release.zip", g_duckFolder + duckArchive)) { status = "Error: could not download Duckstation."; return false; @@ -90,7 +90,7 @@ bool Updater::Update(std::string& status, std::string& currVersion, const std::s status = "Checking for new updates..."; if (m_updateAvailable || Requests::CheckUpdates(version)) { - if (m_updateAvailable || version != currVersion) + if (m_updateAvailable || version != currVersion || !std::filesystem::exists(GetPatchedGamePath(currVersion))) { m_versionAvailable = m_updateAvailable ? m_versionAvailable : version; std::string path = g_dataFolder + m_versionAvailable + "/";