fix display wii game name and description (only WIN32 working).

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@2125 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
hyperiris
2009-02-06 16:53:22 +00:00
parent 5df69d0384
commit 825919aaf8
5 changed files with 39 additions and 41 deletions

View File

@ -96,24 +96,6 @@ CBannerLoaderWii::GetBanner(u32* _pBannerImage)
return true;
}
std::string
CBannerLoaderWii::StupidWideCharToString(u16* _pSrc, size_t _max)
{
std::string temp;
u32 offset = 0;
while (_pSrc[offset] != 0x0000)
{
temp += (char)(_pSrc[offset] >> 8);
offset ++;
if (offset >= _max)
break;
}
return temp;
}
bool
CBannerLoaderWii::GetName(std::string* _rName)
{
@ -131,7 +113,7 @@ CBannerLoaderWii::GetName(std::string* _rName)
SWiiBanner* pBanner = (SWiiBanner*)m_pBannerFile;
std::string name;
if (CopyUnicodeToString(name, pBanner->m_Comment[0]))
if (CopyBeUnicodeToString(name, pBanner->m_Comment[0], WII_BANNER_COMMENT_SIZE))
{
for (int i = 0; i < 6; i++)
{
@ -168,7 +150,7 @@ CBannerLoaderWii::GetDescription(std::string* _rDescription)
SWiiBanner* pBanner = (SWiiBanner*)m_pBannerFile;
std::string description;
if (CopyUnicodeToString(description, pBanner->m_Comment[1]))
if (CopyBeUnicodeToString(description, pBanner->m_Comment[1], WII_BANNER_COMMENT_SIZE))
{
for (int i = 0; i< 6; i++)
{