From 6fc6adf703e214f033d638b8efe6442c02629733 Mon Sep 17 00:00:00 2001 From: anod <182859762@qq.com> Date: Fri, 31 Mar 2023 19:05:46 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E8=AF=BB=E5=8F=96hpt?= =?UTF-8?q?=E6=96=87=E4=BB=B6=E7=9A=84=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- source/arm11/open_agb_firm.c | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/source/arm11/open_agb_firm.c b/source/arm11/open_agb_firm.c index 76abd94..8515875 100644 --- a/source/arm11/open_agb_firm.c +++ b/source/arm11/open_agb_firm.c @@ -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)