render-cg: fix incorrect margin size for VRAMs

This commit is contained in:
Lephe 2022-05-07 18:22:38 +01:00
parent d2f788a3fc
commit 7822899b1f
No known key found for this signature in database
GPG key ID: 1BBA026E13FC0495

View file

@ -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;