|
|
|
@@ -110,24 +110,16 @@ static int CompareGameListItems(const GameListItem* iso1, const GameListItem* is
|
|
|
|
|
if (iso1->GetUniqueID() != iso2->GetUniqueID())
|
|
|
|
|
return t * (iso1->GetUniqueID() > iso2->GetUniqueID() ? 1 : -1);
|
|
|
|
|
if (iso1->GetRevision() != iso2->GetRevision())
|
|
|
|
|
return t * (iso1->GetRevision() > iso2->GetRevision() ? 1 : -1);
|
|
|
|
|
return t * (iso1->GetRevision() > iso2->GetRevision() ? 1 : -1);
|
|
|
|
|
if (iso1->IsDiscTwo() != iso2->IsDiscTwo())
|
|
|
|
|
return t * (iso1->IsDiscTwo() ? 1 : -1);
|
|
|
|
|
}
|
|
|
|
|
return strcasecmp(iso1->GetName(languageOne).c_str(),
|
|
|
|
|
iso2->GetName(languageOther).c_str()) * t;
|
|
|
|
|
case CGameListCtrl::COLUMN_NOTES:
|
|
|
|
|
{
|
|
|
|
|
std::string cmp1 =
|
|
|
|
|
(iso1->GetPlatform() == GameListItem::GAMECUBE_DISC) ?
|
|
|
|
|
iso1->GetCompany() : iso1->GetDescription(languageOne);
|
|
|
|
|
std::string cmp2 =
|
|
|
|
|
(iso2->GetPlatform() == GameListItem::GAMECUBE_DISC) ?
|
|
|
|
|
iso2->GetCompany() : iso2->GetDescription(languageOther);
|
|
|
|
|
return strcasecmp(cmp1.c_str(), cmp2.c_str()) * t;
|
|
|
|
|
}
|
|
|
|
|
case CGameListCtrl::COLUMN_MAKER:
|
|
|
|
|
return strcasecmp(iso1->GetCompany().c_str(), iso2->GetCompany().c_str()) * t;
|
|
|
|
|
case CGameListCtrl::COLUMN_ID:
|
|
|
|
|
return strcasecmp(iso1->GetUniqueID().c_str(), iso2->GetUniqueID().c_str()) * t;
|
|
|
|
|
return strcasecmp(iso1->GetUniqueID().c_str(), iso2->GetUniqueID().c_str()) * t;
|
|
|
|
|
case CGameListCtrl::COLUMN_COUNTRY:
|
|
|
|
|
if (iso1->GetCountry() > iso2->GetCountry())
|
|
|
|
|
return 1 * t;
|
|
|
|
@@ -290,10 +282,7 @@ void CGameListCtrl::Update()
|
|
|
|
|
InsertColumn(COLUMN_BANNER, _("Banner"));
|
|
|
|
|
InsertColumn(COLUMN_TITLE, _("Title"));
|
|
|
|
|
|
|
|
|
|
// Instead of showing the notes + the company, which is unknown with
|
|
|
|
|
// Wii titles We show in the same column : company for GC games and
|
|
|
|
|
// description for Wii/wad games
|
|
|
|
|
InsertColumn(COLUMN_NOTES, _("Notes"));
|
|
|
|
|
InsertColumn(COLUMN_MAKER, _("Maker"));
|
|
|
|
|
InsertColumn(COLUMN_ID, _("ID"));
|
|
|
|
|
InsertColumn(COLUMN_COUNTRY, "");
|
|
|
|
|
InsertColumn(COLUMN_SIZE, _("Size"));
|
|
|
|
@@ -310,7 +299,7 @@ void CGameListCtrl::Update()
|
|
|
|
|
SetColumnWidth(COLUMN_PLATFORM, SConfig::GetInstance().m_showSystemColumn ? 35 + platform_padding : 0);
|
|
|
|
|
SetColumnWidth(COLUMN_BANNER, SConfig::GetInstance().m_showBannerColumn ? 96 + platform_padding : 0);
|
|
|
|
|
SetColumnWidth(COLUMN_TITLE, 175 + platform_padding);
|
|
|
|
|
SetColumnWidth(COLUMN_NOTES, SConfig::GetInstance().m_showNotesColumn ? 150 + platform_padding : 0);
|
|
|
|
|
SetColumnWidth(COLUMN_MAKER, SConfig::GetInstance().m_showMakerColumn ? 150 + platform_padding : 0);
|
|
|
|
|
SetColumnWidth(COLUMN_ID, SConfig::GetInstance().m_showIDColumn ? 75 + platform_padding : 0);
|
|
|
|
|
SetColumnWidth(COLUMN_COUNTRY, SConfig::GetInstance().m_showRegionColumn ? 32 + platform_padding : 0);
|
|
|
|
|
SetColumnWidth(COLUMN_EMULATION_STATE, SConfig::GetInstance().m_showStateColumn ? 50 + platform_padding : 0);
|
|
|
|
@@ -441,12 +430,7 @@ void CGameListCtrl::InsertItemInReportView(long _Index)
|
|
|
|
|
name = title;
|
|
|
|
|
|
|
|
|
|
SetItem(_Index, COLUMN_TITLE, StrToWxStr(name), -1);
|
|
|
|
|
|
|
|
|
|
// We show the company string on GameCube only
|
|
|
|
|
// On Wii we show the description instead as the company string is empty
|
|
|
|
|
std::string const notes = (rISOFile.GetPlatform() == GameListItem::GAMECUBE_DISC) ?
|
|
|
|
|
rISOFile.GetCompany() : rISOFile.GetDescription();
|
|
|
|
|
SetItem(_Index, COLUMN_NOTES, StrToWxStr(notes), -1);
|
|
|
|
|
SetItem(_Index, COLUMN_MAKER, StrToWxStr(rISOFile.GetCompany()), -1);
|
|
|
|
|
|
|
|
|
|
// Emulation state
|
|
|
|
|
SetItemColumnImage(_Index, COLUMN_EMULATION_STATE, m_EmuStateImageIndex[rISOFile.GetEmuState()]);
|
|
|
|
@@ -670,7 +654,7 @@ void CGameListCtrl::ScanForISOs()
|
|
|
|
|
|
|
|
|
|
void CGameListCtrl::OnColBeginDrag(wxListEvent& event)
|
|
|
|
|
{
|
|
|
|
|
if (event.GetColumn() != COLUMN_TITLE && event.GetColumn() != COLUMN_NOTES)
|
|
|
|
|
if (event.GetColumn() != COLUMN_TITLE && event.GetColumn() != COLUMN_MAKER)
|
|
|
|
|
event.Veto();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@@ -1319,13 +1303,13 @@ void CGameListCtrl::AutomaticColumnWidth()
|
|
|
|
|
+ GetColumnWidth(COLUMN_SIZE)
|
|
|
|
|
+ GetColumnWidth(COLUMN_EMULATION_STATE));
|
|
|
|
|
|
|
|
|
|
// We hide the Notes column if the window is too small
|
|
|
|
|
// We hide the Maker column if the window is too small
|
|
|
|
|
if (resizable > 400)
|
|
|
|
|
{
|
|
|
|
|
if (SConfig::GetInstance().m_showNotesColumn)
|
|
|
|
|
if (SConfig::GetInstance().m_showMakerColumn)
|
|
|
|
|
{
|
|
|
|
|
SetColumnWidth(COLUMN_TITLE, resizable / 2);
|
|
|
|
|
SetColumnWidth(COLUMN_NOTES, resizable / 2);
|
|
|
|
|
SetColumnWidth(COLUMN_MAKER, resizable / 2);
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
@@ -1335,7 +1319,7 @@ void CGameListCtrl::AutomaticColumnWidth()
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
SetColumnWidth(COLUMN_TITLE, resizable);
|
|
|
|
|
SetColumnWidth(COLUMN_NOTES, 0);
|
|
|
|
|
SetColumnWidth(COLUMN_MAKER, 0);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|