diff --git a/r5dev/sdklauncher/base_surface.cpp b/r5dev/sdklauncher/base_surface.cpp index a0d4a489..c7f1b725 100644 --- a/r5dev/sdklauncher/base_surface.cpp +++ b/r5dev/sdklauncher/base_surface.cpp @@ -258,6 +258,9 @@ void BeginInstall(CDownloadProgress* pProgress, const bool bPrerelease, const bo } DownloadAssetList(pProgress, manifest, blackList, DEFAULT_DEPOT_DOWNLOAD_DIR); + if (pProgress->IsCanceled()) + return; + // Download SDK files. if (!DownloadLatestGitHubReleaseManifest(XorStr("https://api.github.com/repos/Mauler125/r5sdk/releases"), responseMesage, manifest, bPrerelease)) { @@ -266,6 +269,9 @@ void BeginInstall(CDownloadProgress* pProgress, const bool bPrerelease, const bo } DownloadAssetList(pProgress, manifest, blackList, DEFAULT_DEPOT_DOWNLOAD_DIR); + if (pProgress->IsCanceled()) + return; + // Install process cannot be canceled. pProgress->SetCanCancel(false); @@ -303,7 +309,7 @@ void CBaseSurface::OnInstallClick(Forms::Control* Sender) Threading::Thread([pProgress] { - BeginInstall(pProgress); + BeginInstall(pProgress, false, false); }).Start();