fix again, JP please check it. don't forget clear your cache!
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@2177 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
parent
e4f1967674
commit
0868770d24
|
@ -43,20 +43,20 @@ bool IBannerLoader::CopyToStringAndCheck(std::string& _rDestination, const char*
|
||||||
}
|
}
|
||||||
|
|
||||||
// generate valid chars
|
// generate valid chars
|
||||||
for (unsigned char c = 0x20; c <= 0x80; c++)
|
for (int i = 0x20; i < 256; i++)
|
||||||
{
|
{
|
||||||
bValidChars[c] = true;
|
bValidChars[i] = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bValidChars[0x0a] = true;
|
bValidChars[0x0a] = true;
|
||||||
bValidChars[0xa9] = true;
|
//bValidChars[0xa9] = true;
|
||||||
bValidChars[0xe9] = true;
|
//bValidChars[0xe9] = true;
|
||||||
|
|
||||||
bInitialized = true;
|
bInitialized = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool bResult = true;
|
bool bResult = true;
|
||||||
char destBuffer[2048];
|
char destBuffer[2048] = {0};
|
||||||
char* dest = destBuffer;
|
char* dest = destBuffer;
|
||||||
const char* src = _src;
|
const char* src = _src;
|
||||||
|
|
||||||
|
|
|
@ -107,9 +107,17 @@ CBannerLoaderGC::GetName(std::string _rName[])
|
||||||
case CBannerLoaderGC::BANNER_BNR1:
|
case CBannerLoaderGC::BANNER_BNR1:
|
||||||
{
|
{
|
||||||
DVDBanner* pBanner = (DVDBanner*)m_pBannerFile;
|
DVDBanner* pBanner = (DVDBanner*)m_pBannerFile;
|
||||||
char tempBuffer[33] = {0};
|
char tempBuffer[65] = {0};
|
||||||
memcpy(tempBuffer, pBanner->comment.shortTitle, 32);
|
if (pBanner->comment.longTitle[0])
|
||||||
_rName[0] = tempBuffer;
|
{
|
||||||
|
memcpy(tempBuffer, pBanner->comment.longTitle, 64);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
memcpy(tempBuffer, pBanner->comment.shortTitle, 32);
|
||||||
|
}
|
||||||
|
|
||||||
|
CopyToStringAndCheck(_rName[0], tempBuffer);
|
||||||
returnCode = true;
|
returnCode = true;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
@ -120,9 +128,16 @@ CBannerLoaderGC::GetName(std::string _rName[])
|
||||||
u32 languageID = SConfig::GetInstance().m_InterfaceLanguage;
|
u32 languageID = SConfig::GetInstance().m_InterfaceLanguage;
|
||||||
for (int i = 0; i < 6; i++)
|
for (int i = 0; i < 6; i++)
|
||||||
{
|
{
|
||||||
char tempBuffer[33] = {0};
|
char tempBuffer[65] = {0};
|
||||||
memcpy(tempBuffer, pBanner->comment[i].shortTitle, 32);
|
if (pBanner->comment[i].longTitle[0])
|
||||||
_rName[i] = tempBuffer;
|
{
|
||||||
|
memcpy(tempBuffer, pBanner->comment[i].longTitle, 64);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
memcpy(tempBuffer, pBanner->comment[i].shortTitle, 32);
|
||||||
|
}
|
||||||
|
CopyToStringAndCheck(_rName[i], tempBuffer);
|
||||||
}
|
}
|
||||||
|
|
||||||
returnCode = true;
|
returnCode = true;
|
||||||
|
@ -174,7 +189,7 @@ CBannerLoaderGC::GetDescription(std::string* _rDescription)
|
||||||
DVDBanner* pBanner = (DVDBanner*)m_pBannerFile;
|
DVDBanner* pBanner = (DVDBanner*)m_pBannerFile;
|
||||||
char tempBuffer[129] = {0};
|
char tempBuffer[129] = {0};
|
||||||
memcpy(tempBuffer, pBanner->comment.comment, 128);
|
memcpy(tempBuffer, pBanner->comment.comment, 128);
|
||||||
_rDescription[0] = tempBuffer;
|
CopyToStringAndCheck(_rDescription[0], tempBuffer);
|
||||||
returnCode = true;
|
returnCode = true;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
@ -186,7 +201,7 @@ CBannerLoaderGC::GetDescription(std::string* _rDescription)
|
||||||
{
|
{
|
||||||
char tempBuffer[129] = {0};
|
char tempBuffer[129] = {0};
|
||||||
memcpy(tempBuffer, pBanner->comment[i].comment, 128);
|
memcpy(tempBuffer, pBanner->comment[i].comment, 128);
|
||||||
_rDescription[i] = tempBuffer;
|
CopyToStringAndCheck(_rDescription[i], tempBuffer);
|
||||||
}
|
}
|
||||||
returnCode = true;
|
returnCode = true;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue