Merge pull request #530 from workhorsy/master

Fixed issue with DSP Dump not closing files.
This commit is contained in:
Lioncash 2014-06-23 19:48:03 -04:00
commit 4138702336
1 changed files with 7 additions and 3 deletions

View File

@ -224,19 +224,23 @@ void DumpDSP_ROMs(const u16* rom, const u16* coef)
FILE *fROM = fopen(filename, "wb");
sprintf(filename, "sd:/dsp_coef.bin");
FILE *fCOEF = fopen(filename, "wb");
if (fROM && fCOEF)
{
fwrite(MEM_PHYSICAL_TO_K0(rom), 0x2000, 1, fROM);
fclose(fROM);
fwrite(MEM_PHYSICAL_TO_K0(coef), 0x1000, 1, fCOEF);
fwrite(MEM_PHYSICAL_TO_K0(coef), 0x1000, 1, fCOEF);
fclose(fCOEF);
UpdateLastMessage("DSP ROMs dumped to SD");
}
else
{
UpdateLastMessage("SD Write Error");
}
if (fROM)
fclose(fROM);
if (fCOEF)
fclose(fCOEF);
#else
// Allow to connect to gdb (dump ram... :s)
_break();