----------------------------------------------------
| 776 | } |
| 777 | //---------------------------------------------------- |
| 778 | void InitCDLog(void) |
| 779 | { |
| 780 | int rom_sel = 0; |
| 781 | |
| 782 | FCEU_WRAPPER_LOCK(); |
| 783 | if (GameInfo->type == GIT_FDS) |
| 784 | { |
| 785 | rom_sel = 1; |
| 786 | } |
| 787 | cdloggerdataSize = PRGsize[rom_sel]; |
| 788 | cdloggerdata = (unsigned char *)malloc(cdloggerdataSize); |
| 789 | if (!CHRram[0] || (CHRptr[0] == PRGptr[0])) |
| 790 | { // Some kind of workaround for my OneBus VRAM hack, will remove it if I find another solution for that |
| 791 | cdloggerVideoDataSize = CHRsize[0]; |
| 792 | if (cdloggerVideoDataSize > 0) |
| 793 | { |
| 794 | cdloggervdata = (unsigned char *)malloc(cdloggerVideoDataSize); |
| 795 | } |
| 796 | else |
| 797 | { |
| 798 | cdloggervdata = nullptr; |
| 799 | } |
| 800 | } |
| 801 | else |
| 802 | { |
| 803 | if (GameInfo->type != GIT_NSF) |
| 804 | { |
| 805 | cdloggerVideoDataSize = 0; |
| 806 | cdloggervdata = (unsigned char *)malloc(8192); |
| 807 | } |
| 808 | } |
| 809 | FCEU_WRAPPER_UNLOCK(); |
| 810 | } |
| 811 | //---------------------------------------------------- |
| 812 | void ResetCDLog(void) |
| 813 | { |
no outgoing calls
no test coverage detected