Skip to content

Commit 335c7ad

Browse files
committed
GPU: ClearWithColor() running in 15-bit color mode now always clears both native and custom buffers.
- This is being done for compatibility with less sophisticated clients that don't handle the NDSDisplayInfo.isCustomSizeRequested flag.
1 parent 5610909 commit 335c7ad

File tree

1 file changed

+3
-13
lines changed

1 file changed

+3
-13
lines changed

desmume/src/GPU.cpp

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -5646,20 +5646,10 @@ void GPUSubsystem::ClearWithColor(const u16 colorBGRA5551)
56465646

56475647
if (this->_displayInfo.colorFormat == NDSColorFormat_BGR555_Rev)
56485648
{
5649-
if (this->_displayInfo.isCustomSizeRequested)
5650-
{
5651-
for (size_t i = 0; i < this->_displayInfo.framebufferPageCount; i++)
5652-
{
5653-
memset_u16((u8 *)this->_masterFramebuffer + (this->_displayInfo.framebufferPageSize * i), color16, nativeFramebufferPixCount);
5654-
memset_u16((u8 *)this->_masterFramebuffer + (this->_displayInfo.framebufferPageSize * i) + (nativeFramebufferPixCount * sizeof(u16)), color16, customFramebufferPixCount);
5655-
}
5656-
}
5657-
else
5649+
for (size_t i = 0; i < this->_displayInfo.framebufferPageCount; i++)
56585650
{
5659-
for (size_t i = 0; i < this->_displayInfo.framebufferPageCount; i++)
5660-
{
5661-
memset_u16((u8 *)this->_masterFramebuffer + (this->_displayInfo.framebufferPageSize * i), color16, nativeFramebufferPixCount);
5662-
}
5651+
memset_u16((u8 *)this->_masterFramebuffer + (this->_displayInfo.framebufferPageSize * i), color16, nativeFramebufferPixCount);
5652+
memset_u16((u8 *)this->_masterFramebuffer + (this->_displayInfo.framebufferPageSize * i) + (nativeFramebufferPixCount * sizeof(u16)), color16, customFramebufferPixCount);
56635653
}
56645654
}
56655655
else

0 commit comments

Comments
 (0)