fix for cdl sram logging hack crashes nsf logging (fixed #94)

This commit is contained in:
g0me3 2020-01-29 20:44:49 +03:00
parent 18165938d4
commit fb8d46d969
1 changed files with 8 additions and 4 deletions

View File

@ -562,8 +562,10 @@ void InitCDLog()
cdloggerVideoDataSize = CHRsize[0]; cdloggerVideoDataSize = CHRsize[0];
cdloggervdata = (unsigned char*)malloc(cdloggerVideoDataSize); cdloggervdata = (unsigned char*)malloc(cdloggerVideoDataSize);
} else { } else {
cdloggerVideoDataSize = 0; if (GameInfo->type != GIT_NSF) {
cdloggervdata = (unsigned char*)malloc(8192); cdloggerVideoDataSize = 0;
cdloggervdata = (unsigned char*)malloc(8192);
}
} }
} }
@ -576,8 +578,10 @@ void ResetCDLog()
undefinedvromcount = cdloggerVideoDataSize; undefinedvromcount = cdloggerVideoDataSize;
ZeroMemory(cdloggervdata, cdloggerVideoDataSize); ZeroMemory(cdloggervdata, cdloggerVideoDataSize);
} else { } else {
undefinedvromcount = 8192; if (GameInfo->type != GIT_NSF) {
ZeroMemory(cdloggervdata, 8192); undefinedvromcount = 8192;
ZeroMemory(cdloggervdata, 8192);
}
} }
} }