mirror of
https://github.com/rvtr/TwlIPL.git
synced 2025-10-31 06:01:12 -04:00
無線ファーム数データが取得できないことがあったのを修正。
git-svn-id: file:///Users/lillianskinner/Downloads/platinum/twl/TwlIPL/trunk@2087 b08762b0-b915-fc4b-9d8c-17b2551a87ff
This commit is contained in:
parent
742240b5c9
commit
ac2127b101
@ -7,19 +7,22 @@
|
||||
|
||||
#define WL_TITLEID 0x0003000F484E4341
|
||||
|
||||
#define WL_FW_VERSION_OFFSET 0xa0
|
||||
#define WL_FW_VERSION_SIZE 2
|
||||
#define WL_NUM_FW_OFFSET 0xa2
|
||||
#define WL_NUM_FW_SIZE 1
|
||||
#define WL_FW_TYPE_OFFSET 0xac
|
||||
#define WL_FW_TYPE_SIZE 4
|
||||
#define WL_FW_LOADSIZE 0x10
|
||||
#define WL_FW_LOAD_OFFSET 0xa0
|
||||
#define WL_FW_VERSION_LO_IDX 0x1
|
||||
#define WL_FW_VERSION_HI_IDX 0x0
|
||||
#define WL_FW_VERSION_SIZE 0x2
|
||||
#define WL_NUM_FW_IDX 0x2
|
||||
#define WL_NUM_FW_SIZE 0x2
|
||||
#define WL_FW_TYPE_IDX 0xc
|
||||
#define WL_FW_TYPE_SIZE 0x4
|
||||
|
||||
|
||||
void getWLInfo( void )
|
||||
{
|
||||
FSFile file;
|
||||
char filePath[NAM_PATH_LEN+1];
|
||||
char filebuf[4];
|
||||
char filebuf[WL_FW_LOADSIZE];
|
||||
int res;
|
||||
|
||||
FS_InitFile( &file );
|
||||
@ -28,6 +31,7 @@ void getWLInfo( void )
|
||||
|
||||
if( FS_OpenFileEx( &file, filePath, FS_FILEMODE_R ) )
|
||||
{
|
||||
/*
|
||||
// バージョン情報の読み取り
|
||||
FS_SeekFile( &file, WL_FW_VERSION_OFFSET, FS_SEEK_SET );
|
||||
res = FS_ReadFile( &file, filebuf, WL_FW_VERSION_SIZE );
|
||||
@ -57,6 +61,24 @@ void getWLInfo( void )
|
||||
int value = (int) MI_LoadLE32( filebuf );
|
||||
gAllInfo[MENU_WL][WL_FW_TYPE].iValue = value;
|
||||
gAllInfo[MENU_WL][WL_FW_TYPE].str.sjis = s_strWLFWType[ value ];
|
||||
}*/
|
||||
|
||||
FS_SeekFile( &file, WL_FW_LOAD_OFFSET , FS_SEEK_SET);
|
||||
res = FS_ReadFile( &file, filebuf, WL_FW_LOADSIZE);
|
||||
|
||||
if( res == WL_FW_LOADSIZE )
|
||||
{
|
||||
int value;
|
||||
|
||||
snprintf( gAllInfo[MENU_WL][WL_VERSION].str.sjis, DISPINFO_BUFSIZE-1, "%d.%d",
|
||||
filebuf[WL_FW_VERSION_HI_IDX], filebuf[WL_FW_VERSION_LO_IDX] );
|
||||
|
||||
gAllInfo[MENU_WL][WL_NUM_FW].iValue = (int) MI_LoadLE8( &filebuf[WL_NUM_FW_IDX] );
|
||||
gAllInfo[MENU_WL][WL_NUM_FW].isNumData = TRUE;
|
||||
|
||||
value = (int) MI_LoadLE32( &filebuf[WL_FW_TYPE_IDX] );
|
||||
gAllInfo[MENU_WL][WL_FW_TYPE].iValue = value;
|
||||
gAllInfo[MENU_WL][WL_FW_TYPE].str.sjis = s_strWLFWType[ value ];
|
||||
}
|
||||
}
|
||||
else
|
||||
|
||||
Loading…
Reference in New Issue
Block a user