diff --git a/Source/Core/VideoCommon/Src/CommandProcessor.cpp b/Source/Core/VideoCommon/Src/CommandProcessor.cpp index 53911b4691..99ac3bf145 100644 --- a/Source/Core/VideoCommon/Src/CommandProcessor.cpp +++ b/Source/Core/VideoCommon/Src/CommandProcessor.cpp @@ -568,7 +568,7 @@ bool AllowIdleSkipping() return !g_VideoInitialize.bOnThread || !m_CPCtrlReg.BPEnable; } -// Check every FAKE_GP_WATCHDOG_PERIOD if a PE-frame-finish occured +// Check every FAKE_GP_WATCHDOG_PERIOD if a PE-frame-finish occurred // if not then lock CPUThread until GP finish a frame. void WaitForFrameFinish() { @@ -696,10 +696,10 @@ void SetFifoIdleFromVideoPlugin() s_fifoIdleEvent.Set(); } -// This is called by the ProcessorInterface when PI_FIFO_RESET is writed, -// the general idea is abort all commands in the FIFO. -// This prevent Negative fifo.CPReadWriteDistance because when PI_FIFO_RESET happens -// the fifo.CPReadWriteDistance is writed to 0 +// This is called by the ProcessorInterface when PI_FIFO_RESET is written to. +// The general idea is abort all commands in the FIFO. +// This prevents negative fifo.CPReadWriteDistance by changing fifo.CPReadWriteDistance +// to 0 when PI_FIFO_RESET occurs. void AbortFrame() { Fifo_SetRendering(false); diff --git a/Source/Core/VideoCommon/Src/Fifo.cpp b/Source/Core/VideoCommon/Src/Fifo.cpp index 73f438a0ee..ae76326eef 100644 --- a/Source/Core/VideoCommon/Src/Fifo.cpp +++ b/Source/Core/VideoCommon/Src/Fifo.cpp @@ -146,7 +146,7 @@ void Fifo_EnterLoop(const SVideoInitialize &video_initialize) // check if we are able to run this buffer - while (_fifo.bFF_GPReadEnable && (_fifo.CPReadWriteDistance || (_fifo.bFF_BPEnable && !_fifo.bFF_Breakpoint))) + while (_fifo.bFF_GPReadEnable && (_fifo.CPReadWriteDistance || (_fifo.bFF_BPEnable && ((_fifo.CPReadPointer <= _fifo.CPBreakpoint) && (_fifo.CPReadPointer + 32 > _fifo.CPBreakpoint))))) { // while the FIFO is processing data we activate this for sync with emulator thread. CommandProcessor::isFifoBusy = true;