From 31d3d6309b1a03b0fad73cdee242ec7684cdf0bc Mon Sep 17 00:00:00 2001 From: Cacodemon345 Date: Fri, 14 Jan 2022 12:39:49 +0600 Subject: [PATCH] Copy lines from buffer32 one by one (cherry picked from commit 00a75d4e602ec3ba6d214eeae4500c90dc77fc5f) --- src/qt/qt_rendererstack.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/qt/qt_rendererstack.cpp b/src/qt/qt_rendererstack.cpp index c736baa5d..78e8e99d8 100644 --- a/src/qt/qt_rendererstack.cpp +++ b/src/qt/qt_rendererstack.cpp @@ -240,7 +240,11 @@ void RendererStack::blit(int x, int y, int w, int h) sw = this->w = w; sh = this->h = h; auto imagebits = imagebufs[currentBuf].get(); - video_copy(imagebits + y * (2048 * 4) + x * 4, &(buffer32->line[y][x]), h * 2048 * sizeof(uint32_t)); + for (int y1 = y; y1 < (y + h - 1); y1++) + { + auto scanline = imagebits + (y1 * (2048) * 4) + (x * 4); + video_copy(scanline, &(buffer32->line[y1][x]), w * 4); + } if (screenshots) {