This site is for P2P development and test software ONLY!

No Ratio

references.cpp


search after:

uint64 CPreferences::GetMaxDownloadInBytesPerSec(bool dynamic)


look after this part:

if%u28 maxup < 4*1024 %u29
return %u28%u28%u28maxup < 10*1024%u29 && %u28%u28uint64%u29maxup*3 < maxdownload*1024%u29%u29 ? %u28uint64%u29maxup*3 %u3a maxdownload*1024%u29;
return %u28%u28%u28maxup < 10*1024%u29 && %u28%u28uint64%u29maxup*4 < maxdownload*1024%u29%u29 ? %u28uint64%u29maxup*4 %u3a maxdownload*1024%u29;

change it:
return %u28maxdownload*1024%u29;

PPgConnection.cpp


search after:

void CPPgConnection: nHScroll(UINT nSBCode, UINT nPos, CScrollBar* pScrollBar)


look after this part and remove it:
if %u28pScrollBar->GetSafeHwnd%u28%u29 == m_ctlMaxUp.m_hWnd%u29
%u7b
uint32 maxup = m_ctlMaxUp.GetPos%u28%u29;
uint32 maxdown = m_ctlMaxDown.GetPos%u28%u29;
if%u28 maxup < 4 && maxup*3 < maxdown%u29
%u7b
m_ctlMaxDown.SetPos%u28maxup*3%u29;
%u7d
if%u28 maxup < 10 && maxup*4 < maxdown%u29
%u7b
m_ctlMaxDown.SetPos%u28maxup*4%u29;
%u7d
%u7d
else if %u28pScrollBar->GetSafeHwnd%u28%u29 == m_ctlMaxDown.m_hWnd%u29
%u7b
uint32 maxup = m_ctlMaxUp.GetPos%u28%u29;
uint32 maxdown = m_ctlMaxDown.GetPos%u28%u29;
if%u28 maxdown < 13 && maxup*3 < maxdown%u29
%u7b
m_ctlMaxUp.SetPos%u28%u28int%u29ceil%u28%u28double%u29maxdown/3%u29%u29;
%u7d
if%u28 maxdown < 41 && maxup*4 < maxdown%u29
%u7b
m_ctlMaxUp.SetPos%u28%u28int%u29ceil%u28%u28double%u29maxdown/4%u29%u29;
%u7d
%u7d

Wizard.cpp

search for:

thePrefs.maxGraphDownloadRate = download;
thePrefs.maxGraphUploadRate = upload;

if (upload > 0 && download > 0)
{
thePrefs.maxupload = (uint16)((upload * 4L) / 5);
if (upload < 4 && download > upload*3) {
thePrefs.maxdownload = thePrefs.maxupload * 3;
download = upload * 3;
}

if (upload < 10 && download > upload*4) {
thePrefs.maxdownload = thePrefs.maxupload * 4;
download = upload * 4;
}
else
thePrefs.maxdownload = (uint16)((download * 9L) / 10);

change it to:

thePrefs.maxGraphDownloadRate = download;
thePrefs.maxGraphUploadRate = upload;

if (upload > 0 && download > 0)
{
//umek::No Ratio
/*
thePrefs.maxupload = (uint16)((upload * 4L) / 5);
if (upload < 4 && download > upload*3) {
thePrefs.maxdownload = thePrefs.maxupload * 3;
download = upload * 3;
}

if (upload < 10 && download > upload*4) {
thePrefs.maxdownload = thePrefs.maxupload * 4;
download = upload * 4;
}
else
*/
//umek::No Ratio end
thePrefs.maxdownload = (uint16)((download * 9L) / 10);

0 comments:

发表评论