mirror of
https://github.com/rvtr/TwlIPL.git
synced 2025-10-31 06:01:12 -04:00
本体初期化時にshared2以下を消去しないようにしました。
本体初期化時に本体ボリュームとバックライト輝度を初期化するようにしました。 git-svn-id: file:///Users/lillianskinner/Downloads/platinum/twl/TwlIPL/trunk@1859 b08762b0-b915-fc4b-9d8c-17b2551a87ff
This commit is contained in:
parent
78790883e4
commit
d3fee837c3
@ -48,7 +48,6 @@
|
||||
// 指定ディレクトリ自体は残ります。
|
||||
static const char* sDeleteDirectoryList[] =
|
||||
{
|
||||
"nand:/shared2",
|
||||
"nand:/import",
|
||||
"nand:/progress",
|
||||
"nand2:/photo",
|
||||
@ -63,8 +62,8 @@ static const char* sFillFileList[] =
|
||||
"nand:/shared1/TWLCFG1.dat"
|
||||
};
|
||||
|
||||
static u8 sClearData[CLEAR_DATA_SIZE] ATTRIBUTE_ALIGN(32);
|
||||
static u32 sNCFGAddr;
|
||||
#define VOLUME_INITIAL_VALUE 5 // 本体初期化時に設定する本体ボリューム値
|
||||
#define BACKLIGHT_INITIAL_VALUE 3 // 本体初期化時に設定するバックライト輝度
|
||||
|
||||
/*---------------------------------------------------------------------------*
|
||||
内部変数定義
|
||||
@ -75,6 +74,8 @@ static NAMUTFree spFreeFunc;
|
||||
static FSDirectoryEntryInfo sEntryInfo;
|
||||
static NAMTitleId sTitleIdArray[TITLE_LIST_MAX];
|
||||
static char sCurrentFullPath[FS_ENTRY_LONGNAME_MAX];
|
||||
static u8 sClearData[CLEAR_DATA_SIZE] ATTRIBUTE_ALIGN(32);
|
||||
static u32 sNCFGAddr;
|
||||
|
||||
/*---------------------------------------------------------------------------*
|
||||
内部関数宣言
|
||||
@ -170,6 +171,18 @@ BOOL NAMUT_Format(void)
|
||||
// RTCのクリアは必要ない。2008.06.25 小野沢確認。
|
||||
// 本体初期化後の初回起動シーケンス起動時にRTCをクリアするため。
|
||||
|
||||
// 本体ボリューム設定
|
||||
if (SNDEX_SetVolume(VOLUME_INITIAL_VALUE) != SNDEX_RESULT_SUCCESS)
|
||||
{
|
||||
ret = FALSE;
|
||||
}
|
||||
|
||||
// バックライト輝度設定
|
||||
if (PM_SendUtilityCommand( PMi_UTIL_SET_BACKLIGHT_BRIGHTNESS, (u16)BACKLIGHT_INITIAL_VALUE, NULL ) != PM_SUCCESS)
|
||||
{
|
||||
ret = FALSE;
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
@ -487,9 +500,18 @@ BOOL NAMUTi_DestroySubBanner(const char* path)
|
||||
static BOOL NAMUTi_MountAndFormatOtherTitleSaveData(u64 titleID, const char *arcname)
|
||||
{
|
||||
BOOL succeeded = FALSE;
|
||||
static FSFATFSArchiveWork work;
|
||||
FSFATFSArchiveWork* pWork;
|
||||
FSResult result;
|
||||
|
||||
if (!spAllocFunc || !spFreeFunc)
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
pWork = spAllocFunc( sizeof(FSFATFSArchiveWork) );
|
||||
|
||||
// マウント試行。
|
||||
FSResult result = FSi_MountSpecialArchive(titleID, arcname, &work);
|
||||
result = FSi_MountSpecialArchive(titleID, arcname, pWork);
|
||||
if (result != FS_RESULT_SUCCESS)
|
||||
{
|
||||
OS_TWarning("FSi_MountSpecialArchive failed. (%d)\n", result);
|
||||
@ -514,8 +536,11 @@ static BOOL NAMUTi_MountAndFormatOtherTitleSaveData(u64 titleID, const char *arc
|
||||
// ドライブ情報をダンプ。
|
||||
// DumpArchiveResource(path);
|
||||
// アンマウント。
|
||||
(void)FSi_MountSpecialArchive(titleID, NULL, &work);
|
||||
(void)FSi_MountSpecialArchive(titleID, NULL, pWork);
|
||||
}
|
||||
|
||||
spFreeFunc ( pWork );
|
||||
|
||||
return succeeded;
|
||||
}
|
||||
|
||||
|
||||
@ -61,6 +61,9 @@ void TwlMain(void)
|
||||
GX_SetPower(GX_POWER_ALL); // 各ロジック パワーON
|
||||
FS_Init( 3 );
|
||||
|
||||
SND_Init();
|
||||
SNDEX_Init();
|
||||
|
||||
// 割り込み許可----------------------------
|
||||
(void)OS_SetIrqFunction(OS_IE_V_BLANK, INTR_VBlank);
|
||||
(void)OS_EnableIrqMask(OS_IE_V_BLANK);
|
||||
|
||||
@ -71,6 +71,9 @@ LLIBRARIES += libwl_sp$(TWL_LIBSUFFIX).a \
|
||||
libhotsw_sp$(TWL_LIBSUFFIX).a \
|
||||
libreloc_info_sp$(TWL_LIBSUFFIX).a
|
||||
|
||||
LLIBRARIES += libpm_sp.SYSMENU$(TWL_LIBSUFFIX).a
|
||||
GLIBRARIES := $(filter-out libpm_sp$(TWL_LIBSUFFIX).a,$(GLIBRARIES))
|
||||
|
||||
LDEPENDS_NEF = $(TWL_LIBS) $(LLIBRARIES)
|
||||
|
||||
do-build: $(TARGETS)
|
||||
|
||||
@ -61,7 +61,7 @@ Ltdautoload SCRWRAM
|
||||
Library libsnd_sp$(LIBSUFFIX).a
|
||||
Library libsndex_sp$(LIBSUFFIX).a
|
||||
Library libspi_sp$(LIBSUFFIX).a
|
||||
Library libpm_sp$(LIBSUFFIX).a
|
||||
Library libpm_sp.SYSMENU$(LIBSUFFIX).a
|
||||
Library libtp_sp$(LIBSUFFIX).a
|
||||
Library libtpex_sp$(LIBSUFFIX).a
|
||||
Library libmic_sp$(LIBSUFFIX).a
|
||||
|
||||
@ -73,6 +73,7 @@ TwlMain()
|
||||
GX_Init();
|
||||
FX_Init();
|
||||
SND_Init();
|
||||
SNDEX_Init();
|
||||
TP_Init();
|
||||
RTC_Init();
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user