mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-06-03 17:02:41 +00:00
The WGP does not loop if the write pointer is set beyond the end of the fifo. Updated the video plugins this time.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4531 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
parent
ebc696c58e
commit
dee90fa7aa
3 changed files with 21 additions and 17 deletions
|
@ -165,18 +165,21 @@ void Fifo_EnterLoop(const SVideoInitialize &video_initialize)
|
|||
break;
|
||||
}
|
||||
distToSend = 32;
|
||||
readPtr += 32;
|
||||
|
||||
if ( readPtr >= _fifo.CPEnd)
|
||||
readPtr = _fifo.CPBase;
|
||||
else
|
||||
readPtr += 32;
|
||||
}
|
||||
else
|
||||
{
|
||||
distToSend = _fifo.CPReadWriteDistance;
|
||||
// send 1024B chunk max length to have better control over PeekMessages' period
|
||||
distToSend = distToSend > 1024 ? 1024 : distToSend;
|
||||
if ((distToSend + readPtr) >= _fifo.CPEnd) // TODO: better?
|
||||
// add 32 bytes because the cp end points to the start of the last 32 byte chunk
|
||||
if ((distToSend + readPtr) >= (_fifo.CPEnd + 32)) // TODO: better?
|
||||
{
|
||||
distToSend =_fifo.CPEnd - readPtr;
|
||||
distToSend =(_fifo.CPEnd + 32) - readPtr;
|
||||
readPtr = _fifo.CPBase;
|
||||
}
|
||||
else
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue