Skip to content

Commit

Permalink
Update
Browse files Browse the repository at this point in the history
  • Loading branch information
oureveryday committed Jul 1, 2024
1 parent 878fd2d commit 6f2cca3
Showing 1 changed file with 20 additions and 9 deletions.
29 changes: 20 additions & 9 deletions DepotDownloaderMod/ContentDownloader.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1384,15 +1384,26 @@ private static async Task DownloadSteam3AsyncDepotFileChunk(

if (!DebugLog.Enabled)
{
var origPosition = Console.GetCursorPosition();
var consoleH = Console.WindowTop + Console.WindowHeight - 1;
Console.ForegroundColor = ConsoleColor.Blue;
Console.SetCursorPosition(0, consoleH);
Console.Write(new String(' ', Console.BufferWidth));
Console.SetCursorPosition(0, consoleH);
Console.Write("Total: {0,6:#00.00}% ({1})({2}/{3} Bytes)", (sizeDownloaded / (float)depotDownloadCounter.CompleteDownloadSize) * 100.0f, Getspeed(sizeDownloaded), sizeDownloaded, depotDownloadCounter.CompleteDownloadSize);
Console.ForegroundColor = ConsoleColor.Gray;
Console.SetCursorPosition(origPosition.Left, origPosition.Top);
try
{
var origPosition = Console.GetCursorPosition();
var consoleH = Console.WindowTop + Console.WindowHeight - 1;
Console.ForegroundColor = ConsoleColor.Blue;
Console.SetCursorPosition(0, consoleH);
Console.Write(new String(' ', Console.BufferWidth));
Console.SetCursorPosition(0, consoleH);
Console.Write("Total: {0,6:#00.00}% ({1})({2}/{3} Bytes)",
(sizeDownloaded / (float)depotDownloadCounter.CompleteDownloadSize) * 100.0f,
Getspeed(sizeDownloaded), sizeDownloaded, depotDownloadCounter.CompleteDownloadSize);
Console.ForegroundColor = ConsoleColor.Gray;
Console.SetCursorPosition(origPosition.Left, origPosition.Top);
}
catch
{
var fileFinalPath = Path.Combine(depot.InstallDir, file.FileName);
Console.Write("{0,6:#00.00}% {1}\n\n", (sizeDownloaded / (float)depotDownloadCounter.CompleteDownloadSize) * 100.0f, fileFinalPath);
}

}
}

Expand Down

0 comments on commit 6f2cca3

Please sign in to comment.