From 02949f66315af01b6e0b5013af046c43b0f67b09 Mon Sep 17 00:00:00 2001 From: gered Date: Sat, 6 Mar 2021 19:55:32 -0500 Subject: [PATCH] prevent using a framebuffer size that isn't evenly made up of 4x4 tiles as our copy routine assumes dimensions of some multiple of 4x4 tiles ... --- src/gxfb.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/gxfb.c b/src/gxfb.c index d082f11..e78d3f3 100644 --- a/src/gxfb.c +++ b/src/gxfb.c @@ -211,8 +211,12 @@ int fb_init(GXRModeObj *rmode, int width, int height) { return 1; if (width <= 0 || width > (rmode->fbWidth / 2)) return 1; + if (width % 4) + return 1; if (height <= 0 || height > rmode->efbHeight) return 1; + if (height % 4) + return 1; video_init(rmode);