mirror of
https://github.com/rvtr/ctr_Repair.git
synced 2025-10-31 13:51:08 -04:00
NNAから国コードを取得する機能を削除
git-svn-id: file:///Volumes/Transfer/gigaleak_20231201/2020-05-23%20-%20ctr.7z%20+%20svn_v1.068.zip/ctr/svn/ctr_Repair@848 385bec56-5757-e545-9c3a-d8741f4650f1
This commit is contained in:
parent
c7e2a86b91
commit
097b7b0482
@ -41,7 +41,6 @@ nn::os::Event ActCompleter::s_EndEvent;
|
||||
u32 ActCompleter::s_ApprovalId;
|
||||
ActCompleter::CompleteMode ActCompleter::s_Mode;
|
||||
ActCompleter::SalvageCheck ActCompleter::s_SalvageCheck;
|
||||
nn::cfg::CTR::CfgCountryCode ActCompleter::s_CfgCountryCode;
|
||||
|
||||
|
||||
ActCompleter::ActCompleter()
|
||||
@ -71,11 +70,6 @@ void ActCompleter::Start(CompleteMode mode, SalvageCheck check)
|
||||
s_Thread.Start(Exec, s_ThreadStack);
|
||||
}
|
||||
|
||||
nn::cfg::CTR::CfgCountryCode ActCompleter::GetCountryCodeFromNna()
|
||||
{
|
||||
return s_CfgCountryCode;
|
||||
}
|
||||
|
||||
bool ActCompleter::IsFinished()
|
||||
{
|
||||
return s_Thread.IsValid() && !s_Thread.IsAlive();
|
||||
@ -156,8 +150,9 @@ nn::Result ActCompleter::ExecImpl()
|
||||
nn::cfg::CfgRegionCode region = nn::cfg::GetRegion();
|
||||
u8 age = nn::act::GetAgeAtSalvage();
|
||||
|
||||
nn::cfg::CTR::CfgCountryCode country;
|
||||
NN_UTIL_RETURN_IF_FAILED_2(
|
||||
nn::act::GetCountryCodeAtSalvage(reinterpret_cast<u32*>(&s_CfgCountryCode)),
|
||||
nn::act::GetCountryCodeAtSalvage(reinterpret_cast<u32*>(&country)),
|
||||
nn::act::FinalizeAdmin(),
|
||||
common::FinalizeNetwork());
|
||||
|
||||
@ -166,7 +161,7 @@ nn::Result ActCompleter::ExecImpl()
|
||||
if (region == nn::cfg::CFG_REGION_AMERICA)
|
||||
{
|
||||
|
||||
if (ageChecker.IsCoppaRequired(age, region, s_CfgCountryCode))
|
||||
if (ageChecker.IsCoppaRequired(age, region, country))
|
||||
{
|
||||
// COPPA対象の年齢なら復元する
|
||||
s_ApprovalId = nn::act::GetSalvagedApprovalId();
|
||||
@ -178,7 +173,7 @@ nn::Result ActCompleter::ExecImpl()
|
||||
}
|
||||
|
||||
// PIN必須ならフラグを立てる
|
||||
if (ageChecker.IsPinRestrictionRequired(age, region, s_CfgCountryCode))
|
||||
if (ageChecker.IsPinRestrictionRequired(age, region, country))
|
||||
{
|
||||
NN_UTIL_RETURN_IF_FAILED_2(
|
||||
nn::cfg::CTR::system::SetForceParentalControlFlag(true),
|
||||
|
||||
@ -60,7 +60,6 @@ private:
|
||||
static u32 s_ApprovalId;
|
||||
static CompleteMode s_Mode;
|
||||
static SalvageCheck s_SalvageCheck;
|
||||
static nn::cfg::CfgCountryCode s_CfgCountryCode;
|
||||
};
|
||||
|
||||
} /* namespace ConsoleRestore */
|
||||
|
||||
@ -927,10 +927,6 @@ void SetupCountryCodeForPreorder(nn::cfg::CTR::CfgCountryCode& country)
|
||||
{
|
||||
country = GetCountryCodeFromEci();
|
||||
}
|
||||
else if (ActCompleter::GetCountryCodeFromNna() != nn::cfg::CTR::CFG_COUNTRY_UNDEFINED)
|
||||
{
|
||||
country = ActCompleter::GetCountryCodeFromNna();
|
||||
}
|
||||
}
|
||||
|
||||
} // namespace <unnamed>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user