FifoPlayer: Copy data with memcpy instead of one byte at a time
Copying with memcpy/std::copy is a lot faster than writing one byte at a time. And the behavior should be fully equivalent.
This commit is contained in:
parent
14959a1087
commit
cc32fa91af
|
@ -381,8 +381,9 @@ void FifoPlayer::WriteFifo(const u8* data, u32 start, u32 end)
|
|||
|
||||
u32 burstEnd = std::min(written + 255, lastBurstEnd);
|
||||
|
||||
while (written < burstEnd)
|
||||
GPFifo::FastWrite8(data[written++]);
|
||||
std::copy(data + written, data + burstEnd, PowerPC::ppcState.gather_pipe_ptr);
|
||||
PowerPC::ppcState.gather_pipe_ptr += burstEnd - written;
|
||||
written = burstEnd;
|
||||
|
||||
GPFifo::Write8(data[written++]);
|
||||
|
||||
|
|
Loading…
Reference in New Issue