mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-01-31 18:11:31 +02:00
Boot: Optionally allow preserving region settings in setting.txt
See the discussion in https://bugs.dolphin-emu.org/issues/11930. (This probably doesn't really fix that issue, but it's something I thought would make sense anyway.)
This commit is contained in:
parent
a21fb96638
commit
208c6a3011
@ -26,10 +26,10 @@ class IOFile;
|
|||||||
|
|
||||||
struct RegionSetting
|
struct RegionSetting
|
||||||
{
|
{
|
||||||
const std::string area;
|
std::string area;
|
||||||
const std::string video;
|
std::string video;
|
||||||
const std::string game;
|
std::string game;
|
||||||
const std::string code;
|
std::string code;
|
||||||
};
|
};
|
||||||
|
|
||||||
class BootExecutableReader;
|
class BootExecutableReader;
|
||||||
|
@ -233,7 +233,7 @@ bool CBoot::SetupWiiMemory(IOS::HLE::IOSC::ConsoleType console_type)
|
|||||||
{DiscIO::Region::PAL, {"EUR", "PAL", "EU", "LE"}},
|
{DiscIO::Region::PAL, {"EUR", "PAL", "EU", "LE"}},
|
||||||
{DiscIO::Region::NTSC_K, {"KOR", "NTSC", "KR", "LKH"}}};
|
{DiscIO::Region::NTSC_K, {"KOR", "NTSC", "KR", "LKH"}}};
|
||||||
auto entryPos = region_settings.find(SConfig::GetInstance().m_region);
|
auto entryPos = region_settings.find(SConfig::GetInstance().m_region);
|
||||||
const RegionSetting& region_setting = entryPos->second;
|
RegionSetting region_setting = entryPos->second;
|
||||||
|
|
||||||
Common::SettingsHandler gen;
|
Common::SettingsHandler gen;
|
||||||
std::string serno;
|
std::string serno;
|
||||||
@ -250,6 +250,11 @@ bool CBoot::SetupWiiMemory(IOS::HLE::IOSC::ConsoleType console_type)
|
|||||||
{
|
{
|
||||||
gen.SetBytes(std::move(data));
|
gen.SetBytes(std::move(data));
|
||||||
serno = gen.GetValue("SERNO");
|
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();
|
gen.Reset();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user