fix: Skin pack names showing only first letter after 4JLibs update (#1518)
This commit is contained in:
@@ -1127,15 +1127,6 @@ void UIScene_SkinSelectMenu::handlePackIndexChanged()
|
|||||||
updatePackDisplay();
|
updatePackDisplay();
|
||||||
}
|
}
|
||||||
|
|
||||||
std::wstring fakeWideToRealWide(const wchar_t* original)
|
|
||||||
{
|
|
||||||
const char* name = reinterpret_cast<const char*>(original);
|
|
||||||
int len = MultiByteToWideChar(CP_UTF8, 0, name, -1, nullptr, 0);
|
|
||||||
std::wstring wName(len, 0);
|
|
||||||
MultiByteToWideChar(CP_UTF8, 0, name, -1, &wName[0], len);
|
|
||||||
return wName.c_str();
|
|
||||||
}
|
|
||||||
|
|
||||||
void UIScene_SkinSelectMenu::updatePackDisplay()
|
void UIScene_SkinSelectMenu::updatePackDisplay()
|
||||||
{
|
{
|
||||||
m_currentPackCount = app.m_dlcManager.getPackCount(DLCManager::e_DLCType_Skin) + SKIN_SELECT_MAX_DEFAULTS;
|
m_currentPackCount = app.m_dlcManager.getPackCount(DLCManager::e_DLCType_Skin) + SKIN_SELECT_MAX_DEFAULTS;
|
||||||
@@ -1143,9 +1134,7 @@ void UIScene_SkinSelectMenu::updatePackDisplay()
|
|||||||
if(m_packIndex >= SKIN_SELECT_MAX_DEFAULTS)
|
if(m_packIndex >= SKIN_SELECT_MAX_DEFAULTS)
|
||||||
{
|
{
|
||||||
DLCPack *thisPack = app.m_dlcManager.getPack(m_packIndex - SKIN_SELECT_MAX_DEFAULTS, DLCManager::e_DLCType_Skin);
|
DLCPack *thisPack = app.m_dlcManager.getPack(m_packIndex - SKIN_SELECT_MAX_DEFAULTS, DLCManager::e_DLCType_Skin);
|
||||||
// Fix the incorrect string type on title to display correctly
|
setCentreLabel(thisPack->getName().c_str());
|
||||||
setCentreLabel(fakeWideToRealWide(thisPack->getName().c_str()));
|
|
||||||
//setCentreLabel(thisPack->getName().c_str());
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -1164,9 +1153,7 @@ void UIScene_SkinSelectMenu::updatePackDisplay()
|
|||||||
if(nextPackIndex >= SKIN_SELECT_MAX_DEFAULTS)
|
if(nextPackIndex >= SKIN_SELECT_MAX_DEFAULTS)
|
||||||
{
|
{
|
||||||
DLCPack *thisPack = app.m_dlcManager.getPack(nextPackIndex - SKIN_SELECT_MAX_DEFAULTS, DLCManager::e_DLCType_Skin);
|
DLCPack *thisPack = app.m_dlcManager.getPack(nextPackIndex - SKIN_SELECT_MAX_DEFAULTS, DLCManager::e_DLCType_Skin);
|
||||||
// Fix the incorrect string type on title to display correctly
|
setRightLabel(thisPack->getName().c_str());
|
||||||
setRightLabel(fakeWideToRealWide(thisPack->getName().c_str()));
|
|
||||||
//setRightLabel(thisPack->getName().c_str());
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -1185,9 +1172,7 @@ void UIScene_SkinSelectMenu::updatePackDisplay()
|
|||||||
if(previousPackIndex >= SKIN_SELECT_MAX_DEFAULTS)
|
if(previousPackIndex >= SKIN_SELECT_MAX_DEFAULTS)
|
||||||
{
|
{
|
||||||
DLCPack *thisPack = app.m_dlcManager.getPack(previousPackIndex - SKIN_SELECT_MAX_DEFAULTS, DLCManager::e_DLCType_Skin);
|
DLCPack *thisPack = app.m_dlcManager.getPack(previousPackIndex - SKIN_SELECT_MAX_DEFAULTS, DLCManager::e_DLCType_Skin);
|
||||||
// Fix the incorrect string type on title to display correctly
|
setLeftLabel(thisPack->getName().c_str());
|
||||||
setLeftLabel(fakeWideToRealWide(thisPack->getName().c_str()));
|
|
||||||
//setLeftLabel(thisPack->getName().c_str());
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user