Don't segfault if the specified bios files aren't found.
This commit is contained in:
parent
f8778ef3f2
commit
fd424a1e3a
|
@ -2235,9 +2235,12 @@ static void PrepareBiosARM7()
|
|||
{
|
||||
//read arm7 bios from inputfile and flag it if it succeeds
|
||||
FILE *arm7inf = fopen(CommonSettings.ARM7BIOS,"rb");
|
||||
if (fread(MMU.ARM7_BIOS,1,16384,arm7inf) == 16384)
|
||||
NDS_ARM7.BIOS_loaded = true;
|
||||
fclose(arm7inf);
|
||||
if (arm7inf)
|
||||
{
|
||||
if (fread(MMU.ARM7_BIOS,1,16384,arm7inf) == 16384)
|
||||
NDS_ARM7.BIOS_loaded = true;
|
||||
fclose(arm7inf);
|
||||
}
|
||||
}
|
||||
|
||||
//choose to use SWI emulation or routines from bios
|
||||
|
@ -2290,9 +2293,12 @@ static void PrepareBiosARM9()
|
|||
{
|
||||
//read arm9 bios from inputfile and flag it if it succeeds
|
||||
FILE* arm9inf = fopen(CommonSettings.ARM9BIOS,"rb");
|
||||
if (fread(MMU.ARM9_BIOS,1,4096,arm9inf) == 4096)
|
||||
NDS_ARM9.BIOS_loaded = true;
|
||||
fclose(arm9inf);
|
||||
if (arm9inf)
|
||||
{
|
||||
if (fread(MMU.ARM9_BIOS,1,4096,arm9inf) == 4096)
|
||||
NDS_ARM9.BIOS_loaded = true;
|
||||
fclose(arm9inf);
|
||||
}
|
||||
}
|
||||
|
||||
//choose to use SWI emulation or routines from bios
|
||||
|
|
Loading…
Reference in New Issue