From 9fd0802b4f70ab59f28e40aeb47d222e4078ccb4 Mon Sep 17 00:00:00 2001 From: death2droid Date: Wed, 27 May 2009 12:28:33 +0000 Subject: [PATCH] A small clean up. Just doing it while i remember :) git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@3289 8ced0084-cf51-0410-be5f-012b33b47a6e --- Source/Core/DolphinWX/Src/GameListCtrl.cpp | 21 +++++++++++---------- Source/Core/DolphinWX/Src/ISOFile.cpp | 3 --- Source/Core/DolphinWX/Src/ISOFile.h | 1 - 3 files changed, 11 insertions(+), 14 deletions(-) diff --git a/Source/Core/DolphinWX/Src/GameListCtrl.cpp b/Source/Core/DolphinWX/Src/GameListCtrl.cpp index 30e72b32e6..7c694fc96d 100644 --- a/Source/Core/DolphinWX/Src/GameListCtrl.cpp +++ b/Source/Core/DolphinWX/Src/GameListCtrl.cpp @@ -73,13 +73,13 @@ bool operator < (const GameListItem &one, const GameListItem &other) switch(currentColumn) { - case CGameListCtrl::COLUMN_TITLE: return strcasecmp(one.GetName(indexOne).c_str(), other.GetName(indexOther).c_str()) < 0; - case CGameListCtrl::COLUMN_COMPANY: return strcasecmp(one.GetCompany().c_str(), other.GetCompany().c_str()) < 0; - case CGameListCtrl::COLUMN_NOTES: return strcasecmp(one.GetDescription(indexOne).c_str(), other.GetDescription(indexOther).c_str()) < 0; - case CGameListCtrl::COLUMN_COUNTRY: return (one.GetCountry() < other.GetCountry()); - case CGameListCtrl::COLUMN_SIZE: return (one.GetFileSize() < other.GetFileSize()); - case CGameListCtrl::COLUMN_PLATFORM: return (one.GetPlatform() < other.GetPlatform()); - default: return strcasecmp(one.GetName(indexOne).c_str(), other.GetName(indexOther).c_str()) < 0; + case CGameListCtrl::COLUMN_TITLE: return strcasecmp(one.GetName(indexOne).c_str(), other.GetName(indexOther).c_str()) < 0; + case CGameListCtrl::COLUMN_COMPANY: return strcasecmp(one.GetCompany().c_str(), other.GetCompany().c_str()) < 0; + case CGameListCtrl::COLUMN_NOTES: return strcasecmp(one.GetDescription(indexOne).c_str(), other.GetDescription(indexOther).c_str()) < 0; + case CGameListCtrl::COLUMN_COUNTRY: return (one.GetCountry() < other.GetCountry()); + case CGameListCtrl::COLUMN_SIZE: return (one.GetFileSize() < other.GetFileSize()); + case CGameListCtrl::COLUMN_PLATFORM: return (one.IsWii() < other.IsWii()); + default: return strcasecmp(one.GetName(indexOne).c_str(), other.GetName(indexOther).c_str()) < 0; } } @@ -371,7 +371,8 @@ void CGameListCtrl::InsertItemInReportView(long _Index) // Country SetItemColumnImage(_Index, COLUMN_COUNTRY, m_FlagImageIndex[rISOFile.GetCountry()]); - SetItemColumnImage(_Index, COLUMN_PLATFORM, m_PlatformImageIndex[rISOFile.GetPlatform()]); + //Platform + SetItemColumnImage(_Index, COLUMN_PLATFORM, m_PlatformImageIndex[rISOFile.IsWii()]); // Background color SetBackgroundColor(); @@ -580,8 +581,8 @@ int wxCALLBACK wxListCompare(long item1, long item2, long sortData) if (iso1->GetFileSize() < iso2->GetFileSize()) return -1 *t; return 0; case CGameListCtrl::COLUMN_PLATFORM: - if(iso1->GetPlatform() > iso2->GetPlatform()) return 1 *t; - if(iso1->GetPlatform() < iso2->GetPlatform()) return -1 *t; + if(iso1->IsWii() > iso2->IsWii()) return 1 *t; + if(iso1->IsWii() < iso2->IsWii()) return -1 *t; return 0; } diff --git a/Source/Core/DolphinWX/Src/ISOFile.cpp b/Source/Core/DolphinWX/Src/ISOFile.cpp index ca66f2fc6a..bb53490fb9 100644 --- a/Source/Core/DolphinWX/Src/ISOFile.cpp +++ b/Source/Core/DolphinWX/Src/ISOFile.cpp @@ -47,7 +47,6 @@ GameListItem::GameListItem(const std::string& _rFileName) , m_pImage(NULL) , m_ImageSize(0) , m_IsWii(false) - , m_Platform(false) { if (LoadFromCache()) @@ -61,7 +60,6 @@ GameListItem::GameListItem(const std::string& _rFileName) if (pVolume != NULL) { m_IsWii = DiscIO::IsVolumeWiiDisc(pVolume); - m_Platform = DiscIO::IsVolumeWiiDisc(pVolume); m_Company = "N/A"; for (int i = 0; i < 6; i++) @@ -172,7 +170,6 @@ void GameListItem::DoState(PointerWrap &p) p.Do(m_BlobCompressed); p.DoBuffer(&m_pImage, m_ImageSize); p.Do(m_IsWii); - p.Do(m_Platform); } std::string GameListItem::CreateCacheFilename() diff --git a/Source/Core/DolphinWX/Src/ISOFile.h b/Source/Core/DolphinWX/Src/ISOFile.h index 5d585ee2c6..6962fe4da7 100644 --- a/Source/Core/DolphinWX/Src/ISOFile.h +++ b/Source/Core/DolphinWX/Src/ISOFile.h @@ -38,7 +38,6 @@ public: const std::string& GetIssues() const {return m_Issues;} bool IsCompressed() const {return m_BlobCompressed;} bool IsWii() const {return m_IsWii;} - bool GetPlatform() const {return m_Platform;} u64 GetFileSize() const {return m_FileSize;} u64 GetVolumeSize() const {return m_VolumeSize;} #if defined(HAVE_WX) && HAVE_WX