1
0
mirror of https://github.com/blawar/GLideN64.git synced 2024-07-02 09:03:37 +00:00
Fixes Oak's Check with CopyColorFromRDRAM enabled
This commit is contained in:
S2S 2021-01-05 21:41:29 +01:00 committed by Sergey Lipskiy
parent 1c7b8914bc
commit eb8ac40136

View File

@ -320,30 +320,15 @@ void ColorBufferToRDRAM::_copy(u32 _startAddress, u32 _endAddress, bool _sync)
if (m_pCurFrameBuffer->m_size == G_IM_SIZ_32b) {
u32 *ptr_src = (u32*)pPixels;
u32 *ptr_dst = (u32*)(RDRAM + _startAddress);
if (!FBInfo::fbInfo.isSupported() && config.frameBufferEmulation.copyFromRDRAM != 0) {
memset(ptr_dst, 0, numPixels * 4);
}
writeToRdram<u32, u32>(ptr_src, ptr_dst, &ColorBufferToRDRAM::_RGBAtoRGBA32, 0, 0, width, height, numPixels, _startAddress, m_pCurFrameBuffer->m_startAddress, m_pCurFrameBuffer->m_size);
} else if (m_pCurFrameBuffer->m_size == G_IM_SIZ_16b) {
u32 *ptr_src = (u32*)pPixels;
u16 *ptr_dst = (u16*)(RDRAM + _startAddress);
m_blueNoiseIdx++;
if (!FBInfo::fbInfo.isSupported() && config.frameBufferEmulation.copyFromRDRAM != 0) {
memset(ptr_dst, 0, numPixels * 2);
}
writeToRdram<u32, u16>(ptr_src, ptr_dst, &ColorBufferToRDRAM::_RGBAtoRGBA16, 0, 1, width, height, numPixels, _startAddress, m_pCurFrameBuffer->m_startAddress, m_pCurFrameBuffer->m_size);
} else if (m_pCurFrameBuffer->m_size == G_IM_SIZ_8b) {
u8 *ptr_src = (u8*)pPixels;
u8 *ptr_dst = RDRAM + _startAddress;
if (!FBInfo::fbInfo.isSupported() && config.frameBufferEmulation.copyFromRDRAM != 0) {
memset(ptr_dst, 0, numPixels);
}
writeToRdram<u8, u8>(ptr_src, ptr_dst, &ColorBufferToRDRAM::_RGBAtoR8, 0, 3, width, height, numPixels, _startAddress, m_pCurFrameBuffer->m_startAddress, m_pCurFrameBuffer->m_size);
}