----------------------------------------------------
| 976 | } |
| 977 | //---------------------------------------------------- |
| 978 | void 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 | //---------------------------------------------------- |
no test coverage detected