From 7822899b1fa14606141bbf1721568deb6a405a15 Mon Sep 17 00:00:00 2001 From: Lephe Date: Sat, 7 May 2022 18:22:38 +0100 Subject: [PATCH] render-cg: fix incorrect margin size for VRAMs --- src/render-cg/dvram.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/render-cg/dvram.c b/src/render-cg/dvram.c index 491e3e1..46a2c91 100644 --- a/src/render-cg/dvram.c +++ b/src/render-cg/dvram.c @@ -13,7 +13,7 @@ bool dvram_init(void) /* Leave MARGIN bytes on each side of the region; this enables some important optimisations in the image renderer. We also add another 32 bytes so we can manually 32-align the region */ - uint32_t region = (uint32_t)malloc(DWIDTH * DHEIGHT * 2 + MARGIN + 32); + uint32_t region = (uint32_t)malloc(DWIDTH*DHEIGHT*2 + MARGIN*2 + 32); if(region == 0) return false;