mirror of
https://gitee.com/anod/open_agb_firm.git
synced 2025-05-09 07:14:14 +08:00
定位到原因,尝试fix
This commit is contained in:
parent
1a22fcc816
commit
3473dd2008
@ -389,6 +389,7 @@ static Result loadGbaRom(const char *const path, u32 *const romSizeOut)
|
|||||||
u32 read;
|
u32 read;
|
||||||
while((res = fRead(f, ptr, 0x100000u, &read)) == RES_OK && read == 0x100000u)
|
while((res = fRead(f, ptr, 0x100000u, &read)) == RES_OK && read == 0x100000u)
|
||||||
ptr += 0x100000u;
|
ptr += 0x100000u;
|
||||||
|
fClose(f);
|
||||||
|
|
||||||
// use the gbaatm cheat
|
// use the gbaatm cheat
|
||||||
char gamecode[5];
|
char gamecode[5];
|
||||||
@ -400,12 +401,15 @@ static Result loadGbaRom(const char *const path, u32 *const romSizeOut)
|
|||||||
debug_printf("cheat res: %s => %d\n", gamecode, err);
|
debug_printf("cheat res: %s => %d\n", gamecode, err);
|
||||||
acl_close_lib();
|
acl_close_lib();
|
||||||
fini_current_cheat();
|
fini_current_cheat();
|
||||||
|
|
||||||
*romSizeOut = fixRomPadding(fileSize);
|
*romSizeOut = fixRomPadding(fileSize);
|
||||||
}
|
}
|
||||||
else res = RES_ROM_TOO_BIG;
|
else
|
||||||
|
{
|
||||||
|
res = RES_ROM_TOO_BIG;
|
||||||
fClose(f);
|
fClose(f);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user