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.
This commit is contained in:
Ilari Liusvaara 2011-09-15 22:45:04 +03:00
parent 6e66f954d8
commit 35fe9346ba

View file

@ -383,7 +383,7 @@ void screen::copy_from(lcscreen& scr, uint32_t hscale, uint32_t vscale) throw()
*(ptr++) = c; *(ptr++) = c;
} }
for(uint32_t j = 1; j < vscale; j++) 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);
} }
} }