From ff8f03ab74c20ce387dbbd20a57c317dfd225ab5 Mon Sep 17 00:00:00 2001 From: Vicki Pfau Date: Thu, 6 Jun 2019 23:36:35 -0700 Subject: [PATCH] GBA Video: Fix 512x512 backgrounds in GL --- src/gba/renderers/gl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gba/renderers/gl.c b/src/gba/renderers/gl.c index 01d9f118d..72ddd1d8c 100644 --- a/src/gba/renderers/gl.c +++ b/src/gba/renderers/gl.c @@ -155,7 +155,7 @@ static const char* const _renderMode0 = " if ((size & 1) == 1) {\n" " coord.y += coord.x & 256;\n" " }\n" - " coord &= ivec2(255, 511);\n" + " coord &= ivec2(255, 1023);\n" " int mapAddress = screenBase + (coord.x >> 3) + (coord.y >> 3) * 32;\n" " vec4 map = texelFetch(vram, ivec2(mapAddress & 255, mapAddress >> 8), 0);\n" " int tileFlags = int(map.g * 15.9);\n"