From ac9d45b567152dd546cf2f8924c074b58102eb69 Mon Sep 17 00:00:00 2001 From: Kawe Mazidjatari <48657826+Mauler125@users.noreply.github.com> Date: Sat, 21 Oct 2023 19:12:33 +0200 Subject: [PATCH] Fix SDK Launcher display bug If depot vector is empty, the SDK launcher will download all files in depot json, but still use the depot vector as the count for how many packages instead of the depot json array. --- r5dev/sdklauncher/sdklauncher_utils.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/r5dev/sdklauncher/sdklauncher_utils.cpp b/r5dev/sdklauncher/sdklauncher_utils.cpp index fb860781..3da83b60 100644 --- a/r5dev/sdklauncher/sdklauncher_utils.cpp +++ b/r5dev/sdklauncher/sdklauncher_utils.cpp @@ -555,7 +555,9 @@ bool SDKLauncher_DownloadDepotList(nlohmann::json& manifest, CUtlVectorSetText(Format("Downloading package %i of %i...", i, depotList.Count()).c_str()); + pProgress->SetText(Format("Downloading package %i of %i...", i, + !depotList.IsEmpty() ? depotList.Count() : (int)depotListArray.size()).c_str()); + SDKLauncher_DownloadAsset(downloadLink.c_str(), pPath, fileName.c_str(), fileSize, "wb+", pProgress); // Check if its a zip file, as these are