mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-22 22:00:39 -06:00
game name and description WIP: cache all 6 languages, so we don't need refresh cache after we changes language.
move some WIN32 code to CGameListCtrl. nakee, please check linux build, sorry I've not enough time to setup a linux dev environment. and, who can read German helps me to test game name and description display, thanks. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@2090 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
@ -115,9 +115,12 @@ CBannerLoaderWii::StupidWideCharToString(u16* _pSrc, size_t _max)
|
||||
}
|
||||
|
||||
bool
|
||||
CBannerLoaderWii::GetName(std::string& _rName, DiscIO::IVolume::ECountry language)
|
||||
CBannerLoaderWii::GetName(std::string* _rName)
|
||||
{
|
||||
_rName = "no name";
|
||||
for (int i = 0; i < 6; i++)
|
||||
{
|
||||
_rName[i] = "no name";
|
||||
}
|
||||
|
||||
if (!IsValid())
|
||||
{
|
||||
@ -126,19 +129,17 @@ CBannerLoaderWii::GetName(std::string& _rName, DiscIO::IVolume::ECountry languag
|
||||
|
||||
// find Banner type
|
||||
SWiiBanner* pBanner = (SWiiBanner*)m_pBannerFile;
|
||||
#ifdef _WIN32
|
||||
if (DiscIO::IVolume::COUNTRY_JAP == language)
|
||||
|
||||
std::string name;
|
||||
if (CopyUnicodeToString(name, pBanner->m_Comment[0]))
|
||||
{
|
||||
return CopyUnicodeToString(_rName, pBanner->m_Comment[0]);
|
||||
}
|
||||
else
|
||||
#endif
|
||||
{
|
||||
// very stupid
|
||||
_rName = StupidWideCharToString(pBanner->m_Comment[0], WII_BANNER_COMMENT_SIZE);
|
||||
for (int i = 0; i < 6; i++)
|
||||
{
|
||||
_rName[i] = name;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@ -151,9 +152,12 @@ CBannerLoaderWii::GetCompany(std::string& _rCompany)
|
||||
|
||||
|
||||
bool
|
||||
CBannerLoaderWii::GetDescription(std::string& _rDescription, DiscIO::IVolume::ECountry language)
|
||||
CBannerLoaderWii::GetDescription(std::string* _rDescription)
|
||||
{
|
||||
_rDescription = "";
|
||||
for (int i = 0; i< 6; i++)
|
||||
{
|
||||
_rDescription[i] = "";
|
||||
}
|
||||
|
||||
if (!IsValid())
|
||||
{
|
||||
@ -162,17 +166,16 @@ CBannerLoaderWii::GetDescription(std::string& _rDescription, DiscIO::IVolume::EC
|
||||
|
||||
// find Banner type
|
||||
SWiiBanner* pBanner = (SWiiBanner*)m_pBannerFile;
|
||||
if (DiscIO::IVolume::COUNTRY_JAP == language)
|
||||
|
||||
std::string description;
|
||||
if (CopyUnicodeToString(description, pBanner->m_Comment[1]))
|
||||
{
|
||||
return CopyUnicodeToString(_rDescription, pBanner->m_Comment[1]);
|
||||
}
|
||||
else
|
||||
{
|
||||
// very stupid
|
||||
_rDescription = StupidWideCharToString(pBanner->m_Comment[1], WII_BANNER_COMMENT_SIZE);
|
||||
for (int i = 0; i< 6; i++)
|
||||
{
|
||||
_rDescription[i] = description;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user