mirror of
https://github.com/rvtr/ctr_Repair.git
synced 2025-10-31 13:51:08 -04:00
NUP_ONLYモードの表示を強調
git-svn-id: file:///Volumes/Transfer/gigaleak_20231201/2020-05-23%20-%20ctr.7z%20+%20svn_v1.068.zip/ctr/svn/ctr_Repair@64 385bec56-5757-e545-9c3a-d8741f4650f1
This commit is contained in:
parent
834f59c092
commit
ddd2db472a
@ -365,9 +365,18 @@ extern "C" void nnMain(void)
|
||||
|
||||
nn::util::FloatColor titleColor;
|
||||
|
||||
titleColor.r = 0.1f;
|
||||
titleColor.g = 0.25f;
|
||||
titleColor.b = 0.1f;
|
||||
if(GetRestoreMode() == RESTORE_MODE_RESTORE)
|
||||
{
|
||||
titleColor.r = 0.1f;
|
||||
titleColor.g = 0.25f;
|
||||
titleColor.b = 0.1f;
|
||||
}
|
||||
else if(GetRestoreMode() == RESTORE_MODE_NUP_ONLY)
|
||||
{
|
||||
titleColor.r = 0.35f;
|
||||
titleColor.g = 0.35f;
|
||||
titleColor.b = 0.f;
|
||||
}
|
||||
|
||||
// 上画面表示
|
||||
common::DrawSystemState("CTR Console Restore",
|
||||
@ -387,6 +396,19 @@ extern "C" void nnMain(void)
|
||||
s_SerialNo
|
||||
);
|
||||
|
||||
if (GetRestoreMode() == RESTORE_MODE_NUP_ONLY)
|
||||
{
|
||||
const u8 spaceSize = 10;
|
||||
const u8 lineBottom = 23;
|
||||
const u32 screenWidth = 400;
|
||||
|
||||
s_RenderSystem.SetColor(1.f, 1.f, 1.f);
|
||||
s_RenderSystem.DrawText(0, lineBottom * spaceSize, "NUP-Only Mode");
|
||||
s_RenderSystem.SetColor(titleColor.r, titleColor.g, titleColor.b);
|
||||
s_RenderSystem.FillRectangle(0, lineBottom * spaceSize, screenWidth, spaceSize);
|
||||
s_RenderSystem.SetColor(1.f, 1.f, 1.f);
|
||||
}
|
||||
|
||||
s_RenderSystem.SwapBuffers();
|
||||
|
||||
// デフォルトで下画面に描画するもの
|
||||
|
||||
@ -60,9 +60,10 @@ typedef enum RestoreState
|
||||
FAIL // 失敗
|
||||
} RestoreState;
|
||||
|
||||
|
||||
// Restore状態管理
|
||||
RestoreState s_RestoreState = STARTUP;
|
||||
// Restoreモード管理
|
||||
RestoreMode s_RestoreMode = RESTORE_MODE_RESTORE;
|
||||
|
||||
// インターネット設定を読んだかどうか
|
||||
bool s_ReadSettingDone = false;
|
||||
@ -121,6 +122,11 @@ bool CheckAndReadAPSetting(::std::vector<std::string>& operationMessage)
|
||||
s_ReadSettingSuccess = ReadSetting(&s_NupOnlyMode);
|
||||
}
|
||||
|
||||
if(s_NupOnlyMode)
|
||||
{
|
||||
s_RestoreMode = RESTORE_MODE_NUP_ONLY;
|
||||
}
|
||||
|
||||
if (!s_ReadSettingSuccess)
|
||||
{
|
||||
operationMessage.push_back(::std::string("Invalid Accsess_Point_Setting format!"));
|
||||
@ -764,7 +770,7 @@ void OnSdEjected()
|
||||
{
|
||||
s_RestoreState = ALL_DONE;
|
||||
}
|
||||
else if(s_RestoreState == NUP_ONLY_WAIT_SD_EJECT)
|
||||
else if(s_RestoreState == NUP_ONLY_WAIT_SD_EJECT || s_RestoreState == NUP_ONLY_WAIT_NEXT)
|
||||
{
|
||||
s_RestoreState = NUP_ONLY_WAIT_NEXT;
|
||||
}
|
||||
@ -779,6 +785,7 @@ void OnSdEjected()
|
||||
void InitializeState()
|
||||
{
|
||||
s_RestoreState = STARTUP;
|
||||
s_RestoreMode = RESTORE_MODE_RESTORE;
|
||||
|
||||
common::InitializeFileCheck();
|
||||
|
||||
@ -818,4 +825,9 @@ u32 GetProgress()
|
||||
|
||||
}
|
||||
|
||||
RestoreMode GetRestoreMode()
|
||||
{
|
||||
return s_RestoreMode;
|
||||
}
|
||||
|
||||
} // namespace ConsoleRestore
|
||||
|
||||
@ -23,6 +23,12 @@
|
||||
namespace ConsoleRestore
|
||||
{
|
||||
|
||||
typedef enum RestoreMode
|
||||
{
|
||||
RESTORE_MODE_RESTORE,
|
||||
RESTORE_MODE_NUP_ONLY
|
||||
} RestoreMode;
|
||||
|
||||
const u32 RETRY_MAX = 3;
|
||||
|
||||
void ControlState(::std::vector<std::string>& operationMessage, bool& nextStep, bool& continueRestore);
|
||||
@ -33,6 +39,7 @@ u32 GetProgress();
|
||||
|
||||
void OnSdEjected();
|
||||
void InitializeState();
|
||||
RestoreMode GetRestoreMode();
|
||||
|
||||
}
|
||||
|
||||
|
||||
@ -1133,16 +1133,14 @@ bool ReadSetting(bool* nupOnly)
|
||||
}
|
||||
|
||||
{
|
||||
if (nupOnly != NULL)
|
||||
NN_NULL_ASSERT(nupOnly);
|
||||
if (configfileLoader.ReadAsChar(L"NUP_ONLY") != NULL)
|
||||
{
|
||||
if (configfileLoader.ReadAsChar(L"NUP_ONLY") != NULL)
|
||||
s32 num = configfileLoader.ReadAsInteger(L"NUP_ONLY");
|
||||
if (num == 1)
|
||||
{
|
||||
s32 num = configfileLoader.ReadAsInteger(L"NUP_ONLY");
|
||||
if (num == 1)
|
||||
{
|
||||
*nupOnly = true;
|
||||
COMMON_LOGGER("NUP Only Mode.\n");
|
||||
}
|
||||
*nupOnly = true;
|
||||
COMMON_LOGGER("NUP Only Mode.\n");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user