fix crash on Windows + small performace improvement BUT breaks Donkey

Kong
This commit is contained in:
CocoSimone
2023-02-21 01:29:26 +01:00
parent f113db7059
commit 1c42170810
10 changed files with 26 additions and 32 deletions

View File

@@ -6,15 +6,13 @@
namespace n64 {
RDP::RDP() {
rdram = (u8*)calloc(RDRAM_SIZE, 1);
Reset();
}
void RDP::Reset() {
dpc.status.raw = 0x80;
if(rdram) {
free(rdram);
}
rdram = (u8*)calloc(RDRAM_SIZE, 1);
memset(rdram, 0, RDRAM_SIZE);
memset(cmd_buf, 0, 0x100000);
}