1
0
Fork 0

Check if capture file fails to open

Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@1867
This commit is contained in:
Sjoerd van der Berg 2004-07-04 21:18:12 +00:00
parent 0a13f2d0ed
commit 82b5755fb2

View file

@ -268,16 +268,17 @@ static void OPL_SaveRawEvent(void) {
fwrite(dro_header,1,sizeof(dro_header),opl.raw.handle);
fclose(opl.raw.handle);
opl.raw.handle=0;
return;
} else {
opl.raw.handle=OpenCaptureFile("Raw Opl",".dro");
if (!opl.raw.handle) return;
opl.raw.index=0;
opl.raw.used=0;
opl.raw.done=0;
opl.raw.start=0;
opl.raw.last=0;
memset(opl.raw.buffer,0,sizeof(opl.raw.buffer));
fwrite(dro_header,1,sizeof(dro_header),opl.raw.handle);
}
opl.raw.handle=OpenCaptureFile("Raw Opl",".dro");
opl.raw.index=0;
opl.raw.used=0;
opl.raw.done=0;
opl.raw.start=0;
opl.raw.last=0;
memset(opl.raw.buffer,0,sizeof(opl.raw.buffer));
fwrite(dro_header,1,sizeof(dro_header),opl.raw.handle);
}
static void OPL_Stop(Section* sec) {