mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-22 13:49:53 -06:00
Fix more of what I broke.
This commit is contained in:
@ -94,10 +94,12 @@ std::string CVolumeGC::GetMakerID() const
|
||||
std::vector<std::string> CVolumeGC::GetNames() const
|
||||
{
|
||||
std::vector<std::string> names;
|
||||
|
||||
auto const string_decoder = GetStringDecoder(GetCountry());
|
||||
|
||||
char name[128] = {};
|
||||
if (m_pReader != NULL && Read(0x20, 0x60, (u8*)&name))
|
||||
names.push_back(name);
|
||||
char name[0x60 + 1] = {};
|
||||
if (m_pReader != NULL && Read(0x20, 0x60, (u8*)name))
|
||||
names.push_back(string_decoder(name));
|
||||
|
||||
return names;
|
||||
}
|
||||
@ -143,4 +145,10 @@ bool CVolumeGC::IsDiscTwo() const
|
||||
return discTwo;
|
||||
}
|
||||
|
||||
auto CVolumeGC::GetStringDecoder(ECountry country) -> StringDecoder
|
||||
{
|
||||
return (COUNTRY_JAPAN == country || COUNTRY_TAIWAN == country) ?
|
||||
SHIFTJISToUTF8 : CP1252ToUTF8;
|
||||
}
|
||||
|
||||
} // namespace
|
||||
|
Reference in New Issue
Block a user