----------------------------------------------------
| 938 | } |
| 939 | //---------------------------------------------------- |
| 940 | void CDLoggerROMChanged(void) |
| 941 | { |
| 942 | FreeCDLog(); |
| 943 | InitCDLog(); |
| 944 | ResetCDLog(); |
| 945 | RenameCDLog(""); |
| 946 | |
| 947 | g_config->getOption("SDL.AutoResumeCDL", &autoResumeCDL); |
| 948 | |
| 949 | if (!autoResumeCDL) |
| 950 | return; |
| 951 | |
| 952 | // try to load respective CDL file |
| 953 | std::string nameo; |
| 954 | getDefaultCDLFile(nameo); |
| 955 | |
| 956 | FILE *FP; |
| 957 | FP = fopen(nameo.c_str(), "rb"); |
| 958 | if (FP != NULL) |
| 959 | { |
| 960 | // .cdl file with this ROM name exists |
| 961 | fclose(FP); |
| 962 | //if (!hCDLogger) |
| 963 | //{ |
| 964 | // DoCDLogger(); |
| 965 | //} |
| 966 | if (LoadCDLog(nameo.c_str())) |
| 967 | { |
| 968 | StartCDLogging(); |
| 969 | } |
| 970 | } |
| 971 | } |
| 972 | //---------------------------------------------------- |
| 973 | void RenameCDLog(const char *newName) |
| 974 | { |
no test coverage detected