Boot: Preserve MODEL value in setting.txt
It doesn't necessarily start with RVL-001.
This commit is contained in:
parent
36c92294df
commit
3614e9fcc2
|
@ -278,6 +278,7 @@ bool CBoot::SetupWiiMemory(IOS::HLE::IOSC::ConsoleType console_type)
|
||||||
|
|
||||||
Common::SettingsHandler gen;
|
Common::SettingsHandler gen;
|
||||||
std::string serno;
|
std::string serno;
|
||||||
|
std::string model = "RVL-001(" + region_setting.area + ")";
|
||||||
CreateSystemMenuTitleDirs();
|
CreateSystemMenuTitleDirs();
|
||||||
const std::string settings_file_path(Common::GetTitleDataPath(Titles::SYSTEM_MENU) +
|
const std::string settings_file_path(Common::GetTitleDataPath(Titles::SYSTEM_MENU) +
|
||||||
"/" WII_SETTING);
|
"/" WII_SETTING);
|
||||||
|
@ -291,6 +292,7 @@ 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");
|
||||||
|
model = gen.GetValue("MODEL");
|
||||||
|
|
||||||
bool region_matches = false;
|
bool region_matches = false;
|
||||||
if (SConfig::GetInstance().bOverrideRegionSettings)
|
if (SConfig::GetInstance().bOverrideRegionSettings)
|
||||||
|
@ -309,6 +311,12 @@ bool CBoot::SetupWiiMemory(IOS::HLE::IOSC::ConsoleType console_type)
|
||||||
region_setting = RegionSetting{gen.GetValue("AREA"), gen.GetValue("VIDEO"),
|
region_setting = RegionSetting{gen.GetValue("AREA"), gen.GetValue("VIDEO"),
|
||||||
gen.GetValue("GAME"), gen.GetValue("CODE")};
|
gen.GetValue("GAME"), gen.GetValue("CODE")};
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
const size_t parenthesis_pos = model.find('(');
|
||||||
|
if (parenthesis_pos != std::string::npos)
|
||||||
|
model = model.substr(0, parenthesis_pos) + '(' + region_setting.area + ')';
|
||||||
|
}
|
||||||
|
|
||||||
gen.Reset();
|
gen.Reset();
|
||||||
}
|
}
|
||||||
|
@ -328,7 +336,6 @@ bool CBoot::SetupWiiMemory(IOS::HLE::IOSC::ConsoleType console_type)
|
||||||
INFO_LOG(BOOT, "Using serial number: %s", serno.c_str());
|
INFO_LOG(BOOT, "Using serial number: %s", serno.c_str());
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string model = "RVL-001(" + region_setting.area + ")";
|
|
||||||
gen.AddSetting("AREA", region_setting.area);
|
gen.AddSetting("AREA", region_setting.area);
|
||||||
gen.AddSetting("MODEL", model);
|
gen.AddSetting("MODEL", model);
|
||||||
gen.AddSetting("DVD", "0");
|
gen.AddSetting("DVD", "0");
|
||||||
|
|
Loading…
Reference in New Issue