diff --git a/Source/Core/DiscIO/Src/BannerLoaderGC.cpp b/Source/Core/DiscIO/Src/BannerLoaderGC.cpp index d4071b7dd1..28e8378db4 100644 --- a/Source/Core/DiscIO/Src/BannerLoaderGC.cpp +++ b/Source/Core/DiscIO/Src/BannerLoaderGC.cpp @@ -94,11 +94,6 @@ CBannerLoaderGC::GetBanner(u32* _pBannerImage) bool CBannerLoaderGC::GetName(std::string _rName[]) { - for (int i = 0; i < 6; i++) - { - _rName[i] = "no name"; - } - bool returnCode = false; if (!IsValid()) @@ -143,7 +138,7 @@ CBannerLoaderGC::GetName(std::string _rName[]) bool CBannerLoaderGC::GetCompany(std::string& _rCompany) { - _rCompany = "invalid images"; + _rCompany = "N/A"; if (!IsValid()) { @@ -164,11 +159,6 @@ CBannerLoaderGC::GetCompany(std::string& _rCompany) bool CBannerLoaderGC::GetDescription(std::string* _rDescription) { - for (int i = 0; i< 6; i++) - { - _rDescription[i] = ""; - } - bool returnCode = false; if (!IsValid()) diff --git a/Source/Core/DiscIO/Src/BannerLoaderWii.cpp b/Source/Core/DiscIO/Src/BannerLoaderWii.cpp index cffffe2648..6989561d7c 100644 --- a/Source/Core/DiscIO/Src/BannerLoaderWii.cpp +++ b/Source/Core/DiscIO/Src/BannerLoaderWii.cpp @@ -73,53 +73,42 @@ CBannerLoaderWii::IsValid() bool CBannerLoaderWii::GetBanner(u32* _pBannerImage) { - if (!IsValid()) + if (IsValid()) { - return false; - } + SWiiBanner* pBanner = (SWiiBanner*)m_pBannerFile; - SWiiBanner* pBanner = (SWiiBanner*)m_pBannerFile; + static u32 Buffer[192 * 64]; + decode5A3image(Buffer, (u16*)pBanner->m_BannerTexture, 192, 64); - static u32 Buffer[192 * 64]; - decode5A3image(Buffer, (u16*)pBanner->m_BannerTexture, 192, 64); - - // ugly scaling :) - for (int y=0; y<32; y++) - { - for (int x=0; x<96; x++) + // ugly scaling :) + for (int y=0; y<32; y++) { - _pBannerImage[y*96+x] = Buffer[(y*192*2)+(x*2)]; - } + for (int x=0; x<96; x++) + { + _pBannerImage[y*96+x] = Buffer[(y*192*2)+(x*2)]; + } + } } - - return true; } bool CBannerLoaderWii::GetName(std::string* _rName) { - for (int i = 0; i < 6; i++) + if (IsValid()) { - _rName[i] = "no name"; - } + // find Banner type + SWiiBanner* pBanner = (SWiiBanner*)m_pBannerFile; - if (!IsValid()) - { - return false; - } - - // find Banner type - SWiiBanner* pBanner = (SWiiBanner*)m_pBannerFile; - - std::string name; - if (CopyBeUnicodeToString(name, pBanner->m_Comment[0], WII_BANNER_COMMENT_SIZE)) - { - for (int i = 0; i < 6; i++) + std::string name; + if (CopyBeUnicodeToString(name, pBanner->m_Comment[0], WII_BANNER_COMMENT_SIZE)) { - _rName[i] = name; - } - return true; + for (int i = 0; i < 6; i++) + { + _rName[i] = name; + } + return true; + } } return false; } @@ -136,27 +125,20 @@ CBannerLoaderWii::GetCompany(std::string& _rCompany) bool CBannerLoaderWii::GetDescription(std::string* _rDescription) { - for (int i = 0; i< 6; i++) + if (IsValid()) { - _rDescription[i] = ""; - } + // find Banner type + SWiiBanner* pBanner = (SWiiBanner*)m_pBannerFile; - if (!IsValid()) - { - return false; - } - - // find Banner type - SWiiBanner* pBanner = (SWiiBanner*)m_pBannerFile; - - std::string description; - if (CopyBeUnicodeToString(description, pBanner->m_Comment[1], WII_BANNER_COMMENT_SIZE)) - { - for (int i = 0; i< 6; i++) + std::string description; + if (CopyBeUnicodeToString(description, pBanner->m_Comment[1], WII_BANNER_COMMENT_SIZE)) { - _rDescription[i] = description; + for (int i = 0; i< 6; i++) + { + _rDescription[i] = description; + } + return true; } - return true; } return false; } diff --git a/Source/Core/DolphinWX/Src/ISOFile.cpp b/Source/Core/DolphinWX/Src/ISOFile.cpp index 48672b684a..8d9048a0cf 100644 --- a/Source/Core/DolphinWX/Src/ISOFile.cpp +++ b/Source/Core/DolphinWX/Src/ISOFile.cpp @@ -59,6 +59,8 @@ GameListItem::GameListItem(const std::string& _rFileName) if (pVolume != NULL) { m_Name[0] = _rFileName; + m_Company = "N/A"; + m_Description[0] = "No Description"; m_Country = pVolume->GetCountry(); m_FileSize = File::GetSize(_rFileName.c_str()); m_VolumeSize = pVolume->GetSize();