mirror of
https://github.com/rvtr/ctr_Repair.git
synced 2025-10-31 13:51:08 -04:00
リージョンに応じてチェックするProgramIdを変えるように
git-svn-id: file:///Volumes/Transfer/gigaleak_20231201/2020-05-23%20-%20ctr.7z%20+%20svn_v1.068.zip/ctr/svn/ctr_Repair@294 385bec56-5757-e545-9c3a-d8741f4650f1
This commit is contained in:
parent
b5d43c9b06
commit
5ed3cc9b2f
@ -25,6 +25,7 @@
|
|||||||
#include <nn/applet/CTR/applet_APIForSystem.h>
|
#include <nn/applet/CTR/applet_APIForSystem.h>
|
||||||
#include <nn/am.h>
|
#include <nn/am.h>
|
||||||
#include <nn/ndm.h>
|
#include <nn/ndm.h>
|
||||||
|
#include <nn/cfg.h>
|
||||||
|
|
||||||
#include <nn/cup.h>
|
#include <nn/cup.h>
|
||||||
|
|
||||||
@ -70,6 +71,8 @@ namespace
|
|||||||
//nn::applet::SetAppletMode();
|
//nn::applet::SetAppletMode();
|
||||||
nn::applet::Enable();
|
nn::applet::Enable();
|
||||||
|
|
||||||
|
nn::cfg::Initialize();
|
||||||
|
|
||||||
// デバイスメモリの設定
|
// デバイスメモリの設定
|
||||||
const int DEVICE_MEMORY_SIZE = 12*1024 * 1024;
|
const int DEVICE_MEMORY_SIZE = 12*1024 * 1024;
|
||||||
NN_UTIL_PANIC_IF_FAILED(nn::os::SetDeviceMemorySize(DEVICE_MEMORY_SIZE));
|
NN_UTIL_PANIC_IF_FAILED(nn::os::SetDeviceMemorySize(DEVICE_MEMORY_SIZE));
|
||||||
@ -227,8 +230,33 @@ extern "C" void nnMain()
|
|||||||
nn::Result result;
|
nn::Result result;
|
||||||
Initialize();
|
Initialize();
|
||||||
|
|
||||||
|
nn::ProgramId MMEN_PROGRAM_ID = 0x0004003000008202;
|
||||||
|
|
||||||
|
nn::cfg::CfgRegionCode region = nn::cfg::GetRegion();
|
||||||
|
switch(region)
|
||||||
|
{
|
||||||
|
case nn::cfg::CFG_REGION_AMERICA:
|
||||||
|
{
|
||||||
|
MMEN_PROGRAM_ID = 0x0004003000008f02;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
case nn::cfg::CFG_REGION_EUROPE:
|
||||||
|
case nn::cfg::CFG_REGION_AUSTRALIA:
|
||||||
|
{
|
||||||
|
MMEN_PROGRAM_ID = 0x0004003000009802;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
case nn::cfg::CFG_REGION_JAPAN:
|
||||||
|
{
|
||||||
|
MMEN_PROGRAM_ID = 0x0004003000008202;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
nn::am::ProgramInfo outInfos;
|
nn::am::ProgramInfo outInfos;
|
||||||
const nn::ProgramId MMEN_PROGRAM_ID = 0x0004003000008202;
|
|
||||||
result = nn::am::GetProgramInfos(&outInfos, nn::fs::MEDIA_TYPE_NAND, &MMEN_PROGRAM_ID, 1);
|
result = nn::am::GetProgramInfos(&outInfos, nn::fs::MEDIA_TYPE_NAND, &MMEN_PROGRAM_ID, 1);
|
||||||
if (result.IsSuccess())
|
if (result.IsSuccess())
|
||||||
{
|
{
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user