From ae4b80050c7f86ea9e6f20937a925f4a03c028c7 Mon Sep 17 00:00:00 2001 From: "Juan J. Martinez" Date: Sat, 8 Jul 2023 14:18:10 +0100 Subject: Potentially faster --- src/vga.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/vga.c') diff --git a/src/vga.c b/src/vga.c index 98cb404..8230880 100644 --- a/src/vga.c +++ b/src/vga.c @@ -176,8 +176,9 @@ void read_buffer(uint8_t *dst, const Rect *src) for (int8_t j = 0; j < src->h; j++) { - memcpy(dst, s, src->w); - dst += src->w; - s += 320; + for (int8_t i = 0; i < src->w; i++) + *dst++ = *s++; + + s += 320 - src->w; } } -- cgit v1.2.3