fix senseless Null3DColorOut::SetSize no-op check and add missing base renderer SetSize() call in _ApplyFramebufferSettings(). This was leaving a buffer too small, or something, I don't know, but it was stomping memory it shouldn't. fixes #985

This commit is contained in:
zeromus
2026-09-11 09:21:11 -04:00
parent cf98209063
commit 1275dc64f5
2 changed files with 10 additions and 5 deletions
+5
View File
@@ -5152,6 +5152,11 @@ void GPUSubsystem::_ApplyFramebufferSettings()
this->_AllocateFramebuffers(colorFormat, w, h, pageCount);
if (didWidthChange || didHeightChange)
{
BaseRenderer->SetFramebufferSize(w, h);
}
if (CurrentRenderer != BaseRenderer)
{
if (didColorFormatChange)
+5 -5
View File
@@ -645,17 +645,17 @@ size_t Null3DColorOut::BindRenderer()
Render3DError Null3DColorOut::SetSize(size_t w, size_t h)
{
if ( (w == this->_framebufferWidth) && (h == this->_framebufferHeight) )
{
return RENDER3DERROR_NOERR;
}
Render3DError error = Render3DColorOut::SetSize(w, h);
if (error != RENDER3DERROR_NOERR)
{
return error;
}
if ( (w == this->_framebufferWidth) && (h == this->_framebufferHeight) )
{
return RENDER3DERROR_NOERR;
}
Color4u8 *oldColor32 = this->_buffer32[0];
this->_buffer32[0] = (Color4u8 *)malloc_alignedPage(this->_framebufferSize32);
this->_buffer16[0] = (Color5551 *)this->_buffer32[0];