diff --git a/desmume/src/GPU.cpp b/desmume/src/GPU.cpp old mode 100755 new mode 100644 index 3e5f59fcd..1ea224158 --- a/desmume/src/GPU.cpp +++ b/desmume/src/GPU.cpp @@ -812,7 +812,7 @@ void GPUEngineBase::SetupBuffers() { if (this->_renderLineLayerIDCustom != NULL) { - memset(this->_renderLineLayerIDCustom, GPULayerID_Backdrop, dispInfo.customWidth * dispInfo.customHeight * sizeof(u8)); + memset(this->_renderLineLayerIDCustom, GPULayerID_Backdrop, dispInfo.customWidth * (dispInfo.customHeight + (_gpuLargestDstLineCount * 4)) * sizeof(u8)); } } }