From 382d4a6cd7cce35f725a5e934cad0b8d1e6d8db2 Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Sun, 11 Apr 2021 23:44:59 +0200 Subject: [PATCH] GRAPHICS: GUI: Do not use transparency when restoring background --- graphics/VectorRendererSpec.cpp | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/graphics/VectorRendererSpec.cpp b/graphics/VectorRendererSpec.cpp index ffc262ed031..0f99ecc9a9e 100644 --- a/graphics/VectorRendererSpec.cpp +++ b/graphics/VectorRendererSpec.cpp @@ -741,7 +741,20 @@ void VectorRendererSpec:: blitSurface(const Graphics::ManagedSurface *source, const Common::Rect &r) { assert(source->w == _activeSurface->w && source->h == _activeSurface->h); - _activeSurface->blitFrom(*source, r, r); + byte *dst_ptr = (byte *)_activeSurface->getBasePtr(r.left, r.top); + const byte *src_ptr = (const byte *)source->getBasePtr(r.left, r.top); + + const int dst_pitch = _activeSurface->pitch; + const int src_pitch = source->pitch; + + int h = r.height(); + const int w = r.width() * sizeof(PixelType); + + while (h--) { + memcpy(dst_ptr, src_ptr, w); + dst_ptr += dst_pitch; + src_ptr += src_pitch; + } } template