mirror of
https://github.com/wiidev/usbloadergx.git
synced 2024-11-22 03:09:15 +01:00
Display Japanese descriptions correctly
This commit is contained in:
parent
80ed6d0b98
commit
6ab4fdd436
@ -31,6 +31,7 @@ distribution.
|
|||||||
#include "usbloader/wbfs.h"
|
#include "usbloader/wbfs.h"
|
||||||
#include "usbloader/wdvd.h"
|
#include "usbloader/wdvd.h"
|
||||||
#include "usbloader/wbfs/wbfs_rw.h"
|
#include "usbloader/wbfs/wbfs_rw.h"
|
||||||
|
#include "utils/sjis.h"
|
||||||
#include "utils/uncompress.h"
|
#include "utils/uncompress.h"
|
||||||
#include "themes/CTheme.h"
|
#include "themes/CTheme.h"
|
||||||
#include "settings/GameTitles.h"
|
#include "settings/GameTitles.h"
|
||||||
@ -429,6 +430,7 @@ CustomBanner *OpeningBNR::CreateGCBanner(const discHdr * header)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// sets the developer
|
||||||
wString str;
|
wString str;
|
||||||
str.resize(strlen((char *) openingBnr->description[language].developer));
|
str.resize(strlen((char *) openingBnr->description[language].developer));
|
||||||
for(u32 i = 0; i < str.size(); i++)
|
for(u32 i = 0; i < str.size(); i++)
|
||||||
@ -437,11 +439,20 @@ CustomBanner *OpeningBNR::CreateGCBanner(const discHdr * header)
|
|||||||
banner->SetBannerText("T_Coded_by", tr("Developer:"));
|
banner->SetBannerText("T_Coded_by", tr("Developer:"));
|
||||||
banner->SetBannerText("T_coder", str.toUTF8().c_str());
|
banner->SetBannerText("T_coder", str.toUTF8().c_str());
|
||||||
|
|
||||||
str.resize(strlen((char *) openingBnr->description[language].long_description));
|
// sets the description and converts encodings (Japan and Taiwan)
|
||||||
for(u32 i = 0; i < str.size(); i++)
|
if(header->id[3] == 'J' || header->id[3] == 'W')
|
||||||
str[i] = *(openingBnr->description[language].long_description + i);
|
{
|
||||||
|
string description((char *) openingBnr->description[language].long_description);
|
||||||
|
banner->SetBannerText("T_short_descript", sj2utf8(description).c_str());
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
str.resize(strlen((char *) openingBnr->description[language].long_description));
|
||||||
|
for(u32 i = 0; i < str.size(); i++)
|
||||||
|
str[i] = *(openingBnr->description[language].long_description + i);
|
||||||
|
|
||||||
banner->SetBannerText("T_short_descript", str.toUTF8().c_str());
|
banner->SetBannerText("T_short_descript", str.toUTF8().c_str());
|
||||||
|
}
|
||||||
|
|
||||||
// free buffer
|
// free buffer
|
||||||
free(openingBnr);
|
free(openingBnr);
|
||||||
|
2142
source/utils/sjis.cpp
Normal file
2142
source/utils/sjis.cpp
Normal file
File diff suppressed because it is too large
Load Diff
8
source/utils/sjis.h
Normal file
8
source/utils/sjis.h
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
#ifndef SJIS_H
|
||||||
|
#define SJIS_H
|
||||||
|
|
||||||
|
#include <string>
|
||||||
|
|
||||||
|
std::string sj2utf8(const std::string &input);
|
||||||
|
|
||||||
|
#endif /* SJIS_H */
|
Loading…
Reference in New Issue
Block a user