Merge pull request #8542 from Itrimel/fix-gecko-loading
Fix Gecko codes loading
This commit is contained in:
commit
62046d93ce
|
@ -85,6 +85,11 @@ std::vector<GeckoCode> DownloadCodes(std::string gametdb_id, bool* succeeded)
|
||||||
{
|
{
|
||||||
std::istringstream ssline(line);
|
std::istringstream ssline(line);
|
||||||
std::string addr, data;
|
std::string addr, data;
|
||||||
|
|
||||||
|
// Some locales (e.g. fr_FR.UTF-8) don't split the string stream on space
|
||||||
|
// Use the C locale to workaround this behavior
|
||||||
|
ssline.imbue(std::locale::classic());
|
||||||
|
|
||||||
ssline >> addr >> data;
|
ssline >> addr >> data;
|
||||||
ssline.seekg(0);
|
ssline.seekg(0);
|
||||||
|
|
||||||
|
@ -139,6 +144,10 @@ std::vector<GeckoCode> LoadCodes(const IniFile& globalIni, const IniFile& localI
|
||||||
{
|
{
|
||||||
std::istringstream ss(line);
|
std::istringstream ss(line);
|
||||||
|
|
||||||
|
// Some locales (e.g. fr_FR.UTF-8) don't split the string stream on space
|
||||||
|
// Use the C locale to workaround this behavior
|
||||||
|
ss.imbue(std::locale::classic());
|
||||||
|
|
||||||
switch ((line)[0])
|
switch ((line)[0])
|
||||||
{
|
{
|
||||||
// enabled or disabled code
|
// enabled or disabled code
|
||||||
|
|
Loading…
Reference in New Issue