mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 10:08:18 +00:00
set the minimum of seconds remaining in map downloading popup to 1
This commit is contained in:
parent
b7ce39be94
commit
e8938e3d80
|
@ -1058,7 +1058,7 @@ int CMenus::Render()
|
|||
|
||||
// time left
|
||||
const char *pTimeLeftString;
|
||||
int TimeLeft = m_DownloadSpeed > 0.0f ? (Client()->MapDownloadTotalsize()-Client()->MapDownloadAmount())/m_DownloadSpeed : 0.0f;
|
||||
int TimeLeft = max(1, m_DownloadSpeed > 0.0f ? static_cast<int>((Client()->MapDownloadTotalsize()-Client()->MapDownloadAmount())/m_DownloadSpeed) : 1);
|
||||
if(TimeLeft >= 60)
|
||||
{
|
||||
TimeLeft /= 60;
|
||||
|
|
Loading…
Reference in a new issue