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

Function SaveCDLogFile

src/drivers/Qt/CodeDataLogger.cpp:978–1000  ·  view source on GitHub ↗

----------------------------------------------------

Source from the content-addressed store, hash-verified

976}
977//----------------------------------------------------
978void SaveCDLogFile(void)
979{
980 if (loadedcdfile[0] == 0)
981 {
982 std::string nameo;
983 getDefaultCDLFile(nameo);
984 RenameCDLog(nameo.c_str());
985 }
986
987 FILE *FP;
988 FP = fopen(loadedcdfile, "wb");
989 if (FP == NULL)
990 {
991 FCEUD_PrintError("Error Saving CDL File");
992 return;
993 }
994 fwrite(cdloggerdata, cdloggerdataSize, 1, FP);
995 if (cdloggerVideoDataSize != 0)
996 {
997 fwrite(cdloggervdata, cdloggerVideoDataSize, 1, FP);
998 }
999 fclose(FP);
1000}
1001//----------------------------------------------------

Callers 3

saveCdlFileMethod · 0.70
saveCdlFileAsMethod · 0.70
CDLoggerROMClosedFunction · 0.70

Calls 3

getDefaultCDLFileFunction · 0.85
RenameCDLogFunction · 0.70
FCEUD_PrintErrorFunction · 0.70

Tested by

no test coverage detected