mirror of
https://github.com/stenzek/duckstation.git
synced 2026-02-04 05:04:33 +00:00
HTTPDownloader: Set initial indeterminate state
This commit is contained in:
@@ -45,6 +45,13 @@ void HTTPDownloader::CreateRequest(std::string url, Request::Callback callback,
|
||||
req->progress = progress;
|
||||
req->start_time = Timer::GetCurrentValue();
|
||||
|
||||
// set progress state to indeterminate until we know the size
|
||||
if (req->progress)
|
||||
{
|
||||
req->progress->SetProgressRange(0);
|
||||
req->progress->SetProgressValue(0);
|
||||
}
|
||||
|
||||
std::unique_lock lock(m_pending_http_request_lock);
|
||||
if (LockedGetActiveRequestCount() < m_max_active_requests)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user