MCPcopy Create free account
hub / github.com/TASEmulators/fceux / SaveCDLogFile

Function SaveCDLogFile

src/drivers/win/cdlogger.cpp:286–308  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

284}
285
286void SaveCDLogFile()
287{
288 if (loadedcdfile[0] == 0)
289 {
290 char nameo[2048];
291 strcpy(nameo, GetRomPath().c_str());
292 strcat(nameo, mass_replace(GetRomName(), "|", ".").c_str());
293 strcat(nameo, ".cdl");
294 RenameCDLog(nameo);
295 }
296
297 FILE *FP;
298 FP = fopen(loadedcdfile, "wb");
299 if (FP == NULL)
300 {
301 FCEUD_PrintError("Error Saving File");
302 return;
303 }
304 fwrite(cdloggerdata, cdloggerdataSize, 1, FP);
305 if(cdloggerVideoDataSize != 0)
306 fwrite(cdloggervdata, cdloggerVideoDataSize, 1, FP);
307 fclose(FP);
308}
309
310// returns false if refused to start
311bool DoCDLogger()

Callers 5

CDLoggerCallBFunction · 0.70
SaveCDLogFileAsFunction · 0.70
CDLoggerROMClosedFunction · 0.70
cdl_savecdlogfileFunction · 0.50
cdl_savecdlogfileasFunction · 0.50

Calls 5

GetRomPathFunction · 0.85
mass_replaceFunction · 0.85
GetRomNameFunction · 0.85
RenameCDLogFunction · 0.70
FCEUD_PrintErrorFunction · 0.70

Tested by

no test coverage detected