mirror of
https://github.com/rvtr/ctr_Repair.git
synced 2025-10-31 13:51:08 -04:00
出力用ディレクトリを毎回生成するように
ログメッセージをファイル名変更に追従 APが見つからないログメッセージを出力するように git-svn-id: file:///Volumes/Transfer/gigaleak_20231201/2020-05-23%20-%20ctr.7z%20+%20svn_v1.068.zip/ctr/svn/ctr_Repair@23 385bec56-5757-e545-9c3a-d8741f4650f1
This commit is contained in:
parent
9fb3babc9c
commit
ffe18679f3
@ -101,7 +101,7 @@ void ControlState(::std::vector<std::string>& operationMessage, bool& nextStep,
|
|||||||
s_ExistAPSettingAnnotation = true;
|
s_ExistAPSettingAnnotation = true;
|
||||||
common::PlaySound(common::SOUND_ANNOTATION);
|
common::PlaySound(common::SOUND_ANNOTATION);
|
||||||
}
|
}
|
||||||
operationMessage.push_back(::std::string("APSetting.txt does not exist!"));
|
operationMessage.push_back(::std::string("Accsess_Point_Setting does not exist!"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|||||||
@ -93,7 +93,7 @@ bool CheckAndReadAPSetting(::std::vector<std::string>& operationMessage)
|
|||||||
s_ExistAPSettingAnnotation = true;
|
s_ExistAPSettingAnnotation = true;
|
||||||
common::PlaySound(common::SOUND_ANNOTATION);
|
common::PlaySound(common::SOUND_ANNOTATION);
|
||||||
}
|
}
|
||||||
operationMessage.push_back(::std::string("APSetting.txt does not exist!"));
|
operationMessage.push_back(::std::string("Accsess_Point_Setting does not exist!"));
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -375,6 +375,16 @@ void ControlState(::std::vector<std::string>& operationMessage, bool& nextStep,
|
|||||||
if (IsNetworkUpdateFinished())
|
if (IsNetworkUpdateFinished())
|
||||||
{
|
{
|
||||||
FinishFGNetworkUpdate();
|
FinishFGNetworkUpdate();
|
||||||
|
// エラーがあったら表示する
|
||||||
|
if(GetUpdateResult().IsFailure())
|
||||||
|
{
|
||||||
|
// APが見つからない
|
||||||
|
if(GetUpdateResult() == nn::ac::ResultNotFoundAccessPoint())
|
||||||
|
{
|
||||||
|
COMMON_LOGGER("No Access Point Found!");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (GetUpdateResult().IsSuccess())
|
if (GetUpdateResult().IsSuccess())
|
||||||
{
|
{
|
||||||
COMMON_LOGGER("Network Update Finished.\n");
|
COMMON_LOGGER("Network Update Finished.\n");
|
||||||
|
|||||||
@ -26,6 +26,7 @@ const char* const SDMC_ARCHIVE_NAME = "sdmc:";
|
|||||||
const char* const NAND_TWL_PHOTO_ARCHIVE_NAME = "twlp:";
|
const char* const NAND_TWL_PHOTO_ARCHIVE_NAME = "twlp:";
|
||||||
const char* const NAND_TWL_SOUND_ARCHIVE_NAME = "twls:";
|
const char* const NAND_TWL_SOUND_ARCHIVE_NAME = "twls:";
|
||||||
|
|
||||||
|
const wchar_t* const LOG_ROOT_DIRECTORY_PATH = L"sdmc:/CTR_Console_Repair";
|
||||||
const wchar_t* const SD_SAVEDATA_ROOT_NAME = L"CTR_Console_Repair/CTRBackup/";
|
const wchar_t* const SD_SAVEDATA_ROOT_NAME = L"CTR_Console_Repair/CTRBackup/";
|
||||||
const wchar_t* const SD_SAVEDATA_TWL_PHOTO_ROOT_NAME = L"CTR_Console_Repair/TWLPhotoBackup/";
|
const wchar_t* const SD_SAVEDATA_TWL_PHOTO_ROOT_NAME = L"CTR_Console_Repair/TWLPhotoBackup/";
|
||||||
const wchar_t* const SD_SAVEDATA_TWL_SOUND_ROOT_NAME = L"CTR_Console_Repair/TWLSoundBackup/";
|
const wchar_t* const SD_SAVEDATA_TWL_SOUND_ROOT_NAME = L"CTR_Console_Repair/TWLSoundBackup/";
|
||||||
|
|||||||
@ -138,6 +138,14 @@ void SdLogger::Print(const char* fmt, ::std::va_list arg)
|
|||||||
::std::wstring log(common::SDMC_ROOT_DIRECTORY_PATH);
|
::std::wstring log(common::SDMC_ROOT_DIRECTORY_PATH);
|
||||||
log += common::LOG_FILENAME;
|
log += common::LOG_FILENAME;
|
||||||
|
|
||||||
|
// ディレクトリが無ければ作る
|
||||||
|
nn::fs::Directory dir;
|
||||||
|
result = dir.TryInitialize(common::LOG_ROOT_DIRECTORY_PATH);
|
||||||
|
if(result.IsFailure())
|
||||||
|
{
|
||||||
|
result = nn::fs::TryCreateDirectory(common::LOG_ROOT_DIRECTORY_PATH);
|
||||||
|
}
|
||||||
|
|
||||||
result = sd.TryInitialize(log.c_str(), true);
|
result = sd.TryInitialize(log.c_str(), true);
|
||||||
if (result.IsSuccess())
|
if (result.IsSuccess())
|
||||||
{
|
{
|
||||||
@ -186,6 +194,7 @@ void SdLogger::Print(const char* fmt, ::std::va_list arg)
|
|||||||
PrintResultIfFailed(result, __LINE__);
|
PrintResultIfFailed(result, __LINE__);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
dir.Finalize();
|
||||||
sd.Finalize();
|
sd.Finalize();
|
||||||
SdMountManager::Unmount();
|
SdMountManager::Unmount();
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user