From 35fe9346ba50f5f750cf336be1bbdee2d2280d4c Mon Sep 17 00:00:00 2001 From: Ilari Liusvaara Date: Thu, 15 Sep 2011 22:45:04 +0300 Subject: [PATCH] screen::copy_from fix bug if vscale > 1 and originx > 0 screen::copy_from did vertical scaling incorrectly if originx is positive, as it copied n first pixels of each row as opposed to copying n pixels starting from originx as it should. --- render.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/render.cpp b/render.cpp index 38003d19..31d15eb3 100644 --- a/render.cpp +++ b/render.cpp @@ -383,7 +383,7 @@ void screen::copy_from(lcscreen& scr, uint32_t hscale, uint32_t vscale) throw() *(ptr++) = c; } for(uint32_t j = 1; j < vscale; j++) - memcpy(rowptr(line + j), rowptr(line), 4 * hscale * copyable_width); + memcpy(rowptr(line + j) + originx, rowptr(line) + originx, 4 * hscale * copyable_width); } }