mirror of
https://github.com/blawar/GLideN64.git
synced 2024-07-02 09:03:37 +00:00
Fix Pokemon Snap border flicker
This flicker happens while zooming in to take a picture while RDRAM to color buffer and color buffer to RDRAM are both enabled.
This commit is contained in:
parent
5a037474a2
commit
538674da51
|
@ -5,6 +5,7 @@
|
|||
#include "WriteToRDRAM.h"
|
||||
|
||||
#include <FrameBuffer.h>
|
||||
#include <FrameBufferInfo.h>
|
||||
#include <Config.h>
|
||||
#include <N64.h>
|
||||
#include <VI.h>
|
||||
|
@ -265,16 +266,29 @@ 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) {
|
||||
} else if (m_pCurFrameBuffer->m_size == G_IM_SIZ_16b) {
|
||||
u32 *ptr_src = (u32*)pPixels;
|
||||
u16 *ptr_dst = (u16*)(RDRAM + _startAddress);
|
||||
|
||||
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) {
|
||||
} 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);
|
||||
}
|
||||
|
||||
|
|
|
@ -1,11 +1,7 @@
|
|||
#ifndef _FRAME_BUFFER_INFO_H_
|
||||
#define _FRAME_BUFFER_INFO_H_
|
||||
|
||||
#ifdef OS_WINDOWS
|
||||
# include <windows.h>
|
||||
#else
|
||||
# include "winlnxdefs.h"
|
||||
#endif // OS_WINDOWS
|
||||
#include "Platform.h"
|
||||
|
||||
#include "Types.h"
|
||||
#include "PluginAPI.h"
|
||||
|
|
Loading…
Reference in New Issue
Block a user