From 0e8348f0e2e24cf34ca9fff60ea8f3fe626db952 Mon Sep 17 00:00:00 2001 From: OBattler Date: Tue, 14 Sep 2021 21:24:05 +0200 Subject: [PATCH] Fixed the red and blue swap in screenshots. --- src/video/video.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/video/video.c b/src/video/video.c index a98f125cb..1258b1824 100644 --- a/src/video/video.c +++ b/src/video/video.c @@ -367,7 +367,9 @@ video_take_screenshot(const char *fn) memset(&(b_rgb[y][x * 3]), 0x00, 3); else { temp = buffer32->line[blit_data.y + y][blit_data.x + x]; - memcpy(&(b_rgb[y][x * 3]), &temp, 3); + b_rgb[y][x * 3] = (temp >> 16) & 0xff; + b_rgb[y][(x * 3) + 1] = (temp >> 8) & 0xff; + b_rgb[y][(x * 3) + 2] = temp & 0xff; } } }