mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-21 05:09:34 -06:00
merged windows/linux atomic operations,
please test on windows git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@1391 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
@ -104,11 +104,7 @@ void Fifo_EnterLoop(const SVideoInitialize &video_initialize)
|
||||
// check if we are able to run this buffer
|
||||
if ((_fifo.bFF_GPReadEnable) && _fifo.CPReadWriteDistance && !(_fifo.bFF_BPEnable && _fifo.bFF_Breakpoint))
|
||||
{
|
||||
#ifdef _WIN32
|
||||
InterlockedExchange((LONG*)&_fifo.CPReadIdle, 0);
|
||||
#else
|
||||
Common::InterlockedExchange((int*)&_fifo.CPReadIdle, 0);
|
||||
#endif
|
||||
Common::InterlockedExchange((LONG*)&_fifo.CPReadIdle, 0);
|
||||
//video_initialize.pLog("RUN...........................",FALSE);
|
||||
int peek_counter = 0;
|
||||
while (_fifo.bFF_GPReadEnable && (_fifo.CPReadWriteDistance > 0))
|
||||
@ -129,11 +125,8 @@ void Fifo_EnterLoop(const SVideoInitialize &video_initialize)
|
||||
if (readPtr == _fifo.CPBreakpoint)
|
||||
{
|
||||
video_initialize.pLog("!!! BP irq raised",FALSE);
|
||||
#ifdef _WIN32
|
||||
InterlockedExchange((LONG*)&_fifo.bFF_Breakpoint, 1);
|
||||
#else
|
||||
Common::InterlockedExchange((int*)&_fifo.bFF_Breakpoint, 1);
|
||||
#endif
|
||||
Common::InterlockedExchange((LONG*)&_fifo.bFF_Breakpoint, 1);
|
||||
|
||||
video_initialize.pUpdateInterrupts();
|
||||
break;
|
||||
}
|
||||
@ -163,20 +156,11 @@ void Fifo_EnterLoop(const SVideoInitialize &video_initialize)
|
||||
#endif
|
||||
}
|
||||
Video_SendFifoData(uData, distToSend);
|
||||
#ifdef _WIN32
|
||||
InterlockedExchange((LONG*)&_fifo.CPReadPointer, readPtr);
|
||||
InterlockedExchangeAdd((LONG*)&_fifo.CPReadWriteDistance, -distToSend);
|
||||
#else
|
||||
Common::InterlockedExchange((int*)&_fifo.CPReadPointer, readPtr);
|
||||
Common::InterlockedExchangeAdd((int*)&_fifo.CPReadWriteDistance, -distToSend);
|
||||
#endif
|
||||
Common::InterlockedExchange((LONG*)&_fifo.CPReadPointer, readPtr);
|
||||
Common::InterlockedExchangeAdd((LONG*)&_fifo.CPReadWriteDistance, -distToSend);
|
||||
}
|
||||
//video_initialize.pLog("..........................IDLE",FALSE);
|
||||
#ifdef _WIN32
|
||||
InterlockedExchange((LONG*)&_fifo.CPReadIdle, 1);
|
||||
#else
|
||||
Common::InterlockedExchange((int*)&_fifo.CPReadIdle, 1);
|
||||
#endif
|
||||
Common::InterlockedExchange((LONG*)&_fifo.CPReadIdle, 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user