| 492 | } |
| 493 | |
| 494 | void CDLoggerROMChanged() |
| 495 | { |
| 496 | if (hCDLogger) |
| 497 | { |
| 498 | FreeCDLog(); |
| 499 | InitCDLog(); |
| 500 | ResetCDLog(); |
| 501 | RenameCDLog(""); |
| 502 | UpdateCDLogger(); |
| 503 | } |
| 504 | |
| 505 | if (!autoresumeCDLogging) |
| 506 | return; |
| 507 | |
| 508 | // try to load respective CDL file |
| 509 | char nameo[2048]; |
| 510 | strcpy(nameo, GetRomPath().c_str()); |
| 511 | strcat(nameo, mass_replace(GetRomName(), "|", ".").c_str()); |
| 512 | strcat(nameo, ".cdl"); |
| 513 | |
| 514 | FILE *FP; |
| 515 | FP = fopen(nameo, "rb"); |
| 516 | if (FP != NULL) |
| 517 | { |
| 518 | // .cdl file with this ROM name exists |
| 519 | fclose(FP); |
| 520 | if (!hCDLogger) |
| 521 | DoCDLogger(); |
| 522 | if (LoadCDLog(nameo)) |
| 523 | StartCDLogging(); |
| 524 | } |
| 525 | } |
| 526 | |
| 527 | bool PauseCDLogging() |
| 528 | { |
no test coverage detected