1
0
mirror of https://github.com/blawar/GLideN64.git synced 2024-06-27 23:14:05 +00:00

Allow copy color buffer to RDRAM when current buffer is null.

Problem: JFG crosshair has incorrect color when FBInfo and Aux buffer copy are enabled.
"Aux buffer copy" copies the buffer and removes it.
If aux buffer is the current one, the current buffer set to null.
FBInfo uses ColorBufferToRDRAM to copy color buffer ti RDRAM.
ColorBufferToRDRAM does nothing when current frame buffer is null, so
FBInfo can't copy the buffer.

Solution: allow copy to RDRAM when current buffer is null.

Note: copy to RDRAM when current buffer is null was disabled in
commit bbc71c3f0 to fix problem "Snowboard Kids causes segmentation fault #477"
Now Snowboard Kids does not crash here.
This commit is contained in:
Sergey Lipskiy 2022-02-19 21:10:20 +07:00
parent 342683d2c6
commit ccc8587367

View File

@ -41,7 +41,7 @@ void ColorBufferToRDRAM::destroy() {
bool ColorBufferToRDRAM::_prepareCopy(u32& _startAddress)
{
if (VI.width == 0 || frameBufferList().getCurrent() == nullptr)
if (VI.width == 0)
return false;
FrameBuffer * pBuffer = frameBufferList().findBuffer(_startAddress);