| 284 | } |
| 285 | |
| 286 | void 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 |
| 311 | bool DoCDLogger() |
no test coverage detected