Skip to content
Permalink
Browse files
Merge pull request #8519 from JosJuice/setupwiimemory-region-override
Boot: Optionally allow preserving region settings in setting.txt
  • Loading branch information
stenzek committed Dec 19, 2019
2 parents 6f5d770 + 208c6a3 commit 74dedc5
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
@@ -26,10 +26,10 @@ class IOFile;

struct RegionSetting
{
const std::string area;
const std::string video;
const std::string game;
const std::string code;
std::string area;
std::string video;
std::string game;
std::string code;
};

class BootExecutableReader;
@@ -233,7 +233,7 @@ bool CBoot::SetupWiiMemory(IOS::HLE::IOSC::ConsoleType console_type)
{DiscIO::Region::PAL, {"EUR", "PAL", "EU", "LE"}},
{DiscIO::Region::NTSC_K, {"KOR", "NTSC", "KR", "LKH"}}};
auto entryPos = region_settings.find(SConfig::GetInstance().m_region);
const RegionSetting& region_setting = entryPos->second;
RegionSetting region_setting = entryPos->second;

Common::SettingsHandler gen;
std::string serno;
@@ -250,6 +250,11 @@ bool CBoot::SetupWiiMemory(IOS::HLE::IOSC::ConsoleType console_type)
{
gen.SetBytes(std::move(data));
serno = gen.GetValue("SERNO");
if (SConfig::GetInstance().bOverrideRegionSettings)
{
region_setting = RegionSetting{gen.GetValue("AREA"), gen.GetValue("VIDEO"),
gen.GetValue("GAME"), gen.GetValue("CODE")};
}
gen.Reset();
}
}

0 comments on commit 74dedc5

Please sign in to comment.