mirror of
https://github.com/rvtr/TwlIPL.git
synced 2025-10-31 06:01:12 -04:00
ホワイトリス用バッファはファイルサイズを元にするので固定値制限を削除(Allocに失敗しない限りOKに)、
メモリが足りない時は、s_dht.bufferではなく、p2workで失敗するかと、 いやなら固定値Allocに戻してください git-svn-id: file:///Users/lillianskinner/Downloads/platinum/twl/TwlIPL/trunk@2771 b08762b0-b915-fc4b-9d8c-17b2551a87ff
This commit is contained in:
parent
5a52f1a4bb
commit
353c7dd46e
@ -59,7 +59,6 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <sysmenu/dht/dht.h>
|
#include <sysmenu/dht/dht.h>
|
||||||
#define DS_HASH_TABLE_SIZE (512*1024)
|
|
||||||
|
|
||||||
#define SYSM_TITLE_MESSAGE_ARRAY_MAX 1
|
#define SYSM_TITLE_MESSAGE_ARRAY_MAX 1
|
||||||
|
|
||||||
@ -257,18 +256,9 @@ static BOOL PrepareDHTDatabase(void)
|
|||||||
return FALSE; // cannot open the file
|
return FALSE; // cannot open the file
|
||||||
}
|
}
|
||||||
length = (int)FS_GetFileLength(&file);
|
length = (int)FS_GetFileLength(&file);
|
||||||
if ( length > DS_HASH_TABLE_SIZE )
|
|
||||||
{
|
|
||||||
OS_TPrintf("PrepareDHTDatabase failed: DHT file size (%d) is too large.\n", length );
|
|
||||||
if(!s_b_dev) {
|
|
||||||
ERRORLOG_Printf( "WHITELIST_INITDB_FAILED (sub info): DHT file size (%d) is too large.\n", length );
|
|
||||||
}
|
|
||||||
FS_CloseFile(&file);
|
|
||||||
return FALSE; // too large
|
|
||||||
}
|
|
||||||
|
|
||||||
#if 0 // 1 if using attach_dummyromheader
|
#if 0 // 1 if using attach_dummyromheader
|
||||||
if ( FS_SeekFile(&file, sizeof(ROM_Header), FS_SEEK_SET) )
|
if ( !FS_SeekFile(&file, sizeof(ROM_Header), FS_SEEK_SET) )
|
||||||
{
|
{
|
||||||
OS_TPrintf("PrepareDHTDatabase failed: DHT file size (%d) is too small.\n", length );
|
OS_TPrintf("PrepareDHTDatabase failed: DHT file size (%d) is too small.\n", length );
|
||||||
if(!s_b_dev) {
|
if(!s_b_dev) {
|
||||||
@ -279,6 +269,7 @@ static BOOL PrepareDHTDatabase(void)
|
|||||||
FS_CloseFile(&file);
|
FS_CloseFile(&file);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
length -= sizeof(ROM_Header);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
s_dht.buffer = SYSM_Alloc( (u32)length );
|
s_dht.buffer = SYSM_Alloc( (u32)length );
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user