From 4d1b0b5809d03a1b953d919910cdaf8b6bd66181 Mon Sep 17 00:00:00 2001 From: riccardom Date: Wed, 13 Apr 2011 20:38:55 +0000 Subject: [PATCH] dma controller: rename check to dmaCheck The conflicting macro is the check() assertion macro defined in Apple's CoreFoundation framework, specifically in the AssertMacros.h file. Unfortunately, this file must be included in the Cocoa port. From rogerman in bug #3259154 --- desmume/src/MMU.cpp | 8 ++++---- desmume/src/MMU.h | 4 ++-- desmume/src/NDSSystem.cpp | 4 ++-- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/desmume/src/MMU.cpp b/desmume/src/MMU.cpp index dabfb519b..8aa6571fd 100644 --- a/desmume/src/MMU.cpp +++ b/desmume/src/MMU.cpp @@ -1759,7 +1759,7 @@ bool DmaController::loadstate(EMUFILE* f) read8le(&temp,f); sar = (EDMASourceUpdate)temp; read8le(&temp,f); dar = (EDMADestinationUpdate)temp; read32le(&saddr,f); read32le(&daddr,f); - read32le(&check,f); read32le(&running,f); read32le(&paused,f); read32le(&triggered,f); + read32le(&dmaCheck,f); read32le(&running,f); read32le(&paused,f); read32le(&triggered,f); read64le(&nextEvent,f); if(version==1) @@ -1782,7 +1782,7 @@ void DmaController::savestate(EMUFILE *f) write8le(sar,f); write8le(dar,f); write32le(saddr,f); write32le(daddr,f); - write32le(check,f); write32le(running,f); write32le(paused,f); write32le(triggered,f); + write32le(dmaCheck,f); write32le(running,f); write32le(paused,f); write32le(triggered,f); write64le(nextEvent,f); write32le(saddr_user,f); write32le(daddr_user,f); @@ -1870,7 +1870,7 @@ if(_startmode==0 && wordcount==1) { void DmaController::exec() { - check = FALSE; + dmaCheck = FALSE; if(running) { @@ -2056,7 +2056,7 @@ void DmaController::tryTrigger(EDMAMode mode) void DmaController::doSchedule() { - check = TRUE; + dmaCheck = TRUE; nextEvent = nds_timer; NDS_RescheduleDMA(); } diff --git a/desmume/src/MMU.h b/desmume/src/MMU.h index 56f2a4404..1656a0ee5 100644 --- a/desmume/src/MMU.h +++ b/desmume/src/MMU.h @@ -202,7 +202,7 @@ public: u32 saddr_user, daddr_user; //indicates whether the dma needs to be checked for triggering - BOOL check; + BOOL dmaCheck; //indicates whether the dma right now is logically running //(though for now we copy all the data when it triggers) @@ -237,7 +237,7 @@ public: //by inspecting dma3 saddr when it boots saddr(0), daddr(0), saddr_user(0), daddr_user(0), - check(FALSE), + dmaCheck(FALSE), running(FALSE), paused(FALSE), triggered(FALSE), diff --git a/desmume/src/NDSSystem.cpp b/desmume/src/NDSSystem.cpp index e4ea15c38..1cbaf269b 100644 --- a/desmume/src/NDSSystem.cpp +++ b/desmume/src/NDSSystem.cpp @@ -1184,11 +1184,11 @@ template struct TSequenceItem_DMA : public TSequenceItem FORCEINLINE bool isTriggered() { - return (controller->check && nds_timer>= controller->nextEvent); + return (controller->dmaCheck && nds_timer>= controller->nextEvent); } FORCEINLINE bool isEnabled() { - return controller->check?TRUE:FALSE; + return controller->dmaCheck?TRUE:FALSE; } FORCEINLINE u64 next()