mirror of
https://github.com/rvtr/ctr_Repair.git
synced 2025-10-31 13:51:08 -04:00
MMENがあるときのみ実行するように
git-svn-id: file:///Volumes/Transfer/gigaleak_20231201/2020-05-23%20-%20ctr.7z%20+%20svn_v1.068.zip/ctr/svn/ctr_Repair@291 385bec56-5757-e545-9c3a-d8741f4650f1
This commit is contained in:
parent
dff70c8bf8
commit
9605e06793
@ -32,7 +32,7 @@ LIBS += lib_demo \
|
|||||||
libnn_ps
|
libnn_ps
|
||||||
|
|
||||||
|
|
||||||
DESCRIPTOR = $(HORIZON_ROOT)/resources/specfiles/HomeMenuTest.desc
|
DESCRIPTOR = $(HORIZON_ROOT)/resources/specfiles/SelfCup.desc
|
||||||
|
|
||||||
TARGET_PROGRAM = CardCup
|
TARGET_PROGRAM = CardCup
|
||||||
|
|
||||||
|
|||||||
4
trunk/CardCup/Readme.txt
Normal file
4
trunk/CardCup/Readme.txt
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
■ビルド環境
|
||||||
|
・SDK
|
||||||
|
Horizon 0.14.23 branch r33437 +
|
||||||
|
Horizon 2.3 branch r38091 SelfCup.descをコピー
|
||||||
@ -24,6 +24,7 @@
|
|||||||
#include <nn/fs/fs_FileSystemBase.h>
|
#include <nn/fs/fs_FileSystemBase.h>
|
||||||
#include <nn/fs/CTR/MPCore/fs_FileSystemBasePrivate.h>
|
#include <nn/fs/CTR/MPCore/fs_FileSystemBasePrivate.h>
|
||||||
#include <nn/applet/CTR/applet_APIForSystem.h>
|
#include <nn/applet/CTR/applet_APIForSystem.h>
|
||||||
|
#include <nn/am.h>
|
||||||
|
|
||||||
#include <nn/cup.h>
|
#include <nn/cup.h>
|
||||||
|
|
||||||
@ -51,6 +52,9 @@ namespace
|
|||||||
// NuiShellの初期化 (CUPに必須)
|
// NuiShellの初期化 (CUPに必須)
|
||||||
NN_UTIL_PANIC_IF_FAILED(nn::ns::CTR::InitializeForShell());
|
NN_UTIL_PANIC_IF_FAILED(nn::ns::CTR::InitializeForShell());
|
||||||
|
|
||||||
|
// amの初期化
|
||||||
|
nn::am::InitializeForSystemMenu();
|
||||||
|
|
||||||
// fsの初期化 (カード確認用)
|
// fsの初期化 (カード確認用)
|
||||||
nn::fs::Initialize();
|
nn::fs::Initialize();
|
||||||
|
|
||||||
@ -221,17 +225,28 @@ extern "C" void nnMain()
|
|||||||
nn::Result result;
|
nn::Result result;
|
||||||
Initialize();
|
Initialize();
|
||||||
|
|
||||||
/******************** CUPの実行 *******************/
|
nn::am::ProgramInfo outInfos;
|
||||||
bool isHandledError = false;
|
const nn::ProgramId MMEN_PROGRAM_ID = 0x0004003000008202;
|
||||||
result = UpdateSequence(&isHandledError);
|
result = nn::am::GetProgramInfos(&outInfos, nn::fs::MEDIA_TYPE_NAND, &MMEN_PROGRAM_ID, 1);
|
||||||
if (isHandledError == false && result.IsFailure())
|
if (result.IsSuccess())
|
||||||
{
|
{
|
||||||
|
|
||||||
|
/******************** CUPの実行 *******************/
|
||||||
|
bool isHandledError = false;
|
||||||
|
result = UpdateSequence(&isHandledError);
|
||||||
|
if (isHandledError == false && result.IsFailure())
|
||||||
{
|
{
|
||||||
// それ以外の場合は、Resultを表示
|
{
|
||||||
s_scrollBuffer->AppendText(" - Unhandled Error: 0x%08x", result.GetPrintableBits());
|
// それ以外の場合は、Resultを表示
|
||||||
s_scrollBuffer->AppendText("")->Render();
|
s_scrollBuffer->AppendText(" - Unhandled Error: 0x%08x", result.GetPrintableBits());
|
||||||
|
s_scrollBuffer->AppendText("")->Render();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else if(result == nn::am::ResultNotFound())
|
||||||
|
{
|
||||||
|
s_scrollBuffer->AppendText("Cannot find Home Menu");
|
||||||
|
}
|
||||||
|
|
||||||
s_scrollBuffer->AppendText("")->Render();
|
s_scrollBuffer->AppendText("")->Render();
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user