定位到原因,尝试fix

This commit is contained in:
anod 2023-03-07 18:53:42 +08:00
parent 1a22fcc816
commit 3473dd2008

View File

@ -389,6 +389,7 @@ static Result loadGbaRom(const char *const path, u32 *const romSizeOut)
u32 read;
while((res = fRead(f, ptr, 0x100000u, &read)) == RES_OK && read == 0x100000u)
ptr += 0x100000u;
fClose(f);
// use the gbaatm cheat
char gamecode[5];
@ -400,11 +401,14 @@ static Result loadGbaRom(const char *const path, u32 *const romSizeOut)
debug_printf("cheat res: %s => %d\n", gamecode, err);
acl_close_lib();
fini_current_cheat();
*romSizeOut = fixRomPadding(fileSize);
}
else res = RES_ROM_TOO_BIG;
fClose(f);
else
{
res = RES_ROM_TOO_BIG;
fClose(f);
}
}
return res;