mirror of
https://github.com/TASEmulators/desmume.git
synced 2026-10-12 02:09:51 +00:00
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:
@@ -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)
|
||||
|
||||
@@ -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];
|
||||
|
||||
Reference in New Issue
Block a user