Official eMule-Board: [fix] Qr Sort Order - Official eMule-Board

Jump to content


Page 1 of 1

[fix] Qr Sort Order for current downloads

#1 User is offline   jicxicmic 

  • Premium Member
  • PipPipPipPipPip
  • Group: Members
  • Posts: 279
  • Joined: 08-November 02

Posted 18 March 2003 - 12:01 AM

Just to have the same behaivour of previous versions (I use to use it).
On module DownloadListCtrl.cpp function Compare(CUpDownClient *client1, CUpDownClient *client2, LPARAM lParamSort, int sortMod)

case 7: //qr asc
//jicxicmic Begin
if(client1->GetDownloadState() == DS_DOWNLOADING)
if (client2->GetDownloadState() != DS_DOWNLOADING)
return -1;
if(client2->GetDownloadState() == DS_DOWNLOADING)
if (client1->GetDownloadState() != DS_DOWNLOADING)
return 1;
if(client1->GetDownloadState() == DS_DOWNLOADING && client2->GetDownloadState() == DS_DOWNLOADING)
return 0;
//jicxicmic End
if(client1->GetRemoteQueueRank() == 0 && client1->GetDownloadState() == DS_ONQUEUE && client1->IsRemoteQueueFull() == true) return 1;
if(client2->GetRemoteQueueRank() == 0 && client2->GetDownloadState() == DS_ONQUEUE && client2->IsRemoteQueueFull() == true) return -1;
0

#2 User is offline   DonkeyDoctor2 

  • Splendid Member
  • PipPipPipPip
  • Group: Members
  • Posts: 149
  • Joined: 28-October 02

Posted 18 March 2003 - 07:45 PM

Using else ;)

//jicxicmic Begin
if(client1->GetDownloadState() == DS_DOWNLOADING) {
   if (client2->GetDownloadState() != DS_DOWNLOADING)
      return -1;
   else  // client1 & client2 = DS_DOWNLOADING
      return 0;
} else   // client1 != DS_DOWNLOADING 
   if(client2->GetDownloadState() == DS_DOWNLOADING)
      return 1;
//jicxicmic End

0

  • Member Options

Page 1 of 1

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users