Fix more of what I broke.

This commit is contained in:
Jordan Woyak
2013-03-03 16:51:26 -06:00
parent b1a2915304
commit c07b8a6e37
8 changed files with 97 additions and 61 deletions

View File

@ -19,6 +19,7 @@
#define _BANNER_LOADER_GC_H_
#include "BannerLoader.h"
#include "VolumeGC.h"
#include "StringUtil.h"
namespace DiscIO
@ -77,9 +78,7 @@ class CBannerLoaderGC
template <u32 N>
std::string GetDecodedString(const char (&data)[N])
{
auto const string_decoder = (DiscIO::IVolume::COUNTRY_JAPAN == m_country ||
DiscIO::IVolume::COUNTRY_TAIWAN == m_country) ?
SHIFTJISToUTF8 : CP1252ToUTF8;
auto const string_decoder = CVolumeGC::GetStringDecoder(m_country);
// strnlen to trim NULLs
return string_decoder(std::string(data, strnlen(data, sizeof(data))));