mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-22 22:00:39 -06:00
Volume: Use more appropriate types for some returned values
Disc number is changed from bool to u8, and revision is changed from int to u16 (WADs can use all 16 bits, but discs can only use 8 bits).
This commit is contained in:
@ -97,8 +97,8 @@ static int CompareGameListItems(const GameListItem* iso1, const GameListItem* is
|
||||
return t * (iso1->GetUniqueID() > iso2->GetUniqueID() ? 1 : -1);
|
||||
if (iso1->GetRevision() != iso2->GetRevision())
|
||||
return t * (iso1->GetRevision() > iso2->GetRevision() ? 1 : -1);
|
||||
if (iso1->IsDiscTwo() != iso2->IsDiscTwo())
|
||||
return t * (iso1->IsDiscTwo() ? 1 : -1);
|
||||
if (iso1->GetDiscNumber() != iso2->GetDiscNumber())
|
||||
return t * (iso1->GetDiscNumber() > iso2->GetDiscNumber() ? 1 : -1);
|
||||
}
|
||||
return strcasecmp(iso1->GetName(languageOne).c_str(),
|
||||
iso2->GetName(languageOther).c_str()) * t;
|
||||
@ -415,8 +415,12 @@ void CGameListCtrl::InsertItemInReportView(long _Index)
|
||||
if (gameini.GetIfExists("EmuState", "Title", &title))
|
||||
name = title;
|
||||
|
||||
if (rISOFile.IsDiscTwo() && name.Lower().find("disc 2") == std::string::npos && name.Lower().find("disc2") == std::string::npos)
|
||||
name = wxString::Format(_("%s (Disc 2)"), name.c_str());
|
||||
int disc_number = rISOFile.GetDiscNumber() + 1;
|
||||
if (disc_number > 1 && name.Lower().find(wxString::Format("disc %i", disc_number)) == std::string::npos
|
||||
&& name.Lower().find(wxString::Format("disc%i", disc_number)) == std::string::npos)
|
||||
{
|
||||
name = wxString::Format(_("%s (Disc %i)"), name.c_str(), disc_number);
|
||||
}
|
||||
|
||||
SetItem(_Index, COLUMN_TITLE, name, -1);
|
||||
SetItem(_Index, COLUMN_MAKER, StrToWxStr(rISOFile.GetCompany()), -1);
|
||||
|
Reference in New Issue
Block a user