From 7d6cdf381974819d2c9b94a0d9344058bed90910 Mon Sep 17 00:00:00 2001 From: Lior Halphon Date: Thu, 17 Oct 2019 21:21:10 +0300 Subject: [PATCH] =?UTF-8?q?Fix=20SGB=20support=20in=20SDL=E2=80=99s=20soft?= =?UTF-8?q?ware=20rendering.=20Fixes=20#208?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- SDL/gui.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SDL/gui.c b/SDL/gui.c index 0723384..6cffeaf 100644 --- a/SDL/gui.c +++ b/SDL/gui.c @@ -33,7 +33,7 @@ void render_texture(void *pixels, void *previous) { if (renderer) { if (pixels) { - SDL_UpdateTexture(texture, NULL, pixels, 160 * sizeof (uint32_t)); + SDL_UpdateTexture(texture, NULL, pixels, GB_get_screen_width(&gb) * sizeof (uint32_t)); } SDL_RenderClear(renderer); SDL_RenderCopy(renderer, texture, NULL, NULL);