From 2a06f76f81cfb01bfda59b684d0d93bd84031fe4 Mon Sep 17 00:00:00 2001 From: nakeee Date: Sat, 15 Nov 2008 20:01:24 +0000 Subject: [PATCH] porting 1180 to linux git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@1182 8ced0084-cf51-0410-be5f-012b33b47a6e --- Source/Core/Core/Src/HW/CommandProcessor.cpp | 4 ++++ Source/Core/VideoCommon/Src/Fifo.cpp | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/Source/Core/Core/Src/HW/CommandProcessor.cpp b/Source/Core/Core/Src/HW/CommandProcessor.cpp index 10bb2dd90c..086806d1db 100644 --- a/Source/Core/Core/Src/HW/CommandProcessor.cpp +++ b/Source/Core/Core/Src/HW/CommandProcessor.cpp @@ -505,7 +505,11 @@ void GatherPipeBursted() // Wait for GPU to catch up while (fifo.CPReadWriteDistance > 0) // TOCHECK: more checks could be needed ; +#ifdef _WIN32 InterlockedExchange((LONG*)&fifo.Fake_GPWDInterrupt, 0); +#else + Common::InterlockedExchange((int*)&fifo.Fake_GPWDInterrupt, 0); +#endif LOGV(COMMANDPROCESSOR, 2, "!!! Fake_GPWDInterrupt raised. Fake_GPWDToken %i",fifo.Fake_GPWDToken); } diff --git a/Source/Core/VideoCommon/Src/Fifo.cpp b/Source/Core/VideoCommon/Src/Fifo.cpp index c1b1009d48..e9badceb00 100644 --- a/Source/Core/VideoCommon/Src/Fifo.cpp +++ b/Source/Core/VideoCommon/Src/Fifo.cpp @@ -102,7 +102,11 @@ THREAD_RETURN GPWatchdogThread(void *pArg) // TODO (mb2): FIX this !!! //if (token == _fifo.Fake_GPWDToken) { +#ifdef _WIN32 InterlockedExchange((LONG*)&_fifo.Fake_GPWDInterrupt, 1); +#else + Common::InterlockedExchange((int*)&_fifo.Fake_GPWDInterrupt, 1); +#endif //__Log(LogTypes::VIDEO,"!!! Watchdog hit",_fifo.CPReadWriteDistance); } token = _fifo.Fake_GPWDToken;