添加读取hpt文件的功能

This commit is contained in:
anod 2023-03-31 19:05:46 +08:00
parent 7d4cffbec8
commit 6fc6adf703

View File

@ -417,7 +417,26 @@ static u32 fixRomPadding(u32 romFileSize)
static u32 read_hookpoint_file( void *path, u32 hookpoint[MAX_HOOKPOINT] )
{
return 0;
FILINFO fi;
char *file = (char*)path;
int len = strlen( file );
file[len-1] = 't';
file[len-2] = 'p';
file[len-3] = 'h';
u32 retval = 0;
if( fStat(file, &fi) == RES_OK )
{
if( RES_OK == fsQuickRead(file, hookpoint, sizeof(u32) ) )
{
retval = 1;
}
else retval = 0;
}
else retval = 0;
file[len-1] = 'a';
file[len-2] = 'b';
file[len-3] = 'g';
return retval;
}
static Result loadGbaRom(const char *const path, u32 *const romSizeOut)