mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-21 05:09:34 -06:00
add the function to read the game name and description from the banner as unicode
This commit is contained in:
@ -164,6 +164,26 @@ bool CBannerLoaderWii::GetName(std::string* _rName)
|
||||
return false;
|
||||
}
|
||||
|
||||
bool CBannerLoaderWii::GetName(std::vector<std::wstring>& _rNames)
|
||||
{
|
||||
if (IsValid())
|
||||
{
|
||||
// find Banner type
|
||||
SWiiBanner* pBanner = (SWiiBanner*)m_pBannerFile;
|
||||
|
||||
std::wstring temp;
|
||||
for (int i = 0; i < WII_BANNER_COMMENT_SIZE; ++i)
|
||||
{
|
||||
temp.push_back(Common::swap16(pBanner->m_Comment[0][i]));
|
||||
}
|
||||
temp.push_back('\0');
|
||||
_rNames.push_back(temp);
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
bool CBannerLoaderWii::GetCompany(std::string& _rCompany)
|
||||
{
|
||||
_rCompany = "N/A";
|
||||
@ -190,6 +210,24 @@ bool CBannerLoaderWii::GetDescription(std::string* _rDescription)
|
||||
return false;
|
||||
}
|
||||
|
||||
bool CBannerLoaderWii::GetDescription(std::wstring& _rDescription)
|
||||
{
|
||||
if (IsValid())
|
||||
{
|
||||
// find Banner type
|
||||
SWiiBanner* pBanner = (SWiiBanner*)m_pBannerFile;
|
||||
|
||||
std::wstring description;
|
||||
for (int i = 0; i < WII_BANNER_COMMENT_SIZE; ++i)
|
||||
description.push_back(Common::swap16(pBanner->m_Comment[1][i]));
|
||||
|
||||
description.push_back('\0');
|
||||
_rDescription = description;
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
void CBannerLoaderWii::decode5A3image(u32* dst, u16* src, int width, int height)
|
||||
{
|
||||
for (int y = 0; y < height; y += 4)
|
||||
|
Reference in New Issue
Block a user