aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJuan J. Martinez <jjm@usebox.net>2023-07-08 14:18:10 +0100
committerJuan J. Martinez <jjm@usebox.net>2023-07-08 14:18:10 +0100
commitae4b80050c7f86ea9e6f20937a925f4a03c028c7 (patch)
tree514ab1c6e37a9b44fd45cd6e93c3b03f78a1334e /src
parent6f18c3bae8c64ad52b541f95dde10110697e8b20 (diff)
downloadgold-mine-run-ae4b80050c7f86ea9e6f20937a925f4a03c028c7.tar.gz
gold-mine-run-ae4b80050c7f86ea9e6f20937a925f4a03c028c7.zip
Potentially faster
Diffstat (limited to 'src')
-rw-r--r--src/vga.c7
1 files changed, 4 insertions, 3 deletions
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;
}
}